@oat-sa/tao-core-shared-libs 1.5.2 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/lib/ckeditor/ckeditor.js +573 -572
  2. package/lib/ckeditor/lang/af.js +1 -1
  3. package/lib/ckeditor/lang/ar.js +1 -1
  4. package/lib/ckeditor/lang/az.js +1 -1
  5. package/lib/ckeditor/lang/bg.js +1 -1
  6. package/lib/ckeditor/lang/bn.js +1 -1
  7. package/lib/ckeditor/lang/bs.js +1 -1
  8. package/lib/ckeditor/lang/ca.js +1 -1
  9. package/lib/ckeditor/lang/cs.js +1 -1
  10. package/lib/ckeditor/lang/cy.js +1 -1
  11. package/lib/ckeditor/lang/da.js +1 -1
  12. package/lib/ckeditor/lang/de-ch.js +1 -1
  13. package/lib/ckeditor/lang/de.js +1 -1
  14. package/lib/ckeditor/lang/el.js +1 -1
  15. package/lib/ckeditor/lang/en-au.js +1 -1
  16. package/lib/ckeditor/lang/en-ca.js +1 -1
  17. package/lib/ckeditor/lang/en-gb.js +1 -1
  18. package/lib/ckeditor/lang/en.js +1 -1
  19. package/lib/ckeditor/lang/eo.js +1 -1
  20. package/lib/ckeditor/lang/es-mx.js +1 -1
  21. package/lib/ckeditor/lang/es.js +1 -1
  22. package/lib/ckeditor/lang/et.js +1 -1
  23. package/lib/ckeditor/lang/eu.js +1 -1
  24. package/lib/ckeditor/lang/fa.js +1 -1
  25. package/lib/ckeditor/lang/fi.js +1 -1
  26. package/lib/ckeditor/lang/fo.js +1 -1
  27. package/lib/ckeditor/lang/fr-ca.js +1 -1
  28. package/lib/ckeditor/lang/fr.js +1 -1
  29. package/lib/ckeditor/lang/gl.js +1 -1
  30. package/lib/ckeditor/lang/gu.js +1 -1
  31. package/lib/ckeditor/lang/he.js +1 -1
  32. package/lib/ckeditor/lang/hi.js +1 -1
  33. package/lib/ckeditor/lang/hr.js +1 -1
  34. package/lib/ckeditor/lang/hu.js +1 -1
  35. package/lib/ckeditor/lang/id.js +1 -1
  36. package/lib/ckeditor/lang/is.js +1 -1
  37. package/lib/ckeditor/lang/it.js +1 -1
  38. package/lib/ckeditor/lang/ja.js +1 -1
  39. package/lib/ckeditor/lang/ka.js +1 -1
  40. package/lib/ckeditor/lang/km.js +1 -1
  41. package/lib/ckeditor/lang/ko.js +1 -1
  42. package/lib/ckeditor/lang/ku.js +1 -1
  43. package/lib/ckeditor/lang/lt.js +1 -1
  44. package/lib/ckeditor/lang/lv.js +1 -1
  45. package/lib/ckeditor/lang/mk.js +1 -1
  46. package/lib/ckeditor/lang/mn.js +1 -1
  47. package/lib/ckeditor/lang/ms.js +1 -1
  48. package/lib/ckeditor/lang/nb.js +1 -1
  49. package/lib/ckeditor/lang/nl.js +1 -1
  50. package/lib/ckeditor/lang/no.js +1 -1
  51. package/lib/ckeditor/lang/oc.js +1 -1
  52. package/lib/ckeditor/lang/pl.js +1 -1
  53. package/lib/ckeditor/lang/pt-br.js +1 -1
  54. package/lib/ckeditor/lang/pt.js +1 -1
  55. package/lib/ckeditor/lang/ro.js +1 -1
  56. package/lib/ckeditor/lang/ru.js +1 -1
  57. package/lib/ckeditor/lang/si.js +1 -1
  58. package/lib/ckeditor/lang/sk.js +1 -1
  59. package/lib/ckeditor/lang/sl.js +1 -1
  60. package/lib/ckeditor/lang/sq.js +1 -1
  61. package/lib/ckeditor/lang/sr-latn.js +1 -1
  62. package/lib/ckeditor/lang/sr.js +1 -1
  63. package/lib/ckeditor/lang/sv.js +1 -1
  64. package/lib/ckeditor/lang/th.js +1 -1
  65. package/lib/ckeditor/lang/tr.js +1 -1
  66. package/lib/ckeditor/lang/tt.js +1 -1
  67. package/lib/ckeditor/lang/ug.js +1 -1
  68. package/lib/ckeditor/lang/uk.js +1 -1
  69. package/lib/ckeditor/lang/vi.js +1 -1
  70. package/lib/ckeditor/lang/zh-cn.js +1 -1
  71. package/lib/ckeditor/lang/zh.js +1 -1
  72. package/lib/ckeditor/package-lock.json +72 -102
  73. package/lib/ckeditor/plugins/icons.png +0 -0
  74. package/lib/ckeditor/plugins/icons_hidpi.png +0 -0
  75. package/lib/ckeditor/plugins/sourcedialog/dialogs/sourcedialog.js +1 -1
  76. package/lib/ckeditor/skins/kama/editor.css +1 -1
  77. package/lib/ckeditor/skins/kama/editor_ie.css +1 -1
  78. package/lib/ckeditor/skins/kama/editor_ie7.css +1 -1
  79. package/lib/ckeditor/skins/kama/editor_ie8.css +1 -1
  80. package/lib/ckeditor/skins/kama/editor_iequirks.css +1 -1
  81. package/lib/ckeditor/skins/kama/icons.png +0 -0
  82. package/lib/ckeditor/skins/kama/icons_hidpi.png +0 -0
  83. package/lib/ckeditor/skins/moono/editor.css +1 -1
  84. package/lib/ckeditor/skins/moono/editor_gecko.css +1 -1
  85. package/lib/ckeditor/skins/moono/editor_ie.css +1 -1
  86. package/lib/ckeditor/skins/moono/editor_ie7.css +1 -1
  87. package/lib/ckeditor/skins/moono/editor_ie8.css +1 -1
  88. package/lib/ckeditor/skins/moono/editor_iequirks.css +1 -1
  89. package/lib/ckeditor/skins/moono/icons.png +0 -0
  90. package/lib/ckeditor/skins/moono/icons_hidpi.png +0 -0
  91. package/lib/ckeditor/skins/moono-lisa/editor.css +1 -1
  92. package/lib/ckeditor/skins/moono-lisa/editor_gecko.css +1 -1
  93. package/lib/ckeditor/skins/moono-lisa/editor_ie.css +1 -1
  94. package/lib/ckeditor/skins/moono-lisa/editor_ie8.css +1 -1
  95. package/lib/ckeditor/skins/moono-lisa/editor_iequirks.css +1 -1
  96. package/lib/ckeditor/skins/moono-lisa/icons.png +0 -0
  97. package/lib/ckeditor/skins/moono-lisa/icons_hidpi.png +0 -0
  98. package/lib/ckeditor/skins/tao/editor.css +1 -1
  99. package/lib/ckeditor/skins/tao/icons.png +0 -0
  100. package/lib/ckeditor/skins/tao/icons_hidpi.png +0 -0
  101. package/package.json +1 -1
@@ -2,43 +2,43 @@
2
2
  Copyright (c) 2003-2023, CKSource - Frederico Knabben. All rights reserved.
3
3
  For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
- (function(){if(!window.CKEDITOR||!window.CKEDITOR.dom){window.CKEDITOR||(window.CKEDITOR=function(){var a=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,l={timestamp:"N0CE",version:"4.14.1 TAO-3 DEV",revision:"2e63e0988",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:a},status:"unloaded",basePath:function(){var e=window.CKEDITOR_BASEPATH||"";if(!e)for(var g=document.getElementsByTagName("script"),k=0;k<g.length;k++){var h=g[k].src.match(a);if(h){e=h[1];break}}-1==e.indexOf(":/")&&
6
- "//"!=e.slice(0,2)&&(e=0===e.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+e:location.href.match(/^[^\?]*\/(?:)/)[0]+e);if(!e)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return e}(),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);
7
- return a},domReady:function(){function a(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded",a,!1),e()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",a),e())}catch(h){}}function e(){for(var h;h=k.shift();)h()}var k=[];return function(h){function c(){try{document.documentElement.doScroll("left")}catch(b){setTimeout(c,1);return}a()}k.push(h);"complete"===document.readyState&&setTimeout(a,1);if(1==k.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",
8
- a,!1),window.addEventListener("load",a,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",a);window.attachEvent("onload",a);h=!1;try{h=!window.frameElement}catch(d){}document.documentElement.doScroll&&h&&c()}}}()},g=window.CKEDITOR_GETURL;if(g){var e=l.getUrl;l.getUrl=function(a){return g.call(l,a)||e.call(l,a)}}return l}());CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(a){var l=CKEDITOR.event.prototype,g;for(g in l)null==a[g]&&(a[g]=l[g])},
9
- CKEDITOR.event.prototype=function(){function a(a){var f=l(this);return f[a]||(f[a]=new g(a))}var l=function(a){a=a.getPrivate&&a.getPrivate()||a._||(a._={});return a.events||(a.events={})},g=function(a){this.name=a;this.listeners=[]};g.prototype={getListenerIndex:function(a){for(var f=0,g=this.listeners;f<g.length;f++)if(g[f].fn==a)return f;return-1}};return{define:function(e,f){var g=a.call(this,e);CKEDITOR.tools.extend(g,f,!0)},on:function(e,f,g,k,h){function c(b,n,c,a){b={name:e,sender:this,editor:b,
10
- data:n,listenerData:k,stop:c,cancel:a,removeListener:d};return!1===f.call(g,b)?!1:b.data}function d(){n.removeListener(e,f)}var b=a.call(this,e);if(0>b.getListenerIndex(f)){b=b.listeners;g||(g=this);isNaN(h)&&(h=10);var n=this;c.fn=f;c.priority=h;for(var q=b.length-1;0<=q;q--)if(b[q].priority<=h)return b.splice(q+1,0,c),{removeListener:d};b.unshift(c)}return{removeListener:d}},once:function(){var a=Array.prototype.slice.call(arguments),f=a[1];a[1]=function(a){a.removeListener();return f.apply(this,
11
- arguments)};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,f=function(){a=1},g=0,k=function(){g=1};return function(h,c,d){var b=l(this)[h];h=a;var n=g;a=g=0;if(b){var q=b.listeners;if(q.length)for(var q=q.slice(0),u,t=0;t<q.length;t++){if(b.errorProof)try{u=q[t].call(this,d,c,f,k)}catch(r){}else u=q[t].call(this,d,c,f,k);!1===u?g=1:"undefined"!=typeof u&&(c=u);if(a||g)break}}c=
12
- g?!1:"undefined"==typeof c?!0:c;a=h;g=n;return c}}(),fireOnce:function(a,f,g){f=this.fire(a,f,g);delete l(this)[a];return f},removeListener:function(a,f){var g=l(this)[a];if(g){var k=g.getListenerIndex(f);0<=k&&g.listeners.splice(k,1)}},removeAllListeners:function(){var a=l(this),f;for(f in a)delete a[f]},hasListeners:function(a){return(a=l(this)[a])&&0<a.listeners.length}}}());CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=
5
+ (function(){if(!window.CKEDITOR||!window.CKEDITOR.dom){window.CKEDITOR||(window.CKEDITOR=function(){var a=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,l={timestamp:"N94B",version:"4.14.1 TAO-3 DEV",revision:"7ae2df29e",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:a},status:"unloaded",basePath:function(){var f=window.CKEDITOR_BASEPATH||"";if(!f)for(var g=document.getElementsByTagName("script"),k=0;k<g.length;k++){var h=g[k].src.match(a);if(h){f=h[1];break}}-1==f.indexOf(":/")&&
6
+ "//"!=f.slice(0,2)&&(f=0===f.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+f:location.href.match(/^[^\?]*\/(?:)/)[0]+f);if(!f)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return f}(),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);
7
+ return a},domReady:function(){function a(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded",a,!1),f()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",a),f())}catch(h){}}function f(){for(var h;h=k.shift();)h()}var k=[];return function(h){function c(){try{document.documentElement.doScroll("left")}catch(b){setTimeout(c,1);return}a()}k.push(h);"complete"===document.readyState&&setTimeout(a,1);if(1==k.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",
8
+ a,!1),window.addEventListener("load",a,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",a);window.attachEvent("onload",a);h=!1;try{h=!window.frameElement}catch(d){}document.documentElement.doScroll&&h&&c()}}}()},g=window.CKEDITOR_GETURL;if(g){var f=l.getUrl;l.getUrl=function(a){return g.call(l,a)||f.call(l,a)}}return l}());CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(a){var l=CKEDITOR.event.prototype,g;for(g in l)null==a[g]&&(a[g]=l[g])},
9
+ CKEDITOR.event.prototype=function(){function a(a){var e=l(this);return e[a]||(e[a]=new g(a))}var l=function(a){a=a.getPrivate&&a.getPrivate()||a._||(a._={});return a.events||(a.events={})},g=function(a){this.name=a;this.listeners=[]};g.prototype={getListenerIndex:function(a){for(var e=0,g=this.listeners;e<g.length;e++)if(g[e].fn==a)return e;return-1}};return{define:function(f,e){var g=a.call(this,f);CKEDITOR.tools.extend(g,e,!0)},on:function(f,e,g,k,h){function c(b,n,c,a){b={name:f,sender:this,editor:b,
10
+ data:n,listenerData:k,stop:c,cancel:a,removeListener:d};return!1===e.call(g,b)?!1:b.data}function d(){n.removeListener(f,e)}var b=a.call(this,f);if(0>b.getListenerIndex(e)){b=b.listeners;g||(g=this);isNaN(h)&&(h=10);var n=this;c.fn=e;c.priority=h;for(var q=b.length-1;0<=q;q--)if(b[q].priority<=h)return b.splice(q+1,0,c),{removeListener:d};b.unshift(c)}return{removeListener:d}},once:function(){var a=Array.prototype.slice.call(arguments),e=a[1];a[1]=function(a){a.removeListener();return e.apply(this,
11
+ arguments)};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,e=function(){a=1},g=0,k=function(){g=1};return function(h,c,d){var b=l(this)[h];h=a;var n=g;a=g=0;if(b){var q=b.listeners;if(q.length)for(var q=q.slice(0),u,t=0;t<q.length;t++){if(b.errorProof)try{u=q[t].call(this,d,c,e,k)}catch(r){}else u=q[t].call(this,d,c,e,k);!1===u?g=1:"undefined"!=typeof u&&(c=u);if(a||g)break}}c=
12
+ g?!1:"undefined"==typeof c?!0:c;a=h;g=n;return c}}(),fireOnce:function(a,e,g){e=this.fire(a,e,g);delete l(this)[a];return e},removeListener:function(a,e){var g=l(this)[a];if(g){var k=g.getListenerIndex(e);0<=k&&g.listeners.splice(k,1)}},removeAllListeners:function(){var a=l(this),e;for(e in a)delete a[e]},hasListeners:function(a){return(a=l(this)[a])&&0<a.listeners.length}}}());CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=
13
13
  function(a,l){a in{instanceReady:1,loaded:1}&&(this[a]=!0);return CKEDITOR.event.prototype.fire.call(this,a,l,this)},CKEDITOR.editor.prototype.fireOnce=function(a,l){a in{instanceReady:1,loaded:1}&&(this[a]=!0);return CKEDITOR.event.prototype.fireOnce.call(this,a,l,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype));CKEDITOR.env||(CKEDITOR.env=function(){var a=navigator.userAgent.toLowerCase(),l=a.match(/edge[ \/](\d+.?\d*)/),g=-1<a.indexOf("trident/"),g=!(!l&&!g),g={ie:g,edge:!!l,webkit:!g&&
14
- -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,e=window.location.hostname;return a!=e&&a!="["+e+"]"},secure:"https:"==location.protocol};g.gecko="Gecko"==navigator.product&&!g.webkit&&!g.ie;g.webkit&&(-1<a.indexOf("chrome")?g.chrome=
15
- !0:g.safari=!0);var e=0;g.ie&&(e=l?parseFloat(l[1]):g.quirks||!document.documentMode?parseFloat(a.match(/msie (\d+)/)[1]):document.documentMode,g.ie9Compat=9==e,g.ie8Compat=8==e,g.ie7Compat=7==e,g.ie6Compat=7>e||g.quirks);g.gecko&&(l=a.match(/rv:([\d\.]+)/))&&(l=l[1].split("."),e=1E4*l[0]+100*(l[1]||0)+1*(l[2]||0));g.air&&(e=parseFloat(a.match(/ adobeair\/(\d+)/)[1]));g.webkit&&(e=parseFloat(a.match(/ applewebkit\/(\d+)/)[1]));g.version=e;g.isCompatible=!(g.ie&&7>e)&&!(g.gecko&&4E4>e)&&!(g.webkit&&
16
- 534>e);g.hidpi=2<=window.devicePixelRatio;g.needsBrFiller=g.gecko||g.webkit||g.ie&&10<e;g.needsNbspFiller=g.ie&&11>e;g.cssClass="cke_browser_"+(g.ie?"ie":g.gecko?"gecko":g.webkit?"webkit":"unknown");g.quirks&&(g.cssClass+=" cke_browser_quirks");g.ie&&(g.cssClass+=" cke_browser_ie"+(g.quirks?"6 cke_browser_iequirks":g.version));g.air&&(g.cssClass+=" cke_browser_air");g.iOS&&(g.cssClass+=" cke_browser_ios");g.hidpi&&(g.cssClass+=" cke_hidpi");return g}());"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);
14
+ -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,f=window.location.hostname;return a!=f&&a!="["+f+"]"},secure:"https:"==location.protocol};g.gecko="Gecko"==navigator.product&&!g.webkit&&!g.ie;g.webkit&&(-1<a.indexOf("chrome")?g.chrome=
15
+ !0:g.safari=!0);var f=0;g.ie&&(f=l?parseFloat(l[1]):g.quirks||!document.documentMode?parseFloat(a.match(/msie (\d+)/)[1]):document.documentMode,g.ie9Compat=9==f,g.ie8Compat=8==f,g.ie7Compat=7==f,g.ie6Compat=7>f||g.quirks);g.gecko&&(l=a.match(/rv:([\d\.]+)/))&&(l=l[1].split("."),f=1E4*l[0]+100*(l[1]||0)+1*(l[2]||0));g.air&&(f=parseFloat(a.match(/ adobeair\/(\d+)/)[1]));g.webkit&&(f=parseFloat(a.match(/ applewebkit\/(\d+)/)[1]));g.version=f;g.isCompatible=!(g.ie&&7>f)&&!(g.gecko&&4E4>f)&&!(g.webkit&&
16
+ 534>f);g.hidpi=2<=window.devicePixelRatio;g.needsBrFiller=g.gecko||g.webkit||g.ie&&10<f;g.needsNbspFiller=g.ie&&11>f;g.cssClass="cke_browser_"+(g.ie?"ie":g.gecko?"gecko":g.webkit?"webkit":"unknown");g.quirks&&(g.cssClass+=" cke_browser_quirks");g.ie&&(g.cssClass+=" cke_browser_ie"+(g.quirks?"6 cke_browser_iequirks":g.version));g.air&&(g.cssClass+=" cke_browser_air");g.iOS&&(g.cssClass+=" cke_browser_ios");g.hidpi&&(g.cssClass+=" cke_hidpi");return g}());"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);
17
17
  CKEDITOR.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,l=CKEDITOR.loadFullCoreTimeout;a&&(CKEDITOR.status=
18
18
  "basic_ready",a&&a._load?a():l&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},1E3*l))})})();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,l){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:a,additionalData:l})};CKEDITOR.error=function(a,l){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log",
19
19
  {type:"error",errorCode:a,additionalData:l})};CKEDITOR.on("log",function(a){if(window.console&&window.console.log){var l=console[a.data.type]?a.data.type:"log",g=a.data.errorCode;if(a=a.data.additionalData)console[l]("[CKEDITOR] Error code: "+g+".",a);else console[l]("[CKEDITOR] Error code: "+g+".");console[l]("[CKEDITOR] For more information about this error go to https://ckeditor.com/docs/ckeditor4/latest/guide/dev_errors.html#"+g)}},null,null,999);CKEDITOR.dom={};(function(){function a(b,c,a){this._minInterval=
20
20
  b;this._context=a;this._lastOutput=this._scheduledTimer=0;this._output=CKEDITOR.tools.bind(c,a||{});var h=this;this.input=function(){function b(){h._lastOutput=(new Date).getTime();h._scheduledTimer=0;h._call()}if(!h._scheduledTimer||!1!==h._reschedule()){var n=(new Date).getTime()-h._lastOutput;n<h._minInterval?h._scheduledTimer=setTimeout(b,h._minInterval-n):b()}}}function l(b,c,h){a.call(this,b,c,h);this._args=[];var d=this;this.input=CKEDITOR.tools.override(this.input,function(b){return function(){d._args=
21
- Array.prototype.slice.call(arguments);b.call(this)}})}var g=[],e=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",f=/&/g,m=/>/g,k=/</g,h=/"/g,c=/&(lt|gt|amp|quot|nbsp|shy|#\d{1,5});/g,d={lt:"\x3c",gt:"\x3e",amp:"\x26",quot:'"',nbsp:" ",shy:"­"},b=function(b,c){return"#"==c[0]?String.fromCharCode(parseInt(c.slice(1),10)):d[c]};CKEDITOR.on("reset",function(){g=[]});CKEDITOR.tools={arrayCompare:function(b,c){if(!b&&!c)return!0;if(!b||!c||b.length!=c.length)return!1;
21
+ Array.prototype.slice.call(arguments);b.call(this)}})}var g=[],f=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",e=/&/g,m=/>/g,k=/</g,h=/"/g,c=/&(lt|gt|amp|quot|nbsp|shy|#\d{1,5});/g,d={lt:"\x3c",gt:"\x3e",amp:"\x26",quot:'"',nbsp:" ",shy:"­"},b=function(b,c){return"#"==c[0]?String.fromCharCode(parseInt(c.slice(1),10)):d[c]};CKEDITOR.on("reset",function(){g=[]});CKEDITOR.tools={arrayCompare:function(b,c){if(!b&&!c)return!0;if(!b||!c||b.length!=c.length)return!1;
22
22
  for(var a=0;a<b.length;a++)if(b[a]!=c[a])return!1;return!0},getIndex:function(b,c){for(var a=0;a<b.length;++a)if(c(b[a]))return a;return-1},clone:function(b){var c;if(b&&b instanceof Array){c=[];for(var a=0;a<b.length;a++)c[a]=CKEDITOR.tools.clone(b[a]);return c}if(null===b||"object"!=typeof b||b instanceof String||b instanceof Number||b instanceof Boolean||b instanceof Date||b instanceof RegExp||b.nodeType||b.window===b)return b;c=new b.constructor;for(a in b)c[a]=CKEDITOR.tools.clone(b[a]);return c},
23
- capitalize:function(b,c){return b.charAt(0).toUpperCase()+(c?b.slice(1):b.slice(1).toLowerCase())},extend:function(b){var c=arguments.length,a,h;"boolean"==typeof(a=arguments[c-1])?c--:"boolean"==typeof(a=arguments[c-2])&&(h=arguments[c-1],c-=2);for(var d=1;d<c;d++){var e=arguments[d]||{};CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(e),function(c){if(!0===a||null==b[c])if(!h||c in h)b[c]=e[c]})}return b},prototypedCopy:function(b){var c=function(){};c.prototype=b;return new c},copy:function(b){var c=
24
- {},a;for(a in b)c[a]=b[a];return c},isArray:function(b){return"[object Array]"==Object.prototype.toString.call(b)},isEmpty:function(b){for(var c in b)if(b.hasOwnProperty(c))return!1;return!0},cssVendorPrefix:function(b,c,a){if(a)return e+b+":"+c+";"+b+":"+c;a={};a[b]=c;a[e+b]=c;return a},cssStyleToDomStyle:function(){var b=document.createElement("div").style,c="undefined"!=typeof b.cssFloat?"cssFloat":"undefined"!=typeof b.styleFloat?"styleFloat":"float";return function(b){return"float"==b?c:b.replace(/-./g,
25
- function(b){return b.substr(1).toUpperCase()})}}(),buildStyleHtml:function(b){b=[].concat(b);for(var c,a=[],h=0;h<b.length;h++)if(c=b[h])/@import|[{}]/.test(c)?a.push("\x3cstyle\x3e"+c+"\x3c/style\x3e"):a.push('\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+c+'"\x3e');return a.join("")},htmlEncode:function(b){return void 0===b||null===b?"":String(b).replace(f,"\x26amp;").replace(m,"\x26gt;").replace(k,"\x26lt;")},htmlDecode:function(n){return n.replace(c,b)},htmlEncodeAttr:function(b){return CKEDITOR.tools.htmlEncode(b).replace(h,
26
- "\x26quot;")},htmlDecodeAttr:function(b){return CKEDITOR.tools.htmlDecode(b)},transformPlainTextToHtml:function(b,c){var a=c==CKEDITOR.ENTER_BR,h=this.htmlEncode(b.replace(/\r\n/g,"\n")),h=h.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;"),d=c==CKEDITOR.ENTER_P?"p":"div";if(!a){var e=/\n{2}/g;if(e.test(h))var f="\x3c"+d+"\x3e",k="\x3c/"+d+"\x3e",h=f+h.replace(e,function(){return k+f})+k}h=h.replace(/\n/g,"\x3cbr\x3e");a||(h=h.replace(new RegExp("\x3cbr\x3e(?\x3d\x3c/"+d+"\x3e)"),function(b){return CKEDITOR.tools.repeat(b,
23
+ capitalize:function(b,c){return b.charAt(0).toUpperCase()+(c?b.slice(1):b.slice(1).toLowerCase())},extend:function(b){var c=arguments.length,a,h;"boolean"==typeof(a=arguments[c-1])?c--:"boolean"==typeof(a=arguments[c-2])&&(h=arguments[c-1],c-=2);for(var d=1;d<c;d++){var f=arguments[d]||{};CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(f),function(c){if(!0===a||null==b[c])if(!h||c in h)b[c]=f[c]})}return b},prototypedCopy:function(b){var c=function(){};c.prototype=b;return new c},copy:function(b){var c=
24
+ {},a;for(a in b)c[a]=b[a];return c},isArray:function(b){return"[object Array]"==Object.prototype.toString.call(b)},isEmpty:function(b){for(var c in b)if(b.hasOwnProperty(c))return!1;return!0},cssVendorPrefix:function(b,c,a){if(a)return f+b+":"+c+";"+b+":"+c;a={};a[b]=c;a[f+b]=c;return a},cssStyleToDomStyle:function(){var b=document.createElement("div").style,c="undefined"!=typeof b.cssFloat?"cssFloat":"undefined"!=typeof b.styleFloat?"styleFloat":"float";return function(b){return"float"==b?c:b.replace(/-./g,
25
+ function(b){return b.substr(1).toUpperCase()})}}(),buildStyleHtml:function(b){b=[].concat(b);for(var c,a=[],h=0;h<b.length;h++)if(c=b[h])/@import|[{}]/.test(c)?a.push("\x3cstyle\x3e"+c+"\x3c/style\x3e"):a.push('\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+c+'"\x3e');return a.join("")},htmlEncode:function(b){return void 0===b||null===b?"":String(b).replace(e,"\x26amp;").replace(m,"\x26gt;").replace(k,"\x26lt;")},htmlDecode:function(n){return n.replace(c,b)},htmlEncodeAttr:function(b){return CKEDITOR.tools.htmlEncode(b).replace(h,
26
+ "\x26quot;")},htmlDecodeAttr:function(b){return CKEDITOR.tools.htmlDecode(b)},transformPlainTextToHtml:function(b,c){var a=c==CKEDITOR.ENTER_BR,h=this.htmlEncode(b.replace(/\r\n/g,"\n")),h=h.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;"),d=c==CKEDITOR.ENTER_P?"p":"div";if(!a){var f=/\n{2}/g;if(f.test(h))var e="\x3c"+d+"\x3e",k="\x3c/"+d+"\x3e",h=e+h.replace(f,function(){return k+e})+k}h=h.replace(/\n/g,"\x3cbr\x3e");a||(h=h.replace(new RegExp("\x3cbr\x3e(?\x3d\x3c/"+d+"\x3e)"),function(b){return CKEDITOR.tools.repeat(b,
27
27
  2)}));h=h.replace(/^ | $/g,"\x26nbsp;");return h=h.replace(/(>|\s) /g,function(b,c){return c+"\x26nbsp;"}).replace(/ (?=<)/g,"\x26nbsp;")},getNextNumber:function(){var b=0;return function(){return++b}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var b="e",c=0;8>c;c++)b+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return b},override:function(b,c){var a=c(b);a.prototype=b.prototype;return a},setTimeout:function(b,c,a,h,d){d||(d=window);a||(a=
28
28
  d);return d.setTimeout(function(){h?b.apply(a,[].concat(h)):b.apply(a)},c||0)},throttle:function(b,c,a){return new this.buffers.throttle(b,c,a)},trim:function(){var b=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(c){return c.replace(b,"")}}(),ltrim:function(){var b=/^[ \t\n\r]+/g;return function(c){return c.replace(b,"")}}(),rtrim:function(){var b=/[ \t\n\r]+$/g;return function(c){return c.replace(b,"")}}(),indexOf:function(b,c){if("function"==typeof c)for(var a=0,h=b.length;a<h;a++){if(c(b[a]))return a}else{if(b.indexOf)return b.indexOf(c);
29
- a=0;for(h=b.length;a<h;a++)if(b[a]===c)return a}return-1},search:function(b,c){var a=CKEDITOR.tools.indexOf(b,c);return 0<=a?b[a]:null},bind:function(b,c){var a=Array.prototype.slice.call(arguments,2);return function(){return b.apply(c,a.concat(Array.prototype.slice.call(arguments)))}},createClass:function(b){var c=b.$,a=b.base,h=b.privates||b._,d=b.proto;b=b.statics;!c&&(c=function(){a&&this.base.apply(this,arguments)});if(h)var e=c,c=function(){var b=this._||(this._={}),c;for(c in h){var a=h[c];
30
- b[c]="function"==typeof a?CKEDITOR.tools.bind(a,this):a}e.apply(this,arguments)};a&&(c.prototype=this.prototypedCopy(a.prototype),c.prototype.constructor=c,c.base=a,c.baseProto=a.prototype,c.prototype.base=function x(){this.base=a.prototype.base;a.apply(this,arguments);this.base=x});d&&this.extend(c.prototype,d,!0);b&&this.extend(c,b,!0);return c},addFunction:function(b,c){return g.push(function(){return b.apply(c||this,arguments)})-1},removeFunction:function(b){g[b]=null},callFunction:function(b){var c=
29
+ a=0;for(h=b.length;a<h;a++)if(b[a]===c)return a}return-1},search:function(b,c){var a=CKEDITOR.tools.indexOf(b,c);return 0<=a?b[a]:null},bind:function(b,c){var a=Array.prototype.slice.call(arguments,2);return function(){return b.apply(c,a.concat(Array.prototype.slice.call(arguments)))}},createClass:function(b){var c=b.$,a=b.base,h=b.privates||b._,d=b.proto;b=b.statics;!c&&(c=function(){a&&this.base.apply(this,arguments)});if(h)var f=c,c=function(){var b=this._||(this._={}),c;for(c in h){var a=h[c];
30
+ b[c]="function"==typeof a?CKEDITOR.tools.bind(a,this):a}f.apply(this,arguments)};a&&(c.prototype=this.prototypedCopy(a.prototype),c.prototype.constructor=c,c.base=a,c.baseProto=a.prototype,c.prototype.base=function x(){this.base=a.prototype.base;a.apply(this,arguments);this.base=x});d&&this.extend(c.prototype,d,!0);b&&this.extend(c,b,!0);return c},addFunction:function(b,c){return g.push(function(){return b.apply(c||this,arguments)})-1},removeFunction:function(b){g[b]=null},callFunction:function(b){var c=
31
31
  g[b];return c&&c.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var b=/^-?\d+\.?\d*px$/,c;return function(a){c=CKEDITOR.tools.trim(a+"")+"px";return b.test(c)?c:a||""}}(),convertToPx:function(){var b;return function(c){b||(b=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(b));if(!/%$/.test(c)){var a=0>parseFloat(c);
32
32
  a&&(c=c.replace("-",""));b.setStyle("width",c);c=b.$.clientWidth;return a?-c:c}return c}}(),repeat:function(b,c){return Array(c+1).join(b)},tryThese:function(){for(var b,c=0,a=arguments.length;c<a;c++){var h=arguments[c];try{b=h();break}catch(d){}}return b},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(b){return function(){var c=arguments,a=this;window.setTimeout(function(){b.apply(a,c)},0)}},normalizeCssText:function(b,c){var a=[],h,d=CKEDITOR.tools.parseCssText(b,
33
33
  !0,c);for(h in d)a.push(h+":"+d[h]);a.sort();return a.length?a.join(";")+";":""},convertRgbToHex:function(b){return b.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,function(b,c,a,h){b=[c,a,h];for(c=0;3>c;c++)b[c]=("0"+parseInt(b[c],10).toString(16)).slice(-2);return"#"+b.join("")})},normalizeHex:function(b){return b.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi,function(b,c,a,h){b=c.toLowerCase();3==b.length&&(b=b.split(""),b=[b[0],b[0],b[1],b[1],b[2],b[2]].join(""));return"#"+b+h})},parseCssText:function(b,
34
34
  c,a){var h={};a&&(b=(new CKEDITOR.dom.element("span")).setAttribute("style",b).getAttribute("style")||"");b&&(b=CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(b)));if(!b||";"==b)return h;b.replace(/&quot;/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(b,a,n){c&&(a=a.toLowerCase(),"font-family"==a&&(n=n.replace(/\s*,\s*/g,",")),n=CKEDITOR.tools.trim(n));h[a]=n});return h},writeCssText:function(b,c){var a,h=[];for(a in b)h.push(a+":"+b[a]);c&&h.sort();return h.join("; ")},
35
35
  objectCompare:function(b,c,a){var h;if(!b&&!c)return!0;if(!b||!c)return!1;for(h in b)if(b[h]!=c[h])return!1;if(!a)for(h in c)if(b[h]!=c[h])return!1;return!0},objectKeys:function(b){return CKEDITOR.tools.object.keys(b)},convertArrayToObject:function(b,c){var a={};1==arguments.length&&(c=!0);for(var h=0,d=b.length;h<d;++h)a[b[h]]=c;return a},fixDomain:function(){for(var b;;)try{b=window.parent.document.domain;break}catch(c){b=b?b.replace(/.+?(?:\.|$)/,""):document.domain;if(!b)break;document.domain=
36
36
  b}return!!b},eventsBuffer:function(b,c,a){return new this.buffers.event(b,c,a)},enableHtml5Elements:function(b,c){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(" "),h=a.length,d;h--;)d=b.createElement(a[h]),c&&b.appendChild(d)},checkIfAnyArrayItemMatches:function(b,c){for(var a=0,h=b.length;a<h;++a)if(b[a].match(c))return!0;return!1},checkIfAnyObjectPropertyMatches:function(b,
37
- c){for(var a in b)if(a.match(c))return!0;return!1},keystrokeToString:function(b,c){var a=this.keystrokeToArray(b,c);a.display=a.display.join("+");a.aria=a.aria.join("+");return a},keystrokeToArray:function(b,c){var a=c&16711680,h=c&65535,d=CKEDITOR.env.mac,e=[],f=[];a&CKEDITOR.CTRL&&(e.push(d?"⌘":b[17]),f.push(d?b[224]:b[17]));a&CKEDITOR.ALT&&(e.push(d?"⌥":b[18]),f.push(b[18]));a&CKEDITOR.SHIFT&&(e.push(d?"⇧":b[16]),f.push(b[16]));h&&(b[h]?(e.push(b[h]),f.push(b[h])):(e.push(String.fromCharCode(h)),
38
- f.push(String.fromCharCode(h))));return{display:e,aria:f}},transparentImageData:"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw\x3d\x3d",getCookie:function(b){b=b.toLowerCase();for(var c=document.cookie.split(";"),a,h,d=0;d<c.length;d++)if(a=c[d].split("\x3d"),h=decodeURIComponent(CKEDITOR.tools.trim(a[0]).toLowerCase()),h===b)return decodeURIComponent(1<a.length?a[1]:"");return null},setCookie:function(b,c){document.cookie=encodeURIComponent(b)+"\x3d"+encodeURIComponent(c)+
37
+ c){for(var a in b)if(a.match(c))return!0;return!1},keystrokeToString:function(b,c){var a=this.keystrokeToArray(b,c);a.display=a.display.join("+");a.aria=a.aria.join("+");return a},keystrokeToArray:function(b,c){var a=c&16711680,h=c&65535,d=CKEDITOR.env.mac,f=[],e=[];a&CKEDITOR.CTRL&&(f.push(d?"⌘":b[17]),e.push(d?b[224]:b[17]));a&CKEDITOR.ALT&&(f.push(d?"⌥":b[18]),e.push(b[18]));a&CKEDITOR.SHIFT&&(f.push(d?"⇧":b[16]),e.push(b[16]));h&&(b[h]?(f.push(b[h]),e.push(b[h])):(f.push(String.fromCharCode(h)),
38
+ e.push(String.fromCharCode(h))));return{display:f,aria:e}},transparentImageData:"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw\x3d\x3d",getCookie:function(b){b=b.toLowerCase();for(var c=document.cookie.split(";"),a,h,d=0;d<c.length;d++)if(a=c[d].split("\x3d"),h=decodeURIComponent(CKEDITOR.tools.trim(a[0]).toLowerCase()),h===b)return decodeURIComponent(1<a.length?a[1]:"");return null},setCookie:function(b,c){document.cookie=encodeURIComponent(b)+"\x3d"+encodeURIComponent(c)+
39
39
  ";path\x3d/"},getCsrfToken:function(){var b=CKEDITOR.tools.getCookie("ckCsrfToken");if(!b||40!=b.length){var b=[],c="";if(window.crypto&&window.crypto.getRandomValues)b=new Uint8Array(40),window.crypto.getRandomValues(b);else for(var a=0;40>a;a++)b.push(Math.floor(256*Math.random()));for(a=0;a<b.length;a++)var h="abcdefghijklmnopqrstuvwxyz0123456789".charAt(b[a]%36),c=c+(.5<Math.random()?h.toUpperCase():h);b=c;CKEDITOR.tools.setCookie("ckCsrfToken",b)}return b},escapeCss:function(b){return b?window.CSS&&
40
40
  CSS.escape?CSS.escape(b):isNaN(parseInt(b.charAt(0),10))?b:"\\3"+b.charAt(0)+" "+b.substring(1,b.length):""},getMouseButton:function(b){return(b=b&&b.data?b.data.$:b)?CKEDITOR.tools.normalizeMouseButton(b.button):!1},normalizeMouseButton:function(b,c){if(!CKEDITOR.env.ie||9<=CKEDITOR.env.version&&!CKEDITOR.env.ie6Compat)return b;for(var a=[[CKEDITOR.MOUSE_BUTTON_LEFT,1],[CKEDITOR.MOUSE_BUTTON_MIDDLE,4],[CKEDITOR.MOUSE_BUTTON_RIGHT,2]],h=0;h<a.length;h++){var d=a[h];if(d[0]===b&&c)return d[1];if(!c&&
41
- d[1]===b)return d[0]}},convertHexStringToBytes:function(b){var c=[],a=b.length/2,h;for(h=0;h<a;h++)c.push(parseInt(b.substr(2*h,2),16));return c},convertBytesToBase64:function(b){var c="",a=b.length,h;for(h=0;h<a;h+=3){var d=b.slice(h,h+3),e=d.length,f=[],k;if(3>e)for(k=e;3>k;k++)d[k]=0;f[0]=(d[0]&252)>>2;f[1]=(d[0]&3)<<4|d[1]>>4;f[2]=(d[1]&15)<<2|(d[2]&192)>>6;f[3]=d[2]&63;for(k=0;4>k;k++)c=k<=e?c+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f[k]):c+"\x3d"}return c},
41
+ d[1]===b)return d[0]}},convertHexStringToBytes:function(b){var c=[],a=b.length/2,h;for(h=0;h<a;h++)c.push(parseInt(b.substr(2*h,2),16));return c},convertBytesToBase64:function(b){var c="",a=b.length,h;for(h=0;h<a;h+=3){var d=b.slice(h,h+3),f=d.length,e=[],k;if(3>f)for(k=f;3>k;k++)d[k]=0;e[0]=(d[0]&252)>>2;e[1]=(d[0]&3)<<4|d[1]>>4;e[2]=(d[1]&15)<<2|(d[2]&192)>>6;e[3]=d[2]&63;for(k=0;4>k;k++)c=k<=f?c+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e[k]):c+"\x3d"}return c},
42
42
  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",darkgreen:"#006400",
43
43
  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",gainsboro:"#DCDCDC",
44
44
  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",lightsalmon:"#FFA07A",
@@ -47,56 +47,56 @@ moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:
47
47
  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",windowtext:"windowtext",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"},_borderStyle:"none hidden dotted dashed solid double groove ridge inset outset".split(" "),
48
48
  _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(b){var c={},a=this._findColor(b);a.length&&(c.color=a[0],CKEDITOR.tools.array.forEach(a,function(c){b=b.replace(c,"")}));if(b=CKEDITOR.tools.trim(b))c.unprocessed=b;return c},margin:function(b){return CKEDITOR.tools.style.parse.sideShorthand(b,
49
49
  function(b){return b.match(/(?:\-?[\.\d]+(?:%|\w*)|auto|inherit|initial|unset|revert)/g)||["0px"]})},sideShorthand:function(b,c){function a(b){h.top=d[b[0]];h.right=d[b[1]];h.bottom=d[b[2]];h.left=d[b[3]]}var h={},d=c?c(b):b.split(/\s+/);switch(d.length){case 1:a([0,0,0,0]);break;case 2:a([0,1,0,1]);break;case 3:a([0,1,2,1]);break;case 4:a([0,1,2,3])}return h},border:function(b){return CKEDITOR.tools.style.border.fromCssRule(b)},_findColor:function(b){var c=[],a=CKEDITOR.tools.array,c=c.concat(b.match(this._rgbaRegExp)||
50
- []),c=c.concat(b.match(this._hslaRegExp)||[]);return c=c.concat(a.filter(b.split(/\s+/),function(b){return b.match(/^\#[a-f0-9]{3}(?:[a-f0-9]{3})?$/gi)?!0:b.toLowerCase()in CKEDITOR.tools.style.parse._colors}))}}},array:{filter:function(b,c,a){var h=[];this.forEach(b,function(d,e){c.call(a,d,e,b)&&h.push(d)});return h},find:function(b,c,a){for(var h=b.length,d=0;d<h;){if(c.call(a,b[d],d,b))return b[d];d++}},forEach:function(b,c,a){var h=b.length,d;for(d=0;d<h;d++)c.call(a,b[d],d,b)},map:function(b,
50
+ []),c=c.concat(b.match(this._hslaRegExp)||[]);return c=c.concat(a.filter(b.split(/\s+/),function(b){return b.match(/^\#[a-f0-9]{3}(?:[a-f0-9]{3})?$/gi)?!0:b.toLowerCase()in CKEDITOR.tools.style.parse._colors}))}}},array:{filter:function(b,c,a){var h=[];this.forEach(b,function(d,f){c.call(a,d,f,b)&&h.push(d)});return h},find:function(b,c,a){for(var h=b.length,d=0;d<h;){if(c.call(a,b[d],d,b))return b[d];d++}},forEach:function(b,c,a){var h=b.length,d;for(d=0;d<h;d++)c.call(a,b[d],d,b)},map:function(b,
51
51
  c,a){for(var h=[],d=0;d<b.length;d++)h.push(c.call(a,b[d],d,b));return h},reduce:function(b,c,a,h){for(var d=0;d<b.length;d++)a=c.call(h,a,b[d],d,b);return a},every:function(b,c,a){if(!b.length)return!0;c=this.filter(b,c,a);return b.length===c.length},some:function(b,c,a){for(var h=0;h<b.length;h++)if(c.call(a,b[h],h,b))return!0;return!1}},object:{DONT_ENUMS:"toString toLocaleString valueOf hasOwnProperty isPrototypeOf propertyIsEnumerable constructor".split(" "),entries:function(b){return CKEDITOR.tools.array.map(CKEDITOR.tools.object.keys(b),
52
52
  function(c){return[c,b[c]]})},values:function(b){return CKEDITOR.tools.array.map(CKEDITOR.tools.object.keys(b),function(c){return b[c]})},keys:function(b){var c=Object.prototype.hasOwnProperty,a=[],h=CKEDITOR.tools.object.DONT_ENUMS;if(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(!b||"object"!==typeof b)){c=[];if("string"===typeof b)for(a=0;a<b.length;a++)c.push(String(a));return c}for(var d in b)a.push(d);if(CKEDITOR.env.ie&&9>CKEDITOR.env.version)for(d=0;d<h.length;d++)c.call(b,h[d])&&a.push(h[d]);
53
53
  return a},findKey:function(b,c){if("object"!==typeof b)return null;for(var a in b)if(b[a]===c)return a;return null},merge:function(b,c){var a=CKEDITOR.tools,h=a.clone(b),d=a.clone(c);a.array.forEach(a.object.keys(d),function(b){h[b]="object"===typeof d[b]&&"object"===typeof h[b]?a.object.merge(h[b],d[b]):d[b]});return h}},getAbsoluteRectPosition:function(b,c){function a(b){if(b){var c=b.getClientRect();h.top+=c.top;h.left+=c.left;"x"in h&&"y"in h&&(h.x+=c.x,h.y+=c.y);a(b.getWindow().getFrame())}}
54
54
  var h=CKEDITOR.tools.copy(c);a(b.getFrame());var d=CKEDITOR.document.getWindow().getScrollPosition();h.top+=d.y;h.left+=d.x;"x"in h&&"y"in h&&(h.y+=d.y,h.x+=d.x);h.right=h.left+h.width;h.bottom=h.top+h.height;return h}};a.prototype={reset:function(){this._lastOutput=0;this._clearTimer()},_reschedule:function(){return!1},_call:function(){this._output()},_clearTimer:function(){this._scheduledTimer&&clearTimeout(this._scheduledTimer);this._scheduledTimer=0}};l.prototype=CKEDITOR.tools.prototypedCopy(a.prototype);
55
55
  l.prototype._reschedule=function(){this._scheduledTimer&&this._clearTimer()};l.prototype._call=function(){this._output.apply(this._context,this._args)};CKEDITOR.tools.buffers={};CKEDITOR.tools.buffers.event=a;CKEDITOR.tools.buffers.throttle=l;CKEDITOR.tools.style.border=CKEDITOR.tools.createClass({$:function(b){b=b||{};this.width=b.width;this.style=b.style;this.color=b.color;this._.normalize()},_:{normalizeMap:{color:[[/windowtext/g,"black"]]},normalize:function(){for(var b in this._.normalizeMap){var c=
56
56
  this[b];c&&(this[b]=CKEDITOR.tools.array.reduce(this._.normalizeMap[b],function(b,c){return b.replace(c[0],c[1])},c))}}},proto:{toString:function(){return CKEDITOR.tools.array.filter([this.width,this.style,this.color],function(b){return!!b}).join(" ")}},statics:{fromCssRule:function(b){var c={},a=b.split(/\s+/g);b=CKEDITOR.tools.style.parse._findColor(b);b.length&&(c.color=b[0]);CKEDITOR.tools.array.forEach(a,function(b){c.style||-1===CKEDITOR.tools.indexOf(CKEDITOR.tools.style.parse._borderStyle,
57
- b)?!c.width&&CKEDITOR.tools.style.parse._widthRegExp.test(b)&&(c.width=b):c.style=b});return new CKEDITOR.tools.style.border(c)},splitCssValues:function(b,c){c=c||{};var a=CKEDITOR.tools.array.reduce(["width","style","color"],function(a,h){var d=b["border-"+h]||c[h];a[h]=d?CKEDITOR.tools.style.parse.sideShorthand(d):null;return a},{});return CKEDITOR.tools.array.reduce(["top","right","bottom","left"],function(c,h){var d={},e;for(e in a){var f=b["border-"+h+"-"+e];d[e]=f?f:a[e]&&a[e][h]}c["border-"+
58
- h]=new CKEDITOR.tools.style.border(d);return c},{})}}});CKEDITOR.tools.array.indexOf=CKEDITOR.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,l=function(c,b){for(var a=CKEDITOR.tools.clone(c),h=1;h<arguments.length;h++){b=arguments[h];for(var e in b)delete a[e]}return a},g={},e={},f={address:1,article:1,aside:1,blockquote:1,details:1,div:1,
57
+ b)?!c.width&&CKEDITOR.tools.style.parse._widthRegExp.test(b)&&(c.width=b):c.style=b});return new CKEDITOR.tools.style.border(c)},splitCssValues:function(b,c){c=c||{};var a=CKEDITOR.tools.array.reduce(["width","style","color"],function(a,h){var d=b["border-"+h]||c[h];a[h]=d?CKEDITOR.tools.style.parse.sideShorthand(d):null;return a},{});return CKEDITOR.tools.array.reduce(["top","right","bottom","left"],function(c,h){var d={},f;for(f in a){var e=b["border-"+h+"-"+f];d[f]=e?e:a[f]&&a[f][h]}c["border-"+
58
+ h]=new CKEDITOR.tools.style.border(d);return c},{})}}});CKEDITOR.tools.array.indexOf=CKEDITOR.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,l=function(c,b){for(var a=CKEDITOR.tools.clone(c),h=1;h<arguments.length;h++){b=arguments[h];for(var f in b)delete a[f]}return a},g={},f={},e={address:1,article:1,aside:1,blockquote:1,details:1,div:1,
59
59
  dl:1,fieldset:1,figure:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,hr:1,main:1,menu:1,nav:1,ol:1,p:1,pre:1,section:1,table:1,ul:1},m={command:1,link:1,meta:1,noscript:1,script:1,style:1},k={},h={"#":1},c={center:1,dir:1,noframes:1};a(g,{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,
60
- q:1,ruby:1,s:1,samp:1,script:1,select:1,small:1,span:1,strong:1,sub:1,sup:1,textarea:1,time:1,u:1,"var":1,video:1,wbr:1},h,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1});a(e,f,g,c);l={a:l(g,{a:1,button:1}),abbr:g,address:e,area:k,article:e,aside:e,audio:a({source:1,track:1},e),b:g,base:k,bdi:g,bdo:g,blockquote:e,body:e,br:k,button:l(g,{a:1,button:1}),canvas:g,caption:e,cite:g,code:g,col:k,colgroup:{col:1},command:k,datalist:a({option:1},g),dd:e,del:g,details:a({summary:1},
61
- e),dfn:g,div:e,dl:{dt:1,dd:1},dt:e,em:g,embed:k,fieldset:a({legend:1},e),figcaption:e,figure:a({figcaption:1},e),footer:e,form:e,h1:g,h2:g,h3:g,h4:g,h5:g,h6:g,head:a({title:1,base:1},m),header:e,hgroup:{h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},hr:k,html:a({head:1,body:1},e,m),i:g,iframe:h,img:k,input:k,ins:g,kbd:g,keygen:k,label:g,legend:g,li:e,link:k,main:e,map:e,mark:g,menu:a({li:1},e),meta:k,meter:l(g,{meter:1}),nav:e,noscript:a({link:1,meta:1,style:1},g),object:a({param:1},g),ol:{li:1},optgroup:{option:1},
62
- option:h,output:g,p:g,param:k,pre:g,progress:l(g,{progress:1}),q:g,rp:g,rt:g,ruby:a({rp:1,rt:1},g),s:g,samp:g,script:h,section:e,select:{optgroup:1,option:1},small:g,source:k,span:g,strong:g,style:h,sub:g,summary:a({h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},g),sup:g,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:e,textarea:h,tfoot:{tr:1},th:e,thead:{tr:1},time:l(g,{time:1}),title:h,tr:{th:1,td:1},track:k,u:g,ul:{li:1},"var":g,video:a({source:1,track:1},e),wbr:k,acronym:g,applet:a({param:1},
63
- e),basefont:k,big:g,center:e,dialog:k,dir:{li:1},font:g,isindex:k,noframes:e,strike:g,tt:g};a(l,{$block:a({audio:1,dd:1,dt:1,figcaption:1,li:1,video:1},f,c),$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,
60
+ q:1,ruby:1,s:1,samp:1,script:1,select:1,small:1,span:1,strong:1,sub:1,sup:1,textarea:1,time:1,u:1,"var":1,video:1,wbr:1},h,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1});a(f,e,g,c);l={a:l(g,{a:1,button:1}),abbr:g,address:f,area:k,article:f,aside:f,audio:a({source:1,track:1},f),b:g,base:k,bdi:g,bdo:g,blockquote:f,body:f,br:k,button:l(g,{a:1,button:1}),canvas:g,caption:f,cite:g,code:g,col:k,colgroup:{col:1},command:k,datalist:a({option:1},g),dd:f,del:g,details:a({summary:1},
61
+ f),dfn:g,div:f,dl:{dt:1,dd:1},dt:f,em:g,embed:k,fieldset:a({legend:1},f),figcaption:f,figure:a({figcaption:1},f),footer:f,form:f,h1:g,h2:g,h3:g,h4:g,h5:g,h6:g,head:a({title:1,base:1},m),header:f,hgroup:{h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},hr:k,html:a({head:1,body:1},f,m),i:g,iframe:h,img:k,input:k,ins:g,kbd:g,keygen:k,label:g,legend:g,li:f,link:k,main:f,map:f,mark:g,menu:a({li:1},f),meta:k,meter:l(g,{meter:1}),nav:f,noscript:a({link:1,meta:1,style:1},g),object:a({param:1},g),ol:{li:1},optgroup:{option:1},
62
+ option:h,output:g,p:g,param:k,pre:g,progress:l(g,{progress:1}),q:g,rp:g,rt:g,ruby:a({rp:1,rt:1},g),s:g,samp:g,script:h,section:f,select:{optgroup:1,option:1},small:g,source:k,span:g,strong:g,style:h,sub:g,summary:a({h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},g),sup:g,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:f,textarea:h,tfoot:{tr:1},th:f,thead:{tr:1},time:l(g,{time:1}),title:h,tr:{th:1,td:1},track:k,u:g,ul:{li:1},"var":g,video:a({source:1,track:1},f),wbr:k,acronym:g,applet:a({param:1},
63
+ f),basefont:k,big:g,center:f,dialog:k,dir:{li:1},font:g,isindex:k,noframes:f,strike:g,tt:g};a(l,{$block:a({audio:1,dd:1,dt:1,figcaption:1,li:1,video:1},e,c),$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,
64
64
  footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,main:1,nav:1,p:1,pre:1,section:1},$empty:{area:1,base:1,basefont:1,br:1,col:1,command:1,dialog:1,embed:1,hr:1,img:1,input:1,isindex:1,keygen:1,link:1,meta:1,param:1,source:1,track:1,wbr:1},$inline:g,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:a({body:1,head:1,html:1},l.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,
65
65
  button:1,hr:1,iframe:1,img:1,input:1,object:1,select:1,table:1,textarea:1,video:1},$removeEmpty:{abbr:1,acronym:1,b:1,bdi:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,mark:1,meter:1,output:1,q:1,ruby:1,s:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,time:1,tt:1,u:1,"var":1},$tabIndex:{a:1,area:1,button:1,input:1,object:1,select:1,textarea:1},$tableContent:{caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1},$transparent:{a:1,audio:1,canvas:1,del:1,
66
66
  ins:1,map:1,noscript:1,object:1,video:1},$intermediate:{caption:1,colgroup:1,dd:1,dt:1,figcaption:1,legend:1,li:1,optgroup:1,option:1,rp:1,rt:1,summary:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1}});return l}();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},
67
67
  preventDefault:function(a){var l=this.$;l.preventDefault?l.preventDefault():l.returnValue=!1;a&&this.stopPropagation()},stopPropagation: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),
68
- y:this.$.pageY||this.$.clientY+(a.documentElement.scrollTop||a.body.scrollTop)}}};CKEDITOR.CTRL=1114112;CKEDITOR.SHIFT=2228224;CKEDITOR.ALT=4456448;CKEDITOR.EVENT_PHASE_CAPTURING=1;CKEDITOR.EVENT_PHASE_AT_TARGET=2;CKEDITOR.EVENT_PHASE_BUBBLING=3;CKEDITOR.dom.domObject=function(a){a&&(this.$=a)};CKEDITOR.dom.domObject.prototype=function(){var a=function(a,g){return function(e){"undefined"!=typeof CKEDITOR&&a.fire(g,new CKEDITOR.dom.event(e))}};return{getPrivate:function(){var a;(a=this.getCustomData("_"))||
68
+ y:this.$.pageY||this.$.clientY+(a.documentElement.scrollTop||a.body.scrollTop)}}};CKEDITOR.CTRL=1114112;CKEDITOR.SHIFT=2228224;CKEDITOR.ALT=4456448;CKEDITOR.EVENT_PHASE_CAPTURING=1;CKEDITOR.EVENT_PHASE_AT_TARGET=2;CKEDITOR.EVENT_PHASE_BUBBLING=3;CKEDITOR.dom.domObject=function(a){a&&(this.$=a)};CKEDITOR.dom.domObject.prototype=function(){var a=function(a,g){return function(f){"undefined"!=typeof CKEDITOR&&a.fire(g,new CKEDITOR.dom.event(f))}};return{getPrivate:function(){var a;(a=this.getCustomData("_"))||
69
69
  this.setCustomData("_",a={});return a},on:function(l){var g=this.getCustomData("_cke_nativeListeners");g||(g={},this.setCustomData("_cke_nativeListeners",g));g[l]||(g=g[l]=a(this,l),this.$.addEventListener?this.$.addEventListener(l,g,!!CKEDITOR.event.useCapture):this.$.attachEvent&&this.$.attachEvent("on"+l,g));return CKEDITOR.event.prototype.on.apply(this,arguments)},removeListener:function(a){CKEDITOR.event.prototype.removeListener.apply(this,arguments);if(!this.hasListeners(a)){var g=this.getCustomData("_cke_nativeListeners"),
70
- e=g&&g[a];e&&(this.$.removeEventListener?this.$.removeEventListener(a,e,!1):this.$.detachEvent&&this.$.detachEvent("on"+a,e),delete g[a])}},removeAllListeners:function(){try{var a=this.getCustomData("_cke_nativeListeners"),g;for(g in a){var e=a[g];this.$.detachEvent?this.$.detachEvent("on"+g,e):this.$.removeEventListener&&this.$.removeEventListener(g,e,!1);delete a[g]}}catch(f){if(!CKEDITOR.env.edge||-2146828218!==f.number)throw f;}CKEDITOR.event.prototype.removeAllListeners.call(this)}}}();(function(a){var l=
71
- {};CKEDITOR.on("reset",function(){l={}});a.equals=function(a){try{return a&&a.$===this.$}catch(e){return!1}};a.setCustomData=function(a,e){var f=this.getUniqueId();(l[f]||(l[f]={}))[a]=e;return this};a.getCustomData=function(a){var e=this.$["data-cke-expando"];return(e=e&&l[e])&&a in e?e[a]:null};a.removeCustomData=function(a){var e=this.$["data-cke-expando"],e=e&&l[e],f,m;e&&(f=e[a],m=a in e,delete e[a]);return m?f:null};a.clearCustomData=function(){this.removeAllListeners();var a=this.getUniqueId();
70
+ f=g&&g[a];f&&(this.$.removeEventListener?this.$.removeEventListener(a,f,!1):this.$.detachEvent&&this.$.detachEvent("on"+a,f),delete g[a])}},removeAllListeners:function(){try{var a=this.getCustomData("_cke_nativeListeners"),g;for(g in a){var f=a[g];this.$.detachEvent?this.$.detachEvent("on"+g,f):this.$.removeEventListener&&this.$.removeEventListener(g,f,!1);delete a[g]}}catch(e){if(!CKEDITOR.env.edge||-2146828218!==e.number)throw e;}CKEDITOR.event.prototype.removeAllListeners.call(this)}}}();(function(a){var l=
71
+ {};CKEDITOR.on("reset",function(){l={}});a.equals=function(a){try{return a&&a.$===this.$}catch(f){return!1}};a.setCustomData=function(a,f){var e=this.getUniqueId();(l[e]||(l[e]={}))[a]=f;return this};a.getCustomData=function(a){var f=this.$["data-cke-expando"];return(f=f&&l[f])&&a in f?f[a]:null};a.removeCustomData=function(a){var f=this.$["data-cke-expando"],f=f&&l[f],e,m;f&&(e=f[a],m=a in f,delete f[a]);return m?e:null};a.clearCustomData=function(){this.removeAllListeners();var a=this.getUniqueId();
72
72
  a&&delete l[a]};a.getUniqueId=function(){return this.$["data-cke-expando"]||(this.$["data-cke-expando"]=CKEDITOR.tools.getNextNumber())};CKEDITOR.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):
73
- this};CKEDITOR.dom.node.prototype=new CKEDITOR.dom.domObject;CKEDITOR.NODE_ELEMENT=1;CKEDITOR.NODE_DOCUMENT=9;CKEDITOR.NODE_TEXT=3;CKEDITOR.NODE_COMMENT=8;CKEDITOR.NODE_DOCUMENT_FRAGMENT=11;CKEDITOR.POSITION_IDENTICAL=0;CKEDITOR.POSITION_DISCONNECTED=1;CKEDITOR.POSITION_FOLLOWING=2;CKEDITOR.POSITION_PRECEDING=4;CKEDITOR.POSITION_IS_CONTAINED=8;CKEDITOR.POSITION_CONTAINS=16;CKEDITOR.tools.extend(CKEDITOR.dom.node.prototype,{appendTo:function(a,l){a.append(this,l);return a},clone:function(a,l){function g(e){e["data-cke-expando"]&&
74
- (e["data-cke-expando"]=!1);if(e.nodeType==CKEDITOR.NODE_ELEMENT||e.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)if(l||e.nodeType!=CKEDITOR.NODE_ELEMENT||e.removeAttribute("id",!1),a){e=e.childNodes;for(var f=0;f<e.length;f++)g(e[f])}}function e(f){if(f.type==CKEDITOR.NODE_ELEMENT||f.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT){if(f.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var k=f.getName();":"==k[0]&&f.renameNode(k.substring(1))}if(a)for(k=0;k<f.getChildCount();k++)e(f.getChild(k))}}var f=this.$.cloneNode(a);
75
- g(f);f=new CKEDITOR.dom.node(f);CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(this.type==CKEDITOR.NODE_ELEMENT||this.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&e(f);return f},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.$);
76
- return a},getAddress:function(a){for(var l=[],g=this.getDocument().$.documentElement,e=this;e&&e!=g;){var f=e.getParent();f&&l.unshift(this.getIndex.call(e,a));e=f}return l},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(a){function l(a,e){var h=e?a.getNext():a.getPrevious();return h&&h.type==CKEDITOR.NODE_TEXT?h.isEmpty()?l(h,e):h:null}var g=this,e=-1,f;if(!this.getParent()||a&&g.type==CKEDITOR.NODE_TEXT&&g.isEmpty()&&
77
- !l(g)&&!l(g,!0))return-1;do if(!a||g.equals(this)||g.type!=CKEDITOR.NODE_TEXT||!f&&!g.isEmpty())e++,f=g.type==CKEDITOR.NODE_TEXT;while(g=g.getPrevious());return e},getNextSourceNode:function(a,l,g){if(g&&!g.call){var e=g;g=function(a){return!a.equals(e)}}a=!a&&this.getFirst&&this.getFirst();var f;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&g&&!1===g(this,!0))return null;a=this.getNext()}for(;!a&&(f=(f||this).getParent());){if(g&&!1===g(f,!0))return null;a=f.getNext()}return!a||g&&!1===g(a)?null:l&&
78
- l!=a.type?a.getNextSourceNode(!1,l,g):a},getPreviousSourceNode:function(a,l,g){if(g&&!g.call){var e=g;g=function(a){return!a.equals(e)}}a=!a&&this.getLast&&this.getLast();var f;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&g&&!1===g(this,!0))return null;a=this.getPrevious()}for(;!a&&(f=(f||this).getParent());){if(g&&!1===g(f,!0))return null;a=f.getPrevious()}return!a||g&&!1===g(a)?null:l&&a.type!=l?a.getPreviousSourceNode(!1,l,g):a},getPrevious:function(a){var l=this.$,g;do g=(l=l.previousSibling)&&
73
+ this};CKEDITOR.dom.node.prototype=new CKEDITOR.dom.domObject;CKEDITOR.NODE_ELEMENT=1;CKEDITOR.NODE_DOCUMENT=9;CKEDITOR.NODE_TEXT=3;CKEDITOR.NODE_COMMENT=8;CKEDITOR.NODE_DOCUMENT_FRAGMENT=11;CKEDITOR.POSITION_IDENTICAL=0;CKEDITOR.POSITION_DISCONNECTED=1;CKEDITOR.POSITION_FOLLOWING=2;CKEDITOR.POSITION_PRECEDING=4;CKEDITOR.POSITION_IS_CONTAINED=8;CKEDITOR.POSITION_CONTAINS=16;CKEDITOR.tools.extend(CKEDITOR.dom.node.prototype,{appendTo:function(a,l){a.append(this,l);return a},clone:function(a,l){function g(f){f["data-cke-expando"]&&
74
+ (f["data-cke-expando"]=!1);if(f.nodeType==CKEDITOR.NODE_ELEMENT||f.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)if(l||f.nodeType!=CKEDITOR.NODE_ELEMENT||f.removeAttribute("id",!1),a){f=f.childNodes;for(var e=0;e<f.length;e++)g(f[e])}}function f(e){if(e.type==CKEDITOR.NODE_ELEMENT||e.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT){if(e.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var k=e.getName();":"==k[0]&&e.renameNode(k.substring(1))}if(a)for(k=0;k<e.getChildCount();k++)f(e.getChild(k))}}var e=this.$.cloneNode(a);
75
+ g(e);e=new CKEDITOR.dom.node(e);CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(this.type==CKEDITOR.NODE_ELEMENT||this.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&f(e);return e},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.$);
76
+ return a},getAddress:function(a){for(var l=[],g=this.getDocument().$.documentElement,f=this;f&&f!=g;){var e=f.getParent();e&&l.unshift(this.getIndex.call(f,a));f=e}return l},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(a){function l(a,f){var h=f?a.getNext():a.getPrevious();return h&&h.type==CKEDITOR.NODE_TEXT?h.isEmpty()?l(h,f):h:null}var g=this,f=-1,e;if(!this.getParent()||a&&g.type==CKEDITOR.NODE_TEXT&&g.isEmpty()&&
77
+ !l(g)&&!l(g,!0))return-1;do if(!a||g.equals(this)||g.type!=CKEDITOR.NODE_TEXT||!e&&!g.isEmpty())f++,e=g.type==CKEDITOR.NODE_TEXT;while(g=g.getPrevious());return f},getNextSourceNode:function(a,l,g){if(g&&!g.call){var f=g;g=function(a){return!a.equals(f)}}a=!a&&this.getFirst&&this.getFirst();var e;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&g&&!1===g(this,!0))return null;a=this.getNext()}for(;!a&&(e=(e||this).getParent());){if(g&&!1===g(e,!0))return null;a=e.getNext()}return!a||g&&!1===g(a)?null:l&&
78
+ l!=a.type?a.getNextSourceNode(!1,l,g):a},getPreviousSourceNode:function(a,l,g){if(g&&!g.call){var f=g;g=function(a){return!a.equals(f)}}a=!a&&this.getLast&&this.getLast();var e;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&g&&!1===g(this,!0))return null;a=this.getPrevious()}for(;!a&&(e=(e||this).getParent());){if(g&&!1===g(e,!0))return null;a=e.getPrevious()}return!a||g&&!1===g(a)?null:l&&a.type!=l?a.getPreviousSourceNode(!1,l,g):a},getPrevious:function(a){var l=this.$,g;do g=(l=l.previousSibling)&&
79
79
  10!=l.nodeType&&new CKEDITOR.dom.node(l);while(g&&a&&!a(g));return g},getNext:function(a){var l=this.$,g;do g=(l=l.nextSibling)&&new CKEDITOR.dom.node(l);while(g&&a&&!a(g));return g},getParent:function(a){var l=this.$.parentNode;return l&&(l.nodeType==CKEDITOR.NODE_ELEMENT||a&&l.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(l):null},getParents:function(a){var l=this,g=[];do g[a?"push":"unshift"](l);while(l=l.getParent());return g},getCommonAncestor:function(a){if(a.equals(this))return this;
80
80
  if(a.contains&&a.contains(this))return a;var l=this.contains?this:this.getParent();do if(l.contains(a))return l;while(l=l.getParent());return null},getPosition:function(a){var l=this.$,g=a.$;if(l.compareDocumentPosition)return l.compareDocumentPosition(g);if(l==g)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&a.type==CKEDITOR.NODE_ELEMENT){if(l.contains){if(l.contains(g))return CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING;if(g.contains(l))return CKEDITOR.POSITION_IS_CONTAINED+
81
- CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in l)return 0>l.sourceIndex||0>g.sourceIndex?CKEDITOR.POSITION_DISCONNECTED:l.sourceIndex<g.sourceIndex?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING}l=this.getAddress();a=a.getAddress();for(var g=Math.min(l.length,a.length),e=0;e<g;e++)if(l[e]!=a[e])return l[e]<a[e]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;return l.length<a.length?CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING},
82
- getAscendant:function(a,l){var g=this.$,e,f;l||(g=g.parentNode);"function"==typeof a?(f=!0,e=a):(f=!1,e=function(e){e="string"==typeof e.nodeName?e.nodeName.toLowerCase():"";return"string"==typeof a?e==a:e in a});for(;g;){if(e(f?new CKEDITOR.dom.node(g):g))return new CKEDITOR.dom.node(g);try{g=g.parentNode}catch(m){g=null}}return null},hasAscendant:function(a,l){var g=this.$;l||(g=g.parentNode);for(;g;){if(g.nodeName&&g.nodeName.toLowerCase()==a)return!0;g=g.parentNode}return!1},move:function(a,l){a.append(this.remove(),
81
+ CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in l)return 0>l.sourceIndex||0>g.sourceIndex?CKEDITOR.POSITION_DISCONNECTED:l.sourceIndex<g.sourceIndex?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING}l=this.getAddress();a=a.getAddress();for(var g=Math.min(l.length,a.length),f=0;f<g;f++)if(l[f]!=a[f])return l[f]<a[f]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;return l.length<a.length?CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING},
82
+ getAscendant:function(a,l){var g=this.$,f,e;l||(g=g.parentNode);"function"==typeof a?(e=!0,f=a):(e=!1,f=function(f){f="string"==typeof f.nodeName?f.nodeName.toLowerCase():"";return"string"==typeof a?f==a:f in a});for(;g;){if(f(e?new CKEDITOR.dom.node(g):g))return new CKEDITOR.dom.node(g);try{g=g.parentNode}catch(m){g=null}}return null},hasAscendant:function(a,l){var g=this.$;l||(g=g.parentNode);for(;g;){if(g.nodeName&&g.nodeName.toLowerCase()==a)return!0;g=g.parentNode}return!1},move:function(a,l){a.append(this.remove(),
83
83
  l)},remove:function(a){var l=this.$,g=l.parentNode;if(g){if(a)for(;a=l.firstChild;)g.insertBefore(l.removeChild(a),l);g.removeChild(l)}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 l=CKEDITOR.tools.ltrim(a.getText()),g=a.getLength();if(l)l.length<g&&(a.split(g-l.length),this.$.removeChild(this.$.firstChild));else{a.remove();continue}}break}},
84
84
  rtrim:function(){for(var a;this.getLast&&(a=this.getLast());){if(a.type==CKEDITOR.NODE_TEXT){var l=CKEDITOR.tools.rtrim(a.getText()),g=a.getLength();if(l)l.length<g&&(a.split(l.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 l=this;this.type!=CKEDITOR.NODE_ELEMENT&&(l=this.getParent());CKEDITOR.env.edge&&
85
85
  l&&l.is("textarea","input")&&(a=!0);if(!a&&l&&"undefined"!=typeof l.$.isContentEditable)return!(l.$.isContentEditable||l.data("cke-editable"));for(;l;){if(l.data("cke-editable"))return!1;if(l.hasAttribute("contenteditable"))return"false"==l.getAttribute("contenteditable");l=l.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()},
86
86
  getViewPaneSize:function(){var a=this.$.document,l="CSS1Compat"==a.compatMode;return{width:(l?a.documentElement.clientWidth:a.body.clientWidth)||0,height:(l?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?
87
87
  new CKEDITOR.dom.element.get(a):null}});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 l=new CKEDITOR.dom.element("link");l.setAttributes({rel:"stylesheet",type:"text/css",href:a});this.getHead().append(l)}},appendStyleText:function(a){if(this.$.createStyleSheet){var l=
88
88
  this.$.createStyleSheet("");l.cssText=a}else{var g=new CKEDITOR.dom.element("style",this);g.append(new CKEDITOR.dom.text(a,this));this.getHead().append(g)}return l||g.$.sheet},createElement:function(a,l){var g=new CKEDITOR.dom.element(a,this);l&&(l.attributes&&g.setAttributes(l.attributes),l.styles&&g.setStyles(l.styles));return g},createText:function(a){return new CKEDITOR.dom.text(a,this)},focus:function(){this.getWindow().focus()},getActive:function(){var a;try{a=this.$.activeElement}catch(l){return null}return new CKEDITOR.dom.element(a)},
89
- getById:function(a){return(a=this.$.getElementById(a))?new CKEDITOR.dom.element(a):null},getByAddress:function(a,l){for(var g=this.$.documentElement,e=0;g&&e<a.length;e++){var f=a[e];if(l)for(var m=-1,k=0;k<g.childNodes.length;k++){var h=g.childNodes[k];if(!0!==l||3!=h.nodeType||!h.previousSibling||3!=h.previousSibling.nodeType)if(m++,m==f){g=h;break}}else g=g.childNodes[f]}return g?new CKEDITOR.dom.node(g):null},getElementsByTag:function(a,l){CKEDITOR.env.ie&&8>=document.documentMode||!l||(a=l+":"+
89
+ getById:function(a){return(a=this.$.getElementById(a))?new CKEDITOR.dom.element(a):null},getByAddress:function(a,l){for(var g=this.$.documentElement,f=0;g&&f<a.length;f++){var e=a[f];if(l)for(var m=-1,k=0;k<g.childNodes.length;k++){var h=g.childNodes[k];if(!0!==l||3!=h.nodeType||!h.previousSibling||3!=h.previousSibling.nodeType)if(m++,m==e){g=h;break}}else g=g.childNodes[e]}return g?new CKEDITOR.dom.node(g):null},getElementsByTag:function(a,l){CKEDITOR.env.ie&&8>=document.documentMode||!l||(a=l+":"+
90
90
  a);return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(a))},getHead:function(){var a=this.$.getElementsByTagName("head")[0];return a=a?new CKEDITOR.dom.element(a):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),!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",
91
91
  "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,
92
92
  !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,l){"string"==typeof a&&(a=(l?l.$:document).createElement(a));CKEDITOR.dom.domObject.call(this,
93
- a)};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,l){var g=new CKEDITOR.dom.element("div",l);g.setHtml(a);return g.getFirst().remove()};CKEDITOR.dom.element.setMarker=function(a,l,g,e){var f=l.getCustomData("list_marker_id")||l.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),
94
- m=l.getCustomData("list_marker_names")||l.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");a[f]=l;m[g]=1;return l.setCustomData(g,e)};CKEDITOR.dom.element.clearAllMarkers=function(a){for(var l in a)CKEDITOR.dom.element.clearMarkers(a,a[l],1)};CKEDITOR.dom.element.clearMarkers=function(a,l,g){var e=l.getCustomData("list_marker_names"),f=l.getCustomData("list_marker_id"),m;for(m in e)l.removeCustomData(m);l.removeCustomData("list_marker_names");g&&(l.removeCustomData("list_marker_id"),
95
- delete a[f])};(function(){function a(a,c){return-1<(" "+a+" ").replace(m," ").indexOf(" "+c+" ")}function l(a){var c=!0;a.$.id||(a.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),c=!1);return function(){c||a.removeAttribute("id")}}function g(a,c){var d=CKEDITOR.tools.escapeCss(a.$.id);return"#"+d+" "+c.split(/,\s*/).join(", #"+d+" ")}function e(a){for(var c=0,d=0,b=k[a].length;d<b;d++)c+=parseFloat(this.getComputedStyle(k[a][d])||0,10)||0;return c}var f=document.createElement("_").classList,f="undefined"!==
96
- typeof f&&null!==String(f.add).match(/\[Native code\]/gi),m=/[\n\t\r]/g;CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:f?function(a){this.$.classList.add(a);return this}:function(h){var c=this.$.className;c&&(a(c,h)||(c+=" "+h));this.$.className=c||h;return this},removeClass:f?function(a){var c=this.$;c.classList.remove(a);c.className||c.removeAttribute("class");return this}:function(h){var c=this.getAttribute("class");c&&a(c,h)&&((c=c.replace(new RegExp("(?:^|\\s+)"+
93
+ a)};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,l){var g=new CKEDITOR.dom.element("div",l);g.setHtml(a);return g.getFirst().remove()};CKEDITOR.dom.element.setMarker=function(a,l,g,f){var e=l.getCustomData("list_marker_id")||l.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),
94
+ m=l.getCustomData("list_marker_names")||l.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");a[e]=l;m[g]=1;return l.setCustomData(g,f)};CKEDITOR.dom.element.clearAllMarkers=function(a){for(var l in a)CKEDITOR.dom.element.clearMarkers(a,a[l],1)};CKEDITOR.dom.element.clearMarkers=function(a,l,g){var f=l.getCustomData("list_marker_names"),e=l.getCustomData("list_marker_id"),m;for(m in f)l.removeCustomData(m);l.removeCustomData("list_marker_names");g&&(l.removeCustomData("list_marker_id"),
95
+ delete a[e])};(function(){function a(a,c){return-1<(" "+a+" ").replace(m," ").indexOf(" "+c+" ")}function l(a){var c=!0;a.$.id||(a.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),c=!1);return function(){c||a.removeAttribute("id")}}function g(a,c){var d=CKEDITOR.tools.escapeCss(a.$.id);return"#"+d+" "+c.split(/,\s*/).join(", #"+d+" ")}function f(a){for(var c=0,d=0,b=k[a].length;d<b;d++)c+=parseFloat(this.getComputedStyle(k[a][d])||0,10)||0;return c}var e=document.createElement("_").classList,e="undefined"!==
96
+ typeof e&&null!==String(e.add).match(/\[Native code\]/gi),m=/[\n\t\r]/g;CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:e?function(a){this.$.classList.add(a);return this}:function(h){var c=this.$.className;c&&(a(c,h)||(c+=" "+h));this.$.className=c||h;return this},removeClass:e?function(a){var c=this.$;c.classList.remove(a);c.className||c.removeAttribute("class");return this}:function(h){var c=this.getAttribute("class");c&&a(c,h)&&((c=c.replace(new RegExp("(?:^|\\s+)"+
97
97
  h+"(?\x3d\\s|$)"),"").replace(/^\s+/,""))?this.setAttribute("class",c):this.removeAttribute("class"));return this},hasClass:function(h){return a(this.$.className,h)},append:function(a,c){"string"==typeof a&&(a=this.getDocument().createElement(a));c?this.$.insertBefore(a.$,this.$.firstChild):this.$.appendChild(a.$);return a},appendHtml:function(a){if(this.$.childNodes.length){var c=new CKEDITOR.dom.element("div",this.getDocument());c.setHtml(a);c.moveChildren(this)}else this.setHtml(a)},appendText:function(a){null!=
98
98
  this.$.text&&CKEDITOR.env.ie&&9>CKEDITOR.env.version?this.$.text+=a:this.append(new CKEDITOR.dom.text(a))},appendBogus:function(a){if(a||CKEDITOR.env.needsBrFiller){for(a=this.getLast();a&&a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(a.getText());)a=a.getPrevious();a&&a.is&&a.is("br")||(a=this.getDocument().createElement("br"),CKEDITOR.env.gecko&&a.setAttribute("type","_moz"),this.append(a))}},breakParent:function(a,c){var d=new CKEDITOR.dom.range(this.getDocument());d.setStartAfter(this);d.setEndAfter(a);
99
- var b=d.extractContents(!1,c||!1),e;d.insertNode(this.remove());if(CKEDITOR.env.ie&&!CKEDITOR.env.edge){for(d=new CKEDITOR.dom.element("div");e=b.getFirst();)e.$.style.backgroundColor&&(e.$.style.backgroundColor=e.$.style.backgroundColor),d.append(e);d.insertAfter(this);d.remove(!0)}else b.insertAfterNode(this)},contains:document.compareDocumentPosition?function(a){return!!(this.$.compareDocumentPosition(a.$)&16)}:function(a){var c=this.$;return a.type!=CKEDITOR.NODE_ELEMENT?c.contains(a.getParent().$):
99
+ var b=d.extractContents(!1,c||!1),f;d.insertNode(this.remove());if(CKEDITOR.env.ie&&!CKEDITOR.env.edge){for(d=new CKEDITOR.dom.element("div");f=b.getFirst();)f.$.style.backgroundColor&&(f.$.style.backgroundColor=f.$.style.backgroundColor),d.append(f);d.insertAfter(this);d.remove(!0)}else b.insertAfterNode(this)},contains:document.compareDocumentPosition?function(a){return!!(this.$.compareDocumentPosition(a.$)&16)}:function(a){var c=this.$;return a.type!=CKEDITOR.NODE_ELEMENT?c.contains(a.getParent().$):
100
100
  c!=a.$&&c.contains(a.$)},focus:function(){function a(){try{this.$.focus()}catch(c){}}return function(c){c?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 c=CKEDITOR.tools.extend({},
101
101
  this.$.getBoundingClientRect());!c.width&&(c.width=c.right-c.left);!c.height&&(c.height=c.bottom-c.top);return a?CKEDITOR.tools.getAbsoluteRectPosition(this.getWindow(),c):c},setHtml:CKEDITOR.env.ie&&9>CKEDITOR.env.version?function(a){try{var c=this.$;if(this.getParent())return c.innerHTML=a;var d=this.getDocument()._getHtml5ShivFrag();d.appendChild(c);c.innerHTML=a;d.removeChild(c);return a}catch(b){this.$.innerHTML="";c=new CKEDITOR.dom.element("body",this.getDocument());c.$.innerHTML=a;for(c=c.getChildren();c.count();)this.append(c.getItem(0));
102
102
  return a}}:function(a){return this.$.innerHTML=a},setText:function(){var a=document.createElement("p");a.innerHTML="x";a=a.textContent;return function(c){this.$[a?"textContent":"innerText"]=c}}(),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,
@@ -110,275 +110,275 @@ a.getOuterHtml();if(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&this.is("a")){var d
110
110
  for(var a=this.getChildren(),c=0,d=a.count();c<d;c++){var b=a.getItem(c);if(b.type!=CKEDITOR.NODE_ELEMENT||!b.data("cke-bookmark"))if(b.type==CKEDITOR.NODE_ELEMENT&&!b.isEmptyInlineRemoveable()||b.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(b.getText()))return!1}return!0},hasAttributes:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(){for(var a=this.$.attributes,c=0;c<a.length;c++){var d=a[c];switch(d.nodeName){case "class":if(this.getAttribute("class"))return!0;case "data-cke-expando":continue;
111
111
  default:if(d.specified)return!0}}return!1}:function(){var a=this.$.attributes,c=a.length,d={"data-cke-expando":1,_moz_dirty:1};return 0<c&&(2<c||!d[a[0].nodeName]||2==c&&!d[a[1].nodeName])},hasAttribute:function(){function a(c){var d=this.$.attributes.getNamedItem(c);if("input"==this.getName())switch(c){case "class":return 0<this.$.className.length;case "checked":return!!this.$.checked;case "value":return c=this.getAttribute("type"),"checkbox"==c||"radio"==c?"on"!=this.$.value:!!this.$.value}return d?
112
112
  d.specified:!1}return CKEDITOR.env.ie?8>CKEDITOR.env.version?function(c){return"name"==c?!!this.$.name:a.call(this,c)}:a:function(a){return!!this.$.attributes.getNamedItem(a)}}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,c){var d=this.$;a=a.$;if(d!=a){var b;if(c)for(;b=d.lastChild;)a.insertBefore(d.removeChild(b),a.firstChild);else for(;b=d.firstChild;)a.appendChild(d.removeChild(b))}},mergeSiblings:function(){function a(c,d,b){if(d&&d.type==CKEDITOR.NODE_ELEMENT){for(var h=
113
- [];d.data("cke-bookmark")||d.isEmptyInlineRemoveable();)if(h.push(d),d=b?d.getNext():d.getPrevious(),!d||d.type!=CKEDITOR.NODE_ELEMENT)return;if(c.isIdentical(d)){for(var e=b?c.getLast():c.getFirst();h.length;)h.shift().move(c,!b);d.moveChildren(c,!b);d.remove();e&&e.type==CKEDITOR.NODE_ELEMENT&&e.mergeSiblings()}}}return function(c){if(!1===c||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))a(this,this.getNext(),!0),a(this,this.getPrevious())}}(),show:function(){this.setStyles({display:"",
113
+ [];d.data("cke-bookmark")||d.isEmptyInlineRemoveable();)if(h.push(d),d=b?d.getNext():d.getPrevious(),!d||d.type!=CKEDITOR.NODE_ELEMENT)return;if(c.isIdentical(d)){for(var f=b?c.getLast():c.getFirst();h.length;)h.shift().move(c,!b);d.moveChildren(c,!b);d.remove();f&&f.type==CKEDITOR.NODE_ELEMENT&&f.mergeSiblings()}}}return function(c){if(!1===c||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))a(this,this.getNext(),!0),a(this,this.getPrevious())}}(),show:function(){this.setStyles({display:"",
114
114
  visibility:""})},setAttribute:function(){var a=function(a,d){this.$.setAttribute(a,d);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(c,d){"class"==c?this.$.className=d:"style"==c?this.$.style.cssText=d:"tabindex"==c?this.$.tabIndex=d:"checked"==c?this.$.checked=d:"contenteditable"==c?a.call(this,"contentEditable",d):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(c,d){if("src"==c&&d.match(/^http:\/\//))try{a.apply(this,
115
115
  arguments)}catch(b){}else a.apply(this,arguments);return this}:a}(),setAttributes:function(a){for(var c in a)this.setAttribute(c,a[c]);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 c=
116
- 0;c<a.length;c++)this.removeAttribute(a[c]);else for(c in a=a||this.getAttributes(),a)a.hasOwnProperty(c)&&this.removeAttribute(c)},removeStyle:function(a){var c=this.$.style;if(c.removeProperty||"border"!=a&&"margin"!=a&&"padding"!=a)c.removeProperty?c.removeProperty(a):c.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(a)),this.$.style.cssText||this.removeAttribute("style");else{var d=["top","left","right","bottom"],b;"border"==a&&(b=["color","style","width"]);for(var c=[],e=0;e<d.length;e++)if(b)for(var f=
117
- 0;f<b.length;f++)c.push([a,d[e],b[f]].join("-"));else c.push([a,d[e]].join("-"));for(a=0;a<c.length;a++)this.removeStyle(c[a])}},setStyle:function(a,c){this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]=c;return this},setStyles:function(a){for(var c in a)this.setStyle(c,a[c]);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",
118
- "none"));if(CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var a,c=this.getElementsByTag("*"),d=0,b=c.count();d<b;d++)a=c.getItem(d),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 c=0,d=0,b=this.getDocument(),e=b.getBody(),f="BackCompat"==b.$.compatMode;if(document.documentElement.getBoundingClientRect&&(CKEDITOR.env.ie?
119
- 8!==CKEDITOR.env.version:1)){var k=this.$.getBoundingClientRect(),g=b.$.documentElement,m=g.clientTop||e.$.clientTop||0,p=g.clientLeft||e.$.clientLeft||0,l=!0;CKEDITOR.env.ie&&(l=b.getDocumentElement().contains(this),b=b.getBody().contains(this),l=f&&b||!f&&l);l&&(CKEDITOR.env.webkit||CKEDITOR.env.ie&&12<=CKEDITOR.env.version?(c=e.$.scrollLeft||g.scrollLeft,d=e.$.scrollTop||g.scrollTop):(d=f?e.$:g,c=d.scrollLeft,d=d.scrollTop),c=k.left+c-p,d=k.top+d-m)}else for(m=this,p=null;m&&"body"!=m.getName()&&
116
+ 0;c<a.length;c++)this.removeAttribute(a[c]);else for(c in a=a||this.getAttributes(),a)a.hasOwnProperty(c)&&this.removeAttribute(c)},removeStyle:function(a){var c=this.$.style;if(c.removeProperty||"border"!=a&&"margin"!=a&&"padding"!=a)c.removeProperty?c.removeProperty(a):c.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(a)),this.$.style.cssText||this.removeAttribute("style");else{var d=["top","left","right","bottom"],b;"border"==a&&(b=["color","style","width"]);for(var c=[],f=0;f<d.length;f++)if(b)for(var e=
117
+ 0;e<b.length;e++)c.push([a,d[f],b[e]].join("-"));else c.push([a,d[f]].join("-"));for(a=0;a<c.length;a++)this.removeStyle(c[a])}},setStyle:function(a,c){this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]=c;return this},setStyles:function(a){for(var c in a)this.setStyle(c,a[c]);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",
118
+ "none"));if(CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var a,c=this.getElementsByTag("*"),d=0,b=c.count();d<b;d++)a=c.getItem(d),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 c=0,d=0,b=this.getDocument(),f=b.getBody(),e="BackCompat"==b.$.compatMode;if(document.documentElement.getBoundingClientRect&&(CKEDITOR.env.ie?
119
+ 8!==CKEDITOR.env.version:1)){var k=this.$.getBoundingClientRect(),g=b.$.documentElement,m=g.clientTop||f.$.clientTop||0,p=g.clientLeft||f.$.clientLeft||0,l=!0;CKEDITOR.env.ie&&(l=b.getDocumentElement().contains(this),b=b.getBody().contains(this),l=e&&b||!e&&l);l&&(CKEDITOR.env.webkit||CKEDITOR.env.ie&&12<=CKEDITOR.env.version?(c=f.$.scrollLeft||g.scrollLeft,d=f.$.scrollTop||g.scrollTop):(d=e?f.$:g,c=d.scrollLeft,d=d.scrollTop),c=k.left+c-p,d=k.top+d-m)}else for(m=this,p=null;m&&"body"!=m.getName()&&
120
120
  "html"!=m.getName();){c+=m.$.offsetLeft-m.$.scrollLeft;d+=m.$.offsetTop-m.$.scrollTop;m.equals(this)||(c+=m.$.clientLeft||0,d+=m.$.clientTop||0);for(;p&&!p.equals(m);)c-=p.$.scrollLeft,d-=p.$.scrollTop,p=p.getParent();p=m;m=(k=m.$.offsetParent)?new CKEDITOR.dom.element(k):null}a&&(k=this.getWindow(),m=a.getWindow(),!k.equals(m)&&k.$.frameElement&&(a=(new CKEDITOR.dom.element(k.$.frameElement)).getDocumentPosition(a),c+=a.x,d+=a.y));document.documentElement.getBoundingClientRect||!CKEDITOR.env.gecko||
121
- f||(c+=this.$.clientLeft?1:0,d+=this.$.clientTop?1:0);return{x:c,y:d}},scrollIntoView:function(a){var c=this.getParent();if(c){do if((c.$.clientWidth&&c.$.clientWidth<c.$.scrollWidth||c.$.clientHeight&&c.$.clientHeight<c.$.scrollHeight)&&!c.is("body")&&this.scrollIntoParent(c,a,1),c.is("html")){var d=c.getWindow();try{var b=d.$.frameElement;b&&(c=new CKEDITOR.dom.element(b))}catch(e){}}while(c=c.getParent())}},scrollIntoParent:function(a,c,d){var b,e,f,k;function g(b,c){/body|html/.test(a.getName())?
122
- a.getWindow().$.scrollBy(b,c):(a.$.scrollLeft+=b,a.$.scrollTop+=c)}function m(b,a){var c={x:0,y:0};if(!b.is(l?"body":"html")){var d=b.$.getBoundingClientRect();c.x=d.left;c.y=d.top}d=b.getWindow();d.equals(a)||(d=m(CKEDITOR.dom.element.get(d.$.frameElement),a),c.x+=d.x,c.y+=d.y);return c}function p(b,a){return parseInt(b.getComputedStyle("margin-"+a)||0,10)||0}!a&&(a=this.getWindow());f=a.getDocument();var l="BackCompat"==f.$.compatMode;a instanceof CKEDITOR.dom.window&&(a=l?f.getBody():f.getDocumentElement());
123
- CKEDITOR.env.webkit&&(f=this.getEditor(!1))&&(f._.previousScrollTop=null);f=a.getWindow();e=m(this,f);var x=m(a,f),z=this.$.offsetHeight;b=this.$.offsetWidth;var B=a.$.clientHeight,w=a.$.clientWidth;f=e.x-p(this,"left")-x.x||0;k=e.y-p(this,"top")-x.y||0;b=e.x+b+p(this,"right")-(x.x+w)||0;e=e.y+z+p(this,"bottom")-(x.y+B)||0;(0>k||0<e)&&g(0,!0===c?k:!1===c?e:0>k?k:e);d&&(0>f||0<b)&&g(0>f?f:b,0)},setState:function(a,c,d){c=c||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(c+"_on");this.removeClass(c+
121
+ e||(c+=this.$.clientLeft?1:0,d+=this.$.clientTop?1:0);return{x:c,y:d}},scrollIntoView:function(a){var c=this.getParent();if(c){do if((c.$.clientWidth&&c.$.clientWidth<c.$.scrollWidth||c.$.clientHeight&&c.$.clientHeight<c.$.scrollHeight)&&!c.is("body")&&this.scrollIntoParent(c,a,1),c.is("html")){var d=c.getWindow();try{var b=d.$.frameElement;b&&(c=new CKEDITOR.dom.element(b))}catch(f){}}while(c=c.getParent())}},scrollIntoParent:function(a,c,d){var b,f,e,k;function g(b,c){/body|html/.test(a.getName())?
122
+ a.getWindow().$.scrollBy(b,c):(a.$.scrollLeft+=b,a.$.scrollTop+=c)}function m(b,a){var c={x:0,y:0};if(!b.is(l?"body":"html")){var d=b.$.getBoundingClientRect();c.x=d.left;c.y=d.top}d=b.getWindow();d.equals(a)||(d=m(CKEDITOR.dom.element.get(d.$.frameElement),a),c.x+=d.x,c.y+=d.y);return c}function p(b,a){return parseInt(b.getComputedStyle("margin-"+a)||0,10)||0}!a&&(a=this.getWindow());e=a.getDocument();var l="BackCompat"==e.$.compatMode;a instanceof CKEDITOR.dom.window&&(a=l?e.getBody():e.getDocumentElement());
123
+ CKEDITOR.env.webkit&&(e=this.getEditor(!1))&&(e._.previousScrollTop=null);e=a.getWindow();f=m(this,e);var x=m(a,e),z=this.$.offsetHeight;b=this.$.offsetWidth;var B=a.$.clientHeight,w=a.$.clientWidth;e=f.x-p(this,"left")-x.x||0;k=f.y-p(this,"top")-x.y||0;b=f.x+b+p(this,"right")-(x.x+w)||0;f=f.y+z+p(this,"bottom")-(x.y+B)||0;(0>k||0<f)&&g(0,!0===c?k:!1===c?f:0>k?k:f);d&&(0>e||0<b)&&g(0>e?e:b,0)},setState:function(a,c,d){c=c||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(c+"_on");this.removeClass(c+
124
124
  "_off");this.removeClass(c+"_disabled");d&&this.setAttribute("aria-pressed",!0);d&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(c+"_disabled");this.removeClass(c+"_off");this.removeClass(c+"_on");d&&this.setAttribute("aria-disabled",!0);d&&this.removeAttribute("aria-pressed");break;default:this.addClass(c+"_off"),this.removeClass(c+"_on"),this.removeClass(c+"_disabled"),d&&this.removeAttribute("aria-pressed"),d&&this.removeAttribute("aria-disabled")}},
125
- getFrameDocument:function(){var a=this.$;try{a.contentWindow.document}catch(c){a.src=a.src}return a&&new CKEDITOR.dom.document(a.contentWindow.document)},copyAttributes:function(a,c){var d=this.$.attributes;c=c||{};for(var b=0;b<d.length;b++){var e=d[b],f=e.nodeName.toLowerCase(),k;if(!(f in c))if("checked"==f&&(k=this.getAttribute(f)))a.setAttribute(f,k);else if(!CKEDITOR.env.ie||this.hasAttribute(f))k=this.getAttribute(f),null===k&&(k=e.nodeValue),a.setAttribute(f,k)}""!==this.$.style.cssText&&
125
+ getFrameDocument:function(){var a=this.$;try{a.contentWindow.document}catch(c){a.src=a.src}return a&&new CKEDITOR.dom.document(a.contentWindow.document)},copyAttributes:function(a,c){var d=this.$.attributes;c=c||{};for(var b=0;b<d.length;b++){var f=d[b],e=f.nodeName.toLowerCase(),k;if(!(e in c))if("checked"==e&&(k=this.getAttribute(e)))a.setAttribute(e,k);else if(!CKEDITOR.env.ie||this.hasAttribute(e))k=this.getAttribute(e),null===k&&(k=f.nodeValue),a.setAttribute(e,k)}""!==this.$.style.cssText&&
126
126
  (a.$.style.cssText=this.$.style.cssText)},renameNode:function(a){if(this.getName()!=a){var c=this.getDocument();a=new CKEDITOR.dom.element(a,c);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(c,d){var b=c.childNodes;if(0<=d&&d<b.length)return b[d]}return function(c){var d=this.$;if(c.slice)for(c=c.slice();0<c.length&&d;)d=a(d,
127
127
  c.shift());else d=a(d,c);return d?new CKEDITOR.dom.node(d):null}}(),getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){function a(c){return c.type==CKEDITOR.NODE_ELEMENT&&c.hasClass("cke_enable_context_menu")}this.on("contextmenu",function(c){c.data.getTarget().getAscendant(a,!0)||c.data.preventDefault()})},getDirection:function(a){return a?this.getComputedStyle("direction")||this.getDirection()||this.getParent()&&this.getParent().getDirection(1)||this.getDocument().$.dir||
128
- "ltr":this.getStyle("direction")||this.getAttribute("dir")},data:function(a,c){a="data-"+a;if(void 0===c)return this.getAttribute(a);!1===c?this.removeAttribute(a):this.setAttribute(a,c);return null},getEditor:function(a){var c=CKEDITOR.instances,d,b,e;a=a||void 0===a;for(d in c)if(b=c[d],b.element.equals(this)&&b.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||!a&&(e=b.editable())&&(e.equals(this)||e.contains(this)))return b;return null},find:function(a){var c=l(this);a=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(g(this,
129
- a)));c();return a},findOne:function(a){var c=l(this);a=this.$.querySelector(g(this,a));c();return a?new CKEDITOR.dom.element(a):null},forEach:function(a,c,d){if(!(d||c&&this.type!=c))var b=a(this);if(!1!==b){d=this.getChildren();for(var e=0;e<d.count();e++)b=d.getItem(e),b.type==CKEDITOR.NODE_ELEMENT?b.forEach(a,c):c&&b.type!=c||a(b)}},fireEventHandler:function(a,c){var d="on"+a,b=this.$;if(CKEDITOR.env.ie&&9>CKEDITOR.env.version){var e=b.ownerDocument.createEventObject(),f;for(f in c)e[f]=c[f];b.fireEvent(d,
130
- e)}else b[b[a]?a:d](c)},isDetached:function(){var a=this.getDocument(),c=a.getDocumentElement();return c.equals(this)||c.contains(this)?!CKEDITOR.env.ie||8<CKEDITOR.env.version&&!CKEDITOR.env.quirks?!a.$.defaultView:!1:!0}});var k={width:["border-left-width","border-right-width","padding-left","padding-right"],height:["border-top-width","border-bottom-width","padding-top","padding-bottom"]};CKEDITOR.dom.element.prototype.setSize=function(a,c,d){"number"==typeof c&&(!d||CKEDITOR.env.ie&&CKEDITOR.env.quirks||
131
- (c-=e.call(this,a)),this.setStyle(a,c+"px"))};CKEDITOR.dom.element.prototype.getSize=function(a,c){var d=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(a)],this.$["client"+CKEDITOR.tools.capitalize(a)])||0;c&&(d-=e.call(this,a));return d}})();CKEDITOR.dom.documentFragment=function(a){a=a||CKEDITOR.document;this.$=a.type==CKEDITOR.NODE_DOCUMENT?a.$.createDocumentFragment():a};CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,
128
+ "ltr":this.getStyle("direction")||this.getAttribute("dir")},data:function(a,c){a="data-"+a;if(void 0===c)return this.getAttribute(a);!1===c?this.removeAttribute(a):this.setAttribute(a,c);return null},getEditor:function(a){var c=CKEDITOR.instances,d,b,f;a=a||void 0===a;for(d in c)if(b=c[d],b.element.equals(this)&&b.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||!a&&(f=b.editable())&&(f.equals(this)||f.contains(this)))return b;return null},find:function(a){var c=l(this);a=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(g(this,
129
+ a)));c();return a},findOne:function(a){var c=l(this);a=this.$.querySelector(g(this,a));c();return a?new CKEDITOR.dom.element(a):null},forEach:function(a,c,d){if(!(d||c&&this.type!=c))var b=a(this);if(!1!==b){d=this.getChildren();for(var f=0;f<d.count();f++)b=d.getItem(f),b.type==CKEDITOR.NODE_ELEMENT?b.forEach(a,c):c&&b.type!=c||a(b)}},fireEventHandler:function(a,c){var d="on"+a,b=this.$;if(CKEDITOR.env.ie&&9>CKEDITOR.env.version){var f=b.ownerDocument.createEventObject(),e;for(e in c)f[e]=c[e];b.fireEvent(d,
130
+ f)}else b[b[a]?a:d](c)},isDetached:function(){var a=this.getDocument(),c=a.getDocumentElement();return c.equals(this)||c.contains(this)?!CKEDITOR.env.ie||8<CKEDITOR.env.version&&!CKEDITOR.env.quirks?!a.$.defaultView:!1:!0}});var k={width:["border-left-width","border-right-width","padding-left","padding-right"],height:["border-top-width","border-bottom-width","padding-top","padding-bottom"]};CKEDITOR.dom.element.prototype.setSize=function(a,c,d){"number"==typeof c&&(!d||CKEDITOR.env.ie&&CKEDITOR.env.quirks||
131
+ (c-=f.call(this,a)),this.setStyle(a,c+"px"))};CKEDITOR.dom.element.prototype.getSize=function(a,c){var d=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(a)],this.$["client"+CKEDITOR.tools.capitalize(a)])||0;c&&(d-=f.call(this,a));return d}})();CKEDITOR.dom.documentFragment=function(a){a=a||CKEDITOR.document;this.$=a.type==CKEDITOR.NODE_DOCUMENT?a.$.createDocumentFragment():a};CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,
132
132
  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,getChildCount:1,getChild:1,getChildren:1});CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,
133
- CKEDITOR.dom.document.prototype,!0,{find:1,findOne:1});(function(){function a(b,a){var c=this.range;if(this._.end)return null;if(!this._.start){this._.start=1;if(c.collapsed)return this.end(),null;c.optimize()}var d,e=c.startContainer;d=c.endContainer;var f=c.startOffset,h=c.endOffset,k,n=this.guard,g=this.type,m=b?"getPreviousSourceNode":"getNextSourceNode";if(!b&&!this._.guardLTR){var l=d.type==CKEDITOR.NODE_ELEMENT?d:d.getParent(),C=d.type==CKEDITOR.NODE_ELEMENT?d.getChild(h):d.getNext();this._.guardLTR=
134
- function(b,a){return(!a||!l.equals(b))&&(!C||!b.equals(C))&&(b.type!=CKEDITOR.NODE_ELEMENT||!a||!b.equals(c.root))}}if(b&&!this._.guardRTL){var A=e.type==CKEDITOR.NODE_ELEMENT?e:e.getParent(),G=e.type==CKEDITOR.NODE_ELEMENT?f?e.getChild(f-1):null:e.getPrevious();this._.guardRTL=function(b,a){return(!a||!A.equals(b))&&(!G||!b.equals(G))&&(b.type!=CKEDITOR.NODE_ELEMENT||!a||!b.equals(c.root))}}var K=b?this._.guardRTL:this._.guardLTR;k=n?function(b,a){return!1===K(b,a)?!1:n(b,a)}:K;this.current?d=this.current[m](!1,
135
- g,k):(b?d.type==CKEDITOR.NODE_ELEMENT&&(d=0<h?d.getChild(h-1):!1===k(d,!0)?null:d.getPreviousSourceNode(!0,g,k)):(d=e,d.type==CKEDITOR.NODE_ELEMENT&&((d=d.getChild(f))||(d=!1===k(e,!0)?null:e.getNextSourceNode(!0,g,k)))),d&&!1===k(d)&&(d=null));for(;d&&!this._.end;){this.current=d;if(!this.evaluator||!1!==this.evaluator(d)){if(!a)return d}else if(a&&this.evaluator)return!1;d=d[m](!1,g,k)}this.end();return this.current=null}function l(b){for(var c,d=null;c=a.call(this,b);)d=c;return d}CKEDITOR.dom.walker=
133
+ CKEDITOR.dom.document.prototype,!0,{find:1,findOne:1});(function(){function a(b,a){var c=this.range;if(this._.end)return null;if(!this._.start){this._.start=1;if(c.collapsed)return this.end(),null;c.optimize()}var d,f=c.startContainer;d=c.endContainer;var e=c.startOffset,h=c.endOffset,k,n=this.guard,g=this.type,m=b?"getPreviousSourceNode":"getNextSourceNode";if(!b&&!this._.guardLTR){var l=d.type==CKEDITOR.NODE_ELEMENT?d:d.getParent(),C=d.type==CKEDITOR.NODE_ELEMENT?d.getChild(h):d.getNext();this._.guardLTR=
134
+ function(b,a){return(!a||!l.equals(b))&&(!C||!b.equals(C))&&(b.type!=CKEDITOR.NODE_ELEMENT||!a||!b.equals(c.root))}}if(b&&!this._.guardRTL){var A=f.type==CKEDITOR.NODE_ELEMENT?f:f.getParent(),G=f.type==CKEDITOR.NODE_ELEMENT?e?f.getChild(e-1):null:f.getPrevious();this._.guardRTL=function(b,a){return(!a||!A.equals(b))&&(!G||!b.equals(G))&&(b.type!=CKEDITOR.NODE_ELEMENT||!a||!b.equals(c.root))}}var K=b?this._.guardRTL:this._.guardLTR;k=n?function(b,a){return!1===K(b,a)?!1:n(b,a)}:K;this.current?d=this.current[m](!1,
135
+ g,k):(b?d.type==CKEDITOR.NODE_ELEMENT&&(d=0<h?d.getChild(h-1):!1===k(d,!0)?null:d.getPreviousSourceNode(!0,g,k)):(d=f,d.type==CKEDITOR.NODE_ELEMENT&&((d=d.getChild(e))||(d=!1===k(f,!0)?null:f.getNextSourceNode(!0,g,k)))),d&&!1===k(d)&&(d=null));for(;d&&!this._.end;){this.current=d;if(!this.evaluator||!1!==this.evaluator(d)){if(!a)return d}else if(a&&this.evaluator)return!1;d=d[m](!1,g,k)}this.end();return this.current=null}function l(b){for(var c,d=null;c=a.call(this,b);)d=c;return d}CKEDITOR.dom.walker=
136
136
  CKEDITOR.tools.createClass({$:function(b){this.range=b;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 l.call(this)},lastBackward:function(){return l.call(this,1)},reset:function(){delete this.current;this._={}}}});var g={block:1,"list-item":1,table:1,"table-row-group":1,"table-header-group":1,
137
- "table-footer-group":1,"table-row":1,"table-column-group":1,"table-column":1,"table-cell":1,"table-caption":1},e={absolute:1,fixed:1};CKEDITOR.dom.element.prototype.isBlockBoundary=function(b){return"none"!=this.getComputedStyle("float")||this.getComputedStyle("position")in e||!g[this.getComputedStyle("display")]?!!(this.is(CKEDITOR.dtd.$block)||b&&this.is(b)):!0};CKEDITOR.dom.walker.blockBoundary=function(b){return function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary(b))}};CKEDITOR.dom.walker.listItemBoundary=
138
- function(){return this.blockBoundary({br:1})};CKEDITOR.dom.walker.bookmark=function(b,a){function c(b){return b&&b.getName&&"span"==b.getName()&&b.data("cke-bookmark")}return function(d){var e,f;e=d&&d.type!=CKEDITOR.NODE_ELEMENT&&(f=d.getParent())&&c(f);e=b?e:e||c(d);return!!(a^e)}};CKEDITOR.dom.walker.whitespaces=function(b){return function(a){var c;a&&a.type==CKEDITOR.NODE_TEXT&&(c=!CKEDITOR.tools.trim(a.getText())||CKEDITOR.env.webkit&&a.getText()==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE);
139
- return!!(b^c)}};CKEDITOR.dom.walker.invisible=function(b){var a=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.env.webkit?1:0;return function(d){a(d)?d=1:(d.type==CKEDITOR.NODE_TEXT&&(d=d.getParent()),d=d.$.offsetWidth<=c);return!!(b^d)}};CKEDITOR.dom.walker.nodeType=function(b,a){return function(c){return!!(a^c.type==b)}};CKEDITOR.dom.walker.bogus=function(b){function a(b){return!m(b)&&!k(b)}return function(c){var d=CKEDITOR.env.needsBrFiller?c.is&&c.is("br"):c.getText&&f.test(c.getText());d&&(d=c.getParent(),
140
- c=c.getNext(a),d=d.isBlockBoundary()&&(!c||c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()));return!!(b^d)}};CKEDITOR.dom.walker.temp=function(b){return function(a){a.type!=CKEDITOR.NODE_ELEMENT&&(a=a.getParent());a=a&&a.hasAttribute("data-cke-temp");return!!(b^a)}};var f=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,m=CKEDITOR.dom.walker.whitespaces(),k=CKEDITOR.dom.walker.bookmark(),h=CKEDITOR.dom.walker.temp(),c=function(b){return k(b)||m(b)||b.type==CKEDITOR.NODE_ELEMENT&&b.is(CKEDITOR.dtd.$inline)&&!b.is(CKEDITOR.dtd.$empty)};
141
- CKEDITOR.dom.walker.ignored=function(b){return function(a){a=m(a)||k(a)||h(a);return!!(b^a)}};var d=CKEDITOR.dom.walker.ignored();CKEDITOR.dom.walker.empty=function(b){return function(a){for(var c=0,e=a.getChildCount();c<e;++c)if(!d(a.getChild(c)))return!!b;return!b}};var b=CKEDITOR.dom.walker.empty(),n=CKEDITOR.dom.walker.validEmptyBlockContainers=CKEDITOR.tools.extend(function(b){var a={},c;for(c in b)CKEDITOR.dtd[c]["#"]&&(a[c]=1);return a}(CKEDITOR.dtd.$block),{caption:1,td:1,th:1});CKEDITOR.dom.walker.editable=
142
- function(a){return function(c){c=d(c)?!1:c.type==CKEDITOR.NODE_TEXT||c.type==CKEDITOR.NODE_ELEMENT&&(c.is(CKEDITOR.dtd.$inline)||c.is("hr")||"false"==c.getAttribute("contenteditable")||!CKEDITOR.env.needsBrFiller&&c.is(n)&&b(c))?!0:!1;return!!(a^c)}};CKEDITOR.dom.element.prototype.getBogus=function(){var b=this;do b=b.getPreviousSourceNode();while(c(b));return b&&(CKEDITOR.env.needsBrFiller?b.is&&b.is("br"):b.getText&&f.test(b.getText()))?b:!1}})();CKEDITOR.dom.range=function(a){this.endOffset=this.endContainer=
143
- this.startOffset=this.startContainer=null;this.collapsed=!0;var l=a instanceof CKEDITOR.dom.document;this.document=l?a:a.getDocument();this.root=l?a.getBody():a};(function(){function a(b){b.collapsed=b.startContainer&&b.endContainer&&b.startContainer.equals(b.endContainer)&&b.startOffset==b.endOffset}function l(b,a,c,d,e){function f(b,a,c,d){var h=c?b.getPrevious():b.getNext();if(d&&g)return h;l||d?a.append(b.clone(!0,e),c):(b.remove(),m&&a.append(b,c));return h}function h(){var b,a,c,d=Math.min(I.length,
137
+ "table-footer-group":1,"table-row":1,"table-column-group":1,"table-column":1,"table-cell":1,"table-caption":1},f={absolute:1,fixed:1};CKEDITOR.dom.element.prototype.isBlockBoundary=function(b){return"none"!=this.getComputedStyle("float")||this.getComputedStyle("position")in f||!g[this.getComputedStyle("display")]?!!(this.is(CKEDITOR.dtd.$block)||b&&this.is(b)):!0};CKEDITOR.dom.walker.blockBoundary=function(b){return function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary(b))}};CKEDITOR.dom.walker.listItemBoundary=
138
+ function(){return this.blockBoundary({br:1})};CKEDITOR.dom.walker.bookmark=function(b,a){function c(b){return b&&b.getName&&"span"==b.getName()&&b.data("cke-bookmark")}return function(d){var f,e;f=d&&d.type!=CKEDITOR.NODE_ELEMENT&&(e=d.getParent())&&c(e);f=b?f:f||c(d);return!!(a^f)}};CKEDITOR.dom.walker.whitespaces=function(b){return function(a){var c;a&&a.type==CKEDITOR.NODE_TEXT&&(c=!CKEDITOR.tools.trim(a.getText())||CKEDITOR.env.webkit&&a.getText()==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE);
139
+ return!!(b^c)}};CKEDITOR.dom.walker.invisible=function(b){var a=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.env.webkit?1:0;return function(d){a(d)?d=1:(d.type==CKEDITOR.NODE_TEXT&&(d=d.getParent()),d=d.$.offsetWidth<=c);return!!(b^d)}};CKEDITOR.dom.walker.nodeType=function(b,a){return function(c){return!!(a^c.type==b)}};CKEDITOR.dom.walker.bogus=function(b){function a(b){return!m(b)&&!k(b)}return function(c){var d=CKEDITOR.env.needsBrFiller?c.is&&c.is("br"):c.getText&&e.test(c.getText());d&&(d=c.getParent(),
140
+ c=c.getNext(a),d=d.isBlockBoundary()&&(!c||c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()));return!!(b^d)}};CKEDITOR.dom.walker.temp=function(b){return function(a){a.type!=CKEDITOR.NODE_ELEMENT&&(a=a.getParent());a=a&&a.hasAttribute("data-cke-temp");return!!(b^a)}};var e=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,m=CKEDITOR.dom.walker.whitespaces(),k=CKEDITOR.dom.walker.bookmark(),h=CKEDITOR.dom.walker.temp(),c=function(b){return k(b)||m(b)||b.type==CKEDITOR.NODE_ELEMENT&&b.is(CKEDITOR.dtd.$inline)&&!b.is(CKEDITOR.dtd.$empty)};
141
+ CKEDITOR.dom.walker.ignored=function(b){return function(a){a=m(a)||k(a)||h(a);return!!(b^a)}};var d=CKEDITOR.dom.walker.ignored();CKEDITOR.dom.walker.empty=function(b){return function(a){for(var c=0,f=a.getChildCount();c<f;++c)if(!d(a.getChild(c)))return!!b;return!b}};var b=CKEDITOR.dom.walker.empty(),n=CKEDITOR.dom.walker.validEmptyBlockContainers=CKEDITOR.tools.extend(function(b){var a={},c;for(c in b)CKEDITOR.dtd[c]["#"]&&(a[c]=1);return a}(CKEDITOR.dtd.$block),{caption:1,td:1,th:1});CKEDITOR.dom.walker.editable=
142
+ function(a){return function(c){c=d(c)?!1:c.type==CKEDITOR.NODE_TEXT||c.type==CKEDITOR.NODE_ELEMENT&&(c.is(CKEDITOR.dtd.$inline)||c.is("hr")||"false"==c.getAttribute("contenteditable")||!CKEDITOR.env.needsBrFiller&&c.is(n)&&b(c))?!0:!1;return!!(a^c)}};CKEDITOR.dom.element.prototype.getBogus=function(){var b=this;do b=b.getPreviousSourceNode();while(c(b));return b&&(CKEDITOR.env.needsBrFiller?b.is&&b.is("br"):b.getText&&e.test(b.getText()))?b:!1}})();CKEDITOR.dom.range=function(a){this.endOffset=this.endContainer=
143
+ this.startOffset=this.startContainer=null;this.collapsed=!0;var l=a instanceof CKEDITOR.dom.document;this.document=l?a:a.getDocument();this.root=l?a.getBody():a};(function(){function a(b){b.collapsed=b.startContainer&&b.endContainer&&b.startContainer.equals(b.endContainer)&&b.startOffset==b.endOffset}function l(b,a,c,d,f){function e(b,a,c,d){var h=c?b.getPrevious():b.getNext();if(d&&g)return h;l||d?a.append(b.clone(!0,f),c):(b.remove(),m&&a.append(b,c));return h}function h(){var b,a,c,d=Math.min(I.length,
144
144
  J.length);for(b=0;b<d;b++)if(a=I[b],c=J[b],!a.equals(c))return b;return b-1}function k(){var a=F-1,c=K&&H&&!w.equals(v);a<L-1||a<P-1||c?(c?b.moveToPosition(v,CKEDITOR.POSITION_BEFORE_START):P==a+1&&G?b.moveToPosition(J[a],CKEDITOR.POSITION_BEFORE_END):b.moveToPosition(J[a+1],CKEDITOR.POSITION_BEFORE_START),d&&(a=I[a+1])&&a.type==CKEDITOR.NODE_ELEMENT&&(c=CKEDITOR.dom.element.createFromHtml('\x3cspan data-cke-bookmark\x3d"1" style\x3d"display:none"\x3e\x26nbsp;\x3c/span\x3e',b.document),c.insertAfter(a),
145
145
  a.mergeSiblings(!1),b.moveToBookmark({startNode:c}))):b.collapse(!0)}b.optimizeBookmark();var g=0===a,m=1==a,l=2==a;a=l||m;var w=b.startContainer,v=b.endContainer,D=b.startOffset,C=b.endOffset,A,G,K,H,E,M;if(l&&v.type==CKEDITOR.NODE_TEXT&&(w.equals(v)||w.type===CKEDITOR.NODE_ELEMENT&&w.getFirst().equals(v)))c.append(b.document.createText(v.substring(D,C)));else{v.type==CKEDITOR.NODE_TEXT?l?M=!0:v=v.split(C):0<v.getChildCount()?C>=v.getChildCount()?(v=v.getChild(C-1),G=!0):v=v.getChild(C):H=G=!0;w.type==
146
- CKEDITOR.NODE_TEXT?l?E=!0:w.split(D):0<w.getChildCount()?0===D?(w=w.getChild(D),A=!0):w=w.getChild(D-1):K=A=!0;for(var I=w.getParents(),J=v.getParents(),F=h(),L=I.length-1,P=J.length-1,N=c,Y,S,Z,ha=-1,W=F;W<=L;W++){S=I[W];Z=S.getNext();for(W!=L||S.equals(J[W])&&L<P?a&&(Y=N.append(S.clone(0,e))):A?f(S,N,!1,K):E&&N.append(b.document.createText(S.substring(D)));Z;){if(Z.equals(J[W])){ha=W;break}Z=f(Z,N)}N=Y}N=c;for(W=F;W<=P;W++)if(c=J[W],Z=c.getPrevious(),c.equals(I[W]))a&&(N=N.getChild(0));else{W!=
147
- P||c.equals(I[W])&&P<L?a&&(Y=N.append(c.clone(0,e))):G?f(c,N,!1,H):M&&N.append(b.document.createText(c.substring(0,C)));if(W>ha)for(;Z;)Z=f(Z,N,!0);N=Y}l||k()}}function g(){var b=!1,a=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(!0),d=CKEDITOR.dom.walker.bogus();return function(e){return c(e)||a(e)?!0:d(e)&&!b?b=!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(b){var a=CKEDITOR.dom.walker.whitespaces(),
148
- c=CKEDITOR.dom.walker.bookmark(1);return function(d){return c(d)||a(d)?!0:!b&&k(d)||d.type==CKEDITOR.NODE_ELEMENT&&d.is(CKEDITOR.dtd.$removeEmpty)}}function f(b){return function(){var a;return this[b?"getPreviousNode":"getNextNode"](function(b){!a&&d(b)&&(a=b);return c(b)&&!(k(b)&&b.equals(a))})}}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},k=CKEDITOR.dom.walker.bogus(),
146
+ CKEDITOR.NODE_TEXT?l?E=!0:w.split(D):0<w.getChildCount()?0===D?(w=w.getChild(D),A=!0):w=w.getChild(D-1):K=A=!0;for(var I=w.getParents(),J=v.getParents(),F=h(),L=I.length-1,P=J.length-1,N=c,Y,S,Z,ha=-1,W=F;W<=L;W++){S=I[W];Z=S.getNext();for(W!=L||S.equals(J[W])&&L<P?a&&(Y=N.append(S.clone(0,f))):A?e(S,N,!1,K):E&&N.append(b.document.createText(S.substring(D)));Z;){if(Z.equals(J[W])){ha=W;break}Z=e(Z,N)}N=Y}N=c;for(W=F;W<=P;W++)if(c=J[W],Z=c.getPrevious(),c.equals(I[W]))a&&(N=N.getChild(0));else{W!=
147
+ P||c.equals(I[W])&&P<L?a&&(Y=N.append(c.clone(0,f))):G?e(c,N,!1,H):M&&N.append(b.document.createText(c.substring(0,C)));if(W>ha)for(;Z;)Z=e(Z,N,!0);N=Y}l||k()}}function g(){var b=!1,a=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(!0),d=CKEDITOR.dom.walker.bogus();return function(f){return c(f)||a(f)?!0:d(f)&&!b?b=!0:f.type==CKEDITOR.NODE_TEXT&&(f.hasAscendant("pre")||CKEDITOR.tools.trim(f.getText()).length)||f.type==CKEDITOR.NODE_ELEMENT&&!f.is(m)?!1:!0}}function f(b){var a=CKEDITOR.dom.walker.whitespaces(),
148
+ c=CKEDITOR.dom.walker.bookmark(1);return function(d){return c(d)||a(d)?!0:!b&&k(d)||d.type==CKEDITOR.NODE_ELEMENT&&d.is(CKEDITOR.dtd.$removeEmpty)}}function e(b){return function(){var a;return this[b?"getPreviousNode":"getNextNode"](function(b){!a&&d(b)&&(a=b);return c(b)&&!(k(b)&&b.equals(a))})}}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},k=CKEDITOR.dom.walker.bogus(),
149
149
  h=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,c=CKEDITOR.dom.walker.editable(),d=CKEDITOR.dom.walker.ignored(!0);CKEDITOR.dom.range.prototype={clone:function(){var b=new CKEDITOR.dom.range(this.root);b._setStartContainer(this.startContainer);b.startOffset=this.startOffset;b._setEndContainer(this.endContainer);b.endOffset=this.endOffset;b.collapsed=this.collapsed;return b},collapse:function(b){b?(this._setEndContainer(this.startContainer),this.endOffset=this.startOffset):(this._setStartContainer(this.endContainer),
150
150
  this.startOffset=this.endOffset);this.collapsed=!0},cloneContents:function(b){var a=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||l(this,2,a,!1,"undefined"==typeof b?!0:b);return a},deleteContents:function(b){this.collapsed||l(this,0,null,b)},extractContents:function(b,a){var c=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||l(this,1,c,b,"undefined"==typeof a?!0:a);return c},equals:function(b){return this.startOffset===b.startOffset&&this.endOffset===b.endOffset&&
151
- this.startContainer.equals(b.startContainer)&&this.endContainer.equals(b.endContainer)},createBookmark:function(b){function a(b){return b.getAscendant(function(b){var a;if(a=b.data&&b.data("cke-temp"))a=-1===CKEDITOR.tools.array.indexOf(["cke_copybin","cke_pastebin"],b.getAttribute("id"));return a},!0)}var c=this.startContainer,d=this.endContainer,e=this.collapsed,f,h,k,g;f=this.document.createElement("span");f.data("cke-bookmark",1);f.setStyle("display","none");f.setHtml("\x26nbsp;");b&&(k="cke_bm_"+
152
- CKEDITOR.tools.getNextNumber(),f.setAttribute("id",k+(e?"C":"S")));e||(h=f.clone(),h.setHtml("\x26nbsp;"),b&&h.setAttribute("id",k+"E"),g=this.clone(),a(d)&&(d=a(d),g.moveToPosition(d,CKEDITOR.POSITION_AFTER_END)),g.collapse(),g.insertNode(h));g=this.clone();a(c)&&(d=a(c),g.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START));g.collapse(!0);g.insertNode(f);h?(this.setStartAfter(f),this.setEndBefore(h)):this.moveToPosition(f,CKEDITOR.POSITION_AFTER_END);return{startNode:b?k+(e?"C":"S"):f,endNode:b?k+
153
- "E":h,serializable:b,collapsed:e}},createBookmark2:function(){function b(b){var a=b.container,d=b.offset,e;e=a;var f=d;e=e.type!=CKEDITOR.NODE_ELEMENT||0===f||f==e.getChildCount()?0:e.getChild(f-1).type==CKEDITOR.NODE_TEXT&&e.getChild(f).type==CKEDITOR.NODE_TEXT;e&&(a=a.getChild(d-1),d=a.getLength());if(a.type==CKEDITOR.NODE_ELEMENT&&0<d){a:{for(e=a;d--;)if(f=e.getChild(d).getIndex(!0),0<=f){d=f;break a}d=-1}d+=1}if(a.type==CKEDITOR.NODE_TEXT){e=a;for(f=0;(e=e.getPrevious())&&e.type==CKEDITOR.NODE_TEXT;)f+=
154
- e.getText().replace(CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE,"").length;e=f;a.isEmpty()?(f=a.getPrevious(c),e?(d=e,a=f?f.getNext():a.getParent().getFirst()):(a=a.getParent(),d=f?f.getIndex(!0)+1:0)):d+=e}b.container=a;b.offset=d}function a(b,c){var d=c.getCustomData("cke-fillingChar");if(d){var e=b.container;d.equals(e)&&(b.offset-=CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE.length,0>=b.offset&&(b.offset=e.getIndex(),b.container=e.getParent()))}}var c=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT,
155
- !0);return function(c){var d=this.collapsed,e={container:this.startContainer,offset:this.startOffset},f={container:this.endContainer,offset:this.endOffset};c&&(b(e),a(e,this.root),d||(b(f),a(f,this.root)));return{start:e.container.getAddress(c),end:d?null:f.container.getAddress(c),startOffset:e.offset,endOffset:f.offset,normalized:c,collapsed:d,is2:!0}}}(),moveToBookmark:function(b){if(b.is2){var a=this.document.getByAddress(b.start,b.normalized),c=b.startOffset,d=b.end&&this.document.getByAddress(b.end,
156
- b.normalized);b=b.endOffset;this.setStart(a,c);d?this.setEnd(d,b):this.collapse(!0)}else a=(c=b.serializable)?this.document.getById(b.startNode):b.startNode,b=c?this.document.getById(b.endNode):b.endNode,this.setStartBefore(a),a.remove(),b?(this.setEndBefore(b),b.remove()):this.collapse(!0)},getBoundaryNodes:function(){var b=this.startContainer,a=this.endContainer,c=this.startOffset,d=this.endOffset,e;if(b.type==CKEDITOR.NODE_ELEMENT)if(e=b.getChildCount(),e>c)b=b.getChild(c);else if(1>e)b=b.getPreviousSourceNode();
157
- else{for(b=b.$;b.lastChild;)b=b.lastChild;b=new CKEDITOR.dom.node(b);b=b.getNextSourceNode()||b}if(a.type==CKEDITOR.NODE_ELEMENT)if(e=a.getChildCount(),e>d)a=a.getChild(d).getPreviousSourceNode(!0);else if(1>e)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a)}b.getPosition(a)&CKEDITOR.POSITION_FOLLOWING&&(b=a);return{startNode:b,endNode:a}},getCommonAncestor:function(b,a){var c=this.startContainer,d=this.endContainer,c=c.equals(d)?b&&c.type==CKEDITOR.NODE_ELEMENT&&
151
+ this.startContainer.equals(b.startContainer)&&this.endContainer.equals(b.endContainer)},createBookmark:function(b){function a(b){return b.getAscendant(function(b){var a;if(a=b.data&&b.data("cke-temp"))a=-1===CKEDITOR.tools.array.indexOf(["cke_copybin","cke_pastebin"],b.getAttribute("id"));return a},!0)}var c=this.startContainer,d=this.endContainer,f=this.collapsed,e,h,k,g;e=this.document.createElement("span");e.data("cke-bookmark",1);e.setStyle("display","none");e.setHtml("\x26nbsp;");b&&(k="cke_bm_"+
152
+ CKEDITOR.tools.getNextNumber(),e.setAttribute("id",k+(f?"C":"S")));f||(h=e.clone(),h.setHtml("\x26nbsp;"),b&&h.setAttribute("id",k+"E"),g=this.clone(),a(d)&&(d=a(d),g.moveToPosition(d,CKEDITOR.POSITION_AFTER_END)),g.collapse(),g.insertNode(h));g=this.clone();a(c)&&(d=a(c),g.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START));g.collapse(!0);g.insertNode(e);h?(this.setStartAfter(e),this.setEndBefore(h)):this.moveToPosition(e,CKEDITOR.POSITION_AFTER_END);return{startNode:b?k+(f?"C":"S"):e,endNode:b?k+
153
+ "E":h,serializable:b,collapsed:f}},createBookmark2:function(){function b(b){var a=b.container,d=b.offset,f;f=a;var e=d;f=f.type!=CKEDITOR.NODE_ELEMENT||0===e||e==f.getChildCount()?0:f.getChild(e-1).type==CKEDITOR.NODE_TEXT&&f.getChild(e).type==CKEDITOR.NODE_TEXT;f&&(a=a.getChild(d-1),d=a.getLength());if(a.type==CKEDITOR.NODE_ELEMENT&&0<d){a:{for(f=a;d--;)if(e=f.getChild(d).getIndex(!0),0<=e){d=e;break a}d=-1}d+=1}if(a.type==CKEDITOR.NODE_TEXT){f=a;for(e=0;(f=f.getPrevious())&&f.type==CKEDITOR.NODE_TEXT;)e+=
154
+ f.getText().replace(CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE,"").length;f=e;a.isEmpty()?(e=a.getPrevious(c),f?(d=f,a=e?e.getNext():a.getParent().getFirst()):(a=a.getParent(),d=e?e.getIndex(!0)+1:0)):d+=f}b.container=a;b.offset=d}function a(b,c){var d=c.getCustomData("cke-fillingChar");if(d){var f=b.container;d.equals(f)&&(b.offset-=CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE.length,0>=b.offset&&(b.offset=f.getIndex(),b.container=f.getParent()))}}var c=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT,
155
+ !0);return function(c){var d=this.collapsed,f={container:this.startContainer,offset:this.startOffset},e={container:this.endContainer,offset:this.endOffset};c&&(b(f),a(f,this.root),d||(b(e),a(e,this.root)));return{start:f.container.getAddress(c),end:d?null:e.container.getAddress(c),startOffset:f.offset,endOffset:e.offset,normalized:c,collapsed:d,is2:!0}}}(),moveToBookmark:function(b){if(b.is2){var a=this.document.getByAddress(b.start,b.normalized),c=b.startOffset,d=b.end&&this.document.getByAddress(b.end,
156
+ b.normalized);b=b.endOffset;this.setStart(a,c);d?this.setEnd(d,b):this.collapse(!0)}else a=(c=b.serializable)?this.document.getById(b.startNode):b.startNode,b=c?this.document.getById(b.endNode):b.endNode,this.setStartBefore(a),a.remove(),b?(this.setEndBefore(b),b.remove()):this.collapse(!0)},getBoundaryNodes:function(){var b=this.startContainer,a=this.endContainer,c=this.startOffset,d=this.endOffset,f;if(b.type==CKEDITOR.NODE_ELEMENT)if(f=b.getChildCount(),f>c)b=b.getChild(c);else if(1>f)b=b.getPreviousSourceNode();
157
+ else{for(b=b.$;b.lastChild;)b=b.lastChild;b=new CKEDITOR.dom.node(b);b=b.getNextSourceNode()||b}if(a.type==CKEDITOR.NODE_ELEMENT)if(f=a.getChildCount(),f>d)a=a.getChild(d).getPreviousSourceNode(!0);else if(1>f)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a)}b.getPosition(a)&CKEDITOR.POSITION_FOLLOWING&&(b=a);return{startNode:b,endNode:a}},getCommonAncestor:function(b,a){var c=this.startContainer,d=this.endContainer,c=c.equals(d)?b&&c.type==CKEDITOR.NODE_ELEMENT&&
158
158
  this.startOffset==this.endOffset-1?c.getChild(this.startOffset):c:c.getCommonAncestor(d);return a&&!c.is?c.getParent():c},optimize:function(){var b=this.startContainer,a=this.startOffset;b.type!=CKEDITOR.NODE_ELEMENT&&(a?a>=b.getLength()&&this.setStartAfter(b):this.setStartBefore(b));b=this.endContainer;a=this.endOffset;b.type!=CKEDITOR.NODE_ELEMENT&&(a?a>=b.getLength()&&this.setEndAfter(b):this.setEndBefore(b))},optimizeBookmark:function(){var b=this.startContainer,a=this.endContainer;b.is&&b.is("span")&&
159
- b.data("cke-bookmark")&&this.setStartAt(b,CKEDITOR.POSITION_BEFORE_START);a&&a.is&&a.is("span")&&a.data("cke-bookmark")&&this.setEndAt(a,CKEDITOR.POSITION_AFTER_END)},trim:function(b,a){var c=this.startContainer,d=this.startOffset,e=this.collapsed;if((!b||e)&&c&&c.type==CKEDITOR.NODE_TEXT){if(d)if(d>=c.getLength())d=c.getIndex()+1,c=c.getParent();else{var f=c.split(d),d=c.getIndex()+1,c=c.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(f,this.endOffset-this.startOffset):c.equals(this.endContainer)&&
160
- (this.endOffset+=1)}else d=c.getIndex(),c=c.getParent();this.setStart(c,d);if(e){this.collapse(!0);return}}c=this.endContainer;d=this.endOffset;a||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(b,a){function c(b){return b&&b.type==CKEDITOR.NODE_ELEMENT&&b.hasAttribute("contenteditable")?null:b}var d=new RegExp(/[^\s\ufeff]/);switch(b){case CKEDITOR.ENLARGE_INLINE:var e=1;case CKEDITOR.ENLARGE_ELEMENT:var f=
161
- function(b,a){var c=new CKEDITOR.dom.range(k);c.setStart(b,a);c.setEndAt(k,CKEDITOR.POSITION_BEFORE_END);var c=new CKEDITOR.dom.walker(c),e;for(c.guard=function(b){return!(b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary())};e=c.next();){if(e.type!=CKEDITOR.NODE_TEXT)return!1;A=e!=b?e.getText():e.substring(a);if(d.test(A))return!1}return!0};if(this.collapsed)break;var h=this.getCommonAncestor(),k=this.root,g,m,l,w,v,D=!1,C,A;C=this.startContainer;var G=this.startOffset;C.type==CKEDITOR.NODE_TEXT?
162
- (G&&(C=!CKEDITOR.tools.trim(C.substring(0,G)).length&&C,D=!!C),C&&((w=C.getPrevious())||(l=C.getParent()))):(G&&(w=C.getChild(G-1)||C.getLast()),w||(l=C));for(l=c(l);l||w;){if(l&&!w){!v&&l.equals(h)&&(v=!0);if(e?l.isBlockBoundary():!k.contains(l))break;D&&"inline"==l.getComputedStyle("display")||(D=!1,v?g=l:this.setStartBefore(l));w=l.getPrevious()}for(;w;)if(C=!1,w.type==CKEDITOR.NODE_COMMENT)w=w.getPrevious();else{if(w.type==CKEDITOR.NODE_TEXT)A=w.getText(),d.test(A)&&(w=null),C=/[\s\ufeff]$/.test(A);
159
+ b.data("cke-bookmark")&&this.setStartAt(b,CKEDITOR.POSITION_BEFORE_START);a&&a.is&&a.is("span")&&a.data("cke-bookmark")&&this.setEndAt(a,CKEDITOR.POSITION_AFTER_END)},trim:function(b,a){var c=this.startContainer,d=this.startOffset,f=this.collapsed;if((!b||f)&&c&&c.type==CKEDITOR.NODE_TEXT){if(d)if(d>=c.getLength())d=c.getIndex()+1,c=c.getParent();else{var e=c.split(d),d=c.getIndex()+1,c=c.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(e,this.endOffset-this.startOffset):c.equals(this.endContainer)&&
160
+ (this.endOffset+=1)}else d=c.getIndex(),c=c.getParent();this.setStart(c,d);if(f){this.collapse(!0);return}}c=this.endContainer;d=this.endOffset;a||f||!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(b,a){function c(b){return b&&b.type==CKEDITOR.NODE_ELEMENT&&b.hasAttribute("contenteditable")?null:b}var d=new RegExp(/[^\s\ufeff]/);switch(b){case CKEDITOR.ENLARGE_INLINE:var f=1;case CKEDITOR.ENLARGE_ELEMENT:var e=
161
+ function(b,a){var c=new CKEDITOR.dom.range(k);c.setStart(b,a);c.setEndAt(k,CKEDITOR.POSITION_BEFORE_END);var c=new CKEDITOR.dom.walker(c),f;for(c.guard=function(b){return!(b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary())};f=c.next();){if(f.type!=CKEDITOR.NODE_TEXT)return!1;A=f!=b?f.getText():f.substring(a);if(d.test(A))return!1}return!0};if(this.collapsed)break;var h=this.getCommonAncestor(),k=this.root,g,m,l,w,v,D=!1,C,A;C=this.startContainer;var G=this.startOffset;C.type==CKEDITOR.NODE_TEXT?
162
+ (G&&(C=!CKEDITOR.tools.trim(C.substring(0,G)).length&&C,D=!!C),C&&((w=C.getPrevious())||(l=C.getParent()))):(G&&(w=C.getChild(G-1)||C.getLast()),w||(l=C));for(l=c(l);l||w;){if(l&&!w){!v&&l.equals(h)&&(v=!0);if(f?l.isBlockBoundary():!k.contains(l))break;D&&"inline"==l.getComputedStyle("display")||(D=!1,v?g=l:this.setStartBefore(l));w=l.getPrevious()}for(;w;)if(C=!1,w.type==CKEDITOR.NODE_COMMENT)w=w.getPrevious();else{if(w.type==CKEDITOR.NODE_TEXT)A=w.getText(),d.test(A)&&(w=null),C=/[\s\ufeff]$/.test(A);
163
163
  else if((w.$.offsetWidth>(CKEDITOR.env.webkit?1:0)||a&&w.is("br"))&&!w.data("cke-bookmark"))if(D&&CKEDITOR.dtd.$removeEmpty[w.getName()]){A=w.getText();if(d.test(A))w=null;else for(var G=w.$.getElementsByTagName("*"),K=0,H;H=G[K++];)if(!CKEDITOR.dtd.$removeEmpty[H.nodeName.toLowerCase()]){w=null;break}w&&(C=!!A.length)}else w=null;C&&(D?v?g=l:l&&this.setStartBefore(l):D=!0);if(w){C=w.getPrevious();if(!l&&!C){l=w;w=null;break}w=C}else l=null}l&&(l=c(l.getParent()))}C=this.endContainer;G=this.endOffset;
164
- l=w=null;v=D=!1;C.type==CKEDITOR.NODE_TEXT?CKEDITOR.tools.trim(C.substring(G)).length?D=!0:(D=!C.getLength(),G==C.getLength()?(w=C.getNext())||(l=C.getParent()):f(C,G)&&(l=C.getParent())):(w=C.getChild(G))||(l=C);for(;l||w;){if(l&&!w){!v&&l.equals(h)&&(v=!0);if(e?l.isBlockBoundary():!k.contains(l))break;D&&"inline"==l.getComputedStyle("display")||(D=!1,v?m=l:l&&this.setEndAfter(l));w=l.getNext()}for(;w;){C=!1;if(w.type==CKEDITOR.NODE_TEXT)A=w.getText(),f(w,0)||(w=null),C=/^[\s\ufeff]/.test(A);else if(w.type==
164
+ l=w=null;v=D=!1;C.type==CKEDITOR.NODE_TEXT?CKEDITOR.tools.trim(C.substring(G)).length?D=!0:(D=!C.getLength(),G==C.getLength()?(w=C.getNext())||(l=C.getParent()):e(C,G)&&(l=C.getParent())):(w=C.getChild(G))||(l=C);for(;l||w;){if(l&&!w){!v&&l.equals(h)&&(v=!0);if(f?l.isBlockBoundary():!k.contains(l))break;D&&"inline"==l.getComputedStyle("display")||(D=!1,v?m=l:l&&this.setEndAfter(l));w=l.getNext()}for(;w;){C=!1;if(w.type==CKEDITOR.NODE_TEXT)A=w.getText(),e(w,0)||(w=null),C=/^[\s\ufeff]/.test(A);else if(w.type==
165
165
  CKEDITOR.NODE_ELEMENT){if((0<w.$.offsetWidth||a&&w.is("br"))&&!w.data("cke-bookmark"))if(D&&CKEDITOR.dtd.$removeEmpty[w.getName()]){A=w.getText();if(d.test(A))w=null;else for(G=w.$.getElementsByTagName("*"),K=0;H=G[K++];)if(!CKEDITOR.dtd.$removeEmpty[H.nodeName.toLowerCase()]){w=null;break}w&&(C=!!A.length)}else w=null}else C=1;C&&D&&(v?m=l:this.setEndAfter(l));if(w){C=w.getNext();if(!l&&!C){l=w;w=null;break}w=C}else l=null}l&&(l=c(l.getParent()))}g&&m&&(h=g.contains(m)?m:g,this.setStartBefore(h),
166
166
  this.setEndAfter(h));break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:l=new CKEDITOR.dom.range(this.root);k=this.root;l.setStartAt(k,CKEDITOR.POSITION_AFTER_START);l.setEnd(this.startContainer,this.startOffset);l=new CKEDITOR.dom.walker(l);var E,M,I=CKEDITOR.dom.walker.blockBoundary(b==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),J=null,F=function(b){if(b.type==CKEDITOR.NODE_ELEMENT&&"false"==b.getAttribute("contenteditable"))if(J){if(J.equals(b)){J=null;return}}else J=
167
- b;else if(J)return;var a=I(b);a||(E=b);return a},e=function(b){var a=F(b);!a&&b.is&&b.is("br")&&(M=b);return a};l.guard=F;l=l.lastBackward();E=E||k;this.setStartAt(E,!E.is("br")&&(!l&&this.checkStartOfBlock()||l&&E.contains(l))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END);if(b==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){l=this.clone();l=new CKEDITOR.dom.walker(l);var L=CKEDITOR.dom.walker.whitespaces(),P=CKEDITOR.dom.walker.bookmark();l.evaluator=function(b){return!L(b)&&!P(b)};if((l=l.previous())&&
168
- l.type==CKEDITOR.NODE_ELEMENT&&l.is("br"))break}l=this.clone();l.collapse();l.setEndAt(k,CKEDITOR.POSITION_BEFORE_END);l=new CKEDITOR.dom.walker(l);l.guard=b==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?e:F;E=J=M=null;l=l.lastForward();E=E||k;this.setEndAt(E,!l&&this.checkEndOfBlock()||l&&E.contains(l)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);M&&this.setEndAfter(M)}},shrink:function(b,a,c){var d="boolean"===typeof c?c:c&&"boolean"===typeof c.shrinkOnBlockBoundary?c.shrinkOnBlockBoundary:
169
- !0,e=c&&c.skipBogus;if(!this.collapsed){b=b||CKEDITOR.SHRINK_TEXT;var f=this.clone(),h=this.startContainer,k=this.endContainer,g=this.startOffset,m=this.endOffset,l=c=1;h&&h.type==CKEDITOR.NODE_TEXT&&(g?g>=h.getLength()?f.setStartAfter(h):(f.setStartBefore(h),c=0):f.setStartBefore(h));k&&k.type==CKEDITOR.NODE_TEXT&&(m?m>=k.getLength()?f.setEndAfter(k):(f.setEndAfter(k),l=0):f.setEndBefore(k));var f=new CKEDITOR.dom.walker(f),w=CKEDITOR.dom.walker.bookmark(),v=CKEDITOR.dom.walker.bogus();f.evaluator=
170
- function(a){return a.type==(b==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var D;f.guard=function(a,c){if(e&&v(a)||w(a))return!0;if(b==CKEDITOR.SHRINK_ELEMENT&&a.type==CKEDITOR.NODE_TEXT||c&&a.equals(D)||!1===d&&a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary()||a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable"))return!1;c||a.type!=CKEDITOR.NODE_ELEMENT||(D=a);return!0};c&&(h=f[b==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(h,a?CKEDITOR.POSITION_AFTER_START:
171
- CKEDITOR.POSITION_BEFORE_START);l&&(f.reset(),(f=f[b==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(f,a?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END));return!(!c&&!l)}},insertNode:function(b){this.optimizeBookmark();this.trim(!1,!0);var a=this.startContainer,c=a.getChild(this.startOffset);c?b.insertBefore(c):a.append(b);b.getParent()&&b.getParent().equals(this.endContainer)&&this.endOffset++;this.setStartBefore(b)},moveToPosition:function(b,a){this.setStartAt(b,
167
+ b;else if(J)return;var a=I(b);a||(E=b);return a},f=function(b){var a=F(b);!a&&b.is&&b.is("br")&&(M=b);return a};l.guard=F;l=l.lastBackward();E=E||k;this.setStartAt(E,!E.is("br")&&(!l&&this.checkStartOfBlock()||l&&E.contains(l))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END);if(b==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){l=this.clone();l=new CKEDITOR.dom.walker(l);var L=CKEDITOR.dom.walker.whitespaces(),P=CKEDITOR.dom.walker.bookmark();l.evaluator=function(b){return!L(b)&&!P(b)};if((l=l.previous())&&
168
+ l.type==CKEDITOR.NODE_ELEMENT&&l.is("br"))break}l=this.clone();l.collapse();l.setEndAt(k,CKEDITOR.POSITION_BEFORE_END);l=new CKEDITOR.dom.walker(l);l.guard=b==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?f:F;E=J=M=null;l=l.lastForward();E=E||k;this.setEndAt(E,!l&&this.checkEndOfBlock()||l&&E.contains(l)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);M&&this.setEndAfter(M)}},shrink:function(b,a,c){var d="boolean"===typeof c?c:c&&"boolean"===typeof c.shrinkOnBlockBoundary?c.shrinkOnBlockBoundary:
169
+ !0,f=c&&c.skipBogus;if(!this.collapsed){b=b||CKEDITOR.SHRINK_TEXT;var e=this.clone(),h=this.startContainer,k=this.endContainer,g=this.startOffset,m=this.endOffset,l=c=1;h&&h.type==CKEDITOR.NODE_TEXT&&(g?g>=h.getLength()?e.setStartAfter(h):(e.setStartBefore(h),c=0):e.setStartBefore(h));k&&k.type==CKEDITOR.NODE_TEXT&&(m?m>=k.getLength()?e.setEndAfter(k):(e.setEndAfter(k),l=0):e.setEndBefore(k));var e=new CKEDITOR.dom.walker(e),w=CKEDITOR.dom.walker.bookmark(),v=CKEDITOR.dom.walker.bogus();e.evaluator=
170
+ function(a){return a.type==(b==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var D;e.guard=function(a,c){if(f&&v(a)||w(a))return!0;if(b==CKEDITOR.SHRINK_ELEMENT&&a.type==CKEDITOR.NODE_TEXT||c&&a.equals(D)||!1===d&&a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary()||a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable"))return!1;c||a.type!=CKEDITOR.NODE_ELEMENT||(D=a);return!0};c&&(h=e[b==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(h,a?CKEDITOR.POSITION_AFTER_START:
171
+ CKEDITOR.POSITION_BEFORE_START);l&&(e.reset(),(e=e[b==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(e,a?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END));return!(!c&&!l)}},insertNode:function(b){this.optimizeBookmark();this.trim(!1,!0);var a=this.startContainer,c=a.getChild(this.startOffset);c?b.insertBefore(c):a.append(b);b.getParent()&&b.getParent().equals(this.endContainer)&&this.endOffset++;this.setStartBefore(b)},moveToPosition:function(b,a){this.setStartAt(b,
172
172
  a);this.collapse(!0)},moveToRange:function(b){this.setStart(b.startContainer,b.startOffset);this.setEnd(b.endContainer,b.endOffset)},selectNodeContents:function(b){this.setStart(b,0);this.setEnd(b,b.type==CKEDITOR.NODE_TEXT?b.getLength():b.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,
173
173
  c){b.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[b.getName()]&&(c=b.getIndex()+1,b=b.getParent());this._setEndContainer(b);this.endOffset=c;this.startContainer||(this._setStartContainer(b),this.startOffset=c);a(this)},setStartAfter:function(b){this.setStart(b.getParent(),b.getIndex()+1)},setStartBefore:function(b){this.setStart(b.getParent(),b.getIndex())},setEndAfter:function(b){this.setEnd(b.getParent(),b.getIndex()+1)},setEndBefore:function(b){this.setEnd(b.getParent(),b.getIndex())},setStartAt:function(b,
174
174
  c){switch(c){case CKEDITOR.POSITION_AFTER_START:this.setStart(b,0);break;case CKEDITOR.POSITION_BEFORE_END:b.type==CKEDITOR.NODE_TEXT?this.setStart(b,b.getLength()):this.setStart(b,b.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(b);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(b)}a(this)},setEndAt:function(b,c){switch(c){case CKEDITOR.POSITION_AFTER_START:this.setEnd(b,0);break;case CKEDITOR.POSITION_BEFORE_END:b.type==CKEDITOR.NODE_TEXT?this.setEnd(b,
175
- b.getLength()):this.setEnd(b,b.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(b);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(b)}a(this)},fixBlock:function(b,a){var c=this.createBookmark(),d=this.document.createElement(a);this.collapse(b);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(b,a){var c=
176
- new CKEDITOR.dom.elementPath(this.startContainer,this.root),d=new CKEDITOR.dom.elementPath(this.endContainer,this.root),e=c.block,f=d.block,h=null;if(!c.blockLimit.equals(d.blockLimit))return null;"br"!=b&&(e||(e=this.fixBlock(!0,b),f=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block),f||(f=this.fixBlock(!1,b)));c=e&&this.checkStartOfBlock();d=f&&this.checkEndOfBlock();this.deleteContents();e&&e.equals(f)&&(d?(h=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(f,
177
- CKEDITOR.POSITION_AFTER_END),f=null):c?(h=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),e=null):(f=this.splitElement(e,a||!1),e.is("ul","ol")||e.appendBogus()));return{previousBlock:e,nextBlock:f,wasStartOfBlock:c,wasEndOfBlock:d,elementPath:h}},splitElement:function(b,a){if(!this.collapsed)return null;this.setEndAt(b,CKEDITOR.POSITION_BEFORE_END);var c=this.extractContents(!1,a||!1),d=b.clone(!1,a||!1);c.appendTo(d);d.insertAfter(b);
178
- this.moveToPosition(b,CKEDITOR.POSITION_AFTER_END);return d},removeEmptyBlocksAtEnd:function(){function b(b){return function(d){return a(d)||c(d)||d.type==CKEDITOR.NODE_ELEMENT&&d.isEmptyInlineRemoveable()||b.is("table")&&d.is("caption")?!1:!0}}var a=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(!1);return function(a){for(var c=this.createBookmark(),d=this[a?"endPath":"startPath"](),e=d.block||d.blockLimit,f;e&&!e.equals(d.root)&&!e.getFirst(b(e));)f=e.getParent(),this[a?"setEndAt":
179
- "setStartAt"](e,CKEDITOR.POSITION_AFTER_END),e.remove(1),e=f;this.moveToBookmark(c)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,this.root)},checkBoundaryOfElement:function(b,a){var c=a==CKEDITOR.START,d=this.clone();d.collapse(c);d[c?"setStartAt":"setEndAt"](b,c?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(d);d.evaluator=e(c);return d[c?
175
+ b.getLength()):this.setEnd(b,b.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(b);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(b)}a(this)},fixBlock:function(b,a){var c=this.createBookmark(),d=this.document.createElement(a);this.collapse(b);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(d);d.trim();this.insertNode(d);var f=d.getBogus();f&&f.remove();d.appendBogus();this.moveToBookmark(c);return d},splitBlock:function(b,a){var c=
176
+ new CKEDITOR.dom.elementPath(this.startContainer,this.root),d=new CKEDITOR.dom.elementPath(this.endContainer,this.root),f=c.block,e=d.block,h=null;if(!c.blockLimit.equals(d.blockLimit))return null;"br"!=b&&(f||(f=this.fixBlock(!0,b),e=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block),e||(e=this.fixBlock(!1,b)));c=f&&this.checkStartOfBlock();d=e&&this.checkEndOfBlock();this.deleteContents();f&&f.equals(e)&&(d?(h=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(e,
177
+ CKEDITOR.POSITION_AFTER_END),e=null):c?(h=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START),f=null):(e=this.splitElement(f,a||!1),f.is("ul","ol")||f.appendBogus()));return{previousBlock:f,nextBlock:e,wasStartOfBlock:c,wasEndOfBlock:d,elementPath:h}},splitElement:function(b,a){if(!this.collapsed)return null;this.setEndAt(b,CKEDITOR.POSITION_BEFORE_END);var c=this.extractContents(!1,a||!1),d=b.clone(!1,a||!1);c.appendTo(d);d.insertAfter(b);
178
+ this.moveToPosition(b,CKEDITOR.POSITION_AFTER_END);return d},removeEmptyBlocksAtEnd:function(){function b(b){return function(d){return a(d)||c(d)||d.type==CKEDITOR.NODE_ELEMENT&&d.isEmptyInlineRemoveable()||b.is("table")&&d.is("caption")?!1:!0}}var a=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(!1);return function(a){for(var c=this.createBookmark(),d=this[a?"endPath":"startPath"](),f=d.block||d.blockLimit,e;f&&!f.equals(d.root)&&!f.getFirst(b(f));)e=f.getParent(),this[a?"setEndAt":
179
+ "setStartAt"](f,CKEDITOR.POSITION_AFTER_END),f.remove(1),f=e;this.moveToBookmark(c)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,this.root)},checkBoundaryOfElement:function(b,a){var c=a==CKEDITOR.START,d=this.clone();d.collapse(c);d[c?"setStartAt":"setEndAt"](b,c?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(d);d.evaluator=f(c);return d[c?
180
180
  "checkBackward":"checkForward"]()},checkStartOfBlock:function(){var b=this.startContainer,a=this.startOffset;CKEDITOR.env.ie&&a&&b.type==CKEDITOR.NODE_TEXT&&(b=CKEDITOR.tools.ltrim(b.substring(0,a)),h.test(b)&&this.trim(0,1));this.trim();b=new CKEDITOR.dom.elementPath(this.startContainer,this.root);a=this.clone();a.collapse(!0);a.setStartAt(b.block||b.blockLimit,CKEDITOR.POSITION_AFTER_START);b=new CKEDITOR.dom.walker(a);b.evaluator=g();return b.checkBackward()},checkEndOfBlock:function(){var b=this.endContainer,
181
181
  a=this.endOffset;CKEDITOR.env.ie&&b.type==CKEDITOR.NODE_TEXT&&(b=CKEDITOR.tools.rtrim(b.substring(a)),h.test(b)&&this.trim(1,0));this.trim();b=new CKEDITOR.dom.elementPath(this.endContainer,this.root);a=this.clone();a.collapse(!1);a.setEndAt(b.block||b.blockLimit,CKEDITOR.POSITION_BEFORE_END);b=new CKEDITOR.dom.walker(a);b.evaluator=g();return b.checkForward()},getPreviousNode:function(b,a,c){var d=this.clone();d.collapse(1);d.setStartAt(c||this.root,CKEDITOR.POSITION_AFTER_START);c=new CKEDITOR.dom.walker(d);
182
182
  c.evaluator=b;c.guard=a;return c.previous()},getNextNode:function(b,a,c){var d=this.clone();d.collapse();d.setEndAt(c||this.root,CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(d);c.evaluator=b;c.guard=a;return c.next()},checkReadOnly:function(){function b(b,a){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(a)||b.equals(a)))break}b=b.getParent()}return 1}
183
183
  return function(){var a=this.startContainer,c=this.endContainer;return!(b(a,c)&&b(c,a))}}(),moveToElementEditablePosition:function(b,a){if(b.type==CKEDITOR.NODE_ELEMENT&&!b.isEditable(!1))return this.moveToPosition(b,a?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),!0;for(var c=0;b;){if(b.type==CKEDITOR.NODE_TEXT){a&&this.endContainer&&this.checkEndOfBlock()&&h.test(b.getText())?this.moveToPosition(b,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(b,a?CKEDITOR.POSITION_AFTER_END:
184
- CKEDITOR.POSITION_BEFORE_START);c=1;break}if(b.type==CKEDITOR.NODE_ELEMENT)if(b.isEditable())this.moveToPosition(b,a?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),c=1;else if(a&&b.is("br")&&this.endContainer&&this.checkEndOfBlock())this.moveToPosition(b,CKEDITOR.POSITION_BEFORE_START);else if("false"==b.getAttribute("contenteditable")&&b.is(CKEDITOR.dtd.$block))return this.setStartBefore(b),this.setEndAfter(b),!0;var e=b,f=c,k=void 0;e.type==CKEDITOR.NODE_ELEMENT&&e.isEditable(!1)&&
185
- (k=e[a?"getLast":"getFirst"](d));f||k||(k=e[a?"getPrevious":"getNext"](d));b=k}return!!c},moveToClosestEditablePosition:function(b,a){var c,d=0,e,f,h=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];b?(c=new CKEDITOR.dom.range(this.root),c.moveToPosition(b,h[a?0:1])):c=this.clone();if(b&&!b.is(CKEDITOR.dtd.$block))d=1;else if(e=c[a?"getNextEditableNode":"getPreviousEditableNode"]())d=1,(f=e.type==CKEDITOR.NODE_ELEMENT)&&e.is(CKEDITOR.dtd.$block)&&"false"==e.getAttribute("contenteditable")?
186
- (c.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),c.setEndAt(e,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&f&&e.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(c.setEnd(e,0),c.collapse()):c.moveToPosition(e,h[a?1:0]);d&&this.moveToRange(c);return!!d},moveToElementEditStart:function(b){return this.moveToElementEditablePosition(b)},moveToElementEditEnd:function(b){return this.moveToElementEditablePosition(b,!0)},getEnclosedNode:function(){var b=this.clone();b.optimize();if(b.startContainer.type!=
184
+ CKEDITOR.POSITION_BEFORE_START);c=1;break}if(b.type==CKEDITOR.NODE_ELEMENT)if(b.isEditable())this.moveToPosition(b,a?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),c=1;else if(a&&b.is("br")&&this.endContainer&&this.checkEndOfBlock())this.moveToPosition(b,CKEDITOR.POSITION_BEFORE_START);else if("false"==b.getAttribute("contenteditable")&&b.is(CKEDITOR.dtd.$block))return this.setStartBefore(b),this.setEndAfter(b),!0;var f=b,e=c,k=void 0;f.type==CKEDITOR.NODE_ELEMENT&&f.isEditable(!1)&&
185
+ (k=f[a?"getLast":"getFirst"](d));e||k||(k=f[a?"getPrevious":"getNext"](d));b=k}return!!c},moveToClosestEditablePosition:function(b,a){var c,d=0,f,e,h=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];b?(c=new CKEDITOR.dom.range(this.root),c.moveToPosition(b,h[a?0:1])):c=this.clone();if(b&&!b.is(CKEDITOR.dtd.$block))d=1;else if(f=c[a?"getNextEditableNode":"getPreviousEditableNode"]())d=1,(e=f.type==CKEDITOR.NODE_ELEMENT)&&f.is(CKEDITOR.dtd.$block)&&"false"==f.getAttribute("contenteditable")?
186
+ (c.setStartAt(f,CKEDITOR.POSITION_BEFORE_START),c.setEndAt(f,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&e&&f.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(c.setEnd(f,0),c.collapse()):c.moveToPosition(f,h[a?1:0]);d&&this.moveToRange(c);return!!d},moveToElementEditStart:function(b){return this.moveToElementEditablePosition(b)},moveToElementEditEnd:function(b){return this.moveToElementEditablePosition(b,!0)},getEnclosedNode:function(){var b=this.clone();b.optimize();if(b.startContainer.type!=
187
187
  CKEDITOR.NODE_ELEMENT||b.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var b=new CKEDITOR.dom.walker(b),a=CKEDITOR.dom.walker.bookmark(!1,!0),c=CKEDITOR.dom.walker.whitespaces(!0);b.evaluator=function(b){return c(b)&&a(b)};var d=b.next();b.reset();return d&&d.equals(b.previous())?d:null},getTouchedStartNode:function(){var b=this.startContainer;return this.collapsed||b.type!=CKEDITOR.NODE_ELEMENT?b:b.getChild(this.startOffset)||b},getTouchedEndNode:function(){var b=this.endContainer;return this.collapsed||
188
- b.type!=CKEDITOR.NODE_ELEMENT?b:b.getChild(this.endOffset-1)||b},getNextEditableNode:f(),getPreviousEditableNode:f(1),_getTableElement:function(b){b=b||{td:1,th:1,tr:1,tbody:1,thead:1,tfoot:1,table:1};var a=this.getTouchedStartNode(),c=this.getTouchedEndNode(),d=a.getAscendant("table",!0),c=c.getAscendant("table",!0);return d&&!this.root.contains(d)?null:this.getEnclosedNode()?this.getEnclosedNode().getAscendant(b,!0):d&&c&&(d.equals(c)||d.contains(c)||c.contains(d))?a.getAscendant(b,!0):null},scrollIntoView:function(){var b=
189
- new CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",this.document),a,c,d,e=this.clone();e.optimize();(d=e.startContainer.type==CKEDITOR.NODE_TEXT)?(c=e.startContainer.getText(),a=e.startContainer.split(e.startOffset),b.insertAfter(e.startContainer)):e.insertNode(b);b.scrollIntoView();d&&(e.startContainer.setText(c),a.remove());b.remove()},getClientRects:function(){function b(b,a){var c=CKEDITOR.tools.array.map(b,function(a){return a}),d=new CKEDITOR.dom.range(a.root),e,f,
190
- h;a.startContainer instanceof CKEDITOR.dom.element&&(f=0===a.startOffset&&a.startContainer.hasAttribute("data-widget"));a.endContainer instanceof CKEDITOR.dom.element&&(h=(h=a.endOffset===(a.endContainer.getChildCount?a.endContainer.getChildCount():a.endContainer.length))&&a.endContainer.hasAttribute("data-widget"));f&&d.setStart(a.startContainer.getParent(),a.startContainer.getIndex());h&&d.setEnd(a.endContainer.getParent(),a.endContainer.getIndex()+1);if(f||h)a=d;d=a.cloneContents().find("[data-cke-widget-id]").toArray();
191
- if(d=CKEDITOR.tools.array.map(d,function(b){var c=a.root.editor;b=b.getAttribute("data-cke-widget-id");return c.widgets.instances[b].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},a),CKEDITOR.tools.array.forEach(d,function(a){function b(e){CKEDITOR.tools.array.forEach(c,
192
- function(b,f){var h=CKEDITOR.tools.objectCompare(a[e],b);h||(h=CKEDITOR.tools.objectCompare(a.widgetRect,b));h&&(Array.prototype.splice.call(c,f,a.length-e,a.widgetRect),d=!0)});d||(e<c.length-1?b(e+1):c.push(a.widgetRect))}var d;b(0)}),c}function a(b,c,e){var f;c.collapsed?e.startContainer instanceof CKEDITOR.dom.element?(b=e.checkStartOfBlock(),f=new CKEDITOR.dom.text("​"),b?e.startContainer.append(f,!0):0===e.startOffset?f.insertBefore(e.startContainer.getFirst()):(e=e.startContainer.getChildren().getItem(e.startOffset-
193
- 1),f.insertAfter(e)),c.setStart(f.$,0),c.setEnd(f.$,0),b=c.getClientRects(),f.remove()):e.startContainer instanceof CKEDITOR.dom.text&&(""===e.startContainer.getText()?(e.startContainer.setText("​"),b=c.getClientRects(),e.startContainer.setText("")):b=[d(e.createBookmark())]):b=[d(e.createBookmark())];return b}function c(a,b,d){a=CKEDITOR.tools.extend({},a);b&&(a=CKEDITOR.tools.getAbsoluteRectPosition(d.document.getWindow(),a));!a.width&&(a.width=a.right-a.left);!a.height&&(a.height=a.bottom-a.top);
194
- return a}function d(a){var b=a.startNode;a=a.endNode;var c;b.setText("​");b.removeStyle("display");a?(a.setText("​"),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)}}
195
- return void 0!==this.document.getSelection?function(d){var e=this.root.getDocument().$.createRange(),f;e.setStart(this.startContainer.$,this.startOffset);e.setEnd(this.endContainer.$,this.endOffset);f=e.getClientRects();f=b(f,this);f.length||(f=a(f,e,this));return CKEDITOR.tools.array.map(f,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,
196
- c){var d=this.getCommonAncestor(),e=this.getBoundaryNodes(),f=[],h,k,g,m;if(d&&d.find)for(k=d.find(a),h=0;h<k.count();h++)if(d=k.getItem(h),c||!d.isReadOnly())g=d.getPosition(e.startNode)&CKEDITOR.POSITION_FOLLOWING||e.startNode.equals(d),m=d.getPosition(e.endNode)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_IS_CONTAINED||e.endNode.equals(d),g&&m&&f.push(d);return f}};CKEDITOR.dom.range.mergeRanges=function(a){return CKEDITOR.tools.array.reduce(a,function(a,b){var c=a[a.length-1],d=!1;b=b.clone();
197
- b.enlarge(CKEDITOR.ENLARGE_ELEMENT);if(c){var e=new CKEDITOR.dom.range(b.root),d=new CKEDITOR.dom.walker(e),f=CKEDITOR.dom.walker.whitespaces();e.setStart(c.endContainer,c.endOffset);e.setEnd(b.startContainer,b.startOffset);for(e=d.next();f(e)||b.endContainer.equals(e);)e=d.next();d=!e}d?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=
198
- 1;CKEDITOR.ENLARGE_BLOCK_CONTENTS=2;CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS=3;CKEDITOR.ENLARGE_INLINE=4;CKEDITOR.START=1;CKEDITOR.END=2;CKEDITOR.SHRINK_ELEMENT=1;CKEDITOR.SHRINK_TEXT=2;"use strict";(function(){function a(a){1>arguments.length||(this.range=a,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function l(a){var b=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return b.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return b}function g(a,b,c,e){a:{null==
199
- e&&(e=l(c));for(var f;f=e.shift();)if(f.getDtd().p){e={element:f,remaining:e};break a}e=null}if(!e)return 0;if((f=CKEDITOR.filter.instances[e.element.data("cke-filter")])&&!f.check(b))return g(a,b,c,e.remaining);b=new CKEDITOR.dom.range(e.element);b.selectNodeContents(e.element);b=b.createIterator();b.enlargeBr=a.enlargeBr;b.enforceRealBlocks=a.enforceRealBlocks;b.activeFilter=b.filter=f;a._.nestedEditable={element:e.element,container:c,remaining:e.remaining,iterator:b};return 1}function e(a,b,c){if(!b)return!1;
200
- a=a.clone();a.collapse(!c);return a.checkBoundaryOfElement(b,c?CKEDITOR.START:CKEDITOR.END)}var f=/^[\r\n\t ]+$/,m=CKEDITOR.dom.walker.bookmark(!1,!0),k=CKEDITOR.dom.walker.whitespaces(!0),h=function(a){return m(a)&&k(a)},c={dd:1,dt:1,li:1};a.prototype={getNextParagraph:function(a){var b,k,l,u,t;a=a||"p";if(this._.nestedEditable){if(b=this._.nestedEditable.iterator.getNextParagraph(a))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,b;this.activeFilter=this.filter;if(g(this,a,
201
- this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(a);this._.nestedEditable=null}if(!this.range.root.getDtd()[a])return null;if(!this._.started){var r=this.range.clone();k=r.startPath();var p=r.endPath(),y=!r.collapsed&&e(r,k.block),x=!r.collapsed&&e(r,p.block,1);r.shrink(CKEDITOR.SHRINK_ELEMENT,!0);y&&r.setStartAt(k.block,CKEDITOR.POSITION_BEFORE_END);x&&r.setEndAt(p.block,
188
+ b.type!=CKEDITOR.NODE_ELEMENT?b:b.getChild(this.endOffset-1)||b},getNextEditableNode:e(),getPreviousEditableNode:e(1),_getTableElement:function(b){b=b||{td:1,th:1,tr:1,tbody:1,thead:1,tfoot:1,table:1};var a=this.getTouchedStartNode(),c=this.getTouchedEndNode(),d=a.getAscendant("table",!0),c=c.getAscendant("table",!0);return d&&!this.root.contains(d)?null:this.getEnclosedNode()?this.getEnclosedNode().getAscendant(b,!0):d&&c&&(d.equals(c)||d.contains(c)||c.contains(d))?a.getAscendant(b,!0):null},scrollIntoView:function(){var b=
189
+ new CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",this.document),a,c,d,f=this.clone();f.optimize();(d=f.startContainer.type==CKEDITOR.NODE_TEXT)?(c=f.startContainer.getText(),a=f.startContainer.split(f.startOffset),b.insertAfter(f.startContainer)):f.insertNode(b);b.scrollIntoView();d&&(f.startContainer.setText(c),a.remove());b.remove()},getClientRects:function(){function a(b,c){var d=CKEDITOR.tools.array.map(b,function(a){return a}),f=new CKEDITOR.dom.range(c.root),e,h,
190
+ k;c.startContainer instanceof CKEDITOR.dom.element&&(h=0===c.startOffset&&c.startContainer.hasAttribute("data-widget"));c.endContainer instanceof CKEDITOR.dom.element&&(k=(k=c.endOffset===(c.endContainer.getChildCount?c.endContainer.getChildCount():c.endContainer.length))&&c.endContainer.hasAttribute("data-widget"));h&&f.setStart(c.startContainer.getParent(),c.startContainer.getIndex());k&&f.setEnd(c.endContainer.getParent(),c.endContainer.getIndex()+1);if(h||k)c=f;f=c.cloneContents().find("[data-cke-widget-id]").toArray();
191
+ if(f=CKEDITOR.tools.array.map(f,function(a){var b=c.root.editor;a=a.getAttribute("data-cke-widget-id");return b.widgets.instances[a].element}))return f=CKEDITOR.tools.array.map(f,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(f,function(a){function b(f){CKEDITOR.tools.array.forEach(d,
192
+ function(b,e){var h=CKEDITOR.tools.objectCompare(a[f],b);h||(h=CKEDITOR.tools.objectCompare(a.widgetRect,b));h&&(Array.prototype.splice.call(d,e,a.length-f,a.widgetRect),c=!0)});c||(f<d.length-1?b(f+1):d.push(a.widgetRect))}var c;b(0)}),d}function c(a,b,d){var e;b.collapsed?d.startContainer instanceof CKEDITOR.dom.element?(a=d.checkStartOfBlock(),e=new CKEDITOR.dom.text("​"),a?d.startContainer.append(e,!0):0===d.startOffset?e.insertBefore(d.startContainer.getFirst()):(d=d.startContainer.getChildren().getItem(d.startOffset-
193
+ 1),e.insertAfter(d)),b.setStart(e.$,0),b.setEnd(e.$,0),a=b.getClientRects(),e.remove()):d.startContainer instanceof CKEDITOR.dom.text&&(""===d.startContainer.getText()?(d.startContainer.setText("​"),a=b.getClientRects(),d.startContainer.setText("")):a=[f(d.createBookmark())]):a=[f(d.createBookmark())];return a}function d(a,b,c){a=CKEDITOR.tools.extend({},a);b&&(a=CKEDITOR.tools.getAbsoluteRectPosition(c.document.getWindow(),a));!a.width&&(a.width=a.right-a.left);!a.height&&(a.height=a.bottom-a.top);
194
+ return a}function f(a){var b=a.startNode;a=a.endNode;var c;b.setText("​");b.removeStyle("display");a?(a.setText("​"),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)}}
195
+ return void 0!==this.document.getSelection?function(f){var e=this.root.getDocument().$.createRange(),h;e.setStart(this.startContainer.$,this.startOffset);e.setEnd(this.endContainer.$,this.endOffset);h=e.getClientRects();h=a(h,this);h.length||(h=c(h,e,this));return CKEDITOR.tools.array.map(h,function(a){return d(a,f,this)},this)}:function(a){return[d(f(this.createBookmark()),a,this)]}}(),_setStartContainer:function(a){this.startContainer=a},_setEndContainer:function(a){this.endContainer=a},_find:function(a,
196
+ c){var d=this.getCommonAncestor(),f=this.getBoundaryNodes(),e=[],h,k,g,m;if(d&&d.find)for(k=d.find(a),h=0;h<k.count();h++)if(d=k.getItem(h),c||!d.isReadOnly())g=d.getPosition(f.startNode)&CKEDITOR.POSITION_FOLLOWING||f.startNode.equals(d),m=d.getPosition(f.endNode)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_IS_CONTAINED||f.endNode.equals(d),g&&m&&e.push(d);return e}};CKEDITOR.dom.range.mergeRanges=function(a){return CKEDITOR.tools.array.reduce(a,function(a,b){var c=a[a.length-1],d=!1;b=b.clone();
197
+ b.enlarge(CKEDITOR.ENLARGE_ELEMENT);if(c){var f=new CKEDITOR.dom.range(b.root),d=new CKEDITOR.dom.walker(f),e=CKEDITOR.dom.walker.whitespaces();f.setStart(c.endContainer,c.endOffset);f.setEnd(b.startContainer,b.startOffset);for(f=d.next();e(f)||b.endContainer.equals(f);)f=d.next();d=!f}d?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=
198
+ 1;CKEDITOR.ENLARGE_BLOCK_CONTENTS=2;CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS=3;CKEDITOR.ENLARGE_INLINE=4;CKEDITOR.START=1;CKEDITOR.END=2;CKEDITOR.SHRINK_ELEMENT=1;CKEDITOR.SHRINK_TEXT=2;"use strict";(function(){function a(a){1>arguments.length||(this.range=a,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function l(a){var b=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return b.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return b}function g(a,b,c,f){a:{null==
199
+ f&&(f=l(c));for(var e;e=f.shift();)if(e.getDtd().p){f={element:e,remaining:f};break a}f=null}if(!f)return 0;if((e=CKEDITOR.filter.instances[f.element.data("cke-filter")])&&!e.check(b))return g(a,b,c,f.remaining);b=new CKEDITOR.dom.range(f.element);b.selectNodeContents(f.element);b=b.createIterator();b.enlargeBr=a.enlargeBr;b.enforceRealBlocks=a.enforceRealBlocks;b.activeFilter=b.filter=e;a._.nestedEditable={element:f.element,container:c,remaining:f.remaining,iterator:b};return 1}function f(a,b,c){if(!b)return!1;
200
+ a=a.clone();a.collapse(!c);return a.checkBoundaryOfElement(b,c?CKEDITOR.START:CKEDITOR.END)}var e=/^[\r\n\t ]+$/,m=CKEDITOR.dom.walker.bookmark(!1,!0),k=CKEDITOR.dom.walker.whitespaces(!0),h=function(a){return m(a)&&k(a)},c={dd:1,dt:1,li:1};a.prototype={getNextParagraph:function(a){var b,k,l,u,t;a=a||"p";if(this._.nestedEditable){if(b=this._.nestedEditable.iterator.getNextParagraph(a))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,b;this.activeFilter=this.filter;if(g(this,a,
201
+ this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(a);this._.nestedEditable=null}if(!this.range.root.getDtd()[a])return null;if(!this._.started){var r=this.range.clone();k=r.startPath();var p=r.endPath(),y=!r.collapsed&&f(r,k.block),x=!r.collapsed&&f(r,p.block,1);r.shrink(CKEDITOR.SHRINK_ELEMENT,!0);y&&r.setStartAt(k.block,CKEDITOR.POSITION_BEFORE_END);x&&r.setEndAt(p.block,
202
202
  CKEDITOR.POSITION_AFTER_START);k=r.endContainer.hasAscendant("pre",!0)||r.startContainer.hasAscendant("pre",!0);r.enlarge(this.forceBrBreak&&!k||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);r.collapsed||(k=new CKEDITOR.dom.walker(r.clone()),p=CKEDITOR.dom.walker.bookmark(!0,!0),k.evaluator=p,this._.nextNode=k.next(),k=new CKEDITOR.dom.walker(r.clone()),k.evaluator=p,k=k.previous(),this._.lastNode=k.getNextSourceNode(!0,null,r.root),this._.lastNode&&this._.lastNode.type==
203
203
  CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(p=this.range.clone(),p.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),p.checkEndOfBlock()&&(p=new CKEDITOR.dom.elementPath(p.endContainer,p.root),this._.lastNode=(p.block||p.blockLimit).getNextSourceNode(!0))),this._.lastNode&&r.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=r.document.createText(""),this._.lastNode.insertAfter(k)),r=null);this._.started=
204
- 1;k=r}p=this._.nextNode;r=this._.lastNode;for(this._.nextNode=null;p;){var y=0,x=p.hasAscendant("pre"),z=p.type!=CKEDITOR.NODE_ELEMENT,B=0;if(z)p.type==CKEDITOR.NODE_TEXT&&f.test(p.getText())&&(z=0);else{var w=p.getName();if(CKEDITOR.dtd.$block[w]&&"false"==p.getAttribute("contenteditable")){b=p;g(this,a,b);break}else if(p.isBlockBoundary(this.forceBrBreak&&!x&&{br:1})){if("br"==w)z=1;else if(!k&&!p.getChildCount()&&"hr"!=w){b=p;l=p.equals(r);break}k&&(k.setEndAt(p,CKEDITOR.POSITION_BEFORE_START),
204
+ 1;k=r}p=this._.nextNode;r=this._.lastNode;for(this._.nextNode=null;p;){var y=0,x=p.hasAscendant("pre"),z=p.type!=CKEDITOR.NODE_ELEMENT,B=0;if(z)p.type==CKEDITOR.NODE_TEXT&&e.test(p.getText())&&(z=0);else{var w=p.getName();if(CKEDITOR.dtd.$block[w]&&"false"==p.getAttribute("contenteditable")){b=p;g(this,a,b);break}else if(p.isBlockBoundary(this.forceBrBreak&&!x&&{br:1})){if("br"==w)z=1;else if(!k&&!p.getChildCount()&&"hr"!=w){b=p;l=p.equals(r);break}k&&(k.setEndAt(p,CKEDITOR.POSITION_BEFORE_START),
205
205
  "br"!=w&&(this._.nextNode=p));y=1}else{if(p.getFirst()){k||(k=this.range.clone(),k.setStartAt(p,CKEDITOR.POSITION_BEFORE_START));p=p.getFirst();continue}z=1}}z&&!k&&(k=this.range.clone(),k.setStartAt(p,CKEDITOR.POSITION_BEFORE_START));l=(!y||z)&&p.equals(r);if(k&&!y)for(;!p.getNext(h)&&!l;){w=p.getParent();if(w.isBlockBoundary(this.forceBrBreak&&!x&&{br:1})){y=1;z=0;l||w.equals(r);k.setEndAt(w,CKEDITOR.POSITION_BEFORE_END);break}p=w;z=1;l=p.equals(r);B=1}z&&k.setEndAt(p,CKEDITOR.POSITION_AFTER_END);
206
206
  p=this._getNextSourceNode(p,B,r);if((l=!p)||y&&k)break}if(!b){if(!k)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;b=new CKEDITOR.dom.elementPath(k.startContainer,k.root);p=b.blockLimit;y={div:1,th:1,td:1};b=b.block;!b&&p&&!this.enforceRealBlocks&&y[p.getName()]&&k.checkStartOfBlock()&&k.checkEndOfBlock()&&!p.equals(k.root)?b=p:!b||this.enforceRealBlocks&&b.is(c)?(b=this.range.document.createElement(a),k.extractContents().appendTo(b),b.trim(),k.insertNode(b),u=t=!0):
207
207
  "li"!=b.getName()?k.checkStartOfBlock()&&k.checkEndOfBlock()||(b=b.clone(!1),k.extractContents().appendTo(b),b.trim(),t=k.splitBlock(),u=!t.wasStartOfBlock,t=!t.wasEndOfBlock,k.insertNode(b)):l||(this._.nextNode=b.equals(r)?null:this._getNextSourceNode(k.getBoundaryNodes().endNode,1,r))}u&&(u=b.getPrevious())&&u.type==CKEDITOR.NODE_ELEMENT&&("br"==u.getName()?u.remove():u.getLast()&&"br"==u.getLast().$.nodeName.toLowerCase()&&u.getLast().remove());t&&(u=b.getLast())&&u.type==CKEDITOR.NODE_ELEMENT&&
208
- "br"==u.getName()&&(!CKEDITOR.env.needsBrFiller||u.getPrevious(m)||u.getNext(m))&&u.remove();this._.nextNode||(this._.nextNode=l||b.equals(r)||!r?null:this._getNextSourceNode(b,1,r));return b},_getNextSourceNode:function(a,b,c){function e(a){return!(a.equals(c)||a.equals(f))}var f=this.range.root;for(a=a.getNextSourceNode(b,null,e);!m(a);)a=a.getNextSourceNode(b,null,e);return a}};CKEDITOR.dom.range.prototype.createIterator=function(){return new a(this)}})();CKEDITOR.command=function(a,l){this.uiItems=
209
- [];this.exec=function(e){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return!1;this.editorFocus&&a.focus();return!1===this.fire("exec")?!0:!1!==l.exec.call(this,a,e)};this.refresh=function(a,f){if(!this.readOnly&&a.readOnly)return!0;if(this.context&&!f.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:f})?!0:l.refresh&&!1!==l.refresh.apply(this,
210
- arguments)};var g;this.checkAllowed=function(e){return e||"boolean"!=typeof g?g=a.activeFilter.checkFeature(this):g};CKEDITOR.tools.extend(this,l,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!l.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)},
208
+ "br"==u.getName()&&(!CKEDITOR.env.needsBrFiller||u.getPrevious(m)||u.getNext(m))&&u.remove();this._.nextNode||(this._.nextNode=l||b.equals(r)||!r?null:this._getNextSourceNode(b,1,r));return b},_getNextSourceNode:function(a,b,c){function f(a){return!(a.equals(c)||a.equals(e))}var e=this.range.root;for(a=a.getNextSourceNode(b,null,f);!m(a);)a=a.getNextSourceNode(b,null,f);return a}};CKEDITOR.dom.range.prototype.createIterator=function(){return new a(this)}})();CKEDITOR.command=function(a,l){this.uiItems=
209
+ [];this.exec=function(f){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return!1;this.editorFocus&&a.focus();return!1===this.fire("exec")?!0:!1!==l.exec.call(this,a,f)};this.refresh=function(a,e){if(!this.readOnly&&a.readOnly)return!0;if(this.context&&!e.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:e})?!0:l.refresh&&!1!==l.refresh.apply(this,
210
+ arguments)};var g;this.checkAllowed=function(f){return f||"boolean"!=typeof g?g=a.activeFilter.checkFeature(this):g};CKEDITOR.tools.extend(this,l,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!l.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)},
211
211
  setState:function(a){if(this.state==a||a!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return!1;this.previousState=this.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,
212
- language:"",defaultLanguage:"en",contentsLangDirection:"",enterMode:CKEDITOR.ENTER_P,forceEnterMode:!1,shiftEnterMode:CKEDITOR.ENTER_BR,docType:"\x3c!DOCTYPE html\x3e",bodyId:"",bodyClass:"",fullPage:!1,height:200,contentsCss:CKEDITOR.getUrl("contents.css"),extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,width:"",baseFloatZIndex:999999,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]};(function(){function a(a,b,c,d,e){var f,h;a=[];for(f in b){h=b[f];h="boolean"==
213
- typeof h?{}:"function"==typeof h?{match:h}:K(h);"$"!=f.charAt(0)&&(h.elements=f);c&&(h.featureName=c.toLowerCase());var g=h;g.elements=k(g.elements,/\s+/)||null;g.propertiesOnly=g.propertiesOnly||!0===g.elements;var m=/\s*,\s*/,l=void 0;for(l in M){g[l]=k(g[l],m)||null;var w=g,n=I[l],p=k(g[I[l]],m),v=g[l],F=[],P=!0,q=void 0;p?P=!1:p={};for(q in v)"!"==q.charAt(0)&&(q=q.slice(1),F.push(q),p[q]=!0,P=!1);for(;q=F.pop();)v[q]=v["!"+q],delete v["!"+q];w[n]=(P?!1:p)||null}g.match=g.match||null;d.push(h);
214
- a.push(h)}b=e.elements;e=e.generic;var D;c=0;for(d=a.length;c<d;++c){f=K(a[c]);h=!0===f.classes||!0===f.styles||!0===f.attributes;g=f;l=n=m=void 0;for(m in M)g[m]=y(g[m]);w=!0;for(l in I){m=I[l];n=g[m];p=[];v=void 0;for(v in n)-1<v.indexOf("*")?p.push(new RegExp("^"+v.replace(/\*/g,".*")+"$")):p.push(v);n=p;n.length&&(g[m]=n,w=!1)}g.nothingRequired=w;g.noProperties=!(g.attributes||g.classes||g.styles);if(!0===f.elements||null===f.elements)e[h?"unshift":"push"](f);else for(D in g=f.elements,delete f.elements,
215
- g)if(b[D])b[D][h?"unshift":"push"](f);else b[D]=[f]}}function l(a,b,c,d){if(!a.match||a.match(b))if(d||h(a,b))if(a.propertiesOnly||(c.valid=!0),c.allAttributes||(c.allAttributes=g(a.attributes,b.attributes,c.validAttributes)),c.allStyles||(c.allStyles=g(a.styles,b.styles,c.validStyles)),!c.allClasses){a=a.classes;b=b.classes;d=c.validClasses;if(a)if(!0===a)a=!0;else{for(var e=0,f=b.length,k;e<f;++e)k=b[e],d[k]||(d[k]=a(k));a=!1}else a=!1;c.allClasses=a}}function g(a,b,c){if(!a)return!1;if(!0===a)return!0;
216
- for(var d in b)c[d]||(c[d]=a(d));return!1}function e(a,b,c){if(!a.match||a.match(b)){if(a.noProperties)return!1;c.hadInvalidAttribute=f(a.attributes,b.attributes)||c.hadInvalidAttribute;c.hadInvalidStyle=f(a.styles,b.styles)||c.hadInvalidStyle;a=a.classes;b=b.classes;if(a){for(var d=!1,e=!0===a,h=b.length;h--;)if(e||a(b[h]))b.splice(h,1),d=!0;a=d}else a=!1;c.hadInvalidClass=a||c.hadInvalidClass}}function f(a,b){if(!a)return!1;var c=!1,d=!0===a,e;for(e in b)if(d||a(e))delete b[e],c=!0;return c}function m(a,
217
- b,c){if(a.disabled||a.customConfig&&!c||!b)return!1;a._.cachedChecks={};return!0}function k(a,b){if(!a)return!1;if(!0===a)return a;if("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={},d=0,e;for(e in a)c[e]=a[e],d++;return d?c:!1}function h(a,b){if(a.nothingRequired)return!0;var d,e,f,h;if(f=a.requiredClasses)for(h=b.classes,d=0;d<f.length;++d)if(e=f[d],"string"==
218
- typeof e){if(-1==CKEDITOR.tools.indexOf(h,e))return!1}else if(!CKEDITOR.tools.checkIfAnyArrayItemMatches(h,e))return!1;return c(b.styles,a.requiredStyles)&&c(b.attributes,a.requiredAttributes)}function c(a,b){if(!b)return!0;for(var c=0,d;c<b.length;++c)if(d=b[c],"string"==typeof d){if(!(d in a))return!1}else if(!CKEDITOR.tools.checkIfAnyObjectPropertyMatches(a,d))return!1;return!0}function d(a){if(!a)return{};a=a.split(/\s*,\s*/).sort();for(var b={};a.length;)b[a.shift()]="cke-test";return b}function b(a){var b,
219
- c,d,e,f={},h=1;for(a=H(a);b=a.match(J);)(c=b[2])?(d=n(c,"styles"),e=n(c,"attrs"),c=n(c,"classes")):d=e=c=null,f["$"+h++]={elements:b[1],classes:c,styles:d,attributes:e},a=a.slice(b[0].length);return f}function n(a,b){var c=a.match(F[b]);return c?H(c[1]):null}function q(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 u(a,b,c,d){var f=0,h;d.toHtml&&(b.name=b.name.replace(L,
212
+ language:"",defaultLanguage:"en",contentsLangDirection:"",enterMode:CKEDITOR.ENTER_P,forceEnterMode:!1,shiftEnterMode:CKEDITOR.ENTER_BR,docType:"\x3c!DOCTYPE html\x3e",bodyId:"",bodyClass:"",fullPage:!1,height:200,contentsCss:CKEDITOR.getUrl("contents.css"),extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,width:"",baseFloatZIndex:999999,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]};(function(){function a(a,b,c,d,f){var e,h;a=[];for(e in b){h=b[e];h="boolean"==
213
+ typeof h?{}:"function"==typeof h?{match:h}:K(h);"$"!=e.charAt(0)&&(h.elements=e);c&&(h.featureName=c.toLowerCase());var g=h;g.elements=k(g.elements,/\s+/)||null;g.propertiesOnly=g.propertiesOnly||!0===g.elements;var m=/\s*,\s*/,l=void 0;for(l in M){g[l]=k(g[l],m)||null;var w=g,n=I[l],p=k(g[I[l]],m),v=g[l],F=[],P=!0,q=void 0;p?P=!1:p={};for(q in v)"!"==q.charAt(0)&&(q=q.slice(1),F.push(q),p[q]=!0,P=!1);for(;q=F.pop();)v[q]=v["!"+q],delete v["!"+q];w[n]=(P?!1:p)||null}g.match=g.match||null;d.push(h);
214
+ a.push(h)}b=f.elements;f=f.generic;var D;c=0;for(d=a.length;c<d;++c){e=K(a[c]);h=!0===e.classes||!0===e.styles||!0===e.attributes;g=e;l=n=m=void 0;for(m in M)g[m]=y(g[m]);w=!0;for(l in I){m=I[l];n=g[m];p=[];v=void 0;for(v in n)-1<v.indexOf("*")?p.push(new RegExp("^"+v.replace(/\*/g,".*")+"$")):p.push(v);n=p;n.length&&(g[m]=n,w=!1)}g.nothingRequired=w;g.noProperties=!(g.attributes||g.classes||g.styles);if(!0===e.elements||null===e.elements)f[h?"unshift":"push"](e);else for(D in g=e.elements,delete e.elements,
215
+ g)if(b[D])b[D][h?"unshift":"push"](e);else b[D]=[e]}}function l(a,b,c,d){if(!a.match||a.match(b))if(d||h(a,b))if(a.propertiesOnly||(c.valid=!0),c.allAttributes||(c.allAttributes=g(a.attributes,b.attributes,c.validAttributes)),c.allStyles||(c.allStyles=g(a.styles,b.styles,c.validStyles)),!c.allClasses){a=a.classes;b=b.classes;d=c.validClasses;if(a)if(!0===a)a=!0;else{for(var f=0,e=b.length,k;f<e;++f)k=b[f],d[k]||(d[k]=a(k));a=!1}else a=!1;c.allClasses=a}}function g(a,b,c){if(!a)return!1;if(!0===a)return!0;
216
+ for(var d in b)c[d]||(c[d]=a(d));return!1}function f(a,b,c){if(!a.match||a.match(b)){if(a.noProperties)return!1;c.hadInvalidAttribute=e(a.attributes,b.attributes)||c.hadInvalidAttribute;c.hadInvalidStyle=e(a.styles,b.styles)||c.hadInvalidStyle;a=a.classes;b=b.classes;if(a){for(var d=!1,f=!0===a,h=b.length;h--;)if(f||a(b[h]))b.splice(h,1),d=!0;a=d}else a=!1;c.hadInvalidClass=a||c.hadInvalidClass}}function e(a,b){if(!a)return!1;var c=!1,d=!0===a,f;for(f in b)if(d||a(f))delete b[f],c=!0;return c}function m(a,
217
+ b,c){if(a.disabled||a.customConfig&&!c||!b)return!1;a._.cachedChecks={};return!0}function k(a,b){if(!a)return!1;if(!0===a)return a;if("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={},d=0,f;for(f in a)c[f]=a[f],d++;return d?c:!1}function h(a,b){if(a.nothingRequired)return!0;var d,f,e,h;if(e=a.requiredClasses)for(h=b.classes,d=0;d<e.length;++d)if(f=e[d],"string"==
218
+ typeof f){if(-1==CKEDITOR.tools.indexOf(h,f))return!1}else if(!CKEDITOR.tools.checkIfAnyArrayItemMatches(h,f))return!1;return c(b.styles,a.requiredStyles)&&c(b.attributes,a.requiredAttributes)}function c(a,b){if(!b)return!0;for(var c=0,d;c<b.length;++c)if(d=b[c],"string"==typeof d){if(!(d in a))return!1}else if(!CKEDITOR.tools.checkIfAnyObjectPropertyMatches(a,d))return!1;return!0}function d(a){if(!a)return{};a=a.split(/\s*,\s*/).sort();for(var b={};a.length;)b[a.shift()]="cke-test";return b}function b(a){var b,
219
+ c,d,f,e={},h=1;for(a=H(a);b=a.match(J);)(c=b[2])?(d=n(c,"styles"),f=n(c,"attrs"),c=n(c,"classes")):d=f=c=null,e["$"+h++]={elements:b[1],classes:c,styles:d,attributes:f},a=a.slice(b[0].length);return e}function n(a,b){var c=a.match(F[b]);return c?H(c[1]):null}function q(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 u(a,b,c,d){var e=0,h;d.toHtml&&(b.name=b.name.replace(L,
220
220
  "$1"));if(d.doCallbacks&&a.elementCallbacks){a:{h=a.elementCallbacks;for(var k=0,g=h.length,m;k<g;++k)if(m=h[k](b)){h=m;break a}h=void 0}if(h)return h}if(d.doTransform&&(h=a._.transformations[b.name])){q(b);for(k=0;k<h.length;++k)w(a,b,h[k]);r(b)}if(d.doFilter){a:{k=b.name;g=a._;a=g.allowedRules.elements[k];h=g.allowedRules.generic;k=g.disallowedRules.elements[k];g=g.disallowedRules.generic;m=d.skipRequired;var n={valid:!1,validAttributes:{},validClasses:{},validStyles:{},allAttributes:!1,allClasses:!1,
221
- allStyles:!1,hadInvalidAttribute:!1,hadInvalidClass:!1,hadInvalidStyle:!1},v,F;if(a||h){q(b);if(k)for(v=0,F=k.length;v<F;++v)if(!1===e(k[v],b,n)){a=null;break a}if(g)for(v=0,F=g.length;v<F;++v)e(g[v],b,n);if(a)for(v=0,F=a.length;v<F;++v)l(a[v],b,n,m);if(h)for(v=0,F=h.length;v<F;++v)l(h[v],b,n,m);a=n}else a=null}if(!a||!a.valid)return c.push(b),1;F=a.validAttributes;var y=a.validStyles;h=a.validClasses;var k=b.attributes,D=b.styles,g=b.classes;m=b.classBackup;var x=b.styleBackup,H,G,C=[],n=[],u=/^data-cke-/;
221
+ allStyles:!1,hadInvalidAttribute:!1,hadInvalidClass:!1,hadInvalidStyle:!1},v,F;if(a||h){q(b);if(k)for(v=0,F=k.length;v<F;++v)if(!1===f(k[v],b,n)){a=null;break a}if(g)for(v=0,F=g.length;v<F;++v)f(g[v],b,n);if(a)for(v=0,F=a.length;v<F;++v)l(a[v],b,n,m);if(h)for(v=0,F=h.length;v<F;++v)l(h[v],b,n,m);a=n}else a=null}if(!a||!a.valid)return c.push(b),1;F=a.validAttributes;var y=a.validStyles;h=a.validClasses;var k=b.attributes,D=b.styles,g=b.classes;m=b.classBackup;var x=b.styleBackup,H,G,C=[],n=[],u=/^data-cke-/;
222
222
  v=!1;delete k.style;delete k["class"];delete b.classBackup;delete b.styleBackup;if(!a.allAttributes)for(H in k)F[H]||(u.test(H)?H==(G=H.replace(/^data-cke-saved-/,""))||F[G]||(delete k[H],v=!0):(delete k[H],v=!0));if(!a.allStyles||a.hadInvalidStyle){for(H in D)a.allStyles||y[H]?C.push(H+":"+D[H]):v=!0;C.length&&(k.style=C.sort().join("; "))}else x&&(k.style=x);if(!a.allClasses||a.hadInvalidClass){for(H=0;H<g.length;++H)(a.allClasses||h[g[H]])&&n.push(g[H]);n.length&&(k["class"]=n.sort().join(" "));
223
- m&&n.length<m.split(/\s+/).length&&(v=!0)}else m&&(k["class"]=m);v&&(f=1);if(!d.skipFinalValidation&&!p(b))return c.push(b),1}d.toHtml&&(b.name=b.name.replace(P,"cke:$1"));return f}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 r(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(" "))}
223
+ m&&n.length<m.split(/\s+/).length&&(v=!0)}else m&&(k["class"]=m);v&&(e=1);if(!d.skipFinalValidation&&!p(b))return c.push(b),1}d.toHtml&&(b.name=b.name.replace(P,"cke:$1"));return e}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 r(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(" "))}
224
224
  function p(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}function y(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 x(){return new CKEDITOR.htmlParser.element("br")}function z(a){return a.type==CKEDITOR.NODE_ELEMENT&&("br"==a.name||G.$block[a.name])}function B(a,b,c){var d=a.name;if(G.$empty[d]||!a.children.length)"hr"==d&&"br"==b?a.replaceWith(x()):
225
- (a.parent&&c.push({check:"it",el:a.parent}),a.remove());else if(G.$block[d]||"tr"==d)if("br"==b)a.previous&&!z(a.previous)&&(b=x(),b.insertBefore(a)),a.next&&!z(a.next)&&(b=x(),b.insertAfter(a)),a.replaceWithChildren();else{var d=a.children,e;b:{e=G[b];for(var f=0,h=d.length,k;f<h;++f)if(k=d[f],k.type==CKEDITOR.NODE_ELEMENT&&!e[k.name]){e=!1;break b}e=!0}if(e)a.name=b,a.attributes={},c.push({check:"parent-down",el:a});else{e=a.parent;for(var f=e.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||"body"==e.name,
226
- g,m,h=d.length;0<h;)k=d[--h],f&&(k.type==CKEDITOR.NODE_TEXT||k.type==CKEDITOR.NODE_ELEMENT&&G.$inline[k.name])?(g||(g=new CKEDITOR.htmlParser.element(b),g.insertAfter(a),c.push({check:"parent-down",el:g})),g.add(k,0)):(g=null,m=G[e.name]||G.span,k.insertAfter(a),e.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||k.type!=CKEDITOR.NODE_ELEMENT||m[k.name]||c.push({check:"el-up",el:k}));a.remove()}}else d in{style:1,script:1}?a.remove():(a.parent&&c.push({check:"it",el:a.parent}),a.replaceWithChildren())}function w(a,
227
- b,c){var d,e;for(d=0;d<c.length;++d)if(e=c[d],!(e.check&&!a.check(e.check,!1)||e.left&&!e.left(b))){e.right(b,N);break}}function v(a,b){var c=b.getDefinition(),d=c.attributes,e=c.styles,f,h,k,g;if(a.name!=c.element)return!1;for(f in d)if("class"==f)for(c=d[f].split(/\s+/),k=a.classes.join("|");g=c.pop();){if(-1==k.indexOf(g))return!1}else if(a.attributes[f]!=d[f])return!1;for(h in e)if(a.styles[h]!=e[h])return!1;return!0}function D(a,b){var c,d;"string"==typeof a?c=a:a instanceof CKEDITOR.style?d=
225
+ (a.parent&&c.push({check:"it",el:a.parent}),a.remove());else if(G.$block[d]||"tr"==d)if("br"==b)a.previous&&!z(a.previous)&&(b=x(),b.insertBefore(a)),a.next&&!z(a.next)&&(b=x(),b.insertAfter(a)),a.replaceWithChildren();else{var d=a.children,f;b:{f=G[b];for(var e=0,h=d.length,k;e<h;++e)if(k=d[e],k.type==CKEDITOR.NODE_ELEMENT&&!f[k.name]){f=!1;break b}f=!0}if(f)a.name=b,a.attributes={},c.push({check:"parent-down",el:a});else{f=a.parent;for(var e=f.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||"body"==f.name,
226
+ g,m,h=d.length;0<h;)k=d[--h],e&&(k.type==CKEDITOR.NODE_TEXT||k.type==CKEDITOR.NODE_ELEMENT&&G.$inline[k.name])?(g||(g=new CKEDITOR.htmlParser.element(b),g.insertAfter(a),c.push({check:"parent-down",el:g})),g.add(k,0)):(g=null,m=G[f.name]||G.span,k.insertAfter(a),f.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||k.type!=CKEDITOR.NODE_ELEMENT||m[k.name]||c.push({check:"el-up",el:k}));a.remove()}}else d in{style:1,script:1}?a.remove():(a.parent&&c.push({check:"it",el:a.parent}),a.replaceWithChildren())}function w(a,
227
+ b,c){var d,f;for(d=0;d<c.length;++d)if(f=c[d],!(f.check&&!a.check(f.check,!1)||f.left&&!f.left(b))){f.right(b,N);break}}function v(a,b){var c=b.getDefinition(),d=c.attributes,f=c.styles,e,h,k,g;if(a.name!=c.element)return!1;for(e in d)if("class"==e)for(c=d[e].split(/\s+/),k=a.classes.join("|");g=c.pop();){if(-1==k.indexOf(g))return!1}else if(a.attributes[e]!=d[e])return!1;for(h in f)if(a.styles[h]!=f[h])return!1;return!0}function D(a,b){var c,d;"string"==typeof a?c=a:a instanceof CKEDITOR.style?d=
228
228
  a:(c=a[0],d=a[1]);return[{element:c,left:d,right:function(a,c){c.transform(a,b)}}]}function C(a){return function(b){return v(b,a)}}function A(a){return function(b,c){c[a](b)}}var G=CKEDITOR.dtd,K=CKEDITOR.tools.copy,H=CKEDITOR.tools.trim,E=["","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:{},
229
229
  generic:[]},disallowedRules:{elements:{},generic:[]},transformations:{},cachedTests:{},cachedChecks:{}};CKEDITOR.filter.instances[this.id]=this;var c=this.editor=a instanceof CKEDITOR.editor?a:null;if(c&&!b){this.customConfig=!0;var d=c.config.allowedContent;!0===d?this.disabled=!0:(d||(this.customConfig=!1),this.allow(d,"config",1),this.allow(c.config.extraAllowedContent,"extra",1),this.allow(E[c.enterMode]+" "+E[c.shiftEnterMode],"default",1),this.disallow(c.config.disallowedContent))}else this.customConfig=
230
- !1,this.allow(b||a,"default",1)};CKEDITOR.filter.instances={};CKEDITOR.filter.prototype={allow:function(c,d,e){if(!m(this,c,e))return!1;var f,h;if("string"==typeof c)c=b(c);else if(c instanceof CKEDITOR.style){if(c.toAllowedContentRules)return this.allow(c.toAllowedContentRules(this.editor),d,e);f=c.getDefinition();c={};e=f.attributes;c[f.element]=f={styles:f.styles,requiredStyles:f.styles&&CKEDITOR.tools.object.keys(f.styles)};e&&(e=K(e),f.classes=e["class"]?e["class"].split(/\s+/):null,f.requiredClasses=
231
- f.classes,delete e["class"],f.attributes=e,f.requiredAttributes=e&&CKEDITOR.tools.object.keys(e))}else if(CKEDITOR.tools.isArray(c)){for(f=0;f<c.length;++f)h=this.allow(c[f],d,e);return h}a(this,c,d,this.allowedContent,this._.allowedRules);return!0},applyTo:function(a,b,c,d){if(this.disabled)return!1;var e=this,f=[],h=this.editor&&this.editor.config.protectedSource,k,g=!1,m={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;
232
- if(!b||"span"!=a.name||!~CKEDITOR.tools.object.keys(a.attributes).join("|").indexOf("data-cke-"))if(k=u(e,a,f,m),k&1)g=!0;else if(k&2)return!1}else if(a.type==CKEDITOR.NODE_COMMENT&&a.value.match(/^\{cke_protected\}(?!\{C\})/)){var c;a:{var d=decodeURIComponent(a.value.replace(/^\{cke_protected\}/,""));c=[];var l,n,w;if(h)for(n=0;n<h.length;++n)if((w=d.match(h[n]))&&w[0].length==d.length){c=!0;break a}d=CKEDITOR.htmlParser.fragment.fromHtml(d);1==d.children.length&&(l=d.children[0]).type==CKEDITOR.NODE_ELEMENT&&
233
- u(e,l,c,m);c=!c.length}c||f.push(a)}},null,!0);f.length&&(g=!0);var l;a=[];d=E[d||(this.editor?this.editor.enterMode:CKEDITOR.ENTER_P)];for(var n;c=f.pop();)c.type==CKEDITOR.NODE_ELEMENT?B(c,d,a):c.remove();for(;l=a.pop();)if(c=l.el,c.parent)switch(n=G[c.parent.name]||G.span,l.check){case "it":G.$removeEmpty[c.name]&&!c.children.length?B(c,d,a):p(c)||B(c,d,a);break;case "el-up":c.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||n[c.name]||B(c,d,a);break;case "parent-down":c.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||
234
- n[c.name]||B(c.parent,d,a)}return g},checkFeature:function(a){if(this.disabled||!a)return!0;a.toFeature&&(a=a.toFeature(this.editor));return!a.requiredContent||this.check(a.requiredContent)},disable:function(){this.disabled=!0},disallow:function(c){if(!m(this,c,!0))return!1;"string"==typeof c&&(c=b(c));a(this,c,null,this.disallowedContent,this._.disallowedRules);return!0},addContentForms:function(a){if(!this.disabled&&a){var b,c,d=[],e;for(b=0;b<a.length&&!e;++b)c=a[b],("string"==typeof c||c instanceof
235
- CKEDITOR.style)&&this.check(c)&&(e=c);if(e){for(b=0;b<a.length;++b)d.push(D(a[b],e));this.addTransformations(d)}}},addElementCallback:function(a){this.elementCallbacks||(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)?
236
- this.check(a.requiredContent):!0},addTransformations:function(a){var b,c;if(!this.disabled&&a){var d=this._.transformations,e;for(e=0;e<a.length;++e){b=a[e];var f=void 0,h=void 0,k=void 0,g=void 0,m=void 0,l=void 0;c=[];for(h=0;h<b.length;++h)k=b[h],"string"==typeof k?(k=k.split(/\s*:\s*/),g=k[0],m=null,l=k[1]):(g=k.check,m=k.left,l=k.right),f||(f=k,f=f.element?f.element:g?g.match(/^([a-z0-9]+)/i)[0]:f.left.getDefinition().element),m instanceof CKEDITOR.style&&(m=C(m)),c.push({check:g==f?null:g,left:m,
237
- right:"string"==typeof l?A(l):l});b=f;d[b]||(d[b]=[]);d[b].push(c)}}},check:function(a,c,e){if(this.disabled)return!0;if(CKEDITOR.tools.isArray(a)){for(var f=a.length;f--;)if(this.check(a[f],c,e))return!0;return!1}var h,k;if("string"==typeof a){k=a+"\x3c"+(!1===c?"0":"1")+(e?"1":"0")+"\x3e";if(k in this._.cachedChecks)return this._.cachedChecks[k];h=b(a).$1;var g=h.styles,f=h.classes;h.name=h.elements;h.classes=f=f?f.split(/\s*,\s*/):[];h.styles=d(g);h.attributes=d(h.attributes);h.children=[];f.length&&
238
- (h.attributes["class"]=f.join(" "));g&&(h.attributes.style=CKEDITOR.tools.writeCssText(h.styles))}else h=a.getDefinition(),g=h.styles,f=h.attributes||{},g&&!CKEDITOR.tools.isEmpty(g)?(g=K(g),f.style=CKEDITOR.tools.writeCssText(g,!0)):g={},h={name:h.element,attributes:f,classes:f["class"]?f["class"].split(/\s+/):[],styles:g,children:[]};var g=CKEDITOR.tools.clone(h),m=[],l;if(!1!==c&&(l=this._.transformations[h.name])){for(f=0;f<l.length;++f)w(this,h,l[f]);r(h)}u(this,g,m,{doFilter:!0,doTransform:!1!==
239
- c,skipRequired:!e,skipFinalValidation:!e});0<m.length?e=!1:((c=h.attributes["class"])&&(h.attributes["class"]=h.attributes["class"].split(" ").sort().join(" ")),e=CKEDITOR.tools.objectCompare(h.attributes,g.attributes,!0),c&&(h.attributes["class"]=c));"string"==typeof a&&(this._.cachedChecks[k]=e);return e},getAllowedEnterMode:function(){var a=["p","div","br"],b={p:CKEDITOR.ENTER_P,div:CKEDITOR.ENTER_DIV,br:CKEDITOR.ENTER_BR};return function(c,d){var e=a.slice(),f;if(this.check(E[c]))return c;for(d||
240
- (e=e.reverse());f=e.pop();)if(this.check(f))return b[f];return CKEDITOR.ENTER_BR}}(),clone:function(){var a=new CKEDITOR.filter,b=CKEDITOR.tools.clone;a.allowedContent=b(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;
230
+ !1,this.allow(b||a,"default",1)};CKEDITOR.filter.instances={};CKEDITOR.filter.prototype={allow:function(c,d,f){if(!m(this,c,f))return!1;var e,h;if("string"==typeof c)c=b(c);else if(c instanceof CKEDITOR.style){if(c.toAllowedContentRules)return this.allow(c.toAllowedContentRules(this.editor),d,f);e=c.getDefinition();c={};f=e.attributes;c[e.element]=e={styles:e.styles,requiredStyles:e.styles&&CKEDITOR.tools.object.keys(e.styles)};f&&(f=K(f),e.classes=f["class"]?f["class"].split(/\s+/):null,e.requiredClasses=
231
+ e.classes,delete f["class"],e.attributes=f,e.requiredAttributes=f&&CKEDITOR.tools.object.keys(f))}else if(CKEDITOR.tools.isArray(c)){for(e=0;e<c.length;++e)h=this.allow(c[e],d,f);return h}a(this,c,d,this.allowedContent,this._.allowedRules);return!0},applyTo:function(a,b,c,d){if(this.disabled)return!1;var f=this,e=[],h=this.editor&&this.editor.config.protectedSource,k,g=!1,m={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;
232
+ if(!b||"span"!=a.name||!~CKEDITOR.tools.object.keys(a.attributes).join("|").indexOf("data-cke-"))if(k=u(f,a,e,m),k&1)g=!0;else if(k&2)return!1}else if(a.type==CKEDITOR.NODE_COMMENT&&a.value.match(/^\{cke_protected\}(?!\{C\})/)){var c;a:{var d=decodeURIComponent(a.value.replace(/^\{cke_protected\}/,""));c=[];var l,n,w;if(h)for(n=0;n<h.length;++n)if((w=d.match(h[n]))&&w[0].length==d.length){c=!0;break a}d=CKEDITOR.htmlParser.fragment.fromHtml(d);1==d.children.length&&(l=d.children[0]).type==CKEDITOR.NODE_ELEMENT&&
233
+ u(f,l,c,m);c=!c.length}c||e.push(a)}},null,!0);e.length&&(g=!0);var l;a=[];d=E[d||(this.editor?this.editor.enterMode:CKEDITOR.ENTER_P)];for(var n;c=e.pop();)c.type==CKEDITOR.NODE_ELEMENT?B(c,d,a):c.remove();for(;l=a.pop();)if(c=l.el,c.parent)switch(n=G[c.parent.name]||G.span,l.check){case "it":G.$removeEmpty[c.name]&&!c.children.length?B(c,d,a):p(c)||B(c,d,a);break;case "el-up":c.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||n[c.name]||B(c,d,a);break;case "parent-down":c.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||
234
+ n[c.name]||B(c.parent,d,a)}return g},checkFeature:function(a){if(this.disabled||!a)return!0;a.toFeature&&(a=a.toFeature(this.editor));return!a.requiredContent||this.check(a.requiredContent)},disable:function(){this.disabled=!0},disallow:function(c){if(!m(this,c,!0))return!1;"string"==typeof c&&(c=b(c));a(this,c,null,this.disallowedContent,this._.disallowedRules);return!0},addContentForms:function(a){if(!this.disabled&&a){var b,c,d=[],f;for(b=0;b<a.length&&!f;++b)c=a[b],("string"==typeof c||c instanceof
235
+ CKEDITOR.style)&&this.check(c)&&(f=c);if(f){for(b=0;b<a.length;++b)d.push(D(a[b],f));this.addTransformations(d)}}},addElementCallback:function(a){this.elementCallbacks||(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)?
236
+ this.check(a.requiredContent):!0},addTransformations:function(a){var b,c;if(!this.disabled&&a){var d=this._.transformations,f;for(f=0;f<a.length;++f){b=a[f];var e=void 0,h=void 0,k=void 0,g=void 0,m=void 0,l=void 0;c=[];for(h=0;h<b.length;++h)k=b[h],"string"==typeof k?(k=k.split(/\s*:\s*/),g=k[0],m=null,l=k[1]):(g=k.check,m=k.left,l=k.right),e||(e=k,e=e.element?e.element:g?g.match(/^([a-z0-9]+)/i)[0]:e.left.getDefinition().element),m instanceof CKEDITOR.style&&(m=C(m)),c.push({check:g==e?null:g,left:m,
237
+ right:"string"==typeof l?A(l):l});b=e;d[b]||(d[b]=[]);d[b].push(c)}}},check:function(a,c,f){if(this.disabled)return!0;if(CKEDITOR.tools.isArray(a)){for(var e=a.length;e--;)if(this.check(a[e],c,f))return!0;return!1}var h,k;if("string"==typeof a){k=a+"\x3c"+(!1===c?"0":"1")+(f?"1":"0")+"\x3e";if(k in this._.cachedChecks)return this._.cachedChecks[k];h=b(a).$1;var g=h.styles,e=h.classes;h.name=h.elements;h.classes=e=e?e.split(/\s*,\s*/):[];h.styles=d(g);h.attributes=d(h.attributes);h.children=[];e.length&&
238
+ (h.attributes["class"]=e.join(" "));g&&(h.attributes.style=CKEDITOR.tools.writeCssText(h.styles))}else h=a.getDefinition(),g=h.styles,e=h.attributes||{},g&&!CKEDITOR.tools.isEmpty(g)?(g=K(g),e.style=CKEDITOR.tools.writeCssText(g,!0)):g={},h={name:h.element,attributes:e,classes:e["class"]?e["class"].split(/\s+/):[],styles:g,children:[]};var g=CKEDITOR.tools.clone(h),m=[],l;if(!1!==c&&(l=this._.transformations[h.name])){for(e=0;e<l.length;++e)w(this,h,l[e]);r(h)}u(this,g,m,{doFilter:!0,doTransform:!1!==
239
+ c,skipRequired:!f,skipFinalValidation:!f});0<m.length?f=!1:((c=h.attributes["class"])&&(h.attributes["class"]=h.attributes["class"].split(" ").sort().join(" ")),f=CKEDITOR.tools.objectCompare(h.attributes,g.attributes,!0),c&&(h.attributes["class"]=c));"string"==typeof a&&(this._.cachedChecks[k]=f);return f},getAllowedEnterMode:function(){var a=["p","div","br"],b={p:CKEDITOR.ENTER_P,div:CKEDITOR.ENTER_DIV,br:CKEDITOR.ENTER_BR};return function(c,d){var f=a.slice(),e;if(this.check(E[c]))return c;for(d||
240
+ (f=f.reverse());e=f.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=b(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;
241
241
  delete this.disallowedContent}};var M={styles:1,attributes:1,classes:1},I={styles:"requiredStyles",attributes:"requiredAttributes",classes:"requiredClasses"},J=/^([a-z0-9\-*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,F={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},L=/^cke:(object|embed|param)$/,P=/^(object|embed|param)$/,N;N=CKEDITOR.filter.transformationsTools={sizeToStyle:function(a){this.lengthToStyle(a,"width");this.lengthToStyle(a,
242
- "height")},sizeToAttribute:function(a){this.lengthToAttribute(a,"width");this.lengthToAttribute(a,"height")},lengthToStyle:function(a,b,c){c=c||b;if(!(c in a.styles)){var d=a.attributes[b];d&&(/^\d+$/.test(d)&&(d+="px"),a.styles[c]=d)}delete a.attributes[b]},lengthToAttribute:function(a,b,c){c=c||b;if(!(c in a.attributes)){var d=a.styles[b],e=d&&d.match(/^(\d+)(?:\.\d*)?px$/);e?a.attributes[c]=e[1]:"cke-test"==d&&(a.attributes[c]="cke-test")}delete a.styles[b]},alignmentToStyle:function(a){if(!("float"in
242
+ "height")},sizeToAttribute:function(a){this.lengthToAttribute(a,"width");this.lengthToAttribute(a,"height")},lengthToStyle:function(a,b,c){c=c||b;if(!(c in a.styles)){var d=a.attributes[b];d&&(/^\d+$/.test(d)&&(d+="px"),a.styles[c]=d)}delete a.attributes[b]},lengthToAttribute:function(a,b,c){c=c||b;if(!(c in a.attributes)){var d=a.styles[b],f=d&&d.match(/^(\d+)(?:\.\d*)?px$/);f?a.attributes[c]=f[1]:"cke-test"==d&&(a.attributes[c]="cke-test")}delete a.styles[b]},alignmentToStyle:function(a){if(!("float"in
243
243
  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 a.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);
244
244
  delete a.styles.border}},listTypeToStyle:function(a){if(a.attributes.type)switch(a.attributes.type){case "a":a.styles["list-style-type"]="lower-alpha";break;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(d){a.styles["margin-top"]=
245
- c[d[0]];a.styles["margin-right"]=c[d[1]];a.styles["margin-bottom"]=c[d[2]];a.styles["margin-left"]=c[d[3]]}if(a.styles.margin){var c=a.styles.margin.match(/(\-?[\.\d]+\w+)/g)||["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:v,transform:function(a,b){if("string"==typeof b)a.name=b;else{var c=b.getDefinition(),d=c.styles,e=c.attributes,f,h,k,g;a.name=c.element;for(f in e)if("class"==f)for(c=
246
- a.classes.join("|"),k=e[f].split(/\s+/);g=k.pop();)-1==c.indexOf(g)&&a.classes.push(g);else a.attributes[f]=e[f];for(h in d)a.styles[h]=d[h]}}}})();(function(){CKEDITOR.focusManager=function(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)&&
245
+ c[d[0]];a.styles["margin-right"]=c[d[1]];a.styles["margin-bottom"]=c[d[2]];a.styles["margin-left"]=c[d[3]]}if(a.styles.margin){var c=a.styles.margin.match(/(\-?[\.\d]+\w+)/g)||["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:v,transform:function(a,b){if("string"==typeof b)a.name=b;else{var c=b.getDefinition(),d=c.styles,f=c.attributes,e,h,k,g;a.name=c.element;for(e in f)if("class"==e)for(c=
246
+ a.classes.join("|"),k=f[e].split(/\s+/);g=k.pop();)-1==c.indexOf(g)&&a.classes.push(g);else a.attributes[e]=f[e];for(h in d)a.styles[h]=d[h]}}}})();(function(){CKEDITOR.focusManager=function(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)&&
247
247
  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},blur:function(a){function l(){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 g=CKEDITOR.focusManager._.blurDelay;a||!g?l.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer;
248
- l.call(this)},g,this)}},add:function(a,l){var g=a.getCustomData("focusmanager");if(!g||g!=this){g&&g.remove(a);var g="focus",e="blur";l&&(CKEDITOR.env.ie?(g="focusin",e="focusout"):CKEDITOR.event.useCapture=1);var f={blur:function(){a.equals(this.currentActive)&&this.blur()},focus:function(){this.focus(a)}};a.on(g,f.focus,this);a.on(e,f.blur,this);l&&(CKEDITOR.event.useCapture=0);a.setCustomData("focusmanager",this);a.setCustomData("focusmanager_handlers",f)}},remove:function(a){a.removeCustomData("focusmanager");
249
- var l=a.removeCustomData("focusmanager_handlers");a.removeListener("blur",l.blur);a.removeListener("focus",l.focus)}}})();CKEDITOR.keystrokeHandler=function(a){if(a.keystrokeHandler)return a.keystrokeHandler;this.keystrokes={};this.blockedKeystrokes={};this._={editor:a};return this};(function(){var a,l=function(e){e=e.data;var f=e.getKeystroke(),g=this.keystrokes[f],k=this._.editor;a=!1===k.fire("key",{keyCode:f,domEvent:e});a||(g&&(a=!1!==k.execCommand(g,{from:"keystrokeHandler"})),a||(a=!!this.blockedKeystrokes[f]));
250
- a&&e.preventDefault(!0);return!a},g=function(e){a&&(a=!1,e.data.preventDefault(!0))};CKEDITOR.keystrokeHandler.prototype={attach:function(a){a.on("keydown",l,this);if(CKEDITOR.env.gecko&&CKEDITOR.env.mac)a.on("keypress",g,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,
251
- 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,ku:1,ug:1},load:function(a,l,g){a&&CKEDITOR.lang.languages[a]||(a=this.detect(l,a));var e=this;l=function(){e[a].dir=e.rtl[a]?"rtl":"ltr";g(a,e[a])};this[a]?l():CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+a+".js"),l,this)},detect:function(a,l){var g=this.languages;l=l||navigator.userLanguage||navigator.language||
252
- a;var e=l.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),f=e[1],e=e[2];g[f+"-"+e]?f=f+"-"+e:g[f]||(f=null);CKEDITOR.lang.detect=f?function(){return f}:function(a){return a};return f||a}}})();CKEDITOR.scriptLoader=function(){var a={},l={};return{load:function(g,e,f,m){var k="string"==typeof g;k&&(g=[g]);f||(f=CKEDITOR);var h=g.length,c=[],d=[],b=function(a){e&&(k?e.call(f,a):e.call(f,c,d))};if(0===h)b(!0);else{var n=function(a,e){(e?c:d).push(a);0>=--h&&(m&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),
253
- b(e))},q=function(b,c){a[b]=1;var d=l[b];delete l[b];for(var e=0;e<d.length;e++)d[e](b,c)},u=function(b){if(a[b])n(b,!0);else{var c=l[b]||(l[b]=[]);c.push(n);if(!(1<c.length)){var d=new CKEDITOR.dom.element("script");d.setAttributes({type:"text/javascript",src:b});e&&(CKEDITOR.env.ie&&(8>=CKEDITOR.env.version||CKEDITOR.env.ie9Compat)?d.$.onreadystatechange=function(){if("loaded"==d.$.readyState||"complete"==d.$.readyState)d.$.onreadystatechange=null,q(b,!0)}:(d.$.onload=function(){setTimeout(function(){d.$.onload=
254
- null;d.$.onerror=null;q(b,!0)},0)},d.$.onerror=function(){d.$.onload=null;d.$.onerror=null;q(b,!1)}));d.appendTo(CKEDITOR.document.getHead())}}};m&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var t=0;t<h;t++)u(g[t])}},queue:function(){function a(){var f;(f=e[0])&&this.load(f.scriptUrl,f.callback,CKEDITOR,0)}var e=[];return function(f,m){var k=this;e.push({scriptUrl:f,callback:function(){m&&m.apply(this,arguments);e.shift();a.call(k)}});1==e.length&&a.call(this)}}()}}();CKEDITOR.resourceManager=
248
+ l.call(this)},g,this)}},add:function(a,l){var g=a.getCustomData("focusmanager");if(!g||g!=this){g&&g.remove(a);var g="focus",f="blur";l&&(CKEDITOR.env.ie?(g="focusin",f="focusout"):CKEDITOR.event.useCapture=1);var e={blur:function(){a.equals(this.currentActive)&&this.blur()},focus:function(){this.focus(a)}};a.on(g,e.focus,this);a.on(f,e.blur,this);l&&(CKEDITOR.event.useCapture=0);a.setCustomData("focusmanager",this);a.setCustomData("focusmanager_handlers",e)}},remove:function(a){a.removeCustomData("focusmanager");
249
+ var l=a.removeCustomData("focusmanager_handlers");a.removeListener("blur",l.blur);a.removeListener("focus",l.focus)}}})();CKEDITOR.keystrokeHandler=function(a){if(a.keystrokeHandler)return a.keystrokeHandler;this.keystrokes={};this.blockedKeystrokes={};this._={editor:a};return this};(function(){var a,l=function(f){f=f.data;var e=f.getKeystroke(),g=this.keystrokes[e],k=this._.editor;a=!1===k.fire("key",{keyCode:e,domEvent:f});a||(g&&(a=!1!==k.execCommand(g,{from:"keystrokeHandler"})),a||(a=!!this.blockedKeystrokes[e]));
250
+ a&&f.preventDefault(!0);return!a},g=function(f){a&&(a=!1,f.data.preventDefault(!0))};CKEDITOR.keystrokeHandler.prototype={attach:function(a){a.on("keydown",l,this);if(CKEDITOR.env.gecko&&CKEDITOR.env.mac)a.on("keypress",g,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,
251
+ 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,ku:1,ug:1},load:function(a,l,g){a&&CKEDITOR.lang.languages[a]||(a=this.detect(l,a));var f=this;l=function(){f[a].dir=f.rtl[a]?"rtl":"ltr";g(a,f[a])};this[a]?l():CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+a+".js"),l,this)},detect:function(a,l){var g=this.languages;l=l||navigator.userLanguage||navigator.language||
252
+ a;var f=l.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),e=f[1],f=f[2];g[e+"-"+f]?e=e+"-"+f:g[e]||(e=null);CKEDITOR.lang.detect=e?function(){return e}:function(a){return a};return e||a}}})();CKEDITOR.scriptLoader=function(){var a={},l={};return{load:function(g,f,e,m){var k="string"==typeof g;k&&(g=[g]);e||(e=CKEDITOR);var h=g.length,c=[],d=[],b=function(a){f&&(k?f.call(e,a):f.call(e,c,d))};if(0===h)b(!0);else{var n=function(a,f){(f?c:d).push(a);0>=--h&&(m&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),
253
+ b(f))},q=function(b,c){a[b]=1;var d=l[b];delete l[b];for(var f=0;f<d.length;f++)d[f](b,c)},u=function(b){if(a[b])n(b,!0);else{var c=l[b]||(l[b]=[]);c.push(n);if(!(1<c.length)){var d=new CKEDITOR.dom.element("script");d.setAttributes({type:"text/javascript",src:b});f&&(CKEDITOR.env.ie&&(8>=CKEDITOR.env.version||CKEDITOR.env.ie9Compat)?d.$.onreadystatechange=function(){if("loaded"==d.$.readyState||"complete"==d.$.readyState)d.$.onreadystatechange=null,q(b,!0)}:(d.$.onload=function(){setTimeout(function(){d.$.onload=
254
+ null;d.$.onerror=null;q(b,!0)},0)},d.$.onerror=function(){d.$.onload=null;d.$.onerror=null;q(b,!1)}));d.appendTo(CKEDITOR.document.getHead())}}};m&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var t=0;t<h;t++)u(g[t])}},queue:function(){function a(){var e;(e=f[0])&&this.load(e.scriptUrl,e.callback,CKEDITOR,0)}var f=[];return function(e,m){var k=this;f.push({scriptUrl:e,callback:function(){m&&m.apply(this,arguments);f.shift();a.call(k)}});1==f.length&&a.call(this)}}()}}();CKEDITOR.resourceManager=
255
255
  function(a,l){this.basePath=a;this.fileName=l;this.registered={};this.loaded={};this.externals={};this._={waitingList:{}}};CKEDITOR.resourceManager.prototype={add:function(a,l){if(this.registered[a])throw Error('[CKEDITOR.resourceManager.add] The resource name "'+a+'" is already registered.');var g=this.registered[a]=l||{};g.name=a;g.path=this.getPath(a);CKEDITOR.fire(a+CKEDITOR.tools.capitalize(this.fileName)+"Ready",g);return this.get(a)},get:function(a){return this.registered[a]||null},getPath:function(a){var l=
256
- this.externals[a];return CKEDITOR.getUrl(l&&l.dir||this.basePath+a+"/")},getFilePath:function(a){var l=this.externals[a];return CKEDITOR.getUrl(this.getPath(a)+(l?l.file:this.fileName+".js"))},addExternal:function(a,l,g){g||(l=l.replace(/[^\/]+$/,function(a){g=a;return""}));g=g||this.fileName+".js";a=a.split(",");for(var e=0;e<a.length;e++)this.externals[a[e]]={dir:l,file:g}},load:function(a,l,g){CKEDITOR.tools.isArray(a)||(a=a?[a]:[]);for(var e=this.loaded,f=this.registered,m=[],k={},h={},c=0;c<
257
- a.length;c++){var d=a[c];if(d)if(e[d]||f[d])h[d]=this.get(d);else{var b=this.getFilePath(d);m.push(b);b in k||(k[b]=[]);k[b].push(d)}}CKEDITOR.scriptLoader.load(m,function(a,b){if(b.length)throw Error('[CKEDITOR.resourceManager.load] Resource name "'+k[b[0]].join(",")+'" was not found at "'+b[0]+'".');for(var c=0;c<a.length;c++)for(var d=k[a[c]],f=0;f<d.length;f++){var m=d[f];h[m]=this.get(m);e[m]=1}l.call(g,h)},this)}};CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin");CKEDITOR.plugins.load=
258
- CKEDITOR.tools.override(CKEDITOR.plugins.load,function(a){var l={};return function(g,e,f){var m={},k=function(h){a.call(this,h,function(a){CKEDITOR.tools.extend(m,a);var d=[],b;for(b in a){var h=a[b],g=h&&h.requires;if(!l[b]){if(h.icons)for(var u=h.icons.split(","),t=u.length;t--;)CKEDITOR.skin.addIcon(u[t],h.path+"icons/"+(CKEDITOR.env.hidpi&&h.hidpi?"hidpi/":"")+u[t]+".png");h.isSupportedEnvironment=h.isSupportedEnvironment||function(){return!0};l[b]=1}if(g)for(g.split&&(g=g.split(",")),h=0;h<g.length;h++)m[g[h]]||
259
- d.push(g[h])}if(d.length)k.call(this,d);else{for(b in m)h=m[b],h.onLoad&&!h.onLoad._called&&(!1===h.onLoad()&&delete m[b],h.onLoad._called=1);e&&e.call(f||window,m)}},this)};k.call(this,g)}});CKEDITOR.plugins.setLang=function(a,l,g){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,l)&&e.push(l);a[l]=g};CKEDITOR.ui=function(a){if(a.ui)return a.ui;this.items={};this.instances={};this.editor=a;this._={handlers:{}};return this};
260
- CKEDITOR.ui.prototype={add:function(a,l,g){g.name=a.toLowerCase();var e=this.items[a]={type:l,command:g.command||null,args:Array.prototype.slice.call(arguments,2)};CKEDITOR.tools.extend(e,g)},get:function(a){return this.instances[a]},create:function(a){var l=this.items[a],g=l&&this._.handlers[l.type],e=l&&l.command&&this.editor.getCommand(l.command),g=g&&g.create.apply(this,l.args);this.instances[a]=g;e&&e.uiItems.push(g);g&&!g.type&&(g.type=l.type);return g},addHandler:function(a,l){this._.handlers[a]=
256
+ this.externals[a];return CKEDITOR.getUrl(l&&l.dir||this.basePath+a+"/")},getFilePath:function(a){var l=this.externals[a];return CKEDITOR.getUrl(this.getPath(a)+(l?l.file:this.fileName+".js"))},addExternal:function(a,l,g){g||(l=l.replace(/[^\/]+$/,function(a){g=a;return""}));g=g||this.fileName+".js";a=a.split(",");for(var f=0;f<a.length;f++)this.externals[a[f]]={dir:l,file:g}},load:function(a,l,g){CKEDITOR.tools.isArray(a)||(a=a?[a]:[]);for(var f=this.loaded,e=this.registered,m=[],k={},h={},c=0;c<
257
+ a.length;c++){var d=a[c];if(d)if(f[d]||e[d])h[d]=this.get(d);else{var b=this.getFilePath(d);m.push(b);b in k||(k[b]=[]);k[b].push(d)}}CKEDITOR.scriptLoader.load(m,function(a,b){if(b.length)throw Error('[CKEDITOR.resourceManager.load] Resource name "'+k[b[0]].join(",")+'" was not found at "'+b[0]+'".');for(var c=0;c<a.length;c++)for(var d=k[a[c]],e=0;e<d.length;e++){var m=d[e];h[m]=this.get(m);f[m]=1}l.call(g,h)},this)}};CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin");CKEDITOR.plugins.load=
258
+ CKEDITOR.tools.override(CKEDITOR.plugins.load,function(a){var l={};return function(g,f,e){var m={},k=function(h){a.call(this,h,function(a){CKEDITOR.tools.extend(m,a);var d=[],b;for(b in a){var h=a[b],g=h&&h.requires;if(!l[b]){if(h.icons)for(var u=h.icons.split(","),t=u.length;t--;)CKEDITOR.skin.addIcon(u[t],h.path+"icons/"+(CKEDITOR.env.hidpi&&h.hidpi?"hidpi/":"")+u[t]+".png");h.isSupportedEnvironment=h.isSupportedEnvironment||function(){return!0};l[b]=1}if(g)for(g.split&&(g=g.split(",")),h=0;h<g.length;h++)m[g[h]]||
259
+ d.push(g[h])}if(d.length)k.call(this,d);else{for(b in m)h=m[b],h.onLoad&&!h.onLoad._called&&(!1===h.onLoad()&&delete m[b],h.onLoad._called=1);f&&f.call(e||window,m)}},this)};k.call(this,g)}});CKEDITOR.plugins.setLang=function(a,l,g){var f=this.get(a);a=f.langEntries||(f.langEntries={});f=f.lang||(f.lang=[]);f.split&&(f=f.split(","));-1==CKEDITOR.tools.indexOf(f,l)&&f.push(l);a[l]=g};CKEDITOR.ui=function(a){if(a.ui)return a.ui;this.items={};this.instances={};this.editor=a;this._={handlers:{}};return this};
260
+ CKEDITOR.ui.prototype={add:function(a,l,g){g.name=a.toLowerCase();var f=this.items[a]={type:l,command:g.command||null,args:Array.prototype.slice.call(arguments,2)};CKEDITOR.tools.extend(f,g)},get:function(a){return this.instances[a]},create:function(a){var l=this.items[a],g=l&&this._.handlers[l.type],f=l&&l.command&&this.editor.getCommand(l.command),g=g&&g.create.apply(this,l.args);this.instances[a]=g;f&&f.uiItems.push(g);g&&!g.type&&(g.type=l.type);return g},addHandler:function(a,l){this._.handlers[a]=
261
261
  l},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,b,c){CKEDITOR.event.call(this);a=a&&CKEDITOR.tools.clone(a);if(void 0!==b){if(!(b instanceof CKEDITOR.dom.element))throw Error("Expect element of type CKEDITOR.dom.element.");if(!c)throw Error("One of the element modes must be specified.");if(CKEDITOR.env.ie&&CKEDITOR.env.quirks&&c==CKEDITOR.ELEMENT_MODE_INLINE)throw Error("Inline element mode is not supported on IE quirks.");
262
262
  if(!g(b,c))throw Error('The specified element mode is not supported on element: "'+b.getName()+'".');this.element=b;this.elementMode=c;this.name=this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO&&(b.getId()||b.getNameAtt())}else this.elementMode=CKEDITOR.ELEMENT_MODE_NONE;this._={};this.commands={};this.templates={};this.name=this.name||l();this.id=CKEDITOR.tools.getNextId();this.status="unloaded";this.config=CKEDITOR.tools.prototypedCopy(CKEDITOR.config);this.ui=new CKEDITOR.ui(this);this.focusManager=
263
- 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",function(){m(this,this.elementPath(),!0)});this.on("mode",e);CKEDITOR.dom.selection.setupEditorOptimization(this);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,
264
- !0);a.collapse();this.getSelection().selectRanges([a])}this.focus()}});CKEDITOR.fire("instanceCreated",null,this);CKEDITOR.add(this);CKEDITOR.tools.setTimeout(function(){this.isDestroyed()||this.isDetached()||h(this,a)},0,this)}function l(){do var a="editor"+ ++t;while(CKEDITOR.instances[a]);return a}function g(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,
265
- b;for(b in a)f(this,a[b])}function f(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 d,e,f=a.commands;for(e in f)d=f[e],(c||d.contextSensitive)&&d.refresh(a,b)}}function k(a){var b=a.config.customConfig;if(!b)return!1;var b=CKEDITOR.getUrl(b),c=r[b]||(r[b]={});c.fn?(c.fn.call(a,a.config),CKEDITOR.getUrl(a.config.customConfig)!=b&&k(a)||a.fireOnce("customConfigLoaded")):CKEDITOR.scriptLoader.queue(b,function(){c.fn=
263
+ new CKEDITOR.focusManager(this);this.keystrokeHandler=new CKEDITOR.keystrokeHandler(this);this.on("readOnly",f);this.on("selectionChange",function(a){m(this,a.data.path)});this.on("activeFilterChange",function(){m(this,this.elementPath(),!0)});this.on("mode",f);CKEDITOR.dom.selection.setupEditorOptimization(this);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,
264
+ !0);a.collapse();this.getSelection().selectRanges([a])}this.focus()}});CKEDITOR.fire("instanceCreated",null,this);CKEDITOR.add(this);CKEDITOR.tools.setTimeout(function(){this.isDestroyed()||this.isDetached()||h(this,a)},0,this)}function l(){do var a="editor"+ ++t;while(CKEDITOR.instances[a]);return a}function g(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 f(){var a=this.commands,
265
+ b;for(b in a)e(this,a[b])}function e(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 d,f,e=a.commands;for(f in e)d=e[f],(c||d.contextSensitive)&&d.refresh(a,b)}}function k(a){var b=a.config.customConfig;if(!b)return!1;var b=CKEDITOR.getUrl(b),c=r[b]||(r[b]={});c.fn?(c.fn.call(a,a.config),CKEDITOR.getUrl(a.config.customConfig)!=b&&k(a)||a.fireOnce("customConfigLoaded")):CKEDITOR.scriptLoader.queue(b,function(){c.fn=
266
266
  CKEDITOR.editorConfig?CKEDITOR.editorConfig:function(){};k(a)});return!0}function h(a,b){a.on("customConfigLoaded",function(){if(b){if(b.on)for(var d in b.on)a.on(d,b.on[d]);CKEDITOR.tools.extend(a.config,b,!0);delete a.config.on}d=a.config;a.readOnly=d.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")||
267
267
  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=d.tabIndex||a.element&&a.element.getAttribute("tabindex")||0;a.activeEnterMode=a.enterMode=a.blockless?CKEDITOR.ENTER_BR:d.enterMode;a.activeShiftEnterMode=a.shiftEnterMode=a.blockless?CKEDITOR.ENTER_BR:d.shiftEnterMode;d.skin&&(CKEDITOR.skinName=d.skin);a.fireOnce("configLoaded");a.dataProcessor=new CKEDITOR.htmlDataProcessor(a);
268
- a.filter=a.activeFilter=new CKEDITOR.filter(a);c(a)});b&&null!=b.customConfig&&(a.config.customConfig=b.customConfig);k(a)||a.fireOnce("customConfigLoaded")}function c(a){CKEDITOR.skin.loadPart("editor",function(){d(a)})}function d(a){CKEDITOR.lang.load(a.config.language,a.config.defaultLanguage,function(c,d){var e=a.config.title;a.langCode=c;a.lang=CKEDITOR.tools.prototypedCopy(d);a.title="string"==typeof e||!1===e?e:[a.lang.editor,a.name].join(", ");a.config.contentsLangDirection||(a.config.contentsLangDirection=
269
- a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.getDirection(1):a.lang.dir);a.fire("langLoaded");b(a)})}function b(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"";CKEDITOR.tools.isArray(a)&&(a=a.join(","));return a.replace(/\s/g,"")}var c=a.config,d=b(c.plugins),e=b(c.extraPlugins),f=b(c.removePlugins);if(e)var h=new RegExp("(?:^|,)(?:"+e.replace(/,/g,"|")+")(?\x3d,|$)","g"),d=d.replace(h,
270
- ""),d=d+(","+e);if(f)var k=new RegExp("(?:^|,)(?:"+f.replace(/,/g,"|")+")(?\x3d,|$)","g"),d=d.replace(k,"");CKEDITOR.env.air&&(d+=",adobeair");CKEDITOR.plugins.load(d.split(","),function(b){var d=[],e=[],f=[];a.plugins=CKEDITOR.tools.extend({},a.plugins,b);for(var h in b){var g=b[h],m=g.lang,l=null,n=g.requires,w;CKEDITOR.tools.isArray(n)&&(n=n.join(","));if(n&&(w=n.match(k)))for(;n=w.pop();)CKEDITOR.error("editor-plugin-required",{plugin:n.replace(",",""),requiredBy:h});m&&!a.lang[h]&&(m.split&&
271
- (m=m.split(",")),0<=CKEDITOR.tools.indexOf(m,a.langCode)?l=a.langCode:(l=a.langCode.replace(/-.*/,""),l=l!=a.langCode&&0<=CKEDITOR.tools.indexOf(m,l)?l:0<=CKEDITOR.tools.indexOf(m,"en")?"en":m[0]),g.langEntries&&g.langEntries[l]?(a.lang[h]=g.langEntries[l],l=null):f.push(CKEDITOR.getUrl(g.path+"lang/"+l+".js")));e.push(l);d.push(g)}CKEDITOR.scriptLoader.load(f,function(){if(!a.isDestroyed()&&!a.isDetached()){for(var b=["beforeInit","init","afterInit"],f=0;f<b.length;f++)for(var h=0;h<d.length;h++){var k=
272
- d[h];0===f&&e[h]&&k.lang&&k.langEntries&&(a.lang[k.name]=k.langEntries[e[h]]);if(k[b[f]])k[b[f]](a)}a.fireOnce("pluginsLoaded");c.keystrokes&&a.setKeystroke(a.config.keystrokes);for(h=0;h<a.config.blockedKeystrokes.length;h++)a.keystrokeHandler.blockedKeystrokes[a.config.blockedKeystrokes[h]]=1;a.status="loaded";a.fireOnce("loaded");CKEDITOR.fire("instanceLoaded",null,a)}})})}function q(){var a=this.element;if(a&&this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO){var b=this.getData();this.config.htmlEncodeOutput&&
273
- (b=CKEDITOR.tools.htmlEncode(b));a.is("textarea")?a.setValue(b):a.setHtml(b);return!0}return!1}function u(a,b){function c(a){var b=a.startContainer,d=a.endContainer;return b.is&&(b.is("tr")||b.is("td")&&b.equals(d)&&a.endOffset===b.getChildCount())?!0:!1}function d(a){var b=a.startContainer;return b.is("tr")?a.cloneContents():b.clone(!0)}for(var e=new CKEDITOR.dom.documentFragment,f,h,k,g=0;g<a.length;g++){var m=a[g],l=m.startContainer.getAscendant("tr",!0);c(m)?(f||(f=l.getAscendant("table").clone(),
274
- f.append(l.getAscendant({thead:1,tbody:1,tfoot:1}).clone()),e.append(f),f=f.findOne("thead, tbody, tfoot")),h&&h.equals(l)||(h=l,k=l.clone(),f.append(k)),k.append(d(m))):e.append(m.cloneContents())}return f?e:b.getHtmlFromRange(a[0])}a.prototype=CKEDITOR.editor.prototype;CKEDITOR.editor=a;var t=0,r={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{plugins:{detectConflict:function(a,b){for(var c=0;c<b.length;c++){var d=b[c];if(this[d])return CKEDITOR.warn("editor-plugin-conflict",{plugin:a,replacedWith:d}),
275
- !0}return!1}},addCommand:function(a,b){b.name=a.toLowerCase();var c=b instanceof CKEDITOR.command?b:new CKEDITOR.command(this,b);this.mode&&f(this,c);return this.commands[a]=c},_attachToForm:function(){function a(b){c.updateElement();c._.required&&!d.getValue()&&!1===c.fire("required")&&b.data.preventDefault()}function b(a){return!!(a&&a.call&&a.apply)}var c=this,d=c.element,e=new CKEDITOR.dom.element(d.$.form);d.is("textarea")&&e&&(e.on("submit",a),b(e.$.submit)&&(e.$.submit=CKEDITOR.tools.override(e.$.submit,
276
- function(b){return function(){a();b.apply?b.apply(this):b()}})),c.on("destroy",function(){e.removeListener("submit",a)}))},destroy:function(a){var b=CKEDITOR.filter.instances,c=this;this.fire("beforeDestroy");!a&&q.call(this);this.editable(null);this.filter&&delete this.filter;CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(b),function(a){a=b[a];c===a.editor&&a.destroy()});delete this.activeFilter;this.status="destroyed";this.fire("destroy");this.removeAllListeners();CKEDITOR.remove(this);
268
+ a.filter=a.activeFilter=new CKEDITOR.filter(a);c(a)});b&&null!=b.customConfig&&(a.config.customConfig=b.customConfig);k(a)||a.fireOnce("customConfigLoaded")}function c(a){CKEDITOR.skin.loadPart("editor",function(){d(a)})}function d(a){CKEDITOR.lang.load(a.config.language,a.config.defaultLanguage,function(c,d){var f=a.config.title;a.langCode=c;a.lang=CKEDITOR.tools.prototypedCopy(d);a.title="string"==typeof f||!1===f?f:[a.lang.editor,a.name].join(", ");a.config.contentsLangDirection||(a.config.contentsLangDirection=
269
+ a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.getDirection(1):a.lang.dir);a.fire("langLoaded");b(a)})}function b(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"";CKEDITOR.tools.isArray(a)&&(a=a.join(","));return a.replace(/\s/g,"")}var c=a.config,d=b(c.plugins),f=b(c.extraPlugins),e=b(c.removePlugins);if(f)var h=new RegExp("(?:^|,)(?:"+f.replace(/,/g,"|")+")(?\x3d,|$)","g"),d=d.replace(h,
270
+ ""),d=d+(","+f);if(e)var k=new RegExp("(?:^|,)(?:"+e.replace(/,/g,"|")+")(?\x3d,|$)","g"),d=d.replace(k,"");CKEDITOR.env.air&&(d+=",adobeair");CKEDITOR.plugins.load(d.split(","),function(b){var d=[],f=[],e=[];a.plugins=CKEDITOR.tools.extend({},a.plugins,b);for(var h in b){var g=b[h],m=g.lang,l=null,n=g.requires,w;CKEDITOR.tools.isArray(n)&&(n=n.join(","));if(n&&(w=n.match(k)))for(;n=w.pop();)CKEDITOR.error("editor-plugin-required",{plugin:n.replace(",",""),requiredBy:h});m&&!a.lang[h]&&(m.split&&
271
+ (m=m.split(",")),0<=CKEDITOR.tools.indexOf(m,a.langCode)?l=a.langCode:(l=a.langCode.replace(/-.*/,""),l=l!=a.langCode&&0<=CKEDITOR.tools.indexOf(m,l)?l:0<=CKEDITOR.tools.indexOf(m,"en")?"en":m[0]),g.langEntries&&g.langEntries[l]?(a.lang[h]=g.langEntries[l],l=null):e.push(CKEDITOR.getUrl(g.path+"lang/"+l+".js")));f.push(l);d.push(g)}CKEDITOR.scriptLoader.load(e,function(){if(!a.isDestroyed()&&!a.isDetached()){for(var b=["beforeInit","init","afterInit"],e=0;e<b.length;e++)for(var h=0;h<d.length;h++){var k=
272
+ d[h];0===e&&f[h]&&k.lang&&k.langEntries&&(a.lang[k.name]=k.langEntries[f[h]]);if(k[b[e]])k[b[e]](a)}a.fireOnce("pluginsLoaded");c.keystrokes&&a.setKeystroke(a.config.keystrokes);for(h=0;h<a.config.blockedKeystrokes.length;h++)a.keystrokeHandler.blockedKeystrokes[a.config.blockedKeystrokes[h]]=1;a.status="loaded";a.fireOnce("loaded");CKEDITOR.fire("instanceLoaded",null,a)}})})}function q(){var a=this.element;if(a&&this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO){var b=this.getData();this.config.htmlEncodeOutput&&
273
+ (b=CKEDITOR.tools.htmlEncode(b));a.is("textarea")?a.setValue(b):a.setHtml(b);return!0}return!1}function u(a,b){function c(a){var b=a.startContainer,d=a.endContainer;return b.is&&(b.is("tr")||b.is("td")&&b.equals(d)&&a.endOffset===b.getChildCount())?!0:!1}function d(a){var b=a.startContainer;return b.is("tr")?a.cloneContents():b.clone(!0)}for(var f=new CKEDITOR.dom.documentFragment,e,h,k,g=0;g<a.length;g++){var m=a[g],l=m.startContainer.getAscendant("tr",!0);c(m)?(e||(e=l.getAscendant("table").clone(),
274
+ e.append(l.getAscendant({thead:1,tbody:1,tfoot:1}).clone()),f.append(e),e=e.findOne("thead, tbody, tfoot")),h&&h.equals(l)||(h=l,k=l.clone(),e.append(k)),k.append(d(m))):f.append(m.cloneContents())}return e?f:b.getHtmlFromRange(a[0])}a.prototype=CKEDITOR.editor.prototype;CKEDITOR.editor=a;var t=0,r={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{plugins:{detectConflict:function(a,b){for(var c=0;c<b.length;c++){var d=b[c];if(this[d])return CKEDITOR.warn("editor-plugin-conflict",{plugin:a,replacedWith:d}),
275
+ !0}return!1}},addCommand:function(a,b){b.name=a.toLowerCase();var c=b instanceof CKEDITOR.command?b:new CKEDITOR.command(this,b);this.mode&&e(this,c);return this.commands[a]=c},_attachToForm:function(){function a(b){c.updateElement();c._.required&&!d.getValue()&&!1===c.fire("required")&&b.data.preventDefault()}function b(a){return!!(a&&a.call&&a.apply)}var c=this,d=c.element,f=new CKEDITOR.dom.element(d.$.form);d.is("textarea")&&f&&(f.on("submit",a),b(f.$.submit)&&(f.$.submit=CKEDITOR.tools.override(f.$.submit,
276
+ function(b){return function(){a();b.apply?b.apply(this):b()}})),c.on("destroy",function(){f.removeListener("submit",a)}))},destroy:function(a){var b=CKEDITOR.filter.instances,c=this;this.fire("beforeDestroy");!a&&q.call(this);this.editable(null);this.filter&&delete this.filter;CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(b),function(a){a=b[a];c===a.editor&&a.destroy()});delete this.activeFilter;this.status="destroyed";this.fire("destroy");this.removeAllListeners();CKEDITOR.remove(this);
277
277
  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),d={name:a,commandData:b||{},command:c};return c&&c.state!=CKEDITOR.TRISTATE_DISABLED&&!1!==this.fire("beforeCommandExec",d)&&(d.returnValue=c.exec(d.commandData),
278
278
  !c.async&&!1!==this.fire("afterCommandExec",d))?d.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",b);return b.dataValue},getSnapshot:function(){var a=this.fire("getSnapshot");"string"!=typeof a&&(a=(a=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?
279
- a.is("textarea")?a.getValue():a.getHtml():"");return a},loadSnapshot:function(a){this.fire("loadSnapshot",a)},setData:function(a,b,c){var d=!0,e=b;b&&"object"==typeof b&&(c=b.internal,e=b.callback,d=!b.noSnapshot);!c&&d&&this.fire("saveSnapshot");if(e||!c)this.once("dataReady",function(a){!c&&d&&this.fire("saveSnapshot");e&&e.call(a.editor)});a={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=
279
+ a.is("textarea")?a.getValue():a.getHtml():"");return a},loadSnapshot:function(a){this.fire("loadSnapshot",a)},setData:function(a,b,c){var d=!0,f=b;b&&"object"==typeof b&&(c=b.internal,f=b.callback,d=!b.noSnapshot);!c&&d&&this.fire("saveSnapshot");if(f||!c)this.once("dataReady",function(a){!c&&d&&this.fire("saveSnapshot");f&&f.call(a.editor)});a={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=
280
280
  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(),c=this.getSelection(),c=c&&c.getRanges();if(!b||!c||0===c.length)return null;b=u(c,b);return a?b.getHtml():b},extractSelectedHtml:function(a,b){var c=this.editable(),
281
- d=this.getSelection().getRanges(),e=new CKEDITOR.dom.documentFragment,f;if(!c||0===d.length)return null;for(f=0;f<d.length;f++)e.append(c.extractHtmlFromRange(d[f],b));b||this.getSelection().selectRanges([d[0]]);return a?e.getHtml():e},focus:function(){this.fire("beforeFocus")},checkDirty:function(){return"ready"==this.status&&this._.previousValue!==this.getSnapshot()},resetDirty:function(){this._.previousValue=this.getSnapshot()},updateElement:function(){return q.call(this)},setKeystroke:function(){for(var a=
282
- this.keystrokeHandler.keystrokes,b=CKEDITOR.tools.isArray(arguments[0])?arguments[0]:[[].slice.call(arguments,0)],c,d,e=b.length;e--;)c=b[e],d=0,CKEDITOR.tools.isArray(c)&&(d=c[1],c=c[0]),d?a[c]=d:delete a[c]},getCommandKeystroke:function(a,b){var c="string"===typeof a?this.getCommand(a):a,d=[];if(c){var e=CKEDITOR.tools.object.findKey(this.commands,c),f=this.keystrokeHandler.keystrokes;if(c.fakeKeystroke)d.push(c.fakeKeystroke);else for(var h in f)f[h]===e&&d.push(h)}return b?d:d[0]||null},addFeature:function(a){return this.filter.addFeature(a)},
281
+ d=this.getSelection().getRanges(),f=new CKEDITOR.dom.documentFragment,e;if(!c||0===d.length)return null;for(e=0;e<d.length;e++)f.append(c.extractHtmlFromRange(d[e],b));b||this.getSelection().selectRanges([d[0]]);return a?f.getHtml():f},focus:function(){this.fire("beforeFocus")},checkDirty:function(){return"ready"==this.status&&this._.previousValue!==this.getSnapshot()},resetDirty:function(){this._.previousValue=this.getSnapshot()},updateElement:function(){return q.call(this)},setKeystroke:function(){for(var a=
282
+ this.keystrokeHandler.keystrokes,b=CKEDITOR.tools.isArray(arguments[0])?arguments[0]:[[].slice.call(arguments,0)],c,d,f=b.length;f--;)c=b[f],d=0,CKEDITOR.tools.isArray(c)&&(d=c[1],c=c[0]),d?a[c]=d:delete a[c]},getCommandKeystroke:function(a,b){var c="string"===typeof a?this.getCommand(a):a,d=[];if(c){var f=CKEDITOR.tools.object.findKey(this.commands,c),e=this.keystrokeHandler.keystrokes;if(c.fakeKeystroke)d.push(c.fakeKeystroke);else for(var h in e)e[h]===f&&d.push(h)}return b?d:d[0]||null},addFeature:function(a){return this.filter.addFeature(a)},
283
283
  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,b){a=a?this.blockless?CKEDITOR.ENTER_BR:a:this.enterMode;b=b?this.blockless?CKEDITOR.ENTER_BR:b:this.shiftEnterMode;if(this.activeEnterMode!=a||this.activeShiftEnterMode!=b)this.activeEnterMode=
284
284
  a,this.activeShiftEnterMode=b,this.fire("activeEnterModeChange")},showNotification:function(a){alert(a)},isDetached:function(){return!!this.container&&this.container.isDetached()},isDestroyed:function(){return"destroyed"===this.status}});CKEDITOR.editor._getEditorElement=function(a){if(!CKEDITOR.env.isCompatible)return null;var b=CKEDITOR.dom.element.get(a);return b?b.getEditor()?(CKEDITOR.error("editor-element-conflict",{editorName:b.getEditor().name}),null):b:(CKEDITOR.error("editor-incorrect-element",
285
285
  {element:a}),null)}})();CKEDITOR.ELEMENT_MODE_NONE=0;CKEDITOR.ELEMENT_MODE_REPLACE=1;CKEDITOR.ELEMENT_MODE_APPENDTO=2;CKEDITOR.ELEMENT_MODE_INLINE=3;CKEDITOR.htmlParser=function(){this._={htmlPartsRegex:/<(?:(?:\/([^>]+)>)|(?:!--([\S|\s]*?)--\x3e)|(?:([^\/\s>]+)((?:\s+[\w\-:.]+(?:\s*=\s*?(?:(?:"[^"]*")|(?:'[^']*')|[^\s"'\/>]+))?)*)[\S\s]*?(\/?)>))/g}};(function(){var a=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,l={checked:1,compact:1,declare:1,defer:1,disabled:1,
286
- 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(g){for(var e,f,m=0,k;e=this._.htmlPartsRegex.exec(g);){f=e.index;if(f>m)if(m=g.substring(m,f),k)k.push(m);else this.onText(m);m=this._.htmlPartsRegex.lastIndex;if(f=e[1])if(f=f.toLowerCase(),k&&CKEDITOR.dtd.$cdata[f]&&(this.onCDATA(k.join("")),k=null),!k){this.onTagClose(f);
287
- continue}if(k)k.push(e[0]);else if(f=e[3]){if(f=f.toLowerCase(),!/="/.test(f)){var h={},c,d=e[4];e=!!e[5];if(d)for(;c=a.exec(d);){var b=c[1].toLowerCase();c=c[2]||c[3]||c[4]||"";h[b]=!c&&l[b]?b:CKEDITOR.tools.htmlDecodeAttr(c)}this.onTagOpen(f,h,e);!k&&CKEDITOR.dtd.$cdata[f]&&(k=[])}}else if(f=e[2])this.onComment(f)}if(g.length>m)this.onText(g.substring(m,g.length))}}})();CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(a){this._.output.push("\x3c",
286
+ 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(g){for(var f,e,m=0,k;f=this._.htmlPartsRegex.exec(g);){e=f.index;if(e>m)if(m=g.substring(m,e),k)k.push(m);else this.onText(m);m=this._.htmlPartsRegex.lastIndex;if(e=f[1])if(e=e.toLowerCase(),k&&CKEDITOR.dtd.$cdata[e]&&(this.onCDATA(k.join("")),k=null),!k){this.onTagClose(e);
287
+ continue}if(k)k.push(f[0]);else if(e=f[3]){if(e=e.toLowerCase(),!/="/.test(e)){var h={},c,d=f[4];f=!!f[5];if(d)for(;c=a.exec(d);){var b=c[1].toLowerCase();c=c[2]||c[3]||c[4]||"";h[b]=!c&&l[b]?b:CKEDITOR.tools.htmlDecodeAttr(c)}this.onTagOpen(e,h,f);!k&&CKEDITOR.dtd.$cdata[e]&&(k=[])}}else if(e=f[2])this.onComment(e)}if(g.length>m)this.onText(g.substring(m,g.length))}}})();CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(a){this._.output.push("\x3c",
288
288
  a)},openTagClose:function(a,l){l?this._.output.push(" /\x3e"):this._.output.push("\x3e")},attribute:function(a,l){"string"==typeof l&&(l=CKEDITOR.tools.htmlEncodeAttr(l));this._.output.push(" ",a,'\x3d"',l,'"')},closeTag:function(a){this._.output.push("\x3c/",a,"\x3e")},text:function(a){this._.output.push(a)},comment:function(a){this._.output.push("\x3c!--",a,"--\x3e")},write:function(a){this._.output.push(a)},reset:function(){this._.output=[];this._.indent=!1},getHtml:function(a){var l=this._.output.join("");
289
- a&&this.reset();return l}}});"use strict";(function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var a=this.parent.children,l=CKEDITOR.tools.indexOf(a,this),g=this.previous,e=this.next;g&&(g.next=e);e&&(e.previous=g);a.splice(l,1);this.parent=null},replaceWith:function(a){var l=this.parent.children,g=CKEDITOR.tools.indexOf(l,this),e=a.previous=this.previous,f=a.next=this.next;e&&(e.next=a);f&&(f.previous=a);l[g]=a;a.parent=this.parent;this.parent=null},
290
- insertAfter:function(a){var l=a.parent.children,g=CKEDITOR.tools.indexOf(l,a),e=a.next;l.splice(g+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 l=a.parent.children,g=CKEDITOR.tools.indexOf(l,a);l.splice(g,0,this);this.next=a;(this.previous=a.previous)&&(a.previous.next=this);a.previous=this;this.parent=a.parent},getAscendant:function(a){var l="function"==typeof a?a:"string"==typeof a?function(e){return e.name==a}:function(e){return e.name in
289
+ a&&this.reset();return l}}});"use strict";(function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var a=this.parent.children,l=CKEDITOR.tools.indexOf(a,this),g=this.previous,f=this.next;g&&(g.next=f);f&&(f.previous=g);a.splice(l,1);this.parent=null},replaceWith:function(a){var l=this.parent.children,g=CKEDITOR.tools.indexOf(l,this),f=a.previous=this.previous,e=a.next=this.next;f&&(f.next=a);e&&(e.previous=a);l[g]=a;a.parent=this.parent;this.parent=null},
290
+ insertAfter:function(a){var l=a.parent.children,g=CKEDITOR.tools.indexOf(l,a),f=a.next;l.splice(g+1,0,this);this.next=a.next;this.previous=a;a.next=this;f&&(f.previous=this);this.parent=a.parent},insertBefore:function(a){var l=a.parent.children,g=CKEDITOR.tools.indexOf(l,a);l.splice(g,0,this);this.next=a;(this.previous=a.previous)&&(a.previous.next=this);a.previous=this;this.parent=a.parent},getAscendant:function(a){var l="function"==typeof a?a:"string"==typeof a?function(f){return f.name==a}:function(f){return f.name in
291
291
  a},g=this.parent;for(;g&&g.type==CKEDITOR.NODE_ELEMENT;){if(l(g))return g;g=g.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=function(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,
292
292
  l){var g=this.value;if(!(g=a.onComment(l,g,this)))return this.remove(),!1;if("string"!=typeof g)return this.replaceWith(g),!1;this.value=g;return!0},writeHtml:function(a,l){l&&this.filter(l);a.comment(this.value)}});"use strict";(function(){CKEDITOR.htmlParser.text=function(a){this.value=a;this._={isBlockLike:!1}};CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(a,l){if(!(this.value=a.onText(l,this.value,this)))return this.remove(),
293
293
  !1},writeHtml:function(a,l){l&&this.filter(l);a.text(this.value)}})})();"use strict";(function(){CKEDITOR.htmlParser.cdata=function(a){this.value=a};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(a){a.write(this.value)}})})();"use strict";CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:!0,hasInlineStarted:!1}};(function(){function a(a){return a.attributes["data-cke-survive"]?
294
- !1:"a"==a.name&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}var l=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),g={ol:1,ul:1},e=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),f={ul:"li",ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml=function(m,k,h){function c(a){var b;if(0<p.length)for(var c=0;c<p.length;c++){var e=
295
- p[c],f=e.name,h=CKEDITOR.dtd[f],k=x.name&&CKEDITOR.dtd[x.name];k&&!k[f]||a&&h&&!h[a]&&CKEDITOR.dtd[a]?f==x.name&&(n(x,x.parent,1),c--):(b||(d(),b=1),e=e.clone(),e.parent=x,x=e,p.splice(c,1),c--)}}function d(){for(;y.length;)n(y.shift(),x)}function b(a){if(a._.isBlockLike&&"pre"!=a.name&&"textarea"!=a.name){var b=a.children.length,c=a.children[b-1],d;c&&c.type==CKEDITOR.NODE_TEXT&&((d=CKEDITOR.tools.rtrim(c.value))?c.value=d:a.children.length=b-1)}}function n(c,d,e){d=d||x||r;var f=x;void 0===c.previous&&
296
- (q(d,c)&&(x=d,t.onTagOpen(h,{}),c.returnPoint=d=x),b(c),a(c)&&!c.children.length||d.add(c),"pre"==c.name&&(B=!1),"textarea"==c.name&&(z=!1));c.returnPoint?(x=c.returnPoint,delete c.returnPoint):x=e?d:f}function q(a,b){if((a==r||"body"==a.name)&&h&&(!a.name||CKEDITOR.dtd[a.name][h])){var c,d;return(c=b.attributes&&(d=b.attributes["data-cke-real-element-type"])?d:b.name)&&c in CKEDITOR.dtd.$inline&&!(c in CKEDITOR.dtd.head)&&!b.isOrphan||b.type==CKEDITOR.NODE_TEXT}}function u(a,b){return a in CKEDITOR.dtd.$listItem||
297
- a in CKEDITOR.dtd.$tableContent?a==b||"dt"==a&&"dd"==b||"dd"==a&&"dt"==b:!1}var t=new CKEDITOR.htmlParser,r=k instanceof CKEDITOR.htmlParser.element?k:"string"==typeof k?new CKEDITOR.htmlParser.element(k):new CKEDITOR.htmlParser.fragment,p=[],y=[],x=r,z="textarea"==r.name,B="pre"==r.name;t.onTagOpen=function(b,f,h,k){f=new CKEDITOR.htmlParser.element(b,f);f.isUnknown&&h&&(f.isEmpty=!0);f.isOptionalClose=k;if(a(f))p.push(f);else{if("pre"==b)B=!0;else{if("br"==b&&B){x.add(new CKEDITOR.htmlParser.text("\n"));
298
- return}"textarea"==b&&(z=!0)}if("br"==b)y.push(f);else{for(;!(k=(h=x.name)?CKEDITOR.dtd[h]||(x._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):e,f.isUnknown||x.isUnknown||k[b]);)if(x.isOptionalClose)t.onTagClose(h);else if(b in g&&h in g)h=x.children,(h=h[h.length-1])&&"li"==h.name||n(h=new CKEDITOR.htmlParser.element("li"),x),!f.returnPoint&&(f.returnPoint=x),x=h;else if(b in CKEDITOR.dtd.$listItem&&!u(b,h))t.onTagOpen("li"==b?"ul":"dl",{},0,1);else if(h in l&&!u(b,h))!f.returnPoint&&(f.returnPoint=
299
- x),x=x.parent;else if(h in CKEDITOR.dtd.$inline&&p.unshift(x),x.parent)n(x,x.parent,1);else{f.isOrphan=1;break}c(b);d();f.parent=x;f.isEmpty?n(f):x=f}}};t.onTagClose=function(a){for(var b=p.length-1;0<=b;b--)if(a==p[b].name){p.splice(b,1);return}for(var c=[],e=[],f=x;f!=r&&f.name!=a;)f._.isBlockLike||e.unshift(f),c.push(f),f=f.returnPoint||f.parent;if(f!=r){for(b=0;b<c.length;b++){var k=c[b];n(k,k.parent)}x=f;f._.isBlockLike&&d();n(f,f.parent);f==x&&(x=x.parent);p=p.concat(e)}"body"==a&&(h=!1)};t.onText=
300
- function(a){if(!(x._.hasInlineStarted&&!y.length||B||z)&&(a=CKEDITOR.tools.ltrim(a),0===a.length))return;var b=x.name,k=b?CKEDITOR.dtd[b]||(x._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):e;if(!z&&!k["#"]&&b in l)t.onTagOpen(f[b]||""),t.onText(a);else{d();c();B||z||(a=a.replace(/[\t\r\n ]{2,}|[\t\r\n]/g," "));a=new CKEDITOR.htmlParser.text(a);if(q(x,a))this.onTagOpen(h,{},0,1);x.add(a)}};t.onCDATA=function(a){x.add(new CKEDITOR.htmlParser.cdata(a))};t.onComment=function(a){d();c();x.add(new CKEDITOR.htmlParser.comment(a))};
301
- t.parse(m);for(d();x!=r;)n(x,x.parent,1);b(r);return r};CKEDITOR.htmlParser.fragment.prototype={type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,add:function(a,e){isNaN(e)&&(e=this.children.length);var f=0<e?this.children[e-1]:null;if(f){if(a._.isBlockLike&&f.type==CKEDITOR.NODE_TEXT&&(f.value=CKEDITOR.tools.rtrim(f.value),0===f.value.length)){this.children.pop();this.add(a);return}f.next=a}a.previous=f;a.parent=this;this.children.splice(e,0,a);this._.hasInlineStarted||(this._.hasInlineStarted=a.type==CKEDITOR.NODE_TEXT||
302
- a.type==CKEDITOR.NODE_ELEMENT&&!a._.isBlockLike)},filter:function(a,e){e=this.getFilterContext(e);a.onRoot(e,this);this.filterChildren(a,!1,e)},filterChildren:function(a,e,f){if(this.childrenFilteredBy!=a.id){f=this.getFilterContext(f);if(e&&!this.parent)a.onRoot(f,this);this.childrenFilteredBy=a.id;for(e=0;e<this.children.length;e++)!1===this.children[e].filter(a,f)&&e--}},writeHtml:function(a,e){e&&this.filter(e);this.writeChildrenHtml(a)},writeChildrenHtml:function(a,e,f){var c=this.getFilterContext();
303
- if(f&&!this.parent&&e)e.onRoot(c,this);e&&this.filterChildren(e,!1,c);e=0;f=this.children;for(c=f.length;e<c;e++)f[e].writeHtml(a)},forEach:function(a,e,f){if(!(f||e&&this.type!=e))var c=a(this);if(!1!==c){f=this.children;for(var d=0;d<f.length;d++)c=f[d],c.type==CKEDITOR.NODE_ELEMENT?c.forEach(a,e):e&&c.type!=e||a(c)}},getFilterContext:function(a){return a||{}}}})();"use strict";(function(){function a(){this.rules=[]}function l(g,e,f,m){var k,h;for(k in e)(h=g[k])||(h=g[k]=new a),h.add(e[k],f,m)}
304
- CKEDITOR.htmlParser.filter=CKEDITOR.tools.createClass({$:function(g){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;g&&this.addRules(g,10)},proto:{addRules:function(a,e){var f;"number"==typeof e?f=e:e&&"priority"in e&&(f=e.priority);"number"!=typeof f&&(f=10);"object"!=typeof e&&(e={});a.elementNames&&this.elementNameRules.addMany(a.elementNames,
305
- f,e);a.attributeNames&&this.attributeNameRules.addMany(a.attributeNames,f,e);a.elements&&l(this.elementsRules,a.elements,f,e);a.attributes&&l(this.attributesRules,a.attributes,f,e);a.text&&this.textRules.add(a.text,f,e);a.comment&&this.commentRules.add(a.comment,f,e);a.root&&this.rootRules.add(a.root,f,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,
306
- e,f){return this.textRules.exec(a,e,f)},onComment:function(a,e,f){return this.commentRules.exec(a,e,f)},onRoot:function(a,e){return this.rootRules.exec(a,e)},onElement:function(a,e){for(var f=[this.elementsRules["^"],this.elementsRules[e.name],this.elementsRules.$],m,k=0;3>k;k++)if(m=f[k]){m=m.exec(a,e,this);if(!1===m)return null;if(m&&m!=e)return this.onNode(a,m);if(e.parent&&!e.name)break}return e},onNode:function(a,e){var f=e.type;return f==CKEDITOR.NODE_ELEMENT?this.onElement(a,e):f==CKEDITOR.NODE_TEXT?
307
- new CKEDITOR.htmlParser.text(this.onText(a,e.value,e)):f==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(a,e.value,e)):null},onAttribute:function(a,e,f,m){return(f=this.attributesRules[f])?f.exec(a,m,e,this):m}}});CKEDITOR.htmlParser.filterRulesGroup=a;a.prototype={add:function(a,e,f){this.rules.splice(this.findIndex(e),0,{value:a,priority:e,options:f})},addMany:function(a,e,f){for(var m=[this.findIndex(e),0],k=0,h=a.length;k<h;k++)m.push({value:a[k],priority:e,options:f});this.rules.splice.apply(this.rules,
308
- m)},findIndex:function(a){for(var e=this.rules,f=e.length-1;0<=f&&a<e[f].priority;)f--;return f+1},exec:function(a,e){var f=e instanceof CKEDITOR.htmlParser.node||e instanceof CKEDITOR.htmlParser.fragment,m=Array.prototype.slice.call(arguments,1),k=this.rules,h=k.length,c,d,b,l;for(l=0;l<h;l++)if(f&&(c=e.type,d=e.name),b=k[l],!(a.nonEditable&&!b.options.applyToAll||a.nestedEditable&&b.options.excludeNestedEditable)){b=b.value.apply(null,m);if(!1===b||f&&b&&(b.name!=d||b.type!=c))return b;null!=b&&
309
- (m[0]=e=b)}return e},execOnName:function(a,e){for(var f=0,m=this.rules,k=m.length,h;e&&f<k;f++)h=m[f],a.nonEditable&&!h.options.applyToAll||a.nestedEditable&&h.options.excludeNestedEditable||(e=e.replace(h.value[0],h.value[1]));return e}}})();(function(){function a(a,b){function c(a){return a||CKEDITOR.env.needsNbspFiller?new CKEDITOR.htmlParser.text(" "):new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function d(a,b){return function(d){if(d.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var f=
310
- [],k=g(d),l,F;if(k)for(h(k,1)&&f.push(k);k;)m(k)&&(l=e(k))&&h(l)&&((F=e(l))&&!m(F)?f.push(l):(c(n).insertAfter(l),l.remove())),k=k.previous;for(k=0;k<f.length;k++)f[k].remove();if(f=!a||!1!==("function"==typeof b?b(d):b))n||CKEDITOR.env.needsBrFiller||d.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT?n||CKEDITOR.env.needsBrFiller||!(7<document.documentMode||d.name in CKEDITOR.dtd.tr||d.name in CKEDITOR.dtd.$listItem)?(f=g(d),f=!f||"form"==d.name&&"input"==f.name):f=!1:f=!1;f&&d.add(c(a))}}}function h(a,b){if((!n||
294
+ !1:"a"==a.name&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}var l=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),g={ol:1,ul:1},f=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),e={ul:"li",ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml=function(m,k,h){function c(a){var b;if(0<p.length)for(var c=0;c<p.length;c++){var f=
295
+ p[c],e=f.name,h=CKEDITOR.dtd[e],k=x.name&&CKEDITOR.dtd[x.name];k&&!k[e]||a&&h&&!h[a]&&CKEDITOR.dtd[a]?e==x.name&&(n(x,x.parent,1),c--):(b||(d(),b=1),f=f.clone(),f.parent=x,x=f,p.splice(c,1),c--)}}function d(){for(;y.length;)n(y.shift(),x)}function b(a){if(a._.isBlockLike&&"pre"!=a.name&&"textarea"!=a.name){var b=a.children.length,c=a.children[b-1],d;c&&c.type==CKEDITOR.NODE_TEXT&&((d=CKEDITOR.tools.rtrim(c.value))?c.value=d:a.children.length=b-1)}}function n(c,d,f){d=d||x||r;var e=x;void 0===c.previous&&
296
+ (q(d,c)&&(x=d,t.onTagOpen(h,{}),c.returnPoint=d=x),b(c),a(c)&&!c.children.length||d.add(c),"pre"==c.name&&(B=!1),"textarea"==c.name&&(z=!1));c.returnPoint?(x=c.returnPoint,delete c.returnPoint):x=f?d:e}function q(a,b){if((a==r||"body"==a.name)&&h&&(!a.name||CKEDITOR.dtd[a.name][h])){var c,d;return(c=b.attributes&&(d=b.attributes["data-cke-real-element-type"])?d:b.name)&&c in CKEDITOR.dtd.$inline&&!(c in CKEDITOR.dtd.head)&&!b.isOrphan||b.type==CKEDITOR.NODE_TEXT}}function u(a,b){return a in CKEDITOR.dtd.$listItem||
297
+ a in CKEDITOR.dtd.$tableContent?a==b||"dt"==a&&"dd"==b||"dd"==a&&"dt"==b:!1}var t=new CKEDITOR.htmlParser,r=k instanceof CKEDITOR.htmlParser.element?k:"string"==typeof k?new CKEDITOR.htmlParser.element(k):new CKEDITOR.htmlParser.fragment,p=[],y=[],x=r,z="textarea"==r.name,B="pre"==r.name;t.onTagOpen=function(b,e,h,k){e=new CKEDITOR.htmlParser.element(b,e);e.isUnknown&&h&&(e.isEmpty=!0);e.isOptionalClose=k;if(a(e))p.push(e);else{if("pre"==b)B=!0;else{if("br"==b&&B){x.add(new CKEDITOR.htmlParser.text("\n"));
298
+ return}"textarea"==b&&(z=!0)}if("br"==b)y.push(e);else{for(;!(k=(h=x.name)?CKEDITOR.dtd[h]||(x._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):f,e.isUnknown||x.isUnknown||k[b]);)if(x.isOptionalClose)t.onTagClose(h);else if(b in g&&h in g)h=x.children,(h=h[h.length-1])&&"li"==h.name||n(h=new CKEDITOR.htmlParser.element("li"),x),!e.returnPoint&&(e.returnPoint=x),x=h;else if(b in CKEDITOR.dtd.$listItem&&!u(b,h))t.onTagOpen("li"==b?"ul":"dl",{},0,1);else if(h in l&&!u(b,h))!e.returnPoint&&(e.returnPoint=
299
+ x),x=x.parent;else if(h in CKEDITOR.dtd.$inline&&p.unshift(x),x.parent)n(x,x.parent,1);else{e.isOrphan=1;break}c(b);d();e.parent=x;e.isEmpty?n(e):x=e}}};t.onTagClose=function(a){for(var b=p.length-1;0<=b;b--)if(a==p[b].name){p.splice(b,1);return}for(var c=[],f=[],e=x;e!=r&&e.name!=a;)e._.isBlockLike||f.unshift(e),c.push(e),e=e.returnPoint||e.parent;if(e!=r){for(b=0;b<c.length;b++){var k=c[b];n(k,k.parent)}x=e;e._.isBlockLike&&d();n(e,e.parent);e==x&&(x=x.parent);p=p.concat(f)}"body"==a&&(h=!1)};t.onText=
300
+ function(a){if(!(x._.hasInlineStarted&&!y.length||B||z)&&(a=CKEDITOR.tools.ltrim(a),0===a.length))return;var b=x.name,k=b?CKEDITOR.dtd[b]||(x._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):f;if(!z&&!k["#"]&&b in l)t.onTagOpen(e[b]||""),t.onText(a);else{d();c();B||z||(a=a.replace(/[\t\r\n ]{2,}|[\t\r\n]/g," "));a=new CKEDITOR.htmlParser.text(a);if(q(x,a))this.onTagOpen(h,{},0,1);x.add(a)}};t.onCDATA=function(a){x.add(new CKEDITOR.htmlParser.cdata(a))};t.onComment=function(a){d();c();x.add(new CKEDITOR.htmlParser.comment(a))};
301
+ t.parse(m);for(d();x!=r;)n(x,x.parent,1);b(r);return r};CKEDITOR.htmlParser.fragment.prototype={type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,add:function(a,f){isNaN(f)&&(f=this.children.length);var e=0<f?this.children[f-1]:null;if(e){if(a._.isBlockLike&&e.type==CKEDITOR.NODE_TEXT&&(e.value=CKEDITOR.tools.rtrim(e.value),0===e.value.length)){this.children.pop();this.add(a);return}e.next=a}a.previous=e;a.parent=this;this.children.splice(f,0,a);this._.hasInlineStarted||(this._.hasInlineStarted=a.type==CKEDITOR.NODE_TEXT||
302
+ a.type==CKEDITOR.NODE_ELEMENT&&!a._.isBlockLike)},filter:function(a,f){f=this.getFilterContext(f);a.onRoot(f,this);this.filterChildren(a,!1,f)},filterChildren:function(a,f,e){if(this.childrenFilteredBy!=a.id){e=this.getFilterContext(e);if(f&&!this.parent)a.onRoot(e,this);this.childrenFilteredBy=a.id;for(f=0;f<this.children.length;f++)!1===this.children[f].filter(a,e)&&f--}},writeHtml:function(a,f){f&&this.filter(f);this.writeChildrenHtml(a)},writeChildrenHtml:function(a,f,e){var c=this.getFilterContext();
303
+ if(e&&!this.parent&&f)f.onRoot(c,this);f&&this.filterChildren(f,!1,c);f=0;e=this.children;for(c=e.length;f<c;f++)e[f].writeHtml(a)},forEach:function(a,f,e){if(!(e||f&&this.type!=f))var c=a(this);if(!1!==c){e=this.children;for(var d=0;d<e.length;d++)c=e[d],c.type==CKEDITOR.NODE_ELEMENT?c.forEach(a,f):f&&c.type!=f||a(c)}},getFilterContext:function(a){return a||{}}}})();"use strict";(function(){function a(){this.rules=[]}function l(g,f,e,m){var k,h;for(k in f)(h=g[k])||(h=g[k]=new a),h.add(f[k],e,m)}
304
+ CKEDITOR.htmlParser.filter=CKEDITOR.tools.createClass({$:function(g){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;g&&this.addRules(g,10)},proto:{addRules:function(a,f){var e;"number"==typeof f?e=f:f&&"priority"in f&&(e=f.priority);"number"!=typeof e&&(e=10);"object"!=typeof f&&(f={});a.elementNames&&this.elementNameRules.addMany(a.elementNames,
305
+ e,f);a.attributeNames&&this.attributeNameRules.addMany(a.attributeNames,e,f);a.elements&&l(this.elementsRules,a.elements,e,f);a.attributes&&l(this.attributesRules,a.attributes,e,f);a.text&&this.textRules.add(a.text,e,f);a.comment&&this.commentRules.add(a.comment,e,f);a.root&&this.rootRules.add(a.root,e,f)},applyTo:function(a){a.filter(this)},onElementName:function(a,f){return this.elementNameRules.execOnName(a,f)},onAttributeName:function(a,f){return this.attributeNameRules.execOnName(a,f)},onText:function(a,
306
+ f,e){return this.textRules.exec(a,f,e)},onComment:function(a,f,e){return this.commentRules.exec(a,f,e)},onRoot:function(a,f){return this.rootRules.exec(a,f)},onElement:function(a,f){for(var e=[this.elementsRules["^"],this.elementsRules[f.name],this.elementsRules.$],m,k=0;3>k;k++)if(m=e[k]){m=m.exec(a,f,this);if(!1===m)return null;if(m&&m!=f)return this.onNode(a,m);if(f.parent&&!f.name)break}return f},onNode:function(a,f){var e=f.type;return e==CKEDITOR.NODE_ELEMENT?this.onElement(a,f):e==CKEDITOR.NODE_TEXT?
307
+ new CKEDITOR.htmlParser.text(this.onText(a,f.value,f)):e==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(a,f.value,f)):null},onAttribute:function(a,f,e,m){return(e=this.attributesRules[e])?e.exec(a,m,f,this):m}}});CKEDITOR.htmlParser.filterRulesGroup=a;a.prototype={add:function(a,f,e){this.rules.splice(this.findIndex(f),0,{value:a,priority:f,options:e})},addMany:function(a,f,e){for(var m=[this.findIndex(f),0],k=0,h=a.length;k<h;k++)m.push({value:a[k],priority:f,options:e});this.rules.splice.apply(this.rules,
308
+ m)},findIndex:function(a){for(var f=this.rules,e=f.length-1;0<=e&&a<f[e].priority;)e--;return e+1},exec:function(a,f){var e=f instanceof CKEDITOR.htmlParser.node||f instanceof CKEDITOR.htmlParser.fragment,m=Array.prototype.slice.call(arguments,1),k=this.rules,h=k.length,c,d,b,l;for(l=0;l<h;l++)if(e&&(c=f.type,d=f.name),b=k[l],!(a.nonEditable&&!b.options.applyToAll||a.nestedEditable&&b.options.excludeNestedEditable)){b=b.value.apply(null,m);if(!1===b||e&&b&&(b.name!=d||b.type!=c))return b;null!=b&&
309
+ (m[0]=f=b)}return f},execOnName:function(a,f){for(var e=0,m=this.rules,k=m.length,h;f&&e<k;e++)h=m[e],a.nonEditable&&!h.options.applyToAll||a.nestedEditable&&h.options.excludeNestedEditable||(f=f.replace(h.value[0],h.value[1]));return f}}})();(function(){function a(a,b){function c(a){return a||CKEDITOR.env.needsNbspFiller?new CKEDITOR.htmlParser.text(" "):new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function d(a,b){return function(d){if(d.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var e=
310
+ [],k=g(d),l,F;if(k)for(h(k,1)&&e.push(k);k;)m(k)&&(l=f(k))&&h(l)&&((F=f(l))&&!m(F)?e.push(l):(c(n).insertAfter(l),l.remove())),k=k.previous;for(k=0;k<e.length;k++)e[k].remove();if(e=!a||!1!==("function"==typeof b?b(d):b))n||CKEDITOR.env.needsBrFiller||d.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT?n||CKEDITOR.env.needsBrFiller||!(7<document.documentMode||d.name in CKEDITOR.dtd.tr||d.name in CKEDITOR.dtd.$listItem)?(e=g(d),e=!e||"form"==d.name&&"input"==e.name):e=!1:e=!1;e&&d.add(c(a))}}}function h(a,b){if((!n||
311
311
  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(y))&&(c.index&&((new CKEDITOR.htmlParser.text(a.value.substring(0,c.index))).insertBefore(a),a.value=c[0]),!CKEDITOR.env.needsBrFiller&&n&&(!b||a.parent.name in F)||!n&&((c=a.previous)&&"br"==c.name||!c||m(c)))?!0:!1}var l={elements:{}},n="html"==b,F=CKEDITOR.tools.extend({},w),v;for(v in F)"#"in z[v]||delete F[v];for(v in F)l.elements[v]=
312
- d(n,a.config.fillEmptyBlocks);l.root=d(n,!1);l.elements.br=function(a){return function(b){if(b.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var d=b.attributes;if("data-cke-bogus"in d||"data-cke-eol"in d)delete d["data-cke-bogus"];else{for(d=b.next;d&&f(d);)d=d.next;var h=e(b);!d&&m(b.parent)?k(b.parent,c(a)):m(d)&&h&&!m(h)&&c(a).insertBefore(d)}}}}(n);return l}function l(a,b){return a!=CKEDITOR.ENTER_BR&&!1!==b?a==CKEDITOR.ENTER_DIV?"div":"p":!1}function g(a){for(a=a.children[a.children.length-1];a&&
313
- f(a);)a=a.previous;return a}function e(a){for(a=a.previous;a&&f(a);)a=a.previous;return a}function f(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 w||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function k(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 h(a){a=a.attributes;"false"!=a.contenteditable&&
312
+ d(n,a.config.fillEmptyBlocks);l.root=d(n,!1);l.elements.br=function(a){return function(b){if(b.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var d=b.attributes;if("data-cke-bogus"in d||"data-cke-eol"in d)delete d["data-cke-bogus"];else{for(d=b.next;d&&e(d);)d=d.next;var h=f(b);!d&&m(b.parent)?k(b.parent,c(a)):m(d)&&h&&!m(h)&&c(a).insertBefore(d)}}}}(n);return l}function l(a,b){return a!=CKEDITOR.ENTER_BR&&!1!==b?a==CKEDITOR.ENTER_DIV?"div":"p":!1}function g(a){for(a=a.children[a.children.length-1];a&&
313
+ e(a);)a=a.previous;return a}function f(a){for(a=a.previous;a&&e(a);)a=a.previous;return a}function e(a){return a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(a.value)||a.type==CKEDITOR.NODE_ELEMENT&&a.attributes["data-cke-bookmark"]}function m(a){return a&&(a.type==CKEDITOR.NODE_ELEMENT&&a.name in w||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function k(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 h(a){a=a.attributes;"false"!=a.contenteditable&&
314
314
  (a["data-cke-editable"]=a.contenteditable?"true":1);a.contenteditable="false"}function c(a){a=a.attributes;switch(a["data-cke-editable"]){case "true":a.contenteditable="true";break;case "1":delete a.contenteditable}}function d(a){return a.replace(G,function(a,b,c){return"\x3c"+b+c.replace(K,function(a,b){return H.test(b)&&-1==c.indexOf("data-cke-saved-"+b)?" data-cke-saved-"+a+" data-cke-"+CKEDITOR.rnd+"-"+a:a})+"\x3e"})}function b(a,b){return a.replace(b,function(a,b,c){0===a.indexOf("\x3ctextarea")&&
315
315
  (a=b+u(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(I,function(a,b){return decodeURIComponent(b)})}function q(a){return a.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g,function(a){return"\x3c!--"+x+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\x3e"})}function u(a){return a.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)})}
316
- function t(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 r(a,b){var c=[],d=b.config.protectedSource,e=b._.dataStore||(b._.dataStore={id:1}),f=/<\!--\{cke_temp(comment)?\}(\d*?)--\x3e/g,d=[/<script[\s\S]*?(<\/script>|$)/gi,/<noscript[\s\S]*?<\/noscript>/gi,/<meta[\s\S]*?\/?>/gi].concat(d);a=a.replace(/\x3c!--[\s\S]*?--\x3e/g,function(a){return"\x3c!--{cke_tempcomment}"+
317
- (c.push(a)-1)+"--\x3e"});for(var h=0;h<d.length;h++)a=a.replace(d[h],function(a){a=a.replace(f,function(a,b,d){return c[d]});return/cke_temp(comment)?/.test(a)?a:"\x3c!--{cke_temp}"+(c.push(a)-1)+"--\x3e"});a=a.replace(f,function(a,b,d){return"\x3c!--"+x+(b?"{C}":"")+encodeURIComponent(c[d]).replace(/--/g,"%2D%2D")+"--\x3e"});a=a.replace(/<\w+(?:\s+(?:(?:[^\s=>]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=\/>]+))+\s*\/?>/g,function(a){return a.replace(/\x3c!--\{cke_protected\}([^>]*)--\x3e/g,function(a,
318
- b){e[e.id]=decodeURIComponent(b);return"{cke_protected_"+e.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,c,d,e){return"\x3c"+c+d+"\x3e"+t(u(e),b)+"\x3c/"+c+"\x3e"})}var p;CKEDITOR.htmlDataProcessor=function(c){var e,f,h=this;this.editor=c;this.dataFilter=e=new CKEDITOR.htmlParser.filter;this.htmlFilter=f=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;e.addRules(v);e.addRules(D,{applyToAll:!0});e.addRules(a(c,"data"),
319
- {applyToAll:!0});f.addRules(C);f.addRules(A,{applyToAll:!0});f.addRules(a(c,"html"),{applyToAll:!0});c.on("toHtml",function(a){a=a.data;var e=a.dataValue,f,e=p(e),e=r(e,c),e=b(e,M),e=d(e),e=b(e,E),e=e.replace(J,"$1cke:$2"),e=e.replace(L,"\x3ccke:$1$2\x3e\x3c/cke:$1\x3e"),e=e.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,"$1$2$2"),e=e.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2");f=a.context||c.editable().getName();var h;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==f&&(f="div",
320
- e="\x3cpre\x3e"+e+"\x3c/pre\x3e",h=1);f=c.document.createElement(f);f.setHtml("a"+e);e=f.getHtml().substr(1);e=e.replace(new RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");h&&(e=e.replace(/^<pre>|<\/pre>$/gi,""));e=e.replace(F,"$1$2");e=n(e);e=u(e);f=!1===a.fixForBody?!1:l(a.enterMode,c.config.autoParagraph);e=CKEDITOR.htmlParser.fragment.fromHtml(e,a.context,f);f&&(h=e,!h.children.length&&CKEDITOR.dtd[h.name][f]&&(f=new CKEDITOR.htmlParser.element(f),h.add(f)));a.dataValue=e},null,null,5);c.on("toHtml",
316
+ function t(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 r(a,b){var c=[],d=b.config.protectedSource,f=b._.dataStore||(b._.dataStore={id:1}),e=/<\!--\{cke_temp(comment)?\}(\d*?)--\x3e/g,d=[/<script[\s\S]*?(<\/script>|$)/gi,/<noscript[\s\S]*?<\/noscript>/gi,/<meta[\s\S]*?\/?>/gi].concat(d);a=a.replace(/\x3c!--[\s\S]*?--\x3e/g,function(a){return"\x3c!--{cke_tempcomment}"+
317
+ (c.push(a)-1)+"--\x3e"});for(var h=0;h<d.length;h++)a=a.replace(d[h],function(a){a=a.replace(e,function(a,b,d){return c[d]});return/cke_temp(comment)?/.test(a)?a:"\x3c!--{cke_temp}"+(c.push(a)-1)+"--\x3e"});a=a.replace(e,function(a,b,d){return"\x3c!--"+x+(b?"{C}":"")+encodeURIComponent(c[d]).replace(/--/g,"%2D%2D")+"--\x3e"});a=a.replace(/<\w+(?:\s+(?:(?:[^\s=>]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=\/>]+))+\s*\/?>/g,function(a){return a.replace(/\x3c!--\{cke_protected\}([^>]*)--\x3e/g,function(a,
318
+ b){f[f.id]=decodeURIComponent(b);return"{cke_protected_"+f.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,c,d,f){return"\x3c"+c+d+"\x3e"+t(u(f),b)+"\x3c/"+c+"\x3e"})}var p;CKEDITOR.htmlDataProcessor=function(c){var f,e,h=this;this.editor=c;this.dataFilter=f=new CKEDITOR.htmlParser.filter;this.htmlFilter=e=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;f.addRules(v);f.addRules(D,{applyToAll:!0});f.addRules(a(c,"data"),
319
+ {applyToAll:!0});e.addRules(C);e.addRules(A,{applyToAll:!0});e.addRules(a(c,"html"),{applyToAll:!0});c.on("toHtml",function(a){a=a.data;var f=a.dataValue,e,f=p(f),f=r(f,c),f=b(f,M),f=d(f),f=b(f,E),f=f.replace(J,"$1cke:$2"),f=f.replace(L,"\x3ccke:$1$2\x3e\x3c/cke:$1\x3e"),f=f.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,"$1$2$2"),f=f.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2");e=a.context||c.editable().getName();var h;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==e&&(e="div",
320
+ f="\x3cpre\x3e"+f+"\x3c/pre\x3e",h=1);e=c.document.createElement(e);e.setHtml("a"+f);f=e.getHtml().substr(1);f=f.replace(new RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");h&&(f=f.replace(/^<pre>|<\/pre>$/gi,""));f=f.replace(F,"$1$2");f=n(f);f=u(f);e=!1===a.fixForBody?!1:l(a.enterMode,c.config.autoParagraph);f=CKEDITOR.htmlParser.fragment.fromHtml(f,a.context,e);e&&(h=f,!h.children.length&&CKEDITOR.dtd[h.name][e]&&(e=new CKEDITOR.htmlParser.element(e),h.add(e)));a.dataValue=f},null,null,5);c.on("toHtml",
321
321
  function(a){a.data.filter.applyTo(a.data.dataValue,!0,a.data.dontFilter,a.data.enterMode)&&c.fire("dataFiltered")},null,null,6);c.on("toHtml",function(a){a.data.dataValue.filterChildren(h.dataFilter,!0)},null,null,10);c.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=q(b)},null,null,15);c.on("toDataFormat",function(a){var b=a.data.dataValue;a.data.enterMode!=CKEDITOR.ENTER_BR&&(b=b.replace(/^<br *\/?>/i,""));
322
322
  a.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(b,a.data.context,l(a.data.enterMode,c.config.autoParagraph))},null,null,5);c.on("toDataFormat",function(a){a.data.dataValue.filterChildren(h.htmlFilter,!0)},null,null,10);c.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue,!1,!0)},null,null,11);c.on("toDataFormat",function(a){var b=a.data.dataValue,d=h.writer;d.reset();b.writeChildrenHtml(d);b=d.getHtml(!0);b=u(b);b=t(b,c);a.data.dataValue=b},null,null,15)};CKEDITOR.htmlDataProcessor.prototype=
323
- {toHtml:function(a,b,c,d){var e=this.editor,f,h,k,g;b&&"object"==typeof b?(f=b.context,c=b.fixForBody,d=b.dontFilter,h=b.filter,k=b.enterMode,g=b.protectedWhitespaces):f=b;f||null===f||(f=e.editable().getName());return e.fire("toHtml",{dataValue:a,context:f,fixForBody:c,dontFilter:d,filter:h||e.filter,enterMode:k||e.enterMode,protectedWhitespaces:g}).dataValue},toDataFormat:function(a,b){var c,d,e;b&&(c=b.context,d=b.filter,e=b.enterMode);c||null===c||(c=this.editor.editable().getName());return this.editor.fire("toDataFormat",
324
- {dataValue:a,filter:d||this.editor.filter,context:c,enterMode:e||this.editor.enterMode}).dataValue}};var y=/(?:&nbsp;|\xa0)$/,x="{cke_protected}",z=CKEDITOR.dtd,B="caption colgroup col thead tfoot tbody".split(" "),w=CKEDITOR.tools.extend({},z.$blockLimit,z.$block),v={elements:{input:h,textarea:h}},D={attributeNames:[[/^on/,"data-cke-pa-on"],[/^srcdoc/,"data-cke-pa-srcdoc"],[/^data-cke-expando$/,""]],elements:{iframe:function(a){if(a.attributes&&a.attributes.src){var b=a.attributes.src.toLowerCase().replace(/[^a-z]/gi,
323
+ {toHtml:function(a,b,c,d){var f=this.editor,e,h,k,g;b&&"object"==typeof b?(e=b.context,c=b.fixForBody,d=b.dontFilter,h=b.filter,k=b.enterMode,g=b.protectedWhitespaces):e=b;e||null===e||(e=f.editable().getName());return f.fire("toHtml",{dataValue:a,context:e,fixForBody:c,dontFilter:d,filter:h||f.filter,enterMode:k||f.enterMode,protectedWhitespaces:g}).dataValue},toDataFormat:function(a,b){var c,d,f;b&&(c=b.context,d=b.filter,f=b.enterMode);c||null===c||(c=this.editor.editable().getName());return this.editor.fire("toDataFormat",
324
+ {dataValue:a,filter:d||this.editor.filter,context:c,enterMode:f||this.editor.enterMode}).dataValue}};var y=/(?:&nbsp;|\xa0)$/,x="{cke_protected}",z=CKEDITOR.dtd,B="caption colgroup col thead tfoot tbody".split(" "),w=CKEDITOR.tools.extend({},z.$blockLimit,z.$block),v={elements:{input:h,textarea:h}},D={attributeNames:[[/^on/,"data-cke-pa-on"],[/^srcdoc/,"data-cke-pa-srcdoc"],[/^data-cke-expando$/,""]],elements:{iframe:function(a){if(a.attributes&&a.attributes.src){var b=a.attributes.src.toLowerCase().replace(/[^a-z]/gi,
325
325
  "");if(0===b.indexOf("javascript")||0===b.indexOf("data"))a.attributes["data-cke-pa-src"]=a.attributes.src,delete a.attributes.src}}}},C={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||a.attributes["data-cke-saved-name"]))return!1}}},A={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,
326
- ""],[/^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"],d,e=0;e<c.length;e++)d="data-cke-saved-"+c[e],d in b&&delete b[c[e]]}return a},table:function(a){a.children.slice(0).sort(function(a,b){var c,d;a.type==CKEDITOR.NODE_ELEMENT&&b.type==a.type&&(c=CKEDITOR.tools.indexOf(B,a.name),d=CKEDITOR.tools.indexOf(B,b.name));-1<c&&-1<d&&c!=d||(c=a.parent?a.getIndex():-1,d=b.parent?b.getIndex():-1);return c>d?
326
+ ""],[/^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"],d,f=0;f<c.length;f++)d="data-cke-saved-"+c[f],d in b&&delete b[c[f]]}return a},table:function(a){a.children.slice(0).sort(function(a,b){var c,d;a.type==CKEDITOR.NODE_ELEMENT&&b.type==a.type&&(c=CKEDITOR.tools.indexOf(B,a.name),d=CKEDITOR.tools.indexOf(B,b.name));-1<c&&-1<d&&c!=d||(c=a.parent?a.getIndex():-1,d=b.parent?b.getIndex():-1);return c>d?
327
327
  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));a.attributes.type||(a.attributes.type="text/css")},title:function(a){var b=a.children[0];!b&&k(a,b=new CKEDITOR.htmlParser.text);
328
328
  b.value=a.attributes["data-cke-title"]||""},input:c,textarea:c},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||!1}}};CKEDITOR.env.ie&&(A.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})});var G=/<(a|area|img|input|source)\b([^>]*)>/gi,K=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,H=/^(href|src|name)$/i,E=/(?:<style(?=[ >])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,
329
- M=/(<textarea(?=[ >])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,I=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,J=/(<\/?)((?:object|embed|param|html|body|head|title)([\s][^>]*)?>)/gi,F=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,L=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi;p=function(){function a(c){return CKEDITOR.tools.array.reduce(c.split(""),function(a,c){var d=c.toLowerCase(),e=c.toUpperCase(),f=b(d);d!==e&&(f+="|"+b(e));return a+("("+f+")")},"")}function b(a){var c;c=a.charCodeAt(0);var d=c.toString(16);
330
- c={htmlCode:"\x26#"+c+";?",hex:"\x26#x0*"+d+";?",entity:{"\x3c":"\x26lt;","\x3e":"\x26gt;",":":"\x26colon;"}[a]};for(var e in c)c[e]&&(a+="|"+c[e]);return a}var c=new RegExp("("+a("\x3ccke:encoded\x3e")+"(.*?)"+a("\x3c/cke:encoded\x3e")+")|("+a("\x3c")+a("/")+"?"+a("cke:encoded\x3e")+")","gi"),d=new RegExp("(("+a("{cke_protected")+")(_[0-9]*)?"+a("}")+")","gi");return function(a){return a.replace(c,"").replace(d,"")}}()})();"use strict";CKEDITOR.htmlParser.element=function(a,l){this.name=a;this.attributes=
331
- l||{};this.children=[];var g=a||"",e=g.match(/^cke:(.*)/);e&&(g=e[1]);g=!!(CKEDITOR.dtd.$nonBodyContent[g]||CKEDITOR.dtd.$block[g]||CKEDITOR.dtd.$listItem[g]||CKEDITOR.dtd.$tableContent[g]||CKEDITOR.dtd.$nonEditable[g]||"br"==g);this.isEmpty=!!CKEDITOR.dtd.$empty[a];this.isUnknown=!CKEDITOR.dtd[a];this._={isBlockLike:g,hasInlineStarted:this.isEmpty||!g}};CKEDITOR.htmlParser.cssStyle=function(a){var l={};((a instanceof CKEDITOR.htmlParser.element?a.attributes.style:a)||"").replace(/&quot;/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,
332
- function(a,e,f){"font-family"==e&&(f=f.replace(/["']/g,""));l[e.toLowerCase()]=f});return{rules:l,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 l)l[e]&&a.push(e,":",l[e],";");return a.join("")}}};(function(){function a(a){return function(f){return f.type==CKEDITOR.NODE_ELEMENT&&("string"==typeof a?f.name==a:f.name in a)}}var l=
333
- function(a,f){a=a[0];f=f[0];return a<f?-1:a>f?1:0},g=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:g.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(a,f){var g=this,k,h;f=g.getFilterContext(f);if(!g.parent)a.onRoot(f,g);for(;;){k=g.name;if(!(h=a.onElementName(f,k)))return this.remove(),!1;g.name=h;if(!(g=a.onElement(f,g)))return this.remove(),
334
- !1;if(g!==this)return this.replaceWith(g),!1;if(g.name==k)break;if(g.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(g),!1;if(!g.name)return this.replaceWithChildren(),!1}k=g.attributes;var c,d;for(c in k){for(h=k[c];;)if(d=a.onAttributeName(f,c))if(d!=c)delete k[c],c=d;else break;else{delete k[c];break}d&&(!1===(h=a.onAttribute(f,g,d,h))?delete k[d]:k[d]=h)}g.isEmpty||this.filterChildren(a,!1,f);return!0},filterChildren:g.filterChildren,writeHtml:function(a,f){f&&this.filter(f);var g=this.name,
335
- k=[],h=this.attributes,c,d;a.openTag(g,h);for(c in h)k.push([c,h[c]]);a.sortAttributes&&k.sort(l);c=0;for(d=k.length;c<d;c++)h=k[c],a.attribute(h[0],h[1]);a.openTagClose(g,this.isEmpty);this.writeChildrenHtml(a);this.isEmpty||a.closeTag(g)},writeChildrenHtml:g.writeChildrenHtml,replaceWithChildren:function(){for(var a=this.children,f=a.length;f;)a[--f].insertAfter(this);this.remove()},forEach:g.forEach,getFirst:function(e){if(!e)return this.children.length?this.children[0]:null;"function"!=typeof e&&
336
- (e=a(e));for(var f=0,g=this.children.length;f<g;++f)if(e(this.children[f]))return this.children[f];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 f=0,g=a.length;f<g;++f)a[f].parent=this},getOuterHtml:function(){var a=new CKEDITOR.htmlParser.basicWriter;this.writeHtml(a);return a.getHtml()},split:function(a){for(var f=this.children.splice(a,
337
- this.children.length-a),g=this.clone(),k=0;k<f.length;++k)f[k].parent=g;g.children=f;f[0]&&(f[0].previous=null);0<a&&(this.children[a-1].next=null);this.parent.add(g,this.getIndex()+1);return g},find:function(a,f){void 0===f&&(f=!1);var g=[],k;for(k=0;k<this.children.length;k++){var h=this.children[k];"function"==typeof a&&a(h)?g.push(h):"string"==typeof a&&h.name===a&&g.push(h);f&&h.find&&(g=g.concat(h.find(a,f)))}return g},findOne:function(a,f){var g=null,k=CKEDITOR.tools.array.find(this.children,
338
- function(h){var c="function"===typeof a?a(h):h.name===a;if(c||!f)return c;h.children&&h.findOne&&(g=h.findOne(a,!0));return!!g});return g||k||null},addClass:function(a){if(!this.hasClass(a)){var f=this.attributes["class"]||"";this.attributes["class"]=f+(f?" ":"")+a}},removeClass:function(a){var f=this.attributes["class"];f&&((f=CKEDITOR.tools.trim(f.replace(new RegExp("(?:\\s+|^)"+a+"(?:\\s+|$)")," ")))?this.attributes["class"]=f:delete this.attributes["class"])},hasClass:function(a){var f=this.attributes["class"];
339
- return f?(new RegExp("(?:^|\\s)"+a+"(?\x3d\\s|$)")).test(f):!1},getFilterContext:function(a){var f=[];a||(a={nonEditable:!1,nestedEditable:!1});a.nonEditable||"false"!=this.attributes.contenteditable?a.nonEditable&&!a.nestedEditable&&"true"==this.attributes.contenteditable&&f.push("nestedEditable",!0):f.push("nonEditable",!0);if(f.length){a=CKEDITOR.tools.copy(a);for(var g=0;g<f.length;g+=2)a[f[g]]=f[g+1]}return a}},!0)})();(function(){var a=/{([^}]+)}/g;CKEDITOR.template=function(a){this.source=
340
- "function"===typeof a?a:String(a)};CKEDITOR.template.prototype.output=function(l,g){var e=("function"===typeof this.source?this.source(l):this.source).replace(a,function(a,e){return void 0!==l[e]?l[e]:a});return g?g.push(e):e}})();delete CKEDITOR.loadFullCore;CKEDITOR.instances={};CKEDITOR.document=new CKEDITOR.dom.document(document);CKEDITOR.add=function(a){function l(){CKEDITOR.currentInstance==a&&(CKEDITOR.currentInstance=null,CKEDITOR.fire("currentInstance"))}CKEDITOR.instances[a.name]=a;a.on("focus",
341
- function(){CKEDITOR.currentInstance!=a&&(CKEDITOR.currentInstance=a,CKEDITOR.fire("currentInstance"))});a.on("blur",l);a.on("destroy",l);CKEDITOR.fire("instance",null,a)};CKEDITOR.remove=function(a){delete CKEDITOR.instances[a.name]};(function(){var a={};CKEDITOR.addTemplate=function(l,g){var e=a[l];if(e)return e;e={name:l,source:g};CKEDITOR.fire("template",e);return a[l]=new CKEDITOR.template(e.source)};CKEDITOR.getTemplate=function(l){return a[l]}})();(function(){var a=[];CKEDITOR.addCss=function(l){a.push(l)};
342
- 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=function(a,l){a=CKEDITOR.editor._getEditorElement(a);if(!a)return null;var g=new CKEDITOR.editor(l,a,CKEDITOR.ELEMENT_MODE_INLINE),e=a.is("textarea")?a:null;e?(g.setData(e.getValue(),null,!0),a=CKEDITOR.dom.element.createFromHtml('\x3cdiv contenteditable\x3d"'+
343
- !!g.readOnly+'" class\x3d"cke_textarea_inline"\x3e'+e.getValue()+"\x3c/div\x3e",CKEDITOR.document),a.insertAfter(e),e.hide(),e.$.form&&g._attachToForm()):(l&&"undefined"!==typeof l.readOnly&&!l.readOnly&&a.setAttribute("contenteditable","true"),g.setData(a.getHtml(),null,!0));g.on("loaded",function(){g.fire("uiReady");g.editable(a);g.container=a;g.ui.contentsElement=a;g.setData(g.getData(1));g.resetDirty();g.fire("contentDom");g.mode="wysiwyg";g.fire("mode");g.status="ready";g.fireOnce("instanceReady");
344
- CKEDITOR.fire("instanceReady",null,g)},null,null,1E4);g.on("destroy",function(){var a=g.container;e&&a&&(a.clearCustomData(),a.remove());e&&e.show();g.element.clearCustomData();delete g.element});return g};CKEDITOR.inlineAll=function(){var a,l,g;for(g in CKEDITOR.dtd.$editable)for(var e=CKEDITOR.document.getElementsByTag(g),f=0,m=e.count();f<m;f++)a=e.getItem(f),"true"==a.getAttribute("contenteditable")&&(l={element:a,config:{}},!1!==CKEDITOR.fire("inline",l)&&CKEDITOR.inline(a,l.config))};CKEDITOR.domReady(function(){!CKEDITOR.disableAutoInline&&
345
- CKEDITOR.inlineAll()})})();CKEDITOR.replaceClass="ckeditor";(function(){function a(a,f,m,k){a=CKEDITOR.editor._getEditorElement(a);if(!a)return null;var h=new CKEDITOR.editor(f,a,k);k==CKEDITOR.ELEMENT_MODE_REPLACE&&(a.setStyle("visibility","hidden"),h._.required=a.hasAttribute("required"),a.removeAttribute("required"));m&&h.setData(m,null,!0);h.on("loaded",function(){h.isDestroyed()||h.isDetached()||(g(h),k==CKEDITOR.ELEMENT_MODE_REPLACE&&h.config.autoUpdateElement&&a.$.form&&h._attachToForm(),h.setMode(h.config.startupMode,
346
- function(){h.resetDirty();h.status="ready";h.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,h)}))});h.on("destroy",l);return h}function l(){var a=this.container,f=this.element;a&&(a.clearCustomData(),a.remove());f&&(f.clearCustomData(),this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(f.show(),this._.required&&f.setAttribute("required","required")),delete this.element)}function g(a){var f=a.name,g=a.element,k=a.elementMode,h=a.fire("uiSpace",{space:"top",html:""}).html,c=a.fire("uiSpace",
329
+ M=/(<textarea(?=[ >])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,I=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,J=/(<\/?)((?:object|embed|param|html|body|head|title)([\s][^>]*)?>)/gi,F=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,L=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi;p=function(){function a(c){return CKEDITOR.tools.array.reduce(c.split(""),function(a,c){var d=c.toLowerCase(),f=c.toUpperCase(),e=b(d);d!==f&&(e+="|"+b(f));return a+("("+e+")")},"")}function b(a){var c;c=a.charCodeAt(0);var d=c.toString(16);
330
+ c={htmlCode:"\x26#"+c+";?",hex:"\x26#x0*"+d+";?",entity:{"\x3c":"\x26lt;","\x3e":"\x26gt;",":":"\x26colon;"}[a]};for(var f in c)c[f]&&(a+="|"+c[f]);return a}var c=new RegExp("("+a("\x3ccke:encoded\x3e")+"(.*?)"+a("\x3c/cke:encoded\x3e")+")|("+a("\x3c")+a("/")+"?"+a("cke:encoded\x3e")+")","gi"),d=new RegExp("(("+a("{cke_protected")+")(_[0-9]*)?"+a("}")+")","gi");return function(a){return a.replace(c,"").replace(d,"")}}()})();"use strict";CKEDITOR.htmlParser.element=function(a,l){this.name=a;this.attributes=
331
+ l||{};this.children=[];var g=a||"",f=g.match(/^cke:(.*)/);f&&(g=f[1]);g=!!(CKEDITOR.dtd.$nonBodyContent[g]||CKEDITOR.dtd.$block[g]||CKEDITOR.dtd.$listItem[g]||CKEDITOR.dtd.$tableContent[g]||CKEDITOR.dtd.$nonEditable[g]||"br"==g);this.isEmpty=!!CKEDITOR.dtd.$empty[a];this.isUnknown=!CKEDITOR.dtd[a];this._={isBlockLike:g,hasInlineStarted:this.isEmpty||!g}};CKEDITOR.htmlParser.cssStyle=function(a){var l={};((a instanceof CKEDITOR.htmlParser.element?a.attributes.style:a)||"").replace(/&quot;/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,
332
+ function(a,f,e){"font-family"==f&&(e=e.replace(/["']/g,""));l[f.toLowerCase()]=e});return{rules:l,populate:function(a){var f=this.toString();f&&(a instanceof CKEDITOR.dom.element?a.setAttribute("style",f):a instanceof CKEDITOR.htmlParser.element?a.attributes.style=f:a.style=f)},toString:function(){var a=[],f;for(f in l)l[f]&&a.push(f,":",l[f],";");return a.join("")}}};(function(){function a(a){return function(e){return e.type==CKEDITOR.NODE_ELEMENT&&("string"==typeof a?e.name==a:e.name in a)}}var l=
333
+ function(a,e){a=a[0];e=e[0];return a<e?-1:a>e?1:0},g=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:g.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(a,e){var g=this,k,h;e=g.getFilterContext(e);if(!g.parent)a.onRoot(e,g);for(;;){k=g.name;if(!(h=a.onElementName(e,k)))return this.remove(),!1;g.name=h;if(!(g=a.onElement(e,g)))return this.remove(),
334
+ !1;if(g!==this)return this.replaceWith(g),!1;if(g.name==k)break;if(g.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(g),!1;if(!g.name)return this.replaceWithChildren(),!1}k=g.attributes;var c,d;for(c in k){for(h=k[c];;)if(d=a.onAttributeName(e,c))if(d!=c)delete k[c],c=d;else break;else{delete k[c];break}d&&(!1===(h=a.onAttribute(e,g,d,h))?delete k[d]:k[d]=h)}g.isEmpty||this.filterChildren(a,!1,e);return!0},filterChildren:g.filterChildren,writeHtml:function(a,e){e&&this.filter(e);var g=this.name,
335
+ k=[],h=this.attributes,c,d;a.openTag(g,h);for(c in h)k.push([c,h[c]]);a.sortAttributes&&k.sort(l);c=0;for(d=k.length;c<d;c++)h=k[c],a.attribute(h[0],h[1]);a.openTagClose(g,this.isEmpty);this.writeChildrenHtml(a);this.isEmpty||a.closeTag(g)},writeChildrenHtml:g.writeChildrenHtml,replaceWithChildren:function(){for(var a=this.children,e=a.length;e;)a[--e].insertAfter(this);this.remove()},forEach:g.forEach,getFirst:function(f){if(!f)return this.children.length?this.children[0]:null;"function"!=typeof f&&
336
+ (f=a(f));for(var e=0,g=this.children.length;e<g;++e)if(f(this.children[e]))return this.children[e];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 e=0,g=a.length;e<g;++e)a[e].parent=this},getOuterHtml:function(){var a=new CKEDITOR.htmlParser.basicWriter;this.writeHtml(a);return a.getHtml()},split:function(a){for(var e=this.children.splice(a,
337
+ this.children.length-a),g=this.clone(),k=0;k<e.length;++k)e[k].parent=g;g.children=e;e[0]&&(e[0].previous=null);0<a&&(this.children[a-1].next=null);this.parent.add(g,this.getIndex()+1);return g},find:function(a,e){void 0===e&&(e=!1);var g=[],k;for(k=0;k<this.children.length;k++){var h=this.children[k];"function"==typeof a&&a(h)?g.push(h):"string"==typeof a&&h.name===a&&g.push(h);e&&h.find&&(g=g.concat(h.find(a,e)))}return g},findOne:function(a,e){var g=null,k=CKEDITOR.tools.array.find(this.children,
338
+ function(h){var c="function"===typeof a?a(h):h.name===a;if(c||!e)return c;h.children&&h.findOne&&(g=h.findOne(a,!0));return!!g});return g||k||null},addClass:function(a){if(!this.hasClass(a)){var e=this.attributes["class"]||"";this.attributes["class"]=e+(e?" ":"")+a}},removeClass:function(a){var e=this.attributes["class"];e&&((e=CKEDITOR.tools.trim(e.replace(new RegExp("(?:\\s+|^)"+a+"(?:\\s+|$)")," ")))?this.attributes["class"]=e:delete this.attributes["class"])},hasClass:function(a){var e=this.attributes["class"];
339
+ return e?(new RegExp("(?:^|\\s)"+a+"(?\x3d\\s|$)")).test(e):!1},getFilterContext:function(a){var e=[];a||(a={nonEditable:!1,nestedEditable:!1});a.nonEditable||"false"!=this.attributes.contenteditable?a.nonEditable&&!a.nestedEditable&&"true"==this.attributes.contenteditable&&e.push("nestedEditable",!0):e.push("nonEditable",!0);if(e.length){a=CKEDITOR.tools.copy(a);for(var g=0;g<e.length;g+=2)a[e[g]]=e[g+1]}return a}},!0)})();(function(){var a=/{([^}]+)}/g;CKEDITOR.template=function(a){this.source=
340
+ "function"===typeof a?a:String(a)};CKEDITOR.template.prototype.output=function(l,g){var f=("function"===typeof this.source?this.source(l):this.source).replace(a,function(a,f){return void 0!==l[f]?l[f]:a});return g?g.push(f):f}})();delete CKEDITOR.loadFullCore;CKEDITOR.instances={};CKEDITOR.document=new CKEDITOR.dom.document(document);CKEDITOR.add=function(a){function l(){CKEDITOR.currentInstance==a&&(CKEDITOR.currentInstance=null,CKEDITOR.fire("currentInstance"))}CKEDITOR.instances[a.name]=a;a.on("focus",
341
+ function(){CKEDITOR.currentInstance!=a&&(CKEDITOR.currentInstance=a,CKEDITOR.fire("currentInstance"))});a.on("blur",l);a.on("destroy",l);CKEDITOR.fire("instance",null,a)};CKEDITOR.remove=function(a){delete CKEDITOR.instances[a.name]};(function(){var a={};CKEDITOR.addTemplate=function(l,g){var f=a[l];if(f)return f;f={name:l,source:g};CKEDITOR.fire("template",f);return a[l]=new CKEDITOR.template(f.source)};CKEDITOR.getTemplate=function(l){return a[l]}})();(function(){var a=[];CKEDITOR.addCss=function(l){a.push(l)};
342
+ 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=function(a,l){a=CKEDITOR.editor._getEditorElement(a);if(!a)return null;var g=new CKEDITOR.editor(l,a,CKEDITOR.ELEMENT_MODE_INLINE),f=a.is("textarea")?a:null;f?(g.setData(f.getValue(),null,!0),a=CKEDITOR.dom.element.createFromHtml('\x3cdiv contenteditable\x3d"'+
343
+ !!g.readOnly+'" class\x3d"cke_textarea_inline"\x3e'+f.getValue()+"\x3c/div\x3e",CKEDITOR.document),a.insertAfter(f),f.hide(),f.$.form&&g._attachToForm()):(l&&"undefined"!==typeof l.readOnly&&!l.readOnly&&a.setAttribute("contenteditable","true"),g.setData(a.getHtml(),null,!0));g.on("loaded",function(){g.fire("uiReady");g.editable(a);g.container=a;g.ui.contentsElement=a;g.setData(g.getData(1));g.resetDirty();g.fire("contentDom");g.mode="wysiwyg";g.fire("mode");g.status="ready";g.fireOnce("instanceReady");
344
+ CKEDITOR.fire("instanceReady",null,g)},null,null,1E4);g.on("destroy",function(){var a=g.container;f&&a&&(a.clearCustomData(),a.remove());f&&f.show();g.element.clearCustomData();delete g.element});return g};CKEDITOR.inlineAll=function(){var a,l,g;for(g in CKEDITOR.dtd.$editable)for(var f=CKEDITOR.document.getElementsByTag(g),e=0,m=f.count();e<m;e++)a=f.getItem(e),"true"==a.getAttribute("contenteditable")&&(l={element:a,config:{}},!1!==CKEDITOR.fire("inline",l)&&CKEDITOR.inline(a,l.config))};CKEDITOR.domReady(function(){!CKEDITOR.disableAutoInline&&
345
+ CKEDITOR.inlineAll()})})();CKEDITOR.replaceClass="ckeditor";(function(){function a(a,e,m,k){a=CKEDITOR.editor._getEditorElement(a);if(!a)return null;var h=new CKEDITOR.editor(e,a,k);k==CKEDITOR.ELEMENT_MODE_REPLACE&&(a.setStyle("visibility","hidden"),h._.required=a.hasAttribute("required"),a.removeAttribute("required"));m&&h.setData(m,null,!0);h.on("loaded",function(){h.isDestroyed()||h.isDetached()||(g(h),k==CKEDITOR.ELEMENT_MODE_REPLACE&&h.config.autoUpdateElement&&a.$.form&&h._attachToForm(),h.setMode(h.config.startupMode,
346
+ function(){h.resetDirty();h.status="ready";h.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,h)}))});h.on("destroy",l);return h}function l(){var a=this.container,e=this.element;a&&(a.clearCustomData(),a.remove());e&&(e.clearCustomData(),this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(e.show(),this._.required&&e.setAttribute("required","required")),delete this.element)}function g(a){var e=a.name,g=a.element,k=a.elementMode,h=a.fire("uiSpace",{space:"top",html:""}).html,c=a.fire("uiSpace",
347
347
  {space:"bottom",html:""}).html,d=new CKEDITOR.template('\x3c{outerEl} id\x3d"cke_{name}" class\x3d"{id} cke cke_reset cke_chrome cke_editor_{name} cke_{langDir} '+CKEDITOR.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'),
348
- f=CKEDITOR.dom.element.createFromHtml(d.output({id:a.id,name:f,langDir:a.lang.dir,langCode:a.langCode,voiceLabel:a.title,topHtml:h?'\x3cspan id\x3d"'+a.ui.spaceId("top")+'" class\x3d"cke_top cke_reset_all" role\x3d"presentation" style\x3d"height:auto"\x3e'+h+"\x3c/span\x3e":"",contentId:a.ui.spaceId("contents"),bottomHtml:c?'\x3cspan id\x3d"'+a.ui.spaceId("bottom")+'" class\x3d"cke_bottom cke_reset_all" role\x3d"presentation"\x3e'+c+"\x3c/span\x3e":"",outerEl:CKEDITOR.env.ie?"span":"div"}));k==CKEDITOR.ELEMENT_MODE_REPLACE?
349
- (g.hide(),f.insertAfter(g)):g.append(f);a.container=f;a.ui.contentsElement=a.ui.space("contents");h&&a.ui.space("top").unselectable();c&&a.ui.space("bottom").unselectable();g=a.config.width;k=a.config.height;g&&f.setStyle("width",CKEDITOR.tools.cssLength(g));k&&a.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(k));f.disableContextMenu();CKEDITOR.env.webkit&&f.on("focus",function(){a.focus()});a.fireOnce("uiReady")}CKEDITOR.replace=function(e,f){return a(e,f,null,CKEDITOR.ELEMENT_MODE_REPLACE)};
350
- CKEDITOR.appendTo=function(e,f,g){return a(e,f,g,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var a=document.getElementsByTagName("textarea"),f=0;f<a.length;f++){var g=null,k=a[f];if(k.name||k.id){if("string"==typeof arguments[0]){if(!(new RegExp("(?:^|\\s)"+arguments[0]+"(?:$|\\s)")).test(k.className))continue}else if("function"==typeof arguments[0]&&(g={},!1===arguments[0](k,g)))continue;this.replace(k,g)}}};CKEDITOR.editor.prototype.addMode=function(a,f){(this._.modes||(this._.modes=
351
- {}))[a]=f};CKEDITOR.editor.prototype.setMode=function(a,f){var g=this,k=this._.modes;if(a!=g.mode&&k&&k[a]){g.fire("beforeSetMode",a);if(g.mode){var h=g.checkDirty(),k=g._.previousModeData,c,d=0;g.fire("beforeModeUnload");g.editable(0);g._.previousMode=g.mode;g._.previousModeData=c=g.getData(1);"source"==g.mode&&k==c&&(g.fire("lockSnapshot",{forceUpdate:!0}),d=1);g.ui.space("contents").setHtml("");g.mode=""}else g._.previousModeData=g.getData(1);this._.modes[a](function(){g.mode=a;void 0!==h&&!h&&
352
- g.resetDirty();d?g.fire("unlockSnapshot"):"wysiwyg"==a&&g.fire("saveSnapshot");setTimeout(function(){g.isDestroyed()||g.isDetached()||(g.fire("mode"),f&&f.call(g))},0)})}};CKEDITOR.editor.prototype.resize=function(a,f,g,k){var h=this.container,c=this.ui.space("contents"),d=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement;k=k?this.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_inner")}):h;a=CKEDITOR.tools.convertToPx(CKEDITOR.tools.cssLength(a));
353
- k.setSize("width",a,!0);d&&(d.style.width="1%");f=CKEDITOR.tools.convertToPx(CKEDITOR.tools.cssLength(f));var b=(k.$.offsetHeight||0)-(c.$.clientHeight||0),h=Math.max(f-(g?0:b),0);f=g?f+b:f;c.setStyle("height",CKEDITOR.tools.cssLength(h));d&&(d.style.width="100%");this.fire("resize",{outerHeight:f,contentsHeight:h,outerWidth:a||k.getSize("width")})};CKEDITOR.editor.prototype.getResizable=function(a){return a?this.ui.space("contents"):this.container};CKEDITOR.domReady(function(){CKEDITOR.replaceClass&&
354
- CKEDITOR.replaceAll(CKEDITOR.replaceClass)})})();CKEDITOR.config.startupMode="wysiwyg";(function(){function a(a){var b=a.editor,c=a.data.path,d=c.blockLimit,f=a.data.selection,h=f.getRanges()[0],g;if(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)if(f=l(f,c))f.appendBogus(),g=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.edge&&b._.previousActive;k(b,c.block,d)&&h.collapsed&&!h.getCommonAncestor().isReadOnly()&&(c=h.clone(),c.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),d=new CKEDITOR.dom.walker(c),
355
- d.guard=function(a){return!e(a)||a.type==CKEDITOR.NODE_COMMENT||a.isReadOnly()},!d.checkForward()||c.checkStartOfBlock()&&c.checkEndOfBlock())&&(b=h.fixBlock(!0,b.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p"),CKEDITOR.env.needsBrFiller||(b=b.getFirst(e))&&b.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(b.getText()).match(/^(?:&nbsp;|\xa0)$/)&&b.remove(),g=1,a.cancel());g&&h.select()}function l(a,b){if(a.isFake)return 0;var c=b.block||b.blockLimit,d=c&&c.getLast(e);if(!(!c||!c.isBlockBoundary()||
356
- d&&d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary()||c.is("pre")||c.getBogus()))return c}function g(a){var b=a.data.getTarget();b.is("input")&&(b=b.getAttribute("type"),"submit"!=b&&"reset"!=b||a.data.preventDefault())}function e(a){return n(a)&&q(a)}function f(a,b){return function(c){var d=c.data.$.toElement||c.data.$.fromElement||c.data.$.relatedTarget;(d=d&&d.nodeType==CKEDITOR.NODE_ELEMENT?new CKEDITOR.dom.element(d):null)&&(b.equals(d)||b.contains(d))||a.call(this,c)}}function m(a){function b(a){return function(b,
357
- d){d&&b.type==CKEDITOR.NODE_ELEMENT&&b.is(f)&&(c=b);if(!(d||!e(b)||a&&t(b)))return!1}}var c,d=a.getRanges()[0];a=a.root;var f={table:1,ul:1,ol:1,dl:1};if(d.startPath().contains(f)){var h=d.clone();h.collapse(1);h.setStartAt(a,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(h);a.guard=b();a.checkBackward();if(c)return h=d.clone(),h.collapse(),h.setEndAt(c,CKEDITOR.POSITION_AFTER_END),a=new CKEDITOR.dom.walker(h),a.guard=b(!0),c=!1,a.checkForward(),c}return null}function k(a,b,c){return!1!==
348
+ e=CKEDITOR.dom.element.createFromHtml(d.output({id:a.id,name:e,langDir:a.lang.dir,langCode:a.langCode,voiceLabel:a.title,topHtml:h?'\x3cspan id\x3d"'+a.ui.spaceId("top")+'" class\x3d"cke_top cke_reset_all" role\x3d"presentation" style\x3d"height:auto"\x3e'+h+"\x3c/span\x3e":"",contentId:a.ui.spaceId("contents"),bottomHtml:c?'\x3cspan id\x3d"'+a.ui.spaceId("bottom")+'" class\x3d"cke_bottom cke_reset_all" role\x3d"presentation"\x3e'+c+"\x3c/span\x3e":"",outerEl:CKEDITOR.env.ie?"span":"div"}));k==CKEDITOR.ELEMENT_MODE_REPLACE?
349
+ (g.hide(),e.insertAfter(g)):g.append(e);a.container=e;a.ui.contentsElement=a.ui.space("contents");h&&a.ui.space("top").unselectable();c&&a.ui.space("bottom").unselectable();g=a.config.width;k=a.config.height;g&&e.setStyle("width",CKEDITOR.tools.cssLength(g));k&&a.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(k));e.disableContextMenu();CKEDITOR.env.webkit&&e.on("focus",function(){a.focus()});a.fireOnce("uiReady")}CKEDITOR.replace=function(f,e){return a(f,e,null,CKEDITOR.ELEMENT_MODE_REPLACE)};
350
+ CKEDITOR.appendTo=function(f,e,g){return a(f,e,g,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var a=document.getElementsByTagName("textarea"),e=0;e<a.length;e++){var g=null,k=a[e];if(k.name||k.id){if("string"==typeof arguments[0]){if(!(new RegExp("(?:^|\\s)"+arguments[0]+"(?:$|\\s)")).test(k.className))continue}else if("function"==typeof arguments[0]&&(g={},!1===arguments[0](k,g)))continue;this.replace(k,g)}}};CKEDITOR.editor.prototype.addMode=function(a,e){(this._.modes||(this._.modes=
351
+ {}))[a]=e};CKEDITOR.editor.prototype.setMode=function(a,e){var g=this,k=this._.modes;if(a!=g.mode&&k&&k[a]){g.fire("beforeSetMode",a);if(g.mode){var h=g.checkDirty(),k=g._.previousModeData,c,d=0;g.fire("beforeModeUnload");g.editable(0);g._.previousMode=g.mode;g._.previousModeData=c=g.getData(1);"source"==g.mode&&k==c&&(g.fire("lockSnapshot",{forceUpdate:!0}),d=1);g.ui.space("contents").setHtml("");g.mode=""}else g._.previousModeData=g.getData(1);this._.modes[a](function(){g.mode=a;void 0!==h&&!h&&
352
+ g.resetDirty();d?g.fire("unlockSnapshot"):"wysiwyg"==a&&g.fire("saveSnapshot");setTimeout(function(){g.isDestroyed()||g.isDetached()||(g.fire("mode"),e&&e.call(g))},0)})}};CKEDITOR.editor.prototype.resize=function(a,e,g,k){var h=this.container,c=this.ui.space("contents"),d=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement;k=k?this.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_inner")}):h;a=CKEDITOR.tools.convertToPx(CKEDITOR.tools.cssLength(a));
353
+ k.setSize("width",a,!0);d&&(d.style.width="1%");e=CKEDITOR.tools.convertToPx(CKEDITOR.tools.cssLength(e));var b=(k.$.offsetHeight||0)-(c.$.clientHeight||0),h=Math.max(e-(g?0:b),0);e=g?e+b:e;c.setStyle("height",CKEDITOR.tools.cssLength(h));d&&(d.style.width="100%");this.fire("resize",{outerHeight:e,contentsHeight:h,outerWidth:a||k.getSize("width")})};CKEDITOR.editor.prototype.getResizable=function(a){return a?this.ui.space("contents"):this.container};CKEDITOR.domReady(function(){CKEDITOR.replaceClass&&
354
+ CKEDITOR.replaceAll(CKEDITOR.replaceClass)})})();CKEDITOR.config.startupMode="wysiwyg";(function(){function a(a){var b=a.editor,c=a.data.path,d=c.blockLimit,e=a.data.selection,h=e.getRanges()[0],g;if(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)if(e=l(e,c))e.appendBogus(),g=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.edge&&b._.previousActive;k(b,c.block,d)&&h.collapsed&&!h.getCommonAncestor().isReadOnly()&&(c=h.clone(),c.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),d=new CKEDITOR.dom.walker(c),
355
+ d.guard=function(a){return!f(a)||a.type==CKEDITOR.NODE_COMMENT||a.isReadOnly()},!d.checkForward()||c.checkStartOfBlock()&&c.checkEndOfBlock())&&(b=h.fixBlock(!0,b.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p"),CKEDITOR.env.needsBrFiller||(b=b.getFirst(f))&&b.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(b.getText()).match(/^(?:&nbsp;|\xa0)$/)&&b.remove(),g=1,a.cancel());g&&h.select()}function l(a,b){if(a.isFake)return 0;var c=b.block||b.blockLimit,d=c&&c.getLast(f);if(!(!c||!c.isBlockBoundary()||
356
+ d&&d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary()||c.is("pre")||c.getBogus()))return c}function g(a){var b=a.data.getTarget();b.is("input")&&(b=b.getAttribute("type"),"submit"!=b&&"reset"!=b||a.data.preventDefault())}function f(a){return n(a)&&q(a)}function e(a,b){return function(c){var d=c.data.$.toElement||c.data.$.fromElement||c.data.$.relatedTarget;(d=d&&d.nodeType==CKEDITOR.NODE_ELEMENT?new CKEDITOR.dom.element(d):null)&&(b.equals(d)||b.contains(d))||a.call(this,c)}}function m(a){function b(a){return function(b,
357
+ d){d&&b.type==CKEDITOR.NODE_ELEMENT&&b.is(e)&&(c=b);if(!(d||!f(b)||a&&t(b)))return!1}}var c,d=a.getRanges()[0];a=a.root;var e={table:1,ul:1,ol:1,dl:1};if(d.startPath().contains(e)){var h=d.clone();h.collapse(1);h.setStartAt(a,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(h);a.guard=b();a.checkBackward();if(c)return h=d.clone(),h.collapse(),h.setEndAt(c,CKEDITOR.POSITION_AFTER_END),a=new CKEDITOR.dom.walker(h),a.guard=b(!0),c=!1,a.checkForward(),c}return null}function k(a,b,c){return!1!==
358
358
  a.config.autoParagraph&&a.activeEnterMode!=CKEDITOR.ENTER_BR&&(a.editable().equals(c)&&!b||b&&"true"==b.getAttribute("contenteditable"))}function h(a){return a.activeEnterMode!=CKEDITOR.ENTER_BR&&!1!==a.config.autoParagraph?a.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p":!1}function c(a){a&&a.isEmptyInlineRemoveable()&&a.remove()}function d(a){var b=a.editor;b.getSelection().scrollIntoView();setTimeout(function(){b.fire("saveSnapshot")},0)}function b(a,b,c){var d=a.getCommonAncestor(b);for(b=a=c?
359
359
  b:a;(a=a.getParent())&&!d.equals(a)&&1==a.getChildCount();)b=a;b.remove()}var n,q,u,t,r,p,y,x,z,B;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;if(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&&
360
360
  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;this.$.focus();this.$.scrollTop=b}else this.$.focus();else 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())},
361
- on:function(a,b){var c=Array.prototype.slice.call(arguments,0);CKEDITOR.env.ie&&/^focus|blur$/.exec(a)&&(a="focus"==a?"focusin":"focusout",b=f(b,this),c[0]=a,c[1]=b);return CKEDITOR.dom.element.prototype.on.apply(this,c)},attachListener:function(a){!this._.listeners&&(this._.listeners=[]);var b=Array.prototype.slice.call(arguments,1),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=
361
+ on:function(a,b){var c=Array.prototype.slice.call(arguments,0);CKEDITOR.env.ie&&/^focus|blur$/.exec(a)&&(a="focus"==a?"focusin":"focusout",b=e(b,this),c[0]=a,c[1]=b);return CKEDITOR.dom.element.prototype.on.apply(this,c)},attachListener:function(a){!this._.listeners&&(this._.listeners=[]);var b=Array.prototype.slice.call(arguments,1),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=
362
362
  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);b!==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),
363
- "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 e=this.editor;e.focus();e.fire("saveSnapshot");c||(c=e.getSelection().getRanges()[0]);p(this,b||"html",a,c);c.select();d(this);this.editor.fire("afterInsertHtml",{})},insertHtmlIntoRange:function(a,b,c){p(this,c||"html",a,b);this.editor.fire("afterInsertHtml",
364
- {intoRange:b})},insertElement:function(a,b){var c=this.editor;c.focus();c.fire("saveSnapshot");var f=c.activeEnterMode,c=c.getSelection(),h=a.getName(),h=CKEDITOR.dtd.$block[h];b||(b=c.getRanges()[0]);this.insertElementIntoRange(a,b)&&(b.moveToPosition(a,CKEDITOR.POSITION_AFTER_END),h&&((h=a.getNext(function(a){return e(a)&&!t(a)}))&&h.type==CKEDITOR.NODE_ELEMENT&&h.is(CKEDITOR.dtd.$block)?h.getDtd()["#"]?b.moveToElementEditStart(h):b.moveToElementEditEnd(a):h||f==CKEDITOR.ENTER_BR||(h=b.fixBlock(!0,
365
- f==CKEDITOR.ENTER_DIV?"div":"p"),b.moveToElementEditStart(h))));c.selectRanges([b]);d(this)},insertElementIntoSelection:function(a){this.insertElement(a)},insertElementIntoRange:function(a,b){var d=this.editor,e=d.config.enterMode,f=a.getName(),h=CKEDITOR.dtd.$block[f];if(b.checkReadOnly())return!1;b.deleteContents(1);b.startContainer.type==CKEDITOR.NODE_ELEMENT&&(b.startContainer.is({tr:1,table:1,tbody:1,thead:1,tfoot:1})?y(b):b.startContainer.is(CKEDITOR.dtd.$list)&&x(b));var k,g;if(h)for(;(k=b.getCommonAncestor(0,
366
- 1))&&(g=CKEDITOR.dtd[k.getName()])&&(!g||!g[f]);)if(k.getName()in CKEDITOR.dtd.span){var h=b.splitElement(k),l=b.createBookmark();c(k);c(h);b.moveToBookmark(l)}else b.checkStartOfBlock()&&b.checkEndOfBlock()?(b.setStartBefore(k),b.collapse(!0),k.remove()):b.splitBlock(e==CKEDITOR.ENTER_DIV?"div":"p",d.editable());b.insertNode(a);return!0},setData:function(a,b){b||(a=this.editor.dataProcessor.toHtml(a));this.setHtml(a);this.fixInitialSelection();"unloaded"==this.status&&(this.status="ready");this.editor.fire("dataReady")},
363
+ "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");c||(c=f.getSelection().getRanges()[0]);p(this,b||"html",a,c);c.select();d(this);this.editor.fire("afterInsertHtml",{})},insertHtmlIntoRange:function(a,b,c){p(this,c||"html",a,b);this.editor.fire("afterInsertHtml",
364
+ {intoRange:b})},insertElement:function(a,b){var c=this.editor;c.focus();c.fire("saveSnapshot");var e=c.activeEnterMode,c=c.getSelection(),h=a.getName(),h=CKEDITOR.dtd.$block[h];b||(b=c.getRanges()[0]);this.insertElementIntoRange(a,b)&&(b.moveToPosition(a,CKEDITOR.POSITION_AFTER_END),h&&((h=a.getNext(function(a){return f(a)&&!t(a)}))&&h.type==CKEDITOR.NODE_ELEMENT&&h.is(CKEDITOR.dtd.$block)?h.getDtd()["#"]?b.moveToElementEditStart(h):b.moveToElementEditEnd(a):h||e==CKEDITOR.ENTER_BR||(h=b.fixBlock(!0,
365
+ e==CKEDITOR.ENTER_DIV?"div":"p"),b.moveToElementEditStart(h))));c.selectRanges([b]);d(this)},insertElementIntoSelection:function(a){this.insertElement(a)},insertElementIntoRange:function(a,b){var d=this.editor,f=d.config.enterMode,e=a.getName(),h=CKEDITOR.dtd.$block[e];if(b.checkReadOnly())return!1;b.deleteContents(1);b.startContainer.type==CKEDITOR.NODE_ELEMENT&&(b.startContainer.is({tr:1,table:1,tbody:1,thead:1,tfoot:1})?y(b):b.startContainer.is(CKEDITOR.dtd.$list)&&x(b));var k,g;if(h)for(;(k=b.getCommonAncestor(0,
366
+ 1))&&(g=CKEDITOR.dtd[k.getName()])&&(!g||!g[e]);)if(k.getName()in CKEDITOR.dtd.span){var h=b.splitElement(k),l=b.createBookmark();c(k);c(h);b.moveToBookmark(l)}else b.checkStartOfBlock()&&b.checkEndOfBlock()?(b.setStartBefore(k),b.collapse(!0),k.remove()):b.splitBlock(f==CKEDITOR.ENTER_DIV?"div":"p",d.editable());b.insertNode(a);return!0},setData:function(a,b){b||(a=this.editor.dataProcessor.toHtml(a));this.setHtml(a);this.fixInitialSelection();"unloaded"==this.status&&(this.status="ready");this.editor.fire("dataReady")},
367
367
  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.status="detached";this.editor.setData(this.editor.getData(),{internal:!0});this.clearListeners();try{this._.cleanCustomData()}catch(a){if(!CKEDITOR.env.ie||-2146828218!==a.number)throw a;}this.editor.fire("contentDomUnload");delete this.editor.document;delete this.editor.window;delete this.editor},isInline:function(){return this.getDocument().equals(CKEDITOR.document)},
368
- fixInitialSelection:function(){function a(){var b=c.getDocument().$,d=b.getSelection(),e;a:if(d.anchorNode&&d.anchorNode==c.$)e=!0;else{if(CKEDITOR.env.webkit&&(e=c.getDocument().getActive())&&e.equals(c)&&!d.anchorNode){e=!0;break a}e=void 0}e&&(e=new CKEDITOR.dom.range(c),e.moveToElementEditStart(c),b=b.createRange(),b.setStart(e.startContainer.$,e.startOffset),b.collapse(!0),d.removeAllRanges(),d.addRange(b))}function b(){var a=c.getDocument().$,d=a.selection,e=c.getDocument().getActive();"None"==
369
- d.type&&e.equals(c)&&(d=new CKEDITOR.dom.range(c),a=a.body.createTextRange(),d.moveToElementEditStart(c),d=d.startContainer,d.type!=CKEDITOR.NODE_ELEMENT&&(d=d.getParent()),a.moveToElementText(d.$),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)},getHtmlFromRange:function(a){if(a.collapsed)return new CKEDITOR.dom.documentFragment(a.document);
370
- a={doc:this.getDocument(),range:a.clone()};z.eol.detect(a,this);z.bogus.exclude(a);z.cell.shrink(a);a.fragment=a.range.cloneContents();z.tree.rebuild(a,this);z.eol.fix(a,this);return new CKEDITOR.dom.documentFragment(a.fragment.$)},extractHtmlFromRange:function(a,b){var c=B,d={range:a,doc:a.document},e=this.getHtmlFromRange(a);if(a.collapsed)return a.optimize(),e;a.enlarge(CKEDITOR.ENLARGE_INLINE,1);c.table.detectPurge(d);d.bookmark=a.createBookmark();delete d.range;var f=this.editor.createRange();
371
- f.moveToPosition(d.bookmark.startNode,CKEDITOR.POSITION_BEFORE_START);d.targetBookmark=f.createBookmark();c.list.detectMerge(d,this);c.table.detectRanges(d,this);c.block.detectMerge(d,this);d.tableContentsRanges?(c.table.deleteRanges(d),a.moveToBookmark(d.bookmark),d.range=a):(a.moveToBookmark(d.bookmark),d.range=a,a.extractContents(c.detectExtractMerge(d)));a.moveToBookmark(d.targetBookmark);a.optimize();c.fixUneditableRangePosition(a);c.list.merge(d,this);c.table.purge(d,this);c.block.merge(d,this);
372
- if(b){c=a.startPath();if(d=a.checkStartOfBlock()&&a.checkEndOfBlock()&&c.block&&!a.root.equals(c.block)){a:{var d=c.block.getElementsByTag("span"),f=0,h;if(d)for(;h=d.getItem(f++);)if(!q(h)){d=!0;break a}d=!1}d=!d}d&&(a.moveToPosition(c.block,CKEDITOR.POSITION_BEFORE_START),c.block.remove())}else c.autoParagraph(this.editor,a),u(a.startContainer)&&a.startContainer.appendBogus();a.startContainer.mergeSiblings();return e},setup:function(){var a=this.editor;this.attachListener(a,"beforeGetData",function(){var b=
368
+ fixInitialSelection:function(){function a(){var b=c.getDocument().$,d=b.getSelection(),f;a:if(d.anchorNode&&d.anchorNode==c.$)f=!0;else{if(CKEDITOR.env.webkit&&(f=c.getDocument().getActive())&&f.equals(c)&&!d.anchorNode){f=!0;break a}f=void 0}f&&(f=new CKEDITOR.dom.range(c),f.moveToElementEditStart(c),b=b.createRange(),b.setStart(f.startContainer.$,f.startOffset),b.collapse(!0),d.removeAllRanges(),d.addRange(b))}function b(){var a=c.getDocument().$,d=a.selection,f=c.getDocument().getActive();"None"==
369
+ d.type&&f.equals(c)&&(d=new CKEDITOR.dom.range(c),a=a.body.createTextRange(),d.moveToElementEditStart(c),d=d.startContainer,d.type!=CKEDITOR.NODE_ELEMENT&&(d=d.getParent()),a.moveToElementText(d.$),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)},getHtmlFromRange:function(a){if(a.collapsed)return new CKEDITOR.dom.documentFragment(a.document);
370
+ a={doc:this.getDocument(),range:a.clone()};z.eol.detect(a,this);z.bogus.exclude(a);z.cell.shrink(a);a.fragment=a.range.cloneContents();z.tree.rebuild(a,this);z.eol.fix(a,this);return new CKEDITOR.dom.documentFragment(a.fragment.$)},extractHtmlFromRange:function(a,b){var c=B,d={range:a,doc:a.document},f=this.getHtmlFromRange(a);if(a.collapsed)return a.optimize(),f;a.enlarge(CKEDITOR.ENLARGE_INLINE,1);c.table.detectPurge(d);d.bookmark=a.createBookmark();delete d.range;var e=this.editor.createRange();
371
+ e.moveToPosition(d.bookmark.startNode,CKEDITOR.POSITION_BEFORE_START);d.targetBookmark=e.createBookmark();c.list.detectMerge(d,this);c.table.detectRanges(d,this);c.block.detectMerge(d,this);d.tableContentsRanges?(c.table.deleteRanges(d),a.moveToBookmark(d.bookmark),d.range=a):(a.moveToBookmark(d.bookmark),d.range=a,a.extractContents(c.detectExtractMerge(d)));a.moveToBookmark(d.targetBookmark);a.optimize();c.fixUneditableRangePosition(a);c.list.merge(d,this);c.table.purge(d,this);c.block.merge(d,this);
372
+ if(b){c=a.startPath();if(d=a.checkStartOfBlock()&&a.checkEndOfBlock()&&c.block&&!a.root.equals(c.block)){a:{var d=c.block.getElementsByTag("span"),e=0,h;if(d)for(;h=d.getItem(e++);)if(!q(h)){d=!0;break a}d=!1}d=!d}d&&(a.moveToPosition(c.block,CKEDITOR.POSITION_BEFORE_START),c.block.remove())}else c.autoParagraph(this.editor,a),u(a.startContainer)&&a.startContainer.appendBogus();a.startContainer.mergeSiblings();return f},setup:function(){var a=this.editor;this.attachListener(a,"beforeGetData",function(){var b=
373
373
  this.getData();this.is("textarea")||!1!==a.config.ignoreEmptyParagraph&&(b=b.replace(r,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()},
374
374
  this);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||
375
375
  this.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();
376
376
  null!=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",
377
- !a.config.disableNativeSpellChecker);var f=a.config.contentsLangDirection;this.getDirection(1)!=f&&this.changeAttr("dir",f);var h=CKEDITOR.getCss();if(h){var f=d.getHead(),k=f.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),f.setCustomData("stylesheet",h),h.data("cke-temp",1))}f=d.getCustomData("stylesheet_ref")||0;d.setCustomData("stylesheet_ref",
378
- f+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 l={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 l){var e,f=b.getRanges()[0],h=f.startPath(),k,g,q,c=8==c;CKEDITOR.env.ie&&
379
- 11>CKEDITOR.env.version&&(e=b.getSelectedElement())||(e=m(b))?(a.fire("saveSnapshot"),f.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),e.remove(),f.select(),a.fire("saveSnapshot"),d=1):f.collapsed&&((k=h.block)&&(q=k[c?"getPrevious":"getNext"](n))&&q.type==CKEDITOR.NODE_ELEMENT&&q.is("table")&&f[c?"checkStartOfBlock":"checkEndOfBlock"]()?(a.fire("saveSnapshot"),f[c?"checkEndOfBlock":"checkStartOfBlock"]()&&k.remove(),f["moveToElementEdit"+(c?"End":"Start")](q),f.select(),a.fire("saveSnapshot"),
380
- d=1):h.blockLimit&&h.blockLimit.is("td")&&(g=h.blockLimit.getAscendant("table"))&&f.checkBoundaryOfElement(g,c?CKEDITOR.START:CKEDITOR.END)&&(q=g[c?"getPrevious":"getNext"](n))?(a.fire("saveSnapshot"),f["moveToElementEdit"+(c?"End":"Start")](q),f.checkStartOfBlock()&&f.checkEndOfBlock()?q.remove():f.select(),a.fire("saveSnapshot"),d=1):(g=h.contains(["td","th","caption"]))&&f.checkBoundaryOfElement(g,c?CKEDITOR.START:CKEDITOR.END)&&(d=1))}return!d}});a.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&&
381
- this.attachListener(this,"keyup",function(b){b.data.getKeystroke()in l&&!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",g);CKEDITOR.env.ie&&!CKEDITOR.env.edge||this.attachListener(this,"mousedown",function(b){var c=b.data.getTarget();c.is("img","hr",
377
+ !a.config.disableNativeSpellChecker);var e=a.config.contentsLangDirection;this.getDirection(1)!=e&&this.changeAttr("dir",e);var h=CKEDITOR.getCss();if(h){var e=d.getHead(),k=e.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),e.setCustomData("stylesheet",h),h.data("cke-temp",1))}e=d.getCustomData("stylesheet_ref")||0;d.setCustomData("stylesheet_ref",
378
+ e+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 l={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 l){var f,e=b.getRanges()[0],h=e.startPath(),k,g,q,c=8==c;CKEDITOR.env.ie&&
379
+ 11>CKEDITOR.env.version&&(f=b.getSelectedElement())||(f=m(b))?(a.fire("saveSnapshot"),e.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START),f.remove(),e.select(),a.fire("saveSnapshot"),d=1):e.collapsed&&((k=h.block)&&(q=k[c?"getPrevious":"getNext"](n))&&q.type==CKEDITOR.NODE_ELEMENT&&q.is("table")&&e[c?"checkStartOfBlock":"checkEndOfBlock"]()?(a.fire("saveSnapshot"),e[c?"checkEndOfBlock":"checkStartOfBlock"]()&&k.remove(),e["moveToElementEdit"+(c?"End":"Start")](q),e.select(),a.fire("saveSnapshot"),
380
+ d=1):h.blockLimit&&h.blockLimit.is("td")&&(g=h.blockLimit.getAscendant("table"))&&e.checkBoundaryOfElement(g,c?CKEDITOR.START:CKEDITOR.END)&&(q=g[c?"getPrevious":"getNext"](n))?(a.fire("saveSnapshot"),e["moveToElementEdit"+(c?"End":"Start")](q),e.checkStartOfBlock()&&e.checkEndOfBlock()?q.remove():e.select(),a.fire("saveSnapshot"),d=1):(g=h.contains(["td","th","caption"]))&&e.checkBoundaryOfElement(g,c?CKEDITOR.START:CKEDITOR.END)&&(d=1))}return!d}});a.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&&
381
+ this.attachListener(this,"keyup",function(b){b.data.getKeystroke()in l&&!this.getFirst(f)&&(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",g);CKEDITOR.env.ie&&!CKEDITOR.env.edge||this.attachListener(this,"mousedown",function(b){var c=b.data.getTarget();c.is("img","hr",
382
382
  "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(r,""))){var c=a.createRange();c.moveToElementEditStart(b);
383
383
  c.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(c){if(a.readOnly)return!0;var d=c.data.domEvent.getKey();if(d in l&&(c=a.getSelection(),0!==c.getRanges().length)){var d=8==d,e=c.getRanges()[0];c=e.startPath();if(e.collapsed)a:{var f=
384
384
  c.block;if(f&&e[d?"checkStartOfBlock":"checkEndOfBlock"]()&&e.moveToClosestEditablePosition(f,!d)&&e.collapsed){if(e.startContainer.type==CKEDITOR.NODE_ELEMENT){var h=e.startContainer.getChild(e.startOffset-(d?1:0));if(h&&h.type==CKEDITOR.NODE_ELEMENT&&h.is("hr")){a.fire("saveSnapshot");h.remove();c=!0;break a}}e=e.startPath().block;if(!e||e&&e.contains(f))c=void 0;else{a.fire("saveSnapshot");var k;(k=(d?e:f).getBogus())&&k.remove();k=a.getSelection();h=k.createBookmarks();(d?f:e).moveChildren(d?
@@ -389,18 +389,18 @@ a.is("textarea"))&&("false"!=a.getAttribute("contentEditable")&&a.data("cke-edit
389
389
  "textbox");a.changeAttr("aria-multiline","true");a.changeAttr("aria-label",c);c&&a.changeAttr("title",c);var d=b.fire("ariaEditorHelpLabel",{}).label;if(d&&(c=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents"))){var e=CKEDITOR.tools.getNextId(),d=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+e+'" class\x3d"cke_voice_label"\x3e'+d+"\x3c/span\x3e");c.append(d);a.changeAttr("aria-describedby",e)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");
390
390
  n=CKEDITOR.dom.walker.whitespaces(!0);q=CKEDITOR.dom.walker.bookmark(!1,!0);u=CKEDITOR.dom.walker.empty();t=CKEDITOR.dom.walker.bogus();r=/(^|<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,d){var e,f,h,k,g=[],l=d.range.startContainer;e=d.range.startPath();for(var l=n[l.getName()],m=0,q=c.getChildren(),p=q.count(),u=-1,x=-1,G=0,y=e.contains(n.$list);m<
391
391
  p;++m)e=q.getItem(m),a(e)?(h=e.getName(),y&&h in CKEDITOR.dtd.$list?g=g.concat(b(e,d)):(k=!!l[h],"br"!=h||!e.data("cke-eol")||m&&m!=p-1||(G=(f=m?g[m-1].node:q.getItem(m+1))&&(!a(f)||!f.is("br")),f=f&&a(f)&&n.$block[f.getName()]),-1!=u||k||(u=m),k||(x=m),g.push({isElement:1,isLineBreak:G,isBlock:e.isBlockBoundary(),hasBlockSibling:f,node:e,name:h,allowed:k}),f=G=0)):g.push({isElement:0,node:e,allowed:1});-1<u&&(g[u].firstNotAllowed=1);-1<x&&(g[x].lastNotAllowed=1);return g}function d(b,c){var e=[],
392
- f=b.getChildren(),h=f.count(),k,g=0,l=n[c],m=!b.is(n.$inline)||b.is("br");for(m&&e.push(" ");g<h;g++)k=f.getItem(g),a(k)&&!k.is(l)?e=e.concat(d(k,c)):e.push(k);m&&e.push(" ");return e}function f(b){return a(b.startContainer)&&b.startContainer.getChild(b.startOffset-1)}function g(b){return b&&a(b)&&(b.is(n.$removeEmpty)||b.is("a")&&!b.isBlockBoundary())}function l(b,c,d,e){var f=b.clone(),h,k;f.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);(h=(new CKEDITOR.dom.walker(f)).next())&&a(h)&&q[h.getName()]&&
392
+ f=b.getChildren(),h=f.count(),k,g=0,l=n[c],m=!b.is(n.$inline)||b.is("br");for(m&&e.push(" ");g<h;g++)k=f.getItem(g),a(k)&&!k.is(l)?e=e.concat(d(k,c)):e.push(k);m&&e.push(" ");return e}function e(b){return a(b.startContainer)&&b.startContainer.getChild(b.startOffset-1)}function g(b){return b&&a(b)&&(b.is(n.$removeEmpty)||b.is("a")&&!b.isBlockBoundary())}function l(b,c,d,e){var f=b.clone(),h,k;f.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);(h=(new CKEDITOR.dom.walker(f)).next())&&a(h)&&q[h.getName()]&&
393
393
  (k=h.getPrevious())&&a(k)&&!k.getParent().equals(b.startContainer)&&d.contains(k)&&e.contains(h)&&h.isIdentical(k)&&(h.moveChildren(k),h.remove(),l(b,c,d,e))}function m(b,c){function d(b,c){if(c.isBlock&&c.isElement&&!c.node.is("br")&&a(b)&&b.is("br"))return b.remove(),1}var e=c.endContainer.getChild(c.endOffset),f=c.endContainer.getChild(c.endOffset-1);e&&d(e,b[b.length-1]);f&&d(f,b[0])&&(c.setEnd(c.endContainer,c.endOffset-1),c.collapse())}var n=CKEDITOR.dtd,q={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,
394
394
  h6:1,ul:1,ol:1,li:1,pre:1,dl:1,blockquote:1},p={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},u=CKEDITOR.tools.extend({},n.$inline);delete u.br;return function(q,F,L,x){var y=q.editor,z=!1;"unfiltered_html"==F&&(F="html",z=!0);if(!x.checkReadOnly()){var r=(new CKEDITOR.dom.elementPath(x.startContainer,x.root)).blockLimit||x.root;F={type:F,dontFilter:z,editable:q,editor:y,range:x,blockLimit:r,mergeCandidates:[],zombies:[]};var z=F.range,r=F.mergeCandidates,t="html"===F.type,B,E,T,ba,ca,V;"text"==F.type&&
395
- z.shrink(CKEDITOR.SHRINK_ELEMENT,!0,!1)&&(E=CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",z.document),z.insertNode(E),z.setStartAfter(E));T=new CKEDITOR.dom.elementPath(z.startContainer);F.endPath=ba=new CKEDITOR.dom.elementPath(z.endContainer);if(!z.collapsed){B=ba.block||ba.blockLimit;var ea=z.getCommonAncestor();B&&!B.equals(ea)&&!B.contains(ea)&&z.checkEndOfBlock()&&F.zombies.push(B);z.deleteContents()}for(;(ca=f(z))&&a(ca)&&ca.isBlockBoundary()&&T.contains(ca);)z.moveToPosition(ca,
396
- CKEDITOR.POSITION_BEFORE_END);l(z,F.blockLimit,T,ba);E&&(z.setEndBefore(E),z.collapse(),E.remove());E=z.startPath();if(B=E.contains(g,!1,1))V=z.splitElement(B),F.inlineStylesRoot=B,F.inlineStylesPeak=E.lastElement;E=z.createBookmark();t&&(c(B),c(V));(B=E.startNode.getPrevious(e))&&a(B)&&g(B)&&r.push(B);(B=E.startNode.getNext(e))&&a(B)&&g(B)&&r.push(B);for(B=E.startNode;(B=B.getParent())&&g(B);)r.push(B);z.moveToBookmark(E);y.enterMode===CKEDITOR.ENTER_DIV&&""===y.getData(!0)&&((y=q.getFirst())&&y.remove(),
395
+ z.shrink(CKEDITOR.SHRINK_ELEMENT,!0,!1)&&(E=CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",z.document),z.insertNode(E),z.setStartAfter(E));T=new CKEDITOR.dom.elementPath(z.startContainer);F.endPath=ba=new CKEDITOR.dom.elementPath(z.endContainer);if(!z.collapsed){B=ba.block||ba.blockLimit;var ea=z.getCommonAncestor();B&&!B.equals(ea)&&!B.contains(ea)&&z.checkEndOfBlock()&&F.zombies.push(B);z.deleteContents()}for(;(ca=e(z))&&a(ca)&&ca.isBlockBoundary()&&T.contains(ca);)z.moveToPosition(ca,
396
+ CKEDITOR.POSITION_BEFORE_END);l(z,F.blockLimit,T,ba);E&&(z.setEndBefore(E),z.collapse(),E.remove());E=z.startPath();if(B=E.contains(g,!1,1))V=z.splitElement(B),F.inlineStylesRoot=B,F.inlineStylesPeak=E.lastElement;E=z.createBookmark();t&&(c(B),c(V));(B=E.startNode.getPrevious(f))&&a(B)&&g(B)&&r.push(B);(B=E.startNode.getNext(f))&&a(B)&&g(B)&&r.push(B);for(B=E.startNode;(B=B.getParent())&&g(B);)r.push(B);z.moveToBookmark(E);y.enterMode===CKEDITOR.ENTER_DIV&&""===y.getData(!0)&&((y=q.getFirst())&&y.remove(),
397
397
  x.setStartAt(q,CKEDITOR.POSITION_AFTER_START),x.collapse(!0));if(q=L){q=F.range;if("text"==F.type&&F.inlineStylesRoot){x=F.inlineStylesPeak;y=x.getDocument().createText("{cke-peak}");for(V=F.inlineStylesRoot.getParent();!x.equals(V);)y=y.appendTo(x.clone()),x=x.getParent();L=y.getOuterHtml().split("{cke-peak}").join(L)}x=F.blockLimit.getName();if(/^\s+|\s+$/.test(L)&&"span"in CKEDITOR.dtd[x]){var X='\x3cspan data-cke-marker\x3d"1"\x3e\x26nbsp;\x3c/span\x3e';L=X+L+X}L=F.editor.dataProcessor.toHtml(L,
398
398
  {context:null,fixForBody:!1,protectedWhitespaces:!!X,dontFilter:F.dontFilter,filter:F.editor.activeFilter,enterMode:F.editor.activeEnterMode});x=q.document.createElement("body");x.setHtml(L);X&&(x.getFirst().remove(),x.getLast().remove());if((X=q.startPath().block)&&(1!=X.getChildCount()||!X.getBogus()))a:{var O;if(1==x.getChildCount()&&a(O=x.getFirst())&&O.is(p)&&!O.hasAttribute("contenteditable")){X=O.getElementsByTag("*");q=0;for(V=X.count();q<V;q++)if(y=X.getItem(q),!y.is(u))break a;O.moveChildren(O.getParent(1));
399
399
  O.remove()}}F.dataWrapper=x;q=L}if(q){O=F.range;q=O.document;x=F.blockLimit;V=0;var Q,X=[],R,U;L=E=0;var aa,y=O.startContainer;ca=F.endPath.elements[0];var ga,z=ca.getPosition(y),r=!!ca.getCommonAncestor(y)&&z!=CKEDITOR.POSITION_IDENTICAL&&!(z&CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED),y=b(F.dataWrapper,F);for(m(y,O);V<y.length;V++){z=y[V];if(t=z.isLineBreak)t=O,B=x,ba=T=void 0,z.hasBlockSibling?t=1:(T=t.startContainer.getAscendant(n.$block,1))&&T.is({div:1,p:1})?(ba=T.getPosition(B),
400
400
  ba==CKEDITOR.POSITION_IDENTICAL||ba==CKEDITOR.POSITION_CONTAINS?t=0:(B=t.splitElement(T),t.moveToPosition(B,CKEDITOR.POSITION_AFTER_START),t=1)):t=0;if(t)L=0<V;else{t=O.startPath();!z.isBlock&&k(F.editor,t.block,t.blockLimit)&&(U=h(F.editor))&&(U=q.createElement(U),U.appendBogus(),O.insertNode(U),CKEDITOR.env.needsBrFiller&&(Q=U.getBogus())&&Q.remove(),O.moveToPosition(U,CKEDITOR.POSITION_BEFORE_END));if((t=O.startPath().block)&&!t.equals(R)){if(Q=t.getBogus())Q.remove(),X.push(t);R=t}z.firstNotAllowed&&
401
401
  (E=1);if(E&&z.isElement){t=O.startContainer;for(B=null;t&&!n[t.getName()][z.name];){if(t.equals(x)){t=null;break}B=t;t=t.getParent()}if(t)B&&(aa=O.splitElement(B),F.zombies.push(aa),F.zombies.push(B));else{B=x.getName();ga=!V;t=V==y.length-1;B=d(z.node,B);T=[];ba=B.length;for(var ea=0,ia=void 0,ja=0,da=-1;ea<ba;ea++)ia=B[ea]," "==ia?(ja||ga&&!ea||(T.push(new CKEDITOR.dom.text(" ")),da=T.length),ja=1):(T.push(ia),ja=0);t&&da==T.length&&T.pop();ga=T}}if(ga){for(;t=ga.pop();)O.insertNode(t);ga=0}else O.insertNode(z.node);
402
402
  z.lastNotAllowed&&V<y.length-1&&((aa=r?ca:aa)&&O.setEndAt(aa,CKEDITOR.POSITION_AFTER_START),E=0);O.collapse()}}1!=y.length?Q=!1:(Q=y[0],Q=Q.isElement&&"false"==Q.node.getAttribute("contenteditable"));Q&&(L=!0,t=y[0].node,O.setStartAt(t,CKEDITOR.POSITION_BEFORE_START),O.setEndAt(t,CKEDITOR.POSITION_AFTER_END));F.dontMoveCaret=L;F.bogusNeededBlocks=X}Q=F.range;var fa;aa=F.bogusNeededBlocks;for(ga=Q.createBookmark();R=F.zombies.pop();)R.getParent()&&(U=Q.clone(),U.moveToElementEditStart(R),U.removeEmptyBlocksAtEnd());
403
- if(aa)for(;R=aa.pop();)CKEDITOR.env.needsBrFiller?R.appendBogus():R.append(Q.document.createText(" "));for(;R=F.mergeCandidates.pop();)R.mergeSiblings();Q.moveToBookmark(ga);if(!F.dontMoveCaret){for(R=f(Q);R&&a(R)&&!R.is(n.$empty);){if(R.isBlockBoundary())Q.moveToPosition(R,CKEDITOR.POSITION_BEFORE_END);else{if(g(R)&&R.getHtml().match(/(\s|&nbsp;)$/g)){fa=null;break}fa=Q.clone();fa.moveToPosition(R,CKEDITOR.POSITION_BEFORE_END)}R=R.getLast(e)}fa&&Q.moveToRange(fa)}}}}();y=function(){function a(b){b=
403
+ if(aa)for(;R=aa.pop();)CKEDITOR.env.needsBrFiller?R.appendBogus():R.append(Q.document.createText(" "));for(;R=F.mergeCandidates.pop();)R.mergeSiblings();Q.moveToBookmark(ga);if(!F.dontMoveCaret){for(R=e(Q);R&&a(R)&&!R.is(n.$empty);){if(R.isBlockBoundary())Q.moveToPosition(R,CKEDITOR.POSITION_BEFORE_END);else{if(g(R)&&R.getHtml().match(/(\s|&nbsp;)$/g)){fa=null;break}fa=Q.clone();fa.moveToPosition(R,CKEDITOR.POSITION_BEFORE_END)}R=R.getLast(f)}fa&&Q.moveToRange(fa)}}}}();y=function(){function a(b){b=
404
404
  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==CKEDITOR.NODE_ELEMENT};return b}function b(a,c,d){c=a.getDocument().createElement(c);a.append(c,d);return c}function c(a){var b=a.count(),d;for(b;0<b--;)d=a.getItem(b),CKEDITOR.tools.trim(d.getHtml())||(d.appendBogus(),CKEDITOR.env.ie&&9>CKEDITOR.env.version&&d.getChildCount()&&d.getFirst().remove())}return function(d){var e=
405
405
  d.startContainer,f=e.getAscendant("table",1),h=!1;c(f.getElementsByTag("td"));c(f.getElementsByTag("th"));f=d.clone();f.setStart(e,0);f=a(f).lastBackward();f||(f=d.clone(),f.setEndAt(e,CKEDITOR.POSITION_BEFORE_END),f=a(f).lastForward(),h=!0);f||(f=e);f.is("table")?(d.setStartAt(f,CKEDITOR.POSITION_BEFORE_START),d.collapse(!0),f.remove()):(f.is({tbody:1,thead:1,tfoot:1})&&(f=b(f,"tr",h)),f.is("tr")&&(f=b(f,f.getParent().is("thead")?"th":"td",h)),(e=f.getBogus())&&e.remove(),d.moveToPosition(f,h?CKEDITOR.POSITION_AFTER_START:
406
406
  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)||a.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,d=!1,e;e=b.clone();e.setStart(c,0);e=a(e).lastBackward();e||(e=b.clone(),e.setEndAt(c,CKEDITOR.POSITION_BEFORE_END),e=a(e).lastForward(),
@@ -419,8 +419,8 @@ l=l.contains("table");if(m||l)m&&l&&b(m,l)?(e.tableSurroundingRange=k,k.setStart
419
419
  e.tableContentsRanges=g?g:a(h)},deleteRanges:function(a){for(var b;b=a.tableContentsRanges.pop();)b.extractContents(),u(b.startContainer)&&b.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)}}}}(),
420
420
  detectExtractMerge:function(a){return!(a.range.startPath().contains(CKEDITOR.dtd.$listItem)&&a.range.endPath().contains(CKEDITOR.dtd.$listItem))},fixUneditableRangePosition:function(a){a.startContainer.getDtd()["#"]||a.moveToClosestEditablePosition(null,!0)},autoParagraph:function(a,b){var c=b.startPath(),d;k(a,c.block,c.blockLimit)&&(d=h(a))&&(d=b.document.createElement(d),d.appendBogus(),b.insertNode(d),b.moveToPosition(d,CKEDITOR.POSITION_AFTER_START))}}}()})();(function(){function a(a){return CKEDITOR.plugins.widget&&
421
421
  CKEDITOR.plugins.widget.isDomWidget(a)}function l(b,c){if(0===b.length||a(b[0].getEnclosedNode()))return!1;var d,e;if((d=!c&&1===b.length)&&!(d=b[0].collapsed)){var f=b[0];d=f.startContainer.getAscendant({td:1,th:1},!0);var h=f.endContainer.getAscendant({td:1,th:1},!0);e=CKEDITOR.tools.trim;d&&d.equals(h)&&!d.findOne("td, th, tr, tbody, table")?(f=f.cloneContents(),d=f.getFirst()?e(f.getFirst().getText())!==e(d.getText()):!0):d=!1}if(d)return!1;for(e=0;e<b.length;e++)if(d=b[e]._getTableElement(),
422
- !d)return!1;return!0}function g(a){function b(a){a=a.find("td, th");var c=[],d;for(d=0;d<a.count();d++)c.push(a.getItem(d));return c}var c=[],d,e;for(e=0;e<a.length;e++)d=a[e]._getTableElement(),d.is&&d.is({td:1,th:1})?c.push(d):c=c.concat(b(d));return c}function e(a){a=g(a);var b="",c=[],d,e;for(e=0;e<a.length;e++)d&&!d.equals(a[e].getAscendant("tr"))?(b+=c.join("\t")+"\n",d=a[e].getAscendant("tr"),c=[]):0===e&&(d=a[e].getAscendant("tr")),c.push(a[e].getText());return b+=c.join("\t")}function f(a){var b=
423
- this.root.editor,c=b.getSelection(1);this.reset();B=!0;c.root.once("selectionchange",function(a){a.cancel()},null,null,0);c.selectRanges([a[0]]);c=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=y++;b._.fakeSelection=this;B=!1;this.root.fire("selectionchange")}function m(){var b=this._.fakeSelection,c;if(b){c=this.getSelection(1);var d;if(!(d=!c)&&(d=!c.isHidden())){d=
422
+ !d)return!1;return!0}function g(a){function b(a){a=a.find("td, th");var c=[],d;for(d=0;d<a.count();d++)c.push(a.getItem(d));return c}var c=[],d,e;for(e=0;e<a.length;e++)d=a[e]._getTableElement(),d.is&&d.is({td:1,th:1})?c.push(d):c=c.concat(b(d));return c}function f(a){a=g(a);var b="",c=[],d,e;for(e=0;e<a.length;e++)d&&!d.equals(a[e].getAscendant("tr"))?(b+=c.join("\t")+"\n",d=a[e].getAscendant("tr"),c=[]):0===e&&(d=a[e].getAscendant("tr")),c.push(a[e].getText());return b+=c.join("\t")}function e(a){var b=
423
+ this.root.editor,c=b.getSelection(1);this.reset();B=!0;c.root.once("selectionchange",function(a){a.cancel()},null,null,0);c.selectRanges([a[0]]);c=this._.cache;c.ranges=new CKEDITOR.dom.rangeList(a);c.type=CKEDITOR.SELECTION_TEXT;c.selectedElement=a[0]._getTableElement();c.selectedText=f(a);c.nativeSel=null;this.isFake=1;this.rev=y++;b._.fakeSelection=this;B=!1;this.root.fire("selectionchange")}function m(){var b=this._.fakeSelection,c;if(b){c=this.getSelection(1);var d;if(!(d=!c)&&(d=!c.isHidden())){d=
424
424
  b;var e=c.getRanges(),f=d.getRanges(),h=e.length&&e[0]._getTableElement()&&e[0]._getTableElement().getAscendant("table",!0),k=f.length&&f[0]._getTableElement()&&f[0]._getTableElement().getAscendant("table",!0),g=1===e.length&&e[0]._getTableElement()&&e[0]._getTableElement().is("table"),m=1===f.length&&f[0]._getTableElement()&&f[0]._getTableElement().is("table");if(a(d.getSelectedElement()))d=!1;else{var n=1===e.length&&e[0].collapsed,f=l(e,!!CKEDITOR.env.webkit)&&l(f);h=h&&k?h.equals(k)||k.contains(h):
425
425
  !1;h&&(n||f)?(g&&!m&&d.selectRanges(e),d=!0):d=!1}d=!d}d&&(b.reset(),b=0)}if(!b&&(b=c||this.getSelection(1),!b||b.getType()==CKEDITOR.SELECTION_NONE))return;this.fire("selectionCheck",b);c=this.elementPath();c.compare(this._.selectionPreviousPath)||(d=this._.selectionPreviousPath&&this._.selectionPreviousPath.blockLimit.equals(c.blockLimit),!CKEDITOR.env.webkit&&!CKEDITOR.env.gecko||d||(this._.previousActive=this.document.getActive()),this._.selectionPreviousPath=c,this.fire("selectionChange",{selection:b,
426
426
  path:c}))}function k(){v=!0;w||(h.call(this),w=CKEDITOR.tools.setTimeout(h,200,this))}function h(){w=null;v&&(CKEDITOR.tools.setTimeout(m,0,this),v=!1)}function c(a){return D(a)||a.type==CKEDITOR.NODE_ELEMENT&&!a.is(CKEDITOR.dtd.$empty)?!0:!1}function d(a){function b(c,d){return c&&c.type!=CKEDITOR.NODE_TEXT?a.clone()["moveToElementEdit"+(d?"End":"Start")](c):!1}if(!(a.root instanceof CKEDITOR.editable))return!1;var d=a.startContainer,e=a.getPreviousNode(c,null,d),f=a.getNextNode(c,null,d);return b(e)||
@@ -455,11 +455,11 @@ c.item(e),h=f.parentNode,k=0,a=new CKEDITOR.dom.range(this.root);k<h.childNodes.
455
455
  return function(b){var c=this._.cache,d=c.ranges;d||(c.ranges=d=new CKEDITOR.dom.rangeList(a.call(this)));return b?r(new CKEDITOR.dom.rangeList(d.slice())):d}}(),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];if(c){if(c.collapsed)b=c.startContainer,b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent());else{for(c.optimize();b=
456
456
  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?new CKEDITOR.dom.element(b):null},getSelectedElement:function(){var a=this._.cache;if(void 0!==a.selectedElement)return a.selectedElement;
457
457
  var b=this,c=CKEDITOR.tools.tryThese(function(){return b.getNative().createRange().item(0)},function(){for(var a=b.getRanges()[0].clone(),c,d,e=2;e&&!((c=a.getEnclosedNode())&&c.type==CKEDITOR.NODE_ELEMENT&&A[c.getName()]&&(d=c));e--)a.shrink(CKEDITOR.SHRINK_ELEMENT);return d&&d.$});return a.selectedElement=c?new CKEDITOR.dom.element(c):null},getSelectedText:function(){var a=this._.cache;if(void 0!==a.selectedText)return a.selectedText;var b=this.getNative(),b=p?"Control"==b.type?"":b.createRange().text:
458
- b.toString();return a.selectedText=b},lock:function(){this.getRanges();this.getStartElement();this.getSelectedElement();this.getSelectedText();this._.cache.nativeSel=null;this.isLocked=1},unlock:function(a){if(this.isLocked){if(a)var b=this.getSelectedElement(),c=this.getRanges(),d=this.isFake;this.isLocked=0;this.reset();a&&(a=b||c[0]&&c[0].getCommonAncestor())&&a.getAscendant("body",1)&&((a=this.root.editor)&&a.plugins.tableselection&&a.plugins.tableselection.isSupportedEnvironment(a)&&l(c)?f.call(this,
458
+ b.toString();return a.selectedText=b},lock:function(){this.getRanges();this.getStartElement();this.getSelectedElement();this.getSelectedText();this._.cache.nativeSel=null;this.isLocked=1},unlock:function(a){if(this.isLocked){if(a)var b=this.getSelectedElement(),c=this.getRanges(),d=this.isFake;this.isLocked=0;this.reset();a&&(a=b||c[0]&&c[0].getCommonAncestor())&&a.getAscendant("body",1)&&((a=this.root.editor)&&a.plugins.tableselection&&a.plugins.tableselection.isSupportedEnvironment(a)&&l(c)?e.call(this,
459
459
  c):d?this.fake(b):b&&2>c.length?this.selectElement(b):this.selectRanges(c))}},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=y++},selectElement:function(a){var b=new CKEDITOR.dom.range(this.root);
460
- b.setStartBefore(a);b.setEndAfter(a);this.selectRanges([b])},selectRanges:function(a){var c=this.root.editor,e=c&&c._.hiddenSelectionContainer;this.reset();if(e)for(var e=this.root,h,k=0;k<a.length;++k)h=a[k],h.endContainer.equals(e)&&(h.endOffset=Math.min(h.endOffset,e.getChildCount()));if(a.length)if(this.isLocked){var g=CKEDITOR.document.getActive();this.unlock();this.selectRanges(a);this.lock();g&&!g.equals(this.root)&&g.focus()}else{var m;a:{var q,v;if(1==a.length&&!(v=a[0]).collapsed&&(m=v.getEnclosedNode())&&
461
- m.type==CKEDITOR.NODE_ELEMENT&&(v=v.clone(),v.shrink(CKEDITOR.SHRINK_ELEMENT,!0),(q=v.getEnclosedNode())&&q.type==CKEDITOR.NODE_ELEMENT&&(m=q),"false"==m.getAttribute("contenteditable")))break a;m=void 0}if(m)this.fake(m);else if(c&&c.plugins.tableselection&&c.plugins.tableselection.isSupportedEnvironment(c)&&l(a)&&!B&&!a[0]._getTableElement({table:1}).hasAttribute("data-cke-tableselection-ignored"))f.call(this,a);else{if(p){q=CKEDITOR.dom.walker.whitespaces(!0);m=/\ufeff|\u00a0/;v={table:1,tbody:1,
462
- tr:1};1<a.length&&(c=a[a.length-1],a[0].setEnd(c.endContainer,c.endOffset));c=a[0];a=c.collapsed;var x,u,y;if((e=c.getEnclosedNode())&&e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in A&&(!e.is("a")||!e.getText()))try{y=e.$.createControlRange();y.addElement(e.$);y.select();return}catch(z){}if(c.startContainer.type==CKEDITOR.NODE_ELEMENT&&c.startContainer.getName()in v||c.endContainer.type==CKEDITOR.NODE_ELEMENT&&c.endContainer.getName()in v)c.shrink(CKEDITOR.NODE_ELEMENT,!0),a=c.collapsed;y=c.createBookmark();
460
+ b.setStartBefore(a);b.setEndAfter(a);this.selectRanges([b])},selectRanges:function(a){var c=this.root.editor,f=c&&c._.hiddenSelectionContainer;this.reset();if(f)for(var f=this.root,h,k=0;k<a.length;++k)h=a[k],h.endContainer.equals(f)&&(h.endOffset=Math.min(h.endOffset,f.getChildCount()));if(a.length)if(this.isLocked){var g=CKEDITOR.document.getActive();this.unlock();this.selectRanges(a);this.lock();g&&!g.equals(this.root)&&g.focus()}else{var m;a:{var q,v;if(1==a.length&&!(v=a[0]).collapsed&&(m=v.getEnclosedNode())&&
461
+ m.type==CKEDITOR.NODE_ELEMENT&&(v=v.clone(),v.shrink(CKEDITOR.SHRINK_ELEMENT,!0),(q=v.getEnclosedNode())&&q.type==CKEDITOR.NODE_ELEMENT&&(m=q),"false"==m.getAttribute("contenteditable")))break a;m=void 0}if(m)this.fake(m);else if(c&&c.plugins.tableselection&&c.plugins.tableselection.isSupportedEnvironment(c)&&l(a)&&!B&&!a[0]._getTableElement({table:1}).hasAttribute("data-cke-tableselection-ignored"))e.call(this,a);else{if(p){q=CKEDITOR.dom.walker.whitespaces(!0);m=/\ufeff|\u00a0/;v={table:1,tbody:1,
462
+ tr:1};1<a.length&&(c=a[a.length-1],a[0].setEnd(c.endContainer,c.endOffset));c=a[0];a=c.collapsed;var x,u,y;if((f=c.getEnclosedNode())&&f.type==CKEDITOR.NODE_ELEMENT&&f.getName()in A&&(!f.is("a")||!f.getText()))try{y=f.$.createControlRange();y.addElement(f.$);y.select();return}catch(z){}if(c.startContainer.type==CKEDITOR.NODE_ELEMENT&&c.startContainer.getName()in v||c.endContainer.type==CKEDITOR.NODE_ELEMENT&&c.endContainer.getName()in v)c.shrink(CKEDITOR.NODE_ELEMENT,!0),a=c.collapsed;y=c.createBookmark();
463
463
  v=y.startNode;a||(g=y.endNode);y=c.document.$.body.createTextRange();y.moveToElementText(v.$);y.moveStart("character",1);g?(m=c.document.$.body.createTextRange(),m.moveToElementText(g.$),y.setEndPoint("EndToEnd",m),y.moveEnd("character",-1)):(x=v.getNext(q),u=v.hasAscendant("pre"),x=!(x&&x.getText&&x.getText().match(m))&&(u||!v.hasPrevious()||v.getPrevious().is&&v.getPrevious().is("br")),u=c.document.createElement("span"),u.setHtml("\x26#65279;"),u.insertBefore(v),x&&c.document.createText("").insertBefore(v));
464
464
  c.setStartBefore(v);v.remove();a?(x?(y.moveStart("character",-1),y.select(),c.document.$.selection.clear()):y.select(),c.moveToPosition(u,CKEDITOR.POSITION_BEFORE_START),u.remove()):(c.setEndBefore(g),g.remove(),y.select())}else{g=this.getNative();if(!g)return;this.removeAllRanges();for(y=0;y<a.length;y++){if(y<a.length-1&&(x=a[y],u=a[y+1],m=x.clone(),m.setStart(x.endContainer,x.endOffset),m.setEnd(u.startContainer,u.startOffset),!m.collapsed&&(m.shrink(CKEDITOR.NODE_ELEMENT,!0),c=m.getCommonAncestor(),
465
465
  m=m.getEnclosedNode(),c.isReadOnly()||m&&m.isReadOnly()))){u.setStart(x.startContainer,x.startOffset);a.splice(y--,1);continue}c=a[y];u=this.document.$.createRange();c.collapsed&&CKEDITOR.env.webkit&&d(c)&&(m=b(this.root),c.insertNode(m),(x=m.getNext())&&!m.getPrevious()&&x.type==CKEDITOR.NODE_ELEMENT&&"br"==x.getName()?(n(this.root),c.moveToPosition(x,CKEDITOR.POSITION_BEFORE_START)):c.moveToPosition(m,CKEDITOR.POSITION_AFTER_END));u.setStart(c.startContainer.$,c.startOffset);try{u.setEnd(c.endContainer.$,
@@ -467,14 +467,14 @@ c.endOffset)}catch(w){if(0<=w.toString().indexOf("NS_ERROR_ILLEGAL_VALUE"))c.col
467
467
  a;d.type=CKEDITOR.SELECTION_ELEMENT;d.selectedText=d.nativeSel=null;this.isFake=1;this.rev=y++;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 l(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&&
468
468
  (a.isFake=1);return a},createBookmarks2:function(a){a=this.getRanges().createBookmarks2(a);this.isFake&&(a.isFake=1);return a},selectBookmarks:function(a){for(var b=[],c,d=0;d<a.length;d++){var e=new CKEDITOR.dom.range(this.root);e.moveToBookmark(a[d]);b.push(e)}a.isFake&&(c=l(b)?b[0]._getTableElement():b[0].getEnclosedNode(),c&&c.type==CKEDITOR.NODE_ELEMENT||(CKEDITOR.warn("selection-not-fake"),a.isFake=0));a.isFake&&!l(b)?this.fake(c):this.selectRanges(b);return this},getCommonAncestor:function(){var a=
469
469
  this.getRanges();return a.length?a[0].startContainer.getCommonAncestor(a[a.length-1].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[p?"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,d;(a=a.getParent())&&
470
- !a.equals(b);)if(a.getAttribute("data-nostyle"))c=a;else if(!d){var e=a.getAttribute("contentEditable");"false"==e?c=a:"true"==e&&(d=1)}return c}function l(a,b,c,d){return(a.getPosition(b)|d)==d&&(!c.childRule||c.childRule(a))}function g(b){var c=b.document;if(b.collapsed)c=y(this,c),b.insertNode(c),b.moveToPosition(c,CKEDITOR.POSITION_BEFORE_END);else{var d=this.element,e=this._.definition,h,k=e.ignoreReadonly,m=k||e.includeReadonly;null==m&&(m=b.root.getCustomData("cke_includeReadonly"));var n=
470
+ !a.equals(b);)if(a.getAttribute("data-nostyle"))c=a;else if(!d){var e=a.getAttribute("contentEditable");"false"==e?c=a:"true"==e&&(d=1)}return c}function l(a,b,c,d){return(a.getPosition(b)|d)==d&&(!c.childRule||c.childRule(a))}function g(b){var c=b.document;if(b.collapsed)c=y(this,c),b.insertNode(c),b.moveToPosition(c,CKEDITOR.POSITION_BEFORE_END);else{var d=this.element,f=this._.definition,h,k=f.ignoreReadonly,m=k||f.includeReadonly;null==m&&(m=b.root.getCustomData("cke_includeReadonly"));var n=
471
471
  CKEDITOR.dtd[d];n||(h=!0,n=CKEDITOR.dtd.span);b.enlarge(CKEDITOR.ENLARGE_INLINE,1);b.trim();var q=b.createBookmark(),v=q.startNode,x=q.endNode,p=v,u;if(!k){var z=b.getCommonAncestor(),k=a(v,z),z=a(x,z);k&&(p=k.getNextSourceNode(!0));z&&(x=z)}for(p.getPosition(x)==CKEDITOR.POSITION_FOLLOWING&&(p=0);p;){k=!1;if(p.equals(x))p=null,k=!0;else{var w=p.type==CKEDITOR.NODE_ELEMENT?p.getName():null,z=w&&"false"==p.getAttribute("contentEditable"),r=w&&p.getAttribute("data-nostyle");if(w&&p.data("cke-bookmark")||
472
- p.type===CKEDITOR.NODE_COMMENT){p=p.getNextSourceNode(!0);continue}if(z&&m&&CKEDITOR.dtd.$block[w])for(var B=p,D=f(B),C=void 0,A=D.length,aa=0,B=A&&new CKEDITOR.dom.range(B.getDocument());aa<A;++aa){var C=D[aa],G=CKEDITOR.filter.instances[C.data("cke-filter")];if(G?G.check(this):1)B.selectNodeContents(C),g.call(this,B)}D=w?!n[w]||r?0:z&&!m?0:l(p,x,e,M):1;if(D)if(C=p.getParent(),D=e,A=d,aa=h,!C||!(C.getDtd()||CKEDITOR.dtd.span)[A]&&!aa||D.parentRule&&!D.parentRule(C))k=!0;else{if(u||w&&CKEDITOR.dtd.$removeEmpty[w]&&
473
- (p.getPosition(x)|M)!=M||(u=b.clone(),u.setStartBefore(p)),w=p.type,w==CKEDITOR.NODE_TEXT||z||w==CKEDITOR.NODE_ELEMENT&&!p.getChildCount()){for(var w=p,K;(k=!w.getNext(H))&&(K=w.getParent(),n[K.getName()])&&l(K,v,e,I);)w=K;u.setEndAfter(w)}}else k=!0;p=p.getNextSourceNode(r||z)}if(k&&u&&!u.collapsed){for(var k=y(this,c),z=k.hasAttributes(),r=u.getCommonAncestor(),w={},D={},C={},A={},E,da,fa;k&&r;){if(r.getName()==d){for(E in e.attributes)!A[E]&&(fa=r.getAttribute(da))&&(k.getAttribute(E)==fa?D[E]=
474
- 1:A[E]=1);for(da in e.styles)!C[da]&&(fa=r.getStyle(da))&&(k.getStyle(da)==fa?w[da]=1:C[da]=1)}r=r.getParent()}for(E in D)k.removeAttribute(E);for(da in w)k.removeStyle(da);z&&!k.hasAttributes()&&(k=null);k?(u.extractContents().appendTo(k),u.insertNode(k),t.call(this,k),k.mergeSiblings(),CKEDITOR.env.ie||k.$.normalize()):(k=new CKEDITOR.dom.element("span"),u.extractContents().appendTo(k),u.insertNode(k),t.call(this,k),k.remove(!0));u=null}}b.moveToBookmark(q);b.shrink(CKEDITOR.SHRINK_TEXT);b.shrink(CKEDITOR.NODE_ELEMENT,
475
- !0)}}function e(a){function b(){for(var a=new CKEDITOR.dom.elementPath(d.getParent()),c=new CKEDITOR.dom.elementPath(m.getParent()),e=null,f=null,h=0;h<a.elements.length;h++){var k=a.elements[h];if(k==a.block||k==a.blockLimit)break;n.checkElementRemovable(k,!0)&&(e=k)}for(h=0;h<c.elements.length;h++){k=c.elements[h];if(k==c.block||k==c.blockLimit)break;n.checkElementRemovable(k,!0)&&(f=k)}f&&m.breakParent(f);e&&d.breakParent(e)}a.enlarge(CKEDITOR.ENLARGE_INLINE,1);var c=a.createBookmark(),d=c.startNode,
472
+ p.type===CKEDITOR.NODE_COMMENT){p=p.getNextSourceNode(!0);continue}if(z&&m&&CKEDITOR.dtd.$block[w])for(var B=p,D=e(B),C=void 0,A=D.length,aa=0,B=A&&new CKEDITOR.dom.range(B.getDocument());aa<A;++aa){var C=D[aa],G=CKEDITOR.filter.instances[C.data("cke-filter")];if(G?G.check(this):1)B.selectNodeContents(C),g.call(this,B)}D=w?!n[w]||r?0:z&&!m?0:l(p,x,f,M):1;if(D)if(C=p.getParent(),D=f,A=d,aa=h,!C||!(C.getDtd()||CKEDITOR.dtd.span)[A]&&!aa||D.parentRule&&!D.parentRule(C))k=!0;else{if(u||w&&CKEDITOR.dtd.$removeEmpty[w]&&
473
+ (p.getPosition(x)|M)!=M||(u=b.clone(),u.setStartBefore(p)),w=p.type,w==CKEDITOR.NODE_TEXT||z||w==CKEDITOR.NODE_ELEMENT&&!p.getChildCount()){for(var w=p,K;(k=!w.getNext(H))&&(K=w.getParent(),n[K.getName()])&&l(K,v,f,I);)w=K;u.setEndAfter(w)}}else k=!0;p=p.getNextSourceNode(r||z)}if(k&&u&&!u.collapsed){for(var k=y(this,c),z=k.hasAttributes(),r=u.getCommonAncestor(),w={},D={},C={},A={},E,da,fa;k&&r;){if(r.getName()==d){for(E in f.attributes)!A[E]&&(fa=r.getAttribute(da))&&(k.getAttribute(E)==fa?D[E]=
474
+ 1:A[E]=1);for(da in f.styles)!C[da]&&(fa=r.getStyle(da))&&(k.getStyle(da)==fa?w[da]=1:C[da]=1)}r=r.getParent()}for(E in D)k.removeAttribute(E);for(da in w)k.removeStyle(da);z&&!k.hasAttributes()&&(k=null);k?(u.extractContents().appendTo(k),u.insertNode(k),t.call(this,k),k.mergeSiblings(),CKEDITOR.env.ie||k.$.normalize()):(k=new CKEDITOR.dom.element("span"),u.extractContents().appendTo(k),u.insertNode(k),t.call(this,k),k.remove(!0));u=null}}b.moveToBookmark(q);b.shrink(CKEDITOR.SHRINK_TEXT);b.shrink(CKEDITOR.NODE_ELEMENT,
475
+ !0)}}function f(a){function b(){for(var a=new CKEDITOR.dom.elementPath(d.getParent()),c=new CKEDITOR.dom.elementPath(m.getParent()),e=null,f=null,h=0;h<a.elements.length;h++){var k=a.elements[h];if(k==a.block||k==a.blockLimit)break;n.checkElementRemovable(k,!0)&&(e=k)}for(h=0;h<c.elements.length;h++){k=c.elements[h];if(k==c.block||k==c.blockLimit)break;n.checkElementRemovable(k,!0)&&(f=k)}f&&m.breakParent(f);e&&d.breakParent(e)}a.enlarge(CKEDITOR.ENLARGE_INLINE,1);var c=a.createBookmark(),d=c.startNode,
476
476
  e=this._.definition.alwaysRemoveElement;if(a.collapsed){for(var f=new CKEDITOR.dom.elementPath(d.getParent(),a.root),h,k=0,g;k<f.elements.length&&(g=f.elements[k])&&g!=f.block&&g!=f.blockLimit;k++)if(this.checkElementRemovable(g)){var l;!e&&a.collapsed&&(a.checkBoundaryOfElement(g,CKEDITOR.END)||(l=a.checkBoundaryOfElement(g,CKEDITOR.START)))?(h=g,h.match=l?"start":"end"):(g.mergeSiblings(),g.is(this.element)?u.call(this,g):r(g,B(this)[g.getName()]))}if(h){e=d;for(k=0;;k++){g=f.elements[k];if(g.equals(h))break;
477
- else if(g.match)continue;else g=g.clone();g.append(e);e=g}e["start"==h.match?"insertBefore":"insertAfter"](h)}}else{var m=c.endNode,n=this;b();for(f=d;!f.equals(m);)h=f.getNextSourceNode(),f.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(f)&&(f.getName()==this.element?u.call(this,f):r(f,B(this)[f.getName()]),h.type==CKEDITOR.NODE_ELEMENT&&h.contains(d)&&(b(),h=d.getNext())),f=h}a.moveToBookmark(c);a.shrink(CKEDITOR.NODE_ELEMENT,!0)}function f(a){var b=[];a.forEach(function(a){if("true"==
477
+ else if(g.match)continue;else g=g.clone();g.append(e);e=g}e["start"==h.match?"insertBefore":"insertAfter"](h)}}else{var m=c.endNode,n=this;b();for(f=d;!f.equals(m);)h=f.getNextSourceNode(),f.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(f)&&(f.getName()==this.element?u.call(this,f):r(f,B(this)[f.getName()]),h.type==CKEDITOR.NODE_ELEMENT&&h.contains(d)&&(b(),h=d.getNext())),f=h}a.moveToBookmark(c);a.shrink(CKEDITOR.NODE_ELEMENT,!0)}function e(a){var b=[];a.forEach(function(a){if("true"==
478
478
  a.getAttribute("contenteditable"))return b.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return b}function m(a){var b=a.getEnclosedNode()||a.getCommonAncestor(!1,!0);(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1))&&!a.isReadOnly()&&x(a,this)}function k(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 d in c)a.removeAttribute(d,c[d]);if(b.styles)for(var e in b.styles)b.styles.hasOwnProperty(e)&&
479
479
  a.removeStyle(e)}}function h(a){var b=a.createBookmark(!0),c=a.createIterator();c.enforceRealBlocks=!0;this._.enterMode&&(c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR);for(var e,f=a.document,h;e=c.getNextParagraph();)!e.isReadOnly()&&(c.activeFilter?c.activeFilter.check(this):1)&&(h=y(this,f,e),d(e,h));a.moveToBookmark(b)}function c(a){var b=a.createBookmark(1),c=a.createIterator();c.enforceRealBlocks=!0;c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var e,f;e=c.getNextParagraph();)this.checkElementRemovable(e)&&
480
480
  (e.is("pre")?((f=this._.enterMode==CKEDITOR.ENTER_BR?null:a.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))&&e.copyAttributes(f),d(e,f)):u.call(this,e));a.moveToBookmark(b)}function d(a,c){var d=!c;d&&(c=a.getDocument().createElement("div"),a.copyAttributes(c));var e=c&&c.is("pre"),f=a.is("pre"),h=!e&&f;if(e&&!f){f=c;(h=a.getBogus())&&h.remove();h=a.getHtml();h=n(h,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,"");h=h.replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi,"$1");h=h.replace(/([ \t\n\r]+|&nbsp;)/g,
@@ -490,58 +490,58 @@ b,c){var d=new CKEDITOR.dom.element("span");d[c?"setStyle":"setAttribute"](a,b);
490
490
  for(var e,f=d.createIterator();e=f.getNextRange();)b.call(this,e,c);a.selectRanges(d)}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},A={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},G=/\s*(?:;\s*|$)/,K=/#\((.+?)\)/g,H=CKEDITOR.dom.walker.bookmark(0,
491
491
  1),E=CKEDITOR.dom.walker.whitespaces(1);CKEDITOR.style=function(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),z(a.attributes,b),z(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:A[c]?CKEDITOR.STYLE_OBJECT:
492
492
  CKEDITOR.STYLE_INLINE);"object"==typeof this.element&&(this.type=CKEDITOR.STYLE_OBJECT);this._={definition:a}};CKEDITOR.style.prototype={apply:function(a){if(a instanceof CKEDITOR.dom.document)return D.call(this,a.getSelection());if(this.checkApplicable(a.elementPath(),a)){var b=this._.enterMode;b||(this._.enterMode=a.activeEnterMode);D.call(this,a.getSelection(),0,a);this._.enterMode=b}},remove:function(a){if(a instanceof CKEDITOR.dom.document)return D.call(this,a.getSelection(),1);if(this.checkApplicable(a.elementPath(),
493
- a)){var b=this._.enterMode;b||(this._.enterMode=a.activeEnterMode);D.call(this,a.getSelection(),1,a);this._.enterMode=b}},applyToRange:function(a){this.applyToRange=this.type==CKEDITOR.STYLE_INLINE?g:this.type==CKEDITOR.STYLE_BLOCK?h: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?c:this.type==CKEDITOR.STYLE_OBJECT?k:null;return this.removeFromRange(a)},applyToObject:function(a){x(a,
493
+ a)){var b=this._.enterMode;b||(this._.enterMode=a.activeEnterMode);D.call(this,a.getSelection(),1,a);this._.enterMode=b}},applyToRange:function(a){this.applyToRange=this.type==CKEDITOR.STYLE_INLINE?g:this.type==CKEDITOR.STYLE_BLOCK?h:this.type==CKEDITOR.STYLE_OBJECT?m:null;return this.applyToRange(a)},removeFromRange:function(a){this.removeFromRange=this.type==CKEDITOR.STYLE_INLINE?f:this.type==CKEDITOR.STYLE_BLOCK?c:this.type==CKEDITOR.STYLE_OBJECT?k:null;return this.removeFromRange(a)},applyToObject:function(a){x(a,
494
494
  this)},checkActive: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,d=0,e;d<c.length;d++)if(e=c[d],this.type!=CKEDITOR.STYLE_INLINE||e!=a.block&&e!=a.blockLimit){if(this.type==CKEDITOR.STYLE_OBJECT){var f=e.getName();if(!("string"==typeof this.element?f==this.element:f in this.element))continue}if(this.checkElementRemovable(e,!0,b))return!0}}return!1},checkApplicable:function(a,
495
495
  b,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 d=a.getName();if("string"==typeof this.element?d==this.element:d in this.element){if(!b&&!a.hasAttributes())return!0;if(d=c._AC)c=d;else{var d={},e=0,f=c.attributes;
496
496
  if(f)for(var h in f)e++,d[h]=f[h];if(h=CKEDITOR.style.getStyleText(c))d.style||e++,d.style=h;d._length=e;c=c._AC=d}if(c._length){for(var k in c)if("_length"!=k)if(d=a.getAttribute(k)||"","style"==k?v(c[k],d):c[k]==d){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=B(this)[a.getName()]){var d;if(!(b=b.attributes))return!0;for(c=0;c<b.length;c++)if(d=b[c][0],d=a.getAttribute(d)){var e=b[c][1];
497
497
  if(null===e)return!0;if("string"==typeof e){if(d==e)return!0}else if(e.test(d))return!0}}return!1},buildPreview:function(a){var b=this._.definition,c=[],d=b.element;"bdo"==d&&(d="span");var c=["\x3c",d],e=b.attributes;if(e)for(var f in e)c.push(" ",f,'\x3d"',e[f],'"');(e=CKEDITOR.style.getStyleText(b))&&c.push(' style\x3d"',e,'"');c.push("\x3e",a||b.name,"\x3c/",d,"\x3e");return c.join("")},getDefinition:function(){return this._.definition}};CKEDITOR.style.getStyleText=function(a){var b=a._ST;if(b)return b;
498
498
  var b=a.styles,c=a.attributes&&a.attributes.style||"",d="";c.length&&(c=c.replace(G,";"));for(var e in b){var f=b[e],h=(e+":"+f).replace(G,";");"inherit"==f?d+=h:c+=h}c.length&&(c=CKEDITOR.tools.normalizeCssText(c,!0));return a._ST=c+d};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},
499
499
  a,!0);return this.customHandlers[a.type]=b};var M=CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED,I=CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED})();CKEDITOR.styleCommand=function(a,l){this.requiredContent=this.allowedContent=this.style=a;CKEDITOR.tools.extend(this,l,!0)};CKEDITOR.styleCommand.prototype.exec=function(a){a.focus();this.state==CKEDITOR.TRISTATE_OFF?a.applyStyle(this.style):this.state==CKEDITOR.TRISTATE_ON&&
500
- a.removeStyle(this.style)};CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet");CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet);CKEDITOR.loadStylesSet=function(a,l,g){CKEDITOR.stylesSet.addExternal(a,l,"");CKEDITOR.stylesSet.load(a,g)};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{attachStyleStateChange:function(a,l){var g=this._.styleStateChangeCallbacks;g||(g=this._.styleStateChangeCallbacks=[],this.on("selectionChange",function(a){for(var f=0;f<
501
- g.length;f++){var l=g[f],k=l.style.checkActive(a.data.path,this)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;l.fn.call(this,k)}}));g.push({style:a,fn:l})},applyStyle:function(a){a.apply(this)},removeStyle:function(a){a.remove(this)},getStylesSet:function(a){if(this._.stylesDefinitions)a(this._.stylesDefinitions);else{var l=this,g=l.config.stylesCombo_stylesSet||l.config.stylesSet;if(!1===g)a(null);else if(g instanceof Array)l._.stylesDefinitions=g,a(g);else{g||(g="default");var g=g.split(":"),e=g[0];
502
- CKEDITOR.stylesSet.addExternal(e,g[1]?g.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),"");CKEDITOR.stylesSet.load(e,function(f){l._.stylesDefinitions=f[e];a(l._.stylesDefinitions)})}}}});(function(){if(window.Promise)CKEDITOR.tools.promise=Promise;else{var a=CKEDITOR.getUrl("vendor/promise.js");if("function"===typeof window.define&&window.define.amd&&"function"===typeof window.require)return window.require([a],function(a){CKEDITOR.tools.promise=a});CKEDITOR.scriptLoader.load(a,function(l){if(!l)return CKEDITOR.error("no-vendor-lib",
503
- {path:a});if("undefined"!==typeof window.ES6Promise)return CKEDITOR.tools.promise=ES6Promise})}})();(function(){function a(a,f,m){a.once("selectionCheck",function(a){if(!l){var e=a.data.getRanges()[0];m.equals(e)?a.cancel():f.equals(e)&&(g=!0)}},null,null,-1)}var l=!0,g=!1;CKEDITOR.dom.selection.setupEditorOptimization=function(a){a.on("selectionCheck",function(a){a.data&&!g&&a.data.optimizeInElementEnds();g=!1});a.on("contentDom",function(){var f=a.editable();f&&(f.attachListener(f,"keydown",function(a){this._.shiftPressed=
504
- a.data.$.shiftKey},this),f.attachListener(f,"keyup",function(a){this._.shiftPressed=a.data.$.shiftKey},this))})};CKEDITOR.dom.selection.prototype.optimizeInElementEnds=function(){var e=this.getRanges()[0],f=this.root.editor,g;if(this.root.editor._.shiftPressed||this.isFake||e.isCollapsed||e.startContainer.equals(e.endContainer))g=!1;else if(0===e.endOffset)g=!0;else{g=e.startContainer.type===CKEDITOR.NODE_TEXT;var k=e.endContainer.type===CKEDITOR.NODE_TEXT,h=g?e.startContainer.getLength():e.startContainer.getChildCount();
505
- g=e.startOffset===h||g^k}g&&(g=e.clone(),e.shrink(CKEDITOR.SHRINK_TEXT,!1,{skipBogus:!CKEDITOR.env.webkit}),l=!1,a(f,e,g),e.select(),l=!0)}})();CKEDITOR.dom.comment=function(a,l){"string"==typeof a&&(a=(l?l.$: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+"--\x3e"}});"use strict";(function(){var a=
506
- {},l={},g;for(g in CKEDITOR.dtd.$blockLimit)g in CKEDITOR.dtd.$list||(a[g]=1);for(g in CKEDITOR.dtd.$block)g in CKEDITOR.dtd.$blockLimit||g in CKEDITOR.dtd.$empty||(l[g]=1);CKEDITOR.dom.elementPath=function(e,f){var g=null,k=null,h=[],c=e,d;f=f||e.getDocument().getBody();c||(c=f);do if(c.type==CKEDITOR.NODE_ELEMENT){h.push(c);if(!this.lastElement&&(this.lastElement=c,c.is(CKEDITOR.dtd.$object)||"false"==c.getAttribute("contenteditable")))continue;if(c.equals(f))break;if(!k&&(d=c.getName(),"true"==
507
- c.getAttribute("contenteditable")?k=c:!g&&l[d]&&(g=c),a[d])){if(d=!g&&"div"==d){a:{d=c.getChildren();for(var b=0,n=d.count();b<n;b++){var q=d.getItem(b);if(q.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[q.getName()]){d=!0;break a}}d=!1}d=!d}d?g=c:k=c}}while(c=c.getParent());k||(k=f);this.block=g;this.blockLimit=k;this.root=f;this.elements=h}})();CKEDITOR.dom.elementPath.prototype={compare:function(a){var l=this.elements;a=a&&a.elements;if(!a||l.length!=a.length)return!1;for(var g=0;g<l.length;g++)if(!l[g].equals(a[g]))return!1;
508
- return!0},contains:function(a,l,g){var e=0,f;"string"==typeof a&&(f=function(e){return e.getName()==a});a instanceof CKEDITOR.dom.element?f=function(e){return e.equals(a)}:CKEDITOR.tools.isArray(a)?f=function(e){return-1<CKEDITOR.tools.indexOf(a,e.getName())}:"function"==typeof a?f=a:"object"==typeof a&&(f=function(e){return e.getName()in a});var m=this.elements,k=m.length;l&&(g?e+=1:--k);g&&(m=Array.prototype.slice.call(m,0),m.reverse());for(;e<k;e++)if(f(m[e]))return m[e];return null},isContextFor:function(a){var l;
500
+ a.removeStyle(this.style)};CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet");CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet);CKEDITOR.loadStylesSet=function(a,l,g){CKEDITOR.stylesSet.addExternal(a,l,"");CKEDITOR.stylesSet.load(a,g)};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{attachStyleStateChange:function(a,l){var g=this._.styleStateChangeCallbacks;g||(g=this._.styleStateChangeCallbacks=[],this.on("selectionChange",function(a){for(var e=0;e<
501
+ g.length;e++){var l=g[e],k=l.style.checkActive(a.data.path,this)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;l.fn.call(this,k)}}));g.push({style:a,fn:l})},applyStyle:function(a){a.apply(this)},removeStyle:function(a){a.remove(this)},getStylesSet:function(a){if(this._.stylesDefinitions)a(this._.stylesDefinitions);else{var l=this,g=l.config.stylesCombo_stylesSet||l.config.stylesSet;if(!1===g)a(null);else if(g instanceof Array)l._.stylesDefinitions=g,a(g);else{g||(g="default");var g=g.split(":"),f=g[0];
502
+ CKEDITOR.stylesSet.addExternal(f,g[1]?g.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),"");CKEDITOR.stylesSet.load(f,function(e){l._.stylesDefinitions=e[f];a(l._.stylesDefinitions)})}}}});(function(){if(window.Promise)CKEDITOR.tools.promise=Promise;else{var a=CKEDITOR.getUrl("vendor/promise.js");if("function"===typeof window.define&&window.define.amd&&"function"===typeof window.require)return window.require([a],function(a){CKEDITOR.tools.promise=a});CKEDITOR.scriptLoader.load(a,function(l){if(!l)return CKEDITOR.error("no-vendor-lib",
503
+ {path:a});if("undefined"!==typeof window.ES6Promise)return CKEDITOR.tools.promise=ES6Promise})}})();(function(){function a(a,e,m){a.once("selectionCheck",function(a){if(!l){var f=a.data.getRanges()[0];m.equals(f)?a.cancel():e.equals(f)&&(g=!0)}},null,null,-1)}var l=!0,g=!1;CKEDITOR.dom.selection.setupEditorOptimization=function(a){a.on("selectionCheck",function(a){a.data&&!g&&a.data.optimizeInElementEnds();g=!1});a.on("contentDom",function(){var e=a.editable();e&&(e.attachListener(e,"keydown",function(a){this._.shiftPressed=
504
+ a.data.$.shiftKey},this),e.attachListener(e,"keyup",function(a){this._.shiftPressed=a.data.$.shiftKey},this))})};CKEDITOR.dom.selection.prototype.optimizeInElementEnds=function(){var f=this.getRanges()[0],e=this.root.editor,g;if(this.root.editor._.shiftPressed||this.isFake||f.isCollapsed||f.startContainer.equals(f.endContainer))g=!1;else if(0===f.endOffset)g=!0;else{g=f.startContainer.type===CKEDITOR.NODE_TEXT;var k=f.endContainer.type===CKEDITOR.NODE_TEXT,h=g?f.startContainer.getLength():f.startContainer.getChildCount();
505
+ g=f.startOffset===h||g^k}g&&(g=f.clone(),f.shrink(CKEDITOR.SHRINK_TEXT,!1,{skipBogus:!CKEDITOR.env.webkit}),l=!1,a(e,f,g),f.select(),l=!0)}})();CKEDITOR.dom.comment=function(a,l){"string"==typeof a&&(a=(l?l.$: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+"--\x3e"}});"use strict";(function(){var a=
506
+ {},l={},g;for(g in CKEDITOR.dtd.$blockLimit)g in CKEDITOR.dtd.$list||(a[g]=1);for(g in CKEDITOR.dtd.$block)g in CKEDITOR.dtd.$blockLimit||g in CKEDITOR.dtd.$empty||(l[g]=1);CKEDITOR.dom.elementPath=function(f,e){var g=null,k=null,h=[],c=f,d;e=e||f.getDocument().getBody();c||(c=e);do if(c.type==CKEDITOR.NODE_ELEMENT){h.push(c);if(!this.lastElement&&(this.lastElement=c,c.is(CKEDITOR.dtd.$object)||"false"==c.getAttribute("contenteditable")))continue;if(c.equals(e))break;if(!k&&(d=c.getName(),"true"==
507
+ c.getAttribute("contenteditable")?k=c:!g&&l[d]&&(g=c),a[d])){if(d=!g&&"div"==d){a:{d=c.getChildren();for(var b=0,n=d.count();b<n;b++){var q=d.getItem(b);if(q.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[q.getName()]){d=!0;break a}}d=!1}d=!d}d?g=c:k=c}}while(c=c.getParent());k||(k=e);this.block=g;this.blockLimit=k;this.root=e;this.elements=h}})();CKEDITOR.dom.elementPath.prototype={compare:function(a){var l=this.elements;a=a&&a.elements;if(!a||l.length!=a.length)return!1;for(var g=0;g<l.length;g++)if(!l[g].equals(a[g]))return!1;
508
+ return!0},contains:function(a,l,g){var f=0,e;"string"==typeof a&&(e=function(e){return e.getName()==a});a instanceof CKEDITOR.dom.element?e=function(e){return e.equals(a)}:CKEDITOR.tools.isArray(a)?e=function(e){return-1<CKEDITOR.tools.indexOf(a,e.getName())}:"function"==typeof a?e=a:"object"==typeof a&&(e=function(e){return e.getName()in a});var m=this.elements,k=m.length;l&&(g?f+=1:--k);g&&(m=Array.prototype.slice.call(m,0),m.reverse());for(;f<k;f++)if(e(m[f]))return m[f];return null},isContextFor:function(a){var l;
509
509
  return a in CKEDITOR.dtd.$block?(l=this.contains(CKEDITOR.dtd.$intermediate)||this.root.equals(this.block)&&this.block||this.blockLimit,!!l.getDtd()[a]):!0},direction:function(){return(this.block||this.blockLimit||this.root).getDirection(1)}};CKEDITOR.dom.text=function(a,l){"string"==typeof a&&(a=(l?l.$:document).createTextNode(a));this.$=a};CKEDITOR.dom.text.prototype=new CKEDITOR.dom.node;CKEDITOR.tools.extend(CKEDITOR.dom.text.prototype,{type:CKEDITOR.NODE_TEXT,getLength:function(){return this.$.nodeValue.length},
510
- getText:function(){return this.$.nodeValue},setText:function(a){this.$.nodeValue=a},isEmpty:function(a){var l=this.getText();a&&(l=CKEDITOR.tools.trim(l));return!l||l===CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE},split:function(a){var l=this.$.parentNode,g=l.childNodes.length,e=this.getLength(),f=this.getDocument(),m=new CKEDITOR.dom.text(this.$.splitText(a),f);l.childNodes.length==g&&(a>=e?(m=f.createText(""),m.insertAfter(this)):(a=f.createText(""),a.insertAfter(m),a.remove()));return m},substring:function(a,
511
- l){return"number"!=typeof l?this.$.nodeValue.substr(a):this.$.nodeValue.substring(a,l)}});(function(){function a(a,e,f){var l=a.serializable,k=e[f?"endContainer":"startContainer"],h=f?"endOffset":"startOffset",c=l?e.document.getById(a.startNode):a.startNode;a=l?e.document.getById(a.endNode):a.endNode;k.equals(c.getPrevious())?(e.startOffset=e.startOffset-k.getLength()-a.getPrevious().getLength(),k=a.getNext()):k.equals(a.getPrevious())&&(e.startOffset-=k.getLength(),k=a.getNext());k.equals(c.getParent())&&
512
- e[h]++;k.equals(a.getParent())&&e[h]++;e[f?"endContainer":"startContainer"]=k;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,l)};var l={createIterator:function(){var a=this,e=CKEDITOR.dom.walker.bookmark(),f=[],l;return{getNextRange:function(k){l=void 0===l?0:l+1;var h=a[l];if(h&&1<a.length){if(!l)for(var c=a.length-1;0<=c;c--)f.unshift(a[c].createBookmark(!0));if(k)for(var d=
513
- 0;a[l+d+1];){var b=h.document;k=0;c=b.getById(f[d].endNode);for(b=b.getById(f[d+1].startNode);;){c=c.getNextSourceNode(!1);if(b.equals(c))k=1;else if(e(c)||c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary())continue;break}if(!k)break;d++}for(h.moveToBookmark(f.shift());d--;)c=a[++l],c.moveToBookmark(f.shift()),h.setEnd(c.endContainer,c.endOffset)}return h}}},createBookmarks:function(g){for(var e=[],f,l=0;l<this.length;l++){e.push(f=this[l].createBookmark(g,!0));for(var k=l+1;k<this.length;k++)this[k]=
514
- a(f,this[k]),this[k]=a(f,this[k],!0)}return e},createBookmarks2:function(a){for(var e=[],f=0;f<this.length;f++)e.push(this[f].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 l(c){var b=CKEDITOR.skin["ua_"+c],e=CKEDITOR.env;if(b)for(var b=b.split(",").sort(function(a,b){return a>b?-1:1}),f=
515
- 0,h;f<b.length;f++)if(h=b[f],e.ie&&(h.replace(/^ie/,"")==e.version||e.quirks&&"iequirks"==h)&&(h="ie"),e[h]){c+="_"+b[f];break}return CKEDITOR.getUrl(a()+c+".css")}function g(a,b){m[a]||(CKEDITOR.document.appendStyleSheet(l(a)),m[a]=1);b&&b()}function e(a){var b=a.getById(k);b||(b=a.getHead().append("style"),b.setAttribute("id",k),b.setAttribute("type","text/css"));return b}function f(a,b,c){var e,f,h;if(CKEDITOR.env.webkit)for(b=b.split("}").slice(0,-1),f=0;f<b.length;f++)b[f]=b[f].split("{");for(var k=
510
+ getText:function(){return this.$.nodeValue},setText:function(a){this.$.nodeValue=a},isEmpty:function(a){var l=this.getText();a&&(l=CKEDITOR.tools.trim(l));return!l||l===CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE},split:function(a){var l=this.$.parentNode,g=l.childNodes.length,f=this.getLength(),e=this.getDocument(),m=new CKEDITOR.dom.text(this.$.splitText(a),e);l.childNodes.length==g&&(a>=f?(m=e.createText(""),m.insertAfter(this)):(a=e.createText(""),a.insertAfter(m),a.remove()));return m},substring:function(a,
511
+ l){return"number"!=typeof l?this.$.nodeValue.substr(a):this.$.nodeValue.substring(a,l)}});(function(){function a(a,f,e){var l=a.serializable,k=f[e?"endContainer":"startContainer"],h=e?"endOffset":"startOffset",c=l?f.document.getById(a.startNode):a.startNode;a=l?f.document.getById(a.endNode):a.endNode;k.equals(c.getPrevious())?(f.startOffset=f.startOffset-k.getLength()-a.getPrevious().getLength(),k=a.getNext()):k.equals(a.getPrevious())&&(f.startOffset-=k.getLength(),k=a.getNext());k.equals(c.getParent())&&
512
+ f[h]++;k.equals(a.getParent())&&f[h]++;f[e?"endContainer":"startContainer"]=k;return f}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,l)};var l={createIterator:function(){var a=this,f=CKEDITOR.dom.walker.bookmark(),e=[],l;return{getNextRange:function(k){l=void 0===l?0:l+1;var h=a[l];if(h&&1<a.length){if(!l)for(var c=a.length-1;0<=c;c--)e.unshift(a[c].createBookmark(!0));if(k)for(var d=
513
+ 0;a[l+d+1];){var b=h.document;k=0;c=b.getById(e[d].endNode);for(b=b.getById(e[d+1].startNode);;){c=c.getNextSourceNode(!1);if(b.equals(c))k=1;else if(f(c)||c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary())continue;break}if(!k)break;d++}for(h.moveToBookmark(e.shift());d--;)c=a[++l],c.moveToBookmark(e.shift()),h.setEnd(c.endContainer,c.endOffset)}return h}}},createBookmarks:function(g){for(var f=[],e,l=0;l<this.length;l++){f.push(e=this[l].createBookmark(g,!0));for(var k=l+1;k<this.length;k++)this[k]=
514
+ a(e,this[k]),this[k]=a(e,this[k],!0)}return f},createBookmarks2:function(a){for(var f=[],e=0;e<this.length;e++)f.push(this[e].createBookmark2(a));return f},moveToBookmarks:function(a){for(var f=0;f<this.length;f++)this[f].moveToBookmark(a[f])}}})();(function(){function a(){return CKEDITOR.getUrl(CKEDITOR.skinName.split(",")[1]||"skins/"+CKEDITOR.skinName.split(",")[0]+"/")}function l(c){var b=CKEDITOR.skin["ua_"+c],e=CKEDITOR.env;if(b)for(var b=b.split(",").sort(function(a,b){return a>b?-1:1}),f=
515
+ 0,h;f<b.length;f++)if(h=b[f],e.ie&&(h.replace(/^ie/,"")==e.version||e.quirks&&"iequirks"==h)&&(h="ie"),e[h]){c+="_"+b[f];break}return CKEDITOR.getUrl(a()+c+".css")}function g(a,b){m[a]||(CKEDITOR.document.appendStyleSheet(l(a)),m[a]=1);b&&b()}function f(a){var b=a.getById(k);b||(b=a.getHead().append("style"),b.setAttribute("id",k),b.setAttribute("type","text/css"));return b}function e(a,b,c){var e,f,h;if(CKEDITOR.env.webkit)for(b=b.split("}").slice(0,-1),f=0;f<b.length;f++)b[f]=b[f].split("{");for(var k=
516
516
  0;k<a.length;k++)if(CKEDITOR.env.webkit)for(f=0;f<b.length;f++){h=b[f][1];for(e=0;e<c.length;e++)h=h.replace(c[e][0],c[e][1]);a[k].$.sheet.addRule(b[f][0],h)}else{h=b;for(e=0;e<c.length;e++)h=h.replace(c[e][0],c[e][1]);CKEDITOR.env.ie&&11>CKEDITOR.env.version?a[k].$.styleSheet.cssText+=h:a[k].$.innerHTML+=h}}var m={};CKEDITOR.skin={path:a,loadPart:function(c,b){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(a()+"skin.js"),function(){g(c,b)}):g(c,b)},
517
517
  getPath:function(a){return CKEDITOR.getUrl(l(a))},icons:{},addIcon:function(a,b,c,e){a=a.toLowerCase();this.icons[a]||(this.icons[a]={path:b,offset:c||0,bgsize:e||"16px"})},getIconStyle:function(a,b,c,e,f){var h;a&&(a=a.toLowerCase(),b&&(h=this.icons[a+"-rtl"]),h||(h=this.icons[a]));a=c||h&&h.path||"";e=e||h&&h.offset;f=f||h&&h.bgsize||"16px";a&&(a=a.replace(/'/g,"\\'"));return a&&"background-image:url('"+CKEDITOR.getUrl(a)+"');background-position:0 "+e+"px;background-size:"+f+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,
518
- {getUiColor:function(){return this.uiColor},setUiColor:function(a){var b=e(CKEDITOR.document);return(this.setUiColor=function(a){this.uiColor=a;var d=CKEDITOR.skin.chameleon,e="",k="";"function"==typeof d&&(e=d(this,"editor"),k=d(this,"panel"));a=[[c,a]];f([b],e,a);f(h,k,a)}).call(this,a)}});var k="cke_ui_color",h=[],c=/\$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();
519
- if(!a.getById("cke_ui_color")){var d=e(a);h.push(d);b.on("destroy",function(){h=CKEDITOR.tools.array.filter(h,function(a){return d!==a})});(a=b.getUiColor())&&f([d],CKEDITOR.skin.chameleon(b,"panel"),[[c,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',
520
- CKEDITOR.document);a.appendTo(CKEDITOR.document.getHead());try{var l=a.getComputedStyle("border-top-color"),g=a.getComputedStyle("border-right-color");CKEDITOR.env.hc=!(!l||l!=g)}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,l=0;l<a.length;l++)CKEDITOR.editor.prototype.constructor.apply(a[l][0],
521
- a[l][1]),CKEDITOR.add(a[l][0])})();CKEDITOR.skin.name="tao";CKEDITOR.skin.ua_editor="";CKEDITOR.skin.ua_dialog="";CKEDITOR.skin.chameleon=function(){var a=function(){return function(a,f){for(var g=a.match(/[^#]./g),k=0;3>k;k++){var h=k,c;c=parseInt(g[k],16);c=("0"+(0>f?0|c*(1+f):0|c+(255-c)*f).toString(16)).slice(-2);g[h]=c}return"#"+g.join("")}}(),l=function(){var a=new CKEDITOR.template("background:#{to};background-image:-webkit-gradient(linear,lefttop,leftbottom,from({from}),to({to}));background-image:-moz-linear-gradient(top,{from},{to});background-image:-webkit-linear-gradient(top,{from},{to});background-image:-o-linear-gradient(top,{from},{to});background-image:-ms-linear-gradient(top,{from},{to});background-image:linear-gradient(top,{from},{to});filter:progid:DXImageTransform.Microsoft.gradient(gradientType\x3d0,startColorstr\x3d'{from}',endColorstr\x3d'{to}');");
522
- return function(f,g){return a.output({from:f,to:g})}}(),g={editor:new CKEDITOR.template("{id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ {defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_bottom [{defaultGradient}border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color:{ckeResizer}] {id} .cke_dialog_title [{defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_dialog_footer [{defaultGradient}outline-color:{defaultBorder};border-top-color:{defaultBorder};] {id} .cke_dialog_tab [{lightGradient}border-color:{defaultBorder};] {id} .cke_dialog_tab:hover [{mediumGradient}] {id} .cke_dialog_contents [border-top-color:{defaultBorder};] {id} .cke_dialog_tab_selected, {id} .cke_dialog_tab_selected:hover [background:{dialogTabSelected};border-bottom-color:{dialogTabSelectedBorder};] {id} .cke_dialog_body [background:{dialogBody};border-color:{defaultBorder};] {id} .cke_toolgroup [{lightGradient}border-color:{defaultBorder};] {id} a.cke_button_off:hover, {id} a.cke_button_off:focus, {id} a.cke_button_off:active [{mediumGradient}] {id} .cke_button_on [{ckeButtonOn}] {id} .cke_toolbar_separator [background-color: {ckeToolbarSeparator};] {id} .cke_combo_button [border-color:{defaultBorder};{lightGradient}] {id} a.cke_combo_button:hover, {id} a.cke_combo_button:focus, {id} .cke_combo_on a.cke_combo_button [border-color:{defaultBorder};{mediumGradient}] {id} .cke_path_item [color:{elementsPathColor};] {id} a.cke_path_item:hover, {id} a.cke_path_item:focus, {id} a.cke_path_item:active [background-color:{elementsPathBg};] {id}.cke_panel [border-color:{defaultBorder};] "),
518
+ {getUiColor:function(){return this.uiColor},setUiColor:function(a){var b=f(CKEDITOR.document);return(this.setUiColor=function(a){this.uiColor=a;var d=CKEDITOR.skin.chameleon,f="",k="";"function"==typeof d&&(f=d(this,"editor"),k=d(this,"panel"));a=[[c,a]];e([b],f,a);e(h,k,a)}).call(this,a)}});var k="cke_ui_color",h=[],c=/\$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();
519
+ if(!a.getById("cke_ui_color")){var d=f(a);h.push(d);b.on("destroy",function(){h=CKEDITOR.tools.array.filter(h,function(a){return d!==a})});(a=b.getUiColor())&&e([d],CKEDITOR.skin.chameleon(b,"panel"),[[c,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',
520
+ CKEDITOR.document);a.appendTo(CKEDITOR.document.getHead());try{var l=a.getComputedStyle("border-top-color"),g=a.getComputedStyle("border-right-color");CKEDITOR.env.hc=!(!l||l!=g)}catch(f){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,l=0;l<a.length;l++)CKEDITOR.editor.prototype.constructor.apply(a[l][0],
521
+ a[l][1]),CKEDITOR.add(a[l][0])})();CKEDITOR.skin.name="tao";CKEDITOR.skin.ua_editor="";CKEDITOR.skin.ua_dialog="";CKEDITOR.skin.chameleon=function(){var a=function(){return function(a,e){for(var g=a.match(/[^#]./g),k=0;3>k;k++){var h=k,c;c=parseInt(g[k],16);c=("0"+(0>e?0|c*(1+e):0|c+(255-c)*e).toString(16)).slice(-2);g[h]=c}return"#"+g.join("")}}(),l=function(){var a=new CKEDITOR.template("background:#{to};background-image:-webkit-gradient(linear,lefttop,leftbottom,from({from}),to({to}));background-image:-moz-linear-gradient(top,{from},{to});background-image:-webkit-linear-gradient(top,{from},{to});background-image:-o-linear-gradient(top,{from},{to});background-image:-ms-linear-gradient(top,{from},{to});background-image:linear-gradient(top,{from},{to});filter:progid:DXImageTransform.Microsoft.gradient(gradientType\x3d0,startColorstr\x3d'{from}',endColorstr\x3d'{to}');");
522
+ return function(e,g){return a.output({from:e,to:g})}}(),g={editor:new CKEDITOR.template("{id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ {defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_bottom [{defaultGradient}border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color:{ckeResizer}] {id} .cke_dialog_title [{defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_dialog_footer [{defaultGradient}outline-color:{defaultBorder};border-top-color:{defaultBorder};] {id} .cke_dialog_tab [{lightGradient}border-color:{defaultBorder};] {id} .cke_dialog_tab:hover [{mediumGradient}] {id} .cke_dialog_contents [border-top-color:{defaultBorder};] {id} .cke_dialog_tab_selected, {id} .cke_dialog_tab_selected:hover [background:{dialogTabSelected};border-bottom-color:{dialogTabSelectedBorder};] {id} .cke_dialog_body [background:{dialogBody};border-color:{defaultBorder};] {id} .cke_toolgroup [{lightGradient}border-color:{defaultBorder};] {id} a.cke_button_off:hover, {id} a.cke_button_off:focus, {id} a.cke_button_off:active [{mediumGradient}] {id} .cke_button_on [{ckeButtonOn}] {id} .cke_toolbar_separator [background-color: {ckeToolbarSeparator};] {id} .cke_combo_button [border-color:{defaultBorder};{lightGradient}] {id} a.cke_combo_button:hover, {id} a.cke_combo_button:focus, {id} .cke_combo_on a.cke_combo_button [border-color:{defaultBorder};{mediumGradient}] {id} .cke_path_item [color:{elementsPathColor};] {id} a.cke_path_item:hover, {id} a.cke_path_item:focus, {id} a.cke_path_item:active [background-color:{elementsPathBg};] {id}.cke_panel [border-color:{defaultBorder};] "),
523
523
  panel:new CKEDITOR.template(".cke_panel_grouptitle [{lightGradient}border-color:{defaultBorder};] .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menubutton:hover .cke_menubutton_icon, .cke_menubutton:focus .cke_menubutton_icon, .cke_menubutton:active .cke_menubutton_icon [background-color:{menubuttonIconHover};] .cke_menuseparator [background-color:{menubuttonIcon};] a:hover.cke_colorbox, a:focus.cke_colorbox, a:active.cke_colorbox [border-color:{defaultBorder};] a:hover.cke_colorauto, a:hover.cke_colormore, a:focus.cke_colorauto, a:focus.cke_colormore, a:active.cke_colorauto, a:active.cke_colormore [background-color:{ckeColorauto};border-color:{defaultBorder};] ")};
524
- return function(e,f){var m=e.uiColor,m={id:"."+e.id,defaultBorder:a(m,-.1),defaultGradient:l(a(m,.9),m),lightGradient:l(a(m,1),a(m,.7)),mediumGradient:l(a(m,.8),a(m,.5)),ckeButtonOn:l(a(m,.6),a(m,.7)),ckeResizer:a(m,-.4),ckeToolbarSeparator:a(m,.5),ckeColorauto:a(m,.8),dialogBody:a(m,.7),dialogTabSelected:l("#FFFFFF","#FFFFFF"),dialogTabSelectedBorder:"#FFF",elementsPathColor:a(m,-.6),elementsPathBg:m,menubuttonIcon:a(m,.5),menubuttonIconHover:a(m,.3)};return g[f].output(m).replace(/\[/g,"{").replace(/\]/g,
525
- "}")}}();CKEDITOR.plugins.add("basicstyles",{init:function(a){var l=0,g=function(f,h,c,d){if(d){d=new CKEDITOR.style(d);var b=e[c];b.unshift(d);a.attachStyleStateChange(d,function(b){!a.readOnly&&a.getCommand(c).setState(b)});a.addCommand(c,new CKEDITOR.styleCommand(d,{contentForms:b}));a.ui.addButton&&a.ui.addButton(f,{label:h,command:c,toolbar:"basicstyles,"+(l+=10)})}},e={bold:["strong","b",["span",function(a){a=a.styles["font-weight"];return"bold"==a||700<=+a}]],italic:["em","i",["span",function(a){return"italic"==
526
- 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"]},f=a.config,m=a.lang.basicstyles;g("Bold",m.bold,"bold",f.coreStyles_bold);g("Italic",m.italic,"italic",f.coreStyles_italic);g("Underline",m.underline,"underline",f.coreStyles_underline);g("Strike",m.strike,"strike",f.coreStyles_strike);g("Subscript",m.subscript,
527
- "subscript",f.coreStyles_subscript);g("Superscript",m.superscript,"superscript",f.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",overrides:"strike"};CKEDITOR.config.coreStyles_subscript={element:"sub"};
524
+ return function(f,e){var m=f.uiColor,m={id:"."+f.id,defaultBorder:a(m,-.1),defaultGradient:l(a(m,.9),m),lightGradient:l(a(m,1),a(m,.7)),mediumGradient:l(a(m,.8),a(m,.5)),ckeButtonOn:l(a(m,.6),a(m,.7)),ckeResizer:a(m,-.4),ckeToolbarSeparator:a(m,.5),ckeColorauto:a(m,.8),dialogBody:a(m,.7),dialogTabSelected:l("#FFFFFF","#FFFFFF"),dialogTabSelectedBorder:"#FFF",elementsPathColor:a(m,-.6),elementsPathBg:m,menubuttonIcon:a(m,.5),menubuttonIconHover:a(m,.3)};return g[e].output(m).replace(/\[/g,"{").replace(/\]/g,
525
+ "}")}}();CKEDITOR.plugins.add("basicstyles",{init:function(a){var l=0,g=function(e,h,c,d){if(d){d=new CKEDITOR.style(d);var b=f[c];b.unshift(d);a.attachStyleStateChange(d,function(b){!a.readOnly&&a.getCommand(c).setState(b)});a.addCommand(c,new CKEDITOR.styleCommand(d,{contentForms:b}));a.ui.addButton&&a.ui.addButton(e,{label:h,command:c,toolbar:"basicstyles,"+(l+=10)})}},f={bold:["strong","b",["span",function(a){a=a.styles["font-weight"];return"bold"==a||700<=+a}]],italic:["em","i",["span",function(a){return"italic"==
526
+ 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"]},e=a.config,m=a.lang.basicstyles;g("Bold",m.bold,"bold",e.coreStyles_bold);g("Italic",m.italic,"italic",e.coreStyles_italic);g("Underline",m.underline,"underline",e.coreStyles_underline);g("Strike",m.strike,"strike",e.coreStyles_strike);g("Subscript",m.subscript,
527
+ "subscript",e.coreStyles_subscript);g("Superscript",m.superscript,"superscript",e.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",overrides:"strike"};CKEDITOR.config.coreStyles_subscript={element:"sub"};
528
528
  CKEDITOR.config.coreStyles_superscript={element:"sup"};(function(){function a(a,c,d,e){if(!a.isReadOnly()&&!a.equals(d.editable())){CKEDITOR.dom.element.setMarker(e,a,"bidi_processed",1);e=a;for(var f=d.editable();(e=e.getParent())&&!e.equals(f);)if(e.getCustomData("bidi_processed")){a.removeStyle("direction");a.removeAttribute("dir");return}e="useComputedState"in d.config?d.config.useComputedState:1;(e?a.getComputedStyle("direction"):a.getStyle("direction")||a.hasAttribute("dir"))!=c&&(a.removeStyle("direction"),
529
529
  e?(a.removeAttribute("dir"),c!=a.getComputedStyle("direction")&&a.setAttribute("dir",c)):a.setAttribute("dir",c),d.forceNextSelectionCheck())}}function l(a,c,d){var e=a.getCommonAncestor(!1,!0);a=a.clone();a.enlarge(d==CKEDITOR.ENTER_BR?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);if(a.checkBoundaryOfElement(e,CKEDITOR.START)&&a.checkBoundaryOfElement(e,CKEDITOR.END)){for(var f;e&&e.type==CKEDITOR.NODE_ELEMENT&&(f=e.getParent())&&1==f.getChildCount()&&!(e.getName()in c);)e=
530
530
  f;return e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in c&&e}}function g(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,d,c=void 0===c||c;if(!c){d=b.lastElement;for(var e=a.editable();d&&!(d.getName()in k||d.equals(e));){var f=d.getParent();if(!f)break;d=f}}d=d||b.block||b.blockLimit;d.equals(a.editable())&&(e=a.getSelection().getRanges()[0].getEnclosedNode())&&
531
- e.type==CKEDITOR.NODE_ELEMENT&&(d=e);d&&(c=c?d.getComputedStyle("direction"):d.getStyle("direction")||d.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",c))},exec:function(c){var d=c.getSelection(),e=c.config.enterMode,h=d.getRanges();
532
- if(h&&h.length){for(var k={},g=d.createBookmarks(),h=h.createIterator(),y,x=0;y=h.getNextRange(1);){var z=y.getEnclosedNode();z&&(!z||z.type==CKEDITOR.NODE_ELEMENT&&z.getName()in m)||(z=l(y,f,e));z&&a(z,b,c,k);var B=new CKEDITOR.dom.walker(y),w=g[x].startNode,v=g[x++].endNode;B.evaluator=function(a){var b=e==CKEDITOR.ENTER_P?"p":"div",c;if(c=(a?a.type==CKEDITOR.NODE_ELEMENT:!1)&&a.getName()in f){if(b=a.is(b))b=(b=a.getParent())?b.type==CKEDITOR.NODE_ELEMENT:!1;c=!(b&&a.getParent().is("blockquote"))}return!!(c&&
533
- a.getPosition(w)&CKEDITOR.POSITION_FOLLOWING&&(a.getPosition(v)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_CONTAINS)==CKEDITOR.POSITION_PRECEDING)};for(;z=B.next();)a(z,b,c,k);y=y.createIterator();for(y.enlargeBr=e!=CKEDITOR.ENTER_BR;z=y.getNextParagraph(e==CKEDITOR.ENTER_P?"p":"div");)a(z,b,c,k)}CKEDITOR.dom.element.clearAllMarkers(k);c.forceNextSelectionCheck();d.selectBookmarks(g);c.focus()}}}}function e(a){var c=a==h.setAttribute,d=a==h.removeAttribute,e=/\bdirection\s*:\s*(.*?)\s*(:?$|;)/;
534
- return function(f,h){if(!this.isReadOnly()){var k;if(k=f==(c||d?"dir":"direction")||"style"==f&&(d||e.test(h))){a:{k=this;for(var g=k.getDocument().getBody().getParent();k;){if(k.equals(g)){k=!1;break a}k=k.getParent()}k=!0}k=!k}if(k&&(k=this.getDirection(1),g=a.apply(this,arguments),k!=this.getDirection(1)))return this.getDocument().fire("dirChanged",this),g}return a.apply(this,arguments)}}var f={table:1,ul:1,ol:1,blockquote:1,div:1},m={},k={};CKEDITOR.tools.extend(m,f,{tr:1,p:1,div:1,li:1});CKEDITOR.tools.extend(k,
531
+ e.type==CKEDITOR.NODE_ELEMENT&&(d=e);d&&(c=c?d.getComputedStyle("direction"):d.getStyle("direction")||d.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",c))},exec:function(c){var d=c.getSelection(),f=c.config.enterMode,h=d.getRanges();
532
+ if(h&&h.length){for(var k={},g=d.createBookmarks(),h=h.createIterator(),y,x=0;y=h.getNextRange(1);){var z=y.getEnclosedNode();z&&(!z||z.type==CKEDITOR.NODE_ELEMENT&&z.getName()in m)||(z=l(y,e,f));z&&a(z,b,c,k);var B=new CKEDITOR.dom.walker(y),w=g[x].startNode,v=g[x++].endNode;B.evaluator=function(a){var b=f==CKEDITOR.ENTER_P?"p":"div",c;if(c=(a?a.type==CKEDITOR.NODE_ELEMENT:!1)&&a.getName()in e){if(b=a.is(b))b=(b=a.getParent())?b.type==CKEDITOR.NODE_ELEMENT:!1;c=!(b&&a.getParent().is("blockquote"))}return!!(c&&
533
+ a.getPosition(w)&CKEDITOR.POSITION_FOLLOWING&&(a.getPosition(v)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_CONTAINS)==CKEDITOR.POSITION_PRECEDING)};for(;z=B.next();)a(z,b,c,k);y=y.createIterator();for(y.enlargeBr=f!=CKEDITOR.ENTER_BR;z=y.getNextParagraph(f==CKEDITOR.ENTER_P?"p":"div");)a(z,b,c,k)}CKEDITOR.dom.element.clearAllMarkers(k);c.forceNextSelectionCheck();d.selectBookmarks(g);c.focus()}}}}function f(a){var c=a==h.setAttribute,d=a==h.removeAttribute,e=/\bdirection\s*:\s*(.*?)\s*(:?$|;)/;
534
+ return function(f,h){if(!this.isReadOnly()){var k;if(k=f==(c||d?"dir":"direction")||"style"==f&&(d||e.test(h))){a:{k=this;for(var g=k.getDocument().getBody().getParent();k;){if(k.equals(g)){k=!1;break a}k=k.getParent()}k=!0}k=!k}if(k&&(k=this.getDirection(1),g=a.apply(this,arguments),k!=this.getDirection(1)))return this.getDocument().fire("dirChanged",this),g}return a.apply(this,arguments)}}var e={table:1,ul:1,ol:1,blockquote:1,div:1},m={},k={};CKEDITOR.tools.extend(m,e,{tr:1,p:1,div:1,li:1});CKEDITOR.tools.extend(k,
535
535
  m,{td:1});CKEDITOR.plugins.add("bidi",{init:function(a){function c(d,e,f,h,k){a.addCommand(f,new CKEDITOR.command(a,h));a.ui.addButton&&a.ui.addButton(d,{label:e,command:f,toolbar:"bidi,"+k})}if(!a.blockless){var d=a.lang.bidi;c("BidiLtr",d.ltr,"bidiltr",g("ltr"),10);c("BidiRtl",d.rtl,"bidirtl",g("rtl"),20);a.on("contentDom",function(){a.document.on("dirChanged",function(c){a.fire("dirChanged",{node:c.data,dir:c.data.getDirection(1)})})});a.on("contentDirChanged",function(c){c=(a.lang.dir!=c.data?
536
- "add":"remove")+"Class";var d=a.ui.space(a.config.toolbarLocation);if(d)d[c]("cke_mixed_dir_content")})}}});for(var h=CKEDITOR.dom.element.prototype,c=["setStyle","removeStyle","setAttribute","removeAttribute"],d=0;d<c.length;d++)h[c[d]]=CKEDITOR.tools.override(h[c[d]],e)})();(function(){var a={exec:function(a){var g=a.getCommand("blockquote").state,e=a.getSelection(),f=e&&e.getRanges()[0];if(f){var m=e.createBookmarks();if(CKEDITOR.env.ie){var k=m[0].startNode,h=m[0].endNode,c;if(k&&"blockquote"==
537
- k.getParent().getName())for(c=k;c=c.getNext();)if(c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()){k.move(c,!0);break}if(h&&"blockquote"==h.getParent().getName())for(c=h;c=c.getPrevious();)if(c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()){h.move(c);break}}var d=f.createIterator();d.enlargeBr=a.config.enterMode!=CKEDITOR.ENTER_BR;if(g==CKEDITOR.TRISTATE_OFF){for(k=[];g=d.getNextParagraph();)k.push(g);1>k.length&&(g=a.document.createElement(a.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),h=
538
- m.shift(),f.insertNode(g),g.append(new CKEDITOR.dom.text("",a.document)),f.moveToBookmark(h),f.selectNodeContents(g),f.collapse(!0),h=f.createBookmark(),k.push(g),m.unshift(h));c=k[0].getParent();f=[];for(h=0;h<k.length;h++)g=k[h],c=c.getCommonAncestor(g.getParent());for(g={table:1,tbody:1,tr:1,ol:1,ul:1};g[c.getName()];)c=c.getParent();for(h=null;0<k.length;){for(g=k.shift();!g.getParent().equals(c);)g=g.getParent();g.equals(h)||f.push(g);h=g}for(;0<f.length;)if(g=f.shift(),"blockquote"==g.getName()){for(h=
539
- new CKEDITOR.dom.documentFragment(a.document);g.getFirst();)h.append(g.getFirst().remove()),k.push(h.getLast());h.replace(g)}else k.push(g);f=a.document.createElement("blockquote");for(f.insertBefore(k[0]);0<k.length;)g=k.shift(),f.append(g)}else if(g==CKEDITOR.TRISTATE_ON){h=[];for(c={};g=d.getNextParagraph();){for(k=f=null;g.getParent();){if("blockquote"==g.getParent().getName()){f=g.getParent();k=g;break}g=g.getParent()}f&&k&&!k.getCustomData("blockquote_moveout")&&(h.push(k),CKEDITOR.dom.element.setMarker(c,
540
- k,"blockquote_moveout",!0))}CKEDITOR.dom.element.clearAllMarkers(c);g=[];k=[];for(c={};0<h.length;)d=h.shift(),f=d.getParent(),d.getPrevious()?d.getNext()?(d.breakParent(d.getParent()),k.push(d.getNext())):d.remove().insertAfter(f):d.remove().insertBefore(f),f.getCustomData("blockquote_processed")||(k.push(f),CKEDITOR.dom.element.setMarker(c,f,"blockquote_processed",!0)),g.push(d);CKEDITOR.dom.element.clearAllMarkers(c);for(h=k.length-1;0<=h;h--){f=k[h];a:{c=f;for(var d=0,b=c.getChildCount(),n=void 0;d<
541
- b&&(n=c.getChild(d));d++)if(n.type==CKEDITOR.NODE_ELEMENT&&n.isBlockBoundary()){c=!1;break a}c=!0}c&&f.remove()}if(a.config.enterMode==CKEDITOR.ENTER_BR)for(f=!0;g.length;)if(d=g.shift(),"div"==d.getName()){h=new CKEDITOR.dom.documentFragment(a.document);!f||!d.getPrevious()||d.getPrevious().type==CKEDITOR.NODE_ELEMENT&&d.getPrevious().isBlockBoundary()||h.append(a.document.createElement("br"));for(f=d.getNext()&&!(d.getNext().type==CKEDITOR.NODE_ELEMENT&&d.getNext().isBlockBoundary());d.getFirst();)d.getFirst().remove().appendTo(h);
542
- f&&h.append(a.document.createElement("br"));h.replace(d);f=!1}}e.selectBookmarks(m);a.focus()}},refresh:function(a,g){this.setState(a.elementPath(g.block||g.blockLimit).contains("blockquote",1)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)},context:"blockquote",allowedContent:"blockquote",requiredContent:"blockquote"};CKEDITOR.plugins.add("blockquote",{init:function(l){l.blockless||(l.addCommand("blockquote",a),l.ui.addButton&&l.ui.addButton("Blockquote",{label:l.lang.blockquote.toolbar,command:"blockquote",
543
- toolbar:"blocks,10"}))}})})();CKEDITOR.plugins.add("dialogui",{onLoad:function(){var a=function(a){this._||(this._={});this._["default"]=this._.initValue=a["default"]||"";this._.required=a.required||!1;for(var d=[this._],b=1;b<arguments.length;b++)d.push(arguments[b]);d.push(!0);CKEDITOR.tools.extend.apply(CKEDITOR.tools,d);return this._},l={build:function(a,d,b){return new CKEDITOR.ui.dialog.textInput(a,d,b)}},g={build:function(a,d,b){return new CKEDITOR.ui.dialog[d.type](a,d,b)}},e={isChanged:function(){return this.getValue()!=
544
- this.getInitValue()},reset:function(a){this.setValue(this.getInitValue(),a)},setInitValue:function(){this._.initValue=this.getValue()},resetInitValue:function(){this._.initValue=this._["default"]},getInitValue:function(){return this._.initValue}},f=CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onChange:function(a,d){this._.domOnChangeRegistered||(a.on("load",function(){this.getInputElement().on("change",function(){a.parts.dialog.isVisible()&&this.fire("change",{value:this.getValue()})},
536
+ "add":"remove")+"Class";var d=a.ui.space(a.config.toolbarLocation);if(d)d[c]("cke_mixed_dir_content")})}}});for(var h=CKEDITOR.dom.element.prototype,c=["setStyle","removeStyle","setAttribute","removeAttribute"],d=0;d<c.length;d++)h[c[d]]=CKEDITOR.tools.override(h[c[d]],f)})();(function(){var a={exec:function(a){var g=a.getCommand("blockquote").state,f=a.getSelection(),e=f&&f.getRanges()[0];if(e){var m=f.createBookmarks();if(CKEDITOR.env.ie){var k=m[0].startNode,h=m[0].endNode,c;if(k&&"blockquote"==
537
+ k.getParent().getName())for(c=k;c=c.getNext();)if(c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()){k.move(c,!0);break}if(h&&"blockquote"==h.getParent().getName())for(c=h;c=c.getPrevious();)if(c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()){h.move(c);break}}var d=e.createIterator();d.enlargeBr=a.config.enterMode!=CKEDITOR.ENTER_BR;if(g==CKEDITOR.TRISTATE_OFF){for(k=[];g=d.getNextParagraph();)k.push(g);1>k.length&&(g=a.document.createElement(a.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),h=
538
+ m.shift(),e.insertNode(g),g.append(new CKEDITOR.dom.text("",a.document)),e.moveToBookmark(h),e.selectNodeContents(g),e.collapse(!0),h=e.createBookmark(),k.push(g),m.unshift(h));c=k[0].getParent();e=[];for(h=0;h<k.length;h++)g=k[h],c=c.getCommonAncestor(g.getParent());for(g={table:1,tbody:1,tr:1,ol:1,ul:1};g[c.getName()];)c=c.getParent();for(h=null;0<k.length;){for(g=k.shift();!g.getParent().equals(c);)g=g.getParent();g.equals(h)||e.push(g);h=g}for(;0<e.length;)if(g=e.shift(),"blockquote"==g.getName()){for(h=
539
+ new CKEDITOR.dom.documentFragment(a.document);g.getFirst();)h.append(g.getFirst().remove()),k.push(h.getLast());h.replace(g)}else k.push(g);e=a.document.createElement("blockquote");for(e.insertBefore(k[0]);0<k.length;)g=k.shift(),e.append(g)}else if(g==CKEDITOR.TRISTATE_ON){h=[];for(c={};g=d.getNextParagraph();){for(k=e=null;g.getParent();){if("blockquote"==g.getParent().getName()){e=g.getParent();k=g;break}g=g.getParent()}e&&k&&!k.getCustomData("blockquote_moveout")&&(h.push(k),CKEDITOR.dom.element.setMarker(c,
540
+ k,"blockquote_moveout",!0))}CKEDITOR.dom.element.clearAllMarkers(c);g=[];k=[];for(c={};0<h.length;)d=h.shift(),e=d.getParent(),d.getPrevious()?d.getNext()?(d.breakParent(d.getParent()),k.push(d.getNext())):d.remove().insertAfter(e):d.remove().insertBefore(e),e.getCustomData("blockquote_processed")||(k.push(e),CKEDITOR.dom.element.setMarker(c,e,"blockquote_processed",!0)),g.push(d);CKEDITOR.dom.element.clearAllMarkers(c);for(h=k.length-1;0<=h;h--){e=k[h];a:{c=e;for(var d=0,b=c.getChildCount(),n=void 0;d<
541
+ b&&(n=c.getChild(d));d++)if(n.type==CKEDITOR.NODE_ELEMENT&&n.isBlockBoundary()){c=!1;break a}c=!0}c&&e.remove()}if(a.config.enterMode==CKEDITOR.ENTER_BR)for(e=!0;g.length;)if(d=g.shift(),"div"==d.getName()){h=new CKEDITOR.dom.documentFragment(a.document);!e||!d.getPrevious()||d.getPrevious().type==CKEDITOR.NODE_ELEMENT&&d.getPrevious().isBlockBoundary()||h.append(a.document.createElement("br"));for(e=d.getNext()&&!(d.getNext().type==CKEDITOR.NODE_ELEMENT&&d.getNext().isBlockBoundary());d.getFirst();)d.getFirst().remove().appendTo(h);
542
+ e&&h.append(a.document.createElement("br"));h.replace(d);e=!1}}f.selectBookmarks(m);a.focus()}},refresh:function(a,g){this.setState(a.elementPath(g.block||g.blockLimit).contains("blockquote",1)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)},context:"blockquote",allowedContent:"blockquote",requiredContent:"blockquote"};CKEDITOR.plugins.add("blockquote",{init:function(l){l.blockless||(l.addCommand("blockquote",a),l.ui.addButton&&l.ui.addButton("Blockquote",{label:l.lang.blockquote.toolbar,command:"blockquote",
543
+ toolbar:"blocks,10"}))}})})();CKEDITOR.plugins.add("dialogui",{onLoad:function(){var a=function(a){this._||(this._={});this._["default"]=this._.initValue=a["default"]||"";this._.required=a.required||!1;for(var d=[this._],b=1;b<arguments.length;b++)d.push(arguments[b]);d.push(!0);CKEDITOR.tools.extend.apply(CKEDITOR.tools,d);return this._},l={build:function(a,d,b){return new CKEDITOR.ui.dialog.textInput(a,d,b)}},g={build:function(a,d,b){return new CKEDITOR.ui.dialog[d.type](a,d,b)}},f={isChanged:function(){return this.getValue()!=
544
+ this.getInitValue()},reset:function(a){this.setValue(this.getInitValue(),a)},setInitValue:function(){this._.initValue=this.getValue()},resetInitValue:function(){this._.initValue=this._["default"]},getInitValue:function(){return this._.initValue}},e=CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onChange:function(a,d){this._.domOnChangeRegistered||(a.on("load",function(){this.getInputElement().on("change",function(){a.parts.dialog.isVisible()&&this.fire("change",{value:this.getValue()})},
545
545
  this)},this),this._.domOnChangeRegistered=!0);this.on("change",d)}},!0),m=/^on([A-Z]\w+)/,k=function(a){for(var d in a)(m.test(d)||"title"==d||"type"==d)&&delete a[d];return a},h=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(c,d,b,e){if(!(4>arguments.length)){var f=a.call(this,d);f.labelId=CKEDITOR.tools.getNextId()+
546
546
  "_label";this._.children=[];var h={role:d.role||"presentation"};d.includeLabel&&(h["aria-labelledby"]=f.labelId);CKEDITOR.ui.dialog.uiElement.call(this,c,d,b,"div",null,h,function(){var a=[],b=d.required?" cke_required":"";"horizontal"!=d.labelLayout?a.push('\x3clabel class\x3d"cke_dialog_ui_labeled_label'+b+'" ',' id\x3d"'+f.labelId+'"',f.inputId?' for\x3d"'+f.inputId+'"':"",(d.labelStyle?' style\x3d"'+d.labelStyle+'"':"")+"\x3e",d.label,"\x3c/label\x3e",'\x3cdiv class\x3d"cke_dialog_ui_labeled_content"',
547
547
  d.controlStyle?' style\x3d"'+d.controlStyle+'"':"",' role\x3d"presentation"\x3e',e.call(this,c,d),"\x3c/div\x3e"):(b={type:"hbox",widths:d.widths,padding:0,children:[{type:"html",html:'\x3clabel class\x3d"cke_dialog_ui_labeled_label'+b+'" id\x3d"'+f.labelId+'" for\x3d"'+f.inputId+'"'+(d.labelStyle?' style\x3d"'+d.labelStyle+'"':"")+"\x3e"+CKEDITOR.tools.htmlEncode(d.label)+"\x3c/label\x3e"},{type:"html",html:'\x3cspan class\x3d"cke_dialog_ui_labeled_content"'+(d.controlStyle?' style\x3d"'+d.controlStyle+
@@ -561,15 +561,15 @@ e.frameId,'" title\x3d"',d.label,'" src\x3d"javascript:void('];a.push(CKEDITOR.e
561
561
  d["for"];a=h?h.call(this,a):!1;!1!==a&&("xhr"!==a&&c.getContentElement(b[0],b[1]).submit(),this.disable())};c.on("load",function(){c.getContentElement(d["for"][0],d["for"][1])._.buttons.push(e)});CKEDITOR.ui.dialog.button.call(this,c,f,b)}},html:function(){var a=/^\s*<[\w:]+\s+([^>]*)?>/,d=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,b=/\/$/;return function(e,f,h){if(!(3>arguments.length)){var k=[],g=f.html;"\x3c"!=g.charAt(0)&&(g="\x3cspan\x3e"+g+"\x3c/span\x3e");var l=f.focus;if(l){var m=this.focus;
562
562
  this.focus=function(){("function"==typeof l?l:m).call(this);this.fire("focus")};f.isFocusable&&(this.isFocusable=this.isFocusable);this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,e,f,k,"span",null,null,"");k=k.join("").match(a);g=g.match(d)||["","",""];b.test(g[1])&&(g[1]=g[1].slice(0,-1),g[2]="/"+g[2]);h.push([g[1]," ",k[1]||"",g[2]].join(""))}}}(),fieldset:function(a,d,b,e,f){var h=f.label;this._={children:d};CKEDITOR.ui.dialog.uiElement.call(this,a,f,e,"fieldset",null,null,function(){var a=
563
563
  [];h&&a.push("\x3clegend"+(f.labelStyle?' style\x3d"'+f.labelStyle+'"':"")+"\x3e"+h+"\x3c/legend\x3e");for(var c=0;c<b.length;c++)a.push(b[c]);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 d=CKEDITOR.document.getById(this._.labelId);1>d.getChildCount()?(new CKEDITOR.dom.text(a,CKEDITOR.document)).appendTo(d):d.getChild(0).$.nodeValue=
564
- a;return this},getLabel:function(){var a=CKEDITOR.document.getById(this._.labelId);return!a||1>a.getChildCount()?"":a.getChild(0).getText()},eventProcessors:f},!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")},
564
+ a;return this},getLabel:function(){var a=CKEDITOR.document.getById(this._.labelId);return!a||1>a.getChildCount()?"":a.getChild(0).getText()},eventProcessors:e},!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")},
565
565
  isVisible:function(){return this.getElement().getFirst().isVisible()},isEnabled:function(){return!this._.disabled},eventProcessors:CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onClick:function(a,d){this.on("click",function(){d.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)},
566
566
  focus:function(){var a=this.selectParentTab();setTimeout(function(){var d=a.getInputElement();d&&d.$.focus()},0)},select:function(){var a=this.selectParentTab();setTimeout(function(){var d=a.getInputElement();d&&(d.$.focus(),d.$.select())},0)},accessKeyUp:function(){this.select()},setValue:function(a){if(this.bidi){var d=a&&a.charAt(0);(d="‪"==d?"ltr":"‫"==d?"rtl":null)&&(a=a.slice(1));this.setDirectionMarker(d)}a||(a="");return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)},
567
- getValue:function(){var a=CKEDITOR.ui.dialog.uiElement.prototype.getValue.call(this);if(this.bidi&&a){var d=this.getDirectionMarker();d&&(a=("ltr"==d?"‪":"‫")+a)}return a},setDirectionMarker:function(a){var d=this.getInputElement();a?d.setAttributes({dir:a,"data-cke-dir-marker":a}):this.getDirectionMarker()&&d.removeAttributes(["dir","data-cke-dir-marker"])},getDirectionMarker:function(){return this.getInputElement().data("cke-dir-marker")},keyboardFocusable:!0},e,!0);CKEDITOR.ui.dialog.textarea.prototype=
567
+ getValue:function(){var a=CKEDITOR.ui.dialog.uiElement.prototype.getValue.call(this);if(this.bidi&&a){var d=this.getDirectionMarker();d&&(a=("ltr"==d?"‪":"‫")+a)}return a},setDirectionMarker:function(a){var d=this.getInputElement();a?d.setAttributes({dir:a,"data-cke-dir-marker":a}):this.getDirectionMarker()&&d.removeAttributes(["dir","data-cke-dir-marker"])},getDirectionMarker:function(){return this.getInputElement().data("cke-dir-marker")},keyboardFocusable:!0},f,!0);CKEDITOR.ui.dialog.textarea.prototype=
568
568
  new CKEDITOR.ui.dialog.textInput;CKEDITOR.ui.dialog.select.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return this._.select.getElement()},add:function(a,d,b){var e=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),f=this.getInputElement().$;e.$.text=a;e.$.value=void 0===d||null===d?a:d;void 0===b||null===b?CKEDITOR.env.ie?f.add(e.$):f.add(e.$,null):f.add(e.$,b);return this},remove:function(a){this.getInputElement().$.remove(a);
569
- return 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,d){this.getInputElement().$.checked=a;!d&&this.fire("change",{value:a})},getValue:function(){return this.getInputElement().$.checked},accessKeyUp:function(){this.setValue(!this.getValue())},eventProcessors:{onChange:function(a,
570
- d){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return f.onChange.apply(this,arguments);a.on("load",function(){var a=this._.checkbox.getElement();a.on("propertychange",function(c){c=c.data.$;"checked"==c.propertyName&&this.fire("change",{value:a.$.checked})},this)},this);this.on("change",d);return null}},keyboardFocusable:!0},e,!0);CKEDITOR.ui.dialog.radio.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setValue:function(a,d){for(var b=this._.children,e,f=0;f<b.length&&(e=b[f]);f++)e.getElement().$.checked=
571
- e.getValue()==a;!d&&this.fire("change",{value:a})},getValue:function(){for(var a=this._.children,d=0;d<a.length;d++)if(a[d].getElement().$.checked)return a[d].getValue();return null},accessKeyUp:function(){var a=this._.children,d;for(d=0;d<a.length;d++)if(a[d].getElement().$.checked){a[d].getElement().focus();return}a[0].getElement().focus()},eventProcessors:{onChange:function(a,d){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return f.onChange.apply(this,arguments);a.on("load",function(){for(var a=
572
- this._.children,c=this,d=0;d<a.length;d++)a[d].getElement().on("propertychange",function(a){a=a.data.$;"checked"==a.propertyName&&this.$.checked&&c.fire("change",{value:this.getAttribute("value")})})},this);this.on("change",d);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]):
569
+ return this},clear:function(){for(var a=this.getInputElement().$;0<a.length;)a.remove(0);return this},keyboardFocusable:!0},f,!0);CKEDITOR.ui.dialog.checkbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getInputElement:function(){return this._.checkbox.getElement()},setValue:function(a,d){this.getInputElement().$.checked=a;!d&&this.fire("change",{value:a})},getValue:function(){return this.getInputElement().$.checked},accessKeyUp:function(){this.setValue(!this.getValue())},eventProcessors:{onChange:function(a,
570
+ d){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return e.onChange.apply(this,arguments);a.on("load",function(){var a=this._.checkbox.getElement();a.on("propertychange",function(c){c=c.data.$;"checked"==c.propertyName&&this.fire("change",{value:a.$.checked})},this)},this);this.on("change",d);return null}},keyboardFocusable:!0},f,!0);CKEDITOR.ui.dialog.radio.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setValue:function(a,d){for(var b=this._.children,e,f=0;f<b.length&&(e=b[f]);f++)e.getElement().$.checked=
571
+ e.getValue()==a;!d&&this.fire("change",{value:a})},getValue:function(){for(var a=this._.children,d=0;d<a.length;d++)if(a[d].getElement().$.checked)return a[d].getValue();return null},accessKeyUp:function(){var a=this._.children,d;for(d=0;d<a.length;d++)if(a[d].getElement().$.checked){a[d].getElement().focus();return}a[0].getElement().focus()},eventProcessors:{onChange:function(a,d){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return e.onChange.apply(this,arguments);a.on("load",function(){for(var a=
572
+ this._.children,c=this,d=0;d<a.length;d++)a[d].getElement().on("propertychange",function(a){a=a.data.$;"checked"==a.propertyName&&this.$.checked&&c.fire("change",{value:this.getAttribute("value")})})},this);this.on("change",d);return null}}},f,!0);CKEDITOR.ui.dialog.file.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,f,{getInputElement:function(){var a=CKEDITOR.document.getById(this._.frameId).getFrameDocument();return 0<a.$.forms.length?new CKEDITOR.dom.element(a.$.forms[0].elements[0]):
573
573
  this.getElement()},submit:function(){this.getInputElement().getParent().$.submit();return this},getAction:function(){return this.getInputElement().getParent().$.action},registerEvents:function(a){var d=/^on([A-Z]\w+)/,b,e=function(a,b,c,d){a.on("formLoaded",function(){a.getInputElement().on(c,d,a)})},f;for(f in a)if(b=f.match(d))this.eventProcessors[f]?this.eventProcessors[f].call(this,this._.dialog,a[f]):e(this,this._.dialog,b[1].toLowerCase(),a[f]);return this},reset:function(){function a(){b.$.open();
574
574
  var c="";e.size&&(c=e.size-(CKEDITOR.env.ie?7:0));var m=d.frameId+"_input";b.$.write(['\x3chtml dir\x3d"'+g+'" lang\x3d"'+l+'"\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"'+g+'" lang\x3d"'+l+'" action\x3d"',CKEDITOR.tools.htmlEncode(e.action),'"\x3e\x3clabel id\x3d"',d.labelId,'" for\x3d"',m,'" style\x3d"display:none"\x3e',CKEDITOR.tools.htmlEncode(e.label),
575
575
  '\x3c/label\x3e\x3cinput style\x3d"width:100%" id\x3d"',m,'" aria-labelledby\x3d"',d.labelId,'" type\x3d"file" name\x3d"',CKEDITOR.tools.htmlEncode(e.id||"cke_upload"),'" size\x3d"',CKEDITOR.tools.htmlEncode(0<c?c:""),'" /\x3e\x3c/form\x3e\x3c/body\x3e\x3c/html\x3e\x3cscript\x3e',CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"","window.parent.CKEDITOR.tools.callFunction("+h+");","window.onbeforeunload \x3d function() {window.parent.CKEDITOR.tools.callFunction("+k+")}","\x3c/script\x3e"].join(""));
@@ -578,7 +578,7 @@ CKEDITOR.tools.removeFunction(k)}));CKEDITOR.env.gecko?setTimeout(a,500):a()},ge
578
578
  new CKEDITOR.ui.dialog.button;CKEDITOR.ui.dialog.fieldset.prototype=CKEDITOR.tools.clone(CKEDITOR.ui.dialog.hbox.prototype);CKEDITOR.dialog.addUIElement("text",l);CKEDITOR.dialog.addUIElement("password",l);CKEDITOR.dialog.addUIElement("tel",l);CKEDITOR.dialog.addUIElement("textarea",g);CKEDITOR.dialog.addUIElement("checkbox",g);CKEDITOR.dialog.addUIElement("radio",g);CKEDITOR.dialog.addUIElement("button",g);CKEDITOR.dialog.addUIElement("select",g);CKEDITOR.dialog.addUIElement("file",g);CKEDITOR.dialog.addUIElement("fileButton",
579
579
  g);CKEDITOR.dialog.addUIElement("html",g);CKEDITOR.dialog.addUIElement("fieldset",{build:function(a,d,b){for(var e=d.children,f,h=[],k=[],g=0;g<e.length&&(f=e[g]);g++){var l=[];h.push(l);k.push(CKEDITOR.dialog._.uiElementBuilders[f.type].build(a,f,l))}return new CKEDITOR.ui.dialog[d.type](a,k,h,b,d)}})}});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(a){a._.tabBarMode=
580
580
  !0;a._.tabs[a._.currentTabId][0].focus();a._.currentFocusIndex=-1}function l(){for(var a=this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId)+a,c=b-1;c>b-a;c--)if(this._.tabs[this._.tabIdList[c%a]][0].$.offsetHeight)return this._.tabIdList[c%a];return null}function 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];
581
- return null}function e(a,b){for(var c=a.$.getElementsByTagName("input"),d=0,e=c.length;d<e;d++){var f=new CKEDITOR.dom.element(c[d]);"text"==f.getAttribute("type").toLowerCase()&&(b?(f.setAttribute("value",f.getCustomData("fake_value")||""),f.removeCustomData("fake_value")):(f.setCustomData("fake_value",f.getAttribute("value")),f.setAttribute("value","")))}}function f(a,b){var c=this.getInputElement();c&&(a?c.removeAttribute("aria-invalid"):c.setAttribute("aria-invalid",!0));a||(this.select?this.select():
581
+ return null}function f(a,b){for(var c=a.$.getElementsByTagName("input"),d=0,e=c.length;d<e;d++){var f=new CKEDITOR.dom.element(c[d]);"text"==f.getAttribute("type").toLowerCase()&&(b?(f.setAttribute("value",f.getCustomData("fake_value")||""),f.removeCustomData("fake_value")):(f.setCustomData("fake_value",f.getAttribute("value")),f.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():
582
582
  this.focus());b&&alert(b);this.fire("validated",{valid:a,msg:b})}function m(){var a=this.getInputElement();a&&a.removeAttribute("aria-invalid")}function k(a){var b=CKEDITOR.dom.element.createFromHtml(CKEDITOR.addTemplate("dialog",K).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]),d=c.getChild(0),
583
583
  e=c.getChild(1);a.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(c);!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()));d.unselectable();e.unselectable();return{element:b,
584
584
  parts:{dialog:b.getChild(0),title:d,close:e,tabs:c.getChild(2),contents:c.getChild([3,0,0,0]),footer: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")})}
@@ -596,15 +596,15 @@ e.push("\x3c/div\x3e"),f=CKEDITOR.dom.element.createFromHtml(e.join("")),f.setOp
596
596
  (b=J[(b?"CTRL+":"")+(c?"ALT+":"")+(d?"SHIFT+":"")+e])&&b.length&&(b=b[b.length-1],b.keydown&&b.keydown.call(b.uiElement,b.dialog,b.key),a.data.preventDefault())}function x(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,d=a.data.$.shiftKey,e=String.fromCharCode(a.data.$.keyCode);(b=J[(b?"CTRL+":"")+(c?"ALT+":"")+(d?"SHIFT+":"")+e])&&b.length&&(b=b[b.length-1],b.keyup&&(b.keyup.call(b.uiElement,b.dialog,b.key),a.data.preventDefault()))}function z(a,b,c,d,e){(J[c]||(J[c]=[])).push({uiElement:a,
597
597
  dialog:b,key:c,keyup:e||a.accessKeyUp,keydown:d||a.accessKeyDown})}function B(a){for(var b in J){for(var c=J[b],d=c.length-1;0<=d;d--)c[d].dialog!=a&&c[d].uiElement!=a||c.splice(d,1);0===c.length&&delete J[b]}}function w(a,b){a._.accessKeyMap[b]&&a.selectPage(a._.accessKeyMap[b])}function v(){}var D=CKEDITOR.tools.cssLength,C,A,G=!CKEDITOR.env.ie||CKEDITOR.env.edge,K='\x3cdiv class\x3d"cke_reset_all cke_dialog_container {editorId} {editorDialogClass} {hidpi}" dir\x3d"{langDir}" style\x3d"'+(G?"display:flex":
598
598
  "")+'" lang\x3d"{langCode}" role\x3d"dialog" aria-labelledby\x3d"cke_dialog_title_{id}"\x3e\x3ctable class\x3d"cke_dialog '+CKEDITOR.env.cssClass+' cke_{langDir}" style\x3d"'+(G?"margin:auto":"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';
599
- CKEDITOR.dialog=function(b,c){function e(){var a=A._.focusList;a.sort(function(a,b){return a.tabIndex!=b.tabIndex?b.tabIndex-a.tabIndex:a.focusIndex-b.focusIndex});for(var b=a.length,c=0;c<b;c++)a[c].focusIndex=c}function h(a){var b=A._.focusList;a=a||0;if(!(1>b.length)){var c=A._.currentFocusIndex;A._.tabBarMode&&0>a&&(c=0);try{b[c].getInputElement().$.blur()}catch(d){}var e=c,f=1<A._.pageCount;do{e+=a;if(f&&!A._.tabBarMode&&(e==b.length||-1==e)){A._.tabBarMode=!0;A._.tabs[A._.currentTabId][0].focus();
599
+ CKEDITOR.dialog=function(b,c){function f(){var a=A._.focusList;a.sort(function(a,b){return a.tabIndex!=b.tabIndex?b.tabIndex-a.tabIndex:a.focusIndex-b.focusIndex});for(var b=a.length,c=0;c<b;c++)a[c].focusIndex=c}function h(a){var b=A._.focusList;a=a||0;if(!(1>b.length)){var c=A._.currentFocusIndex;A._.tabBarMode&&0>a&&(c=0);try{b[c].getInputElement().$.blur()}catch(d){}var e=c,f=1<A._.pageCount;do{e+=a;if(f&&!A._.tabBarMode&&(e==b.length||-1==e)){A._.tabBarMode=!0;A._.tabs[A._.currentTabId][0].focus();
600
600
  A._.currentFocusIndex=-1;return}e=(e+b.length)%b.length;if(e==c)break}while(a&&!b[e].isFocusable());b[e].focus();"text"==b[e].type&&b[e].select()}}function v(c){if(A==CKEDITOR.dialog._.currentTop){var d=c.data.getKeystroke(),e="rtl"==b.lang.dir,f=[37,38,39,40];B=D=0;if(9==d||d==CKEDITOR.SHIFT+9)h(d==CKEDITOR.SHIFT+9?-1:1),B=1;else if(d==CKEDITOR.ALT+121&&!A._.tabBarMode&&1<A.getPageCount())a(A),B=1;else if(-1!=CKEDITOR.tools.indexOf(f,d)&&A._.tabBarMode)d=-1!=CKEDITOR.tools.indexOf([e?39:37,38],d)?
601
601
  l.call(A):g.call(A),A.selectPage(d),A._.tabs[d][0].focus(),B=1;else if(13!=d&&32!=d||!A._.tabBarMode)if(13==d)d=c.data.getTarget(),d.is("a","button","select","textarea")||d.is("input")&&"button"==d.$.type||((d=this.getButton("ok"))&&CKEDITOR.tools.setTimeout(d.click,0,d),B=1),D=1;else if(27==d)(d=this.getButton("cancel"))?CKEDITOR.tools.setTimeout(d.click,0,d):!1!==this.fire("cancel",{hide:!0}).hide&&this.hide(),D=1;else return;else this.selectPage(this._.currentTabId),this._.tabBarMode=!1,this._.currentFocusIndex=
602
602
  -1,h(1),B=1;x(c)}}function x(a){B?a.data.preventDefault(1):D&&a.data.stopPropagation()}var p=CKEDITOR.dialog._.dialogDefinitions[c],y=CKEDITOR.tools.clone(C),z=b.config.dialog_buttonsOrder||"OS",w=b.lang.dir,u={},B,D;("OS"==z&&CKEDITOR.env.mac||"rtl"==z&&"ltr"==w||"ltr"==z&&"rtl"==w)&&y.buttons.reverse();p=CKEDITOR.tools.extend(p(b),y);p=CKEDITOR.tools.clone(p);p=new d(this,p);y=k(b);this._={editor:b,element:y.element,name:c,model:null,contentSize:{width:0,height:0},size:{width:0,height:0},contents:{},
603
603
  buttons:{},accessKeyMap:{},viewportRatio:{width:.5,height:.5},tabs:{},tabIdList:[],currentTabId:null,currentTabIndex:null,pageCount:0,lastTab:null,tabBarMode:!1,focusList:[],currentFocusIndex:0,hasFocus:!1};this.parts=y.parts;CKEDITOR.tools.setTimeout(function(){b.fire("ariaWidget",this.parts.contents)},0,this);y={top:0,visibility:"hidden"};CKEDITOR.env.ie6Compat&&(y.position="absolute");y["rtl"==w?"right":"left"]=0;this.parts.dialog.setStyles(y);CKEDITOR.event.call(this);this.definition=p=CKEDITOR.fire("dialogDefinition",
604
604
  {name:c,definition:p,dialog:this},b).definition;if(!("removeDialogTabs"in b._)&&b.config.removeDialogTabs){y=b.config.removeDialogTabs.split(";");for(w=0;w<y.length;w++)if(z=y[w].split(":"),2==z.length){var r=z[0];u[r]||(u[r]=[]);u[r].push(z[1])}b._.removeDialogTabs=u}if(b._.removeDialogTabs&&(u=b._.removeDialogTabs[c]))for(w=0;w<u.length;w++)p.removeContents(u[w]);if(p.onLoad)this.on("load",p.onLoad);if(p.onShow)this.on("show",p.onShow);if(p.onHide)this.on("hide",p.onHide);if(p.onOk)this.on("ok",
605
605
  function(a){b.fire("saveSnapshot");setTimeout(function(){b.fire("saveSnapshot")},0);!1===p.onOk.call(this,a)&&(a.data.hide=!1)});this.state=CKEDITOR.DIALOG_STATE_IDLE;if(p.onCancel)this.on("cancel",function(a){!1===p.onCancel.call(this,a)&&(a.data.hide=!1)});var A=this,t=function(a){var b=A._.contents,c=!1,d;for(d in b)for(var e in b[d])if(c=a.call(this,b[d][e]))return};this.on("ok",function(a){t(function(b){if(b.validate){var c=b.validate(this),d="string"==typeof c||!1===c;d&&(a.data.hide=!1,a.stop());
606
- f.call(b,!d,"string"==typeof c?c:void 0);return d}})},this,null,0);this.on("cancel",function(a){t(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=h;var G=this._.element;b.focusManager.add(G,1);this.on("show",function(){G.on("keydown",v,this);if(CKEDITOR.env.gecko)G.on("keypress",
607
- x,this)});this.on("hide",function(){G.removeListener("keydown",v);CKEDITOR.env.gecko&&G.removeListener("keypress",x);t(function(a){m.apply(a)})});this.on("iframeAdded",function(a){(new CKEDITOR.dom.document(a.data.iframe.$.contentWindow.document)).on("keydown",v,this,null,0)});this.on("show",function(){e();var a=1<A._.pageCount;b.config.dialog_startupFocusTab&&a?(A._.tabBarMode=!0,A._.tabs[A._.currentTabId][0].focus(),A._.currentFocusIndex=-1):this._.hasFocus||(this._.currentFocusIndex=a?-1:this._.focusList.length-
606
+ e.call(b,!d,"string"==typeof c?c:void 0);return d}})},this,null,0);this.on("cancel",function(a){t(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=h;var G=this._.element;b.focusManager.add(G,1);this.on("show",function(){G.on("keydown",v,this);if(CKEDITOR.env.gecko)G.on("keypress",
607
+ x,this)});this.on("hide",function(){G.removeListener("keydown",v);CKEDITOR.env.gecko&&G.removeListener("keypress",x);t(function(a){m.apply(a)})});this.on("iframeAdded",function(a){(new CKEDITOR.dom.document(a.data.iframe.$.contentWindow.document)).on("keydown",v,this,null,0)});this.on("show",function(){f();var a=1<A._.pageCount;b.config.dialog_startupFocusTab&&a?(A._.tabBarMode=!0,A._.tabs[A._.currentTabId][0].focus(),A._.currentFocusIndex=-1):this._.hasFocus||(this._.currentFocusIndex=a?-1:this._.focusList.length-
608
608
  1,p.onFocus?(a=p.onFocus.call(this))&&a.focus():h(1))},this,null,4294967295);if(CKEDITOR.env.ie6Compat)this.on("load",function(){var a=this.getElement(),b=a.getFirst();b.remove();b.appendTo(a)},this);n(this);q(this);(new CKEDITOR.dom.text(p.title,CKEDITOR.document)).appendTo(this.parts.title);for(w=0;w<p.contents.length;w++)(u=p.contents[w])&&this.addPage(u);this.parts.tabs.on("click",function(b){var c=b.data.getTarget();c.hasClass("cke_dialog_tab")&&(c=c.$.id,this.selectPage(c.substring(4,c.lastIndexOf("_"))),
609
609
  a(this),b.data.preventDefault())},this);w=[];u=CKEDITOR.dialog._.uiElementBuilders.hbox.build(this,{type:"hbox",className:"cke_dialog_footer_buttons",widths:[],children:p.buttons},w).getChild();this.parts.footer.setHtml(w.join(""));for(w=0;w<u.length;w++)this._.buttons[u[w].id]=u[w]};CKEDITOR.dialog.prototype={destroy:function(){this.hide();this._.element.remove()},resize:function(a,b){if(!this._.contentSize||this._.contentSize.width!=a||this._.contentSize.height!=b){CKEDITOR.dialog.fire("resize",
610
610
  {dialog:this,width:a,height:b},this._.editor);this.fire("resize",{width:a,height:b},this._.editor);this.parts.contents.setStyles({width:a+"px",height:b+"px"});if("rtl"==this._.editor.lang.dir&&this._.position){var c=this.parts.dialog.getParent().getClientSize().width;this._.position.x=c-this._.contentSize.width-parseInt(this._.element.getFirst().getStyle("right"),10)}this._.contentSize={width:a,height:b}}},getSize:function(){var a=this._.element.getFirst();return{width:a.$.offsetWidth||0,height:a.$.offsetHeight||
@@ -620,7 +620,7 @@ var a=this._.element;a.setStyle("display","none");this.parts.dialog.setStyle("vi
620
620
  '"':"",d=CKEDITOR.dialog._.uiElementBuilders.vbox.build(this,{type:"vbox",className:"cke_dialog_page_contents",children:a.elements,expand:!!a.expand,padding:a.padding,style:a.style||"width: 100%;"},b),e=this._.contents[a.id]={},f=d.getChild(),h=0;d=f.shift();)d.notAllowed||"hbox"==d.type||"vbox"==d.type||h++,e[d.id]=d,"function"==typeof d.getChild&&f.push.apply(f,d.getChild());h||(a.hidden=!0);b=CKEDITOR.dom.element.createFromHtml(b.join(""));b.setAttribute("role","tabpanel");b.setStyle("min-height",
621
621
  "100%");d=CKEDITOR.env;e="cke_"+a.id+"_"+CKEDITOR.tools.getNextNumber();c=CKEDITOR.dom.element.createFromHtml(['\x3ca class\x3d"cke_dialog_tab"',0<this._.pageCount?" cke_last":"cke_first",c,a.hidden?' style\x3d"display:none"':"",' id\x3d"',e,'"',d.gecko&&!d.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",e);this._.tabs[a.id]=[c,b];this._.tabIdList.push(a.id);!a.hidden&&this._.pageCount++;
622
622
  this._.lastTab=c;this.updateStyle();b.setAttribute("name",a.id);b.appendTo(this.parts.contents);c.unselectable();this.parts.tabs.append(c);a.accessKey&&(z(this,this,"CTRL+"+a.accessKey,v,w),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 b in this._.tabs){var c=this._.tabs[b][0],d=this._.tabs[b][1];b!=a&&(c.removeClass("cke_dialog_tab_selected"),
623
- c.removeAttribute("aria-selected"),d.hide());d.setAttribute("aria-hidden",b!=a)}var f=this._.tabs[a];f[0].addClass("cke_dialog_tab_selected");f[0].setAttribute("aria-selected",!0);CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat?(e(f[1]),f[1].show(),setTimeout(function(){e(f[1],1)},0)):f[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(a){var b=
623
+ c.removeAttribute("aria-selected"),d.hide());d.setAttribute("aria-hidden",b!=a)}var e=this._.tabs[a];e[0].addClass("cke_dialog_tab_selected");e[0].setAttribute("aria-selected",!0);CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat?(f(e[1]),e[1].show(),setTimeout(function(){f(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(a){var b=
624
624
  this._.tabs[a]&&this._.tabs[a][0];b&&1!=this._.pageCount&&b.isVisible()&&(a==this._.currentTabId&&this.selectPage(l.call(this)),b.hide(),this._.pageCount--,this.updateStyle())},showPage:function(a){if(a=this._.tabs[a]&&this._.tabs[a][0])a.show(),this._.pageCount++,this.updateStyle()},getElement:function(){return this._.element},getName:function(){return this._.name},getContentElement:function(a,b){var c=this._.contents[a];return c&&c[b]},getValueOf:function(a,b){return this.getContentElement(a,b).getValue()},
625
625
  setValueOf:function(a,b,c){return this.getContentElement(a,b).setValue(c)},getButton:function(a){return this._.buttons[a]},click:function(a){return this._.buttons[a].click()},disableButton:function(a){return this._.buttons[a].disable()},enableButton:function(a){return this._.buttons[a].enable()},getPageCount:function(){return this._.pageCount},getParentEditor:function(){return this._.editor},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement()},addFocusable:function(a,
626
626
  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++}},setState: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")]=
@@ -648,44 +648,44 @@ f=/^(\s*[\w-]+\s*:\s*[^:;]+(?:;|$))*$/;CKEDITOR.VALIDATE_OR=1;CKEDITOR.VALIDATE_
648
648
  e[f](b):h||e[f](b);return h?!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 e.test(CKEDITOR.tools.trim(a))},a)},htmlLength:function(a){return this.functions(function(a){return d.test(CKEDITOR.tools.trim(a))},a)},inlineStyle:function(a){return this.functions(function(a){return f.test(CKEDITOR.tools.trim(a))},
649
649
  a)},equals:function(a,b){return this.functions(function(b){return b==a},b)},notEqual:function(a,b){return this.functions(function(b){return b!=a},b)}};CKEDITOR.on("instanceDestroyed",function(a){if(CKEDITOR.tools.isEmpty(CKEDITOR.instances)){for(var b;b=CKEDITOR.dialog._.currentTop;)b.hide();for(var c in I)I[c].remove();I={}}a=a.editor._.storedDialogs;for(var d in a)a[d].destroy()})})();CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{openDialog:function(a,b,c){var d=null,e=CKEDITOR.dialog._.dialogDefinitions[a];
650
650
  null===CKEDITOR.dialog._.currentTop&&r(this);if("function"==typeof e)e=this._.storedDialogs||(this._.storedDialogs={}),d=e[a]||(e[a]=new CKEDITOR.dialog(this,a)),d.setModel(c),b&&b.call(d,d),d.show();else{if("failed"==e)throw p(this),Error('[CKEDITOR.dialog.openDialog] Dialog "'+a+'" failed when loading definition.');"string"==typeof e&&CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(e),function(){"function"!=typeof CKEDITOR.dialog._.dialogDefinitions[a]&&(CKEDITOR.dialog._.dialogDefinitions[a]="failed");
651
- this.openDialog(a,b,c)},this,0,1)}CKEDITOR.skin.loadPart("dialog");if(d)d.once("hide",function(){d.setModel(null)},null,null,999);return d}})})();var ka=!1;CKEDITOR.plugins.add("dialog",{requires:"dialogui",init:function(a){ka||(CKEDITOR.document.appendStyleSheet(this.path+"styles/dialog.css"),ka=!0);a.on("doubleclick",function(l){l.data.dialog&&a.openDialog(l.data.dialog)},null,null,999)}});"use strict";(function(){function a(a,e){CKEDITOR.tools.extend(this,e,{editor:a,id:"cke-"+CKEDITOR.tools.getUniqueId(),
652
- area:a._.notificationArea});e.type||(this.type="info");this.element=this._createElement();a.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(this.element)}function l(a){var e=this;this.editor=a;this.notifications=[];this.element=this._createElement();this._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",
653
- {init:function(a){function e(a){var e=new CKEDITOR.dom.element("div");e.setStyles({position:"fixed","margin-left":"-9999px"});e.setAttributes({"aria-live":"assertive","aria-atomic":"true"});e.setText(a);CKEDITOR.document.getBody().append(e);setTimeout(function(){e.remove()},100)}a._.notificationArea=new l(a);a.showNotification=function(e,l,k){var h,c;"progress"==l?h=k:c=k;e=new CKEDITOR.plugins.notification(a,{message:e,type:l,progress:h,duration:c});e.show();return e};a.on("key",function(f){if(27==
654
- f.data.keyCode){var l=a._.notificationArea.notifications;l.length&&(e(a.lang.notification.closed),l[l.length-1].hide(),f.cancel())}})}});a.prototype={show:function(){!1!==this.editor.fire("notificationShow",{notification:this})&&(this.area.add(this),this._hideAfterTimeout())},update:function(a){var e=!0;!1===this.editor.fire("notificationUpdate",{notification:this,options:a})&&(e=!1);var f=this.element,l=f.findOne(".cke_notification_message"),k=f.findOne(".cke_notification_progress"),h=a.type;f.removeAttribute("role");
655
- a.progress&&"progress"!=this.type&&(h="progress");h&&(f.removeClass(this._getClass()),f.removeAttribute("aria-label"),this.type=h,f.addClass(this._getClass()),f.setAttribute("aria-label",this.type),"progress"!=this.type||k?"progress"!=this.type&&k&&k.remove():(k=this._createProgressElement(),k.insertBefore(l)));void 0!==a.message&&(this.message=a.message,l.setHtml(this.message));void 0!==a.progress&&(this.progress=a.progress,k&&k.setStyle("width",this._getPercentageProgress()));e&&a.important&&(f.setAttribute("role",
656
- "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,this)},_createElement:function(){var a=this,e,f,l=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});
657
- "progress"==this.type&&e.append(this._createProgressElement());f=new CKEDITOR.dom.element("p");f.addClass("cke_notification_message");f.setHtml(this.message);e.append(f);f=CKEDITOR.dom.element.createFromHtml('\x3ca class\x3d"cke_notification_close" href\x3d"javascript:void(0)" title\x3d"'+l+'" role\x3d"button" tabindex\x3d"-1"\x3e\x3cspan class\x3d"cke_label"\x3eX\x3c/span\x3e\x3c/a\x3e');e.append(f);f.on("click",function(){a.editor.focus();a.hide()});return e},_getClass:function(){return"progress"==
658
- 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*(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"==
659
- this.type)e="number"==typeof this.editor.config.notification_duration?this.editor.config.notification_duration:5E3;e&&(a._hideTimeoutId=setTimeout(function(){a.hide()},e))}};l.prototype={add:function(a){this.notifications.push(a);this.element.append(a.element);1==this.element.getChildCount()&&(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(),
660
- this.element.getChildCount()||(this._removeListeners(),this.element.remove()))},_createElement:function(){var a=this.editor,e=a.config,f=new CKEDITOR.dom.element("div");f.addClass("cke_notifications_area");f.setAttribute("id","cke_notifications_area_"+a.name);f.setStyle("z-index",e.baseFloatZIndex-2);return f},_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);
661
- 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);e.removeListener("floatingSpaceLayout",this._layout);e.removeListener("blur",this._layout)},_layout:function(){function a(){e.setStyle("left",y(x+l.width-n-q))}var e=this.element,f=
662
- this.editor,l=f.ui.contentsElement.getClientRect(),k=f.ui.contentsElement.getDocumentPosition(),h,c,d=e.getClientRect(),b,n=this._notificationWidth,q=this._notificationMargin;b=CKEDITOR.document.getWindow();var u=b.getScrollPosition(),t=b.getViewPaneSize(),r=CKEDITOR.document.getBody(),p=r.getDocumentPosition(),y=CKEDITOR.tools.cssLength;n&&q||(b=this.element.getChild(0),n=this._notificationWidth=b.getClientRect().width,q=this._notificationMargin=parseInt(b.getComputedStyle("margin-left"),10)+parseInt(b.getComputedStyle("margin-right"),
663
- 10));f.toolbar&&(h=f.ui.space(f.config.toolbarLocation),c=h.getClientRect());h&&h.isVisible()&&c.bottom>l.top&&c.bottom<l.bottom-d.height?e.setStyles({position:"fixed",top:y(c.bottom)}):0<l.top?e.setStyles({position:"absolute",top:y(k.y)}):k.y+l.height-d.height>u.y?e.setStyles({position:"fixed",top:0}):e.setStyles({position:"absolute",top:y(k.y+l.height-d.height)});var x="fixed"==e.getStyle("position")?l.left:"static"!=r.getComputedStyle("position")?k.x-p.x:k.x;l.width<n+q?k.x+n+q>u.x+t.width?a():
664
- e.setStyle("left",y(x)):k.x+n+q>u.x+t.width?e.setStyle("left",y(x)):k.x+l.width/2+n/2+q>u.x+t.width?e.setStyle("left",y(x-k.x+u.x+t.width-n-q)):0>l.left+l.width-n-q?a():0>l.left+l.width/2-n/2?e.setStyle("left",y(x-k.x+u.x)):e.setStyle("left",y(x+l.width/2-n/2-q/2))}};CKEDITOR.plugins.notification=a})();(function(){var a='\x3ca id\x3d"{id}" class\x3d"cke_button cke_button__{name} cke_button_{state} {cls}"'+(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}"';
651
+ this.openDialog(a,b,c)},this,0,1)}CKEDITOR.skin.loadPart("dialog");if(d)d.once("hide",function(){d.setModel(null)},null,null,999);return d}})})();var ka=!1;CKEDITOR.plugins.add("dialog",{requires:"dialogui",init:function(a){ka||(CKEDITOR.document.appendStyleSheet(this.path+"styles/dialog.css"),ka=!0);a.on("doubleclick",function(l){l.data.dialog&&a.openDialog(l.data.dialog)},null,null,999)}});"use strict";(function(){function a(a,f){CKEDITOR.tools.extend(this,f,{editor:a,id:"cke-"+CKEDITOR.tools.getUniqueId(),
652
+ area:a._.notificationArea});f.type||(this.type="info");this.element=this._createElement();a.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(this.element)}function l(a){var f=this;this.editor=a;this.notifications=[];this.element=this._createElement();this._uiBuffer=CKEDITOR.tools.eventsBuffer(10,this._layout,this);this._changeBuffer=CKEDITOR.tools.eventsBuffer(500,this._layout,this);a.on("destroy",function(){f._removeListeners();f.element.remove()})}CKEDITOR.plugins.add("notification",
653
+ {init:function(a){function f(a){var f=new CKEDITOR.dom.element("div");f.setStyles({position:"fixed","margin-left":"-9999px"});f.setAttributes({"aria-live":"assertive","aria-atomic":"true"});f.setText(a);CKEDITOR.document.getBody().append(f);setTimeout(function(){f.remove()},100)}a._.notificationArea=new l(a);a.showNotification=function(e,f,k){var h,c;"progress"==f?h=k:c=k;e=new CKEDITOR.plugins.notification(a,{message:e,type:f,progress:h,duration:c});e.show();return e};a.on("key",function(e){if(27==
654
+ e.data.keyCode){var l=a._.notificationArea.notifications;l.length&&(f(a.lang.notification.closed),l[l.length-1].hide(),e.cancel())}})}});a.prototype={show:function(){!1!==this.editor.fire("notificationShow",{notification:this})&&(this.area.add(this),this._hideAfterTimeout())},update:function(a){var f=!0;!1===this.editor.fire("notificationUpdate",{notification:this,options:a})&&(f=!1);var e=this.element,l=e.findOne(".cke_notification_message"),k=e.findOne(".cke_notification_progress"),h=a.type;e.removeAttribute("role");
655
+ a.progress&&"progress"!=this.type&&(h="progress");h&&(e.removeClass(this._getClass()),e.removeAttribute("aria-label"),this.type=h,e.addClass(this._getClass()),e.setAttribute("aria-label",this.type),"progress"!=this.type||k?"progress"!=this.type&&k&&k.remove():(k=this._createProgressElement(),k.insertBefore(l)));void 0!==a.message&&(this.message=a.message,l.setHtml(this.message));void 0!==a.progress&&(this.progress=a.progress,k&&k.setStyle("width",this._getPercentageProgress()));f&&a.important&&(e.setAttribute("role",
656
+ "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,this)},_createElement:function(){var a=this,f,e,l=this.editor.lang.common.close;f=new CKEDITOR.dom.element("div");f.addClass("cke_notification");f.addClass(this._getClass());f.setAttributes({id:this.id,role:"alert","aria-label":this.type});
657
+ "progress"==this.type&&f.append(this._createProgressElement());e=new CKEDITOR.dom.element("p");e.addClass("cke_notification_message");e.setHtml(this.message);f.append(e);e=CKEDITOR.dom.element.createFromHtml('\x3ca class\x3d"cke_notification_close" href\x3d"javascript:void(0)" title\x3d"'+l+'" role\x3d"button" tabindex\x3d"-1"\x3e\x3cspan class\x3d"cke_label"\x3eX\x3c/span\x3e\x3c/a\x3e');f.append(e);e.on("click",function(){a.editor.focus();a.hide()});return f},_getClass:function(){return"progress"==
658
+ 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*(this.progress||0))+"%"},_hideAfterTimeout:function(){var a=this,f;this._hideTimeoutId&&clearTimeout(this._hideTimeoutId);if("number"==typeof this.duration)f=this.duration;else if("info"==this.type||"success"==
659
+ this.type)f="number"==typeof this.editor.config.notification_duration?this.editor.config.notification_duration:5E3;f&&(a._hideTimeoutId=setTimeout(function(){a.hide()},f))}};l.prototype={add:function(a){this.notifications.push(a);this.element.append(a.element);1==this.element.getChildCount()&&(CKEDITOR.document.getBody().append(this.element),this._attachListeners());this._layout()},remove:function(a){var f=CKEDITOR.tools.indexOf(this.notifications,a);0>f||(this.notifications.splice(f,1),a.element.remove(),
660
+ this.element.getChildCount()||(this._removeListeners(),this.element.remove()))},_createElement:function(){var a=this.editor,f=a.config,e=new CKEDITOR.dom.element("div");e.addClass("cke_notifications_area");e.setAttribute("id","cke_notifications_area_"+a.name);e.setStyle("z-index",f.baseFloatZIndex-2);return e},_attachListeners:function(){var a=CKEDITOR.document.getWindow(),f=this.editor;a.on("scroll",this._uiBuffer.input);a.on("resize",this._uiBuffer.input);f.on("change",this._changeBuffer.input);
661
+ f.on("floatingSpaceLayout",this._layout,this,null,20);f.on("blur",this._layout,this,null,20)},_removeListeners:function(){var a=CKEDITOR.document.getWindow(),f=this.editor;a.removeListener("scroll",this._uiBuffer.input);a.removeListener("resize",this._uiBuffer.input);f.removeListener("change",this._changeBuffer.input);f.removeListener("floatingSpaceLayout",this._layout);f.removeListener("blur",this._layout)},_layout:function(){function a(){f.setStyle("left",y(x+l.width-n-q))}var f=this.element,e=
662
+ this.editor,l=e.ui.contentsElement.getClientRect(),k=e.ui.contentsElement.getDocumentPosition(),h,c,d=f.getClientRect(),b,n=this._notificationWidth,q=this._notificationMargin;b=CKEDITOR.document.getWindow();var u=b.getScrollPosition(),t=b.getViewPaneSize(),r=CKEDITOR.document.getBody(),p=r.getDocumentPosition(),y=CKEDITOR.tools.cssLength;n&&q||(b=this.element.getChild(0),n=this._notificationWidth=b.getClientRect().width,q=this._notificationMargin=parseInt(b.getComputedStyle("margin-left"),10)+parseInt(b.getComputedStyle("margin-right"),
663
+ 10));e.toolbar&&(h=e.ui.space(e.config.toolbarLocation),c=h.getClientRect());h&&h.isVisible()&&c.bottom>l.top&&c.bottom<l.bottom-d.height?f.setStyles({position:"fixed",top:y(c.bottom)}):0<l.top?f.setStyles({position:"absolute",top:y(k.y)}):k.y+l.height-d.height>u.y?f.setStyles({position:"fixed",top:0}):f.setStyles({position:"absolute",top:y(k.y+l.height-d.height)});var x="fixed"==f.getStyle("position")?l.left:"static"!=r.getComputedStyle("position")?k.x-p.x:k.x;l.width<n+q?k.x+n+q>u.x+t.width?a():
664
+ f.setStyle("left",y(x)):k.x+n+q>u.x+t.width?f.setStyle("left",y(x)):k.x+l.width/2+n/2+q>u.x+t.width?f.setStyle("left",y(x-k.x+u.x+t.width-n-q)):0>l.left+l.width-n-q?a():0>l.left+l.width/2-n/2?f.setStyle("left",y(x-k.x+u.x)):f.setStyle("left",y(x+l.width/2-n/2-q/2))}};CKEDITOR.plugins.notification=a})();(function(){var a='\x3ca id\x3d"{id}" class\x3d"cke_button cke_button__{name} cke_button_{state} {cls}"'+(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}"';
665
665
  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 l="";CKEDITOR.env.ie&&(l='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var a=a+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" onclick\x3d"'+l+'CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{style}"')+
666
- '\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',g=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,
667
- 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(e){e.execCommand(a.command)}});this._={}};CKEDITOR.ui.button.handler={create:function(a){return new CKEDITOR.ui.button(a)}};CKEDITOR.ui.button.prototype={render:function(a,l){function k(){var b=a.mode;b&&(b=this.modes[b]?void 0!==h[b]?h[b]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,b=a.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:
666
+ '\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',g=CKEDITOR.addTemplate("buttonArrow",'\x3cspan class\x3d"cke_button_arrow"\x3e'+(CKEDITOR.env.hc?"\x26#9660;":"")+"\x3c/span\x3e"),f=CKEDITOR.addTemplate("button",a);CKEDITOR.plugins.add("button",{beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_BUTTON,
667
+ 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(f){f.execCommand(a.command)}});this._={}};CKEDITOR.ui.button.handler={create:function(a){return new CKEDITOR.ui.button(a)}};CKEDITOR.ui.button.prototype={render:function(a,l){function k(){var b=a.mode;b&&(b=this.modes[b]?void 0!==h[b]?h[b]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,b=a.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:
668
668
  b,this.setState(b),this.refresh&&this.refresh())}var h=null,c=CKEDITOR.env,d=this._.id=CKEDITOR.tools.getNextId(),b="",n=this.command,q,u,t;this._.editor=a;var r={id:d,button:this,editor:a,focus:function(){CKEDITOR.document.getById(d).focus()},execute:function(){this.button.click(a)},attach:function(a){this.button.attach(a)}},p=CKEDITOR.tools.addFunction(function(a){if(r.onkey)return a=new CKEDITOR.dom.event(a),!1!==r.onkey(r,a.getKeystroke())}),y=CKEDITOR.tools.addFunction(function(a){var b;r.onfocus&&
669
669
  (b=!1!==r.onfocus(r,new CKEDITOR.dom.event(a)));return b}),x=0;r.clickFn=q=CKEDITOR.tools.addFunction(function(){x&&(a.unlockSelection(1),x=0);r.execute();c.iOS&&a.focus()});this.modes?(h={},a.on("beforeModeUnload",function(){a.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(h[a.mode]=this._.state)},this),a.on("activeFilterChange",k,this),a.on("mode",k,this),!this.readOnly&&a.on("readOnly",k,this)):n&&(n=a.getCommand(n))&&(n.on("state",function(){this.setState(n.state)},this),b+=n.state==CKEDITOR.TRISTATE_ON?
670
670
  "on":n.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");var z;if(this.directional)a.on("contentDirChanged",function(b){var c=CKEDITOR.document.getById(this._.id),d=c.getFirst();b=b.data;b!=a.lang.dir?c.addClass("cke_"+b):c.removeClass("cke_ltr").removeClass("cke_rtl");d.setAttribute("style",CKEDITOR.skin.getIconStyle(z,"rtl"==b,this.icon,this.iconOffset))},this);n?(u=a.getCommandKeystroke(n))&&(t=CKEDITOR.tools.keystrokeToString(a.lang.common.keyboard,u)):b+="off";u=this.name||this.command;var B=
671
671
  null,w=this.icon;z=u;this.icon&&!/\./.test(this.icon)?(z=this.icon,w=null):(this.icon&&(B=this.icon),CKEDITOR.env.hidpi&&this.iconHiDpi&&(B=this.iconHiDpi));B?(CKEDITOR.skin.addIcon(B,B),w=null):B=z;b={id:d,name:u,iconName:z,label:this.label,cls:(this.hasArrow?"cke_button_expandable ":"")+(this.className||""),state:b,ariaDisabled:"disabled"==b?"true":"false",title:this.title+(t?" ("+t.display+")":""),ariaShortcut:t?a.lang.common.keyboardShortcut+" "+t.aria:"",titleJs:c.gecko&&!c.hc?"":(this.title||
672
- "").replace("'",""),hasArrow:"string"===typeof this.hasArrow&&this.hasArrow||(this.hasArrow?"true":"false"),keydownFn:p,focusFn:y,clickFn:q,style:CKEDITOR.skin.getIconStyle(B,"rtl"==a.lang.dir,w,this.iconOffset),arrowHtml:this.hasArrow?g.output():""};e.output(b,l);if(this.onRender)this.onRender();return r},setState:function(a){if(this._.state==a)return!1;this._.state=a;var e=CKEDITOR.document.getById(this._.id);return e?(e.setState(a,"cke_button"),e.setAttribute("aria-disabled",a==CKEDITOR.TRISTATE_DISABLED),
673
- this.hasArrow?e.setAttribute("aria-expanded",a==CKEDITOR.TRISTATE_ON):a===CKEDITOR.TRISTATE_ON?e.setAttribute("aria-pressed",!0):e.removeAttribute("aria-pressed"),!0):!1},getState:function(){return this._.state},toFeature:function(a){if(this._.feature)return this._.feature;var e=this;this.allowedContent||this.requiredContent||!this.command||(e=a.getCommand(this.command)||e);return this._.feature=e}};CKEDITOR.ui.prototype.addButton=function(a,e){this.add(a,CKEDITOR.UI_BUTTON,e)}})();(function(){function a(a){function e(){for(var b=
674
- k(),c=CKEDITOR.tools.clone(a.config.toolbarGroups)||l(a),d=0;d<c.length;d++){var g=c[d];if("/"!=g){"string"==typeof g&&(g=c[d]={name:g});var m,p=g.groups;if(p)for(var y=0;y<p.length;y++)m=p[y],(m=b[m])&&h(g,m);(m=b[g.name])&&h(g,m)}}return c}function k(){var b={},c,d,e;for(c in a.ui.items)d=a.ui.items[c],e=d.toolbar||"others",e=e.split(","),d=e[0],e=parseInt(e[1]||-1,10),b[d]||(b[d]=[]),b[d].push({name:c,order:e});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?
675
- 1:a.order<b.order?-1:1});return b}function h(b,c){if(c.length){b.items?b.items.push(a.ui.create("-")):b.items=[];for(var e;e=c.shift();)e="string"==typeof e?e:e.name,d&&-1!=CKEDITOR.tools.indexOf(d,e)||(e=a.ui.create(e))&&a.addFeature(e)&&b.items.push(e)}}function c(a){var b=[],c,d,e;for(c=0;c<a.length;++c)d=a[c],e={},"/"==d?b.push(d):CKEDITOR.tools.isArray(d)?(h(e,CKEDITOR.tools.clone(d)),b.push(e)):d.items&&(h(e,CKEDITOR.tools.clone(d.items)),e.name=d.name,b.push(e));return b}var d=a.config.removeButtons,
676
- d=d&&d.split(","),b=a.config.toolbar;"string"==typeof b&&(b=a.config["toolbar_"+b]);return a.toolbar=b?c(b):e()}function l(a){return a._.toolbarGroups||(a._.toolbarGroups=[{name:"document",groups:["mode","document","doctools"]},{name:"clipboard",groups:["clipboard","undo"]},{name:"editing",groups:["find","selection","spellchecker"]},{name:"forms"},"/",{name:"basicstyles",groups:["basicstyles","cleanup"]},{name:"paragraph",groups:["list","indent","blocks","align","bidi"]},{name:"links"},{name:"insert"},
677
- "/",{name:"styles"},{name:"colors"},{name:"tools"},{name:"others"},{name:"about"}])}var g=function(){this.toolbars=[];this.focusCommandExecuted=!1};g.prototype.focus=function(){for(var a=0,e;e=this.toolbars[a++];)for(var k=0,h;h=e.items[k++];)if(h.focus){h.focus();return}};var e={modes:{wysiwyg:1,source: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",
678
- {requires:"button",init:function(f){var l,k=function(a,c){var d,b="rtl"==f.lang.dir,e=f.config.toolbarGroupCycling,g=b?37:39,b=b?39:37,e=void 0===e||e;switch(c){case 9:case CKEDITOR.SHIFT+9:for(;!d||!d.items.length;)if(d=9==c?(d?d.next:a.toolbar.next)||f.toolbox.toolbars[0]:(d?d.previous:a.toolbar.previous)||f.toolbox.toolbars[f.toolbox.toolbars.length-1],d.items.length)for(a=d.items[l?d.items.length-1:0];a&&!a.focus;)(a=l?a.previous:a.next)||(d=0);a&&a.focus();return!1;case g:d=a;do d=d.next,!d&&
679
- e&&(d=a.toolbar.items[0]);while(d&&!d.focus);d?d.focus():k(a,9);return!1;case 40:return a.button&&a.button.hasArrow?a.execute():k(a,40==c?g:b),!1;case b:case 38:d=a;do d=d.previous,!d&&e&&(d=a.toolbar.items[a.toolbar.items.length-1]);while(d&&!d.focus);d?d.focus():(l=1,k(a,CKEDITOR.SHIFT+9),l=0);return!1;case 27:return f.focus(),!1;case 13:case 32:return a.execute(),!1}return!0};f.on("uiSpace",function(e){if(e.data.space==f.config.toolbarLocation){e.removeListener();f.toolbox=new g;var c=CKEDITOR.tools.getNextId(),
680
- d=['\x3cspan id\x3d"',c,'" class\x3d"cke_voice_label"\x3e',f.lang.toolbar.toolbars,"\x3c/span\x3e",'\x3cspan id\x3d"'+f.ui.spaceId("toolbox")+'" class\x3d"cke_toolbox" role\x3d"group" aria-labelledby\x3d"',c,'" onmousedown\x3d"return false;"\x3e'],c=!1!==f.config.toolbarStartupExpanded,b,l;f.config.toolbarCanCollapse&&f.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&d.push('\x3cspan class\x3d"cke_toolbox_main"'+(c?"\x3e":' style\x3d"display:none"\x3e'));for(var m=f.toolbox.toolbars,u=a(f),t=u.length,
681
- r=0;r<t;r++){var p,y=0,x,z=u[r],B="/"!==z&&("/"===u[r+1]||r==t-1),w;if(z)if(b&&(d.push("\x3c/span\x3e"),l=b=0),"/"===z)d.push('\x3cspan class\x3d"cke_toolbar_break"\x3e\x3c/span\x3e');else{w=z.items||z;for(var v=0;v<w.length;v++){var D=w[v],C;if(D){var A=function(a){a=a.render(f,d);G=y.items.push(a)-1;0<G&&(a.previous=y.items[G-1],a.previous.next=a);a.toolbar=y;a.onkey=k;a.onfocus=function(){f.toolbox.focusCommandExecuted||f.focus()}};if(D.type==CKEDITOR.UI_SEPARATOR)l=b&&D;else{C=!1!==D.canGroup;
682
- if(!y){p=CKEDITOR.tools.getNextId();y={id:p,items:[]};x=z.name&&(f.lang.toolbar.toolbarGroups[z.name]||z.name);d.push('\x3cspan id\x3d"',p,'" class\x3d"cke_toolbar'+(B?' cke_toolbar_last"':'"'),x?' aria-labelledby\x3d"'+p+'_label"':"",' role\x3d"toolbar"\x3e');x&&d.push('\x3cspan id\x3d"',p,'_label" class\x3d"cke_voice_label"\x3e',x,"\x3c/span\x3e");d.push('\x3cspan class\x3d"cke_toolbar_start"\x3e\x3c/span\x3e');var G=m.push(y)-1;0<G&&(y.previous=m[G-1],y.previous.next=y)}C?b||(d.push('\x3cspan class\x3d"cke_toolgroup" role\x3d"presentation"\x3e'),
683
- b=1):b&&(d.push("\x3c/span\x3e"),b=0);l&&(A(l),l=0);A(D)}}}b&&(d.push("\x3c/span\x3e"),l=b=0);y&&d.push('\x3cspan class\x3d"cke_toolbar_end"\x3e\x3c/span\x3e\x3c/span\x3e')}}f.config.toolbarCanCollapse&&d.push("\x3c/span\x3e");if(f.config.toolbarCanCollapse&&f.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var K=CKEDITOR.tools.addFunction(function(){f.execCommand("toolbarCollapse")});f.on("destroy",function(){CKEDITOR.tools.removeFunction(K)});f.addCommand("toolbarCollapse",{readOnly:1,exec:function(a){var b=
672
+ "").replace("'",""),hasArrow:"string"===typeof this.hasArrow&&this.hasArrow||(this.hasArrow?"true":"false"),keydownFn:p,focusFn:y,clickFn:q,style:CKEDITOR.skin.getIconStyle(B,"rtl"==a.lang.dir,w,this.iconOffset),arrowHtml:this.hasArrow?g.output():""};f.output(b,l);if(this.onRender)this.onRender();return r},setState:function(a){if(this._.state==a)return!1;this._.state=a;var f=CKEDITOR.document.getById(this._.id);return f?(f.setState(a,"cke_button"),f.setAttribute("aria-disabled",a==CKEDITOR.TRISTATE_DISABLED),
673
+ this.hasArrow?f.setAttribute("aria-expanded",a==CKEDITOR.TRISTATE_ON):a===CKEDITOR.TRISTATE_ON?f.setAttribute("aria-pressed",!0):f.removeAttribute("aria-pressed"),!0):!1},getState:function(){return this._.state},toFeature:function(a){if(this._.feature)return this._.feature;var f=this;this.allowedContent||this.requiredContent||!this.command||(f=a.getCommand(this.command)||f);return this._.feature=f}};CKEDITOR.ui.prototype.addButton=function(a,f){this.add(a,CKEDITOR.UI_BUTTON,f)}})();(function(){function a(a){function f(){for(var b=
674
+ k(),c=CKEDITOR.tools.clone(a.config.toolbarGroups)||l(a),d=0;d<c.length;d++){var g=c[d];if("/"!=g){"string"==typeof g&&(g=c[d]={name:g});var m,p=g.groups;if(p)for(var y=0;y<p.length;y++)m=p[y],(m=b[m])&&h(g,m);(m=b[g.name])&&h(g,m)}}return c}function k(){var b={},c,d,f;for(c in a.ui.items)d=a.ui.items[c],f=d.toolbar||"others",f=f.split(","),d=f[0],f=parseInt(f[1]||-1,10),b[d]||(b[d]=[]),b[d].push({name:c,order:f});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?
675
+ 1:a.order<b.order?-1:1});return b}function h(b,c){if(c.length){b.items?b.items.push(a.ui.create("-")):b.items=[];for(var f;f=c.shift();)f="string"==typeof f?f:f.name,d&&-1!=CKEDITOR.tools.indexOf(d,f)||(f=a.ui.create(f))&&a.addFeature(f)&&b.items.push(f)}}function c(a){var b=[],c,d,e;for(c=0;c<a.length;++c)d=a[c],e={},"/"==d?b.push(d):CKEDITOR.tools.isArray(d)?(h(e,CKEDITOR.tools.clone(d)),b.push(e)):d.items&&(h(e,CKEDITOR.tools.clone(d.items)),e.name=d.name,b.push(e));return b}var d=a.config.removeButtons,
676
+ d=d&&d.split(","),b=a.config.toolbar;"string"==typeof b&&(b=a.config["toolbar_"+b]);return a.toolbar=b?c(b):f()}function l(a){return a._.toolbarGroups||(a._.toolbarGroups=[{name:"document",groups:["mode","document","doctools"]},{name:"clipboard",groups:["clipboard","undo"]},{name:"editing",groups:["find","selection","spellchecker"]},{name:"forms"},"/",{name:"basicstyles",groups:["basicstyles","cleanup"]},{name:"paragraph",groups:["list","indent","blocks","align","bidi"]},{name:"links"},{name:"insert"},
677
+ "/",{name:"styles"},{name:"colors"},{name:"tools"},{name:"others"},{name:"about"}])}var g=function(){this.toolbars=[];this.focusCommandExecuted=!1};g.prototype.focus=function(){for(var a=0,f;f=this.toolbars[a++];)for(var k=0,h;h=f.items[k++];)if(h.focus){h.focus();return}};var f={modes:{wysiwyg:1,source: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",
678
+ {requires:"button",init:function(e){var l,k=function(a,c){var d,b="rtl"==e.lang.dir,f=e.config.toolbarGroupCycling,g=b?37:39,b=b?39:37,f=void 0===f||f;switch(c){case 9:case CKEDITOR.SHIFT+9:for(;!d||!d.items.length;)if(d=9==c?(d?d.next:a.toolbar.next)||e.toolbox.toolbars[0]:(d?d.previous:a.toolbar.previous)||e.toolbox.toolbars[e.toolbox.toolbars.length-1],d.items.length)for(a=d.items[l?d.items.length-1:0];a&&!a.focus;)(a=l?a.previous:a.next)||(d=0);a&&a.focus();return!1;case g:d=a;do d=d.next,!d&&
679
+ f&&(d=a.toolbar.items[0]);while(d&&!d.focus);d?d.focus():k(a,9);return!1;case 40:return a.button&&a.button.hasArrow?a.execute():k(a,40==c?g:b),!1;case b:case 38:d=a;do d=d.previous,!d&&f&&(d=a.toolbar.items[a.toolbar.items.length-1]);while(d&&!d.focus);d?d.focus():(l=1,k(a,CKEDITOR.SHIFT+9),l=0);return!1;case 27:return e.focus(),!1;case 13:case 32:return a.execute(),!1}return!0};e.on("uiSpace",function(f){if(f.data.space==e.config.toolbarLocation){f.removeListener();e.toolbox=new g;var c=CKEDITOR.tools.getNextId(),
680
+ d=['\x3cspan id\x3d"',c,'" class\x3d"cke_voice_label"\x3e',e.lang.toolbar.toolbars,"\x3c/span\x3e",'\x3cspan id\x3d"'+e.ui.spaceId("toolbox")+'" class\x3d"cke_toolbox" role\x3d"group" aria-labelledby\x3d"',c,'" onmousedown\x3d"return false;"\x3e'],c=!1!==e.config.toolbarStartupExpanded,b,l;e.config.toolbarCanCollapse&&e.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&d.push('\x3cspan class\x3d"cke_toolbox_main"'+(c?"\x3e":' style\x3d"display:none"\x3e'));for(var m=e.toolbox.toolbars,u=a(e),t=u.length,
681
+ r=0;r<t;r++){var p,y=0,x,z=u[r],B="/"!==z&&("/"===u[r+1]||r==t-1),w;if(z)if(b&&(d.push("\x3c/span\x3e"),l=b=0),"/"===z)d.push('\x3cspan class\x3d"cke_toolbar_break"\x3e\x3c/span\x3e');else{w=z.items||z;for(var v=0;v<w.length;v++){var D=w[v],C;if(D){var A=function(a){a=a.render(e,d);G=y.items.push(a)-1;0<G&&(a.previous=y.items[G-1],a.previous.next=a);a.toolbar=y;a.onkey=k;a.onfocus=function(){e.toolbox.focusCommandExecuted||e.focus()}};if(D.type==CKEDITOR.UI_SEPARATOR)l=b&&D;else{C=!1!==D.canGroup;
682
+ if(!y){p=CKEDITOR.tools.getNextId();y={id:p,items:[]};x=z.name&&(e.lang.toolbar.toolbarGroups[z.name]||z.name);d.push('\x3cspan id\x3d"',p,'" class\x3d"cke_toolbar'+(B?' cke_toolbar_last"':'"'),x?' aria-labelledby\x3d"'+p+'_label"':"",' role\x3d"toolbar"\x3e');x&&d.push('\x3cspan id\x3d"',p,'_label" class\x3d"cke_voice_label"\x3e',x,"\x3c/span\x3e");d.push('\x3cspan class\x3d"cke_toolbar_start"\x3e\x3c/span\x3e');var G=m.push(y)-1;0<G&&(y.previous=m[G-1],y.previous.next=y)}C?b||(d.push('\x3cspan class\x3d"cke_toolgroup" role\x3d"presentation"\x3e'),
683
+ b=1):b&&(d.push("\x3c/span\x3e"),b=0);l&&(A(l),l=0);A(D)}}}b&&(d.push("\x3c/span\x3e"),l=b=0);y&&d.push('\x3cspan class\x3d"cke_toolbar_end"\x3e\x3c/span\x3e\x3c/span\x3e')}}e.config.toolbarCanCollapse&&d.push("\x3c/span\x3e");if(e.config.toolbarCanCollapse&&e.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var K=CKEDITOR.tools.addFunction(function(){e.execCommand("toolbarCollapse")});e.on("destroy",function(){CKEDITOR.tools.removeFunction(K)});e.addCommand("toolbarCollapse",{readOnly:1,exec:function(a){var b=
684
684
  a.ui.space("toolbar_collapser"),c=b.getPrevious(),d=a.ui.space("contents"),e=c.getParent(),f=parseInt(d.$.style.height,10),h=e.$.offsetHeight,k=b.hasClass("cke_toolbox_collapser_min");k?(c.show(),b.removeClass("cke_toolbox_collapser_min"),b.setAttribute("title",a.lang.toolbar.toolbarCollapse)):(c.hide(),b.addClass("cke_toolbox_collapser_min"),b.setAttribute("title",a.lang.toolbar.toolbarExpand));b.getFirst().setText(k?"▲":"◀");d.setStyle("height",f-(e.$.offsetHeight-h)+"px");a.fire("resize",{outerHeight:a.container.$.offsetHeight,
685
- contentsHeight:d.$.offsetHeight,outerWidth:a.container.$.offsetWidth})},modes:{wysiwyg:1,source:1}});f.setKeystroke(CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),"toolbarCollapse");d.push('\x3ca title\x3d"'+(c?f.lang.toolbar.toolbarCollapse:f.lang.toolbar.toolbarExpand)+'" id\x3d"'+f.ui.spaceId("toolbar_collapser")+'" tabIndex\x3d"-1" class\x3d"cke_toolbox_collapser');c||d.push(" cke_toolbox_collapser_min");d.push('" onclick\x3d"CKEDITOR.tools.callFunction('+K+')"\x3e','\x3cspan class\x3d"cke_arrow"\x3e\x26#9650;\x3c/span\x3e',
686
- "\x3c/a\x3e")}d.push("\x3c/span\x3e");e.data.html+=d.join("")}});f.on("destroy",function(){if(this.toolbox){var a,c=0,d,b,e;for(a=this.toolbox.toolbars;c<a.length;c++)for(b=a[c].items,d=0;d<b.length;d++)e=b[d],e.clickFn&&CKEDITOR.tools.removeFunction(e.clickFn),e.keyDownFn&&CKEDITOR.tools.removeFunction(e.keyDownFn)}});f.on("uiReady",function(){var a=f.ui.space("toolbox");a&&f.focusManager.add(a,1)});f.addCommand("toolbarFocus",e);f.setKeystroke(CKEDITOR.ALT+121,"toolbarFocus");f.ui.add("-",CKEDITOR.UI_SEPARATOR,
687
- {});f.ui.addHandler(CKEDITOR.UI_SEPARATOR,{create:function(){return{render:function(a,c){c.push('\x3cspan class\x3d"cke_toolbar_separator" role\x3d"separator"\x3e\x3c/span\x3e');return{}}}}})}});CKEDITOR.ui.prototype.addToolbarGroup=function(a,e,k){var h=l(this.editor),c=0===e,d={name:a};if(k){if(k=CKEDITOR.tools.search(h,function(a){return a.name==k})){!k.groups&&(k.groups=[]);if(e&&(e=CKEDITOR.tools.indexOf(k.groups,e),0<=e)){k.groups.splice(e+1,0,a);return}c?k.groups.splice(0,0,a):k.groups.push(a);
688
- return}e=null}e&&(e=CKEDITOR.tools.indexOf(h,function(a){return a.name==e}));c?h.splice(0,0,a):"number"==typeof e?h.splice(e+1,0,d):h.push(a)}})();CKEDITOR.UI_SEPARATOR="separator";CKEDITOR.config.toolbarLocation="top";"use strict";(function(){function a(a,c,d){c.type||(c.type="auto");if(d&&!1===a.fire("beforePaste",c)||!c.dataValue&&c.dataTransfer.isEmpty())return!1;c.dataValue||(c.dataValue="");if(CKEDITOR.env.gecko&&"drop"==c.method&&a.toolbox)a.once("afterPaste",function(){a.toolbox.focus()});
685
+ contentsHeight:d.$.offsetHeight,outerWidth:a.container.$.offsetWidth})},modes:{wysiwyg:1,source:1}});e.setKeystroke(CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),"toolbarCollapse");d.push('\x3ca title\x3d"'+(c?e.lang.toolbar.toolbarCollapse:e.lang.toolbar.toolbarExpand)+'" id\x3d"'+e.ui.spaceId("toolbar_collapser")+'" tabIndex\x3d"-1" class\x3d"cke_toolbox_collapser');c||d.push(" cke_toolbox_collapser_min");d.push('" onclick\x3d"CKEDITOR.tools.callFunction('+K+')"\x3e','\x3cspan class\x3d"cke_arrow"\x3e\x26#9650;\x3c/span\x3e',
686
+ "\x3c/a\x3e")}d.push("\x3c/span\x3e");f.data.html+=d.join("")}});e.on("destroy",function(){if(this.toolbox){var a,c=0,d,b,e;for(a=this.toolbox.toolbars;c<a.length;c++)for(b=a[c].items,d=0;d<b.length;d++)e=b[d],e.clickFn&&CKEDITOR.tools.removeFunction(e.clickFn),e.keyDownFn&&CKEDITOR.tools.removeFunction(e.keyDownFn)}});e.on("uiReady",function(){var a=e.ui.space("toolbox");a&&e.focusManager.add(a,1)});e.addCommand("toolbarFocus",f);e.setKeystroke(CKEDITOR.ALT+121,"toolbarFocus");e.ui.add("-",CKEDITOR.UI_SEPARATOR,
687
+ {});e.ui.addHandler(CKEDITOR.UI_SEPARATOR,{create:function(){return{render:function(a,c){c.push('\x3cspan class\x3d"cke_toolbar_separator" role\x3d"separator"\x3e\x3c/span\x3e');return{}}}}})}});CKEDITOR.ui.prototype.addToolbarGroup=function(a,f,k){var h=l(this.editor),c=0===f,d={name:a};if(k){if(k=CKEDITOR.tools.search(h,function(a){return a.name==k})){!k.groups&&(k.groups=[]);if(f&&(f=CKEDITOR.tools.indexOf(k.groups,f),0<=f)){k.groups.splice(f+1,0,a);return}c?k.groups.splice(0,0,a):k.groups.push(a);
688
+ return}f=null}f&&(f=CKEDITOR.tools.indexOf(h,function(a){return a.name==f}));c?h.splice(0,0,a):"number"==typeof f?h.splice(f+1,0,d):h.push(a)}})();CKEDITOR.UI_SEPARATOR="separator";CKEDITOR.config.toolbarLocation="top";"use strict";(function(){function a(a,c,d){c.type||(c.type="auto");if(d&&!1===a.fire("beforePaste",c)||!c.dataValue&&c.dataTransfer.isEmpty())return!1;c.dataValue||(c.dataValue="");if(CKEDITOR.env.gecko&&"drop"==c.method&&a.toolbox)a.once("afterPaste",function(){a.toolbox.focus()});
689
689
  return a.fire("paste",c)}function l(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())};a.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&&A||w(a)});"beforepaste"==C.mainPasteEvent&&(a.on("paste",function(a){G||
690
690
  (f(),a.data.preventDefault(),w(a),k("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(){!A&&g(b)});var e;a.attachListener(CKEDITOR.env.ie?a:b.document.getDocumentElement(),"mouseup",function(){e=setTimeout(v,0)});b.on("destroy",function(){clearTimeout(e)});a.on("keyup",v)}function d(a){return{type:a,canUndo:"cut"==a,startDisabled:!0,fakeKeystroke:"cut"==a?CKEDITOR.CTRL+88:CKEDITOR.CTRL+
691
691
  67,exec:function(){"cut"==this.type&&g();var a;var c=this.type;if(CKEDITOR.env.ie)a=k(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+86,exec:function(b,c){function d(c,h){h="undefined"!==typeof h?h:!0;c?(c.method="paste",c.dataTransfer||(c.dataTransfer=C.initPasteDataTransfer()),a(b,c,h)):f&&!b._.forcePasteDialog&&b.showNotification(g,"info",b.config.clipboard_notificationDuration);
@@ -701,22 +701,22 @@ b.getSelection(),c=c&&c.getRanges()[0];if((b.readOnly||c&&c.checkReadOnly())&&a
701
701
  copy:D("copy"),paste:D("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",function(){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,
702
702
  d,e,f,h){var k=b.lang.clipboard[d];b.addCommand(d,e);b.ui.addButton&&b.ui.addButton(c,{label:k,command:d,toolbar:"clipboard,"+f});b.addMenuItems&&b.addMenuItem(d,{label:k,command:d,group:"clipboard",order:h})}a("Cut","cut",d("cut"),10,1);a("Copy","copy",d("copy"),20,4);a("Paste","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();
703
703
  c({type:h,dataValue:a.data.dataValue,dataTransfer:a.data.dataTransfer,method:"paste"})}var f=!1,h="auto";c||(c=a,a=null);b.on("beforePaste",function(a){a.removeListener();f=!0;h=a.data.type},null,null,1E3);b.on("paste",d,null,null,0);!1===m()&&(b.removeListener("paste",d),b._.forcePasteDialog&&f&&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 g(a){if(CKEDITOR.env.webkit){if(!a.match(/^[^<]*$/g)&&
704
- !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";return"htmlifiedtext"}function e(a,c){function d(a){return CKEDITOR.tools.repeat("\x3c/p\x3e\x3cp\x3e",~~(a/2))+(1==a%2?"\x3cbr\x3e":"")}c=c.replace(/(?!\u3000)\s+/g," ").replace(/> +</g,"\x3e\x3c").replace(/<br ?\/>/gi,
704
+ !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";return"htmlifiedtext"}function f(a,c){function d(a){return CKEDITOR.tools.repeat("\x3c/p\x3e\x3cp\x3e",~~(a/2))+(1==a%2?"\x3cbr\x3e":"")}c=c.replace(/(?!\u3000)\s+/g," ").replace(/> +</g,"\x3e\x3c").replace(/<br ?\/>/gi,
705
705
  "\x3cbr\x3e");c=c.replace(/<\/?[A-Z]+>/g,function(a){return a.toLowerCase()});if(c.match(/^[^<]$/))return c;CKEDITOR.env.webkit&&-1<c.indexOf("\x3cdiv\x3e")&&(c=c.replace(/^(<div>(<br>|)<\/div>)(?!$|(<div>(<br>|)<\/div>))/g,"\x3cbr\x3e").replace(/^(<div>(<br>|)<\/div>){2}(?!$)/g,"\x3cdiv\x3e\x3c/div\x3e"),c.match(/<div>(<br>|)<\/div>/)&&(c="\x3cp\x3e"+c.replace(/(<div>(<br>|)<\/div>)+/g,function(a){return d(a.split("\x3c/div\x3e\x3cdiv\x3e").length+1)})+"\x3c/p\x3e"),c=c.replace(/<\/div><div>/g,"\x3cbr\x3e"),
706
- c=c.replace(/<\/?div>/g,""));CKEDITOR.env.gecko&&a.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(c=c.replace(/^<br><br>$/,"\x3cbr\x3e")),-1<c.indexOf("\x3cbr\x3e\x3cbr\x3e")&&(c="\x3cp\x3e"+c.replace(/(<br>){2,}/g,function(a){return d(a.length/4)})+"\x3c/p\x3e"));return k(a,c)}function f(a){function c(){var a={},b;for(b in CKEDITOR.dtd)"$"!=b.charAt(0)&&"div"!=b&&"span"!=b&&(a[b]=1);return a}var d={};return{get:function(e){return"plain-text"==e?d.plainText||(d.plainText=new CKEDITOR.filter(a,
706
+ c=c.replace(/<\/?div>/g,""));CKEDITOR.env.gecko&&a.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(c=c.replace(/^<br><br>$/,"\x3cbr\x3e")),-1<c.indexOf("\x3cbr\x3e\x3cbr\x3e")&&(c="\x3cp\x3e"+c.replace(/(<br>){2,}/g,function(a){return d(a.length/4)})+"\x3c/p\x3e"));return k(a,c)}function e(a){function c(){var a={},b;for(b in CKEDITOR.dtd)"$"!=b.charAt(0)&&"div"!=b&&"span"!=b&&(a[b]=1);return a}var d={};return{get:function(e){return"plain-text"==e?d.plainText||(d.plainText=new CKEDITOR.filter(a,
707
707
  "br")):"semantic-content"==e?((e=d.semanticContent)||(e=new CKEDITOR.filter(a,{}),e.allow({$1:{elements:c(),attributes:!0,styles:!1,classes:!1}}),e=d.semanticContent=e),e):e?new CKEDITOR.filter(a,e):null}}}function m(a,c,d){c=CKEDITOR.htmlParser.fragment.fromHtml(c);var e=new CKEDITOR.htmlParser.basicWriter;d.applyTo(c,!0,!1,a.activeEnterMode);c.writeHtml(e);return e.getHtml()}function k(a,c){a.enterMode==CKEDITOR.ENTER_BR?c=c.replace(/(<\/p><p>)+/g,function(a){return CKEDITOR.tools.repeat("\x3cbr\x3e",
708
708
  a.length/7*2)}).replace(/<\/?p>/g,""):a.enterMode==CKEDITOR.ENTER_DIV&&(c=c.replace(/<(\/)?p>/g,"\x3c$1div\x3e"));return c}function h(a){a.data.preventDefault();a.data.$.dataTransfer.dropEffect="none"}function c(b){var c=CKEDITOR.plugins.clipboard;b.on("contentDom",function(){function d(c,e,f){e.select();a(b,{dataTransfer:f,method:"drop"},1);f.sourceEditor.fire("saveSnapshot");f.sourceEditor.editable().extractHtmlFromRange(c);f.sourceEditor.getSelection().selectRanges([c]);f.sourceEditor.fire("saveSnapshot")}
709
709
  function e(d,f){d.select();a(b,{dataTransfer:f,method:"drop"},1);c.resetDragDataTransfer()}function f(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()}var k=b.editable(),g=CKEDITOR.plugins.clipboard.getDropTarget(b),l=b.ui.space("top"),m=b.ui.space("bottom");c.preventDefaultDropOnElement(l);c.preventDefaultDropOnElement(m);
710
710
  k.attachListener(g,"dragstart",f);k.attachListener(b,"dragstart",c.resetDragDataTransfer,c,null,1);k.attachListener(b,"dragstart",function(a){c.initDragDataTransfer(a,b)},null,null,2);k.attachListener(b,"dragstart",function(){var a=c.dragRange=b.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(c.dragStartContainerChildCount=a?h(a.startContainer):null,c.dragEndContainerChildCount=a?h(a.endContainer):null)},null,null,100);k.attachListener(g,"dragend",f);k.attachListener(b,"dragend",
711
711
  c.initDragDataTransfer,c,null,1);k.attachListener(b,"dragend",c.resetDragDataTransfer,c,null,100);k.attachListener(g,"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")&&a.data.preventDefault()}});k.attachListener(g,"drop",function(a){if(!a.data.$.defaultPrevented&&(a.data.preventDefault(),!b.readOnly)){var d=
712
712
  a.data.getTarget();if(!d.isReadOnly()||d.type==CKEDITOR.NODE_ELEMENT&&d.is("html")){var d=c.getRangeAtDropPosition(a,b),e=c.dragRange;d&&f(a,e,d)}}},null,null,9999);k.attachListener(b,"drop",c.initDragDataTransfer,c,null,1);k.attachListener(b,"drop",function(a){if(a=a.data){var f=a.dropRange,h=a.dragRange,k=a.dataTransfer;k.getTransferType(b)==CKEDITOR.DATA_TRANSFER_INTERNAL?setTimeout(function(){c.internalDrop(h,f,k,b)},0):k.getTransferType(b)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?d(h,f,k):e(f,k)}},
713
- null,null,9999)})}var d;CKEDITOR.plugins.add("clipboard",{requires:"dialog,notification,toolbar",init:function(a){function d(a){if(!a||r===a.id)return!1;var b=a.getTypes(),b=1===b.length&&"Files"===b[0];a=1===a.getFilesCount();return b&&a}var h,k=f(a);a.config.forcePasteAsPlainText?h="plain-text":a.config.pasteFilter?h=a.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in a.config||(h="semantic-content");a.pasteFilter=k.get(h);l(a);c(a);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js"));
713
+ null,null,9999)})}var d;CKEDITOR.plugins.add("clipboard",{requires:"dialog,notification,toolbar",init:function(a){function d(a){if(!a||r===a.id)return!1;var b=a.getTypes(),b=1===b.length&&"Files"===b[0];a=1===a.getFilesCount();return b&&a}var h,k=e(a);a.config.forcePasteAsPlainText?h="plain-text":a.config.pasteFilter?h=a.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in a.config||(h="semantic-content");a.pasteFilter=k.get(h);l(a);c(a);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js"));
714
714
  if(CKEDITOR.env.gecko){var t=["image/png","image/jpeg","image/gif"],r;a.on("paste",function(c){var e=c.data,f=e.dataTransfer;if(!e.dataValue&&"paste"==e.method&&d(f)&&(f=f.getFile(0),-1!=CKEDITOR.tools.indexOf(t,f.type))){var h=new FileReader;h.addEventListener("load",function(){c.data.dataValue='\x3cimg src\x3d"'+h.result+'" /\x3e';a.fire("paste",c.data)},!1);h.addEventListener("abort",function(){a.fire("paste",c.data)},!1);h.addEventListener("error",function(){a.fire("paste",c.data)},!1);h.readAsDataURL(f);
715
715
  r=e.dataTransfer.id;c.stop()}},null,null,1)}a.on("paste",function(c){c.data.dataTransfer||(c.data.dataTransfer=new CKEDITOR.plugins.clipboard.dataTransfer);if(!c.data.dataValue){var d=c.data.dataTransfer,e=d.getData("text/html");if(e)c.data.dataValue=e,c.data.type="html";else if(e=d.getData("text/plain"))c.data.dataValue=a.editable().transformPlainTextToHtml(e),c.data.type="text"}},null,null,1);a.on("paste",function(a){var b=a.data.dataValue,c=CKEDITOR.dtd.$block;-1<b.indexOf("Apple-")&&(b=b.replace(/<span class="Apple-converted-space">&nbsp;<\/span>/gi,
716
716
  " "),"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"));if(b.match(/^<[^<]+cke_(editable|contents)/i)){var d,e,f=new CKEDITOR.dom.element("div");for(f.setHtml(b);1==f.getChildCount()&&
717
717
  (d=f.getFirst())&&d.type==CKEDITOR.NODE_ELEMENT&&(d.hasClass("cke_editable")||d.hasClass("cke_contents"));)f=e=d;e&&(b=e.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 c?(a.data.endsWithEOL=1,"\x3c/"+d+"\x3e"):b}):CKEDITOR.env.gecko&&(b=b.replace(/(\s)<br>$/,"$1"));a.data.dataValue=b},null,
718
- null,3);a.on("paste",function(c){c=c.data;var d=a._.nextPasteType||c.type,f=c.dataValue,h,l=a.config.clipboard_defaultContentType||"html",n=c.dataTransfer.getTransferType(a)==CKEDITOR.DATA_TRANSFER_EXTERNAL,v=!0===a.config.forcePasteAsPlainText;h="html"==d||"html"==c.preSniffing?"html":g(f);delete a._.nextPasteType;"htmlifiedtext"==h&&(f=e(a.config,f));if("text"==d&&"html"==h)f=m(a,f,k.get("plain-text"));else if(n&&a.pasteFilter&&!c.dontFilter||v)f=m(a,f,a.pasteFilter);c.startsWithEOL&&(f='\x3cbr data-cke-eol\x3d"1"\x3e'+
719
- f);c.endsWithEOL&&(f+='\x3cbr data-cke-eol\x3d"1"\x3e');"auto"==d&&(d="html"==h||"html"==l?"html":"text");c.type=d;c.dataValue=f;delete c.preSniffing;delete c.startsWithEOL;delete c.endsWithEOL},null,null,6);a.on("paste",function(c){c=c.data;c.dataValue&&(a.insertHtml(c.dataValue,c.type,c.range),setTimeout(function(){a.fire("afterPaste")},0))},null,null,1E3);a.on("pasteDialog",function(c){setTimeout(function(){a.openDialog("paste",c.data)},0)})}});CKEDITOR.plugins.clipboard={isCustomCopyCutSupported:CKEDITOR.env.ie&&
718
+ null,3);a.on("paste",function(c){c=c.data;var d=a._.nextPasteType||c.type,e=c.dataValue,h,l=a.config.clipboard_defaultContentType||"html",n=c.dataTransfer.getTransferType(a)==CKEDITOR.DATA_TRANSFER_EXTERNAL,v=!0===a.config.forcePasteAsPlainText;h="html"==d||"html"==c.preSniffing?"html":g(e);delete a._.nextPasteType;"htmlifiedtext"==h&&(e=f(a.config,e));if("text"==d&&"html"==h)e=m(a,e,k.get("plain-text"));else if(n&&a.pasteFilter&&!c.dontFilter||v)e=m(a,e,a.pasteFilter);c.startsWithEOL&&(e='\x3cbr data-cke-eol\x3d"1"\x3e'+
719
+ e);c.endsWithEOL&&(e+='\x3cbr data-cke-eol\x3d"1"\x3e');"auto"==d&&(d="html"==h||"html"==l?"html":"text");c.type=d;c.dataValue=e;delete c.preSniffing;delete c.startsWithEOL;delete c.endsWithEOL},null,null,6);a.on("paste",function(c){c=c.data;c.dataValue&&(a.insertHtml(c.dataValue,c.type,c.range),setTimeout(function(){a.fire("afterPaste")},0))},null,null,1E3);a.on("pasteDialog",function(c){setTimeout(function(){a.openDialog("paste",c.data)},0)})}});CKEDITOR.plugins.clipboard={isCustomCopyCutSupported:CKEDITOR.env.ie&&
720
720
  16>CKEDITOR.env.version||CKEDITOR.env.iOS&&605>CKEDITOR.env.version?!1:!0,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,c,d){a.ui.addButton&&(a.ui.addButton(c,d),a._.pasteButtons||(a._.pasteButtons=[]),a._.pasteButtons.push(c))},canClipboardApiBeTrusted:function(a,c){return a.getTransferType(c)!=CKEDITOR.DATA_TRANSFER_EXTERNAL||
721
721
  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.iOS&&605<=CKEDITOR.env.version||CKEDITOR.env.edge&&16<=CKEDITOR.env.version?!0:!1},getDropTarget:function(a){var c=a.editable();return CKEDITOR.env.ie&&9>CKEDITOR.env.version||c.isInline()?c:a.document},fixSplitNodesAfterDrop:function(a,c,d,e){function f(a,b,d){var e=a;e.type==CKEDITOR.NODE_TEXT&&(e=a.getParent());if(e.equals(b)&&
722
722
  d!=b.getChildCount())return a=c.startContainer.getChild(c.startOffset-1),b=c.startContainer.getChild(c.startOffset),a&&a.type==CKEDITOR.NODE_TEXT&&b&&b.type==CKEDITOR.NODE_TEXT&&(d=a.getLength(),a.setText(a.getText()+b.getText()),b.remove(),c.setStart(a,d),c.collapse(!0)),!0}var h=c.startContainer;"number"==typeof e&&"number"==typeof d&&h.type==CKEDITOR.NODE_ELEMENT&&(f(a.startContainer,h,d)||f(a.endContainer,h,e))},isDropRangeAffectedByDragRange:function(a,c){var d=c.startContainer,e=c.endOffset;
@@ -740,23 +740,23 @@ CKEDITOR.plugins.clipboard.fallbackDataTransfer;-1===CKEDITOR.tools.indexOf(d._c
740
740
  this._dataTransfer._.data[this._customDataFallbackType];a||(a=this._extractDataComment(this._getData(this._customDataFallbackType,!0)).content);return a},_getFallbackTypeData:function(){var a=CKEDITOR.plugins.clipboard.fallbackDataTransfer._customTypes,c=this._extractDataComment(this._getData(this._customDataFallbackType,!0)).data||{},d=this._dataTransfer._.data;CKEDITOR.tools.array.forEach(a,function(a){void 0!==d[a]?c[a]=d[a]:void 0!==c[a]&&(c[a]=c[a])},this);return c},_isUnsupportedMimeTypeError:function(a){return a.message&&
741
741
  -1!==a.message.search(/element not found/gi)},_extractDataComment:function(a){var c={data:null,content:a||""};if(a&&16<a.length){var d;(d=/\x3c!--cke-data:(.*?)--\x3e/g.exec(a))&&d[1]&&(c.data=JSON.parse(decodeURIComponent(d[1])),c.content=a.replace(d[0],""))}return c},_applyDataComment:function(a,c){var d="";c&&CKEDITOR.tools.object.keys(c).length&&(d="\x3c!--cke-data:"+encodeURIComponent(JSON.stringify(c))+"--\x3e");return d+(a&&a.length?a:"")}}})();CKEDITOR.config.clipboard_notificationDuration=
742
742
  1E4;CKEDITOR.plugins.add("panelbutton",{requires:"button",onLoad:function(){function a(a){var g=this._;g.state!=CKEDITOR.TRISTATE_DISABLED&&(this.createPanel(a),g.on?g.panel.hide():g.panel.showBlock(this._.id,this.document.getById(this._.id),4))}CKEDITOR.ui.panelButton=CKEDITOR.tools.createClass({base:CKEDITOR.ui.button,$:function(l){var g=l.panel||{};delete l.panel;this.base(l);this.document=g.parent&&g.parent.getDocument()||CKEDITOR.document;g.block={attributes:g.attributes};g.toolbarRelated=!0;
743
- this.hasArrow="listbox";this.click=a;this._={panelDefinition:g}},statics:{handler:{create:function(a){return new CKEDITOR.ui.panelButton(a)}}},proto:{createPanel:function(a){var g=this._;if(!g.panel){var e=this._.panelDefinition,f=this._.panelDefinition.block,m=e.parent||CKEDITOR.document.getBody(),k=this._.panel=new CKEDITOR.ui.floatPanel(a,m,e),e=k.addBlock(g.id,f),h=this,c=a.getCommand(this.command);k.onShow=function(){h.className&&this.element.addClass(h.className+"_panel");h.setState(CKEDITOR.TRISTATE_ON);
744
- g.on=1;h.editorFocus&&a.focus();if(h.onOpen)h.onOpen()};k.onHide=function(d){h.className&&this.element.getFirst().removeClass(h.className+"_panel");!h.modes&&c?h.setStateFromCommand(c):h.setState(h.modes&&h.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);g.on=0;if(!d&&h.onClose)h.onClose()};k.onEscape=function(){k.hide(1);h.document.getById(g.id).focus()};if(this.onBlock)this.onBlock(k,e);e.onHide=function(){g.on=0;!h.modes&&h.command?h.setStateFromCommand(c):h.setState(CKEDITOR.TRISTATE_OFF)}}},
745
- setStateFromCommand:function(a){this.setState(a.state)}}})},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,CKEDITOR.ui.panel.handler)}});CKEDITOR.UI_PANEL="panel";CKEDITOR.ui.panel=function(a,f){f&&CKEDITOR.tools.extend(this,f);CKEDITOR.tools.extend(this,{className:"",css:[]});this.id=CKEDITOR.tools.getNextId();
743
+ this.hasArrow="listbox";this.click=a;this._={panelDefinition:g}},statics:{handler:{create:function(a){return new CKEDITOR.ui.panelButton(a)}}},proto:{createPanel:function(a){var g=this._;if(!g.panel){var f=this._.panelDefinition,e=this._.panelDefinition.block,m=f.parent||CKEDITOR.document.getBody(),k=this._.panel=new CKEDITOR.ui.floatPanel(a,m,f),f=k.addBlock(g.id,e),h=this,c=a.getCommand(this.command);k.onShow=function(){h.className&&this.element.addClass(h.className+"_panel");h.setState(CKEDITOR.TRISTATE_ON);
744
+ g.on=1;h.editorFocus&&a.focus();if(h.onOpen)h.onOpen()};k.onHide=function(d){h.className&&this.element.getFirst().removeClass(h.className+"_panel");!h.modes&&c?h.setStateFromCommand(c):h.setState(h.modes&&h.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);g.on=0;if(!d&&h.onClose)h.onClose()};k.onEscape=function(){k.hide(1);h.document.getById(g.id).focus()};if(this.onBlock)this.onBlock(k,f);f.onHide=function(){g.on=0;!h.modes&&h.command?h.setStateFromCommand(c):h.setState(CKEDITOR.TRISTATE_OFF)}}},
745
+ setStateFromCommand:function(a){this.setState(a.state)}}})},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,CKEDITOR.ui.panel.handler)}});CKEDITOR.UI_PANEL="panel";CKEDITOR.ui.panel=function(a,e){e&&CKEDITOR.tools.extend(this,e);CKEDITOR.tools.extend(this,{className:"",css:[]});this.id=CKEDITOR.tools.getNextId();
746
746
  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'),l=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'),
747
- g=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,f){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};
747
+ g=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(f,e){var m={editorId:f.id,id:this.id,langCode:f.langCode,dir:f.lang.dir,cls:this.className,frame:"",env:CKEDITOR.env.cssClass,"z-index":f.config.baseFloatZIndex+1};
748
748
  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()},this));a.write(g.output(CKEDITOR.tools.extend({css:CKEDITOR.tools.buildStyleHtml(this.css),onload:"window.parent.CKEDITOR.tools.callFunction("+
749
749
  c+");"},m)));a.getWindow().$.CKEDITOR=CKEDITOR;a.on("keydown",function(a){var b=a.data.getKeystroke(),c=this.document.getById(this.id).getAttribute("dir");if("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))&&this.onEscape&&!1===this.onEscape(b)&&a.data.preventDefault()},this);a=a.getBody();a.unselectable();CKEDITOR.env.air&&CKEDITOR.tools.callFunction(c)}else a=
750
- this.document.getById(this.id);this._.holder=a}return a};if(this.isFramed){var k=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=l.output({id:this.id+"_frame",src:k})}k=a.output(m);f&&f.push(k);return k},addBlock:function(a,f){f=this._.blocks[a]=f instanceof CKEDITOR.ui.panel.block?f:new CKEDITOR.ui.panel.block(this.getHolderElement(),f);
751
- this._.currentBlock||this.showBlock(a);return f},getBlock:function(a){return this._.blocks[a]},showBlock:function(a){a=this._.blocks[a];var f=this._.currentBlock,g=!this.forceIFrame||CKEDITOR.env.ie?this._.holder:this.document.getById(this.id+"_frame");f&&f.hide();this._.currentBlock=a;CKEDITOR.fire("ariaWidget",g);a._.focusIndex=-1;this._.onKeyDown=a.onKeyDown&&CKEDITOR.tools.bind(a.onKeyDown,a);a.show();return a},destroy:function(){this.element&&this.element.remove()}};CKEDITOR.ui.panel.block=CKEDITOR.tools.createClass({$:function(a,
752
- f){this.element=a.append(a.getDocument().createElement("div",{attributes:{tabindex:-1,"class":"cke_panel_block"},styles:{display:"none"}}));f&&CKEDITOR.tools.extend(this,f);this.element.setAttributes({role:this.attributes.role||"presentation","aria-label":this.attributes["aria-label"],title:this.attributes.title||this.attributes["aria-label"]});this.keys={};this._.focusIndex=-1;this.element.disableContextMenu()},_:{markItem:function(a){-1!=a&&(a=this._.getItems().getItem(this._.focusIndex=a),CKEDITOR.env.webkit&&
753
- a.getDocument().getWindow().focus(),a.focus(),this.onMark&&this.onMark(a))},markFirstDisplayed:function(a){for(var f=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&"none"==a.getStyle("display")},g=this._.getItems(),k,h,c=g.count()-1;0<=c;c--)if(k=g.getItem(c),k.getAscendant(f)||(h=k,this._.focusIndex=c),"true"==k.getAttribute("aria-selected")){h=k;this._.focusIndex=c;break}h&&(a&&a(),CKEDITOR.env.webkit&&h.getDocument().getWindow().focus(),h.focus(),this.onMark&&this.onMark(h))},getItems:function(){return this.element.find("a,input")}},
754
- proto:{show:function(){this.element.setStyle("display","")},hide:function(){this.onHide&&!0===this.onHide.call(this)||this.element.setStyle("display","none")},onKeyDown:function(a,f){var g=this.keys[a];switch(g){case "next":for(var k=this._.focusIndex,g=this._.getItems(),h;h=g.getItem(++k);)if(h.getAttribute("_cke_focus")&&h.$.offsetWidth){this._.focusIndex=k;h.focus(!0);break}return h||f?!1:(this._.focusIndex=-1,this.onKeyDown(a,1));case "prev":k=this._.focusIndex;for(g=this._.getItems();0<k&&(h=
755
- g.getItem(--k));){if(h.getAttribute("_cke_focus")&&h.$.offsetWidth){this._.focusIndex=k;h.focus(!0);break}h=null}return h||f?!1:(this._.focusIndex=g.count(),this.onKeyDown(a,1));case "click":case "mouseup":return k=this._.focusIndex,(h=0<=k&&this._.getItems().getItem(k))&&h.fireEventHandler(g,{button:CKEDITOR.tools.normalizeMouseButton(CKEDITOR.MOUSE_BUTTON_LEFT,!0)}),!1}return!0}}})})();CKEDITOR.plugins.add("floatpanel",{requires:"panel"});(function(){function a(a,e,f,m,k){k=CKEDITOR.tools.genKey(e.getUniqueId(),
756
- f.getUniqueId(),a.lang.dir,a.uiColor||"",m.css||"",k||"");var h=l[k];h||(h=l[k]=new CKEDITOR.ui.panel(e,m),h.element=f.append(CKEDITOR.dom.element.createFromHtml(h.render(a),e)),h.element.setStyles({display:"none",position:"absolute"}));return h}var l={};CKEDITOR.ui.floatPanel=CKEDITOR.tools.createClass({$:function(g,e,f,l){function k(){b.hide()}f.forceIFrame=1;f.toolbarRelated&&g.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(e=CKEDITOR.document.getById("cke_"+g.name));var h=e.getDocument();l=a(g,h,
757
- e,f,l||0);var c=l.element,d=c.getFirst(),b=this;c.disableContextMenu();this.element=c;this._={editor:g,panel:l,parentElement:e,definition:f,document:h,iframe:d,children:[],dir:g.lang.dir,showBlockParams:null,markFirst:void 0!==f.markFirst?f.markFirst:!0};g.on("mode",k);g.on("resize",k);h.getWindow().on("resize",function(){this.reposition()},this)},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)},
758
- showBlock:function(a,e,f,l,k,h){var c=this._.panel,d=c.showBlock(a);this._.showBlockParams=[].slice.call(arguments);this.allowBlur(!1);var b=this._.editor.editable();this._.returnFocus=b.hasFocus?b:new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement);this._.hideTimeout=0;var n=this.element,b=this._.iframe,b=CKEDITOR.env.ie&&!CKEDITOR.env.edge?b:new CKEDITOR.dom.window(b.$.contentWindow),q=n.getDocument(),u=this._.parentElement.getPositionedAncestor(),t=e.getDocumentPosition(q),q=u?u.getDocumentPosition(q):
759
- {x:0,y:0},r="rtl"==this._.dir,p=t.x+(l||0)-q.x,y=t.y+(k||0)-q.y;!r||1!=f&&4!=f?r||2!=f&&3!=f||(p+=e.$.offsetWidth-1):p+=e.$.offsetWidth;if(3==f||4==f)y+=e.$.offsetHeight-1;this._.panel._.offsetParentId=e.getId();n.setStyles({top:y+"px",left:0,display:""});n.setOpacity(0);n.getFirst().removeStyle("width");this._.editor.focusManager.add(b);this._.blurSet||(CKEDITOR.event.useCapture=!0,b.on("blur",function(a){function b(){delete this._.returnFocus;this.hide()}this.allowBlur()&&a.data.getPhase()==CKEDITOR.EVENT_PHASE_AT_TARGET&&
750
+ this.document.getById(this.id);this._.holder=a}return a};if(this.isFramed){var k=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=l.output({id:this.id+"_frame",src:k})}k=a.output(m);e&&e.push(k);return k},addBlock:function(a,e){e=this._.blocks[a]=e instanceof CKEDITOR.ui.panel.block?e:new CKEDITOR.ui.panel.block(this.getHolderElement(),e);
751
+ this._.currentBlock||this.showBlock(a);return e},getBlock:function(a){return this._.blocks[a]},showBlock:function(a){a=this._.blocks[a];var e=this._.currentBlock,g=!this.forceIFrame||CKEDITOR.env.ie?this._.holder:this.document.getById(this.id+"_frame");e&&e.hide();this._.currentBlock=a;CKEDITOR.fire("ariaWidget",g);a._.focusIndex=-1;this._.onKeyDown=a.onKeyDown&&CKEDITOR.tools.bind(a.onKeyDown,a);a.show();return a},destroy:function(){this.element&&this.element.remove()}};CKEDITOR.ui.panel.block=CKEDITOR.tools.createClass({$:function(a,
752
+ e){this.element=a.append(a.getDocument().createElement("div",{attributes:{tabindex:-1,"class":"cke_panel_block"},styles:{display:"none"}}));e&&CKEDITOR.tools.extend(this,e);this.element.setAttributes({role:this.attributes.role||"presentation","aria-label":this.attributes["aria-label"],title:this.attributes.title||this.attributes["aria-label"]});this.keys={};this._.focusIndex=-1;this.element.disableContextMenu()},_:{markItem:function(a){-1!=a&&(a=this._.getItems().getItem(this._.focusIndex=a),CKEDITOR.env.webkit&&
753
+ a.getDocument().getWindow().focus(),a.focus(),this.onMark&&this.onMark(a))},markFirstDisplayed:function(a){for(var e=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&"none"==a.getStyle("display")},g=this._.getItems(),k,h,c=g.count()-1;0<=c;c--)if(k=g.getItem(c),k.getAscendant(e)||(h=k,this._.focusIndex=c),"true"==k.getAttribute("aria-selected")){h=k;this._.focusIndex=c;break}h&&(a&&a(),CKEDITOR.env.webkit&&h.getDocument().getWindow().focus(),h.focus(),this.onMark&&this.onMark(h))},getItems:function(){return this.element.find("a,input")}},
754
+ proto:{show:function(){this.element.setStyle("display","")},hide:function(){this.onHide&&!0===this.onHide.call(this)||this.element.setStyle("display","none")},onKeyDown:function(a,e){var g=this.keys[a];switch(g){case "next":for(var k=this._.focusIndex,g=this._.getItems(),h;h=g.getItem(++k);)if(h.getAttribute("_cke_focus")&&h.$.offsetWidth){this._.focusIndex=k;h.focus(!0);break}return h||e?!1:(this._.focusIndex=-1,this.onKeyDown(a,1));case "prev":k=this._.focusIndex;for(g=this._.getItems();0<k&&(h=
755
+ g.getItem(--k));){if(h.getAttribute("_cke_focus")&&h.$.offsetWidth){this._.focusIndex=k;h.focus(!0);break}h=null}return h||e?!1:(this._.focusIndex=g.count(),this.onKeyDown(a,1));case "click":case "mouseup":return k=this._.focusIndex,(h=0<=k&&this._.getItems().getItem(k))&&h.fireEventHandler(g,{button:CKEDITOR.tools.normalizeMouseButton(CKEDITOR.MOUSE_BUTTON_LEFT,!0)}),!1}return!0}}})})();CKEDITOR.plugins.add("floatpanel",{requires:"panel"});(function(){function a(a,f,e,m,k){k=CKEDITOR.tools.genKey(f.getUniqueId(),
756
+ e.getUniqueId(),a.lang.dir,a.uiColor||"",m.css||"",k||"");var h=l[k];h||(h=l[k]=new CKEDITOR.ui.panel(f,m),h.element=e.append(CKEDITOR.dom.element.createFromHtml(h.render(a),f)),h.element.setStyles({display:"none",position:"absolute"}));return h}var l={};CKEDITOR.ui.floatPanel=CKEDITOR.tools.createClass({$:function(g,f,e,l){function k(){b.hide()}e.forceIFrame=1;e.toolbarRelated&&g.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(f=CKEDITOR.document.getById("cke_"+g.name));var h=f.getDocument();l=a(g,h,
757
+ f,e,l||0);var c=l.element,d=c.getFirst(),b=this;c.disableContextMenu();this.element=c;this._={editor:g,panel:l,parentElement:f,definition:e,document:h,iframe:d,children:[],dir:g.lang.dir,showBlockParams:null,markFirst:void 0!==e.markFirst?e.markFirst:!0};g.on("mode",k);g.on("resize",k);h.getWindow().on("resize",function(){this.reposition()},this)},proto:{addBlock:function(a,f){return this._.panel.addBlock(a,f)},addListBlock:function(a,f){return this._.panel.addListBlock(a,f)},getBlock:function(a){return this._.panel.getBlock(a)},
758
+ showBlock:function(a,f,e,l,k,h){var c=this._.panel,d=c.showBlock(a);this._.showBlockParams=[].slice.call(arguments);this.allowBlur(!1);var b=this._.editor.editable();this._.returnFocus=b.hasFocus?b:new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement);this._.hideTimeout=0;var n=this.element,b=this._.iframe,b=CKEDITOR.env.ie&&!CKEDITOR.env.edge?b:new CKEDITOR.dom.window(b.$.contentWindow),q=n.getDocument(),u=this._.parentElement.getPositionedAncestor(),t=f.getDocumentPosition(q),q=u?u.getDocumentPosition(q):
759
+ {x:0,y:0},r="rtl"==this._.dir,p=t.x+(l||0)-q.x,y=t.y+(k||0)-q.y;!r||1!=e&&4!=e?r||2!=e&&3!=e||(p+=f.$.offsetWidth-1):p+=f.$.offsetWidth;if(3==e||4==e)y+=f.$.offsetHeight-1;this._.panel._.offsetParentId=f.getId();n.setStyles({top:y+"px",left:0,display:""});n.setOpacity(0);n.getFirst().removeStyle("width");this._.editor.focusManager.add(b);this._.blurSet||(CKEDITOR.event.useCapture=!0,b.on("blur",function(a){function b(){delete this._.returnFocus;this.hide()}this.allowBlur()&&a.data.getPhase()==CKEDITOR.EVENT_PHASE_AT_TARGET&&
760
760
  this.visible&&!this._.activeChild&&(CKEDITOR.env.iOS?this._.hideTimeout||(this._.hideTimeout=CKEDITOR.tools.setTimeout(b,0,this)):b.call(this))},this),b.on("focus",function(){this._.focused=!0;this.hideChild();this.allowBlur(!0)},this),CKEDITOR.env.iOS&&(b.on("touchstart",function(){clearTimeout(this._.hideTimeout)},this),b.on("touchend",function(){this._.hideTimeout=0;this.focus()},this)),CKEDITOR.event.useCapture=!1,this._.blurSet=1);c.onEscape=CKEDITOR.tools.bind(function(a){if(this.onEscape&&
761
761
  !1===this.onEscape(a))return!1},this);CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.tools.bind(function(){var a=n;a.removeStyle("width");if(d.autoSize){var b=d.element.getDocument(),b=(CKEDITOR.env.webkit||CKEDITOR.env.edge?d.element:b.getBody()).$.scrollWidth;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<b&&(b+=(a.$.offsetWidth||0)-(a.$.clientWidth||0)+3);a.setStyle("width",b+10+"px");b=d.element.$.scrollHeight;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<b&&(b+=(a.$.offsetHeight||0)-(a.$.clientHeight||
762
762
  0)+3);a.setStyle("height",b+"px");c._.currentBlock.element.setStyle("display","none").removeStyle("display")}else a.removeStyle("height");r&&(p-=n.$.offsetWidth);n.setStyle("left",p+"px");var b=c.element.getWindow(),a=n.$.getBoundingClientRect(),b=b.getViewPaneSize(),e=a.width||a.right-a.left,f=a.height||a.bottom-a.top,k=r?a.right:b.width-a.left,g=r?b.width-a.right:a.left;r?k<e&&(p=g>e?p+e:b.width>e?p-a.left:p-a.right+b.width):k<e&&(p=g>e?p-e:b.width>e?p-a.right+b.width:p-a.left);e=a.top;b.height-
@@ -764,50 +764,50 @@ a.top<f&&(y=e>f?y-f:b.height>f?y-a.bottom+b.height:y-a.top);CKEDITOR.env.ie&&!CK
764
764
  n.setStyles({top:y+"px",left:p+"px"});n.setOpacity(1);h&&h()},this);c.isLoaded?a():c.onLoad=a;CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus();d.element.focus();CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=a);this.allowBlur(!0);this._.markFirst&&(CKEDITOR.env.ie?CKEDITOR.tools.setTimeout(function(){d.markFirstDisplayed?d.markFirstDisplayed():d._.markFirstDisplayed()},0):d.markFirstDisplayed?d.markFirstDisplayed():
765
765
  d._.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();a&&!a.equals(this._.iframe)&&a.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var a=
766
766
  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");if(a=a&&this._.returnFocus)CKEDITOR.env.webkit&&a.type&&a.getWindow().$.focus(),a.focus();delete this._.lastFocused;this._.showBlockParams=
767
- 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,f,l,k,h){if(this._.activeChild!=a||a._.panel._.offsetParentId!=f.getId())this.hideChild(),a.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=a,this._.focused=!1,a.showBlock(e,f,l,k,h),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){a.element.getChild(0).$.style.cssText+=
768
- ""},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;for(e in l){var f=l[e];a?f.destroy():f.element.hide()}a&&(l={})})})();CKEDITOR.plugins.add("colorbutton",{requires:"panelbutton,floatpanel",init:function(a){function l(b){var c=b.name,d=b.type,e=b.title,l=b.order,r=b.commandName;b=b.contentTransformations||{};var p=new CKEDITOR.style(k["colorButton_"+
767
+ null;this._.editor.fire("panelHide",this)}},allowBlur:function(a){var f=this._.panel;void 0!==a&&(f.allowBlur=a);return f.allowBlur},showAsChild:function(a,f,e,l,k,h){if(this._.activeChild!=a||a._.panel._.offsetParentId!=e.getId())this.hideChild(),a.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=a,this._.focused=!1,a.showBlock(f,e,l,k,h),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){a.element.getChild(0).$.style.cssText+=
768
+ ""},100)},hideChild:function(a){var f=this._.activeChild;f&&(delete f.onHide,delete this._.activeChild,f.hide(),a&&this.focus())}}});CKEDITOR.on("instanceDestroyed",function(){var a=CKEDITOR.tools.isEmpty(CKEDITOR.instances),f;for(f in l){var e=l[f];a?e.destroy():e.element.hide()}a&&(l={})})})();CKEDITOR.plugins.add("colorbutton",{requires:"panelbutton,floatpanel",init:function(a){function l(b){var c=b.name,d=b.type,f=b.title,l=b.order,r=b.commandName;b=b.contentTransformations||{};var p=new CKEDITOR.style(k["colorButton_"+
769
769
  d+"Style"]),y=CKEDITOR.tools.getNextId()+"_colorBox",x={type:d},z=new CKEDITOR.style(k["colorButton_"+d+"Style"],{color:"inherit"}),B;a.addCommand(r,{contextSensitive:!0,exec:function(a,b){if(!a.readOnly){var c=b.newStyle;a.removeStyle(z);a.focus();c&&a.applyStyle(c);a.fire("saveSnapshot")}},refresh:function(a,b){z.checkApplicable(b,a,a.activeFilter)?z.checkActive(b,a)?this.setState(CKEDITOR.TRISTATE_ON):this.setState(CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)}});a.ui.add(c,
770
- CKEDITOR.UI_PANELBUTTON,{label:e,title:e,command:r,editorFocus:0,toolbar:"colors,"+l,allowedContent:p,requiredContent:p,contentTransformations:b,panel:{css:CKEDITOR.skin.getPath("editor"),attributes:{role:"listbox","aria-label":h.panelTitle}},select:function(a){var b=k.colorButton_colors.split(",");a=CKEDITOR.tools.array.find(b,a);a=m(a);f(B,a);B._.markFirstDisplayed()},onBlock:function(b,c){B=c;c.autoSize=!0;c.element.addClass("cke_colorblock");c.element.setHtml(g({type:d,colorBoxId:y,colorData:x,
771
- commandName:r}));c.element.getDocument().getBody().setStyle("overflow","hidden");CKEDITOR.ui.fire("ready",this);var e=c.keys,f="rtl"==a.lang.dir;e[f?37:39]="next";e[40]="next";e[9]="next";e[f?39:37]="prev";e[38]="prev";e[CKEDITOR.SHIFT+9]="prev";e[32]="click"},onOpen:function(){var b=a.getSelection(),c=b&&b.getStartElement(),e=a.elementPath(c);if(!e)return null;c=e.block||e.blockLimit||a.document.getBody();do e=c&&c.getComputedStyle("back"==d?"background-color":"color")||"transparent";while("back"==
772
- d&&"transparent"==e&&c&&(c=c.getParent()));e&&"transparent"!=e||(e="#ffffff");!1!==k.colorButton_enableAutomatic&&this._.panel._.iframe.getFrameDocument().getById(y).setStyle("background-color",e);if(c=b&&b.getRanges()[0]){for(var b=new CKEDITOR.dom.walker(c),h=c.collapsed?c.startContainer:b.next(),c="";h;){h.type!==CKEDITOR.NODE_ELEMENT&&(h=h.getParent());h=m(h.getComputedStyle("back"==d?"background-color":"color"));c=c||h;if(c!==h){c="";break}h=b.next()}"transparent"==c&&(c="");"fore"==d&&(x.automaticTextColor=
773
- "#"+m(e));x.selectionColor=c?"#"+c:"";f(B,c)}return e}})}function g(b){function c(b){b=b&&new CKEDITOR.style(B,{color:b});a.execCommand(l,{newStyle:b})}var d=b.type,f=b.colorBoxId,g=b.colorData,l=b.commandName;b=[];var m=k.colorButton_colors.split(","),y=k.colorButton_colorsPerRow||6,x=a.plugins.colordialog&&!1!==k.colorButton_enableMore,z=m.length+(x?2:1),B=a.config["colorButton_"+d+"Style"];B.childRule="back"==d?function(a){return e(a)}:function(a){return!(a.is("a")||a.getElementsByTag("a").count())||
774
- e(a)};var w=CKEDITOR.tools.addFunction(function(b){a.focus();a.fire("saveSnapshot");"?"==b?a.getColorFromDialog(function(a){a&&c(a)},null,g):c(b&&"#"+b)});!1!==k.colorButton_enableAutomatic&&b.push('\x3ca class\x3d"cke_colorauto" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"',h.auto,'" draggable\x3d"false" ondragstart\x3d"return false;" onclick\x3d"CKEDITOR.tools.callFunction(',w,",null,'",d,"');return false;\" href\x3d\"javascript:void('",h.auto,'\')" role\x3d"option" aria-posinset\x3d"1" aria-setsize\x3d"',
775
- z,'"\x3e\x3ctable role\x3d"presentation" cellspacing\x3d0 cellpadding\x3d0 width\x3d"100%"\x3e\x3ctr\x3e\x3ctd colspan\x3d"'+y+'" align\x3d"center"\x3e\x3cspan class\x3d"cke_colorbox" id\x3d"',f,'"\x3e\x3c/span\x3e',h.auto,"\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/a\x3e");b.push('\x3ctable role\x3d"presentation" cellspacing\x3d0 cellpadding\x3d0 width\x3d"100%"\x3e');for(f=0;f<m.length;f++){0===f%y&&b.push("\x3c/tr\x3e\x3ctr\x3e");var v=m[f].split("/"),D=v[0],C=v[1]||D;b.push('\x3ctd\x3e\x3ca class\x3d"cke_colorbox" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"',
776
- v[1]?D:a.lang.colorbutton.colors[C]||C,'" draggable\x3d"false" ondragstart\x3d"return false;" onclick\x3d"CKEDITOR.tools.callFunction(',w,",'",C,"','",d,"'); return false;\" href\x3d\"javascript:void('",C,'\')" data-value\x3d"'+C+'" role\x3d"option" aria-posinset\x3d"',f+2,'" aria-setsize\x3d"',z,'"\x3e\x3cspan class\x3d"cke_colorbox" style\x3d"background-color:#',C,'"\x3e\x3c/span\x3e\x3c/a\x3e\x3c/td\x3e')}x&&b.push('\x3c/tr\x3e\x3ctr\x3e\x3ctd colspan\x3d"'+y+'" align\x3d"center"\x3e\x3ca class\x3d"cke_colormore" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"',
777
- h.more,'" draggable\x3d"false" ondragstart\x3d"return false;" onclick\x3d"CKEDITOR.tools.callFunction(',w,",'?','",d,"');return false;\" href\x3d\"javascript:void('",h.more,"')\"",' role\x3d"option" aria-posinset\x3d"',z,'" aria-setsize\x3d"',z,'"\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 f(a,c){for(var d=a._.getItems(),e=0;e<d.count();e++){var f=
770
+ CKEDITOR.UI_PANELBUTTON,{label:f,title:f,command:r,editorFocus:0,toolbar:"colors,"+l,allowedContent:p,requiredContent:p,contentTransformations:b,panel:{css:CKEDITOR.skin.getPath("editor"),attributes:{role:"listbox","aria-label":h.panelTitle}},select:function(a){var b=k.colorButton_colors.split(",");a=CKEDITOR.tools.array.find(b,a);a=m(a);e(B,a);B._.markFirstDisplayed()},onBlock:function(b,c){B=c;c.autoSize=!0;c.element.addClass("cke_colorblock");c.element.setHtml(g({type:d,colorBoxId:y,colorData:x,
771
+ commandName:r}));c.element.getDocument().getBody().setStyle("overflow","hidden");CKEDITOR.ui.fire("ready",this);var e=c.keys,f="rtl"==a.lang.dir;e[f?37:39]="next";e[40]="next";e[9]="next";e[f?39:37]="prev";e[38]="prev";e[CKEDITOR.SHIFT+9]="prev";e[32]="click"},onOpen:function(){var b=a.getSelection(),c=b&&b.getStartElement(),f=a.elementPath(c);if(!f)return null;c=f.block||f.blockLimit||a.document.getBody();do f=c&&c.getComputedStyle("back"==d?"background-color":"color")||"transparent";while("back"==
772
+ d&&"transparent"==f&&c&&(c=c.getParent()));f&&"transparent"!=f||(f="#ffffff");!1!==k.colorButton_enableAutomatic&&this._.panel._.iframe.getFrameDocument().getById(y).setStyle("background-color",f);if(c=b&&b.getRanges()[0]){for(var b=new CKEDITOR.dom.walker(c),h=c.collapsed?c.startContainer:b.next(),c="";h;){h.type!==CKEDITOR.NODE_ELEMENT&&(h=h.getParent());h=m(h.getComputedStyle("back"==d?"background-color":"color"));c=c||h;if(c!==h){c="";break}h=b.next()}"transparent"==c&&(c="");"fore"==d&&(x.automaticTextColor=
773
+ "#"+m(f));x.selectionColor=c?"#"+c:"";e(B,c)}return f}})}function g(b){function c(b){b=b&&new CKEDITOR.style(B,{color:b});a.execCommand(l,{newStyle:b})}var d=b.type,e=b.colorBoxId,g=b.colorData,l=b.commandName;b=[];var m=k.colorButton_colors.split(","),y=k.colorButton_colorsPerRow||6,x=a.plugins.colordialog&&!1!==k.colorButton_enableMore,z=m.length+(x?2:1),B=a.config["colorButton_"+d+"Style"];B.childRule="back"==d?function(a){return f(a)}:function(a){return!(a.is("a")||a.getElementsByTag("a").count())||
774
+ f(a)};var w=CKEDITOR.tools.addFunction(function(b){a.focus();a.fire("saveSnapshot");"?"==b?a.getColorFromDialog(function(a){a&&c(a)},null,g):c(b&&"#"+b)});!1!==k.colorButton_enableAutomatic&&b.push('\x3ca class\x3d"cke_colorauto" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"',h.auto,'" draggable\x3d"false" ondragstart\x3d"return false;" onclick\x3d"CKEDITOR.tools.callFunction(',w,",null,'",d,"');return false;\" href\x3d\"javascript:void('",h.auto,'\')" role\x3d"option" aria-posinset\x3d"1" aria-setsize\x3d"',
775
+ z,'"\x3e\x3ctable role\x3d"presentation" cellspacing\x3d0 cellpadding\x3d0 width\x3d"100%"\x3e\x3ctr\x3e\x3ctd colspan\x3d"'+y+'" align\x3d"center"\x3e\x3cspan class\x3d"cke_colorbox" id\x3d"',e,'"\x3e\x3c/span\x3e',h.auto,"\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/a\x3e");b.push('\x3ctable role\x3d"presentation" cellspacing\x3d0 cellpadding\x3d0 width\x3d"100%"\x3e');for(e=0;e<m.length;e++){0===e%y&&b.push("\x3c/tr\x3e\x3ctr\x3e");var v=m[e].split("/"),D=v[0],C=v[1]||D;b.push('\x3ctd\x3e\x3ca class\x3d"cke_colorbox" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"',
776
+ v[1]?D:a.lang.colorbutton.colors[C]||C,'" draggable\x3d"false" ondragstart\x3d"return false;" onclick\x3d"CKEDITOR.tools.callFunction(',w,",'",C,"','",d,"'); return false;\" href\x3d\"javascript:void('",C,'\')" data-value\x3d"'+C+'" role\x3d"option" aria-posinset\x3d"',e+2,'" aria-setsize\x3d"',z,'"\x3e\x3cspan class\x3d"cke_colorbox" style\x3d"background-color:#',C,'"\x3e\x3c/span\x3e\x3c/a\x3e\x3c/td\x3e')}x&&b.push('\x3c/tr\x3e\x3ctr\x3e\x3ctd colspan\x3d"'+y+'" align\x3d"center"\x3e\x3ca class\x3d"cke_colormore" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"',
777
+ h.more,'" draggable\x3d"false" ondragstart\x3d"return false;" onclick\x3d"CKEDITOR.tools.callFunction(',w,",'?','",d,"');return false;\" href\x3d\"javascript:void('",h.more,"')\"",' role\x3d"option" aria-posinset\x3d"',z,'" aria-setsize\x3d"',z,'"\x3e',h.more,"\x3c/a\x3e\x3c/td\x3e");b.push("\x3c/tr\x3e\x3c/table\x3e");return b.join("")}function f(a){return"false"==a.getAttribute("contentEditable")||a.getAttribute("data-nostyle")}function e(a,c){for(var d=a._.getItems(),e=0;e<d.count();e++){var f=
778
778
  d.getItem(e);f.removeAttribute("aria-selected");c&&c==m(f.getAttribute("data-value"))&&f.setAttribute("aria-selected",!0)}}function m(a){return CKEDITOR.tools.normalizeHex("#"+CKEDITOR.tools.convertRgbToHex(a||"")).replace(/#/g,"")}var k=a.config,h=a.lang.colorbutton;if(!CKEDITOR.env.hc){l({name:"TextColor",type:"fore",commandName:"textColor",title:h.textColorTitle,order:10,contentTransformations:[[{element:"font",check:"span{color}",left:function(a){return!!a.attributes.color},right:function(a){a.name=
779
779
  "span";a.attributes.color&&(a.styles.color=a.attributes.color);delete a.attributes.color}}]]});var c,d=a.config.colorButton_normalizeBackground;if(void 0===d||d)c=[[{element:"span",left:function(a){var c=CKEDITOR.tools;if("span"!=a.name||!a.styles||!a.styles.background)return!1;a=c.style.parse.background(a.styles.background);return a.color&&1===c.object.keys(a).length},right:function(b){var c=(new CKEDITOR.style(a.config.colorButton_backStyle,{color:b.styles.background})).getDefinition();b.name=c.element;
780
780
  b.styles=c.styles;b.attributes=c.attributes||{};return b}}]];l({name:"BGColor",type:"back",commandName:"bgColor",title:h.bgColorTitle,order:20,contentTransformations:c})}}});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={element:"span",styles:{color:"#(color)"},overrides:[{element:"font",attributes:{color:null}}]};
781
- CKEDITOR.config.colorButton_backStyle={element:"span",styles:{"background-color":"#(color)"}};CKEDITOR.plugins.colordialog={requires:"dialog",init:function(a){var l=new CKEDITOR.dialogCommand("colordialog");l.editorFocus=!1;a.addCommand("colordialog",l);CKEDITOR.dialog.add("colordialog",this.path+"dialogs/colordialog.js");a.getColorFromDialog=function(g,e,f){var l,k,h,c;l=function(a){h(this);a="ok"==a.name?this.getValueOf("picker","selectedColor"):null;/^[0-9a-f]{3}([0-9a-f]{3})?$/i.test(a)&&(a="#"+
782
- a);g.call(e,a)};k=function(a){f&&(a.data=f)};h=function(a){a.removeListener("ok",l);a.removeListener("cancel",l);a.removeListener("show",k)};c=function(a){a.on("ok",l);a.on("cancel",l);a.on("show",k,null,null,5)};a.execCommand("colordialog");if(a._.storedDialogs&&a._.storedDialogs.colordialog)c(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,function(a){return function(){c(this);
783
- b.onLoad=a;"function"==typeof a&&a.call(this)}})}})}}};CKEDITOR.plugins.add("colordialog",CKEDITOR.plugins.colordialog);(function(){function a(a,e,c,d){var b=new CKEDITOR.dom.walker(a);if(a=a.startContainer.getAscendant(e,!0)||a.endContainer.getAscendant(e,!0))if(c(a),d)return;for(;a=b.next();)if(a=a.getAscendant(e,!0))if(c(a),d)break}function l(a,f){var c={ul:"ol",ol:"ul"};return-1!==e(f,function(d){return d.element===a||d.element===c[a]})}function g(a){this.styles=null;this.sticky=!1;this.editor=
784
- a;this.filter=new CKEDITOR.filter(a,a.config.copyFormatting_allowRules);!0===a.config.copyFormatting_allowRules&&(this.filter.disabled=!0);a.config.copyFormatting_disallowRules&&this.filter.disallow(a.config.copyFormatting_disallowRules)}var e=CKEDITOR.tools.indexOf,f=CKEDITOR.tools.getMouseButton,m=!1;CKEDITOR.plugins.add("copyformatting",{lang:"az,de,en,it,ja,nb,nl,oc,pl,pt-br,ru,sv,tr,zh,zh-cn",icons:"copyformatting",hidpi:!0,init:function(a){var h=CKEDITOR.plugins.copyformatting;h._addScreenReaderContainer();
781
+ CKEDITOR.config.colorButton_backStyle={element:"span",styles:{"background-color":"#(color)"}};CKEDITOR.plugins.colordialog={requires:"dialog",init:function(a){var l=new CKEDITOR.dialogCommand("colordialog");l.editorFocus=!1;a.addCommand("colordialog",l);CKEDITOR.dialog.add("colordialog",this.path+"dialogs/colordialog.js");a.getColorFromDialog=function(g,f,e){var l,k,h,c;l=function(a){h(this);a="ok"==a.name?this.getValueOf("picker","selectedColor"):null;/^[0-9a-f]{3}([0-9a-f]{3})?$/i.test(a)&&(a="#"+
782
+ a);g.call(f,a)};k=function(a){e&&(a.data=e)};h=function(a){a.removeListener("ok",l);a.removeListener("cancel",l);a.removeListener("show",k)};c=function(a){a.on("ok",l);a.on("cancel",l);a.on("show",k,null,null,5)};a.execCommand("colordialog");if(a._.storedDialogs&&a._.storedDialogs.colordialog)c(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,function(a){return function(){c(this);
783
+ b.onLoad=a;"function"==typeof a&&a.call(this)}})}})}}};CKEDITOR.plugins.add("colordialog",CKEDITOR.plugins.colordialog);(function(){function a(a,e,c,d){var b=new CKEDITOR.dom.walker(a);if(a=a.startContainer.getAscendant(e,!0)||a.endContainer.getAscendant(e,!0))if(c(a),d)return;for(;a=b.next();)if(a=a.getAscendant(e,!0))if(c(a),d)break}function l(a,e){var c={ul:"ol",ol:"ul"};return-1!==f(e,function(d){return d.element===a||d.element===c[a]})}function g(a){this.styles=null;this.sticky=!1;this.editor=
784
+ a;this.filter=new CKEDITOR.filter(a,a.config.copyFormatting_allowRules);!0===a.config.copyFormatting_allowRules&&(this.filter.disabled=!0);a.config.copyFormatting_disallowRules&&this.filter.disallow(a.config.copyFormatting_disallowRules)}var f=CKEDITOR.tools.indexOf,e=CKEDITOR.tools.getMouseButton,m=!1;CKEDITOR.plugins.add("copyformatting",{lang:"az,de,en,it,ja,nb,nl,oc,pl,pt-br,ru,sv,tr,zh,zh-cn",icons:"copyformatting",hidpi:!0,init:function(a){var h=CKEDITOR.plugins.copyformatting;h._addScreenReaderContainer();
785
785
  m||(CKEDITOR.document.appendStyleSheet(this.path+"styles/copyformatting.css"),m=!0);a.addContentsCss&&a.addContentsCss(this.path+"styles/copyformatting.css");a.copyFormatting=new h.state(a);a.addCommand("copyFormatting",h.commands.copyFormatting);a.addCommand("applyFormatting",h.commands.applyFormatting);a.ui.addButton("CopyFormatting",{label:a.lang.copyformatting.label,command:"copyFormatting",toolbar:"cleanup,0"});a.on("contentDom",function(){var c=a.getCommand("copyFormatting"),d=a.editable(),
786
- b=d.isInline()?d:a.document,e=a.ui.get("CopyFormatting");d.attachListener(b,"mouseup",function(b){f(b)===CKEDITOR.MOUSE_BUTTON_LEFT&&c.state===CKEDITOR.TRISTATE_ON&&a.execCommand("applyFormatting")});d.attachListener(CKEDITOR.document,"mouseup",function(b){f(b)!==CKEDITOR.MOUSE_BUTTON_LEFT||c.state!==CKEDITOR.TRISTATE_ON||d.contains(b.data.getTarget())||a.execCommand("copyFormatting")});e&&(b=CKEDITOR.document.getById(e._.id),d.attachListener(b,"dblclick",function(){a.execCommand("copyFormatting",
786
+ b=d.isInline()?d:a.document,f=a.ui.get("CopyFormatting");d.attachListener(b,"mouseup",function(b){e(b)===CKEDITOR.MOUSE_BUTTON_LEFT&&c.state===CKEDITOR.TRISTATE_ON&&a.execCommand("applyFormatting")});d.attachListener(CKEDITOR.document,"mouseup",function(b){e(b)!==CKEDITOR.MOUSE_BUTTON_LEFT||c.state!==CKEDITOR.TRISTATE_ON||d.contains(b.data.getTarget())||a.execCommand("copyFormatting")});f&&(b=CKEDITOR.document.getById(f._.id),d.attachListener(b,"dblclick",function(){a.execCommand("copyFormatting",
787
787
  {sticky:!0})}),d.attachListener(b,"mouseup",function(a){a.data.stopPropagation()}))});a.config.copyFormatting_keystrokeCopy&&a.setKeystroke(a.config.copyFormatting_keystrokeCopy,"copyFormatting");a.on("key",function(c){var d=a.getCommand("copyFormatting");c=c.data.domEvent;c.getKeystroke&&27===c.getKeystroke()&&d.state===CKEDITOR.TRISTATE_ON&&a.execCommand("copyFormatting")});a.copyFormatting.on("extractFormatting",function(c){var d=c.data.element;if(d.contains(a.editable())||d.equals(a.editable()))return c.cancel();
788
- d=h._convertElementToStyleDef(d);if(!a.copyFormatting.filter.check(new CKEDITOR.style(d),!0,!0))return c.cancel();c.data.styleDef=d});a.copyFormatting.on("applyFormatting",function(c){if(!c.data.preventFormatStripping){var d=c.data.range,b=h._extractStylesFromRange(a,d),f=h._determineContext(d),g,m;if(a.copyFormatting._isContextAllowed(f))for(m=0;m<b.length;m++)f=b[m],g=d.createBookmark(),-1===e(h.preservedElements,f.element)?CKEDITOR.env.webkit&&!CKEDITOR.env.chrome?b[m].removeFromRange(c.data.range,
789
- c.editor):b[m].remove(c.editor):l(f.element,c.data.styles)&&h._removeStylesFromElementInRange(d,f.element),d.moveToBookmark(g)}});a.copyFormatting.on("applyFormatting",function(c){var d=CKEDITOR.plugins.copyformatting,b=d._determineContext(c.data.range);"list"===b&&a.copyFormatting._isContextAllowed("list")?d._applyStylesToListContext(c.editor,c.data.range,c.data.styles):"table"===b&&a.copyFormatting._isContextAllowed("table")?d._applyStylesToTableContext(c.editor,c.data.range,c.data.styles):a.copyFormatting._isContextAllowed("text")&&
790
- d._applyStylesToTextContext(c.editor,c.data.range,c.data.styles)},null,null,999)}});g.prototype._isContextAllowed=function(a){var f=this.editor.config.copyFormatting_allowedContexts;return!0===f||-1!==e(f,a)};CKEDITOR.event.implementOn(g.prototype);CKEDITOR.plugins.copyformatting={state:g,inlineBoundary:"h1 h2 h3 h4 h5 h6 p div".split(" "),excludedAttributes:["id","style","href","data-cke-saved-href","dir"],elementsForInlineTransform:["li"],excludedElementsFromInlineTransform:["table","thead","tbody",
788
+ d=h._convertElementToStyleDef(d);if(!a.copyFormatting.filter.check(new CKEDITOR.style(d),!0,!0))return c.cancel();c.data.styleDef=d});a.copyFormatting.on("applyFormatting",function(c){if(!c.data.preventFormatStripping){var d=c.data.range,b=h._extractStylesFromRange(a,d),e=h._determineContext(d),g,m;if(a.copyFormatting._isContextAllowed(e))for(m=0;m<b.length;m++)e=b[m],g=d.createBookmark(),-1===f(h.preservedElements,e.element)?CKEDITOR.env.webkit&&!CKEDITOR.env.chrome?b[m].removeFromRange(c.data.range,
789
+ c.editor):b[m].remove(c.editor):l(e.element,c.data.styles)&&h._removeStylesFromElementInRange(d,e.element),d.moveToBookmark(g)}});a.copyFormatting.on("applyFormatting",function(c){var d=CKEDITOR.plugins.copyformatting,b=d._determineContext(c.data.range);"list"===b&&a.copyFormatting._isContextAllowed("list")?d._applyStylesToListContext(c.editor,c.data.range,c.data.styles):"table"===b&&a.copyFormatting._isContextAllowed("table")?d._applyStylesToTableContext(c.editor,c.data.range,c.data.styles):a.copyFormatting._isContextAllowed("text")&&
790
+ d._applyStylesToTextContext(c.editor,c.data.range,c.data.styles)},null,null,999)}});g.prototype._isContextAllowed=function(a){var e=this.editor.config.copyFormatting_allowedContexts;return!0===e||-1!==f(e,a)};CKEDITOR.event.implementOn(g.prototype);CKEDITOR.plugins.copyformatting={state:g,inlineBoundary:"h1 h2 h3 h4 h5 h6 p div".split(" "),excludedAttributes:["id","style","href","data-cke-saved-href","dir"],elementsForInlineTransform:["li"],excludedElementsFromInlineTransform:["table","thead","tbody",
791
791
  "ul","ol"],excludedAttributesFromInlineTransform:["value","type"],preservedElements:"ul ol li td th tr thead tbody table".split(" "),breakOnElements:["ul","ol","table"],_initialKeystrokePasteCommand:null,commands:{copyFormatting:{exec:function(a,e){var c=CKEDITOR.plugins.copyformatting,d=a.copyFormatting,b=e?"keystrokeHandler"==e.from:!1,f=e?e.sticky||b:!1,g=c._getCursorContainer(a),l=CKEDITOR.document.getDocumentElement();if(this.state===CKEDITOR.TRISTATE_ON)return d.styles=null,d.sticky=!1,g.removeClass("cke_copyformatting_active"),
792
792
  l.removeClass("cke_copyformatting_disabled"),l.removeClass("cke_copyformatting_tableresize_cursor"),c._putScreenReaderMessage(a,"canceled"),c._detachPasteKeystrokeHandler(a),this.setState(CKEDITOR.TRISTATE_OFF);d.styles=c._extractStylesFromElement(a,a.elementPath().lastElement);this.setState(CKEDITOR.TRISTATE_ON);b||(g.addClass("cke_copyformatting_active"),l.addClass("cke_copyformatting_tableresize_cursor"),a.config.copyFormatting_outerCursor&&l.addClass("cke_copyformatting_disabled"));d.sticky=f;
793
793
  c._putScreenReaderMessage(a,"copied");c._attachPasteKeystrokeHandler(a)}},applyFormatting:{editorFocus:CKEDITOR.env.ie&&!CKEDITOR.env.edge?!1:!0,exec:function(a,e){var c=a.getCommand("copyFormatting"),d=e?"keystrokeHandler"==e.from:!1,b=CKEDITOR.plugins.copyformatting,f=a.copyFormatting,g=b._getCursorContainer(a),l=CKEDITOR.document.getDocumentElement();if(d&&!f.styles)return b._putScreenReaderMessage(a,"failed"),b._detachPasteKeystrokeHandler(a),!1;d=b._applyFormat(a,f.styles);f.sticky||(f.styles=
794
794
  null,g.removeClass("cke_copyformatting_active"),l.removeClass("cke_copyformatting_disabled"),l.removeClass("cke_copyformatting_tableresize_cursor"),c.setState(CKEDITOR.TRISTATE_OFF),b._detachPasteKeystrokeHandler(a));b._putScreenReaderMessage(a,d?"applied":"canceled")}}},_getCursorContainer:function(a){return a.elementMode===CKEDITOR.ELEMENT_MODE_INLINE?a.editable():a.editable().getParent()},_convertElementToStyleDef:function(a){var e=CKEDITOR.tools,c=a.getAttributes(CKEDITOR.plugins.copyformatting.excludedAttributes),
795
- e=e.parseCssText(a.getAttribute("style"),!0,!0);return{element:a.getName(),type:CKEDITOR.STYLE_INLINE,attributes:c,styles:e}},_extractStylesFromElement:function(a,f){var c={},d=[];do if(f.type===CKEDITOR.NODE_ELEMENT&&!f.hasAttribute("data-cke-bookmark")&&(c.element=f,a.copyFormatting.fire("extractFormatting",c,a)&&c.styleDef&&d.push(new CKEDITOR.style(c.styleDef)),f.getName&&-1!==e(CKEDITOR.plugins.copyformatting.breakOnElements,f.getName())))break;while((f=f.getParent())&&f.type===CKEDITOR.NODE_ELEMENT);
796
- return d},_extractStylesFromRange:function(a,e){for(var c=[],d=new CKEDITOR.dom.walker(e),b;b=d.next();)c=c.concat(CKEDITOR.plugins.copyformatting._extractStylesFromElement(a,b));return c},_removeStylesFromElementInRange:function(a,f){for(var c=-1!==e(["ol","ul","table"],f),d=new CKEDITOR.dom.walker(a),b;b=d.next();)if(b=b.getAscendant(f,!0))if(b.removeAttributes(b.getAttributes()),c)break},_getSelectedWordOffset:function(a){function f(a,b){return a[b?"getPrevious":"getNext"](function(a){return a.type!==
797
- CKEDITOR.NODE_COMMENT})}function c(a){return a.type==CKEDITOR.NODE_ELEMENT?(a=a.getHtml().replace(/<span.*?>&nbsp;<\/span>/g,""),a.replace(/<.*?>/g,"")):a.getText()}function d(a,b){var k=a,g=/\s/g,l="p br ol ul li td th div caption body".split(" "),m=!1,n=!1,q,C;do{for(q=f(k,b);!q&&k.getParent();){k=k.getParent();if(-1!==e(l,k.getName())){n=m=!0;break}q=f(k,b)}if(q&&q.getName&&-1!==e(l,q.getName())){m=!0;break}k=q}while(k&&k.getStyle&&("none"==k.getStyle("display")||!k.getText()));for(k||(k=a);k.type!==
795
+ e=e.parseCssText(a.getAttribute("style"),!0,!0);return{element:a.getName(),type:CKEDITOR.STYLE_INLINE,attributes:c,styles:e}},_extractStylesFromElement:function(a,e){var c={},d=[];do if(e.type===CKEDITOR.NODE_ELEMENT&&!e.hasAttribute("data-cke-bookmark")&&(c.element=e,a.copyFormatting.fire("extractFormatting",c,a)&&c.styleDef&&d.push(new CKEDITOR.style(c.styleDef)),e.getName&&-1!==f(CKEDITOR.plugins.copyformatting.breakOnElements,e.getName())))break;while((e=e.getParent())&&e.type===CKEDITOR.NODE_ELEMENT);
796
+ return d},_extractStylesFromRange:function(a,e){for(var c=[],d=new CKEDITOR.dom.walker(e),b;b=d.next();)c=c.concat(CKEDITOR.plugins.copyformatting._extractStylesFromElement(a,b));return c},_removeStylesFromElementInRange:function(a,e){for(var c=-1!==f(["ol","ul","table"],e),d=new CKEDITOR.dom.walker(a),b;b=d.next();)if(b=b.getAscendant(e,!0))if(b.removeAttributes(b.getAttributes()),c)break},_getSelectedWordOffset:function(a){function e(a,b){return a[b?"getPrevious":"getNext"](function(a){return a.type!==
797
+ CKEDITOR.NODE_COMMENT})}function c(a){return a.type==CKEDITOR.NODE_ELEMENT?(a=a.getHtml().replace(/<span.*?>&nbsp;<\/span>/g,""),a.replace(/<.*?>/g,"")):a.getText()}function d(a,b){var k=a,g=/\s/g,l="p br ol ul li td th div caption body".split(" "),m=!1,n=!1,q,C;do{for(q=e(k,b);!q&&k.getParent();){k=k.getParent();if(-1!==f(l,k.getName())){n=m=!0;break}q=e(k,b)}if(q&&q.getName&&-1!==f(l,q.getName())){m=!0;break}k=q}while(k&&k.getStyle&&("none"==k.getStyle("display")||!k.getText()));for(k||(k=a);k.type!==
798
798
  CKEDITOR.NODE_TEXT;)k=!m||b||n?k.getChild(0):k.getChild(k.getChildCount()-1);for(l=c(k);null!=(n=g.exec(l))&&(C=n.index,b););if("number"!==typeof C&&!m)return d(k,b);if(m)b?C=0:(g=/([\.\b]*$)/,C=(n=g.exec(l))?n.index:l.length);else if(b&&(C+=1,C>l.length))return d(k);return{node:k,offset:C}}var b=/\b\w+\b/ig,g,l,m,t,r;m=t=r=a.startContainer;for(g=c(m);null!=(l=b.exec(g));)if(l.index+l[0].length>=a.startOffset)return a=l.index,b=l.index+l[0].length,0===l.index&&(l=d(m,!0),t=l.node,a=l.offset),b>=g.length&&
799
799
  (g=d(m),r=g.node,b=g.offset),{startNode:t,startOffset:a,endNode:r,endOffset:b};return null},_filterStyles:function(a){var e=CKEDITOR.tools.isEmpty,c=[],d,b;for(b=0;b<a.length;b++)d=a[b]._.definition,-1!==CKEDITOR.tools.indexOf(CKEDITOR.plugins.copyformatting.inlineBoundary,d.element)&&(d.element=a[b].element="span"),"span"===d.element&&e(d.attributes)&&e(d.styles)||c.push(a[b]);return c},_determineContext:function(a){function e(c){var d=new CKEDITOR.dom.walker(a),b;if(a.startContainer.getAscendant(c,
800
- !0)||a.endContainer.getAscendant(c,!0))return!0;for(;b=d.next();)if(b.getAscendant(c,!0))return!0}return e({ul:1,ol:1})?"list":e("table")?"table":"text"},_applyStylesToTextContext:function(a,f,c){var d=CKEDITOR.plugins.copyformatting,b=d.excludedAttributesFromInlineTransform,g,l;CKEDITOR.env.webkit&&!CKEDITOR.env.chrome&&a.getSelection().selectRanges([f]);for(g=0;g<c.length;g++)if(f=c[g],-1===e(d.excludedElementsFromInlineTransform,f.element)){if(-1!==e(d.elementsForInlineTransform,f.element))for(f.element=
801
- f._.definition.element="span",l=0;l<b.length;l++)f._.definition.attributes[b[l]]&&delete f._.definition.attributes[b[l]];f.apply(a)}},_applyStylesToListContext:function(e,f,c){var d,b,g;for(g=0;g<c.length;g++)d=c[g],b=f.createBookmark(),"ol"===d.element||"ul"===d.element?a(f,{ul:1,ol:1},function(a){var b=d;a.getName()!==b.element&&a.renameNode(b.element);b.applyToObject(a)},!0):"li"===d.element?a(f,"li",function(a){d.applyToObject(a)}):CKEDITOR.plugins.copyformatting._applyStylesToTextContext(e,f,
802
- [d]),f.moveToBookmark(b)},_applyStylesToTableContext:function(f,h,c){function d(a,b){a.getName()!==b.element&&(b=b.getDefinition(),b.element=a.getName(),b=new CKEDITOR.style(b));b.applyToObject(a)}var b,g,l;for(l=0;l<c.length;l++)b=c[l],g=h.createBookmark(),-1!==e(["table","tr"],b.element)?a(h,b.element,function(a){b.applyToObject(a)}):-1!==e(["td","th"],b.element)?a(h,{td:1,th:1},function(a){d(a,b)}):-1!==e(["thead","tbody"],b.element)?a(h,{thead:1,tbody:1},function(a){d(a,b)}):CKEDITOR.plugins.copyformatting._applyStylesToTextContext(f,
800
+ !0)||a.endContainer.getAscendant(c,!0))return!0;for(;b=d.next();)if(b.getAscendant(c,!0))return!0}return e({ul:1,ol:1})?"list":e("table")?"table":"text"},_applyStylesToTextContext:function(a,e,c){var d=CKEDITOR.plugins.copyformatting,b=d.excludedAttributesFromInlineTransform,g,l;CKEDITOR.env.webkit&&!CKEDITOR.env.chrome&&a.getSelection().selectRanges([e]);for(g=0;g<c.length;g++)if(e=c[g],-1===f(d.excludedElementsFromInlineTransform,e.element)){if(-1!==f(d.elementsForInlineTransform,e.element))for(e.element=
801
+ e._.definition.element="span",l=0;l<b.length;l++)e._.definition.attributes[b[l]]&&delete e._.definition.attributes[b[l]];e.apply(a)}},_applyStylesToListContext:function(e,f,c){var d,b,g;for(g=0;g<c.length;g++)d=c[g],b=f.createBookmark(),"ol"===d.element||"ul"===d.element?a(f,{ul:1,ol:1},function(a){var b=d;a.getName()!==b.element&&a.renameNode(b.element);b.applyToObject(a)},!0):"li"===d.element?a(f,"li",function(a){d.applyToObject(a)}):CKEDITOR.plugins.copyformatting._applyStylesToTextContext(e,f,
802
+ [d]),f.moveToBookmark(b)},_applyStylesToTableContext:function(e,h,c){function d(a,b){a.getName()!==b.element&&(b=b.getDefinition(),b.element=a.getName(),b=new CKEDITOR.style(b));b.applyToObject(a)}var b,g,l;for(l=0;l<c.length;l++)b=c[l],g=h.createBookmark(),-1!==f(["table","tr"],b.element)?a(h,b.element,function(a){b.applyToObject(a)}):-1!==f(["td","th"],b.element)?a(h,{td:1,th:1},function(a){d(a,b)}):-1!==f(["thead","tbody"],b.element)?a(h,{thead:1,tbody:1},function(a){d(a,b)}):CKEDITOR.plugins.copyformatting._applyStylesToTextContext(e,
803
803
  h,[b]),h.moveToBookmark(g)},_applyFormat:function(a,e){var c=a.getSelection().getRanges()[0],d=CKEDITOR.plugins.copyformatting,b,f;if(!c)return!1;if(c.collapsed){f=a.getSelection().createBookmarks();if(!(b=d._getSelectedWordOffset(c)))return;c=a.createRange();c.setStart(b.startNode,b.startOffset);c.setEnd(b.endNode,b.endOffset);c.select()}e=d._filterStyles(e);if(!a.copyFormatting.fire("applyFormatting",{styles:e,range:c,preventFormatStripping:!1},a))return!1;f&&a.getSelection().selectBookmarks(f);
804
804
  return!0},_putScreenReaderMessage:function(a,e){var c=this._getScreenReaderContainer();c&&c.setText(a.lang.copyformatting.notification[e])},_addScreenReaderContainer:function(){if(this._getScreenReaderContainer())return this._getScreenReaderContainer();if(!CKEDITOR.env.ie6Compat&&!CKEDITOR.env.ie7Compat)return CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_screen_reader_only cke_copyformatting_notification"\x3e\x3cdiv aria-live\x3d"polite"\x3e\x3c/div\x3e\x3c/div\x3e')).getChild(0)},
805
805
  _getScreenReaderContainer:function(){if(!CKEDITOR.env.ie6Compat&&!CKEDITOR.env.ie7Compat)return CKEDITOR.document.getBody().findOne(".cke_copyformatting_notification div[aria-live]")},_attachPasteKeystrokeHandler:function(a){var e=a.config.copyFormatting_keystrokePaste;e&&(this._initialKeystrokePasteCommand=a.keystrokeHandler.keystrokes[e],a.setKeystroke(e,"applyFormatting"))},_detachPasteKeystrokeHandler:function(a){var e=a.config.copyFormatting_keystrokePaste;e&&a.setKeystroke(e,this._initialKeystrokePasteCommand||
806
806
  !1)}};CKEDITOR.config.copyFormatting_outerCursor=!0;CKEDITOR.config.copyFormatting_allowRules="b s u i em strong span p div td th ol ul li(*)[*]{*}";CKEDITOR.config.copyFormatting_disallowRules="*[data-cke-widget*,data-widget*,data-cke-realelement](cke_widget*)";CKEDITOR.config.copyFormatting_allowedContexts=!0;CKEDITOR.config.copyFormatting_keystrokeCopy=CKEDITOR.CTRL+CKEDITOR.SHIFT+67;CKEDITOR.config.copyFormatting_keystrokePaste=CKEDITOR.CTRL+CKEDITOR.SHIFT+86})();CKEDITOR.plugins.add("menu",{requires:"floatpanel",
807
- beforeInit:function(a){for(var l=a.config.menu_groups.split(","),g=a._.menuGroups={},e=a._.menuItems={},f=0;f<l.length;f++)g[l[f]]=f+1;a.addMenuGroup=function(a,e){g[a]=e||100};a.addMenuItem=function(a,f){g[f.group]&&(e[a]=new CKEDITOR.menuItem(this,a,f))};a.addMenuItems=function(a){for(var e in a)this.addMenuItem(e,a[e])};a.getMenuItem=function(a){return e[a]};a.removeMenuItem=function(a){delete e[a]}}});(function(){function a(a){a.sort(function(a,c){return a.group<c.group?-1:a.group>c.group?1:a.order<
807
+ beforeInit:function(a){for(var l=a.config.menu_groups.split(","),g=a._.menuGroups={},f=a._.menuItems={},e=0;e<l.length;e++)g[l[e]]=e+1;a.addMenuGroup=function(a,e){g[a]=e||100};a.addMenuItem=function(a,e){g[e.group]&&(f[a]=new CKEDITOR.menuItem(this,a,e))};a.addMenuItems=function(a){for(var e in a)this.addMenuItem(e,a[e])};a.getMenuItem=function(a){return f[a]};a.removeMenuItem=function(a){delete f[a]}}});(function(){function a(a){a.sort(function(a,c){return a.group<c.group?-1:a.group>c.group?1:a.order<
808
808
  c.order?-1:a.order>c.order?1:0})}var l='\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"{attrLabel}" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasPopup}" aria-disabled\x3d"{disabled}" {ariaChecked} draggable\x3d"false"',g="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(l+=' onkeypress\x3d"return false;"');
809
809
  CKEDITOR.env.gecko&&(l+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;" ondragstart\x3d"return false;"');CKEDITOR.env.ie&&(g='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var l=l+(' onmouseover\x3d"CKEDITOR.tools.callFunction({hoverFn},{index});" onmouseout\x3d"CKEDITOR.tools.callFunction({moveOutFn},{index});" onclick\x3d"'+g+'CKEDITOR.tools.callFunction({clickFn},{index}); return false;"\x3e')+'\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',
810
- e=CKEDITOR.addTemplate("menuItem",l),f=CKEDITOR.addTemplate("menuArrow",'\x3cspan class\x3d"cke_menuarrow"\x3e\x3cspan\x3e{label}\x3c/span\x3e\x3c/span\x3e'),m=CKEDITOR.addTemplate("menuShortcut",'\x3cspan class\x3d"cke_menubutton_label cke_menubutton_shortcut"\x3e{shortcut}\x3c/span\x3e');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(a,e){e=this._.definition=e||{};this.id=CKEDITOR.tools.getNextId();this.editor=a;this.items=[];this._.listeners=[];this._.level=e.level||1;var c=CKEDITOR.tools.extend({},
810
+ f=CKEDITOR.addTemplate("menuItem",l),e=CKEDITOR.addTemplate("menuArrow",'\x3cspan class\x3d"cke_menuarrow"\x3e\x3cspan\x3e{label}\x3c/span\x3e\x3c/span\x3e'),m=CKEDITOR.addTemplate("menuShortcut",'\x3cspan class\x3d"cke_menubutton_label cke_menubutton_shortcut"\x3e{shortcut}\x3c/span\x3e');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(a,e){e=this._.definition=e||{};this.id=CKEDITOR.tools.getNextId();this.editor=a;this.items=[];this._.listeners=[];this._.level=e.level||1;var c=CKEDITOR.tools.extend({},
811
811
  e.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level-1,block:{}}),d=c.block.attributes=c.attributes||{};!d.role&&(d.role="menu");this._.panelDefinition=c},_:{onShow:function(){var a=this.editor.getSelection(),e=a&&a.getStartElement(),c=this.editor.elementPath(),d=this._.listeners;this.removeAll();for(var b=0;b<d.length;b++){var f=d[b](e,a,c);if(f)for(var g in f){var l=this.editor.getMenuItem(g);!l||l.command&&!this.editor.getCommand(l.command).state||(l.state=f[g],this.add(l))}}},onClick:function(a){this.hide();
812
812
  if(a.onClick)a.onClick();else a.command&&this.editor.execCommand(a.command)},onEscape:function(a){var e=this.parent;e?e._.panel.hideChild(1):27==a&&this.hide(1);return!1},onHide:function(){this.onHide&&this.onHide()},showSubMenu:function(a){var e=this._.subMenu,c=this.items[a];if(c=c.getItems&&c.getItems()){e?e.removeAll():(e=this._.subMenu=new CKEDITOR.menu(this.editor,CKEDITOR.tools.extend({},this._.definition,{level:this._.level+1},!0)),e.parent=this,e._.onClick=CKEDITOR.tools.bind(this._.onClick,
813
813
  this));for(var d in c){var b=this.editor.getMenuItem(d);b&&(b.state=c[d],e.add(b))}var f=this._.panel.getBlock(this.id).element.getDocument().getById(this.id+String(a));setTimeout(function(){e.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(e,f,c,d){if(!this.parent&&(this._.onShow(),!this.items.length))return;f=f||("rtl"==this.editor.lang.dir?2:1);var b=this.items,g=this.editor,
@@ -818,118 +818,118 @@ r=b.length,p=r&&b[0].group,y=0;y<r;y++){var x=b[y];p!=x.group&&(t.push('\x3cdiv
818
818
  findItemByCommandName:function(a){var e=CKEDITOR.tools.array.filter(this.items,function(c){return a===c.command});return e.length?(e=e[0],{item:e,element:this._.element.findOne("."+e.className)}):null}}});CKEDITOR.menuItem=CKEDITOR.tools.createClass({$:function(a,e,c){CKEDITOR.tools.extend(this,c,{order:0,className:"cke_menubutton__"+e});this.group=a._.menuGroups[this.group];this.editor=a;this.name=e},proto:{render:function(a,h,c){var d=a.id+String(h),b="undefined"==typeof this.state?CKEDITOR.TRISTATE_OFF:
819
819
  this.state,g="",l=this.editor,u,t,r=b==CKEDITOR.TRISTATE_ON?"on":b==CKEDITOR.TRISTATE_DISABLED?"disabled":"off";this.role in{menuitemcheckbox:1,menuitemradio:1}&&(g=' aria-checked\x3d"'+(b==CKEDITOR.TRISTATE_ON?"true":"false")+'"');var p=this.getItems,y="\x26#"+("rtl"==this.editor.lang.dir?"9668":"9658")+";",x=this.name;this.icon&&!/\./.test(this.icon)&&(x=this.icon);this.command&&(u=l.getCommand(this.command),(u=l.getCommandKeystroke(u))&&(t=CKEDITOR.tools.keystrokeToString(l.lang.common.keyboard,
820
820
  u)));u=CKEDITOR.tools.htmlEncodeAttr(this.label);a={id:d,name:this.name,iconName:x,label:this.label,attrLabel:u,cls:this.className||"",state:r,hasPopup:p?"true":"false",disabled:b==CKEDITOR.TRISTATE_DISABLED,title:u+(t?" ("+t.display+")":""),ariaShortcut:t?l.lang.common.keyboardShortcut+" "+t.aria:"",href:"javascript:void('"+(u||"").replace("'")+"')",hoverFn:a._.itemOverFn,moveOutFn:a._.itemOutFn,clickFn:a._.itemClickFn,index:h,iconStyle:CKEDITOR.skin.getIconStyle(x,"rtl"==this.editor.lang.dir,x==
821
- this.icon?null:this.icon,this.iconOffset),shortcutHtml:t?m.output({shortcut:t.display}):"",arrowHtml:p?f.output({label:y}):"",role:this.role?this.role:"menuitem",ariaChecked:g};e.output(a,c)}}})})();CKEDITOR.config.menu_groups="clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div";CKEDITOR.plugins.add("contextmenu",{requires:"menu",onLoad:function(){CKEDITOR.plugins.contextMenu=CKEDITOR.tools.createClass({base:CKEDITOR.menu,
822
- $:function(a){this.base.call(this,a,{panel:{css:a.config.contextmenu_contentsCss,className:"cke_menu_panel",attributes:{"aria-label":a.lang.contextmenu.options}}})},proto:{addTarget:function(a,l){function g(){f=!1}var e,f;a.on("contextmenu",function(a){a=a.data;var h=CKEDITOR.env.webkit?e:CKEDITOR.env.mac?a.$.metaKey:a.$.ctrlKey;if(!l||!h)if(a.preventDefault(),!f){if(CKEDITOR.env.mac&&CKEDITOR.env.webkit){var h=this.editor,c=(new CKEDITOR.dom.elementPath(a.getTarget(),h.editable())).contains(function(a){return a.hasAttribute("contenteditable")},
823
- !0);c&&"false"==c.getAttribute("contenteditable")&&h.getSelection().fake(c)}var c=a.getTarget().getDocument(),d=a.getTarget().getDocument().getDocumentElement(),h=!c.equals(CKEDITOR.document),c=c.getWindow().getScrollPosition(),b=h?a.$.clientX:a.$.pageX||c.x+a.$.clientX,g=h?a.$.clientY:a.$.pageY||c.y+a.$.clientY;CKEDITOR.tools.setTimeout(function(){this.open(d,null,b,g)},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?
824
- 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&&121===a.data.$.keyCode&&(f=!0)},null,null,0),a.on("keyup",g),a.on("contextmenu",g))},open:function(a,l,g,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,l,g,e))}}})},beforeInit:function(a){var l=
825
- a.contextMenu=new CKEDITOR.plugins.contextMenu(a);a.on("contentDom",function(){l.addTarget(a.editable(),!1!==a.config.browserContextMenuOnCtrl)});a.addCommand("contextMenu",{exec:function(a){var e=0,f=0,l=a.getSelection().getRanges(),l=l[l.length-1].getClientRects(a.editable().isInline());if(l=l[l.length-1])e=l["rtl"===a.lang.dir?"left":"right"],f=l.bottom;a.contextMenu.open(a.document.getBody().getParent(),null,e,f)}});a.setKeystroke(CKEDITOR.SHIFT+121,"contextMenu");a.setKeystroke(CKEDITOR.CTRL+
826
- CKEDITOR.SHIFT+121,"contextMenu")}});(function(){function a(a){return 20<a.length?!1:(a=a.replace(/[\n|\t]*/g,"").toLowerCase())&&"\x3cbr\x3e"!=a&&"\x3cp\x3e\x26nbsp;\x3cbr\x3e\x3c/p\x3e"!=a&&"\x3cp\x3e\x3cbr\x3e\x3c/p\x3e"!=a&&"\x3cp\x3e\x26nbsp;\x3c/p\x3e"!=a&&"\x26nbsp;"!=a&&" "!=a&&"\x26nbsp;\x3cbr\x3e"!=a&&" \x3cbr\x3e"!=a?!1:!0}function l(e){var k=e.editor,h=k.editable?k.editable():"wysiwyg"==k.mode?k.document&&k.document.getBody():k.textarea,c=e.listenerData;if(h){if("wysiwyg"==k.mode){if(CKEDITOR.dialog._.currentTop||
827
- !h)return;a(h.getHtml())&&(h.setHtml(c),h.addClass("placeholder"))}"source"==k.mode&&(f?"mode"==e.name&&h.setAttribute("placeholder",c):a(h.getValue())&&(h.setValue(c),h.addClass("placeholder")))}}function g(a){a=a.editor;var e=a.editable?a.editable():"wysiwyg"==a.mode?a.document&&a.document.getBody():a.textarea;if(e){if("wysiwyg"==a.mode){if(!e.hasClass("placeholder"))return;e.removeClass("placeholder");if(CKEDITOR.dtd[e.getName()].p){e.setHtml("\x3cp\x3e\x3cbr/\x3e\x3c/p\x3e");var f=new CKEDITOR.dom.range(a.document);
828
- f.moveToElementEditablePosition(e.getFirst(),!0);a.getSelection().selectRanges([f])}else e.setHtml(" ")}"source"==a.mode&&e.hasClass("placeholder")&&(e.removeClass("placeholder"),e.setValue(""))}}function e(a){return a?a.getAttribute("lang")||e(a.getParent()):null}var f="placeholder"in document.createElement("textarea");CKEDITOR.plugins.add("confighelper",{getPlaceholderCss:function(){return".placeholder{ color: #999; }"},onLoad:function(){CKEDITOR.addCss&&CKEDITOR.addCss(this.getPlaceholderCss())},
821
+ this.icon?null:this.icon,this.iconOffset),shortcutHtml:t?m.output({shortcut:t.display}):"",arrowHtml:p?e.output({label:y}):"",role:this.role?this.role:"menuitem",ariaChecked:g};f.output(a,c)}}})})();CKEDITOR.config.menu_groups="clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div";CKEDITOR.plugins.add("contextmenu",{requires:"menu",onLoad:function(){CKEDITOR.plugins.contextMenu=CKEDITOR.tools.createClass({base:CKEDITOR.menu,
822
+ $:function(a){this.base.call(this,a,{panel:{css:a.config.contextmenu_contentsCss,className:"cke_menu_panel",attributes:{"aria-label":a.lang.contextmenu.options}}})},proto:{addTarget:function(a,l){function g(){e=!1}var f,e;a.on("contextmenu",function(a){a=a.data;var h=CKEDITOR.env.webkit?f:CKEDITOR.env.mac?a.$.metaKey:a.$.ctrlKey;if(!l||!h)if(a.preventDefault(),!e){if(CKEDITOR.env.mac&&CKEDITOR.env.webkit){var h=this.editor,c=(new CKEDITOR.dom.elementPath(a.getTarget(),h.editable())).contains(function(a){return a.hasAttribute("contenteditable")},
823
+ !0);c&&"false"==c.getAttribute("contenteditable")&&h.getSelection().fake(c)}var c=a.getTarget().getDocument(),d=a.getTarget().getDocument().getDocumentElement(),h=!c.equals(CKEDITOR.document),c=c.getWindow().getScrollPosition(),b=h?a.$.clientX:a.$.pageX||c.x+a.$.clientX,g=h?a.$.clientY:a.$.pageY||c.y+a.$.clientY;CKEDITOR.tools.setTimeout(function(){this.open(d,null,b,g)},CKEDITOR.env.ie?200:0,this)}},this);if(CKEDITOR.env.webkit){var m=function(){f=0};a.on("keydown",function(a){f=CKEDITOR.env.mac?
824
+ 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&&121===a.data.$.keyCode&&(e=!0)},null,null,0),a.on("keyup",g),a.on("contextmenu",g))},open:function(a,l,g,f){!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,l,g,f))}}})},beforeInit:function(a){var l=
825
+ a.contextMenu=new CKEDITOR.plugins.contextMenu(a);a.on("contentDom",function(){l.addTarget(a.editable(),!1!==a.config.browserContextMenuOnCtrl)});a.addCommand("contextMenu",{exec:function(a){var f=0,e=0,l=a.getSelection().getRanges(),l=l[l.length-1].getClientRects(a.editable().isInline());if(l=l[l.length-1])f=l["rtl"===a.lang.dir?"left":"right"],e=l.bottom;a.contextMenu.open(a.document.getBody().getParent(),null,f,e)}});a.setKeystroke(CKEDITOR.SHIFT+121,"contextMenu");a.setKeystroke(CKEDITOR.CTRL+
826
+ CKEDITOR.SHIFT+121,"contextMenu")}});(function(){function a(a){return 20<a.length?!1:(a=a.replace(/[\n|\t]*/g,"").toLowerCase())&&"\x3cbr\x3e"!=a&&"\x3cp\x3e\x26nbsp;\x3cbr\x3e\x3c/p\x3e"!=a&&"\x3cp\x3e\x3cbr\x3e\x3c/p\x3e"!=a&&"\x3cp\x3e\x26nbsp;\x3c/p\x3e"!=a&&"\x26nbsp;"!=a&&" "!=a&&"\x26nbsp;\x3cbr\x3e"!=a&&" \x3cbr\x3e"!=a?!1:!0}function l(f){var k=f.editor,h=k.editable?k.editable():"wysiwyg"==k.mode?k.document&&k.document.getBody():k.textarea,c=f.listenerData;if(h){if("wysiwyg"==k.mode){if(CKEDITOR.dialog._.currentTop||
827
+ !h)return;a(h.getHtml())&&(h.setHtml(c),h.addClass("placeholder"))}"source"==k.mode&&(e?"mode"==f.name&&h.setAttribute("placeholder",c):a(h.getValue())&&(h.setValue(c),h.addClass("placeholder")))}}function g(a){a=a.editor;var e=a.editable?a.editable():"wysiwyg"==a.mode?a.document&&a.document.getBody():a.textarea;if(e){if("wysiwyg"==a.mode){if(!e.hasClass("placeholder"))return;e.removeClass("placeholder");if(CKEDITOR.dtd[e.getName()].p){e.setHtml("\x3cp\x3e\x3cbr/\x3e\x3c/p\x3e");var f=new CKEDITOR.dom.range(a.document);
828
+ f.moveToElementEditablePosition(e.getFirst(),!0);a.getSelection().selectRanges([f])}else e.setHtml(" ")}"source"==a.mode&&e.hasClass("placeholder")&&(e.removeClass("placeholder"),e.setValue(""))}}function f(a){return a?a.getAttribute("lang")||f(a.getParent()):null}var e="placeholder"in document.createElement("textarea");CKEDITOR.plugins.add("confighelper",{getPlaceholderCss:function(){return".placeholder{ color: #999; }"},onLoad:function(){CKEDITOR.addCss&&CKEDITOR.addCss(this.getPlaceholderCss())},
829
829
  init:function(m){m.on("mode",function(a){a.editor.focusManager.hasFocus=!1});var k=m.element.getAttribute("placeholder")||m.config.placeholder;if(k){m.addCss&&m.addCss(this.getPlaceholderCss());var h=CKEDITOR.document.getHead().append("style");h.setAttribute("type","text/css");CKEDITOR.env.ie&&11>CKEDITOR.env.version?h.$.styleSheet.cssText="textarea.placeholder { color: #999; font-style: italic; }":h.$.innerHTML="textarea.placeholder { color: #999; font-style: italic; }";m.on("getData",function(a){var b=
830
- m.editable?m.editable():"wysiwyg"==m.mode?m.document&&m.document.getBody():m.textarea;b&&b.hasClass("placeholder")&&(a.data.dataValue="")});m.on("setData",function(c){if(!(CKEDITOR.dialog._.currentTop||"source"==m.mode&&f)){var b=m.editable?m.editable():"wysiwyg"==m.mode?m.document&&m.document.getBody():m.textarea;b&&(a(c.data.dataValue)?l(c):b.hasClass("placeholder")&&b.removeClass("placeholder"))}});m.on("blur",l,null,k);m.on("mode",l,null,k);m.on("focus",g);m.on("beforeModeUnload",g)}(k=m.config.contentsLanguage||
831
- e(m.element))&&!m.config.scayt_sLang&&(m.config.scayt_sLang={en:"en_US","en-us":"en_US","en-gb":"en_GB","pt-br":"pt_BR",da:"da_DK","da-dk":"da_DK","nl-nl":"nl_NL","en-ca":"en_CA","fi-fi":"fi_FI",fr:"fr_FR","fr-fr":"fr_FR","fr-ca":"fr_CA",de:"de_DE","de-de":"de_DE","el-gr":"el_GR",it:"it_IT","it-it":"it_IT","nb-no":"nb_NO",pt:"pt_PT","pt-pt":"pt_PT",es:"es_ES","es-es":"es_ES","sv-se":"sv_SE"}[k.toLowerCase()]);var c=function(a){if("object"==typeof a)return a;a=a.split(";");var b={},c;for(c=0;c<a.length;c++){var e=
832
- a[c].split(":");if(3==e.length){var f=e[0],h=e[1],e=e[2];b[f]||(b[f]={});b[f][h]||(b[f][h]=[]);b[f][h].push(e)}}return b};CKEDITOR.on("dialogDefinition",function(a){if(m==a.editor){var b=a.data.name;a=a.data.definition;var e,f,h,g,k;"tableProperties"==b&&"table"==b;"removeDialogFields"in m._||!m.config.removeDialogFields||(m._.removeDialogFields=c(m.config.removeDialogFields));if(m._.removeDialogFields&&(e=m._.removeDialogFields[b]))for(h in e)for(g=e[h],k=a.getContents(h),f=0;f<g.length;f++)k.remove(g[f]);
833
- "hideDialogFields"in m._||!m.config.hideDialogFields||(m._.hideDialogFields=c(m.config.hideDialogFields));if(m._.hideDialogFields&&(e=m._.hideDialogFields[b]))for(h in e)for(g=e[h],k=a.getContents(h),f=0;f<g.length;f++)k.get(g[f]).hidden=!0;if(m.config.dialogFieldsDefaultValues&&(e=m.config.dialogFieldsDefaultValues[b]))for(h in e){g=e[h];k=a.getContents(h);for(var l in g)(b=k.get(l))&&(b["default"]=g[l])}}})}})})();(function(){function a(a){var f=this.att;a=a&&a.hasAttribute(f)&&a.getAttribute(f)||
834
- "";void 0!==a&&this.setValue(a)}function l(){for(var a,f=0;f<arguments.length;f++)if(arguments[f]instanceof CKEDITOR.dom.element){a=arguments[f];break}if(a){var f=this.att,g=this.getValue();g?a.setAttribute(f,g):a.removeAttribute(f,g)}}var g={id:1,dir:1,classes:1,styles:1};CKEDITOR.plugins.add("dialogadvtab",{requires:"dialog",allowedContent:function(a){a||(a=g);var f=[];a.id&&f.push("id");a.dir&&f.push("dir");var l="";f.length&&(l+="["+f.join(",")+"]");a.classes&&(l+="(*)");a.styles&&(l+="{*}");
835
- return l},createAdvancedTab:function(e,f,m){f||(f=g);var k=e.lang.common,h={id:"advanced",label:k.advancedTab,title:k.advancedTab,elements:[{type:"vbox",padding:1,children:[]}]},c=[];if(f.id||f.dir)f.id&&c.push({id:"advId",att:"id",type:"text",requiredContent:m?m+"[id]":null,label:k.id,setup:a,commit:l}),f.dir&&c.push({id:"advLangDir",att:"dir",type:"select",requiredContent:m?m+"[dir]":null,label:k.langDir,"default":"",style:"width:100%",items:[[k.notSet,""],[k.langDirLTR,"ltr"],[k.langDirRTL,"rtl"]],
836
- setup:a,commit:l}),h.elements[0].children.push({type:"hbox",widths:["50%","50%"],children:[].concat(c)});if(f.styles||f.classes)c=[],f.styles&&c.push({id:"advStyles",att:"style",type:"text",requiredContent:m?m+"{cke-xyz}":null,label:k.styles,"default":"",validate:CKEDITOR.dialog.validate.inlineStyle(k.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(),
837
- f=e.document.createElement("span");f.setAttribute("style",c);f.setStyle(a,b);c=CKEDITOR.tools.normalizeCssText(f.getAttribute("style"));this.setValue(c,1)},setup:a,commit:l}),f.classes&&c.push({type:"hbox",widths:["45%","55%"],children:[{id:"advCSSClasses",att:"class",type:"text",requiredContent:m?m+"(cke-xyz)":null,label:k.cssClasses,"default":"",setup:a,commit:l}]}),h.elements[0].children.push({type:"hbox",widths:["50%","50%"],children:[].concat(c)});return h}})})();(function(){function a(a,g){var e=
838
- {},f=[],m={nbsp:" ",shy:"­",gt:"\x3e",lt:"\x3c",amp:"\x26",apos:"'",quot:'"'};a=a.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(a,b){var c=g?"\x26"+b+";":m[b];e[c]=g?m[b]:"\x26"+b+";";f.push(c);return""});a=a.replace(/,$/,"");if(!g&&a){a=a.split(",");var k=document.createElement("div"),h;k.innerHTML="\x26"+a.join(";\x26")+";";h=k.innerHTML;k=null;for(k=0;k<h.length;k++){var c=h.charAt(k);e[c]="\x26"+a[k]+";";f.push(c)}}e.regex=f.join(g?"|":"");return e}CKEDITOR.plugins.add("entities",
839
- {afterInit:function(l){function g(a){return c[a]}function e(a){return"force"!=f.entities_processNumerical&&k[a]?k[a]:"\x26#"+a.charCodeAt(0)+";"}var f=l.config;if(l=(l=l.dataProcessor)&&l.htmlFilter){var m=[];!1!==f.basicEntities&&m.push("nbsp,gt,lt,amp");f.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"),
840
- f.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"),f.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"),
841
- f.entities_additional&&m.push(f.entities_additional));var k=a(m.join(",")),h=k.regex?"["+k.regex+"]":"a^";delete k.regex;f.entities&&f.entities_processNumerical&&(h="[^ -~]|"+h);var h=new RegExp(h,"g"),c=a("nbsp,gt,lt,amp,shy",!0),d=new RegExp(c.regex,"g");l.addRules({text:function(a){return a.replace(d,g).replace(h,e)}},{applyToAll:!0,excludeNestedEditable:!0})}}})})();CKEDITOR.config.basicEntities=!0;CKEDITOR.config.entities=!0;CKEDITOR.config.entities_latin=!0;CKEDITOR.config.entities_greek=!0;
842
- CKEDITOR.config.entities_additional="#39";(function(){function a(a){var f=a.config,m=a.fire("uiSpace",{space:"top",html:""}).html,k=function(){function b(a,d,e){c.setStyle(d,g(e));c.setStyle("position",a)}function d(a){var c=m.getDocumentPosition();switch(a){case "top":b("absolute","top",c.y-x-w);break;case "pin":b("fixed","top",D);break;case "bottom":b("absolute","top",c.y+(p.height||p.bottom-p.top)+w)}h=a}var h,m,r,p,y,x,z,B=f.floatSpaceDockedOffsetX||0,w=f.floatSpaceDockedOffsetY||0,v=f.floatSpacePinnedOffsetX||
843
- 0,D=f.floatSpacePinnedOffsetY||0;return function(b){if(m=a.editable()){var n=b&&"focus"==b.name;n&&c.show();a.fire("floatingSpaceLayout",{show:n});c.removeStyle("left");c.removeStyle("right");r=c.getClientRect();p=m.getClientRect();y=l.getViewPaneSize();x=r.height;z="pageXOffset"in l.$?l.$.pageXOffset:CKEDITOR.document.$.documentElement.scrollLeft;h?(x+w<=p.top?d("top"):x+w>y.height-p.bottom?d("pin"):d("bottom"),b=y.width/2,b=f.floatSpacePreferRight?"right":0<p.left&&p.right<y.width&&p.width>r.width?
844
- "rtl"==f.contentsLangDirection?"right":"left":b-p.left>p.right-b?"left":"right",r.width>y.width?(b="left",n=0):(n="left"==b?0<p.left?p.left:0:p.right<y.width?y.width-p.right:0,n+r.width>y.width&&(b="left"==b?"right":"left",n=0)),c.setStyle(b,g(("pin"==h?v:B)+n+("pin"==h?0:"left"==b?z:-z)))):(h="pin",d("pin"),k(b))}}}();if(m){var h=new CKEDITOR.template('\x3cdiv id\x3d"cke_{name}" class\x3d"cke {id} cke_reset_all cke_chrome cke_editor_{name} cke_float cke_{langDir} '+CKEDITOR.env.cssClass+'" dir\x3d"{langDir}" title\x3d"'+
830
+ m.editable?m.editable():"wysiwyg"==m.mode?m.document&&m.document.getBody():m.textarea;b&&b.hasClass("placeholder")&&(a.data.dataValue="")});m.on("setData",function(c){if(!(CKEDITOR.dialog._.currentTop||"source"==m.mode&&e)){var b=m.editable?m.editable():"wysiwyg"==m.mode?m.document&&m.document.getBody():m.textarea;b&&(a(c.data.dataValue)?l(c):b.hasClass("placeholder")&&b.removeClass("placeholder"))}});m.on("blur",l,null,k);m.on("mode",l,null,k);m.on("focus",g);m.on("beforeModeUnload",g)}(k=m.config.contentsLanguage||
831
+ f(m.element))&&!m.config.scayt_sLang&&(m.config.scayt_sLang={en:"en_US","en-us":"en_US","en-gb":"en_GB","pt-br":"pt_BR",da:"da_DK","da-dk":"da_DK","nl-nl":"nl_NL","en-ca":"en_CA","fi-fi":"fi_FI",fr:"fr_FR","fr-fr":"fr_FR","fr-ca":"fr_CA",de:"de_DE","de-de":"de_DE","el-gr":"el_GR",it:"it_IT","it-it":"it_IT","nb-no":"nb_NO",pt:"pt_PT","pt-pt":"pt_PT",es:"es_ES","es-es":"es_ES","sv-se":"sv_SE"}[k.toLowerCase()]);var c=function(a){if("object"==typeof a)return a;a=a.split(";");var b={},c;for(c=0;c<a.length;c++){var e=
832
+ a[c].split(":");if(3==e.length){var f=e[0],h=e[1],e=e[2];b[f]||(b[f]={});b[f][h]||(b[f][h]=[]);b[f][h].push(e)}}return b};CKEDITOR.on("dialogDefinition",function(a){if(m==a.editor){var b=a.data.name;a=a.data.definition;var e,f,h,k,g;"tableProperties"==b&&"table"==b;"removeDialogFields"in m._||!m.config.removeDialogFields||(m._.removeDialogFields=c(m.config.removeDialogFields));if(m._.removeDialogFields&&(e=m._.removeDialogFields[b]))for(h in e)for(k=e[h],g=a.getContents(h),f=0;f<k.length;f++)g.remove(k[f]);
833
+ "hideDialogFields"in m._||!m.config.hideDialogFields||(m._.hideDialogFields=c(m.config.hideDialogFields));if(m._.hideDialogFields&&(e=m._.hideDialogFields[b]))for(h in e)for(k=e[h],g=a.getContents(h),f=0;f<k.length;f++)g.get(k[f]).hidden=!0;if(m.config.dialogFieldsDefaultValues&&(e=m.config.dialogFieldsDefaultValues[b]))for(h in e){k=e[h];g=a.getContents(h);for(var l in k)(b=g.get(l))&&(b["default"]=k[l])}}})}})})();(function(){function a(a){var e=this.att;a=a&&a.hasAttribute(e)&&a.getAttribute(e)||
834
+ "";void 0!==a&&this.setValue(a)}function l(){for(var a,e=0;e<arguments.length;e++)if(arguments[e]instanceof CKEDITOR.dom.element){a=arguments[e];break}if(a){var e=this.att,g=this.getValue();g?a.setAttribute(e,g):a.removeAttribute(e,g)}}var g={id:1,dir:1,classes:1,styles:1};CKEDITOR.plugins.add("dialogadvtab",{requires:"dialog",allowedContent:function(a){a||(a=g);var e=[];a.id&&e.push("id");a.dir&&e.push("dir");var l="";e.length&&(l+="["+e.join(",")+"]");a.classes&&(l+="(*)");a.styles&&(l+="{*}");
835
+ return l},createAdvancedTab:function(f,e,m){e||(e=g);var k=f.lang.common,h={id:"advanced",label:k.advancedTab,title:k.advancedTab,elements:[{type:"vbox",padding:1,children:[]}]},c=[];if(e.id||e.dir)e.id&&c.push({id:"advId",att:"id",type:"text",requiredContent:m?m+"[id]":null,label:k.id,setup:a,commit:l}),e.dir&&c.push({id:"advLangDir",att:"dir",type:"select",requiredContent:m?m+"[dir]":null,label:k.langDir,"default":"",style:"width:100%",items:[[k.notSet,""],[k.langDirLTR,"ltr"],[k.langDirRTL,"rtl"]],
836
+ setup:a,commit:l}),h.elements[0].children.push({type:"hbox",widths:["50%","50%"],children:[].concat(c)});if(e.styles||e.classes)c=[],e.styles&&c.push({id:"advStyles",att:"style",type:"text",requiredContent:m?m+"{cke-xyz}":null,label:k.styles,"default":"",validate:CKEDITOR.dialog.validate.inlineStyle(k.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(),
837
+ e=f.document.createElement("span");e.setAttribute("style",c);e.setStyle(a,b);c=CKEDITOR.tools.normalizeCssText(e.getAttribute("style"));this.setValue(c,1)},setup:a,commit:l}),e.classes&&c.push({type:"hbox",widths:["45%","55%"],children:[{id:"advCSSClasses",att:"class",type:"text",requiredContent:m?m+"(cke-xyz)":null,label:k.cssClasses,"default":"",setup:a,commit:l}]}),h.elements[0].children.push({type:"hbox",widths:["50%","50%"],children:[].concat(c)});return h}})})();(function(){function a(a,g){var f=
838
+ {},e=[],m={nbsp:" ",shy:"­",gt:"\x3e",lt:"\x3c",amp:"\x26",apos:"'",quot:'"'};a=a.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(a,b){var c=g?"\x26"+b+";":m[b];f[c]=g?m[b]:"\x26"+b+";";e.push(c);return""});a=a.replace(/,$/,"");if(!g&&a){a=a.split(",");var k=document.createElement("div"),h;k.innerHTML="\x26"+a.join(";\x26")+";";h=k.innerHTML;k=null;for(k=0;k<h.length;k++){var c=h.charAt(k);f[c]="\x26"+a[k]+";";e.push(c)}}f.regex=e.join(g?"|":"");return f}CKEDITOR.plugins.add("entities",
839
+ {afterInit:function(l){function g(a){return c[a]}function f(a){return"force"!=e.entities_processNumerical&&k[a]?k[a]:"\x26#"+a.charCodeAt(0)+";"}var e=l.config;if(l=(l=l.dataProcessor)&&l.htmlFilter){var m=[];!1!==e.basicEntities&&m.push("nbsp,gt,lt,amp");e.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"),
840
+ e.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"),e.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"),
841
+ e.entities_additional&&m.push(e.entities_additional));var k=a(m.join(",")),h=k.regex?"["+k.regex+"]":"a^";delete k.regex;e.entities&&e.entities_processNumerical&&(h="[^ -~]|"+h);var h=new RegExp(h,"g"),c=a("nbsp,gt,lt,amp,shy",!0),d=new RegExp(c.regex,"g");l.addRules({text:function(a){return a.replace(d,g).replace(h,f)}},{applyToAll:!0,excludeNestedEditable:!0})}}})})();CKEDITOR.config.basicEntities=!0;CKEDITOR.config.entities=!0;CKEDITOR.config.entities_latin=!0;CKEDITOR.config.entities_greek=!0;
842
+ CKEDITOR.config.entities_additional="#39";(function(){function a(a){var e=a.config,m=a.fire("uiSpace",{space:"top",html:""}).html,k=function(){function b(a,d,e){c.setStyle(d,g(e));c.setStyle("position",a)}function d(a){var c=m.getDocumentPosition();switch(a){case "top":b("absolute","top",c.y-x-w);break;case "pin":b("fixed","top",D);break;case "bottom":b("absolute","top",c.y+(p.height||p.bottom-p.top)+w)}h=a}var h,m,r,p,y,x,z,B=e.floatSpaceDockedOffsetX||0,w=e.floatSpaceDockedOffsetY||0,v=e.floatSpacePinnedOffsetX||
843
+ 0,D=e.floatSpacePinnedOffsetY||0;return function(b){if(m=a.editable()){var n=b&&"focus"==b.name;n&&c.show();a.fire("floatingSpaceLayout",{show:n});c.removeStyle("left");c.removeStyle("right");r=c.getClientRect();p=m.getClientRect();y=l.getViewPaneSize();x=r.height;z="pageXOffset"in l.$?l.$.pageXOffset:CKEDITOR.document.$.documentElement.scrollLeft;h?(x+w<=p.top?d("top"):x+w>y.height-p.bottom?d("pin"):d("bottom"),b=y.width/2,b=e.floatSpacePreferRight?"right":0<p.left&&p.right<y.width&&p.width>r.width?
844
+ "rtl"==e.contentsLangDirection?"right":"left":b-p.left>p.right-b?"left":"right",r.width>y.width?(b="left",n=0):(n="left"==b?0<p.left?p.left:0:p.right<y.width?y.width-p.right:0,n+r.width>y.width&&(b="left"==b?"right":"left",n=0)),c.setStyle(b,g(("pin"==h?v:B)+n+("pin"==h?0:"left"==b?z:-z)))):(h="pin",d("pin"),k(b))}}}();if(m){var h=new CKEDITOR.template('\x3cdiv id\x3d"cke_{name}" class\x3d"cke {id} cke_reset_all cke_chrome cke_editor_{name} cke_float cke_{langDir} '+CKEDITOR.env.cssClass+'" dir\x3d"{langDir}" title\x3d"'+
845
845
  (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'),c=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(h.output({content:m,
846
- id:a.id,langDir:a.lang.dir,langCode:a.langCode,name:a.name,style:"display:none;z-index:"+(f.baseFloatZIndex-1),topId:a.ui.spaceId("top"),voiceLabel:a.title}))),d=CKEDITOR.tools.eventsBuffer(500,k),b=CKEDITOR.tools.eventsBuffer(100,k);c.unselectable();c.on("mousedown",function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()});a.on("focus",function(c){k(c);a.on("change",d.input);l.on("scroll",b.input);l.on("resize",b.input)});a.on("blur",function(){c.hide();a.removeListener("change",
847
- d.input);l.removeListener("scroll",b.input);l.removeListener("resize",b.input)});a.on("destroy",function(){l.removeListener("scroll",b.input);l.removeListener("resize",b.input);c.clearCustomData();c.remove()});a.focusManager.hasFocus&&c.show();a.focusManager.add(c,1)}}var l=CKEDITOR.document.getWindow(),g=CKEDITOR.tools.cssLength;CKEDITOR.plugins.add("floatingspace",{init:function(e){e.on("loaded",function(){a(this)},null,null,20)}})})();CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var a=
846
+ id:a.id,langDir:a.lang.dir,langCode:a.langCode,name:a.name,style:"display:none;z-index:"+(e.baseFloatZIndex-1),topId:a.ui.spaceId("top"),voiceLabel:a.title}))),d=CKEDITOR.tools.eventsBuffer(500,k),b=CKEDITOR.tools.eventsBuffer(100,k);c.unselectable();c.on("mousedown",function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()});a.on("focus",function(c){k(c);a.on("change",d.input);l.on("scroll",b.input);l.on("resize",b.input)});a.on("blur",function(){c.hide();a.removeListener("change",
847
+ d.input);l.removeListener("scroll",b.input);l.removeListener("resize",b.input)});a.on("destroy",function(){l.removeListener("scroll",b.input);l.removeListener("resize",b.input);c.clearCustomData();c.remove()});a.focusManager.hasFocus&&c.show();a.focusManager.add(c,1)}}var l=CKEDITOR.document.getWindow(),g=CKEDITOR.tools.cssLength;CKEDITOR.plugins.add("floatingspace",{init:function(f){f.on("loaded",function(){a(this)},null,null,20)}})})();CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var a=
848
848
  CKEDITOR.addTemplate("panel-list",'\x3cul role\x3d"presentation" class\x3d"cke_panel_list"\x3e{items}\x3c/ul\x3e'),l=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"{onclick}CKEDITOR.tools.callFunction({clickFn},\'{val}\'); return false;" role\x3d"option"\x3e{text}\x3c/a\x3e\x3c/li\x3e'),
849
- g=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,e){return this.addBlock(a,new CKEDITOR.ui.listBlock(this.getHolderElement(),e))};CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(a,e){e=e||{};var g=e.attributes||(e.attributes={});(this.multiSelect=!!e.multiSelect)&&
850
- (g["aria-multiselectable"]=!0);!g.role&&(g.role="listbox");this.base.apply(this,arguments);this.element.setAttribute("role",g.role);g=this.keys;g[40]="next";g[9]="next";g[38]="prev";g[CKEDITOR.SHIFT+9]="prev";g[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(g[13]="mouseup");this._.pendingHtml=[];this._.pendingList=[];this._.items={};this._.groups={}},_:{close:function(){if(this._.started){var e=a.output({items:this._.pendingList.join("")});this._.pendingList=[];this._.pendingHtml.push(e);
851
- delete this._.started}},getClick:function(){this._.click||(this._.click=CKEDITOR.tools.addFunction(function(a){var e=this.toggle(a);if(this.onClick)this.onClick(a,e)},this));return this._.click}},proto:{add:function(a,g,k){var h=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0);this._.items[a]=h;var c;c=CKEDITOR.tools.htmlEncodeAttr(a).replace(e,"\\'");a={id:h,val:c,onclick:CKEDITOR.env.ie?'return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26':
852
- "",clickFn:this._.getClick(),title:CKEDITOR.tools.htmlEncodeAttr(k||a),text:g||a};this._.pendingList.push(l.output(a))},startGroup:function(a){this._.close();var e=CKEDITOR.tools.getNextId();this._.groups[a]=e;this._.pendingHtml.push(g.output({id:e,label:a}))},commit:function(){this._.close();this.element.appendHtml(this._.pendingHtml.join(""));delete this._.size;this._.pendingHtml=[]},toggle:function(a){var e=this.isMarked(a);e?this.unmark(a):this.mark(a);return!e},hideGroup:function(a){var e=(a=
853
- this.element.getDocument().getById(this._.groups[a]))&&a.getNext();a&&(a.setStyle("display","none"),e&&"ul"==e.getName()&&e.setStyle("display","none"))},hideItem:function(a){this.element.getDocument().getById(this._.items[a]).setStyle("display","none")},showAll:function(){var a=this._.items,e=this._.groups,g=this.element.getDocument(),h;for(h in a)g.getById(a[h]).setStyle("display","");for(var c in e)a=g.getById(e[c]),h=a.getNext(),a.setStyle("display",""),h&&"ul"==h.getName()&&h.setStyle("display",
854
- "")},mark:function(a){this.multiSelect||this.unmarkAll();a=this._.items[a];var e=this.element.getDocument().getById(a);e.addClass("cke_selected");this.element.getDocument().getById(a+"_option").setAttribute("aria-selected",!0);this.onMark&&this.onMark(e)},markFirstDisplayed:function(){var a=this;this._.markFirstDisplayed(function(){a.multiSelect||a.unmarkAll()})},unmark:function(a){var e=this.element.getDocument();a=this._.items[a];var g=e.getById(a);g.removeClass("cke_selected");e.getById(a+"_option").removeAttribute("aria-selected");
855
- this.onUnmark&&this.onUnmark(g)},unmarkAll:function(){var a=this._.items,e=this.element.getDocument(),g;for(g in a){var h=a[g];e.getById(h).removeClass("cke_selected");e.getById(h+"_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 e=this.element.getElementsByTag("a"),g,h=-1;if(a)for(g=this.element.getDocument().getById(this._.items[a]).getFirst();a=
856
- e.getItem(++h);){if(a.equals(g)){this._.focusIndex=h;break}}else this.element.focus();g&&setTimeout(function(){g.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"'+
849
+ g=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'),f=/\'/g;CKEDITOR.ui.panel.prototype.addListBlock=function(a,f){return this.addBlock(a,new CKEDITOR.ui.listBlock(this.getHolderElement(),f))};CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(a,f){f=f||{};var k=f.attributes||(f.attributes={});(this.multiSelect=!!f.multiSelect)&&
850
+ (k["aria-multiselectable"]=!0);!k.role&&(k.role="listbox");this.base.apply(this,arguments);this.element.setAttribute("role",k.role);k=this.keys;k[40]="next";k[9]="next";k[38]="prev";k[CKEDITOR.SHIFT+9]="prev";k[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(k[13]="mouseup");this._.pendingHtml=[];this._.pendingList=[];this._.items={};this._.groups={}},_:{close:function(){if(this._.started){var e=a.output({items:this._.pendingList.join("")});this._.pendingList=[];this._.pendingHtml.push(e);
851
+ delete this._.started}},getClick:function(){this._.click||(this._.click=CKEDITOR.tools.addFunction(function(a){var f=this.toggle(a);if(this.onClick)this.onClick(a,f)},this));return this._.click}},proto:{add:function(a,g,k){var h=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0);this._.items[a]=h;var c;c=CKEDITOR.tools.htmlEncodeAttr(a).replace(f,"\\'");a={id:h,val:c,onclick:CKEDITOR.env.ie?'return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26':
852
+ "",clickFn:this._.getClick(),title:CKEDITOR.tools.htmlEncodeAttr(k||a),text:g||a};this._.pendingList.push(l.output(a))},startGroup:function(a){this._.close();var f=CKEDITOR.tools.getNextId();this._.groups[a]=f;this._.pendingHtml.push(g.output({id:f,label:a}))},commit:function(){this._.close();this.element.appendHtml(this._.pendingHtml.join(""));delete this._.size;this._.pendingHtml=[]},toggle:function(a){var f=this.isMarked(a);f?this.unmark(a):this.mark(a);return!f},hideGroup:function(a){var f=(a=
853
+ this.element.getDocument().getById(this._.groups[a]))&&a.getNext();a&&(a.setStyle("display","none"),f&&"ul"==f.getName()&&f.setStyle("display","none"))},hideItem:function(a){this.element.getDocument().getById(this._.items[a]).setStyle("display","none")},showAll:function(){var a=this._.items,f=this._.groups,g=this.element.getDocument(),h;for(h in a)g.getById(a[h]).setStyle("display","");for(var c in f)a=g.getById(f[c]),h=a.getNext(),a.setStyle("display",""),h&&"ul"==h.getName()&&h.setStyle("display",
854
+ "")},mark:function(a){this.multiSelect||this.unmarkAll();a=this._.items[a];var f=this.element.getDocument().getById(a);f.addClass("cke_selected");this.element.getDocument().getById(a+"_option").setAttribute("aria-selected",!0);this.onMark&&this.onMark(f)},markFirstDisplayed:function(){var a=this;this._.markFirstDisplayed(function(){a.multiSelect||a.unmarkAll()})},unmark:function(a){var f=this.element.getDocument();a=this._.items[a];var g=f.getById(a);g.removeClass("cke_selected");f.getById(a+"_option").removeAttribute("aria-selected");
855
+ this.onUnmark&&this.onUnmark(g)},unmarkAll:function(){var a=this._.items,f=this.element.getDocument(),g;for(g in a){var h=a[g];f.getById(h).removeClass("cke_selected");f.getById(h+"_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 f=this.element.getElementsByTag("a"),g,h=-1;if(a)for(g=this.element.getDocument().getById(this._.items[a]).getFirst();a=
856
+ f.getItem(++h);){if(a.equals(g)){this._.focusIndex=h;break}}else this.element.focus();g&&setTimeout(function(){g.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"'+
857
857
  (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"',l="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(a+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(a+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');CKEDITOR.env.ie&&(l='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var a=a+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event,this);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" onclick\x3d"'+
858
858
  l+'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=CKEDITOR.tools.createClass({$:function(a){CKEDITOR.tools.extend(this,
859
- 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 f=[];this.render(a,f);return f.join("")},render:function(a,f){function l(){if(this.getState()!=CKEDITOR.TRISTATE_ON){var b=
859
+ 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("")},render:function(a,e){function l(){if(this.getState()!=CKEDITOR.TRISTATE_ON){var b=
860
860
  this.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;a.readOnly&&!this.readOnly&&(b=CKEDITOR.TRISTATE_DISABLED);this.setState(b);this.setValue("");b!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}}var k=CKEDITOR.env,h,c,d="cke_"+this.id,b=CKEDITOR.tools.addFunction(function(b){c&&(a.unlockSelection(1),c=0);h.execute(b)},this),n=this;h={id:d,combo:this,focus:function(){CKEDITOR.document.getById(d).getChild(1).focus()},execute:function(b){var c=n._;if(c.state!=CKEDITOR.TRISTATE_DISABLED)if(n.createPanel(a),
861
861
  c.on)c.panel.hide();else{n.commit();var d=n.getValue();d?c.list.mark(d):c.list.unmarkAll();c.panel.showBlock(n.id,new CKEDITOR.dom.element(b),4)}},clickFn:b};this._.listeners.push(a.on("activeFilterChange",l,this));this._.listeners.push(a.on("mode",l,this));this._.listeners.push(a.on("selectionChange",l,this));!this.readOnly&&this._.listeners.push(a.on("readOnly",l,this));var q=CKEDITOR.tools.addFunction(function(a,c){a=new CKEDITOR.dom.event(a);var d=a.getKeystroke();switch(d){case 13:case 32:case 40:CKEDITOR.tools.callFunction(b,
862
- c);break;default:h.onkey(h,d)}a.preventDefault()}),u=CKEDITOR.tools.addFunction(function(){h.onfocus&&h.onfocus()});c=0;h.keyDownFn=q;k={id:d,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:k.gecko&&!k.hc?"":(this.title||"").replace("'",""),keydownFn:q,focusFn:u,clickFn:b};g.output(k,f);if(this.onRender)this.onRender();return h},createPanel:function(a){if(!this._.panel){var f=this._.panelDefinition,g=this._.panelDefinition.block,k=f.parent||CKEDITOR.document.getBody(),
863
- h="cke_combopanel__"+this.name,c=new CKEDITOR.ui.floatPanel(a,k,f),f=c.addListBlock(this.id,g),d=this;c.onShow=function(){this.element.addClass(h);d.setState(CKEDITOR.TRISTATE_ON);d._.on=1;d.editorFocus&&!a.focusManager.hasFocus&&a.focus();if(d.onOpen)d.onOpen()};c.onHide=function(b){this.element.removeClass(h);d.setState(d.modes&&d.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);d._.on=0;if(!b&&d.onClose)d.onClose()};c.onEscape=function(){c.hide(1)};f.onClick=function(a,e){d.onClick&&
864
- d.onClick.call(d,a,e);c.hide()};this._.panel=c;this._.list=f;c.getBlock(this.id).onHide=function(){d._.on=0;d.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(a,f){this._.value=a;var g=this.document.getById("cke_"+this.id+"_text");g&&(a||f?g.removeClass("cke_combo_inlinelabel"):(f=this.label,g.addClass("cke_combo_inlinelabel")),g.setText("undefined"!=typeof f?f:a))},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(a){this._.list.mark(a)},
865
- hideItem:function(a){this._.list.hideItem(a)},hideGroup:function(a){this._.list.hideGroup(a)},showAll:function(){this._.list.showAll()},add:function(a,f,g){this._.items[a]=g||a;this._.list.add(a,f,g)},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!=a){var f=this.document.getById("cke_"+this.id);f.setState(a,"cke_combo");a==CKEDITOR.TRISTATE_DISABLED?
866
- f.setAttribute("aria-disabled",!0):f.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,function(a){a.removeListener()});this._.listeners=[]},select:function(a){if(!CKEDITOR.tools.isEmpty(this._.items))for(var f in this._.items)if(a({value:f,
867
- text:this._.items[f]})){this.setValue(f);break}}},statics:{handler:{create:function(a){return new CKEDITOR.ui.richCombo(a)}}}});CKEDITOR.ui.prototype.addRichCombo=function(a,f){this.add(a,CKEDITOR.UI_RICHCOMBO,f)}})();(function(){function a(a,g){var k=a.config,h=g.lang,c=new CKEDITOR.style(g.styleDefinition),d=new e({entries:g.entries,styleVariable:g.styleVariable,styleDefinition:g.styleDefinition}),b;a.addCommand(g.commandName,{exec:function(a,b){var c=b.newStyle,d=b.oldStyle,e=a.getSelection().getRanges()[0],
862
+ c);break;default:h.onkey(h,d)}a.preventDefault()}),u=CKEDITOR.tools.addFunction(function(){h.onfocus&&h.onfocus()});c=0;h.keyDownFn=q;k={id:d,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:k.gecko&&!k.hc?"":(this.title||"").replace("'",""),keydownFn:q,focusFn:u,clickFn:b};g.output(k,e);if(this.onRender)this.onRender();return h},createPanel:function(a){if(!this._.panel){var e=this._.panelDefinition,g=this._.panelDefinition.block,k=e.parent||CKEDITOR.document.getBody(),
863
+ h="cke_combopanel__"+this.name,c=new CKEDITOR.ui.floatPanel(a,k,e),e=c.addListBlock(this.id,g),d=this;c.onShow=function(){this.element.addClass(h);d.setState(CKEDITOR.TRISTATE_ON);d._.on=1;d.editorFocus&&!a.focusManager.hasFocus&&a.focus();if(d.onOpen)d.onOpen()};c.onHide=function(b){this.element.removeClass(h);d.setState(d.modes&&d.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);d._.on=0;if(!b&&d.onClose)d.onClose()};c.onEscape=function(){c.hide(1)};e.onClick=function(a,e){d.onClick&&
864
+ d.onClick.call(d,a,e);c.hide()};this._.panel=c;this._.list=e;c.getBlock(this.id).onHide=function(){d._.on=0;d.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(a,e){this._.value=a;var g=this.document.getById("cke_"+this.id+"_text");g&&(a||e?g.removeClass("cke_combo_inlinelabel"):(e=this.label,g.addClass("cke_combo_inlinelabel")),g.setText("undefined"!=typeof e?e:a))},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(a){this._.list.mark(a)},
865
+ hideItem:function(a){this._.list.hideItem(a)},hideGroup:function(a){this._.list.hideGroup(a)},showAll:function(){this._.list.showAll()},add:function(a,e,g){this._.items[a]=g||a;this._.list.add(a,e,g)},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!=a){var e=this.document.getById("cke_"+this.id);e.setState(a,"cke_combo");a==CKEDITOR.TRISTATE_DISABLED?
866
+ 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,function(a){a.removeListener()});this._.listeners=[]},select:function(a){if(!CKEDITOR.tools.isEmpty(this._.items))for(var e in this._.items)if(a({value:e,
867
+ text:this._.items[e]})){this.setValue(e);break}}},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,g){var k=a.config,h=g.lang,c=new CKEDITOR.style(g.styleDefinition),d=new f({entries:g.entries,styleVariable:g.styleVariable,styleDefinition:g.styleDefinition}),b;a.addCommand(g.commandName,{exec:function(a,b){var c=b.newStyle,d=b.oldStyle,e=a.getSelection().getRanges()[0],
868
868
  f=void 0===c;if(d||c)if(d&&e.collapsed&&l({editor:a,range:e,style:d}),f)a.removeStyle(d);else{if(e=d)e=d instanceof CKEDITOR.style&&c instanceof CKEDITOR.style?CKEDITOR.style.getStyleText(d.getDefinition())===CKEDITOR.style.getStyleText(c.getDefinition()):!1,e=!e;e&&a.removeStyle(d);a.applyStyle(c)}},refresh:function(a,b){c.checkApplicable(b,a,a.activeFilter)||this.setState(CKEDITOR.TRISTATE_DISABLED)}});b=a.getCommand(g.commandName);a.ui.addRichCombo(g.comboName,{label:h.label,title:h.panelTitle,
869
869
  command:g.commandName,toolbar:"styles,"+g.order,defaultValue:"cke-default",allowedContent:c,requiredContent:c,contentTransformations:"span"===g.styleDefinition.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"]=
870
870
  a.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(k.contentsCss),multiSelect:!1,attributes:{"aria-label":h.panelTitle}},init:function(){var b="("+a.lang.common.optionDefault+")";this.startGroup(h.panelTitle);this.add(this.defaultValue,b,b);d.addToCombo(this)},onClick:function(b){var c=this.getValue();a.focus();a.fire("saveSnapshot");a.execCommand(g.commandName,
871
- {newStyle:d.getStyle(b),oldStyle:d.getStyle(c)});a.fire("saveSnapshot")},onRender:function(){a.on("selectionChange",function(b){var c=this.getValue();(b=d.getMatchingValue(a,b.data.path))?b!=c&&this.setValue(b):this.setValue("",g.defaultLabel)},this);b.on("state",function(){this.setState(b.state)},this)},refresh:function(){this.setState(b.state)}})}function l(a){var e=a.editor,k=a.range,h=a.style,c,d,b;c=e.elementPath();if(a=c.contains(function(a){return h.checkElementRemovable(a)})){d=k.checkBoundaryOfElement(a,
872
- CKEDITOR.START);b=k.checkBoundaryOfElement(a,CKEDITOR.END);if(d&&b){for(d=k.createBookmark();c=a.getFirst();)c.insertBefore(a);a.remove();k.moveToBookmark(d)}else d||b?k.moveToPosition(a,d?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_END):(k.splitElement(a),k.moveToPosition(a,CKEDITOR.POSITION_AFTER_END)),g(k,c.elements.slice(),a);e.getSelection().selectRanges([k])}}function g(a,e,k){var h=e.pop();if(h){if(k)return g(a,e,h.equals(k)?null:k);k=h.clone();a.insertNode(k);a.moveToPosition(k,
873
- CKEDITOR.POSITION_AFTER_START);g(a,e)}}var e=CKEDITOR.tools.createClass({$:function(a){var e=a.entries.split(";");this._.data={};this._.names=[];for(var g=0;g<e.length;g++){var h=e[g],c,d;h?(h=h.split("/"),c=h[0],h=h[1],d={},d[a.styleVariable]=h||c,this._.data[c]=new CKEDITOR.style(a.styleDefinition,d),this._.data[c]._.definition.name=c,this._.names.push(c)):(e.splice(g,1),g--)}},proto:{getStyle:function(a){return this._.data[a]},addToCombo:function(a){for(var e=0;e<this._.names.length;e++){var g=
874
- this._.names[e];a.add(g,this.getStyle(g).buildPreview(),g)}},getMatchingValue:function(a,e){for(var g=e.elements,h=0,c;h<g.length;h++)if(c=g[h],c=this._.findMatchingStyleName(a,c))return c;return null}},_:{findMatchingStyleName:function(a,e){return CKEDITOR.tools.array.find(this._.names,function(g){return this.getStyle(g).checkElementMatch(e,!0,a)},this)}}});CKEDITOR.plugins.add("font",{requires:"richcombo",init:function(e){var g=e.config;a(e,{comboName:"Font",commandName:"font",styleVariable:"family",
875
- lang:e.lang.font,entries:g.font_names,defaultLabel:g.font_defaultLabel,styleDefinition:g.font_style,order:30});a(e,{comboName:"FontSize",commandName:"fontSize",styleVariable:"size",lang:e.lang.font.fontSize,entries:g.fontSize_sizes,defaultLabel:g.fontSize_defaultLabel,styleDefinition:g.fontSize_style,order: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";
871
+ {newStyle:d.getStyle(b),oldStyle:d.getStyle(c)});a.fire("saveSnapshot")},onRender:function(){a.on("selectionChange",function(b){var c=this.getValue();(b=d.getMatchingValue(a,b.data.path))?b!=c&&this.setValue(b):this.setValue("",g.defaultLabel)},this);b.on("state",function(){this.setState(b.state)},this)},refresh:function(){this.setState(b.state)}})}function l(a){var f=a.editor,k=a.range,h=a.style,c,d,b;c=f.elementPath();if(a=c.contains(function(a){return h.checkElementRemovable(a)})){d=k.checkBoundaryOfElement(a,
872
+ CKEDITOR.START);b=k.checkBoundaryOfElement(a,CKEDITOR.END);if(d&&b){for(d=k.createBookmark();c=a.getFirst();)c.insertBefore(a);a.remove();k.moveToBookmark(d)}else d||b?k.moveToPosition(a,d?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_END):(k.splitElement(a),k.moveToPosition(a,CKEDITOR.POSITION_AFTER_END)),g(k,c.elements.slice(),a);f.getSelection().selectRanges([k])}}function g(a,f,k){var h=f.pop();if(h){if(k)return g(a,f,h.equals(k)?null:k);k=h.clone();a.insertNode(k);a.moveToPosition(k,
873
+ CKEDITOR.POSITION_AFTER_START);g(a,f)}}var f=CKEDITOR.tools.createClass({$:function(a){var f=a.entries.split(";");this._.data={};this._.names=[];for(var g=0;g<f.length;g++){var h=f[g],c,d;h?(h=h.split("/"),c=h[0],h=h[1],d={},d[a.styleVariable]=h||c,this._.data[c]=new CKEDITOR.style(a.styleDefinition,d),this._.data[c]._.definition.name=c,this._.names.push(c)):(f.splice(g,1),g--)}},proto:{getStyle:function(a){return this._.data[a]},addToCombo:function(a){for(var f=0;f<this._.names.length;f++){var g=
874
+ this._.names[f];a.add(g,this.getStyle(g).buildPreview(),g)}},getMatchingValue:function(a,f){for(var g=f.elements,h=0,c;h<g.length;h++)if(c=g[h],c=this._.findMatchingStyleName(a,c))return c;return null}},_:{findMatchingStyleName:function(a,f){return CKEDITOR.tools.array.find(this._.names,function(g){return this.getStyle(g).checkElementMatch(f,!0,a)},this)}}});CKEDITOR.plugins.add("font",{requires:"richcombo",init:function(e){var f=e.config;a(e,{comboName:"Font",commandName:"font",styleVariable:"family",
875
+ lang:e.lang.font,entries:f.font_names,defaultLabel:f.font_defaultLabel,styleDefinition:f.font_style,order:30});a(e,{comboName:"FontSize",commandName:"fontSize",styleVariable:"size",lang:e.lang.font.fontSize,entries:f.fontSize_sizes,defaultLabel:f.fontSize_defaultLabel,styleDefinition:f.fontSize_style,order: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";
876
876
  CKEDITOR.config.font_defaultLabel="";CKEDITOR.config.font_style={element:"span",styles:{"font-family":"#(family)"},overrides:[{element:"font",attributes:{face:null}}]};CKEDITOR.config.fontSize_sizes="8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px";CKEDITOR.config.fontSize_defaultLabel="";CKEDITOR.config.fontSize_style={element:"span",styles:{"font-size":"#(size)"},overrides:[{element:"font",attributes:{size:null}}]};CKEDITOR.plugins.add("format",
877
- {requires:"richcombo",init:function(a){if(!a.blockless){for(var l=a.config,g=a.lang.format,e=l.format_tags.split(";"),f={},m=0,k=[],h=0;h<e.length;h++){var c=e[h],d=new CKEDITOR.style(l["format_"+c]);if(!a.filter.customConfig||a.filter.check(d))m++,f[c]=d,f[c]._.enterMode=a.config.enterMode,k.push(d)}0!==m&&a.ui.addRichCombo("Format",{label:g.label,title:g.panelTitle,toolbar:"styles,20",allowedContent:k,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(l.contentsCss),multiSelect:!1,attributes:{"aria-label":g.panelTitle}},
878
- init:function(){this.startGroup(g.panelTitle);for(var a in f){var c=g["tag_"+a];this.add(a,f[a].buildPreview(c),c)}},onClick:function(b){a.focus();a.fire("saveSnapshot");b=f[b];var c=a.elementPath();b.checkActive(c,a)||a.applyStyle(b);setTimeout(function(){a.fire("saveSnapshot")},0)},onRender:function(){a.on("selectionChange",function(b){var c=this.getValue();b=b.data.path;this.refresh();for(var d in f)if(f[d].checkActive(b,a)){d!=c&&this.setValue(d,a.lang.format["tag_"+d]);return}this.setValue("")},
879
- this)},onOpen:function(){this.showAll();for(var b in f)a.activeFilter.check(f[b])||this.hideItem(b)},refresh:function(){var b=a.elementPath();if(b){if(b.isContextFor("p"))for(var c in f)if(a.activeFilter.check(f[c]))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"};
877
+ {requires:"richcombo",init:function(a){if(!a.blockless){for(var l=a.config,g=a.lang.format,f=l.format_tags.split(";"),e={},m=0,k=[],h=0;h<f.length;h++){var c=f[h],d=new CKEDITOR.style(l["format_"+c]);if(!a.filter.customConfig||a.filter.check(d))m++,e[c]=d,e[c]._.enterMode=a.config.enterMode,k.push(d)}0!==m&&a.ui.addRichCombo("Format",{label:g.label,title:g.panelTitle,toolbar:"styles,20",allowedContent:k,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(l.contentsCss),multiSelect:!1,attributes:{"aria-label":g.panelTitle}},
878
+ init:function(){this.startGroup(g.panelTitle);for(var a in e){var c=g["tag_"+a];this.add(a,e[a].buildPreview(c),c)}},onClick:function(b){a.focus();a.fire("saveSnapshot");b=e[b];var c=a.elementPath();b.checkActive(c,a)||a.applyStyle(b);setTimeout(function(){a.fire("saveSnapshot")},0)},onRender:function(){a.on("selectionChange",function(b){var c=this.getValue();b=b.data.path;this.refresh();for(var d in e)if(e[d].checkActive(b,a)){d!=c&&this.setValue(d,a.lang.format["tag_"+d]);return}this.setValue("")},
879
+ this)},onOpen:function(){this.showAll();for(var b in e)a.activeFilter.check(e[b])||this.hideItem(b)},refresh:function(){var b=a.elementPath();if(b){if(b.isContextFor("p"))for(var c in e)if(a.activeFilter.check(e[c]))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"};
880
880
  CKEDITOR.config.format_h1={element:"h1"};CKEDITOR.config.format_h2={element:"h2"};CKEDITOR.config.format_h3={element:"h3"};CKEDITOR.config.format_h4={element:"h4"};CKEDITOR.config.format_h5={element:"h5"};CKEDITOR.config.format_h6={element:"h6"};CKEDITOR.plugins.add("htmlwriter",{init:function(a){var l=new CKEDITOR.htmlWriter;l.forceSimpleAmpersand=a.config.forceSimpleAmpersand;l.indentationChars=a.config.dataIndentationChars||"\t";a.dataProcessor.writer=l}});CKEDITOR.htmlWriter=CKEDITOR.tools.createClass({base:CKEDITOR.htmlParser.basicWriter,
881
881
  $:function(){this.base();this.indentationChars="\t";this.selfClosingEnd=" /\x3e";this.lineBreakChars="\n";this.sortAttributes=1;this._.indent=0;this._.indentation="";this._.inPre=0;this._.rules={};var a=CKEDITOR.dtd,l;for(l in CKEDITOR.tools.extend({},a.$nonBodyContent,a.$block,a.$listItem,a.$tableContent))this.setRules(l,{indent:!a[l]["#"],breakBeforeOpen:1,breakBeforeClose:!a[l]["#"],breakAfterClose:1,needsSpace:l in a.$block&&!(l in{li:1,dt:1,dd:1})});this.setRules("br",{breakAfterOpen:1});this.setRules("title",
882
882
  {indent:0,breakAfterOpen:0});this.setRules("style",{indent:0,breakBeforeClose:1});this.setRules("pre",{breakAfterOpen:1,indent:0})},proto:{openTag:function(a){var l=this._.rules[a];this._.afterCloser&&l&&l.needsSpace&&this._.needsSpace&&this._.output.push("\n");this._.indent?this.indentation():l&&l.breakBeforeOpen&&(this.lineBreak(),this.indentation());this._.output.push("\x3c",a);this._.afterCloser=0},openTagClose:function(a,l){var g=this._.rules[a];l?(this._.output.push(this.selfClosingEnd),g&&
883
883
  g.breakAfterClose&&(this._.needsSpace=g.needsSpace)):(this._.output.push("\x3e"),g&&g.indent&&(this._.indentation+=this.indentationChars));g&&g.breakAfterOpen&&this.lineBreak();"pre"==a&&(this._.inPre=1)},attribute:function(a,l){"string"==typeof l&&(l=CKEDITOR.tools.htmlEncodeAttr(l),this.forceSimpleAmpersand&&(l=l.replace(/&amp;/g,"\x26")));this._.output.push(" ",a,'\x3d"',l,'"')},closeTag:function(a){var l=this._.rules[a];l&&l.indent&&(this._.indentation=this._.indentation.substr(this.indentationChars.length));
884
884
  this._.indent?this.indentation():l&&l.breakBeforeClose&&(this.lineBreak(),this.indentation());this._.output.push("\x3c/",a,"\x3e");"pre"==a&&(this._.inPre=0);l&&l.breakAfterClose&&(this.lineBreak(),this._.needsSpace=l.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&&
885
- 0<this._.output.length&&this._.output.push(this.lineBreakChars);this._.indent=1},indentation:function(){!this._.inPre&&this._.indentation&&this._.output.push(this._.indentation);this._.indent=0},reset:function(){this._.output=[];this._.indent=0;this._.indentation="";this._.afterCloser=0;this._.inPre=0;this._.needsSpace=0},setRules:function(a,l){var g=this._.rules[a];g?CKEDITOR.tools.extend(g,l,!0):this._.rules[a]=l}}});(function(){function a(a,f){var m,k;f.on("refresh",function(a){var c=[l],d;for(d in a.data.states)c.push(a.data.states[d]);
886
- this.setState(CKEDITOR.tools.search(c,g)?g:l)},f,null,100);f.on("exec",function(f){m=a.getSelection();k=m.createBookmarks(1);f.data||(f.data={});f.data.done=!1},f,null,0);f.on("exec",function(){a.forceNextSelectionCheck();m.selectBookmarks(k)},f,null,100)}var l=CKEDITOR.TRISTATE_DISABLED,g=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indent",{init:function(e){var f=CKEDITOR.plugins.indent.genericDefinition;a(e,e.addCommand("indent",new f(!0)));a(e,e.addCommand("outdent",new f));e.ui.addButton&&(e.ui.addButton("Indent",
887
- {label:e.lang.indent.indent,command:"indent",directional:!0,toolbar:"indent,20"}),e.ui.addButton("Outdent",{label:e.lang.indent.outdent,command:"outdent",directional:!0,toolbar:"indent,10"}));e.on("dirChanged",function(a){var f=e.createRange(),h=a.data.node;f.setStartBefore(h);f.setEndAfter(h);for(var c=new CKEDITOR.dom.walker(f),d;d=c.next();)if(d.type==CKEDITOR.NODE_ELEMENT)if(!d.equals(h)&&d.getDirection())f.setStartAfter(d),c=new CKEDITOR.dom.walker(f);else{var b=e.config.indentClasses;if(b)for(var g=
888
- "ltr"==a.data.dir?["_rtl",""]:["","_rtl"],l=0;l<b.length;l++)d.hasClass(b[l]+g[0])&&(d.removeClass(b[l]+g[0]),d.addClass(b[l]+g[1]));b=d.getStyle("margin-right");g=d.getStyle("margin-left");b?d.setStyle("margin-left",b):d.removeStyle("margin-left");g?d.setStyle("margin-right",g):d.removeStyle("margin-right")}})}});CKEDITOR.plugins.indent={genericDefinition:function(a){this.isIndent=!!a;this.startDisabled=!this.isIndent},specificDefinition:function(a,f,g){this.name=f;this.editor=a;this.jobs={};this.enterBr=
889
- a.config.enterMode==CKEDITOR.ENTER_BR;this.isIndent=!!g;this.relatedGlobal=g?"indent":"outdent";this.indentKey=g?9:CKEDITOR.SHIFT+9;this.database={}},registerCommands:function(a,f){a.on("pluginsLoaded",function(){for(var a in f)(function(a,e){var c=a.getCommand(e.relatedGlobal),d;for(d in e.jobs)c.on("exec",function(b){b.data.done||(a.fire("lockSnapshot"),e.execJob(a,d)&&(b.data.done=!0),a.fire("unlockSnapshot"),CKEDITOR.dom.element.clearAllMarkers(e.database))},this,null,d),c.on("refresh",function(b){b.data.states||
890
- (b.data.states={});b.data.states[e.name+"@"+d]=e.refreshJob(a,d,b.data.path)},this,null,d);a.addFeature(e)})(this,f[a])})}};CKEDITOR.plugins.indent.genericDefinition.prototype={context:"p",exec:function(){}};CKEDITOR.plugins.indent.specificDefinition.prototype={execJob:function(a,f){var g=this.jobs[f];if(g.state!=l)return g.exec.call(this,a)},refreshJob:function(a,f,g){f=this.jobs[f];a.activeFilter.checkFeature(this)?f.state=f.refresh.call(this,a,g):f.state=l;return f.state},getContext:function(a){return a.contains(this.context)}}})();
885
+ 0<this._.output.length&&this._.output.push(this.lineBreakChars);this._.indent=1},indentation:function(){!this._.inPre&&this._.indentation&&this._.output.push(this._.indentation);this._.indent=0},reset:function(){this._.output=[];this._.indent=0;this._.indentation="";this._.afterCloser=0;this._.inPre=0;this._.needsSpace=0},setRules:function(a,l){var g=this._.rules[a];g?CKEDITOR.tools.extend(g,l,!0):this._.rules[a]=l}}});(function(){function a(a,e){var m,k;e.on("refresh",function(a){var c=[l],d;for(d in a.data.states)c.push(a.data.states[d]);
886
+ this.setState(CKEDITOR.tools.search(c,g)?g:l)},e,null,100);e.on("exec",function(e){m=a.getSelection();k=m.createBookmarks(1);e.data||(e.data={});e.data.done=!1},e,null,0);e.on("exec",function(){a.forceNextSelectionCheck();m.selectBookmarks(k)},e,null,100)}var l=CKEDITOR.TRISTATE_DISABLED,g=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indent",{init:function(f){var e=CKEDITOR.plugins.indent.genericDefinition;a(f,f.addCommand("indent",new e(!0)));a(f,f.addCommand("outdent",new e));f.ui.addButton&&(f.ui.addButton("Indent",
887
+ {label:f.lang.indent.indent,command:"indent",directional:!0,toolbar:"indent,20"}),f.ui.addButton("Outdent",{label:f.lang.indent.outdent,command:"outdent",directional:!0,toolbar:"indent,10"}));f.on("dirChanged",function(a){var e=f.createRange(),h=a.data.node;e.setStartBefore(h);e.setEndAfter(h);for(var c=new CKEDITOR.dom.walker(e),d;d=c.next();)if(d.type==CKEDITOR.NODE_ELEMENT)if(!d.equals(h)&&d.getDirection())e.setStartAfter(d),c=new CKEDITOR.dom.walker(e);else{var b=f.config.indentClasses;if(b)for(var g=
888
+ "ltr"==a.data.dir?["_rtl",""]:["","_rtl"],l=0;l<b.length;l++)d.hasClass(b[l]+g[0])&&(d.removeClass(b[l]+g[0]),d.addClass(b[l]+g[1]));b=d.getStyle("margin-right");g=d.getStyle("margin-left");b?d.setStyle("margin-left",b):d.removeStyle("margin-left");g?d.setStyle("margin-right",g):d.removeStyle("margin-right")}})}});CKEDITOR.plugins.indent={genericDefinition:function(a){this.isIndent=!!a;this.startDisabled=!this.isIndent},specificDefinition:function(a,e,g){this.name=e;this.editor=a;this.jobs={};this.enterBr=
889
+ a.config.enterMode==CKEDITOR.ENTER_BR;this.isIndent=!!g;this.relatedGlobal=g?"indent":"outdent";this.indentKey=g?9:CKEDITOR.SHIFT+9;this.database={}},registerCommands:function(a,e){a.on("pluginsLoaded",function(){for(var a in e)(function(a,e){var c=a.getCommand(e.relatedGlobal),d;for(d in e.jobs)c.on("exec",function(b){b.data.done||(a.fire("lockSnapshot"),e.execJob(a,d)&&(b.data.done=!0),a.fire("unlockSnapshot"),CKEDITOR.dom.element.clearAllMarkers(e.database))},this,null,d),c.on("refresh",function(b){b.data.states||
890
+ (b.data.states={});b.data.states[e.name+"@"+d]=e.refreshJob(a,d,b.data.path)},this,null,d);a.addFeature(e)})(this,e[a])})}};CKEDITOR.plugins.indent.genericDefinition.prototype={context:"p",exec:function(){}};CKEDITOR.plugins.indent.specificDefinition.prototype={execJob:function(a,e){var g=this.jobs[e];if(g.state!=l)return g.exec.call(this,a)},refreshJob:function(a,e,g){e=this.jobs[e];a.activeFilter.checkFeature(this)?e.state=e.refresh.call(this,a,g):e.state=l;return e.state},getContext:function(a){return a.contains(this.context)}}})();
891
891
  (function(){function a(a){function c(c){for(var k=f.startContainer,l=f.endContainer;k&&!k.getParent().equals(c);)k=k.getParent();for(;l&&!l.getParent().equals(c);)l=l.getParent();if(!k||!l)return!1;for(var m=[],B=!1;!B;)k.equals(l)&&(B=!0),m.push(k),k=k.getNext();if(1>m.length)return!1;k=c.getParents(!0);for(l=0;l<k.length;l++)if(k[l].getName&&e[k[l].getName()]){c=k[l];break}for(var k=d.isIndent?1:-1,l=m[0],m=m[m.length-1],B=CKEDITOR.plugins.list.listToArray(c,b),w=B[m.getCustomData("listarray_index")].indent,
892
892
  l=l.getCustomData("listarray_index");l<=m.getCustomData("listarray_index");l++)if(B[l].indent+=k,0<k){for(var v=B[l].parent,D=l-1;0<=D;D--)if(B[D].indent===k){v=B[D].parent;break}B[l].parent=new CKEDITOR.dom.element(v.getName(),v.getDocument())}for(l=m.getCustomData("listarray_index")+1;l<B.length&&B[l].indent>w;l++)B[l].indent+=k;k=CKEDITOR.plugins.list.arrayToList(B,b,null,a.config.enterMode,c.getDirection());if(!d.isIndent){var C;if((C=c.getParent())&&C.is("li"))for(var m=k.listNode.getChildren(),
893
893
  A=[],r,l=m.count()-1;0<=l;l--)(r=m.getItem(l))&&r.is&&r.is("li")&&A.push(r)}k&&k.listNode.replace(c);if(A&&A.length)for(l=0;l<A.length;l++){for(r=c=A[l];(r=r.getNext())&&r.is&&r.getName()in e;)CKEDITOR.env.needsNbspFiller&&!c.getFirst(g)&&c.append(f.document.createText(" ")),c.append(r);c.insertAfter(C)}k&&a.fire("contentDomInvalidated");return!0}for(var d=this,b=this.database,e=this.context,f,k=a.getSelection(),k=(k&&k.getRanges()).createIterator();f=k.getNextRange();){for(var m=f.getCommonAncestor();m&&
894
894
  (m.type!=CKEDITOR.NODE_ELEMENT||!e[m.getName()]);){if(a.editable().equals(m)){m=!1;break}m=m.getParent()}m||(m=f.startPath().contains(e))&&f.setEndAt(m,CKEDITOR.POSITION_BEFORE_END);if(!m){var r=f.getEnclosedNode();r&&r.type==CKEDITOR.NODE_ELEMENT&&r.getName()in e&&(f.setStartAt(r,CKEDITOR.POSITION_AFTER_START),f.setEndAt(r,CKEDITOR.POSITION_BEFORE_END),m=r)}m&&f.startContainer.type==CKEDITOR.NODE_ELEMENT&&f.startContainer.getName()in e&&(r=new CKEDITOR.dom.walker(f),r.evaluator=l,f.startContainer=
895
- r.next());m&&f.endContainer.type==CKEDITOR.NODE_ELEMENT&&f.endContainer.getName()in e&&(r=new CKEDITOR.dom.walker(f),r.evaluator=l,f.endContainer=r.previous());if(m)return c(m)}return 0}function l(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is("li")}function g(a){return e(a)&&f(a)}var e=CKEDITOR.dom.walker.whitespaces(!0),f=CKEDITOR.dom.walker.bookmark(!1,!0),m=CKEDITOR.TRISTATE_DISABLED,k=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentlist",{requires:"indent",init:function(e){function c(b){d.specificDefinition.apply(this,
895
+ r.next());m&&f.endContainer.type==CKEDITOR.NODE_ELEMENT&&f.endContainer.getName()in e&&(r=new CKEDITOR.dom.walker(f),r.evaluator=l,f.endContainer=r.previous());if(m)return c(m)}return 0}function l(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is("li")}function g(a){return f(a)&&e(a)}var f=CKEDITOR.dom.walker.whitespaces(!0),e=CKEDITOR.dom.walker.bookmark(!1,!0),m=CKEDITOR.TRISTATE_DISABLED,k=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentlist",{requires:"indent",init:function(e){function c(b){d.specificDefinition.apply(this,
896
896
  arguments);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?k:m}:function(a,
897
897
  b){return!this.getContext(b)||this.isIndent?m:k},exec:CKEDITOR.tools.bind(a,this)}}var d=CKEDITOR.plugins.indent;d.registerCommands(e,{indentlist:new c(e,"indentlist",!0),outdentlist:new c(e,"outdentlist")});CKEDITOR.tools.extend(c.prototype,d.specificDefinition.prototype,{context:{ol:1,ul:1}})}});CKEDITOR.plugins.indentList={};CKEDITOR.plugins.indentList.firstItemInPath=function(a,c,d){var b=c.contains(l);d||(d=c.contains(a));return d&&b&&b.equals(d.getFirst(l))}})();(function(){function a(a,e,c){if(!a.getCustomData("indent_processed")){var d=
898
898
  this.editor,b=this.isIndent;if(e){d=a.$.className.match(this.classNameRegex);c=0;d&&(d=d[1],c=CKEDITOR.tools.indexOf(e,d)+1);if(0>(c+=b?1:-1))return;c=Math.min(c,e.length);c=Math.max(c,0);a.$.className=CKEDITOR.tools.ltrim(a.$.className.replace(this.classNameRegex,""));0<c&&a.addClass(e[c-1])}else{e=l(a,c);c=parseInt(a.getStyle(e),10);var f=d.config.indentOffset||40;isNaN(c)&&(c=0);c+=(b?1:-1)*f;if(0>c)return;c=Math.max(c,0);c=Math.ceil(c/f)*f;a.setStyle(e,c?c+(d.config.indentUnit||"px"):"");""===
899
- a.getAttribute("style")&&a.removeAttribute("style")}CKEDITOR.dom.element.setMarker(this.database,a,"indent_processed",1)}}function l(a,e){return"ltr"==(e||a.getComputedStyle("direction"))?"margin-left":"margin-right"}var g=CKEDITOR.dtd.$listItem,e=CKEDITOR.dtd.$list,f=CKEDITOR.TRISTATE_DISABLED,m=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentblock",{requires:"indent",init:function(k){function h(){c.specificDefinition.apply(this,arguments);this.allowedContent={"div h1 h2 h3 h4 h5 h6 ol p pre ul":{propertiesOnly:!0,
899
+ a.getAttribute("style")&&a.removeAttribute("style")}CKEDITOR.dom.element.setMarker(this.database,a,"indent_processed",1)}}function l(a,e){return"ltr"==(e||a.getComputedStyle("direction"))?"margin-left":"margin-right"}var g=CKEDITOR.dtd.$listItem,f=CKEDITOR.dtd.$list,e=CKEDITOR.TRISTATE_DISABLED,m=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentblock",{requires:"indent",init:function(k){function h(){c.specificDefinition.apply(this,arguments);this.allowedContent={"div h1 h2 h3 h4 h5 h6 ol p pre ul":{propertiesOnly:!0,
900
900
  styles:d?null:"margin-left,margin-right",classes:d||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")+(d?
901
- "("+d.join(",")+")":"{margin-left}");this.jobs={20:{refresh:function(a,c){var e=c.block||c.blockLimit;if(!e.is(g))var h=e.getAscendant(g),e=h&&c.contains(h)||e;e.is(g)&&(e=e.getParent());if(this.enterBr||this.getContext(c)){if(d){var h=d,e=e.$.className.match(this.classNameRegex),k=this.isIndent,h=e?k?e[1]!=h.slice(-1):!0:k;return h?m:f}return this.isIndent?m:e?CKEDITOR[0>=(parseInt(e.getStyle(l(e)),10)||0)?"TRISTATE_DISABLED":"TRISTATE_OFF"]:f}return f},exec:function(b){var c=b.getSelection(),c=
902
- c&&c.getRanges()[0],f;if(f=b.elementPath().contains(e))a.call(this,f,d);else for(c=c.createIterator(),b=b.config.enterMode,c.enforceRealBlocks=!0,c.enlargeBr=b!=CKEDITOR.ENTER_BR;f=c.getNextParagraph(b==CKEDITOR.ENTER_P?"p":"div");)f.isReadOnly()||a.call(this,f,d);return!0}}}}var c=CKEDITOR.plugins.indent,d=k.config.indentClasses;c.registerCommands(k,{indentblock:new h(k,"indentblock",!0),outdentblock:new h(k,"outdentblock")});CKEDITOR.tools.extend(h.prototype,c.specificDefinition.prototype,{context:{div:1,
903
- dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,p:1,pre:1,table:1},classNameRegex:d?new RegExp("(?:^|\\s+)("+d.join("|")+")(?\x3d$|\\s)"):null})}})})();CKEDITOR.plugins.add("taotab",{init:function(a){function l(a){var f,g="";a=parseInt(a||4,10);for(f=0;f<a;f++)g+=String.fromCharCode(160);return g}function g(a){var f,l=[];for(f=0;f<a.childNodes.length;f++){var k=a.childNodes[f];k.nodeType===Node.TEXT_NODE?l.push(k):k.nodeType===Node.ELEMENT_NODE&&(l=l.concat(g(k)))}return l}a.addCommand("insertTab",{exec:function(a){var f=
904
- a.getSelection(),m=f.getRanges(),k=new CKEDITOR.dom.text(f._.cache.nativeSel.focusNode),h=k.getText();if(null===h){k=g(m[0].root.$);a.insertHtml(l(4));a:{m=g(m[0].root.$);for(a=0;a<m.length;a++)if(!k[a]){m=m[a];break a}else if(!m[a].isEqualNode(k[a])){m=m[a];break a}m=void 0}k=new CKEDITOR.dom.text(m);m=f.getRanges();m[0].setStart(k,3);m[0].setEnd(k,3);f.selectRanges([m[0]]);m[0].setStart(k,4);m[0].setEnd(k,4)}else a=m[0].startOffset,k.setText([h.slice(0,a),l(4),h.slice(a)].join("")),m[0].setStart(k,
905
- a+4),m[0].setEnd(k,a+4);f.selectRanges([m[0]])}});a.ui.addButton("TaoTab",{label:a.lang.insertTab.button,command:"insertTab",icon:this.path+"images/taotab.png"})}});CKEDITOR.plugins.add("taountab",{init:function(a){a.addCommand("removeTab",{exec:function(a){var g=a.getSelection();a=a.getSelection().getRanges();var e,f,m=new CKEDITOR.dom.text(g._.cache.nativeSel.focusNode),k=m.getText();if(null!==k){e=a[0].startOffset;a[0].setStart(m,Math.max(0,e-4));a[0].setEnd(m,Math.min(e+4,k.length));g.selectRanges([a[0]]);
906
- f=g.getSelectedText();for(var h=0,c=-1,d=0;d<f.length;d++)if(" "===f.charAt(d)||f.charAt(d)===String.fromCharCode(160)){if(h||(c=d),h++,4===h)break}else h=0,c=-1;f=4===h?c:-1;0<=f&&(e=Math.max(0,e-4)+f,m.setText([k.slice(0,e),k.slice(e+4)].join("")));a[0].setStart(m,e);a[0].setEnd(m,e);g.selectRanges([a[0]])}}});a.ui.addButton("TaoUnTab",{label:a.lang.removeTab.button,command:"removeTab",icon:this.path+"images/taountab.png"})}});(function(){function a(a,f){f=void 0===f||f;var g;if(f)g=a.getComputedStyle("text-align");
907
- 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&&f&&(g="rtl"==a.getComputedStyle("direction")?"right":"left");return g}function l(a,f,g){this.editor=a;this.name=f;this.value=g;this.context="p";f=a.config.justifyClasses;var k=a.config.enterMode==CKEDITOR.ENTER_P?"p":"div";if(f){switch(g){case "left":this.cssClassName=
908
- f[0];break;case "center":this.cssClassName=f[1];break;case "right":this.cssClassName=f[2];break;case "justify":this.cssClassName=f[3]}this.cssClassRegex=new RegExp("(?:^|\\s+)(?:"+f.join("|")+")(?\x3d$|\\s)");this.requiredContent=k+"("+this.cssClassName+")"}else this.requiredContent=k+"{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&&
909
- (this.allowedContent.div=!0)}function g(a){var f=a.editor,g=f.createRange();g.setStartBefore(a.data.node);g.setEndAfter(a.data.node);for(var k=new CKEDITOR.dom.walker(g),h;h=k.next();)if(h.type==CKEDITOR.NODE_ELEMENT)if(!h.equals(a.data.node)&&h.getDirection())g.setStartAfter(h),k=new CKEDITOR.dom.walker(g);else{var c=f.config.justifyClasses;c&&(h.hasClass(c[0])?(h.removeClass(c[0]),h.addClass(c[2])):h.hasClass(c[2])&&(h.removeClass(c[2]),h.addClass(c[0])));c=h.getStyle("text-align");"left"==c?h.setStyle("text-align",
910
- "right"):"right"==c&&h.setStyle("text-align","left")}}l.prototype={exec:function(e){var f=e.getSelection(),g=e.config.enterMode;if(f){for(var k=f.createBookmarks(),h=f.getRanges(),c=this.cssClassName,d,b,l=e.config.useComputedState,l=void 0===l||l,q=h.length-1;0<=q;q--)for(d=h[q].createIterator(),d.enlargeBr=g!=CKEDITOR.ENTER_BR;b=d.getNextParagraph(g==CKEDITOR.ENTER_P?"p":"div");)if(!b.isReadOnly()){var u=b.getName(),t;t=e.activeFilter.check(u+"{text-align}");if((u=e.activeFilter.check(u+"("+c+")"))||
911
- t){b.removeAttribute("align");b.removeStyle("text-align");var r=c&&(b.$.className=CKEDITOR.tools.ltrim(b.$.className.replace(this.cssClassRegex,""))),p=this.state==CKEDITOR.TRISTATE_OFF&&(!l||a(b,!0)!=this.value);c&&u?p?b.addClass(c):r||b.removeAttribute("class"):p&&t&&b.setStyle("text-align",this.value)}}e.focus();e.forceNextSelectionCheck();f.selectBookmarks(k)}},refresh:function(e,f){var g=f.block||f.blockLimit,k=g.getName(),h=g.equals(e.editable()),k=this.cssClassName?e.activeFilter.check(k+"("+
912
- this.cssClassName+")"):e.activeFilter.check(k+"{text-align}");h&&!CKEDITOR.dtd.$list[f.lastElement.getName()]?this.setState(CKEDITOR.TRISTATE_OFF):!h&&k?this.setState(a(g,this.editor.config.useComputedState)==this.value?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)}};CKEDITOR.plugins.add("justify",{init:function(a){if(!a.blockless){var f=new l(a,"justifyleft","left"),m=new l(a,"justifycenter","center"),k=new l(a,"justifyright","right"),h=new l(a,"justifyblock",
913
- "justify");a.addCommand("justifyleft",f);a.addCommand("justifycenter",m);a.addCommand("justifyright",k);a.addCommand("justifyblock",h);a.ui.addButton&&(a.ui.addButton("JustifyLeft",{label:a.lang.common.alignLeft,command:"justifyleft",toolbar:"align,10"}),a.ui.addButton("JustifyCenter",{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,
914
- command:"justifyblock",toolbar:"align,40"}));a.on("dirChanged",g)}}})})();(function(){function a(a,f){var h=e.exec(a),c=e.exec(f);if(h){if(!h[2]&&"px"==c[2])return c[1];if("px"==h[2]&&!c[2])return c[1]+"px"}return f}var l=CKEDITOR.htmlParser.cssStyle,g=CKEDITOR.tools.cssLength,e=/^((?:\d*(?:\.\d+))|(?:\d+))(.*)?$/i,f={elements:{$:function(e){var f=e.attributes;if((f=(f=(f=f&&f["data-cke-realelement"])&&new CKEDITOR.htmlParser.fragment.fromHtml(decodeURIComponent(f)))&&f.children[0])&&e.attributes["data-cke-resizable"]){var h=
915
- (new l(e)).rules;e=f.attributes;var c=h.width,h=h.height;c&&(e.width=a(e.width,c));h&&(e.height=a(e.height,h))}return f}}};CKEDITOR.plugins.add("fakeobjects",{init:function(a){a.filter.allow("img[!data-cke-realelement,src,alt,title](*){*}","fakeobjects")},afterInit:function(a){(a=(a=a.dataProcessor)&&a.htmlFilter)&&a.addRules(f,{applyToAll:!0})}});CKEDITOR.editor.prototype.createFakeElement=function(a,e,f,c){var d=this.lang.fakeobjects,d=d[f]||d.unknown;e={"class":e,"data-cke-realelement":encodeURIComponent(a.getOuterHtml()),
901
+ "("+d.join(",")+")":"{margin-left}");this.jobs={20:{refresh:function(a,c){var f=c.block||c.blockLimit;if(!f.is(g))var h=f.getAscendant(g),f=h&&c.contains(h)||f;f.is(g)&&(f=f.getParent());if(this.enterBr||this.getContext(c)){if(d){var h=d,f=f.$.className.match(this.classNameRegex),k=this.isIndent,h=f?k?f[1]!=h.slice(-1):!0:k;return h?m:e}return this.isIndent?m:f?CKEDITOR[0>=(parseInt(f.getStyle(l(f)),10)||0)?"TRISTATE_DISABLED":"TRISTATE_OFF"]:e}return e},exec:function(b){var c=b.getSelection(),c=
902
+ c&&c.getRanges()[0],e;if(e=b.elementPath().contains(f))a.call(this,e,d);else for(c=c.createIterator(),b=b.config.enterMode,c.enforceRealBlocks=!0,c.enlargeBr=b!=CKEDITOR.ENTER_BR;e=c.getNextParagraph(b==CKEDITOR.ENTER_P?"p":"div");)e.isReadOnly()||a.call(this,e,d);return!0}}}}var c=CKEDITOR.plugins.indent,d=k.config.indentClasses;c.registerCommands(k,{indentblock:new h(k,"indentblock",!0),outdentblock:new h(k,"outdentblock")});CKEDITOR.tools.extend(h.prototype,c.specificDefinition.prototype,{context:{div:1,
903
+ dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,p:1,pre:1,table:1},classNameRegex:d?new RegExp("(?:^|\\s+)("+d.join("|")+")(?\x3d$|\\s)"):null})}})})();CKEDITOR.plugins.add("taotab",{init:function(a){function l(a){var e,g="";a=parseInt(a||4,10);for(e=0;e<a;e++)g+=String.fromCharCode(160);return g}function g(a){var e,l=[];for(e=0;e<a.childNodes.length;e++){var k=a.childNodes[e];k.nodeType===Node.TEXT_NODE?l.push(k):k.nodeType===Node.ELEMENT_NODE&&(l=l.concat(g(k)))}return l}a.addCommand("insertTab",{exec:function(a){var e=
904
+ a.getSelection(),m=e.getRanges(),k=new CKEDITOR.dom.text(e._.cache.nativeSel.focusNode),h=k.getText();if(null===h){k=g(m[0].root.$);a.insertHtml(l(4));a:{m=g(m[0].root.$);for(a=0;a<m.length;a++)if(!k[a]){m=m[a];break a}else if(!m[a].isEqualNode(k[a])){m=m[a];break a}m=void 0}k=new CKEDITOR.dom.text(m);m=e.getRanges();m[0].setStart(k,3);m[0].setEnd(k,3);e.selectRanges([m[0]]);m[0].setStart(k,4);m[0].setEnd(k,4)}else a=m[0].startOffset,k.setText([h.slice(0,a),l(4),h.slice(a)].join("")),m[0].setStart(k,
905
+ a+4),m[0].setEnd(k,a+4);e.selectRanges([m[0]])}});a.ui.addButton("TaoTab",{label:a.lang.insertTab.button,command:"insertTab",icon:this.path+"images/taotab.png"})}});CKEDITOR.plugins.add("taountab",{init:function(a){a.addCommand("removeTab",{exec:function(a){var g=a.getSelection();a=a.getSelection().getRanges();var f,e,m=new CKEDITOR.dom.text(g._.cache.nativeSel.focusNode),k=m.getText();if(null!==k){f=a[0].startOffset;a[0].setStart(m,Math.max(0,f-4));a[0].setEnd(m,Math.min(f+4,k.length));g.selectRanges([a[0]]);
906
+ e=g.getSelectedText();for(var h=0,c=-1,d=0;d<e.length;d++)if(" "===e.charAt(d)||e.charAt(d)===String.fromCharCode(160)){if(h||(c=d),h++,4===h)break}else h=0,c=-1;e=4===h?c:-1;0<=e&&(f=Math.max(0,f-4)+e,m.setText([k.slice(0,f),k.slice(f+4)].join("")));a[0].setStart(m,f);a[0].setEnd(m,f);g.selectRanges([a[0]])}}});a.ui.addButton("TaoUnTab",{label:a.lang.removeTab.button,command:"removeTab",icon:this.path+"images/taountab.png"})}});(function(){function a(a,e){e=void 0===e||e;var g;if(e)g=a.getComputedStyle("text-align");
907
+ 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&&e&&(g="rtl"==a.getComputedStyle("direction")?"right":"left");return g}function l(a,e,g){this.editor=a;this.name=e;this.value=g;this.context="p";e=a.config.justifyClasses;var k=a.config.enterMode==CKEDITOR.ENTER_P?"p":"div";if(e){switch(g){case "left":this.cssClassName=
908
+ e[0];break;case "center":this.cssClassName=e[1];break;case "right":this.cssClassName=e[2];break;case "justify":this.cssClassName=e[3]}this.cssClassRegex=new RegExp("(?:^|\\s+)(?:"+e.join("|")+")(?\x3d$|\\s)");this.requiredContent=k+"("+this.cssClassName+")"}else this.requiredContent=k+"{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&&
909
+ (this.allowedContent.div=!0)}function g(a){var e=a.editor,g=e.createRange();g.setStartBefore(a.data.node);g.setEndAfter(a.data.node);for(var k=new CKEDITOR.dom.walker(g),h;h=k.next();)if(h.type==CKEDITOR.NODE_ELEMENT)if(!h.equals(a.data.node)&&h.getDirection())g.setStartAfter(h),k=new CKEDITOR.dom.walker(g);else{var c=e.config.justifyClasses;c&&(h.hasClass(c[0])?(h.removeClass(c[0]),h.addClass(c[2])):h.hasClass(c[2])&&(h.removeClass(c[2]),h.addClass(c[0])));c=h.getStyle("text-align");"left"==c?h.setStyle("text-align",
910
+ "right"):"right"==c&&h.setStyle("text-align","left")}}l.prototype={exec:function(f){var e=f.getSelection(),g=f.config.enterMode;if(e){for(var k=e.createBookmarks(),h=e.getRanges(),c=this.cssClassName,d,b,l=f.config.useComputedState,l=void 0===l||l,q=h.length-1;0<=q;q--)for(d=h[q].createIterator(),d.enlargeBr=g!=CKEDITOR.ENTER_BR;b=d.getNextParagraph(g==CKEDITOR.ENTER_P?"p":"div");)if(!b.isReadOnly()){var u=b.getName(),t;t=f.activeFilter.check(u+"{text-align}");if((u=f.activeFilter.check(u+"("+c+")"))||
911
+ t){b.removeAttribute("align");b.removeStyle("text-align");var r=c&&(b.$.className=CKEDITOR.tools.ltrim(b.$.className.replace(this.cssClassRegex,""))),p=this.state==CKEDITOR.TRISTATE_OFF&&(!l||a(b,!0)!=this.value);c&&u?p?b.addClass(c):r||b.removeAttribute("class"):p&&t&&b.setStyle("text-align",this.value)}}f.focus();f.forceNextSelectionCheck();e.selectBookmarks(k)}},refresh:function(f,e){var g=e.block||e.blockLimit,k=g.getName(),h=g.equals(f.editable()),k=this.cssClassName?f.activeFilter.check(k+"("+
912
+ this.cssClassName+")"):f.activeFilter.check(k+"{text-align}");h&&!CKEDITOR.dtd.$list[e.lastElement.getName()]?this.setState(CKEDITOR.TRISTATE_OFF):!h&&k?this.setState(a(g,this.editor.config.useComputedState)==this.value?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)}};CKEDITOR.plugins.add("justify",{init:function(a){if(!a.blockless){var e=new l(a,"justifyleft","left"),m=new l(a,"justifycenter","center"),k=new l(a,"justifyright","right"),h=new l(a,"justifyblock",
913
+ "justify");a.addCommand("justifyleft",e);a.addCommand("justifycenter",m);a.addCommand("justifyright",k);a.addCommand("justifyblock",h);a.ui.addButton&&(a.ui.addButton("JustifyLeft",{label:a.lang.common.alignLeft,command:"justifyleft",toolbar:"align,10"}),a.ui.addButton("JustifyCenter",{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,
914
+ command:"justifyblock",toolbar:"align,40"}));a.on("dirChanged",g)}}})})();(function(){function a(a,e){var h=f.exec(a),c=f.exec(e);if(h){if(!h[2]&&"px"==c[2])return c[1];if("px"==h[2]&&!c[2])return c[1]+"px"}return e}var l=CKEDITOR.htmlParser.cssStyle,g=CKEDITOR.tools.cssLength,f=/^((?:\d*(?:\.\d+))|(?:\d+))(.*)?$/i,e={elements:{$:function(e){var f=e.attributes;if((f=(f=(f=f&&f["data-cke-realelement"])&&new CKEDITOR.htmlParser.fragment.fromHtml(decodeURIComponent(f)))&&f.children[0])&&e.attributes["data-cke-resizable"]){var h=
915
+ (new l(e)).rules;e=f.attributes;var c=h.width,h=h.height;c&&(e.width=a(e.width,c));h&&(e.height=a(e.height,h))}return f}}};CKEDITOR.plugins.add("fakeobjects",{init:function(a){a.filter.allow("img[!data-cke-realelement,src,alt,title](*){*}","fakeobjects")},afterInit:function(a){(a=(a=a.dataProcessor)&&a.htmlFilter)&&a.addRules(e,{applyToAll:!0})}});CKEDITOR.editor.prototype.createFakeElement=function(a,e,f,c){var d=this.lang.fakeobjects,d=d[f]||d.unknown;e={"class":e,"data-cke-realelement":encodeURIComponent(a.getOuterHtml()),
916
916
  "data-cke-real-node-type":a.type,alt:d,title:d,align:a.getAttribute("align")||""};CKEDITOR.env.hc||(e.src=CKEDITOR.tools.transparentImageData);f&&(e["data-cke-real-element-type"]=f);c&&(e["data-cke-resizable"]=c,f=new l,c=a.getAttribute("width"),a=a.getAttribute("height"),c&&(f.rules.width=g(c)),a&&(f.rules.height=g(a)),f.populate(e));return this.document.createElement("img",{attributes:e})};CKEDITOR.editor.prototype.createFakeParserElement=function(a,e,f,c){var d=this.lang.fakeobjects,d=d[f]||d.unknown,
917
917
  b;b=new CKEDITOR.htmlParser.basicWriter;a.writeHtml(b);b=b.getHtml();e={"class":e,"data-cke-realelement":encodeURIComponent(b),"data-cke-real-node-type":a.type,alt:d,title:d,align:a.attributes.align||""};CKEDITOR.env.hc||(e.src=CKEDITOR.tools.transparentImageData);f&&(e["data-cke-real-element-type"]=f);c&&(e["data-cke-resizable"]=c,c=a.attributes,a=new l,f=c.width,c=c.height,void 0!==f&&(a.rules.width=g(f)),void 0!==c&&(a.rules.height=g(c)),a.populate(e));return new CKEDITOR.htmlParser.element("img",
918
918
  e)};CKEDITOR.editor.prototype.restoreRealElement=function(e){if(e.data("cke-real-node-type")!=CKEDITOR.NODE_ELEMENT)return null;var f=CKEDITOR.dom.element.createFromHtml(decodeURIComponent(e.data("cke-realelement")),this.document);if(e.data("cke-resizable")){var h=e.getStyle("width");e=e.getStyle("height");h&&f.setAttribute("width",a(f.getAttribute("width"),h));e&&f.setAttribute("height",a(f.getAttribute("height"),e))}return f}})();"use strict";(function(){function a(a){return a.replace(/'/g,"\\$\x26")}
919
- function l(a){for(var b=a.length,c=[],d,e=0;e<b;e++)d=a.charCodeAt(e),c.push(d);return"String.fromCharCode("+c.join(",")+")"}function g(b,c){for(var d=b.plugins.link,e=d.compiledProtectionFunction.params,d=[d.compiledProtectionFunction.name,"("],f,h,g=0;g<e.length;g++)f=e[g].toLowerCase(),h=c[f],0<g&&d.push(","),d.push("'",h?a(encodeURIComponent(c[f])):"","'");d.push(")");return d.join("")}function e(a){a=a.config.emailProtection||"";var b;a&&"encode"!=a&&(b={},a.replace(/^([^(]+)\(([^)]+)\)$/,function(a,
919
+ function l(a){for(var b=a.length,c=[],d,e=0;e<b;e++)d=a.charCodeAt(e),c.push(d);return"String.fromCharCode("+c.join(",")+")"}function g(b,c){for(var d=b.plugins.link,e=d.compiledProtectionFunction.params,d=[d.compiledProtectionFunction.name,"("],f,h,g=0;g<e.length;g++)f=e[g].toLowerCase(),h=c[f],0<g&&d.push(","),d.push("'",h?a(encodeURIComponent(c[f])):"","'");d.push(")");return d.join("")}function f(a){a=a.config.emailProtection||"";var b;a&&"encode"!=a&&(b={},a.replace(/^([^(]+)\(([^)]+)\)$/,function(a,
920
920
  c,d){b.name=c;b.params=[];d.replace(/[^,\s]+/g,function(a){b.params.push(a)})}));return b}CKEDITOR.plugins.add("link",{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]{"+
921
921
  b+"padding-%1:18px;cursor:auto;}.%2 img.cke_anchor{"+b+"width:16px;min-height:15px;height:1.15em;vertical-align:text-bottom;}";CKEDITOR.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,
922
922
  requiredContent:"a[href]"}));a.addCommand("anchor",new CKEDITOR.dialogCommand("anchor",{allowedContent:"a[!name,id]",requiredContent:"a[name]"}));a.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",
923
923
  toolbar:"links,20"}),a.ui.addButton("Anchor",{label:a.lang.link.anchor.toolbar,command:"anchor",toolbar:"links,30"}));CKEDITOR.dialog.add("link",this.path+"dialogs/link.js");CKEDITOR.dialog.add("anchor",this.path+"dialogs/anchor.js");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,
924
924
  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)},null,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",
925
- 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&&!(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?
926
- b.children.length?null:a.createFakeParserElement(b,"cke_anchor","anchor"):null}}});var b=a._.elementsPath&&a._.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 f=/^javascript:/,m=/^(?:mailto)(?:(?!\?(subject|body)=).)+/i,k=/subject=([^;?:@&=$,\/]*)/i,h=/body=([^;?:@&=$,\/]*)/i,c=/^#(.*)$/,d=/^((?:http|https|ftp|news):\/\/)?(.*)$/,b=/^(_(?:self|top|parent|blank))$/,
925
+ 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&&!(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=f(a)},afterInit:function(a){a.dataProcessor.dataFilter.addRules({elements:{a:function(b){return b.attributes.name?
926
+ b.children.length?null:a.createFakeParserElement(b,"cke_anchor","anchor"):null}}});var b=a._.elementsPath&&a._.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 e=/^javascript:/,m=/^(?:mailto)(?:(?!\?(subject|body)=).)+/i,k=/subject=([^;?:@&=$,\/]*)/i,h=/body=([^;?:@&=$,\/]*)/i,c=/^#(.*)$/,d=/^((?:http|https|ftp|news):\/\/)?(.*)$/,b=/^(_(?:self|top|parent|blank))$/,
927
927
  n=/^javascript:void\(location\.href='mailto:'\+String\.fromCharCode\(([^)]+)\)(?:\+'(.*)')?\)$/,q=/^javascript:([^(]+)\(([^)]+)\)$/,u=/\s*window.open\(\s*this\.href\s*,\s*(?:'([^']*)'|null)\s*,\s*'([^']*)'\s*\)\s*;\s*return\s*false;*\s*/,t=/(?:^|,)([^=]+)=(\d+|yes|no)/gi,r=/^tel:(.*)$/,p={id:"advId",dir:"advLangDir",accessKey:"advAccessKey",name:"advName",lang:"advLangCode",tabindex:"advTabIndex",title:"advTitle",type:"advContentType","class":"advCSSClasses",charset:"advCharset",style:"advStyles",
928
928
  rel:"advRel"};CKEDITOR.plugins.link={getSelectedLink:function(a,b){var c=a.getSelection(),d=c.getSelectedElement(),e=c.getRanges(),f=[],h;if(!b&&d&&d.is("a"))return d;for(d=0;d<e.length;d++)if(h=c.getRanges()[d],h.shrink(CKEDITOR.SHRINK_ELEMENT,!0,{skipBogus:!0}),(h=a.elementPath(h.getCommonAncestor()).contains("a",1))&&b)f.push(h);else if(h)return h;return b?f: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"),
929
929
  d=[],e=0,f;f=b.getItem(e++);)(f.data("cke-saved-name")||f.hasAttribute("name"))&&d.push({name:f.data("cke-saved-name")||f.getAttribute("name"),id:f.getAttribute("id")});for(e=0;f=c.getItem(e++);)(f=this.tryRestoreFakeAnchor(a,f))&&d.push({name:f.getAttribute("name"),id:f.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}},
930
- parseLinkAttributes:function(a,e){var g=e&&(e.data("cke-saved-href")||e.getAttribute("href"))||"",l=a.plugins.link.compiledProtectionFunction,w=a.config.emailProtection,v={},D;g.match(f)&&("encode"==w?g=g.replace(n,function(a,b,c){c=c||"";return"mailto:"+String.fromCharCode.apply(String,b.split(","))+c.replace(/\\'/g,"'")}):w&&g.replace(q,function(a,b,c){if(b==l.name){v.type="email";a=v.email={};b=/(^')|('$)/g;c=c.match(/[^,\s]+/g);for(var d=c.length,e,f,h=0;h<d;h++)e=decodeURIComponent,f=c[h].replace(b,
930
+ parseLinkAttributes:function(a,f){var g=f&&(f.data("cke-saved-href")||f.getAttribute("href"))||"",l=a.plugins.link.compiledProtectionFunction,w=a.config.emailProtection,v={},D;g.match(e)&&("encode"==w?g=g.replace(n,function(a,b,c){c=c||"";return"mailto:"+String.fromCharCode.apply(String,b.split(","))+c.replace(/\\'/g,"'")}):w&&g.replace(q,function(a,b,c){if(b==l.name){v.type="email";a=v.email={};b=/(^')|('$)/g;c=c.match(/[^,\s]+/g);for(var d=c.length,e,f,h=0;h<d;h++)e=decodeURIComponent,f=c[h].replace(b,
931
931
  "").replace(/\\'/g,"'"),f=e(f),e=l.params[h].toLowerCase(),a[e]=f;a.address=[a.name,a.domain].join("@")}}));if(!v.type)if(w=g.match(c))v.type="anchor",v.anchor={},v.anchor.name=v.anchor.id=w[1];else if(w=g.match(r))v.type="tel",v.tel=w[1];else if(w=g.match(m)){D=g.match(k);var g=g.match(h),C=v.email={};v.type="email";C.address=w[0].replace("mailto:","");D&&(C.subject=decodeURIComponent(D[1]));g&&(C.body=decodeURIComponent(g[1]))}else g&&(D=g.match(d))&&(v.type="url",v.url={},v.url.protocol=D[1],v.url.url=
932
- D[2]);if(e){if(g=e.getAttribute("target"))v.target={type:g.match(b)?g:"frame",name:g};else if(g=(g=e.data("cke-pa-onclick")||e.getAttribute("onclick"))&&g.match(u))for(v.target={type:"popup",name:g[1]};w=t.exec(g[2]);)"yes"!=w[2]&&"1"!=w[2]||w[1]in{height:1,width:1,top:1,left:1}?isFinite(w[2])&&(v.target[w[1]]=w[2]):v.target[w[1]]=!0;null!==e.getAttribute("download")&&(v.download=!0);var g={},A;for(A in p)(w=e.getAttribute(A))&&(g[p[A]]=w);if(A=e.data("cke-saved-name")||g.advName)g.advName=A;CKEDITOR.tools.isEmpty(g)||
932
+ D[2]);if(f){if(g=f.getAttribute("target"))v.target={type:g.match(b)?g:"frame",name:g};else if(g=(g=f.data("cke-pa-onclick")||f.getAttribute("onclick"))&&g.match(u))for(v.target={type:"popup",name:g[1]};w=t.exec(g[2]);)"yes"!=w[2]&&"1"!=w[2]||w[1]in{height:1,width:1,top:1,left:1}?isFinite(w[2])&&(v.target[w[1]]=w[2]):v.target[w[1]]=!0;null!==f.getAttribute("download")&&(v.download=!0);var g={},A;for(A in p)(w=f.getAttribute(A))&&(g[p[A]]=w);if(A=f.data("cke-saved-name")||g.advName)g.advName=A;CKEDITOR.tools.isEmpty(g)||
933
933
  (v.advanced=g)}return v},getLinkAttributes:function(b,c){var d=b.config.emailProtection||"",e={};switch(c.type){case "url":var d=c.url&&void 0!==c.url.protocol?c.url.protocol:"http://",f=c.url&&CKEDITOR.tools.trim(c.url.url)||"";e["data-cke-saved-href"]=0===f.indexOf("/")?f:d+f;break;case "anchor":d=c.anchor&&c.anchor.id;e["data-cke-saved-href"]="#"+(c.anchor&&c.anchor.name||d||"");break;case "email":var h=c.email,f=h.address;switch(d){case "":case "encode":var k=encodeURIComponent(h.subject||""),
934
934
  m=encodeURIComponent(h.body||""),h=[];k&&h.push("subject\x3d"+k);m&&h.push("body\x3d"+m);h=h.length?"?"+h.join("\x26"):"";"encode"==d?(d=["javascript:void(location.href\x3d'mailto:'+",l(f)],h&&d.push("+'",a(h),"'"),d.push(")")):d=["mailto:",f,h];break;default:d=f.split("@",2),h.name=d[0],h.domain=d[1],d=["javascript:",g(b,h)]}e["data-cke-saved-href"]=d.join("");break;case "tel":e["data-cke-saved-href"]="tel:"+c.tel}if(c.target)if("popup"==c.target.type){for(var d=["window.open(this.href, '",c.target.name||
935
935
  "","', '"],n="resizable status location toolbar menubar fullscreen scrollbars dependent".split(" "),f=n.length,k=function(a){c.target[a]&&n.push(a+"\x3d"+c.target[a])},h=0;h<f;h++)n[h]+=c.target[n[h]]?"\x3dyes":"\x3dno";k("width");k("left");k("height");k("top");d.push(n.join(","),"'); return false;");e["data-cke-pa-onclick"]=d.join("")}else"notSet"!=c.target.type&&c.target.name&&(e.target=c.target.name);c.download&&(e.download="");if(c.advanced){for(var r in p)(d=c.advanced[p[r]])&&(e[r]=d);e.name&&
@@ -941,31 +941,31 @@ d.is("a"):CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,d)))d.remove(1);else if(d
941
941
  e=c.listNode.getChildCount(),h=0;h<e&&(n=c.listNode.getChild(h));h++)n.getName()==this.type&&d.push(n);c.listNode.replace(b.root);a.fire("contentDomInvalidated")}function l(a,b,c){var d=b.contents,e=b.root.getDocument(),f=[];if(1==d.length&&d[0].equals(b.root)){var h=e.createElement("div");d[0].moveChildren&&d[0].moveChildren(h);d[0].append(h);d[0]=h}b=b.contents[0].getParent();for(h=0;h<d.length;h++)b=b.getCommonAncestor(d[h].getParent());a=a.config.useComputedState;var g,k;a=void 0===a||a;for(h=
942
942
  0;h<d.length;h++)for(var l=d[h],m;m=l.getParent();){if(m.equals(b)){f.push(l);!k&&l.getDirection()&&(k=1);l=l.getDirection(a);null!==g&&(g=g&&g!=l?null:l);break}l=m}if(!(1>f.length)){d=f[f.length-1].getNext();h=e.createElement(this.type);for(c.push(h);f.length;)c=f.shift(),a=e.createElement("li"),l=c,l.is("pre")||t.test(l.getName())||"false"==l.getAttribute("contenteditable")?c.appendTo(a):(c.copyAttributes(a),g&&c.getDirection()&&(a.removeStyle("direction"),a.removeAttribute("dir")),c.moveChildren(a),
943
943
  c.remove()),a.appendTo(h);g&&k&&h.setAttribute("dir",g);d?h.insertBefore(d):h.appendTo(b)}}function g(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)))||m.is&&m.isBlockBoundary({br:1})))a.document.createElement("br")[c?"insertBefore":"insertAfter"](l)}for(var e=CKEDITOR.plugins.list.listToArray(b.root,c),f=[],h=0;h<b.contents.length;h++){var g=b.contents[h];(g=g.getAscendant("li",!0))&&!g.getCustomData("list_item_processed")&&
944
- (f.push(g),CKEDITOR.dom.element.setMarker(c,g,"list_item_processed",!0))}g=null;for(h=0;h<f.length;h++)g=f[h].getCustomData("listarray_index"),e[g].indent=-1;for(h=g+1;h<e.length;h++)if(e[h].indent>e[h-1].indent+1){f=e[h-1].indent+1-e[h].indent;for(g=e[h].indent;e[h]&&e[h].indent>=g;)e[h].indent+=f,h++;h--}var k=CKEDITOR.plugins.list.arrayToList(e,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=
945
- a;this.context=this.type=b;this.allowedContent=b+" li";this.requiredContent=b}function f(a,b,c,d){for(var e,f;e=a[d?"getLast":"getFirst"](r);)(f=e.getDirection(1))!==b.getDirection(1)&&e.setAttribute("dir",f),e.remove(),c?e[d?"insertBefore":"insertAfter"](c):b.append(e,d),c=e}function m(a){function b(c){var d=a[c?"getPrevious":"getNext"](q);d&&d.type==CKEDITOR.NODE_ELEMENT&&d.is(a.getName())&&(f(a,d,null,!c),a.remove(),a=d)}b();b(1)}function k(a){return a.type==CKEDITOR.NODE_ELEMENT&&(a.getName()in
946
- CKEDITOR.dtd.$block||a.getName()in CKEDITOR.dtd.$listItem)&&CKEDITOR.dtd[a.getName()]["#"]}function h(a,b,d){a.fire("saveSnapshot");d.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);var e=d.extractContents();b.trim(!1,!0);var h=b.createBookmark(),g=new CKEDITOR.dom.elementPath(b.startContainer),k=g.block,g=g.lastElement.getAscendant("li",1)||k,l=new CKEDITOR.dom.elementPath(d.startContainer),n=l.contains(CKEDITOR.dtd.$listItem),l=l.contains(CKEDITOR.dtd.$list);k?(k=k.getBogus())&&k.remove():l&&(k=l.getPrevious(q))&&
947
- u(k)&&k.remove();(k=e.getLast())&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("br")&&k.remove();(k=b.startContainer.getChild(b.startOffset))?e.insertBefore(k):b.startContainer.append(e);n&&(e=c(n))&&(g.contains(n)?(f(e,n.getParent(),n),e.remove()):g.append(e));for(;d.checkStartOfBlock()&&d.checkEndOfBlock();){l=d.startPath();e=l.block;if(!e)break;e.is("li")&&(g=e.getParent(),e.equals(g.getLast(q))&&e.equals(g.getFirst(q))&&(e=g));d.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START);e.remove()}d=d.clone();e=
948
- a.editable();d.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(d);d.evaluator=function(a){return q(a)&&!u(a)};(d=d.next())&&d.type==CKEDITOR.NODE_ELEMENT&&d.getName()in CKEDITOR.dtd.$list&&m(d);b.moveToBookmark(h);b.select();a.fire("saveSnapshot")}function c(a){return(a=a.getLast(q))&&a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in d?a:null}var d={ol:1,ul:1},b=CKEDITOR.dom.walker.whitespaces(),n=CKEDITOR.dom.walker.bookmark(),q=function(a){return!(b(a)||n(a))},u=CKEDITOR.dom.walker.bogus();
944
+ (f.push(g),CKEDITOR.dom.element.setMarker(c,g,"list_item_processed",!0))}g=null;for(h=0;h<f.length;h++)g=f[h].getCustomData("listarray_index"),e[g].indent=-1;for(h=g+1;h<e.length;h++)if(e[h].indent>e[h-1].indent+1){f=e[h-1].indent+1-e[h].indent;for(g=e[h].indent;e[h]&&e[h].indent>=g;)e[h].indent+=f,h++;h--}var k=CKEDITOR.plugins.list.arrayToList(e,c,null,a.config.enterMode,b.root.getAttribute("dir")).listNode,l,m;d(!0);d();k.replace(b.root);a.fire("contentDomInvalidated")}function f(a,b){this.name=
945
+ a;this.context=this.type=b;this.allowedContent=b+" li";this.requiredContent=b}function e(a,b,c,d){for(var e,f;e=a[d?"getLast":"getFirst"](r);)(f=e.getDirection(1))!==b.getDirection(1)&&e.setAttribute("dir",f),e.remove(),c?e[d?"insertBefore":"insertAfter"](c):b.append(e,d),c=e}function m(a){function b(c){var d=a[c?"getPrevious":"getNext"](q);d&&d.type==CKEDITOR.NODE_ELEMENT&&d.is(a.getName())&&(e(a,d,null,!c),a.remove(),a=d)}b();b(1)}function k(a){return a.type==CKEDITOR.NODE_ELEMENT&&(a.getName()in
946
+ CKEDITOR.dtd.$block||a.getName()in CKEDITOR.dtd.$listItem)&&CKEDITOR.dtd[a.getName()]["#"]}function h(a,b,d){a.fire("saveSnapshot");d.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);var f=d.extractContents();b.trim(!1,!0);var h=b.createBookmark(),g=new CKEDITOR.dom.elementPath(b.startContainer),k=g.block,g=g.lastElement.getAscendant("li",1)||k,l=new CKEDITOR.dom.elementPath(d.startContainer),n=l.contains(CKEDITOR.dtd.$listItem),l=l.contains(CKEDITOR.dtd.$list);k?(k=k.getBogus())&&k.remove():l&&(k=l.getPrevious(q))&&
947
+ u(k)&&k.remove();(k=f.getLast())&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("br")&&k.remove();(k=b.startContainer.getChild(b.startOffset))?f.insertBefore(k):b.startContainer.append(f);n&&(f=c(n))&&(g.contains(n)?(e(f,n.getParent(),n),f.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(q))&&f.equals(g.getFirst(q))&&(f=g));d.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START);f.remove()}d=d.clone();f=
948
+ a.editable();d.setEndAt(f,CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(d);d.evaluator=function(a){return q(a)&&!u(a)};(d=d.next())&&d.type==CKEDITOR.NODE_ELEMENT&&d.getName()in CKEDITOR.dtd.$list&&m(d);b.moveToBookmark(h);b.select();a.fire("saveSnapshot")}function c(a){return(a=a.getLast(q))&&a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in d?a:null}var d={ol:1,ul:1},b=CKEDITOR.dom.walker.whitespaces(),n=CKEDITOR.dom.walker.bookmark(),q=function(a){return!(b(a)||n(a))},u=CKEDITOR.dom.walker.bogus();
949
949
  CKEDITOR.plugins.list={listToArray:function(a,b,c,e,f){if(!d[a.getName()])return[];e||(e=0);c||(c=[]);for(var h=0,g=a.getChildCount();h<g;h++){var k=a.getChild(h);k.type==CKEDITOR.NODE_ELEMENT&&k.getName()in CKEDITOR.dtd.$list&&CKEDITOR.plugins.list.listToArray(k,b,c,e+1);if("li"==k.$.nodeName.toLowerCase()){var l={parent:a,indent:e,element:k,contents:[]};f?l.grandparent=f:(l.grandparent=a.getParent(),l.grandparent&&"li"==l.grandparent.$.nodeName.toLowerCase()&&(l.grandparent=l.grandparent.getParent()));
950
950
  b&&CKEDITOR.dom.element.setMarker(b,k,"listarray_index",c.length);c.push(l);for(var m=0,n=k.getChildCount(),r;m<n;m++)r=k.getChild(m),r.type==CKEDITOR.NODE_ELEMENT&&d[r.getName()]?CKEDITOR.plugins.list.listToArray(r,b,c,e+1,l.grandparent):l.contents.push(r)}}return c},arrayToList:function(a,b,c,e,f){c||(c=0);if(!a||a.length<c+1)return null;for(var h,g=a[c].parent.getDocument(),k=new CKEDITOR.dom.documentFragment(g),l=null,m=c,r=Math.max(a[c].indent,0),u=null,t,E,M=e==CKEDITOR.ENTER_P?"p":"div";;){var I=
951
951
  a[m];h=I.grandparent;t=I.element.getDirection(1);if(I.indent==r){l&&a[m].parent.getName()==l.getName()||(l=a[m].parent.clone(!1,1),f&&l.setAttribute("dir",f),k.append(l));u=l.append(I.element.clone(0,1));t!=l.getDirection(1)&&u.setAttribute("dir",t);for(h=0;h<I.contents.length;h++)u.append(I.contents[h].clone(1,1));m++}else if(I.indent==Math.max(r,0)+1)I=a[m-1].element.getDirection(1),m=CKEDITOR.plugins.list.arrayToList(a,null,m,e,I!=t?t:null),!u.getChildCount()&&CKEDITOR.env.needsNbspFiller&&7>=
952
952
  g.$.documentMode&&u.append(g.createText(" ")),u.append(m.listNode),m=m.nextIndex;else if(-1==I.indent&&!c&&h){d[h.getName()]?(u=I.element.clone(!1,!0),t!=h.getDirection(1)&&u.setAttribute("dir",t)):u=new CKEDITOR.dom.documentFragment(g);var l=h.getDirection(1)!=t,J=I.element,F=J.getAttribute("class"),L=J.getAttribute("style"),P=u.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(e!=CKEDITOR.ENTER_BR||l||L||F),N,Y=I.contents.length,S;for(h=0;h<Y;h++)if(N=I.contents[h],n(N)&&1<Y)P?S=N.clone(1,1):u.append(N.clone(1,
953
953
  1));else if(N.type==CKEDITOR.NODE_ELEMENT&&N.isBlockBoundary()){l&&!N.getDirection()&&N.setAttribute("dir",t);E=N;var Z=J.getAttribute("style");Z&&E.setAttribute("style",Z.replace(/([^;])$/,"$1;")+(E.getAttribute("style")||""));F&&N.addClass(F);E=null;S&&(u.append(S),S=null);u.append(N.clone(1,1))}else P?(E||(E=g.createElement(M),u.append(E),l&&E.setAttribute("dir",t)),L&&E.setAttribute("style",L),F&&E.setAttribute("class",F),S&&(E.append(S),S=null),E.append(N.clone(1,1))):u.append(N.clone(1,1));
954
954
  S&&((E||u).append(S),S=null);u.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&m!=a.length-1&&(CKEDITOR.env.needsBrFiller&&(t=u.getLast())&&t.type==CKEDITOR.NODE_ELEMENT&&t.is("br")&&t.remove(),(t=u.getLast(q))&&t.type==CKEDITOR.NODE_ELEMENT&&t.is(CKEDITOR.dtd.$block)||u.append(g.createElement("br")));t=u.$.nodeName.toLowerCase();"div"!=t&&"p"!=t||u.appendBogus();k.append(u);l=null;m++}else return null;E=null;if(a.length<=m||Math.max(a[m].indent,0)<r)break}if(b)for(a=k.getFirst();a;){if(a.type==CKEDITOR.NODE_ELEMENT&&
955
- (CKEDITOR.dom.element.clearMarkers(b,a),a.getName()in CKEDITOR.dtd.$listItem&&(c=a,g=f=e=void 0,e=c.getDirection()))){for(f=c.getParent();f&&!(g=f.getDirection());)f=f.getParent();e==g&&c.removeAttribute("dir")}a=a.getNextSourceNode()}return{listNode:k,nextIndex:m}}};var t=/^h[1-6]$/,r=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT);e.prototype={exec:function(b){function c(a){return d[a.root.getName()]&&!e(a.root,[CKEDITOR.NODE_COMMENT])}function e(a,b){return CKEDITOR.tools.array.filter(a.getChildren().toArray(),
955
+ (CKEDITOR.dom.element.clearMarkers(b,a),a.getName()in CKEDITOR.dtd.$listItem&&(c=a,g=f=e=void 0,e=c.getDirection()))){for(f=c.getParent();f&&!(g=f.getDirection());)f=f.getParent();e==g&&c.removeAttribute("dir")}a=a.getNextSourceNode()}return{listNode:k,nextIndex:m}}};var t=/^h[1-6]$/,r=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT);f.prototype={exec:function(b){function c(a){return d[a.root.getName()]&&!e(a.root,[CKEDITOR.NODE_COMMENT])}function e(a,b){return CKEDITOR.tools.array.filter(a.getChildren().toArray(),
956
956
  function(a){return-1===CKEDITOR.tools.array.indexOf(b,a.type)}).length}function f(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(b,b.elementPath());var h=b.config,k=b.getSelection(),n=k&&k.getRanges();if(this.state==CKEDITOR.TRISTATE_OFF){var r=b.editable();if(r.getFirst(q)){var C=1==n.length&&n[0];(h=C&&C.getEnclosedNode())&&h.is&&this.type==h.getName()&&this.setState(CKEDITOR.TRISTATE_ON)}else h.enterMode==
957
957
  CKEDITOR.ENTER_BR?r.appendBogus():n[0].fixBlock(1,h.enterMode==CKEDITOR.ENTER_P?"p":"div"),k.selectRanges(n)}for(var h=k.createBookmarks(!0),r=[],A={},n=n.createIterator(),u=0;(C=n.getNextRange())&&++u;){var t=C.getBoundaryNodes(),H=t.startNode,E=t.endNode;H.type==CKEDITOR.NODE_ELEMENT&&"td"==H.getName()&&C.setStartAt(t.startNode,CKEDITOR.POSITION_AFTER_START);E.type==CKEDITOR.NODE_ELEMENT&&"td"==E.getName()&&C.setEndAt(t.endNode,CKEDITOR.POSITION_BEFORE_END);C=C.createIterator();for(C.forceBrBreak=
958
958
  this.state==CKEDITOR.TRISTATE_OFF;t=C.getNextParagraph();)if(!t.getCustomData("list_block")&&!f(t)){CKEDITOR.dom.element.setMarker(A,t,"list_block",1);for(var M=b.elementPath(t),H=M.elements,E=0,M=M.blockLimit,I,J=H.length-1;0<=J&&(I=H[J]);J--)if(d[I.getName()]&&M.contains(I)){M.removeCustomData("list_group_object_"+u);(H=I.getCustomData("list_group_object"))?H.contents.push(t):(H={root:I,contents:[t]},r.push(H),CKEDITOR.dom.element.setMarker(A,I,"list_group_object",H));E=1;break}E||(E=M,E.getCustomData("list_group_object_"+
959
959
  u)?E.getCustomData("list_group_object_"+u).contents.push(t):(H={root:E,contents:[t]},CKEDITOR.dom.element.setMarker(A,E,"list_group_object_"+u,H),r.push(H)))}}for(I=[];0<r.length;)H=r.shift(),this.state==CKEDITOR.TRISTATE_OFF?c(H)||(d[H.root.getName()]?a.call(this,b,H,A,I):l.call(this,b,H,I)):this.state==CKEDITOR.TRISTATE_ON&&d[H.root.getName()]&&!c(H)&&g.call(this,b,H,A);for(J=0;J<I.length;J++)m(I[J]);CKEDITOR.dom.element.clearAllMarkers(A);k.selectBookmarks(h);b.focus()},refresh:function(a,b){var c=
960
- b.contains(d,1),e=b.blockLimit||b.root;c&&e.contains(c)?this.setState(c.is(this.type)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_OFF)}};CKEDITOR.plugins.add("list",{requires:"indentlist",init:function(a){a.blockless||(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",
960
+ b.contains(d,1),e=b.blockLimit||b.root;c&&e.contains(c)?this.setState(c.is(this.type)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_OFF)}};CKEDITOR.plugins.add("list",{requires:"indentlist",init:function(a){a.blockless||(a.addCommand("numberedlist",new f("numberedlist","ol")),a.addCommand("bulletedlist",new f("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",
961
961
  {label:a.lang.list.bulletedlist,command:"bulletedlist",directional:!0,toolbar:"list,20"})),a.on("key",function(b){var e=b.data.domEvent.getKey(),f;if("wysiwyg"==a.mode&&e in{8:1,46:1}){var g=a.getSelection().getRanges()[0],l=g&&g.startPath();if(g&&g.collapsed){var m=8==e,n=a.editable(),r=new CKEDITOR.dom.walker(g.clone());r.evaluator=function(a){return q(a)&&!u(a)};r.guard=function(a,b){return!(b&&a.type==CKEDITOR.NODE_ELEMENT&&a.is("table"))};e=g.clone();if(m){var A;(A=l.contains(d))&&g.checkBoundaryOfElement(A,
962
962
  CKEDITOR.START)&&(A=A.getParent())&&A.is("li")&&(A=c(A))?(f=A,A=A.getPrevious(q),e.moveToPosition(A&&u(A)?A:f,CKEDITOR.POSITION_BEFORE_START)):(r.range.setStartAt(n,CKEDITOR.POSITION_AFTER_START),r.range.setEnd(g.startContainer,g.startOffset),(A=r.previous())&&A.type==CKEDITOR.NODE_ELEMENT&&(A.getName()in d||A.is("li"))&&(A.is("li")||(r.range.selectNodeContents(A),r.reset(),r.evaluator=k,A=r.previous()),f=A,e.moveToElementEditEnd(f),e.moveToPosition(e.endPath().block,CKEDITOR.POSITION_BEFORE_END)));
963
963
  if(f)h(a,e,g),b.cancel();else{var t=l.contains(d);t&&g.checkBoundaryOfElement(t,CKEDITOR.START)&&(f=t.getFirst(q),g.checkBoundaryOfElement(f,CKEDITOR.START)&&(A=t.getPrevious(q),c(f)?A&&(g.moveToElementEditEnd(A),g.select()):a.execCommand("outdent"),b.cancel()))}}else if(f=l.contains("li")){if(r.range.setEndAt(n,CKEDITOR.POSITION_BEFORE_END),m=(n=f.getLast(q))&&k(n)?n:f,l=0,(A=r.next())&&A.type==CKEDITOR.NODE_ELEMENT&&A.getName()in d&&A.equals(n)?(l=1,A=r.next()):g.checkBoundaryOfElement(m,CKEDITOR.END)&&
964
964
  (l=2),l&&A){g=g.clone();g.moveToElementEditStart(A);if(1==l&&(e.optimize(),!e.startContainer.equals(f))){for(f=e.startContainer;f.is(CKEDITOR.dtd.$inline);)t=f,f=f.getParent();t&&e.moveToPosition(t,CKEDITOR.POSITION_AFTER_END)}2==l&&(e.moveToPosition(e.endPath().block,CKEDITOR.POSITION_BEFORE_END),g.endPath().block&&g.moveToPosition(g.endPath().block,CKEDITOR.POSITION_AFTER_START));h(a,e,g);b.cancel()}}else r.range.setEndAt(n,CKEDITOR.POSITION_BEFORE_END),(A=r.next())&&A.type==CKEDITOR.NODE_ELEMENT&&
965
965
  A.is(d)&&(A=A.getFirst(q),l.block&&g.checkStartOfBlock()&&g.checkEndOfBlock()?(l.block.remove(),g.moveToElementEditStart(A),g.select()):c(A)?(g.moveToElementEditStart(A),g.select()):(g=g.clone(),g.moveToElementEditStart(A),h(a,e,g)),b.cancel());setTimeout(function(){a.selectionChange(1)})}}}))}})})();(function(){CKEDITOR.plugins.liststyle={requires:"dialog,contextmenu",init:function(a){if(!a.blockless){var l;l=new CKEDITOR.dialogCommand("numberedListStyle",{requiredContent:"ol",allowedContent:"ol{list-style-type}[start]; li{list-style-type}[value]",
966
966
  contentTransformations:[["ol: listTypeToStyle"]]});l=a.addCommand("numberedListStyle",l);a.addFeature(l);CKEDITOR.dialog.add("numberedListStyle",this.path+"dialogs/liststyle.js");l=new CKEDITOR.dialogCommand("bulletedListStyle",{requiredContent:"ul",allowedContent:"ul{list-style-type}",contentTransformations:[["ul: listTypeToStyle"]]});l=a.addCommand("bulletedListStyle",l);a.addFeature(l);CKEDITOR.dialog.add("bulletedListStyle",this.path+"dialogs/liststyle.js");a.addMenuGroup("list",108);a.addMenuItems({numberedlist:{label:a.lang.liststyle.numberedTitle,
967
- group:"list",command:"numberedListStyle"},bulletedlist:{label:a.lang.liststyle.bulletedTitle,group:"list",command:"bulletedListStyle"}});a.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)&&
968
- c.equals(b.getNext(function(a){return!(O(a)||Q(a)||q(a))}))}function l(a){this.upper=a[0];this.lower=a[1];this.set.apply(this,a.slice(2))}function g(a){var b=a.element;if(b&&n(b)&&(b=b.getAscendant(a.triggers,!0))&&a.editable.contains(b)){var c=k(b);if("true"==c.getAttribute("contenteditable"))return b;if(c.is(a.triggers))return c}return null}function e(a,b,c){B(a,b);B(a,c);a=b.size.bottom;c=c.size.top;return a&&c?0|(a+c)/2:a||c}function f(a,c,d){return c=c[d?"getPrevious":"getNext"](function(c){return c&&
967
+ group:"list",command:"numberedListStyle"},bulletedlist:{label:a.lang.liststyle.bulletedTitle,group:"list",command:"bulletedListStyle"}});a.contextMenu.addListener(function(a){if(!a||a.isReadOnly())return null;for(;a;){var f=a.getName();if("ol"==f)return{numberedlist:CKEDITOR.TRISTATE_OFF};if("ul"==f)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)&&
968
+ c.equals(b.getNext(function(a){return!(O(a)||Q(a)||q(a))}))}function l(a){this.upper=a[0];this.lower=a[1];this.set.apply(this,a.slice(2))}function g(a){var b=a.element;if(b&&n(b)&&(b=b.getAscendant(a.triggers,!0))&&a.editable.contains(b)){var c=k(b);if("true"==c.getAttribute("contenteditable"))return b;if(c.is(a.triggers))return c}return null}function f(a,b,c){B(a,b);B(a,c);a=b.size.bottom;c=c.size.top;return a&&c?0|(a+c)/2:a||c}function e(a,c,d){return c=c[d?"getPrevious":"getNext"](function(c){return c&&
969
969
  c.type==CKEDITOR.NODE_TEXT&&!O(c)||n(c)&&!q(c)&&!b(a,c)})}function m(a,b,c){return a>b&&a<c}function k(a,b){if(a.data("cke-editable"))return null;for(b||(a=a.getParent());a&&!a.data("cke-editable");){if(a.hasAttribute("contenteditable"))return a;a=a.getParent()}return null}function h(a){var b=a.doc,d=G('\x3cspan contenteditable\x3d"false" data-cke-magic-line\x3d"1" style\x3d"'+ca+"position:absolute;border-top:1px dashed "+a.boxColor+'"\x3e\x3c/span\x3e',b),e=CKEDITOR.getUrl(this.path+"images/"+(K.hidpi?
970
970
  "hidpi/":"")+"icon"+(a.rtl?"-rtl":"")+".png");C(d,{attach:function(){this.wrap.getParent()||this.wrap.appendTo(a.editable,!0);return this},lineChildren:[C(G('\x3cspan title\x3d"'+a.editor.lang.magicline.title+'" contenteditable\x3d"false"\x3e\x26#8629;\x3c/span\x3e',b),{base:ca+"height:17px;width:17px;"+(a.rtl?"left":"right")+":17px;background:url("+e+") center no-repeat "+a.boxColor+";cursor:pointer;"+(K.hc?"font-size: 15px;line-height:14px;border:1px solid #fff;text-align:center;":"")+(K.hidpi?
971
971
  "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(G(ea,b),{base:V+"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(G(ea,b),{base:V+"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"]})],
@@ -974,83 +974,84 @@ detach:function(){this.wrap.getParent()&&this.wrap.remove();return this},mouseNe
974
974
  0:b.scroll.y,this.look(P)):d.is(N)||m(k.top,b.pane.bottom-5,b.pane.bottom+15)?(k.top=a.inInlineMode?b.editable.height+b.editable.padding.top+b.editable.padding.bottom:b.pane.bottom-1,this.look(N)):(a.inInlineMode&&(k.top-=b.editable.top+b.editable.border.top),this.look(Y));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,
975
975
  c;b--;)(c=this.lineChildren[b]).setAttribute("style",c.base+c.looks[0|a/2]);this.oldLook=a}},wrap:new A("span",a.doc)});for(b=d.lineChildren.length;b--;)d.lineChildren[b].appendTo(d);d.look(Y);d.appendTo(d.wrap);d.unselectable();d.lineChildren[0].on("mouseup",function(b){d.detach();c(a,function(b){var c=a.line.trigger;b[c.is(I)?"insertBefore":"insertAfter"](c.is(I)?c.lower:c.upper)},!0);a.editor.focus();K.ie||a.enterMode==CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();b.data.preventDefault(!0)});d.on("mousedown",
976
976
  function(a){a.data.preventDefault(!0)});a.line=d}function c(a,b,c){var d=new CKEDITOR.dom.range(a.doc),e=a.editor,f;K.ie&&a.enterMode==CKEDITOR.ENTER_BR?f=a.doc.createText(S):(f=(f=k(a.element,!0))&&f.data("cke-enter-mode")||a.enterMode,f=new A(M[f],a.doc),f.is("br")||a.doc.createText(S).appendTo(f));c&&e.fire("saveSnapshot");b(f);d.moveToPosition(f,CKEDITOR.POSITION_AFTER_START);e.getSelection().selectRanges([d]);a.hotNode=f;c&&e.fire("saveSnapshot")}function d(a,b){return{canUndo:!0,modes:{wysiwyg:1},
977
- exec:function(){function d(e){var f=K.ie&&9>K.version?" ":S,h=a.hotNode&&a.hotNode.getText()==f&&a.element.equals(a.hotNode)&&a.lastCmdDirection===!!b;c(a,function(c){h&&a.hotNode&&a.hotNode.remove();c[b?"insertAfter":"insertBefore"](e);c.setAttributes({"data-cke-magicline-hot":1,"data-cke-magicline-dir":!!b});a.lastCmdDirection=!!b});K.ie||a.enterMode==CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();a.line.detach()}return function(c){c=c.getSelection().getStartElement();var e;c=c.getAscendant(T,1);
978
- if(!r(a,c)&&c&&!c.equals(a.editable)&&!c.contains(a.editable)){(e=k(c))&&"false"==e.getAttribute("contenteditable")&&(c=e);a.element=c;e=f(a,c,!b);var h;n(e)&&e.is(a.triggers)&&e.is(W)&&(!f(a,e,!b)||(h=f(a,e,!b))&&n(h)&&h.is(a.triggers))?d(e):(h=g(a,c),n(h)&&(f(a,h,!b)?(c=f(a,h,!b))&&n(c)&&c.is(a.triggers)&&d(h):d(h)))}}}()}}function b(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&&
977
+ exec:function(){function d(e){var f=K.ie&&9>K.version?" ":S,h=a.hotNode&&a.hotNode.getText()==f&&a.element.equals(a.hotNode)&&a.lastCmdDirection===!!b;c(a,function(c){h&&a.hotNode&&a.hotNode.remove();c[b?"insertAfter":"insertBefore"](e);c.setAttributes({"data-cke-magicline-hot":1,"data-cke-magicline-dir":!!b});a.lastCmdDirection=!!b});K.ie||a.enterMode==CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();a.line.detach()}return function(c){c=c.getSelection().getStartElement();var f;c=c.getAscendant(T,1);
978
+ if(!r(a,c)&&c&&!c.equals(a.editable)&&!c.contains(a.editable)){(f=k(c))&&"false"==f.getAttribute("contenteditable")&&(c=f);a.element=c;f=e(a,c,!b);var h;n(f)&&f.is(a.triggers)&&f.is(W)&&(!e(a,f,!b)||(h=e(a,f,!b))&&n(h)&&h.is(a.triggers))?d(f):(h=g(a,c),n(h)&&(e(a,h,!b)?(c=e(a,h,!b))&&n(c)&&c.is(a.triggers)&&d(h):d(h)))}}}()}}function b(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&&
979
979
  a.$}function q(a){if(!n(a))return!1;var b;(b=u(a))||(n(a)?(b={left:1,right:1,center:1},b=!(!b[a.getComputedStyle("float")]&&!b[a.getAttribute("align")])):b=!1);return b}function u(a){return!!{absolute:1,fixed:1}[a.getComputedStyle("position")]}function t(a,b){return n(b)?b.is(a.triggers):null}function r(a,b){if(!b)return!1;for(var c=b.getParents(1),d=c.length;d--;)for(var e=a.tabuList.length;e--;)if(c[d].hasAttribute(a.tabuList[e]))return!0;return!1}function p(a,b,c){b=b[c?"getLast":"getFirst"](function(b){return a.isRelevant(b)&&
980
980
  !b.is(ha)});if(!b)return!1;B(a,b);return c?b.size.top>a.mouse.y:b.size.bottom<a.mouse.y}function y(a){var c=a.editable,d=a.mouse,e=a.view,f=a.triggerOffset;w(a);var h=d.y>(a.inInlineMode?e.editable.top+e.editable.height/2:Math.min(e.editable.height,e.pane.height)/2),c=c[h?"getLast":"getFirst"](function(a){return!(O(a)||Q(a))});if(!c)return null;b(a,c)&&(c=a.line.wrap[h?"getPrevious":"getNext"](function(a){return!(O(a)||Q(a))}));if(!n(c)||q(c)||!t(a,c))return null;B(a,c);return!h&&0<=c.size.top&&m(d.y,
981
- 0,c.size.top+f)?(a=a.inInlineMode||0===e.scroll.y?P:Y,new l([null,c,I,L,a])):h&&c.size.bottom<=e.pane.height&&m(d.y,c.size.bottom-f,e.pane.height)?(a=a.inInlineMode||m(c.size.bottom,e.pane.height-f,e.pane.height)?N:Y,new l([c,null,J,L,a])):null}function x(a){var b=a.mouse,c=a.view,d=a.triggerOffset,e=g(a);if(!e)return null;B(a,e);var d=Math.min(d,0|e.size.outerHeight/2),h=[],k,v;if(m(b.y,e.size.top-1,e.size.top+d))v=!1;else if(m(b.y,e.size.bottom-d,e.size.bottom+1))v=!0;else return null;if(q(e)||
982
- p(a,e,v)||e.getParent().is(Z))return null;var r=f(a,e,!v);if(r){if(r&&r.type==CKEDITOR.NODE_TEXT)return null;if(n(r)){if(q(r)||!t(a,r)||r.getParent().is(Z))return null;h=[r,e][v?"reverse":"concat"]().concat([F,L])}}else e.equals(a.editable[v?"getLast":"getFirst"](a.isRelevant))?(w(a),v&&m(b.y,e.size.bottom-d,c.pane.height)&&m(e.size.bottom,c.pane.height-d,c.pane.height)?k=N:m(b.y,0,e.size.top+d)&&(k=P)):k=Y,h=[null,e][v?"reverse":"concat"]().concat([v?J:I,L,k,e.equals(a.editable[v?"getLast":"getFirst"](a.isRelevant))?
981
+ 0,c.size.top+f)?(a=a.inInlineMode||0===e.scroll.y?P:Y,new l([null,c,I,L,a])):h&&c.size.bottom<=e.pane.height&&m(d.y,c.size.bottom-f,e.pane.height)?(a=a.inInlineMode||m(c.size.bottom,e.pane.height-f,e.pane.height)?N:Y,new l([c,null,J,L,a])):null}function x(a){var b=a.mouse,c=a.view,d=a.triggerOffset,f=g(a);if(!f)return null;B(a,f);var d=Math.min(d,0|f.size.outerHeight/2),h=[],k,v;if(m(b.y,f.size.top-1,f.size.top+d))v=!1;else if(m(b.y,f.size.bottom-d,f.size.bottom+1))v=!0;else return null;if(q(f)||
982
+ p(a,f,v)||f.getParent().is(Z))return null;var r=e(a,f,!v);if(r){if(r&&r.type==CKEDITOR.NODE_TEXT)return null;if(n(r)){if(q(r)||!t(a,r)||r.getParent().is(Z))return null;h=[r,f][v?"reverse":"concat"]().concat([F,L])}}else f.equals(a.editable[v?"getLast":"getFirst"](a.isRelevant))?(w(a),v&&m(b.y,f.size.bottom-d,c.pane.height)&&m(f.size.bottom,c.pane.height-d,c.pane.height)?k=N:m(b.y,0,f.size.top+d)&&(k=P)):k=Y,h=[null,f][v?"reverse":"concat"]().concat([v?J:I,L,k,f.equals(a.editable[v?"getLast":"getFirst"](a.isRelevant))?
983
983
  v?N:P:Y]);return 0 in h?new l(h):null}function z(a,b,c,d){for(var e=b.getDocumentPosition(),f={},h={},g={},k={},l=U.length;l--;)f[U[l]]=parseInt(b.getComputedStyle.call(b,"border-"+U[l]+"-width"),10)||0,g[U[l]]=parseInt(b.getComputedStyle.call(b,"padding-"+U[l]),10)||0,h[U[l]]=parseInt(b.getComputedStyle.call(b,"margin-"+U[l]),10)||0;c&&!d||v(a,d);k.top=e.y-(c?0:a.view.scroll.y);k.left=e.x-(c?0:a.view.scroll.x);k.outerWidth=b.$.offsetWidth;k.outerHeight=b.$.offsetHeight;k.height=k.outerHeight-(g.top+
984
984
  g.bottom+f.top+f.bottom);k.width=k.outerWidth-(g.left+g.right+f.left+f.right);k.bottom=k.top+k.outerHeight;k.right=k.left+k.outerWidth;a.inInlineMode&&(k.scroll={top:b.$.scrollTop,left:b.$.scrollLeft});return C({border:f,padding:g,margin:h,ignoreScroll:c},k,!0)}function B(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-ba)return null;return C(b.size,z(a,b,c),{date:+new Date},!0)}function w(a,b){a.view.editable=z(a,a.editable,b,!0)}function v(a,
985
985
  b){a.view||(a.view={});var c=a.view;if(!(!b&&c&&c.date>new Date-ba)){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-d.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 D(a,b,c,d){for(var e=d,f=d,h=0,g=!1,k=!1,m=a.view.pane.height,n=a.mouse;n.y+h<m&&0<n.y-h;){g||(g=b(e,d));k||(k=b(f,d));!g&&0<n.y-h&&(e=c(a,{x:n.x,y:n.y-h}));
986
- !k&&n.y+h<m&&(f=c(a,{x:n.x,y:n.y+h}));if(g&&k)break;h+=2}return new l([e,f,null,null])}CKEDITOR.plugins.add("magicline",{init:function(a){var e=a.config,k=e.magicline_triggerOffset||30,m={editor:a,enterMode:e.enterMode,triggerOffset:k,holdDistance:0|k*(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?T:{table:1,hr:1,div:1,ul:1,ol:1,dl:1,form:1,blockquote:1}},
986
+ !k&&n.y+h<m&&(f=c(a,{x:n.x,y:n.y+h}));if(g&&k)break;h+=2}return new l([e,f,null,null])}CKEDITOR.plugins.add("magicline",{init:function(a){var f=a.config,k=f.magicline_triggerOffset||30,m={editor:a,enterMode:f.enterMode,triggerOffset:k,holdDistance:0|k*(f.magicline_holdDistance||.5),boxColor:f.magicline_color||"#ff0000",rtl:"rtl"==f.contentsLangDirection,tabuList:["data-cke-hidden-sel"].concat(f.magicline_tabuList||[]),triggers:f.magicline_everywhere?T:{table:1,hr:1,div:1,ul:1,ol:1,dl:1,form:1,blockquote:1}},
987
987
  p,A,D;m.isRelevant=function(a){return n(a)&&!b(m,a)&&!q(a)};a.on("contentDom",function(){var k=a.editable(),n=a.document,q=a.window;C(m,{editable:k,inInlineMode:k.isInline(),doc:n,win:q,hotNode:null},!0);m.boundary=m.inInlineMode?m.editable:m.doc.getDocumentElement();k.is(E.$inline)||(m.inInlineMode&&!u(k)&&k.setStyles({position:"relative",top:null,left:null}),h.call(this,m),v(m),k.attachListener(a,"beforeUndoImage",function(){m.line.detach()}),k.attachListener(a,"beforeGetData",function(){m.line.wrap.getParent()&&
988
988
  (m.line.detach(),a.once("getData",function(){m.line.attach()},null,null,1E3))},null,null,0),k.attachListener(m.inInlineMode?n:n.getWindow().getFrame(),"mouseout",function(b){if("wysiwyg"==a.mode)if(m.inInlineMode){var c=b.data.$.clientX;b=b.data.$.clientY;v(m);w(m,!0);var d=m.view.editable,e=m.view.scroll;c>d.left-e.x&&c<d.right-e.x&&b>d.top-e.y&&b<d.bottom-e.y||(clearTimeout(D),D=null,m.line.detach())}else clearTimeout(D),D=null,m.line.detach()}),k.attachListener(k,"keyup",function(){m.hiddenMode=
989
989
  0}),k.attachListener(k,"keydown",function(b){if("wysiwyg"==a.mode)switch(b.data.getKeystroke()){case 2228240:case 16:m.hiddenMode=1,m.line.detach()}}),k.attachListener(m.inInlineMode?k:n,"mousemove",function(b){A=!0;if("wysiwyg"==a.mode&&!a.readOnly&&!D){var c={x:b.data.$.clientX,y:b.data.$.clientY};D=setTimeout(function(){m.mouse=c;D=m.trigger=null;v(m);A&&!m.hiddenMode&&a.focusManager.hasFocus&&!m.line.mouseNear()&&(m.element=X(m,!0))&&((m.trigger=y(m)||x(m)||R(m))&&!r(m,m.trigger.upper||m.trigger.lower)?
990
990
  m.line.attach().place():(m.trigger=null,m.line.detach()),A=!1)},30)}}),k.attachListener(q,"scroll",function(){"wysiwyg"==a.mode&&(m.line.detach(),K.webkit&&(m.hiddenMode=1,clearTimeout(p),p=setTimeout(function(){m.mouseDown||(m.hiddenMode=0)},50)))}),k.attachListener(H?n:q,"mousedown",function(){"wysiwyg"==a.mode&&(m.line.detach(),m.hiddenMode=1,m.mouseDown=1)}),k.attachListener(H?n:q,"mouseup",function(){m.hiddenMode=0;m.mouseDown=0}),a.addCommand("accessPreviousSpace",d(m)),a.addCommand("accessNextSpace",
991
- d(m,!0)),a.setKeystroke([[e.magicline_keystrokePrevious,"accessPreviousSpace"],[e.magicline_keystrokeNext,"accessNextSpace"]]),a.on("loadSnapshot",function(){var b,c,d,e;for(e in{p:1,br:1,div:1})for(b=a.document.getElementsByTag(e),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:c,boxTrigger:l,isLine:b,getAscendantTrigger:g,getNonEmptyNeighbour:f,getSize:z,that:m,
991
+ d(m,!0)),a.setKeystroke([[f.magicline_keystrokePrevious,"accessPreviousSpace"],[f.magicline_keystrokeNext,"accessNextSpace"]]),a.on("loadSnapshot",function(){var b,c,d,e;for(e in{p:1,br:1,div:1})for(b=a.document.getElementsByTag(e),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:c,boxTrigger:l,isLine:b,getAscendantTrigger:g,getNonEmptyNeighbour:e,getSize:z,that:m,
992
992
  triggerEdge:x,triggerEditable:y,triggerExpand:R})},this)}});var C=CKEDITOR.tools.extend,A=CKEDITOR.dom.element,G=A.createFromHtml,K=CKEDITOR.env,H=CKEDITOR.env.ie&&9>CKEDITOR.env.version,E=CKEDITOR.dtd,M={},I=128,J=64,F=32,L=16,P=4,N=2,Y=1,S=" ",Z=E.$listItem,ha=E.$tableContent,W=C({},E.$nonEditable,E.$empty),T=E.$block,ba=100,ca="width:0px;height:0px;padding:0px;margin:0px;display:block;z-index:9999;color:#fff;position:absolute;font-size: 0px;line-height:0px;",V=ca+"border-color:transparent;display:block;border-style:solid;",
993
993
  ea="\x3cspan\x3e"+S+"\x3c/span\x3e";M[CKEDITOR.ENTER_BR]="br";M[CKEDITOR.ENTER_P]="p";M[CKEDITOR.ENTER_DIV]="div";l.prototype={set:function(a,b,c){this.properties=a+b+(c||Y);return this},is:function(a){return(this.properties&a)==a}};var X=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(c,d,e){if(!c.mouse)return null;var f=c.doc,h=c.line.wrap;e=e||c.mouse;var g=a(f,e);d&&b(c,g)&&(h.hide(),g=a(f,e),h.show());return!g||
994
- g.type!=CKEDITOR.NODE_ELEMENT||!g.$||K.ie&&9>K.version&&!c.boundary.equals(g)&&!c.boundary.contains(g)?null:g}}(),O=CKEDITOR.dom.walker.whitespaces(),Q=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT),R=function(){function c(b){var f=b.element,h,g,k;if(!n(f)||f.contains(b.editable)||f.isReadOnly())return null;k=D(b,function(a,b){return!b.equals(a)},function(a,b){return X(a,!0,b)},f);h=k.upper;g=k.lower;if(a(b,h,g))return k.set(F,8);if(h&&f.contains(h))for(;!h.getParent().equals(f);)h=h.getParent();
995
- else h=f.getFirst(function(a){return d(b,a)});if(g&&f.contains(g))for(;!g.getParent().equals(f);)g=g.getParent();else g=f.getLast(function(a){return d(b,a)});if(!h||!g)return null;B(b,h);B(b,g);if(!m(b.mouse.y,h.size.top,g.size.bottom))return null;for(var f=Number.MAX_VALUE,l,v,w,r;g&&!g.equals(h)&&(v=h.getNext(b.isRelevant));)l=Math.abs(e(b,h,v)-b.mouse.y),l<f&&(f=l,w=h,r=v),h=v,B(b,h);if(!w||!r||!m(b.mouse.y,w.size.top,r.size.bottom))return null;k.upper=w;k.lower=r;return k.set(F,8)}function d(a,
994
+ g.type!=CKEDITOR.NODE_ELEMENT||!g.$||K.ie&&9>K.version&&!c.boundary.equals(g)&&!c.boundary.contains(g)?null:g}}(),O=CKEDITOR.dom.walker.whitespaces(),Q=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT),R=function(){function c(b){var e=b.element,h,g,k;if(!n(e)||e.contains(b.editable)||e.isReadOnly())return null;k=D(b,function(a,b){return!b.equals(a)},function(a,b){return X(a,!0,b)},e);h=k.upper;g=k.lower;if(a(b,h,g))return k.set(F,8);if(h&&e.contains(h))for(;!h.getParent().equals(e);)h=h.getParent();
995
+ else h=e.getFirst(function(a){return d(b,a)});if(g&&e.contains(g))for(;!g.getParent().equals(e);)g=g.getParent();else g=e.getLast(function(a){return d(b,a)});if(!h||!g)return null;B(b,h);B(b,g);if(!m(b.mouse.y,h.size.top,g.size.bottom))return null;for(var e=Number.MAX_VALUE,l,v,w,r;g&&!g.equals(h)&&(v=h.getNext(b.isRelevant));)l=Math.abs(f(b,h,v)-b.mouse.y),l<e&&(e=l,w=h,r=v),h=v,B(b,h);if(!w||!r||!m(b.mouse.y,w.size.top,r.size.bottom))return null;k.upper=w;k.lower=r;return k.set(F,8)}function d(a,
996
996
  c){return!(c&&c.type==CKEDITOR.NODE_TEXT||Q(c)||q(c)||b(a,c)||c.type==CKEDITOR.NODE_ELEMENT&&c.$&&c.is("br"))}return function(b){var d=c(b),e;if(e=d){e=d.upper;var f=d.lower;e=!e||!f||q(f)||q(e)||f.equals(e)||e.equals(f)||f.contains(e)||e.contains(f)?!1:t(b,e)&&t(b,f)&&a(b,e,f)?!0:!1}return e?d:null}}(),U=["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,
997
- e){return CKEDITOR.tools.array.filter(a,function(a){return a.canHandle(e)}).sort(function(a,d){return a.priority===d.priority?0:a.priority-d.priority})}function l(a,e){var c=a.shift();c&&c.handle(e,function(){l(a,e)})}function g(a){var e=CKEDITOR.tools.array.reduce(a,function(a,d){return CKEDITOR.tools.array.isArray(d.filters)?a.concat(d.filters):a},[]);return CKEDITOR.tools.array.filter(e,function(a,d){return CKEDITOR.tools.array.indexOf(e,a)===d})}function e(a,e){var c=0,d,b;if(!CKEDITOR.tools.array.isArray(a)||
998
- 0===a.length)return!0;d=CKEDITOR.tools.array.filter(a,function(a){return-1===CKEDITOR.tools.array.indexOf(f,a)});if(0<d.length)for(b=0;b<d.length;b++)(function(a){CKEDITOR.scriptLoader.queue(a,function(b){b&&f.push(a);++c===d.length&&e()})})(d[b]);return 0===d.length}var f=[],m=CKEDITOR.tools.createClass({$:function(){this.handlers=[]},proto:{register:function(a){"number"!==typeof a.priority&&(a.priority=10);this.handlers.push(a)},addPasteListener:function(f){f.on("paste",function(h){var c=a(this.handlers,
999
- h),d;if(0!==c.length){d=g(c);d=e(d,function(){return f.fire("paste",h.data)});if(!d)return h.cancel();l(c,h)}},this,null,3)}}});CKEDITOR.plugins.add("pastetools",{requires:"clipboard",beforeInit:function(a){a.pasteTools=new m;a.pasteTools.addPasteListener(a)}});CKEDITOR.plugins.pastetools={filters:{},loadFilters:e,createFilter:function(a){var e=CKEDITOR.tools.array.isArray(a.rules)?a.rules:[a.rules],c=a.additionalTransforms;return function(a,b){var f=new CKEDITOR.htmlParser.basicWriter,g=new CKEDITOR.htmlParser.filter,
997
+ e){return CKEDITOR.tools.array.filter(a,function(a){return a.canHandle(e)}).sort(function(a,d){return a.priority===d.priority?0:a.priority-d.priority})}function l(a,e){var c=a.shift();c&&c.handle(e,function(){l(a,e)})}function g(a){var e=CKEDITOR.tools.array.reduce(a,function(a,d){return CKEDITOR.tools.array.isArray(d.filters)?a.concat(d.filters):a},[]);return CKEDITOR.tools.array.filter(e,function(a,d){return CKEDITOR.tools.array.indexOf(e,a)===d})}function f(a,f){var c=0,d,b;if(!CKEDITOR.tools.array.isArray(a)||
998
+ 0===a.length)return!0;d=CKEDITOR.tools.array.filter(a,function(a){return-1===CKEDITOR.tools.array.indexOf(e,a)});if(0<d.length)for(b=0;b<d.length;b++)(function(a){CKEDITOR.scriptLoader.queue(a,function(b){b&&e.push(a);++c===d.length&&f()})})(d[b]);return 0===d.length}var e=[],m=CKEDITOR.tools.createClass({$:function(){this.handlers=[]},proto:{register:function(a){"number"!==typeof a.priority&&(a.priority=10);this.handlers.push(a)},addPasteListener:function(e){e.on("paste",function(h){var c=a(this.handlers,
999
+ h),d;if(0!==c.length){d=g(c);d=f(d,function(){return e.fire("paste",h.data)});if(!d)return h.cancel();l(c,h)}},this,null,3)}}});CKEDITOR.plugins.add("pastetools",{requires:"clipboard",beforeInit:function(a){a.pasteTools=new m;a.pasteTools.addPasteListener(a)}});CKEDITOR.plugins.pastetools={filters:{},loadFilters:f,createFilter:function(a){var e=CKEDITOR.tools.array.isArray(a.rules)?a.rules:[a.rules],c=a.additionalTransforms;return function(a,b){var f=new CKEDITOR.htmlParser.basicWriter,g=new CKEDITOR.htmlParser.filter,
1000
1000
  k;c&&(a=c(a,b));CKEDITOR.tools.array.forEach(e,function(c){g.addRules(c(a,b,g))});k=CKEDITOR.htmlParser.fragment.fromHtml(a);g.applyTo(k);k.writeHtml(f);return f.getHtml()}},getClipboardData:function(a,e){var c;return CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"text/html"===e?(c=a.dataTransfer.getData(e,!0))||"text/html"!==e?c:a.dataValue:null},getConfigValue:function(a,e){if(a&&a.config){var c=CKEDITOR.tools,d=a.config,b=c.object.keys(d),f=["pasteTools_"+e,"pasteFromWord_"+e,"pasteFromWord"+
1001
1001
  c.capitalize(e,!0)],f=c.array.find(f,function(a){return-1!==c.array.indexOf(b,a)});return d[f]}},getContentGeneratorName:function(a){if((a=/<meta\s+name=["']?generator["']?\s+content=["']?(\w+)/gi.exec(a))&&a.length)return a=a[1].toLowerCase(),0===a.indexOf("microsoft")?"microsoft":0===a.indexOf("libreoffice")?"libreoffice":"unknown"}};CKEDITOR.pasteFilters={}})();(function(){CKEDITOR.plugins.add("pastefromlibreoffice",{requires:"pastetools",isSupportedEnvironment:function(){var a=CKEDITOR.env.ie&&
1002
1002
  11>=CKEDITOR.env.version;return!(CKEDITOR.env.webkit&&!CKEDITOR.env.chrome)&&!a},init:function(a){if(this.isSupportedEnvironment()){var l=CKEDITOR.plugins.getPath("pastetools"),g=this.path;a.pasteTools.register({priority:100,filters:[CKEDITOR.getUrl(l+"filter/common.js"),CKEDITOR.getUrl(l+"filter/image.js"),CKEDITOR.getUrl(g+"filter/default.js")],canHandle:function(a){a=a.data;return(a=a.dataTransfer.getData("text/html",!0)||a.dataValue)?"libreoffice"===CKEDITOR.plugins.pastetools.getContentGeneratorName(a):
1003
- !1},handle:function(e,f){var g=e.data,k=g.dataValue||CKEDITOR.plugins.pastetools.getClipboardData(g,"text/html");g.dontFilter=!0;k=CKEDITOR.pasteFilters.image(k,a,CKEDITOR.plugins.pastetools.getClipboardData(g,"text/rtf"));g.dataValue=CKEDITOR.pasteFilters.libreoffice(k,a);!0===a.config.forcePasteAsPlainText&&(g.type="text");f()}})}}})})();(function(){CKEDITOR.plugins.add("pastefromword",{requires:"pastetools",init:function(a){function l(a){var e=CKEDITOR.plugins.pastefromword&&CKEDITOR.plugins.pastefromword.images,
1004
- c,d=[];if(e&&a.editor.filter.check("img[src]")&&(c=e.extractTagsFromHtml(a.data.dataValue),0!==c.length&&(e=e.extractFromRtf(a.data.dataTransfer["text/rtf"]),0!==e.length&&(CKEDITOR.tools.array.forEach(e,function(a){d.push(a.type?"data:"+a.type+";base64,"+CKEDITOR.tools.convertBytesToBase64(CKEDITOR.tools.convertHexStringToBytes(a.hex)):null)},this),c.length===d.length))))for(e=0;e<c.length;e++)0===c[e].indexOf("file://")&&d[e]&&(a.data.dataValue=a.data.dataValue.replace(c[e],d[e]))}var g=0,e=CKEDITOR.plugins.getPath("pastetools"),
1005
- f=this.path,m=void 0===a.config.pasteFromWord_inlineImages?!0:a.config.pasteFromWord_inlineImages,e=[CKEDITOR.getUrl(e+"filter/common.js"),CKEDITOR.getUrl(f+"filter/default.js")];a.addCommand("pastefromword",{canUndo:!1,async:!0,exec:function(a,e){g=1;a.execCommand("paste",{type:"html",notification:e&&"undefined"!==typeof e.notification?e.notification:!0})}});CKEDITOR.plugins.clipboard.addPasteButton(a,"PasteFromWord",{label:a.lang.pastefromword.toolbar,command:"pastefromword",toolbar:"clipboard,50"});
1006
- a.pasteTools.register({filters:a.config.pasteFromWordCleanupFile?[a.config.pasteFromWordCleanupFile]:e,canHandle:function(a){a=CKEDITOR.plugins.pastetools.getClipboardData(a.data,"text/html");var e=CKEDITOR.plugins.pastetools.getContentGeneratorName(a),c=/(class="?Mso|style=["'][^"]*?\bmso\-|w:WordDocument|<o:\w+>|<\/font>)/,e=e?"microsoft"===e:c.test(a);return a&&(g||e)},handle:function(e,f){var c=e.data,d=CKEDITOR.plugins.pastetools.getClipboardData(c,"text/html"),b=CKEDITOR.plugins.pastetools.getClipboardData(c,
1003
+ !1},handle:function(f,e){var g=f.data,k=g.dataValue||CKEDITOR.plugins.pastetools.getClipboardData(g,"text/html");g.dontFilter=!0;k=CKEDITOR.pasteFilters.image(k,a,CKEDITOR.plugins.pastetools.getClipboardData(g,"text/rtf"));g.dataValue=CKEDITOR.pasteFilters.libreoffice(k,a);!0===a.config.forcePasteAsPlainText&&(g.type="text");e()}})}}})})();(function(){CKEDITOR.plugins.add("pastefromword",{requires:"pastetools",init:function(a){function l(a){var e=CKEDITOR.plugins.pastefromword&&CKEDITOR.plugins.pastefromword.images,
1004
+ c,d=[];if(e&&a.editor.filter.check("img[src]")&&(c=e.extractTagsFromHtml(a.data.dataValue),0!==c.length&&(e=e.extractFromRtf(a.data.dataTransfer["text/rtf"]),0!==e.length&&(CKEDITOR.tools.array.forEach(e,function(a){d.push(a.type?"data:"+a.type+";base64,"+CKEDITOR.tools.convertBytesToBase64(CKEDITOR.tools.convertHexStringToBytes(a.hex)):null)},this),c.length===d.length))))for(e=0;e<c.length;e++)0===c[e].indexOf("file://")&&d[e]&&(a.data.dataValue=a.data.dataValue.replace(c[e],d[e]))}var g=0,f=CKEDITOR.plugins.getPath("pastetools"),
1005
+ e=this.path,m=void 0===a.config.pasteFromWord_inlineImages?!0:a.config.pasteFromWord_inlineImages,f=[CKEDITOR.getUrl(f+"filter/common.js"),CKEDITOR.getUrl(e+"filter/default.js")];a.addCommand("pastefromword",{canUndo:!1,async:!0,exec:function(a,e){g=1;a.execCommand("paste",{type:"html",notification:e&&"undefined"!==typeof e.notification?e.notification:!0})}});CKEDITOR.plugins.clipboard.addPasteButton(a,"PasteFromWord",{label:a.lang.pastefromword.toolbar,command:"pastefromword",toolbar:"clipboard,50"});
1006
+ a.pasteTools.register({filters:a.config.pasteFromWordCleanupFile?[a.config.pasteFromWordCleanupFile]:f,canHandle:function(a){a=CKEDITOR.plugins.pastetools.getClipboardData(a.data,"text/html");var e=CKEDITOR.plugins.pastetools.getContentGeneratorName(a),c=/(class="?Mso|style=["'][^"]*?\bmso\-|w:WordDocument|<o:\w+>|<\/font>)/,e=e?"microsoft"===e:c.test(a);return a&&(g||e)},handle:function(e,f){var c=e.data,d=CKEDITOR.plugins.pastetools.getClipboardData(c,"text/html"),b=CKEDITOR.plugins.pastetools.getClipboardData(c,
1007
1007
  "text/rtf"),d={dataValue:d,dataTransfer:{"text/rtf":b}};if(!1!==a.fire("pasteFromWord",d)||g){c.dontFilter=!0;if(g||!a.config.pasteFromWordPromptCleanup||confirm(a.lang.pastefromword.confirmCleanup))d.dataValue=CKEDITOR.cleanWord(d.dataValue,a),a.fire("afterPasteFromWord",d),c.dataValue=d.dataValue,!0===a.config.forcePasteAsPlainText?c.type="text":CKEDITOR.plugins.clipboard.isCustomCopyCutSupported||"allow-word"!==a.config.forcePasteAsPlainText||(c.type="html");g=0;f()}}});if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported&&
1008
- m)a.on("afterPasteFromWord",l)}})})();(function(){var a={canUndo:!1,async:!0,exec:function(a,g){var e=a.lang,f=CKEDITOR.tools.keystrokeToString(e.common.keyboard,a.getCommandKeystroke(CKEDITOR.env.ie?a.commands.paste:this)),m=g&&"undefined"!==typeof g.notification?g.notification:!g||!g.from||"keystrokeHandler"===g.from&&CKEDITOR.env.ie,e=m&&"string"===typeof m?m:e.pastetext.pasteNotification.replace(/%1/,'\x3ckbd aria-label\x3d"'+f.aria+'"\x3e'+f.display+"\x3c/kbd\x3e");a.execCommand("paste",{type:"text",
1009
- notification:m?e:!1})}};CKEDITOR.plugins.add("pastetext",{requires:"clipboard",init:function(l){var g=CKEDITOR.env.safari?CKEDITOR.CTRL+CKEDITOR.ALT+CKEDITOR.SHIFT+86:CKEDITOR.CTRL+CKEDITOR.SHIFT+86;l.addCommand("pastetext",a);l.setKeystroke(g,"pastetext");CKEDITOR.plugins.clipboard.addPasteButton(l,"PasteText",{label:l.lang.pastetext.button,command:"pastetext",toolbar:"clipboard,40"});if(l.config.forcePasteAsPlainText)l.on("beforePaste",function(a){"html"!=a.data.type&&(a.data.type="text")});l.on("pasteState",
1008
+ m)a.on("afterPasteFromWord",l)}})})();(function(){var a={canUndo:!1,async:!0,exec:function(a,g){var f=a.lang,e=CKEDITOR.tools.keystrokeToString(f.common.keyboard,a.getCommandKeystroke(CKEDITOR.env.ie?a.commands.paste:this)),m=g&&"undefined"!==typeof g.notification?g.notification:!g||!g.from||"keystrokeHandler"===g.from&&CKEDITOR.env.ie,f=m&&"string"===typeof m?m:f.pastetext.pasteNotification.replace(/%1/,'\x3ckbd aria-label\x3d"'+e.aria+'"\x3e'+e.display+"\x3c/kbd\x3e");a.execCommand("paste",{type:"text",
1009
+ notification:m?f:!1})}};CKEDITOR.plugins.add("pastetext",{requires:"clipboard",init:function(l){var g=CKEDITOR.env.safari?CKEDITOR.CTRL+CKEDITOR.ALT+CKEDITOR.SHIFT+86:CKEDITOR.CTRL+CKEDITOR.SHIFT+86;l.addCommand("pastetext",a);l.setKeystroke(g,"pastetext");CKEDITOR.plugins.clipboard.addPasteButton(l,"PasteText",{label:l.lang.pastetext.button,command:"pastetext",toolbar:"clipboard,40"});if(l.config.forcePasteAsPlainText)l.on("beforePaste",function(a){"html"!=a.data.type&&(a.data.type="text")});l.on("pasteState",
1010
1010
  function(a){l.getCommand("pastetext").setState(a.data)})}})})();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 l=a._.removeFormatRegex||(a._.removeFormatRegex=new RegExp("^(?:"+a.config.removeFormatTags.replace(/,/g,
1011
- "|")+")$","i")),g=a._.removeAttributes||(a._.removeAttributes=a.config.removeFormatAttributes.split(",")),e=CKEDITOR.plugins.removeformat.filter,f=a.getSelection().getRanges().createIterator(),m=function(a){return a.type==CKEDITOR.NODE_ELEMENT},k=[],h;h=f.getNextRange();){var c=h.createBookmark();h=a.createRange();h.setStartBefore(c.startNode);c.endNode&&h.setEndAfter(c.endNode);h.collapsed||h.enlarge(CKEDITOR.ENLARGE_ELEMENT);var d=h.createBookmark(),b=d.startNode,n=d.endNode,q=function(b){for(var c=
1012
- a.elementPath(b),d=c.elements,f=1,h;(h=d[f])&&!h.equals(c.block)&&!h.equals(c.blockLimit);f++)l.test(h.getName())&&e(a,h)&&b.breakParent(h)};q(b);if(n)for(q(n),b=b.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT);b&&!b.equals(n);)if(b.isReadOnly()){if(b.getPosition(n)&CKEDITOR.POSITION_CONTAINS)break;b=b.getNext(m)}else q=b.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT),"img"==b.getName()&&b.data("cke-realelement")||b.hasAttribute("data-cke-bookmark")||!e(a,b)||(l.test(b.getName())?b.remove(1):(b.removeAttributes(g),
1013
- a.fire("removeFormatCleanup",b))),b=q;d.startNode.remove();d.endNode&&d.endNode.remove();h.moveToBookmark(c);k.push(h)}a.forceNextSelectionCheck();a.getSelection().selectRanges(k)}}},filter:function(a,l){for(var g=a._.removeFormatFilters||[],e=0;e<g.length;e++)if(!1===g[e](l))return!1;return!0}};CKEDITOR.editor.prototype.addRemoveFormatFilter=function(a){this._.removeFormatFilters||(this._.removeFormatFilters=[]);this._.removeFormatFilters.push(a)};CKEDITOR.config.removeFormatTags="b,big,cite,code,del,dfn,em,font,i,ins,kbd,q,s,samp,small,span,strike,strong,sub,sup,tt,u,var";
1014
- CKEDITOR.config.removeFormatAttributes="class,style,lang,width,height,align,hspace,valign";CKEDITOR.plugins.add("resize",{init:function(a){function l(f){var g=c.width,k=c.height,l=g+(f.data.$.screenX-h.x)*("rtl"==m?-1:1);f=k+(f.data.$.screenY-h.y);d&&(g=Math.max(e.resize_minWidth,Math.min(l,e.resize_maxWidth)));b&&(k=Math.max(e.resize_minHeight,Math.min(f,e.resize_maxHeight)));a.resize(d?g:null,k)}function g(){CKEDITOR.document.removeListener("mousemove",l);CKEDITOR.document.removeListener("mouseup",
1015
- g);a.document&&(a.document.removeListener("mousemove",l),a.document.removeListener("mouseup",g))}var e=a.config,f=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=750);void 0===e.resize_minHeight&&(e.resize_minHeight=250);if(!1!==e.resize_enabled){var k=null,h,c,d=("both"==e.resize_dir||
1016
- "horizontal"==e.resize_dir)&&e.resize_minWidth!=e.resize_maxWidth,b=("both"==e.resize_dir||"vertical"==e.resize_dir)&&e.resize_minHeight!=e.resize_maxHeight,n=CKEDITOR.tools.addFunction(function(b){k||(k=a.getResizable());c={width:k.$.offsetWidth||0,height:k.$.offsetHeight||0};h={x:b.screenX,y:b.screenY};e.resize_minWidth>c.width&&(e.resize_minWidth=c.width);e.resize_minHeight>c.height&&(e.resize_minHeight=c.height);CKEDITOR.document.on("mousemove",l);CKEDITOR.document.on("mouseup",g);a.document&&
1017
- (a.document.on("mousemove",l),a.document.on("mouseup",g));b.preventDefault&&b.preventDefault()});a.on("destroy",function(){CKEDITOR.tools.removeFunction(n)});a.on("uiSpace",function(c){if("bottom"==c.data.space){var e="";d&&!b&&(e=" cke_resizer_horizontal");!d&&b&&(e=" cke_resizer_vertical");var h='\x3cspan id\x3d"'+f+'" class\x3d"cke_resizer'+e+" cke_resizer_"+m+'" title\x3d"'+CKEDITOR.tools.htmlEncode(a.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+n+', event)"\x3e'+("ltr"==
1018
- m?"◢":"◣")+"\x3c/span\x3e";"ltr"==m&&"ltr"==e?c.data.html+=h:c.data.html=h+c.data.html}},a,null,100);a.on("maximize",function(b){a.ui.space("resizer")[b.data==CKEDITOR.TRISTATE_ON?"hide":"show"]()})}}});(function(){CKEDITOR.plugins.add("selectall",{init:function(a){a.addCommand("selectAll",{modes:{wysiwyg:1,source:1},exec:function(a){var g=a.editable();if(g.is("textarea"))a=g.$,CKEDITOR.env.ie&&a.createTextRange?a.createTextRange().execCommand("SelectAll"):(a.selectionStart=0,a.selectionEnd=a.value.length),
1019
- a.focus();else{if(g.is("body"))a.document.$.execCommand("SelectAll",!1,null);else{var e=a.createRange();e.selectNodeContents(g);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(){function a(a,e,f){var m,k;if(f="string"==typeof f?CKEDITOR.document.getById(f):new CKEDITOR.dom.element(f))if(m=a.fire("uiSpace",{space:e,html:""}).html)a.on("uiSpace",
1020
- function(a){a.data.space==e&&a.cancel()},null,null,1),k=f.append(CKEDITOR.dom.element.createFromHtml(l.output({id:a.id,name:a.name,langDir:a.lang.dir,langCode:a.langCode,space:e,spaceId:a.ui.spaceId(e),content:m}))),f.getCustomData("cke_hasshared")?k.hide():f.setCustomData("cke_hasshared",1),k.unselectable(),k.on("mousedown",function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()}),a.focusManager.add(k,1),a.on("focus",function(){for(var a=0,c,d=f.getChildren();c=d.getItem(a);a++)c.type==
1011
+ "|")+")$","i")),g=a._.removeAttributes||(a._.removeAttributes=a.config.removeFormatAttributes.split(",")),f=CKEDITOR.plugins.removeformat.filter,e=a.getSelection().getRanges().createIterator(),m=function(a){return a.type==CKEDITOR.NODE_ELEMENT},k=[],h;h=e.getNextRange();){var c=h.createBookmark();h=a.createRange();h.setStartBefore(c.startNode);c.endNode&&h.setEndAfter(c.endNode);h.collapsed||h.enlarge(CKEDITOR.ENLARGE_ELEMENT);var d=h.createBookmark(),b=d.startNode,n=d.endNode,q=function(b){for(var c=
1012
+ a.elementPath(b),d=c.elements,e=1,h;(h=d[e])&&!h.equals(c.block)&&!h.equals(c.blockLimit);e++)l.test(h.getName())&&f(a,h)&&b.breakParent(h)};q(b);if(n)for(q(n),b=b.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT);b&&!b.equals(n);)if(b.isReadOnly()){if(b.getPosition(n)&CKEDITOR.POSITION_CONTAINS)break;b=b.getNext(m)}else q=b.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT),"img"==b.getName()&&b.data("cke-realelement")||b.hasAttribute("data-cke-bookmark")||!f(a,b)||(l.test(b.getName())?b.remove(1):(b.removeAttributes(g),
1013
+ a.fire("removeFormatCleanup",b))),b=q;d.startNode.remove();d.endNode&&d.endNode.remove();h.moveToBookmark(c);k.push(h)}a.forceNextSelectionCheck();a.getSelection().selectRanges(k)}}},filter:function(a,l){for(var g=a._.removeFormatFilters||[],f=0;f<g.length;f++)if(!1===g[f](l))return!1;return!0}};CKEDITOR.editor.prototype.addRemoveFormatFilter=function(a){this._.removeFormatFilters||(this._.removeFormatFilters=[]);this._.removeFormatFilters.push(a)};CKEDITOR.config.removeFormatTags="b,big,cite,code,del,dfn,em,font,i,ins,kbd,q,s,samp,small,span,strike,strong,sub,sup,tt,u,var";
1014
+ CKEDITOR.config.removeFormatAttributes="class,style,lang,width,height,align,hspace,valign";CKEDITOR.plugins.add("resize",{init:function(a){function l(e){var g=c.width,k=c.height,l=g+(e.data.$.screenX-h.x)*("rtl"==m?-1:1);e=k+(e.data.$.screenY-h.y);d&&(g=Math.max(f.resize_minWidth,Math.min(l,f.resize_maxWidth)));b&&(k=Math.max(f.resize_minHeight,Math.min(e,f.resize_maxHeight)));a.resize(d?g:null,k)}function g(){CKEDITOR.document.removeListener("mousemove",l);CKEDITOR.document.removeListener("mouseup",
1015
+ g);a.document&&(a.document.removeListener("mousemove",l),a.document.removeListener("mouseup",g))}var f=a.config,e=a.ui.spaceId("resizer"),m=a.element?a.element.getDirection(1):"ltr";!f.resize_dir&&(f.resize_dir="vertical");void 0===f.resize_maxWidth&&(f.resize_maxWidth=3E3);void 0===f.resize_maxHeight&&(f.resize_maxHeight=3E3);void 0===f.resize_minWidth&&(f.resize_minWidth=750);void 0===f.resize_minHeight&&(f.resize_minHeight=250);if(!1!==f.resize_enabled){var k=null,h,c,d=("both"==f.resize_dir||
1016
+ "horizontal"==f.resize_dir)&&f.resize_minWidth!=f.resize_maxWidth,b=("both"==f.resize_dir||"vertical"==f.resize_dir)&&f.resize_minHeight!=f.resize_maxHeight,n=CKEDITOR.tools.addFunction(function(b){k||(k=a.getResizable());c={width:k.$.offsetWidth||0,height:k.$.offsetHeight||0};h={x:b.screenX,y:b.screenY};f.resize_minWidth>c.width&&(f.resize_minWidth=c.width);f.resize_minHeight>c.height&&(f.resize_minHeight=c.height);CKEDITOR.document.on("mousemove",l);CKEDITOR.document.on("mouseup",g);a.document&&
1017
+ (a.document.on("mousemove",l),a.document.on("mouseup",g));b.preventDefault&&b.preventDefault()});a.on("destroy",function(){CKEDITOR.tools.removeFunction(n)});a.on("uiSpace",function(c){if("bottom"==c.data.space){var f="";d&&!b&&(f=" cke_resizer_horizontal");!d&&b&&(f=" cke_resizer_vertical");var h='\x3cspan id\x3d"'+e+'" class\x3d"cke_resizer'+f+" cke_resizer_"+m+'" title\x3d"'+CKEDITOR.tools.htmlEncode(a.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+n+', event)"\x3e'+("ltr"==
1018
+ m?"◢":"◣")+"\x3c/span\x3e";"ltr"==m&&"ltr"==f?c.data.html+=h:c.data.html=h+c.data.html}},a,null,100);a.on("maximize",function(b){a.ui.space("resizer")[b.data==CKEDITOR.TRISTATE_ON?"hide":"show"]()})}}});(function(){CKEDITOR.plugins.add("selectall",{init:function(a){a.addCommand("selectAll",{modes:{wysiwyg:1,source:1},exec:function(a){var g=a.editable();if(g.is("textarea"))a=g.$,CKEDITOR.env.ie&&a.createTextRange?a.createTextRange().execCommand("SelectAll"):(a.selectionStart=0,a.selectionEnd=a.value.length),
1019
+ a.focus();else{if(g.is("body"))a.document.$.execCommand("SelectAll",!1,null);else{var f=a.createRange();f.selectNodeContents(g);f.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(){function a(a,f,e){var m,k;if(e="string"==typeof e?CKEDITOR.document.getById(e):new CKEDITOR.dom.element(e))if(m=a.fire("uiSpace",{space:f,html:""}).html)a.on("uiSpace",
1020
+ function(a){a.data.space==f&&a.cancel()},null,null,1),k=e.append(CKEDITOR.dom.element.createFromHtml(l.output({id:a.id,name:a.name,langDir:a.lang.dir,langCode:a.langCode,space:f,spaceId:a.ui.spaceId(f),content:m}))),e.getCustomData("cke_hasshared")?k.hide():e.setCustomData("cke_hasshared",1),k.unselectable(),k.on("mousedown",function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()}),a.focusManager.add(k,1),a.on("focus",function(){for(var a=0,c,d=e.getChildren();c=d.getItem(a);a++)c.type==
1021
1021
  CKEDITOR.NODE_ELEMENT&&!c.equals(k)&&c.hasClass("cke_shared")&&c.hide();k.show()}),a.on("destroy",function(){k.remove()})}var l=CKEDITOR.addTemplate("sharedcontainer",'\x3cdiv id\x3d"cke_{name}" class\x3d"cke {id} cke_reset_all cke_chrome cke_editor_{name} cke_shared cke_detached cke_{langDir} '+CKEDITOR.env.cssClass+'" dir\x3d"{langDir}" title\x3d"'+(CKEDITOR.env.gecko?" ":"")+'" lang\x3d"{langCode}" role\x3d"presentation"\x3e\x3cdiv class\x3d"cke_inner"\x3e\x3cdiv id\x3d"{spaceId}" class\x3d"cke_{space}" role\x3d"presentation"\x3e{content}\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e');
1022
- CKEDITOR.plugins.add("sharedspace",{init:function(g){g.on("loaded",function(){var e=g.config.sharedSpaces;if(e)for(var f in e)a(g,f,e[f])},null,null,9)}})})();(function(){CKEDITOR.plugins.add("sourcearea",{init:function(l){function g(){var a=f&&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(l.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var e=
1022
+ CKEDITOR.plugins.add("sharedspace",{init:function(g){g.on("loaded",function(){var f=g.config.sharedSpaces;if(f)for(var e in f)a(g,e,f[e])},null,null,9)}})})();(function(){CKEDITOR.plugins.add("sourcearea",{init:function(l){function g(){var a=e&&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(l.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var f=
1023
1023
  CKEDITOR.plugins.sourcearea;l.addMode("source",function(e){var f=l.ui.space("contents").getDocument().createElement("textarea");f.setStyles(CKEDITOR.tools.extend({width:CKEDITOR.env.ie7Compat?"99%":"100%",height:"100%",resize:"none",outline:"none","text-align":"left"},CKEDITOR.tools.cssVendorPrefix("tab-size",l.config.sourceAreaTabSize||4)));f.setAttribute("dir","ltr");f.addClass("cke_source").addClass("cke_reset").addClass("cke_enable_context_menu");l.ui.space("contents").append(f);f=l.editable(new a(l,
1024
- f));f.setData(l.getData(1));CKEDITOR.env.ie&&(f.attachListener(l,"resize",g,f),f.attachListener(CKEDITOR.document.getWindow(),"resize",g,f),CKEDITOR.tools.setTimeout(g,0,f));l.fire("ariaWidget",this);e()});l.addCommand("source",e.commands.source);l.ui.addButton&&l.ui.addButton("Source",{label:l.lang.sourcearea.toolbar,command:"source",toolbar:"mode,10"});l.on("mode",function(){l.getCommand("source").setState("source"==l.mode?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)});var f=CKEDITOR.env.ie&&9==
1024
+ f));f.setData(l.getData(1));CKEDITOR.env.ie&&(f.attachListener(l,"resize",g,f),f.attachListener(CKEDITOR.document.getWindow(),"resize",g,f),CKEDITOR.tools.setTimeout(g,0,f));l.fire("ariaWidget",this);e()});l.addCommand("source",f.commands.source);l.ui.addButton&&l.ui.addButton("Source",{label:l.lang.sourcearea.toolbar,command:"source",toolbar:"mode,10"});l.on("mode",function(){l.getCommand("source").setState("source"==l.mode?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)});var e=CKEDITOR.env.ie&&9==
1025
1025
  CKEDITOR.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=
1026
- {commands:{source:{modes:{wysiwyg:1,source: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,
1027
- lt:1,lv: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},requires:"dialog",init:function(a){var l=this;CKEDITOR.dialog.add("specialchar",this.path+"dialogs/specialchar.js");a.addCommand("specialchar",{exec:function(){var g=a.langCode,g=l.availableLangs[g]?g:l.availableLangs[g.replace(/-.*/,"")]?g.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(l.path+"dialogs/lang/"+g+".js"),function(){CKEDITOR.tools.extend(a.lang.specialchar,
1028
- l.langEntries[g]);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(" ");
1029
- (function(){CKEDITOR.plugins.add("stylescombo",{requires:"richcombo",init:function(a){var l=a.config,g=a.lang.stylescombo,e={},f=[],m=[];a.on("stylesSet",function(g){if(g=g.data.styles){for(var h,c,d,b=0,n=g.length;b<n;b++)(h=g[b],a.blockless&&h.element in CKEDITOR.dtd.$block||"string"==typeof h.type&&!CKEDITOR.style.customHandlers[h.type]||(c=h.name,h=new CKEDITOR.style(h),a.filter.customConfig&&!a.filter.check(h)))||(h._name=c,h._.enterMode=l.enterMode,h._.type=d=h.assignedTo||h.type,h._.weight=
1030
- b+1E3*(d==CKEDITOR.STYLE_OBJECT?1:d==CKEDITOR.STYLE_BLOCK?2:3),e[c]=h,f.push(h),m.push(h));f.sort(function(a,b){return a._.weight-b._.weight})}});a.ui.addRichCombo("Styles",{label:g.label,title:g.panelTitle,toolbar:"styles,10",allowedContent:m,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(l.contentsCss),multiSelect:!0,attributes:{"aria-label":g.panelTitle}},init:function(){var a,e,c,d,b,l;b=0;for(l=f.length;b<l;b++)a=f[b],e=a._name,d=a._.type,d!=c&&(this.startGroup(g["panelTitle"+String(d)]),
1031
- c=d),this.add(e,a.type==CKEDITOR.STYLE_OBJECT?e:a.buildPreview(),e);this.commit()},onClick:function(f){a.focus();a.fire("saveSnapshot");f=e[f];var h=a.elementPath();if(f.group&&f.removeStylesFromSameGroup(a))a.applyStyle(f);else a[f.checkActive(h,a)?"removeStyle":"applyStyle"](f);a.fire("saveSnapshot")},onRender:function(){a.on("selectionChange",function(f){var h=this.getValue();f=f.data.path.elements;for(var c=0,d=f.length,b;c<d;c++){b=f[c];for(var g in e)if(e[g].checkElementRemovable(b,!0,a)){g!=
1032
- h&&this.setValue(g);return}}this.setValue("")},this)},onOpen:function(){var f=a.getSelection(),f=f.getSelectedElement()||f.getStartElement()||a.editable(),f=a.elementPath(f),h=[0,0,0,0];this.showAll();this.unmarkAll();for(var c in e){var d=e[c],b=d._.type;d.checkApplicable(f,a,a.activeFilter)?h[b]++:this.hideItem(c);d.checkActive(f,a)&&this.mark(c)}h[CKEDITOR.STYLE_BLOCK]||this.hideGroup(g["panelTitle"+String(CKEDITOR.STYLE_BLOCK)]);h[CKEDITOR.STYLE_INLINE]||this.hideGroup(g["panelTitle"+String(CKEDITOR.STYLE_INLINE)]);
1033
- h[CKEDITOR.STYLE_OBJECT]||this.hideGroup(g["panelTitle"+String(CKEDITOR.STYLE_OBJECT)])},refresh:function(){var f=a.elementPath();if(f){for(var h in e)if(e[h].checkApplicable(f,a,a.activeFilter))return;this.setState(CKEDITOR.TRISTATE_DISABLED)}},reset:function(){e={};f=[]}})}})})();(function(){function a(a){return{editorFocus:!1,canUndo:!1,modes:{wysiwyg:1},exec:function(e){if(e.editable().hasFocus){var g=e.getSelection(),h;if(h=(new CKEDITOR.dom.elementPath(g.getCommonAncestor(),g.root)).contains({td:1,
1034
- th:1},1)){var g=e.createRange(),c=CKEDITOR.tools.tryThese(function(){var b=h.getParent().$.cells[h.$.cellIndex+(a?-1:1)];b.parentNode.parentNode;return b},function(){var b=h.getParent(),b=b.getAscendant("table").$.rows[b.$.rowIndex+(a?-1:1)];return b.cells[a?b.cells.length-1:0]});if(c||a)if(c)c=new CKEDITOR.dom.element(c),g.moveToElementEditStart(c),g.checkStartOfBlock()&&g.checkEndOfBlock()||g.selectNodeContents(c);else return!0;else{for(var d=h.getAscendant("table").$,c=h.getParent().$.cells,d=
1035
- new CKEDITOR.dom.element(d.insertRow(-1),e.document),b=0,l=c.length;b<l;b++)d.append((new CKEDITOR.dom.element(c[b],e.document)).clone(!1,!1)).appendBogus();g.moveToElementEditStart(d)}g.select(!0);return!0}}return!1}}}var l={editorFocus:!1,modes:{wysiwyg:1,source:1}},g={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(f){for(var m=!1!==f.config.enableTabKeyTools,k=f.config.tabSpaces||0,
1036
- h="";k--;)h+=" ";if(h)f.on("key",function(a){9==a.data.keyCode&&(f.insertText(h),a.cancel())});if(m)f.on("key",function(a){(9==a.data.keyCode&&f.execCommand("selectNextCell")||a.data.keyCode==CKEDITOR.SHIFT+9&&f.execCommand("selectPreviousCell"))&&a.cancel()});f.addCommand("blur",CKEDITOR.tools.extend(g,l));f.addCommand("blurBack",CKEDITOR.tools.extend(e,l));f.addCommand("selectNextCell",a());f.addCommand("selectPreviousCell",a(!0))}})})();CKEDITOR.dom.element.prototype.focusNext=function(a,l){var g=
1037
- void 0===l?this.getTabIndex():l,e,f,m,k,h,c;if(0>=g)for(h=this.getNextSourceNode(a,CKEDITOR.NODE_ELEMENT);h;){if(h.isVisible()&&0===h.getTabIndex()){m=h;break}h=h.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT)}else for(h=this.getDocument().getBody().getFirst();h=h.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!e)if(!f&&h.equals(this)){if(f=!0,a){if(!(h=h.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;e=1}}else f&&!this.contains(h)&&(e=1);if(h.isVisible()&&!(0>(c=h.getTabIndex()))){if(e&&c==g){m=
1038
- h;break}c>g&&(!m||!k||c<k)?(m=h,k=c):m||0!==c||(m=h,k=c)}}m&&m.focus()};CKEDITOR.dom.element.prototype.focusPrevious=function(a,l){for(var g=void 0===l?this.getTabIndex():l,e,f,m,k=0,h,c=this.getDocument().getBody().getLast();c=c.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!e)if(!f&&c.equals(this)){if(f=!0,a){if(!(c=c.getPreviousSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;e=1}}else f&&!this.contains(c)&&(e=1);if(c.isVisible()&&!(0>(h=c.getTabIndex())))if(0>=g){if(e&&0===h){m=c;break}h>k&&
1039
- (m=c,k=h)}else{if(e&&h==g){m=c;break}h<g&&(!m||h>k)&&(m=c,k=h)}}m&&m.focus()};CKEDITOR.plugins.add("table",{requires:"dialog",init:function(a){function l(a){return CKEDITOR.tools.extend(a||{},{contextSensitive:1,refresh:function(a,e){this.setState(e.contains("table",1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}if(!a.blockless){var g=a.lang.table;a.addCommand("table",new CKEDITOR.dialogCommand("table",{context:"table",allowedContent:"table{width,height,border-collapse}[align,border,cellpadding,cellspacing,summary];caption tbody thead tfoot;th td tr[scope];td{border*,background-color,vertical-align,width,height}[colspan,rowspan];"+
1040
- (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 f;if(a.styles.border)f=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"]&&
1041
- g["border-top"]===g["border-bottom"]&&(f=CKEDITOR.tools.style.parse.border(g["border-top"]))}f&&f.style&&"solid"===f.style&&f.width&&0!==parseFloat(f.width)&&(a.attributes.border=1);"collapse"==a.styles["border-collapse"]&&(a.attributes.cellspacing=0)}}}]]}));a.addCommand("tableProperties",new CKEDITOR.dialogCommand("tableProperties",l()));a.addCommand("tableDelete",l({exec:function(a){var f=a.elementPath().contains("table",1);if(f){var g=f.getParent(),k=a.editable();1!=g.getChildCount()||g.is("td",
1042
- "th")||g.equals(k)||(f=g);a=a.createRange();a.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START);f.remove();a.select()}}}));a.ui.addButton&&a.ui.addButton("Table",{label:g.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:g.menu,command:"tableProperties",group:"table",order:5},tabledelete:{label:g.deleteTable,command:"tableDelete",group:"table",
1026
+ {commands:{source:{modes:{wysiwyg:1,source: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("sourcedialog",{requires:"dialog",init:function(a){a.addCommand("sourcedialog",new CKEDITOR.dialogCommand("sourcedialog"));CKEDITOR.dialog.add("sourcedialog",this.path+"dialogs/sourcedialog.js");a.ui.addButton&&a.ui.addButton("Sourcedialog",
1027
+ {label:a.lang.sourcedialog.toolbar,command:"sourcedialog",toolbar:"mode,10"})}});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,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},requires:"dialog",init:function(a){var l=
1028
+ this;CKEDITOR.dialog.add("specialchar",this.path+"dialogs/specialchar.js");a.addCommand("specialchar",{exec:function(){var g=a.langCode,g=l.availableLangs[g]?g:l.availableLangs[g.replace(/-.*/,"")]?g.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(l.path+"dialogs/lang/"+g+".js"),function(){CKEDITOR.tools.extend(a.lang.specialchar,l.langEntries[g]);a.openDialog("specialchar")})},modes:{wysiwyg:1},canUndo:!1});a.ui.addButton&&a.ui.addButton("SpecialChar",{label:a.lang.specialchar.toolbar,
1029
+ 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(" ");
1030
+ (function(){CKEDITOR.plugins.add("stylescombo",{requires:"richcombo",init:function(a){var l=a.config,g=a.lang.stylescombo,f={},e=[],m=[];a.on("stylesSet",function(g){if(g=g.data.styles){for(var h,c,d,b=0,n=g.length;b<n;b++)(h=g[b],a.blockless&&h.element in CKEDITOR.dtd.$block||"string"==typeof h.type&&!CKEDITOR.style.customHandlers[h.type]||(c=h.name,h=new CKEDITOR.style(h),a.filter.customConfig&&!a.filter.check(h)))||(h._name=c,h._.enterMode=l.enterMode,h._.type=d=h.assignedTo||h.type,h._.weight=
1031
+ b+1E3*(d==CKEDITOR.STYLE_OBJECT?1:d==CKEDITOR.STYLE_BLOCK?2:3),f[c]=h,e.push(h),m.push(h));e.sort(function(a,b){return a._.weight-b._.weight})}});a.ui.addRichCombo("Styles",{label:g.label,title:g.panelTitle,toolbar:"styles,10",allowedContent:m,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(l.contentsCss),multiSelect:!0,attributes:{"aria-label":g.panelTitle}},init:function(){var a,f,c,d,b,l;b=0;for(l=e.length;b<l;b++)a=e[b],f=a._name,d=a._.type,d!=c&&(this.startGroup(g["panelTitle"+String(d)]),
1032
+ c=d),this.add(f,a.type==CKEDITOR.STYLE_OBJECT?f:a.buildPreview(),f);this.commit()},onClick:function(e){a.focus();a.fire("saveSnapshot");e=f[e];var h=a.elementPath();if(e.group&&e.removeStylesFromSameGroup(a))a.applyStyle(e);else a[e.checkActive(h,a)?"removeStyle":"applyStyle"](e);a.fire("saveSnapshot")},onRender:function(){a.on("selectionChange",function(e){var h=this.getValue();e=e.data.path.elements;for(var c=0,d=e.length,b;c<d;c++){b=e[c];for(var g in f)if(f[g].checkElementRemovable(b,!0,a)){g!=
1033
+ h&&this.setValue(g);return}}this.setValue("")},this)},onOpen:function(){var e=a.getSelection(),e=e.getSelectedElement()||e.getStartElement()||a.editable(),e=a.elementPath(e),h=[0,0,0,0];this.showAll();this.unmarkAll();for(var c in f){var d=f[c],b=d._.type;d.checkApplicable(e,a,a.activeFilter)?h[b]++:this.hideItem(c);d.checkActive(e,a)&&this.mark(c)}h[CKEDITOR.STYLE_BLOCK]||this.hideGroup(g["panelTitle"+String(CKEDITOR.STYLE_BLOCK)]);h[CKEDITOR.STYLE_INLINE]||this.hideGroup(g["panelTitle"+String(CKEDITOR.STYLE_INLINE)]);
1034
+ h[CKEDITOR.STYLE_OBJECT]||this.hideGroup(g["panelTitle"+String(CKEDITOR.STYLE_OBJECT)])},refresh:function(){var e=a.elementPath();if(e){for(var h in f)if(f[h].checkApplicable(e,a,a.activeFilter))return;this.setState(CKEDITOR.TRISTATE_DISABLED)}},reset:function(){f={};e=[]}})}})})();(function(){function a(a){return{editorFocus:!1,canUndo:!1,modes:{wysiwyg:1},exec:function(f){if(f.editable().hasFocus){var g=f.getSelection(),h;if(h=(new CKEDITOR.dom.elementPath(g.getCommonAncestor(),g.root)).contains({td:1,
1035
+ th:1},1)){var g=f.createRange(),c=CKEDITOR.tools.tryThese(function(){var b=h.getParent().$.cells[h.$.cellIndex+(a?-1:1)];b.parentNode.parentNode;return b},function(){var b=h.getParent(),b=b.getAscendant("table").$.rows[b.$.rowIndex+(a?-1:1)];return b.cells[a?b.cells.length-1:0]});if(c||a)if(c)c=new CKEDITOR.dom.element(c),g.moveToElementEditStart(c),g.checkStartOfBlock()&&g.checkEndOfBlock()||g.selectNodeContents(c);else return!0;else{for(var d=h.getAscendant("table").$,c=h.getParent().$.cells,d=
1036
+ new CKEDITOR.dom.element(d.insertRow(-1),f.document),b=0,l=c.length;b<l;b++)d.append((new CKEDITOR.dom.element(c[b],f.document)).clone(!1,!1)).appendBogus();g.moveToElementEditStart(d)}g.select(!0);return!0}}return!1}}}var l={editorFocus:!1,modes:{wysiwyg:1,source:1}},g={exec:function(a){a.container.focusNext(!0,a.tabIndex)}},f={exec:function(a){a.container.focusPrevious(!0,a.tabIndex)}};CKEDITOR.plugins.add("tab",{init:function(e){for(var m=!1!==e.config.enableTabKeyTools,k=e.config.tabSpaces||0,
1037
+ h="";k--;)h+=" ";if(h)e.on("key",function(a){9==a.data.keyCode&&(e.insertText(h),a.cancel())});if(m)e.on("key",function(a){(9==a.data.keyCode&&e.execCommand("selectNextCell")||a.data.keyCode==CKEDITOR.SHIFT+9&&e.execCommand("selectPreviousCell"))&&a.cancel()});e.addCommand("blur",CKEDITOR.tools.extend(g,l));e.addCommand("blurBack",CKEDITOR.tools.extend(f,l));e.addCommand("selectNextCell",a());e.addCommand("selectPreviousCell",a(!0))}})})();CKEDITOR.dom.element.prototype.focusNext=function(a,l){var g=
1038
+ void 0===l?this.getTabIndex():l,f,e,m,k,h,c;if(0>=g)for(h=this.getNextSourceNode(a,CKEDITOR.NODE_ELEMENT);h;){if(h.isVisible()&&0===h.getTabIndex()){m=h;break}h=h.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT)}else for(h=this.getDocument().getBody().getFirst();h=h.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!f)if(!e&&h.equals(this)){if(e=!0,a){if(!(h=h.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;f=1}}else e&&!this.contains(h)&&(f=1);if(h.isVisible()&&!(0>(c=h.getTabIndex()))){if(f&&c==g){m=
1039
+ h;break}c>g&&(!m||!k||c<k)?(m=h,k=c):m||0!==c||(m=h,k=c)}}m&&m.focus()};CKEDITOR.dom.element.prototype.focusPrevious=function(a,l){for(var g=void 0===l?this.getTabIndex():l,f,e,m,k=0,h,c=this.getDocument().getBody().getLast();c=c.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!f)if(!e&&c.equals(this)){if(e=!0,a){if(!(c=c.getPreviousSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;f=1}}else e&&!this.contains(c)&&(f=1);if(c.isVisible()&&!(0>(h=c.getTabIndex())))if(0>=g){if(f&&0===h){m=c;break}h>k&&
1040
+ (m=c,k=h)}else{if(f&&h==g){m=c;break}h<g&&(!m||h>k)&&(m=c,k=h)}}m&&m.focus()};CKEDITOR.plugins.add("table",{requires:"dialog",init:function(a){function l(a){return CKEDITOR.tools.extend(a||{},{contextSensitive:1,refresh:function(a,f){this.setState(f.contains("table",1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}if(!a.blockless){var g=a.lang.table;a.addCommand("table",new CKEDITOR.dialogCommand("table",{context:"table",allowedContent:"table{width,height,border-collapse}[align,border,cellpadding,cellspacing,summary];caption tbody thead tfoot;th td tr[scope];td{border*,background-color,vertical-align,width,height}[colspan,rowspan];"+
1041
+ (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 e;if(a.styles.border)e=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"]&&
1042
+ g["border-top"]===g["border-bottom"]&&(e=CKEDITOR.tools.style.parse.border(g["border-top"]))}e&&e.style&&"solid"===e.style&&e.width&&0!==parseFloat(e.width)&&(a.attributes.border=1);"collapse"==a.styles["border-collapse"]&&(a.attributes.cellspacing=0)}}}]]}));a.addCommand("tableProperties",new CKEDITOR.dialogCommand("tableProperties",l()));a.addCommand("tableDelete",l({exec:function(a){var e=a.elementPath().contains("table",1);if(e){var g=e.getParent(),k=a.editable();1!=g.getChildCount()||g.is("td",
1043
+ "th")||g.equals(k)||(e=g);a=a.createRange();a.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START);e.remove();a.select()}}}));a.ui.addButton&&a.ui.addButton("Table",{label:g.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:g.menu,command:"tableProperties",group:"table",order:5},tabledelete:{label:g.deleteTable,command:"tableDelete",group:"table",
1043
1044
  order: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){var b=/^(?:td|th)$/;0<e.length||a.type!=CKEDITOR.NODE_ELEMENT||!b.test(a.getName())||a.getCustomData("selected_cell")||(CKEDITOR.dom.element.setMarker(f,
1044
- a,"selected_cell",!0),e.push(a))}var e=[],f={};if(!a)return e;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)&&e.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(f,l,"selected_cell",!0),e.push(l))}}CKEDITOR.dom.element.clearAllMarkers(f);
1045
- return e}function l(b,c){for(var d=t(b)?b:a(b),e=d[0],f=e.getAscendant("table"),e=e.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(f.$.rows[k]),h=c?h:k,g=c?g:d,d=CKEDITOR.tools.buildTableMap(f),f=d[h],h=c?d[h-1]:d[h+1],d=d[0].length,e=e.createElement("tr"),k=0;f[k]&&k<d;k++){var l;1<f[k].rowSpan&&h&&f[k]==h[k]?(l=f[k],l.rowSpan+=1):(l=(new CKEDITOR.dom.element(f[k])).clone(),l.removeAttribute("rowSpan"),l.appendBogus(),
1046
- e.append(l),l=l.$);k+=l.colSpan-1}c?e.insertBefore(g):e.insertAfter(g);return e}function g(b){if(b instanceof CKEDITOR.dom.selection){var c=b.getRanges(),d=a(b),e=d[0].getAscendant("table"),f=CKEDITOR.tools.buildTableMap(e),h=d[0].getParent().$.rowIndex,d=d[d.length-1],k=d.getParent().$.rowIndex+d.$.rowSpan-1,d=[];b.reset();for(b=h;b<=k;b++){for(var l=f[b],m=new CKEDITOR.dom.element(e.$.rows[b]),n=0;n<l.length;n++){var A=new CKEDITOR.dom.element(l[n]),q=A.getParent().$.rowIndex;1==A.$.rowSpan?A.remove():
1047
- (--A.$.rowSpan,q==b&&(q=f[b+1],q[n-1]?A.insertAfter(new CKEDITOR.dom.element(q[n-1])):(new CKEDITOR.dom.element(e.$.rows[b+1])).append(A,1)));n+=A.$.colSpan-1}d.push(m)}f=e.$.rows;c[0].moveToPosition(e,CKEDITOR.POSITION_BEFORE_START);h=new CKEDITOR.dom.element(f[k+1]||(0<h?f[h-1]:null)||e.$.parentNode);for(b=d.length;0<=b;b--)g(d[b]);return e.$.parentNode?h:(c[0].select(),null)}b instanceof CKEDITOR.dom.element&&(e=b.getAscendant("table"),1==e.$.rows.length?e.remove():b.remove());return null}function e(a){for(var b=
1048
- a.getParent().$.cells,c=0,d=0;d<b.length;d++){var e=b[d],c=c+e.colSpan;if(e==a.$)break}return c-1}function f(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,c){for(var d=t(b)?b:a(b),e=d[0].getAscendant("table"),g=f(d,1),d=f(d),h=c?g:d,k=CKEDITOR.tools.buildTableMap(e),e=[],g=[],d=[],l=k.length,m=0;m<l;m++){var n=c?k[m][h-1]:k[m][h+1];e.push(k[m][h]);g.push(n)}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]),
1049
- k=h.clone(),k.removeAttribute("colSpan"),k.appendBogus(),k[c?"insertBefore":"insertAfter"].call(k,h),d.push(k),k=k.$),m+=k.rowSpan-1);return d}function k(b){function c(a){var b=a.getRanges(),d,e;if(1!==b.length)return a;b=b[0];if(b.collapsed||0!==b.endOffset)return a;d=b.endContainer;e=d.getName().toLowerCase();if("td"!==e&&"th"!==e)return a;for((e=d.getPrevious())||(e=d.getParent().getPrevious().getLast());e.type!==CKEDITOR.NODE_TEXT&&"br"!==e.getName().toLowerCase();)if(e=e.getLast(),!e)return a;
1050
- b.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);return b.select()}CKEDITOR.env.webkit&&!b.isFake&&(b=c(b));var d=b.getRanges(),e=a(b),f=e[0],g=e[e.length-1],e=f.getAscendant("table"),h=CKEDITOR.tools.buildTableMap(e),k,l,m=[];b.reset();var n=0;for(b=h.length;n<b;n++)for(var q=0,u=h[n].length;q<u;q++)void 0===k&&h[n][q]==f.$&&(k=q),h[n][q]==g.$&&(l=q);for(n=k;n<=l;n++)for(q=0;q<h.length;q++)g=h[q],f=new CKEDITOR.dom.element(e.$.rows[q]),g=new CKEDITOR.dom.element(g[n]),g.$&&(1==g.$.colSpan?g.remove():--g.$.colSpan,
1051
- q+=g.$.rowSpan-1,f.$.cells.length||m.push(f));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(e.$.parentNode);m.length==b&&(d[0].moveToPosition(e,CKEDITOR.POSITION_AFTER_END),d[0].select(),e.remove());return k}function h(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 c(b){if(b instanceof CKEDITOR.dom.selection){var e=
1052
- b.getRanges(),f=a(b),g=f[0]&&f[0].getAscendant("table"),h;a:{var k=0;h=f.length-1;for(var l={},m,n;m=f[k++];)CKEDITOR.dom.element.setMarker(l,m,"delete_cell",!0);for(k=0;m=f[k++];)if((n=m.getPrevious())&&!n.getCustomData("delete_cell")||(n=m.getNext())&&!n.getCustomData("delete_cell")){CKEDITOR.dom.element.clearAllMarkers(l);h=n;break a}CKEDITOR.dom.element.clearAllMarkers(l);k=f[0].getParent();(k=k.getPrevious())?h=k.getLast():(k=f[h].getParent(),h=(k=k.getNext())?k.getChild(0):null)}b.reset();for(b=
1053
- f.length-1;0<=b;b--)c(f[b]);h?d(h,!0):g&&(e[0].moveToPosition(g,CKEDITOR.POSITION_BEFORE_START),e[0].select(),g.remove())}else b instanceof CKEDITOR.dom.element&&(e=b.getParent(),1==e.getChildCount()?e.remove():b.remove())}function d(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 b(a,b,c){a=a[b];
1045
+ a,"selected_cell",!0),e.push(a))}var e=[],f={};if(!a)return e;for(var h=a.getRanges(),g=0;g<h.length;g++){var k=h[g];if(k.collapsed)(k=k.getCommonAncestor().getAscendant({td:1,th:1},!0))&&c(k)&&e.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(f,l,"selected_cell",!0),e.push(l))}}CKEDITOR.dom.element.clearAllMarkers(f);
1046
+ return e}function l(b,c){for(var d=t(b)?b:a(b),e=d[0],f=e.getAscendant("table"),e=e.getDocument(),h=d[0].getParent(),g=h.$.rowIndex,d=d[d.length-1],k=d.getParent().$.rowIndex+d.$.rowSpan-1,d=new CKEDITOR.dom.element(f.$.rows[k]),g=c?g:k,h=c?h:d,d=CKEDITOR.tools.buildTableMap(f),f=d[g],g=c?d[g-1]:d[g+1],d=d[0].length,e=e.createElement("tr"),k=0;f[k]&&k<d;k++){var l;1<f[k].rowSpan&&g&&f[k]==g[k]?(l=f[k],l.rowSpan+=1):(l=(new CKEDITOR.dom.element(f[k])).clone(),l.removeAttribute("rowSpan"),l.appendBogus(),
1047
+ e.append(l),l=l.$);k+=l.colSpan-1}c?e.insertBefore(h):e.insertAfter(h);return e}function g(b){if(b instanceof CKEDITOR.dom.selection){var c=b.getRanges(),d=a(b),e=d[0].getAscendant("table"),f=CKEDITOR.tools.buildTableMap(e),h=d[0].getParent().$.rowIndex,d=d[d.length-1],k=d.getParent().$.rowIndex+d.$.rowSpan-1,d=[];b.reset();for(b=h;b<=k;b++){for(var l=f[b],m=new CKEDITOR.dom.element(e.$.rows[b]),n=0;n<l.length;n++){var A=new CKEDITOR.dom.element(l[n]),q=A.getParent().$.rowIndex;1==A.$.rowSpan?A.remove():
1048
+ (--A.$.rowSpan,q==b&&(q=f[b+1],q[n-1]?A.insertAfter(new CKEDITOR.dom.element(q[n-1])):(new CKEDITOR.dom.element(e.$.rows[b+1])).append(A,1)));n+=A.$.colSpan-1}d.push(m)}f=e.$.rows;c[0].moveToPosition(e,CKEDITOR.POSITION_BEFORE_START);h=new CKEDITOR.dom.element(f[k+1]||(0<h?f[h-1]:null)||e.$.parentNode);for(b=d.length;0<=b;b--)g(d[b]);return e.$.parentNode?h:(c[0].select(),null)}b instanceof CKEDITOR.dom.element&&(e=b.getAscendant("table"),1==e.$.rows.length?e.remove():b.remove());return null}function f(a){for(var b=
1049
+ a.getParent().$.cells,c=0,d=0;d<b.length;d++){var e=b[d],c=c+e.colSpan;if(e==a.$)break}return c-1}function e(a,b){for(var c=b?Infinity:0,d=0;d<a.length;d++){var e=f(a[d]);if(b?e<c:e>c)c=e}return c}function m(b,c){for(var d=t(b)?b:a(b),f=d[0].getAscendant("table"),h=e(d,1),d=e(d),g=c?h:d,k=CKEDITOR.tools.buildTableMap(f),f=[],h=[],d=[],l=k.length,m=0;m<l;m++){var n=c?k[m][g-1]:k[m][g+1];f.push(k[m][g]);h.push(n)}for(m=0;m<l;m++)f[m]&&(1<f[m].colSpan&&h[m]==f[m]?(k=f[m],k.colSpan+=1):(g=new CKEDITOR.dom.element(f[m]),
1050
+ k=g.clone(),k.removeAttribute("colSpan"),k.appendBogus(),k[c?"insertBefore":"insertAfter"].call(k,g),d.push(k),k=k.$),m+=k.rowSpan-1);return d}function k(b){function c(a){var b=a.getRanges(),d,e;if(1!==b.length)return a;b=b[0];if(b.collapsed||0!==b.endOffset)return a;d=b.endContainer;e=d.getName().toLowerCase();if("td"!==e&&"th"!==e)return a;for((e=d.getPrevious())||(e=d.getParent().getPrevious().getLast());e.type!==CKEDITOR.NODE_TEXT&&"br"!==e.getName().toLowerCase();)if(e=e.getLast(),!e)return a;
1051
+ b.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);return b.select()}CKEDITOR.env.webkit&&!b.isFake&&(b=c(b));var d=b.getRanges(),e=a(b),f=e[0],h=e[e.length-1],e=f.getAscendant("table"),g=CKEDITOR.tools.buildTableMap(e),k,l,m=[];b.reset();var n=0;for(b=g.length;n<b;n++)for(var q=0,u=g[n].length;q<u;q++)void 0===k&&g[n][q]==f.$&&(k=q),g[n][q]==h.$&&(l=q);for(n=k;n<=l;n++)for(q=0;q<g.length;q++)h=g[q],f=new CKEDITOR.dom.element(e.$.rows[q]),h=new CKEDITOR.dom.element(h[n]),h.$&&(1==h.$.colSpan?h.remove():--h.$.colSpan,
1052
+ q+=h.$.rowSpan-1,f.$.cells.length||m.push(f));k=g[0].length-1>l?new CKEDITOR.dom.element(g[0][l+1]):k&&-1!==g[0][k-1].cellIndex?new CKEDITOR.dom.element(g[0][k-1]):new CKEDITOR.dom.element(e.$.parentNode);m.length==b&&(d[0].moveToPosition(e,CKEDITOR.POSITION_AFTER_END),d[0].select(),e.remove());return k}function h(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 c(b){if(b instanceof CKEDITOR.dom.selection){var e=
1053
+ b.getRanges(),f=a(b),h=f[0]&&f[0].getAscendant("table"),g;a:{var k=0;g=f.length-1;for(var l={},m,n;m=f[k++];)CKEDITOR.dom.element.setMarker(l,m,"delete_cell",!0);for(k=0;m=f[k++];)if((n=m.getPrevious())&&!n.getCustomData("delete_cell")||(n=m.getNext())&&!n.getCustomData("delete_cell")){CKEDITOR.dom.element.clearAllMarkers(l);g=n;break a}CKEDITOR.dom.element.clearAllMarkers(l);k=f[0].getParent();(k=k.getPrevious())?g=k.getLast():(k=f[g].getParent(),g=(k=k.getNext())?k.getChild(0):null)}b.reset();for(b=
1054
+ f.length-1;0<=b;b--)c(f[b]);g?d(g,!0):h&&(e[0].moveToPosition(h,CKEDITOR.POSITION_BEFORE_START),e[0].select(),h.remove())}else b instanceof CKEDITOR.dom.element&&(e=b.getParent(),1==e.getChildCount()?e.remove():b.remove())}function d(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 b(a,b,c){a=a[b];
1054
1055
  if("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(c,d,e){var f=a(c),h;if((d?1!=f.length:2>f.length)||(h=c.getCommonAncestor())&&h.type==CKEDITOR.NODE_ELEMENT&&h.is("table"))return!1;c=f[0];h=c.getAscendant("table");var g=CKEDITOR.tools.buildTableMap(h),k=g.length,l=g[0].length,m=c.getParent().$.rowIndex,n=b(g,m,c),q;if(d){var u;try{var t=parseInt(c.getAttribute("rowspan"),10)||1;q=parseInt(c.getAttribute("colspan"),
1055
1056
  10)||1;u=g["up"==d?m-t:"down"==d?m+t:m]["left"==d?n-q:"right"==d?n+q:n]}catch(H){return!1}if(!u||c.$==u)return!1;f["up"==d||"left"==d?"unshift":"push"](new CKEDITOR.dom.element(u))}d=c.getDocument();var E=m,t=u=0,M=!e&&new CKEDITOR.dom.documentFragment(d),I=0;for(d=0;d<f.length;d++){q=f[d];var J=q.getParent(),F=q.getFirst(),L=q.$.colSpan,P=q.$.rowSpan,J=J.$.rowIndex,N=b(g,J,q),I=I+L*P,t=Math.max(t,N-n+L);u=Math.max(u,J-m+P);e||(L=q,(P=L.getBogus())&&P.remove(),L.trim(),q.getChildren().count()&&(J==
1056
1057
  E||!F||F.isBlockBoundary&&F.isBlockBoundary({br:1})||(E=M.getLast(CKEDITOR.dom.walker.whitespaces(!0)),!E||E.is&&E.is("br")||M.append("br")),q.moveChildren(M)),d?q.remove():q.setHtml(""));E=J}if(e)return u*t==I;M.moveChildren(c);c.appendBogus();t>=l?c.removeAttribute("rowSpan"):c.$.rowSpan=u;u>=k?c.removeAttribute("colSpan"):c.$.colSpan=t;e=new CKEDITOR.dom.nodeList(h.$.rows);f=e.count();for(d=f-1;0<=d;d--)h=e.getItem(d),h.$.cells.length||(h.remove(),f++);return c}function q(c,d){var e=a(c);if(1<
@@ -1068,25 +1069,25 @@ CKEDITOR.TRISTATE_DISABLED};b.filter.check(B)&&(c.tablecell_properties=0<d.lengt
1068
1069
  order:16},tablecell_merge_right:{label:t.cell.mergeRight,group:"tablecell",command:"cellMergeRight",order:17},tablecell_merge_down:{label:t.cell.mergeDown,group:"tablecell",command:"cellMergeDown",order:18},tablecell_split_horizontal:{label:t.cell.splitHorizontal,group:"tablecell",command:"cellHorizontalSplit",order:19},tablecell_split_vertical:{label:t.cell.splitVertical,group:"tablecell",command:"cellVerticalSplit",order:20},tablecell_properties:{label:t.cell.title,group:"tablecellproperties",command:"cellProperties",
1069
1070
  order:21},tablerow:{label:t.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:t.row.insertBefore,group:"tablerow",command:"rowInsertBefore",order:5},tablerow_insertAfter:{label:t.row.insertAfter,group:"tablerow",command:"rowInsertAfter",order:10},tablerow_delete:{label:t.row.deleteRow,group:"tablerow",command:"rowDelete",order:15},
1070
1071
  tablecolumn:{label:t.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:t.column.insertBefore,group:"tablecolumn",command:"columnInsertBefore",order:5},tablecolumn_insertAfter:{label:t.column.insertAfter,group:"tablecolumn",command:"columnInsertAfter",order:10},tablecolumn_delete:{label:t.column.deleteColumn,group:"tablecolumn",
1071
- command:"columnDelete",order:15}});b.contextMenu&&b.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:l,insertColumn:m,getSelectedCells:a};CKEDITOR.plugins.add("tabletools",CKEDITOR.plugins.tabletools)})();CKEDITOR.tools.buildTableMap=function(a,l,g,e,f){a=a.$.rows;g=g||0;e="number"===typeof e?e:a.length-1;f="number"===typeof f?
1072
- f:-1;var m=-1,k=[];for(l=l||0;l<=e;l++){m++;!k[m]&&(k[m]=[]);for(var h=-1,c=g;c<=(-1===f?a[l].cells.length-1:f);c++){var d=a[l].cells[c];if(!d)break;for(h++;k[m][h];)h++;for(var b=isNaN(d.colSpan)?1:d.colSpan,d=isNaN(d.rowSpan)?1:d.rowSpan,n=0;n<d&&!(l+n>e);n++){k[m+n]||(k[m+n]=[]);for(var q=0;q<b;q++)k[m+n][h+q]=a[l].cells[c]}h+=b-1;if(-1!==f&&h>=f)break}}return k};(function(){function a(a){return CKEDITOR.plugins.widget&&CKEDITOR.plugins.widget.isDomWidget(a)}function l(a,b){var d=a.getAscendant("table"),
1072
+ command:"columnDelete",order:15}});b.contextMenu&&b.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:f,insertRow:l,insertColumn:m,getSelectedCells:a};CKEDITOR.plugins.add("tabletools",CKEDITOR.plugins.tabletools)})();CKEDITOR.tools.buildTableMap=function(a,l,g,f,e){a=a.$.rows;g=g||0;f="number"===typeof f?f:a.length-1;e="number"===typeof e?
1073
+ e:-1;var m=-1,k=[];for(l=l||0;l<=f;l++){m++;!k[m]&&(k[m]=[]);for(var h=-1,c=g;c<=(-1===e?a[l].cells.length-1:e);c++){var d=a[l].cells[c];if(!d)break;for(h++;k[m][h];)h++;for(var b=isNaN(d.colSpan)?1:d.colSpan,d=isNaN(d.rowSpan)?1:d.rowSpan,n=0;n<d&&!(l+n>f);n++){k[m+n]||(k[m+n]=[]);for(var q=0;q<b;q++)k[m+n][h+q]=a[l].cells[c]}h+=b-1;if(-1!==e&&h>=e)break}}return k};(function(){function a(a){return CKEDITOR.plugins.widget&&CKEDITOR.plugins.widget.isDomWidget(a)}function l(a,b){var d=a.getAscendant("table"),
1073
1074
  e=b.getAscendant("table"),f=CKEDITOR.tools.buildTableMap(d),h=c(a),g=c(b),k=[],l={},m,n;d.contains(e)&&(b=b.getAscendant({td:1,th:1}),g=c(b));h>g&&(d=h,h=g,g=d,d=a,a=b,b=d);for(d=0;d<f[h].length;d++)if(a.$===f[h][d]){m=d;break}for(d=0;d<f[g].length;d++)if(b.$===f[g][d]){n=d;break}m>n&&(d=m,m=n,n=d);for(d=h;d<=g;d++)for(h=m;h<=n;h++)e=new CKEDITOR.dom.element(f[d][h]),e.$&&!e.getCustomData("selected_cell")&&(k.push(e),CKEDITOR.dom.element.setMarker(l,e,"selected_cell",!0));CKEDITOR.dom.element.clearAllMarkers(l);
1074
- return k}function g(a){return(a=a.editable().findOne(".cke_table-faked-selection"))&&a.getAscendant("table")}function e(a,b){var c=a.editable().find(".cke_table-faked-selection"),d=a.editable().findOne("[data-cke-table-faked-selection-table]"),e;a.fire("lockSnapshot");a.editable().removeClass("cke_table-faked-selection-editor");for(e=0;e<c.count();e++)c.getItem(e).removeClass("cke_table-faked-selection");d&&d.data("cke-table-faked-selection-table",!1);a.fire("unlockSnapshot");b&&(r={active:!1},a.getSelection().isInTable()&&
1075
- a.getSelection().reset())}function f(a,b){var c=[],d,e;for(e=0;e<b.length;e++)d=a.createRange(),d.setStartBefore(b[e]),d.setEndAfter(b[e]),c.push(d);a.getSelection().selectRanges(c)}function m(a){var b=a.editable().find(".cke_table-faked-selection");1>b.count()||(b=l(b.getItem(0),b.getItem(b.count()-1)),f(a,b))}function k(b,c,d){var h=y(b.getSelection(!0));c=c.is("table")?null:c;var g;(g=r.active&&!r.first)&&!(g=c)&&(g=b.getSelection().getRanges(),g=1<h.length||g[0]&&!g[0].collapsed?!0:!1);if(g)r.first=
1076
- c||h[0],r.dirty=c?!1:1!==h.length;else if(r.active&&c&&r.first.getAscendant("table").equals(c.getAscendant("table"))){h=l(r.first,c);if(!r.dirty&&1===h.length&&!a(d.data.getTarget()))return e(b,"mouseup"===d.name);r.dirty=!0;r.last=c;f(b,h)}}function h(a){var b=(a=a.editor||a.sender.editor)&&a.getSelection(),c=b&&b.getRanges()||[],d=c&&c[0].getEnclosedNode(),d=d&&d.type==CKEDITOR.NODE_ELEMENT&&d.is("img"),f;if(b&&(e(a),b.isInTable()&&b.isFake))if(d)a.getSelection().reset();else if(!c[0]._getTableElement({table:1}).hasAttribute("data-cke-tableselection-ignored")){1===
1077
- c.length&&c[0]._getTableElement()&&c[0]._getTableElement().is("table")&&(f=c[0]._getTableElement());f=y(b,f);a.fire("lockSnapshot");for(b=0;b<f.length;b++)f[b].addClass("cke_table-faked-selection");0<f.length&&(a.editable().addClass("cke_table-faked-selection-editor"),f[0].getAscendant("table").data("cke-table-faked-selection-table",""));a.fire("unlockSnapshot")}}function c(a){return a.getAscendant("tr",!0).$.rowIndex}function d(b){function c(a,b){return a&&b?a.equals(b)||a.contains(b)||b.contains(a)||
1078
- a.getCommonAncestor(b).is(u):!1}function f(a){return!a.getAscendant("table",!0)&&a.getDocument().equals(l.document)}function h(a,b,c,d){if("mousedown"===a.name&&(CKEDITOR.tools.getMouseButton(a)===CKEDITOR.MOUSE_BUTTON_LEFT||!d))return!0;if(b=a.name===(CKEDITOR.env.gecko?"mousedown":"mouseup")&&!f(a.data.getTarget()))a=a.data.getTarget().getAscendant({td:1,th:1},!0),b=!(a&&a.hasClass("cke_table-faked-selection"));return b}if(b.data.getTarget().getName&&("mouseup"===b.name||!a(b.data.getTarget()))){var l=
1079
- b.editor||b.listenerData.editor,n=l.getSelection(1),q=g(l),p=b.data.getTarget(),t=p&&p.getAscendant({td:1,th:1},!0),p=p&&p.getAscendant("table",!0),u={table:1,thead:1,tbody:1,tfoot:1,tr:1,td:1,th:1};p&&p.hasAttribute("data-cke-tableselection-ignored")||(h(b,n,q,p)&&e(l,!0),!r.active&&"mousedown"===b.name&&CKEDITOR.tools.getMouseButton(b)===CKEDITOR.MOUSE_BUTTON_LEFT&&p&&(r={active:!0},CKEDITOR.document.on("mouseup",d,null,{editor:l})),(t||p)&&k(l,t||p,b),"mouseup"===b.name&&(CKEDITOR.tools.getMouseButton(b)===
1080
- CKEDITOR.MOUSE_BUTTON_LEFT&&(f(b.data.getTarget())||c(q,p))&&m(l),r={active:!1},CKEDITOR.document.removeListener("mouseup",d)))}}function b(a){var b=a.data.getTarget().getAscendant("table",!0);b&&b.hasAttribute("data-cke-tableselection-ignored")||(b=a.data.getTarget().getAscendant({td:1,th:1},!0))&&!b.hasClass("cke_table-faked-selection")&&(a.cancel(),a.data.preventDefault())}function n(a,b){function c(a){a.cancel()}var d=a.getSelection(),e=d.createBookmarks(),f=a.document,h=a.createRange(),g=f.getDocumentElement().$,
1075
+ return k}function g(a){return(a=a.editable().findOne(".cke_table-faked-selection"))&&a.getAscendant("table")}function f(a,b){var c=a.editable().find(".cke_table-faked-selection"),d=a.editable().findOne("[data-cke-table-faked-selection-table]"),e;a.fire("lockSnapshot");a.editable().removeClass("cke_table-faked-selection-editor");for(e=0;e<c.count();e++)c.getItem(e).removeClass("cke_table-faked-selection");d&&d.data("cke-table-faked-selection-table",!1);a.fire("unlockSnapshot");b&&(r={active:!1},a.getSelection().isInTable()&&
1076
+ a.getSelection().reset())}function e(a,b){var c=[],d,e;for(e=0;e<b.length;e++)d=a.createRange(),d.setStartBefore(b[e]),d.setEndAfter(b[e]),c.push(d);a.getSelection().selectRanges(c)}function m(a){var b=a.editable().find(".cke_table-faked-selection");1>b.count()||(b=l(b.getItem(0),b.getItem(b.count()-1)),e(a,b))}function k(b,c,d){var h=y(b.getSelection(!0));c=c.is("table")?null:c;var g;(g=r.active&&!r.first)&&!(g=c)&&(g=b.getSelection().getRanges(),g=1<h.length||g[0]&&!g[0].collapsed?!0:!1);if(g)r.first=
1077
+ c||h[0],r.dirty=c?!1:1!==h.length;else if(r.active&&c&&r.first.getAscendant("table").equals(c.getAscendant("table"))){h=l(r.first,c);if(!r.dirty&&1===h.length&&!a(d.data.getTarget()))return f(b,"mouseup"===d.name);r.dirty=!0;r.last=c;e(b,h)}}function h(a){var b=(a=a.editor||a.sender.editor)&&a.getSelection(),c=b&&b.getRanges()||[],d=c&&c[0].getEnclosedNode(),d=d&&d.type==CKEDITOR.NODE_ELEMENT&&d.is("img"),e;if(b&&(f(a),b.isInTable()&&b.isFake))if(d)a.getSelection().reset();else if(!c[0]._getTableElement({table:1}).hasAttribute("data-cke-tableselection-ignored")){1===
1078
+ c.length&&c[0]._getTableElement()&&c[0]._getTableElement().is("table")&&(e=c[0]._getTableElement());e=y(b,e);a.fire("lockSnapshot");for(b=0;b<e.length;b++)e[b].addClass("cke_table-faked-selection");0<e.length&&(a.editable().addClass("cke_table-faked-selection-editor"),e[0].getAscendant("table").data("cke-table-faked-selection-table",""));a.fire("unlockSnapshot")}}function c(a){return a.getAscendant("tr",!0).$.rowIndex}function d(b){function c(a,b){return a&&b?a.equals(b)||a.contains(b)||b.contains(a)||
1079
+ a.getCommonAncestor(b).is(u):!1}function e(a){return!a.getAscendant("table",!0)&&a.getDocument().equals(l.document)}function h(a,b,c,d){if("mousedown"===a.name&&(CKEDITOR.tools.getMouseButton(a)===CKEDITOR.MOUSE_BUTTON_LEFT||!d))return!0;if(b=a.name===(CKEDITOR.env.gecko?"mousedown":"mouseup")&&!e(a.data.getTarget()))a=a.data.getTarget().getAscendant({td:1,th:1},!0),b=!(a&&a.hasClass("cke_table-faked-selection"));return b}if(b.data.getTarget().getName&&("mouseup"===b.name||!a(b.data.getTarget()))){var l=
1080
+ b.editor||b.listenerData.editor,n=l.getSelection(1),q=g(l),p=b.data.getTarget(),t=p&&p.getAscendant({td:1,th:1},!0),p=p&&p.getAscendant("table",!0),u={table:1,thead:1,tbody:1,tfoot:1,tr:1,td:1,th:1};p&&p.hasAttribute("data-cke-tableselection-ignored")||(h(b,n,q,p)&&f(l,!0),!r.active&&"mousedown"===b.name&&CKEDITOR.tools.getMouseButton(b)===CKEDITOR.MOUSE_BUTTON_LEFT&&p&&(r={active:!0},CKEDITOR.document.on("mouseup",d,null,{editor:l})),(t||p)&&k(l,t||p,b),"mouseup"===b.name&&(CKEDITOR.tools.getMouseButton(b)===
1081
+ CKEDITOR.MOUSE_BUTTON_LEFT&&(e(b.data.getTarget())||c(q,p))&&m(l),r={active:!1},CKEDITOR.document.removeListener("mouseup",d)))}}function b(a){var b=a.data.getTarget().getAscendant("table",!0);b&&b.hasAttribute("data-cke-tableselection-ignored")||(b=a.data.getTarget().getAscendant({td:1,th:1},!0))&&!b.hasClass("cke_table-faked-selection")&&(a.cancel(),a.data.preventDefault())}function n(a,b){function c(a){a.cancel()}var d=a.getSelection(),e=d.createBookmarks(),f=a.document,h=a.createRange(),g=f.getDocumentElement().$,
1081
1082
  k=CKEDITOR.env.ie&&9>CKEDITOR.env.version,l=a.blockless||CKEDITOR.env.ie?"span":"div",m,n,q,p;f.getById("cke_table_copybin")||(m=f.createElement(l),n=f.createElement(l),n.setAttributes({id:"cke_table_copybin","data-cke-temp":"1"}),m.setStyles({position:"absolute",width:"1px",height:"1px",overflow:"hidden"}),m.setStyle("ltr"==a.config.contentsLangDirection?"left":"right","-5000px"),m.setHtml(a.getSelectedHtml(!0)),a.fire("lockSnapshot"),n.append(m),a.editable().append(n),p=a.on("selectionChange",c,
1082
1083
  null,null,0),k&&(q=g.scrollTop),h.selectNodeContents(m),h.select(),k&&(g.scrollTop=q),setTimeout(function(){n.remove();d.selectBookmarks(e);p.removeListener();a.fire("unlockSnapshot");b&&(a.extractSelectedHtml(),a.fire("saveSnapshot"))},100))}function q(a){var b=a.editor||a.sender.editor,c=b.getSelection();c.isInTable()&&(c.getRanges()[0]._getTableElement({table:1}).hasAttribute("data-cke-tableselection-ignored")||n(b,"cut"===a.name))}function u(a){this._reset();a&&this.setSelectedCells(a)}function t(a,
1083
1084
  b,c){a.on("beforeCommandExec",function(c){-1!==CKEDITOR.tools.array.indexOf(b,c.data.name)&&(c.data.selectedCells=y(a.getSelection()))});a.on("afterCommandExec",function(d){-1!==CKEDITOR.tools.array.indexOf(b,d.data.name)&&c(a,d.data)})}var r={active:!1},p,y,x,z,B;u.prototype={};u.prototype._reset=function(){this.cells={first:null,last:null,all:[]};this.rows={first:null,last:null}};u.prototype.setSelectedCells=function(a){this._reset();a=a.slice(0);this._arraySortByDOMOrder(a);this.cells.all=a;this.cells.first=
1084
1085
  a[0];this.cells.last=a[a.length-1];this.rows.first=a[0].getAscendant("tr");this.rows.last=this.cells.last.getAscendant("tr")};u.prototype.getTableMap=function(){var a=x(this.cells.first),b;a:{b=this.cells.last;var d=b.getAscendant("table"),e=c(b),d=CKEDITOR.tools.buildTableMap(d),f;for(f=0;f<d[e].length;f++)if((new CKEDITOR.dom.element(d[e][f])).equals(b)){b=f;break a}b=void 0}return CKEDITOR.tools.buildTableMap(this._getTable(),c(this.rows.first),a,c(this.rows.last),b)};u.prototype._getTable=function(){return this.rows.first.getAscendant("table")};
1085
1086
  u.prototype.insertRow=function(a,b,c){if("undefined"===typeof a)a=1;else if(0>=a)return;for(var d=this.cells.first.$.cellIndex,e=this.cells.last.$.cellIndex,f=c?[]:this.cells.all,h,g=0;g<a;g++)h=z(c?this.cells.all:f,b),h=CKEDITOR.tools.array.filter(h.find("td, th").toArray(),function(a){return c?!0:a.$.cellIndex>=d&&a.$.cellIndex<=e}),f=b?h.concat(f):f.concat(h);this.setSelectedCells(f)};u.prototype.insertColumn=function(a){function b(a){a=c(a);return a>=f&&a<=h}if("undefined"===typeof a)a=1;else if(0>=
1086
1087
  a)return;for(var d=this.cells,e=d.all,f=c(d.first),h=c(d.last),d=0;d<a;d++)e=e.concat(CKEDITOR.tools.array.filter(B(e),b));this.setSelectedCells(e)};u.prototype.emptyCells=function(a){a=a||this.cells.all;for(var b=0;b<a.length;b++)a[b].setHtml("")};u.prototype._arraySortByDOMOrder=function(a){a.sort(function(a,b){return a.getPosition(b)&CKEDITOR.POSITION_PRECEDING?-1:1})};var w={onPaste:function(a){function b(a){var c=d.createRange();c.selectNodeContents(a);c.select()}function c(a){return Math.max.apply(null,
1087
- CKEDITOR.tools.array.map(a,function(a){return a.length},0))}var d=a.editor,e=d.getSelection(),h=y(e),g=e.isInTable(!0)&&this.isBoundarySelection(e),k=this.findTableInPastedContent(d,a.data.dataValue),m,n;(function(a,b,c,d){a=a.getRanges();var e=a.length&&a[0]._getTableElement({table:1});if(!b.length||e&&e.hasAttribute("data-cke-tableselection-ignored")||d&&!c)return!1;if(b=!d)(b=a[0])?(b=b.clone(),b.enlarge(CKEDITOR.ENLARGE_ELEMENT),b=(b=b.getEnclosedNode())&&b.is&&b.is(CKEDITOR.dtd.$tableContent)):
1088
- b=void 0,b=!b;return b?!1:!0})(e,h,k,g)&&(h=h[0].getAscendant("table"),m=new u(y(e,h)),d.once("afterPaste",function(){var a;if(n){a=new CKEDITOR.dom.element(n[0][0]);var b=n[n.length-1];a=l(a,new CKEDITOR.dom.element(b[b.length-1]))}else a=m.cells.all;f(d,a)}),k?(a.stop(),g?(m.insertRow(1,1===g,!0),e.selectElement(m.rows.first)):(m.emptyCells(),f(d,m.cells.all)),a=m.getTableMap(),n=CKEDITOR.tools.buildTableMap(k),m.insertRow(n.length-a.length),m.insertColumn(c(n)-c(a)),a=m.getTableMap(),this.pasteTable(m,
1089
- a,n),d.fire("saveSnapshot"),setTimeout(function(){d.fire("afterPaste")},0)):(b(m.cells.first),d.once("afterPaste",function(){d.fire("lockSnapshot");m.emptyCells(m.cells.all.slice(1));f(d,m.cells.all);d.fire("unlockSnapshot")})))},isBoundarySelection:function(a){a=a.getRanges()[0];var b=a.endContainer.getAscendant("tr",!0);if(b&&a.collapsed){if(a.checkBoundaryOfElement(b,CKEDITOR.START))return 1;if(a.checkBoundaryOfElement(b,CKEDITOR.END))return 2}return 0},findTableInPastedContent:function(a,b){var c=
1088
+ CKEDITOR.tools.array.map(a,function(a){return a.length},0))}var d=a.editor,f=d.getSelection(),h=y(f),g=f.isInTable(!0)&&this.isBoundarySelection(f),k=this.findTableInPastedContent(d,a.data.dataValue),m,n;(function(a,b,c,d){a=a.getRanges();var e=a.length&&a[0]._getTableElement({table:1});if(!b.length||e&&e.hasAttribute("data-cke-tableselection-ignored")||d&&!c)return!1;if(b=!d)(b=a[0])?(b=b.clone(),b.enlarge(CKEDITOR.ENLARGE_ELEMENT),b=(b=b.getEnclosedNode())&&b.is&&b.is(CKEDITOR.dtd.$tableContent)):
1089
+ b=void 0,b=!b;return b?!1:!0})(f,h,k,g)&&(h=h[0].getAscendant("table"),m=new u(y(f,h)),d.once("afterPaste",function(){var a;if(n){a=new CKEDITOR.dom.element(n[0][0]);var b=n[n.length-1];a=l(a,new CKEDITOR.dom.element(b[b.length-1]))}else a=m.cells.all;e(d,a)}),k?(a.stop(),g?(m.insertRow(1,1===g,!0),f.selectElement(m.rows.first)):(m.emptyCells(),e(d,m.cells.all)),a=m.getTableMap(),n=CKEDITOR.tools.buildTableMap(k),m.insertRow(n.length-a.length),m.insertColumn(c(n)-c(a)),a=m.getTableMap(),this.pasteTable(m,
1090
+ a,n),d.fire("saveSnapshot"),setTimeout(function(){d.fire("afterPaste")},0)):(b(m.cells.first),d.once("afterPaste",function(){d.fire("lockSnapshot");m.emptyCells(m.cells.all.slice(1));e(d,m.cells.all);d.fire("unlockSnapshot")})))},isBoundarySelection:function(a){a=a.getRanges()[0];var b=a.endContainer.getAscendant("tr",!0);if(b&&a.collapsed){if(a.checkBoundaryOfElement(b,CKEDITOR.START))return 1;if(a.checkBoundaryOfElement(b,CKEDITOR.END))return 2}return 0},findTableInPastedContent:function(a,b){var c=
1090
1091
  a.dataProcessor,d=new CKEDITOR.dom.element("body");c||(c=new CKEDITOR.htmlDataProcessor(a));d.setHtml(c.toHtml(b),{fixForBody:!1});return 1<d.getChildCount()?null:d.findOne("table")},pasteTable:function(a,b,c){var d,e=x(a.cells.first),f=a._getTable(),h={},g,k,l,m;for(l=0;l<c.length;l++)for(g=new CKEDITOR.dom.element(f.$.rows[a.rows.first.$.rowIndex+l]),m=0;m<c[l].length;m++)if(k=new CKEDITOR.dom.element(c[l][m]),d=b[l]&&b[l][m]?new CKEDITOR.dom.element(b[l][m]):null,k&&!k.getCustomData("processed")){if(d&&
1091
1092
  d.getParent())k.replace(d);else if(0===m||c[l][m-1])(d=0!==m?new CKEDITOR.dom.element(c[l][m-1]):null)&&g.equals(d.getParent())?k.insertAfter(d):0<e?g.$.cells[e]?k.insertAfter(new CKEDITOR.dom.element(g.$.cells[e])):g.append(k):g.append(k,!0);CKEDITOR.dom.element.setMarker(h,k,"processed",!0)}else k.getCustomData("processed")&&d&&d.remove();CKEDITOR.dom.element.clearAllMarkers(h)}};CKEDITOR.plugins.tableselection={getCellsBetween:l,keyboardIntegration:function(a){function b(a){var c=a.getEnclosedNode();
1092
1093
  c&&"function"===typeof c.is&&c.is({td:1,th:1})?c.setText(""):a.deleteContents();CKEDITOR.tools.array.forEach(a._find("td"),function(a){a.appendBogus()})}var c=a.editable();c.attachListener(c,"keydown",function(a){function c(b,d){if(!d.length)return null;var f=a.createRange(),h=CKEDITOR.dom.range.mergeRanges(d);CKEDITOR.tools.array.forEach(h,function(a){a.enlarge(CKEDITOR.ENLARGE_ELEMENT)});var g=h[0].getBoundaryNodes(),k=g.startNode,g=g.endNode;if(k&&k.is&&k.is(e)){for(var l=k.getAscendant("table",
@@ -1095,60 +1096,60 @@ e=CKEDITOR.tools.extend({table:1},CKEDITOR.dtd.$tableContent);delete e.td;delete
1095
1096
  13){for(e=0;e<l.length;e++)b(l[e]);(e=c(m,l))?l=e:l[0].moveToElementEditablePosition(m);g.selectRanges(l);13===f&&a.plugins.enterkey?(a.fire("lockSnapshot"),13===h?a.execCommand("enter"):a.execCommand("shiftEnter"),a.fire("unlockSnapshot"),a.fire("saveSnapshot")):13!==f&&a.fire("saveSnapshot")}}}}(a),null,null,-1);c.attachListener(c,"keypress",function(c){var d=a.getSelection(),e=c.data.$.charCode||13===c.data.getKey(),f;if(!a.readOnly&&d&&d.isInTable()&&d.isFake&&e&&!(c.data.getKeystroke()&CKEDITOR.CTRL)){c=
1096
1097
  d.getRanges();e=c[0].getEnclosedNode().getAscendant({td:1,th:1},!0);for(f=0;f<c.length;f++)b(c[f]);e&&(c[0].moveToElementEditablePosition(e),d.selectRanges([c[0]]))}},null,null,-1)}};CKEDITOR.plugins.add("tableselection",{requires:"clipboard,tabletools",isSupportedEnvironment:function(){return!(CKEDITOR.env.ie&&11>CKEDITOR.env.version)},onLoad:function(){p=CKEDITOR.plugins.tabletools;y=p.getSelectedCells;x=p.getCellColIndex;z=p.insertRow;B=p.insertColumn;CKEDITOR.document.appendStyleSheet(this.path+
1097
1098
  "styles/tableselection.css")},init:function(a){this.isSupportedEnvironment()&&(a.addContentsCss&&a.addContentsCss(this.path+"styles/tableselection.css"),a.on("contentDom",function(){var c=a.editable(),e=c.isInline()?c:a.document,f={editor:a};c.attachListener(e,"mousedown",d,null,f);c.attachListener(e,"mousemove",d,null,f);c.attachListener(e,"mouseup",d,null,f);c.attachListener(c,"dragstart",b);c.attachListener(a,"selectionCheck",h);CKEDITOR.plugins.tableselection.keyboardIntegration(a);CKEDITOR.plugins.clipboard&&
1098
- !CKEDITOR.plugins.clipboard.isCustomCopyCutSupported&&(c.attachListener(c,"cut",q),c.attachListener(c,"copy",q))}),a.on("paste",w.onPaste,w),t(a,"rowInsertBefore rowInsertAfter columnInsertBefore columnInsertAfter cellInsertBefore cellInsertAfter".split(" "),function(a,b){f(a,b.selectedCells)}),t(a,["cellMerge","cellMergeRight","cellMergeDown"],function(a,b){f(a,[b.commandData.cell])}),t(a,["cellDelete"],function(a){e(a,!0)}))}})})();CKEDITOR.plugins.add("taoqtiimage",{init:function(a){a.addCommand("insertQtiImage",
1099
+ !CKEDITOR.plugins.clipboard.isCustomCopyCutSupported&&(c.attachListener(c,"cut",q),c.attachListener(c,"copy",q))}),a.on("paste",w.onPaste,w),t(a,"rowInsertBefore rowInsertAfter columnInsertBefore columnInsertAfter cellInsertBefore cellInsertAfter".split(" "),function(a,b){e(a,b.selectedCells)}),t(a,["cellMerge","cellMergeRight","cellMergeDown"],function(a,b){e(a,[b.commandData.cell])}),t(a,["cellDelete"],function(a){f(a,!0)}))}})})();CKEDITOR.plugins.add("taoqtiimage",{init:function(a){a.addCommand("insertQtiImage",
1099
1100
  {exec:function(a){var g=a.config.taoQtiItem;"function"===typeof g.insert&&(a.insertHtml('\x3cspan data-new\x3d"true" data-qti-class\x3d"img" class\x3d"widget-box"\x3e\x26nbsp;\x3c/span\x3e'),g.insert.call(a))}});a.ui.addButton("TaoQtiImage",{label:a.lang.insertQtiImage.button,command:"insertQtiImage",icon:this.path+"images/taoqtiimage.png"})}});CKEDITOR.plugins.add("taoqtimaths",{init:function(a){a.addCommand("insertQtiMaths",{exec:function(a){var g=a.config.taoQtiItem;"function"===typeof g.insert&&
1100
1101
  (a.insertHtml('\x3cspan data-new\x3d"true" data-qti-class\x3d"math" class\x3d"widget-box"\x3e\x26nbsp;\x3c/span\x3e'),g.insert.call(a))}});a.ui.addButton("TaoQtiMaths",{label:a.lang.insertQtiMaths.button,command:"insertQtiMaths",icon:this.path+"images/taoqtimaths.png"})}});CKEDITOR.plugins.add("taoqtimedia",{init:function(a){a.addCommand("insertQtiMedia",{exec:function(a){var g=a.config.taoQtiItem;"function"===typeof g.insert&&(a.insertHtml('\x3cspan data-new\x3d"true" data-qti-class\x3d"object" class\x3d"widget-box"\x3e\x26nbsp;\x3c/span\x3e'),
1101
1102
  g.insert.call(a))}});a.ui.addButton("TaoQtiMedia",{label:a.lang.insertQtiMedia.button,command:"insertQtiMedia",icon:this.path+"images/taoqtimedia.png"})}});CKEDITOR.plugins.add("taoqtitable",{requires:"dialog",icons:this.path+"images/taoqtitable.png",hidpi:!1,init:function(a){var l=!0;if("table"===a.element.getAttribute("data-qti-class"))l=!1;else if(a.blockless)return;var g=a.lang.table;a.addCommand("taoqtitable",new CKEDITOR.dialogCommand("taoqtitable",{context:"table",allowedContent:"table[summary];caption tbody thead tfoot;th td tr[scope];"+
1102
1103
  (a.plugins.dialogadvtab?"table"+a.plugins.dialogadvtab.allowedContent():""),requiredContent:"table"}));a.addCommand("taoqtitableProperties",new CKEDITOR.dialogCommand("taoqtitableProperties"));l&&a.ui.addButton&&a.ui.addButton("TaoQtiTable",{label:g.toolbar,command:"taoqtitable",toolbar:"insert,30",icon:this.path+"images/taoqtitable.png"});CKEDITOR.dialog.add("taoqtitable",this.path+"dialogs/taoqtitable.js");CKEDITOR.dialog.add("taoqtitableProperties",this.path+"dialogs/taoqtitable.js")}});CKEDITOR.plugins.add("taounderline",
1103
- {init:function(a){var l=new CKEDITOR.style({element:"span",attributes:{"class":"txt-underline"}}),g=["u",["span",function(a){return"underline"==a.styles["text-decoration"]}]];g.unshift(l);a.attachStyleStateChange(l,function(e){!a.readOnly&&a.getCommand("spanUnderline").setState(e)});a.addCommand("spanUnderline",new CKEDITOR.styleCommand(l,{contentForms:g}));a.ui.addButton("TaoUnderline",{label:a.lang.spanUnderline.button,command:"spanUnderline",icon:this.path+"images/taounderline.png"})}});CKEDITOR.plugins.add("taotooltip",
1104
- {init:function(a){function l(a){a=a.getSelection();var b=a.getNative(),h;if(h=null!==b)if(h=b.getRangeAt(0),!(h=b&&b.isCollapsed&&!f(b.getRangeAt(h.startContainer))))if(b=!b.isCollapsed&&b.getRangeAt(0)){c=!1;g(b.cloneContents());if(h=""!==b.toString().trim()){h=e(b.startContainer);var k=e(b.endContainer);h=h.isSameNode(k)}h=h&&!c&&!f(b.startContainer)}else h=!1;if(b=h)b=null===a.getRanges()[0].startContainer.getAscendant("ruby");return b}function g(a){a=a.childNodes;var b,e;for(e=0;e<a.length;e++)if(b=
1105
- a[e],!c&&b.nodeType===window.Node.ELEMENT_NODE){var f=b.nodeName&&b.nodeName.toLowerCase();-1===h.indexOf(f)?c=!0:g(b)}}function e(a){return a.nodeType===window.Node.TEXT_NODE?a.parentNode:a}function f(a){return(new CKEDITOR.dom.element(a)).getAscendant(function(a){return a.$&&a.$.dataset&&"_tooltip"===a.$.dataset.qtiClass})}function m(a){a=a.getRanges()[0].extractContents().$;return new CKEDITOR.dom.element(a)}function k(a){var b=a.getCommand("insertTaoTooltip");b&&(l(a)?b.setState(CKEDITOR.TRISTATE_OFF):
1104
+ {init:function(a){var l=new CKEDITOR.style({element:"span",attributes:{"class":"txt-underline"}}),g=["u",["span",function(a){return"underline"==a.styles["text-decoration"]}]];g.unshift(l);a.attachStyleStateChange(l,function(f){!a.readOnly&&a.getCommand("spanUnderline").setState(f)});a.addCommand("spanUnderline",new CKEDITOR.styleCommand(l,{contentForms:g}));a.ui.addButton("TaoUnderline",{label:a.lang.spanUnderline.button,command:"spanUnderline",icon:this.path+"images/taounderline.png"})}});CKEDITOR.plugins.add("taotooltip",
1105
+ {init:function(a){function l(a){a=a.getSelection();var b=a.getNative(),h;if(h=null!==b)if(h=b.getRangeAt(0),!(h=b&&b.isCollapsed&&!e(b.getRangeAt(h.startContainer))))if(b=!b.isCollapsed&&b.getRangeAt(0)){c=!1;g(b.cloneContents());if(h=""!==b.toString().trim()){h=f(b.startContainer);var k=f(b.endContainer);h=h.isSameNode(k)}h=h&&!c&&!e(b.startContainer)}else h=!1;if(b=h)b=null===a.getRanges()[0].startContainer.getAscendant("ruby");return b}function g(a){a=a.childNodes;var b,e;for(e=0;e<a.length;e++)if(b=
1106
+ a[e],!c&&b.nodeType===window.Node.ELEMENT_NODE){var f=b.nodeName&&b.nodeName.toLowerCase();-1===h.indexOf(f)?c=!0:g(b)}}function f(a){return a.nodeType===window.Node.TEXT_NODE?a.parentNode:a}function e(a){return(new CKEDITOR.dom.element(a)).getAscendant(function(a){return a.$&&a.$.dataset&&"_tooltip"===a.$.dataset.qtiClass})}function m(a){a=a.getRanges()[0].extractContents().$;return new CKEDITOR.dom.element(a)}function k(a){var b=a.getCommand("insertTaoTooltip");b&&(l(a)?b.setState(CKEDITOR.TRISTATE_OFF):
1106
1107
  b.setState(CKEDITOR.TRISTATE_DISABLED))}var h="b strong i em s sub sup u".split(" "),c;a.addCommand("insertTaoTooltip",{exec:function(a){var b=a.config.taoQtiItem,c=a.getSelection(),e=c.getNative(),f;l(a)&&"function"===typeof b.insert&&(f=new CKEDITOR.dom.element("span",a.document),f.setAttributes({"data-new":!0,"data-qti-class":"_tooltip","class":"widget-box"}),e&&e.isCollapsed?f.appendHtml("\x26nbsp;"):f.append(m(c)),a.insertElement(f),b.insert.call(a,f.$))}});a.on("instanceReady",function(){var c=
1107
- a.editable();c.attachListener(c,"mouseup",function(){k(a)});c.attachListener(c,"keyup",function(){k(a)})});a.ui.addButton("TaoTooltip",{label:a.lang.insertTaoTooltip.button,command:"insertTaoTooltip",icon:this.path+"images/taotooltip.png"})}});CKEDITOR.plugins.add("taohighlight",{init:function(a){var l=new CKEDITOR.style({element:"span",attributes:{"class":"txt-highlight"}}),g=["span"];g.unshift(l);a.attachStyleStateChange(l,function(e){!a.readOnly&&a.getCommand("spanHighlight").setState(e)});a.addCommand("spanHighlight",
1108
+ a.editable();c.attachListener(c,"mouseup",function(){k(a)});c.attachListener(c,"keyup",function(){k(a)})});a.ui.addButton("TaoTooltip",{label:a.lang.insertTaoTooltip.button,command:"insertTaoTooltip",icon:this.path+"images/taotooltip.png"})}});CKEDITOR.plugins.add("taohighlight",{init:function(a){var l=new CKEDITOR.style({element:"span",attributes:{"class":"txt-highlight"}}),g=["span"];g.unshift(l);a.attachStyleStateChange(l,function(f){!a.readOnly&&a.getCommand("spanHighlight").setState(f)});a.addCommand("spanHighlight",
1108
1109
  new CKEDITOR.styleCommand(l,{contentForms:g}));a.ui.addButton("TaoHighlight",{label:a.lang.spanHighlight.button,command:"spanHighlight",icon:this.path+"images/taohighlight.png"})}});CKEDITOR.plugins.add("taoqtiinclude",{init:function(a){a.addCommand("insertQtiInclude",{exec:function(a){var g=a.config.taoQtiItem;"function"===typeof g.insert&&(a.insertHtml('\x3cspan data-new\x3d"true" data-qti-class\x3d"include" class\x3d"widget-box"\x3e\x26nbsp;\x3c/span\x3e'),g.insert.call(a))}});a.ui.addButton("TaoQtiInclude",
1109
1110
  {label:a.lang.insertQtiInclude.button,command:"insertQtiInclude",icon:this.path+"images/taoqtiimage.png"})}});CKEDITOR.plugins.add("taoqtiprintedvariable",{init:function(a){a.addCommand("insertQtiPrintedVariable",{exec:function(a){var g=a.config.taoQtiItem;"function"===typeof g.insert&&(a.insertHtml('\x3cspan data-new\x3d"true" data-qti-class\x3d"printedVariable" class\x3d"widget-box"\x3e\x26nbsp;\x3c/span\x3e'),g.insert.call(a))}});a.ui.addButton("TaoQtiPrintedVariable",{label:a.lang.insertQtiPrintedVariable.button,
1110
- command:"insertQtiPrintedVariable",icon:this.path+"images/taoqtiprintedvariable.png"})}});CKEDITOR.plugins.add("taofurigana",{init:function(a){function l(a){a=a.getRanges()[0].extractContents().$;return new CKEDITOR.dom.element(a)}function g(a){return a.nodeType===window.Node.TEXT_NODE?a.parentNode:a}function e(a){return null!==a.getAscendant("ruby")}function f(a){var c=a.getSelection();a=c.getNative();var d;if(d=null!==a)d=!(c&&c.isCollapsed())&&c.getRanges()[0]&&!e(c.getRanges()[0].startContainer);
1111
- if(c=d)if(a=!a.isCollapsed&&a.getRangeAt(0)){h=!1;var c=a.cloneContents().childNodes,f;for(f=0;f<c.length;f++)if(d=c[f],!h&&d.nodeType!==window.Node.TEXT_NODE){h=!0;break}if(c=""!==a.toString().trim())c=g(a.startContainer),a=g(a.endContainer),c=c.isSameNode(a);c=c&&!h}else c=!1;return c}function m(b,c,d){b=b.getAscendant("ruby");var e=b.find("rb"),f=b.find("rt");if(e.$.length&&!f.$.length||c&&e.$.length&&f.$.length&&!f.$[0].innerText.trim())return a.fire("saveSnapshot"),a.fire("lockSnapshot"),rbHtml=
1111
+ command:"insertQtiPrintedVariable",icon:this.path+"images/taoqtiprintedvariable.png"})}});CKEDITOR.plugins.add("taofurigana",{init:function(a){function l(a){a=a.getRanges()[0].extractContents().$;return new CKEDITOR.dom.element(a)}function g(a){return a.nodeType===window.Node.TEXT_NODE?a.parentNode:a}function f(a){return null!==a.getAscendant("ruby")}function e(a){var c=a.getSelection();a=c.getNative();var d;if(d=null!==a)d=!(c&&c.isCollapsed())&&c.getRanges()[0]&&!f(c.getRanges()[0].startContainer);
1112
+ if(c=d)if(a=!a.isCollapsed&&a.getRangeAt(0)){h=!1;var c=a.cloneContents().childNodes,e;for(e=0;e<c.length;e++)if(d=c[e],!h&&d.nodeType!==window.Node.TEXT_NODE){h=!0;break}if(c=""!==a.toString().trim())c=g(a.startContainer),a=g(a.endContainer),c=c.isSameNode(a);c=c&&!h}else c=!1;return c}function m(b,c,d){b=b.getAscendant("ruby");var e=b.find("rb"),f=b.find("rt");if(e.$.length&&!f.$.length||c&&e.$.length&&f.$.length&&!f.$[0].innerText.trim())return a.fire("saveSnapshot"),a.fire("lockSnapshot"),rbHtml=
1112
1113
  new CKEDITOR.dom.element.createFromHtml(e.$[0].innerHTML),rbHtml.replace(b),c||(c=new CKEDITOR.dom.range(a.document),c.selectNodeContents(rbHtml),d.selectRanges([c])),a.fire("unlockSnapshot"),!0}function k(a){function h(e){c.forEach(function(c){a.getCommand(c).setState(e)});d.forEach(function(a){a.setState(e)})}var g=a.getCommand("rubyFurigana"),k=a.getSelection(),l=k.getRanges()[0];c.length||a.toolbar.forEach(function(a){a.items&&a.items.length&&a.items.forEach(function(a){a.command&&"rubyFurigana"!==
1113
- a.command?c.push(a.command):a.command||"undefined"===typeof a.setState||d.push(a)})});g&&(f(a)?(g.setState(CKEDITOR.TRISTATE_OFF),h(CKEDITOR.TRISTATE_OFF)):k.getRanges()[0]&&e(l.startContainer)?m(l.startContainer,!1,k)?(g.setState(CKEDITOR.TRISTATE_DISABLED),h(CKEDITOR.TRISTATE_OFF)):(g.setState(CKEDITOR.TRISTATE_ON),setTimeout(function(){h(CKEDITOR.TRISTATE_DISABLED)},150)):(g.setState(CKEDITOR.TRISTATE_DISABLED),h(CKEDITOR.TRISTATE_OFF)))}var h,c=[],d=[];a.addCommand("rubyFurigana",{exec:function(a){var c=
1114
- a.getSelection(),d=c.getRanges()[0],h=d.startContainer,g,r,p;e(h)?(g=h.getAscendant("ruby"),r=g.find("rb"),p=g.find("rt"),m(h,!0)?k(a):r.$.length&&p.$.length&&h.getParent().$===p.$[0]&&null===h.$.nextSibling&&d.endOffset+1>=h.$.length&&(d=new CKEDITOR.dom.range(a.document),g.$.nextSibling?(p=new CKEDITOR.dom.text(CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE),p.insertAfter(g),d.moveToElementEditablePosition(p)):d.moveToClosestEditablePosition(g,!0),c.selectRanges([d]),k(a))):f(a)&&(a.fire("saveSnapshot"),
1114
+ a.command?c.push(a.command):a.command||"undefined"===typeof a.setState||d.push(a)})});g&&(e(a)?(g.setState(CKEDITOR.TRISTATE_OFF),h(CKEDITOR.TRISTATE_OFF)):k.getRanges()[0]&&f(l.startContainer)?m(l.startContainer,!1,k)?(g.setState(CKEDITOR.TRISTATE_DISABLED),h(CKEDITOR.TRISTATE_OFF)):(g.setState(CKEDITOR.TRISTATE_ON),setTimeout(function(){h(CKEDITOR.TRISTATE_DISABLED)},150)):(g.setState(CKEDITOR.TRISTATE_DISABLED),h(CKEDITOR.TRISTATE_OFF)))}var h,c=[],d=[];a.addCommand("rubyFurigana",{exec:function(a){var c=
1115
+ a.getSelection(),d=c.getRanges()[0],h=d.startContainer,g,r,p;f(h)?(g=h.getAscendant("ruby"),r=g.find("rb"),p=g.find("rt"),m(h,!0)?k(a):r.$.length&&p.$.length&&h.getParent().$===p.$[0]&&null===h.$.nextSibling&&d.endOffset+1>=h.$.length&&(d=new CKEDITOR.dom.range(a.document),g.$.nextSibling?(p=new CKEDITOR.dom.text(CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE),p.insertAfter(g),d.moveToElementEditablePosition(p)):d.moveToClosestEditablePosition(g,!0),c.selectRanges([d]),k(a))):e(a)&&(a.fire("saveSnapshot"),
1115
1116
  a.fire("lockSnapshot"),g=new CKEDITOR.dom.element("ruby",a.document),r=new CKEDITOR.dom.element("rb",a.document),r.append(l(c)),p=new CKEDITOR.dom.element("rt",a.document),p.appendHtml("\x26nbsp;"),g.append(r),g.append(p),a.insertElement(g),d=new CKEDITOR.dom.range(a.document),d.moveToElementEditablePosition(p),a.getSelection().selectRanges([d]),k(a),a.fire("unlockSnapshot"))}});a.on("instanceReady",function(){var b=a.editable();a.getCommand("rubyFurigana").setState(CKEDITOR.TRISTATE_DISABLED);b.attachListener(b,
1116
- "mouseup",function(){k(a)});b.attachListener(b,"keyup",function(){k(a)})});a.ui.addButton("TaoFurigana",{label:a.lang.rubyFurigana.button,command:"rubyFurigana",icon:this.path+"images/taofurigana.png"})}});"use strict";(function(){function a(a,d){return CKEDITOR.tools.array.reduce(d,function(a,c){return c(a)},a)}var l=[CKEDITOR.CTRL+90,CKEDITOR.CTRL+89,CKEDITOR.CTRL+CKEDITOR.SHIFT+90],g={8:1,46:1};CKEDITOR.plugins.add("undo",{init:function(a){function d(a){f.enabled&&!1!==a.data.command.canUndo&&
1117
- f.save()}function b(){f.enabled=a.readOnly?!1:"wysiwyg"==a.mode;f.onChange()}var f=a.undoManager=new e(a),h=f.editingHandler=new k(f),g=a.addCommand("undo",{exec:function(){f.undo()&&(a.selectionChange(),this.fire("afterUndo"))},startDisabled:!0,canUndo:!1}),m=a.addCommand("redo",{exec:function(){f.redo()&&(a.selectionChange(),this.fire("afterRedo"))},startDisabled:!0,canUndo:!1});a.setKeystroke([[l[0],"undo"],[l[1],"redo"],[l[2],"redo"]]);f.onChange=function(){g.setState(f.undoable()?CKEDITOR.TRISTATE_OFF:
1118
- CKEDITOR.TRISTATE_DISABLED);m.setState(f.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)};a.on("beforeCommandExec",d);a.on("afterCommandExec",d);a.on("saveSnapshot",function(a){f.save(a.data&&a.data.contentOnly)});a.on("contentDom",h.attachListeners,h);a.on("instanceReady",function(){a.fire("saveSnapshot")});a.on("beforeModeUnload",function(){"wysiwyg"==a.mode&&f.save(!0)});a.on("mode",b);a.on("readOnly",b);a.ui.addButton&&(a.ui.addButton("Undo",{label:a.lang.undo.undo,command:"undo",
1119
- toolbar:"undo,10"}),a.ui.addButton("Redo",{label:a.lang.undo.redo,command:"redo",toolbar:"undo,20"}));a.resetUndo=function(){f.reset();a.fire("saveSnapshot")};a.on("updateSnapshot",function(){f.currentImage&&f.update()});a.on("lockSnapshot",function(a){a=a.data;f.lock(a&&a.dontUpdate,a&&a.forceUpdate)});a.on("unlockSnapshot",f.unlock,f)}});CKEDITOR.plugins.undo={};var e=CKEDITOR.plugins.undo.UndoManager=function(a){this.strokesRecorded=[0,0];this.locked=null;this.previousKeyGroup=-1;this.limit=a.config.undoStackSize||
1120
- 20;this.strokesLimit=25;this._filterRules=[];this.editor=a;this.reset();CKEDITOR.env.ie&&this.addFilterRule(function(a){return a.replace(/\s+data-cke-expando=".*?"/g,"")})};e.prototype={type:function(a,d){var b=e.getKeyGroup(a),f=this.strokesRecorded[b]+1;d=d||f>=this.strokesLimit;this.typing||(this.hasUndo=this.typing=!0,this.hasRedo=!1,this.onChange());d?(f=0,this.editor.fire("saveSnapshot")):this.editor.fire("change");this.strokesRecorded[b]=f;this.previousKeyGroup=b},keyGroupChanged:function(a){return e.getKeyGroup(a)!=
1121
- this.previousKeyGroup},reset:function(){this.snapshots=[];this.index=-1;this.currentImage=null;this.hasRedo=this.hasUndo=!1;this.locked=null;this.resetType()},resetType:function(){this.strokesRecorded=[0,0];this.typing=!1;this.previousKeyGroup=-1},refreshState:function(){this.hasUndo=!!this.getNextImage(!0);this.hasRedo=!!this.getNextImage(!1);this.resetType();this.onChange()},save:function(a,d,b){var e=this.editor;if(this.locked||"ready"!=e.status||"wysiwyg"!=e.mode)return!1;var h=e.editable();if(!h||
1122
- "ready"!=h.status)return!1;h=this.snapshots;d||(d=new f(e));if(!1===d.contents)return!1;if(this.currentImage)if(d.equalsContent(this.currentImage)){if(a||d.equalsSelection(this.currentImage))return!1}else!1!==b&&e.fire("change");h.splice(this.index+1,h.length-this.index-1);h.length==this.limit&&h.shift();this.index=h.push(d)-1;this.currentImage=d;!1!==b&&this.refreshState();return!0},restoreImage:function(a){var d=this.editor,b;a.bookmarks&&(d.focus(),b=d.getSelection());this.locked={level:999};this.editor.loadSnapshot(a.contents);
1117
+ "mouseup",function(){k(a)});b.attachListener(b,"keyup",function(){k(a)})});a.ui.addButton("TaoFurigana",{label:a.lang.rubyFurigana.button,command:"rubyFurigana",icon:this.path+"images/taofurigana.png"})}});"use strict";(function(){function a(a,d){return CKEDITOR.tools.array.reduce(d,function(a,c){return c(a)},a)}var l=[CKEDITOR.CTRL+90,CKEDITOR.CTRL+89,CKEDITOR.CTRL+CKEDITOR.SHIFT+90],g={8:1,46:1};CKEDITOR.plugins.add("undo",{init:function(a){function d(a){e.enabled&&!1!==a.data.command.canUndo&&
1118
+ e.save()}function b(){e.enabled=a.readOnly?!1:"wysiwyg"==a.mode;e.onChange()}var e=a.undoManager=new f(a),h=e.editingHandler=new k(e),g=a.addCommand("undo",{exec:function(){e.undo()&&(a.selectionChange(),this.fire("afterUndo"))},startDisabled:!0,canUndo:!1}),m=a.addCommand("redo",{exec:function(){e.redo()&&(a.selectionChange(),this.fire("afterRedo"))},startDisabled:!0,canUndo:!1});a.setKeystroke([[l[0],"undo"],[l[1],"redo"],[l[2],"redo"]]);e.onChange=function(){g.setState(e.undoable()?CKEDITOR.TRISTATE_OFF:
1119
+ CKEDITOR.TRISTATE_DISABLED);m.setState(e.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)};a.on("beforeCommandExec",d);a.on("afterCommandExec",d);a.on("saveSnapshot",function(a){e.save(a.data&&a.data.contentOnly)});a.on("contentDom",h.attachListeners,h);a.on("instanceReady",function(){a.fire("saveSnapshot")});a.on("beforeModeUnload",function(){"wysiwyg"==a.mode&&e.save(!0)});a.on("mode",b);a.on("readOnly",b);a.ui.addButton&&(a.ui.addButton("Undo",{label:a.lang.undo.undo,command:"undo",
1120
+ toolbar:"undo,10"}),a.ui.addButton("Redo",{label:a.lang.undo.redo,command:"redo",toolbar:"undo,20"}));a.resetUndo=function(){e.reset();a.fire("saveSnapshot")};a.on("updateSnapshot",function(){e.currentImage&&e.update()});a.on("lockSnapshot",function(a){a=a.data;e.lock(a&&a.dontUpdate,a&&a.forceUpdate)});a.on("unlockSnapshot",e.unlock,e)}});CKEDITOR.plugins.undo={};var f=CKEDITOR.plugins.undo.UndoManager=function(a){this.strokesRecorded=[0,0];this.locked=null;this.previousKeyGroup=-1;this.limit=a.config.undoStackSize||
1121
+ 20;this.strokesLimit=25;this._filterRules=[];this.editor=a;this.reset();CKEDITOR.env.ie&&this.addFilterRule(function(a){return a.replace(/\s+data-cke-expando=".*?"/g,"")})};f.prototype={type:function(a,d){var b=f.getKeyGroup(a),e=this.strokesRecorded[b]+1;d=d||e>=this.strokesLimit;this.typing||(this.hasUndo=this.typing=!0,this.hasRedo=!1,this.onChange());d?(e=0,this.editor.fire("saveSnapshot")):this.editor.fire("change");this.strokesRecorded[b]=e;this.previousKeyGroup=b},keyGroupChanged:function(a){return f.getKeyGroup(a)!=
1122
+ this.previousKeyGroup},reset:function(){this.snapshots=[];this.index=-1;this.currentImage=null;this.hasRedo=this.hasUndo=!1;this.locked=null;this.resetType()},resetType:function(){this.strokesRecorded=[0,0];this.typing=!1;this.previousKeyGroup=-1},refreshState:function(){this.hasUndo=!!this.getNextImage(!0);this.hasRedo=!!this.getNextImage(!1);this.resetType();this.onChange()},save:function(a,d,b){var f=this.editor;if(this.locked||"ready"!=f.status||"wysiwyg"!=f.mode)return!1;var h=f.editable();if(!h||
1123
+ "ready"!=h.status)return!1;h=this.snapshots;d||(d=new e(f));if(!1===d.contents)return!1;if(this.currentImage)if(d.equalsContent(this.currentImage)){if(a||d.equalsSelection(this.currentImage))return!1}else!1!==b&&f.fire("change");h.splice(this.index+1,h.length-this.index-1);h.length==this.limit&&h.shift();this.index=h.push(d)-1;this.currentImage=d;!1!==b&&this.refreshState();return!0},restoreImage:function(a){var d=this.editor,b;a.bookmarks&&(d.focus(),b=d.getSelection());this.locked={level:999};this.editor.loadSnapshot(a.contents);
1123
1124
  a.bookmarks?b.selectBookmarks(a.bookmarks):CKEDITOR.env.ie&&(b=this.editor.document.getBody().$.createTextRange(),b.collapse(!0),b.select());this.locked=null;this.index=a.index;this.currentImage=this.snapshots[this.index];this.update();this.refreshState();d.fire("change")},getNextImage:function(a){var d=this.snapshots,b=this.currentImage,e;if(b)if(a)for(e=this.index-1;0<=e;e--){if(a=d[e],!b.equalsContent(a))return a.index=e,a}else for(e=this.index+1;e<d.length;e++)if(a=d[e],!b.equalsContent(a))return a.index=
1124
- e,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),!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 f(this.editor));for(var d=this.index,b=this.snapshots;0<d&&this.currentImage.equalsContent(b[d-
1125
- 1]);)--d;b.splice(d,this.index-d+1,a);this.index=d;this.currentImage=a}},updateSelection:function(a){if(!this.snapshots.length)return!1;var d=this.snapshots,b=d[d.length-1];return b.equalsContent(a)&&!b.equalsSelection(a)?(this.currentImage=d[d.length-1]=a,!0):!1},lock:function(a,d){if(this.locked)this.locked.level++;else if(a)this.locked={level:1};else{var b=null;if(d)b=!0;else{var e=new f(this.editor,!0);this.currentImage&&this.currentImage.equalsContent(e)&&(b=e)}this.locked={update:b,level:1}}},
1126
- 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 d=new f(this.editor,!0);a.equalsContent(d)||this.update()}}},addFilterRule:function(a){this._filterRules.push(a)}};e.navigationKeyCodes={37:1,38:1,39:1,40:1,36:1,35:1,33:1,34:1};e.keyGroups={PRINTABLE:0,FUNCTIONAL:1};e.isNavigationKey=function(a){return!!e.navigationKeyCodes[a]};e.getKeyGroup=function(a){var d=e.keyGroups;return g[a]?d.FUNCTIONAL:d.PRINTABLE};e.getOppositeKeyGroup=
1127
- function(a){var d=e.keyGroups;return a==d.FUNCTIONAL?d.PRINTABLE:d.FUNCTIONAL};e.ieFunctionalKeysBug=function(a){return CKEDITOR.env.ie&&e.getKeyGroup(a)==e.keyGroups.FUNCTIONAL};var f=CKEDITOR.plugins.undo.Image=function(c,d){this.editor=c;c.fire("beforeUndoImage");var b=c.getSnapshot();b&&(this.contents=a(b,c.undoManager._filterRules));d||(this.bookmarks=(b=b&&c.getSelection())&&b.createBookmarks2(!0));c.fire("afterUndoImage")},m=/\b(?:href|src|name)="[^"]*?"/gi;f.prototype={equalsContent:function(a){var d=
1125
+ e,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),!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 d=this.index,b=this.snapshots;0<d&&this.currentImage.equalsContent(b[d-
1126
+ 1]);)--d;b.splice(d,this.index-d+1,a);this.index=d;this.currentImage=a}},updateSelection:function(a){if(!this.snapshots.length)return!1;var d=this.snapshots,b=d[d.length-1];return b.equalsContent(a)&&!b.equalsSelection(a)?(this.currentImage=d[d.length-1]=a,!0):!1},lock:function(a,d){if(this.locked)this.locked.level++;else if(a)this.locked={level:1};else{var b=null;if(d)b=!0;else{var f=new e(this.editor,!0);this.currentImage&&this.currentImage.equalsContent(f)&&(b=f)}this.locked={update:b,level:1}}},
1127
+ 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 d=new e(this.editor,!0);a.equalsContent(d)||this.update()}}},addFilterRule:function(a){this._filterRules.push(a)}};f.navigationKeyCodes={37:1,38:1,39:1,40:1,36:1,35:1,33:1,34:1};f.keyGroups={PRINTABLE:0,FUNCTIONAL:1};f.isNavigationKey=function(a){return!!f.navigationKeyCodes[a]};f.getKeyGroup=function(a){var d=f.keyGroups;return g[a]?d.FUNCTIONAL:d.PRINTABLE};f.getOppositeKeyGroup=
1128
+ function(a){var d=f.keyGroups;return a==d.FUNCTIONAL?d.PRINTABLE:d.FUNCTIONAL};f.ieFunctionalKeysBug=function(a){return CKEDITOR.env.ie&&f.getKeyGroup(a)==f.keyGroups.FUNCTIONAL};var e=CKEDITOR.plugins.undo.Image=function(c,d){this.editor=c;c.fire("beforeUndoImage");var b=c.getSnapshot();b&&(this.contents=a(b,c.undoManager._filterRules));d||(this.bookmarks=(b=b&&c.getSelection())&&b.createBookmarks2(!0));c.fire("afterUndoImage")},m=/\b(?:href|src|name)="[^"]*?"/gi;e.prototype={equalsContent:function(a){var d=
1128
1129
  this.contents;a=a.contents;CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)&&(d=d.replace(m,""),a=a.replace(m,""));return d!=a?!1:!0},equalsSelection:function(a){var d=this.bookmarks;a=a.bookmarks;if(d||a){if(!d||!a||d.length!=a.length)return!1;for(var b=0;b<d.length;b++){var e=d[b],f=a[b];if(e.startOffset!=f.startOffset||e.endOffset!=f.endOffset||!CKEDITOR.tools.arrayCompare(e.start,f.start)||!CKEDITOR.tools.arrayCompare(e.end,f.end))return!1}}return!0}};var k=CKEDITOR.plugins.undo.NativeEditingHandler=
1129
- function(a){this.undoManager=a;this.ignoreInputEvent=!1;this.keyEventsStack=new h;this.lastKeydownImage=null};k.prototype={onKeydown:function(a){var d=a.data.getKey();if(229!==d)if(-1<CKEDITOR.tools.indexOf(l,a.data.getKeystroke()))a.data.preventDefault();else if(this.keyEventsStack.cleanUp(a),a=this.undoManager,this.keyEventsStack.getLast(d)||this.keyEventsStack.push(d),this.lastKeydownImage=new f(a.editor),e.isNavigationKey(d)||this.undoManager.keyGroupChanged(d))if(a.strokesRecorded[0]||a.strokesRecorded[1])a.save(!1,
1130
+ function(a){this.undoManager=a;this.ignoreInputEvent=!1;this.keyEventsStack=new h;this.lastKeydownImage=null};k.prototype={onKeydown:function(a){var d=a.data.getKey();if(229!==d)if(-1<CKEDITOR.tools.indexOf(l,a.data.getKeystroke()))a.data.preventDefault();else if(this.keyEventsStack.cleanUp(a),a=this.undoManager,this.keyEventsStack.getLast(d)||this.keyEventsStack.push(d),this.lastKeydownImage=new e(a.editor),f.isNavigationKey(d)||this.undoManager.keyGroupChanged(d))if(a.strokesRecorded[0]||a.strokesRecorded[1])a.save(!1,
1130
1131
  this.lastKeydownImage,!1),a.resetType()},onInput:function(){if(this.ignoreInputEvent)this.ignoreInputEvent=!1;else{var a=this.keyEventsStack.getLast();a||(a=this.keyEventsStack.push(0));this.keyEventsStack.increment(a.keyCode);this.keyEventsStack.getTotalInputs()>=this.undoManager.strokesLimit&&(this.undoManager.type(a.keyCode,!0),this.keyEventsStack.resetInputs())}},onKeyup:function(a){var d=this.undoManager;a=a.data.getKey();var b=this.keyEventsStack.getTotalInputs();this.keyEventsStack.remove(a);
1131
- if(!(e.ieFunctionalKeysBug(a)&&this.lastKeydownImage&&this.lastKeydownImage.equalsContent(new f(d.editor,!0))))if(0<b)d.type(a);else if(e.isNavigationKey(a))this.onNavigationKey(!0)},onNavigationKey:function(a){var d=this.undoManager;!a&&d.save(!0,null,!1)||d.updateSelection(new f(d.editor));d.resetType()},ignoreInputEventListener:function(){this.ignoreInputEvent=!0},activateInputEventListener:function(){this.ignoreInputEvent=!1},attachListeners:function(){var a=this.undoManager.editor,d=a.editable(),
1132
- b=this;d.attachListener(d,"keydown",function(a){b.onKeydown(a);if(e.ieFunctionalKeysBug(a.data.getKey()))b.onInput()},null,null,999);d.attachListener(d,CKEDITOR.env.ie?"keypress":"input",b.onInput,b,null,999);d.attachListener(d,"keyup",b.onKeyup,b,null,999);d.attachListener(d,"paste",b.ignoreInputEventListener,b,null,999);d.attachListener(d,"drop",b.ignoreInputEventListener,b,null,999);a.on("afterPaste",b.activateInputEventListener,b,null,999);d.attachListener(d.isInline()?d:a.document.getDocumentElement(),
1132
+ if(!(f.ieFunctionalKeysBug(a)&&this.lastKeydownImage&&this.lastKeydownImage.equalsContent(new e(d.editor,!0))))if(0<b)d.type(a);else if(f.isNavigationKey(a))this.onNavigationKey(!0)},onNavigationKey:function(a){var d=this.undoManager;!a&&d.save(!0,null,!1)||d.updateSelection(new e(d.editor));d.resetType()},ignoreInputEventListener:function(){this.ignoreInputEvent=!0},activateInputEventListener:function(){this.ignoreInputEvent=!1},attachListeners:function(){var a=this.undoManager.editor,d=a.editable(),
1133
+ b=this;d.attachListener(d,"keydown",function(a){b.onKeydown(a);if(f.ieFunctionalKeysBug(a.data.getKey()))b.onInput()},null,null,999);d.attachListener(d,CKEDITOR.env.ie?"keypress":"input",b.onInput,b,null,999);d.attachListener(d,"keyup",b.onKeyup,b,null,999);d.attachListener(d,"paste",b.ignoreInputEventListener,b,null,999);d.attachListener(d,"drop",b.ignoreInputEventListener,b,null,999);a.on("afterPaste",b.activateInputEventListener,b,null,999);d.attachListener(d.isInline()?d:a.document.getDocumentElement(),
1133
1134
  "click",function(){b.onNavigationKey()},null,null,999);d.attachListener(this.undoManager.editor,"blur",function(){b.keyEventsStack.remove(9)},null,null,999)}};var h=CKEDITOR.plugins.undo.KeyEventsStack=function(){this.stack=[]};h.prototype={push:function(a){a=this.stack.push({keyCode:a,inputs:0});return this.stack[a-1]},getLastIndex:function(a){if("number"!=typeof a)return this.stack.length-1;for(var d=this.stack.length;d--;)if(this.stack[d].keyCode==a)return d;return-1},getLast:function(a){a=this.getLastIndex(a);
1134
1135
  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"==typeof 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,d=0;a--;)d+=this.stack[a].inputs;return d},cleanUp:function(a){a=a.data.$;a.ctrlKey||a.metaKey||this.remove(17);a.shiftKey||this.remove(16);a.altKey||this.remove(18)}}})();
1135
- (function(){function a(a){function e(a){var c=!1;b.attachListener(b,"keydown",function(){var b=h.getBody().getElementsByTag(a);if(!c){for(var d=0;d<b.count();d++)b.getItem(d).setCustomData("retain",!0);c=!0}},null,null,1);b.attachListener(b,"keyup",function(){var b=h.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 g=this.editor;if(g&&!g.isDetached()){var h=a.document,c=h.body,d=h.getElementById("cke_actscrpt");
1136
+ (function(){function a(a){function f(a){var c=!1;b.attachListener(b,"keydown",function(){var b=h.getBody().getElementsByTag(a);if(!c){for(var d=0;d<b.count();d++)b.getItem(d).setCustomData("retain",!0);c=!0}},null,null,1);b.attachListener(b,"keyup",function(){var b=h.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 g=this.editor;if(g&&!g.isDetached()){var h=a.document,c=h.body,d=h.getElementById("cke_actscrpt");
1136
1137
  d&&d.parentNode.removeChild(d);(d=h.getElementById("cke_shimscrpt"))&&d.parentNode.removeChild(d);(d=h.getElementById("cke_basetagscrpt"))&&d.parentNode.removeChild(d);c.contentEditable=!0;CKEDITOR.env.ie&&(c.hideFocus=!0,c.disabled=!0,c.removeAttribute("disabled"));delete this._.isLoadingData;this.$=c;h=new CKEDITOR.dom.document(h);this.setup();this.fixInitialSelection();var b=this;CKEDITOR.env.ie&&!CKEDITOR.env.edge&&h.getDocumentElement().addClass(h.$.compatMode);CKEDITOR.env.ie&&!CKEDITOR.env.edge&&
1137
- g.enterMode!=CKEDITOR.ENTER_P?e("p"):CKEDITOR.env.edge&&15>CKEDITOR.env.version&&g.enterMode!=CKEDITOR.ENTER_DIV&&e("div");if(CKEDITOR.env.webkit||CKEDITOR.env.ie&&10<CKEDITOR.env.version)h.getDocumentElement().on("mousedown",function(a){a.data.getTarget().is("html")&&setTimeout(function(){g.editable().focus()})});l(g);try{g.document.$.execCommand("2D-position",!1,!0)}catch(n){}(CKEDITOR.env.gecko||CKEDITOR.env.ie&&"CSS1Compat"==g.document.$.compatMode)&&this.attachListener(this,"keydown",function(a){var b=
1138
+ g.enterMode!=CKEDITOR.ENTER_P?f("p"):CKEDITOR.env.edge&&15>CKEDITOR.env.version&&g.enterMode!=CKEDITOR.ENTER_DIV&&f("div");if(CKEDITOR.env.webkit||CKEDITOR.env.ie&&10<CKEDITOR.env.version)h.getDocumentElement().on("mousedown",function(a){a.data.getTarget().is("html")&&setTimeout(function(){g.editable().focus()})});l(g);try{g.document.$.execCommand("2D-position",!1,!0)}catch(n){}(CKEDITOR.env.gecko||CKEDITOR.env.ie&&"CSS1Compat"==g.document.$.compatMode)&&this.attachListener(this,"keydown",function(a){var b=
1138
1139
  a.data.getKeystroke();if(33==b||34==b)if(CKEDITOR.env.ie)setTimeout(function(){g.getSelection().scrollIntoView()},0);else if(g.window.$.innerHeight>this.$.offsetHeight){var c=g.createRange();c[33==b?"moveToElementEditStart":"moveToElementEditEnd"](this);c.select();a.data.preventDefault()}});CKEDITOR.env.ie&&this.attachListener(h,"blur",function(){try{h.$.selection.empty()}catch(a){}});CKEDITOR.env.iOS&&this.attachListener(h,"touchend",function(){a.focus()});c=g.document.getElementsByTag("title").getItem(0);
1139
- c.data("cke-title",c.getText());CKEDITOR.env.ie&&(g.document.$.title=this._.docTitle);CKEDITOR.tools.setTimeout(function(){"unloaded"==this.status&&(this.status="ready");g.fire("contentDom");this._.isPendingFocus&&(g.focus(),this._.isPendingFocus=!1);setTimeout(function(){g.fire("dataReady")},0)},0,this)}}function l(a){function e(){var c;a.editable().attachListener(a,"selectionChange",function(){var b=a.getSelection().getSelectedElement();b&&(c&&(c.detachEvent("onresizestart",g),c=null),b.$.attachEvent("onresizestart",
1140
- g),c=b.$)})}function g(a){a.returnValue=!1}if(CKEDITOR.env.gecko)try{var h=a.document.$;h.execCommand("enableObjectResizing",!1,!a.config.disableObjectResizing);h.execCommand("enableInlineTableEditing",!1,!a.config.disableNativeTableHandles)}catch(c){}else CKEDITOR.env.ie&&11>CKEDITOR.env.version&&a.config.disableObjectResizing&&e(a)}function g(){var a=[];if(8<=CKEDITOR.document.$.documentMode){a.push("html.CSS1Compat [contenteditable\x3dfalse]{min-height:0 !important}");var e=[],g;for(g in CKEDITOR.dtd.$removeEmpty)e.push("html.CSS1Compat "+
1141
- g+"[contenteditable\x3dfalse]");a.push(e.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}"));a.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 [*]",
1142
- requiredContent:"body"});a.addMode("wysiwyg",function(g){function k(b){b&&b.removeListener();a.isDestroyed()||a.isDetached()||(a.editable(new e(a,c.$.contentWindow.document.body)),a.setData(a.getData(1),g))}var h="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"")+"document.close();",h=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent(h)+"}())":"",c=CKEDITOR.dom.element.createFromHtml('\x3ciframe src\x3d"'+
1140
+ c.data("cke-title",c.getText());CKEDITOR.env.ie&&(g.document.$.title=this._.docTitle);CKEDITOR.tools.setTimeout(function(){"unloaded"==this.status&&(this.status="ready");g.fire("contentDom");this._.isPendingFocus&&(g.focus(),this._.isPendingFocus=!1);setTimeout(function(){g.fire("dataReady")},0)},0,this)}}function l(a){function f(){var c;a.editable().attachListener(a,"selectionChange",function(){var b=a.getSelection().getSelectedElement();b&&(c&&(c.detachEvent("onresizestart",g),c=null),b.$.attachEvent("onresizestart",
1141
+ g),c=b.$)})}function g(a){a.returnValue=!1}if(CKEDITOR.env.gecko)try{var h=a.document.$;h.execCommand("enableObjectResizing",!1,!a.config.disableObjectResizing);h.execCommand("enableInlineTableEditing",!1,!a.config.disableNativeTableHandles)}catch(c){}else CKEDITOR.env.ie&&11>CKEDITOR.env.version&&a.config.disableObjectResizing&&f(a)}function g(){var a=[];if(8<=CKEDITOR.document.$.documentMode){a.push("html.CSS1Compat [contenteditable\x3dfalse]{min-height:0 !important}");var f=[],g;for(g in CKEDITOR.dtd.$removeEmpty)f.push("html.CSS1Compat "+
1142
+ g+"[contenteditable\x3dfalse]");a.push(f.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}"));a.push("html{cursor:text;*cursor:auto}");a.push("img,input,textarea{cursor:default}");return a.join("\n")}var f;CKEDITOR.plugins.add("wysiwygarea",{init:function(a){a.config.fullPage&&a.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]",
1143
+ requiredContent:"body"});a.addMode("wysiwyg",function(g){function k(b){b&&b.removeListener();a.isDestroyed()||a.isDetached()||(a.editable(new f(a,c.$.contentWindow.document.body)),a.setData(a.getData(1),g))}var h="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"")+"document.close();",h=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent(h)+"}())":"",c=CKEDITOR.dom.element.createFromHtml('\x3ciframe src\x3d"'+
1143
1144
  h+'" frameBorder\x3d"0"\x3e\x3c/iframe\x3e');c.setStyles({width:"100%",height:"100%"});c.addClass("cke_wysiwyg_frame").addClass("cke_reset");h=a.ui.space("contents");h.append(c);var d=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.gecko;if(d)c.on("load",k);var b=a.title,l=a.fire("ariaEditorHelpLabel",{}).label;b&&(CKEDITOR.env.ie&&l&&(b+=", "+l),c.setAttribute("title",b));if(l){var b=CKEDITOR.tools.getNextId(),q=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+b+'" class\x3d"cke_voice_label"\x3e'+
1144
- l+"\x3c/span\x3e");h.append(q,1);c.setAttribute("aria-describedby",b)}a.on("beforeModeUnload",function(a){a.removeListener();q&&q.remove()});c.setAttributes({tabIndex:a.tabIndex,allowTransparency:"true"});!d&&k();a.fire("ariaWidget",c)})}});CKEDITOR.editor.prototype.addContentsCss=function(a){var e=this.config,g=e.contentsCss;CKEDITOR.tools.isArray(g)||(e.contentsCss=g?[g]:[]);e.contentsCss.push(a)};e=CKEDITOR.tools.createClass({$:function(){this.base.apply(this,arguments);this._.frameLoadedHandler=
1145
- CKEDITOR.tools.addFunction(function(e){CKEDITOR.tools.setTimeout(a,0,this,e)},this);this._.docTitle=this.getWindow().getFrame().getAttribute("title")},base:CKEDITOR.editable,proto:{setData:function(a,e){var k=this.editor;if(e)this.setHtml(a),this.fixInitialSelection(),k.fire("dataReady");else{this._.isLoadingData=!0;k._.dataStore={id:1};var h=k.config,c=h.fullPage,d=h.docType,b=CKEDITOR.tools.buildStyleHtml(g()).replace(/<style>/,'\x3cstyle data-cke-temp\x3d"1"\x3e');c||(b+=CKEDITOR.tools.buildStyleHtml(k.config.contentsCss));
1145
+ l+"\x3c/span\x3e");h.append(q,1);c.setAttribute("aria-describedby",b)}a.on("beforeModeUnload",function(a){a.removeListener();q&&q.remove()});c.setAttributes({tabIndex:a.tabIndex,allowTransparency:"true"});!d&&k();a.fire("ariaWidget",c)})}});CKEDITOR.editor.prototype.addContentsCss=function(a){var f=this.config,g=f.contentsCss;CKEDITOR.tools.isArray(g)||(f.contentsCss=g?[g]:[]);f.contentsCss.push(a)};f=CKEDITOR.tools.createClass({$:function(){this.base.apply(this,arguments);this._.frameLoadedHandler=
1146
+ CKEDITOR.tools.addFunction(function(e){CKEDITOR.tools.setTimeout(a,0,this,e)},this);this._.docTitle=this.getWindow().getFrame().getAttribute("title")},base:CKEDITOR.editable,proto:{setData:function(a,f){var k=this.editor;if(f)this.setHtml(a),this.fixInitialSelection(),k.fire("dataReady");else{this._.isLoadingData=!0;k._.dataStore={id:1};var h=k.config,c=h.fullPage,d=h.docType,b=CKEDITOR.tools.buildStyleHtml(g()).replace(/<style>/,'\x3cstyle data-cke-temp\x3d"1"\x3e');c||(b+=CKEDITOR.tools.buildStyleHtml(k.config.contentsCss));
1146
1147
  var l=h.baseHref?'\x3cbase href\x3d"'+h.baseHref+'" data-cke-temp\x3d"1" /\x3e':"";c&&(a=a.replace(/<!DOCTYPE[^>]*>/i,function(a){k.docType=d=a;return""}).replace(/<\?xml\s[^\?]*\?>/i,function(a){k.xmlDeclaration=a;return""}));a=k.dataProcessor.toHtml(a);c?(/<body[\s|>]/.test(a)||(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"),
1147
1148
  l&&(a=a.replace(/<head[^>]*?>/,"$\x26"+l)),a=a.replace(/<\/head\s*>/,b+"$\x26"),a=d+a):a=h.docType+'\x3chtml dir\x3d"'+h.contentsLangDirection+'" lang\x3d"'+(h.contentsLanguage||k.langCode)+'"\x3e\x3chead\x3e\x3ctitle\x3e'+this._.docTitle+"\x3c/title\x3e"+l+b+"\x3c/head\x3e\x3cbody"+(h.bodyId?' id\x3d"'+h.bodyId+'"':"")+(h.bodyClass?' class\x3d"'+h.bodyClass+'"':"")+"\x3e"+a+"\x3c/body\x3e\x3c/html\x3e";CKEDITOR.env.gecko&&(a=a.replace(/<body/,'\x3cbody contenteditable\x3d"true" '),2E4>CKEDITOR.env.version&&
1148
1149
  (a=a.replace(/<body[^>]*>/,"$\x26\x3c!-- cke-content-start --\x3e")));h='\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("+this._.frameLoadedHandler+",window);wasLoaded\x3d1;}"+(CKEDITOR.env.ie?"onload();":'document.addEventListener("DOMContentLoaded", onload, false );')+"\x3c/script\x3e";CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(h+='\x3cscript id\x3d"cke_shimscrpt"\x3ewindow.parent.CKEDITOR.tools.enableHtml5Elements(document)\x3c/script\x3e');
1149
- l&&CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(h+='\x3cscript id\x3d"cke_basetagscrpt"\x3evar baseTag \x3d document.querySelector( "base" );baseTag.href \x3d baseTag.href;\x3c/script\x3e');a=a.replace(/(?=\s*<\/(:?head)>)/,h);this.clearCustomData();this.clearListeners();k.fire("contentDomUnload");var q=this.getDocument();try{q.write(a)}catch(u){setTimeout(function(){q.write(a)},0)}}},getData:function(a){if(a)return this.getHtml();a=this.editor;var e=a.config,g=e.fullPage,h=g&&a.docType,c=g&&a.xmlDeclaration,
1150
- d=this.getDocument(),g=g?d.getDocumentElement().getOuterHtml():d.getBody().getHtml();CKEDITOR.env.gecko&&e.enterMode!=CKEDITOR.ENTER_BR&&(g=g.replace(/<br>(?=\s*(:?$|<\/body>))/,""));g=a.dataProcessor.toDataFormat(g);c&&(g=c+"\n"+g);h&&(g=h+"\n"+g);return g},focus:function(){this._.isLoadingData?this._.isPendingFocus=!0:e.baseProto.focus.call(this)},detach:function(){var a=this.editor,g=a.document,a=a.container.findOne("iframe.cke_wysiwyg_frame");e.baseProto.detach.call(this);this.clearCustomData(this._.expandoNumber);
1151
- g.getDocumentElement().clearCustomData();CKEDITOR.tools.removeFunction(this._.frameLoadedHandler);a&&(a.clearCustomData(),(g=a.removeCustomData("onResize"))&&g.removeListener(),a.isDetached()||a.remove())}}})})();CKEDITOR.config.disableObjectResizing=!1;CKEDITOR.config.disableNativeTableHandles=!0;CKEDITOR.config.disableNativeSpellChecker=!0;CKEDITOR.config.plugins="basicstyles,bidi,blockquote,dialogui,dialog,notification,button,toolbar,clipboard,panelbutton,panel,floatpanel,colorbutton,colordialog,copyformatting,menu,contextmenu,confighelper,dialogadvtab,entities,floatingspace,listblock,richcombo,font,format,htmlwriter,indent,indentlist,indentblock,taotab,taountab,justify,fakeobjects,link,list,liststyle,magicline,pastetools,pastefromlibreoffice,pastefromword,pastetext,removeformat,resize,selectall,sharedspace,sourcearea,specialchar,stylescombo,tab,table,tabletools,tableselection,taoqtiimage,taoqtimaths,taoqtimedia,taoqtitable,taounderline,taotooltip,taohighlight,taoqtiinclude,taoqtiprintedvariable,taofurigana,undo,wysiwygarea";
1152
- CKEDITOR.config.skin="tao";(function(){var a=function(a,g){var e=CKEDITOR.getUrl("plugins/"+g);a=a.split(",");for(var f=0;f<a.length;f++)CKEDITOR.skin.icons[a[f]]={path:e,offset:-a[++f],bgsize:a[++f]}};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,,anchor-rtl,1440,,anchor,1464,,link,1488,,unlink,1512,,bulletedlist-rtl,1536,,bulletedlist,1560,,numberedlist-rtl,1584,,numberedlist,1608,,mathjax,1632,,maximize,1656,,newpage-rtl,1680,,newpage,1704,,pagebreak-rtl,1728,,pagebreak,1752,,pastefromword-rtl,1776,,pastefromword,1800,,pastetext-rtl,1824,,pastetext,1848,,placeholder,1872,,preview-rtl,1896,,preview,1920,,print,1944,,removeformat,1968,,save,1992,,selectall,2016,,showblocks-rtl,2040,,showblocks,2064,,smiley,2088,,source-rtl,2112,,source,2136,,sourcedialog-rtl,2160,,sourcedialog,2184,,specialchar,2208,,table,2232,,language,2256,,templates-rtl,2280,,templates,2304,,uicolor,2328,,redo-rtl,2352,,redo,2376,,undo-rtl,2400,,undo,2424,,simplebox,4896,auto",
1150
+ l&&CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(h+='\x3cscript id\x3d"cke_basetagscrpt"\x3evar baseTag \x3d document.querySelector( "base" );baseTag.href \x3d baseTag.href;\x3c/script\x3e');a=a.replace(/(?=\s*<\/(:?head)>)/,h);this.clearCustomData();this.clearListeners();k.fire("contentDomUnload");var q=this.getDocument();try{q.write(a)}catch(u){setTimeout(function(){q.write(a)},0)}}},getData:function(a){if(a)return this.getHtml();a=this.editor;var f=a.config,g=f.fullPage,h=g&&a.docType,c=g&&a.xmlDeclaration,
1151
+ d=this.getDocument(),g=g?d.getDocumentElement().getOuterHtml():d.getBody().getHtml();CKEDITOR.env.gecko&&f.enterMode!=CKEDITOR.ENTER_BR&&(g=g.replace(/<br>(?=\s*(:?$|<\/body>))/,""));g=a.dataProcessor.toDataFormat(g);c&&(g=c+"\n"+g);h&&(g=h+"\n"+g);return g},focus:function(){this._.isLoadingData?this._.isPendingFocus=!0:f.baseProto.focus.call(this)},detach:function(){var a=this.editor,g=a.document,a=a.container.findOne("iframe.cke_wysiwyg_frame");f.baseProto.detach.call(this);this.clearCustomData(this._.expandoNumber);
1152
+ g.getDocumentElement().clearCustomData();CKEDITOR.tools.removeFunction(this._.frameLoadedHandler);a&&(a.clearCustomData(),(g=a.removeCustomData("onResize"))&&g.removeListener(),a.isDetached()||a.remove())}}})})();CKEDITOR.config.disableObjectResizing=!1;CKEDITOR.config.disableNativeTableHandles=!0;CKEDITOR.config.disableNativeSpellChecker=!0;CKEDITOR.config.plugins="basicstyles,bidi,blockquote,dialogui,dialog,notification,button,toolbar,clipboard,panelbutton,panel,floatpanel,colorbutton,colordialog,copyformatting,menu,contextmenu,confighelper,dialogadvtab,entities,floatingspace,listblock,richcombo,font,format,htmlwriter,indent,indentlist,indentblock,taotab,taountab,justify,fakeobjects,link,list,liststyle,magicline,pastetools,pastefromlibreoffice,pastefromword,pastetext,removeformat,resize,selectall,sharedspace,sourcearea,sourcedialog,specialchar,stylescombo,tab,table,tabletools,tableselection,taoqtiimage,taoqtimaths,taoqtimedia,taoqtitable,taounderline,taotooltip,taohighlight,taoqtiinclude,taoqtiprintedvariable,taofurigana,undo,wysiwygarea";
1153
+ CKEDITOR.config.skin="tao";(function(){var a=function(a,g){var f=CKEDITOR.getUrl("plugins/"+g);a=a.split(",");for(var e=0;e<a.length;e++)CKEDITOR.skin.icons[a[e]]={path:f,offset:-a[++e],bgsize:a[++e]}};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,,anchor-rtl,1440,,anchor,1464,,link,1488,,unlink,1512,,bulletedlist-rtl,1536,,bulletedlist,1560,,numberedlist-rtl,1584,,numberedlist,1608,,mathjax,1632,,maximize,1656,,newpage-rtl,1680,,newpage,1704,,pagebreak-rtl,1728,,pagebreak,1752,,pastefromword-rtl,1776,,pastefromword,1800,,pastetext-rtl,1824,,pastetext,1848,,placeholder,1872,,preview-rtl,1896,,preview,1920,,print,1944,,removeformat,1968,,save,1992,,selectall,2016,,showblocks-rtl,2040,,showblocks,2064,,smiley,2088,,source-rtl,2112,,source,2136,,sourcedialog-rtl,2160,,sourcedialog,2184,,specialchar,2208,,table,2232,,language,2256,,templates-rtl,2280,,templates,2304,,uicolor,2328,,redo-rtl,2352,,redo,2376,,undo-rtl,2400,,undo,2424,,simplebox,4896,auto",
1153
1154
  "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,anchor-rtl,1440,auto,anchor,1464,auto,link,1488,auto,unlink,1512,auto,bulletedlist-rtl,1536,auto,bulletedlist,1560,auto,numberedlist-rtl,1584,auto,numberedlist,1608,auto,mathjax,1632,auto,maximize,1656,auto,newpage-rtl,1680,auto,newpage,1704,auto,pagebreak-rtl,1728,auto,pagebreak,1752,auto,pastefromword-rtl,1776,auto,pastefromword,1800,auto,pastetext-rtl,1824,auto,pastetext,1848,auto,placeholder,1872,auto,preview-rtl,1896,auto,preview,1920,auto,print,1944,auto,removeformat,1968,auto,save,1992,auto,selectall,2016,auto,showblocks-rtl,2040,auto,showblocks,2064,auto,smiley,2088,auto,source-rtl,2112,auto,source,2136,auto,sourcedialog-rtl,2160,auto,sourcedialog,2184,auto,specialchar,2208,auto,table,2232,auto,language,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",
1154
1155
  "icons.png")})()}})();