-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
863 lines (862 loc) · 438 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
(function(){if(!window.CKEDITOR||!window.CKEDITOR.dom)window.CKEDITOR||(window.CKEDITOR=function(){var b={timestamp:"C9PL",version:"4.0 DEV",revision:"0",rnd:Math.floor(900*Math.random())+100,_:{pending:[]},status:"unloaded",basePath:function(){var a=window.CKEDITOR_BASEPATH||"";if(!a)for(var b=document.getElementsByTagName("script"),h=0;h<b.length;h++){var d=b[h].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(d){a=d[1];break}}-1==a.indexOf(":/")&&(a=0===a.indexOf("/")?
location.href.match(/^.*?:\/\/[^\/]*/)[0]+a:location.href.match(/^[^\?]*\/(?:)/)[0]+a);if(!a)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return a}(),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("?")?"&":"?")+"t="+this.timestamp);return a},domReady:function(){function a(){try{document.addEventListener?
(document.removeEventListener("DOMContentLoaded",a,!1),b()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",a),b())}catch(d){}}function b(){for(var a;a=h.shift();)a()}var h=[];return function(d){h.push(d);"complete"===document.readyState&&setTimeout(a,1);if(1==h.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",a,!1),window.addEventListener("load",a,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",
a);window.attachEvent("onload",a);d=!1;try{d=!window.frameElement}catch(b){}if(document.documentElement.doScroll&&d){var e=function(){try{document.documentElement.doScroll("left")}catch(d){setTimeout(e,1);return}a()};e()}}}}()},c=window.CKEDITOR_GETURL;if(c){var a=b.url;b.url=function(f){return c.call(b,f)||a.call(b,f)}}return b}()),CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(b){var c=CKEDITOR.event.prototype,a;for(a in c)b[a]==void 0&&(b[a]=c[a])},CKEDITOR.event.prototype=
function(){function b(f){var b=c(this);return b[f]||(b[f]=new a(f))}var c=function(a){a=a.getPrivate&&a.getPrivate()||a._||(a._={});return a.events||(a.events={})},a=function(a){this.name=a;this.listeners=[]};a.prototype={getListenerIndex:function(a){for(var b=0,h=this.listeners;b<h.length;b++)if(h[b].fn==a)return b;return-1}};return{define:function(a,j){var h=b.call(this,a);CKEDITOR.tools.extend(h,j,true)},on:function(a,j,h,d,g){function e(b,l,e,g){b={name:a,sender:this,editor:b,data:l,listenerData:d,
stop:e,cancel:g,removeListener:k};return j.call(h,b)===false?false:b.data}function k(){c.removeListener(a,j)}var l=b.call(this,a);if(l.getListenerIndex(j)<0){l=l.listeners;h||(h=this);isNaN(g)&&(g=10);var c=this;e.fn=j;e.priority=g;for(var o=l.length-1;o>=0;o--)if(l[o].priority<=g){l.splice(o+1,0,e);return{removeListener:k}}l.unshift(e)}return{removeListener:k}},once:function(){var a=arguments[1];arguments[1]=function(b){b.removeListener();return a.apply(this,arguments)};return this.on.apply(this,
arguments)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,b=function(){a=1},h=0,d=function(){h=1};return function(g,e,k){var l=c(this)[g],g=a,m=h;a=h=0;if(l){var o=l.listeners;if(o.length)for(var o=o.slice(0),n,p=0;p<o.length;p++){if(l.errorProof)try{n=o[p].call(this,k,e,b,d)}catch(s){}else n=o[p].call(this,k,e,b,d);n===false?h=1:typeof n!="undefined"&&(e=n);if(a||h)break}}e=h?false:typeof e=="undefined"?
true:e;a=g;h=m;return e}}(),fireOnce:function(a,b,h){b=this.fire(a,b,h);delete c(this)[a];return b},removeListener:function(a,b){var h=c(this)[a];if(h){var d=h.getListenerIndex(b);d>=0&&h.listeners.splice(d,1)}},removeAllListeners:function(){var a=c(this),b;for(b in a)delete a[b]},hasListeners:function(a){return(a=c(this)[a])&&a.listeners.length>0}}}()),CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=
function(b,c){b in{instanceReady:1,loaded:1}&&(this[b]=true);return CKEDITOR.event.prototype.fire.call(this,b,c,this)},CKEDITOR.editor.prototype.fireOnce=function(b,c){b in{instanceReady:1,loaded:1}&&(this[b]=true);return CKEDITOR.event.prototype.fireOnce.call(this,b,c,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype,!0)),CKEDITOR.env||(CKEDITOR.env=function(){var b=navigator.userAgent.toLowerCase(),c=window.opera,a={ie:eval("/*@cc_on!@*/false"),opera:!!c&&c.version,webkit:b.indexOf(" applewebkit/")>
-1,air:b.indexOf(" adobeair/")>-1,mac:b.indexOf("macintosh")>-1,quirks:document.compatMode=="BackCompat",mobile:b.indexOf("mobile")>-1,iOS:/(ipad|iphone|ipod)/.test(b),isCustomDomain:function(){if(!this.ie)return false;var a=document.domain,f=window.location.hostname;return a!=f&&a!="["+f+"]"},secure:location.protocol=="https:"};a.gecko=navigator.product=="Gecko"&&!a.webkit&&!a.opera;if(a.webkit)b.indexOf("chrome")>-1?a.chrome=true:a.safari=true;var f=0;if(a.ie){f=a.quirks||!document.documentMode?
parseFloat(b.match(/msie (\d+)/)[1]):document.documentMode;a.ie9Compat=f==9;a.ie8Compat=f==8;a.ie7Compat=f==7;a.ie6Compat=f<7||a.quirks}if(a.gecko){var j=b.match(/rv:([\d\.]+)/);if(j){j=j[1].split(".");f=j[0]*1E4+(j[1]||0)*100+(j[2]||0)*1}}a.opera&&(f=parseFloat(c.version()));a.air&&(f=parseFloat(b.match(/ adobeair\/(\d+)/)[1]));a.webkit&&(f=parseFloat(b.match(/ applewebkit\/(\d+)/)[1]));a.version=f;a.isCompatible=a.iOS&&f>=534||!a.mobile&&(a.ie&&f>6||a.gecko&&f>=10801||a.opera&&f>=9.5||a.air&&f>=
1||a.webkit&&f>=522||false);a.cssClass="cke_browser_"+(a.ie?"ie":a.gecko?"gecko":a.opera?"opera":a.webkit?"webkit":"unknown");if(a.quirks)a.cssClass=a.cssClass+" cke_browser_quirks";if(a.ie){a.cssClass=a.cssClass+(" cke_browser_ie"+(a.quirks||a.version<7?"6":a.version));if(a.quirks)a.cssClass=a.cssClass+" cke_browser_iequirks"}if(a.gecko&&f<10900)a.cssClass=a.cssClass+" cke_browser_gecko18";if(a.air)a.cssClass=a.cssClass+" cke_browser_air";return a}()),"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);
CKEDITOR.loadFullCore=function(){if(CKEDITOR.status!="basic_ready")CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var b=document.createElement("script");b.type="text/javascript";b.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(b)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(b){(this._.pending||(this._.pending=[])).push(b)};(function(){CKEDITOR.domReady(function(){var b=CKEDITOR.loadFullCore,c=CKEDITOR.loadFullCoreTimeout;if(b){CKEDITOR.status=
"basic_ready";b&&b._load?b():c&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},c*1E3)}})})();CKEDITOR.status="basic_loaded"}(),CKEDITOR.dom={},function(){var b=[],c=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.opera?"-o-":CKEDITOR.env.ie?"-ms-":"";CKEDITOR.on("reset",function(){b=[]});CKEDITOR.tools={arrayCompare:function(a,f){if(!a&&!f)return true;if(!a||!f||a.length!=f.length)return false;for(var b=0;b<a.length;b++)if(a[b]!=f[b])return false;return true},
clone:function(a){var f;if(a&&a instanceof Array){f=[];for(var b=0;b<a.length;b++)f[b]=this.clone(a[b]);return f}if(a===null||typeof a!="object"||a instanceof String||a instanceof Number||a instanceof Boolean||a instanceof Date||a instanceof RegExp)return a;f=new a.constructor;for(b in a)f[b]=this.clone(a[b]);return f},capitalize:function(a){return a.charAt(0).toUpperCase()+a.substring(1).toLowerCase()},extend:function(a){var f=arguments.length,b,h;if(typeof(b=arguments[f-1])=="boolean")f--;else if(typeof(b=
arguments[f-2])=="boolean"){h=arguments[f-1];f=f-2}for(var d=1;d<f;d++){var g=arguments[d],e;for(e in g)if(b===true||a[e]==void 0)if(!h||e in h)a[e]=g[e]}return a},prototypedCopy:function(a){var f=function(){};f.prototype=a;return new f},isArray:function(a){return!!a&&a instanceof Array},isEmpty:function(a){for(var f in a)if(a.hasOwnProperty(f))return false;return true},cssVendorPrefix:function(a,f,b){if(b)return c+a+":"+f+";"+a+":"+f;b={};b[a]=f;b[c+a]=f;return b},cssStyleToDomStyle:function(){var a=
document.createElement("div").style,f=typeof a.cssFloat!="undefined"?"cssFloat":typeof a.styleFloat!="undefined"?"styleFloat":"float";return function(a){return a=="float"?f:a.replace(/-./g,function(a){return a.substr(1).toUpperCase()})}}(),buildStyleHtml:function(a){for(var a=[].concat(a),f,b=[],h=0;h<a.length;h++)if(f=a[h])/@import|[{}]/.test(f)?b.push("<style>"+f+"</style>"):b.push('<link type="text/css" rel=stylesheet href="'+f+'">');return b.join("")},htmlEncode:function(a){return(""+a).replace(/&/g,
"&").replace(/>/g,">").replace(/</g,"<")},htmlEncodeAttr:function(a){return a.replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")},getNextNumber:function(){var a=0;return function(){return++a}}(),getNextId:function(){return"cke_"+this.getNextNumber()},override:function(a,f){var b=f(a);b.prototype=a.prototype;return b},setTimeout:function(a,f,b,h,d){d||(d=window);b||(b=d);return d.setTimeout(function(){h?a.apply(b,[].concat(h)):a.apply(b)},f||0)},trim:function(){var a=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;
return function(f){return f.replace(a,"")}}(),ltrim:function(){var a=/^[ \t\n\r]+/g;return function(f){return f.replace(a,"")}}(),rtrim:function(){var a=/[ \t\n\r]+$/g;return function(f){return f.replace(a,"")}}(),indexOf:function(a,f){if(typeof f=="function")for(var b=0,h=a.length;b<h;b++){if(f(a[b]))return b}else{if(a.indexOf)return a.indexOf(f);b=0;for(h=a.length;b<h;b++)if(a[b]===f)return b}return-1},search:function(a,f){var b=CKEDITOR.tools.indexOf(a,f);return b>=0?a[b]:null},bind:function(a,
b){return function(){return a.apply(b,arguments)}},createClass:function(a){var b=a.$,c=a.base,h=a.privates||a._,d=a.proto,a=a.statics;!b&&(b=function(){c&&this.base.apply(this,arguments)});if(h)var g=b,b=function(){var a=this._||(this._={}),b;for(b in h){var f=h[b];a[b]=typeof f=="function"?CKEDITOR.tools.bind(f,this):f}g.apply(this,arguments)};if(c){b.prototype=this.prototypedCopy(c.prototype);b.prototype.constructor=b;b.base=c;b.baseProto=c.prototype;b.prototype.base=function(){this.base=c.prototype.base;
c.apply(this,arguments);this.base=arguments.callee}}d&&this.extend(b.prototype,d,true);a&&this.extend(b,a,true);return b},addFunction:function(a,f){return b.push(function(){return a.apply(f||this,arguments)})-1},removeFunction:function(a){b[a]=null},callFunction:function(a){var f=b[a];return f&&f.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var a=/^-?\d+\.?\d*px$/,b;return function(c){b=CKEDITOR.tools.trim(c+"")+"px";return a.test(b)?b:c||""}}(),convertToPx:function(){var a;
return function(b){if(!a){a=CKEDITOR.dom.element.createFromHtml('<div style="position:absolute;left:-9999px;top:-9999px;margin:0px;padding:0px;border:0px;"></div>',CKEDITOR.document);CKEDITOR.document.getBody().append(a)}if(!/%$/.test(b)){a.setStyle("width",b);return a.$.clientWidth}return b}}(),repeat:function(a,b){return Array(b+1).join(a)},tryThese:function(){for(var a,b=0,c=arguments.length;b<c;b++){var h=arguments[b];try{a=h();break}catch(d){}}return a},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},
defer:function(a){return function(){var b=arguments,c=this;window.setTimeout(function(){a.apply(c,b)},0)}},normalizeCssText:function(a,b){var c=[],h,d=CKEDITOR.tools.parseCssText(a,true,b);for(h in d)c.push(h+":"+d[h]);c.sort();return c.length?c.join(";")+";":""},convertRgbToHex:function(a){return a.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,function(a,b,c,d){a=[b,c,d];for(b=0;b<3;b++)a[b]=("0"+parseInt(a[b],10).toString(16)).slice(-2);return"#"+a.join("")})},parseCssText:function(a,
b,c){var h={};if(c){c=new CKEDITOR.dom.element("span");c.setAttribute("style",a);a=CKEDITOR.tools.convertRgbToHex(c.getAttribute("style")||"")}if(!a||a==";")return h;a.replace(/"/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,g,e){if(b){g=g.toLowerCase();g=="font-family"&&(e=e.toLowerCase().replace(/["']/g,"").replace(/\s*,\s*/g,","));e=CKEDITOR.tools.trim(e)}h[g]=e});return h}}}(),CKEDITOR.dtd=function(){var b=CKEDITOR.tools.extend,c=function(a,b){for(var d=CKEDITOR.tools.clone(a),
f=1;f<arguments.length;f++){var b=arguments[f],e;for(e in b)delete d[e]}return d},a={},f={},j={address:1,article:1,aside:1,blockquote:1,details:1,div:1,dl:1,fieldset:1,figure:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,hr:1,menu:1,nav:1,ol:1,p:1,pre:1,section:1,table:1,ul:1},h={command:1,link:1,meta:1,noscript:1,script:1,style:1},d={},g={"#":1},e={center:1,dir:1,noframes:1};b(a,{a:1,abbr:1,area:1,audio:1,b:1,bdi:1,bdo:1,br:1,button:1,canvas:1,cite:1,code:1,command:1,datalist:1,
del:1,dfn:1,em:1,embed:1,i:1,iframe:1,img:1,input:1,ins:1,kbd:1,keygen:1,label:1,map:1,mark:1,meter:1,noscript:1,object:1,output:1,progress:1,q:1,ruby:1,s:1,samp:1,script:1,select:1,small:1,span:1,strong:1,sub:1,sup:1,textarea:1,time:1,u:1,"var":1,video:1,wbr:1},g,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1});b(f,j,a,e);c={a:c(a,{a:1,button:1}),abbr:a,address:f,area:d,article:b({style:1},f),aside:b({style:1},f),audio:b({source:1,track:1},f),b:a,base:d,bdi:a,bdo:a,blockquote:f,
body:f,br:d,button:c(a,{a:1,button:1}),canvas:a,caption:f,cite:a,code:a,col:d,colgroup:{col:1},command:d,datalist:b({option:1},a),dd:f,del:a,details:b({summary:1},f),dfn:a,div:b({style:1},f),dl:{dt:1,dd:1},dt:a,em:a,embed:d,fieldset:b({legend:1},f),figcaption:f,figure:b({figcaption:1},f),footer:f,form:f,h1:a,h2:a,h3:a,h4:a,h5:a,h6:a,head:b({title:1,base:1},h),header:f,hgroup:{h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},hr:d,html:b({head:1,body:1},f,h),i:a,iframe:g,img:d,input:d,ins:a,kbd:a,keygen:d,label:a,legend:a,
li:f,link:d,map:f,mark:a,menu:b({li:1},f),meta:d,meter:c(a,{meter:1}),nav:f,noscript:b({link:1,meta:1,style:1},a),object:b({param:1},a),ol:{li:1},optgroup:{option:1},option:g,output:a,p:a,param:d,pre:a,progress:c(a,{progress:1}),q:a,rp:a,rt:a,ruby:b({rp:1,rt:1},a),s:a,samp:a,script:g,section:b({style:1},f),select:{optgroup:1,option:1},small:a,source:d,span:a,strong:a,style:g,sub:a,summary:a,sup:a,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:f,textarea:g,tfoot:{tr:1},th:a,
thead:{tr:1},time:c(a,{time:1}),title:g,tr:{th:1,td:1},track:d,u:a,ul:{li:1},"var":a,video:b({source:1,track:1},f),wbr:d,acronym:a,applet:b({param:1},f),basefont:d,big:a,center:f,dialog:d,dir:{li:1},font:a,isindex:d,noframes:f,strike:a,tt:a};b(c,{$block:b({audio:1,dd:1,dt:1,li:1,video:1},j,e),$blockLimit:{article:1,aside:1,audio:1,body:1,caption:1,details:1,dir:1,div:1,dl:1,fieldset:1,figure:1,footer:1,form:1,header:1,hgroup: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,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup: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:a,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:b({body:1,head:1,html:1},c.head),$nonEditable:{applet:1,audio:1,button:1,embed:1,iframe:1,
map:1,object:1,option:1,param:1,script:1,textarea:1,video:1},$object:{applet:1,audio:1,button:1,hr:1,iframe:1,img:1,input:1,object:1,select:1,table:1,textarea:1,video:1},$removeEmpty:{abbr:1,acronym:1,b:1,bdi:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,mark:1,meter:1,output:1,q:1,ruby:1,s:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,time:1,tt:1,u:1,"var":1},$tabIndex:{a:1,area:1,button:1,input:1,object:1,select:1,textarea:1},$tableContent:{caption:1,col:1,
colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1},$transparent:{a:1,audio:1,canvas:1,del:1,ins:1,map:1,noscript:1,object:1,video:1},$intermediate:{caption:1,colgroup:1,dd:1,dt:1,figcaption:1,legend:1,li:1,optgroup:1,option:1,rp:1,rt:1,summary:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1}});return c}(),CKEDITOR.dom.event=function(b){this.$=b},CKEDITOR.dom.event.prototype={getKey:function(){return this.$.keyCode||this.$.which},getKeystroke:function(){var b=this.getKey();if(this.$.ctrlKey||this.$.metaKey)b=
b+CKEDITOR.CTRL;this.$.shiftKey&&(b=b+CKEDITOR.SHIFT);this.$.altKey&&(b=b+CKEDITOR.ALT);return b},preventDefault:function(b){var c=this.$;c.preventDefault?c.preventDefault():c.returnValue=false;b&&this.stopPropagation()},stopPropagation:function(){var b=this.$;b.stopPropagation?b.stopPropagation():b.cancelBubble=true},getTarget:function(){var b=this.$.target||this.$.srcElement;return b?new CKEDITOR.dom.node(b):null},getPhase:function(){return this.$.eventPhase||2},getPageOffset:function(){var b=this.getTarget().getDocument().$;
return{x:this.$.pageX||this.$.clientX+(b.documentElement.scrollLeft||b.body.scrollLeft),y:this.$.pageY||this.$.clientY+(b.documentElement.scrollTop||b.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(b){if(b)this.$=b},CKEDITOR.dom.domObject.prototype=function(){var b=function(b,a){return function(f){typeof CKEDITOR!="undefined"&&b.fire(a,
new CKEDITOR.dom.event(f))}};return{getPrivate:function(){var b;if(!(b=this.getCustomData("_")))this.setCustomData("_",b={});return b},on:function(c){var a=this.getCustomData("_cke_nativeListeners");if(!a){a={};this.setCustomData("_cke_nativeListeners",a)}if(!a[c]){a=a[c]=b(this,c);this.$.addEventListener?this.$.addEventListener(c,a,!!CKEDITOR.event.useCapture):this.$.attachEvent&&this.$.attachEvent("on"+c,a)}return CKEDITOR.event.prototype.on.apply(this,arguments)},removeListener:function(b){CKEDITOR.event.prototype.removeListener.apply(this,
arguments);if(!this.hasListeners(b)){var a=this.getCustomData("_cke_nativeListeners"),f=a&&a[b];if(f){this.$.removeEventListener?this.$.removeEventListener(b,f,false):this.$.detachEvent&&this.$.detachEvent("on"+b,f);delete a[b]}}},removeAllListeners:function(){var b=this.getCustomData("_cke_nativeListeners"),a;for(a in b){var f=b[a];this.$.detachEvent?this.$.detachEvent("on"+a,f):this.$.removeEventListener&&this.$.removeEventListener(a,f,false);delete b[a]}}}}(),function(b){var c={};CKEDITOR.on("reset",
function(){c={}});b.equals=function(a){try{return a&&a.$===this.$}catch(b){return false}};b.setCustomData=function(a,b){var j=this.getUniqueId();(c[j]||(c[j]={}))[a]=b;return this};b.getCustomData=function(a){var b=this.$["data-cke-expando"];return(b=b&&c[b])&&a in b?b[a]:null};b.removeCustomData=function(a){var b=this.$["data-cke-expando"],b=b&&c[b],j,h;if(b){j=b[a];h=a in b;delete b[a]}return h?j:null};b.clearCustomData=function(){this.removeAllListeners();var a=this.$["data-cke-expando"];a&&delete c[a]};
b.getUniqueId=function(){return this.$["data-cke-expando"]||(this.$["data-cke-expando"]=CKEDITOR.tools.getNextNumber())};CKEDITOR.event.implementOn(b)}(CKEDITOR.dom.domObject.prototype),CKEDITOR.dom.node=function(b){return b?new CKEDITOR.dom[b.nodeType==CKEDITOR.NODE_DOCUMENT?"document":b.nodeType==CKEDITOR.NODE_ELEMENT?"element":b.nodeType==CKEDITOR.NODE_TEXT?"text":b.nodeType==CKEDITOR.NODE_COMMENT?"comment":b.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT?"documentFragment":"domObject"](b):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(b,c){b.append(this,c);return b},clone:function(b,c){var a=this.$.cloneNode(b),f=function(a){a["data-cke-expando"]&&
(a["data-cke-expando"]=false);if(a.nodeType==CKEDITOR.NODE_ELEMENT){c||a.removeAttribute("id",false);if(b)for(var a=a.childNodes,h=0;h<a.length;h++)f(a[h])}};f(a);return new CKEDITOR.dom.node(a)},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(b){b.$.parentNode.insertBefore(this.$,b.$.nextSibling);return b},insertBefore:function(b){b.$.parentNode.insertBefore(this.$,b.$);return b},insertBeforeMe:function(b){this.$.parentNode.insertBefore(b.$,
this.$);return b},getAddress:function(b){for(var c=[],a=this.getDocument().$.documentElement,f=this.$;f&&f!=a;){var j=f.parentNode;j&&c.unshift(this.getIndex.call({$:f},b));f=j}return c},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(b){var c=this.$,a=-1,f;if(!this.$.parentNode)return a;do if(!b||!(c!=this.$&&c.nodeType==CKEDITOR.NODE_TEXT&&(f||!c.nodeValue))){a++;f=c.nodeType==CKEDITOR.NODE_TEXT}while(c=c.previousSibling);
return a},getNextSourceNode:function(b,c,a){if(a&&!a.call)var f=a,a=function(a){return!a.equals(f)};var b=!b&&this.getFirst&&this.getFirst(),j;if(!b){if(this.type==CKEDITOR.NODE_ELEMENT&&a&&a(this,true)===false)return null;b=this.getNext()}for(;!b&&(j=(j||this).getParent());){if(a&&a(j,true)===false)return null;b=j.getNext()}return!b||a&&a(b)===false?null:c&&c!=b.type?b.getNextSourceNode(false,c,a):b},getPreviousSourceNode:function(b,c,a){if(a&&!a.call)var f=a,a=function(a){return!a.equals(f)};var b=
!b&&this.getLast&&this.getLast(),j;if(!b){if(this.type==CKEDITOR.NODE_ELEMENT&&a&&a(this,true)===false)return null;b=this.getPrevious()}for(;!b&&(j=(j||this).getParent());){if(a&&a(j,true)===false)return null;b=j.getPrevious()}return!b||a&&a(b)===false?null:c&&b.type!=c?b.getPreviousSourceNode(false,c,a):b},getPrevious:function(b){var c=this.$,a;do a=(c=c.previousSibling)&&c.nodeType!=10&&new CKEDITOR.dom.node(c);while(a&&b&&!b(a));return a},getNext:function(b){var c=this.$,a;do a=(c=c.nextSibling)&&
new CKEDITOR.dom.node(c);while(a&&b&&!b(a));return a},getParent:function(b){var c=this.$.parentNode;return c&&(c.nodeType==CKEDITOR.NODE_ELEMENT||b&&c.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(c):null},getParents:function(b){var c=this,a=[];do a[b?"push":"unshift"](c);while(c=c.getParent());return a},getCommonAncestor:function(b){if(b.equals(this))return this;if(b.contains&&b.contains(this))return b;var c=this.contains?this:this.getParent();do if(c.contains(b))return c;while(c=
c.getParent());return null},getPosition:function(b){var c=this.$,a=b.$;if(c.compareDocumentPosition)return c.compareDocumentPosition(a);if(c==a)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&b.type==CKEDITOR.NODE_ELEMENT){if(c.contains){if(c.contains(a))return CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING;if(a.contains(c))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in c)return c.sourceIndex<0||a.sourceIndex<0?CKEDITOR.POSITION_DISCONNECTED:
c.sourceIndex<a.sourceIndex?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING}for(var c=this.getAddress(),b=b.getAddress(),a=Math.min(c.length,b.length),f=0;f<=a-1;f++)if(c[f]!=b[f]){if(f<a)return c[f]<b[f]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;break}return c.length<b.length?CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING},getAscendant:function(b,c){var a=this.$,f;if(!c)a=a.parentNode;for(;a;){if(a.nodeName&&
(f=a.nodeName.toLowerCase(),typeof b=="string"?f==b:f in b))return new CKEDITOR.dom.node(a);a=a.parentNode}return null},hasAscendant:function(b,c){var a=this.$;if(!c)a=a.parentNode;for(;a;){if(a.nodeName&&a.nodeName.toLowerCase()==b)return true;a=a.parentNode}return false},move:function(b,c){b.append(this.remove(),c)},remove:function(b){var c=this.$,a=c.parentNode;if(a){if(b)for(;b=c.firstChild;)a.insertBefore(c.removeChild(b),c);a.removeChild(c)}return this},replace:function(b){this.insertBefore(b);
b.remove()},trim:function(){this.ltrim();this.rtrim()},ltrim:function(){for(var b;this.getFirst&&(b=this.getFirst());){if(b.type==CKEDITOR.NODE_TEXT){var c=CKEDITOR.tools.ltrim(b.getText()),a=b.getLength();if(c){if(c.length<a){b.split(a-c.length);this.$.removeChild(this.$.firstChild)}}else{b.remove();continue}}break}},rtrim:function(){for(var b;this.getLast&&(b=this.getLast());){if(b.type==CKEDITOR.NODE_TEXT){var c=CKEDITOR.tools.rtrim(b.getText()),a=b.getLength();if(c){if(c.length<a){b.split(c.length);
this.$.lastChild.parentNode.removeChild(this.$.lastChild)}}else{b.remove();continue}}break}if(!CKEDITOR.env.ie&&!CKEDITOR.env.opera)(b=this.$.lastChild)&&(b.type==1&&b.nodeName.toLowerCase()=="br")&&b.parentNode.removeChild(b)},isReadOnly:function(){var b=this;this.type!=CKEDITOR.NODE_ELEMENT&&(b=this.getParent());if(b&&typeof b.$.isContentEditable!="undefined")return!(b.$.isContentEditable||b.data("cke-editable"));for(;b;){if(b.data("cke-editable"))break;if(b.getAttribute("contentEditable")=="false")return true;
if(b.getAttribute("contentEditable")=="true")break;b=b.getParent()}return!b}}),CKEDITOR.dom.window=function(b){CKEDITOR.dom.domObject.call(this,b)},CKEDITOR.dom.window.prototype=new CKEDITOR.dom.domObject,CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype,{focus:function(){this.$.focus()},getViewPaneSize:function(){var b=this.$.document,c=b.compatMode=="CSS1Compat";return{width:(c?b.documentElement.clientWidth:b.body.clientWidth)||0,height:(c?b.documentElement.clientHeight:b.body.clientHeight)||
0}},getScrollPosition:function(){var b=this.$;if("pageXOffset"in b)return{x:b.pageXOffset||0,y:b.pageYOffset||0};b=b.document;return{x:b.documentElement.scrollLeft||b.body.scrollLeft||0,y:b.documentElement.scrollTop||b.body.scrollTop||0}},getFrame:function(){var b=this.$.frameElement;return b?new CKEDITOR.dom.element.get(b):null}}),CKEDITOR.dom.document=function(b){CKEDITOR.dom.domObject.call(this,b)},CKEDITOR.dom.document.prototype=new CKEDITOR.dom.domObject,CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype,
{type:CKEDITOR.NODE_DOCUMENT,appendStyleSheet:function(b){if(this.$.createStyleSheet)this.$.createStyleSheet(b);else{var c=new CKEDITOR.dom.element("link");c.setAttributes({rel:"stylesheet",type:"text/css",href:b});this.getHead().append(c)}},appendStyleText:function(b){if(this.$.createStyleSheet){var c=this.$.createStyleSheet("");c.cssText=b}else{var a=new CKEDITOR.dom.element("style",this);a.append(new CKEDITOR.dom.text(b,this));this.getHead().append(a)}return c||a.$.sheet},createElement:function(b,
c){var a=new CKEDITOR.dom.element(b,this);if(c){c.attributes&&a.setAttributes(c.attributes);c.styles&&a.setStyles(c.styles)}return a},createText:function(b){return new CKEDITOR.dom.text(b,this)},focus:function(){this.getWindow().focus()},getActive:function(){return new CKEDITOR.dom.element(this.$.activeElement)},getById:function(b){return(b=this.$.getElementById(b))?new CKEDITOR.dom.element(b):null},getByAddress:function(b,c){for(var a=this.$.documentElement,f=0;a&&f<b.length;f++){var j=b[f];if(c)for(var h=
-1,d=0;d<a.childNodes.length;d++){var g=a.childNodes[d];if(!(c===true&&g.nodeType==3&&g.previousSibling&&g.previousSibling.nodeType==3)){h++;if(h==j){a=g;break}}}else a=a.childNodes[j]}return a?new CKEDITOR.dom.node(a):null},getElementsByTag:function(b,c){if((!CKEDITOR.env.ie||document.documentMode>8)&&c)b=c+":"+b;return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(b))},getHead:function(){var b=this.$.getElementsByTagName("head")[0];return b=b?new CKEDITOR.dom.element(b):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),
true)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){var b=new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView);return(this.getWindow=function(){return b})()},write:function(b){this.$.open("text/html","replace");CKEDITOR.env.isCustomDomain()&&(this.$.domain=document.domain);this.$.write(b);this.$.close()}}),CKEDITOR.dom.nodeList=function(b){this.$=b},CKEDITOR.dom.nodeList.prototype=
{count:function(){return this.$.length},getItem:function(b){if(b<0||b>=this.$.length)return null;return(b=this.$[b])?new CKEDITOR.dom.node(b):null}},CKEDITOR.dom.element=function(b,c){typeof b=="string"&&(b=(c?c.$:document).createElement(b));CKEDITOR.dom.domObject.call(this,b)},CKEDITOR.dom.element.get=function(b){return(b=typeof b=="string"?document.getElementById(b)||document.getElementsByName(b)[0]:b)&&(b.$?b:new CKEDITOR.dom.element(b))},CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node,CKEDITOR.dom.element.createFromHtml=
function(b,c){var a=new CKEDITOR.dom.element("div",c);a.setHtml(b);return a.getFirst().remove()},CKEDITOR.dom.element.setMarker=function(b,c,a,f){var j=c.getCustomData("list_marker_id")||c.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),h=c.getCustomData("list_marker_names")||c.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");b[j]=c;h[a]=1;return c.setCustomData(a,f)},CKEDITOR.dom.element.clearAllMarkers=function(b){for(var c in b)CKEDITOR.dom.element.clearMarkers(b,
b[c],1)},CKEDITOR.dom.element.clearMarkers=function(b,c,a){var f=c.getCustomData("list_marker_names"),j=c.getCustomData("list_marker_id"),h;for(h in f)c.removeCustomData(h);c.removeCustomData("list_marker_names");if(a){c.removeCustomData("list_marker_id");delete b[j]}},function(){function b(a){for(var b=0,j=0,h=c[a].length;j<h;j++)b=b+(parseInt(this.getComputedStyle(c[a][j])||0,10)||0);return b}CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:function(a){var b=
this.$.className;b&&(RegExp("(?:^|\\s)"+a+"(?:\\s|$)","").test(b)||(b=b+(" "+a)));this.$.className=b||a},removeClass:function(a){var b=this.getAttribute("class");if(b){a=RegExp("(?:^|\\s+)"+a+"(?=\\s|$)","i");if(a.test(b))(b=b.replace(a,"").replace(/^\s+/,""))?this.setAttribute("class",b):this.removeAttribute("class")}return this},hasClass:function(a){return RegExp("(?:^|\\s+)"+a+"(?=\\s|$)","").test(this.getAttribute("class"))},append:function(a,b){typeof a=="string"&&(a=this.getDocument().createElement(a));
b?this.$.insertBefore(a.$,this.$.firstChild):this.$.appendChild(a.$);return a},appendHtml:function(a){if(this.$.childNodes.length){var b=new CKEDITOR.dom.element("div",this.getDocument());b.setHtml(a);b.moveChildren(this)}else this.setHtml(a)},appendText:function(a){this.$.text!=void 0?this.$.text=this.$.text+a:this.append(new CKEDITOR.dom.text(a))},appendBogus:function(){for(var a=this.getLast();a&&a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(a.getText());)a=a.getPrevious();if(!a||!a.is||!a.is("br")){a=
CKEDITOR.env.opera?this.getDocument().createText(""):this.getDocument().createElement("br");CKEDITOR.env.gecko&&a.setAttribute("type","_moz");this.append(a)}},breakParent:function(a){var b=new CKEDITOR.dom.range(this.getDocument());b.setStartAfter(this);b.setEndAfter(a);a=b.extractContents();b.insertNode(this.remove());a.insertAfterNode(this)},contains:CKEDITOR.env.ie||CKEDITOR.env.webkit?function(a){var b=this.$;return a.type!=CKEDITOR.NODE_ELEMENT?b.contains(a.getParent().$):b!=a.$&&b.contains(a.$)}:
function(a){return!!(this.$.compareDocumentPosition(a.$)&16)},focus:function(){function a(){try{this.$.focus()}catch(a){}}return function(b){b?CKEDITOR.tools.setTimeout(a,100,this):a.call(this)}}(),getHtml:function(){var a=this.$.innerHTML;return CKEDITOR.env.ie?a.replace(/<\?[^>]*>/g,""):a},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var a=this.$.ownerDocument.createElement("div");a.appendChild(this.$.cloneNode(true));return a.innerHTML},getClientRect:function(){var a=
CKEDITOR.tools.extend({},this.$.getBoundingClientRect());!a.width&&(a.width=a.right-a.left);!a.height&&(a.height=a.bottom-a.top);return a},setHtml:function(){var a=function(a){return this.$.innerHTML=a};return CKEDITOR.env.ie&&CKEDITOR.env.version<9?function(a){try{return this.$.innerHTML=a}catch(b){this.$.innerHTML="";var c=new CKEDITOR.dom.element("body",this.getDocument());c.$.innerHTML=a;for(c=c.getChildren();c.count();)this.append(c.getItem(0));return a}}:a}(),setText:function(a){CKEDITOR.dom.element.prototype.setText=
this.$.innerText!=void 0?function(a){return this.$.innerText=a}:function(a){return this.$.textContent=a};return this.setText(a)},getAttribute:function(){var a=function(a){return this.$.getAttribute(a,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(a){switch(a){case "class":a="className";break;case "http-equiv":a="httpEquiv";break;case "name":return this.$.name;case "tabindex":a=this.$.getAttribute(a,2);a!==0&&this.$.tabIndex===0&&(a=null);return a;case "checked":a=
this.$.attributes.getNamedItem(a);return(a.specified?a.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[a];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(a,2)}:a}(),getChildren:function(){return new CKEDITOR.dom.nodeList(this.$.childNodes)},getComputedStyle:CKEDITOR.env.ie?function(a){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(a)]}:
function(a){var b=this.getWindow().$.getComputedStyle(this.$,null);return b?b.getPropertyValue(a):""},getDtd:function(){var a=CKEDITOR.dtd[this.getName()];this.getDtd=function(){return a};return a},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag,getTabIndex:CKEDITOR.env.ie?function(){var a=this.$.tabIndex;a===0&&(!CKEDITOR.dtd.$tabIndex[this.getName()]&&parseInt(this.getAttribute("tabindex"),10)!==0)&&(a=-1);return a}:CKEDITOR.env.webkit?function(){var a=this.$.tabIndex;if(a==void 0){a=
parseInt(this.getAttribute("tabindex"),10);isNaN(a)&&(a=-1)}return a}:function(){return this.$.tabIndex},getText:function(){return this.$.textContent||this.$.innerText||""},getWindow:function(){return this.getDocument().getWindow()},getId:function(){return this.$.id||null},getNameAtt:function(){return this.$.name||null},getName:function(){var a=this.$.nodeName.toLowerCase();if(CKEDITOR.env.ie&&!(document.documentMode>8)){var b=this.$.scopeName;b!="HTML"&&(a=b.toLowerCase()+":"+a)}return(this.getName=
function(){return a})()},getValue:function(){return this.$.value},getFirst:function(a){var b=this.$.firstChild;(b=b&&new CKEDITOR.dom.node(b))&&(a&&!a(b))&&(b=b.getNext(a));return b},getLast:function(a){var b=this.$.lastChild;(b=b&&new CKEDITOR.dom.node(b))&&(a&&!a(b))&&(b=b.getPrevious(a));return b},getStyle:function(a){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]},is:function(){var a=this.getName();if(typeof arguments[0]=="object")return!!arguments[0][a];for(var b=0;b<arguments.length;b++)if(arguments[b]==
a)return true;return false},isEditable:function(a){var b=this.getName();if(this.isReadOnly()||this.getComputedStyle("display")=="none"||this.getComputedStyle("visibility")=="hidden"||CKEDITOR.dtd.$nonEditable[b]||CKEDITOR.dtd.$empty[b]||this.is("a")&&(this.data("cke-saved-name")||this.hasAttribute("name"))&&!this.getChildCount())return false;if(a!==false){a=CKEDITOR.dtd[b]||CKEDITOR.dtd.span;return!(!a||!a["#"])}return true},isIdentical:function(a){var b=this.clone(0,1),a=a.clone(0,1);b.removeAttributes(["_moz_dirty",
"data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);a.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);if(b.$.isEqualNode){b.$.style.cssText=CKEDITOR.tools.normalizeCssText(b.$.style.cssText);a.$.style.cssText=CKEDITOR.tools.normalizeCssText(a.$.style.cssText);return b.$.isEqualNode(a.$)}b=b.getOuterHtml();a=a.getOuterHtml();if(CKEDITOR.env.ie&&CKEDITOR.env.version<9&&this.is("a")){var c=this.getParent();if(c.type==CKEDITOR.NODE_ELEMENT){c=
c.clone();c.setHtml(b);b=c.getHtml();c.setHtml(a);a=c.getHtml()}}return b==a},isVisible:function(){var a=(this.$.offsetHeight||this.$.offsetWidth)&&this.getComputedStyle("visibility")!="hidden",b,c;if(a&&(CKEDITOR.env.webkit||CKEDITOR.env.opera)){b=this.getWindow();if(!b.equals(CKEDITOR.document.getWindow())&&(c=b.$.frameElement))a=(new CKEDITOR.dom.element(c)).isVisible()}return!!a},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return false;for(var a=this.getChildren(),
b=0,c=a.count();b<c;b++){var h=a.getItem(b);if(!(h.type==CKEDITOR.NODE_ELEMENT&&h.data("cke-bookmark"))&&(h.type==CKEDITOR.NODE_ELEMENT&&!h.isEmptyInlineRemoveable()||h.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(h.getText())))return false}return true},hasAttributes:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(){for(var a=this.$.attributes,b=0;b<a.length;b++){var c=a[b];switch(c.nodeName){case "class":if(this.getAttribute("class"))return true;case "data-cke-expando":continue;
default:if(c.specified)return true}}return false}:function(){var a=this.$.attributes,b=a.length,c={"data-cke-expando":1,_moz_dirty:1};return b>0&&(b>2||!c[a[0].nodeName]||b==2&&!c[a[1].nodeName])},hasAttribute:function(){function a(a){a=this.$.attributes.getNamedItem(a);return!(!a||!a.specified)}return CKEDITOR.env.ie&&CKEDITOR.env.version<8?function(b){return b=="name"?!!this.$.name:a.call(this,b)}:a}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,b){var c=this.$,a=a.$;
if(c!=a){var h;if(b)for(;h=c.lastChild;)a.insertBefore(c.removeChild(h),a.firstChild);else for(;h=c.firstChild;)a.appendChild(c.removeChild(h))}},mergeSiblings:function(){function a(a,b,c){if(b&&b.type==CKEDITOR.NODE_ELEMENT){for(var d=[];b.data("cke-bookmark")||b.isEmptyInlineRemoveable();){d.push(b);b=c?b.getNext():b.getPrevious();if(!b||b.type!=CKEDITOR.NODE_ELEMENT)return}if(a.isIdentical(b)){for(var g=c?a.getLast():a.getFirst();d.length;)d.shift().move(a,!c);b.moveChildren(a,!c);b.remove();g&&
g.type==CKEDITOR.NODE_ELEMENT&&g.mergeSiblings()}}}return function(b){if(b===false||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a")){a(this,this.getNext(),true);a(this,this.getPrevious())}}}(),show:function(){this.setStyles({display:"",visibility:""})},setAttribute:function(){var a=function(a,b){this.$.setAttribute(a,b);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(b,c){b=="class"?this.$.className=c:b=="style"?this.$.style.cssText=c:b=="tabindex"?
this.$.tabIndex=c:b=="checked"?this.$.checked=c:b=="contenteditable"?a.call(this,"contentEditable",c):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(b,c){if(b=="src"&&c.match(/^http:\/\//))try{a.apply(this,arguments)}catch(h){}else a.apply(this,arguments);return this}:a}(),setAttributes:function(a){for(var b in a)this.setAttribute(b,a[b]);return this},setValue:function(a){this.$.value=a;return this},removeAttribute:function(){var a=function(a){this.$.removeAttribute(a)};
return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(a){a=="class"?a="className":a=="tabindex"?a="tabIndex":a=="contenteditable"&&(a="contentEditable");this.$.removeAttribute(a)}:a}(),removeAttributes:function(a){if(CKEDITOR.tools.isArray(a))for(var b=0;b<a.length;b++)this.removeAttribute(a[b]);else for(b in a)a.hasOwnProperty(b)&&this.removeAttribute(b)},removeStyle:function(a){var b=this.$.style;if(!b.removeProperty&&(a=="border"||a=="margin"||a=="padding")){var c=["top",
"left","right","bottom"],h;a=="border"&&(h=["color","style","width"]);for(var b=[],d=0;d<c.length;d++)if(h)for(var g=0;g<h.length;g++)b.push([a,c[d],h[g]].join("-"));else b.push([a,c[d]].join("-"));for(a=0;a<b.length;a++)this.removeStyle(b[a])}else{b.removeProperty?b.removeProperty(a):b.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(a));this.$.style.cssText||this.removeAttribute("style")}},setStyle:function(a,b){this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]=b;return this},setStyles:function(a){for(var b in a)this.setStyle(b,
a[b]);return this},setOpacity:function(a){if(CKEDITOR.env.ie&&CKEDITOR.env.version<9){a=Math.round(a*100);this.setStyle("filter",a>=100?"":"progid:DXImageTransform.Microsoft.Alpha(opacity="+a+")")}else this.setStyle("opacity",a)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","none"));if(CKEDITOR.env.ie||CKEDITOR.env.opera){this.setAttribute("unselectable","on");for(var a,b=this.getElementsByTag("*"),c=0,h=b.count();c<h;c++){a=b.getItem(c);a.setAttribute("unselectable",
"on")}}},getPositionedAncestor:function(){for(var a=this;a.getName()!="html";){if(a.getComputedStyle("position")!="static")return a;a=a.getParent()}return null},getDocumentPosition:function(a){var b=0,c=0,h=this.getDocument(),d=h.getBody(),g=h.$.compatMode=="BackCompat";if(document.documentElement.getBoundingClientRect){var e=this.$.getBoundingClientRect(),k=h.$.documentElement,l=k.clientTop||d.$.clientTop||0,m=k.clientLeft||d.$.clientLeft||0,o=true;if(CKEDITOR.env.ie){o=h.getDocumentElement().contains(this);
h=h.getBody().contains(this);o=g&&h||!g&&o}if(o){b=e.left+(!g&&k.scrollLeft||d.$.scrollLeft);b=b-m;c=e.top+(!g&&k.scrollTop||d.$.scrollTop);c=c-l}}else{d=this;for(h=null;d&&!(d.getName()=="body"||d.getName()=="html");){b=b+(d.$.offsetLeft-d.$.scrollLeft);c=c+(d.$.offsetTop-d.$.scrollTop);if(!d.equals(this)){b=b+(d.$.clientLeft||0);c=c+(d.$.clientTop||0)}for(;h&&!h.equals(d);){b=b-h.$.scrollLeft;c=c-h.$.scrollTop;h=h.getParent()}h=d;d=(e=d.$.offsetParent)?new CKEDITOR.dom.element(e):null}}if(a){d=
this.getWindow();h=a.getWindow();if(!d.equals(h)&&d.$.frameElement){a=(new CKEDITOR.dom.element(d.$.frameElement)).getDocumentPosition(a);b=b+a.x;c=c+a.y}}if(!document.documentElement.getBoundingClientRect&&CKEDITOR.env.gecko&&!g){b=b+(this.$.clientLeft?1:0);c=c+(this.$.clientTop?1:0)}return{x:b,y:c}},scrollIntoView:function(a){var b=this.getParent();if(b){do{(b.$.clientWidth&&b.$.clientWidth<b.$.scrollWidth||b.$.clientHeight&&b.$.clientHeight<b.$.scrollHeight)&&this.scrollIntoParent(b,a,1);if(b.is("html")){var c=
b.getWindow();try{var h=c.$.frameElement;h&&(b=new CKEDITOR.dom.element(h))}catch(d){}}}while(b=b.getParent())}},scrollIntoParent:function(a,b,c){var h,d,g,e;function k(b,d){if(/body|html/.test(a.getName()))a.getWindow().$.scrollBy(b,d);else{a.$.scrollLeft=a.$.scrollLeft+b;a.$.scrollTop=a.$.scrollTop+d}}function l(a,b){var d={x:0,y:0};if(!a.is(o?"body":"html")){var e=a.$.getBoundingClientRect();d.x=e.left;d.y=e.top}e=a.getWindow();if(!e.equals(b)){e=l(CKEDITOR.dom.element.get(e.$.frameElement),b);
d.x=d.x+e.x;d.y=d.y+e.y}return d}function m(a,b){return parseInt(a.getComputedStyle("margin-"+b)||0,10)||0}!a&&(a=this.getWindow());g=a.getDocument();var o=g.$.compatMode=="BackCompat";a instanceof CKEDITOR.dom.window&&(a=o?g.getBody():g.getDocumentElement());g=a.getWindow();d=l(this,g);var n=l(a,g),p=this.$.offsetHeight;h=this.$.offsetWidth;var s=a.$.clientHeight,u=a.$.clientWidth;g=d.x-m(this,"left")-n.x||0;e=d.y-m(this,"top")-n.y||0;h=d.x+h+m(this,"right")-(n.x+u)||0;d=d.y+p+m(this,"bottom")-(n.y+
s)||0;if(e<0||d>0)k(0,b===true?e:b===false?d:e<0?e:d);if(c&&(g<0||h>0))k(g<0?g:h,0)},setState:function(a,b,c){b=b||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(b+"_on");this.removeClass(b+"_off");this.removeClass(b+"_disabled");c&&this.setAttribute("aria-pressed",true);c&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(b+"_disabled");this.removeClass(b+"_off");this.removeClass(b+"_on");c&&this.setAttribute("aria-disabled",true);c&&this.removeAttribute("aria-pressed");
break;default:this.addClass(b+"_off");this.removeClass(b+"_on");this.removeClass(b+"_disabled");c&&this.removeAttribute("aria-pressed");c&&this.removeAttribute("aria-disabled")}},getFrameDocument:function(){var a=this.$;try{a.contentWindow.document}catch(b){a.src=a.src}return a&&new CKEDITOR.dom.document(a.contentWindow.document)},copyAttributes:function(a,b){for(var c=this.$.attributes,b=b||{},h=0;h<c.length;h++){var d=c[h],g=d.nodeName.toLowerCase(),e;if(!(g in b))if(g=="checked"&&(e=this.getAttribute(g)))a.setAttribute(g,
e);else if(d.specified||CKEDITOR.env.ie&&d.nodeValue&&g=="value"){e=this.getAttribute(g);if(e===null)e=d.nodeValue;a.setAttribute(g,e)}}if(this.$.style.cssText!=="")a.$.style.cssText=this.$.style.cssText},renameNode:function(a){if(this.getName()!=a){var b=this.getDocument(),a=new CKEDITOR.dom.element(a,b);this.copyAttributes(a);this.moveChildren(a);this.getParent()&&this.$.parentNode.replaceChild(a.$,this.$);a.$["data-cke-expando"]=this.$["data-cke-expando"];this.$=a.$}},getChild:function(){function a(a,
b){var c=a.childNodes;if(b>=0&&b<c.length)return c[b]}return function(b){var c=this.$;if(b.slice)for(;b.length>0&&c;)c=a(c,b.shift());else c=a(c,b);return c?new CKEDITOR.dom.node(c):null}}(),getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){this.on("contextmenu",function(a){a.data.getTarget().hasClass("cke_enable_context_menu")||a.data.preventDefault()})},getDirection:function(a){return a?this.getComputedStyle("direction")||this.getDirection()||this.getParent()&&
this.getParent().getDirection(1)||this.getDocument().$.dir||"ltr":this.getStyle("direction")||this.getAttribute("dir")},data:function(a,b){a="data-"+a;if(b===void 0)return this.getAttribute(a);b===false?this.removeAttribute(a):this.setAttribute(a,b);return null},getEditor:function(){var a=CKEDITOR.instances,b,c;for(b in a){c=a[b];if(c.element.equals(this)&&c.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO)return c}return null}});var c={width:["border-left-width","border-right-width","padding-left","padding-right"],
height:["border-top-width","border-bottom-width","padding-top","padding-bottom"]};CKEDITOR.dom.element.prototype.setSize=function(a,c,j){if(typeof c=="number"){if(j&&(!CKEDITOR.env.ie||!CKEDITOR.env.quirks))c=c-b.call(this,a);this.setStyle(a,c+"px")}};CKEDITOR.dom.element.prototype.getSize=function(a,c){var j=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(a)],this.$["client"+CKEDITOR.tools.capitalize(a)])||0;c&&(j=j-b.call(this,a));return j}}(),CKEDITOR.dom.documentFragment=function(b){b=b||CKEDITOR.document;
this.$=b.type==CKEDITOR.NODE_DOCUMENT?b.$.createDocumentFragment():b},CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,insertAfterNode:function(b){b=b.$;b.parentNode.insertBefore(this.$,b.nextSibling)}},!0,{append:1,appendBogus:1,getFirst:1,getLast:1,getParent:1,getNext:1,getPrevious:1,appendTo:1,moveChildren:1,insertBefore:1,insertAfterNode:1,replace:1,trim:1,type:1,ltrim:1,rtrim:1,getDocument:1,getChildCount:1,getChild:1,
getChildren:1}),function(){function b(a,b){var e=this.range;if(this._.end)return null;if(!this._.start){this._.start=1;if(e.collapsed){this.end();return null}e.optimize()}var c,l=e.startContainer;c=e.endContainer;var f=e.startOffset,h=e.endOffset,n,p=this.guard,j=this.type,u=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var q=c.type==CKEDITOR.NODE_ELEMENT?c:c.getParent(),w=c.type==CKEDITOR.NODE_ELEMENT?c.getChild(h):c.getNext();this._.guardLTR=function(a,b){return(!b||!q.equals(a))&&
(!w||!a.equals(w))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(e.root))}}if(a&&!this._.guardRTL){var B=l.type==CKEDITOR.NODE_ELEMENT?l:l.getParent(),z=l.type==CKEDITOR.NODE_ELEMENT?f?l.getChild(f-1):null:l.getPrevious();this._.guardRTL=function(a,b){return(!b||!B.equals(a))&&(!z||!a.equals(z))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(e.root))}}var r=a?this._.guardRTL:this._.guardLTR;n=p?function(a,b){return r(a,b)===false?false:p(a,b)}:r;if(this.current)c=this.current[u](false,j,n);else{if(a)c.type==
CKEDITOR.NODE_ELEMENT&&(c=h>0?c.getChild(h-1):n(c,true)===false?null:c.getPreviousSourceNode(true,j,n));else{c=l;if(c.type==CKEDITOR.NODE_ELEMENT&&!(c=c.getChild(f)))c=n(l,true)===false?null:l.getNextSourceNode(true,j,n)}c&&n(c)===false&&(c=null)}for(;c&&!this._.end;){this.current=c;if(!this.evaluator||this.evaluator(c)!==false){if(!b)return c}else if(b&&this.evaluator)return false;c=c[u](false,j,n)}this.end();return this.current=null}function c(a){for(var c,e=null;c=b.call(this,a);)e=c;return e}
CKEDITOR.dom.walker=CKEDITOR.tools.createClass({$:function(a){this.range=a;this._={}},proto:{end:function(){this._.end=1},next:function(){return b.call(this)},previous:function(){return b.call(this,1)},checkForward:function(){return b.call(this,0,1)!==false},checkBackward:function(){return b.call(this,1,1)!==false},lastForward:function(){return c.call(this)},lastBackward:function(){return c.call(this,1)},reset:function(){delete this.current;this._={}}}});var a={block:1,"list-item":1,table:1,"table-row-group":1,
"table-header-group":1,"table-footer-group":1,"table-row":1,"table-column-group":1,"table-column":1,"table-cell":1,"table-caption":1};CKEDITOR.dom.element.prototype.isBlockBoundary=function(b){b=b?CKEDITOR.tools.extend({},CKEDITOR.dtd.$block,b||{}):CKEDITOR.dtd.$block;return this.getComputedStyle("float")=="none"&&a[this.getComputedStyle("display")]||b[this.getName()]};CKEDITOR.dom.walker.blockBoundary=function(a){return function(b){return!(b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary(a))}};CKEDITOR.dom.walker.listItemBoundary=
function(){return this.blockBoundary({br:1})};CKEDITOR.dom.walker.bookmark=function(a,b){function e(a){return a&&a.getName&&a.getName()=="span"&&a.data("cke-bookmark")}return function(c){var l,f;l=c&&!c.getName&&(f=c.getParent())&&e(f);l=a?l:l||e(c);return!!(b^l)}};CKEDITOR.dom.walker.whitespaces=function(a){return function(b){var e;b&&b.type==CKEDITOR.NODE_TEXT&&(e=!CKEDITOR.tools.trim(b.getText())||CKEDITOR.env.webkit&&b.getText()=="");return!!(a^e)}};CKEDITOR.dom.walker.invisible=function(a){var b=
CKEDITOR.dom.walker.whitespaces();return function(e){if(b(e))e=1;else{e.type==CKEDITOR.NODE_TEXT&&(e=e.getParent());e=!e.$.offsetHeight}return!!(a^e)}};CKEDITOR.dom.walker.nodeType=function(a,b){return function(e){return!!(b^e.type==a)}};CKEDITOR.dom.walker.bogus=function(a){function b(a){return!j(a)&&!h(a)}return function(e){var c=!CKEDITOR.env.ie?e.is&&e.is("br"):e.getText&&f.test(e.getText());if(c){c=e.getParent();e=e.getNext(b);c=c.isBlockBoundary()&&(!e||e.type==CKEDITOR.NODE_ELEMENT&&e.isBlockBoundary())}return!!(a^
c)}};var f=/^[\t\r\n ]*(?: |\xa0)$/,j=CKEDITOR.dom.walker.whitespaces(),h=CKEDITOR.dom.walker.bookmark();CKEDITOR.dom.element.prototype.getBogus=function(){var a=this;do a=a.getPreviousSourceNode();while(h(a)||j(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in CKEDITOR.dtd.$inline&&!(a.getName()in CKEDITOR.dtd.$empty));return a&&(!CKEDITOR.env.ie?a.is&&a.is("br"):a.getText&&f.test(a.getText()))?a:false}}(),CKEDITOR.dom.range=function(b){this.endOffset=this.endContainer=this.startOffset=this.startContainer=
null;this.collapsed=true;var c=b instanceof CKEDITOR.dom.document;this.document=c?b:b.getDocument();this.root=c?b.getBody():b},function(){function b(){var a=false,b=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(true),c=CKEDITOR.dom.walker.bogus();return function(e){if(d(e)||b(e))return true;if(c(e)&&!a)return a=true;return e.type==CKEDITOR.NODE_TEXT&&(e.hasAscendant("pre")||CKEDITOR.tools.trim(e.getText()).length)||e.type==CKEDITOR.NODE_ELEMENT&&!e.is(h)?false:true}}function c(a){var b=
CKEDITOR.dom.walker.whitespaces(),e=CKEDITOR.dom.walker.bookmark(1);return function(c){return e(c)||b(c)?true:!a&&d(c)||c.type==CKEDITOR.NODE_ELEMENT&&c.is(CKEDITOR.dtd.$removeEmpty)}}function a(a){return!g(a)&&!e(a)}var f=function(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset},j=function(a,b,d,e){a.optimizeBookmark();var c=a.startContainer,g=a.endContainer,k=a.startOffset,f=a.endOffset,h,j;if(g.type==CKEDITOR.NODE_TEXT)g=g.split(f);
else if(g.getChildCount()>0)if(f>=g.getChildCount()){g=g.append(a.document.createText(""));j=true}else g=g.getChild(f);if(c.type==CKEDITOR.NODE_TEXT){c.split(k);c.equals(g)&&(g=c.getNext())}else if(k)if(k>=c.getChildCount()){c=c.append(a.document.createText(""));h=true}else c=c.getChild(k).getPrevious();else{c=c.append(a.document.createText(""),1);h=true}var k=c.getParents(),f=g.getParents(),z,r,v;for(z=0;z<k.length;z++){r=k[z];v=f[z];if(!r.equals(v))break}for(var t=d,x,C,y,A=z;A<k.length;A++){x=
k[A];t&&!x.equals(c)&&(C=t.append(x.clone()));for(x=x.getNext();x;){if(x.equals(f[A])||x.equals(g))break;y=x.getNext();if(b==2)t.append(x.clone(true));else{x.remove();b==1&&t.append(x)}x=y}t&&(t=C)}t=d;for(d=z;d<f.length;d++){x=f[d];b>0&&!x.equals(g)&&(C=t.append(x.clone()));if(!k[d]||x.$.parentNode!=k[d].$.parentNode)for(x=x.getPrevious();x;){if(x.equals(k[d])||x.equals(c))break;y=x.getPrevious();if(b==2)t.$.insertBefore(x.$.cloneNode(true),t.$.firstChild);else{x.remove();b==1&&t.$.insertBefore(x.$,
t.$.firstChild)}x=y}t&&(t=C)}if(b==2){r=a.startContainer;if(r.type==CKEDITOR.NODE_TEXT){r.$.data=r.$.data+r.$.nextSibling.data;r.$.parentNode.removeChild(r.$.nextSibling)}a=a.endContainer;if(a.type==CKEDITOR.NODE_TEXT&&a.$.nextSibling){a.$.data=a.$.data+a.$.nextSibling.data;a.$.parentNode.removeChild(a.$.nextSibling)}}else{if(r&&v&&(c.$.parentNode!=r.$.parentNode||g.$.parentNode!=v.$.parentNode)){b=v.getIndex();h&&v.$.parentNode==c.$.parentNode&&b--;if(e&&r.type==CKEDITOR.NODE_ELEMENT){e=CKEDITOR.dom.element.createFromHtml('<span data-cke-bookmark="1" style="display:none"> </span>',
a.document);e.insertAfter(r);r.mergeSiblings(false);a.moveToBookmark({startNode:e})}else a.setStart(v.getParent(),b)}a.collapse(true)}h&&c.remove();j&&g.$.parentNode&&g.remove()},h={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},d=CKEDITOR.dom.walker.bogus(),g=new CKEDITOR.dom.walker.whitespaces,e=new CKEDITOR.dom.walker.bookmark,k=/^[\t\r\n ]*(?: |\xa0)$/;CKEDITOR.dom.range.prototype=
{clone:function(){var a=new CKEDITOR.dom.range(this.root);a.startContainer=this.startContainer;a.startOffset=this.startOffset;a.endContainer=this.endContainer;a.endOffset=this.endOffset;a.collapsed=this.collapsed;return a},collapse:function(a){if(a){this.endContainer=this.startContainer;this.endOffset=this.startOffset}else{this.startContainer=this.endContainer;this.startOffset=this.endOffset}this.collapsed=true},cloneContents:function(){var a=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||
j(this,2,a);return a},deleteContents:function(a){this.collapsed||j(this,0,null,a)},extractContents:function(a){var b=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||j(this,1,b,a);return b},createBookmark:function(a){var b,d,c,e,g=this.collapsed;b=this.document.createElement("span");b.data("cke-bookmark",1);b.setStyle("display","none");b.setHtml(" ");if(a){c="cke_bm_"+CKEDITOR.tools.getNextNumber();b.setAttribute("id",c+(g?"C":"S"))}if(!g){d=b.clone();d.setHtml(" ");a&&d.setAttribute("id",
c+"E");e=this.clone();e.collapse();e.insertNode(d)}e=this.clone();e.collapse(true);e.insertNode(b);if(d){this.setStartAfter(b);this.setEndBefore(d)}else this.moveToPosition(b,CKEDITOR.POSITION_AFTER_END);return{startNode:a?c+(g?"C":"S"):b,endNode:a?c+"E":d,serializable:a,collapsed:g}},createBookmark2:function(a){var b=this.startContainer,d=this.endContainer,c=this.startOffset,e=this.endOffset,g=this.collapsed,k,f;if(!b||!d)return{start:0,end:0};if(a){if(b.type==CKEDITOR.NODE_ELEMENT){if((k=b.getChild(c))&&
k.type==CKEDITOR.NODE_TEXT&&c>0&&k.getPrevious().type==CKEDITOR.NODE_TEXT){b=k;c=0}k&&k.type==CKEDITOR.NODE_ELEMENT&&(c=k.getIndex(1))}for(;b.type==CKEDITOR.NODE_TEXT&&(f=b.getPrevious())&&f.type==CKEDITOR.NODE_TEXT;){b=f;c=c+f.getLength()}if(!g){if(d.type==CKEDITOR.NODE_ELEMENT){if((k=d.getChild(e))&&k.type==CKEDITOR.NODE_TEXT&&e>0&&k.getPrevious().type==CKEDITOR.NODE_TEXT){d=k;e=0}k&&k.type==CKEDITOR.NODE_ELEMENT&&(e=k.getIndex(1))}for(;d.type==CKEDITOR.NODE_TEXT&&(f=d.getPrevious())&&f.type==CKEDITOR.NODE_TEXT;){d=
f;e=e+f.getLength()}}}return{start:b.getAddress(a),end:g?null:d.getAddress(a),startOffset:c,endOffset:e,normalized:a,collapsed:g,is2:true}},moveToBookmark:function(a){if(a.is2){var b=this.document.getByAddress(a.start,a.normalized),d=a.startOffset,c=a.end&&this.document.getByAddress(a.end,a.normalized),a=a.endOffset;this.setStart(b,d);c?this.setEnd(c,a):this.collapse(true)}else{b=(d=a.serializable)?this.document.getById(a.startNode):a.startNode;a=d?this.document.getById(a.endNode):a.endNode;this.setStartBefore(b);
b.remove();if(a){this.setEndBefore(a);a.remove()}else this.collapse(true)}},getBoundaryNodes:function(){var a=this.startContainer,b=this.endContainer,d=this.startOffset,c=this.endOffset,e;if(a.type==CKEDITOR.NODE_ELEMENT){e=a.getChildCount();if(e>d)a=a.getChild(d);else if(e<1)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a);a=a.getNextSourceNode()||a}}if(b.type==CKEDITOR.NODE_ELEMENT){e=b.getChildCount();if(e>c)b=b.getChild(c).getPreviousSourceNode(true);
else if(e<1)b=b.getPreviousSourceNode();else{for(b=b.$;b.lastChild;)b=b.lastChild;b=new CKEDITOR.dom.node(b)}}a.getPosition(b)&CKEDITOR.POSITION_FOLLOWING&&(a=b);return{startNode:a,endNode:b}},getCommonAncestor:function(a,b){var d=this.startContainer,c=this.endContainer,d=d.equals(c)?a&&d.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?d.getChild(this.startOffset):d:d.getCommonAncestor(c);return b&&!d.is?d.getParent():d},optimize:function(){var a=this.startContainer,b=this.startOffset;
a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setStartAfter(a):this.setStartBefore(a));a=this.endContainer;b=this.endOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setEndAfter(a):this.setEndBefore(a))},optimizeBookmark:function(){var a=this.startContainer,b=this.endContainer;a.is&&(a.is("span")&&a.data("cke-bookmark"))&&this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START);b&&(b.is&&b.is("span")&&b.data("cke-bookmark"))&&this.setEndAt(b,CKEDITOR.POSITION_AFTER_END)},trim:function(a,
b){var d=this.startContainer,c=this.startOffset,e=this.collapsed;if((!a||e)&&d&&d.type==CKEDITOR.NODE_TEXT){if(c)if(c>=d.getLength()){c=d.getIndex()+1;d=d.getParent()}else{var g=d.split(c),c=d.getIndex()+1,d=d.getParent();if(this.startContainer.equals(this.endContainer))this.setEnd(g,this.endOffset-this.startOffset);else if(d.equals(this.endContainer))this.endOffset=this.endOffset+1}else{c=d.getIndex();d=d.getParent()}this.setStart(d,c);if(e){this.collapse(true);return}}d=this.endContainer;c=this.endOffset;
if(!b&&!e&&d&&d.type==CKEDITOR.NODE_TEXT){if(c){c>=d.getLength()||d.split(c);c=d.getIndex()+1}else c=d.getIndex();d=d.getParent();this.setEnd(d,c)}},enlarge:function(a,b){switch(a){case CKEDITOR.ENLARGE_INLINE:var d=1;case CKEDITOR.ENLARGE_ELEMENT:if(this.collapsed)break;var c=this.getCommonAncestor(),e=this.root,g,k,f,h,j,z=false,r,v;r=this.startContainer;v=this.startOffset;if(r.type==CKEDITOR.NODE_TEXT){if(v){r=!CKEDITOR.tools.trim(r.substring(0,v)).length&&r;z=!!r}if(r&&!(h=r.getPrevious()))f=
r.getParent()}else{v&&(h=r.getChild(v-1)||r.getLast());h||(f=r)}for(;f||h;){if(f&&!h){!j&&f.equals(c)&&(j=true);if(d?f.isBlockBoundary():!e.contains(f))break;if(!z||f.getComputedStyle("display")!="inline"){z=false;j?g=f:this.setStartBefore(f)}h=f.getPrevious()}for(;h;){r=false;if(h.type==CKEDITOR.NODE_COMMENT)h=h.getPrevious();else{if(h.type==CKEDITOR.NODE_TEXT){v=h.getText();/[^\s\ufeff]/.test(v)&&(h=null);r=/[\s\ufeff]$/.test(v)}else if((h.$.offsetWidth>0||b&&h.is("br"))&&!h.data("cke-bookmark"))if(z&&
CKEDITOR.dtd.$removeEmpty[h.getName()]){v=h.getText();if(/[^\s\ufeff]/.test(v))h=null;else for(var t=h.$.getElementsByTagName("*"),x=0,C;C=t[x++];)if(!CKEDITOR.dtd.$removeEmpty[C.nodeName.toLowerCase()]){h=null;break}h&&(r=!!v.length)}else h=null;r&&(z?j?g=f:f&&this.setStartBefore(f):z=true);if(h){r=h.getPrevious();if(!f&&!r){f=h;h=null;break}h=r}else f=null}}f&&(f=f.getParent())}r=this.endContainer;v=this.endOffset;f=h=null;j=z=false;if(r.type==CKEDITOR.NODE_TEXT){r=!CKEDITOR.tools.trim(r.substring(v)).length&&
r;z=!(r&&r.getLength());if(r&&!(h=r.getNext()))f=r.getParent()}else(h=r.getChild(v))||(f=r);for(;f||h;){if(f&&!h){!j&&f.equals(c)&&(j=true);if(d?f.isBlockBoundary():!e.contains(f))break;if(!z||f.getComputedStyle("display")!="inline"){z=false;j?k=f:f&&this.setEndAfter(f)}h=f.getNext()}for(;h;){r=false;if(h.type==CKEDITOR.NODE_TEXT){v=h.getText();/[^\s\ufeff]/.test(v)&&(h=null);r=/^[\s\ufeff]/.test(v)}else if(h.type==CKEDITOR.NODE_ELEMENT){if((h.$.offsetWidth>0||b&&h.is("br"))&&!h.data("cke-bookmark"))if(z&&
CKEDITOR.dtd.$removeEmpty[h.getName()]){v=h.getText();if(/[^\s\ufeff]/.test(v))h=null;else{t=h.$.getElementsByTagName("*");for(x=0;C=t[x++];)if(!CKEDITOR.dtd.$removeEmpty[C.nodeName.toLowerCase()]){h=null;break}}h&&(r=!!v.length)}else h=null}else r=1;r&&z&&(j?k=f:this.setEndAfter(f));if(h){r=h.getNext();if(!f&&!r){f=h;h=null;break}h=r}else f=null}f&&(f=f.getParent())}if(g&&k){c=g.contains(k)?k:g;this.setStartBefore(c);this.setEndAfter(c)}break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:f=
new CKEDITOR.dom.range(this.root);e=this.root;f.setStartAt(e,CKEDITOR.POSITION_AFTER_START);f.setEnd(this.startContainer,this.startOffset);f=new CKEDITOR.dom.walker(f);var y,A,G=CKEDITOR.dom.walker.blockBoundary(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),D=function(a){var b=G(a);b||(y=a);return b},d=function(a){var b=D(a);!b&&(a.is&&a.is("br"))&&(A=a);return b};f.guard=D;f=f.lastBackward();y=y||e;this.setStartAt(y,!y.is("br")&&(!f&&this.checkStartOfBlock()||f&&y.contains(f))?CKEDITOR.POSITION_AFTER_START:
CKEDITOR.POSITION_AFTER_END);if(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){f=this.clone();f=new CKEDITOR.dom.walker(f);var E=CKEDITOR.dom.walker.whitespaces(),M=CKEDITOR.dom.walker.bookmark();f.evaluator=function(a){return!E(a)&&!M(a)};if((f=f.previous())&&f.type==CKEDITOR.NODE_ELEMENT&&f.is("br"))break}f=this.clone();f.collapse();f.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);f=new CKEDITOR.dom.walker(f);f.guard=a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?d:D;y=null;f=f.lastForward();y=y||e;this.setEndAt(y,
!f&&this.checkEndOfBlock()||f&&y.contains(f)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);A&&this.setEndAfter(A)}},shrink:function(a,b,d){if(!this.collapsed){var a=a||CKEDITOR.SHRINK_TEXT,c=this.clone(),e=this.startContainer,f=this.endContainer,g=this.startOffset,k=this.endOffset,h=1,j=1;if(e&&e.type==CKEDITOR.NODE_TEXT)if(g)if(g>=e.getLength())c.setStartAfter(e);else{c.setStartBefore(e);h=0}else c.setStartBefore(e);if(f&&f.type==CKEDITOR.NODE_TEXT)if(k)if(k>=f.getLength())c.setEndAfter(f);
else{c.setEndAfter(f);j=0}else c.setEndBefore(f);var c=new CKEDITOR.dom.walker(c),z=CKEDITOR.dom.walker.bookmark();c.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var r;c.guard=function(b,c){if(z(b))return true;if(a==CKEDITOR.SHRINK_ELEMENT&&b.type==CKEDITOR.NODE_TEXT||c&&b.equals(r)||d===false&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary())return false;!c&&b.type==CKEDITOR.NODE_ELEMENT&&(r=b);return true};if(h)(e=c[a==CKEDITOR.SHRINK_ELEMENT?
"lastForward":"next"]())&&this.setStartAt(e,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);if(j){c.reset();(c=c[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(c,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END)}return!(!h&&!j)}},insertNode:function(a){this.optimizeBookmark();this.trim(false,true);var b=this.startContainer,d=b.getChild(this.startOffset);d?a.insertBefore(d):b.append(a);a.getParent()&&a.getParent().equals(this.endContainer)&&this.endOffset++;
this.setStartBefore(a)},moveToPosition:function(a,b){this.setStartAt(a,b);this.collapse(true)},moveToRange:function(a){this.setStart(a.startContainer,a.startOffset);this.setEnd(a.endContainer,a.endOffset)},selectNodeContents:function(a){this.setStart(a,0);this.setEnd(a,a.type==CKEDITOR.NODE_TEXT?a.getLength():a.getChildCount())},setStart:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]){b=a.getIndex();a=a.getParent()}this.startContainer=a;this.startOffset=b;if(!this.endContainer){this.endContainer=
a;this.endOffset=b}f(this)},setEnd:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]){b=a.getIndex()+1;a=a.getParent()}this.endContainer=a;this.endOffset=b;if(!this.startContainer){this.startContainer=a;this.startOffset=b}f(this)},setStartAfter:function(a){this.setStart(a.getParent(),a.getIndex()+1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())},setEndAfter:function(a){this.setEnd(a.getParent(),a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(),
a.getIndex())},setStartAt:function(a,b){switch(b){case CKEDITOR.POSITION_AFTER_START:this.setStart(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setStart(a,a.getLength()):this.setStart(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(a)}f(this)},setEndAt:function(a,b){switch(b){case CKEDITOR.POSITION_AFTER_START:this.setEnd(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==
CKEDITOR.NODE_TEXT?this.setEnd(a,a.getLength()):this.setEnd(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(a)}f(this)},fixBlock:function(a,b){var d=this.createBookmark(),c=this.document.createElement(b);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(c);c.trim();CKEDITOR.env.ie||c.appendBogus();this.insertNode(c);this.moveToBookmark(d);return c},splitBlock:function(a){var b=
new CKEDITOR.dom.elementPath(this.startContainer,this.root),d=new CKEDITOR.dom.elementPath(this.endContainer,this.root),c=b.block,e=d.block,f=null;if(!b.blockLimit.equals(d.blockLimit))return null;if(a!="br"){if(!c){c=this.fixBlock(true,a);e=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block}e||(e=this.fixBlock(false,a))}a=c&&this.checkStartOfBlock();b=e&&this.checkEndOfBlock();this.deleteContents();if(c&&c.equals(e))if(b){f=new CKEDITOR.dom.elementPath(this.startContainer,this.root);
this.moveToPosition(e,CKEDITOR.POSITION_AFTER_END);e=null}else if(a){f=new CKEDITOR.dom.elementPath(this.startContainer,this.root);this.moveToPosition(c,CKEDITOR.POSITION_BEFORE_START);c=null}else{e=this.splitElement(c);!CKEDITOR.env.ie&&!c.is("ul","ol")&&c.appendBogus()}return{previousBlock:c,nextBlock:e,wasStartOfBlock:a,wasEndOfBlock:b,elementPath:f}},splitElement:function(a){if(!this.collapsed)return null;this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var b=this.extractContents(),d=a.clone(false);
b.appendTo(d);d.insertAfter(a);this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return d},removeEmptyBlocksAtEnd:function(){function a(c){return function(a){return b(a)||(d(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable())||c.is("table")&&a.is("caption")?false:true}}var b=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(false);return function(b){for(var d=this.createBookmark(),c=this[b?"endPath":"startPath"](),e=c.block||c.blockLimit,f;e&&!e.equals(c.root)&&!e.getFirst(a(e));){f=
e.getParent();this[b?"setEndAt":"setStartAt"](e,CKEDITOR.POSITION_AFTER_END);e.remove(1);e=f}this.moveToBookmark(d)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,this.root)},checkBoundaryOfElement:function(a,b){var d=b==CKEDITOR.START,e=this.clone();e.collapse(d);e[d?"setStartAt":"setEndAt"](a,d?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);e=new CKEDITOR.dom.walker(e);
e.evaluator=c(d);return e[d?"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var a=this.startContainer,d=this.startOffset;if(CKEDITOR.env.ie&&d&&a.type==CKEDITOR.NODE_TEXT){a=CKEDITOR.tools.ltrim(a.substring(0,d));k.test(a)&&this.trim(0,1)}this.trim();a=new CKEDITOR.dom.elementPath(this.startContainer,this.root);d=this.clone();d.collapse(true);d.setStartAt(a.block||a.blockLimit,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(d);a.evaluator=b();return a.checkBackward()},checkEndOfBlock:function(){var a=
this.endContainer,d=this.endOffset;if(CKEDITOR.env.ie&&a.type==CKEDITOR.NODE_TEXT){a=CKEDITOR.tools.rtrim(a.substring(d));k.test(a)&&this.trim(1,0)}this.trim();a=new CKEDITOR.dom.elementPath(this.endContainer,this.root);d=this.clone();d.collapse(false);d.setEndAt(a.block||a.blockLimit,CKEDITOR.POSITION_BEFORE_END);a=new CKEDITOR.dom.walker(d);a.evaluator=b();return a.checkForward()},getPreviousNode:function(a,b,d){var c=this.clone();c.collapse(1);c.setStartAt(d||this.root,CKEDITOR.POSITION_AFTER_START);
d=new CKEDITOR.dom.walker(c);d.evaluator=a;d.guard=b;return d.previous()},getNextNode:function(a,b,d){var c=this.clone();c.collapse();c.setEndAt(d||this.root,CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(c);d.evaluator=a;d.guard=b;return d.next()},checkReadOnly:function(){function a(b,d){for(;b;){if(b.type==CKEDITOR.NODE_ELEMENT){if(b.getAttribute("contentEditable")=="false"&&!b.data("cke-editable"))return 0;if(b.is("html")||b.getAttribute("contentEditable")=="true"&&(b.contains(d)||b.equals(d)))break}b=
b.getParent()}return 1}return function(){var b=this.startContainer,d=this.endContainer;return!(a(b,d)&&a(d,b))}}(),moveToElementEditablePosition:function(b,d){if(b.type==CKEDITOR.NODE_ELEMENT&&!b.isEditable(false)){this.moveToPosition(b,d?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);return true}for(var c=0;b;){if(b.type==CKEDITOR.NODE_TEXT){d&&this.checkEndOfBlock()&&k.test(b.getText())?this.moveToPosition(b,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(b,d?CKEDITOR.POSITION_AFTER_END:
CKEDITOR.POSITION_BEFORE_START);c=1;break}if(b.type==CKEDITOR.NODE_ELEMENT)if(b.isEditable()){this.moveToPosition(b,d?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START);c=1}else d&&(b.is("br")&&this.checkEndOfBlock())&&this.moveToPosition(b,CKEDITOR.POSITION_BEFORE_START);var e=b,f=c,g=void 0;e.type==CKEDITOR.NODE_ELEMENT&&e.isEditable(false)&&(g=e[d?"getLast":"getFirst"](a));!f&&!g&&(g=e[d?"getPrevious":"getNext"](a));b=g}return!!c},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)},
moveToElementEditEnd:function(a){return this.moveToElementEditablePosition(a,true)},getEnclosedNode:function(){var a=this.clone();a.optimize();if(a.startContainer.type!=CKEDITOR.NODE_ELEMENT||a.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var b=new CKEDITOR.dom.walker(a),d=CKEDITOR.dom.walker.bookmark(true),c=CKEDITOR.dom.walker.whitespaces(true);a.evaluator=function(a){return c(a)&&d(a)};a=b.next();b.reset();return a&&a.equals(b.previous())?a:null},getTouchedStartNode:function(){var a=this.startContainer;
return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.startOffset)||a},getTouchedEndNode:function(){var a=this.endContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.endOffset-1)||a},scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml("<span> </span>",this.document),b,d,c,e=this.clone();e.optimize();if(c=e.startContainer.type==CKEDITOR.NODE_TEXT){d=e.startContainer.getText();b=e.startContainer.split(e.startOffset);a.insertAfter(e.startContainer)}else e.insertNode(a);
a.scrollIntoView();if(c){e.startContainer.setText(d);b.remove()}a.remove()}}}(),CKEDITOR.POSITION_AFTER_START=1,CKEDITOR.POSITION_BEFORE_END=2,CKEDITOR.POSITION_BEFORE_START=3,CKEDITOR.POSITION_AFTER_END=4,CKEDITOR.ENLARGE_ELEMENT=1,CKEDITOR.ENLARGE_BLOCK_CONTENTS=2,CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS=3,CKEDITOR.ENLARGE_INLINE=4,CKEDITOR.START=1,CKEDITOR.END=2,CKEDITOR.SHRINK_ELEMENT=1,CKEDITOR.SHRINK_TEXT=2,function(){function b(a){if(!(arguments.length<1)){this.range=a;this.forceBrBreak=0;this.enlargeBr=
1;this.enforceRealBlocks=0;this._||(this._={})}}function c(a,b,c){for(a=a.getNextSourceNode(b,null,c);!f(a);)a=a.getNextSourceNode(b,null,c);return a}var a=/^[\r\n\t ]+$/,f=CKEDITOR.dom.walker.bookmark(false,true),j=CKEDITOR.dom.walker.whitespaces(true),h=function(a){return f(a)&&j(a)};b.prototype={getNextParagraph:function(b){b=b||"p";if(!CKEDITOR.dtd[this.range.root.getName()][b])return null;var g,e,k,l,j,o;if(!this._.started){e=this.range.clone();e.shrink(CKEDITOR.NODE_ELEMENT,true);l=e.endContainer.hasAscendant("pre",
true)||e.startContainer.hasAscendant("pre",true);e.enlarge(this.forceBrBreak&&!l||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);if(!e.collapsed){l=new CKEDITOR.dom.walker(e.clone());var n=CKEDITOR.dom.walker.bookmark(true,true);l.evaluator=n;this._.nextNode=l.next();l=new CKEDITOR.dom.walker(e.clone());l.evaluator=n;l=l.previous();this._.lastNode=l.getNextSourceNode(true);if(this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&
this._.lastNode.getParent().isBlockBoundary()){n=this.range.clone();n.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END);if(n.checkEndOfBlock()){n=new CKEDITOR.dom.elementPath(n.endContainer,n.root);this._.lastNode=(n.block||n.blockLimit).getNextSourceNode(true)}}if(!this._.lastNode){this._.lastNode=this._.docEndMarker=e.document.createText("");this._.lastNode.insertAfter(l)}e=null}this._.started=1}n=this._.nextNode;l=this._.lastNode;for(this._.nextNode=null;n;){var p=0,s=n.hasAscendant("pre"),
u=n.type!=CKEDITOR.NODE_ELEMENT,q=0;if(u)n.type==CKEDITOR.NODE_TEXT&&a.test(n.getText())&&(u=0);else{var w=n.getName();if(n.isBlockBoundary(this.forceBrBreak&&!s&&{br:1})){if(w=="br")u=1;else if(!e&&!n.getChildCount()&&w!="hr"){g=n;k=n.equals(l);break}if(e){e.setEndAt(n,CKEDITOR.POSITION_BEFORE_START);if(w!="br")this._.nextNode=n}p=1}else{if(n.getFirst()){if(!e){e=new CKEDITOR.dom.range(this.range.document);e.setStartAt(n,CKEDITOR.POSITION_BEFORE_START)}n=n.getFirst();continue}u=1}}if(u&&!e){e=this.range.clone();
e.setStartAt(n,CKEDITOR.POSITION_BEFORE_START)}k=(!p||u)&&n.equals(l);if(e&&!p)for(;!n.getNext(h)&&!k;){w=n.getParent();if(w.isBlockBoundary(this.forceBrBreak&&!s&&{br:1})){p=1;u=0;k||w.equals(l);e.setEndAt(w,CKEDITOR.POSITION_BEFORE_END);break}n=w;u=1;k=n.equals(l);q=1}u&&e.setEndAt(n,CKEDITOR.POSITION_AFTER_END);n=c(n,q,l);if((k=!n)||p&&e)break}if(!g){if(!e){this._.docEndMarker&&this._.docEndMarker.remove();return this._.nextNode=null}g=new CKEDITOR.dom.elementPath(e.startContainer,e.root);n=g.blockLimit;
p={div:1,th:1,td:1};g=g.block;if(!g&&n&&!this.enforceRealBlocks&&p[n.getName()]&&e.checkStartOfBlock()&&e.checkEndOfBlock()&&!n.equals(e.root))g=n;else if(!g||this.enforceRealBlocks&&g.getName()=="li"){g=this.range.document.createElement(b);e.extractContents().appendTo(g);g.trim();e.insertNode(g);j=o=true}else if(g.getName()!="li"){if(!e.checkStartOfBlock()||!e.checkEndOfBlock()){g=g.clone(false);e.extractContents().appendTo(g);g.trim();o=e.splitBlock();j=!o.wasStartOfBlock;o=!o.wasEndOfBlock;e.insertNode(g)}}else if(!k)this._.nextNode=
g.equals(l)?null:c(e.getBoundaryNodes().endNode,1,l)}if(j)(e=g.getPrevious())&&e.type==CKEDITOR.NODE_ELEMENT&&(e.getName()=="br"?e.remove():e.getLast()&&e.getLast().$.nodeName.toLowerCase()=="br"&&e.getLast().remove());if(o)(e=g.getLast())&&e.type==CKEDITOR.NODE_ELEMENT&&e.getName()=="br"&&(CKEDITOR.env.ie||e.getPrevious(f)||e.getNext(f))&&e.remove();if(!this._.nextNode)this._.nextNode=k||g.equals(l)||!l?null:c(g,1,l);return g}};CKEDITOR.dom.range.prototype.createIterator=function(){return new b(this)}}(),
CKEDITOR.command=function(b,c){this.uiItems=[];this.exec=function(a){if(this.state==CKEDITOR.TRISTATE_DISABLED)return false;this.editorFocus&&b.focus();return this.fire("exec")===false?true:c.exec.call(this,b,a)!==false};this.refresh=function(a,b){if(!this.readOnly&&a.readOnly)return true;if(this.context&&!b.isContextFor(this.context)){this.disable();return true}this.enable();return this.fire("refresh",{editor:a,path:b})===false?true:c.refresh&&c.refresh.apply(this,arguments)!==false};CKEDITOR.tools.extend(this,
c,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!c.context,state:CKEDITOR.TRISTATE_OFF});CKEDITOR.event.call(this)},CKEDITOR.command.prototype={enable:function(){this.state==CKEDITOR.TRISTATE_DISABLED&&this.setState(!this.preserveState||typeof this.previousState=="undefined"?CKEDITOR.TRISTATE_OFF:this.previousState)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},setState:function(b){if(this.state==b)return false;this.previousState=this.state;this.state=b;this.fire("state");return true},
toggleState:function(){this.state==CKEDITOR.TRISTATE_OFF?this.setState(CKEDITOR.TRISTATE_ON):this.state==CKEDITOR.TRISTATE_ON&&this.setState(CKEDITOR.TRISTATE_OFF)}},CKEDITOR.event.implementOn(CKEDITOR.command.prototype,!0),CKEDITOR.ENTER_P=1,CKEDITOR.ENTER_BR=2,CKEDITOR.ENTER_DIV=3,CKEDITOR.config={customConfig:"config.js",autoUpdateElement:!0,language:"",defaultLanguage:"en",contentsLangDirection:"",enterMode:CKEDITOR.ENTER_P,forceEnterMode:!1,shiftEnterMode:CKEDITOR.ENTER_BR,docType:"<!DOCTYPE html>",
bodyId:"",bodyClass:"",fullPage:!1,height:200,extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,width:"",baseFloatZIndex:1E4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]},function(){CKEDITOR.focusManager=function(b){if(b.focusManager)return b.focusManager;this.hasFocus=false;this.currentActive=null;this._={editor:b};return this};CKEDITOR.focusManager._={blurDelay:200};CKEDITOR.focusManager.prototype={focus:function(){this._.timer&&clearTimeout(this._.timer);
if(!this.hasFocus&&!this._.locked){var b=CKEDITOR.currentInstance;b&&b.focusManager.blur(1);this.hasFocus=true;(b=this._.editor.container)&&b.addClass("cke_focus");this._.editor.fire("focus")}},lock:function(){this._.locked=1},unlock:function(){delete this._.locked},blur:function(b){function c(){if(this.hasFocus){this.hasFocus=false;var a=this._.editor.container;a&&a.removeClass("cke_focus");this._.editor.fire("blur")}}if(!this._.locked){this._.timer&&clearTimeout(this._.timer);var a=CKEDITOR.focusManager._.blurDelay;
b||!a?c.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer;c.call(this)},a,this)}},add:function(b,c){var a=b.getCustomData("focusmanager");if(!a||a!=this){a&&a.remove(b);var a="focus",f="blur";if(c)if(CKEDITOR.env.ie&&CKEDITOR.env.version<9){a="focusin";f="focusout"}else CKEDITOR.event.useCapture=1;var j={blur:function(){b.equals(this.currentActive)&&this.blur()},focus:function(){this.currentActive=b;this.focus()}};b.on(a,j.focus,this);b.on(f,j.blur,this);if(c)CKEDITOR.event.useCapture=
0;b.setCustomData("focusmanager",this);b.setCustomData("focusmanager_handlers",j)}},remove:function(b){b.removeCustomData("focusmanager");var c=b.removeCustomData("focusmanager_handlers");b.removeListener("blur",c.blur);b.removeListener("focus",c.focus)}}}(),CKEDITOR.keystrokeHandler=function(b){if(b.keystrokeHandler)return b.keystrokeHandler;this.keystrokes={};this.blockedKeystrokes={};this._={editor:b};return this},function(){var b,c=function(a){var a=a.data,c=a.getKeystroke(),h=this.keystrokes[c],
d=this._.editor;b=d.fire("key",{keyCode:c})===false;if(!b){h&&(b=d.execCommand(h,{from:"keystrokeHandler"})!==false);b||(b=!!this.blockedKeystrokes[c])}b&&a.preventDefault(true);return!b},a=function(a){if(b){b=false;a.data.preventDefault(true)}};CKEDITOR.keystrokeHandler.prototype={attach:function(b){b.on("keydown",c,this);if(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.mac)b.on("keypress",a,this)}}}(),function(){CKEDITOR.lang={languages:{af:1,ar:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,
el:1,"en-au":1,"en-ca":1,"en-gb":1,en:1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,"fr-ca":1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,is:1,it:1,ja:1,ka:1,km:1,ko:1,lt:1,lv:1,mn:1,ms:1,nb:1,nl:1,no:1,pl:1,"pt-br":1,pt:1,ro:1,ru:1,sk:1,sl:1,"sr-latn":1,sr:1,sv:1,th:1,tr:1,uk:1,vi:1,"zh-cn":1,zh:1},load:function(b,c,a){if(!b||!CKEDITOR.lang.languages[b])b=this.detect(c,b);this[b]?a(b,this[b]):CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+b+".js"),function(){a(b,this[b])},this)},detect:function(b,c){var a=this.languages,
c=c||navigator.userLanguage||navigator.language||b,f=c.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),j=f[1],f=f[2];a[j+"-"+f]?j=j+"-"+f:a[j]||(j=null);CKEDITOR.lang.detect=j?function(){return j}:function(a){return a};return j||b}}}(),CKEDITOR.scriptLoader=function(){var b={},c={};return{load:function(a,f,j,h){var d=typeof a=="string";d&&(a=[a]);j||(j=CKEDITOR);var g=a.length,e=[],k=[],l=function(a){f&&(d?f.call(j,a):f.call(j,e,k))};if(g===0)l(true);else{var m=function(a,b){(b?e:k).push(a);if(--g<=
0){h&&CKEDITOR.document.getDocumentElement().removeStyle("cursor");l(b)}},o=function(a,d){b[a]=1;var e=c[a];delete c[a];for(var f=0;f<e.length;f++)e[f](a,d)},n=function(a){if(b[a])m(a,true);else{var d=c[a]||(c[a]=[]);d.push(m);if(!(d.length>1)){var e=new CKEDITOR.dom.element("script");e.setAttributes({type:"text/javascript",src:a});if(f)if(CKEDITOR.env.ie)e.$.onreadystatechange=function(){if(e.$.readyState=="loaded"||e.$.readyState=="complete"){e.$.onreadystatechange=null;o(a,true)}};else{e.$.onload=
function(){setTimeout(function(){o(a,true)},0)};e.$.onerror=function(){o(a,false)}}e.appendTo(CKEDITOR.document.getHead())}}};h&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var p=0;p<g;p++)n(a[p])}}}}(),CKEDITOR.resourceManager=function(b,c){this.basePath=b;this.fileName=c;this.registered={};this.loaded={};this.externals={};this._={waitingList:{}}},CKEDITOR.resourceManager.prototype={add:function(b,c){if(this.registered[b])throw'[CKEDITOR.resourceManager.add] The resource name "'+
b+'" is already registered.';var a=this.registered[b]=c||{};a.name=b;a.path=this.getPath(b);CKEDITOR.fire(b+CKEDITOR.tools.capitalize(this.fileName)+"Ready",a);return this.get(b)},get:function(b){return this.registered[b]||null},getPath:function(b){var c=this.externals[b];return CKEDITOR.getUrl(c&&c.dir||this.basePath+b+"/")},getFilePath:function(b){var c=this.externals[b];return CKEDITOR.getUrl(this.getPath(b)+(c&&typeof c.file=="string"?c.file:this.fileName+".js"))},addExternal:function(b,c,a){for(var b=
b.split(","),f=0;f<b.length;f++)this.externals[b[f]]={dir:c,file:a}},load:function(b,c,a){CKEDITOR.tools.isArray(b)||(b=b?[b]:[]);for(var f=this.loaded,j=this.registered,h=[],d={},g={},e=0;e<b.length;e++){var k=b[e];if(k)if(!f[k]&&!j[k]){var l=this.getFilePath(k);h.push(l);l in d||(d[l]=[]);d[l].push(k)}else g[k]=this.get(k)}CKEDITOR.scriptLoader.load(h,function(b,e){if(e.length)throw'[CKEDITOR.resourceManager.load] Resource name "'+d[e[0]].join(",")+'" was not found at "'+e[0]+'".';for(var k=0;k<
b.length;k++)for(var h=d[b[k]],l=0;l<h.length;l++){var j=h[l];g[j]=this.get(j);f[j]=1}c.call(a,g)},this)}},CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin"),CKEDITOR.plugins.load=CKEDITOR.tools.override(CKEDITOR.plugins.load,function(b){var c={};return function(a,f,j){var h={},d=function(a){b.call(this,a,function(a){CKEDITOR.tools.extend(h,a);var b=[],g;for(g in a){var m=a[g],o=m&&m.requires;if(!c[g]){if(m.icons)for(var n=m.icons.split(","),p=0;p<n.length;p++)CKEDITOR.skin.addIcon(n[p],
m.path+"icons/"+n[p]+".png");c[g]=1}if(o){o.split&&(o=o.split(","));for(m=0;m<o.length;m++)h[o[m]]||b.push(o[m])}}if(b.length)d.call(this,b);else{for(g in h){m=h[g];if(m.onLoad&&!m.onLoad._called){m.onLoad()===false&&delete h[g];m.onLoad._called=1}}f&&f.call(j||window,h)}},this)};d.call(this,a)}}),CKEDITOR.plugins.setLang=function(b,c,a){var f=this.get(b),b=f.langEntries||(f.langEntries={}),f=f.lang||(f.lang=[]);f.split&&(f=f.split(","));CKEDITOR.tools.indexOf(f,c)==-1&&f.push(c);b[c]=a},CKEDITOR.ui=
function(b){if(b.ui)return b.ui;this.items={};this.instances={};this.editor=b;this._={handlers:{}};return this},CKEDITOR.ui.prototype={add:function(b,c,a){a.name=b.toLowerCase();var f=this.items[b]={type:c,command:a.command||null,args:Array.prototype.slice.call(arguments,2)};CKEDITOR.tools.extend(f,a)},get:function(b){return this.instances[b]},create:function(b){var c=this.items[b],a=c&&this._.handlers[c.type],f=c&&c.command&&this.editor.getCommand(c.command),a=a&&a.create.apply(this,c.args);this.instances[b]=
a;f&&f.uiItems.push(a);if(a&&!a.type)a.type=c.type;return a},addHandler:function(b,c){this._.handlers[b]=c},space:function(b){return CKEDITOR.document.getById(this.spaceId(b))},spaceId:function(b){return this.editor.id+"_"+b}},CKEDITOR.event.implementOn(CKEDITOR.ui),function(){function b(b,d,e){CKEDITOR.event.call(this);if(d!==void 0){if(d instanceof CKEDITOR.dom.element){if(!e)throw Error("One of the element mode must be specified.");}else throw Error("Expect element of type CKEDITOR.dom.element.");
if(CKEDITOR.env.ie&&CKEDITOR.env.quirks&&e==CKEDITOR.ELEMENT_MODE_INLINE)throw Error("Inline element mode is not supported on IE quirks.");if(e==CKEDITOR.ELEMENT_MODE_INLINE&&!d.is(CKEDITOR.dtd.$editable)||e==CKEDITOR.ELEMENT_MODE_REPLACE&&d.is(CKEDITOR.dtd.$nonBodyContent))throw Error('The specified element mode is not supported on element: "'+d.getName()+'".');this.element=d;this.elementMode=e;this.name=this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO&&(d.getId()||d.getNameAtt())}else this.elementMode=
CKEDITOR.ELEMENT_MODE_NONE;this._={};this.commands={};this.templates={};this.name=this.name||c();this.id=CKEDITOR.tools.getNextId();this.config=CKEDITOR.tools.prototypedCopy(CKEDITOR.config);this.ui=new CKEDITOR.ui(this);this.focusManager=new CKEDITOR.focusManager(this);this.keystrokeHandler=new CKEDITOR.keystrokeHandler(this);this.on("mode",a);this.on("readOnly",a);this.on("selectionChange",f);this.on("instanceReady",function(){this.config.startupFocus&&this.focus()});CKEDITOR.fire("instanceCreated",
null,this);CKEDITOR.add(this);CKEDITOR.tools.setTimeout(function(){h(this,b)},0,this)}function c(){do var a="editor"+ ++l;while(CKEDITOR.instances[a]);return a}function a(){var a,b=this.commands,d=this.mode;if(d)for(var c in b){a=b[c];a[a.startDisabled?"disable":this.readOnly&&!a.readOnly?"disable":a.modes[d]?"enable":"disable"]()}}function f(a){var b=this.commands,d=a.editor,c=a.data.path,e;for(e in b){a=b[e];a.contextSensitive&&a.refresh(d,c)}}function j(a){var b=a.config.customConfig;if(!b)return false;
var b=CKEDITOR.getUrl(b),d=m[b]||(m[b]={});if(d.fn){d.fn.call(a,a.config);(CKEDITOR.getUrl(a.config.customConfig)==b||!j(a))&&a.fireOnce("customConfigLoaded")}else CKEDITOR.scriptLoader.load(b,function(){d.fn=CKEDITOR.editorConfig?CKEDITOR.editorConfig:function(){};j(a)});return true}function h(a,b){a.on("customConfigLoaded",function(){if(b){if(b.on)for(var c in b.on)a.on(c,b.on[c]);CKEDITOR.tools.extend(a.config,b,true);delete a.config.on}a.readOnly=!(!a.config.readOnly&&!(a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?
a.element.isReadOnly():a.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&a.element.getAttribute("disabled")));a.blockless=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&!CKEDITOR.dtd[a.element.getName()].p;a.tabIndex=a.config.tabIndex||a.element&&a.element.getAttribute("tabindex")||0;if(a.config.skin)CKEDITOR.skinName=a.config.skin;a.fireOnce("configLoaded");a.dataProcessor=new CKEDITOR.htmlDataProcessor(a);d(a)});if(b&&b.customConfig!=void 0)a.config.customConfig=b.customConfig;j(a)||a.fireOnce("customConfigLoaded")}
function d(a){CKEDITOR.skin.loadPart("editor",function(){g(a)})}function g(a){CKEDITOR.lang.load(a.config.language,a.config.defaultLanguage,function(b,d){a.langCode=b;a.lang=CKEDITOR.tools.prototypedCopy(d);if(CKEDITOR.env.gecko&&CKEDITOR.env.version<10900&&a.lang.dir=="rtl")a.lang.dir="ltr";if(!a.config.contentsLangDirection)a.config.contentsLangDirection=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.getDirection(1):a.lang.dir;a.fire("langLoaded");e(a)})}function e(a){var b=a.config,d=b.plugins,
c=b.extraPlugins,e=b.removePlugins;if(c)var f=RegExp("(?:^|,)(?:"+c.replace(/\s*,\s*/g,"|")+")(?=,|$)","g"),d=d.replace(f,""),d=d+(","+c);if(e){f=RegExp("(?:^|,)(?:"+e.replace(/\s*,\s*/g,"|")+")(?=,|$)","g");d=d.replace(f,"")}CKEDITOR.env.air&&(d=d+",adobeair");CKEDITOR.plugins.load(d.split(","),function(d){var c=[],e=[],g=[];a.plugins=d;for(var k in d){var h=d[k],l=h.lang,j=null,m=h.requires,p;CKEDITOR.tools.isArray(m)&&(m=m.join(","));if(m&&(p=m.match(f)))for(;m=p.pop();)CKEDITOR.tools.setTimeout(function(a,
b){throw Error('Plugin "'+a.replace(",","")+'" cannot be removed from the plugins list, because it\'s required by "'+b+'" plugin.');},0,null,[m,k]);if(l&&!a.lang[k]){l.split&&(l=l.split(","));j=CKEDITOR.tools.indexOf(l,a.langCode)>=0?a.langCode:l[0];if(!h.langEntries||!h.langEntries[j])g.push(CKEDITOR.getUrl(h.path+"lang/"+j+".js"));else{a.lang[k]=h.langEntries[j];j=null}}e.push(j);c.push(h)}CKEDITOR.scriptLoader.load(g,function(){for(var d=["beforeInit","init","afterInit"],f=0;f<d.length;f++)for(var g=
0;g<c.length;g++){var k=c[g];f===0&&(e[g]&&k.lang&&k.langEntries)&&(a.lang[k.name]=k.langEntries[e[g]]);if(k[d[f]])k[d[f]](a)}a.fireOnce("pluginsLoaded");b.keystrokes&&a.setKeystroke(a.config.keystrokes);for(g=0;g<a.config.blockedKeystrokes.length;g++)a.keystrokeHandler.blockedKeystrokes[a.config.blockedKeystrokes[g]]=1;a.fireOnce("loaded");CKEDITOR.fire("instanceLoaded",null,a)})})}function k(){var a=this.element;if(a&&this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO){var b=this.getData();this.config.htmlEncodeOutput&&
(b=CKEDITOR.tools.htmlEncode(b));a.is("textarea")?a.setValue(b):a.setHtml(b);return true}return false}b.prototype=CKEDITOR.editor.prototype;CKEDITOR.editor=b;var l=0,m={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{addCommand:function(a,b){return this.commands[a]=new CKEDITOR.command(this,b)},destroy:function(a){this.fire("beforeDestroy");!a&&k.call(this);this.editable(null);this.fire("destroy");this.removeAllListeners();CKEDITOR.remove(this);CKEDITOR.fire("instanceDestroyed",null,this)},elementPath:function(a){return(a=
a||this.getSelection().getStartElement())?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 d=this.getCommand(a),c={name:a,commandData:b,command:d};if(d&&d.state!=CKEDITOR.TRISTATE_DISABLED&&this.fire("beforeCommandExec",c)!==true){c.returnValue=d.exec(c.commandData);if(!d.async&&this.fire("afterCommandExec",c)!==true)return c.returnValue}return false},getCommand:function(a){return this.commands[a]},
getData:function(a){!a&&this.fire("beforeGetData");var b=this._.data;if(typeof b!="string")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");if(typeof a!="string"){var b=this.element;b&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(a=b.is("textarea")?b.getValue():b.getHtml())}return a},loadSnapshot:function(a){this.fire("loadSnapshot",
a)},setData:function(a,b,d){if(b)this.on("dataReady",function(a){a.removeListener();b.call(a.editor)});a={dataValue:a};!d&&this.fire("setData",a);this._.data=a.dataValue;!d&&this.fire("afterSetData",a)},setReadOnly:function(a){a=a==void 0||a;if(this.readOnly!=a){this.readOnly=a;this.editable().setReadOnly(a);this.fire("readOnly")}},insertHtml:function(a,b){this.fire("insertHtml",{dataValue:a,mode:b})},insertText:function(a){this.fire("insertText",a)},insertElement:function(a){this.fire("insertElement",
a)},focus:function(){this.fire("beforeFocus")},checkDirty:function(){return this._.previousValue!==this.getSnapshot()},resetDirty:function(){this._.previousValue=this.getSnapshot()},updateElement:function(){return k.call(this)},setKeystroke:function(){for(var a=this.keystrokeHandler.keystrokes,b=CKEDITOR.tools.isArray(arguments[0])?arguments[0]:[[].slice.call(arguments,0)],d,c,e=b.length;e--;){d=b[e];c=0;if(CKEDITOR.tools.isArray(d)){c=d[1];d=d[0]}c?a[d]=c:delete a[d]}}})}(),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:RegExp("<(?:(?:\\/([^>]+)>)|(?:!--([\\S|\\s]*?)--\>)|(?:([^\\s>]+)\\s*((?:(?:\"[^\"]*\")|(?:'[^']*')|[^\"'>])*)\\/?>))","g")}},function(){var b=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,c={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};
CKEDITOR.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(a){for(var f,j,h=0,d;f=this._.htmlPartsRegex.exec(a);){j=f.index;if(j>h){h=a.substring(h,j);if(d)d.push(h);else this.onText(h)}h=this._.htmlPartsRegex.lastIndex;if(j=f[1]){j=j.toLowerCase();if(d&&CKEDITOR.dtd.$cdata[j]){this.onCDATA(d.join(""));d=null}if(!d){this.onTagClose(j);continue}}if(d)d.push(f[0]);else if(j=f[3]){j=j.toLowerCase();if(!/="/.test(j)){var g=
{},e;f=f[4];var k=!!(f&&f.charAt(f.length-1)=="/");if(f)for(;e=b.exec(f);){var l=e[1].toLowerCase();e=e[2]||e[3]||e[4]||"";g[l]=!e&&c[l]?l:e}this.onTagOpen(j,g,k);!d&&CKEDITOR.dtd.$cdata[j]&&(d=[])}}else if(j=f[2])this.onComment(j)}if(a.length>h)this.onText(a.substring(h,a.length))}}}(),CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(b){this._.output.push("<",b)},openTagClose:function(b,c){c?this._.output.push(" />"):this._.output.push(">")},
attribute:function(b,c){typeof c=="string"&&(c=CKEDITOR.tools.htmlEncodeAttr(c));this._.output.push(" ",b,'="',c,'"')},closeTag:function(b){this._.output.push("</",b,">")},text:function(b){this._.output.push(b)},comment:function(b){this._.output.push("<\!--",b,"--\>")},write:function(b){this._.output.push(b)},reset:function(){this._.output=[];this._.indent=false},getHtml:function(b){var c=this._.output.join("");b&&this.reset();return c}}}),CKEDITOR.htmlParser.comment=function(b){this.value=b;this._=
{isBlockLike:false}},CKEDITOR.htmlParser.comment.prototype={type:CKEDITOR.NODE_COMMENT,writeHtml:function(b,c){var a=this.value;if(c){if(!(a=c.onComment(a,this)))return;if(typeof a!="string"){a.parent=this.parent;a.writeHtml(b,c);return}}b.comment(a)}},function(){CKEDITOR.htmlParser.text=function(b){this.value=b;this._={isBlockLike:false}};CKEDITOR.htmlParser.text.prototype={type:CKEDITOR.NODE_TEXT,writeHtml:function(b,c){var a=this.value;(!c||(a=c.onText(a,this)))&&b.text(a)}}}(),function(){CKEDITOR.htmlParser.cdata=
function(b){this.value=b};CKEDITOR.htmlParser.cdata.prototype={type:CKEDITOR.NODE_TEXT,writeHtml:function(b){b.write(this.value)}}}(),CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:true,hasInlineStarted:false}},function(){function b(a){return a.name=="a"&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}var c=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),a=CKEDITOR.env.ie&&CKEDITOR.env.version<
8?{dd:1,dt:1}:{},f={ol:1,ul:1},j=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1});CKEDITOR.htmlParser.fragment.fromHtml=function(h,d,g){function e(a){var b;if(s.length>0)for(var d=0;d<s.length;d++){var c=s[d],e=c.name,f=CKEDITOR.dtd[e],g=q.name&&CKEDITOR.dtd[q.name];if((!g||g[e])&&(!a||!f||f[a]||!CKEDITOR.dtd[a])){if(!b){k();b=1}c=c.clone();c.parent=q;q=c;s.splice(d,1);d--}else if(e==q.name){m(q,q.parent,1);d--}}}function k(){for(;u.length;)m(u.shift(),
q)}function l(a){if(a._.isBlockLike&&a.name!="pre"&&a.name!="textarea"){var b=a.children.length,d=a.children[b-1],c;if(d&&d.type==CKEDITOR.NODE_TEXT)(c=CKEDITOR.tools.rtrim(d.value))?d.value=c:a.children.length=b-1}}function m(a,d,c){if(a.previous===void 0){var d=d||q||p,e=q;if(o(d,a)){q=d;n.onTagOpen(g,{});a.returnPoint=d=q}l(a);(!b(a)||a.children.length)&&d.add(a);a.name=="pre"&&(B=false);a.name=="textarea"&&(w=false);if(a.returnPoint){q=a.returnPoint;delete a.returnPoint}else q=c?d:e}}function o(a,
b){if((a==p||a.name=="body")&&g&&(!a.name||CKEDITOR.dtd[a.name][g])){var d,c;return(d=b.attributes&&(c=b.attributes["data-cke-real-element-type"])?c:b.name)&&d in CKEDITOR.dtd.$inline&&!(d in CKEDITOR.dtd.head)&&!b.isOrphan||b.type==CKEDITOR.NODE_TEXT}}var n=new CKEDITOR.htmlParser,p=d instanceof CKEDITOR.htmlParser.element?d:typeof d=="string"?new CKEDITOR.htmlParser.element(d):new CKEDITOR.htmlParser.fragment,s=[],u=[],q=p,w=p.name=="textarea",B=p.name=="pre";n.onTagOpen=function(d,g,h,l){g=new CKEDITOR.htmlParser.element(d,
g);if(g.isUnknown&&h)g.isEmpty=true;g.isOptionalClose=d in a||l;if(b(g))s.push(g);else{if(d=="pre")B=true;else{if(d=="br"&&B){q.add(new CKEDITOR.htmlParser.text("\n"));return}d=="textarea"&&(w=true)}if(d=="br")u.push(g);else{for(;;){l=(h=q.name)?CKEDITOR.dtd[h]||(q._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):j;if(!g.isUnknown&&!q.isUnknown&&!l[d])if(q.isOptionalClose)n.onTagClose(h);else if(d in f&&h in f){h=q.children;(h=h[h.length-1])&&h.name=="li"||m(h=new CKEDITOR.htmlParser.element("li"),
q);!g.returnPoint&&(g.returnPoint=q);q=h}else if(d in CKEDITOR.dtd.$listItem&&h!=d)n.onTagOpen(d=="li"?"ul":"dl",{},0,1);else if(h in c&&h!=d){!g.returnPoint&&(g.returnPoint=q);q=q.parent}else{h in CKEDITOR.dtd.$inline&&s.unshift(q);if(q.parent)m(q,q.parent,1);else{g.isOrphan=1;break}}else break}e(d);k();g.parent=q;g.isEmpty?m(g):q=g}}};n.onTagClose=function(a){for(var b=s.length-1;b>=0;b--)if(a==s[b].name){s.splice(b,1);return}for(var d=[],c=[],e=q;e!=p&&e.name!=a;){e._.isBlockLike||c.unshift(e);
d.push(e);e=e.returnPoint||e.parent}if(e!=p){for(b=0;b<d.length;b++){var f=d[b];m(f,f.parent)}q=e;e._.isBlockLike&&k();m(e,e.parent);if(e==q)q=q.parent;s=s.concat(c)}a=="body"&&(g=false)};n.onText=function(a){if((!q._.hasInlineStarted||u.length)&&!B&&!w){a=CKEDITOR.tools.ltrim(a);if(a.length===0)return}var b=q.name,d=b?CKEDITOR.dtd[b]||(q._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):j;if(!w&&!d["#"]&&b in c){n.onTagOpen(b in f?"li":b=="dl"?"dd":b=="table"?"tr":b=="tr"?"td":"");n.onText(a)}else{k();
e();!B&&!w&&(a=a.replace(/[\t\r\n ]{2,}|[\t\r\n]/g," "));a=new CKEDITOR.htmlParser.text(a);if(o(q,a))this.onTagOpen(g,{},0,1);q.add(a)}};n.onCDATA=function(a){q.add(new CKEDITOR.htmlParser.cdata(a))};n.onComment=function(a){k();e();q.add(new CKEDITOR.htmlParser.comment(a))};n.parse(h);for(k(!CKEDITOR.env.ie&&1);q!=p;)m(q,q.parent,1);l(p);return p};CKEDITOR.htmlParser.fragment.prototype={type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,add:function(a,b){isNaN(b)&&(b=this.children.length);var c=b>0?this.children[b-
1]:null;if(c){if(a._.isBlockLike&&c.type==CKEDITOR.NODE_TEXT){c.value=CKEDITOR.tools.rtrim(c.value);if(c.value.length===0){this.children.pop();this.add(a);return}}c.next=a}a.previous=c;a.parent=this;this.children.splice(b,0,a);if(!this._.hasInlineStarted)this._.hasInlineStarted=a.type==CKEDITOR.NODE_TEXT||a.type==CKEDITOR.NODE_ELEMENT&&!a._.isBlockLike},writeHtml:function(a,b){var c;this.filterChildren=function(){var a=new CKEDITOR.htmlParser.basicWriter;this.writeChildrenHtml.call(this,a,b);a=a.getHtml();
this.children=(new CKEDITOR.htmlParser.fragment.fromHtml(a)).children;c=1};b&&b.onRoot(this);this.writeChildrenHtml(a,c?null:b)},writeChildrenHtml:function(a,b,c){if(c&&!this.parent&&b)b.onRoot(this);for(c=0;c<this.children.length;c++)this.children[c].writeHtml(a,b)}}}(),function(){function b(a,b){for(var c=0;a&&c<b.length;c++)var e=b[c],a=a.replace(e[0],e[1]);return a}function c(a,b,c){typeof b=="function"&&(b=[b]);var e,f;f=a.length;var l=b&&b.length;if(l){for(e=0;e<f&&a[e].pri<c;e++);for(f=l-1;f>=
0;f--)if(l=b[f]){l.pri=c;a.splice(e,0,l)}}}function a(a,b,c){if(b)for(var e in b){var k=a[e];a[e]=f(k,b[e],c);k||a.$length++}}function f(a,b,f){if(b){b.pri=f;if(a){if(a.splice)c(a,b,f);else{a=a.pri>f?[b,a]:[a,b];a.filter=j}return a}return b.filter=b}}function j(a){for(var b=a.type||a instanceof CKEDITOR.htmlParser.fragment,c=0;c<this.length;c++){if(b)var e=a.type,f=a.name;var l=this[c].apply(window,arguments);if(l===false)return l;if(b){if(l&&(l.name!=f||l.type!=e))return l}else if(typeof l!="string")return l;
l!=void 0&&(a=l)}return a}CKEDITOR.htmlParser.filter=CKEDITOR.tools.createClass({$:function(a){this._={elementNames:[],attributeNames:[],elements:{$length:0},attributes:{$length:0}};a&&this.addRules(a,10)},proto:{addRules:function(b,d){typeof d!="number"&&(d=10);c(this._.elementNames,b.elementNames,d);c(this._.attributeNames,b.attributeNames,d);a(this._.elements,b.elements,d);a(this._.attributes,b.attributes,d);this._.text=f(this._.text,b.text,d)||this._.text;this._.comment=f(this._.comment,b.comment,
d)||this._.comment;this._.root=f(this._.root,b.root,d)||this._.root},onElementName:function(a){return b(a,this._.elementNames)},onAttributeName:function(a){return b(a,this._.attributeNames)},onText:function(a){var b=this._.text;return b?b.filter(a):a},onComment:function(a,b){var c=this._.comment;return c?c.filter(a,b):a},onRoot:function(a){var b=this._.root;return b?b.filter(a):a},onElement:function(a){for(var b=[this._.elements["^"],this._.elements[a.name],this._.elements.$],c,e=0;e<3;e++)if(c=b[e]){c=
c.filter(a,this);if(c===false)return null;if(c&&c!=a)return this.onNode(c);if(a.parent&&!a.name)break}return a},onNode:function(a){var b=a.type;return b==CKEDITOR.NODE_ELEMENT?this.onElement(a):b==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(a.value)):b==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(a.value)):null},onAttribute:function(a,b,c){if(b=this._.attributes[b]){a=b.filter(c,a,this);if(a===false)return false;if(typeof a!="undefined")return a}return c}}})}(),
function(){function b(b,c){function e(a){return a||CKEDITOR.env.ie?new CKEDITOR.htmlParser.text(" "):new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function k(b,d){return function(c){if(c.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var k=[],j=a(c),m,p;if(j)for(l(j,1)&&k.push(j);j;){if(h(j)&&(m=f(j))&&l(m))if((p=f(m))&&!h(p))k.push(m);else{var o=m,s=e(n),u=o.parent.children,I=CKEDITOR.tools.indexOf(u,o);u.splice(I+1,0,s);u=o.next;o.next=s;s.previous=o;s.parent=o.parent;s.next=u;g(m)}j=j.previous}for(j=
0;j<k.length;j++)g(k[j]);if(k=!b||(typeof d=="function"?d(c)!==false:d))if(!n&&CKEDITOR.env.ie&&c.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)k=false;else if(!n&&CKEDITOR.env.ie&&(document.documentMode>7||c.name in CKEDITOR.dtd.tr||c.name in CKEDITOR.dtd.$listItem))k=false;else{k=a(c);k=!k||c.name=="form"&&k.name=="input"}k&&c.add(e(b))}}}function l(a,b){if((!n||!CKEDITOR.env.ie)&&a.type==CKEDITOR.NODE_ELEMENT&&a.name=="br"&&!a.attributes["data-cke-eol"])return true;var c;if(a.type==CKEDITOR.NODE_TEXT&&
(c=a.value.match(w))){if(c.index){d(a,new CKEDITOR.htmlParser.text(a.value.substring(0,c.index)));a.value=c[0]}if(CKEDITOR.env.ie&&n&&(!b||a.parent.name in p))return true;if(!n)if((c=a.previous)&&c.name=="br"||!c||h(c))return true}return false}var m={elements:{}},n=c=="html",p=CKEDITOR.tools.extend({},v),o;for(o in p)"#"in z[o]||delete p[o];for(o in p)m.elements[o]=k(n,b.config.fillEmptyBlocks!==false);m.root=k(n);m.elements.br=function(a){return function(b){if(b.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var c=
b.attributes;if("data-cke-bogus"in c||"data-cke-eol"in c)delete c["data-cke-bogus"];else{for(c=b.next;c&&j(c);)c=c.next;var k=f(b);if(!c&&h(b.parent)){b=b.parent;c=e(a);k=b.children[b.children.length-1];b.children.push(c);c.parent=b;if(k){k.next=c;c.previous=k}}else h(c)&&(k&&!h(k))&&d(c,e(a))}}}}(n);return m}function c(a){return a.enterMode!=CKEDITOR.ENTER_BR&&a.autoParagraph!==false?a.enterMode==CKEDITOR.ENTER_DIV?"div":"p":false}function a(a){for(a=a.children[a.children.length-1];a&&j(a);)a=a.previous;
return a}function f(a){for(a=a.previous;a&&j(a);)a=a.previous;return a}function j(a){return a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(a.value)||a.type==CKEDITOR.NODE_ELEMENT&&a.attributes["data-cke-bookmark"]}function h(a){return a&&(a.type==CKEDITOR.NODE_ELEMENT&&a.name in v||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function d(a,b){var d=a.parent.children,c=CKEDITOR.tools.indexOf(d,a);d.splice(c,0,b);d=a.previous;a.previous=b;b.next=a;b.parent=a.parent;if(d){b.previous=d;d.next=b}}function g(a){var b=
a.parent.children,d=CKEDITOR.tools.indexOf(b,a),c=a.previous,a=a.next;c&&(c.next=a);a&&(a.previous=c);b.splice(d,1)}function e(a){var b=a.parent;return b?CKEDITOR.tools.indexOf(b.children,a):-1}function k(a){a=a.attributes;a.contenteditable!="false"&&(a["data-cke-editable"]=a.contenteditable?"true":1);a.contenteditable="false"}function l(a){a=a.attributes;switch(a["data-cke-editable"]){case "true":a.contenteditable="true";break;case "1":delete a.contenteditable}}function m(a){return a.replace(C,function(a,
b,d){return"<"+b+d.replace(y,function(a,b){return!/^on/.test(b)&&d.indexOf("data-cke-saved-"+b)==-1?" data-cke-saved-"+a+" data-cke-"+CKEDITOR.rnd+"-"+a:a})+">"})}function o(a){return a.replace(A,function(a){return"<cke:encoded>"+encodeURIComponent(a)+"</cke:encoded>"})}function n(a){return a.replace(G,function(a,b){return decodeURIComponent(b)})}function p(a){return a.replace(/<\!--(?!{cke_protected})[\s\S]+?--\>/g,function(a){return"<\!--"+B+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\>"})}
function s(a){return a.replace(/<\!--\{cke_protected\}\{C\}([\s\S]+?)--\>/g,function(a,b){return decodeURIComponent(b)})}function u(a,b){var d=b._.dataStore;return a.replace(/<\!--\{cke_protected\}([\s\S]+?)--\>/g,function(a,b){return decodeURIComponent(b)}).replace(/\{cke_protected_(\d+)\}/g,function(a,b){return d&&d[b]||""})}function q(a,b){for(var d=[],c=b.config.protectedSource,e=b._.dataStore||(b._.dataStore={id:1}),f=/<\!--\{cke_temp(comment)?\}(\d*?)--\>/g,c=[/<script[\s\S]*?<\/script>/gi,
/<noscript[\s\S]*?<\/noscript>/gi].concat(c),a=a.replace(/<\!--[\s\S]*?--\>/g,function(a){return"<\!--{cke_tempcomment}"+(d.push(a)-1)+"--\>"}),k=0;k<c.length;k++)a=a.replace(c[k],function(a){a=a.replace(f,function(a,b,c){return d[c]});return/cke_temp(comment)?/.test(a)?a:"<\!--{cke_temp}"+(d.push(a)-1)+"--\>"});a=a.replace(f,function(a,b,c){return"<\!--"+B+(b?"{C}":"")+encodeURIComponent(d[c]).replace(/--/g,"%2D%2D")+"--\>"});return a.replace(/(['"]).*?\1/g,function(a){return a.replace(/<\!--\{cke_protected\}([\s\S]+?)--\>/g,
function(a,b){e[e.id]=decodeURIComponent(b);return"{cke_protected_"+e.id++ +"}"})})}CKEDITOR.htmlDataProcessor=function(a){var d,c;this.editor=a;this.dataFilter=d=new CKEDITOR.htmlParser.filter;this.htmlFilter=c=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;d.addRules(t);d.addRules(b(a,"data"));c.addRules(x);c.addRules(b(a,"html"))};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,d){var a=q(a,this.editor),a=m(a),a=o(a),a=a.replace(D,"$1cke:$2"),a=a.replace(M,
"<cke:$1$2></cke:$1>"),a=a.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,"$1$2$2"),e=this.editor.editable(),f;!b&&b!==null&&(b=e.getName());e=b||e.getName();if(CKEDITOR.env.ie&&CKEDITOR.env.version<9&&e=="pre"){e="div";a="<pre>"+a+"</pre>";f=1}e=this.editor.document.createElement(e);e.setHtml("a"+a);a=e.getHtml().substr(1);a=a.replace(RegExp(" data-cke-"+CKEDITOR.rnd+"-","ig")," ");f&&(a=a.replace(/^<pre>|<\/pre>$/gi,""));a=a.replace(E,"$1$2");a=n(a);a=s(a);a=CKEDITOR.htmlParser.fragment.fromHtml(a,b,d===false?
false:c(this.editor.config));b=new CKEDITOR.htmlParser.basicWriter;a.writeChildrenHtml(b,this.dataFilter,1);a=b.getHtml(true);return a=p(a)},toDataFormat:function(a){var b=this.editor.editable(),d=this.writer,a=CKEDITOR.htmlParser.fragment.fromHtml(a,b.getName(),c(this.editor.config));d.reset();a.writeChildrenHtml(d,this.htmlFilter,1);d=d.getHtml(true);d=s(d);return d=u(d,this.editor)}};var w=/(?: |\xa0)$/,B="{cke_protected}",z=CKEDITOR.dtd,r=["caption","colgroup","col","thead","tfoot","tbody"],
v=CKEDITOR.tools.extend({},z.$blockLimit,z.$block),t={elements:{},attributeNames:[[/^on/,"data-cke-pa-on"]]},x={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var b=a.attributes;if(b){if(b["data-cke-temp"])return false;for(var d=["name","href","src"],c,e=0;e<d.length;e++){c="data-cke-saved-"+d[e];c in b&&delete b[d[e]]}}return a},table:function(a){a.children.slice(0).sort(function(a,b){var d,
c;if(a.type==CKEDITOR.NODE_ELEMENT&&b.type==a.type){d=CKEDITOR.tools.indexOf(r,a.name);c=CKEDITOR.tools.indexOf(r,b.name)}if(!(d>-1&&c>-1&&d!=c)){d=e(a);c=e(b)}return d>c?1:-1})},embed:function(a){var b=a.parent;if(b&&b.name=="object"){var d=b.attributes.width,b=b.attributes.height;d&&(a.attributes.width=d);b&&(a.attributes.height=b)}},param:function(a){a.children=[];a.isEmpty=true;return a},a:function(a){if(!a.children.length&&!a.attributes.name&&!a.attributes["data-cke-saved-name"])return false},
span:function(a){a.attributes["class"]=="Apple-style-span"&&delete a.name},html:function(a){delete a.attributes.contenteditable;delete a.attributes["class"]},body:function(a){delete a.attributes.spellcheck;delete a.attributes.contenteditable},style:function(a){var b=a.children[0];b&&b.value&&(b.value=CKEDITOR.tools.trim(b.value));if(!a.attributes.type)a.attributes.type="text/css"},title:function(a){var b=a.children[0];b&&(b.value=a.attributes["data-cke-title"]||"")}},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,
""))||false}}};if(CKEDITOR.env.ie)x.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})};for(i in{input:1,textarea:1}){t.elements[i]=k;x.elements[i]=l}var C=/<(a|area|img|input|source)\b([^>]*)>/gi,y=/\b(on\w+|href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,A=/(?:<style(?=[ >])[^>]*>[\s\S]*<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,G=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,D=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,
E=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,M=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi}(),CKEDITOR.htmlParser.element=function(b,c){this.name=b;this.attributes=c||{};this.children=[];var a=b||"",f=a.match(/^cke:(.*)/);f&&(a=f[1]);a=!(!CKEDITOR.dtd.$nonBodyContent[a]&&!CKEDITOR.dtd.$block[a]&&!CKEDITOR.dtd.$listItem[a]&&!CKEDITOR.dtd.$tableContent[a]&&!(CKEDITOR.dtd.$nonEditable[a]||a=="br"));this.isEmpty=!!CKEDITOR.dtd.$empty[b];this.isUnknown=!CKEDITOR.dtd[b];this._={isBlockLike:a,
hasInlineStarted:this.isEmpty||!a}},CKEDITOR.htmlParser.cssStyle=function(b){var c={};((b instanceof CKEDITOR.htmlParser.element?b.attributes.style:b)||"").replace(/"/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,b,j){b=="font-family"&&(j=j.replace(/["']/g,""));c[b.toLowerCase()]=j});return{rules:c,populate:function(a){var b=this.toString();if(b)a instanceof CKEDITOR.dom.element?a.setAttribute("style",b):a instanceof CKEDITOR.htmlParser.element?a.attributes.style=b:a.style=
b},toString:function(){var a=[],b;for(b in c)c[b]&&a.push(b,":",c[b],";");return a.join("")}}},function(){var b=function(b,a){b=b[0];a=a[0];return b<a?-1:b>a?1:0};CKEDITOR.htmlParser.element.prototype={type:CKEDITOR.NODE_ELEMENT,add:CKEDITOR.htmlParser.fragment.prototype.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},writeHtml:function(c,a){var f=this.attributes,j=this,h=j.name,d,g,e,k;j.filterChildren=function(){if(!k){var b=new CKEDITOR.htmlParser.basicWriter;
CKEDITOR.htmlParser.fragment.prototype.writeChildrenHtml.call(j,b,a);j.children=(new CKEDITOR.htmlParser.fragment.fromHtml(b.getHtml(),j.clone(),0)).children;k=1}};if(a){if(!this.parent)a.onRoot(this);for(;;){if(!(h=a.onElementName(h)))return;j.name=h;if(!(j=a.onElement(j)))return;j.parent=this.parent;if(j.name==h)break;if(j.type!=CKEDITOR.NODE_ELEMENT){j.writeHtml(c,a);return}h=j.name;if(!h){for(var h=0,l=this.children.length;h<l;h++)this.children[h].parent=j.parent;this.writeChildrenHtml.call(j,
c,k?null:a);return}}f=j.attributes}c.openTag(h,f);for(var l=[],m=0;m<2;m++)for(d in f){g=d;e=f[d];if(m==1)l.push([d,e]);else if(a){for(;;)if(g=a.onAttributeName(d))if(g!=d){delete f[d];d=g}else break;else{delete f[d];break}g&&((e=a.onAttribute(j,g,e))===false?delete f[g]:f[g]=e)}}c.sortAttributes&&l.sort(b);f=l.length;for(m=0;m<f;m++){d=l[m];c.attribute(d[0],d[1])}c.openTagClose(h,j.isEmpty);if(!j.isEmpty){this.writeChildrenHtml.call(j,c,k?null:a);c.closeTag(h)}},writeChildrenHtml:function(b,a){CKEDITOR.htmlParser.fragment.prototype.writeChildrenHtml.apply(this,
arguments)}}}(),function(){var b={};CKEDITOR.template=function(c){if(b[c])this.output=b[c];else{var a=c.replace(/'/g,"\\'").replace(/{([^}]+)}/g,function(a,b){return"',data['"+b+"']==undefined?'{"+b+"}':data['"+b+"'],'"});this.output=b[c]=Function("data","buffer","return buffer?buffer.push('"+a+"'):['"+a+"'].join('');")}}}(),delete CKEDITOR.loadFullCore,CKEDITOR.instances={},CKEDITOR.document=new CKEDITOR.dom.document(document),CKEDITOR.add=function(b){CKEDITOR.instances[b.name]=b;b.on("focus",function(){if(CKEDITOR.currentInstance!=
b){CKEDITOR.currentInstance=b;CKEDITOR.fire("currentInstance")}});b.on("blur",function(){if(CKEDITOR.currentInstance==b){CKEDITOR.currentInstance=null;CKEDITOR.fire("currentInstance")}});CKEDITOR.fire("instance",null,b)},CKEDITOR.remove=function(b){delete CKEDITOR.instances[b.name]},function(){var b={};CKEDITOR.addTemplate=function(c,a){var f=b[c];if(f)return f;f={name:c,source:a};CKEDITOR.fire("template",f);return b[c]=new CKEDITOR.template(f.source)};CKEDITOR.getTemplate=function(c){return b[c]}}(),
function(){var b=[];CKEDITOR.addCss=function(c){b.push(c)};CKEDITOR.getCss=function(){return b.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(b,c){if(!CKEDITOR.env.isCompatible)return null;b=CKEDITOR.dom.element.get(b);if(b.getEditor())throw'The editor instance "'+b.getEditor().name+'" is already attached to the provided element.';
var a=new CKEDITOR.editor(c,b,CKEDITOR.ELEMENT_MODE_INLINE);a.setData(b.getHtml(),null,true);a.on("loaded",function(){a.fire("uiReady");a.editable(b);a.container=b;a.setData(a.getData(1));a.fire("contentDom");a.mode="wysiwyg";a.fire("mode");a.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,a);a.resetDirty()},null,null,1E4);a.on("destroy",function(){a.element.clearCustomData();delete a.element});return a};CKEDITOR.inlineAll=function(){var b,c,a;for(a in CKEDITOR.dtd.$editable)for(var f=
CKEDITOR.document.getElementsByTag(a),j=0,h=f.count();j<h;j++){b=f.getItem(j);if(b.getAttribute("contenteditable")=="true"){c={element:b,config:{}};CKEDITOR.fire("inline",c)!==false&&CKEDITOR.inline(b,c.config)}}};CKEDITOR.domReady(function(){!CKEDITOR.disableAutoInline&&CKEDITOR.inlineAll()})}(),CKEDITOR.replaceClass="ckeditor",function(){function b(b,d,g,e){if(!CKEDITOR.env.isCompatible)return null;b=CKEDITOR.dom.element.get(b);if(b.getEditor())throw'The editor instance "'+b.getEditor().name+'" is already attached to the provided element.';
var k=new CKEDITOR.editor(d,b,e);e==CKEDITOR.ELEMENT_MODE_REPLACE&&b.setStyle("visibility","hidden");g&&k.setData(g,null,true);k.on("loaded",function(){a(k);e==CKEDITOR.ELEMENT_MODE_REPLACE&&k.config.autoUpdateElement&&f(k);k.setMode(k.config.startupMode,function(){k.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,k);k.resetDirty()})});k.on("destroy",c);return k}function c(){var a=this.container,b=this.element;if(a){a.clearCustomData();a.remove()}if(b){b.clearCustomData();this.elementMode==
CKEDITOR.ELEMENT_MODE_REPLACE&&b.show();delete this.element}}function a(a){var b=a.name,c=a.element,e=a.elementMode,f=a.fire("uiSpace",{space:"top",html:""}).html,l=a.fireOnce("uiSpace",{space:"bottom",html:""}).html,m=a.config.height;isNaN(m)||(m=m+"px");var o="",n=a.config.width;isNaN(n)||(o=o+("width:"+n+"px;"));j||(j=CKEDITOR.addTemplate("maincontainer",'<span id="cke_{name}" class="{id} cke cke_reset cke_chrome cke_editor_{name} cke_{langDir} '+CKEDITOR.env.cssClass+'" dir="{langDir}" lang="{langCode}" role="application" aria-labelledby="cke_{name}_arialbl" {style}><span id="cke_{name}_arialbl" class="cke_voice_label">{voiceLabel}</span><span class="cke_inner cke_reset" role="presentation"><span id="{topId}" class="cke_top cke_reset_all" role="presentation" style="height:auto">{topHtml}</span><span id="{contentId}" class="cke_contents cke_reset" role="presentation" style="height:{height}"></span><span id="{bottomId}" class="cke_bottom cke_reset_all" role="presentation">{bottomHtml}</span></span></span>'));
b=CKEDITOR.dom.element.createFromHtml(j.output({id:a.id,name:b,langDir:a.lang.dir,langCode:a.langCode,voiceLabel:a.lang.editor,style:o?' style="'+o+'"':"",height:m,topId:a.ui.spaceId("top"),topHtml:f||"",contentId:a.ui.spaceId("contents"),bottomId:a.ui.spaceId("bottom"),bottomHtml:l||""}));if(e==CKEDITOR.ELEMENT_MODE_REPLACE){c.hide();b.insertAfter(c)}else c.append(b);a.container=b;a.ui.space("top").unselectable();a.ui.space("bottom").unselectable();b.disableContextMenu();CKEDITOR.env.webkit&&b.on("focus",
function(){a.focus()});a.fireOnce("uiReady")}function f(a){var b=a.element;if(a.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&b.is("textarea")){var c=b.$.form&&new CKEDITOR.dom.element(b.$.form);if(c){var e=function(){a.updateElement()};c.on("submit",e);if(!c.$.submit.nodeName&&!c.$.submit.length)c.$.submit=CKEDITOR.tools.override(c.$.submit,function(b){return function(){a.updateElement();b.apply?b.apply(this,arguments):b()}});a.on("destroy",function(){c.removeListener("submit",e)})}}}CKEDITOR.replace=
function(a,d){return b(a,d,null,CKEDITOR.ELEMENT_MODE_REPLACE)};CKEDITOR.appendTo=function(a,d,c){return b(a,d,c,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var a=document.getElementsByTagName("textarea"),b=0;b<a.length;b++){var c=null,e=a[b];if(e.name||e.id){if(typeof arguments[0]=="string"){if(!RegExp("(?:^|\\s)"+arguments[0]+"(?:$|\\s)").test(e.className))continue}else if(typeof arguments[0]=="function"){c={};if(arguments[0](e,c)===false)continue}this.replace(e,c)}}};CKEDITOR.editor.prototype.addMode=
function(a,b){(this._.modes||(this._.modes={}))[a]=b};CKEDITOR.editor.prototype.setMode=function(a,b){var c=this,e=this._.modes;if(!(a==c.mode||!e||!e[a])){c.fire("beforeSetMode",a);if(c.mode){var f=c.checkDirty();c._.previousMode=c.mode;c.fire("beforeModeUnload");c.editable(0);c.mode=""}this._.modes[a](function(){c.mode=a;if(f!==void 0){c.mayBeDirty=true;!f&&c.resetDirty()}setTimeout(function(){c.fire("mode");b&&b.call(c)},0)})}};CKEDITOR.editor.prototype.resize=function(a,b,c,e){var f=this.container,
l=this.ui.space("contents"),j=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement,e=e?f.getChild(1):f;e.setSize("width",a,true);j&&(j.style.width="1%");l.setStyle("height",Math.max(b-(c?0:(e.$.offsetHeight||0)-(l.$.clientHeight||0)),0)+"px");j&&(j.style.width="100%");this.fire("resize")};CKEDITOR.editor.prototype.getResizable=function(a){return a?this.ui.space("contents"):this.container};var j;CKEDITOR.domReady(function(){CKEDITOR.replaceClass&&CKEDITOR.replaceAll(CKEDITOR.replaceClass)})}(),
CKEDITOR.config.startupMode="wysiwyg",function(){function b(b){var c=b.editor,d=c.editable(),e=b.data.path,f=e.blockLimit,g=b.data.selection.getRanges()[0],h=c.config.enterMode;if(CKEDITOR.env.gecko){var j=e.block||e.blockLimit||e.root,q=j&&j.getLast(a);j&&(j.isBlockBoundary()&&(!q||!(q.type==CKEDITOR.NODE_ELEMENT&&q.isBlockBoundary()))&&!j.is("pre")&&!j.getBogus())&&j.appendBogus()}if(c.config.autoParagraph!==false&&h!=CKEDITOR.ENTER_BR&&g.collapsed&&d.equals(f)&&!e.block){d=g.clone();d.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);
e=new CKEDITOR.dom.walker(d);e.guard=function(b){return!a(b)||b.type==CKEDITOR.NODE_COMMENT||b.isReadOnly()};if(!e.checkForward()||d.checkStartOfBlock()&&d.checkEndOfBlock()){c=g.fixBlock(true,c.config.enterMode==CKEDITOR.ENTER_DIV?"div":"p");if(CKEDITOR.env.ie)(c=c.getFirst(a))&&(c.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(c.getText()).match(/^(?: |\xa0)$/))&&c.remove();g.select();b.cancel()}}}function c(a){var b=a.data.getTarget();if(b.is("input")){b=b.getAttribute("type");(b=="submit"||
b=="reset")&&a.data.preventDefault()}}function a(a){return d(a)&&g(a)}function f(a,b){return function(c){var d=CKEDITOR.dom.element.get(c.data.$.toElement||c.data.$.fromElement||c.data.$.relatedTarget);(!d||!b.equals(d)&&!b.contains(d))&&a.call(this,c)}}function j(b){var c,d=b.getRanges()[0],b=b.root,e=d.startPath(),f={table:1,ul:1,ol:1,dl:1},g=CKEDITOR.dom.walker.bogus();if(e.contains(f)){var h=d.clone();h.collapse(1);h.setStartAt(b,CKEDITOR.POSITION_AFTER_START);h=new CKEDITOR.dom.walker(h);e=function(b,
d){return function(b,e){e&&(b.type==CKEDITOR.NODE_ELEMENT&&b.is(f))&&(c=b);if(a(b)&&!e&&(!d||!g(b)))return false}};h.guard=e(h);h.checkBackward();if(c){h=d.clone();h.collapse();h.setEndAt(b,CKEDITOR.POSITION_BEFORE_END);h=new CKEDITOR.dom.walker(h);h.guard=e(h,1);c=0;h.checkForward();return c}}return null}CKEDITOR.editable=CKEDITOR.tools.createClass({base:CKEDITOR.dom.element,$:function(a,b){this.base(b.$||b);this.editor=a;this.hasFocus=false;this.setup()},proto:{focus:function(){this.$[CKEDITOR.env.ie&&
this.getDocument().equals(CKEDITOR.document)?"setActive":"focus"]();CKEDITOR.env.safari&&!this.isInline()&&(CKEDITOR.document.getActive().equals(this.getWindow().getFrame())||this.getWindow().focus())},on:function(a,b){var c=Array.prototype.slice.call(arguments,0);if(CKEDITOR.env.ie&&/^focus|blur$/.exec(a)){a=a=="focus"?"focusin":"focusout";b=f(b,this);c[0]=a;c[1]=b}return CKEDITOR.dom.element.prototype.on.apply(this,c)},attachListener:function(a,b,c,d,e,f){!this._.listeners&&(this._.listeners=[]);
var g=Array.prototype.slice.call(arguments,1);this._.listeners.push(a.on.apply(a,g))},clearListeners:function(){var a=this._.listeners;try{for(;a.length;)a.pop().removeListener()}catch(b){}},restoreAttrs:function(){var a=this._.attrChanges,b,c;for(c in a)if(a.hasOwnProperty(c)){b=a[c];b!==null?this.setAttribute(c,b):this.removeAttribute(c)}},attachClass:function(a){var b=this.getCustomData("classes");if(!this.hasClass(a)){!b&&(b=[]);b.push(a);this.setCustomData("classes",b);this.addClass(a)}},changeAttr:function(a,
b){var c=this.getAttribute(a);if(b!==c){!this._.attrChanges&&(this._.attrChanges={});a in this._.attrChanges||(this._.attrChanges[a]=c);this.setAttribute(a,b)}},insertHtml:function(a,b){e(this,b=="text"?"text":"html",a)},insertText:function(a){var b=this.editor,c=b.getSelection().getStartElement().hasAscendant("pre",true)?CKEDITOR.ENTER_BR:b.config.enterMode,b=c==CKEDITOR.ENTER_BR,d=CKEDITOR.tools,a=d.htmlEncode(a.replace(/\r\n/g,"\n")),a=a.replace(/\t/g," "),c=c==CKEDITOR.ENTER_P?
"p":"div";if(!b){var f=/\n{2}/g;if(f.test(a))var g="<"+c+">",h="</"+c+">",a=g+a.replace(f,function(){return h+g})+h}a=a.replace(/\n/g,"<br>");b||(a=a.replace(RegExp("<br>(?=</"+c+">)"),function(a){return d.repeat(a,2)}));a=a.replace(/^ | $/g," ");a=a.replace(/(>|\s) /g,function(a,b){return b+" "}).replace(/ (?=<)/g," ");e(this,"text",a)},insertElement:function(b){this.editor.focus();this.editor.fire("saveSnapshot");for(var c=this.editor,d=c.config.enterMode,e=c.getSelection(),f=e.getRanges(),
g=b.getName(),h=CKEDITOR.dtd.$block[g],j,q,w,B=f.length-1;B>=0;B--){j=f[B];if(!j.checkReadOnly()){j.deleteContents(1);q=!B&&b||b.clone(1);var z,r;if(h)for(;(z=j.getCommonAncestor(0,1))&&(r=CKEDITOR.dtd[z.getName()])&&(!r||!r[g]);)if(z.getName()in CKEDITOR.dtd.span)j.splitElement(z);else if(j.checkStartOfBlock()&&j.checkEndOfBlock()){j.setStartBefore(z);j.collapse(true);z.remove()}else j.splitBlock(d==CKEDITOR.ENTER_DIV?"div":"p",c.editable());j.insertNode(q);w||(w=q)}}if(w){j.moveToPosition(w,CKEDITOR.POSITION_AFTER_END);
if(h)if((b=w.getNext(a))&&b.type==CKEDITOR.NODE_ELEMENT&&b.is(CKEDITOR.dtd.$block))b.getDtd()["#"]?j.moveToElementEditStart(b):j.moveToElementEditEnd(w);else if(!b&&d!=CKEDITOR.ENTER_BR){b=j.fixBlock(true,d==CKEDITOR.ENTER_DIV?"div":"p");j.moveToElementEditStart(b)}}e.selectRanges([j]);setTimeout(function(){c.fire("saveSnapshot")},0)},setData:function(a,b){!b&&this.editor.dataProcessor&&(a=this.editor.dataProcessor.toHtml(a));this.setHtml(a);this.editor.fire("dataReady")},getData:function(a){var b=
this.getHtml();!a&&this.editor.dataProcessor&&(b=this.editor.dataProcessor.toDataFormat(b));return b},setReadOnly:function(a){this.setAttribute("contenteditable",!a)},detach:function(){this.removeClass("cke_editable");var a=this.editor;this._.detach();delete a.document;delete a.window},isInline:function(){return this.getDocument().equals(CKEDITOR.document)},setup:function(){var a=this.editor;this.attachListener(a,"beforeGetData",function(){var b=this.getData();this.is("textarea")||a.config.ignoreEmptyParagraph!==
false&&(b=b.replace(h,function(a,b){return b}));a.setData(b,null,1)},this);this.attachListener(a,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(a,"afterSetData",function(){this.setData(a.getData(1))},this);this.attachListener(a,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(a,"beforeFocus",function(){var b=a.getSelection();(b=b&&b.getNative())&&b.type=="Control"||this.focus()},this);this.attachListener(a,"insertHtml",function(a){this.insertHtml(a.data.dataValue,
a.data.mode)},this);this.attachListener(a,"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(a,"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(a.readOnly);this.attachClass("cke_editable");this.attachClass(a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"cke_editable_inline":a.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE||a.elementMode==CKEDITOR.ELEMENT_MODE_APPENDTO?"cke_editable_themed":"");this.attachClass("cke_contents_"+a.config.contentsLangDirection);
a.keystrokeHandler.blockedKeystrokes[8]=a.readOnly;a.keystrokeHandler.attach(this);this.on("blur",function(a){CKEDITOR.env.opera&&CKEDITOR.document.getActive().equals(this.isInline()?this:this.getWindow().getFrame())?a.cancel():this.hasFocus=false},null,null,-1);this.on("focus",function(){this.hasFocus=true},null,null,-1);a.focusManager.add(this);if(this.equals(CKEDITOR.document.getActive())){this.hasFocus=true;a.once("contentDom",function(){a.focusManager.focus()})}if(!this.is("textarea")){a.document=
this.getDocument();a.window=this.getWindow();var b=a.document;this.changeAttr("spellcheck",!a.config.disableNativeSpellChecker);var e=a.config.contentsLangDirection;this.getDirection(1)!=e&&this.changeAttr("dir",e);a.document.equals(CKEDITOR.document)&&this.changeAttr("tabindex",a.tabIndex);var f=CKEDITOR.getCss();if(f){e=b.getHead();if(!e.getCustomData("stylesheet")){f=b.appendStyleText(f);f=new CKEDITOR.dom.element(f.ownerNode||f.owningElement);e.setCustomData("stylesheet",f);f.data("cke-temp",
1)}}e=b.getCustomData("stylesheet_ref")||0;b.setCustomData("stylesheet_ref",e+1);this.attachListener(this,"click",function(a){var a=a.data,b=a.getTarget();b.is("a")&&(a.$.button!=2&&b.isReadOnly())&&a.preventDefault()});this.attachListener(a,"key",function(b){if(a.readOnly)return false;var c=b.data.keyCode,e;if(c in{8:1,46:1}){var f=a.getSelection(),b=f.getRanges()[0],g=b.startPath(),h,l,m,c=c==8;if(f=j(f)){a.fire("saveSnapshot");b.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START);f.remove();b.select();
a.fire("saveSnapshot");e=1}else if(b.collapsed)if((h=g.block)&&b[c?"checkStartOfBlock":"checkEndOfBlock"]()&&(m=h[c?"getPrevious":"getNext"](d))&&m.is("table")){a.fire("saveSnapshot");b[c?"checkEndOfBlock":"checkStartOfBlock"]()&&h.remove();b["moveToElementEdit"+(c?"End":"Start")](m);b.select();a.fire("saveSnapshot");e=1}else if(g.blockLimit&&g.blockLimit.is("td")&&(l=g.blockLimit.getAscendant("table"))&&b.checkBoundaryOfElement(l,c?CKEDITOR.START:CKEDITOR.END)&&(m=l[c?"getPrevious":"getNext"](d))){a.fire("saveSnapshot");
b["moveToElementEdit"+(c?"End":"Start")](m);b.checkStartOfBlock()&&b.checkEndOfBlock()?m.remove():b.select();a.fire("saveSnapshot");e=1}else if((l=g.contains(["td","th","caption"]))&&b.checkBoundaryOfElement(l,c?CKEDITOR.START:CKEDITOR.END))if((m=l[c?"getPreviousSourceNode":"getNextSourceNode"](1,CKEDITOR.NODE_ELEMENT))&&!m.isReadOnly()&&b.root.contains(m)){b[c?"moveToElementEditEnd":"moveToElementEditStart"](m);b.select();e=1}}return!e});CKEDITOR.env.ie&&this.attachListener(this,"click",c);!CKEDITOR.env.ie&&
!CKEDITOR.env.opera&&this.attachListener(this,"mousedown",function(b){b=b.data.getTarget();b.is("img","hr","input","textarea","select")&&a.getSelection().selectElement(b)});CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(b){if(b.data.$.button==2){b=b.data.getTarget();if(!b.getOuterHtml().replace(h,"")){var c=a.createRange();c.moveToElementEditStart(b);c.select(true)}}});if(CKEDITOR.env.webkit){this.attachListener(this,"click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()});
this.attachListener(this,"mouseup",function(a){a.data.getTarget().is("input","textarea")&&a.data.preventDefault()})}}}},_:{detach:function(){this.editor.setData(this.editor.getData(),0,1);this.clearListeners();this.restoreAttrs();var a;if(a=this.removeCustomData("classes"))for(;a.length;)this.removeClass(a.pop());a=this.getDocument();var b=a.getHead();if(b.getCustomData("stylesheet")){var c=a.getCustomData("stylesheet_ref");if(--c)a.setCustomData("stylesheet_ref",c);else{a.removeCustomData("stylesheet_ref");
b.removeCustomData("stylesheet").remove()}}delete this.editor}}});CKEDITOR.editor.prototype.editable=function(a){var b=this._.editable;if(b&&a)return 0;if(arguments.length)b=this._.editable=a?a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(b&&b.detach(),null);return b};var h=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,d=CKEDITOR.dom.walker.whitespaces(true),g=CKEDITOR.dom.walker.bookmark(false,true);
CKEDITOR.on("instanceLoaded",function(a){var c=a.editor;c.on("insertElement",function(a){a=a.data;if(a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")||a.is("textarea"))){a.getAttribute("contentEditable")!="false"&&a.data("cke-editable",a.hasAttribute("contenteditable")?"true":"1");a.setAttribute("contentEditable",false)}});c.on("selectionChange",function(a){if(!c.readOnly){var d=c.getSelection();if(d&&!d.isLocked){d=c.checkDirty();c.fire("lockSnapshot");b(a);c.fire("unlockSnapshot");!d&&c.resetDirty()}}})});
CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");var e=function(){function b(a){var c=a.editor;c.getSelection().scrollIntoView();setTimeout(function(){c.fire("saveSnapshot")},0)}function c(a){return a.type==CKEDITOR.NODE_ELEMENT}function d(a,b){var e,f,g,h,k=[],p=b.range.startContainer;e=b.range.startPath();for(var p=j[p.getName()],n=0,o=a.getChildren(),s=o.count(),q=-1,I=-1,w=0,B=e.contains(j.$list);n<s;++n){e=o.getItem(n);
if(c(e)){g=e.getName();if(B&&g in CKEDITOR.dtd.$list)k=k.concat(d(e,b));else{h=!!p[g];if(g=="br"&&e.data("cke-eol")&&(!n||n==s-1)){w=(f=n?k[n-1].node:o.getItem(n+1))&&(!c(f)||!f.is("br"));f=f&&c(f)&&j.$block[f.getName()]}q==-1&&!h&&(q=n);h||(I=n);k.push({isElement:1,isLineBreak:w,isBlock:e.isBlockBoundary(),hasBlockSibling:f,node:e,name:g,allowed:h});f=w=0}}else k.push({isElement:0,node:e,allowed:1})}if(q>-1)k[q].firstNotAllowed=1;if(I>-1)k[I].lastNotAllowed=1;return k}function e(a,b){var d=[],f=
a.getChildren(),g=f.count(),k,h=0,m=j[b],p=!a.is(j.$inline)||a.is("br");for(p&&d.push(" ");h<g;h++){k=f.getItem(h);c(k)&&!k.is(m)?d=d.concat(e(k,b)):d.push(k)}p&&d.push(" ");return d}function f(a){return a&&c(a)&&(a.is(j.$removeEmpty)||a.is("a")&&!a.isBlockBoundary())}function g(a,b,d,e){var f=a.clone(),k,h;f.setEndAt(b,CKEDITOR.POSITION_BEFORE_END);if((k=(new CKEDITOR.dom.walker(f)).next())&&c(k)&&q[k.getName()]&&(h=k.getPrevious())&&c(h)&&!h.getParent().equals(a.startContainer)&&d.contains(h)&&
e.contains(k)&&k.isIdentical(h)){k.moveChildren(h);k.remove();g(a,b,d,e)}}function h(a,b){function d(a,b){if(b.isBlock&&b.isElement&&!b.node.is("br")&&c(a)&&a.is("br")){a.remove();return 1}}var e=b.endContainer.getChild(b.endOffset),f=b.endContainer.getChild(b.endOffset-1);e&&d(e,a[a.length-1]);if(f&&d(f,a[0])){b.setEnd(b.endContainer,b.endOffset-1);b.collapse()}}var j=CKEDITOR.dtd,q={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,li:1,pre:1,dl:1,blockquote:1},w={p:1,div:1,h1:1,h2:1,h3:1,h4:1,
h5:1,h6:1},B=CKEDITOR.tools.extend({},j.$inline);delete B.br;return function(q,r,v){q.editor.focus();q.editor.fire("saveSnapshot");var t=q.editor;q.getDocument();var x=t.getSelection().getRanges()[0];if(!x.checkReadOnly()){var C=(new CKEDITOR.dom.elementPath(x.startContainer,x.root)).blockLimit||x.root,r={type:r,editable:q,editor:t,range:x,blockLimit:C,mergeCandidates:[],zombies:[]},t=r.range,C=r.mergeCandidates,y,A,G,D,E;if(r.type=="text"&&t.shrink(CKEDITOR.SHRINK_ELEMENT,true,false)){A=CKEDITOR.dom.element.createFromHtml("<span> </span>",
t.document);t.insertNode(A);t.setStartAfter(A)}G=new CKEDITOR.dom.elementPath(t.startContainer);r.endPath=D=new CKEDITOR.dom.elementPath(t.endContainer);if(!t.collapsed){y=D.block||D.blockLimit;var M=t.getCommonAncestor();y&&(!y.equals(M)&&!y.contains(M)&&t.checkEndOfBlock())&&r.zombies.push(y);t.deleteContents()}for(;(E=c(t.startContainer)&&t.startContainer.getChild(t.startOffset-1))&&c(E)&&E.isBlockBoundary()&&G.contains(E);)t.moveToPosition(E,CKEDITOR.POSITION_BEFORE_END);g(t,r.blockLimit,G,D);
if(A){t.setEndBefore(A);t.collapse();A.remove()}A=t.startPath();if(y=A.contains(f,false,1)){t.splitElement(y);r.inlineStylesRoot=y;r.inlineStylesPeak=A.lastElement}A=t.createBookmark();(y=A.startNode.getPrevious(a))&&c(y)&&f(y)&&C.push(y);(y=A.startNode.getNext(a))&&c(y)&&f(y)&&C.push(y);for(y=A.startNode;(y=y.getParent())&&f(y);)C.push(y);t.moveToBookmark(A);if(v){E=v;v=r.range;if(r.type=="text"&&r.inlineStylesRoot){A=E;E=r.inlineStylesPeak;t=E.getDocument().createText("{cke-peak}");for(C=r.inlineStylesRoot.getParent();!E.equals(C);){t=
t.appendTo(E.clone());E=E.getParent()}E=t.getOuterHtml().replace("{cke-peak}",A)}A=r.blockLimit.getName();if(/^\s+|\s+$/.test(E)&&"span"in CKEDITOR.dtd[A]){var I='<span data-cke-marker="1"> </span>';E=I+E+I}E=r.editor.dataProcessor.toHtml(E,null,false);A=v.document.createElement("body");A.setHtml(E);if(I){A.getFirst().remove();A.getLast().remove()}if((I=v.startPath().block)&&!(I.getChildCount()==1&&I.getBogus()))a:{var H;if(A.getChildCount()==1&&c(H=A.getFirst())&&H.is(w)){I=H.getElementsByTag("*");
v=0;for(t=I.count();v<t;v++){E=I.getItem(v);if(!E.is(B))break a}H.moveChildren(H.getParent(1));H.remove()}}r.dataWrapper=A;H=r.range;var I=H.document,F,v=r.blockLimit;A=0;var K;E=[];var J,N,C=t=0,L,R;G=H.startContainer;y=r.endPath.elements[0];var P;D=y.getPosition(G);M=!!y.getCommonAncestor(G)&&D!=CKEDITOR.POSITION_IDENTICAL&&!(D&CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED);G=d(r.dataWrapper,r);for(h(G,H);A<G.length;A++){D=G[A];if(F=D.isLineBreak){F=H;L=v;var O=void 0,S=void 0;if(D.hasBlockSibling)F=
1;else{O=F.startContainer.getAscendant(j.$block,1);if(!O||!O.is({div:1,p:1}))F=0;else{S=O.getPosition(L);if(S==CKEDITOR.POSITION_IDENTICAL||S==CKEDITOR.POSITION_CONTAINS)F=0;else{L=F.splitElement(O);F.moveToPosition(L,CKEDITOR.POSITION_AFTER_START);F=1}}}}if(F)C=A>0;else{F=H.startPath();if(!D.isBlock&&(N=r.editor.config.enterMode!=CKEDITOR.ENTER_BR&&r.editor.config.autoParagraph!==false?r.editor.config.enterMode==CKEDITOR.ENTER_DIV?"div":"p":false)&&!F.block&&F.blockLimit&&F.blockLimit.equals(H.root)){N=
I.createElement(N);!CKEDITOR.env.ie&&N.appendBogus();H.insertNode(N);!CKEDITOR.env.ie&&(K=N.getBogus())&&K.remove();H.moveToPosition(N,CKEDITOR.POSITION_BEFORE_END)}if((F=H.startPath().block)&&!F.equals(J)){if(K=F.getBogus()){K.remove();E.push(F)}J=F}D.firstNotAllowed&&(t=1);if(t&&D.isElement){F=H.startContainer;for(L=null;F&&!j[F.getName()][D.name];){if(F.equals(v)){F=null;break}L=F;F=F.getParent()}if(F){if(L){R=H.splitElement(L);r.zombies.push(R);r.zombies.push(L)}}else{L=v.getName();P=!A;F=A==
G.length-1;L=e(D.node,L);for(var O=[],S=L.length,Q=0,V=void 0,W=0,X=-1;Q<S;Q++){V=L[Q];if(V==" "){if(!W&&(!P||Q)){O.push(new CKEDITOR.dom.text(" "));X=O.length}W=1}else{O.push(V);W=0}}F&&X==O.length&&O.pop();P=O}}if(P){for(;F=P.pop();)H.insertNode(F);P=0}else H.insertNode(D.node);if(D.lastNotAllowed&&A<G.length-1){(R=M?y:R)&&H.setEndAt(R,CKEDITOR.POSITION_AFTER_START);t=0}H.collapse()}}r.dontMoveCaret=C;r.bogusNeededBlocks=E}K=r.range;var T;R=r.bogusNeededBlocks;for(P=K.createBookmark();J=r.zombies.pop();)if(J.getParent()){N=
K.clone();N.moveToElementEditStart(J);N.removeEmptyBlocksAtEnd()}if(R)for(;J=R.pop();)J.append(CKEDITOR.env.ie?K.document.createText(" "):K.document.createElement("br"));for(;J=r.mergeCandidates.pop();)J.mergeSiblings();K.moveToBookmark(P);if(!r.dontMoveCaret){for(J=c(K.startContainer)&&K.startContainer.getChild(K.startOffset-1);J&&c(J)&&!J.is(j.$empty);){if(J.isBlockBoundary())K.moveToPosition(J,CKEDITOR.POSITION_BEFORE_END);else{if(f(J)&&J.getHtml().match(/(\s| )$/g)){T=null;break}T=K.clone();
T.moveToPosition(J,CKEDITOR.POSITION_BEFORE_END)}J=J.getLast(a)}T&&K.moveToRange(T)}x.select();b(q)}}}()}(),function(){function b(){var a=this.getSelection(1);if(a.getType()!=CKEDITOR.SELECTION_NONE){this.fire("selectionCheck",a);var b=this.elementPath();if(!b.compare(this._.selectionPreviousPath)){this._.selectionPreviousPath=b;this.fire("selectionChange",{selection:a,path:b})}}}function c(){g=true;if(!d){a.call(this);d=CKEDITOR.tools.setTimeout(a,200,this)}}function a(){d=null;if(g){CKEDITOR.tools.setTimeout(b,
0,this);g=false}}function f(a){function b(c,d){return!c||c.type==CKEDITOR.NODE_TEXT?false:a.clone()["moveToElementEdit"+(d?"End":"Start")](c)}if(!(a.root instanceof CKEDITOR.editable))return false;var c=a.startContainer,d=a.getPreviousNode(e,null,c),f=a.getNextNode(e,null,c);return b(d)||b(f,1)||!d&&!f&&!(c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()&&c.getBogus())?true:false}function j(a){return a.getCustomData("cke-fillingChar")}function h(a,b){var c=a&&a.removeCustomData("cke-fillingChar");
if(c){if(b!==false){var d,e=a.getDocument().getSelection().getNative(),f=e&&e.type!="None"&&e.getRangeAt(0);if(c.getLength()>1&&f&&f.intersectsNode(c.$)){d=[e.anchorOffset,e.focusOffset];f=e.focusNode==c.$&&e.focusOffset>0;e.anchorNode==c.$&&e.anchorOffset>0&&d[0]--;f&&d[1]--;var g;f=e;if(!f.isCollapsed){g=f.getRangeAt(0);g.setStart(f.anchorNode,f.anchorOffset);g.setEnd(f.focusNode,f.focusOffset);g=g.collapsed}g&&d.unshift(d.pop())}}c.setText(c.getText().replace(/\u200B/g,""));if(d){c=e.getRangeAt(0);
c.setStart(c.startContainer,d[0]);c.setEnd(c.startContainer,d[1]);e.removeAllRanges();e.addRange(c)}}}var d,g,e=CKEDITOR.dom.walker.invisible(1);CKEDITOR.on("instanceCreated",function(a){function d(){var a=e.getSelection();a&&a.removeAllRanges()}var e=a.editor;e.define("selectionChange",{errorProof:1});e.on("contentDom",function(){var a=e.document,d=CKEDITOR.document,f=e.editable(),g=a.getBody(),k=a.getDocumentElement(),j=f.isInline();if(CKEDITOR.env.ie||CKEDITOR.env.opera||j){var l;f.attachListener(f,
"focus",function(){e.unlockSelection(l);l=0},null,null,-1);var m,r=function(){m=e.getSelection(1);m.lock()};CKEDITOR.env.ie?f.attachListener(f,"beforedeactivate",r,null,null,-1):f.attachListener(e,"selectionCheck",r,null,null,-1);f.attachListener(f,"blur",function(){e.lockSelection(m);l=1},null,null,-1);f.attachListener(f,"mousedown",function(){l=0})}if(CKEDITOR.env.ie&&!j){var v;f.attachListener(f,"mousedown",function(a){a.data.$.button==2&&e.document.$.selection.type=="None"&&(v=e.window.getScrollPosition())});
f.attachListener(f,"mouseup",function(a){if(a.data.$.button==2&&v){e.document.$.documentElement.scrollLeft=v.x;e.document.$.documentElement.scrollTop=v.y}v=null});if(a.$.compatMode!="BackCompat"){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)k.on("mousedown",function(a){function b(a){a=a.data.$;if(e){var c=g.$.createTextRange();try{c.moveToPoint(a.x,a.y)}catch(d){}e.setEndPoint(h.compareEndPoints("StartToStart",c)<0?"EndToEnd":"StartToStart",c);e.select()}}function c(){k.removeListener("mousemove",
b);d.removeListener("mouseup",c);k.removeListener("mouseup",c);e.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y<k.$.clientHeight&&a.$.x<k.$.clientWidth){var e=g.$.createTextRange();try{e.moveToPoint(a.$.x,a.$.y)}catch(f){}var h=e.duplicate();k.on("mousemove",b);d.on("mouseup",c);k.on("mouseup",c)}});if(CKEDITOR.env.version>7){k.on("mousedown",function(a){if(a.data.getTarget().is("html")){d.on("mouseup",t);k.on("mouseup",t)}});var t=function(){d.removeListener("mouseup",t);k.removeListener("mouseup",
t);var b=CKEDITOR.document.$.selection,c=b.createRange();b.type!="None"&&c.parentElement().ownerDocument==a.$&&c.select()}}}}f.attachListener(f,"selectionchange",b,e);f.attachListener(f,"mouseup",c,e);f.attachListener(f,"keyup",c,e);f.attachListener(f,"focus",function(){e.forceNextSelectionCheck();e.selectionChange(1)});if(CKEDITOR.env.webkit)a.on("keydown",function(a){switch(a.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:h(e.editable())}},null,null,
-1)});e.on("contentDomUnload",e.forceNextSelectionCheck,e);e.on("dataReady",function(){e.selectionChange(1)});CKEDITOR.env.ie9Compat&&e.on("beforeDestroy",d,null,null,9);CKEDITOR.env.webkit&&e.on("setData",d)});CKEDITOR.on("instanceReady",function(a){var b=a.editor,c=b.editable();if(CKEDITOR.env.webkit){b.on("selectionChange",function(){var a=j(c);a&&(a.getCustomData("ready")?h(c):a.setCustomData("ready",1))},null,null,-1);b.on("beforeSetMode",function(){h(c)},null,null,-1);var d,e,a=function(){var a=
b.document,f=j(c);if(f){a=a.$.defaultView.getSelection();a.type=="Caret"&&a.anchorNode==f.$&&(e=1);d=f.getText();f.setText(d.replace(/\u200B/g,""))}},f=function(){var a=b.document,f=j(c);if(f){f.setText(d);if(e){a.$.defaultView.getSelection().setPosition(f.$,f.getLength());e=0}}};b.on("beforeUndoImage",a);b.on("afterUndoImage",f);b.on("beforeGetData",a,null,null,0);b.on("getData",f)}});CKEDITOR.editor.prototype.selectionChange=function(a){(a?b:c).call(this)};CKEDITOR.editor.prototype.getSelection=
function(a){if(this._.savedSelection&&!a)return this._.savedSelection;return(a=this.editable())?new CKEDITOR.dom.selection(a):null};CKEDITOR.editor.prototype.lockSelection=function(a){a=a||this.getSelection(1);if(a.getType()!=CKEDITOR.SELECTION_NONE){!a.isLocked&&a.lock();this._.savedSelection=a;return true}return false};CKEDITOR.editor.prototype.unlockSelection=function(a){var b=this._.savedSelection;if(b){b.unlock(a);delete this._.savedSelection;return true}return false};CKEDITOR.editor.prototype.forceNextSelectionCheck=
function(){delete this._.selectionPreviousPath};CKEDITOR.dom.document.prototype.getSelection=function(){return new CKEDITOR.dom.selection(this)};CKEDITOR.dom.range.prototype.select=function(){(this.root instanceof CKEDITOR.editable?this.root.editor.getSelection():new CKEDITOR.dom.selection(this.root)).selectRanges([this])};CKEDITOR.SELECTION_NONE=1;CKEDITOR.SELECTION_TEXT=2;CKEDITOR.SELECTION_ELEMENT=3;CKEDITOR.dom.selection=function(a){var b=a instanceof CKEDITOR.dom.element;this.document=a instanceof
CKEDITOR.dom.document?a:a.getDocument();this.root=b?a:this.document.getBody();this.isLocked=0;this._={cache:{}};if(CKEDITOR.env.webkit){a=this.document.getWindow().$.getSelection();if(a.type=="None"&&this.document.getActive().equals(this.root)||a.type=="Caret"&&a.anchorNode.nodeType==CKEDITOR.NODE_DOCUMENT){var c=new CKEDITOR.dom.range(this.root);c.moveToPosition(this.root,CKEDITOR.POSITION_AFTER_START);b=this.document.$.createRange();b.setStart(c.startContainer.$,c.startOffset);b.collapse(1);a.addRange(b)}}var a=
this.getNative(),d;if(a)if(a.getRangeAt)d=(c=a.rangeCount&&a.getRangeAt(0))&&new CKEDITOR.dom.node(c.commonAncestorContainer);else{try{c=a.createRange()}catch(e){}d=c&&CKEDITOR.dom.element.get(c.item&&c.item(0)||c.parentElement())}if(!d||!this.root.equals(d)&&!this.root.contains(d)){this._.cache.type=CKEDITOR.SELECTION_NONE;this._.cache.startElement=null;this._.cache.selectedElement=null;this._.cache.selectedText="";this._.cache.ranges=new CKEDITOR.dom.rangeList}return this};var k={img:1,hr:1,li:1,
table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1,select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1};CKEDITOR.dom.selection.prototype={getNative:function(){return this._.cache.nativeSel!==void 0?this._.cache.nativeSel:this._.cache.nativeSel=this.document.$.selection||this.document.getWindow().$.getSelection()},getType:CKEDITOR.env.ie?function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_NONE;try{var c=this.getNative(),d=c.type;if(d=="Text")b=CKEDITOR.SELECTION_TEXT;
if(d=="Control")b=CKEDITOR.SELECTION_ELEMENT;if(c.createRange().parentElement())b=CKEDITOR.SELECTION_TEXT}catch(e){}return a.type=b}:function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_TEXT,c=this.getNative();if(!c||!c.rangeCount)b=CKEDITOR.SELECTION_NONE;else if(c.rangeCount==1){var c=c.getRangeAt(0),d=c.startContainer;if(d==c.endContainer&&d.nodeType==1&&c.endOffset-c.startOffset==1&&k[d.childNodes[c.startOffset].nodeName.toLowerCase()])b=CKEDITOR.SELECTION_ELEMENT}return a.type=
b},getRanges:function(){var a=CKEDITOR.env.ie?function(){function a(b){return(new CKEDITOR.dom.node(b)).getIndex()}var b=function(b,c){b=b.duplicate();b.collapse(c);var d=b.parentElement(),e=d.ownerDocument;if(!d.hasChildNodes())return{container:d,offset:0};for(var f=d.children,g,k,h=b.duplicate(),j=0,l=f.length-1,o=-1,x,C;j<=l;){o=Math.floor((j+l)/2);g=f[o];h.moveToElementText(g);x=h.compareEndPoints("StartToStart",b);if(x>0)l=o-1;else if(x<0)j=o+1;else{if(CKEDITOR.env.ie9Compat&&g.tagName=="BR"){f=
e.defaultView.getSelection();return{container:f[c?"anchorNode":"focusNode"],offset:f[c?"anchorOffset":"focusOffset"]}}return{container:d,offset:a(g)}}}if(o==-1||o==f.length-1&&x<0){h.moveToElementText(d);h.setEndPoint("StartToStart",b);e=h.text.replace(/(\r\n|\r)/g,"\n").length;f=d.childNodes;if(!e){g=f[f.length-1];return g.nodeType!=CKEDITOR.NODE_TEXT?{container:d,offset:f.length}:{container:g,offset:g.nodeValue.length}}for(d=f.length;e>0&&d>0;){k=f[--d];if(k.nodeType==CKEDITOR.NODE_TEXT){C=k;e=
e-k.nodeValue.length}}return{container:C,offset:-e}}h.collapse(x>0?true:false);h.setEndPoint(x>0?"StartToStart":"EndToStart",b);e=h.text.replace(/(\r\n|\r)/g,"\n").length;if(!e)return{container:d,offset:a(g)+(x>0?0:1)};for(;e>0;)try{k=g[x>0?"previousSibling":"nextSibling"];if(k.nodeType==CKEDITOR.NODE_TEXT){e=e-k.nodeValue.length;C=k}g=k}catch(y){return{container:d,offset:a(g)}}return{container:C,offset:x>0?-e:C.nodeValue.length+e}};return function(){var a=this.getNative(),c=a&&a.createRange(),d=
this.getType();if(!a)return[];if(d==CKEDITOR.SELECTION_TEXT){a=new CKEDITOR.dom.range(this.root);d=b(c,true);a.setStart(new CKEDITOR.dom.node(d.container),d.offset);d=b(c);a.setEnd(new CKEDITOR.dom.node(d.container),d.offset);a.endContainer.getPosition(a.startContainer)&CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&&a.collapse();return[a]}if(d==CKEDITOR.SELECTION_ELEMENT){for(var d=[],e=0;e<c.length;e++){for(var f=c.item(e),g=f.parentNode,k=0,a=new CKEDITOR.dom.range(this.root);k<
g.childNodes.length&&g.childNodes[k]!=f;k++);a.setStart(new CKEDITOR.dom.node(g),k);a.setEnd(new CKEDITOR.dom.node(g),k+1);d.push(a)}return d}return[]}}():function(){var a=[],b,c=this.getNative();if(!c)return a;for(var d=0;d<c.rangeCount;d++){var e=c.getRangeAt(d);b=new CKEDITOR.dom.range(this.root);b.setStart(new CKEDITOR.dom.node(e.startContainer),e.startOffset);b.setEnd(new CKEDITOR.dom.node(e.endContainer),e.endOffset);a.push(b)}return a};return function(b){var c=this._.cache;if(c.ranges&&!b)return c.ranges;
if(!c.ranges)c.ranges=new CKEDITOR.dom.rangeList(a.call(this));if(b)for(var d=c.ranges,e=0;e<d.length;e++){var f=d[e];f.getCommonAncestor().isReadOnly()&&d.splice(e,1);if(!f.collapsed){if(f.startContainer.isReadOnly())for(var b=f.startContainer,g;b;){if((g=b.type==CKEDITOR.NODE_ELEMENT)&&b.is("body")||!b.isReadOnly())break;g&&b.getAttribute("contentEditable")=="false"&&f.setStartAfter(b);b=b.getParent()}b=f.startContainer;g=f.endContainer;var k=f.startOffset,h=f.endOffset,j=f.clone();b&&b.type==CKEDITOR.NODE_TEXT&&
(k>=b.getLength()?j.setStartAfter(b):j.setStartBefore(b));g&&g.type==CKEDITOR.NODE_TEXT&&(h?j.setEndAfter(g):j.setEndBefore(g));b=new CKEDITOR.dom.walker(j);b.evaluator=function(a){if(a.type==CKEDITOR.NODE_ELEMENT&&a.isReadOnly()){var b=f.clone();f.setEndBefore(a);f.collapsed&&d.splice(e--,1);if(!(a.getPosition(j.endContainer)&CKEDITOR.POSITION_CONTAINS)){b.setStartAfter(a);b.collapsed||d.splice(e+1,0,b)}return true}return false};b.next()}}return c.ranges}}(),getStartElement:function(){var a=this._.cache;
if(a.startElement!==void 0)return a.startElement;var b;switch(this.getType()){case CKEDITOR.SELECTION_ELEMENT:return this.getSelectedElement();case CKEDITOR.SELECTION_TEXT:var c=this.getRanges()[0];if(c){if(c.collapsed){b=c.startContainer;b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent())}else{for(c.optimize();;){b=c.startContainer;if(c.startOffset==(b.getChildCount?b.getChildCount():b.getLength())&&!b.isBlockBoundary())c.setStartAfter(b);else break}b=c.startContainer;if(b.type!=CKEDITOR.NODE_ELEMENT)return b.getParent();
b=b.getChild(c.startOffset);if(!b||b.type!=CKEDITOR.NODE_ELEMENT)b=c.startContainer;else for(c=b.getFirst();c&&c.type==CKEDITOR.NODE_ELEMENT;){b=c;c=c.getFirst()}}b=b.$}}return a.startElement=b?new CKEDITOR.dom.element(b):null},getSelectedElement:function(){var a=this._.cache;if(a.selectedElement!==void 0)return a.selectedElement;var b=this,c=CKEDITOR.tools.tryThese(function(){return b.getNative().createRange().item(0)},function(){for(var a=b.getRanges()[0],c,d,e=2;e&&(!(c=a.getEnclosedNode())||!(c.type==
CKEDITOR.NODE_ELEMENT&&k[c.getName()]&&(d=c)));e--)a.shrink(CKEDITOR.SHRINK_ELEMENT);return d.$});return a.selectedElement=c?new CKEDITOR.dom.element(c):null},getSelectedText:function(){var a=this._.cache;if(a.selectedText!==void 0)return a.selectedText;var b=this.getNative(),b=CKEDITOR.env.ie?b.type=="Control"?"":b.createRange().text:b.toString();return a.selectedText=b},lock:function(){this.getRanges();this.getStartElement();this.getSelectedElement();this.getSelectedText();this._.cache.nativeSel=
null;this.isLocked=1},unlock:function(a){if(this.isLocked){if(a)var b=this.getSelectedElement(),c=!b&&this.getRanges();this.isLocked=0;this.reset();if(a)(a=b||c[0].getCommonAncestor())&&a.getAscendant("body",1)&&(b?this.selectElement(b):this.selectRanges(c))}},reset:function(){this._.cache={}},selectElement:function(a){var b=new CKEDITOR.dom.range(this.root);b.setStartBefore(a);b.setEndAfter(a);this.selectRanges([b])},selectRanges:function(a){if(a.length)if(this.isLocked){var b=CKEDITOR.document.getActive();
this.unlock();this.selectRanges(a);this.lock();!b.equals(this.root)&&b.focus()}else{if(CKEDITOR.env.ie){var c=CKEDITOR.dom.walker.whitespaces(true),d=/\ufeff|\u00a0/,e={table:1,tbody:1,tr:1};if(a.length>1){b=a[a.length-1];a[0].setEnd(b.endContainer,b.endOffset)}var b=a[0],a=b.collapsed,g,j,q,w=b.getEnclosedNode();if(w&&w.type==CKEDITOR.NODE_ELEMENT&&w.getName()in k&&(!w.is("a")||!w.getText()))try{q=w.$.createControlRange();q.addElement(w.$);q.select();return}catch(B){}(b.startContainer.type==CKEDITOR.NODE_ELEMENT&&
b.startContainer.getName()in e||b.endContainer.type==CKEDITOR.NODE_ELEMENT&&b.endContainer.getName()in e)&&b.shrink(CKEDITOR.NODE_ELEMENT,true);q=b.createBookmark();var e=q.startNode,z;if(!a)z=q.endNode;q=b.document.$.body.createTextRange();q.moveToElementText(e.$);q.moveStart("character",1);if(z){d=b.document.$.body.createTextRange();d.moveToElementText(z.$);q.setEndPoint("EndToEnd",d);q.moveEnd("character",-1)}else{g=e.getNext(c);j=e.hasAscendant("pre");g=!(g&&g.getText&&g.getText().match(d))&&
(j||!e.hasPrevious()||e.getPrevious().is&&e.getPrevious().is("br"));j=b.document.createElement("span");j.setHtml("");j.insertBefore(e);g&&b.document.createText("").insertBefore(e)}b.setStartBefore(e);e.remove();if(a){if(g){q.moveStart("character",-1);q.select();b.document.$.selection.clear()}else q.select();b.moveToPosition(j,CKEDITOR.POSITION_BEFORE_START);j.remove()}else{b.setEndBefore(z);z.remove();q.select()}}else{z=this.getNative();if(!z)return;if(CKEDITOR.env.opera){b=this.document.$.createRange();
b.selectNodeContents(this.root.$);z.addRange(b)}z.removeAllRanges();for(d=0;d<a.length;d++){if(d<a.length-1){b=a[d];q=a[d+1];j=b.clone();j.setStart(b.endContainer,b.endOffset);j.setEnd(q.startContainer,q.startOffset);if(!j.collapsed){j.shrink(CKEDITOR.NODE_ELEMENT,true);g=j.getCommonAncestor();j=j.getEnclosedNode();if(g.isReadOnly()||j&&j.isReadOnly()){q.setStart(b.startContainer,b.startOffset);a.splice(d--,1);continue}}}b=a[d];q=this.document.$.createRange();g=b.startContainer;if(CKEDITOR.env.opera&&
b.collapsed&&g.type==CKEDITOR.NODE_ELEMENT){j=g.getChild(b.startOffset-1);c=g.getChild(b.startOffset);if(!j&&!c&&g.is(CKEDITOR.dtd.$removeEmpty)||j&&j.type==CKEDITOR.NODE_ELEMENT&&j.isEditable()||c&&c.type==CKEDITOR.NODE_ELEMENT&&c.isEditable()){b.insertNode(this.document.createText(""));b.collapse(1)}}if(b.collapsed&&CKEDITOR.env.webkit&&f(b)){g=this.root;h(g,false);j=g.getDocument().createText("");g.setCustomData("cke-fillingChar",j);b.insertNode(j);if((g=j.getNext())&&!j.getPrevious()&&g.type==
CKEDITOR.NODE_ELEMENT&&g.getName()=="br"){h(this.root);b.moveToPosition(g,CKEDITOR.POSITION_BEFORE_START)}else b.moveToPosition(j,CKEDITOR.POSITION_AFTER_END)}q.setStart(b.startContainer.$,b.startOffset);try{q.setEnd(b.endContainer.$,b.endOffset)}catch(r){if(r.toString().indexOf("NS_ERROR_ILLEGAL_VALUE")>=0){b.collapse(1);q.setEnd(b.endContainer.$,b.endOffset)}else throw r;}z.addRange(q)}}this.reset();this.root.fire("selectionchange")}},createBookmarks:function(a){return this.getRanges().createBookmarks(a)},
createBookmarks2:function(a){return this.getRanges().createBookmarks2(a)},selectBookmarks:function(a){for(var b=[],c=0;c<a.length;c++){var d=new CKEDITOR.dom.range(this.root);d.moveToBookmark(a[c]);b.push(d)}this.selectRanges(b);return this},getCommonAncestor:function(){var a=this.getRanges();return a[0].startContainer.getCommonAncestor(a[a.length-1].endContainer)},scrollIntoView:function(){this.type!=CKEDITOR.SELECTION_NONE&&this.getRanges()[0].scrollIntoView()},removeAllRanges:function(){var a=
this.getNative();a&&a[a.removeAllRanges?"removeAllRanges":"empty"]();this.reset()}}}(),CKEDITOR.editor.prototype.attachStyleStateChange=function(b,c){var a=this._.styleStateChangeCallbacks;if(!a){a=this._.styleStateChangeCallbacks=[];this.on("selectionChange",function(b){for(var c=0;c<a.length;c++){var h=a[c],d=h.style.checkActive(b.data.path)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;h.fn.call(this,d)}})}a.push({style:b,fn:c})},CKEDITOR.STYLE_BLOCK=1,CKEDITOR.STYLE_INLINE=2,CKEDITOR.STYLE_OBJECT=
3,function(){function b(a,b){for(var c,d;a=a.getParent();){if(a.equals(b))break;if(a.getAttribute("data-nostyle"))c=a;else if(!d){var e=a.getAttribute("contentEditable");e=="false"?c=a:e=="true"&&(d=1)}}return c}function c(a){var c=a.document;if(a.collapsed){c=s(this,c);a.insertNode(c);a.moveToPosition(c,CKEDITOR.POSITION_BEFORE_END)}else{var d=this.element,e=this._.definition,f,g=e.ignoreReadonly,k=g||e.includeReadonly;k==void 0&&(k=c.getCustomData("cke_includeReadonly"));var h=CKEDITOR.dtd[d]||
(f=true,CKEDITOR.dtd.span);a.enlarge(CKEDITOR.ENLARGE_INLINE,1);a.trim();var j=a.createBookmark(),l=j.startNode,p=j.endNode,m=l,n;if(!g){var q=a.getCommonAncestor(),g=b(l,q),q=b(p,q);g&&(m=g.getNextSourceNode(true));q&&(p=q)}for(m.getPosition(p)==CKEDITOR.POSITION_FOLLOWING&&(m=0);m;){g=false;if(m.equals(p)){m=null;g=true}else{var u=m.type,w=u==CKEDITOR.NODE_ELEMENT?m.getName():null,q=w&&m.getAttribute("contentEditable")=="false",r=w&&m.getAttribute("data-nostyle");if(w&&m.data("cke-bookmark")){m=
m.getNextSourceNode(true);continue}if(!w||h[w]&&!r&&(!q||k)&&(m.getPosition(p)|CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED)==CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_IDENTICAL+CKEDITOR.POSITION_IS_CONTAINED&&(!e.childRule||e.childRule(m))){var v=m.getParent();if(v&&((v.getDtd()||CKEDITOR.dtd.span)[d]||f)&&(!e.parentRule||e.parentRule(v))){if(!n&&(!w||!CKEDITOR.dtd.$removeEmpty[w]||(m.getPosition(p)|CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|
CKEDITOR.POSITION_IS_CONTAINED)==CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_IDENTICAL+CKEDITOR.POSITION_IS_CONTAINED)){n=a.clone();n.setStartBefore(m)}if(u==CKEDITOR.NODE_TEXT||q||u==CKEDITOR.NODE_ELEMENT&&!m.getChildCount()){for(var u=m,z;(g=!u.getNext(C))&&(z=u.getParent(),h[z.getName()])&&(z.getPosition(l)|CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED)==CKEDITOR.POSITION_FOLLOWING+CKEDITOR.POSITION_IDENTICAL+CKEDITOR.POSITION_IS_CONTAINED&&(!e.childRule||
e.childRule(z));)u=z;n.setEndAfter(u)}}else g=true}else g=true;m=m.getNextSourceNode(r||q&&!k)}if(g&&n&&!n.collapsed){for(var g=s(this,c),q=g.hasAttributes(),r=n.getCommonAncestor(),u={},w={},v={},t={},B,y,U;g&&r;){if(r.getName()==d){for(B in e.attributes)if(!t[B]&&(U=r.getAttribute(y)))g.getAttribute(B)==U?w[B]=1:t[B]=1;for(y in e.styles)if(!v[y]&&(U=r.getStyle(y)))g.getStyle(y)==U?u[y]=1:v[y]=1}r=r.getParent()}for(B in w)g.removeAttribute(B);for(y in u)g.removeStyle(y);q&&!g.hasAttributes()&&(g=
null);if(g){n.extractContents().appendTo(g);o.call(this,g);n.insertNode(g);g.mergeSiblings();CKEDITOR.env.ie||g.$.normalize()}else{g=new CKEDITOR.dom.element("span");n.extractContents().appendTo(g);n.insertNode(g);o.call(this,g);g.remove(true)}n=null}}a.moveToBookmark(j);a.shrink(CKEDITOR.SHRINK_TEXT)}}function a(a){a.enlarge(CKEDITOR.ENLARGE_INLINE,1);var b=a.createBookmark(),c=b.startNode;if(a.collapsed){for(var d=new CKEDITOR.dom.elementPath(c.getParent(),a.root),e,f=0,g;f<d.elements.length&&(g=
d.elements[f]);f++){if(g==d.block||g==d.blockLimit)break;if(this.checkElementRemovable(g)){var k;if(a.collapsed&&(a.checkBoundaryOfElement(g,CKEDITOR.END)||(k=a.checkBoundaryOfElement(g,CKEDITOR.START)))){e=g;e.match=k?"start":"end"}else{g.mergeSiblings();g.getName()==this.element?m.call(this,g):n(g,w(this)[g.getName()])}}}if(e){g=c;for(f=0;;f++){k=d.elements[f];if(k.equals(e))break;else if(k.match)continue;else k=k.clone();k.append(g);g=k}g[e.match=="start"?"insertBefore":"insertAfter"](e)}}else{var h=
b.endNode,j=this,d=function(){for(var a=new CKEDITOR.dom.elementPath(c.getParent()),b=new CKEDITOR.dom.elementPath(h.getParent()),d=null,e=null,f=0;f<a.elements.length;f++){var g=a.elements[f];if(g==a.block||g==a.blockLimit)break;j.checkElementRemovable(g)&&(d=g)}for(f=0;f<b.elements.length;f++){g=b.elements[f];if(g==b.block||g==b.blockLimit)break;j.checkElementRemovable(g)&&(e=g)}e&&h.breakParent(e);d&&c.breakParent(d)};d();for(e=c;!e.equals(h);){f=e.getNextSourceNode();if(e.type==CKEDITOR.NODE_ELEMENT&&
this.checkElementRemovable(e)){e.getName()==this.element?m.call(this,e):n(e,w(this)[e.getName()]);if(f.type==CKEDITOR.NODE_ELEMENT&&f.contains(c)){d();f=c.getNext()}}e=f}}a.moveToBookmark(b)}function f(a){var b=a.getCommonAncestor(true,true);(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1))&&!a.isReadOnly()&&u(a,this)}function j(a){var b=a.getCommonAncestor(true,true);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)&&a.removeStyle(e)}}function h(a){var b=a.createBookmark(true),c=a.createIterator();c.enforceRealBlocks=true;if(this._.enterMode)c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var d,e=a.document;d=c.getNextParagraph();)if(!d.isReadOnly()){var f=s(this,e,d);g(d,f)}a.moveToBookmark(b)}function d(a){var b=a.createBookmark(1),c=a.createIterator();c.enforceRealBlocks=true;c.enlargeBr=this._.enterMode!=
CKEDITOR.ENTER_BR;for(var d;d=c.getNextParagraph();)if(this.checkElementRemovable(d))if(d.is("pre")){var e=this._.enterMode==CKEDITOR.ENTER_BR?null:a.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?"p":"div");e&&d.copyAttributes(e);g(d,e)}else m.call(this,d);a.moveToBookmark(b)}function g(a,b){var c=!b;if(c){b=a.getDocument().createElement("div");a.copyAttributes(b)}var d=b&&b.is("pre"),f=a.is("pre"),g=!d&&f;if(d&&!f){f=b;(g=a.getBogus())&&g.remove();g=a.getHtml();g=k(g,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,
"");g=g.replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi,"$1");g=g.replace(/([ \t\n\r]+| )/g," ");g=g.replace(/<br\b[^>]*>/gi,"\n");if(CKEDITOR.env.ie){var h=a.getDocument().createElement("div");h.append(f);f.$.outerHTML="<pre>"+g+"</pre>";f.copyAttributes(h.getFirst());f=h.getFirst().remove()}else f.setHtml(g);b=f}else g?b=l(c?[a.getHtml()]:e(a),b):a.moveChildren(b);b.replace(a);if(d){var c=b,j;if((j=c.getPrevious(y))&&j.is&&j.is("pre")){d=k(j.getHtml(),/\n$/,"")+"\n\n"+k(c.getHtml(),/^\n/,"");CKEDITOR.env.ie?
c.$.outerHTML="<pre>"+d+"</pre>":c.setHtml(d);j.remove()}}else c&&p(b)}function e(a){a.getName();var b=[];k(a.getOuterHtml(),/(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(a,b,c){return b+"</pre>"+c+"<pre>"}).replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi,function(a,c){b.push(c)});return b}function k(a,b,c){var d="",e="",a=a.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,function(a,b,c){b&&(d=b);c&&(e=c);return""});return d+a.replace(b,
c)+e}function l(a,b){var c;a.length>1&&(c=new CKEDITOR.dom.documentFragment(b.getDocument()));for(var d=0;d<a.length;d++){var e=a[d],e=e.replace(/(\r\n|\r)/g,"\n"),e=k(e,/^[ \t]*\n/,""),e=k(e,/\n$/,""),e=k(e,/^[ \t]+|[ \t]+$/g,function(a,b){return a.length==1?" ":b?" "+CKEDITOR.tools.repeat(" ",a.length-1):CKEDITOR.tools.repeat(" ",a.length-1)+" "}),e=e.replace(/\n/g,"<br>"),e=e.replace(/[ \t]{2,}/g,function(a){return CKEDITOR.tools.repeat(" ",a.length-1)+" "});if(c){var f=b.clone();
f.setHtml(e);c.append(f)}else b.setHtml(e)}return c||b}function m(a){var b=this._.definition,c=b.attributes,b=b.styles,d=w(this)[a.getName()],e=CKEDITOR.tools.isEmpty(c)&&CKEDITOR.tools.isEmpty(b),f;for(f in c)if(!((f=="class"||this._.definition.fullMatch)&&a.getAttribute(f)!=B(f,c[f]))){e=a.hasAttribute(f);a.removeAttribute(f)}for(var g in b)if(!(this._.definition.fullMatch&&a.getStyle(g)!=B(g,b[g],true))){e=e||!!a.getStyle(g);a.removeStyle(g)}n(a,d,r[a.getName()]);e&&(this._.definition.alwaysRemoveElement?
p(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!a.hasAttributes()?p(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function o(a){for(var b=w(this),c=a.getElementsByTag(this.element),d=c.count();--d>=0;)m.call(this,c.getItem(d));for(var e in b)if(e!=this.element){c=a.getElementsByTag(e);for(d=c.count()-1;d>=0;d--){var f=c.getItem(d);n(f,b[e])}}}function n(a,b,c){if(b=b&&b.attributes)for(var d=0;d<b.length;d++){var e=b[d][0],f;if(f=a.getAttribute(e)){var g=
b[d][1];(g===null||g.test&&g.test(f)||typeof g=="string"&&f==g)&&a.removeAttribute(e)}}c||p(a)}function p(a,b){if(!a.hasAttributes()||b)if(CKEDITOR.dtd.$block[a.getName()]){var c=a.getPrevious(y),d=a.getNext(y);c&&(c.type==CKEDITOR.NODE_TEXT||!c.isBlockBoundary({br:1}))&&a.append("br",1);d&&(d.type==CKEDITOR.NODE_TEXT||!d.isBlockBoundary({br:1}))&&a.append("br");a.remove(true)}else{c=a.getFirst();d=a.getLast();a.remove(true);if(c){c.type==CKEDITOR.NODE_ELEMENT&&c.mergeSiblings();d&&(!c.equals(d)&&
d.type==CKEDITOR.NODE_ELEMENT)&&d.mergeSiblings()}}}function s(a,b,c){var d;d=a.element;d=="*"&&(d="span");d=new CKEDITOR.dom.element(d,b);c&&c.copyAttributes(d);d=u(d,a);b.getCustomData("doc_processing_style")&&d.hasAttribute("id")?d.removeAttribute("id"):b.setCustomData("doc_processing_style",1);return d}function u(a,b){var c=b._.definition,d=c.attributes,c=CKEDITOR.style.getStyleText(c);if(d)for(var e in d)a.setAttribute(e,d[e]);c&&a.setAttribute("style",c);return a}function q(a,b){for(var c in a)a[c]=
a[c].replace(x,function(a,c){return b[c]})}function w(a){if(a._.overrides)return a._.overrides;var b=a._.overrides={},c=a._.definition.overrides;if(c){CKEDITOR.tools.isArray(c)||(c=[c]);for(var d=0;d<c.length;d++){var e=c[d],f,g;if(typeof e=="string")f=e.toLowerCase();else{f=e.element?e.element.toLowerCase():a.element;g=e.attributes}e=b[f]||(b[f]={});if(g){var e=e.attributes=e.attributes||[],k;for(k in g)e.push([k.toLowerCase(),g[k]])}}}return b}function B(a,b,c){var d=new CKEDITOR.dom.element("span");
d[c?"setStyle":"setAttribute"](a,b);return d[c?"getStyle":"getAttribute"](a)}function z(a,b){for(var c=a.document,d=a.getRanges(),e=b?this.removeFromRange:this.applyToRange,f,g=d.createIterator();f=g.getNextRange();)e.call(this,f);a.selectRanges(d);c.removeCustomData("doc_processing_style")}var r={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},v={a: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},t=/\s*(?:;\s*|$)/,x=/#\((.+?)\)/g,C=CKEDITOR.dom.walker.bookmark(0,1),y=CKEDITOR.dom.walker.whitespaces(1);CKEDITOR.style=function(a,b){var c=a.attributes;if(c&&c.style){a.styles=CKEDITOR.tools.extend({},a.styles,CKEDITOR.tools.parseCssText(c.style));delete c.style}if(b){a=CKEDITOR.tools.clone(a);q(a.attributes,b);q(a.styles,b)}c=this.element=a.element?typeof a.element==
"string"?a.element.toLowerCase():a.element:"*";this.type=a.type||(r[c]?CKEDITOR.STYLE_BLOCK:v[c]?CKEDITOR.STYLE_OBJECT:CKEDITOR.STYLE_INLINE);if(typeof this.element=="object")this.type=CKEDITOR.STYLE_OBJECT;this._={definition:a}};CKEDITOR.editor.prototype.applyStyle=function(a){z.call(a,this.getSelection())};CKEDITOR.editor.prototype.removeStyle=function(a){z.call(a,this.getSelection(),1)};CKEDITOR.style.prototype={apply:function(a){z.call(this,a.getSelection())},remove:function(a){z.call(this,a.getSelection(),
1)},applyToRange:function(a){return(this.applyToRange=this.type==CKEDITOR.STYLE_INLINE?c:this.type==CKEDITOR.STYLE_BLOCK?h:this.type==CKEDITOR.STYLE_OBJECT?f:null).call(this,a)},removeFromRange:function(b){return(this.removeFromRange=this.type==CKEDITOR.STYLE_INLINE?a:this.type==CKEDITOR.STYLE_BLOCK?d:this.type==CKEDITOR.STYLE_OBJECT?j:null).call(this,b)},applyToObject:function(a){u(a,this)},checkActive:function(a){switch(this.type){case CKEDITOR.STYLE_BLOCK:return this.checkElementRemovable(a.block||
a.blockLimit,true);case CKEDITOR.STYLE_OBJECT:case CKEDITOR.STYLE_INLINE:for(var b=a.elements,c=0,d;c<b.length;c++){d=b[c];if(!(this.type==CKEDITOR.STYLE_INLINE&&(d==a.block||d==a.blockLimit))){if(this.type==CKEDITOR.STYLE_OBJECT){var e=d.getName();if(!(typeof this.element=="string"?e==this.element:e in this.element))continue}if(this.checkElementRemovable(d,true))return true}}}return false},checkApplicable:function(a){switch(this.type){case CKEDITOR.STYLE_OBJECT:return a.contains(this.element)}return true},
checkElementMatch:function(a,b){var c=this._.definition;if(!a||!c.ignoreReadonly&&a.isReadOnly())return false;var d=a.getName();if(typeof this.element=="string"?d==this.element:d in this.element){if(!b&&!a.hasAttributes())return true;if(d=c._AC)c=d;else{var d={},e=0,f=c.attributes;if(f)for(var g in f){e++;d[g]=f[g]}if(g=CKEDITOR.style.getStyleText(c)){d.style||e++;d.style=g}d._length=e;c=c._AC=d}if(c._length){for(var k in c)if(k!="_length"){e=a.getAttribute(k)||"";if(k=="style")a:{d=c[k];typeof d==
"string"&&(d=CKEDITOR.tools.parseCssText(d));typeof e=="string"&&(e=CKEDITOR.tools.parseCssText(e,true));g=void 0;for(g in d)if(!(g in e&&(e[g]==d[g]||d[g]=="inherit"||e[g]=="inherit"))){d=false;break a}d=true}else d=c[k]==e;if(d){if(!b)return true}else if(b)return false}if(b)return true}else return true}return false},checkElementRemovable:function(a,b){if(this.checkElementMatch(a,b))return true;var c=w(this)[a.getName()];if(c){var d;if(!(c=c.attributes))return true;for(var e=0;e<c.length;e++){d=
c[e][0];if(d=a.getAttribute(d)){var f=c[e][1];if(f===null||typeof f=="string"&&d==f||f.test(d))return true}}}return false},buildPreview:function(a){var b=this._.definition,c=[],d=b.element;d=="bdo"&&(d="span");var c=["<",d],e=b.attributes;if(e)for(var f in e)c.push(" ",f,'="',e[f],'"');(e=CKEDITOR.style.getStyleText(b))&&c.push(' style="',e,'"');c.push(">",a||b.name,"</",d,">");return c.join("")}};CKEDITOR.style.getStyleText=function(a){var b=a._ST;if(b)return b;var b=a.styles,c=a.attributes&&a.attributes.style||
"",d="";c.length&&(c=c.replace(t,";"));for(var e in b){var f=b[e],g=(e+":"+f).replace(t,";");f=="inherit"?d=d+g:c=c+g}c.length&&(c=CKEDITOR.tools.normalizeCssText(c,true));return a._ST=c+d}}(),CKEDITOR.styleCommand=function(b){this.style=b},CKEDITOR.styleCommand.prototype.exec=function(b){b.focus();this.state==CKEDITOR.TRISTATE_OFF?b.applyStyle(this.style):this.state==CKEDITOR.TRISTATE_ON&&b.removeStyle(this.style)},CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet"),CKEDITOR.addStylesSet=
CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet),CKEDITOR.loadStylesSet=function(b,c,a){CKEDITOR.stylesSet.addExternal(b,c,"");CKEDITOR.stylesSet.load(b,a)},CKEDITOR.editor.prototype.getStylesSet=function(b){if(this._.stylesDefinitions)b(this._.stylesDefinitions);else{var c=this,a=c.config.stylesCombo_stylesSet||c.config.stylesSet||"default";if(a instanceof Array){c._.stylesDefinitions=a;b(a)}else{var a=a.split(":"),f=a[0];CKEDITOR.stylesSet.addExternal(f,a[1]?a.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),
"");CKEDITOR.stylesSet.load(f,function(a){c._.stylesDefinitions=a[f];b(c._.stylesDefinitions)})}}},CKEDITOR.dom.comment=function(b,c){typeof b=="string"&&(b=(c?c.$:document).createComment(b));CKEDITOR.dom.domObject.call(this,b)},CKEDITOR.dom.comment.prototype=new CKEDITOR.dom.node,CKEDITOR.tools.extend(CKEDITOR.dom.comment.prototype,{type:CKEDITOR.NODE_COMMENT,getOuterHtml:function(){return"<\!--"+this.$.nodeValue+"--\>"}}),function(){var b={},c;for(c in CKEDITOR.dtd.$blockLimit)c in CKEDITOR.dtd.$list||
(b[c]=1);var a={};for(c in CKEDITOR.dtd.$block)c in CKEDITOR.dtd.$blockLimit||c in CKEDITOR.dtd.$empty||(a[c]=1);CKEDITOR.dom.elementPath=function(c,j){var h=null,d=null,g=[],j=j||c.getDocument().getBody(),e=c;do if(e.type==CKEDITOR.NODE_ELEMENT){g.push(e);if(!this.lastElement){this.lastElement=e;if(e.is(CKEDITOR.dtd.$object))continue}var k=e.getName();if(!d){!h&&a[k]&&(h=e);if(b[k]){var l;if(l=!h){if(k=k=="div"){a:{k=e.getChildren();l=0;for(var m=k.count();l<m;l++){var o=k.getItem(l);if(o.type==
CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[o.getName()]){k=true;break a}}k=false}k=!k&&!e.equals(j)}l=k}l?h=e:d=e}}if(e.equals(j))break}while(e=e.getParent());this.block=h;this.blockLimit=d;this.root=j;this.elements=g}}(),CKEDITOR.dom.elementPath.prototype={compare:function(b){var c=this.elements,b=b&&b.elements;if(!b||c.length!=b.length)return false;for(var a=0;a<c.length;a++)if(!c[a].equals(b[a]))return false;return true},contains:function(b,c,a){var f;typeof b=="string"&&(f=function(a){return a.getName()==
b});b instanceof CKEDITOR.dom.element?f=function(a){return a.equals(b)}:CKEDITOR.tools.isArray(b)?f=function(a){return CKEDITOR.tools.indexOf(b,a.getName())>-1}:typeof b=="function"?f=b:typeof b=="object"&&(f=function(a){return a.getName()in b});var j=this.elements,h=j.length;c&&h--;if(a){j=Array.prototype.slice.call(j,0);j.reverse()}for(c=0;c<h;c++)if(f(j[c]))return j[c];return null},isContextFor:function(b){var c;if(b in CKEDITOR.dtd.$block){c=this.contains(CKEDITOR.dtd.$intermediate)||this.root.equals(this.block)&&
this.block||this.blockLimit;return!!c.getDtd()[b]}return true}},CKEDITOR.dom.text=function(b,c){typeof b=="string"&&(b=(c?c.$:document).createTextNode(b));this.$=b},CKEDITOR.dom.text.prototype=new CKEDITOR.dom.node,CKEDITOR.tools.extend(CKEDITOR.dom.text.prototype,{type:CKEDITOR.NODE_TEXT,getLength:function(){return this.$.nodeValue.length},getText:function(){return this.$.nodeValue},setText:function(b){this.$.nodeValue=b},split:function(b){var c=this.$.parentNode,a=c.childNodes.length,f=this.getLength(),
j=this.getDocument(),h=new CKEDITOR.dom.text(this.$.splitText(b),j);if(c.childNodes.length==a)if(b>=f){h=j.createText("");h.insertAfter(this)}else{b=j.createText("");b.insertAfter(h);b.remove()}return h},substring:function(b,c){return typeof c!="number"?this.$.nodeValue.substr(b):this.$.nodeValue.substring(b,c)}}),function(){function b(a,b,c){var h=a.serializable,d=b[c?"endContainer":"startContainer"],g=c?"endOffset":"startOffset",e=h?b.document.getById(a.startNode):a.startNode,a=h?b.document.getById(a.endNode):
a.endNode;if(d.equals(e.getPrevious())){b.startOffset=b.startOffset-d.getLength()-a.getPrevious().getLength();d=a.getNext()}else if(d.equals(a.getPrevious())){b.startOffset=b.startOffset-d.getLength();d=a.getNext()}d.equals(e.getParent())&&b[g]++;d.equals(a.getParent())&&b[g]++;b[c?"endContainer":"startContainer"]=d;return b}CKEDITOR.dom.rangeList=function(a){if(a instanceof CKEDITOR.dom.rangeList)return a;a?a instanceof CKEDITOR.dom.range&&(a=[a]):a=[];return CKEDITOR.tools.extend(a,c)};var c={createIterator:function(){var a=
this,b=CKEDITOR.dom.walker.bookmark(),c=[],h;return{getNextRange:function(d){h=h==void 0?0:h+1;var g=a[h];if(g&&a.length>1){if(!h)for(var e=a.length-1;e>=0;e--)c.unshift(a[e].createBookmark(true));if(d)for(var k=0;a[h+k+1];){for(var l=g.document,d=0,e=l.getById(c[k].endNode),l=l.getById(c[k+1].startNode);;){e=e.getNextSourceNode(false);if(l.equals(e))d=1;else if(b(e)||e.type==CKEDITOR.NODE_ELEMENT&&e.isBlockBoundary())continue;break}if(!d)break;k++}for(g.moveToBookmark(c.shift());k--;){e=a[++h];e.moveToBookmark(c.shift());
g.setEnd(e.endContainer,e.endOffset)}}return g}}},createBookmarks:function(a){for(var c=[],j,h=0;h<this.length;h++){c.push(j=this[h].createBookmark(a,true));for(var d=h+1;d<this.length;d++){this[d]=b(j,this[d]);this[d]=b(j,this[d],true)}}return c},createBookmarks2:function(a){for(var b=[],c=0;c<this.length;c++)b.push(this[c].createBookmark2(a));return b},moveToBookmarks:function(a){for(var b=0;b<this.length;b++)this[b].moveToBookmark(a[b])}}}(),function(){function b(){return CKEDITOR.getUrl(CKEDITOR.skinName.split(",")[1]||
"skins/"+CKEDITOR.skinName.split(",")[0]+"/")}function c(a){var c=CKEDITOR.skin["ua_"+a],d=CKEDITOR.env;if(c)for(var c=c.split(",").sort(function(a,b){return a>b?-1:1}),e=0,f;e<c.length;e++){f=c[e];if(d.ie&&(f.replace(/^ie/,"")==d.version||d.quirks&&f=="iequirks"))f="ie";if(d[f]){a=a+("_"+c[e]);break}}return CKEDITOR.getUrl(b()+a+".css")}function a(a,b){if(!h[a]){CKEDITOR.document.appendStyleSheet(c(a));h[a]=1}b&&b()}function f(a){var b=a.getById(d);if(!b){b=a.getHead().append("style");b.setAttribute("id",
d);b.setAttribute("type","text/css")}return b}function j(a,b,c){var d,e,f;if(CKEDITOR.env.webkit){b=b.split("}").slice(0,-1);for(e=0;e<b.length;e++)b[e]=b[e].split("{")}for(var g=0;g<a.length;g++)if(CKEDITOR.env.webkit)for(e=0;e<b.length;e++){f=b[e][1];for(d=0;d<c.length;d++)f=f.replace(c[d][0],c[d][1]);a[g].$.sheet.addRule(b[e][0],f)}else{f=b;for(d=0;d<c.length;d++)f=f.replace(c[d][0],c[d][1]);CKEDITOR.env.ie?a[g].$.styleSheet.cssText=a[g].$.styleSheet.cssText+f:a[g].$.innerHTML=a[g].$.innerHTML+
f}}var h={};CKEDITOR.skin={path:b,loadPart:function(c,d){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(b()+"skin.js"),function(){a(c,d)}):a(c,d)},getPath:function(a){return CKEDITOR.getUrl(c(a))},icons:{},addIcon:function(a,b,c){a=a.toLowerCase();this.icons[a]||(this.icons[a]={path:b,offset:c||0})},getIconStyle:function(a,b,c,d){var e;if(a){a=a.toLowerCase();b&&(e=this.icons[a+"-rtl"]);e||(e=this.icons[a])}a=c||e&&e.path||"";d=d||e&&e.offset;return a&&
"background-image:url("+CKEDITOR.getUrl(a)+");background-position:0 "+d+"px;"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(a){var b=f(CKEDITOR.document);return(this.setUiColor=function(a){var c=CKEDITOR.skin.chameleon,d=[[e,a]];this.uiColor=a;j([b],c(this,"editor"),d);j(g,c(this,"panel"),d)}).call(this,a)}});var d="cke_ui_color",g=[],e=/\$color/g;CKEDITOR.on("instanceLoaded",function(a){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var b=
a.editor,a=function(a){a=(a.data[0]||a.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();if(!a.getById("cke_ui_color")){a=f(a);g.push(a);var c=b.getUiColor();c&&j([a],CKEDITOR.skin.chameleon(b,"panel"),[[e,c]])}};b.on("panelShow",a);b.on("menuShow",a);b.config.uiColor&&b.setUiColor(b.config.uiColor)}})}(),function(){if(CKEDITOR.env.webkit)CKEDITOR.env.hc=false;else{var b=CKEDITOR.dom.element.createFromHtml('<div style="width:0px;height:0px;position:absolute;left:-10000px;border: 1px solid;border-color: red blue;"></div>',
CKEDITOR.document);b.appendTo(CKEDITOR.document.getHead());try{CKEDITOR.env.hc=b.getComputedStyle("border-top-color")==b.getComputedStyle("border-right-color")}catch(c){CKEDITOR.env.hc=false}b.remove()}if(CKEDITOR.env.hc)CKEDITOR.env.cssClass=CKEDITOR.env.cssClass+" cke_hc";CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}");CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(b=CKEDITOR._.pending){delete CKEDITOR._.pending;for(var a=0;a<b.length;a++){CKEDITOR.editor.prototype.constructor.apply(b[a][0],
b[a][1]);CKEDITOR.add(b[a][0])}}}(),CKEDITOR.skin.name="moono",CKEDITOR.skin.ua_editor="ie,ie7,ie8,gecko",CKEDITOR.skin.ua_dialog="ie,ie7,ie8,opera",CKEDITOR.skin.chameleon=function(){var b=function(){return function(a,b){for(var c=a.match(/[^#]./g),d=0;d<3;d++){var g=c,e=d,k;k=parseInt(c[d],16);k=("0"+(b<0?0|k*(1+b):0|k+(255-k)*b).toString(16)).slice(-2);g[e]=k}return"#"+c.join("")}}(),c=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=0,startColorstr='{from}',endColorstr='{to}');");
return function(b,c){return a.output({from:b,to:c})}}(),a={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}border-top-color:{defaultBorder};] {id} .cke_dialog_tab [{lightGradient}border-color:{defaultBorder};] {id} .cke_dialog_contents [border-top-color:{defaultBorder};] {id} .cke_dialog_tab_selected [background:{dialogTabSelected};border-bottom-color:{dialogTabSelected};] {id} .cke_dialog_body [background:{dialogBody};border-color:{defaultBorder};] {id} .cke_toolgroup [{lightGradient}border-color:{defaultBorder};] {id} a.cke_button_off:hover, {id} a.cke_button_off:focus, {id} a.cke_button_off:active [{mediumGradient}] {id} .cke_button_on [{ckeButtonOn}] {id} .cke_toolbar_separator [background-color: {ckeToolbarSeparator};] {id} .cke_combo_button [border-color:{defaultBorder};{lightGradient}] {id} a.cke_combo_button:hover, {id} a.cke_combo_button:focus, {id} .cke_combo_on a.cke_combo_button [border-color:{defaultBorder};{mediumGradient}] {id} .cke_path_item [color:{elementsPathColor};] {id} a.cke_path_item:hover, {id} a.cke_path_item:focus, {id} a.cke_path_item:active [background-color:{elementsPathBg};] {id}.cke_panel [border-color:{defaultBorder};] "),
panel:new CKEDITOR.template(".cke_panel_grouptitle [{lightGradient}border-color:{defaultBorder};] .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menubutton:hover .cke_menubutton_icon, .cke_menubutton:focus .cke_menubutton_icon, .cke_menubutton:active .cke_menubutton_icon [background-color:{menubuttonIconHover};] .cke_menuseparator [background-color:{menubuttonIcon};] a:hover.cke_colorbox, a:focus.cke_colorbox, a:active.cke_colorbox [border-color:{defaultBorder};] a:hover.cke_colorauto, a:hover.cke_colormore, a:focus.cke_colorauto, a:focus.cke_colormore, a:active.cke_colorauto, a:active.cke_colormore [background-color:{ckeColorauto};border-color:{defaultBorder};] ")};
return function(f,j){var h=f.uiColor,h={id:"."+f.id,defaultBorder:b(h,-0.1),defaultGradient:c(b(h,0.9),h),lightGradient:c(b(h,1),b(h,0.7)),mediumGradient:c(b(h,0.8),b(h,0.5)),ckeButtonOn:c(b(h,0.6),b(h,0.7)),ckeResizer:b(h,-0.4),ckeToolbarSeparator:b(h,0.5),ckeColorauto:b(h,0.8),dialogBody:b(h,0.7),dialogTabSelected:"#fff",elementsPathColor:b(h,-0.6),elementsPathBg:h,menubuttonIcon:b(h,0.5),menubuttonIconHover:b(h,0.3)};return a[j].output(h).replace(/\[/g,"{").replace(/\]/g,"}")}}(),CKEDITOR.plugins.add("dialogui",
{onLoad:function(){var b=function(a){this._||(this._={});this._["default"]=this._.initValue=a["default"]||"";this._.required=a.required||false;for(var b=[this._],c=1;c<arguments.length;c++)b.push(arguments[c]);b.push(true);CKEDITOR.tools.extend.apply(CKEDITOR.tools,b);return this._},c={build:function(a,b,c){return new CKEDITOR.ui.dialog.textInput(a,b,c)}},a={build:function(a,b,c){return new CKEDITOR.ui.dialog[b.type](a,b,c)}},f={isChanged:function(){return this.getValue()!=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}},j=CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onChange:function(a,b){if(!this._.domOnChangeRegistered){a.on("load",function(){this.getInputElement().on("change",function(){a.parts.dialog.isVisible()&&this.fire("change",{value:this.getValue()})},this)},this);this._.domOnChangeRegistered=true}this.on("change",
b)}},true),h=/^on([A-Z]\w+)/,d=function(a){for(var b in a)(h.test(b)||b=="title"||b=="type")&&delete a[b];return a};CKEDITOR.tools.extend(CKEDITOR.ui.dialog,{labeledElement:function(a,c,d,f){if(!(arguments.length<4)){var h=b.call(this,c);h.labelId=CKEDITOR.tools.getNextId()+"_label";this._.children=[];CKEDITOR.ui.dialog.uiElement.call(this,a,c,d,"div",null,{role:"presentation"},function(){var b=[],d=c.required?" cke_required":"";if(c.labelLayout!="horizontal")b.push('<label class="cke_dialog_ui_labeled_label'+
d+'" ',' id="'+h.labelId+'"',h.inputId?' for="'+h.inputId+'"':"",(c.labelStyle?' style="'+c.labelStyle+'"':"")+">",c.label,"</label>",'<div class="cke_dialog_ui_labeled_content"'+(c.controlStyle?' style="'+c.controlStyle+'"':"")+' role="presentation">',f.call(this,a,c),"</div>");else{d={type:"hbox",widths:c.widths,padding:0,children:[{type:"html",html:'<label class="cke_dialog_ui_labeled_label'+d+'" id="'+h.labelId+'" for="'+h.inputId+'"'+(c.labelStyle?' style="'+c.labelStyle+'"':"")+">"+CKEDITOR.tools.htmlEncode(c.label)+
"</span>"},{type:"html",html:'<span class="cke_dialog_ui_labeled_content"'+(c.controlStyle?' style="'+c.controlStyle+'"':"")+">"+f.call(this,a,c)+"</span>"}]};CKEDITOR.dialog._.uiElementBuilders.hbox.build(a,d,b)}return b.join("")})}},textInput:function(a,c,d){if(!(arguments.length<3)){b.call(this,c);var f=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",h={"class":"cke_dialog_ui_input_"+c.type,id:f,type:c.type};if(c.validate)this.validate=c.validate;if(c.maxLength)h.maxlength=c.maxLength;if(c.size)h.size=
c.size;if(c.inputStyle)h.style=c.inputStyle;var j=this,n=false;a.on("load",function(){j.getInputElement().on("keydown",function(a){a.data.getKeystroke()==13&&(n=true)});j.getInputElement().on("keyup",function(b){if(b.data.getKeystroke()==13&&n){a.getButton("ok")&&setTimeout(function(){a.getButton("ok").click()},0);n=false}},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,a,c,d,function(){var a=['<div class="cke_dialog_ui_input_',c.type,'" role="presentation"'];c.width&&a.push('style="width:'+
c.width+'" ');a.push("><input ");h["aria-labelledby"]=this._.labelId;this._.required&&(h["aria-required"]=this._.required);for(var b in h)a.push(b+'="'+h[b]+'" ');a.push(" /></div>");return a.join("")})}},textarea:function(a,c,d){if(!(arguments.length<3)){b.call(this,c);var f=this,h=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",j={};if(c.validate)this.validate=c.validate;j.rows=c.rows||5;j.cols=c.cols||20;if(typeof c.inputStyle!="undefined")j.style=c.inputStyle;CKEDITOR.ui.dialog.labeledElement.call(this,
a,c,d,function(){j["aria-labelledby"]=this._.labelId;this._.required&&(j["aria-required"]=this._.required);var a=['<div class="cke_dialog_ui_input_textarea" role="presentation"><textarea class="cke_dialog_ui_input_textarea" id="',h,'" '],b;for(b in j)a.push(b+'="'+CKEDITOR.tools.htmlEncode(j[b])+'" ');a.push(">",CKEDITOR.tools.htmlEncode(f._["default"]),"</textarea></div>");return a.join("")})}},checkbox:function(a,c,f){if(!(arguments.length<3)){var h=b.call(this,c,{"default":!!c["default"]});if(c.validate)this.validate=
c.validate;CKEDITOR.ui.dialog.uiElement.call(this,a,c,f,"span",null,null,function(){var b=CKEDITOR.tools.extend({},c,{id:c.id?c.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},true),f=[],k=CKEDITOR.tools.getNextId()+"_label",j={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":k};d(b);if(c["default"])j.checked="checked";if(typeof b.inputStyle!="undefined")b.style=b.inputStyle;h.checkbox=new CKEDITOR.ui.dialog.uiElement(a,b,f,"input",null,j);f.push(' <label id="',k,'" for="',
j.id,'"'+(c.labelStyle?' style="'+c.labelStyle+'"':"")+">",CKEDITOR.tools.htmlEncode(c.label),"</label>");return f.join("")})}},radio:function(a,c,f){if(!(arguments.length<3)){b.call(this,c);if(!this._["default"])this._["default"]=this._.initValue=c.items[0][1];if(c.validate)this.validate=c.valdiate;var h=[],j=this;CKEDITOR.ui.dialog.labeledElement.call(this,a,c,f,function(){for(var b=[],f=[],k=c.id?c.id+"_radio":CKEDITOR.tools.getNextId()+"_radio",s=0;s<c.items.length;s++){var u=c.items[s],q=u[2]!==
void 0?u[2]:u[0],w=u[1]!==void 0?u[1]:u[0],B=CKEDITOR.tools.getNextId()+"_radio_input",z=B+"_label",B=CKEDITOR.tools.extend({},c,{id:B,title:null,type:null},true),q=CKEDITOR.tools.extend({},B,{title:q},true),r={type:"radio","class":"cke_dialog_ui_radio_input",name:k,value:w,"aria-labelledby":z},v=[];if(j._["default"]==w)r.checked="checked";d(B);d(q);if(typeof B.inputStyle!="undefined")B.style=B.inputStyle;h.push(new CKEDITOR.ui.dialog.uiElement(a,B,v,"input",null,r));v.push(" ");new CKEDITOR.ui.dialog.uiElement(a,
q,v,"label",null,{id:z,"for":r.id},u[0]);b.push(v.join(""))}new CKEDITOR.ui.dialog.hbox(a,h,b,f);return f.join("")});this._.children=h}},button:function(a,c,d){if(arguments.length){typeof c=="function"&&(c=c(a.getParentEditor()));b.call(this,c,{disabled:c.disabled||false});CKEDITOR.event.implementOn(this);var f=this;a.on("load",function(){var a=this.getElement();(function(){a.on("click",function(a){f.fire("click",{dialog:f.getDialog()});a.data.preventDefault()});a.on("keydown",function(a){if(a.data.getKeystroke()in
{32:1}){f.click();a.data.preventDefault()}})})();a.unselectable()},this);var h=CKEDITOR.tools.extend({},c);delete h.style;var j=CKEDITOR.tools.getNextId()+"_label";CKEDITOR.ui.dialog.uiElement.call(this,a,h,d,"a",null,{style:c.style,href:"javascript:void(0)",title:c.label,hidefocus:"true","class":c["class"],role:"button","aria-labelledby":j},'<span id="'+j+'" class="cke_dialog_ui_button">'+CKEDITOR.tools.htmlEncode(c.label)+"</span>")}},select:function(a,c,f){if(!(arguments.length<3)){var h=b.call(this,
c);if(c.validate)this.validate=c.validate;h.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,a,c,f,function(){var b=CKEDITOR.tools.extend({},c,{id:c.id?c.id+"_select":CKEDITOR.tools.getNextId()+"_select"},true),f=[],k=[],j={id:h.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};if(c.size!=void 0)j.size=c.size;if(c.multiple!=void 0)j.multiple=c.multiple;d(b);for(var s=0,u;s<c.items.length&&(u=c.items[s]);s++)k.push('<option value="',
CKEDITOR.tools.htmlEncode(u[1]!==void 0?u[1]:u[0]).replace(/"/g,"""),'" /> ',CKEDITOR.tools.htmlEncode(u[0]));if(typeof b.inputStyle!="undefined")b.style=b.inputStyle;h.select=new CKEDITOR.ui.dialog.uiElement(a,b,f,"select",null,j,k.join(""));return f.join("")})}},file:function(a,c,d){if(!(arguments.length<3)){c["default"]===void 0&&(c["default"]="");var f=CKEDITOR.tools.extend(b.call(this,c),{definition:c,buttons:[]});if(c.validate)this.validate=c.validate;a.on("load",function(){CKEDITOR.document.getById(f.frameId).getParent().addClass("cke_dialog_ui_input_file")});
CKEDITOR.ui.dialog.labeledElement.call(this,a,c,d,function(){f.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var a=CKEDITOR.env.isCustomDomain(),b=['<iframe frameborder="0" allowtransparency="0" class="cke_dialog_ui_input_file" role="presentation" id="',f.frameId,'" title="',c.label,'" src="javascript:void('];b.push(a?"(function(){document.open();document.domain='"+document.domain+"';document.close();})()":"0");b.push(')"></iframe>');return b.join("")})}},fileButton:function(a,c,d){if(!(arguments.length<
3)){b.call(this,c);var f=this;if(c.validate)this.validate=c.validate;var h=CKEDITOR.tools.extend({},c),j=h.onClick;h.className=(h.className?h.className+" ":"")+"cke_dialog_ui_button";h.onClick=function(b){var d=c["for"];if(!j||j.call(this,b)!==false){a.getContentElement(d[0],d[1]).submit();this.disable()}};a.on("load",function(){a.getContentElement(c["for"][0],c["for"][1])._.buttons.push(f)});CKEDITOR.ui.dialog.button.call(this,a,h,d)}},html:function(){var a=/^\s*<[\w:]+\s+([^>]*)?>/,b=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,
c=/\/$/;return function(d,f,h){if(!(arguments.length<3)){var j=[],p=f.html;p.charAt(0)!="<"&&(p="<span>"+p+"</span>");var s=f.focus;if(s){this.focus=function(){this.selectParentTab();typeof s=="function"&&s.call(this);this.fire("focus")};if(f.isFocusable)this.isFocusable=this.isFocusable;this.keyboardFocusable=true}CKEDITOR.ui.dialog.uiElement.call(this,d,f,j,"span",null,null,"");j=j.join("").match(a);p=p.match(b)||["","",""];if(c.test(p[1])){p[1]=p[1].slice(0,-1);p[2]="/"+p[2]}h.push([p[1]," ",j[1]||
"",p[2]].join(""))}}}(),fieldset:function(a,b,c,d,f){var h=f.label;this._={children:b};CKEDITOR.ui.dialog.uiElement.call(this,a,f,d,"fieldset",null,null,function(){var a=[];h&&a.push("<legend"+(f.labelStyle?' style="'+f.labelStyle+'"':"")+">"+h+"</legend>");for(var b=0;b<c.length;b++)a.push(c[b]);return a.join("")})}},true);CKEDITOR.ui.dialog.html.prototype=new CKEDITOR.ui.dialog.uiElement;CKEDITOR.ui.dialog.labeledElement.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setLabel:function(a){var b=
CKEDITOR.document.getById(this._.labelId);b.getChildCount()<1?(new CKEDITOR.dom.text(a,CKEDITOR.document)).appendTo(b):b.getChild(0).$.nodeValue=a;return this},getLabel:function(){var a=CKEDITOR.document.getById(this._.labelId);return!a||a.getChildCount()<1?"":a.getChild(0).getText()},eventProcessors:j},true);CKEDITOR.ui.dialog.button.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){if(!this._.disabled)return this.fire("click",{dialog:this._.dialog});this.getElement().$.blur();
return false},enable:function(){this._.disabled=false;var a=this.getElement();a&&a.removeClass("cke_disabled")},disable:function(){this._.disabled=true;this.getElement().addClass("cke_disabled")},isVisible:function(){return this.getElement().getFirst().isVisible()},isEnabled:function(){return!this._.disabled},eventProcessors:CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onClick:function(a,b){this.on("click",function(){this.getElement().focus();b.apply(this,arguments)})}},
true),accessKeyUp:function(){this.click()},accessKeyDown:function(){this.focus()},keyboardFocusable:true},true);CKEDITOR.ui.dialog.textInput.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return CKEDITOR.document.getById(this._.inputId)},focus:function(){var a=this.selectParentTab();setTimeout(function(){var b=a.getInputElement();b&&b.$.focus()},0)},select:function(){var a=this.selectParentTab();setTimeout(function(){var b=a.getInputElement();if(b){b.$.focus();
b.$.select()}},0)},accessKeyUp:function(){this.select()},setValue:function(a){!a&&(a="");return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)},keyboardFocusable:true},f,true);CKEDITOR.ui.dialog.textarea.prototype=new CKEDITOR.ui.dialog.textInput;CKEDITOR.ui.dialog.select.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return this._.select.getElement()},add:function(a,b,c){var d=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),
f=this.getInputElement().$;d.$.text=a;d.$.value=b===void 0||b===null?a:b;c===void 0||c===null?CKEDITOR.env.ie?f.add(d.$):f.add(d.$,null):f.add(d.$,c);return this},remove:function(a){this.getInputElement().$.remove(a);return this},clear:function(){for(var a=this.getInputElement().$;a.length>0;)a.remove(0);return this},keyboardFocusable:true},f,true);CKEDITOR.ui.dialog.checkbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getInputElement:function(){return this._.checkbox.getElement()},
setValue:function(a,b){this.getInputElement().$.checked=a;!b&&this.fire("change",{value:a})},getValue:function(){return this.getInputElement().$.checked},accessKeyUp:function(){this.setValue(!this.getValue())},eventProcessors:{onChange:function(a,b){if(CKEDITOR.env.ie){a.on("load",function(){var a=this._.checkbox.getElement();a.on("propertychange",function(b){b=b.data.$;b.propertyName=="checked"&&this.fire("change",{value:a.$.checked})},this)},this);this.on("change",b)}else return j.onChange.apply(this,
arguments);return null}},keyboardFocusable:true},f,true);CKEDITOR.ui.dialog.radio.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setValue:function(a,b){for(var c=this._.children,d,f=0;f<c.length&&(d=c[f]);f++)d.getElement().$.checked=d.getValue()==a;!b&&this.fire("change",{value:a})},getValue:function(){for(var a=this._.children,b=0;b<a.length;b++)if(a[b].getElement().$.checked)return a[b].getValue();return null},accessKeyUp:function(){var a=this._.children,b;for(b=0;b<a.length;b++)if(a[b].getElement().$.checked){a[b].getElement().focus();
return}a[0].getElement().focus()},eventProcessors:{onChange:function(a,b){if(CKEDITOR.env.ie){a.on("load",function(){for(var a=this._.children,b=this,c=0;c<a.length;c++)a[c].getElement().on("propertychange",function(a){a=a.data.$;a.propertyName=="checked"&&this.$.checked&&b.fire("change",{value:this.getAttribute("value")})})},this);this.on("change",b)}else return j.onChange.apply(this,arguments);return null}},keyboardFocusable:true},f,true);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 a.$.forms.length>0?new CKEDITOR.dom.element(a.$.forms[0].elements[0]):this.getElement()},submit:function(){this.getInputElement().getParent().$.submit();return this},getAction:function(){return this.getInputElement().getParent().$.action},registerEvents:function(a){var b=/^on([A-Z]\w+)/,c,d=function(a,b,c,d){a.on("formLoaded",function(){a.getInputElement().on(c,d,a)})},f;for(f in a)if(c=f.match(b))this.eventProcessors[f]?
this.eventProcessors[f].call(this,this._.dialog,a[f]):d(this,this._.dialog,c[1].toLowerCase(),a[f]);return this},reset:function(){function a(){c.$.open();if(CKEDITOR.env.isCustomDomain())c.$.domain=document.domain;var g="";d.size&&(g=d.size-(CKEDITOR.env.ie?7:0));var q=b.frameId+"_input";c.$.write(['<html dir="'+p+'" lang="'+s+'"><head><title></title></head><body style="margin: 0; overflow: hidden; background: transparent;">','<form enctype="multipart/form-data" method="POST" dir="'+p+'" lang="'+
s+'" action="',CKEDITOR.tools.htmlEncode(d.action),'"><label id="',b.labelId,'" for="',q,'" style="display:none">',CKEDITOR.tools.htmlEncode(d.label),'</label><input id="',q,'" aria-labelledby="',b.labelId,'" type="file" name="',CKEDITOR.tools.htmlEncode(d.id||"cke_upload"),'" size="',CKEDITOR.tools.htmlEncode(g>0?g:""),'" /></form></body></html>',"<script>window.parent.CKEDITOR.tools.callFunction("+h+");","window.onbeforeunload = function() {window.parent.CKEDITOR.tools.callFunction("+j+")}<\/script>"].join(""));
c.$.close();for(g=0;g<f.length;g++)f[g].enable()}var b=this._,c=CKEDITOR.document.getById(b.frameId).getFrameDocument(),d=b.definition,f=b.buttons,h=this.formLoadedNumber,j=this.formUnloadNumber,p=b.dialog._.editor.lang.dir,s=b.dialog._.editor.langCode;if(!h){h=this.formLoadedNumber=CKEDITOR.tools.addFunction(function(){this.fire("formLoaded")},this);j=this.formUnloadNumber=CKEDITOR.tools.addFunction(function(){this.getInputElement().clearCustomData()},this);this.getDialog()._.editor.on("destroy",
function(){CKEDITOR.tools.removeFunction(h);CKEDITOR.tools.removeFunction(j)})}CKEDITOR.env.gecko?setTimeout(a,500):a()},getValue:function(){return this.getInputElement().$.value||""},setInitValue:function(){this._.initValue=""},eventProcessors:{onChange:function(a,b){if(!this._.domOnChangeRegistered){this.on("formLoaded",function(){this.getInputElement().on("change",function(){this.fire("change",{value:this.getValue()})},this)},this);this._.domOnChangeRegistered=true}this.on("change",b)}},keyboardFocusable:true},
true);CKEDITOR.ui.dialog.fileButton.prototype=new CKEDITOR.ui.dialog.button;CKEDITOR.ui.dialog.fieldset.prototype=CKEDITOR.tools.clone(CKEDITOR.ui.dialog.hbox.prototype);CKEDITOR.dialog.addUIElement("text",c);CKEDITOR.dialog.addUIElement("password",c);CKEDITOR.dialog.addUIElement("textarea",a);CKEDITOR.dialog.addUIElement("checkbox",a);CKEDITOR.dialog.addUIElement("radio",a);CKEDITOR.dialog.addUIElement("button",a);CKEDITOR.dialog.addUIElement("select",a);CKEDITOR.dialog.addUIElement("file",a);CKEDITOR.dialog.addUIElement("fileButton",
a);CKEDITOR.dialog.addUIElement("html",a);CKEDITOR.dialog.addUIElement("fieldset",{build:function(a,b,c){for(var d=b.children,f,h=[],j=[],p=0;p<d.length&&(f=d[p]);p++){var s=[];h.push(s);j.push(CKEDITOR.dialog._.uiElementBuilders[f.type].build(a,f,s))}return new CKEDITOR.ui.dialog[b.type](a,j,h,c,b)}})}}),CKEDITOR.DIALOG_RESIZE_NONE=0,CKEDITOR.DIALOG_RESIZE_WIDTH=1,CKEDITOR.DIALOG_RESIZE_HEIGHT=2,CKEDITOR.DIALOG_RESIZE_BOTH=3,function(){function b(){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 c(){for(var a=this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId),c=b+1;c<b+a;c++)if(this._.tabs[this._.tabIdList[c%a]][0].$.offsetHeight)return this._.tabIdList[c%a];return null}function a(a,b){for(var c=a.$.getElementsByTagName("input"),d=0,e=c.length;d<e;d++){var f=new CKEDITOR.dom.element(c[d]);if(f.getAttribute("type").toLowerCase()==
"text")if(b){f.setAttribute("value",f.getCustomData("fake_value")||"");f.removeCustomData("fake_value")}else{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",true));a||(this.select?this.select():this.focus());b&&alert(b);this.fire("validated",{valid:a,msg:b})}function j(){var a=this.getInputElement();a&&a.removeAttribute("aria-invalid")}function h(a){var a=
CKEDITOR.dom.element.createFromHtml(CKEDITOR.addTemplate("dialog",s).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})),b=a.getChild([0,0,0,0,0]),c=b.getChild(0),d=b.getChild(1);if(CKEDITOR.env.ie&&!CKEDITOR.env.ie6Compat){var e=CKEDITOR.env.isCustomDomain(),e="javascript:void(function(){"+encodeURIComponent("document.open();"+(e?'document.domain="'+document.domain+
'";':"")+"document.close();")+"}())";CKEDITOR.dom.element.createFromHtml('<iframe frameBorder="0" class="cke_iframe_shim" src="'+e+'" tabIndex="-1"></iframe>').appendTo(b.getParent())}c.unselectable();d.unselectable();return{element:a,parts:{dialog:a.getChild(0),title:c,close:d,tabs:b.getChild(2),contents:b.getChild([3,0,0,0]),footer:b.getChild([3,0,1,0])}}}function d(a,b,c){this.element=b;this.focusIndex=c;this.tabIndex=0;this.isFocusable=function(){return!b.getAttribute("disabled")&&b.isVisible()};
this.focus=function(){a._.currentFocusIndex=this.focusIndex;this.element.focus()};b.on("keydown",function(a){a.data.getKeystroke()in{32:1,13:1}&&this.fire("click")});b.on("focus",function(){this.fire("mouseover")});b.on("blur",function(){this.fire("mouseout")})}function g(a){function b(){a.layout()}var c=CKEDITOR.document.getWindow();c.on("resize",b);a.on("hide",function(){c.removeListener("resize",b)})}function e(a,b){this._={dialog:a};CKEDITOR.tools.extend(this,b)}function k(a){function b(c){var j=
a.getSize(),k=CKEDITOR.document.getWindow().getViewPaneSize(),l=c.data.$.screenX,p=c.data.$.screenY,q=l-d.x,n=p-d.y;d={x:l,y:p};e.x=e.x+q;e.y=e.y+n;a.move(e.x+h[3]<g?-h[3]:e.x-h[1]>k.width-j.width-g?k.width-j.width+(f.lang.dir=="rtl"?0:h[1]):e.x,e.y+h[0]<g?-h[0]:e.y-h[2]>k.height-j.height-g?k.height-j.height+h[2]:e.y,1);c.data.preventDefault()}function c(){CKEDITOR.document.removeListener("mousemove",b);CKEDITOR.document.removeListener("mouseup",c);if(CKEDITOR.env.ie6Compat){var a=t.getChild(0).getFrameDocument();
a.removeListener("mousemove",b);a.removeListener("mouseup",c)}}var d=null,e=null;a.getElement().getFirst();var f=a.getParentEditor(),g=f.config.dialog_magnetDistance,h=CKEDITOR.skin.margins||[0,0,0,0];typeof g=="undefined"&&(g=20);a.parts.title.on("mousedown",function(f){d={x:f.data.$.screenX,y:f.data.$.screenY};CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",c);e=a.getPosition();if(CKEDITOR.env.ie6Compat){var g=t.getChild(0).getFrameDocument();g.on("mousemove",b);g.on("mouseup",
c)}f.data.preventDefault()},a)}function l(a){var b,c;function d(e){var q=h.lang.dir=="rtl",n=p.width,u=p.height,m=n+(e.data.$.screenX-b)*(q?-1:1)*(a._.moved?1:2),s=u+(e.data.$.screenY-c)*(a._.moved?1:2),o=a._.element.getFirst(),o=q&&o.getComputedStyle("right"),w=a.getPosition();w.y+s>l.height&&(s=l.height-w.y);if((q?o:w.x)+m>l.width)m=l.width-(q?o:w.x);if(g==CKEDITOR.DIALOG_RESIZE_WIDTH||g==CKEDITOR.DIALOG_RESIZE_BOTH)n=Math.max(f.minWidth||0,m-j);if(g==CKEDITOR.DIALOG_RESIZE_HEIGHT||g==CKEDITOR.DIALOG_RESIZE_BOTH)u=
Math.max(f.minHeight||0,s-k);a.resize(n,u);a._.moved||a.layout();e.data.preventDefault()}function e(){CKEDITOR.document.removeListener("mouseup",e);CKEDITOR.document.removeListener("mousemove",d);if(q){q.remove();q=null}if(CKEDITOR.env.ie6Compat){var a=t.getChild(0).getFrameDocument();a.removeListener("mouseup",e);a.removeListener("mousemove",d)}}var f=a.definition,g=f.resizable;if(g!=CKEDITOR.DIALOG_RESIZE_NONE){var h=a.getParentEditor(),j,k,l,p,q,n=CKEDITOR.tools.addFunction(function(f){p=a.getSize();
var g=a.parts.contents;if(g.$.getElementsByTagName("iframe").length){q=CKEDITOR.dom.element.createFromHtml('<div class="cke_dialog_resize_cover" style="height: 100%; position: absolute; width: 100%;"></div>');g.append(q)}k=p.height-a.parts.contents.getSize("height",!(CKEDITOR.env.gecko||CKEDITOR.env.opera||CKEDITOR.env.ie&&CKEDITOR.env.quirks));j=p.width-a.parts.contents.getSize("width",1);b=f.screenX;c=f.screenY;l=CKEDITOR.document.getWindow().getViewPaneSize();CKEDITOR.document.on("mousemove",d);
CKEDITOR.document.on("mouseup",e);if(CKEDITOR.env.ie6Compat){g=t.getChild(0).getFrameDocument();g.on("mousemove",d);g.on("mouseup",e)}f.preventDefault&&f.preventDefault()});a.on("load",function(){var b="";g==CKEDITOR.DIALOG_RESIZE_WIDTH?b=" cke_resizer_horizontal":g==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(b=" cke_resizer_vertical");b=CKEDITOR.dom.element.createFromHtml('<div class="cke_resizer'+b+" cke_resizer_"+h.lang.dir+'" title="'+CKEDITOR.tools.htmlEncode(h.lang.common.resize)+'" onmousedown="CKEDITOR.tools.callFunction('+
n+', event )"></div>');a.parts.footer.append(b,1)});h.on("destroy",function(){CKEDITOR.tools.removeFunction(n)})}}function m(a){a.data.preventDefault(1)}function o(a){var b=CKEDITOR.document.getWindow(),c=a.config,d=c.dialog_backgroundCoverColor||"white",e=c.dialog_backgroundCoverOpacity,f=c.baseFloatZIndex,c=CKEDITOR.tools.genKey(d,e,f),g=v[c];if(g)g.show();else{f=['<div tabIndex="-1" style="position: ',CKEDITOR.env.ie6Compat?"absolute":"fixed","; z-index: ",f,"; top: 0px; left: 0px; ",!CKEDITOR.env.ie6Compat?
"background-color: "+d:"",'" class="cke_dialog_background_cover">'];if(CKEDITOR.env.ie6Compat){var h=CKEDITOR.env.isCustomDomain(),d="<html><body style=\\'background-color:"+d+";\\'></body></html>";f.push('<iframe hidefocus="true" frameborder="0" id="cke_dialog_background_iframe" src="javascript:');f.push("void((function(){document.open();"+(h?"document.domain='"+document.domain+"';":"")+"document.write( '"+d+"' );document.close();})())");f.push('" style="position:absolute;left:0;top:0;width:100%;height: 100%;progid:DXImageTransform.Microsoft.Alpha(opacity=0)"></iframe>')}f.push("</div>");
g=CKEDITOR.dom.element.createFromHtml(f.join(""));g.setOpacity(e!=void 0?e:0.5);g.on("keydown",m);g.on("keypress",m);g.on("keyup",m);g.appendTo(CKEDITOR.document.getBody());v[c]=g}a.focusManager.add(g);t=g;var a=function(){var a=b.getViewPaneSize();g.setStyles({width:a.width+"px",height:a.height+"px"})},j=function(){var a=b.getScrollPosition(),c=CKEDITOR.dialog._.currentTop;g.setStyles({left:a.x+"px",top:a.y+"px"});if(c){do{a=c.getPosition();c.move(a.x,a.y)}while(c=c._.parentDialog)}};r=a;b.on("resize",
a);a();(!CKEDITOR.env.mac||!CKEDITOR.env.webkit)&&g.focus();if(CKEDITOR.env.ie6Compat){var k=function(){j();arguments.callee.prevScrollHandler.apply(this,arguments)};b.$.setTimeout(function(){k.prevScrollHandler=window.onscroll||function(){};window.onscroll=k},0);j()}}function n(a){if(t){a.focusManager.remove(t);a=CKEDITOR.document.getWindow();t.hide();a.removeListener("resize",r);CKEDITOR.env.ie6Compat&&a.$.setTimeout(function(){window.onscroll=window.onscroll&&window.onscroll.prevScrollHandler||
null},0);r=null}}var p=CKEDITOR.tools.cssLength,s='<div class="cke cke_reset_all {editorId} {editorDialogClass}" dir="{langDir}" lang="{langCode}" role="dialog" aria-labelledby="cke_dialog_title_{id}"><table class="cke_dialog '+CKEDITOR.env.cssClass+' cke_{langDir}" style="position:absolute" role="presentation"><tr><td role="presentation"><div class="cke_dialog_body" role="presentation"><div id="cke_dialog_title_{id}" class="cke_dialog_title" role="presentation"></div><a id="cke_dialog_close_button_{id}" class="cke_dialog_close_button" href="javascript:void(0)" title="{closeTitle}" role="button"><span class="cke_label">X</span></a><div id="cke_dialog_tabs_{id}" class="cke_dialog_tabs" role="tablist"></div><table class="cke_dialog_contents" role="presentation"><tr><td id="cke_dialog_contents_{id}" class="cke_dialog_contents_body" role="presentation"></td></tr><tr><td id="cke_dialog_footer_{id}" class="cke_dialog_footer" role="presentation"></td></tr></table></div></td></tr></table></div>';
CKEDITOR.dialog=function(a,d){function e(){var a=t._.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 g(a){var b=t._.focusList,a=a||0;if(!(b.length<1)){var c=t._.currentFocusIndex;try{b[c].getInputElement().$.blur()}catch(d){}for(var e=c=(c+a+b.length)%b.length;a&&!b[e].isFocusable();){e=(e+a+b.length)%b.length;if(e==c)break}b[e].focus();b[e].type=="text"&&b[e].select()}}function p(d){if(t==
CKEDITOR.dialog._.currentTop){var e=d.data.getKeystroke(),f=a.lang.dir=="rtl";r=v=0;if(e==9||e==CKEDITOR.SHIFT+9){e=e==CKEDITOR.SHIFT+9;if(t._.tabBarMode){e=e?b.call(t):c.call(t);t.selectPage(e);t._.tabs[e][0].focus()}else g(e?-1:1);r=1}else if(e==CKEDITOR.ALT+121&&!t._.tabBarMode&&t.getPageCount()>1){t._.tabBarMode=true;t._.tabs[t._.currentTabId][0].focus();r=1}else if((e==37||e==39)&&t._.tabBarMode){e=e==(f?39:37)?b.call(t):c.call(t);t.selectPage(e);t._.tabs[e][0].focus();r=1}else if((e==13||e==
32)&&t._.tabBarMode){this.selectPage(this._.currentTabId);this._.tabBarMode=false;this._.currentFocusIndex=-1;g(1);r=1}else if(e==13){e=d.data.getTarget();if(!e.is("a","button","select","textarea")&&(!e.is("input")||e.$.type!="button")){(e=this.getButton("ok"))&&CKEDITOR.tools.setTimeout(e.click,0,e);r=1}v=1}else if(e==27){(e=this.getButton("cancel"))?CKEDITOR.tools.setTimeout(e.click,0,e):this.fire("cancel",{hide:true}).hide!==false&&this.hide();v=1}else return;q(d)}}function q(a){r?a.data.preventDefault(1):
v&&a.data.stopPropagation()}var n=CKEDITOR.dialog._.dialogDefinitions[d],m=CKEDITOR.tools.clone(u),s=a.config.dialog_buttonsOrder||"OS",o=a.lang.dir,w={},r,v;(s=="OS"&&CKEDITOR.env.mac||s=="rtl"&&o=="ltr"||s=="ltr"&&o=="rtl")&&m.buttons.reverse();n=CKEDITOR.tools.extend(n(a),m);n=CKEDITOR.tools.clone(n);n=new z(this,n);m=h(a);this._={editor:a,element:m.element,name:d,contentSize:{width:0,height:0},size:{width:0,height:0},contents:{},buttons:{},accessKeyMap:{},tabs:{},tabIdList:[],currentTabId:null,
currentTabIndex:null,pageCount:0,lastTab:null,tabBarMode:false,focusList:[],currentFocusIndex:0,hasFocus:false};this.parts=m.parts;CKEDITOR.tools.setTimeout(function(){a.fire("ariaWidget",this.parts.contents)},0,this);m={position:CKEDITOR.env.ie6Compat?"absolute":"fixed",top:0,visibility:"hidden"};m[o=="rtl"?"right":"left"]=0;this.parts.dialog.setStyles(m);CKEDITOR.event.call(this);this.definition=n=CKEDITOR.fire("dialogDefinition",{name:d,definition:n},a).definition;if(!("removeDialogTabs"in a._)&&
a.config.removeDialogTabs){m=a.config.removeDialogTabs.split(";");for(o=0;o<m.length;o++){s=m[o].split(":");if(s.length==2){var B=s[0];w[B]||(w[B]=[]);w[B].push(s[1])}}a._.removeDialogTabs=w}if(a._.removeDialogTabs&&(w=a._.removeDialogTabs[d]))for(o=0;o<w.length;o++)n.removeContents(w[o]);if(n.onLoad)this.on("load",n.onLoad);if(n.onShow)this.on("show",n.onShow);if(n.onHide)this.on("hide",n.onHide);if(n.onOk)this.on("ok",function(b){a.fire("saveSnapshot");setTimeout(function(){a.fire("saveSnapshot")},
0);if(n.onOk.call(this,b)===false)b.data.hide=false});if(n.onCancel)this.on("cancel",function(a){if(n.onCancel.call(this,a)===false)a.data.hide=false});var t=this,C=function(a){var b=t._.contents,c=false,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){C(function(b){if(b.validate){var c=b.validate(this),d=typeof c=="string"||c===false;if(d){a.data.hide=false;a.stop()}f.call(b,!d,typeof c=="string"?c:void 0);return d}})},this,null,0);this.on("cancel",function(b){C(function(c){if(c.isChanged()){if(!confirm(a.lang.common.confirmCancel))b.data.hide=
false;return true}})},this,null,0);this.parts.close.on("click",function(a){this.fire("cancel",{hide:true}).hide!==false&&this.hide();a.data.preventDefault()},this);this.changeFocus=g;var y=this._.element;a.focusManager.add(y,1);this.on("show",function(){y.on("keydown",p,this);if(CKEDITOR.env.opera||CKEDITOR.env.gecko)y.on("keypress",q,this)});this.on("hide",function(){y.removeListener("keydown",p);(CKEDITOR.env.opera||CKEDITOR.env.gecko)&&y.removeListener("keypress",q);C(function(a){j.apply(a)})});
this.on("iframeAdded",function(a){(new CKEDITOR.dom.document(a.data.iframe.$.contentWindow.document)).on("keydown",p,this,null,0)});this.on("show",function(){e();if(a.config.dialog_startupFocusTab&&t._.pageCount>1){t._.tabBarMode=true;t._.tabs[t._.currentTabId][0].focus()}else if(!this._.hasFocus){this._.currentFocusIndex=-1;if(n.onFocus){var b=n.onFocus.call(this);b&&b.focus()}else g(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);k(this);l(this);(new CKEDITOR.dom.text(n.title,CKEDITOR.document)).appendTo(this.parts.title);for(o=0;o<n.contents.length;o++)(w=n.contents[o])&&this.addPage(w);this.parts.tabs.on("click",function(a){var b=a.data.getTarget();if(b.hasClass("cke_dialog_tab")){b=b.$.id;this.selectPage(b.substring(4,b.lastIndexOf("_")));if(this._.tabBarMode){this._.tabBarMode=false;this._.currentFocusIndex=-1;g(1)}a.data.preventDefault()}},this);o=[];w=CKEDITOR.dialog._.uiElementBuilders.hbox.build(this,
{type:"hbox",className:"cke_dialog_footer_buttons",widths:[],children:n.buttons},o).getChild();this.parts.footer.setHtml(o.join(""));for(o=0;o<w.length;o++)this._.buttons[w[o].id]=w[o]};CKEDITOR.dialog.prototype={destroy:function(){this.hide();this._.element.remove()},resize:function(){return function(a,b){if(!this._.contentSize||!(this._.contentSize.width==a&&this._.contentSize.height==b)){CKEDITOR.dialog.fire("resize",{dialog:this,width:a,height:b},this._.editor);this.fire("resize",{width:a,height:b},
this._.editor);this.parts.contents.setStyles({width:a+"px",height:b+"px"});if(this._.editor.lang.dir=="rtl"&&this._.position)this._.position.x=CKEDITOR.document.getWindow().getViewPaneSize().width-this._.contentSize.width-parseInt(this._.element.getFirst().getStyle("right"),10);this._.contentSize={width:a,height:b}}}}(),getSize:function(){var a=this._.element.getFirst();return{width:a.$.offsetWidth||0,height:a.$.offsetHeight||0}},move:function(a,b,c){var d=this._.element.getFirst(),e=this._.editor.lang.dir==
"rtl",f=d.getComputedStyle("position")=="fixed";if(!f||!this._.position||!(this._.position.x==a&&this._.position.y==b)){this._.position={x:a,y:b};if(!f){f=CKEDITOR.document.getWindow().getScrollPosition();a=a+f.x;b=b+f.y}if(e){f=this.getSize();a=CKEDITOR.document.getWindow().getViewPaneSize().width-f.width-a}b={top:(b>0?b:0)+"px"};b[e?"right":"left"]=(a>0?a:0)+"px";d.setStyles(b);c&&(this._.moved=1)}},getPosition:function(){return CKEDITOR.tools.extend({},this._.position)},show:function(){var a=this._.element,
b=this.definition;!a.getParent()||!a.getParent().equals(CKEDITOR.document.getBody())?a.appendTo(CKEDITOR.document.getBody()):a.setStyle("display","block");if(CKEDITOR.env.gecko&&CKEDITOR.env.version<10900){var c=this.parts.dialog;c.setStyle("position","absolute");setTimeout(function(){c.setStyle("position","fixed")},0)}this.resize(this._.contentSize&&this._.contentSize.width||b.width||b.minWidth,this._.contentSize&&this._.contentSize.height||b.height||b.minHeight);this.reset();this.selectPage(this.definition.contents[0].id);
if(CKEDITOR.dialog._.currentZIndex===null)CKEDITOR.dialog._.currentZIndex=this._.editor.config.baseFloatZIndex;this._.element.getFirst().setStyle("z-index",CKEDITOR.dialog._.currentZIndex=CKEDITOR.dialog._.currentZIndex+10);if(CKEDITOR.dialog._.currentTop===null){CKEDITOR.dialog._.currentTop=this;this._.parentDialog=null;o(this._.editor)}else{this._.parentDialog=CKEDITOR.dialog._.currentTop;this._.parentDialog.getElement().getFirst().$.style.zIndex-=Math.floor(this._.editor.config.baseFloatZIndex/
2);CKEDITOR.dialog._.currentTop=this}a.on("keydown",C);a.on(CKEDITOR.env.opera?"keypress":"keyup",y);this._.hasFocus=false;CKEDITOR.tools.setTimeout(function(){this.layout();g(this);this.parts.dialog.setStyle("visibility","");this.fireOnce("load",{});CKEDITOR.ui.fire("ready",this);this.fire("show",{});this._.editor.fire("dialogShow",this);this._.parentDialog||this._.editor.focusManager.lock();this.foreach(function(a){a.setInitValue&&a.setInitValue()})},100,this)},layout:function(){var a=this.parts.dialog,
b=this.getSize(),c=CKEDITOR.document.getWindow().getViewPaneSize(),d=(c.width-b.width)/2,e=(c.height-b.height)/2;CKEDITOR.env.ie6Compat||(b.height+(e>0?e:0)>c.height||b.width+(d>0?d:0)>c.width?a.setStyle("position","absolute"):a.setStyle("position","fixed"));this.move(this._.moved?this._.position.x:d,this._.moved?this._.position.y:e)},foreach:function(a){for(var b in this._.contents)for(var c in this._.contents[b])a.call(this,this._.contents[b][c]);return this},reset:function(){var a=function(a){a.reset&&
a.reset(1)};return function(){this.foreach(a);return this}}(),setupContent:function(){var a=arguments;this.foreach(function(b){b.setup&&b.setup.apply(b,a)})},commitContent:function(){var a=arguments;this.foreach(function(b){CKEDITOR.env.ie&&this._.currentFocusIndex==b.focusIndex&&b.getInputElement().$.blur();b.commit&&b.commit.apply(b,a)})},hide:function(){if(this.parts.dialog.isVisible()){this.fire("hide",{});this._.editor.fire("dialogHide",this);this.selectPage(this._.tabIdList[0]);var a=this._.element;
a.setStyle("display","none");this.parts.dialog.setStyle("visibility","hidden");for(G(this);CKEDITOR.dialog._.currentTop!=this;)CKEDITOR.dialog._.currentTop.hide();if(this._.parentDialog){var b=this._.parentDialog.getElement().getFirst();b.setStyle("z-index",parseInt(b.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2))}else n(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex=CKEDITOR.dialog._.currentZIndex-10;else{CKEDITOR.dialog._.currentZIndex=
null;a.removeListener("keydown",C);a.removeListener(CKEDITOR.env.opera?"keypress":"keyup",y);var c=this._.editor;c.focus();setTimeout(function(){c.focusManager.unlock()},0)}delete this._.parentDialog;this.foreach(function(a){a.resetInitValue&&a.resetInitValue()})}},addPage:function(a){var b=[],c=a.label?' title="'+CKEDITOR.tools.htmlEncode(a.label)+'"':"",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%;height:100%"},b),b=CKEDITOR.dom.element.createFromHtml(b.join(""));b.setAttribute("role","tabpanel");var e=CKEDITOR.env,f="cke_"+a.id+"_"+CKEDITOR.tools.getNextNumber(),c=CKEDITOR.dom.element.createFromHtml(['<a class="cke_dialog_tab"',this._.pageCount>0?" cke_last":"cke_first",c,a.hidden?' style="display:none"':"",' id="',f,'"',e.gecko&&e.version>=10900&&!e.hc?"":' href="javascript:void(0)"',' tabIndex="-1" hidefocus="true" role="tab">',a.label,"</a>"].join(""));b.setAttribute("aria-labelledby",
f);this._.tabs[a.id]=[c,b];this._.tabIdList.push(a.id);!a.hidden&&this._.pageCount++;this._.lastTab=c;this.updateStyle();f=this._.contents[a.id]={};for(e=d.getChild();d=e.shift();){f[d.id]=d;typeof d.getChild=="function"&&e.push.apply(e,d.getChild())}b.setAttribute("name",a.id);b.appendTo(this.parts.contents);c.unselectable();this.parts.tabs.append(c);if(a.accessKey){A(this,this,"CTRL+"+a.accessKey,E,D);this._.accessKeyMap["CTRL+"+a.accessKey]=a.id}},selectPage:function(b){if(this._.currentTabId!=
b&&this.fire("selectPage",{page:b,currentPage:this._.currentTabId})!==true){for(var c in this._.tabs){var d=this._.tabs[c][0],e=this._.tabs[c][1];if(c!=b){d.removeClass("cke_dialog_tab_selected");e.hide()}e.setAttribute("aria-hidden",c!=b)}var f=this._.tabs[b];f[0].addClass("cke_dialog_tab_selected");if(CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat){a(f[1]);f[1].show();setTimeout(function(){a(f[1],1)},0)}else f[1].show();this._.currentTabId=b;this._.currentTabIndex=CKEDITOR.tools.indexOf(this._.tabIdList,
b)}},updateStyle:function(){this.parts.dialog[(this._.pageCount===1?"add":"remove")+"Class"]("cke_single_page")},hidePage:function(a){var c=this._.tabs[a]&&this._.tabs[a][0];if(c&&this._.pageCount!=1&&c.isVisible()){a==this._.currentTabId&&this.selectPage(b.call(this));c.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()},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,b){if(typeof b=="undefined"){b=this._.focusList.length;this._.focusList.push(new d(this,a,b))}else{this._.focusList.splice(b,0,new d(this,a,b));for(var c=b+1;c<this._.focusList.length;c++)this._.focusList[c].focusIndex++}}};CKEDITOR.tools.extend(CKEDITOR.dialog,{add:function(a,b){if(!this._.dialogDefinitions[a]||typeof b=="function")this._.dialogDefinitions[a]=b},exists:function(a){return!!this._.dialogDefinitions[a]},
getCurrent:function(){return CKEDITOR.dialog._.currentTop},okButton:function(){var a=function(a,b){b=b||{};return CKEDITOR.tools.extend({id:"ok",type:"button",label:a.lang.common.ok,"class":"cke_dialog_ui_button_ok",onClick:function(a){a=a.data.dialog;a.fire("ok",{hide:true}).hide!==false&&a.hide()}},b,true)};a.type="button";a.override=function(b){return CKEDITOR.tools.extend(function(c){return a(c,b)},{type:"button"},true)};return a}(),cancelButton:function(){var a=function(a,b){b=b||{};return CKEDITOR.tools.extend({id:"cancel",
type:"button",label:a.lang.common.cancel,"class":"cke_dialog_ui_button_cancel",onClick:function(a){a=a.data.dialog;a.fire("cancel",{hide:true}).hide!==false&&a.hide()}},b,true)};a.type="button";a.override=function(b){return CKEDITOR.tools.extend(function(c){return a(c,b)},{type:"button"},true)};return a}(),addUIElement:function(a,b){this._.uiElementBuilders[a]=b}});CKEDITOR.dialog._={uiElementBuilders:{},dialogDefinitions:{},currentTop:null,currentZIndex:null};CKEDITOR.event.implementOn(CKEDITOR.dialog);
CKEDITOR.event.implementOn(CKEDITOR.dialog.prototype,true);var u={resizable:CKEDITOR.DIALOG_RESIZE_BOTH,minWidth:600,minHeight:400,buttons:[CKEDITOR.dialog.okButton,CKEDITOR.dialog.cancelButton]},q=function(a,b,c){for(var d=0,e;e=a[d];d++){if(e.id==b)return e;if(c&&e[c])if(e=q(e[c],b,c))return e}return null},w=function(a,b,c,d,e){if(c){for(var f=0,g;g=a[f];f++){if(g.id==c){a.splice(f,0,b);return b}if(d&&g[d])if(g=w(g[d],b,c,d,true))return g}if(e)return null}a.push(b);return b},B=function(a,b,c){for(var d=
0,e;e=a[d];d++){if(e.id==b)return a.splice(d,1);if(c&&e[c])if(e=B(e[c],b,c))return e}return null},z=function(a,b){this.dialog=a;for(var c=b.contents,d=0,f;f=c[d];d++)c[d]=f&&new e(a,f);CKEDITOR.tools.extend(this,b)};z.prototype={getContents:function(a){return q(this.contents,a)},getButton:function(a){return q(this.buttons,a)},addContents:function(a,b){return w(this.contents,a,b)},addButton:function(a,b){return w(this.buttons,a,b)},removeContents:function(a){B(this.contents,a)},removeButton:function(a){B(this.buttons,
a)}};e.prototype={get:function(a){return q(this.elements,a,"children")},add:function(a,b){return w(this.elements,a,b,"children")},remove:function(a){B(this.elements,a,"children")}};var r,v={},t,x={},C=function(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,d=a.data.$.shiftKey,e=String.fromCharCode(a.data.$.keyCode);if((b=x[(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()}},y=function(a){var b=
a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,d=a.data.$.shiftKey,e=String.fromCharCode(a.data.$.keyCode);if((b=x[(b?"CTRL+":"")+(c?"ALT+":"")+(d?"SHIFT+":"")+e])&&b.length){b=b[b.length-1];if(b.keyup){b.keyup.call(b.uiElement,b.dialog,b.key);a.data.preventDefault()}}},A=function(a,b,c,d,e){(x[c]||(x[c]=[])).push({uiElement:a,dialog:b,key:c,keyup:e||a.accessKeyUp,keydown:d||a.accessKeyDown})},G=function(a){for(var b in x){for(var c=x[b],d=c.length-1;d>=0;d--)(c[d].dialog==a||c[d].uiElement==
a)&&c.splice(d,1);c.length===0&&delete x[b]}},D=function(a,b){a._.accessKeyMap[b]&&a.selectPage(a._.accessKeyMap[b])},E=function(){};(function(){CKEDITOR.ui.dialog={uiElement:function(a,b,c,d,e,f,g){if(!(arguments.length<4)){var h=(d.call?d(b):d)||"div",j=["<",h," "],k=(e&&e.call?e(b):e)||{},l=(f&&f.call?f(b):f)||{},p=(g&&g.call?g.call(this,a,b):g)||"",n=this.domId=l.id||CKEDITOR.tools.getNextId()+"_uiElement";this.id=b.id;l.id=n;var q={};b.type&&(q["cke_dialog_ui_"+b.type]=1);b.className&&(q[b.className]=
1);b.disabled&&(q.cke_disabled=1);for(var m=l["class"]&&l["class"].split?l["class"].split(" "):[],n=0;n<m.length;n++)m[n]&&(q[m[n]]=1);m=[];for(n in q)m.push(n);l["class"]=m.join(" ");if(b.title)l.title=b.title;q=(b.style||"").split(";");if(b.align){m=b.align;k["margin-left"]=m=="left"?0:"auto";k["margin-right"]=m=="right"?0:"auto"}for(n in k)q.push(n+":"+k[n]);b.hidden&&q.push("display:none");for(n=q.length-1;n>=0;n--)q[n]===""&&q.splice(n,1);if(q.length>0)l.style=(l.style?l.style+"; ":"")+q.join("; ");
for(n in l)j.push(n+'="'+CKEDITOR.tools.htmlEncode(l[n])+'" ');j.push(">",p,"</",h,">");c.push(j.join(""));(this._||(this._={})).dialog=a;if(typeof b.isChanged=="boolean")this.isChanged=function(){return b.isChanged};if(typeof b.isChanged=="function")this.isChanged=b.isChanged;if(typeof b.setValue=="function")this.setValue=CKEDITOR.tools.override(this.setValue,function(a){return function(c){a.call(this,b.setValue.call(this,c))}});if(typeof b.getValue=="function")this.getValue=CKEDITOR.tools.override(this.getValue,
function(a){return function(){return b.getValue.call(this,a.call(this))}});CKEDITOR.event.implementOn(this);this.registerEvents(b);this.accessKeyUp&&(this.accessKeyDown&&b.accessKey)&&A(this,a,"CTRL+"+b.accessKey);var u=this;a.on("load",function(){var b=u.getInputElement();if(b){var c=u.type in{checkbox:1,ratio:1}&&CKEDITOR.env.ie&&CKEDITOR.env.version<8?"cke_dialog_ui_focused":"";b.on("focus",function(){a._.tabBarMode=false;a._.hasFocus=true;u.fire("focus");c&&this.addClass(c)});b.on("blur",function(){u.fire("blur");
c&&this.removeClass(c)})}});if(this.keyboardFocusable){this.tabIndex=b.tabIndex||0;this.focusIndex=a._.focusList.push(this)-1;this.on("focus",function(){a._.currentFocusIndex=u.focusIndex})}CKEDITOR.tools.extend(this,b)}},hbox:function(a,b,c,d,e){if(!(arguments.length<4)){this._||(this._={});var f=this._.children=b,g=e&&e.widths||null,h=e&&e.height||null,j,k={role:"presentation"};e&&e.align&&(k.align=e.align);CKEDITOR.ui.dialog.uiElement.call(this,a,e||{type:"hbox"},d,"table",{},k,function(){var a=
['<tbody><tr class="cke_dialog_ui_hbox">'];for(j=0;j<c.length;j++){var b="cke_dialog_ui_hbox_child",d=[];j===0&&(b="cke_dialog_ui_hbox_first");j==c.length-1&&(b="cke_dialog_ui_hbox_last");a.push('<td class="',b,'" role="presentation" ');g?g[j]&&d.push("width:"+p(g[j])):d.push("width:"+Math.floor(100/c.length)+"%");h&&d.push("height:"+p(h));e&&e.padding!=void 0&&d.push("padding:"+p(e.padding));CKEDITOR.env.ie&&(CKEDITOR.env.quirks&&f[j].align)&&d.push("text-align:"+f[j].align);d.length>0&&a.push('style="'+
d.join("; ")+'" ');a.push(">",c[j],"</td>")}a.push("</tr></tbody>");return a.join("")})}},vbox:function(a,b,c,d,e){if(!(arguments.length<3)){this._||(this._={});var f=this._.children=b,g=e&&e.width||null,h=e&&e.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,a,e||{type:"vbox"},d,"div",null,{role:"presentation"},function(){var b=['<table role="presentation" cellspacing="0" border="0" '];b.push('style="');e&&e.expand&&b.push("height:100%;");b.push("width:"+p(g||"100%"),";");b.push('"');b.push('align="',
CKEDITOR.tools.htmlEncode(e&&e.align||(a.getParentEditor().lang.dir=="ltr"?"left":"right")),'" ');b.push("><tbody>");for(var d=0;d<c.length;d++){var j=[];b.push('<tr><td role="presentation" ');g&&j.push("width:"+p(g||"100%"));h?j.push("height:"+p(h[d])):e&&e.expand&&j.push("height:"+Math.floor(100/c.length)+"%");e&&e.padding!=void 0&&j.push("padding:"+p(e.padding));CKEDITOR.env.ie&&(CKEDITOR.env.quirks&&f[d].align)&&j.push("text-align:"+f[d].align);j.length>0&&b.push('style="',j.join("; "),'" ');
b.push(' class="cke_dialog_ui_vbox_child">',c[d],"</td></tr>")}b.push("</tbody></table>");return b.join("")})}}}})();CKEDITOR.ui.dialog.uiElement.prototype={getElement:function(){return CKEDITOR.document.getById(this.domId)},getInputElement:function(){return this.getElement()},getDialog:function(){return this._.dialog},setValue:function(a,b){this.getInputElement().setValue(a);!b&&this.fire("change",{value:a});return this},getValue:function(){return this.getInputElement().getValue()},isChanged:function(){return false},
selectParentTab:function(){for(var a=this.getInputElement();(a=a.getParent())&&a.$.className.search("cke_dialog_page_contents")==-1;);if(!a)return this;a=a.getAttribute("name");this._.dialog._.currentTabId!=a&&this._.dialog.selectPage(a);return this},focus:function(){this.selectParentTab().getInputElement().focus();return this},registerEvents:function(a){var b=/^on([A-Z]\w+)/,c,d=function(a,b,c,d){b.on("load",function(){a.getInputElement().on(c,d,a)})},e;for(e in a)if(c=e.match(b))this.eventProcessors[e]?
this.eventProcessors[e].call(this,this._.dialog,a[e]):d(this,this._.dialog,c[1].toLowerCase(),a[e]);return this},eventProcessors:{onLoad:function(a,b){a.on("load",b,this)},onShow:function(a,b){a.on("show",b,this)},onHide:function(a,b){a.on("hide",b,this)}},accessKeyDown:function(){this.focus()},accessKeyUp:function(){},disable:function(){var a=this.getElement();this.getInputElement().setAttribute("disabled","true");a.addClass("cke_disabled")},enable:function(){var a=this.getElement();this.getInputElement().removeAttribute("disabled");
a.removeClass("cke_disabled")},isEnabled:function(){return!this.getElement().hasClass("cke_disabled")},isVisible:function(){return this.getInputElement().isVisible()},isFocusable:function(){return!this.isEnabled()||!this.isVisible()?false:true}};CKEDITOR.ui.dialog.hbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getChild:function(a){if(arguments.length<1)return this._.children.concat();a.splice||(a=[a]);return a.length<2?this._.children[a[0]]:this._.children[a[0]]&&this._.children[a[0]].getChild?
this._.children[a[0]].getChild(a.slice(1,a.length)):null}},true);CKEDITOR.ui.dialog.vbox.prototype=new CKEDITOR.ui.dialog.hbox;(function(){var a={build:function(a,b,c){for(var d=b.children,e,f=[],g=[],h=0;h<d.length&&(e=d[h]);h++){var j=[];f.push(j);g.push(CKEDITOR.dialog._.uiElementBuilders[e.type].build(a,e,j))}return new CKEDITOR.ui.dialog[b.type](a,g,f,c,b)}};CKEDITOR.dialog.addUIElement("hbox",a);CKEDITOR.dialog.addUIElement("vbox",a)})();CKEDITOR.dialogCommand=function(a,b){this.dialogName=
a;CKEDITOR.tools.extend(this,b,true)};CKEDITOR.dialogCommand.prototype={exec:function(a){CKEDITOR.env.opera?CKEDITOR.tools.setTimeout(function(){a.openDialog(this.dialogName)},0,this):a.openDialog(this.dialogName)},canUndo:false,editorFocus:CKEDITOR.env.ie||CKEDITOR.env.webkit};(function(){var a=/^([a]|[^a])+$/,b=/^\d*$/,c=/^\d*(?:\.\d+)?$/,d=/^(((\d*(\.\d+))|(\d*))(px|\%)?)?$/,e=/^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|\%)?)?$/i,f=/^(\s*[\w-]+\s*:\s*[^:;]+(?:;|$))*$/;CKEDITOR.VALIDATE_OR=
1;CKEDITOR.VALIDATE_AND=2;CKEDITOR.dialog.validate={functions:function(){var a=arguments;return function(){var b=this&&this.getValue?this.getValue():a[0],c=void 0,d=CKEDITOR.VALIDATE_AND,e=[],f;for(f=0;f<a.length;f++)if(typeof a[f]=="function")e.push(a[f]);else break;if(f<a.length&&typeof a[f]=="string"){c=a[f];f++}f<a.length&&typeof a[f]=="number"&&(d=a[f]);var g=d==CKEDITOR.VALIDATE_AND?true:false;for(f=0;f<e.length;f++)g=d==CKEDITOR.VALIDATE_AND?g&&e[f](b):g||e[f](b);return!g?c:true}},regex:function(a,
b){return function(c){c=this&&this.getValue?this.getValue():c;return!a.test(c)?b:true}},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))},
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 v)v[c].remove();v={}}var a=a.editor._.storedDialogs,d;for(d in a)a[d].destroy()})})();CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{openDialog:function(a,b){function c(d){var g=CKEDITOR.dialog._.dialogDefinitions[a];
if(!(f&&typeof d=="undefined")){typeof g!="function"&&(CKEDITOR.dialog._.dialogDefinitions[a]="failed");e.openDialog(a,b)}}var d=CKEDITOR.dialog._.dialogDefinitions[a];CKEDITOR.dialog._.currentTop===null&&o(this);if(typeof d=="function"){d=this._.storedDialogs||(this._.storedDialogs={});d=d[a]||(d[a]=new CKEDITOR.dialog(this,a));b&&b.call(d,d);d.show();return d}if(d=="failed"){n(this);throw Error('[CKEDITOR.dialog.openDialog] Dialog "'+a+'" failed when loading definition.');}var e=this;if(typeof d==
"string"){var f=1;CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(d),c,null,0,1)}CKEDITOR.skin.loadPart("dialog");return null}})}(),CKEDITOR.plugins.add("dialog",{requires:"dialogui",init:function(b){b.on("contentDom",function(){var c=b.editable();c.attachListener(c,"dblclick",function(a){if(b.readOnly)return false;a={element:a.data.getTarget()};b.fire("doubleclick",a);a.dialog&&b.openDialog(a.dialog);return 1})})}}),function(){CKEDITOR.plugins.add("a11yhelp",{requires:"dialog",availableLangs:{en:1,cs:1,
cy:1,da:1,de:1,el:1,eo:1,fa:1,fi:1,fr:1,gu:1,he:1,it:1,mk:1,nb:1,nl:1,no:1,"pt-br":1,ro:1,tr:1,ug:1,vi:1,"zh-cn":1},init:function(b){var c=this;b.addCommand("a11yHelp",{exec:function(){var a=b.langCode,a=c.availableLangs[a]?a:"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(c.path+"dialogs/lang/"+a+".js"),function(){b.lang.a11yhelp=c.langEntries[a];b.openDialog("a11yHelp")})},modes:{wysiwyg:1,source:1},readOnly:1,canUndo:false});b.setKeystroke(CKEDITOR.ALT+48,"a11yHelp");CKEDITOR.dialog.add("a11yHelp",
this.path+"dialogs/a11yhelp.js")}})}(),CKEDITOR.plugins.add("about",{requires:"dialog",init:function(b){var c=b.addCommand("about",new CKEDITOR.dialogCommand("about"));c.modes={wysiwyg:1,source:1};c.canUndo=false;c.readOnly=1;b.ui.addButton&&b.ui.addButton("About",{label:b.lang.about.title,command:"about",toolbar:"about"});CKEDITOR.dialog.add("about",this.path+"dialogs/about.js")}}),CKEDITOR.plugins.add("basicstyles",{init:function(b){var c=0,a=function(a,d,f,e){e=new CKEDITOR.style(e);b.attachStyleStateChange(e,
function(a){!b.readOnly&&b.getCommand(f).setState(a)});b.addCommand(f,new CKEDITOR.styleCommand(e));b.ui.addButton&&b.ui.addButton(a,{label:d,command:f,toolbar:"basicstyles,"+(c=c+10)})},f=b.config,j=b.lang.basicstyles;a("Bold",j.bold,"bold",f.coreStyles_bold);a("Italic",j.italic,"italic",f.coreStyles_italic);a("Underline",j.underline,"underline",f.coreStyles_underline);a("Strike",j.strike,"strike",f.coreStyles_strike);a("Subscript",j.subscript,"subscript",f.coreStyles_subscript);a("Superscript",
j.superscript,"superscript",f.coreStyles_superscript);b.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:"strike"},CKEDITOR.config.coreStyles_subscript={element:"sub"},CKEDITOR.config.coreStyles_superscript={element:"sup"},function(){function b(a,
b,c,d){if(!a.isReadOnly()&&!a.equals(c.editable())){CKEDITOR.dom.element.setMarker(d,a,"bidi_processed",1);for(var d=a,e=c.editable();(d=d.getParent())&&!d.equals(e);)if(d.getCustomData("bidi_processed")){a.removeStyle("direction");a.removeAttribute("dir");return}d="useComputedState"in c.config?c.config.useComputedState:1;if((d?a.getComputedStyle("direction"):a.getStyle("direction")||a.hasAttribute("dir"))!=b){a.removeStyle("direction");if(d){a.removeAttribute("dir");b!=a.getComputedStyle("direction")&&
a.setAttribute("dir",b)}else a.setAttribute("dir",b);c.forceNextSelectionCheck()}}}function c(a,b,c){var d=a.getCommonAncestor(false,true),a=a.clone();a.enlarge(c==CKEDITOR.ENTER_BR?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);if(a.checkBoundaryOfElement(d,CKEDITOR.START)&&a.checkBoundaryOfElement(d,CKEDITOR.END)){for(var e;d&&d.type==CKEDITOR.NODE_ELEMENT&&(e=d.getParent())&&e.getChildCount()==1&&!(d.getName()in b);)d=e;return d.type==CKEDITOR.NODE_ELEMENT&&d.getName()in b&&
d}}function a(a){return{context:"p",refresh:function(a,b){var c=a.config.useComputedState,e,c=c===void 0||c;if(!c){e=b.lastElement;for(var f=a.editable();e&&!(e.getName()in d||e.equals(f));){var g=e.getParent();if(!g)break;e=g}}e=e||b.block||b.blockLimit;if(e.equals(a.editable()))(f=a.getSelection().getRanges()[0].getEnclosedNode())&&f.type==CKEDITOR.NODE_ELEMENT&&(e=f);if(e){c=c?e.getComputedStyle("direction"):e.getStyle("direction")||e.getAttribute("dir");a.getCommand("bidirtl").setState(c=="rtl"?
CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF);a.getCommand("bidiltr").setState(c=="ltr"?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)}c=(b.block||b.blockLimit||a.editable()).getDirection(1);if(c!=(a._.selDir||a.lang.dir)){a._.selDir=c;a.fire("contentDirChanged",c)}},exec:function(d){var e=d.getSelection(),f=d.config.enterMode,g=e.getRanges();if(g&&g.length){for(var k={},u=e.createBookmarks(),g=g.createIterator(),q,w=0;q=g.getNextRange(1);){var B=q.getEnclosedNode();if(!B||B&&!(B.type==CKEDITOR.NODE_ELEMENT&&
B.getName()in h))B=c(q,j,f);B&&b(B,a,d,k);var z=new CKEDITOR.dom.walker(q),r=u[w].startNode,v=u[w++].endNode;z.evaluator=function(a){return!!(a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in j&&!(a.getName()==(f==CKEDITOR.ENTER_P?"p":"div")&&a.getParent().type==CKEDITOR.NODE_ELEMENT&&a.getParent().getName()=="blockquote")&&a.getPosition(r)&CKEDITOR.POSITION_FOLLOWING&&(a.getPosition(v)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_CONTAINS)==CKEDITOR.POSITION_PRECEDING)};for(;B=z.next();)b(B,a,d,k);q=
q.createIterator();for(q.enlargeBr=f!=CKEDITOR.ENTER_BR;B=q.getNextParagraph(f==CKEDITOR.ENTER_P?"p":"div");)b(B,a,d,k)}CKEDITOR.dom.element.clearAllMarkers(k);d.forceNextSelectionCheck();e.selectBookmarks(u);d.focus()}}}}function f(a){var b=a==g.setAttribute,c=a==g.removeAttribute,d=/\bdirection\s*:\s*(.*?)\s*(:?$|;)/;return function(e,f){if(!this.isReadOnly()){var g;if(g=e==(b||c?"dir":"direction")||e=="style"&&(c||d.test(f))){a:{g=this;for(var h=g.getDocument().getBody().getParent();g;){if(g.equals(h)){g=
false;break a}g=g.getParent()}g=true}g=!g}if(g){g=this.getDirection(1);h=a.apply(this,arguments);if(g!=this.getDirection(1)){this.getDocument().fire("dirChanged",this);return h}}}return a.apply(this,arguments)}}var j={table:1,ul:1,ol:1,blockquote:1,div:1},h={},d={};CKEDITOR.tools.extend(h,j,{tr:1,p:1,div:1,li:1});CKEDITOR.tools.extend(d,h,{td:1});CKEDITOR.plugins.add("bidi",{init:function(b){if(!b.blockless){var c=function(a,c,d,e,f){b.addCommand(d,new CKEDITOR.command(b,e));if(b.ui.addButton){b.ui.addToolbarGroup("bidi",
"align","paragraph");b.ui.addButton(a,{label:c,command:d,toolbar:"bidi,"+f})}},d=b.lang.bidi;c("BidiLtr",d.ltr,"bidiltr",a("ltr"),10);c("BidiRtl",d.rtl,"bidirtl",a("rtl"),20);b.on("contentDom",function(){b.document.on("dirChanged",function(a){b.fire("dirChanged",{node:a.data,dir:a.data.getDirection(1)})})});b.on("contentDirChanged",function(a){var a=(b.lang.dir!=a.data?"add":"remove")+"Class",c=b.ui.space(b.config.toolbarLocation);if(c)c[a]("cke_mixed_dir_content")})}}});for(var g=CKEDITOR.dom.element.prototype,
e=["setStyle","removeStyle","setAttribute","removeAttribute"],k=0;k<e.length;k++)g[e[k]]=CKEDITOR.tools.override(g[e[k]],f)}(),function(){var b={exec:function(b){var a=b.getCommand("blockquote").state,f=b.getSelection(),j=f&&f.getRanges(true)[0];if(j){var h=f.createBookmarks();if(CKEDITOR.env.ie){var d=h[0].startNode,g=h[0].endNode,e;if(d&&d.getParent().getName()=="blockquote")for(e=d;e=e.getNext();)if(e.type==CKEDITOR.NODE_ELEMENT&&e.isBlockBoundary()){d.move(e,true);break}if(g&&g.getParent().getName()==
"blockquote")for(e=g;e=e.getPrevious();)if(e.type==CKEDITOR.NODE_ELEMENT&&e.isBlockBoundary()){g.move(e);break}}var k=j.createIterator();k.enlargeBr=b.config.enterMode!=CKEDITOR.ENTER_BR;if(a==CKEDITOR.TRISTATE_OFF){for(d=[];a=k.getNextParagraph();)d.push(a);if(d.length<1){a=b.document.createElement(b.config.enterMode==CKEDITOR.ENTER_P?"p":"div");g=h.shift();j.insertNode(a);a.append(new CKEDITOR.dom.text("",b.document));j.moveToBookmark(g);j.selectNodeContents(a);j.collapse(true);g=j.createBookmark();
d.push(a);h.unshift(g)}e=d[0].getParent();j=[];for(g=0;g<d.length;g++){a=d[g];e=e.getCommonAncestor(a.getParent())}for(a={table:1,tbody:1,tr:1,ol:1,ul:1};a[e.getName()];)e=e.getParent();for(g=null;d.length>0;){for(a=d.shift();!a.getParent().equals(e);)a=a.getParent();a.equals(g)||j.push(a);g=a}for(;j.length>0;){a=j.shift();if(a.getName()=="blockquote"){for(g=new CKEDITOR.dom.documentFragment(b.document);a.getFirst();){g.append(a.getFirst().remove());d.push(g.getLast())}g.replace(a)}else d.push(a)}j=
b.document.createElement("blockquote");for(j.insertBefore(d[0]);d.length>0;){a=d.shift();j.append(a)}}else if(a==CKEDITOR.TRISTATE_ON){g=[];for(e={};a=k.getNextParagraph();){for(d=j=null;a.getParent();){if(a.getParent().getName()=="blockquote"){j=a.getParent();d=a;break}a=a.getParent()}if(j&&d&&!d.getCustomData("blockquote_moveout")){g.push(d);CKEDITOR.dom.element.setMarker(e,d,"blockquote_moveout",true)}}CKEDITOR.dom.element.clearAllMarkers(e);a=[];d=[];for(e={};g.length>0;){k=g.shift();j=k.getParent();
if(k.getPrevious())if(k.getNext()){k.breakParent(k.getParent());d.push(k.getNext())}else k.remove().insertAfter(j);else k.remove().insertBefore(j);if(!j.getCustomData("blockquote_processed")){d.push(j);CKEDITOR.dom.element.setMarker(e,j,"blockquote_processed",true)}a.push(k)}CKEDITOR.dom.element.clearAllMarkers(e);for(g=d.length-1;g>=0;g--){j=d[g];a:{e=j;for(var k=0,l=e.getChildCount(),m=void 0;k<l&&(m=e.getChild(k));k++)if(m.type==CKEDITOR.NODE_ELEMENT&&m.isBlockBoundary()){e=false;break a}e=true}e&&
j.remove()}if(b.config.enterMode==CKEDITOR.ENTER_BR)for(j=true;a.length;){k=a.shift();if(k.getName()=="div"){g=new CKEDITOR.dom.documentFragment(b.document);j&&(k.getPrevious()&&!(k.getPrevious().type==CKEDITOR.NODE_ELEMENT&&k.getPrevious().isBlockBoundary()))&&g.append(b.document.createElement("br"));for(j=k.getNext()&&!(k.getNext().type==CKEDITOR.NODE_ELEMENT&&k.getNext().isBlockBoundary());k.getFirst();)k.getFirst().remove().appendTo(g);j&&g.append(b.document.createElement("br"));g.replace(k);
j=false}}}f.selectBookmarks(h);b.focus()}},refresh:function(b,a){this.setState(b.elementPath(a.block||a.blockLimit).contains("blockquote",1)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)},context:"blockquote"};CKEDITOR.plugins.add("blockquote",{init:function(c){if(!c.blockless){c.addCommand("blockquote",b);c.ui.addButton&&c.ui.addButton("Blockquote",{label:c.lang.blockquote.toolbar,command:"blockquote",toolbar:"blocks,10"})}}})}(),"use strict",function(){function b(a){function b(){var c=a.editable();
c.on(x,function(a){(!CKEDITOR.env.ie||!r)&&w(a)});CKEDITOR.env.ie&&c.on("paste",function(b){if(!v){h();b.data.preventDefault();w(b);o("paste")||a.openDialog("paste")}});if(CKEDITOR.env.ie){c.on("contextmenu",j,null,null,0);c.on("beforepaste",function(a){a.data&&!a.data.$.ctrlKey&&j()},null,null,0)}c.on("beforecut",function(){!r&&p(a)});c.on("mouseup",function(){setTimeout(function(){B()},0)});c.on("keyup",B)}function c(b){return{type:b,canUndo:b=="cut",startDisabled:true,exec:function(){this.type==
"cut"&&p();var b;var c=this.type;if(CKEDITOR.env.ie)b=o(c);else try{b=a.document.$.execCommand(c,false,null)}catch(e){b=false}b||alert(a.lang.clipboard[this.type+"Error"]);return b}}}function f(){return{canUndo:false,async:true,exec:function(a,b){var c=function(b,c){b&&n(b.type,b.dataValue,!!c);a.fire("afterCommandExec",{name:"paste",command:d,returnValue:!!b})},d=this;typeof b=="string"?c({type:"auto",dataValue:b},1):a.getClipboardData(c)}}}function h(){v=1;setTimeout(function(){v=0},100)}function j(){r=
1;setTimeout(function(){r=0},10)}function o(b){var c=a.document,e=c.getBody(),f=false,g=function(){f=true};e.on(b,g);(CKEDITOR.env.version>7?c.$:c.$.selection.createRange()).execCommand(b);e.removeListener(b,g);return f}function n(b,c,e){b={type:b};if(e&&!a.fire("beforePaste",b)||!c)return false;b.dataValue=c;return a.fire("paste",b)}function p(){if(CKEDITOR.env.ie&&!CKEDITOR.env.quirks){var b=a.getSelection(),c,e,f;if(b.getType()==CKEDITOR.SELECTION_ELEMENT&&(c=b.getSelectedElement())){e=b.getRanges()[0];
f=a.document.createText("");f.insertBefore(c);e.setStartBefore(f);e.setEndAfter(c);b.selectRanges([e]);setTimeout(function(){if(c.getParent()){f.remove();b.selectElement(c)}},0)}}}function s(b,c){var e=a.document,f=a.editable(),g=function(a){a.cancel()},h=CKEDITOR.env.gecko&&CKEDITOR.env.version<=10902;if(!e.getById("cke_pastebin")){var j=a.getSelection(),k=j.createBookmarks(),l=new CKEDITOR.dom.element(f.is("body")&&!CKEDITOR.env.ie&&!CKEDITOR.env.opera?"body":"div",e);l.setAttribute("id","cke_pastebin");
var p=0,e=e.getWindow();if(h){l.insertAfter(k[0].startNode);l.setStyle("display","inline")}else{if(CKEDITOR.env.webkit){f.append(l);p=(f.is("body")?f:CKEDITOR.dom.element.get(l.$.offsetParent)).getDocumentPosition().y}else f.getAscendant(CKEDITOR.env.ie||CKEDITOR.env.opera?"body":"html",1).append(l);l.setStyles({position:"absolute",top:e.getScrollPosition().y-p+10+"px",width:"1px",height:Math.max(1,e.getViewPaneSize().height-20)+"px",overflow:"hidden",margin:0,padding:0})}if(h=l.getParent().isReadOnly()){l.setOpacity(0);
l.setAttribute("contenteditable",true)}else l.setStyle(a.config.contentsLangDirection=="ltr"?"left":"right","-1000px");a.on("selectionChange",g,null,null,0);h&&l.focus();h=new CKEDITOR.dom.range(l);h.setStartAt(l,CKEDITOR.POSITION_AFTER_START);h.setEndAt(l,CKEDITOR.POSITION_BEFORE_END);h.select();setTimeout(function(){a.unlockSelection();CKEDITOR.env.ie&&f.focus();var b;l=CKEDITOR.env.webkit&&(b=l.getFirst())&&b.is&&b.hasClass("Apple-style-span")?b:l;j.selectBookmarks(k);a.removeListener("selectionChange",
g);l.remove();c(l.getHtml())},0)}}function u(){if(CKEDITOR.env.ie){a.focus();h();var b=a.focusManager;b.lock();if(a.editable().fire(x)&&!o("paste")){b.unlock();return false}b.unlock()}else try{if(a.editable().fire(x)&&!a.document.$.execCommand("Paste",false,null))throw 0;}catch(c){return false}}function q(b){if(a.mode=="wysiwyg")switch(b.data.keyCode){case CKEDITOR.CTRL+86:case CKEDITOR.SHIFT+45:b=a.editable();h();!CKEDITOR.env.ie&&b.fire("beforepaste");(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.version<
10900)&&b.fire("paste");break;case CKEDITOR.CTRL+88:case CKEDITOR.SHIFT+46:a.fire("saveSnapshot");setTimeout(function(){a.fire("saveSnapshot")},0)}}function w(b){var c={type:"auto"},e=a.fire("beforePaste",c);s(b,function(a){a=a.replace(/<span[^>]+data-cke-bookmark[^<]*?<\/span>/ig,"");e&&n(c.type,a,0,1)})}function B(){if(a.mode=="wysiwyg"){var b=z("Paste");a.getCommand("cut").setState(z("Cut"));a.getCommand("copy").setState(z("Copy"));a.getCommand("paste").setState(b);a.fire("pasteState",b)}}function z(b){var c;
if(t&&b in{Paste:1,Cut:1})return CKEDITOR.TRISTATE_DISABLED;if(b=="Paste"){CKEDITOR.env.ie&&(r=1);try{c=a.document.$.queryCommandEnabled(b)||CKEDITOR.env.webkit}catch(e){}r=0}else{b=a.getSelection();c=b.getRanges();c=b.type!=CKEDITOR.SELECTION_NONE&&!(c.length==1&&c[0].collapsed)}return c?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED}var r=0,v=0,t=0,x=CKEDITOR.env.ie?"beforepaste":"paste";(function(){a.on("key",q);a.on("contentDom",b);a.on("selectionChange",function(a){t=a.data.selection.getRanges()[0].checkReadOnly();
B()});a.contextMenu&&a.contextMenu.addListener(function(a,b){t=b.getRanges()[0].checkReadOnly();return{cut:z("Cut"),copy:z("Copy"),paste:z("Paste")}})})();(function(){function b(c,e,f,g,h){var j=a.lang.clipboard[e];a.addCommand(e,f);a.ui.addButton&&a.ui.addButton(c,{label:j,command:e,toolbar:"clipboard,"+g});a.addMenuItems&&a.addMenuItem(e,{label:j,command:e,group:"clipboard",order:h})}b("Cut","cut",c("cut"),10,1);b("Copy","copy",c("copy"),20,4);b("Paste","paste",f(),30,8)})();a.getClipboardData=
function(b,c){function e(a){a.removeListener();a.cancel();c(a.data)}function f(a){a.removeListener();a.cancel();k=true;c({type:j,dataValue:a.data})}function g(){this.customTitle=b&&b.title}var h=false,j="auto",k=false;if(!c){c=b;b=null}a.on("paste",e,null,null,0);a.on("beforePaste",function(a){a.removeListener();h=true;j=a.data.type},null,null,1E3);if(u()===false){a.removeListener("paste",e);if(h&&a.fire("pasteDialog",g)){a.on("pasteDialogCommit",f);a.on("dialogHide",function(a){a.removeListener();
a.data.removeListener("pasteDialogCommit",f);setTimeout(function(){k||c(null)},10)})}else c(null)}}}function c(a){if(CKEDITOR.env.webkit){if(!a.match(/^[^<]*$/g)&&!a.match(/^(<div><br( ?\/)?><\/div>|<div>[^<]*<\/div>)*$/gi))return"html"}else if(CKEDITOR.env.ie){if(!a.match(/^([^<]|<br( ?\/)?>)*$/gi)&&!a.match(/^(<p>([^<]|<br( ?\/)?>)*<\/p>|(\r\n))*$/gi))return"html"}else if(CKEDITOR.env.gecko||CKEDITOR.env.opera){if(!a.match(/^([^<]|<br( ?\/)?>)*$/gi))return"html"}else return"html";return"htmlifiedtext"}
function a(a,b){function c(a){return CKEDITOR.tools.repeat("</p><p>",~~(a/2))+(a%2==1?"<br>":"")}b=b.replace(/\s+/g," ").replace(/> +</g,"><").replace(/<br ?\/>/gi,"<br>");b=b.replace(/<\/?[A-Z]+>/g,function(a){return a.toLowerCase()});if(b.match(/^[^<]$/))return b;if(CKEDITOR.env.webkit&&b.indexOf("<div>")>-1){b=b.replace(/^(<div>(<br>|)<\/div>)(?!$|(<div>(<br>|)<\/div>))/g,"<br>").replace(/^(<div>(<br>|)<\/div>){2}(?!$)/g,"<div></div>");b.match(/<div>(<br>|)<\/div>/)&&(b="<p>"+b.replace(/(<div>(<br>|)<\/div>)+/g,
function(a){return c(a.split("</div><div>").length+1)})+"</p>");b=b.replace(/<\/div><div>/g,"<br>");b=b.replace(/<\/?div>/g,"")}if((CKEDITOR.env.gecko||CKEDITOR.env.opera)&&a.enterMode!=CKEDITOR.ENTER_BR){CKEDITOR.env.gecko&&(b=b.replace(/^<br><br>$/,"<br>"));b.indexOf("<br><br>")>-1&&(b="<p>"+b.replace(/(<br>){2,}/g,function(a){return c(a.length/4)})+"</p>")}return h(a,b)}function f(){var a=new CKEDITOR.htmlParser.filter,b={blockquote:1,dl:1,fieldset:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ol:1,p:1,table:1,
ul:1},c=CKEDITOR.tools.extend({br:0},CKEDITOR.dtd.$inline),f={p:1,br:1,"cke:br":1},h=CKEDITOR.dtd,j=CKEDITOR.tools.extend({area:1,basefont:1,embed:1,iframe:1,map:1,object:1,param:1},CKEDITOR.dtd.$nonBodyContent,CKEDITOR.dtd.$cdata),o=function(a){delete a.name;a.add(new CKEDITOR.htmlParser.text(" "))},n=function(a){for(var b=a,c;(b=b.next)&&b.name&&b.name.match(/^h\d$/);){c=new CKEDITOR.htmlParser.element("cke:br");c.isEmpty=true;for(a.add(c);c=b.children.shift();)a.add(c)}};a.addRules({elements:{h1:n,
h2:n,h3:n,h4:n,h5:n,h6:n,img:function(a){var a=CKEDITOR.tools.trim(a.attributes.alt||""),b=" ";a&&!a.match(/(^http|\.(jpe?g|gif|png))/i)&&(b=" ["+a+"] ");return new CKEDITOR.htmlParser.text(b)},td:o,th:o,$:function(a){var d=a.name,n;if(j[d])return false;delete a.attributes;if(d=="br")return a;if(b[d])a.name="p";else if(c[d])delete a.name;else if(h[d]){n=new CKEDITOR.htmlParser.element("cke:br");n.isEmpty=true;if(CKEDITOR.dtd.$empty[d])return n;a.add(n,0);n=n.clone();n.isEmpty=true;a.add(n);delete a.name}f[a.name]||
delete a.name;return a}}});return a}function j(a,b,c){var b=new CKEDITOR.htmlParser.fragment.fromHtml(b),f=new CKEDITOR.htmlParser.basicWriter;b.writeHtml(f,c);var b=f.getHtml(),b=b.replace(/\s*(<\/?[a-z:]+ ?\/?>)\s*/g,"$1").replace(/(<cke:br \/>){2,}/g,"<cke:br />").replace(/(<cke:br \/>)(<\/?p>|<br \/>)/g,"$2").replace(/(<\/?p>|<br \/>)(<cke:br \/>)/g,"$1").replace(/<(cke:)?br( \/)?>/g,"<br>").replace(/<p><\/p>/g,""),j=0,b=b.replace(/<\/?p>/g,function(a){if(a=="<p>"){if(++j>1)return"</p><p>"}else if(--j>
0)return"</p><p>";return a}).replace(/<p><\/p>/g,"");return h(a,b)}function h(a,b){a.enterMode==CKEDITOR.ENTER_BR?b=b.replace(/(<\/p><p>)+/g,function(a){return CKEDITOR.tools.repeat("<br>",a.length/7*2)}).replace(/<\/?p>/g,""):a.enterMode==CKEDITOR.ENTER_DIV&&(b=b.replace(/<(\/)?p>/g,"<$1div>"));return b}CKEDITOR.plugins.add("clipboard",{requires:"dialog",init:function(d){var g;b(d);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js"));d.on("paste",function(a){var b=a.data.dataValue,
c=CKEDITOR.dtd.$block;if(b.indexOf("Apple-")>-1){b=b.replace(/<span class="Apple-converted-space"> <\/span>/gi," ");a.data.type!="html"&&(b=b.replace(/<span class="Apple-tab-span"[^>]*>([^<]*)<\/span>/gi,function(a,b){return b.replace(/\t/g," ")}));if(b.indexOf('<br class="Apple-interchange-newline">')>-1){a.data.startsWithEOL=1;a.data.preSniffing="html";b=b.replace(/<br class="Apple-interchange-newline">/,"")}b=b.replace(/(<[^>]+) class="Apple-[^"]*"/gi,"$1")}CKEDITOR.env.ie?
b=b.replace(/^ (?: |\r\n)?<(\w+)/g,function(b,d){if(d.toLowerCase()in c){a.data.preSniffing="html";return"<"+d}return b}):CKEDITOR.env.webkit?b=b.replace(/<\/(\w+)><div><br><\/div>$/,function(b,d){if(d in c){a.data.endsWithEOL=1;return"</"+d+">"}return b}):CKEDITOR.env.gecko&&(b=b.replace(/(\s)<br>$/,"$1"));a.data.dataValue=b},null,null,3);d.on("paste",function(b){var b=b.data,h=b.type,l=b.dataValue,m,o=d.config.clipboard_defaultContentType||"html";m=h=="html"||b.preSniffing=="html"?"html":c(l);
m=="htmlifiedtext"?l=a(d.config,l):h=="text"&&m=="html"&&(l=j(d.config,l,g||(g=f(d))));b.startsWithEOL&&(l='<br data-cke-eol="1">'+l);b.endsWithEOL&&(l=l+'<br data-cke-eol="1">');h=="auto"&&(h=m=="html"||o=="html"?"html":"text");b.type=h;b.dataValue=l;delete b.preSniffing;delete b.startsWithEOL;delete b.endsWithEOL},null,null,6);d.on("paste",function(a){a=a.data;d.insertHtml(a.dataValue,a.type);setTimeout(function(){d.fire("afterPaste")},0)},null,null,1E3);d.on("pasteDialog",function(a){setTimeout(function(){d.openDialog("paste",
a.data)},0)})}})}(),function(){var b='<a id="{id}" class="cke_button cke_button__{name} cke_button_{state} {cls}"'+(CKEDITOR.env.gecko&&CKEDITOR.env.version>=10900&&!CKEDITOR.env.hc?"":'" href="javascript:void(\'{titleJs}\')"')+' title="{title}" tabindex="-1" hidefocus="true" role="button" aria-labelledby="{id}_label" aria-haspopup="{hasArrow}"';if(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.mac)b=b+' onkeypress="return false;"';CKEDITOR.env.gecko&&(b=b+' onblur="this.style.cssText = this.style.cssText;"');
var b=b+(' onkeydown="return CKEDITOR.tools.callFunction({keydownFn},event);" onfocus="return CKEDITOR.tools.callFunction({focusFn},event);" onmousedown="return CKEDITOR.tools.callFunction({mousedownFn},event);" '+(CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick")+'="CKEDITOR.tools.callFunction({clickFn},this);return false;"><span class="cke_button_icon cke_button__{name}_icon" style="{style}"'),b=b+'> </span><span id="{id}_label" class="cke_button_label cke_button__{name}_label">{label}</span>{arrowHtml}</a>',
c=CKEDITOR.addTemplate("buttonArrow",'<span class="cke_button_arrow">'+(CKEDITOR.env.hc?"▼":"")+"</span>"),a=CKEDITOR.addTemplate("button",b);CKEDITOR.plugins.add("button",{beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_BUTTON,CKEDITOR.ui.button.handler)}});CKEDITOR.UI_BUTTON="button";CKEDITOR.ui.button=function(a){CKEDITOR.tools.extend(this,a,{title:a.label,click:a.click||function(b){b.execCommand(a.command)}});this._={}};CKEDITOR.ui.button.handler={create:function(a){return new CKEDITOR.ui.button(a)}};
CKEDITOR.ui.button.prototype={render:function(b,j){var h=CKEDITOR.env,d=this._.id=CKEDITOR.tools.getNextId(),g="",e=this.command,k;this._.editor=b;var l={id:d,button:this,editor:b,focus:function(){CKEDITOR.document.getById(d).focus()},execute:function(){this.button.click(b)},attach:function(a){this.button.attach(a)}},m=CKEDITOR.tools.addFunction(function(a){if(l.onkey){a=new CKEDITOR.dom.event(a);return l.onkey(l,a.getKeystroke())!==false}}),o=CKEDITOR.tools.addFunction(function(a){var b;l.onfocus&&
(b=l.onfocus(l,new CKEDITOR.dom.event(a))!==false);CKEDITOR.env.gecko&&CKEDITOR.env.version<10900&&a.preventBubble();return b}),n=0,p=CKEDITOR.tools.addFunction(function(){if(CKEDITOR.env.opera){var a=b.editable();if(a.isInline()&&a.hasFocus){b.lockSelection();n=1}}});l.clickFn=k=CKEDITOR.tools.addFunction(function(){if(n){b.unlockSelection(1);n=0}l.execute()});if(this.modes){var s={},u=function(){var a=b.mode;if(a){a=this.modes[a]?s[a]!=void 0?s[a]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;
this.setState(b.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:a)}};b.on("beforeModeUnload",function(){if(b.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED)s[b.mode]=this._.state},this);b.on("mode",u,this);!this.readOnly&&b.on("readOnly",u,this)}else if(e)if(e=b.getCommand(e)){e.on("state",function(){this.setState(e.state)},this);g=g+(e.state==CKEDITOR.TRISTATE_ON?"on":e.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off")}if(this.directional)b.on("contentDirChanged",function(a){var c=CKEDITOR.document.getById(this._.id),
d=c.getFirst(),a=a.data;a!=b.lang.dir?c.addClass("cke_"+a):c.removeClass("cke_ltr").removeClass("cke_rtl");d.setAttribute("style",CKEDITOR.skin.getIconStyle(q,a=="rtl",this.icon,this.iconOffset))},this);e||(g=g+"off");var q=this.name||this.command,h={id:d,name:q,label:this.label,cls:this.className||"",state:g,title:this.title,titleJs:h.gecko&&h.version>=10900&&!h.hc?"":(this.title||"").replace("'",""),hasArrow:this.hasArrow?"true":"false",keydownFn:m,mousedownFn:p,focusFn:o,clickFn:k,style:CKEDITOR.skin.getIconStyle(q,
b.lang.dir=="rtl",this.icon,this.iconOffset),arrowHtml:this.hasArrow?c.output():""};a.output(h,j);if(this.onRender)this.onRender();return l},setState:function(a){if(this._.state==a)return false;this._.state=a;var b=CKEDITOR.document.getById(this._.id);if(b){b.setState(a,"cke_button");return true}return false}};CKEDITOR.ui.prototype.addButton=function(a,b){this.add(a,CKEDITOR.UI_BUTTON,b)}}(),CKEDITOR.plugins.add("panelbutton",{requires:"button",onLoad:function(){function b(b){var a=this._;if(a.state!=
CKEDITOR.TRISTATE_DISABLED){this.createPanel(b);a.on?a.panel.hide():a.panel.showBlock(this._.id,this.document.getById(this._.id),4)}}CKEDITOR.ui.panelButton=CKEDITOR.tools.createClass({base:CKEDITOR.ui.button,$:function(c){var a=c.panel||{};delete c.panel;this.base(c);this.document=a.parent&&a.parent.getDocument()||CKEDITOR.document;a.block={attributes:a.attributes};this.hasArrow=a.toolbarRelated=true;this.click=b;this._={panelDefinition:a}},statics:{handler:{create:function(b){return new CKEDITOR.ui.panelButton(b)}}},
proto:{createPanel:function(b){var a=this._;if(!a.panel){var f=this._.panelDefinition,j=this._.panelDefinition.block,h=f.parent||CKEDITOR.document.getBody(),d=this._.panel=new CKEDITOR.ui.floatPanel(b,h,f),f=d.addBlock(a.id,j),g=this;d.onShow=function(){g.className&&this.element.addClass(g.className+"_panel");g.setState(CKEDITOR.TRISTATE_ON);a.on=1;g.editorFocus&&b.focus();if(g.onOpen)g.onOpen()};d.onHide=function(d){g.className&&this.element.getFirst().removeClass(g.className+"_panel");g.setState(g.modes&&
g.modes[b.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);a.on=0;if(!d&&g.onClose)g.onClose()};d.onEscape=function(){d.hide(1);g.document.getById(a.id).focus()};if(this.onBlock)this.onBlock(d,f);f.onHide=function(){a.on=0;g.setState(CKEDITOR.TRISTATE_OFF)}}}}})},beforeInit:function(b){b.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,b){b&&CKEDITOR.tools.extend(this,b);CKEDITOR.tools.extend(this,{className:"",css:[]});this.id=CKEDITOR.tools.getNextId();this.document=a;this.isFramed=this.forceIFrame||this.css.length;this._={blocks:{}}};CKEDITOR.ui.panel.handler={create:function(a){return new CKEDITOR.ui.panel(a)}};var b=CKEDITOR.addTemplate("panel",'<div lang="{langCode}" id="{id}" dir={dir} class="cke cke_reset_all {editorId} cke_panel cke_panel {cls} cke_{dir}" style="z-index:{z-index}" role="presentation">{frame}</div>'),
c=CKEDITOR.addTemplate("panel-frame",'<iframe id="{id}" class="cke_panel_frame" role="application" frameborder="0" src="{src}"></iframe>'),a=CKEDITOR.addTemplate("panel-frame-inner",'<!DOCTYPE html><html class="cke_panel_container {env}" dir="{dir}" lang="{langCode}"><head>{css}</head><body class="cke_{dir}" style="margin:0;padding:0" onload="{onload}"></body></html>');CKEDITOR.ui.panel.prototype={render:function(f,j){this.getHolderElement=function(){var b=this._.holder;if(!b){if(this.isFramed){var b=
this.document.getById(this.id+"_frame"),c=b.getParent(),b=b.getFrameDocument();CKEDITOR.env.iOS&&c.setStyles({overflow:"scroll","-webkit-overflow-scrolling":"touch"});c=CKEDITOR.tools.addFunction(CKEDITOR.tools.bind(function(){this.isLoaded=true;if(this.onLoad)this.onLoad()},this));b.write(a.output(CKEDITOR.tools.extend({css:CKEDITOR.tools.buildStyleHtml(this.css),onload:"window.parent.CKEDITOR.tools.callFunction("+c+");"},h)));b.getWindow().$.CKEDITOR=CKEDITOR;b.on("key"+(CKEDITOR.env.opera?"press":
"down"),function(a){var b=a.data.getKeystroke(),c=this.document.getById(this.id).getAttribute("dir");this._.onKeyDown&&this._.onKeyDown(b)===false?a.data.preventDefault():(b==27||b==(c=="rtl"?39:37))&&this.onEscape&&this.onEscape(b)===false&&a.data.preventDefault()},this);b=b.getBody();b.unselectable();CKEDITOR.env.air&&CKEDITOR.tools.callFunction(c)}else b=this.document.getById(this.id);this._.holder=b}return b};var h={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+(this.zIndexOffset||1)};if(this.isFramed)h.frame=c.output({id:this.id+"_frame",src:"javascript:void(document.open(),"+(CKEDITOR.env.isCustomDomain()?"document.domain='"+document.domain+"',":"")+'document.close())">'});var d=b.output(h);j&&j.push(d);return d},addBlock:function(a,b){b=this._.blocks[a]=b instanceof CKEDITOR.ui.panel.block?b:new CKEDITOR.ui.panel.block(this.getHolderElement(),b);this._.currentBlock||this.showBlock(a);
return b},getBlock:function(a){return this._.blocks[a]},showBlock:function(a){var a=this._.blocks[a],b=this._.currentBlock,c=!this.forceIFrame||CKEDITOR.env.ie?this._.holder:this.document.getById(this.id+"_frame");if(b){c.removeAttributes(b.attributes);b.hide()}this._.currentBlock=a;c.setAttributes(a.attributes);CKEDITOR.fire("ariaWidget",c);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,b){this.element=a.append(a.getDocument().createElement("div",{attributes:{tabIndex:-1,"class":"cke_panel_block",role:"presentation"},styles:{display:"none"}}));b&&CKEDITOR.tools.extend(this,b);if(!this.attributes.title)this.attributes.title=this.attributes["aria-label"];this.keys={};this._.focusIndex=-1;this.element.disableContextMenu()},_:{markItem:function(a){if(a!=-1){a=this.element.getElementsByTag("a").getItem(this._.focusIndex=
a);(CKEDITOR.env.webkit||CKEDITOR.env.opera)&&a.getDocument().getWindow().focus();a.focus();this.onMark&&this.onMark(a)}}},proto:{show:function(){this.element.setStyle("display","")},hide:function(){(!this.onHide||this.onHide.call(this)!==true)&&this.element.setStyle("display","none")},onKeyDown:function(a){var b=this.keys[a];switch(b){case "next":for(var a=this._.focusIndex,b=this.element.getElementsByTag("a"),c;c=b.getItem(++a);)if(c.getAttribute("_cke_focus")&&c.$.offsetWidth){this._.focusIndex=
a;c.focus();break}return false;case "prev":a=this._.focusIndex;for(b=this.element.getElementsByTag("a");a>0&&(c=b.getItem(--a));)if(c.getAttribute("_cke_focus")&&c.$.offsetWidth){this._.focusIndex=a;c.focus();break}return false;case "click":case "mouseup":a=this._.focusIndex;(c=a>=0&&this.element.getElementsByTag("a").getItem(a))&&(c.$[b]?c.$[b]():c.$["on"+b]());return false}return true}}})}(),CKEDITOR.plugins.add("floatpanel",{requires:"panel"}),function(){function b(a,b,j,h,d){var d=CKEDITOR.tools.genKey(b.getUniqueId(),
j.getUniqueId(),a.lang.dir,a.uiColor||"",h.css||"",d||""),g=c[d];if(!g){g=c[d]=new CKEDITOR.ui.panel(b,h);g.element=j.append(CKEDITOR.dom.element.createFromHtml(g.render(a),b));g.element.setStyles({display:"none",position:"absolute"})}return g}var c={};CKEDITOR.ui.floatPanel=CKEDITOR.tools.createClass({$:function(a,c,j,h){j.forceIFrame=1;j.toolbarRelated&&a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(c=CKEDITOR.document.getById("cke_"+a.name));var d=c.getDocument(),h=b(a,d,c,j,h||0),g=h.element,e=
g.getFirst();g.disableContextMenu();this.element=g;this._={editor:a,panel:h,parentElement:c,definition:j,document:d,iframe:e,children:[],dir:a.lang.dir};a.on("mode",function(){this.hide()},this);a.on("resize",function(){this.hide()},this)},proto:{addBlock:function(a,b){return this._.panel.addBlock(a,b)},addListBlock:function(a,b){return this._.panel.addListBlock(a,b)},getBlock:function(a){return this._.panel.getBlock(a)},showBlock:function(a,b,c,h,d){var g=this._.panel,e=g.showBlock(a);this.allowBlur(false);
a=this._.editor.editable();this._.returnFocus=a.hasFocus?a:new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement);var k=this.element,a=this._.iframe,l=k.getDocument(),m=this._.parentElement.getPositionedAncestor(),o=b.getDocumentPosition(l),l=m?m.getDocumentPosition(l):{x:0,y:0},n=this._.dir=="rtl",p=o.x+(h||0)-l.x,s=o.y+(d||0)-l.y;if(n&&(c==1||c==4))p=p+b.$.offsetWidth;else if(!n&&(c==2||c==3))p=p+(b.$.offsetWidth-1);if(c==3||c==4)s=s+(b.$.offsetHeight-1);this._.panel._.offsetParentId=b.getId();
k.setStyles({top:s+"px",left:0,display:""});k.setOpacity(0);k.getFirst().removeStyle("width");if(!this._.blurSet){b=CKEDITOR.env.ie?a:new CKEDITOR.dom.window(a.$.contentWindow);CKEDITOR.event.useCapture=true;b.on("blur",function(a){if(this.allowBlur()&&a.data.getPhase()==CKEDITOR.EVENT_PHASE_AT_TARGET&&this.visible&&!this._.activeChild){delete this._.returnFocus;this.hide()}},this);b.on("focus",function(){this._.focused=true;this.hideChild();this.allowBlur(true)},this);CKEDITOR.event.useCapture=false;
this._.editor.focusManager.add(b);this._.blurSet=1}g.onEscape=CKEDITOR.tools.bind(function(a){if(this.onEscape&&this.onEscape(a)===false)return false},this);CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.tools.bind(function(){k.removeStyle("width");if(e.autoSize){var a=e.element.$;if(CKEDITOR.env.gecko||CKEDITOR.env.opera)a=a.parentNode;if(CKEDITOR.env.ie)a=a.document.body;a=a.scrollWidth;CKEDITOR.env.ie&&(CKEDITOR.env.quirks&&a>0)&&(a=a+((k.$.offsetWidth||0)-(k.$.clientWidth||0)+3));k.setStyle("width",
a+10+"px");a=e.element.$.scrollHeight;CKEDITOR.env.ie&&(CKEDITOR.env.quirks&&a>0)&&(a=a+((k.$.offsetHeight||0)-(k.$.clientHeight||0)+3));k.setStyle("height",a+"px");g._.currentBlock.element.setStyle("display","none").removeStyle("display")}else k.removeStyle("height");n&&(p=p-k.$.offsetWidth);k.setStyle("left",p+"px");var b=g.element.getWindow(),a=k.$.getBoundingClientRect(),b=b.getViewPaneSize(),c=a.width||a.right-a.left,d=a.height||a.bottom-a.top,f=n?a.right:b.width-a.left,h=n?b.width-a.right:a.left;
n?f<c&&(p=h>c?p+c:b.width>c?p-a.left:p-a.right+b.width):f<c&&(p=h>c?p-c:b.width>c?p-a.right+b.width:p-a.left);c=a.top;b.height-a.top<d&&(s=c>d?s-d:b.height>d?s-a.bottom+b.height:s-a.top);if(CKEDITOR.env.ie){b=a=new CKEDITOR.dom.element(k.$.offsetParent);b.getName()=="html"&&(b=b.getDocument().getBody());b.getComputedStyle("direction")=="rtl"&&(p=CKEDITOR.env.ie8Compat?p-k.getDocument().getDocumentElement().$.scrollLeft*2:p-(a.$.scrollWidth-a.$.clientWidth))}var a=k.getFirst(),j;(j=a.getCustomData("activePanel"))&&
j.onHide&&j.onHide.call(this,1);a.setCustomData("activePanel",this);k.setStyles({top:s+"px",left:p+"px"});k.setOpacity(1)},this);g.isLoaded?a():g.onLoad=a;CKEDITOR.tools.setTimeout(function(){this.focus();this.allowBlur(true);this._.editor.fire("panelShow",this)},0,this)},CKEDITOR.env.air?200:0,this);this.visible=1;this.onShow&&this.onShow.call(this)},focus:function(){if(CKEDITOR.env.webkit){var a=CKEDITOR.document.getActive();!a.equals(this._.iframe)&&a.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},
blur:function(){var a=this._.iframe.getFrameDocument().getActive();a.is("a")&&(this._.lastFocused=a)},hide:function(a){if(this.visible&&(!this.onHide||this.onHide.call(this)!==true)){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._.editor.fire("panelHide",this)}},allowBlur:function(a){var b=this._.panel;if(a!=void 0)b.allowBlur=a;return b.allowBlur},showAsChild:function(a,b,c,h,d,g){if(!(this._.activeChild==a&&a._.panel._.offsetParentId==c.getId())){this.hideChild();a.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this);this._.activeChild=a;this._.focused=false;a.showBlock(b,c,h,d,g);this.blur();(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){a.element.getChild(0).$.style.cssText+=
""},100)}},hideChild:function(a){var b=this._.activeChild;if(b){delete b.onHide;delete this._.activeChild;b.hide();a&&this.focus()}}}});CKEDITOR.on("instanceDestroyed",function(){var a=CKEDITOR.tools.isEmpty(CKEDITOR.instances),b;for(b in c){var j=c[b];a?j.destroy():j.element.hide()}a&&(c={})})}(),CKEDITOR.plugins.add("colorbutton",{requires:"panelbutton,floatpanel",init:function(b){function c(c,f,e,j){var l=CKEDITOR.tools.getNextId()+"_colorBox";b.ui.add(c,CKEDITOR.UI_PANELBUTTON,{label:e,title:e,
modes:{wysiwyg:1},editorFocus:1,toolbar:"colors,"+j,panel:{css:CKEDITOR.skin.getPath("editor"),attributes:{role:"listbox","aria-label":h.panelTitle}},onBlock:function(c,d){d.autoSize=true;d.element.addClass("cke_colorblock");d.element.setHtml(a(c,f,l));d.element.getDocument().getBody().setStyle("overflow","hidden");CKEDITOR.ui.fire("ready",this);var e=d.keys,h=b.lang.dir=="rtl";e[h?37:39]="next";e[40]="next";e[9]="next";e[h?39:37]="prev";e[38]="prev";e[CKEDITOR.SHIFT+9]="prev";e[32]="click"},onOpen:function(){var a=
b.getSelection(),a=a&&a.getStartElement(),a=b.elementPath(a),c,a=a.block||a.blockLimit||b.document.getBody();do c=a&&a.getComputedStyle(f=="back"?"background-color":"color")||"transparent";while(f=="back"&&c=="transparent"&&a&&(a=a.getParent()));if(!c||c=="transparent")c="#ffffff";this._.panel._.iframe.getFrameDocument().getById(l).setStyle("background-color",c);return c}})}function a(a,c,e){var k=[],l=j.colorButton_colors.split(","),m=CKEDITOR.tools.addFunction(function(c,e){if(c=="?"){var g=arguments.callee,
h=function(a){this.removeListener("ok",h);this.removeListener("cancel",h);a.name=="ok"&&g(this.getContentElement("picker","selectedColor").getValue(),e)};b.openDialog("colordialog",function(){this.on("ok",h);this.on("cancel",h)})}else{b.focus();a.hide();b.fire("saveSnapshot");b.removeStyle(new CKEDITOR.style(j["colorButton_"+e+"Style"],{color:"inherit"}));if(c){var k=j["colorButton_"+e+"Style"];k.childRule=e=="back"?function(a){return f(a)}:function(a){return!(a.is("a")||a.getElementsByTag("a").count())||
f(a)};b.applyStyle(new CKEDITOR.style(k,{color:c}))}b.fire("saveSnapshot")}});k.push('<a class="cke_colorauto" _cke_focus=1 hidefocus=true title="',h.auto,'" onclick="CKEDITOR.tools.callFunction(',m,",null,'",c,"');return false;\" href=\"javascript:void('",h.auto,'\')" role="option"><table role="presentation" cellspacing=0 cellpadding=0 width="100%"><tr><td><span class="cke_colorbox" id="',e,'"></span></td><td colspan=7 align=center>',h.auto,'</td></tr></table></a><table role="presentation" cellspacing=0 cellpadding=0 width="100%">');
for(e=0;e<l.length;e++){e%8===0&&k.push("</tr><tr>");var o=l[e].split("/"),n=o[0],p=o[1]||n;o[1]||(n="#"+n.replace(/^(.)(.)(.)$/,"$1$1$2$2$3$3"));o=b.lang.colorbutton.colors[p]||p;k.push('<td><a class="cke_colorbox" _cke_focus=1 hidefocus=true title="',o,'" onclick="CKEDITOR.tools.callFunction(',m,",'",n,"','",c,"'); return false;\" href=\"javascript:void('",o,'\')" role="option"><span class="cke_colorbox" style="background-color:#',p,'"></span></a></td>')}(b.plugins.colordialog&&j.colorButton_enableMore===
void 0||j.colorButton_enableMore)&&k.push('</tr><tr><td colspan=8 align=center><a class="cke_colormore" _cke_focus=1 hidefocus=true title="',h.more,'" onclick="CKEDITOR.tools.callFunction(',m,",'?','",c,"');return false;\" href=\"javascript:void('",h.more,"')\"",' role="option">',h.more,"</a></td>");k.push("</tr></table>");return k.join("")}function f(a){return a.getAttribute("contentEditable")=="false"||a.getAttribute("data-nostyle")}var j=b.config,h=b.lang.colorbutton;if(!CKEDITOR.env.hc){c("TextColor",
"fore",h.textColorTitle,10);c("BGColor","back",h.bgColorTitle,20)}}}),CKEDITOR.config.colorButton_colors="000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF",CKEDITOR.config.colorButton_foreStyle={element:"span",styles:{color:"#(color)"},overrides:[{element:"font",attributes:{color:null}}]},
CKEDITOR.config.colorButton_backStyle={element:"span",styles:{"background-color":"#(color)"}},CKEDITOR.plugins.colordialog={requires:"dialog",init:function(b){b.addCommand("colordialog",new CKEDITOR.dialogCommand("colordialog"));CKEDITOR.dialog.add("colordialog",this.path+"dialogs/colordialog.js")}},CKEDITOR.plugins.add("colordialog",CKEDITOR.plugins.colordialog),CKEDITOR.plugins.add("menu",{requires:"floatpanel",beforeInit:function(b){for(var c=b.config.menu_groups.split(","),a=b._.menuGroups={},
f=b._.menuItems={},j=0;j<c.length;j++)a[c[j]]=j+1;b.addMenuGroup=function(b,c){a[b]=c||100};b.addMenuItem=function(b,c){a[c.group]&&(f[b]=new CKEDITOR.menuItem(this,b,c))};b.addMenuItems=function(a){for(var b in a)this.addMenuItem(b,a[b])};b.getMenuItem=function(a){return f[a]};b.removeMenuItem=function(a){delete f[a]}}}),function(){function b(a){a.sort(function(a,b){return a.group<b.group?-1:a.group>b.group?1:a.order<b.order?-1:a.order>b.order?1:0})}var c='<span class="cke_menuitem"><a id="{id}" class="cke_menubutton cke_menubutton__{name} cke_menubutton_{state} {cls}" href="{href}" title="{title}" tabindex="-1"_cke_focus=1 hidefocus="true" role="menuitem" aria-haspopup="{hasPopup}" aria-disabled="{disabled}" aria-pressed="{pressed}"';
if(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.mac)c=c+' onkeypress="return false;"';CKEDITOR.env.gecko&&(c=c+' onblur="this.style.cssText = this.style.cssText;"');var c=c+(' onmouseover="CKEDITOR.tools.callFunction({hoverFn},{index});" onmouseout="CKEDITOR.tools.callFunction({moveOutFn},{index});" '+(CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick")+'="CKEDITOR.tools.callFunction({clickFn},{index}); return false;">'),a=CKEDITOR.addTemplate("menuItem",c+'<span class="cke_menubutton_inner"><span class="cke_menubutton_icon"><span class="cke_button_icon cke_button__{name}_icon" style="{iconStyle}"></span></span><span class="cke_menubutton_label">{label}</span>{arrowHtml}</span></a></span>'),
f=CKEDITOR.addTemplate("menuArrow",'<span class="cke_menuarrow"><span>{label}</span></span>');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(a,b){b=this._.definition=b||{};this.id=CKEDITOR.tools.getNextId();this.editor=a;this.items=[];this._.listeners=[];this._.level=b.level||1;var c=CKEDITOR.tools.extend({},b.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level-1,block:{}}),f=c.block.attributes=c.attributes||{};!f.role&&(f.role="menu");this._.panelDefinition=c},_:{onShow:function(){var a=
this.editor.getSelection(),b=a&&a.getStartElement(),c=this.editor.elementPath(),f=this._.listeners;this.removeAll();for(var e=0;e<f.length;e++){var k=f[e](b,a,c);if(k)for(var l in k){var m=this.editor.getMenuItem(l);if(m&&(!m.command||this.editor.getCommand(m.command).state)){m.state=k[l];this.add(m)}}}},onClick:function(a){this.hide();if(a.onClick)a.onClick();else a.command&&this.editor.execCommand(a.command)},onEscape:function(a){var b=this.parent;b?b._.panel.hideChild(1):a==27&&this.hide(1);return false},
onHide:function(){this.onHide&&this.onHide()},showSubMenu:function(a){var b=this._.subMenu,c=this.items[a];if(c=c.getItems&&c.getItems()){if(b)b.removeAll();else{b=this._.subMenu=new CKEDITOR.menu(this.editor,CKEDITOR.tools.extend({},this._.definition,{level:this._.level+1},true));b.parent=this;b._.onClick=CKEDITOR.tools.bind(this._.onClick,this)}for(var f in c){var e=this.editor.getMenuItem(f);if(e){e.state=c[f];b.add(e)}}a=this._.panel.getBlock(this.id).element.getDocument().getById(this.id+(""+
a));b.show(a,2)}else this._.panel.hideChild(1)}},proto:{add:function(a){if(!a.order)a.order=this.items.length;this.items.push(a)},removeAll:function(){this.items=[]},show:function(a,c,d,f){if(!this.parent){this._.onShow();if(!this.items.length)return}var c=c||(this.editor.lang.dir=="rtl"?2:1),e=this.items,k=this.editor,l=this._.panel,m=this._.element;if(!l){l=this._.panel=new CKEDITOR.ui.floatPanel(this.editor,CKEDITOR.document.getBody(),this._.panelDefinition,this._.level);l.onEscape=CKEDITOR.tools.bind(function(a){if(this._.onEscape(a)===
false)return false},this);l.onShow=function(){l._.panel.getHolderElement().getParent().addClass("cke cke_reset_all")};l.onHide=CKEDITOR.tools.bind(function(){this._.onHide&&this._.onHide()},this);m=l.addBlock(this.id,this._.panelDefinition.block);m.autoSize=true;var o=m.keys;o[40]="next";o[9]="next";o[38]="prev";o[CKEDITOR.SHIFT+9]="prev";o[k.lang.dir=="rtl"?37:39]=CKEDITOR.env.ie?"mouseup":"click";o[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(o[13]="mouseup");m=this._.element=m.element;
o=m.getDocument();o.getBody().setStyle("overflow","hidden");o.getElementsByTag("html").getItem(0).setStyle("overflow","hidden");this._.itemOverFn=CKEDITOR.tools.addFunction(function(a){clearTimeout(this._.showSubTimeout);this._.showSubTimeout=CKEDITOR.tools.setTimeout(this._.showSubMenu,k.config.menu_subMenuDelay||400,this,[a])},this);this._.itemOutFn=CKEDITOR.tools.addFunction(function(){clearTimeout(this._.showSubTimeout)},this);this._.itemClickFn=CKEDITOR.tools.addFunction(function(a){var b=this.items[a];
if(b.state==CKEDITOR.TRISTATE_DISABLED)this.hide(1);else if(b.getItems)this._.showSubMenu(a);else this._.onClick(b)},this)}b(e);for(var o=k.container&&k.container.getChild(1),o=['<div class="cke_menu'+(o&&o.hasClass("cke_mixed_dir_content")?" cke_mixed_dir_content":"")+'" role="presentation">'],n=e.length,p=n&&e[0].group,s=0;s<n;s++){var u=e[s];if(p!=u.group){o.push('<div class="cke_menuseparator" role="separator"></div>');p=u.group}u.render(this,s,o)}o.push("</div>");m.setHtml(o.join(""));CKEDITOR.ui.fire("ready",
this);this.parent?this.parent._.panel.showAsChild(l,this.id,a,c,d,f):l.showBlock(this.id,a,c,d,f);k.fire("menuShow",[l])},addListener:function(a){this._.listeners.push(a)},hide:function(a){this._.onHide&&this._.onHide();this._.panel&&this._.panel.hide(a)}}});CKEDITOR.menuItem=CKEDITOR.tools.createClass({$:function(a,b,c){CKEDITOR.tools.extend(this,c,{order:0,className:"cke_menubutton__"+b});this.group=a._.menuGroups[this.group];this.editor=a;this.name=b},proto:{render:function(b,c,d){var g=typeof this.state==
"undefined"?CKEDITOR.TRISTATE_OFF:this.state,e=this.getItems,k="&#"+(this.editor.lang.dir=="rtl"?"9668":"9658")+";",b={id:b.id+(""+c),name:this.name,label:this.label,cls:this.className||"",state:g==CKEDITOR.TRISTATE_ON?"on":g==CKEDITOR.TRISTATE_DISABLED?"disabled":"off",hasPopup:e?"true":"false",disabled:g==CKEDITOR.TRISTATE_DISABLED,pressed:g==CKEDITOR.TRISTATE_ON,title:this.label,href:"javascript:void('"+(this.label||"").replace("'")+"')",hoverFn:b._.itemOverFn,moveOutFn:b._.itemOutFn,clickFn:b._.itemClickFn,
index:c,iconStyle:CKEDITOR.skin.getIconStyle(this.name,this.editor.lang.dir=="rtl",this.icon,this.iconOffset),arrowHtml:e?f.output({label:k}):""};a.output(b,d)}}})}(),CKEDITOR.config.menu_groups="clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div",CKEDITOR.plugins.add("contextmenu",{requires:"menu",onLoad:function(){CKEDITOR.plugins.contextMenu=CKEDITOR.tools.createClass({base:CKEDITOR.menu,
$:function(b){this.base.call(this,b,{panel:{className:"cke_menu_panel",attributes:{"aria-label":b.lang.contextmenu.options},zIndexOffset:-2}})},proto:{addTarget:function(b,c){if(CKEDITOR.env.opera&&!("oncontextmenu"in document.body)){var a;b.on("mousedown",function(f){f=f.data;if(f.$.button!=2)f.getKeystroke()==CKEDITOR.CTRL+1&&b.fire("contextmenu",f);else if(!c||!(CKEDITOR.env.mac?f.$.metaKey:f.$.ctrlKey)){var d=f.getTarget();if(!a){d=d.getDocument();a=d.createElement("input");a.$.type="button";
d.getBody().append(a)}a.setAttribute("style","position:absolute;top:"+(f.$.clientY-2)+"px;left:"+(f.$.clientX-2)+"px;width:5px;height:5px;opacity:0.01")}});b.on("mouseup",function(c){if(a){a.remove();a=void 0;b.fire("contextmenu",c.data)}})}b.on("contextmenu",function(a){a=a.data;if(!c||!(CKEDITOR.env.webkit?f:CKEDITOR.env.mac?a.$.metaKey:a.$.ctrlKey)){a.preventDefault();var b=a.getTarget().getDocument(),g=a.getTarget().getDocument().getDocumentElement(),e=!b.equals(CKEDITOR.document),b=b.getWindow().getScrollPosition(),
j=e?a.$.clientX:a.$.pageX||b.x+a.$.clientX,l=e?a.$.clientY:a.$.pageY||b.y+a.$.clientY;CKEDITOR.tools.setTimeout(function(){this.open(g,null,j,l)},CKEDITOR.env.ie?200:0,this)}},this);if(CKEDITOR.env.opera)b.on("keypress",function(a){a=a.data;a.$.keyCode===0&&a.preventDefault()});if(CKEDITOR.env.webkit){var f,j=function(){f=0};b.on("keydown",function(a){f=CKEDITOR.env.mac?a.data.$.metaKey:a.data.$.ctrlKey});b.on("keyup",j);b.on("contextmenu",j)}},open:function(b,c,a,f){this.editor.focus();b=b||CKEDITOR.document.getDocumentElement();
this.editor.selectionChange(1);this.show(b,c,a,f)}}})},beforeInit:function(b){var c=b.contextMenu=new CKEDITOR.plugins.contextMenu(b);b.on("contentDom",function(){c.addTarget(b.editable(),b.config.browserContextMenuOnCtrl!==false)});b.addCommand("contextMenu",{exec:function(){b.contextMenu.open(b.document.getBody())}});b.setKeystroke(CKEDITOR.CTRL+CKEDITOR.SHIFT+121,"contextMenu")}}),function(){CKEDITOR.plugins.add("div",{requires:"dialog",init:function(b){if(!b.blockless){var c=b.lang.div;b.addCommand("creatediv",
new CKEDITOR.dialogCommand("creatediv",{contextSensitive:true,refresh:function(a,b){this.setState("div"in(a.config.div_wrapTable?b.root:b.blockLimit).getDtd()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}}));b.addCommand("editdiv",new CKEDITOR.dialogCommand("editdiv"));b.addCommand("removediv",{exec:function(a){function b(c){if((c=CKEDITOR.plugins.div.getSurroundDiv(a,c))&&!c.data("cke-div-added")){e.push(c);c.data("cke-div-added")}}for(var c=a.getSelection(),h=c&&c.getRanges(),d,g=c.createBookmarks(),
e=[],k=0;k<h.length;k++){d=h[k];if(d.collapsed)b(c.getStartElement());else{d=new CKEDITOR.dom.walker(d);d.evaluator=b;d.lastForward()}}for(k=0;k<e.length;k++)e[k].remove(true);c.selectBookmarks(g)}});b.ui.addButton&&b.ui.addButton("CreateDiv",{label:c.toolbar,command:"creatediv",toolbar:"blocks,50"});if(b.addMenuItems){b.addMenuItems({editdiv:{label:c.edit,command:"editdiv",group:"div",order:1},removediv:{label:c.remove,command:"removediv",group:"div",order:5}});b.contextMenu&&b.contextMenu.addListener(function(a){return!a||
a.isReadOnly()?null:CKEDITOR.plugins.div.getSurroundDiv(b)?{editdiv:CKEDITOR.TRISTATE_OFF,removediv:CKEDITOR.TRISTATE_OFF}:null})}CKEDITOR.dialog.add("creatediv",this.path+"dialogs/div.js");CKEDITOR.dialog.add("editdiv",this.path+"dialogs/div.js")}}});CKEDITOR.plugins.div={getSurroundDiv:function(b,c){var a=b.elementPath(c);return b.elementPath(a.blockLimit).contains("div",1)}}}(),function(){var b={editorFocus:false,readOnly:1,exec:function(a){(a=CKEDITOR.document.getById(a._.elementsPath.idBase+
"0"))&&a.focus(CKEDITOR.env.ie||CKEDITOR.env.air)}},c='<span class="cke_path_empty"> </span>',a="";if(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.mac)a=a+' onkeypress="return false;"';CKEDITOR.env.gecko&&(a=a+' onblur="this.style.cssText = this.style.cssText;"');var f=CKEDITOR.addTemplate("pathItem",'<a id="{id}" href="{jsTitle}" tabindex="-1" class="cke_path_item" title="{label}"'+(CKEDITOR.env.gecko&&CKEDITOR.env.version<10900?' onfocus="event.preventBubble();"':"")+a+' hidefocus="true" onkeydown="return CKEDITOR.tools.callFunction({keyDownFn},{index}, event );" onclick="CKEDITOR.tools.callFunction({clickFn},{index}); return false;" role="button" aria-label="{label}">{text}</a>');
CKEDITOR.plugins.add("elementspath",{init:function(a){function h(b){a.focus();b=a._.elementsPath.list[b];if(b.equals(a.editable())){var c=a.createRange();c.selectNodeContents(b);c.select()}else a.getSelection().selectElement(b)}function d(){e&&e.setHtml(c);delete a._.elementsPath.list}var g=a.ui.spaceId("path"),e,k="cke_elementspath_"+CKEDITOR.tools.getNextNumber()+"_";a._.elementsPath={idBase:k,filters:[]};a.on("uiSpace",function(b){if(b.data.space=="bottom")b.data.html=b.data.html+('<span id="'+
g+'_label" class="cke_voice_label">'+a.lang.elementspath.eleLabel+'</span><span id="'+g+'" class="cke_path" role="group" aria-labelledby="'+g+'_label">'+c+"</span>")});a.on("uiReady",function(){var b=a.ui.space("path");b&&a.focusManager.add(b,1)});var l=CKEDITOR.tools.addFunction(h),m=CKEDITOR.tools.addFunction(function(b,c){var d=a._.elementsPath.idBase,e,c=new CKEDITOR.dom.event(c);e=a.lang.dir=="rtl";switch(c.getKeystroke()){case e?39:37:case 9:(e=CKEDITOR.document.getById(d+(b+1)))||(e=CKEDITOR.document.getById(d+
"0"));e.focus();return false;case e?37:39:case CKEDITOR.SHIFT+9:(e=CKEDITOR.document.getById(d+(b-1)))||(e=CKEDITOR.document.getById(d+(a._.elementsPath.list.length-1)));e.focus();return false;case 27:a.focus();return false;case 13:case 32:h(b);return false}return true});a.on("selectionChange",function(b){for(var d=a.editable(),h=b.data.selection.getStartElement(),b=[],s=a._.elementsPath.list=[],u=a._.elementsPath.filters;h;){var q=0,w;w=h.data("cke-display-name")?h.data("cke-display-name"):h.data("cke-real-element-type")?
h.data("cke-real-element-type"):h.getName();for(var B=0;B<u.length;B++){var z=u[B](h,w);if(z===false){q=1;break}w=z||w}if(!q){q=s.push(h)-1;B=a.lang.elementspath.eleTitle.replace(/%1/,w);w=f.output({id:k+q,label:B,text:w,jsTitle:"javascript:void('"+w+"')",index:q,keyDownFn:m,clickFn:l});b.unshift(w)}if(h.equals(d))break;h=h.getParent()}e||(e=CKEDITOR.document.getById(g));d=e;d.setHtml(b.join("")+c);a.fire("elementsPathUpdate",{space:d})});a.on("readOnly",d);a.on("contentDomUnload",d);a.addCommand("elementsPathFocus",
b);a.setKeystroke(CKEDITOR.ALT+122,"elementsPathFocus")}})}(),function(){function b(a,b,c){function d(c){if((k=j[c?"getFirst":"getLast"]())&&(!k.is||!k.isBlockBoundary())&&(l=b.root[c?"getPrevious":"getNext"](CKEDITOR.dom.walker.invisible(true)))&&(!l.is||!l.isBlockBoundary({br:1})))a.document.createElement("br")[c?"insertBefore":"insertAfter"](k)}for(var e=CKEDITOR.plugins.list.listToArray(b.root,c),f=[],g=0;g<b.contents.length;g++){var h=b.contents[g];if((h=h.getAscendant("li",true))&&!h.getCustomData("list_item_processed")){f.push(h);
CKEDITOR.dom.element.setMarker(c,h,"list_item_processed",true)}}h=null;for(g=0;g<f.length;g++){h=f[g].getCustomData("listarray_index");e[h].indent=-1}for(g=h+1;g<e.length;g++)if(e[g].indent>e[g-1].indent+1){f=e[g-1].indent+1-e[g].indent;for(h=e[g].indent;e[g]&&e[g].indent>=h;){e[g].indent=e[g].indent+f;g++}g--}var j=CKEDITOR.plugins.list.arrayToList(e,c,null,a.config.enterMode,b.root.getAttribute("dir")).listNode,k,l;d(true);d();j.replace(b.root)}function c(a,b){this.name=a;this.context=this.type=
b}function a(a,b,c,d){for(var e,f;e=a[d?"getLast":"getFirst"](n);){(f=e.getDirection(1))!==b.getDirection(1)&&e.setAttribute("dir",f);e.remove();c?e[d?"insertBefore":"insertAfter"](c):b.append(e,d)}}function f(b){var c;(c=function(c){var d=b[c?"getPrevious":"getNext"](l);if(d&&d.type==CKEDITOR.NODE_ELEMENT&&d.is(b.getName())){a(b,d,null,!c);b.remove();b=d}})();c(1)}function j(a){return a.type==CKEDITOR.NODE_ELEMENT&&(a.getName()in CKEDITOR.dtd.$block||a.getName()in CKEDITOR.dtd.$listItem)&&CKEDITOR.dtd[a.getName()]["#"]}
function h(b,c,e){b.fire("saveSnapshot");e.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);var g=e.extractContents();c.trim(false,true);var h=c.createBookmark(),j=new CKEDITOR.dom.elementPath(c.startContainer),k=j.block,j=j.lastElement.getAscendant("li",1)||k,n=new CKEDITOR.dom.elementPath(e.startContainer),o=n.contains(CKEDITOR.dtd.$listItem),n=n.contains(CKEDITOR.dtd.$list);if(k)(k=k.getBogus())&&k.remove();else if(n)(k=n.getPrevious(l))&&m(k)&&k.remove();(k=g.getLast())&&(k.type==CKEDITOR.NODE_ELEMENT&&
k.is("br"))&&k.remove();(k=c.startContainer.getChild(c.startOffset))?g.insertBefore(k):c.startContainer.append(g);if(o)if(g=d(o))if(j.contains(o)){a(g,o.getParent(),o);g.remove()}else j.append(g);for(;e.checkStartOfBlock()&&e.checkEndOfBlock();){n=e.startPath();g=n.block;if(g.is("li")){j=g.getParent();g.equals(j.getLast(l))&&g.equals(j.getFirst(l))&&(g=j)}e.moveToPosition(g,CKEDITOR.POSITION_BEFORE_START);g.remove()}e=e.clone();g=b.editable();e.setEndAt(g,CKEDITOR.POSITION_BEFORE_END);e=new CKEDITOR.dom.walker(e);
e.evaluator=function(a){return l(a)&&!m(a)};(e=e.next())&&(e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in CKEDITOR.dtd.$list)&&f(e);c.moveToBookmark(h);c.select();b.fire("saveSnapshot")}function d(a){return(a=a.getLast(l))&&a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in g?a:null}var g={ol:1,ul:1},e=CKEDITOR.dom.walker.whitespaces(),k=CKEDITOR.dom.walker.bookmark(),l=function(a){return!(e(a)||k(a))},m=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list={listToArray:function(a,b,c,d,e){if(!g[a.getName()])return[];
d||(d=0);c||(c=[]);for(var f=0,h=a.getChildCount();f<h;f++){var k=a.getChild(f);k.type==CKEDITOR.NODE_ELEMENT&&k.getName()in CKEDITOR.dtd.$list&&CKEDITOR.plugins.list.listToArray(k,b,c,d+1);if(k.$.nodeName.toLowerCase()=="li"){var j={parent:a,indent:d,element:k,contents:[]};if(e)j.grandparent=e;else{j.grandparent=a.getParent();if(j.grandparent&&j.grandparent.$.nodeName.toLowerCase()=="li")j.grandparent=j.grandparent.getParent()}b&&CKEDITOR.dom.element.setMarker(b,k,"listarray_index",c.length);c.push(j);
for(var l=0,n=k.getChildCount(),m;l<n;l++){m=k.getChild(l);m.type==CKEDITOR.NODE_ELEMENT&&g[m.getName()]?CKEDITOR.plugins.list.listToArray(m,b,c,d+1,j.grandparent):j.contents.push(m)}}}return c},arrayToList:function(a,b,c,d,e){c||(c=0);if(!a||a.length<c+1)return null;for(var f,h=a[c].parent.getDocument(),k=new CKEDITOR.dom.documentFragment(h),j=null,n=c,m=Math.max(a[c].indent,0),o=null,y,A,G=d==CKEDITOR.ENTER_P?"p":"div";;){var D=a[n];f=D.grandparent;y=D.element.getDirection(1);if(D.indent==m){if(!j||
a[n].parent.getName()!=j.getName()){j=a[n].parent.clone(false,1);e&&j.setAttribute("dir",e);k.append(j)}o=j.append(D.element.clone(0,1));y!=j.getDirection(1)&&o.setAttribute("dir",y);for(f=0;f<D.contents.length;f++)o.append(D.contents[f].clone(1,1));n++}else if(D.indent==Math.max(m,0)+1){A=a[n-1].element.getDirection(1);n=CKEDITOR.plugins.list.arrayToList(a,null,n,d,A!=y?y:null);!o.getChildCount()&&(CKEDITOR.env.ie&&!(h.$.documentMode>7))&&o.append(h.createText(" "));o.append(n.listNode);n=n.nextIndex}else if(D.indent==
-1&&!c&&f){if(g[f.getName()]){o=D.element.clone(false,true);y!=f.getDirection(1)&&o.setAttribute("dir",y)}else o=new CKEDITOR.dom.documentFragment(h);var j=f.getDirection(1)!=y,E=D.element,M=E.getAttribute("class"),I=E.getAttribute("style"),H=o.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(d!=CKEDITOR.ENTER_BR||j||I||M),F,K=D.contents.length;for(f=0;f<K;f++){F=D.contents[f];if(F.type==CKEDITOR.NODE_ELEMENT&&F.isBlockBoundary()){j&&!F.getDirection()&&F.setAttribute("dir",y);var J=F,N=E.getAttribute("style");
N&&J.setAttribute("style",N.replace(/([^;])$/,"$1;")+(J.getAttribute("style")||""));M&&F.addClass(M)}else if(H){if(!A){A=h.createElement(G);j&&A.setAttribute("dir",y)}I&&A.setAttribute("style",I);M&&A.setAttribute("class",M);A.append(F.clone(1,1))}o.append(A||F.clone(1,1))}if(o.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&n!=a.length-1){(y=o.getLast())&&(y.type==CKEDITOR.NODE_ELEMENT&&y.getAttribute("type")=="_moz")&&y.remove();(!o.getLast(l)||!(y.type==CKEDITOR.NODE_ELEMENT&&y.getName()in CKEDITOR.dtd.$block))&&
o.append(h.createElement("br"))}y=o.$.nodeName.toLowerCase();!CKEDITOR.env.ie&&(y=="div"||y=="p")&&o.appendBogus();k.append(o);j=null;n++}else return null;A=null;if(a.length<=n||Math.max(a[n].indent,0)<m)break}if(b)for(a=k.getFirst();a;){if(a.type==CKEDITOR.NODE_ELEMENT){CKEDITOR.dom.element.clearMarkers(b,a);if(a.getName()in CKEDITOR.dtd.$listItem){c=a;h=e=d=void 0;if(d=c.getDirection()){for(e=c.getParent();e&&!(h=e.getDirection());)e=e.getParent();d==h&&c.removeAttribute("dir")}}}a=a.getNextSourceNode()}return{listNode:k,
nextIndex:n}}};var o=/^h[1-6]$/,n=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT);c.prototype={exec:function(a){this.refresh(a,a.elementPath());var c=a.config,d=a.getSelection(),e=d&&d.getRanges(true);if(this.state==CKEDITOR.TRISTATE_OFF){var h=a.editable();if(h.getFirst(l)){var j=e.length==1&&e[0];(c=j&&j.getEnclosedNode())&&(c.is&&this.type==c.getName())&&this.setState(CKEDITOR.TRISTATE_ON)}else{c.enterMode==CKEDITOR.ENTER_BR?h.appendBogus():e[0].fixBlock(1,c.enterMode==CKEDITOR.ENTER_P?"p":
"div");d.selectRanges(e)}}for(var c=d.createBookmarks(true),h=[],k={},e=e.createIterator(),n=0;(j=e.getNextRange())&&++n;){var m=j.getBoundaryNodes(),t=m.startNode,x=m.endNode;t.type==CKEDITOR.NODE_ELEMENT&&t.getName()=="td"&&j.setStartAt(m.startNode,CKEDITOR.POSITION_AFTER_START);x.type==CKEDITOR.NODE_ELEMENT&&x.getName()=="td"&&j.setEndAt(m.endNode,CKEDITOR.POSITION_BEFORE_END);j=j.createIterator();for(j.forceBrBreak=this.state==CKEDITOR.TRISTATE_OFF;m=j.getNextParagraph();)if(!m.getCustomData("list_block")){CKEDITOR.dom.element.setMarker(k,
m,"list_block",1);for(var C=a.elementPath(m),t=C.elements,x=0,C=C.blockLimit,y,A=t.length-1;A>=0&&(y=t[A]);A--)if(g[y.getName()]&&C.contains(y)){C.removeCustomData("list_group_object_"+n);if(t=y.getCustomData("list_group_object"))t.contents.push(m);else{t={root:y,contents:[m]};h.push(t);CKEDITOR.dom.element.setMarker(k,y,"list_group_object",t)}x=1;break}if(!x){x=C;if(x.getCustomData("list_group_object_"+n))x.getCustomData("list_group_object_"+n).contents.push(m);else{t={root:x,contents:[m]};CKEDITOR.dom.element.setMarker(k,
x,"list_group_object_"+n,t);h.push(t)}}}}for(y=[];h.length>0;){t=h.shift();if(this.state==CKEDITOR.TRISTATE_OFF)if(g[t.root.getName()]){m=a;e=t;t=k;n=y;x=CKEDITOR.plugins.list.listToArray(e.root,t);C=[];for(j=0;j<e.contents.length;j++){A=e.contents[j];if((A=A.getAscendant("li",true))&&!A.getCustomData("list_item_processed")){C.push(A);CKEDITOR.dom.element.setMarker(t,A,"list_item_processed",true)}}for(var A=e.root.getDocument(),G=void 0,D=void 0,j=0;j<C.length;j++){var E=C[j].getCustomData("listarray_index"),
G=x[E].parent;if(!G.is(this.type)){D=A.createElement(this.type);G.copyAttributes(D,{start:1,type:1});D.removeStyle("list-style-type");x[E].parent=D}}m=CKEDITOR.plugins.list.arrayToList(x,t,null,m.config.enterMode);t=void 0;x=m.listNode.getChildCount();for(j=0;j<x&&(t=m.listNode.getChild(j));j++)t.getName()==this.type&&n.push(t);m.listNode.replace(e.root)}else{x=a;m=t;j=y;C=m.contents;e=m.root.getDocument();n=[];if(C.length==1&&C[0].equals(m.root)){t=e.createElement("div");C[0].moveChildren&&C[0].moveChildren(t);
C[0].append(t);C[0]=t}m=m.contents[0].getParent();for(A=0;A<C.length;A++)m=m.getCommonAncestor(C[A].getParent());G=x.config.useComputedState;x=t=void 0;G=G===void 0||G;for(A=0;A<C.length;A++)for(D=C[A];E=D.getParent();){if(E.equals(m)){n.push(D);!x&&D.getDirection()&&(x=1);D=D.getDirection(G);t!==null&&(t=t&&t!=D?null:D);break}D=E}if(!(n.length<1)){C=n[n.length-1].getNext();A=e.createElement(this.type);j.push(A);for(G=j=void 0;n.length;){j=n.shift();G=e.createElement("li");if(j.is("pre")||o.test(j.getName()))j.appendTo(G);
else{j.copyAttributes(G);if(t&&j.getDirection()){G.removeStyle("direction");G.removeAttribute("dir")}j.moveChildren(G);j.remove()}G.appendTo(A)}t&&x&&A.setAttribute("dir",t);C?A.insertBefore(C):A.appendTo(m)}}else this.state==CKEDITOR.TRISTATE_ON&&g[t.root.getName()]&&b.call(this,a,t,k)}for(A=0;A<y.length;A++)f(y[A]);CKEDITOR.dom.element.clearAllMarkers(k);d.selectBookmarks(c);a.focus()},refresh:function(a,b){var c=b.blockLimit||b.root,d=b.contains(this.type,1);d&&c.contains(d)?this.setState(CKEDITOR.TRISTATE_ON):
this.setState(CKEDITOR.TRISTATE_OFF)}};CKEDITOR.plugins.add("list",{init:function(a){if(!a.blockless){a.addCommand("numberedlist",new c("numberedlist","ol"));a.addCommand("bulletedlist",new c("bulletedlist","ul"));if(a.ui.addButton){a.ui.addButton("NumberedList",{label:a.lang.list.numberedlist,command:"numberedlist",directional:true,toolbar:"list,10"});a.ui.addButton("BulletedList",{label:a.lang.list.bulletedlist,command:"bulletedlist",directional:true,toolbar:"list,20"})}a.on("key",function(b){var c=
b.data.keyCode;if(a.mode=="wysiwyg"&&c in{8:1,46:1}){var e=a.getSelection().getRanges()[0],f=e.startPath();if(e.collapsed){var f=new CKEDITOR.dom.elementPath(e.startContainer),k=c==8,n=a.editable(),o=new CKEDITOR.dom.walker(e.clone());o.evaluator=function(a){return l(a)&&!m(a)};o.guard=function(a,b){return!(b&&a.type==CKEDITOR.NODE_ELEMENT&&a.is("table"))};c=e.clone();if(k){var v,t;if((v=f.contains(g))&&e.checkBoundaryOfElement(v,CKEDITOR.START)&&(v=v.getParent())&&v.is("li")&&(v=d(v))){t=v;v=v.getPrevious(l);
c.moveToPosition(v&&m(v)?v:t,CKEDITOR.POSITION_BEFORE_START)}else{o.range.setStartAt(n,CKEDITOR.POSITION_AFTER_START);o.range.setEnd(e.startContainer,e.startOffset);if((v=o.previous())&&v.type==CKEDITOR.NODE_ELEMENT&&(v.getName()in g||v.is("li"))){if(!v.is("li")){o.range.selectNodeContents(v);o.reset();o.evaluator=j;v=o.previous()}t=v;c.moveToElementEditEnd(t)}}if(t){h(a,c,e);b.cancel()}else if((c=f.contains(g))&&e.checkBoundaryOfElement(c,CKEDITOR.START)){t=c.getFirst(l);if(e.checkBoundaryOfElement(t,
CKEDITOR.START)){v=c.getPrevious(l);if(d(t)){if(v){e.moveToElementEditEnd(v);e.select()}}else a.execCommand("outdent");b.cancel()}}}else if(t=f.contains("li")){o.range.setEndAt(n,CKEDITOR.POSITION_BEFORE_END);n=(f=t.getLast(l))&&j(f)?f:t;t=0;if((v=o.next())&&v.type==CKEDITOR.NODE_ELEMENT&&v.getName()in g&&v.equals(f)){t=1;v=o.next()}else e.checkBoundaryOfElement(n,CKEDITOR.END)&&(t=1);if(t&&v){e=e.clone();e.moveToElementEditStart(v);h(a,c,e);b.cancel()}}else{o.range.setEndAt(n,CKEDITOR.POSITION_BEFORE_END);
if((v=o.next())&&v.type==CKEDITOR.NODE_ELEMENT&&v.is(g)){v=v.getFirst(l);if(f.block&&e.checkStartOfBlock()&&e.checkEndOfBlock()){f.block.remove();e.moveToElementEditStart(v);e.select()}else if(d(v)){e.moveToElementEditStart(v);e.select()}else{e=e.clone();e.moveToElementEditStart(v);h(a,c,e)}b.cancel()}}setTimeout(function(){a.selectionChange(1)})}}})}}})}(),function(){function b(a,b){this.name=b;if(this.useIndentClasses=a.config.indentClasses&&a.config.indentClasses.length>0){this.classNameRegex=
RegExp("(?:^|\\s+)("+a.config.indentClasses.join("|")+")(?=$|\\s)");this.indentClassMap={};for(var c=0;c<a.config.indentClasses.length;c++)this.indentClassMap[a.config.indentClasses[c]]=c+1}this.startDisabled=b=="outdent"}function c(a,b){return(b||a.getComputedStyle("direction"))=="ltr"?"margin-left":"margin-right"}function a(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is("li")}var f={ol:1,ul:1},j=CKEDITOR.dom.walker.whitespaces(true),h=CKEDITOR.dom.walker.bookmark(false,true);b.prototype={context:"p",
refresh:function(a,b){var e=b&&b.contains(f),h=b.block||b.blockLimit;if(e)this.setState(CKEDITOR.TRISTATE_OFF);else if(!this.useIndentClasses&&this.name=="indent")this.setState(CKEDITOR.TRISTATE_OFF);else if(h)if(this.useIndentClasses){e=h.$.className.match(this.classNameRegex);h=0;if(e){e=e[1];h=this.indentClassMap[e]}this.name=="outdent"&&!h||this.name=="indent"&&h==a.config.indentClasses.length?this.setState(CKEDITOR.TRISTATE_DISABLED):this.setState(CKEDITOR.TRISTATE_OFF)}else{e=parseInt(h.getStyle(c(h)),
10);isNaN(e)&&(e=0);e<=0?this.setState(CKEDITOR.TRISTATE_DISABLED):this.setState(CKEDITOR.TRISTATE_OFF)}else this.setState(CKEDITOR.TRISTATE_DISABLED)},exec:function(b){function g(a){for(var c=p.startContainer,e=p.endContainer;c&&!c.getParent().equals(a);)c=c.getParent();for(;e&&!e.getParent().equals(a);)e=e.getParent();if(c&&e){for(var g=c,c=[],k=false;!k;){g.equals(e)&&(k=true);c.push(g);g=g.getNext()}if(!(c.length<1)){g=a.getParents(true);for(e=0;e<g.length;e++)if(g[e].getName&&f[g[e].getName()]){a=
g[e];break}for(var g=l.name=="indent"?1:-1,e=c[0],c=c[c.length-1],k=CKEDITOR.plugins.list.listToArray(a,m),n=k[c.getCustomData("listarray_index")].indent,e=e.getCustomData("listarray_index");e<=c.getCustomData("listarray_index");e++){k[e].indent=k[e].indent+g;if(g>0){var o=k[e].parent;k[e].parent=new CKEDITOR.dom.element(o.getName(),o.getDocument())}}for(e=c.getCustomData("listarray_index")+1;e<k.length&&k[e].indent>n;e++)k[e].indent=k[e].indent+g;c=CKEDITOR.plugins.list.arrayToList(k,m,null,b.config.enterMode,
a.getDirection());if(l.name=="outdent"){var s;if((s=a.getParent())&&s.is("li"))for(var g=c.listNode.getChildren(),q=[],u,e=g.count()-1;e>=0;e--)(u=g.getItem(e))&&(u.is&&u.is("li"))&&q.push(u)}c&&c.listNode.replace(a);if(q&&q.length)for(e=0;e<q.length;e++){for(u=a=q[e];(u=u.getNext())&&u.is&&u.getName()in f;){CKEDITOR.env.ie&&!a.getFirst(function(a){return j(a)&&h(a)})&&a.append(p.document.createText(" "));a.append(u)}a.insertAfter(s)}}}}function e(){var a=p.createIterator(),c=b.config.enterMode;a.enforceRealBlocks=
true;a.enlargeBr=c!=CKEDITOR.ENTER_BR;for(var e;e=a.getNextParagraph(c==CKEDITOR.ENTER_P?"p":"div");)k(e)}function k(a,e){if(a.getCustomData("indent_processed"))return false;if(l.useIndentClasses){var f=a.$.className.match(l.classNameRegex),g=0;if(f){f=f[1];g=l.indentClassMap[f]}l.name=="outdent"?g--:g++;if(g<0)return false;g=Math.min(g,b.config.indentClasses.length);g=Math.max(g,0);a.$.className=CKEDITOR.tools.ltrim(a.$.className.replace(l.classNameRegex,""));g>0&&a.addClass(b.config.indentClasses[g-
1])}else{f=c(a,e);g=parseInt(a.getStyle(f),10);isNaN(g)&&(g=0);var h=b.config.indentOffset||40,g=g+(l.name=="indent"?1:-1)*h;if(g<0)return false;g=Math.max(g,0);g=Math.ceil(g/h)*h;a.setStyle(f,g?g+(b.config.indentUnit||"px"):"");a.getAttribute("style")===""&&a.removeAttribute("style")}CKEDITOR.dom.element.setMarker(m,a,"indent_processed",1);return true}for(var l=this,m={},o=b.getSelection(),n=o.createBookmarks(1),p,s=(o&&o.getRanges(1)).createIterator();p=s.getNextRange();){for(var u=p.getCommonAncestor();u&&
!(u.type==CKEDITOR.NODE_ELEMENT&&f[u.getName()]);)u=u.getParent();if(!u){var q=p.getEnclosedNode();if(q&&q.type==CKEDITOR.NODE_ELEMENT&&q.getName()in f){p.setStartAt(q,CKEDITOR.POSITION_AFTER_START);p.setEndAt(q,CKEDITOR.POSITION_BEFORE_END);u=q}}if(u&&p.startContainer.type==CKEDITOR.NODE_ELEMENT&&p.startContainer.getName()in f){q=new CKEDITOR.dom.walker(p);q.evaluator=a;p.startContainer=q.next()}if(u&&p.endContainer.type==CKEDITOR.NODE_ELEMENT&&p.endContainer.getName()in f){q=new CKEDITOR.dom.walker(p);
q.evaluator=a;p.endContainer=q.previous()}if(u){var q=u.getFirst(a),w=!!q.getNext(a),B=p.startContainer;(!q.equals(B)&&!q.contains(B)||!(l.name=="indent"||l.useIndentClasses||parseInt(u.getStyle(c(u)),10))||!k(u,!w&&q.getDirection()))&&g(u)}else e()}CKEDITOR.dom.element.clearAllMarkers(m);b.forceNextSelectionCheck();o.selectBookmarks(n)}};CKEDITOR.plugins.add("indent",{requires:"list",onLoad:function(){(CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat)&&CKEDITOR.addCss(".cke_editable ul,.cke_editable ol{\tmargin-left: 0px;\tpadding-left: 40px;}")},
init:function(a){if(!a.blockless){a.addCommand("indent",new b(a,"indent"));a.addCommand("outdent",new b(a,"outdent"));if(a.ui.addButton){a.ui.addButton("Indent",{label:a.lang.indent.indent,command:"indent",directional:true,toolbar:"indent,20"});a.ui.addButton("Outdent",{label:a.lang.indent.outdent,command:"outdent",directional:true,toolbar:"indent,10"})}a.on("dirChanged",function(b){var c=a.createRange();c.setStartBefore(b.data.node);c.setEndAfter(b.data.node);for(var f=new CKEDITOR.dom.walker(c),
h;h=f.next();)if(h.type==CKEDITOR.NODE_ELEMENT)if(!h.equals(b.data.node)&&h.getDirection()){c.setStartAfter(h);f=new CKEDITOR.dom.walker(c)}else{var j=a.config.indentClasses;if(j)for(var o=b.data.dir=="ltr"?["_rtl",""]:["","_rtl"],n=0;n<j.length;n++)if(h.hasClass(j[n]+o[0])){h.removeClass(j[n]+o[0]);h.addClass(j[n]+o[1])}j=h.getStyle("margin-right");o=h.getStyle("margin-left");j?h.setStyle("margin-left",j):h.removeStyle("margin-left");o?h.setStyle("margin-right",o):h.removeStyle("margin-right")}})}}})}(),
function(){function b(a,b,c){c=a.config.forceEnterMode||c;if(a.mode!="wysiwyg")return false;if(!b)b=a.config.enterMode;if(!a.elementPath().isContextFor("p")){b=CKEDITOR.ENTER_BR;c=1}a.fire("saveSnapshot");b==CKEDITOR.ENTER_BR?h(a,b,null,c):d(a,b,null,c);a.fire("saveSnapshot");return true}function c(a){for(var a=a.getSelection().getRanges(true),b=a.length-1;b>0;b--)a[b].deleteContents();return a[0]}CKEDITOR.plugins.add("enterkey",{requires:"indent",init:function(a){a.addCommand("enter",{modes:{wysiwyg:1},
editorFocus:false,exec:function(a){b(a)}});a.addCommand("shiftEnter",{modes:{wysiwyg:1},editorFocus:false,exec:function(a){a.mode=="wysiwyg"&&b(a,a.config.shiftEnterMode,1)}});a.setKeystroke([[13,"enter"],[CKEDITOR.SHIFT+13,"shiftEnter"]])}});var a=CKEDITOR.dom.walker.whitespaces(),f=CKEDITOR.dom.walker.bookmark();CKEDITOR.plugins.enterkey={enterBlock:function(b,d,j,m){if(j=j||c(b)){var o=j.document,n=j.checkStartOfBlock(),p=j.checkEndOfBlock(),s=b.elementPath(j.startContainer).block;if(n&&p){if(s&&
(s.is("li")||s.getParent().is("li"))){b.execCommand("outdent");return}if(s&&s.getParent().is("blockquote")){s.breakParent(s.getParent());s.getPrevious().getFirst(CKEDITOR.dom.walker.invisible(1))||s.getPrevious().remove();s.getNext().getFirst(CKEDITOR.dom.walker.invisible(1))||s.getNext().remove();j.moveToElementEditStart(s);j.select();return}}else if(s&&s.is("pre")&&!p){h(b,d,j,m);return}var s=d==CKEDITOR.ENTER_DIV?"div":"p",u=j.splitBlock(s);if(u){var d=u.previousBlock,b=u.nextBlock,n=u.wasStartOfBlock,
p=u.wasEndOfBlock,q;if(b){q=b.getParent();if(q.is("li")){b.breakParent(q);b.move(b.getNext(),1)}}else if(d&&(q=d.getParent())&&q.is("li")){d.breakParent(q);q=d.getNext();j.moveToElementEditStart(q);d.move(d.getPrevious())}if(!n&&!p){if(b.is("li")){m=j.clone();m.selectNodeContents(b);m=new CKEDITOR.dom.walker(m);m.evaluator=function(b){return!(f(b)||a(b)||b.type==CKEDITOR.NODE_ELEMENT&&b.getName()in CKEDITOR.dtd.$inline&&!(b.getName()in CKEDITOR.dtd.$empty))};(q=m.next())&&(q.type==CKEDITOR.NODE_ELEMENT&&
q.is("ul","ol"))&&(CKEDITOR.env.ie?o.createText(" "):o.createElement("br")).insertBefore(q)}b&&j.moveToElementEditStart(b)}else{var w,B;if(d){if(d.is("li")||!g.test(d.getName())&&!d.is("pre"))w=d.clone()}else b&&(w=b.clone());if(w)m&&!w.is("li")&&w.renameNode(s);else if(q&&q.is("li"))w=q;else{w=o.createElement(s);d&&(B=d.getDirection())&&w.setAttribute("dir",B)}if(m=u.elementPath){q=0;for(B=m.elements.length;q<B;q++){s=m.elements[q];if(s.equals(m.block)||s.equals(m.blockLimit))break;if(CKEDITOR.dtd.$removeEmpty[s.getName()]){s=
s.clone();w.moveChildren(s);w.append(s)}}}CKEDITOR.env.ie||w.appendBogus();w.getParent()||j.insertNode(w);w.is("li")&&w.removeAttribute("value");if(CKEDITOR.env.ie&&n&&(!p||!d.getChildCount())){j.moveToElementEditStart(p?d:w);j.select()}j.moveToElementEditStart(n&&!p?b:w)}if(!CKEDITOR.env.ie)if(b){o=o.createElement("span");o.setHtml(" ");j.insertNode(o);o.scrollIntoView();j.deleteContents()}else w.scrollIntoView();j.select()}}},enterBr:function(a,b,f,h){if(f=f||c(a)){var j=f.document,n=f.checkEndOfBlock(),
p=new CKEDITOR.dom.elementPath(a.getSelection().getStartElement()),s=p.block,p=s&&p.block.getName();if(!h&&p=="li")d(a,b,f,h);else{if(!h&&n&&g.test(p))if(n=s.getDirection()){j=j.createElement("div");j.setAttribute("dir",n);j.insertAfter(s);f.setStart(j,0)}else{j.createElement("br").insertAfter(s);CKEDITOR.env.gecko&&j.createText("").insertAfter(s);f.setStartAt(s.getNext(),CKEDITOR.env.ie?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_START)}else{s=p=="pre"&&!CKEDITOR.env.gecko?j.createText(CKEDITOR.env.ie?
"\r":"\n"):j.createElement("br");f.deleteContents();f.insertNode(s);if(CKEDITOR.env.ie)f.setStartAt(s,CKEDITOR.POSITION_AFTER_END);else{j.createText("").insertAfter(s);n&&s.getParent().appendBogus();s.getNext().$.nodeValue="";f.setStartAt(s.getNext(),CKEDITOR.POSITION_AFTER_START);n=null;if(CKEDITOR.env.gecko)n=j.createElement("br");else{n=j.createElement("span");n.setHtml(" ")}n.insertBefore(s.getNext());n.scrollIntoView();n.remove()}}f.collapse(true);f.select()}}}};var j=CKEDITOR.plugins.enterkey,
h=j.enterBr,d=j.enterBlock,g=/^h[1-6]$/}(),function(){function b(b,a){var f={},j=[],h={nbsp:" ",shy:"",gt:">",lt:"<",amp:"&",apos:"'",quot:'"'},b=b.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(b,c){var d=a?"&"+c+";":h[c];f[d]=a?h[c]:"&"+c+";";j.push(d);return""});if(!a&&b){var b=b.split(","),d=document.createElement("div"),g;d.innerHTML="&"+b.join(";&")+";";g=d.innerHTML;d=null;for(d=0;d<g.length;d++){var e=g.charAt(d);f[e]="&"+b[d]+";";j.push(e)}}f.regex=j.join(a?"|":"");return f}
CKEDITOR.plugins.add("entities",{afterInit:function(c){var a=c.config;if(c=(c=c.dataProcessor)&&c.htmlFilter){var f=[];a.basicEntities!==false&&f.push("nbsp,gt,lt,amp");if(a.entities){f.length&&f.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");
a.entities_latin&&f.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");a.entities_greek&&f.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");
a.entities_additional&&f.push(a.entities_additional)}var j=b(f.join(",")),h=j.regex?"["+j.regex+"]":"a^";delete j.regex;a.entities&&a.entities_processNumerical&&(h="[^ -~]|"+h);var h=RegExp(h,"g"),d=function(b){return a.entities_processNumerical=="force"||!j[b]?"&#"+b.charCodeAt(0)+";":j[b]},g=b("nbsp,gt,lt,amp,shy",true),e=RegExp(g.regex,"g"),k=function(a){return g[a]};c.addRules({text:function(a){return a.replace(e,k).replace(h,d)}})}}})}(),CKEDITOR.config.basicEntities=!0,CKEDITOR.config.entities=
!0,CKEDITOR.config.entities_latin=!0,CKEDITOR.config.entities_greek=!0,CKEDITOR.config.entities_additional="#39",CKEDITOR.plugins.add("popup"),CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{popup:function(b,c,a,f){c=c||"80%";a=a||"70%";typeof c=="string"&&(c.length>1&&c.substr(c.length-1,1)=="%")&&(c=parseInt(window.screen.width*parseInt(c,10)/100,10));typeof a=="string"&&(a.length>1&&a.substr(a.length-1,1)=="%")&&(a=parseInt(window.screen.height*parseInt(a,10)/100,10));c<640&&(c=640);a<420&&(a=
420);var j=parseInt((window.screen.height-a)/2,10),h=parseInt((window.screen.width-c)/2,10),f=(f||"location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes")+",width="+c+",height="+a+",top="+j+",left="+h,d=window.open("",null,f,true);if(!d)return false;try{if(navigator.userAgent.toLowerCase().indexOf(" chrome/")==-1){d.moveTo(h,j);d.resizeTo(c,a)}d.focus();d.location.href=b}catch(g){window.open(b,null,f,true)}return true}}),function(){function b(a,
b){var c=[];if(b)for(var d in b)c.push(d+"="+encodeURIComponent(b[d]));else return a;return a+(a.indexOf("?")!=-1?"&":"?")+c.join("&")}function c(a){a=a+"";return a.charAt(0).toUpperCase()+a.substr(1)}function a(){var a=this.getDialog(),d=a.getParentEditor();d._.filebrowserSe=this;var f=d.config["filebrowser"+c(a.getName())+"WindowWidth"]||d.config.filebrowserWindowWidth||"80%",a=d.config["filebrowser"+c(a.getName())+"WindowHeight"]||d.config.filebrowserWindowHeight||"70%",g=this.filebrowser.params||
{};g.CKEditor=d.name;g.CKEditorFuncNum=d._.filebrowserFn;if(!g.langCode)g.langCode=d.langCode;g=b(this.filebrowser.url,g);d.popup(g,f,a,d.config.filebrowserWindowFeatures||d.config.fileBrowserWindowFeatures)}function f(){var a=this.getDialog();a.getParentEditor()._.filebrowserSe=this;return!a.getContentElement(this["for"][0],this["for"][1]).getInputElement().$.value||!a.getContentElement(this["for"][0],this["for"][1]).getAction()?false:true}function j(a,c,d){var f=d.params||{};f.CKEditor=a.name;f.CKEditorFuncNum=
a._.filebrowserFn;if(!f.langCode)f.langCode=a.langCode;c.action=b(d.url,f);c.filebrowser=d}function h(b,d,g,m){var o,n;for(n in m){o=m[n];(o.type=="hbox"||o.type=="vbox"||o.type=="fieldset")&&h(b,d,g,o.children);if(o.filebrowser){if(typeof o.filebrowser=="string")o.filebrowser={action:o.type=="fileButton"?"QuickUpload":"Browse",target:o.filebrowser};if(o.filebrowser.action=="Browse"){var p=o.filebrowser.url;if(p===void 0){p=b.config["filebrowser"+c(d)+"BrowseUrl"];if(p===void 0)p=b.config.filebrowserBrowseUrl}if(p){o.onClick=
a;o.filebrowser.url=p;o.hidden=false}}else if(o.filebrowser.action=="QuickUpload"&&o["for"]){p=o.filebrowser.url;if(p===void 0){p=b.config["filebrowser"+c(d)+"UploadUrl"];if(p===void 0)p=b.config.filebrowserUploadUrl}if(p){var s=o.onClick;o.onClick=function(a){var b=a.sender;return s&&s.call(b,a)===false?false:f.call(b,a)};o.filebrowser.url=p;o.hidden=false;j(b,g.getContents(o["for"][0]).get(o["for"][1]),o.filebrowser)}}}}}function d(a,b,c){if(c.indexOf(";")!==-1){for(var c=c.split(";"),f=0;f<c.length;f++)if(d(a,
b,c[f]))return true;return false}return(a=a.getContents(b).get(c).filebrowser)&&a.url}function g(a,b){var c=this._.filebrowserSe.getDialog(),d=this._.filebrowserSe["for"],f=this._.filebrowserSe.filebrowser.onSelect;d&&c.getContentElement(d[0],d[1]).reset();if(!(typeof b=="function"&&b.call(this._.filebrowserSe)===false)&&!(f&&f.call(this._.filebrowserSe,a,b)===false)){typeof b=="string"&&b&&alert(b);if(a){d=this._.filebrowserSe;c=d.getDialog();if(d=d.filebrowser.target||null){d=d.split(":");if(f=
c.getContentElement(d[0],d[1])){f.setValue(a);c.selectPage(d[0])}}}}}CKEDITOR.plugins.add("filebrowser",{requires:"popup",init:function(a){a._.filebrowserFn=CKEDITOR.tools.addFunction(g,a);a.on("destroy",function(){CKEDITOR.tools.removeFunction(this._.filebrowserFn)})}});CKEDITOR.on("dialogDefinition",function(a){var b=a.data.definition,c,f;for(f in b.contents)if(c=b.contents[f]){h(a.editor,a.data.name,b,c.elements);if(c.hidden&&c.filebrowser)c.hidden=!d(b,c.id,c.filebrowser)}})}(),CKEDITOR.plugins.add("find",
{requires:"dialog",init:function(b){var c=b.addCommand("find",new CKEDITOR.dialogCommand("find"));c.canUndo=false;c.readOnly=1;b.addCommand("replace",new CKEDITOR.dialogCommand("replace")).canUndo=false;if(b.ui.addButton){b.ui.addButton("Find",{label:b.lang.find.find,command:"find",toolbar:"find,10"});b.ui.addButton("Replace",{label:b.lang.find.replace,command:"replace",toolbar:"find,20"})}CKEDITOR.dialog.add("find",this.path+"dialogs/find.js");CKEDITOR.dialog.add("replace",this.path+"dialogs/find.js")}}),
CKEDITOR.config.find_highlight={element:"span",styles:{"background-color":"#004",color:"#fff"}},function(){function b(a,b){var c=f.exec(a),h=f.exec(b);if(c){if(!c[2]&&h[2]=="px")return h[1];if(c[2]=="px"&&!h[2])return h[1]+"px"}return b}var c=CKEDITOR.htmlParser.cssStyle,a=CKEDITOR.tools.cssLength,f=/^((?:\d*(?:\.\d+))|(?:\d+))(.*)?$/i,j={elements:{$:function(a){var f=a.attributes;if((f=(f=(f=f&&f["data-cke-realelement"])&&new CKEDITOR.htmlParser.fragment.fromHtml(decodeURIComponent(f)))&&f.children[0])&&
a.attributes["data-cke-resizable"]){var e=(new c(a)).rules,a=f.attributes,h=e.width,e=e.height;h&&(a.width=b(a.width,h));e&&(a.height=b(a.height,e))}return f}}},h=CKEDITOR.plugins.add("fakeobjects",{afterInit:function(a){(a=(a=a.dataProcessor)&&a.htmlFilter)&&a.addRules(j)}});CKEDITOR.editor.prototype.createFakeElement=function(b,f,e,j){var l=this.lang.fakeobjects,l=l[e]||l.unknown,f={"class":f,"data-cke-realelement":encodeURIComponent(b.getOuterHtml()),"data-cke-real-node-type":b.type,alt:l,title:l,
align:b.getAttribute("align")||""};if(!CKEDITOR.env.hc)f.src=CKEDITOR.getUrl(h.path+"images/spacer.gif");e&&(f["data-cke-real-element-type"]=e);if(j){f["data-cke-resizable"]=j;e=new c;j=b.getAttribute("width");b=b.getAttribute("height");j&&(e.rules.width=a(j));b&&(e.rules.height=a(b));e.populate(f)}return this.document.createElement("img",{attributes:f})};CKEDITOR.editor.prototype.createFakeParserElement=function(b,f,e,j){var l=this.lang.fakeobjects,l=l[e]||l.unknown,m;m=new CKEDITOR.htmlParser.basicWriter;
b.writeHtml(m);m=m.getHtml();f={"class":f,"data-cke-realelement":encodeURIComponent(m),"data-cke-real-node-type":b.type,alt:l,title:l,align:b.attributes.align||""};if(!CKEDITOR.env.hc)f.src=CKEDITOR.getUrl(h.path+"images/spacer.gif");e&&(f["data-cke-real-element-type"]=e);if(j){f["data-cke-resizable"]=j;j=b.attributes;b=new c;e=j.width;j=j.height;e!=void 0&&(b.rules.width=a(e));j!=void 0&&(b.rules.height=a(j));b.populate(f)}return new CKEDITOR.htmlParser.element("img",f)};CKEDITOR.editor.prototype.restoreRealElement=
function(a){if(a.data("cke-real-node-type")!=CKEDITOR.NODE_ELEMENT)return null;var c=CKEDITOR.dom.element.createFromHtml(decodeURIComponent(a.data("cke-realelement")),this.document);if(a.data("cke-resizable")){var e=a.getStyle("width"),a=a.getStyle("height");e&&c.setAttribute("width",b(c.getAttribute("width"),e));a&&c.setAttribute("height",b(c.getAttribute("height"),a))}return c}}(),function(){function b(b){b=b.attributes;return b.type=="application/x-shockwave-flash"||a.test(b.src||"")}function c(a,
b){return a.createFakeParserElement(b,"cke_flash","flash",true)}var a=/\.swf(?:$|\?)/i;CKEDITOR.plugins.add("flash",{requires:"dialog,fakeobjects",onLoad:function(){CKEDITOR.addCss("img.cke_flash{background-image: url("+CKEDITOR.getUrl(this.path+"images/placeholder.png")+");background-position: center center;background-repeat: no-repeat;border: 1px solid #a9a9a9;width: 80px;height: 80px;}")},init:function(a){a.addCommand("flash",new CKEDITOR.dialogCommand("flash"));a.ui.addButton&&a.ui.addButton("Flash",
{label:a.lang.common.flash,command:"flash",toolbar:"insert,20"});CKEDITOR.dialog.add("flash",this.path+"dialogs/flash.js");a.addMenuItems&&a.addMenuItems({flash:{label:a.lang.flash.properties,command:"flash",group:"flash"}});a.on("doubleclick",function(a){var b=a.data.element;if(b.is("img")&&b.data("cke-real-element-type")=="flash")a.data.dialog="flash"});a.contextMenu&&a.contextMenu.addListener(function(a){if(a&&a.is("img")&&!a.isReadOnly()&&a.data("cke-real-element-type")=="flash")return{flash:CKEDITOR.TRISTATE_OFF}})},
afterInit:function(a){var j=a.dataProcessor;(j=j&&j.dataFilter)&&j.addRules({elements:{"cke:object":function(h){var d=h.attributes;if((!d.classid||!(""+d.classid).toLowerCase())&&!b(h)){for(d=0;d<h.children.length;d++)if(h.children[d].name=="cke:embed"){if(!b(h.children[d]))break;return c(a,h)}return null}return c(a,h)},"cke:embed":function(h){return!b(h)?null:c(a,h)}}},5)}})}(),CKEDITOR.tools.extend(CKEDITOR.config,{flashEmbedTagOnly:!1,flashAddEmbedTag:!0,flashConvertOnEdit:!1}),function(){function b(a){var b=
a=="left"?"pageXOffset":"pageYOffset";return b in f.$?f.$[b]:CKEDITOR.document.$.documentElement[a=="left"?"scrollLeft":"scrollTop"]}function c(c){var d,g=c.config,e=g.floatSpaceDockedOffsetX||0,k=g.floatSpaceDockedOffsetY||0,l=g.floatSpacePinnedOffsetX||0,m=g.floatSpacePinnedOffsetY||0,o=function(a){function g(a,b,c){s.setStyle(b,j(c));s.setStyle("position",a)}function n(a){var b=z.getDocumentPosition();switch(a){case "top":g("absolute","top",b.y-t-k);break;case "pin":g("fixed","top",m);break;case "bottom":g("absolute",
"top",b.y+(v.height||v.bottom-v.top)+k)}d=a}a.name=="focus"&&s.show();var p=a.name!="scroll";if(p){s.removeStyle("left");s.removeStyle("right")}var z=c.editable(),r=s.getClientRect(),v=z.getClientRect(),t=r.height,x=b("left");if(d){d=="top"&&r.top<m?n("pin"):d=="pin"?v.top>k+t?n("top"):v.bottom-r.bottom<t&&n("bottom"):d=="bottom"&&(v.top>k+t?n("top"):v.bottom>2*t+m&&n("pin"));if(p){a=f.getViewPaneSize();p=a.width/2;r=v.left>0&&v.right<a.width&&v.width>r.width?c.lang.dir=="rtl"?"right":"left":p-v.left>
v.right-p?"left":"right";s.setStyle(r,j((d=="pin"?l:e)+(r=="left"?v.left>0?v.left:0:v.right<a.width?a.width-v.right:0)+x))}}else{d="pin";n("pin");o(a)}},g=CKEDITOR.document.getBody(),n={id:c.id,name:c.name,langDir:c.lang.dir,langCode:c.langCode},p=c.fire("uiSpace",{space:"top",html:""}).html;if(p){var s=g.append(CKEDITOR.dom.element.createFromHtml(a.output(CKEDITOR.tools.extend({topId:c.ui.spaceId("top"),content:p,style:"display:none;z-index:"+(c.config.baseFloatZIndex-1)},n))));s.unselectable();
c.on("focus",function(a){o(a);f.on("scroll",o);f.on("resize",o)});c.on("blur",function(){s.hide();f.removeListener("scroll",o);f.removeListener("resize",o)});c.on("destroy",function(){f.removeListener("scroll",o);f.removeListener("resize",o);s.clearCustomData();s.remove()});c.focusManager.hasFocus&&s.show();c.focusManager.add(s,1)}}var a=CKEDITOR.addTemplate("floatcontainer",'<div id="cke_{name}" class="cke {id} cke_reset_all cke_chrome cke_editor_{name} cke_float cke_{langDir} '+CKEDITOR.env.cssClass+
'" dir="{langDir}" title="'+(CKEDITOR.env.gecko?" ":"")+'" lang="{langCode}" role="presentation" style="{style}"><div class="cke_inner"><div id="{topId}" class="cke_top" role="presentation">{content}</div></div></div>');CKEDITOR.plugins.add("floatingspace",{init:function(a){a.on("contentDom",function(){c(a)})}});var f=CKEDITOR.document.getWindow(),j=CKEDITOR.tools.cssLength}(),CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var b=CKEDITOR.addTemplate("panel-list",'<ul role="presentation" class="cke_panel_list">{items}</ul>'),
c=CKEDITOR.addTemplate("panel-list-item",'<li id="{id}" class="cke_panel_listItem" role=presentation><a id="{id}_option" _cke_focus=1 hidefocus=true title="{title}" href="javascript:void(\'{val}\')" {onclick}="CKEDITOR.tools.callFunction({clickFn},\'{val}\'); return false;" role="option">{text}</a></li>'),a=CKEDITOR.addTemplate("panel-list-group",'<h1 id="{id}" class="cke_panel_grouptitle" role="presentation" >{label}</h1>');CKEDITOR.ui.panel.prototype.addListBlock=function(a,b){return this.addBlock(a,
new CKEDITOR.ui.listBlock(this.getHolderElement(),b))};CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(a,b){var b=b||{},c=b.attributes||(b.attributes={});(this.multiSelect=!!b.multiSelect)&&(c["aria-multiselectable"]=true);!c.role&&(c.role="listbox");this.base.apply(this,arguments);c=this.keys;c[40]="next";c[9]="next";c[38]="prev";c[CKEDITOR.SHIFT+9]="prev";c[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(c[13]="mouseup");this._.pendingHtml=[];this._.pendingList=
[];this._.items={};this._.groups={}},_:{close:function(){if(this._.started){var a=b.output({items:this._.pendingList.join("")});this._.pendingList=[];this._.pendingHtml.push(a);delete this._.started}},getClick:function(){if(!this._.click)this._.click=CKEDITOR.tools.addFunction(function(a){var b=this.toggle(a);if(this.onClick)this.onClick(a,b)},this);return this._.click}},proto:{add:function(a,b,h){var d=CKEDITOR.tools.getNextId();if(!this._.started){this._.started=1;this._.size=this._.size||0}this._.items[a]=
d;a={id:d,val:a,onclick:CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick",clickFn:this._.getClick(),title:h||a,text:b||a};this._.pendingList.push(c.output(a))},startGroup:function(b){this._.close();var c=CKEDITOR.tools.getNextId();this._.groups[b]=c;this._.pendingHtml.push(a.output({id:c,label:b}))},commit:function(){this._.close();this.element.appendHtml(this._.pendingHtml.join(""));delete this._.size;this._.pendingHtml=[]},toggle:function(a){var b=this.isMarked(a);b?this.unmark(a):this.mark(a);
return!b},hideGroup:function(a){var b=(a=this.element.getDocument().getById(this._.groups[a]))&&a.getNext();if(a){a.setStyle("display","none");b&&b.getName()=="ul"&&b.setStyle("display","none")}},hideItem:function(a){this.element.getDocument().getById(this._.items[a]).setStyle("display","none")},showAll:function(){var a=this._.items,b=this._.groups,c=this.element.getDocument(),d;for(d in a)c.getById(a[d]).setStyle("display","");for(var g in b){a=c.getById(b[g]);d=a.getNext();a.setStyle("display",
"");d&&d.getName()=="ul"&&d.setStyle("display","")}},mark:function(a){this.multiSelect||this.unmarkAll();var a=this._.items[a],b=this.element.getDocument().getById(a);b.addClass("cke_selected");this.element.getDocument().getById(a+"_option").setAttribute("aria-selected",true);this.onMark&&this.onMark(b)},unmark:function(a){var b=this.element.getDocument(),a=this._.items[a],c=b.getById(a);c.removeClass("cke_selected");b.getById(a+"_option").removeAttribute("aria-selected");this.onUnmark&&this.onUnmark(c)},
unmarkAll:function(){var a=this._.items,b=this.element.getDocument(),c;for(c in a){var d=a[c];b.getById(d).removeClass("cke_selected");b.getById(d+"_option").removeAttribute("aria-selected")}this.onUnmark&&this.onUnmark()},isMarked:function(a){return this.element.getDocument().getById(this._.items[a]).hasClass("cke_selected")},focus:function(a){this._.focusIndex=-1;if(a){for(var b=this.element.getDocument().getById(this._.items[a]).getFirst(),a=this.element.getElementsByTag("a"),c,d=-1;c=a.getItem(++d);)if(c.equals(b)){this._.focusIndex=
d;break}setTimeout(function(){b.focus()},0)}}}})}}),CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(b){b.ui.addHandler(CKEDITOR.UI_RICHCOMBO,CKEDITOR.ui.richCombo.handler)}}),function(){var b='<span id="{id}" class="cke_combo cke_combo__{name} {cls}" role="presentation"><span id="{id}_label" class="cke_combo_label">{label}</span><a class="cke_combo_button" hidefocus=true title="{title}" tabindex="-1"'+(CKEDITOR.env.gecko&&CKEDITOR.env.version>=10900&&!CKEDITOR.env.hc?
"":'" href="javascript:void(\'{titleJs}\')"')+' hidefocus="true" role="button" aria-labelledby="{id}_label" aria-haspopup="true"';if(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.mac)b=b+' onkeypress="return false;"';CKEDITOR.env.gecko&&(b=b+' onblur="this.style.cssText = this.style.cssText;"');var b=b+(' onkeydown="return CKEDITOR.tools.callFunction({keydownFn},event,this);" onmousedown="return CKEDITOR.tools.callFunction({mousedownFn},event);" onfocus="return CKEDITOR.tools.callFunction({focusFn},event);" '+
(CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick")+'="CKEDITOR.tools.callFunction({clickFn},this);return false;"><span id="{id}_text" class="cke_combo_text cke_combo_inlinelabel">{label}</span><span class="cke_combo_open"><span class="cke_combo_arrow">'+(CKEDITOR.env.hc?"▼":CKEDITOR.env.air?" ":"")+"</span></span></a></span>"),c=CKEDITOR.addTemplate("combo",b);CKEDITOR.UI_RICHCOMBO="richcombo";CKEDITOR.ui.richCombo=CKEDITOR.tools.createClass({$:function(a){CKEDITOR.tools.extend(this,
a,{canGroup:false,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=true;this._={panelDefinition:a,items:{}}},proto:{renderHtml:function(a){var b=[];this.render(a,b);return b.join("")},render:function(a,b){function j(){var b=this.modes[a.mode]?CKEDITOR.TRISTATE_OFF:
CKEDITOR.TRISTATE_DISABLED;this.setState(a.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:b);this.setValue("")}var h=CKEDITOR.env,d="cke_"+this.id,g=CKEDITOR.tools.addFunction(function(b){if(o){a.unlockSelection(1);o=0}k.execute(b)},this),e=this,k={id:d,combo:this,focus:function(){CKEDITOR.document.getById(d).getChild(1).focus()},execute:function(b){var c=e._;if(c.state!=CKEDITOR.TRISTATE_DISABLED){e.createPanel(a);if(c.on)c.panel.hide();else{e.commit();var d=e.getValue();d?c.list.mark(d):c.list.unmarkAll();
c.panel.showBlock(e.id,new CKEDITOR.dom.element(b),4)}}},clickFn:g};a.on("mode",j,this);!this.readOnly&&a.on("readOnly",j,this);var l=CKEDITOR.tools.addFunction(function(a,b){var a=new CKEDITOR.dom.event(a),c=a.getKeystroke();switch(c){case 13:case 32:case 40:CKEDITOR.tools.callFunction(g,b);break;default:k.onkey(k,c)}a.preventDefault()}),m=CKEDITOR.tools.addFunction(function(){k.onfocus&&k.onfocus()}),o=0,n=CKEDITOR.tools.addFunction(function(){if(CKEDITOR.env.opera){var b=a.editable();if(b.isInline()&&
b.hasFocus){a.lockSelection();o=1}}});k.keyDownFn=l;h={id:d,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:h.gecko&&h.version>=10900&&!h.hc?"":(this.title||"").replace("'",""),keydownFn:l,mousedownFn:n,focusFn:m,clickFn:g};c.output(h,b);if(this.onRender)this.onRender();return k},createPanel:function(a){if(!this._.panel){var b=this._.panelDefinition,c=this._.panelDefinition.block,h=b.parent||CKEDITOR.document.getBody(),d="cke_combopanel__"+this.name,g=
new CKEDITOR.ui.floatPanel(a,h,b),e=g.addListBlock(this.id,c),k=this;g.onShow=function(){this.element.addClass(d);k.setState(CKEDITOR.TRISTATE_ON);e.focus(!k.multiSelect&&k.getValue());k._.on=1;k.editorFocus&&a.focus();if(k.onOpen)k.onOpen()};g.onHide=function(b){this.element.removeClass(d);k.setState(k.modes&&k.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);k._.on=0;if(!b&&k.onClose)k.onClose()};g.onEscape=function(){g.hide(1)};e.onClick=function(a,b){k.onClick&&k.onClick.call(k,
a,b);g.hide()};this._.panel=g;this._.list=e;g.getBlock(this.id).onHide=function(){k._.on=0;k.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(a,b){this._.value=a;var c=this.document.getById("cke_"+this.id+"_text");if(c){if(!a&&!b){b=this.label;c.addClass("cke_combo_inlinelabel")}else c.removeClass("cke_combo_inlinelabel");c.setText(typeof b!="undefined"?b:a)}},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(a){this._.list.mark(a)},
hideItem:function(a){this._.list.hideItem(a)},hideGroup:function(a){this._.list.hideGroup(a)},showAll:function(){this._.list.showAll()},add:function(a,b,c){this._.items[a]=c||a;this._.list.add(a,b,c)},startGroup:function(a){this._.list.startGroup(a)},commit:function(){if(!this._.committed){this._.list.commit();this._.committed=1;CKEDITOR.ui.fire("ready",this)}this._.committed=1},setState:function(a){if(this._.state!=a){this.document.getById("cke_"+this.id).setState(a,"cke_combo");this._.state=a}}},
statics:{handler:{create:function(a){return new CKEDITOR.ui.richCombo(a)}}}});CKEDITOR.ui.prototype.addRichCombo=function(a,b){this.add(a,CKEDITOR.UI_RICHCOMBO,b)}}(),function(){function b(b,a,f,j,h,d,g,e){for(var k=b.config,l=h.split(";"),h=[],m={},o=0;o<l.length;o++){var n=l[o];if(n){var n=n.split("/"),p={},s=l[o]=n[0];p[f]=h[o]=n[1]||s;m[s]=new CKEDITOR.style(g,p);m[s]._.definition.name=s}else l.splice(o--,1)}b.ui.addRichCombo(a,{label:j.label,title:j.panelTitle,toolbar:"styles,"+e,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(k.contentsCss),
multiSelect:false,attributes:{"aria-label":j.panelTitle}},init:function(){this.startGroup(j.panelTitle);for(var a=0;a<l.length;a++){var b=l[a];this.add(b,m[b].buildPreview(),b)}},onClick:function(a){b.focus();b.fire("saveSnapshot");var d=m[a];b[this.getValue()==a?"removeStyle":"applyStyle"](d);b.fire("saveSnapshot")},onRender:function(){b.on("selectionChange",function(a){for(var b=this.getValue(),a=a.data.path.elements,c=0,e;c<a.length;c++){e=a[c];for(var f in m)if(m[f].checkElementMatch(e,true)){f!=
b&&this.setValue(f);return}}this.setValue("",d)},this)}})}CKEDITOR.plugins.add("font",{requires:"richcombo",init:function(c){var a=c.config;b(c,"Font","family",c.lang.font,a.font_names,a.font_defaultLabel,a.font_style,30);b(c,"FontSize","size",c.lang.font.fontSize,a.fontSize_sizes,a.fontSize_defaultLabel,a.fontSize_style,40)}})}(),CKEDITOR.config.font_names="Arial/Arial, Helvetica, sans-serif;Comic Sans MS/Comic Sans MS, cursive;Courier New/Courier New, Courier, monospace;Georgia/Georgia, serif;Lucida Sans Unicode/Lucida Sans Unicode, Lucida Grande, sans-serif;Tahoma/Tahoma, Geneva, sans-serif;Times New Roman/Times New Roman, Times, serif;Trebuchet MS/Trebuchet MS, Helvetica, sans-serif;Verdana/Verdana, Geneva, sans-serif",
CKEDITOR.config.font_defaultLabel="",CKEDITOR.config.font_style={element:"span",styles:{"font-family":"#(family)"},overrides:[{element:"font",attributes:{face:null}}]},CKEDITOR.config.fontSize_sizes="8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px",CKEDITOR.config.fontSize_defaultLabel="",CKEDITOR.config.fontSize_style={element:"span",styles:{"font-size":"#(size)"},overrides:[{element:"font",attributes:{size:null}}]},CKEDITOR.plugins.add("format",
{requires:"richcombo",init:function(b){if(!b.blockless){for(var c=b.config,a=b.lang.format,f=c.format_tags.split(";"),j={},h=0;h<f.length;h++){var d=f[h];j[d]=new CKEDITOR.style(c["format_"+d]);j[d]._.enterMode=b.config.enterMode}b.ui.addRichCombo("Format",{label:a.label,title:a.panelTitle,toolbar:"styles,20",panel:{css:[CKEDITOR.skin.getPath("editor")].concat(c.contentsCss),multiSelect:false,attributes:{"aria-label":a.panelTitle}},init:function(){this.startGroup(a.panelTitle);for(var b in j){var c=
a["tag_"+b];this.add(b,j[b].buildPreview(c),c)}},onClick:function(a){b.focus();b.fire("saveSnapshot");var a=j[a],c=b.elementPath();b[a.checkActive(c)?"removeStyle":"applyStyle"](a);setTimeout(function(){b.fire("saveSnapshot")},0)},onRender:function(){b.on("selectionChange",function(a){if(!this._.on){var c=this.getValue(),a=a.data.path;if(a.isContextFor("p")){this.setState(CKEDITOR.TRISTATE_OFF);for(var d in j)if(j[d].checkActive(a)){d!=c&&this.setValue(d,b.lang.format["tag_"+d]);return}}else this.setState(CKEDITOR.TRISTATE_DISABLED);
this.setValue("")}},this)}})}}}),CKEDITOR.config.format_tags="p;h1;h2;h3;h4;h5;h6;pre;address;div",CKEDITOR.config.format_p={element:"p"},CKEDITOR.config.format_div={element:"div"},CKEDITOR.config.format_pre={element:"pre"},CKEDITOR.config.format_address={element:"address"},CKEDITOR.config.format_h1={element:"h1"},CKEDITOR.config.format_h2={element:"h2"},CKEDITOR.config.format_h3={element:"h3"},CKEDITOR.config.format_h4={element:"h4"},CKEDITOR.config.format_h5={element:"h5"},CKEDITOR.config.format_h6=
{element:"h6"},CKEDITOR.plugins.add("forms",{requires:"dialog,fakeobjects",onLoad:function(){CKEDITOR.addCss(".cke_editable form{border: 1px dotted #FF0000;padding: 2px;}\n");CKEDITOR.addCss("img.cke_hidden{background-image: url("+CKEDITOR.getUrl(this.path+"images/hiddenfield.gif")+");background-position: center center;background-repeat: no-repeat;border: 1px solid #a9a9a9;width: 16px !important;height: 16px !important;}")},init:function(b){var c=b.lang,a=0,f=function(d,f,e){var h={};f=="form"&&(h.context=
"form");b.addCommand(f,new CKEDITOR.dialogCommand(f,h));b.ui.addButton&&b.ui.addButton(d,{label:c.common[d.charAt(0).toLowerCase()+d.slice(1)],command:f,toolbar:"forms,"+(a=a+10)});CKEDITOR.dialog.add(f,e)},j=this.path+"dialogs/";!b.blockless&&f("Form","form",j+"form.js");f("Checkbox","checkbox",j+"checkbox.js");f("Radio","radio",j+"radio.js");f("TextField","textfield",j+"textfield.js");f("Textarea","textarea",j+"textarea.js");f("Select","select",j+"select.js");f("Button","button",j+"button.js");
var h=CKEDITOR.plugins.get("image");h&&f("ImageButton","imagebutton",CKEDITOR.plugins.getPath("image")+"dialogs/image.js");f("HiddenField","hiddenfield",j+"hiddenfield.js");if(b.addMenuItems){f={checkbox:{label:c.forms.checkboxAndRadio.checkboxTitle,command:"checkbox",group:"checkbox"},radio:{label:c.forms.checkboxAndRadio.radioTitle,command:"radio",group:"radio"},textfield:{label:c.forms.textfield.title,command:"textfield",group:"textfield"},hiddenfield:{label:c.forms.hidden.title,command:"hiddenfield",
group:"hiddenfield"},imagebutton:{label:c.image.titleButton,command:"imagebutton",group:"imagebutton"},button:{label:c.forms.button.title,command:"button",group:"button"},select:{label:c.forms.select.title,command:"select",group:"select"},textarea:{label:c.forms.textarea.title,command:"textarea",group:"textarea"}};!b.blockless&&(f.form={label:c.forms.form.menu,command:"form",group:"form"});b.addMenuItems(f)}if(b.contextMenu){!b.blockless&&b.contextMenu.addListener(function(a,b,c){if((a=c.contains("form",
1))&&!a.isReadOnly())return{form:CKEDITOR.TRISTATE_OFF}});b.contextMenu.addListener(function(a){if(a&&!a.isReadOnly()){var b=a.getName();if(b=="select")return{select:CKEDITOR.TRISTATE_OFF};if(b=="textarea")return{textarea:CKEDITOR.TRISTATE_OFF};if(b=="input")switch(a.getAttribute("type")){case "button":case "submit":case "reset":return{button:CKEDITOR.TRISTATE_OFF};case "checkbox":return{checkbox:CKEDITOR.TRISTATE_OFF};case "radio":return{radio:CKEDITOR.TRISTATE_OFF};case "image":return h?{imagebutton:CKEDITOR.TRISTATE_OFF}:
null;default:return{textfield:CKEDITOR.TRISTATE_OFF}}if(b=="img"&&a.data("cke-real-element-type")=="hiddenfield")return{hiddenfield:CKEDITOR.TRISTATE_OFF}}})}b.on("doubleclick",function(a){var c=a.data.element;if(!b.blockless&&c.is("form"))a.data.dialog="form";else if(c.is("select"))a.data.dialog="select";else if(c.is("textarea"))a.data.dialog="textarea";else if(c.is("img")&&c.data("cke-real-element-type")=="hiddenfield")a.data.dialog="hiddenfield";else if(c.is("input"))switch(c.getAttribute("type")){case "button":case "submit":case "reset":a.data.dialog=
"button";break;case "checkbox":a.data.dialog="checkbox";break;case "radio":a.data.dialog="radio";break;case "image":a.data.dialog="imagebutton";break;default:a.data.dialog="textfield"}})},afterInit:function(b){var c=b.dataProcessor,a=c&&c.htmlFilter,c=c&&c.dataFilter;CKEDITOR.env.ie&&a&&a.addRules({elements:{input:function(a){var a=a.attributes,b=a.type;if(!b)a.type="text";(b=="checkbox"||b=="radio")&&a.value=="on"&&delete a.value}}});c&&c.addRules({elements:{input:function(a){if(a.attributes.type==
"hidden")return b.createFakeParserElement(a,"cke_hidden","hiddenfield")}}})}}),CKEDITOR.env.ie&&(CKEDITOR.dom.element.prototype.hasAttribute=CKEDITOR.tools.override(CKEDITOR.dom.element.prototype.hasAttribute,function(b){return function(c){this.$.attributes.getNamedItem(c);if(this.getName()=="input")switch(c){case "class":return this.$.className.length>0;case "checked":return!!this.$.checked;case "value":var a=this.getAttribute("type");return a=="checkbox"||a=="radio"?this.$.value!="on":this.$.value}return b.apply(this,
arguments)}})),function(){var b={canUndo:false,exec:function(b){var a=b.document.createElement("hr");b.insertElement(a)}};CKEDITOR.plugins.add("horizontalrule",{init:function(c){if(!c.blockless){c.addCommand("horizontalrule",b);c.ui.addButton&&c.ui.addButton("HorizontalRule",{label:c.lang.horizontalrule.toolbar,command:"horizontalrule",toolbar:"insert,40"})}}})}(),CKEDITOR.plugins.add("htmlwriter",{init:function(b){var c=new CKEDITOR.htmlWriter;c.forceSimpleAmpersand=b.config.forceSimpleAmpersand;
c.indentationChars=b.config.dataIndentationChars||"\t";b.dataProcessor.writer=c}}),CKEDITOR.htmlWriter=CKEDITOR.tools.createClass({base:CKEDITOR.htmlParser.basicWriter,$:function(){this.base();this.indentationChars="\t";this.selfClosingEnd=" />";this.lineBreakChars="\n";this.sortAttributes=1;this._.indent=0;this._.indentation="";this._.inPre=0;this._.rules={};var b=CKEDITOR.dtd,c;for(c in CKEDITOR.tools.extend({},b.$nonBodyContent,b.$block,b.$listItem,b.$tableContent))this.setRules(c,{indent:!b[c]["#"],
breakBeforeOpen:1,breakBeforeClose:!b[c]["#"],breakAfterClose:1,needsSpace:c in b.$block&&!(c in{li:1,dt:1,dd:1})});this.setRules("br",{breakAfterOpen:1});this.setRules("title",{indent:0,breakAfterOpen:0});this.setRules("style",{indent:0,breakBeforeClose:1});this.setRules("pre",{breakAfterOpen:1,indent:0})},proto:{openTag:function(b){var c=this._.rules[b];this._.afterCloser&&(c&&c.needsSpace&&this._.needsSpace)&&this._.output.push("\n");if(this._.indent)this.indentation();else if(c&&c.breakBeforeOpen){this.lineBreak();
this.indentation()}this._.output.push("<",b);this._.afterCloser=0},openTagClose:function(b,c){var a=this._.rules[b];if(c){this._.output.push(this.selfClosingEnd);if(a&&a.breakAfterClose)this._.needsSpace=a.needsSpace}else{this._.output.push(">");if(a&&a.indent)this._.indentation=this._.indentation+this.indentationChars}a&&a.breakAfterOpen&&this.lineBreak();b=="pre"&&(this._.inPre=1)},attribute:function(b,c){if(typeof c=="string"){this.forceSimpleAmpersand&&(c=c.replace(/&/g,"&"));c=CKEDITOR.tools.htmlEncodeAttr(c)}this._.output.push(" ",
b,'="',c,'"')},closeTag:function(b){var c=this._.rules[b];if(c&&c.indent)this._.indentation=this._.indentation.substr(this.indentationChars.length);if(this._.indent)this.indentation();else if(c&&c.breakBeforeClose){this.lineBreak();this.indentation()}this._.output.push("</",b,">");b=="pre"&&(this._.inPre=0);if(c&&c.breakAfterClose){this.lineBreak();this._.needsSpace=c.needsSpace}this._.afterCloser=1},text:function(b){if(this._.indent){this.indentation();!this._.inPre&&(b=CKEDITOR.tools.ltrim(b))}this._.output.push(b)},
comment:function(b){this._.indent&&this.indentation();this._.output.push("<\!--",b,"--\>")},lineBreak:function(){!this._.inPre&&this._.output.length>0&&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},setRules:function(b,c){var a=this._.rules[b];a?CKEDITOR.tools.extend(a,
c,true):this._.rules[b]=c}}}),function(){CKEDITOR.plugins.add("iframe",{requires:"dialog,fakeobjects",onLoad:function(){CKEDITOR.addCss("img.cke_iframe{background-image: url("+CKEDITOR.getUrl(this.path+"images/placeholder.png")+");background-position: center center;background-repeat: no-repeat;border: 1px solid #a9a9a9;width: 80px;height: 80px;}")},init:function(b){var c=b.lang.iframe;CKEDITOR.dialog.add("iframe",this.path+"dialogs/iframe.js");b.addCommand("iframe",new CKEDITOR.dialogCommand("iframe"));
b.ui.addButton&&b.ui.addButton("Iframe",{label:c.toolbar,command:"iframe",toolbar:"insert,80"});b.on("doubleclick",function(a){var b=a.data.element;if(b.is("img")&&b.data("cke-real-element-type")=="iframe")a.data.dialog="iframe"});b.addMenuItems&&b.addMenuItems({iframe:{label:c.title,command:"iframe",group:"image"}});b.contextMenu&&b.contextMenu.addListener(function(a){if(a&&a.is("img")&&a.data("cke-real-element-type")=="iframe")return{iframe:CKEDITOR.TRISTATE_OFF}})},afterInit:function(b){var c=
b.dataProcessor;(c=c&&c.dataFilter)&&c.addRules({elements:{iframe:function(a){return b.createFakeParserElement(a,"cke_iframe","iframe",true)}}})}})}(),function(){function b(a,b){if(!b)var c=a.getSelection(),b=c.getType()==CKEDITOR.SELECTION_ELEMENT&&c.getSelectedElement();if(b&&b.is("img")&&!b.data("cke-realelement")&&!b.isReadOnly())return b}function c(a){var b=a.getStyle("float");if(b=="inherit"||b=="none")b=0;b||(b=a.getAttribute("align"));return b}CKEDITOR.plugins.add("image",{requires:"dialog",
init:function(a){CKEDITOR.dialog.add("image",this.path+"dialogs/image.js");a.addCommand("image",new CKEDITOR.dialogCommand("image"));a.ui.addButton&&a.ui.addButton("Image",{label:a.lang.common.image,command:"image",toolbar:"insert,10"});a.on("doubleclick",function(a){var b=a.data.element;if(b.is("img")&&!b.data("cke-realelement")&&!b.isReadOnly())a.data.dialog="image"});a.addMenuItems&&a.addMenuItems({image:{label:a.lang.image.menu,command:"image",group:"image"}});a.contextMenu&&a.contextMenu.addListener(function(c){if(b(a,
c))return{image:CKEDITOR.TRISTATE_OFF}})},afterInit:function(a){function f(f){var h=a.getCommand("justify"+f);if(h){if(f=="left"||f=="right")h.on("exec",function(d){var g=b(a),e;if(g){e=c(g);if(e==f){g.removeStyle("float");f==c(g)&&g.removeAttribute("align")}else g.setStyle("float",f);d.cancel()}});h.on("refresh",function(d){var g=b(a);if(g){g=c(g);this.setState(g==f?CKEDITOR.TRISTATE_ON:f=="right"||f=="left"?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);d.cancel()}})}}f("left");f("right");f("center");
f("block")}})}(),CKEDITOR.config.image_removeLinkByEmptyURL=!0,function(){function b(a,b){var b=b===void 0||b,c;if(b)c=a.getComputedStyle("text-align");else{for(;!a.hasAttribute||!a.hasAttribute("align")&&!a.getStyle("text-align");){c=a.getParent();if(!c)break;a=c}c=a.getStyle("text-align")||a.getAttribute("align")||""}c&&(c=c.replace(/(?:-(?:moz|webkit)-)?(?:start|auto)/i,""));!c&&b&&(c=a.getComputedStyle("direction")=="rtl"?"right":"left");return c}function c(a,b,c){this.editor=a;this.name=b;this.value=
c;this.context="p";if(a=a.config.justifyClasses){switch(c){case "left":this.cssClassName=a[0];break;case "center":this.cssClassName=a[1];break;case "right":this.cssClassName=a[2];break;case "justify":this.cssClassName=a[3]}this.cssClassRegex=RegExp("(?:^|\\s+)(?:"+a.join("|")+")(?=$|\\s)")}}function a(a){var b=a.editor,c=b.createRange();c.setStartBefore(a.data.node);c.setEndAfter(a.data.node);for(var d=new CKEDITOR.dom.walker(c),g;g=d.next();)if(g.type==CKEDITOR.NODE_ELEMENT)if(!g.equals(a.data.node)&&
g.getDirection()){c.setStartAfter(g);d=new CKEDITOR.dom.walker(c)}else{var e=b.config.justifyClasses;if(e)if(g.hasClass(e[0])){g.removeClass(e[0]);g.addClass(e[2])}else if(g.hasClass(e[2])){g.removeClass(e[2]);g.addClass(e[0])}e=g.getStyle("text-align");e=="left"?g.setStyle("text-align","right"):e=="right"&&g.setStyle("text-align","left")}}c.prototype={exec:function(a){var c=a.getSelection(),h=a.config.enterMode;if(c){for(var d=c.createBookmarks(),g=c.getRanges(true),e=this.cssClassName,k,l,m=a.config.useComputedState,
m=m===void 0||m,o=g.length-1;o>=0;o--){k=g[o].createIterator();for(k.enlargeBr=h!=CKEDITOR.ENTER_BR;l=k.getNextParagraph(h==CKEDITOR.ENTER_P?"p":"div");){l.removeAttribute("align");l.removeStyle("text-align");var n=e&&(l.$.className=CKEDITOR.tools.ltrim(l.$.className.replace(this.cssClassRegex,""))),p=this.state==CKEDITOR.TRISTATE_OFF&&(!m||b(l,true)!=this.value);e?p?l.addClass(e):n||l.removeAttribute("class"):p&&l.setStyle("text-align",this.value)}}a.focus();a.forceNextSelectionCheck();c.selectBookmarks(d)}},
refresh:function(a,c){var h=c.block||c.blockLimit;this.setState(h.getName()!="body"&&b(h,this.editor.config.useComputedState)==this.value?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)}};CKEDITOR.plugins.add("justify",{init:function(b){if(!b.blockless){var j=new c(b,"justifyleft","left"),h=new c(b,"justifycenter","center"),d=new c(b,"justifyright","right"),g=new c(b,"justifyblock","justify");b.addCommand("justifyleft",j);b.addCommand("justifycenter",h);b.addCommand("justifyright",d);b.addCommand("justifyblock",
g);if(b.ui.addButton){b.ui.addButton("JustifyLeft",{label:b.lang.justify.left,command:"justifyleft",toolbar:"align,10"});b.ui.addButton("JustifyCenter",{label:b.lang.justify.center,command:"justifycenter",toolbar:"align,20"});b.ui.addButton("JustifyRight",{label:b.lang.justify.right,command:"justifyright",toolbar:"align,30"});b.ui.addButton("JustifyBlock",{label:b.lang.justify.block,command:"justifyblock",toolbar:"align,40"})}b.on("dirChanged",a)}}})}(),CKEDITOR.plugins.add("link",{requires:"dialog,fakeobjects",
onLoad:function(){function b(b){return a.replace(/%1/g,b=="rtl"?"right":"left").replace(/%2/g,"cke_contents_"+b)}var c="background:url("+CKEDITOR.getUrl(this.path+"images/anchor.gif")+") no-repeat %1 center;border:1px dotted #00f;",a=".%2 a.cke_anchor,.%2 a.cke_anchor_empty,.cke_editable.%2 a[name],.cke_editable.%2 a[data-cke-saved-name]{"+c+"padding-%1:18px;cursor:auto;}"+(CKEDITOR.env.ie?"a.cke_anchor_empty{display:inline-block;}":"")+".%2 img.cke_anchor{"+c+"width:16px;min-height:15px;height:1.15em;vertical-align:"+
(CKEDITOR.env.opera?"middle":"text-bottom")+";}";CKEDITOR.addCss(b("ltr")+b("rtl"))},init:function(b){b.addCommand("link",new CKEDITOR.dialogCommand("link"));b.addCommand("anchor",new CKEDITOR.dialogCommand("anchor"));b.addCommand("unlink",new CKEDITOR.unlinkCommand);b.addCommand("removeAnchor",new CKEDITOR.removeAnchorCommand);b.setKeystroke(CKEDITOR.CTRL+76,"link");if(b.ui.addButton){b.ui.addButton("Link",{label:b.lang.link.toolbar,command:"link",toolbar:"links,10"});b.ui.addButton("Unlink",{label:b.lang.link.unlink,
command:"unlink",toolbar:"links,20"});b.ui.addButton("Anchor",{label:b.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");b.on("doubleclick",function(c){var a=CKEDITOR.plugins.link.getSelectedLink(b)||c.data.element;if(!a.isReadOnly())if(a.is("a")){c.data.dialog=a.getAttribute("name")&&(!a.getAttribute("href")||!a.getChildCount())?"anchor":"link";b.getSelection().selectElement(a)}else if(CKEDITOR.plugins.link.tryRestoreFakeAnchor(b,
a))c.data.dialog="anchor"});b.addMenuItems&&b.addMenuItems({anchor:{label:b.lang.link.anchor.menu,command:"anchor",group:"anchor",order:1},removeAnchor:{label:b.lang.link.anchor.remove,command:"removeAnchor",group:"anchor",order:5},link:{label:b.lang.link.menu,command:"link",group:"link",order:1},unlink:{label:b.lang.link.unlink,command:"unlink",group:"link",order:5}});b.contextMenu&&b.contextMenu.addListener(function(c){if(!c||c.isReadOnly())return null;c=CKEDITOR.plugins.link.tryRestoreFakeAnchor(b,
c);if(!c&&!(c=CKEDITOR.plugins.link.getSelectedLink(b)))return null;var a={};c.getAttribute("href")&&c.getChildCount()&&(a={link:CKEDITOR.TRISTATE_OFF,unlink:CKEDITOR.TRISTATE_OFF});if(c&&c.hasAttribute("name"))a.anchor=a.removeAnchor=CKEDITOR.TRISTATE_OFF;return a})},afterInit:function(b){var c=b.dataProcessor,a=c&&c.dataFilter,c=c&&c.htmlFilter,f=b._.elementsPath&&b._.elementsPath.filters;a&&a.addRules({elements:{a:function(a){var c=a.attributes;if(!c.name)return null;var d=!a.children.length;if(CKEDITOR.plugins.link.synAnchorSelector){var a=
d?"cke_anchor_empty":"cke_anchor",f=c["class"];if(c.name&&(!f||f.indexOf(a)<0))c["class"]=(f||"")+" "+a;if(d&&CKEDITOR.plugins.link.emptyAnchorFix){c.contenteditable="false";c["data-cke-editable"]=1}}else if(CKEDITOR.plugins.link.fakeAnchor&&d)return b.createFakeParserElement(a,"cke_anchor","anchor");return null}}});CKEDITOR.plugins.link.emptyAnchorFix&&c&&c.addRules({elements:{a:function(a){delete a.attributes.contenteditable}}});f&&f.push(function(a,c){if(c=="a"&&(CKEDITOR.plugins.link.tryRestoreFakeAnchor(b,
a)||a.getAttribute("name")&&(!a.getAttribute("href")||!a.getChildCount())))return"anchor"})}}),CKEDITOR.plugins.link={getSelectedLink:function(b){var c=b.getSelection(),a=c.getSelectedElement();if(a&&a.is("a"))return a;if(c=c.getRanges(true)[0]){c.shrink(CKEDITOR.SHRINK_TEXT);return b.elementPath(c.getCommonAncestor()).contains("a",1)}return null},fakeAnchor:CKEDITOR.env.opera||CKEDITOR.env.webkit,synAnchorSelector:CKEDITOR.env.ie,emptyAnchorFix:CKEDITOR.env.ie&&8>CKEDITOR.env.version,tryRestoreFakeAnchor:function(b,
c){if(c&&c.data("cke-real-element-type")&&c.data("cke-real-element-type")=="anchor"){var a=b.restoreRealElement(c);if(a.data("cke-saved-name"))return a}}},CKEDITOR.unlinkCommand=function(){},CKEDITOR.unlinkCommand.prototype={exec:function(b){var c=new CKEDITOR.style({element:"a",type:CKEDITOR.STYLE_INLINE,alwaysRemoveElement:1});b.removeStyle(c)},refresh:function(b,c){var a=c.lastElement&&c.lastElement.getAscendant("a",true);a&&a.getName()=="a"&&a.getAttribute("href")&&a.getChildCount()?this.setState(CKEDITOR.TRISTATE_OFF):
this.setState(CKEDITOR.TRISTATE_DISABLED)},contextSensitive:1,startDisabled:1},CKEDITOR.removeAnchorCommand=function(){},CKEDITOR.removeAnchorCommand.prototype={exec:function(b){var c=b.getSelection(),a=c.createBookmarks(),f;if(c&&(f=c.getSelectedElement())&&(CKEDITOR.plugins.link.fakeAnchor&&!f.getChildCount()?CKEDITOR.plugins.link.tryRestoreFakeAnchor(b,f):f.is("a")))f.remove(1);else if(f=CKEDITOR.plugins.link.getSelectedLink(b))if(f.hasAttribute("href")){f.removeAttributes({name:1,"data-cke-saved-name":1});
f.removeClass("cke_anchor")}else f.remove(1);c.selectBookmarks(a)}},CKEDITOR.tools.extend(CKEDITOR.config,{linkShowAdvancedTab:!0,linkShowTargetTab:!0}),function(){CKEDITOR.plugins.liststyle={requires:"dialog,contextmenu",init:function(b){b.addCommand("numberedListStyle",new CKEDITOR.dialogCommand("numberedListStyle"));CKEDITOR.dialog.add("numberedListStyle",this.path+"dialogs/liststyle.js");b.addCommand("bulletedListStyle",new CKEDITOR.dialogCommand("bulletedListStyle"));CKEDITOR.dialog.add("bulletedListStyle",
this.path+"dialogs/liststyle.js");b.addMenuGroup("list",108);b.addMenuItems({numberedlist:{label:b.lang.liststyle.numberedTitle,group:"list",command:"numberedListStyle"},bulletedlist:{label:b.lang.liststyle.bulletedTitle,group:"list",command:"bulletedListStyle"}});b.contextMenu.addListener(function(b){if(!b||b.isReadOnly())return null;for(;b;){var a=b.getName();if(a=="ol")return{numberedlist:CKEDITOR.TRISTATE_OFF};if(a=="ul")return{bulletedlist:CKEDITOR.TRISTATE_OFF};b=b.getParent()}return null})}};
CKEDITOR.plugins.add("liststyle",CKEDITOR.plugins.liststyle)}(),"use strict",function(){function b(a,b,c){return e(b)&&e(c)&&c.equals(b.getNext(function(a){return!(P(a)||O(a)||k(a))}))}function c(a){this.upper=a[0];this.lower=a[1];this.set.apply(this,a.slice(2))}function a(a){var b=a.element,c;return b&&e(b)?(c=b.getAscendant(a.triggers,true))&&!c.contains(a.editable)&&!c.equals(a.editable)?c:null:null}function f(a,b,c){u(a,b);u(a,c);a=b.size.bottom;c=c.size.top;return a&&c?0|(a+c)/2:a||c}function j(a,
b,c){return b=b[c?"getPrevious":"getNext"](function(b){return b&&b.type==CKEDITOR.NODE_TEXT&&!P(b)||e(b)&&!k(b)&&!g(a,b)})}function h(a){var b=a.doc,c=N('<span contenteditable="false" style="'+I+"position:absolute;border-top:1px dashed "+a.boxColor+'"></span>',b);K(c,{attach:function(){this.wrap.getParent()||this.wrap.appendTo(a.editable,true);return this},lineChildren:[K(N('<span title="'+a.editor.lang.magicline.title+'" contenteditable="false">↵</span>',b),{base:I+"height:17px;width:17px;"+
(a.rtl?"left":"right")+":17px;background:url("+this.path+"images/icon.png) center no-repeat "+a.boxColor+";cursor:pointer;"+(L.hc?"font-size: 15px;line-height:14px;border:1px solid #fff;text-align:center;":""),looks:["top:-8px;"+CKEDITOR.tools.cssVendorPrefix("border-radius","2px",1),"top:-17px;"+CKEDITOR.tools.cssVendorPrefix("border-radius","2px 2px 0px 0px",1),"top:-1px;"+CKEDITOR.tools.cssVendorPrefix("border-radius","0px 0px 2px 2px",1)]}),K(N(F,b),{base:H+"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"]}),K(N(F,b),{base:H+"right:0px;border-right-color:"+a.boxColor+";",looks:["border-width:8px 8px 8px 0;top:-8px","border-width:8px 8px 0 0;top:-8px","border-width:0 8px 8px 0;top:0px"]})],detach:function(){this.wrap.getParent()&&this.wrap.remove();return this},mouseNear:function(){u(a,this);var b=a.holdDistance,c=this.size;return c&&a.mouse.y>c.top-b&&a.mouse.y<c.bottom+b&&a.mouse.x>
c.left-b&&a.mouse.x<c.right+b?true:false},place:function(){var b=a.view,c=a.editable,d=a.trigger,e=d.upper,f=d.lower,g=e||f,h=g.getParent(),j={};this.trigger=d;e&&u(a,e,true);f&&u(a,f,true);u(a,h,true);a.inInlineMode&&q(a,true);if(h.equals(c)){j.left=b.scroll.x;j.right=-b.scroll.x;j.width=""}else{j.left=g.size.left-g.size.margin.left+b.scroll.x-(a.inInlineMode?b.editable.left+b.editable.border.left:0);j.width=g.size.outerWidth+g.size.margin.left+g.size.margin.right+b.scroll.x;j.right=""}if(e&&f)j.top=
e.size.margin.bottom===f.size.margin.top?0|e.size.bottom+e.size.margin.bottom/2:e.size.margin.bottom<f.size.margin.top?e.size.bottom+e.size.margin.bottom:e.size.bottom+e.size.margin.bottom-f.size.margin.top;else if(e){if(!f)j.top=e.size.bottom+e.size.margin.bottom}else j.top=f.size.top-f.size.margin.top;if(d.is(C)||j.top>b.scroll.y-15&&j.top<b.scroll.y+5){j.top=a.inInlineMode?0:b.scroll.y;this.look(C)}else if(d.is(y)||j.top>b.pane.bottom-5&&j.top<b.pane.bottom+15){j.top=a.inInlineMode?b.editable.height+
b.editable.padding.top+b.editable.padding.bottom:b.pane.bottom-1;this.look(y)}else{if(a.inInlineMode)j.top=j.top-(b.editable.top+b.editable.border.top);this.look(A)}if(a.inInlineMode){j.top--;j.top=j.top+b.editable.scroll.top;j.left=j.left+b.editable.scroll.left}for(var k in j)j[k]=CKEDITOR.tools.cssLength(j[k]);this.setStyles(j)},look:function(a){if(this.oldLook!=a){for(var b=this.lineChildren.length,c;b--;)(c=this.lineChildren[b]).setAttribute("style",c.base+c.looks[0|a/2]);this.oldLook=a}},wrap:new J("span",
a.doc)});for(b=c.lineChildren.length;b--;)c.lineChildren[b].appendTo(c);c.look(A);c.appendTo(c.wrap);c.unselectable();c.setOpacity(a.editor.config.magicline_opacity||1);c.lineChildren[0].on("mouseup",function(b){c.detach();d(a,function(b){var c=a.line.trigger;b[c.is(z)?"insertBefore":"insertAfter"](c.is(z)?c.lower:c.upper)});a.editor.focus();!L.ie&&a.enterMode!=CKEDITOR.ENTER_BR&&a.hotNode.scrollIntoView();b.data.preventDefault(true)});c.on("mousedown",function(a){a.data.preventDefault(true)});a.line=
c}function d(a,b){var c=new CKEDITOR.dom.range(a.doc),d=a.editor,e;if(L.ie&&a.enterMode==CKEDITOR.ENTER_BR)e=a.doc.createText(G);else{e=new J(a.enterBehavior,a.doc);a.enterMode!=CKEDITOR.ENTER_BR&&a.doc.createText(G).appendTo(e)}d.fire("saveSnapshot");b(e);c.moveToPosition(e,CKEDITOR.POSITION_AFTER_START);d.getSelection().selectRanges([c]);a.hotNode=e;d.fire("saveSnapshot")}function g(a,b){if(!b||!(b.type==CKEDITOR.NODE_ELEMENT&&b.$))return false;var c=a.line;return c.wrap.equals(b)||c.wrap.contains(b)}
function e(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.$}function k(a){if(!e(a))return false;var b;if(!(b=l(a)))if(e(a)){b={left:1,right:1,center:1};b=!(!b[a.getComputedStyle("float")]&&!b[a.getAttribute("align")])}else b=false;return b}function l(a){return!!{absolute:1,fixed:1,relative:1}[a.getComputedStyle("position")]}function m(a,b){return e(b)?b.is(a.triggers):null}function o(a,b,c){b=b[c?"getLast":"getFirst"](function(b){return a.isRelevant(b)&&!b.is(E)});if(!b)return false;u(a,b);return c?
b.size.top>a.mouse.y:b.size.bottom<a.mouse.y}function n(a){var b=a.editable,d=a.mouse,f=a.view,h=a.triggerOffset;q(a);var j=d.y>(a.inInlineMode?f.editable.top+f.editable.height/2:Math.min(f.editable.height,f.pane.height)/2),b=b[j?"getLast":"getFirst"](function(a){return!(P(a)||O(a))});if(!b)return null;g(a,b)&&(b=a.line.wrap[j?"getPrevious":"getNext"](function(a){return!(P(a)||O(a))}));if(!e(b)||k(b)||!m(a,b))return null;u(a,b);if(!j&&b.size.top>=0&&d.y>0&&d.y<b.size.top+h){a=a.inInlineMode||f.scroll.y===
0?C:A;return new c([null,b,z,t,a])}if(j&&b.size.bottom<=f.pane.height&&d.y>b.size.bottom-h&&d.y<f.pane.height){a=a.inInlineMode||b.size.bottom>f.pane.height-h&&b.size.bottom<f.pane.height?y:A;return new c([b,null,r,t,a])}return null}function p(b){var d=b.mouse,f=b.view,g=b.triggerOffset,h=a(b);if(!h)return null;u(b,h);var g=Math.min(g,0|h.size.outerHeight/2),n=[],l,p;if(d.y>h.size.top-1&&d.y<h.size.top+g)p=false;else if(d.y>h.size.bottom-g&&d.y<h.size.bottom+1)p=true;else return null;if(k(h)||o(b,
h,p)||h.getParent().is(D))return null;var s=j(b,h,!p);if(s){if(s&&s.type==CKEDITOR.NODE_TEXT)return null;if(e(s)){if(k(s)||!m(b,s)||s.getParent().is(D))return null;n=[s,h][p?"reverse":"concat"]().concat([v,t])}}else{if(h.equals(b.editable[p?"getLast":"getFirst"](b.isRelevant))){q(b);p&&d.y>h.size.bottom-g&&d.y<f.pane.height&&h.size.bottom>f.pane.height-g&&h.size.bottom<f.pane.height?l=y:d.y>0&&d.y<h.size.top+g&&(l=C)}else l=A;n=[null,h][p?"reverse":"concat"]().concat([p?r:z,t,l,h.equals(b.editable[p?
"getLast":"getFirst"](b.isRelevant))?p?y:C:A])}return 0 in n?new c(n):null}function s(a,b,c,d){for(var e=function(){var c=L.ie?b.$.currentStyle:a.win.$.getComputedStyle(b.$,"");return L.ie?function(a){return c[CKEDITOR.tools.cssStyleToDomStyle(a)]}:function(a){return c.getPropertyValue(a)}}(),f=b.getDocumentPosition(),g={},h={},j={},k={},n=Q.length;n--;){g[Q[n]]=parseInt(e("border-"+Q[n]+"-width"),10)||0;j[Q[n]]=parseInt(e("padding-"+Q[n]),10)||0;h[Q[n]]=parseInt(e("margin-"+Q[n]),10)||0}(!c||d)&&
w(a,d);k.top=f.y-(c?0:a.view.scroll.y);k.left=f.x-(c?0:a.view.scroll.x);k.outerWidth=b.$.offsetWidth;k.outerHeight=b.$.offsetHeight;k.height=k.outerHeight-(j.top+j.bottom+g.top+g.bottom);k.width=k.outerWidth-(j.left+j.right+g.left+g.right);k.bottom=k.top+k.outerHeight;k.right=k.left+k.outerWidth;if(a.inInlineMode)k.scroll={top:b.$.scrollTop,left:b.$.scrollLeft};return K({border:g,padding:j,margin:h,ignoreScroll:c},k,true)}function u(a,b,c){if(!e(b))return b.size=null;if(b.size){if(b.size.ignoreScroll==
c&&b.size.date>new Date-M)return null}else b.size={};return K(b.size,s(a,b,c),{date:+new Date},true)}function q(a,b){a.view.editable=s(a,a.editable,b,true)}function w(a,b){if(!a.view)a.view={};var c=a.view;if(b||!(c&&c.date>new Date-M)){var d=a.win,c=d.getScrollPosition(),d=d.getViewPaneSize();K(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},
true)}}function B(a,b,d,e){for(var f=e,g=e,h=0,j=false,k=false,n=a.view.pane.height,l=a.mouse;l.y+h<n&&l.y-h>0;){j||(j=b(f,e));k||(k=b(g,e));!j&&l.y-h>0&&(f=d(a,{x:l.x,y:l.y-h}));!k&&l.y+h<n&&(g=d(a,{x:l.x,y:l.y+h}));if(j&&k)break;h=h+2}return new c([f,g,null,null])}CKEDITOR.plugins.add("magicline",{init:function(b){var f={};f[CKEDITOR.ENTER_BR]="br";f[CKEDITOR.ENTER_P]="p";f[CKEDITOR.ENTER_DIV]="div";var m=b.config,o=m.magicline_triggerOffset||30,u=m.enterMode,r={editor:b,enterBehavior:f[u],enterMode:u,
triggerOffset:o,holdDistance:0|o*(m.magicline_holdDistance||0.5),boxColor:m.magicline_color||"#ff0000",rtl:m.contentsLangDirection=="rtl",triggers:m.magicline_everywhere?CKEDITOR.dtd.$block:{table:1,hr:1,div:1,ul:1,ol:1,dl:1}},t,v,B,z;r.isRelevant=function(a){return e(a)&&!g(r,a)&&!k(a)};b.on("contentDom",function(){var e=b.editable(),f=b.document,k=b.window;K(r,{editable:e,inInlineMode:e.isInline(),doc:f,win:k},true);r.boundary=r.inInlineMode?r.editable:r.doc.getDocumentElement();if(!e.is(CKEDITOR.dtd.$inline)){r.inInlineMode&&
!l(e)&&e.setStyles({position:"relative",top:null,left:null});h.call(this,r);w(r);e.attachListener(b,"beforeUndoImage",function(){r.line.detach()});e.attachListener(b,"beforeGetData",function(){if(r.line.wrap.getParent()){r.line.detach();b.once("getData",function(){r.line.attach()},null,null,1E3)}},null,null,0);e.attachListener(f,"mouseout",function(a){if(b.mode=="wysiwyg"){clearTimeout(v);if(r.inInlineMode){var c=a.data.$.clientX,a=a.data.$.clientY;w(r);q(r,true);var d=r.view.editable,e=r.view.scroll;
if(!(c>d.left-e.x&&c<d.right-e.x)||!(a>d.top-e.y&&a<d.bottom-e.y)){clearTimeout(z);z=null;r.line.detach()}}else{c=new J(a.data.$.relatedTarget||a.data.$.toElement,f);if(!c.$||c.$&&c.type==CKEDITOR.NODE_ELEMENT&&c.is("html")){clearTimeout(z);z=null;v=CKEDITOR.tools.setTimeout(r.line.detach,150,r.line)}}}});e.attachListener(e,"keyup",function(){r.hiddenMode=0});e.attachListener(e,"keydown",function(a){if(b.mode=="wysiwyg"){a=a.data.getKeystroke();b.getSelection().getStartElement();switch(a){case 2228240:case 16:r.hiddenMode=
1;r.line.detach()}}});e.attachListener(r.inInlineMode?e:f,"mousemove",function(a){clearTimeout(v);B=true;if(!(b.mode!="wysiwyg"||z)){var c={x:a.data.$.clientX,y:a.data.$.clientY};z=setTimeout(function(){r.mouse=c;z=r.trigger=null;w(r);if(B&&!r.hiddenMode&&b.focusManager.hasFocus&&!r.line.mouseNear()&&(r.element=R(r,true))){if(r.trigger=n(r)||p(r)||S(r))r.line.attach().place();else{r.trigger=null;r.line.detach()}B=false}},30)}});e.attachListener(k,"scroll",function(){if(b.mode=="wysiwyg"){r.line.detach();
if(L.webkit){r.hiddenMode=1;clearTimeout(t);t=setTimeout(function(){r.hiddenMode=0},50)}}});e.attachListener(k,"mousedown",function(){if(b.mode=="wysiwyg"){r.line.detach();r.hiddenMode=1}});e.attachListener(k,"mouseup",function(){r.hiddenMode=0});this.backdoor={accessFocusSpace:d,boxTrigger:c,isLine:g,getAscendantTrigger:a,getNonEmptyNeighbour:j,getSize:s,that:r,triggerEdge:p,triggerEditable:n,triggerExpand:S}}},this)}});var z=128,r=64,v=32,t=16,x=8,C=4,y=2,A=1,G=" ",D=CKEDITOR.dtd.$listItem,E=CKEDITOR.dtd.$tableContent,
M=100,I="width:0px;height:0px;padding:0px;margin:0px;display:block;z-index:9999;color:#fff;position:absolute;font-size: 0px;line-height:0px;",H=I+"border-color:transparent;display:block;border-style:solid;",F="<span>"+G+"</span>",K=CKEDITOR.tools.extend,J=CKEDITOR.dom.element,N=J.createFromHtml,L=CKEDITOR.env;c.prototype={set:function(a,b,c){this.properties=a+b+(c||A);return this},is:function(a){return(this.properties&a)==a}};var R=function(){return function(a,b,c){if(!a.mouse)return null;var d=a.doc,
e=a.line.wrap,c=c||a.mouse,f=new CKEDITOR.dom.element(d.$.elementFromPoint(c.x,c.y));if(b&&g(a,f)){e.hide();f=new CKEDITOR.dom.element(d.$.elementFromPoint(c.x,c.y));e.show()}return!f||!(f.type==CKEDITOR.NODE_ELEMENT&&f.$)||L.ie&&L.version<9&&!a.boundary.equals(f)&&!a.boundary.contains(f)?null:f}}(),P=CKEDITOR.dom.walker.whitespaces(),O=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT),S=function(){function a(d){var g=d.element,h,j,k;if(!e(g)||g.contains(d.editable))return null;k=B(d,function(a,
b){return!b.equals(a)},function(a,b){return R(a,true,b)},g);h=k.upper;j=k.lower;if(b(d,h,j))return k.set(v,x);if(h&&g.contains(h))for(;!h.getParent().equals(g);)h=h.getParent();else h=g.getFirst(function(a){return c(d,a)});if(j&&g.contains(j))for(;!j.getParent().equals(g);)j=j.getParent();else j=g.getLast(function(a){return c(d,a)});if(!h||!j)return null;u(d,h);u(d,j);if(!(d.mouse.y>h.size.top&&d.mouse.y<j.size.bottom))return null;for(var g=Number.MAX_VALUE,n,l,m,p;j&&!j.equals(h);){if(!(l=h.getNext(d.isRelevant)))break;
n=Math.abs(f(d,h,l)-d.mouse.y);if(n<g){g=n;m=h;p=l}h=l;u(d,h)}if(!m||!p||!(d.mouse.y>m.size.top&&d.mouse.y<p.size.bottom))return null;k.upper=m;k.lower=p;return k.set(v,x)}function c(a,b){return!(b&&b.type==CKEDITOR.NODE_TEXT||O(b)||k(b)||g(a,b)||b.type==CKEDITOR.NODE_ELEMENT&&b.$&&b.is("br"))}return function(c){var d=a(c),e;if(e=d){e=d.upper;var f=d.lower;e=!e||!f||k(f)||k(e)||f.equals(e)||e.equals(f)||f.contains(e)||e.contains(f)?false:m(c,e)&&m(c,f)&&b(c,e,f)?true:false}return e?d:null}}(),Q=["top",
"left","right","bottom"]}(),function(){function b(a){if(!a||a.type!=CKEDITOR.NODE_ELEMENT||a.getName()!="form")return[];for(var b=[],c=["style","className"],e=0;e<c.length;e++){var f=a.$.elements.namedItem(c[e]);if(f){f=new CKEDITOR.dom.element(f);b.push([f,f.nextSibling]);f.remove()}}return b}function c(a,b){if(a&&!(a.type!=CKEDITOR.NODE_ELEMENT||a.getName()!="form")&&b.length>0)for(var c=b.length-1;c>=0;c--){var e=b[c][0],f=b[c][1];f?e.insertBefore(f):e.appendTo(a)}}function a(a,d){var f=b(a),e=
{},j=a.$;if(!d){e["class"]=j.className||"";j.className=""}e.inline=j.style.cssText||"";if(!d)j.style.cssText="position: static; overflow: visible";c(f);return e}function f(a,d){var f=b(a),e=a.$;if("class"in d)e.className=d["class"];if("inline"in d)e.style.cssText=d.inline;c(f)}function j(a){var b=CKEDITOR.instances,c;for(c in b){var e=b[c];if(e.mode=="wysiwyg"&&!e.readOnly){e=e.document.getBody();e.setAttribute("contentEditable",false);e.setAttribute("contentEditable",true)}}if(a.editable().hasFocus){a.toolbox.focus();
a.focus()}}CKEDITOR.plugins.add("maximize",{init:function(b){function c(){var a=k.getViewPaneSize();b.resize(a.width,a.height,null,true)}if(b.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var g=b.lang,e=CKEDITOR.document,k=e.getWindow(),l,m,o,n=CKEDITOR.TRISTATE_OFF;b.addCommand("maximize",{modes:{wysiwyg:!CKEDITOR.env.iOS,source:!CKEDITOR.env.iOS},readOnly:1,editorFocus:false,exec:function(){var p=b.container.getChild(1),s=b.ui.space("contents");if(b.mode=="wysiwyg"){var u=b.getSelection();l=u&&u.getRanges();
m=k.getScrollPosition()}else{var q=b.editable().$;l=!CKEDITOR.env.ie&&[q.selectionStart,q.selectionEnd];m=[q.scrollLeft,q.scrollTop]}if(this.state==CKEDITOR.TRISTATE_OFF){k.on("resize",c);o=k.getScrollPosition();for(u=b.container;u=u.getParent();){u.setCustomData("maximize_saved_styles",a(u));u.setStyle("z-index",b.config.baseFloatZIndex-5)}s.setCustomData("maximize_saved_styles",a(s,true));p.setCustomData("maximize_saved_styles",a(p,true));s={overflow:CKEDITOR.env.webkit?"":"hidden",width:0,height:0};
e.getDocumentElement().setStyles(s);!CKEDITOR.env.gecko&&e.getDocumentElement().setStyle("position","fixed");(!CKEDITOR.env.gecko||!CKEDITOR.env.quirks)&&e.getBody().setStyles(s);CKEDITOR.env.ie?setTimeout(function(){k.$.scrollTo(0,0)},0):k.$.scrollTo(0,0);p.setStyle("position",CKEDITOR.env.gecko&&CKEDITOR.env.quirks?"fixed":"absolute");p.$.offsetLeft;p.setStyles({"z-index":b.config.baseFloatZIndex-5,left:"0px",top:"0px"});p.addClass("cke_maximized");c();s=p.getDocumentPosition();p.setStyles({left:-1*
s.x+"px",top:-1*s.y+"px"});CKEDITOR.env.gecko&&j(b)}else if(this.state==CKEDITOR.TRISTATE_ON){k.removeListener("resize",c);s=[s,p];for(u=0;u<s.length;u++){f(s[u],s[u].getCustomData("maximize_saved_styles"));s[u].removeCustomData("maximize_saved_styles")}for(u=b.container;u=u.getParent();){f(u,u.getCustomData("maximize_saved_styles"));u.removeCustomData("maximize_saved_styles")}CKEDITOR.env.ie?setTimeout(function(){k.$.scrollTo(o.x,o.y)},0):k.$.scrollTo(o.x,o.y);p.removeClass("cke_maximized");if(CKEDITOR.env.webkit){p.setStyle("display",
"inline");setTimeout(function(){p.setStyle("display","block")},0)}b.fire("resize")}this.toggleState();if(u=this.uiItems[0]){s=this.state==CKEDITOR.TRISTATE_OFF?g.maximize.maximize:g.maximize.minimize;u=CKEDITOR.document.getById(u._.id);u.getChild(1).setHtml(s);u.setAttribute("title",s);u.setAttribute("href",'javascript:void("'+s+'");')}if(b.mode=="wysiwyg")if(l){CKEDITOR.env.gecko&&j(b);b.getSelection().selectRanges(l);(q=b.getSelection().getStartElement())&&q.scrollIntoView(true)}else k.$.scrollTo(m.x,
m.y);else{if(l){q.selectionStart=l[0];q.selectionEnd=l[1]}q.scrollLeft=m[0];q.scrollTop=m[1]}l=m=null;n=this.state;b.fire("maximize",this.state)},canUndo:false});b.ui.addButton&&b.ui.addButton("Maximize",{label:g.maximize.maximize,command:"maximize",toolbar:"tools,10"});b.on("mode",function(){var a=b.getCommand("maximize");a.setState(a.state==CKEDITOR.TRISTATE_DISABLED?CKEDITOR.TRISTATE_DISABLED:n)},null,null,100)}}})}(),CKEDITOR.plugins.add("newpage",{init:function(b){b.addCommand("newpage",{modes:{wysiwyg:1,
source:1},exec:function(b){var a=this;b.setData(b.config.newpage_html||"",function(){b.focus();setTimeout(function(){b.fire("afterCommandExec",{name:"newpage",command:a});b.selectionChange()},200)})},async:true});b.ui.addButton&&b.ui.addButton("NewPage",{label:b.lang.newpage.toolbar,command:"newpage",toolbar:"document,20"})}}),CKEDITOR.plugins.add("pagebreak",{requires:"fakeobjects",onLoad:function(){var b=["{","background: url("+CKEDITOR.getUrl(this.path+"images/pagebreak.gif")+") no-repeat center center;",
"clear: both;width:100%; _width:99.9%;border-top: #999999 1px dotted;border-bottom: #999999 1px dotted;padding:0;height: 5px;cursor: default;}"].join("").replace(/;/g," !important;");CKEDITOR.addCss("div.cke_pagebreak"+b)},init:function(b){if(!b.blockless){b.addCommand("pagebreak",CKEDITOR.plugins.pagebreakCmd);b.ui.addButton&&b.ui.addButton("PageBreak",{label:b.lang.pagebreak.toolbar,command:"pagebreak",toolbar:"insert,70"});CKEDITOR.env.opera&&b.on("contentDom",function(){b.document.on("click",
function(c){c=c.data.getTarget();c.is("div")&&c.hasClass("cke_pagebreak")&&b.getSelection().selectElement(c)})})}},afterInit:function(b){var c=b.lang.pagebreak.alt,a=b.dataProcessor,b=a&&a.dataFilter;(a=a&&a.htmlFilter)&&a.addRules({attributes:{"class":function(a,b){var c=a.replace("cke_pagebreak","");if(c!=a){var d=CKEDITOR.htmlParser.fragment.fromHtml('<span style="display: none;"> </span>');b.children.length=0;b.add(d);d=b.attributes;delete d["aria-label"];delete d.contenteditable;delete d.title}return c}}},
5);b&&b.addRules({elements:{div:function(a){var b=a.attributes,h=b&&b.style,d=h&&a.children.length==1&&a.children[0];if((d=d&&d.name=="span"&&d.attributes.style)&&/page-break-after\s*:\s*always/i.test(h)&&/display\s*:\s*none/i.test(d)){b.contenteditable="false";b["class"]="cke_pagebreak";b["data-cke-display-name"]="pagebreak";b["aria-label"]=c;b.title=c;a.children.length=0}}}})}}),CKEDITOR.plugins.pagebreakCmd={exec:function(b){var c=b.lang.pagebreak.alt,c=CKEDITOR.dom.element.createFromHtml('<div style="page-break-after: always;"contenteditable="false" title="'+
c+'" aria-label="'+c+'" data-cke-display-name="pagebreak" class="cke_pagebreak"></div>',b.document);b.insertElement(c)},context:"div"},function(){function b(a,b){var c=CKEDITOR.cleanWord;if(c)b();else{var h=CKEDITOR.getUrl(CKEDITOR.config.pasteFromWordCleanupFile||a+"filter/default.js");CKEDITOR.scriptLoader.load(h,b,null,true)}return!c}function c(a){a.data.type="html"}CKEDITOR.plugins.add("pastefromword",{requires:"clipboard",init:function(a){var f=0,j=this.path;a.addCommand("pastefromword",{canUndo:false,
async:true,exec:function(a){var b=this;f=1;a.on("beforePaste",c);a.getClipboardData({title:a.lang.pastefromword.title},function(c){c&&a.fire("paste",{type:"html",dataValue:c.dataValue});a.fire("afterCommandExec",{name:"pastefromword",command:b,returnValue:!!c})})}});a.ui.addButton&&a.ui.addButton("PasteFromWord",{label:a.lang.pastefromword.toolbar,command:"pastefromword",toolbar:"clipboard,50"});a.on("pasteState",function(b){a.getCommand("pastefromword").setState(b.data)});a.on("paste",function(c){var d=
c.data,g=d.dataValue;if(g&&(f||/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(g))){var e=b(j,function(){if(e)a.fire("paste",d);else if(!a.config.pasteFromWordPromptCleanup||f||confirm(a.lang.pastefromword.confirmCleanup))d.dataValue=CKEDITOR.cleanWord(g,a)});e&&c.cancel()}},null,null,3)}})}(),function(){var b={canUndo:false,async:true,exec:function(c){c.getClipboardData({title:c.lang.pastetext.title},function(a){a&&c.fire("paste",{type:"text",dataValue:a.dataValue});c.fire("afterCommandExec",
{name:"pastetext",command:b,returnValue:!!a})})}};CKEDITOR.plugins.add("pastetext",{requires:"clipboard",init:function(c){c.addCommand("pastetext",b);c.ui.addButton&&c.ui.addButton("PasteText",{label:c.lang.pastetext.button,command:"pastetext",toolbar:"clipboard,40"});if(c.config.forcePasteAsPlainText)c.on("beforePaste",function(a){if(a.data.type!="html")a.data.type="text"});c.on("pasteState",function(a){c.getCommand("pastetext").setState(a.data)})}})}(),function(){var b,c={modes:{wysiwyg:1,source:1},
canUndo:false,readOnly:1,exec:function(a){var c=a.config,j=c.baseHref?'<base href="'+c.baseHref+'"/>':"",h=CKEDITOR.env.isCustomDomain();if(c.fullPage)a=a.getData().replace(/<head>/,"$&"+j).replace(/[^>]*(?=<\/title>)/,"$& — "+a.lang.preview.preview);else{var c="<body ",d=a.document&&a.document.getBody();if(d){d.getAttribute("id")&&(c=c+('id="'+d.getAttribute("id")+'" '));d.getAttribute("class")&&(c=c+('class="'+d.getAttribute("class")+'" '))}a=a.config.docType+'<html dir="'+a.config.contentsLangDirection+
'"><head>'+j+"<title>"+a.lang.preview.preview+"</title>"+CKEDITOR.tools.buildStyleHtml(a.config.contentsCss)+"</head>"+(c+">")+a.getData()+"</body></html>"}j=640;c=420;d=80;try{var g=window.screen,j=Math.round(g.width*0.8),c=Math.round(g.height*0.7),d=Math.round(g.width*0.1)}catch(e){}g="";if(h){window._cke_htmlToLoad=a;g='javascript:void( (function(){document.open();document.domain="'+document.domain+'";document.write( window.opener._cke_htmlToLoad );document.close();window.opener._cke_htmlToLoad = null;})() )'}if(CKEDITOR.env.gecko){window._cke_htmlToLoad=
a;g=b+"preview.html"}g=window.open(g,null,"toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width="+j+",height="+c+",left="+d);if(!h&&!CKEDITOR.env.gecko){var k=g.document;k.open();k.write(a);k.close();CKEDITOR.env.webkit&&setTimeout(function(){k.body.innerHTML=k.body.innerHTML+""},0)}}};CKEDITOR.plugins.add("preview",{init:function(a){if(a.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){b=this.path;a.addCommand("preview",c);a.ui.addButton&&a.ui.addButton("Preview",{label:a.lang.preview.preview,
command:"preview",toolbar:"document,40"})}}})}(),CKEDITOR.plugins.add("print",{init:function(b){if(b.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){b.addCommand("print",CKEDITOR.plugins.print);b.ui.addButton&&b.ui.addButton("Print",{label:b.lang.print.toolbar,command:"print",toolbar:"document,50"})}}}),CKEDITOR.plugins.print={exec:function(b){CKEDITOR.env.opera||(CKEDITOR.env.gecko?b.window.$.print():b.document.$.execCommand("Print"))},canUndo:!1,readOnly:1,modes:{wysiwyg:!CKEDITOR.env.opera}},CKEDITOR.plugins.add("removeformat",
{init:function(b){b.addCommand("removeFormat",CKEDITOR.plugins.removeformat.commands.removeformat);b.ui.addButton&&b.ui.addButton("RemoveFormat",{label:b.lang.removeformat.toolbar,command:"removeFormat",toolbar:"cleanup,10"});b._.removeFormat={filters:[]}}}),CKEDITOR.plugins.removeformat={commands:{removeformat:{exec:function(b){for(var c=b._.removeFormatRegex||(b._.removeFormatRegex=RegExp("^(?:"+b.config.removeFormatTags.replace(/,/g,"|")+")$","i")),a=b._.removeAttributes||(b._.removeAttributes=
b.config.removeFormatAttributes.split(",")),f=CKEDITOR.plugins.removeformat.filter,j=b.getSelection().getRanges(1),h=j.createIterator(),d;d=h.getNextRange();){d.collapsed||d.enlarge(CKEDITOR.ENLARGE_ELEMENT);var g=d.createBookmark(),e=g.startNode,k=g.endNode,l=function(a){for(var d=b.elementPath(a),e=d.elements,g=1,h;h=e[g];g++){if(h.equals(d.block)||h.equals(d.blockLimit))break;c.test(h.getName())&&f(b,h)&&a.breakParent(h)}};l(e);if(k){l(k);for(e=e.getNextSourceNode(true,CKEDITOR.NODE_ELEMENT);e;){if(e.equals(k))break;
l=e.getNextSourceNode(false,CKEDITOR.NODE_ELEMENT);if(!(e.getName()=="img"&&e.data("cke-realelement"))&&f(b,e))if(c.test(e.getName()))e.remove(1);else{e.removeAttributes(a);b.fire("removeFormatCleanup",e)}e=l}}d.moveToBookmark(g)}b.forceNextSelectionCheck();b.getSelection().selectRanges(j)}}},filter:function(b,c){for(var a=b._.removeFormat.filters,f=0;f<a.length;f++)if(a[f](c)===false)return false;return true}},CKEDITOR.editor.prototype.addRemoveFormatFilter=function(b){this._.removeFormat.filters.push(b)},
CKEDITOR.config.removeFormatTags="b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var",CKEDITOR.config.removeFormatAttributes="class,style,lang,width,height,align,hspace,valign",CKEDITOR.plugins.add("resize",{init:function(b){var c,a,f,j,h=b.config,d=b.ui.spaceId("resizer"),g=b.element?b.element.getDirection(1):"ltr";!h.resize_dir&&(h.resize_dir="both");h.resize_maxWidth==void 0&&(h.resize_maxWidth=3E3);h.resize_maxHeight==void 0&&(h.resize_maxHeight=3E3);h.resize_minWidth==
void 0&&(h.resize_minWidth=750);h.resize_minHeight==void 0&&(h.resize_minHeight=250);if(h.resize_enabled!==false){var e=null,k=(h.resize_dir=="both"||h.resize_dir=="horizontal")&&h.resize_minWidth!=h.resize_maxWidth,l=(h.resize_dir=="both"||h.resize_dir=="vertical")&&h.resize_minHeight!=h.resize_maxHeight,m=function(d){var e=c,n=a,m=e+(d.data.$.screenX-f)*(g=="rtl"?-1:1),d=n+(d.data.$.screenY-j);k&&(e=Math.max(h.resize_minWidth,Math.min(m,h.resize_maxWidth)));l&&(n=Math.max(h.resize_minHeight,Math.min(d,
h.resize_maxHeight)));b.resize(k?e:null,n)},o=function(){CKEDITOR.document.removeListener("mousemove",m);CKEDITOR.document.removeListener("mouseup",o);if(b.document){b.document.removeListener("mousemove",m);b.document.removeListener("mouseup",o)}},n=CKEDITOR.tools.addFunction(function(d){e||(e=b.getResizable());c=e.$.offsetWidth||0;a=e.$.offsetHeight||0;f=d.screenX;j=d.screenY;h.resize_minWidth>c&&(h.resize_minWidth=c);h.resize_minHeight>a&&(h.resize_minHeight=a);CKEDITOR.document.on("mousemove",
m);CKEDITOR.document.on("mouseup",o);if(b.document){b.document.on("mousemove",m);b.document.on("mouseup",o)}});b.on("destroy",function(){CKEDITOR.tools.removeFunction(n)});b.on("uiSpace",function(a){if(a.data.space=="bottom"){var c="";k&&!l&&(c=" cke_resizer_horizontal");!k&&l&&(c=" cke_resizer_vertical");var e='<span id="'+d+'" class="cke_resizer'+c+" cke_resizer_"+g+'" title="'+CKEDITOR.tools.htmlEncode(b.lang.common.resize)+'" onmousedown="CKEDITOR.tools.callFunction('+n+', event)"></span>';g==
"ltr"&&c=="ltr"?a.data.html=a.data.html+e:a.data.html=e+a.data.html}},b,null,100);b.on("maximize",function(a){b.ui.space("resizer")[a.data==CKEDITOR.TRISTATE_ON?"hide":"show"]()})}}}),function(){var b={modes:{wysiwyg:1,source:1},readOnly:1,exec:function(b){if(b=b.element.$.form)try{b.submit()}catch(a){b.submit.click&&b.submit.click()}}};CKEDITOR.plugins.add("save",{init:function(c){if(c.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE){c.addCommand("save",b).modes={wysiwyg:!!c.element.$.form};c.ui.addButton&&
c.ui.addButton("Save",{label:c.lang.save.toolbar,command:"save",toolbar:"document,10"})}}})}(),CKEDITOR.plugins.add("menubutton",{requires:"button,menu",onLoad:function(){var b=function(b){var a=this._;if(a.state!==CKEDITOR.TRISTATE_DISABLED){a.previousState=a.state;var f=a.menu;if(!f){f=a.menu=new CKEDITOR.menu(b,{panel:{className:"cke_menu_panel",attributes:{"aria-label":b.lang.common.options}}});f.onHide=CKEDITOR.tools.bind(function(){this.setState(this.modes&&this.modes[b.mode]?a.previousState:
CKEDITOR.TRISTATE_DISABLED)},this);this.onMenu&&f.addListener(this.onMenu)}if(a.on)f.hide();else{this.setState(CKEDITOR.TRISTATE_ON);f.show(CKEDITOR.document.getById(this._.id),4)}}};CKEDITOR.ui.menuButton=CKEDITOR.tools.createClass({base:CKEDITOR.ui.button,$:function(c){delete c.panel;this.base(c);this.hasArrow=true;this.click=b},statics:{handler:{create:function(b){return new CKEDITOR.ui.menuButton(b)}}}})},beforeInit:function(b){b.ui.addHandler(CKEDITOR.UI_MENUBUTTON,CKEDITOR.ui.menuButton.handler)}}),
CKEDITOR.UI_MENUBUTTON="menubutton",function(){function b(a,b){var c=0,f;for(f in b)if(b[f]==a){c=1;break}return c}var c="",a=function(){var a=this,b=function(){var b=a.config,c={};c.srcNodeRef=a.document.getWindow().$.frameElement;c.assocApp="CKEDITOR."+CKEDITOR.version+"@"+CKEDITOR.revision;c.customerid=b.scayt_customerid||"1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2";c.customDictionaryIds=b.scayt_customDictionaryIds||"";c.userDictionaryName=b.scayt_userDictionaryName||
"";c.sLang=b.scayt_sLang||"en_US";c.onLoad=function(){CKEDITOR.env.ie&&CKEDITOR.env.version<8||this.addStyle(this.selectorCss(),"padding-bottom: 2px !important;");a.editable().hasFocus&&!f.isControlRestored(a)&&this.focus()};c.onBeforeChange=function(){f.getScayt(a)&&!a.checkDirty()&&setTimeout(function(){a.resetDirty()},0)};b=window.scayt_custom_params;if(typeof b=="object")for(var e in b)c[e]=b[e];if(f.getControlId(a))c.id=f.getControlId(a);var g=new window.scayt(c);g.afterMarkupRemove.push(function(a){(new CKEDITOR.dom.element(a,
g.document)).mergeSiblings()});if(c=f.instances[a.name]){g.sLang=c.sLang;g.option(c.option());g.paused=c.paused}f.instances[a.name]=g;try{g.setDisabled(f.isPaused(a)===false)}catch(h){}a.fire("showScaytState")};a.on("contentDom",b);a.on("contentDomUnload",function(){for(var a=CKEDITOR.document.getElementsByTag("script"),b=/^dojoIoScript(\d+)$/i,c=/^https?:\/\/svc\.webspellchecker\.net\/spellcheck\/script\/ssrv\.cgi/i,d=0;d<a.count();d++){var e=a.getItem(d),f=e.getId(),g=e.getAttribute("src");f&&(g&&
f.match(b)&&g.match(c))&&e.remove()}});a.on("beforeCommandExec",function(b){if((b.data.name=="source"||b.data.name=="newpage")&&a.mode=="wysiwyg"){if(b=f.getScayt(a)){f.setPaused(a,!b.disabled);f.setControlId(a,b.id);b.destroy(true);delete f.instances[a.name]}}else b.data.name=="source"&&a.mode=="source"&&f.markControlRestore(a)});a.on("afterCommandExec",function(b){f.isScaytEnabled(a)&&a.mode=="wysiwyg"&&(b.data.name=="undo"||b.data.name=="redo")&&window.setTimeout(function(){f.getScayt(a).refresh()},
10)});a.on("destroy",function(a){var a=a.editor,b=f.getScayt(a);if(b){delete f.instances[a.name];f.setControlId(a,b.id);b.destroy(true)}});a.on("afterSetData",function(){f.isScaytEnabled(a)&&window.setTimeout(function(){var b=f.getScayt(a);b&&b.refresh()},10)});a.on("insertElement",function(){var b=f.getScayt(a);if(f.isScaytEnabled(a)){CKEDITOR.env.ie&&a.getSelection().unlock(true);window.setTimeout(function(){b.focus();b.refresh()},10)}},this,null,50);a.on("insertHtml",function(){var b=f.getScayt(a);
if(f.isScaytEnabled(a)){CKEDITOR.env.ie&&a.getSelection().unlock(true);window.setTimeout(function(){b.focus();b.refresh()},10)}},this,null,50);a.on("scaytDialog",function(b){b.data.djConfig=window.djConfig;b.data.scayt_control=f.getScayt(a);b.data.tab=c;b.data.scayt=window.scayt});var e=a.dataProcessor;(e=e&&e.htmlFilter)&&e.addRules({elements:{span:function(a){if(a.attributes["data-scayt_word"]&&a.attributes["data-scaytid"]){delete a.name;return a}}}});e=CKEDITOR.plugins.undo.Image.prototype;e.equals=
CKEDITOR.tools.override(e.equals,function(a){return function(b){var c=this.contents,d=b.contents,e=f.getScayt(this.editor);if(e&&f.isScaytReady(this.editor)){this.contents=e.reset(c)||"";b.contents=e.reset(d)||""}e=a.apply(this,arguments);this.contents=c;b.contents=d;return e}});a.document&&b()};CKEDITOR.plugins.scayt={engineLoaded:false,instances:{},controlInfo:{},setControlInfo:function(a,b){a&&(a.name&&typeof this.controlInfo[a.name]!="object")&&(this.controlInfo[a.name]={});for(var c in b)this.controlInfo[a.name][c]=
b[c]},isControlRestored:function(a){return a&&a.name&&this.controlInfo[a.name]?this.controlInfo[a.name].restored:false},markControlRestore:function(a){this.setControlInfo(a,{restored:true})},setControlId:function(a,b){this.setControlInfo(a,{id:b})},getControlId:function(a){return a&&a.name&&this.controlInfo[a.name]&&this.controlInfo[a.name].id?this.controlInfo[a.name].id:null},setPaused:function(a,b){this.setControlInfo(a,{paused:b})},isPaused:function(a){if(a&&a.name&&this.controlInfo[a.name])return this.controlInfo[a.name].paused},
getScayt:function(a){return this.instances[a.name]},isScaytReady:function(a){return this.engineLoaded===true&&"undefined"!==typeof window.scayt&&this.getScayt(a)},isScaytEnabled:function(a){return(a=this.getScayt(a))?a.disabled===false:false},getUiTabs:function(a){var b=[],a=a.config.scayt_uiTabs||"1,1,1",a=a.split(",");a[3]="1";for(var c=0;c<4;c++)b[c]=typeof window.scayt!="undefined"&&typeof window.scayt.uiTags!="undefined"?parseInt(a[c],10)&&window.scayt.uiTags[c]:parseInt(a[c],10);return b},loadEngine:function(b){if(CKEDITOR.env.gecko&&
CKEDITOR.env.version<10900||CKEDITOR.env.opera||CKEDITOR.env.air)return b.fire("showScaytState");if(this.engineLoaded===true)return a.apply(b);if(this.engineLoaded==-1)return CKEDITOR.on("scaytReady",function(){a.apply(b)});CKEDITOR.on("scaytReady",a,b);CKEDITOR.on("scaytReady",function(){this.engineLoaded=true},this,null,0);this.engineLoaded=-1;var c=document.location.protocol,c=c.search(/https?:/)!=-1?c:"http:",c=b.config.scayt_srcUrl||c+"//svc.webspellchecker.net/scayt26/loader__base.js",e=f.parseUrl(c).path+
"/";if(window.scayt==void 0){CKEDITOR._djScaytConfig={baseUrl:e,addOnLoad:[function(){CKEDITOR.fireOnce("scaytReady")}],isDebug:false};CKEDITOR.document.getHead().append(CKEDITOR.document.createElement("script",{attributes:{type:"text/javascript",async:"true",src:c}}))}else CKEDITOR.fireOnce("scaytReady");return null},parseUrl:function(a){var b;return a.match&&(b=a.match(/(.*)[\/\\](.*?\.\w+)$/))?{path:b[1],file:b[2]}:a}};var f=CKEDITOR.plugins.scayt,j=function(a,b,c,f,h,j,o){a.addCommand(f,h);a.addMenuItem(f,
{label:c,command:f,group:j,order:o})},h={preserveState:true,editorFocus:false,canUndo:false,exec:function(a){if(f.isScaytReady(a)){var b=f.isScaytEnabled(a);this.setState(b?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_ON);a=f.getScayt(a);a.focus();a.setDisabled(b)}else if(!a.config.scayt_autoStartup&&f.engineLoaded>=0){this.setState(CKEDITOR.TRISTATE_DISABLED);f.loadEngine(a)}}};CKEDITOR.plugins.add("scayt",{requires:"menubutton,dialog",beforeInit:function(a){var b=a.config.scayt_contextMenuItemsOrder||
"suggest|moresuggest|control",c="";if((b=b.split("|"))&&b.length)for(var f=0;f<b.length;f++)c=c+("scayt_"+b[f]+(b.length!=parseInt(f,10)+1?",":""));a.config.menu_groups=c+","+a.config.menu_groups},init:function(a){var g=a.dataProcessor&&a.dataProcessor.dataFilter,e={elements:{span:function(a){var b=a.attributes;b&&b["data-scaytid"]&&delete a.name}}};g&&g.addRules(e);var k={},l={},m=a.addCommand("scaytcheck",h);CKEDITOR.dialog.add("scaytcheck",CKEDITOR.getUrl(this.path+"dialogs/options.js"));g=f.getUiTabs(a);
a.addMenuGroup("scaytButton");a.addMenuGroup("scayt_suggest",-10);a.addMenuGroup("scayt_moresuggest",-9);a.addMenuGroup("scayt_control",-8);var e={},o=a.lang.scayt;e.scaytToggle={label:o.enable,command:"scaytcheck",group:"scaytButton"};if(g[0]==1)e.scaytOptions={label:o.options,group:"scaytButton",onClick:function(){c="options";a.openDialog("scaytcheck")}};if(g[1]==1)e.scaytLangs={label:o.langs,group:"scaytButton",onClick:function(){c="langs";a.openDialog("scaytcheck")}};if(g[2]==1)e.scaytDict={label:o.dictionariesTab,
group:"scaytButton",onClick:function(){c="dictionaries";a.openDialog("scaytcheck")}};e.scaytAbout={label:a.lang.scayt.about,group:"scaytButton",onClick:function(){c="about";a.openDialog("scaytcheck")}};a.addMenuItems(e);a.ui.add("Scayt",CKEDITOR.UI_MENUBUTTON,{label:o.title,title:CKEDITOR.env.opera?o.opera_title:o.title,modes:{wysiwyg:1},toolbar:"spellchecker,20",onRender:function(){m.on("state",function(){this.setState(m.state)},this)},onMenu:function(){var b=f.isScaytEnabled(a);a.getMenuItem("scaytToggle").label=
o[b?"disable":"enable"];var c=f.getUiTabs(a);return{scaytToggle:CKEDITOR.TRISTATE_OFF,scaytOptions:b&&c[0]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytLangs:b&&c[1]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytDict:b&&c[2]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytAbout:b&&c[3]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED}}});a.contextMenu&&a.addMenuItems&&a.contextMenu.addListener(function(c,e){if(!f.isScaytEnabled(a)||e.getRanges()[0].checkReadOnly())return null;
var g=f.getScayt(a),h=g.getScaytNode();if(!h)return null;var m=g.getWord(h);if(!m)return null;var w=g.getLang(),m=window.scayt.getSuggestion(m,w);if(!m||!m.length)return null;for(var B in k){delete a._.menuItems[B];delete a.commands[B]}for(B in l){delete a._.menuItems[B];delete a.commands[B]}k={};l={};B=a.config.scayt_moreSuggestions||"on";var w=false,z=a.config.scayt_maxSuggestions;typeof z!="number"&&(z=5);!z&&(z=m.length);for(var r=a.config.scayt_contextCommands||"all",r=r.split("|"),v=0,t=m.length;v<
t;v=v+1){var x="scayt_suggestion_"+m[v].replace(" ","_"),C=function(a,b){return{exec:function(){g.replace(a,b)}}}(h,m[v]);if(v<z){j(a,"button_"+x,m[v],x,C,"scayt_suggest",v+1);l[x]=CKEDITOR.TRISTATE_OFF}else if(B=="on"){j(a,"button_"+x,m[v],x,C,"scayt_moresuggest",v+1);k[x]=CKEDITOR.TRISTATE_OFF;w=true}}if(w){a.addMenuItem("scayt_moresuggest",{label:o.moreSuggestions,group:"scayt_moresuggest",order:10,getItems:function(){return k}});l.scayt_moresuggest=CKEDITOR.TRISTATE_OFF}if(b("all",r)||b("ignore",
r)){j(a,"ignore",o.ignore,"scayt_ignore",{exec:function(){g.ignore(h)}},"scayt_control",1);l.scayt_ignore=CKEDITOR.TRISTATE_OFF}if(b("all",r)||b("ignoreall",r)){j(a,"ignore_all",o.ignoreAll,"scayt_ignore_all",{exec:function(){g.ignoreAll(h)}},"scayt_control",2);l.scayt_ignore_all=CKEDITOR.TRISTATE_OFF}if(b("all",r)||b("add",r)){j(a,"add_word",o.addWord,"scayt_add_word",{exec:function(){window.scayt.addWordToUserDictionary(h)}},"scayt_control",3);l.scayt_add_word=CKEDITOR.TRISTATE_OFF}g.fireOnContextMenu&&
g.fireOnContextMenu(a);return l});g=function(b){b.removeListener();CKEDITOR.env.opera||CKEDITOR.env.air||a.editable().isInline()?m.setState(CKEDITOR.TRISTATE_DISABLED):m.setState(f.isScaytEnabled(a)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)};a.on("showScaytState",g);a.on("instanceReady",g);if(a.config.scayt_autoStartup)a.on("instanceReady",function(){f.loadEngine(a)})},afterInit:function(a){var b,c=function(a){if(a.hasAttribute("data-scaytid"))return false};a._.elementsPath&&(b=a._.elementsPath.filters)&&
b.push(c);a.addRemoveFormatFilter&&a.addRemoveFormatFilter(c)}})}(),function(){CKEDITOR.plugins.add("selectall",{init:function(b){b.addCommand("selectAll",{modes:{wysiwyg:1,source:1},exec:function(b){var a=b.editable();if(a.is("textarea")){b=a.$;if(CKEDITOR.env.ie)b.createTextRange().execCommand("SelectAll");else{b.selectionStart=0;b.selectionEnd=b.value.length}b.focus()}else{if(a.is("body"))b.document.$.execCommand("SelectAll",false,null);else{var f=b.createRange();f.selectNodeContents(a);f.select()}b.forceNextSelectionCheck();
b.selectionChange()}},canUndo:false});b.ui.addButton&&b.ui.addButton("SelectAll",{label:b.lang.selectall.toolbar,command:"selectAll",toolbar:"selection,10"})}})}(),function(){var b={readOnly:1,preserveState:true,editorFocus:false,exec:function(b){this.toggleState();this.refresh(b)},refresh:function(b){if(b.document){var a=this.state==CKEDITOR.TRISTATE_ON?"attachClass":"removeClass";b.editable()[a]("cke_show_blocks")}}};CKEDITOR.plugins.add("showblocks",{onLoad:function(){function b(a){return".%1.%2 p,.%1.%2 div,.%1.%2 pre,.%1.%2 address,.%1.%2 blockquote,.%1.%2 h1,.%1.%2 h2,.%1.%2 h3,.%1.%2 h4,.%1.%2 h5,.%1.%2 h6{background-position: top %3;padding-%3: 8px;}".replace(/%1/g,
"cke_show_blocks").replace(/%2/g,"cke_contents_"+a).replace(/%3/g,a=="rtl"?"right":"left")}CKEDITOR.addCss(".%2 p,.%2 div,.%2 pre,.%2 address,.%2 blockquote,.%2 h1,.%2 h2,.%2 h3,.%2 h4,.%2 h5,.%2 h6{background-repeat: no-repeat;border: 1px dotted gray;padding-top: 8px;}.%2 p{%1p.png);}.%2 div{%1div.png);}.%2 pre{%1pre.png);}.%2 address{%1address.png);}.%2 blockquote{%1blockquote.png);}.%2 h1{%1h1.png);}.%2 h2{%1h2.png);}.%2 h3{%1h3.png);}.%2 h4{%1h4.png);}.%2 h5{%1h5.png);}.%2 h6{%1h6.png);}".replace(/%1/g,
"background-image: url("+CKEDITOR.getUrl(this.path)+"images/block_").replace(/%2/g,"cke_show_blocks ")+b("ltr")+b("rtl"))},init:function(c){if(!c.blockless){var a=c.addCommand("showblocks",b);a.canUndo=false;c.config.startupOutlineBlocks&&a.setState(CKEDITOR.TRISTATE_ON);c.ui.addButton&&c.ui.addButton("ShowBlocks",{label:c.lang.showblocks.toolbar,command:"showblocks",toolbar:"tools,20"});c.on("mode",function(){a.state!=CKEDITOR.TRISTATE_DISABLED&&a.refresh(c)});c.on("contentDom",function(){a.state!=
CKEDITOR.TRISTATE_DISABLED&&a.refresh(c)})}}})}(),function(){var b={preserveState:true,editorFocus:false,readOnly:1,exec:function(b){this.toggleState();this.refresh(b)},refresh:function(b){if(b.document){var a=this.state==CKEDITOR.TRISTATE_ON?"attachClass":"removeClass";b.editable()[a]("cke_show_borders")}}};CKEDITOR.plugins.add("showborders",{modes:{wysiwyg:1},onLoad:function(){var b;b=(CKEDITOR.env.ie6Compat?[".%1 table.%2,",".%1 table.%2 td, .%1 table.%2 th","{","border : #d3d3d3 1px dotted","}"]:
[".%1 table.%2,",".%1 table.%2 > tr > td, .%1 table.%2 > tr > th,",".%1 table.%2 > tbody > tr > td, .%1 table.%2 > tbody > tr > th,",".%1 table.%2 > thead > tr > td, .%1 table.%2 > thead > tr > th,",".%1 table.%2 > tfoot > tr > td, .%1 table.%2 > tfoot > tr > th","{","border : #d3d3d3 1px dotted","}"]).join("").replace(/%2/g,"cke_show_border").replace(/%1/g,"cke_show_borders ");CKEDITOR.addCss(b)},init:function(c){var a=c.addCommand("showborders",b);a.canUndo=false;c.config.startupShowBorders!==false&&
a.setState(CKEDITOR.TRISTATE_ON);c.on("mode",function(){a.state!=CKEDITOR.TRISTATE_DISABLED&&a.refresh(c)},null,null,100);c.on("contentDom",function(){a.state!=CKEDITOR.TRISTATE_DISABLED&&a.refresh(c)});c.on("removeFormatCleanup",function(a){a=a.data;c.getCommand("showborders").state==CKEDITOR.TRISTATE_ON&&(a.is("table")&&(!a.hasAttribute("border")||parseInt(a.getAttribute("border"),10)<=0))&&a.addClass("cke_show_border")})},afterInit:function(b){var a=b.dataProcessor,b=a&&a.dataFilter,a=a&&a.htmlFilter;
b&&b.addRules({elements:{table:function(a){var a=a.attributes,b=a["class"],c=parseInt(a.border,10);if((!c||c<=0)&&(!b||b.indexOf("cke_show_border")==-1))a["class"]=(b||"")+" cke_show_border"}}});a&&a.addRules({elements:{table:function(a){var a=a.attributes,b=a["class"];b&&(a["class"]=b.replace("cke_show_border","").replace(/\s{2}/," ").replace(/^\s+|\s+$/,""))}}})}});CKEDITOR.on("dialogDefinition",function(b){var a=b.data.name;if(a=="table"||a=="tableProperties"){b=b.data.definition;a=b.getContents("info").get("txtBorder");
a.commit=CKEDITOR.tools.override(a.commit,function(a){return function(b,c){a.apply(this,arguments);var d=parseInt(this.getValue(),10);c[!d||d<=0?"addClass":"removeClass"]("cke_show_border")}});if(b=(b=b.getContents("advanced"))&&b.get("advCSSClasses")){b.setup=CKEDITOR.tools.override(b.setup,function(a){return function(){a.apply(this,arguments);this.setValue(this.getValue().replace(/cke_show_border/,""))}});b.commit=CKEDITOR.tools.override(b.commit,function(a){return function(b,c){a.apply(this,arguments);
parseInt(c.getAttribute("border"),10)||c.addClass("cke_show_border")}})}}})}(),CKEDITOR.plugins.add("smiley",{requires:"dialog",init:function(b){b.config.smiley_path=b.config.smiley_path||this.path+"images/";b.addCommand("smiley",new CKEDITOR.dialogCommand("smiley"));b.ui.addButton&&b.ui.addButton("Smiley",{label:b.lang.smiley.toolbar,command:"smiley",toolbar:"insert,50"});CKEDITOR.dialog.add("smiley",this.path+"dialogs/smiley.js")}}),CKEDITOR.config.smiley_images="regular_smile.gif sad_smile.gif wink_smile.gif teeth_smile.gif confused_smile.gif tongue_smile.gif embarrassed_smile.gif omg_smile.gif whatchutalkingabout_smile.gif angry_smile.gif angel_smile.gif shades_smile.gif devil_smile.gif cry_smile.gif lightbulb.gif thumbs_down.gif thumbs_up.gif heart.gif broken_heart.gif kiss.gif envelope.gif".split(" "),
CKEDITOR.config.smiley_descriptions="smiley;sad;wink;laugh;frown;cheeky;blush;surprise;indecision;angry;angel;cool;devil;crying;enlightened;no;yes;heart;broken heart;kiss;mail".split(";"),function(){function b(){this.hide();this.setStyle("height",this.getParent().$.clientHeight+"px");this.setStyle("width",this.getParent().$.clientWidth+"px");this.show()}CKEDITOR.plugins.add("sourcearea",{init:function(a){if(a.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var f=CKEDITOR.plugins.sourcearea;a.addMode("source",
function(f){var h=a.ui.space("contents").getDocument().createElement("textarea");h.setStyles(CKEDITOR.tools.extend({width:CKEDITOR.env.ie7Compat?"99%":"100%",height:"100%",resize:"none",outline:"none","text-align":"left"},CKEDITOR.tools.cssVendorPrefix("tab-size",a.config.sourceAreaTabSize||4)));var d=[a.lang.editor,a.name].join();h.setAttributes({dir:"ltr",tabIndex:CKEDITOR.env.webkit?-1:a.tabIndex,role:"textbox","aria-label":d});h.addClass("cke_source cke_reset cke_enable_context_menu");a.ui.space("contents").append(h);
h=a.editable(new c(a,h));h.setData(a.getData(1));if(CKEDITOR.env.ie){h.attachListener(a,"resize",b,h);h.attachListener(CKEDITOR.document.getWindow(),"resize",b,h);CKEDITOR.tools.setTimeout(b,0,h)}a.fire("ariaWidget",this);f()});a.addCommand("source",f.commands.source);a.ui.addButton&&a.ui.addButton("Source",{label:a.lang.sourcearea.toolbar,command:"source",toolbar:"mode,10"});a.on("mode",function(){a.getCommand("source").setState(a.mode=="source"?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)})}}});
var c=CKEDITOR.tools.createClass({base:CKEDITOR.editable,proto:{setData:function(a){this.setValue(a);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(){c.baseProto.detach.call(this);this.clearCustomData();this.remove()}}})}(),CKEDITOR.plugins.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},
editorFocus:!1,readOnly:1,exec:function(b){b.mode=="wysiwyg"&&b.fire("saveSnapshot");b.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED);b.setMode(b.mode=="source"?"wysiwyg":"source")},canUndo:!1}}},CKEDITOR.plugins.add("specialchar",{availableLangs:{cs:1,cy:1,de:1,en:1,eo:1,et:1,fa:1,fi:1,fr:1,hr:1,it:1,nb:1,nl:1,no:1,tr:1,ug:1,"zh-cn":1},requires:"dialog",init:function(b){var c=this;CKEDITOR.dialog.add("specialchar",this.path+"dialogs/specialchar.js");b.addCommand("specialchar",{exec:function(){var a=
b.langCode,a=c.availableLangs[a]?a:"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(c.path+"dialogs/lang/"+a+".js"),function(){CKEDITOR.tools.extend(b.lang.specialchar,c.langEntries[a]);b.openDialog("specialchar")})},modes:{wysiwyg:1},canUndo:false});b.ui.addButton&&b.ui.addButton("SpecialChar",{label:b.lang.specialchar.toolbar,command:"specialchar",toolbar:"insert,50"})}}),CKEDITOR.config.specialChars="! " # $ % & ' ( ) * + - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ 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 { | } ~ € ‘ ’ “ ” – — ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ® ¯ ° ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ Œ œ Ŵ Ŷ ŵ ŷ ‚ ‛ „ … ™ ► • → ⇒ ⇔ ♦ ≈".split(" "),
function(){function b(b,a){var f=b.type,j=a.type;return f==j?0:f==CKEDITOR.STYLE_OBJECT?-1:j==CKEDITOR.STYLE_OBJECT?1:j==CKEDITOR.STYLE_BLOCK?1:-1}CKEDITOR.plugins.add("stylescombo",{requires:"richcombo",init:function(c){function a(a){c.getStylesSet(function(g){if(!d.length){for(var j,m,o=0,n=g.length;o<n;o++){j=g[o];if(!(c.blockless&&j.element in CKEDITOR.dtd.$block)){m=j.name;j=h[m]=new CKEDITOR.style(j);j._name=m;j._.enterMode=f.enterMode;d.push(j)}}d.sort(b)}a&&a()})}var f=c.config,j=c.lang.stylescombo,
h={},d=[],g;c.ui.addRichCombo("Styles",{label:j.label,title:j.panelTitle,toolbar:"styles,10",panel:{css:[CKEDITOR.skin.getPath("editor")].concat(f.contentsCss),multiSelect:true,attributes:{"aria-label":j.panelTitle}},init:function(){g=this;a(function(){var a,b,c,f,h,n;h=0;for(n=d.length;h<n;h++){a=d[h];b=a._name;f=a.type;if(f!=c){g.startGroup(j["panelTitle"+f]);c=f}g.add(b,a.type==CKEDITOR.STYLE_OBJECT?b:a.buildPreview(),b)}g.commit()})},onClick:function(a){c.focus();c.fire("saveSnapshot");var a=
h[a],b=c.elementPath();c[a.checkActive(b)?"removeStyle":"applyStyle"](a);c.fire("saveSnapshot")},onRender:function(){c.on("selectionChange",function(a){for(var b=this.getValue(),a=a.data.path.elements,c=0,d=a.length,f;c<d;c++){f=a[c];for(var g in h)if(h[g].checkElementRemovable(f,true)){g!=b&&this.setValue(g);return}}this.setValue("")},this)},onOpen:function(){var a=c.getSelection().getSelectedElement(),a=c.elementPath(a),b=[0,0,0,0];this.showAll();this.unmarkAll();for(var d in h){var f=h[d],g=f.type;
if(g==CKEDITOR.STYLE_BLOCK&&!a.isContextFor(f.element))this.hideItem(d);else{if(f.checkActive(a))this.mark(d);else if(g==CKEDITOR.STYLE_OBJECT&&!f.checkApplicable(a)){this.hideItem(d);b[g]--}b[g]++}}b[CKEDITOR.STYLE_BLOCK]||this.hideGroup(j["panelTitle"+CKEDITOR.STYLE_BLOCK]);b[CKEDITOR.STYLE_INLINE]||this.hideGroup(j["panelTitle"+CKEDITOR.STYLE_INLINE]);b[CKEDITOR.STYLE_OBJECT]||this.hideGroup(j["panelTitle"+CKEDITOR.STYLE_OBJECT])},reset:function(){if(g){delete g._.panel;delete g._.list;g._.committed=
0;g._.items={};g._.state=CKEDITOR.TRISTATE_OFF}h={};d=[];a()}});c.on("instanceReady",function(){a()})}})}(),function(){function b(a){return{editorFocus:false,canUndo:false,modes:{wysiwyg:1},exec:function(b){if(b.editable().hasFocus){var c=b.getSelection(),f;if(f=(new CKEDITOR.dom.elementPath(c.getCommonAncestor(),c.root)).contains({td:1,th:1},1)){var c=b.createRange(),e=CKEDITOR.tools.tryThese(function(){var b=f.getParent().$.cells[f.$.cellIndex+(a?-1:1)];b.parentNode.parentNode;return b},function(){var b=
f.getParent(),b=b.getAscendant("table").$.rows[b.$.rowIndex+(a?-1:1)];return b.cells[a?b.cells.length-1:0]});if(!e&&!a){for(var k=f.getAscendant("table").$,e=f.getParent().$.cells,k=new CKEDITOR.dom.element(k.insertRow(-1),b.document),l=0,m=e.length;l<m;l++){var o=k.append((new CKEDITOR.dom.element(e[l],b.document)).clone(false,false));!CKEDITOR.env.ie&&o.appendBogus()}c.moveToElementEditStart(k)}else if(e){e=new CKEDITOR.dom.element(e);c.moveToElementEditStart(e);(!c.checkStartOfBlock()||!c.checkEndOfBlock())&&
c.selectNodeContents(e)}else return true;c.select(true);return true}}return false}}}var c={editorFocus:false,modes:{wysiwyg:1,source:1}},a={exec:function(a){a.container.focusNext(true,a.tabIndex)}},f={exec:function(a){a.container.focusPrevious(true,a.tabIndex)}};CKEDITOR.plugins.add("tab",{init:function(j){for(var h=j.config.enableTabKeyTools!==false,d=j.config.tabSpaces||0,g="";d--;)g=g+" ";if(g)j.on("key",function(a){if(a.data.keyCode==9){j.insertHtml(g);a.cancel()}});if(h)j.on("key",function(a){(a.data.keyCode==
9&&j.execCommand("selectNextCell")||a.data.keyCode==CKEDITOR.SHIFT+9&&j.execCommand("selectPreviousCell"))&&a.cancel()});j.addCommand("blur",CKEDITOR.tools.extend(a,c));j.addCommand("blurBack",CKEDITOR.tools.extend(f,c));j.addCommand("selectNextCell",b());j.addCommand("selectPreviousCell",b(true))}})}(),CKEDITOR.dom.element.prototype.focusNext=function(b,c){var a=c===void 0?this.getTabIndex():c,f,j,h,d,g,e;if(a<=0)for(g=this.getNextSourceNode(b,CKEDITOR.NODE_ELEMENT);g;){if(g.isVisible()&&g.getTabIndex()===
0){h=g;break}g=g.getNextSourceNode(false,CKEDITOR.NODE_ELEMENT)}else for(g=this.getDocument().getBody().getFirst();g=g.getNextSourceNode(false,CKEDITOR.NODE_ELEMENT);){if(!f)if(!j&&g.equals(this)){j=true;if(b){if(!(g=g.getNextSourceNode(true,CKEDITOR.NODE_ELEMENT)))break;f=1}}else j&&!this.contains(g)&&(f=1);if(g.isVisible()&&!((e=g.getTabIndex())<0)){if(f&&e==a){h=g;break}if(e>a&&(!h||!d||e<d)){h=g;d=e}else if(!h&&e===0){h=g;d=e}}}h&&h.focus()},CKEDITOR.dom.element.prototype.focusPrevious=function(b,
c){for(var a=c===void 0?this.getTabIndex():c,f,j,h,d=0,g,e=this.getDocument().getBody().getLast();e=e.getPreviousSourceNode(false,CKEDITOR.NODE_ELEMENT);){if(!f)if(!j&&e.equals(this)){j=true;if(b){if(!(e=e.getPreviousSourceNode(true,CKEDITOR.NODE_ELEMENT)))break;f=1}}else j&&!this.contains(e)&&(f=1);if(e.isVisible()&&!((g=e.getTabIndex())<0))if(a<=0){if(f&&g===0){h=e;break}if(g>d){h=e;d=g}}else{if(f&&g==a){h=e;break}if(g<a&&(!h||g>d)){h=e;d=g}}}h&&h.focus()},CKEDITOR.plugins.add("table",{requires:"dialog",
init:function(b){function c(a){return CKEDITOR.tools.extend(a||{},{contextSensitive:1,refresh:function(a,b){this.setState(b.contains("table",1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}if(!b.blockless){var a=b.lang.table;b.addCommand("table",new CKEDITOR.dialogCommand("table",{context:"table"}));b.addCommand("tableProperties",new CKEDITOR.dialogCommand("tableProperties",c()));b.addCommand("tableDelete",c({exec:function(a){var b=a.elementPath().contains("table",1);if(b){var c=b.getParent();
c.getChildCount()==1&&!c.is("body","td","th")&&(b=c);a=a.createRange();a.moveToPosition(b,CKEDITOR.POSITION_BEFORE_START);b.remove();a.select()}}}));b.ui.addButton&&b.ui.addButton("Table",{label:a.toolbar,command:"table",toolbar:"insert,30"});CKEDITOR.dialog.add("table",this.path+"dialogs/table.js");CKEDITOR.dialog.add("tableProperties",this.path+"dialogs/table.js");b.addMenuItems&&b.addMenuItems({table:{label:a.menu,command:"tableProperties",group:"table",order:5},tabledelete:{label:a.deleteTable,
command:"tableDelete",group:"table",order:1}});b.on("doubleclick",function(a){if(a.data.element.is("table"))a.data.dialog="tableProperties"});b.contextMenu&&b.contextMenu.addListener(function(){return{tabledelete:CKEDITOR.TRISTATE_OFF,table:CKEDITOR.TRISTATE_OFF}})}}}),function(){function b(a){function b(a){if(!(c.length>0)&&a.type==CKEDITOR.NODE_ELEMENT&&o.test(a.getName())&&!a.getCustomData("selected_cell")){CKEDITOR.dom.element.setMarker(d,a,"selected_cell",true);c.push(a)}}for(var a=a.getRanges(),
c=[],d={},e=0;e<a.length;e++){var f=a[e];if(f.collapsed){f=f.getCommonAncestor();(f=f.getAscendant("td",true)||f.getAscendant("th",true))&&c.push(f)}else{var f=new CKEDITOR.dom.walker(f),g;for(f.guard=b;g=f.next();)if((g=g.getAscendant("td")||g.getAscendant("th"))&&!g.getCustomData("selected_cell")){CKEDITOR.dom.element.setMarker(d,g,"selected_cell",true);c.push(g)}}}CKEDITOR.dom.element.clearAllMarkers(d);return c}function c(a,c){for(var d=b(a),e=d[0],f=e.getAscendant("table"),e=e.getDocument(),
g=d[0].getParent(),h=g.$.rowIndex,d=d[d.length-1],j=d.getParent().$.rowIndex+d.$.rowSpan-1,d=new CKEDITOR.dom.element(f.$.rows[j]),h=c?h:j,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"),j=0;f[j]&&j<d;j++){var k;if(f[j].rowSpan>1&&h&&f[j]==h[j]){k=f[j];k.rowSpan=k.rowSpan+1}else{k=(new CKEDITOR.dom.element(f[j])).clone();k.removeAttribute("rowSpan");!CKEDITOR.env.ie&&k.appendBogus();e.append(k);k=k.$}j=j+(k.colSpan-1)}c?e.insertBefore(g):e.insertAfter(g)}
function a(c){if(c instanceof CKEDITOR.dom.selection){for(var d=b(c),e=d[0].getAscendant("table"),f=CKEDITOR.tools.buildTableMap(e),c=d[0].getParent().$.rowIndex,d=d[d.length-1],g=d.getParent().$.rowIndex+d.$.rowSpan-1,d=[],h=c;h<=g;h++){for(var j=f[h],k=new CKEDITOR.dom.element(e.$.rows[h]),l=0;l<j.length;l++){var m=new CKEDITOR.dom.element(j[l]),o=m.getParent().$.rowIndex;if(m.$.rowSpan==1)m.remove();else{m.$.rowSpan=m.$.rowSpan-1;if(o==h){o=f[h+1];o[l-1]?m.insertAfter(new CKEDITOR.dom.element(o[l-
1])):(new CKEDITOR.dom.element(e.$.rows[h+1])).append(m,1)}}l=l+(m.$.colSpan-1)}d.push(k)}f=e.$.rows;e=new CKEDITOR.dom.element(f[g+1]||(c>0?f[c-1]:null)||e.$.parentNode);for(h=d.length;h>=0;h--)a(d[h]);return e}if(c instanceof CKEDITOR.dom.element){e=c.getAscendant("table");e.$.rows.length==1?e.remove():c.remove()}return null}function f(a,b){for(var c=b?Infinity:0,d=0;d<a.length;d++){var e;e=a[d];for(var f=b,g=e.getParent().$.cells,h=0,j=0;j<g.length;j++){var k=g[j],h=h+(f?1:k.colSpan);if(k==e.$)break}e=
h-1;if(b?e<c:e>c)c=e}return c}function j(a,c){for(var d=b(a),e=d[0].getAscendant("table"),g=f(d,1),d=f(d),g=c?g:d,h=CKEDITOR.tools.buildTableMap(e),e=[],d=[],j=h.length,k=0;k<j;k++){e.push(h[k][g]);var l=c?h[k][g-1]:h[k][g+1];l&&d.push(l)}for(k=0;k<j;k++){if(e[k].colSpan>1&&d.length&&d[k]==e[k]){g=e[k];g.colSpan=g.colSpan+1}else{g=(new CKEDITOR.dom.element(e[k])).clone();g.removeAttribute("colSpan");!CKEDITOR.env.ie&&g.appendBogus();g[c?"insertBefore":"insertAfter"].call(g,new CKEDITOR.dom.element(e[k]));
g=g.$}k=k+(g.rowSpan-1)}}function h(a,b){var c=a.getStartElement();if(c=c.getAscendant("td",1)||c.getAscendant("th",1)){var d=c.clone();CKEDITOR.env.ie||d.appendBogus();b?d.insertBefore(c):d.insertAfter(c)}}function d(a){if(a instanceof CKEDITOR.dom.selection){var a=b(a),c=a[0]&&a[0].getAscendant("table"),e;a:{var f=0;e=a.length-1;for(var h={},j,k;j=a[f++];)CKEDITOR.dom.element.setMarker(h,j,"delete_cell",true);for(f=0;j=a[f++];)if((k=j.getPrevious())&&!k.getCustomData("delete_cell")||(k=j.getNext())&&
!k.getCustomData("delete_cell")){CKEDITOR.dom.element.clearAllMarkers(h);e=k;break a}CKEDITOR.dom.element.clearAllMarkers(h);k=a[0].getParent();if(k=k.getPrevious())e=k.getLast();else{k=a[e].getParent();e=(k=k.getNext())?k.getChild(0):null}}for(k=a.length-1;k>=0;k--)d(a[k]);e?g(e,true):c&&c.remove()}else if(a instanceof CKEDITOR.dom.element){c=a.getParent();c.getChildCount()==1?c.remove():a.remove()}}function g(a,b){var c=new CKEDITOR.dom.range(a.getDocument());if(!c["moveToElementEdit"+(b?"End":
"Start")](a)){c.selectNodeContents(a);c.collapse(b?false:true)}c.select(true)}function e(a,b,c){a=a[b];if(typeof c=="undefined")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 k(a,c,d){var f=b(a),g;if((c?f.length!=1:f.length<2)||(g=a.getCommonAncestor())&&g.type==CKEDITOR.NODE_ELEMENT&&g.is("table"))return false;var h,a=f[0];g=a.getAscendant("table");var j=CKEDITOR.tools.buildTableMap(g),k=j.length,l=j[0].length,
m=a.getParent().$.rowIndex,o=e(j,m,a);if(c){var x;try{var C=parseInt(a.getAttribute("rowspan"),10)||1;h=parseInt(a.getAttribute("colspan"),10)||1;x=j[c=="up"?m-C:c=="down"?m+C:m][c=="left"?o-h:c=="right"?o+h:o]}catch(y){return false}if(!x||a.$==x)return false;f[c=="up"||c=="left"?"unshift":"push"](new CKEDITOR.dom.element(x))}for(var c=a.getDocument(),A=m,C=x=0,G=!d&&new CKEDITOR.dom.documentFragment(c),D=0,c=0;c<f.length;c++){h=f[c];var E=h.getParent(),M=h.getFirst(),I=h.$.colSpan,H=h.$.rowSpan,
E=E.$.rowIndex,F=e(j,E,h),D=D+I*H,C=Math.max(C,F-o+I);x=Math.max(x,E-m+H);if(!d){I=h;(H=I.getBogus())&&H.remove();I.trim();if(h.getChildren().count()){if(E!=A&&M&&(!M.isBlockBoundary||!M.isBlockBoundary({br:1})))(A=G.getLast(CKEDITOR.dom.walker.whitespaces(true)))&&(!A.is||!A.is("br"))&&G.append("br");h.moveChildren(G)}c?h.remove():h.setHtml("")}A=E}if(d)return x*C==D;G.moveChildren(a);CKEDITOR.env.ie||a.appendBogus();C>=l?a.removeAttribute("rowSpan"):a.$.rowSpan=x;x>=k?a.removeAttribute("colSpan"):
a.$.colSpan=C;d=new CKEDITOR.dom.nodeList(g.$.rows);f=d.count();for(c=f-1;c>=0;c--){g=d.getItem(c);if(!g.$.cells.length){g.remove();f++}}return a}function l(a,c){var d=b(a);if(d.length>1)return false;if(c)return true;var d=d[0],f=d.getParent(),g=f.getAscendant("table"),h=CKEDITOR.tools.buildTableMap(g),j=f.$.rowIndex,k=e(h,j,d),l=d.$.rowSpan,m;if(l>1){m=Math.ceil(l/2);for(var l=Math.floor(l/2),f=j+m,g=new CKEDITOR.dom.element(g.$.rows[f]),h=e(h,f),o,f=d.clone(),j=0;j<h.length;j++){o=h[j];if(o.parentNode==
g.$&&j>k){f.insertBefore(new CKEDITOR.dom.element(o));break}else o=null}o||g.append(f,true)}else{l=m=1;g=f.clone();g.insertAfter(f);g.append(f=d.clone());o=e(h,j);for(k=0;k<o.length;k++)o[k].rowSpan++}CKEDITOR.env.ie||f.appendBogus();d.$.rowSpan=m;f.$.rowSpan=l;m==1&&d.removeAttribute("rowSpan");l==1&&f.removeAttribute("rowSpan");return f}function m(a,c){var d=b(a);if(d.length>1)return false;if(c)return true;var d=d[0],f=d.getParent(),g=f.getAscendant("table"),g=CKEDITOR.tools.buildTableMap(g),h=
e(g,f.$.rowIndex,d),j=d.$.colSpan;if(j>1){f=Math.ceil(j/2);j=Math.floor(j/2)}else{for(var j=f=1,k=[],l=0;l<g.length;l++){var m=g[l];k.push(m[h]);m[h].rowSpan>1&&(l=l+(m[h].rowSpan-1))}for(g=0;g<k.length;g++)k[g].colSpan++}g=d.clone();g.insertAfter(d);CKEDITOR.env.ie||g.appendBogus();d.$.colSpan=f;g.$.colSpan=j;f==1&&d.removeAttribute("colSpan");j==1&&g.removeAttribute("colSpan");return g}var o=/^(?:td|th)$/;CKEDITOR.plugins.tabletools={requires:"table,dialog,contextmenu",init:function(e){function f(a){return CKEDITOR.tools.extend(a||
{},{contextSensitive:1,refresh:function(a,b){this.setState(b.contains({td:1,th:1},1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}var o=e.lang.table;e.addCommand("cellProperties",new CKEDITOR.dialogCommand("cellProperties",f()));CKEDITOR.dialog.add("cellProperties",this.path+"dialogs/tableCell.js");e.addCommand("rowDelete",f({exec:function(b){b=b.getSelection();g(a(b))}}));e.addCommand("rowInsertBefore",f({exec:function(a){a=a.getSelection();c(a,true)}}));e.addCommand("rowInsertAfter",f({exec:function(a){a=
a.getSelection();c(a)}}));e.addCommand("columnDelete",f({exec:function(a){for(var a=a.getSelection(),a=b(a),c=a[0],d=a[a.length-1],a=c.getAscendant("table"),e=CKEDITOR.tools.buildTableMap(a),f,h,j=[],k=0,l=e.length;k<l;k++)for(var m=0,n=e[k].length;m<n;m++){e[k][m]==c.$&&(f=m);e[k][m]==d.$&&(h=m)}for(k=f;k<=h;k++)for(m=0;m<e.length;m++){d=e[m];c=new CKEDITOR.dom.element(a.$.rows[m]);d=new CKEDITOR.dom.element(d[k]);if(d.$){d.$.colSpan==1?d.remove():d.$.colSpan=d.$.colSpan-1;m=m+(d.$.rowSpan-1);c.$.cells.length||
j.push(c)}}h=a.$.rows[0]&&a.$.rows[0].cells;f=new CKEDITOR.dom.element(h[f]||(f?h[f-1]:a.$.parentNode));j.length==l&&a.remove();f&&g(f,true)}}));e.addCommand("columnInsertBefore",f({exec:function(a){a=a.getSelection();j(a,true)}}));e.addCommand("columnInsertAfter",f({exec:function(a){a=a.getSelection();j(a)}}));e.addCommand("cellDelete",f({exec:function(a){a=a.getSelection();d(a)}}));e.addCommand("cellMerge",f({exec:function(a){g(k(a.getSelection()),true)}}));e.addCommand("cellMergeRight",f({exec:function(a){g(k(a.getSelection(),
"right"),true)}}));e.addCommand("cellMergeDown",f({exec:function(a){g(k(a.getSelection(),"down"),true)}}));e.addCommand("cellVerticalSplit",f({exec:function(a){g(l(a.getSelection()))}}));e.addCommand("cellHorizontalSplit",f({exec:function(a){g(m(a.getSelection()))}}));e.addCommand("cellInsertBefore",f({exec:function(a){a=a.getSelection();h(a,true)}}));e.addCommand("cellInsertAfter",f({exec:function(a){a=a.getSelection();h(a)}}));e.addMenuItems&&e.addMenuItems({tablecell:{label:o.cell.menu,group:"tablecell",
order:1,getItems:function(){var a=e.getSelection(),c=b(a);return{tablecell_insertBefore:CKEDITOR.TRISTATE_OFF,tablecell_insertAfter:CKEDITOR.TRISTATE_OFF,tablecell_delete:CKEDITOR.TRISTATE_OFF,tablecell_merge:k(a,null,true)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_right:k(a,"right",true)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_down:k(a,"down",true)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_vertical:l(a,true)?CKEDITOR.TRISTATE_OFF:
CKEDITOR.TRISTATE_DISABLED,tablecell_split_horizontal:m(a,true)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_properties:c.length>0?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED}}},tablecell_insertBefore:{label:o.cell.insertBefore,group:"tablecell",command:"cellInsertBefore",order:5},tablecell_insertAfter:{label:o.cell.insertAfter,group:"tablecell",command:"cellInsertAfter",order:10},tablecell_delete:{label:o.cell.deleteCell,group:"tablecell",command:"cellDelete",order:15},tablecell_merge:{label:o.cell.merge,
group:"tablecell",command:"cellMerge",order:16},tablecell_merge_right:{label:o.cell.mergeRight,group:"tablecell",command:"cellMergeRight",order:17},tablecell_merge_down:{label:o.cell.mergeDown,group:"tablecell",command:"cellMergeDown",order:18},tablecell_split_horizontal:{label:o.cell.splitHorizontal,group:"tablecell",command:"cellHorizontalSplit",order:19},tablecell_split_vertical:{label:o.cell.splitVertical,group:"tablecell",command:"cellVerticalSplit",order:20},tablecell_properties:{label:o.cell.title,
group:"tablecellproperties",command:"cellProperties",order:21},tablerow:{label:o.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:o.row.insertBefore,group:"tablerow",command:"rowInsertBefore",order:5},tablerow_insertAfter:{label:o.row.insertAfter,group:"tablerow",command:"rowInsertAfter",order:10},tablerow_delete:{label:o.row.deleteRow,
group:"tablerow",command:"rowDelete",order:15},tablecolumn:{label:o.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:o.column.insertBefore,group:"tablecolumn",command:"columnInsertBefore",order:5},tablecolumn_insertAfter:{label:o.column.insertAfter,group:"tablecolumn",command:"columnInsertAfter",order:10},tablecolumn_delete:{label:o.column.deleteColumn,
group:"tablecolumn",command:"columnDelete",order:15}});e.contextMenu&&e.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})},getSelectedCells:b};CKEDITOR.plugins.add("tabletools",CKEDITOR.plugins.tabletools)}(),CKEDITOR.tools.buildTableMap=function(b){for(var b=b.$.rows,c=-1,a=[],f=0;f<b.length;f++){c++;!a[c]&&(a[c]=[]);for(var j=-1,h=0;h<b[f].cells.length;h++){var d=
b[f].cells[h];for(j++;a[c][j];)j++;for(var g=isNaN(d.colSpan)?1:d.colSpan,d=isNaN(d.rowSpan)?1:d.rowSpan,e=0;e<d;e++){a[c+e]||(a[c+e]=[]);for(var k=0;k<g;k++)a[c+e][j+k]=b[f].cells[h]}j=j+(g-1)}}return a},function(){CKEDITOR.plugins.add("templates",{requires:"dialog",init:function(a){CKEDITOR.dialog.add("templates",CKEDITOR.getUrl(this.path+"dialogs/templates.js"));a.addCommand("templates",new CKEDITOR.dialogCommand("templates"));a.ui.addButton&&a.ui.addButton("Templates",{label:a.lang.templates.button,
command:"templates",toolbar:"doctools,10"})}});var b={},c={};CKEDITOR.addTemplates=function(a,c){b[a]=c};CKEDITOR.getTemplates=function(a){return b[a]};CKEDITOR.loadTemplates=function(a,b){for(var j=[],h=0,d=a.length;h<d;h++)if(!c[a[h]]){j.push(a[h]);c[a[h]]=1}j.length?CKEDITOR.scriptLoader.load(j,b):setTimeout(b,0)}}(),CKEDITOR.config.templates_files=[CKEDITOR.getUrl("plugins/templates/templates/default.js")],CKEDITOR.config.templates_replaceContent=!0,function(){function b(a){function b(){for(var e=
d(),h=a.config.toolbarGroups||c(a),m=0;m<h.length;m++){var o=h[m];if(o!="/"){typeof o=="string"&&(o=h[m]={name:o});var n,p=o.groups;if(p)for(var s=0;s<p.length;s++){n=p[s];(n=e[n])&&f(o,n)}(n=e[o.name])&&f(o,n)}}return h}function d(){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:b.order<0?-1:a.order<0?1:a.order<b.order?
-1:1});return b}function f(a,b){if(b.length){a.items?a.items.push("-"):a.items=[];for(var c;c=b.shift();)a.items.push(c.name)}}var e=a.config.toolbar;typeof e=="string"&&(e=a.config["toolbar_"+e]);return a.toolbar=e||b()}function c(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"]},{name:"links"},{name:"insert"},"/",{name:"styles"},{name:"colors"},{name:"tools"},{name:"others"},{name:"about"}])}var a=function(){this.toolbars=[];this.focusCommandExecuted=false};a.prototype.focus=function(){for(var a=0,b;b=this.toolbars[a++];)for(var c=0,f;f=b.items[c++];)if(f.focus){f.focus();return}};var f={modes:{wysiwyg:1,source:1},readOnly:1,exec:function(a){if(a.toolbox){a.toolbox.focusCommandExecuted=true;CKEDITOR.env.ie||
CKEDITOR.env.air?setTimeout(function(){a.toolbox.focus()},100):a.toolbox.focus()}}};CKEDITOR.plugins.add("toolbar",{requires:"button",init:function(c){var h,d=function(a,b){var f,l=c.lang.dir=="rtl",m=c.config.toolbarGroupCycling,m=m===void 0||m;switch(b){case 9:case CKEDITOR.SHIFT+9:for(;!f||!f.items.length;){f=b==9?(f?f.next:a.toolbar.next)||c.toolbox.toolbars[0]:(f?f.previous:a.toolbar.previous)||c.toolbox.toolbars[c.toolbox.toolbars.length-1];if(f.items.length)for(a=f.items[h?f.items.length-1:
0];a&&!a.focus;)(a=h?a.previous:a.next)||(f=0)}a&&a.focus();return false;case l?37:39:case 40:f=a;do{f=f.next;!f&&m&&(f=a.toolbar.items[0])}while(f&&!f.focus);f?f.focus():d(a,9);return false;case l?39:37:case 38:f=a;do{f=f.previous;!f&&m&&(f=a.toolbar.items[a.toolbar.items.length-1])}while(f&&!f.focus);if(f)f.focus();else{h=1;d(a,CKEDITOR.SHIFT+9);h=0}return false;case 27:c.focus();return false;case 13:case 32:a.execute();return false}return true};c.on("uiSpace",function(f){if(f.data.space==c.config.toolbarLocation){c.toolbox=
new a;var e=CKEDITOR.tools.getNextId(),h=['<span id="',e,'" class="cke_voice_label">',c.lang.toolbar.toolbars,"</span>",'<span id="'+c.ui.spaceId("toolbox")+'" class="cke_toolbox" role="group" aria-labelledby="',e,'" onmousedown="return false;"'],e=c.config.toolbarStartupExpanded!==false,l,m;h.push(e?">":' style="display:none">');c.config.toolbarCanCollapse&&h.push('<span class="cke_toolbox_main">');for(var o=c.toolbox.toolbars,n=b(c),p=0;p<n.length;p++){var s,u=0,q,w=n[p],B;if(w){if(l){h.push("</span>");
m=l=0}if(w==="/")h.push('<span class="cke_toolbar_break"></span>');else{B=w.items||w;for(var z=0;z<B.length;z++){var r,v;if(r=c.ui.create(B[z]))if(r.type==CKEDITOR.UI_SEPARATOR)m=l&&r;else{v=r.canGroup!==false;if(!u){s=CKEDITOR.tools.getNextId();u={id:s,items:[]};q=w.name&&(c.lang.toolbar.toolbarGroups[w.name]||w.name);h.push('<span id="',s,'" class="cke_toolbar"',q?' aria-labelledby="'+s+'_label"':"",' role="toolbar">');q&&h.push('<span id="',s,'_label" class="cke_voice_label">',q,"</span>");h.push('<span class="cke_toolbar_start"></span>');
var t=o.push(u)-1;if(t>0){u.previous=o[t-1];u.previous.next=u}}if(v){if(!l){h.push('<span class="cke_toolgroup" role="presentation">');l=1}}else if(l){h.push("</span>");l=0}s=function(a){a=a.render(c,h);t=u.items.push(a)-1;if(t>0){a.previous=u.items[t-1];a.previous.next=a}a.toolbar=u;a.onkey=d;a.onfocus=function(){c.toolbox.focusCommandExecuted||c.focus()}};if(m){s(m);m=0}s(r)}}if(l){h.push("</span>");m=l=0}u&&h.push('<span class="cke_toolbar_end"></span></span>')}}}c.config.toolbarCanCollapse&&h.push("</span>");
if(c.config.toolbarCanCollapse&&c.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var x=CKEDITOR.tools.addFunction(function(){c.execCommand("toolbarCollapse")});c.on("destroy",function(){CKEDITOR.tools.removeFunction(x)});c.addCommand("toolbarCollapse",{readOnly:1,exec:function(a){var b=a.ui.space("toolbar_collapser"),c=b.getPrevious(),d=a.ui.space("contents"),e=c.getParent(),f=parseInt(d.$.style.height,10),g=e.$.offsetHeight,h=b.hasClass("cke_toolbox_collapser_min");if(h){c.show();b.removeClass("cke_toolbox_collapser_min");
b.setAttribute("title",a.lang.toolbar.toolbarCollapse)}else{c.hide();b.addClass("cke_toolbox_collapser_min");b.setAttribute("title",a.lang.toolbar.toolbarExpand)}b.getFirst().setText(h?"▲":"◀");d.setStyle("height",f-(e.$.offsetHeight-g)+"px");a.fire("resize")},modes:{wysiwyg:1,source:1}});c.setKeystroke(CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),"toolbarCollapse");h.push('<a title="'+(e?c.lang.toolbar.toolbarCollapse:c.lang.toolbar.toolbarExpand)+'" id="'+c.ui.spaceId("toolbar_collapser")+
'" tabIndex="-1" class="cke_toolbox_collapser');e||h.push(" cke_toolbox_collapser_min");h.push('" onclick="CKEDITOR.tools.callFunction('+x+')">','<span class="cke_arrow">▲</span>',"</a>")}h.push("</span>");f.data.html=f.data.html+h.join("")}});c.on("destroy",function(){if(this.toolbox){var a,b=0,c,d,f;for(a=this.toolbox.toolbars;b<a.length;b++){d=a[b].items;for(c=0;c<d.length;c++){f=d[c];f.clickFn&&CKEDITOR.tools.removeFunction(f.clickFn);f.keyDownFn&&CKEDITOR.tools.removeFunction(f.keyDownFn)}}}});
c.on("uiReady",function(){var a=c.ui.space("toolbox");a&&c.focusManager.add(a,1)});c.addCommand("toolbarFocus",f);c.setKeystroke(CKEDITOR.ALT+121,"toolbarFocus");c.ui.add("-",CKEDITOR.UI_SEPARATOR,{});c.ui.addHandler(CKEDITOR.UI_SEPARATOR,{create:function(){return{render:function(a,b){b.push('<span class="cke_toolbar_separator" role="separator"></span>');return{}}}}})}});CKEDITOR.ui.prototype.addToolbarGroup=function(a,b,d){var f=c(this.editor),e=b===0,k={name:a};if(d){if(d=CKEDITOR.tools.search(f,
function(a){return a.name==d})){!d.groups&&(d.groups=[]);if(b){b=CKEDITOR.tools.indexOf(d.groups,b);if(b>=0){d.groups.splice(b+1,0,a);return}}e?d.groups.splice(0,0,a):d.groups.push(a);return}b=null}b&&(b=CKEDITOR.tools.indexOf(f,function(a){return a.name==b}));e?f.splice(0,0,a):typeof b=="number"?f.splice(b+1,0,k):f.push(a)}}(),CKEDITOR.UI_SEPARATOR="separator",CKEDITOR.config.toolbarLocation="top",function(){function b(a){this.editor=a;this.reset()}CKEDITOR.plugins.add("undo",{init:function(a){function c(a){e.enabled&&
a.data.command.canUndo!==false&&e.save()}var e=new b(a),f=a.addCommand("undo",{exec:function(){if(e.undo()){a.selectionChange();this.fire("afterUndo")}},state:CKEDITOR.TRISTATE_DISABLED,canUndo:false}),h=a.addCommand("redo",{exec:function(){if(e.redo()){a.selectionChange();this.fire("afterRedo")}},state:CKEDITOR.TRISTATE_DISABLED,canUndo:false});a.setKeystroke([[CKEDITOR.CTRL+90,"undo"],[CKEDITOR.CTRL+89,"redo"],[CKEDITOR.CTRL+CKEDITOR.SHIFT+90,"redo"]]);e.onChange=function(){f.setState(e.undoable()?
CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);h.setState(e.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)};a.on("beforeCommandExec",c);a.on("afterCommandExec",c);a.on("saveSnapshot",function(a){e.save(a.data&&a.data.contentOnly)});a.on("contentDom",function(){a.editable().on("keydown",function(a){!a.data.$.ctrlKey&&!a.data.$.metaKey&&e.type(a)})});a.on("beforeModeUnload",function(){a.mode=="wysiwyg"&&e.save(true)});a.on("mode",function(){e.enabled=a.readOnly?false:a.mode=="wysiwyg";
e.onChange()});if(a.ui.addButton){a.ui.addButton("Undo",{label:a.lang.undo.undo,command:"undo",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",e.lock,e);a.on("unlockSnapshot",e.unlock,e)}});CKEDITOR.plugins.undo={};var c=CKEDITOR.plugins.undo.Image=function(a){this.editor=a;a.fire("beforeUndoImage");var b=a.getSnapshot(),
c=b&&a.getSelection();CKEDITOR.env.ie&&b&&(b=b.replace(/\s+data-cke-expando=".*?"/g,""));this.contents=b;this.bookmarks=c&&c.createBookmarks2(true);a.fire("afterUndoImage")},a=/\b(?:href|src|name)="[^"]*?"/gi;c.prototype={equals:function(b,c){var e=this.contents,f=b.contents;if(CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)){e=e.replace(a,"");f=f.replace(a,"")}if(e!=f)return false;if(c)return true;e=this.bookmarks;f=b.bookmarks;if(e||f){if(!e||!f||e.length!=f.length)return false;
for(var h=0;h<e.length;h++){var j=e[h],o=f[h];if(j.startOffset!=o.startOffset||j.endOffset!=o.endOffset||!CKEDITOR.tools.arrayCompare(j.start,o.start)||!CKEDITOR.tools.arrayCompare(j.end,o.end))return false}}return true}};var f={8:1,46:1},j={16:1,17:1,18:1},h={37:1,38:1,39:1,40:1};b.prototype={type:function(a){var a=a&&a.data.getKey(),b=a in f,e=this.lastKeystroke in f,k=b&&a==this.lastKeystroke,l=a in h,m=this.lastKeystroke in h;if(!(a in j||this.typing)||!b&&!l&&(e||m)||b&&!k){var o=new c(this.editor),
n=this.snapshots.length;CKEDITOR.tools.setTimeout(function(){var a=this.editor.getSnapshot();CKEDITOR.env.ie&&(a=a.replace(/\s+data-cke-expando=".*?"/g,""));if(o.contents!=a&&n==this.snapshots.length){this.typing=true;this.save(false,o,false)||this.snapshots.splice(this.index+1,this.snapshots.length-this.index-1);this.hasUndo=true;this.hasRedo=false;this.modifiersCount=this.typesCount=1;this.onChange()}},0,this)}this.lastKeystroke=a;if(b){this.typesCount=0;this.modifiersCount++;if(this.modifiersCount>
25){this.save(false,null,false);this.modifiersCount=1}}else if(!l){this.modifiersCount=0;this.typesCount++;if(this.typesCount>25){this.save(false,null,false);this.typesCount=1}}},reset:function(){this.lastKeystroke=0;this.snapshots=[];this.index=-1;this.limit=this.editor.config.undoStackSize||20;this.currentImage=null;this.hasRedo=this.hasUndo=false;this.locked=null;this.resetType()},resetType:function(){this.typing=false;delete this.lastKeystroke;this.modifiersCount=this.typesCount=0},fireChange:function(){this.hasUndo=
!!this.getNextImage(true);this.hasRedo=!!this.getNextImage(false);this.resetType();this.onChange()},save:function(a,b,e){if(this.locked)return false;var f=this.snapshots;b||(b=new c(this.editor));if(b.contents===false||this.currentImage&&b.equals(this.currentImage,a))return false;f.splice(this.index+1,f.length-this.index-1);f.length==this.limit&&f.shift();this.index=f.push(b)-1;this.currentImage=b;e!==false&&this.fireChange();return true},restoreImage:function(a){var b=this.editor,c;if(a.bookmarks){b.focus();
c=b.getSelection()}this.locked=1;this.editor.loadSnapshot(a.contents);if(a.bookmarks)c.selectBookmarks(a.bookmarks);else if(CKEDITOR.env.ie){b=this.editor.document.getBody().$.createTextRange();b.collapse(true);b.select()}this.locked=0;this.index=a.index;this.update();this.fireChange()},getNextImage:function(a){var b=this.snapshots,c=this.currentImage,f;if(c)if(a)for(f=this.index-1;f>=0;f--){a=b[f];if(!c.equals(a,true)){a.index=f;return a}}else for(f=this.index+1;f<b.length;f++){a=b[f];if(!c.equals(a,
true)){a.index=f;return a}}return null},redoable:function(){return this.enabled&&this.hasRedo},undoable:function(){return this.enabled&&this.hasUndo},undo:function(){if(this.undoable()){this.save(true);var a=this.getNextImage(true);if(a)return this.restoreImage(a),true}return false},redo:function(){if(this.redoable()){this.save(true);if(this.redoable()){var a=this.getNextImage(false);if(a)return this.restoreImage(a),true}}return false},update:function(){if(!this.locked)this.snapshots.splice(this.index,
1,this.currentImage=new c(this.editor))},lock:function(){if(!this.locked){var a=this.editor.getSnapshot();this.locked={update:this.currentImage&&a==this.currentImage.contents?a:null}}},unlock:function(){if(this.locked){var a=this.locked.update,b=this.editor.getSnapshot();this.locked=null;typeof a=="string"&&b!=a&&this.update()}}}}(),CKEDITOR.plugins.add("wsc",{requires:"dialog",init:function(b){b.addCommand("checkspell",new CKEDITOR.dialogCommand("checkspell")).modes={wysiwyg:!CKEDITOR.env.opera&&
!CKEDITOR.env.air&&document.domain==window.location.hostname};b.ui.addButton&&b.ui.addButton("SpellChecker",{label:b.lang.wsc.toolbar,command:"checkspell",toolbar:"spellchecker,10"});CKEDITOR.dialog.add("checkspell",this.path+"dialogs/wsc.js")}}),CKEDITOR.config.wsc_customerId=CKEDITOR.config.wsc_customerId||"1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk",CKEDITOR.config.wsc_customLoaderScript=CKEDITOR.config.wsc_customLoaderScript||null,function(){function b(b){var c=this.editor,
e=b.document,f=e.body;(b=e.getElementById("cke_actscrpt"))&&b.parentNode.removeChild(b);(b=e.getElementById("cke_shimscrpt"))&&b.parentNode.removeChild(b);if(CKEDITOR.env.gecko){f.contentEditable=false;if(CKEDITOR.env.version<2E4){f.innerHTML=f.innerHTML.replace(/^.*<\!-- cke-content-start --\>/,"");setTimeout(function(){var a=new CKEDITOR.dom.range(new CKEDITOR.dom.document(e));a.setStart(new CKEDITOR.dom.node(f),0);c.getSelection().selectRanges([a])},0)}}f.contentEditable=true;if(CKEDITOR.env.ie){f.hideFocus=
true;f.disabled=true;f.removeAttribute("disabled")}delete this._.isLoadingData;this.$=f;e=new CKEDITOR.dom.document(e);this.setup();if(CKEDITOR.env.ie){e.getDocumentElement().addClass(e.$.compatMode);c.config.enterMode!=CKEDITOR.ENTER_P&&e.on("selectionchange",function(){var a=e.getBody(),b=c.getSelection(),d=b&&b.getRanges()[0];d&&(a.getHtml().match(/^<p> <\/p>$/i)&&d.startContainer.equals(a))&&setTimeout(function(){d=c.getSelection().getRanges()[0];if(!d.startContainer.equals("body")){a.getFirst().remove(1);
d.moveToElementEditEnd(a);d.select()}},0)})}CKEDITOR.env.gecko&&CKEDITOR.tools.setTimeout(a,0,this,c);try{c.document.$.execCommand("2D-position",false,true)}catch(h){}try{c.document.$.execCommand("enableInlineTableEditing",false,!c.config.disableNativeTableHandles)}catch(j){}if(c.config.disableObjectResizing)try{this.getDocument().$.execCommand("enableObjectResizing",false,false)}catch(o){this.attachListener(this,CKEDITOR.env.ie?"resizestart":"resize",function(a){a.data.preventDefault()})}(CKEDITOR.env.gecko||
CKEDITOR.env.ie&&c.document.$.compatMode=="CSS1Compat")&&this.attachListener(this,"keydown",function(a){var b=a.data.getKeystroke();if(b==33||b==34)if(CKEDITOR.env.ie)setTimeout(function(){c.getSelection().scrollIntoView()},0);else if(c.window.$.innerHeight>this.$.offsetHeight){var d=c.createRange();d[b==33?"moveToElementEditStart":"moveToElementEditEnd"](this);d.select();a.data.preventDefault()}});CKEDITOR.env.ie&&this.attachListener(e,"blur",function(){try{e.$.selection.empty()}catch(a){}});c.document.getElementsByTag("title").getItem(0).data("cke-title",
c.document.$.title);if(CKEDITOR.env.ie)c.document.$.title=this._.docTitle;CKEDITOR.tools.setTimeout(function(){c.fire("contentDom");if(this._.isPendingFocus){c.focus();this._.isPendingFocus=false}setTimeout(function(){c.fire("dataReady")},0);CKEDITOR.env.ie&&setTimeout(function(){if(c.document){var a=c.document.$.body;a.runtimeStyle.marginBottom="0px";a.runtimeStyle.marginBottom=""}},1E3)},0,this)}function c(a){a.checkDirty()||setTimeout(function(){a.resetDirty()},0)}function a(a){if(!a.readOnly){var b=
a.window,e=a.document,f=e.getBody(),h=f.getFirst(),j=f.getChildren().count();if(!j||j==1&&h.type==CKEDITOR.NODE_ELEMENT&&h.hasAttribute("_moz_editor_bogus_node")){c(a);var h=CKEDITOR.document,o=h.getDocumentElement(),n=o.$.scrollTop,p=o.$.scrollLeft,s=e.$.createEvent("KeyEvents");s.initKeyEvent("keypress",true,true,b.$,false,false,false,false,0,32);e.$.dispatchEvent(s);(n!=o.$.scrollTop||p!=o.$.scrollLeft)&&h.getWindow().$.scrollTo(p,n);j&&f.getFirst().remove();e.getBody().appendBogus();a=a.createRange();
a.setStartAt(f,CKEDITOR.POSITION_AFTER_START);a.select()}}}function f(){var a=[];if(CKEDITOR.document.$.documentMode>=8){a.push("html.CSS1Compat [contenteditable=false]{min-height:0 !important}");var b=[],c;for(c in CKEDITOR.dtd.$removeEmpty)b.push("html.CSS1Compat "+c+"[contenteditable=false]");a.push(b.join(",")+"{display:inline-block}")}else if(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")}CKEDITOR.plugins.add("wysiwygarea",{init:function(a){a.addMode("wysiwyg",function(b){function c(e){e&&e.removeListener();a.editable(new h(a,f.$.contentWindow.document.body));a.setData(a.getData(1),b)}var f=CKEDITOR.document.createElement("iframe");f.setStyles({width:"100%",height:"100%"});f.addClass("cke_wysiwyg_frame cke_reset");var l=a.ui.space("contents");l.append(f);var m="document.open();"+(j?'document.domain="'+document.domain+
'";':"")+"document.close();",m=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie?"javascript:void(function(){"+encodeURIComponent(m)+"}())":"",o=CKEDITOR.env.ie||CKEDITOR.env.gecko;if(o)f.on("load",c);var n=[a.lang.editor,a.name].join(),p=a.lang.common.editorHelp;CKEDITOR.env.ie&&(n=n+(", "+p));var s=CKEDITOR.tools.getNextId(),u=CKEDITOR.dom.element.createFromHtml('<span id="'+s+'" class="cke_voice_label">'+p+"</span>");l.append(u,1);a.on("beforeModeUnload",function(a){a.removeListener();u.remove()});
f.setAttributes({frameBorder:0,"aria-describedby":s,title:n,src:m,tabIndex:a.tabIndex,allowTransparency:"true"});!o&&c();if(CKEDITOR.env.webkit){m=function(){l.setStyle("width","100%");f.hide();f.setSize("width",l.getSize("width"));l.removeStyle("width");f.show()};f.setCustomData("onResize",m);CKEDITOR.document.getWindow().on("resize",m)}a.fire("ariaWidget",f)})}});var j=CKEDITOR.env.isCustomDomain(),h=CKEDITOR.tools.createClass({$:function(a){this.base.apply(this,arguments);this._.frameLoadedHandler=
CKEDITOR.tools.addFunction(function(a){CKEDITOR.tools.setTimeout(b,0,this,a)},this);this._.docTitle=this.getWindow().getFrame().getAttribute("title")},base:CKEDITOR.editable,proto:{setData:function(a,b){var c=this.editor;if(b)this.setHtml(a);else{this._.isLoadingData=true;c._.dataStore={id:1};var h=c.config,l=h.fullPage,m=h.docType,o=CKEDITOR.tools.buildStyleHtml(f()).replace(/<style>/,'<style data-cke-temp="1">');l||(o=o+CKEDITOR.tools.buildStyleHtml(c.config.contentsCss));var n=h.baseHref?'<base href="'+
h.baseHref+'" data-cke-temp="1" />':"";l&&(a=a.replace(/<!DOCTYPE[^>]*>/i,function(a){c.docType=m=a;return""}).replace(/<\?xml\s[^\?]*\?>/i,function(a){c.xmlDeclaration=a;return""}));c.dataProcessor&&(a=c.dataProcessor.toHtml(a));if(l){/<body[\s|>]/.test(a)||(a="<body>"+a);/<html[\s|>]/.test(a)||(a="<html>"+a+"</html>");/<head[\s|>]/.test(a)?/<title[\s|>]/.test(a)||(a=a.replace(/<head[^>]*>/,"$&<title></title>")):a=a.replace(/<html[^>]*>/,"$&<head><title></title></head>");n&&(a=a.replace(/<head>/,
"$&"+n));a=a.replace(/<\/head\s*>/,o+"$&");a=m+a}else a=h.docType+'<html dir="'+h.contentsLangDirection+'" lang="'+(h.contentsLanguage||c.langCode)+'"><head><title>'+this._.docTitle+"</title>"+n+o+"</head><body"+(h.bodyId?' id="'+h.bodyId+'"':"")+(h.bodyClass?' class="'+h.bodyClass+'"':"")+">"+a+"</body></html>";if(CKEDITOR.env.gecko){a=a.replace(/<body/,'<body contenteditable="true" ');CKEDITOR.env.version<2E4&&(a=a.replace(/<body[^>]*>/,"$&<\!-- cke-content-start --\>"))}h='<script id="cke_actscrpt" type="text/javascript"'+
(CKEDITOR.env.ie?' defer="defer" ':"")+">"+(j?'document.domain="'+document.domain+'";':"")+"var wasLoaded=0;function onload(){if(!wasLoaded)window.parent.CKEDITOR.tools.callFunction("+this._.frameLoadedHandler+",window);wasLoaded=1;}"+(CKEDITOR.env.ie?"onload();":'document.addEventListener("DOMContentLoaded", onload, false );')+"<\/script>";CKEDITOR.env.ie&&CKEDITOR.env.version<9&&(h=h+'<script id="cke_shimscrpt">(function(){var e="abbr,article,aside,audio,bdi,canvas,data,datalist,details,figcaption,figure,footer,header,hgroup,mark,meter,nav,output,progress,section,summary,time,video".split(","),i=e.length;while(i--){document.createElement(e[i])}})()<\/script>');
a=a.replace(/(?=\s*<\/(:?head)>)/,h);this.clearCustomData();this.clearListeners();c.fire("contentDomUnload");var p=this.getDocument();try{p.write(a)}catch(s){setTimeout(function(){p.write(a)},0)}}},getData:function(a){if(a)return this.getHtml();var a=this.editor,b=a.config.fullPage,c=b&&a.docType,f=b&&a.xmlDeclaration,h=this.getDocument(),b=b?h.getDocumentElement().getOuterHtml():h.getBody().getHtml();CKEDITOR.env.gecko&&(b=b.replace(/<br>(?=\s*(:?$|<\/body>))/,""));a.dataProcessor&&(b=a.dataProcessor.toDataFormat(b));
f&&(b=f+"\n"+b);c&&(b=c+"\n"+b);return b},focus:function(){this._.isLoadingData?this._.isPendingFocus=true:h.baseProto.focus.call(this)},detach:function(){var a=this.editor,b=a.document,c=a.window.getFrame();h.baseProto.detach.call(this);this.clearCustomData();b.getDocumentElement().clearCustomData();c.clearCustomData();CKEDITOR.tools.removeFunction(this._.frameLoadedHandler);(b=c.removeCustomData("onResize"))&&b.removeListener();a.fire("contentDomUnload");c.remove()}}});CKEDITOR.env.gecko&&function(){var a=
document.body;if(a){var b=a.getAttribute("onpageshow");a.setAttribute("onpageshow",(b?b+";":"")+'event.persisted&&(function(){var x=CKEDITOR.instances,d,i;for(i in x){d=x[i].document;if(d){d.$.designMode="off";d.$.designMode="on";}}})();')}else window.addEventListener("load",arguments.callee,false)}()}(),CKEDITOR.config.disableObjectResizing=!1,CKEDITOR.config.disableNativeTableHandles=!0,CKEDITOR.config.disableNativeSpellChecker=!0,CKEDITOR.config.contentsCss=CKEDITOR.basePath+"contents.css",CKEDITOR.config.plugins=
"dialogui,dialog,a11yhelp,about,basicstyles,bidi,blockquote,clipboard,button,panelbutton,panel,floatpanel,colorbutton,colordialog,menu,contextmenu,div,elementspath,list,indent,enterkey,entities,popup,filebrowser,find,fakeobjects,flash,floatingspace,listblock,richcombo,font,format,forms,horizontalrule,htmlwriter,iframe,image,justify,link,liststyle,magicline,maximize,newpage,pagebreak,pastefromword,pastetext,preview,print,removeformat,resize,save,menubutton,scayt,selectall,showblocks,showborders,smiley,sourcearea,specialchar,stylescombo,tab,table,tabletools,templates,toolbar,undo,wsc,wysiwygarea",
CKEDITOR.config.skin="moono",function(){for(var b="about,0,bold,32,italic,64,strike,96,subscript,128,superscript,160,underline,192,bidiltr,224,bidirtl,256,blockquote,288,copy-rtl,320,copy,352,cut-rtl,384,cut,416,paste-rtl,448,paste,480,bgcolor,512,textcolor,544,creatediv,576,docprops-rtl,608,docprops,640,find-rtl,672,find,704,replace,736,flash,768,button,800,checkbox,832,form,864,hiddenfield,896,imagebutton,928,radio,960,select-rtl,992,select,1024,textarea-rtl,1056,textarea,1088,textfield,1120,horizontalrule,1152,iframe,1184,image,1216,indent-rtl,1248,indent,1280,outdent-rtl,1312,outdent,1344,justifyblock,1376,justifycenter,1408,justifyleft,1440,justifyright,1472,anchor-rtl,1504,anchor,1536,link,1568,unlink,1600,bulletedlist-rtl,1632,bulletedlist,1664,numberedlist-rtl,1696,numberedlist,1728,maximize,1760,newpage-rtl,1792,newpage,1824,pagebreak-rtl,1856,pagebreak,1888,pastefromword-rtl,1920,pastefromword,1952,pastetext-rtl,1984,pastetext,2016,createplaceholder,2048,editplaceholder,2080,preview-rtl,2112,preview,2144,print,2176,removeformat,2208,save,2240,scayt,2272,selectall,2304,showblocks-rtl,2336,showblocks,2368,smiley,2400,source-rtl,2432,source,2464,specialchar,2496,table,2528,templates-rtl,2560,templates,2592,uicolor,2624,redo-rtl,2656,redo,2688,undo-rtl,2720,undo,2752,spellchecker,2784",
c=CKEDITOR.getUrl("plugins/icons.png"),b=b.split(","),a=0;a<b.length;a++)CKEDITOR.skin.icons[b[a]]={path:c,offset:-b[++a]}}()})();
module.exports = CKEDITOR;