summaryrefslogtreecommitdiffstats
path: root/core/assets/vendor/ckeditor/ckeditor.js
blob: 2c8c7b5cecb33f903af6d80974d1c05e6d85d54e (plain)
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
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
/*
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
(function(){window.CKEDITOR&&window.CKEDITOR.dom||(window.CKEDITOR||(window.CKEDITOR=function(){var a=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,f={timestamp:"G88J",version:"4.5.11",revision:"3876e73",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:a},status:"unloaded",basePath:function(){var e=window.CKEDITOR_BASEPATH||"";if(!e)for(var c=document.getElementsByTagName("script"),f=0;f<c.length;f++){var k=c[f].src.match(a);if(k){e=k[1];break}}-1==e.indexOf(":/")&&"//"!=e.slice(0,
2)&&(e=0===e.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+e:location.href.match(/^[^\?]*\/(?:)/)[0]+e);if(!e)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return e}(),getUrl:function(a){-1==a.indexOf(":/")&&0!==a.indexOf("/")&&(a=this.basePath+a);this.timestamp&&"/"!=a.charAt(a.length-1)&&!/[&?]t=/.test(a)&&(a+=(0<=a.indexOf("?")?"\x26":"?")+"t\x3d"+this.timestamp);return a},
domReady:function(){function a(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded",a,!1),e()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",a),e())}catch(k){}}function e(){for(var a;a=c.shift();)a()}var c=[];return function(k){function b(){try{document.documentElement.doScroll("left")}catch(g){setTimeout(b,1);return}a()}c.push(k);"complete"===document.readyState&&setTimeout(a,1);if(1==c.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);k=!1;try{k=!window.frameElement}catch(d){}document.documentElement.doScroll&&k&&b()}}}()},c=window.CKEDITOR_GETURL;if(c){var e=f.getUrl;f.getUrl=function(a){return c.call(f,a)||e.call(f,a)}}return f}()),CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(a){var f=CKEDITOR.event.prototype,c;for(c in f)null==a[c]&&(a[c]=f[c])},
CKEDITOR.event.prototype=function(){function a(a){var h=f(this);return h[a]||(h[a]=new c(a))}var f=function(a){a=a.getPrivate&&a.getPrivate()||a._||(a._={});return a.events||(a.events={})},c=function(a){this.name=a;this.listeners=[]};c.prototype={getListenerIndex:function(a){for(var c=0,f=this.listeners;c<f.length;c++)if(f[c].fn==a)return c;return-1}};return{define:function(e,c){var f=a.call(this,e);CKEDITOR.tools.extend(f,c,!0)},on:function(c,h,f,l,k){function b(g,b,a,p){g={name:c,sender:this,editor:g,
data:b,listenerData:l,stop:a,cancel:p,removeListener:d};return!1===h.call(f,g)?!1:g.data}function d(){p.removeListener(c,h)}var g=a.call(this,c);if(0>g.getListenerIndex(h)){g=g.listeners;f||(f=this);isNaN(k)&&(k=10);var p=this;b.fn=h;b.priority=k;for(var v=g.length-1;0<=v;v--)if(g[v].priority<=k)return g.splice(v+1,0,b),{removeListener:d};g.unshift(b)}return{removeListener:d}},once:function(){var a=Array.prototype.slice.call(arguments),c=a[1];a[1]=function(a){a.removeListener();return c.apply(this,
arguments)};return this.on.apply(this,a)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,c=function(){a=1},m=0,l=function(){m=1};return function(k,b,d){var g=f(this)[k];k=a;var p=m;a=m=0;if(g){var v=g.listeners;if(v.length)for(var v=v.slice(0),u,t=0;t<v.length;t++){if(g.errorProof)try{u=v[t].call(this,d,b,c,l)}catch(n){}else u=v[t].call(this,d,b,c,l);!1===u?m=1:"undefined"!=typeof u&&(b=u);if(a||m)break}}b=
m?!1:"undefined"==typeof b?!0:b;a=k;m=p;return b}}(),fireOnce:function(a,c,m){c=this.fire(a,c,m);delete f(this)[a];return c},removeListener:function(a,c){var m=f(this)[a];if(m){var l=m.getListenerIndex(c);0<=l&&m.listeners.splice(l,1)}},removeAllListeners:function(){var a=f(this),c;for(c in a)delete a[c]},hasListeners:function(a){return(a=f(this)[a])&&0<a.listeners.length}}}()),CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=
function(a,f){a in{instanceReady:1,loaded:1}&&(this[a]=!0);return CKEDITOR.event.prototype.fire.call(this,a,f,this)},CKEDITOR.editor.prototype.fireOnce=function(a,f){a in{instanceReady:1,loaded:1}&&(this[a]=!0);return CKEDITOR.event.prototype.fireOnce.call(this,a,f,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)),CKEDITOR.env||(CKEDITOR.env=function(){var a=navigator.userAgent.toLowerCase(),f=a.match(/edge[ \/](\d+.?\d*)/),c=-1<a.indexOf("trident/"),c=!(!f&&!c),c={ie:c,edge:!!f,webkit:!c&&
-1<a.indexOf(" applewebkit/"),air:-1<a.indexOf(" adobeair/"),mac:-1<a.indexOf("macintosh"),quirks:"BackCompat"==document.compatMode&&(!document.documentMode||10>document.documentMode),mobile:-1<a.indexOf("mobile"),iOS:/(ipad|iphone|ipod)/.test(a),isCustomDomain:function(){if(!this.ie)return!1;var a=document.domain,c=window.location.hostname;return a!=c&&a!="["+c+"]"},secure:"https:"==location.protocol};c.gecko="Gecko"==navigator.product&&!c.webkit&&!c.ie;c.webkit&&(-1<a.indexOf("chrome")?c.chrome=
!0:c.safari=!0);var e=0;c.ie&&(e=f?parseFloat(f[1]):c.quirks||!document.documentMode?parseFloat(a.match(/msie (\d+)/)[1]):document.documentMode,c.ie9Compat=9==e,c.ie8Compat=8==e,c.ie7Compat=7==e,c.ie6Compat=7>e||c.quirks);c.gecko&&(f=a.match(/rv:([\d\.]+)/))&&(f=f[1].split("."),e=1E4*f[0]+100*(f[1]||0)+1*(f[2]||0));c.air&&(e=parseFloat(a.match(/ adobeair\/(\d+)/)[1]));c.webkit&&(e=parseFloat(a.match(/ applewebkit\/(\d+)/)[1]));c.version=e;c.isCompatible=!(c.ie&&7>e)&&!(c.gecko&&4E4>e)&&!(c.webkit&&
534>e);c.hidpi=2<=window.devicePixelRatio;c.needsBrFiller=c.gecko||c.webkit||c.ie&&10<e;c.needsNbspFiller=c.ie&&11>e;c.cssClass="cke_browser_"+(c.ie?"ie":c.gecko?"gecko":c.webkit?"webkit":"unknown");c.quirks&&(c.cssClass+=" cke_browser_quirks");c.ie&&(c.cssClass+=" cke_browser_ie"+(c.quirks?"6 cke_browser_iequirks":c.version));c.air&&(c.cssClass+=" cke_browser_air");c.iOS&&(c.cssClass+=" cke_browser_ios");c.hidpi&&(c.cssClass+=" cke_hidpi");return c}()),"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);
CKEDITOR.loadFullCore=function(){if("basic_ready"!=CKEDITOR.status)CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var a=document.createElement("script");a.type="text/javascript";a.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(a)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(a){(this._.pending||(this._.pending=[])).push(a)};(function(){CKEDITOR.domReady(function(){var a=CKEDITOR.loadFullCore,f=CKEDITOR.loadFullCoreTimeout;a&&(CKEDITOR.status=
"basic_ready",a&&a._load?a():f&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},1E3*f))})})();CKEDITOR.status="basic_loaded"}(),"use strict",CKEDITOR.VERBOSITY_WARN=1,CKEDITOR.VERBOSITY_ERROR=2,CKEDITOR.verbosity=CKEDITOR.VERBOSITY_WARN|CKEDITOR.VERBOSITY_ERROR,CKEDITOR.warn=function(a,f){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:a,additionalData:f})},CKEDITOR.error=function(a,f){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log",
{type:"error",errorCode:a,additionalData:f})},CKEDITOR.on("log",function(a){if(window.console&&window.console.log){var f=console[a.data.type]?a.data.type:"log",c=a.data.errorCode;if(a=a.data.additionalData)console[f]("[CKEDITOR] Error code: "+c+".",a);else console[f]("[CKEDITOR] Error code: "+c+".");console[f]("[CKEDITOR] For more information about this error go to http://docs.ckeditor.com/#!/guide/dev_errors-section-"+c)}},null,null,999),CKEDITOR.dom={},function(){var a=[],f=CKEDITOR.env.gecko?"-moz-":
CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",c=/&/g,e=/>/g,h=/</g,m=/"/g,l=/&(lt|gt|amp|quot|nbsp|shy|#\d{1,5});/g,k={lt:"\x3c",gt:"\x3e",amp:"\x26",quot:'"',nbsp:" ",shy:"­"},b=function(d,g){return"#"==g[0]?String.fromCharCode(parseInt(g.slice(1),10)):k[g]};CKEDITOR.on("reset",function(){a=[]});CKEDITOR.tools={arrayCompare:function(d,g){if(!d&&!g)return!0;if(!d||!g||d.length!=g.length)return!1;for(var b=0;b<d.length;b++)if(d[b]!=g[b])return!1;return!0},getIndex:function(d,g){for(var b=
0;b<d.length;++b)if(g(d[b]))return b;return-1},clone:function(d){var g;if(d&&d instanceof Array){g=[];for(var b=0;b<d.length;b++)g[b]=CKEDITOR.tools.clone(d[b]);return g}if(null===d||"object"!=typeof d||d instanceof String||d instanceof Number||d instanceof Boolean||d instanceof Date||d instanceof RegExp||d.nodeType||d.window===d)return d;g=new d.constructor;for(b in d)g[b]=CKEDITOR.tools.clone(d[b]);return g},capitalize:function(d,g){return d.charAt(0).toUpperCase()+(g?d.slice(1):d.slice(1).toLowerCase())},
extend:function(d){var g=arguments.length,b,a;"boolean"==typeof(b=arguments[g-1])?g--:"boolean"==typeof(b=arguments[g-2])&&(a=arguments[g-1],g-=2);for(var k=1;k<g;k++){var c=arguments[k],n;for(n in c)if(!0===b||null==d[n])if(!a||n in a)d[n]=c[n]}return d},prototypedCopy:function(d){var g=function(){};g.prototype=d;return new g},copy:function(d){var g={},b;for(b in d)g[b]=d[b];return g},isArray:function(d){return"[object Array]"==Object.prototype.toString.call(d)},isEmpty:function(d){for(var g in d)if(d.hasOwnProperty(g))return!1;
return!0},cssVendorPrefix:function(d,g,b){if(b)return f+d+":"+g+";"+d+":"+g;b={};b[d]=g;b[f+d]=g;return b},cssStyleToDomStyle:function(){var d=document.createElement("div").style,g="undefined"!=typeof d.cssFloat?"cssFloat":"undefined"!=typeof d.styleFloat?"styleFloat":"float";return function(d){return"float"==d?g:d.replace(/-./g,function(g){return g.substr(1).toUpperCase()})}}(),buildStyleHtml:function(d){d=[].concat(d);for(var g,b=[],a=0;a<d.length;a++)if(g=d[a])/@import|[{}]/.test(g)?b.push("\x3cstyle\x3e"+
g+"\x3c/style\x3e"):b.push('\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+g+'"\x3e');return b.join("")},htmlEncode:function(d){return void 0===d||null===d?"":String(d).replace(c,"\x26amp;").replace(e,"\x26gt;").replace(h,"\x26lt;")},htmlDecode:function(d){return d.replace(l,b)},htmlEncodeAttr:function(d){return CKEDITOR.tools.htmlEncode(d).replace(m,"\x26quot;")},htmlDecodeAttr:function(d){return CKEDITOR.tools.htmlDecode(d)},transformPlainTextToHtml:function(d,g){var b=g==CKEDITOR.ENTER_BR,
a=this.htmlEncode(d.replace(/\r\n/g,"\n")),a=a.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;"),k=g==CKEDITOR.ENTER_P?"p":"div";if(!b){var c=/\n{2}/g;if(c.test(a))var n="\x3c"+k+"\x3e",e="\x3c/"+k+"\x3e",a=n+a.replace(c,function(){return e+n})+e}a=a.replace(/\n/g,"\x3cbr\x3e");b||(a=a.replace(new RegExp("\x3cbr\x3e(?\x3d\x3c/"+k+"\x3e)"),function(g){return CKEDITOR.tools.repeat(g,2)}));a=a.replace(/^ | $/g,"\x26nbsp;");return a=a.replace(/(>|\s) /g,function(g,d){return d+"\x26nbsp;"}).replace(/ (?=<)/g,
"\x26nbsp;")},getNextNumber:function(){var d=0;return function(){return++d}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var d="e",g=0;8>g;g++)d+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return d},override:function(d,g){var b=g(d);b.prototype=d.prototype;return b},setTimeout:function(d,g,b,a,k){k||(k=window);b||(b=k);return k.setTimeout(function(){a?d.apply(b,[].concat(a)):d.apply(b)},g||0)},trim:function(){var d=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;
return function(g){return g.replace(d,"")}}(),ltrim:function(){var d=/^[ \t\n\r]+/g;return function(g){return g.replace(d,"")}}(),rtrim:function(){var d=/[ \t\n\r]+$/g;return function(g){return g.replace(d,"")}}(),indexOf:function(d,g){if("function"==typeof g)for(var b=0,a=d.length;b<a;b++){if(g(d[b]))return b}else{if(d.indexOf)return d.indexOf(g);b=0;for(a=d.length;b<a;b++)if(d[b]===g)return b}return-1},search:function(d,g){var b=CKEDITOR.tools.indexOf(d,g);return 0<=b?d[b]:null},bind:function(d,
g){return function(){return d.apply(g,arguments)}},createClass:function(d){var g=d.$,b=d.base,a=d.privates||d._,k=d.proto;d=d.statics;!g&&(g=function(){b&&this.base.apply(this,arguments)});if(a)var c=g,g=function(){var g=this._||(this._={}),d;for(d in a){var b=a[d];g[d]="function"==typeof b?CKEDITOR.tools.bind(b,this):b}c.apply(this,arguments)};b&&(g.prototype=this.prototypedCopy(b.prototype),g.prototype.constructor=g,g.base=b,g.baseProto=b.prototype,g.prototype.base=function(){this.base=b.prototype.base;
b.apply(this,arguments);this.base=arguments.callee});k&&this.extend(g.prototype,k,!0);d&&this.extend(g,d,!0);return g},addFunction:function(d,g){return a.push(function(){return d.apply(g||this,arguments)})-1},removeFunction:function(d){a[d]=null},callFunction:function(d){var g=a[d];return g&&g.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var d=/^-?\d+\.?\d*px$/,g;return function(b){g=CKEDITOR.tools.trim(b+"")+"px";return d.test(g)?g:b||""}}(),convertToPx:function(){var d;
return function(g){d||(d=CKEDITOR.dom.element.createFromHtml('\x3cdiv style\x3d"position:absolute;left:-9999px;top:-9999px;margin:0px;padding:0px;border:0px;"\x3e\x3c/div\x3e',CKEDITOR.document),CKEDITOR.document.getBody().append(d));return/%$/.test(g)?g:(d.setStyle("width",g),d.$.clientWidth)}}(),repeat:function(d,g){return Array(g+1).join(d)},tryThese:function(){for(var d,g=0,b=arguments.length;g<b;g++){var a=arguments[g];try{d=a();break}catch(k){}}return d},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},
defer:function(d){return function(){var g=arguments,b=this;window.setTimeout(function(){d.apply(b,g)},0)}},normalizeCssText:function(d,g){var b=[],a,k=CKEDITOR.tools.parseCssText(d,!0,g);for(a in k)b.push(a+":"+k[a]);b.sort();return b.length?b.join(";")+";":""},convertRgbToHex:function(d){return d.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,function(g,d,b,a){g=[d,b,a];for(d=0;3>d;d++)g[d]=("0"+parseInt(g[d],10).toString(16)).slice(-2);return"#"+g.join("")})},normalizeHex:function(d){return d.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi,
function(g,d,b,a){g=d.toLowerCase();3==g.length&&(g=g.split(""),g=[g[0],g[0],g[1],g[1],g[2],g[2]].join(""));return"#"+g+a})},parseCssText:function(d,g,b){var a={};b&&(d=(new CKEDITOR.dom.element("span")).setAttribute("style",d).getAttribute("style")||"");d&&(d=CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(d)));if(!d||";"==d)return a;d.replace(/&quot;/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(d,b,k){g&&(b=b.toLowerCase(),"font-family"==b&&(k=k.replace(/\s*,\s*/g,
",")),k=CKEDITOR.tools.trim(k));a[b]=k});return a},writeCssText:function(d,g){var b,a=[];for(b in d)a.push(b+":"+d[b]);g&&a.sort();return a.join("; ")},objectCompare:function(d,g,b){var a;if(!d&&!g)return!0;if(!d||!g)return!1;for(a in d)if(d[a]!=g[a])return!1;if(!b)for(a in g)if(d[a]!=g[a])return!1;return!0},objectKeys:function(d){var g=[],b;for(b in d)g.push(b);return g},convertArrayToObject:function(d,g){var b={};1==arguments.length&&(g=!0);for(var a=0,k=d.length;a<k;++a)b[d[a]]=g;return b},fixDomain:function(){for(var d;;)try{d=
window.parent.document.domain;break}catch(g){d=d?d.replace(/.+?(?:\.|$)/,""):document.domain;if(!d)break;document.domain=d}return!!d},eventsBuffer:function(d,g,b){function a(){c=(new Date).getTime();k=!1;b?g.call(b):g()}var k,c=0;return{input:function(){if(!k){var g=(new Date).getTime()-c;g<d?k=setTimeout(a,d-g):a()}},reset:function(){k&&clearTimeout(k);k=c=0}}},enableHtml5Elements:function(d,g){for(var b="abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video".split(" "),
a=b.length,k;a--;)k=d.createElement(b[a]),g&&d.appendChild(k)},checkIfAnyArrayItemMatches:function(d,g){for(var b=0,a=d.length;b<a;++b)if(d[b].match(g))return!0;return!1},checkIfAnyObjectPropertyMatches:function(d,g){for(var b in d)if(b.match(g))return!0;return!1},transparentImageData:"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw\x3d\x3d",getCookie:function(d){d=d.toLowerCase();for(var g=document.cookie.split(";"),b,a,k=0;k<g.length;k++)if(b=g[k].split("\x3d"),
a=decodeURIComponent(CKEDITOR.tools.trim(b[0]).toLowerCase()),a===d)return decodeURIComponent(1<b.length?b[1]:"");return null},setCookie:function(d,g){document.cookie=encodeURIComponent(d)+"\x3d"+encodeURIComponent(g)+";path\x3d/"},getCsrfToken:function(){var d=CKEDITOR.tools.getCookie("ckCsrfToken");if(!d||40!=d.length){var d=[],g="";if(window.crypto&&window.crypto.getRandomValues)d=new Uint8Array(40),window.crypto.getRandomValues(d);else for(var b=0;40>b;b++)d.push(Math.floor(256*Math.random()));
for(b=0;b<d.length;b++)var a="abcdefghijklmnopqrstuvwxyz0123456789".charAt(d[b]%36),g=g+(.5<Math.random()?a.toUpperCase():a);d=g;CKEDITOR.tools.setCookie("ckCsrfToken",d)}return d},escapeCss:function(d){return d?window.CSS&&CSS.escape?CSS.escape(d):isNaN(parseInt(d.charAt(0),10))?d:"\\3"+d.charAt(0)+" "+d.substring(1,d.length):""}}}(),CKEDITOR.dtd=function(){var a=CKEDITOR.tools.extend,f=function(d,g){for(var b=CKEDITOR.tools.clone(d),a=1;a<arguments.length;a++){g=arguments[a];for(var k in g)delete b[k]}return b},
c={},e={},h={address:1,article:1,aside:1,blockquote:1,details:1,div:1,dl:1,fieldset:1,figure:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,hr:1,main:1,menu:1,nav:1,ol:1,p:1,pre:1,section:1,table:1,ul:1},m={command:1,link:1,meta:1,noscript:1,script:1,style:1},l={},k={"#":1},b={center:1,dir:1,noframes:1};a(c,{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},k,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1});a(e,h,c,b);f={a:f(c,{a:1,button:1}),abbr:c,address:e,area:l,article:e,aside:e,audio:a({source:1,track:1},e),b:c,base:l,bdi:c,bdo:c,blockquote:e,body:e,br:l,button:f(c,{a:1,button:1}),canvas:c,caption:e,cite:c,code:c,col:l,colgroup:{col:1},
command:l,datalist:a({option:1},c),dd:e,del:c,details:a({summary:1},e),dfn:c,div:e,dl:{dt:1,dd:1},dt:e,em:c,embed:l,fieldset:a({legend:1},e),figcaption:e,figure:a({figcaption:1},e),footer:e,form:e,h1:c,h2:c,h3:c,h4:c,h5:c,h6:c,head:a({title:1,base:1},m),header:e,hgroup:{h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},hr:l,html:a({head:1,body:1},e,m),i:c,iframe:k,img:l,input:l,ins:c,kbd:c,keygen:l,label:c,legend:c,li:e,link:l,main:e,map:e,mark:c,menu:a({li:1},e),meta:l,meter:f(c,{meter:1}),nav:e,noscript:a({link:1,
meta:1,style:1},c),object:a({param:1},c),ol:{li:1},optgroup:{option:1},option:k,output:c,p:c,param:l,pre:c,progress:f(c,{progress:1}),q:c,rp:c,rt:c,ruby:a({rp:1,rt:1},c),s:c,samp:c,script:k,section:e,select:{optgroup:1,option:1},small:c,source:l,span:c,strong:c,style:k,sub:c,summary:a({h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},c),sup:c,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:e,textarea:k,tfoot:{tr:1},th:e,thead:{tr:1},time:f(c,{time:1}),title:k,tr:{th:1,td:1},track:l,u:c,ul:{li:1},
"var":c,video:a({source:1,track:1},e),wbr:l,acronym:c,applet:a({param:1},e),basefont:l,big:c,center:e,dialog:l,dir:{li:1},font:c,isindex:l,noframes:e,strike:c,tt:c};a(f,{$block:a({audio:1,dd:1,dt:1,figcaption:1,li:1,video:1},h,b),$blockLimit:{article:1,aside:1,audio:1,body:1,caption:1,details:1,dir:1,div:1,dl:1,fieldset:1,figcaption:1,figure:1,footer:1,form:1,header:1,hgroup:1,main:1,menu:1,nav:1,ol:1,section:1,table:1,td:1,th:1,tr:1,ul:1,video:1},$cdata:{script:1,style:1},$editable:{address:1,article:1,
aside:1,blockquote:1,body:1,details:1,div:1,fieldset:1,figcaption:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,main:1,nav:1,p:1,pre:1,section:1},$empty:{area:1,base:1,basefont:1,br:1,col:1,command:1,dialog:1,embed:1,hr:1,img:1,input:1,isindex:1,keygen:1,link:1,meta:1,param:1,source:1,track:1,wbr:1},$inline:c,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:a({body:1,head:1,html:1},f.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 f}(),CKEDITOR.dom.event=function(a){this.$=a},CKEDITOR.dom.event.prototype={getKey:function(){return this.$.keyCode||this.$.which},getKeystroke:function(){var a=this.getKey();if(this.$.ctrlKey||this.$.metaKey)a+=CKEDITOR.CTRL;
this.$.shiftKey&&(a+=CKEDITOR.SHIFT);this.$.altKey&&(a+=CKEDITOR.ALT);return a},preventDefault:function(a){var f=this.$;f.preventDefault?f.preventDefault():f.returnValue=!1;a&&this.stopPropagation()},stopPropagation:function(){var a=this.$;a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},getTarget:function(){var a=this.$.target||this.$.srcElement;return a?new CKEDITOR.dom.node(a):null},getPhase:function(){return this.$.eventPhase||2},getPageOffset:function(){var a=this.getTarget().getDocument().$;
return{x:this.$.pageX||this.$.clientX+(a.documentElement.scrollLeft||a.body.scrollLeft),y:this.$.pageY||this.$.clientY+(a.documentElement.scrollTop||a.body.scrollTop)}}},CKEDITOR.CTRL=1114112,CKEDITOR.SHIFT=2228224,CKEDITOR.ALT=4456448,CKEDITOR.EVENT_PHASE_CAPTURING=1,CKEDITOR.EVENT_PHASE_AT_TARGET=2,CKEDITOR.EVENT_PHASE_BUBBLING=3,CKEDITOR.dom.domObject=function(a){a&&(this.$=a)},CKEDITOR.dom.domObject.prototype=function(){var a=function(a,c){return function(e){"undefined"!=typeof CKEDITOR&&a.fire(c,
new CKEDITOR.dom.event(e))}};return{getPrivate:function(){var a;(a=this.getCustomData("_"))||this.setCustomData("_",a={});return a},on:function(f){var c=this.getCustomData("_cke_nativeListeners");c||(c={},this.setCustomData("_cke_nativeListeners",c));c[f]||(c=c[f]=a(this,f),this.$.addEventListener?this.$.addEventListener(f,c,!!CKEDITOR.event.useCapture):this.$.attachEvent&&this.$.attachEvent("on"+f,c));return CKEDITOR.event.prototype.on.apply(this,arguments)},removeListener:function(a){CKEDITOR.event.prototype.removeListener.apply(this,
arguments);if(!this.hasListeners(a)){var c=this.getCustomData("_cke_nativeListeners"),e=c&&c[a];e&&(this.$.removeEventListener?this.$.removeEventListener(a,e,!1):this.$.detachEvent&&this.$.detachEvent("on"+a,e),delete c[a])}},removeAllListeners:function(){var a=this.getCustomData("_cke_nativeListeners"),c;for(c in a){var e=a[c];this.$.detachEvent?this.$.detachEvent("on"+c,e):this.$.removeEventListener&&this.$.removeEventListener(c,e,!1);delete a[c]}CKEDITOR.event.prototype.removeAllListeners.call(this)}}}(),
function(a){var f={};CKEDITOR.on("reset",function(){f={}});a.equals=function(a){try{return a&&a.$===this.$}catch(e){return!1}};a.setCustomData=function(a,e){var h=this.getUniqueId();(f[h]||(f[h]={}))[a]=e;return this};a.getCustomData=function(a){var e=this.$["data-cke-expando"];return(e=e&&f[e])&&a in e?e[a]:null};a.removeCustomData=function(a){var e=this.$["data-cke-expando"],e=e&&f[e],h,m;e&&(h=e[a],m=a in e,delete e[a]);return m?h:null};a.clearCustomData=function(){this.removeAllListeners();var a=
this.$["data-cke-expando"];a&&delete f[a]};a.getUniqueId=function(){return this.$["data-cke-expando"]||(this.$["data-cke-expando"]=CKEDITOR.tools.getNextNumber())};CKEDITOR.event.implementOn(a)}(CKEDITOR.dom.domObject.prototype),CKEDITOR.dom.node=function(a){return a?new CKEDITOR.dom[a.nodeType==CKEDITOR.NODE_DOCUMENT?"document":a.nodeType==CKEDITOR.NODE_ELEMENT?"element":a.nodeType==CKEDITOR.NODE_TEXT?"text":a.nodeType==CKEDITOR.NODE_COMMENT?"comment":a.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT?
"documentFragment":"domObject"](a):this},CKEDITOR.dom.node.prototype=new CKEDITOR.dom.domObject,CKEDITOR.NODE_ELEMENT=1,CKEDITOR.NODE_DOCUMENT=9,CKEDITOR.NODE_TEXT=3,CKEDITOR.NODE_COMMENT=8,CKEDITOR.NODE_DOCUMENT_FRAGMENT=11,CKEDITOR.POSITION_IDENTICAL=0,CKEDITOR.POSITION_DISCONNECTED=1,CKEDITOR.POSITION_FOLLOWING=2,CKEDITOR.POSITION_PRECEDING=4,CKEDITOR.POSITION_IS_CONTAINED=8,CKEDITOR.POSITION_CONTAINS=16,CKEDITOR.tools.extend(CKEDITOR.dom.node.prototype,{appendTo:function(a,f){a.append(this,f);
return a},clone:function(a,f){function c(e){e["data-cke-expando"]&&(e["data-cke-expando"]=!1);if(e.nodeType==CKEDITOR.NODE_ELEMENT||e.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)if(f||e.nodeType!=CKEDITOR.NODE_ELEMENT||e.removeAttribute("id",!1),a){e=e.childNodes;for(var h=0;h<e.length;h++)c(e[h])}}function e(c){if(c.type==CKEDITOR.NODE_ELEMENT||c.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT){if(c.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var h=c.getName();":"==h[0]&&c.renameNode(h.substring(1))}if(a)for(h=0;h<
c.getChildCount();h++)e(c.getChild(h))}}var h=this.$.cloneNode(a);c(h);h=new CKEDITOR.dom.node(h);CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(this.type==CKEDITOR.NODE_ELEMENT||this.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&e(h);return h},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(a){a.$.parentNode.insertBefore(this.$,a.$.nextSibling);return a},insertBefore:function(a){a.$.parentNode.insertBefore(this.$,a.$);return a},insertBeforeMe:function(a){this.$.parentNode.insertBefore(a.$,
this.$);return a},getAddress:function(a){for(var f=[],c=this.getDocument().$.documentElement,e=this.$;e&&e!=c;){var h=e.parentNode;h&&f.unshift(this.getIndex.call({$:e},a));e=h}return f},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(a){function f(a,k){var b=k?a.nextSibling:a.previousSibling;return b&&b.nodeType==CKEDITOR.NODE_TEXT?c(b)?f(b,k):b:null}function c(a){return!a.nodeValue||a.nodeValue==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE}
var e=this.$,h=-1,m;if(!this.$.parentNode||a&&e.nodeType==CKEDITOR.NODE_TEXT&&c(e)&&!f(e)&&!f(e,!0))return-1;do a&&e!=this.$&&e.nodeType==CKEDITOR.NODE_TEXT&&(m||c(e))||(h++,m=e.nodeType==CKEDITOR.NODE_TEXT);while(e=e.previousSibling);return h},getNextSourceNode:function(a,f,c){if(c&&!c.call){var e=c;c=function(a){return!a.equals(e)}}a=!a&&this.getFirst&&this.getFirst();var h;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&c&&!1===c(this,!0))return null;a=this.getNext()}for(;!a&&(h=(h||this).getParent());){if(c&&
!1===c(h,!0))return null;a=h.getNext()}return!a||c&&!1===c(a)?null:f&&f!=a.type?a.getNextSourceNode(!1,f,c):a},getPreviousSourceNode:function(a,f,c){if(c&&!c.call){var e=c;c=function(a){return!a.equals(e)}}a=!a&&this.getLast&&this.getLast();var h;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&c&&!1===c(this,!0))return null;a=this.getPrevious()}for(;!a&&(h=(h||this).getParent());){if(c&&!1===c(h,!0))return null;a=h.getPrevious()}return!a||c&&!1===c(a)?null:f&&a.type!=f?a.getPreviousSourceNode(!1,f,c):
a},getPrevious:function(a){var f=this.$,c;do c=(f=f.previousSibling)&&10!=f.nodeType&&new CKEDITOR.dom.node(f);while(c&&a&&!a(c));return c},getNext:function(a){var f=this.$,c;do c=(f=f.nextSibling)&&new CKEDITOR.dom.node(f);while(c&&a&&!a(c));return c},getParent:function(a){var f=this.$.parentNode;return f&&(f.nodeType==CKEDITOR.NODE_ELEMENT||a&&f.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(f):null},getParents:function(a){var f=this,c=[];do c[a?"push":"unshift"](f);while(f=f.getParent());
return c},getCommonAncestor:function(a){if(a.equals(this))return this;if(a.contains&&a.contains(this))return a;var f=this.contains?this:this.getParent();do if(f.contains(a))return f;while(f=f.getParent());return null},getPosition:function(a){var f=this.$,c=a.$;if(f.compareDocumentPosition)return f.compareDocumentPosition(c);if(f==c)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&a.type==CKEDITOR.NODE_ELEMENT){if(f.contains){if(f.contains(c))return CKEDITOR.POSITION_CONTAINS+
CKEDITOR.POSITION_PRECEDING;if(c.contains(f))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in f)return 0>f.sourceIndex||0>c.sourceIndex?CKEDITOR.POSITION_DISCONNECTED:f.sourceIndex<c.sourceIndex?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING}f=this.getAddress();a=a.getAddress();for(var c=Math.min(f.length,a.length),e=0;e<c;e++)if(f[e]!=a[e])return f[e]<a[e]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;return f.length<a.length?CKEDITOR.POSITION_CONTAINS+
CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING},getAscendant:function(a,f){var c=this.$,e,h;f||(c=c.parentNode);"function"==typeof a?(h=!0,e=a):(h=!1,e=function(c){c="string"==typeof c.nodeName?c.nodeName.toLowerCase():"";return"string"==typeof a?c==a:c in a});for(;c;){if(e(h?new CKEDITOR.dom.node(c):c))return new CKEDITOR.dom.node(c);try{c=c.parentNode}catch(m){c=null}}return null},hasAscendant:function(a,f){var c=this.$;f||(c=c.parentNode);for(;c;){if(c.nodeName&&
c.nodeName.toLowerCase()==a)return!0;c=c.parentNode}return!1},move:function(a,f){a.append(this.remove(),f)},remove:function(a){var f=this.$,c=f.parentNode;if(c){if(a)for(;a=f.firstChild;)c.insertBefore(f.removeChild(a),f);c.removeChild(f)}return this},replace:function(a){this.insertBefore(a);a.remove()},trim:function(){this.ltrim();this.rtrim()},ltrim:function(){for(var a;this.getFirst&&(a=this.getFirst());){if(a.type==CKEDITOR.NODE_TEXT){var f=CKEDITOR.tools.ltrim(a.getText()),c=a.getLength();if(f)f.length<
c&&(a.split(c-f.length),this.$.removeChild(this.$.firstChild));else{a.remove();continue}}break}},rtrim:function(){for(var a;this.getLast&&(a=this.getLast());){if(a.type==CKEDITOR.NODE_TEXT){var f=CKEDITOR.tools.rtrim(a.getText()),c=a.getLength();if(f)f.length<c&&(a.split(f.length),this.$.lastChild.parentNode.removeChild(this.$.lastChild));else{a.remove();continue}}break}CKEDITOR.env.needsBrFiller&&(a=this.$.lastChild)&&1==a.type&&"br"==a.nodeName.toLowerCase()&&a.parentNode.removeChild(a)},isReadOnly:function(a){var f=
this;this.type!=CKEDITOR.NODE_ELEMENT&&(f=this.getParent());CKEDITOR.env.edge&&f&&f.is("textarea","input")&&(a=!0);if(!a&&f&&"undefined"!=typeof f.$.isContentEditable)return!(f.$.isContentEditable||f.data("cke-editable"));for(;f;){if(f.data("cke-editable"))return!1;if(f.hasAttribute("contenteditable"))return"false"==f.getAttribute("contenteditable");f=f.getParent()}return!0}}),CKEDITOR.dom.window=function(a){CKEDITOR.dom.domObject.call(this,a)},CKEDITOR.dom.window.prototype=new CKEDITOR.dom.domObject,
CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype,{focus:function(){this.$.focus()},getViewPaneSize:function(){var a=this.$.document,f="CSS1Compat"==a.compatMode;return{width:(f?a.documentElement.clientWidth:a.body.clientWidth)||0,height:(f?a.documentElement.clientHeight:a.body.clientHeight)||0}},getScrollPosition:function(){var a=this.$;if("pageXOffset"in a)return{x:a.pageXOffset||0,y:a.pageYOffset||0};a=a.document;return{x:a.documentElement.scrollLeft||a.body.scrollLeft||0,y:a.documentElement.scrollTop||
a.body.scrollTop||0}},getFrame:function(){var a=this.$.frameElement;return a?new CKEDITOR.dom.element.get(a):null}}),CKEDITOR.dom.document=function(a){CKEDITOR.dom.domObject.call(this,a)},CKEDITOR.dom.document.prototype=new CKEDITOR.dom.domObject,CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype,{type:CKEDITOR.NODE_DOCUMENT,appendStyleSheet:function(a){if(this.$.createStyleSheet)this.$.createStyleSheet(a);else{var f=new CKEDITOR.dom.element("link");f.setAttributes({rel:"stylesheet",type:"text/css",
href:a});this.getHead().append(f)}},appendStyleText:function(a){if(this.$.createStyleSheet){var f=this.$.createStyleSheet("");f.cssText=a}else{var c=new CKEDITOR.dom.element("style",this);c.append(new CKEDITOR.dom.text(a,this));this.getHead().append(c)}return f||c.$.sheet},createElement:function(a,f){var c=new CKEDITOR.dom.element(a,this);f&&(f.attributes&&c.setAttributes(f.attributes),f.styles&&c.setStyles(f.styles));return c},createText:function(a){return new CKEDITOR.dom.text(a,this)},focus:function(){this.getWindow().focus()},
getActive:function(){var a;try{a=this.$.activeElement}catch(f){return null}return new CKEDITOR.dom.element(a)},getById:function(a){return(a=this.$.getElementById(a))?new CKEDITOR.dom.element(a):null},getByAddress:function(a,f){for(var c=this.$.documentElement,e=0;c&&e<a.length;e++){var h=a[e];if(f)for(var m=-1,l=0;l<c.childNodes.length;l++){var k=c.childNodes[l];if(!0!==f||3!=k.nodeType||!k.previousSibling||3!=k.previousSibling.nodeType)if(m++,m==h){c=k;break}}else c=c.childNodes[h]}return c?new CKEDITOR.dom.node(c):
null},getElementsByTag:function(a,f){CKEDITOR.env.ie&&8>=document.documentMode||!f||(a=f+":"+a);return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(a))},getHead:function(){var a=this.$.getElementsByTagName("head")[0];return a=a?new CKEDITOR.dom.element(a):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),!0)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){return new CKEDITOR.dom.window(this.$.parentWindow||
this.$.defaultView)},write:function(a){this.$.open("text/html","replace");CKEDITOR.env.ie&&(a=a.replace(/(?:^\s*<!DOCTYPE[^>]*?>)|^/i,'$\x26\n\x3cscript data-cke-temp\x3d"1"\x3e('+CKEDITOR.tools.fixDomain+")();\x3c/script\x3e"));this.$.write(a);this.$.close()},find:function(a){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(a))},findOne:function(a){return(a=this.$.querySelector(a))?new CKEDITOR.dom.element(a):null},_getHtml5ShivFrag:function(){var a=this.getCustomData("html5ShivFrag");a||
(a=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(a,!0),this.setCustomData("html5ShivFrag",a));return a}}),CKEDITOR.dom.nodeList=function(a){this.$=a},CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(a){return 0>a||a>=this.$.length?null:(a=this.$[a])?new CKEDITOR.dom.node(a):null}},CKEDITOR.dom.element=function(a,f){"string"==typeof a&&(a=(f?f.$:document).createElement(a));CKEDITOR.dom.domObject.call(this,a)},CKEDITOR.dom.element.get=function(a){return(a=
"string"==typeof a?document.getElementById(a)||document.getElementsByName(a)[0]:a)&&(a.$?a:new CKEDITOR.dom.element(a))},CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node,CKEDITOR.dom.element.createFromHtml=function(a,f){var c=new CKEDITOR.dom.element("div",f);c.setHtml(a);return c.getFirst().remove()},CKEDITOR.dom.element.setMarker=function(a,f,c,e){var h=f.getCustomData("list_marker_id")||f.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),m=f.getCustomData("list_marker_names")||
f.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");a[h]=f;m[c]=1;return f.setCustomData(c,e)},CKEDITOR.dom.element.clearAllMarkers=function(a){for(var f in a)CKEDITOR.dom.element.clearMarkers(a,a[f],1)},CKEDITOR.dom.element.clearMarkers=function(a,f,c){var e=f.getCustomData("list_marker_names"),h=f.getCustomData("list_marker_id"),m;for(m in e)f.removeCustomData(m);f.removeCustomData("list_marker_names");c&&(f.removeCustomData("list_marker_id"),delete a[h])},function(){function a(a,
b){return-1<(" "+a+" ").replace(m," ").indexOf(" "+b+" ")}function f(a){var b=!0;a.$.id||(a.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),b=!1);return function(){b||a.removeAttribute("id")}}function c(a,b){var d=CKEDITOR.tools.escapeCss(a.$.id);return"#"+d+" "+b.split(/,\s*/).join(", #"+d+" ")}function e(a){for(var b=0,d=0,g=l[a].length;d<g;d++)b+=parseInt(this.getComputedStyle(l[a][d])||0,10)||0;return b}var h=document.createElement("_").classList,h="undefined"!==typeof h&&null!==String(h.add).match(/\[Native code\]/gi),
m=/[\n\t\r]/g;CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:h?function(a){this.$.classList.add(a);return this}:function(k){var b=this.$.className;b&&(a(b,k)||(b+=" "+k));this.$.className=b||k;return this},removeClass:h?function(a){var b=this.$;b.classList.remove(a);b.className||b.removeAttribute("class");return this}:function(k){var b=this.getAttribute("class");b&&a(b,k)&&((b=b.replace(new RegExp("(?:^|\\s+)"+k+"(?\x3d\\s|$)"),"").replace(/^\s+/,""))?this.setAttribute("class",
b):this.removeAttribute("class"));return this},hasClass:function(k){return a(this.$.className,k)},append:function(a,b){"string"==typeof a&&(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){null!=this.$.text&&CKEDITOR.env.ie&&9>CKEDITOR.env.version?
this.$.text+=a:this.append(new CKEDITOR.dom.text(a))},appendBogus:function(a){if(a||CKEDITOR.env.needsBrFiller){for(a=this.getLast();a&&a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(a.getText());)a=a.getPrevious();a&&a.is&&a.is("br")||(a=this.getDocument().createElement("br"),CKEDITOR.env.gecko&&a.setAttribute("type","_moz"),this.append(a))}},breakParent:function(a,b){var d=new CKEDITOR.dom.range(this.getDocument());d.setStartAfter(this);d.setEndAfter(a);var g=d.extractContents(!1,b||!1),c;d.insertNode(this.remove());
if(CKEDITOR.env.ie&&!CKEDITOR.env.edge){for(d=new CKEDITOR.dom.element("div");c=g.getFirst();)c.$.style.backgroundColor&&(c.$.style.backgroundColor=c.$.style.backgroundColor),d.append(c);d.insertAfter(this);d.remove(!0)}else g.insertAfterNode(this)},contains:document.compareDocumentPosition?function(a){return!!(this.$.compareDocumentPosition(a.$)&16)}:function(a){var b=this.$;return a.type!=CKEDITOR.NODE_ELEMENT?b.contains(a.getParent().$):b!=a.$&&b.contains(a.$)},focus:function(){function a(){try{this.$.focus()}catch(b){}}
return function(b){b?CKEDITOR.tools.setTimeout(a,100,this):a.call(this)}}(),getHtml:function(){var a=this.$.innerHTML;return CKEDITOR.env.ie?a.replace(/<\?[^>]*>/g,""):a},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var a=this.$.ownerDocument.createElement("div");a.appendChild(this.$.cloneNode(!0));return a.innerHTML},getClientRect:function(){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:CKEDITOR.env.ie&&9>CKEDITOR.env.version?function(a){try{var b=this.$;if(this.getParent())return b.innerHTML=a;var d=this.getDocument()._getHtml5ShivFrag();d.appendChild(b);b.innerHTML=a;d.removeChild(b);return a}catch(g){this.$.innerHTML="";b=new CKEDITOR.dom.element("body",this.getDocument());b.$.innerHTML=a;for(b=b.getChildren();b.count();)this.append(b.getItem(0));return a}}:function(a){return this.$.innerHTML=a},setText:function(){var a=document.createElement("p");
a.innerHTML="x";a=a.textContent;return function(b){this.$[a?"textContent":"innerText"]=b}}(),getAttribute:function(){var a=function(a){return this.$.getAttribute(a,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){switch(a){case "class":a="className";break;case "http-equiv":a="httpEquiv";break;case "name":return this.$.name;case "tabindex":return a=this.$.getAttribute(a,2),0!==a&&0===this.$.tabIndex&&(a=null),a;case "checked":return a=this.$.attributes.getNamedItem(a),
(a.specified?a.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[a];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(a,2)}:a}(),getAttributes:function(a){var b={},d=this.$.attributes,g;a=CKEDITOR.tools.isArray(a)?a:[];for(g=0;g<d.length;g++)-1===CKEDITOR.tools.indexOf(a,d[g].name)&&(b[d[g].name]=
d[g].value);return b},getChildren:function(){return new CKEDITOR.dom.nodeList(this.$.childNodes)},getComputedStyle:document.defaultView&&document.defaultView.getComputedStyle?function(a){var b=this.getWindow().$.getComputedStyle(this.$,null);return b?b.getPropertyValue(a):""}:function(a){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(a)]},getDtd:function(){var a=CKEDITOR.dtd[this.getName()];this.getDtd=function(){return a};return a},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag,
getTabIndex:function(){var a=this.$.tabIndex;return 0!==a||CKEDITOR.dtd.$tabIndex[this.getName()]||0===parseInt(this.getAttribute("tabindex"),10)?a:-1},getText:function(){return this.$.textContent||this.$.innerText||""},getWindow:function(){return this.getDocument().getWindow()},getId:function(){return this.$.id||null},getNameAtt:function(){return this.$.name||null},getName:function(){var a=this.$.nodeName.toLowerCase();if(CKEDITOR.env.ie&&8>=document.documentMode){var b=this.$.scopeName;"HTML"!=
b&&(a=b.toLowerCase()+":"+a)}this.getName=function(){return a};return this.getName()},getValue:function(){return this.$.value},getFirst:function(a){var b=this.$.firstChild;(b=b&&new CKEDITOR.dom.node(b))&&a&&!a(b)&&(b=b.getNext(a));return b},getLast:function(a){var b=this.$.lastChild;(b=b&&new CKEDITOR.dom.node(b))&&a&&!a(b)&&(b=b.getPrevious(a));return b},getStyle:function(a){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]},is:function(){var a=this.getName();if("object"==typeof arguments[0])return!!arguments[0][a];
for(var b=0;b<arguments.length;b++)if(arguments[b]==a)return!0;return!1},isEditable:function(a){var b=this.getName();return this.isReadOnly()||"none"==this.getComputedStyle("display")||"hidden"==this.getComputedStyle("visibility")||CKEDITOR.dtd.$nonEditable[b]||CKEDITOR.dtd.$empty[b]||this.is("a")&&(this.data("cke-saved-name")||this.hasAttribute("name"))&&!this.getChildCount()?!1:!1!==a?(a=CKEDITOR.dtd[b]||CKEDITOR.dtd.span,!(!a||!a["#"])):!0},isIdentical:function(a){var b=this.clone(0,1);a=a.clone(0,
1);b.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);a.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);if(b.$.isEqualNode)return b.$.style.cssText=CKEDITOR.tools.normalizeCssText(b.$.style.cssText),a.$.style.cssText=CKEDITOR.tools.normalizeCssText(a.$.style.cssText),b.$.isEqualNode(a.$);b=b.getOuterHtml();a=a.getOuterHtml();if(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&this.is("a")){var d=this.getParent();
d.type==CKEDITOR.NODE_ELEMENT&&(d=d.clone(),d.setHtml(b),b=d.getHtml(),d.setHtml(a),a=d.getHtml())}return b==a},isVisible:function(){var a=(this.$.offsetHeight||this.$.offsetWidth)&&"hidden"!=this.getComputedStyle("visibility"),b,d;a&&CKEDITOR.env.webkit&&(b=this.getWindow(),!b.equals(CKEDITOR.document.getWindow())&&(d=b.$.frameElement)&&(a=(new CKEDITOR.dom.element(d)).isVisible()));return!!a},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return!1;for(var a=this.getChildren(),
b=0,d=a.count();b<d;b++){var g=a.getItem(b);if(g.type!=CKEDITOR.NODE_ELEMENT||!g.data("cke-bookmark"))if(g.type==CKEDITOR.NODE_ELEMENT&&!g.isEmptyInlineRemoveable()||g.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(g.getText()))return!1}return!0},hasAttributes:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(){for(var a=this.$.attributes,b=0;b<a.length;b++){var d=a[b];switch(d.nodeName){case "class":if(this.getAttribute("class"))return!0;case "data-cke-expando":continue;default:if(d.specified)return!0}}return!1}:
function(){var a=this.$.attributes,b=a.length,d={"data-cke-expando":1,_moz_dirty:1};return 0<b&&(2<b||!d[a[0].nodeName]||2==b&&!d[a[1].nodeName])},hasAttribute:function(){function a(b){var d=this.$.attributes.getNamedItem(b);if("input"==this.getName())switch(b){case "class":return 0<this.$.className.length;case "checked":return!!this.$.checked;case "value":return b=this.getAttribute("type"),"checkbox"==b||"radio"==b?"on"!=this.$.value:!!this.$.value}return d?d.specified:!1}return CKEDITOR.env.ie?
8>CKEDITOR.env.version?function(b){return"name"==b?!!this.$.name:a.call(this,b)}:a:function(a){return!!this.$.attributes.getNamedItem(a)}}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,b){var d=this.$;a=a.$;if(d!=a){var g;if(b)for(;g=d.lastChild;)a.insertBefore(d.removeChild(g),a.firstChild);else for(;g=d.firstChild;)a.appendChild(d.removeChild(g))}},mergeSiblings:function(){function a(b,d,g){if(d&&d.type==CKEDITOR.NODE_ELEMENT){for(var c=[];d.data("cke-bookmark")||d.isEmptyInlineRemoveable();)if(c.push(d),
d=g?d.getNext():d.getPrevious(),!d||d.type!=CKEDITOR.NODE_ELEMENT)return;if(b.isIdentical(d)){for(var e=g?b.getLast():b.getFirst();c.length;)c.shift().move(b,!g);d.moveChildren(b,!g);d.remove();e&&e.type==CKEDITOR.NODE_ELEMENT&&e.mergeSiblings()}}}return function(b){if(!1===b||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))a(this,this.getNext(),!0),a(this,this.getPrevious())}}(),show:function(){this.setStyles({display:"",visibility:""})},setAttribute:function(){var a=function(a,d){this.$.setAttribute(a,
d);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(b,d){"class"==b?this.$.className=d:"style"==b?this.$.style.cssText=d:"tabindex"==b?this.$.tabIndex=d:"checked"==b?this.$.checked=d:"contenteditable"==b?a.call(this,"contentEditable",d):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(b,d){if("src"==b&&d.match(/^http:\/\//))try{a.apply(this,arguments)}catch(g){}else a.apply(this,arguments);return this}:a}(),setAttributes:function(a){for(var b in a)this.setAttribute(b,
a[b]);return this},setValue:function(a){this.$.value=a;return this},removeAttribute:function(){var a=function(a){this.$.removeAttribute(a)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){"class"==a?a="className":"tabindex"==a?a="tabIndex":"contenteditable"==a&&(a="contentEditable");this.$.removeAttribute(a)}:a}(),removeAttributes:function(a){if(CKEDITOR.tools.isArray(a))for(var b=0;b<a.length;b++)this.removeAttribute(a[b]);else for(b in a=a||this.getAttributes(),
a)a.hasOwnProperty(b)&&this.removeAttribute(b)},removeStyle:function(a){var b=this.$.style;if(b.removeProperty||"border"!=a&&"margin"!=a&&"padding"!=a)b.removeProperty?b.removeProperty(a):b.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(a)),this.$.style.cssText||this.removeAttribute("style");else{var d=["top","left","right","bottom"],g;"border"==a&&(g=["color","style","width"]);for(var b=[],c=0;c<d.length;c++)if(g)for(var e=0;e<g.length;e++)b.push([a,d[c],g[e]].join("-"));else b.push([a,d[c]].join("-"));
for(a=0;a<b.length;a++)this.removeStyle(b[a])}},setStyle:function(a,b){this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]=b;return this},setStyles:function(a){for(var b in a)this.setStyle(b,a[b]);return this},setOpacity:function(a){CKEDITOR.env.ie&&9>CKEDITOR.env.version?(a=Math.round(100*a),this.setStyle("filter",100<=a?"":"progid:DXImageTransform.Microsoft.Alpha(opacity\x3d"+a+")")):this.setStyle("opacity",a)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","none"));
if(CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var a,b=this.getElementsByTag("*"),d=0,g=b.count();d<g;d++)a=b.getItem(d),a.setAttribute("unselectable","on")}},getPositionedAncestor:function(){for(var a=this;"html"!=a.getName();){if("static"!=a.getComputedStyle("position"))return a;a=a.getParent()}return null},getDocumentPosition:function(a){var b=0,d=0,g=this.getDocument(),c=g.getBody(),e="BackCompat"==g.$.compatMode;if(document.documentElement.getBoundingClientRect&&(CKEDITOR.env.ie?
8!==CKEDITOR.env.version:1)){var h=this.$.getBoundingClientRect(),f=g.$.documentElement,n=f.clientTop||c.$.clientTop||0,q=f.clientLeft||c.$.clientLeft||0,m=!0;CKEDITOR.env.ie&&(m=g.getDocumentElement().contains(this),g=g.getBody().contains(this),m=e&&g||!e&&m);m&&(CKEDITOR.env.webkit||CKEDITOR.env.ie&&12<=CKEDITOR.env.version?(b=c.$.scrollLeft||f.scrollLeft,d=c.$.scrollTop||f.scrollTop):(d=e?c.$:f,b=d.scrollLeft,d=d.scrollTop),b=h.left+b-q,d=h.top+d-n)}else for(n=this,q=null;n&&"body"!=n.getName()&&
"html"!=n.getName();){b+=n.$.offsetLeft-n.$.scrollLeft;d+=n.$.offsetTop-n.$.scrollTop;n.equals(this)||(b+=n.$.clientLeft||0,d+=n.$.clientTop||0);for(;q&&!q.equals(n);)b-=q.$.scrollLeft,d-=q.$.scrollTop,q=q.getParent();q=n;n=(h=n.$.offsetParent)?new CKEDITOR.dom.element(h):null}a&&(h=this.getWindow(),n=a.getWindow(),!h.equals(n)&&h.$.frameElement&&(a=(new CKEDITOR.dom.element(h.$.frameElement)).getDocumentPosition(a),b+=a.x,d+=a.y));document.documentElement.getBoundingClientRect||!CKEDITOR.env.gecko||
e||(b+=this.$.clientLeft?1:0,d+=this.$.clientTop?1:0);return{x:b,y:d}},scrollIntoView:function(a){var b=this.getParent();if(b){do if((b.$.clientWidth&&b.$.clientWidth<b.$.scrollWidth||b.$.clientHeight&&b.$.clientHeight<b.$.scrollHeight)&&!b.is("body")&&this.scrollIntoParent(b,a,1),b.is("html")){var d=b.getWindow();try{var g=d.$.frameElement;g&&(b=new CKEDITOR.dom.element(g))}catch(c){}}while(b=b.getParent())}},scrollIntoParent:function(a,b,d){var g,c,e,h;function f(g,d){/body|html/.test(a.getName())?
a.getWindow().$.scrollBy(g,d):(a.$.scrollLeft+=g,a.$.scrollTop+=d)}function n(a,g){var d={x:0,y:0};if(!a.is(m?"body":"html")){var b=a.$.getBoundingClientRect();d.x=b.left;d.y=b.top}b=a.getWindow();b.equals(g)||(b=n(CKEDITOR.dom.element.get(b.$.frameElement),g),d.x+=b.x,d.y+=b.y);return d}function q(a,g){return parseInt(a.getComputedStyle("margin-"+g)||0,10)||0}!a&&(a=this.getWindow());e=a.getDocument();var m="BackCompat"==e.$.compatMode;a instanceof CKEDITOR.dom.window&&(a=m?e.getBody():e.getDocumentElement());
CKEDITOR.env.webkit&&(e=this.getEditor(!1))&&(e._.previousScrollTop=null);e=a.getWindow();c=n(this,e);var l=n(a,e),C=this.$.offsetHeight;g=this.$.offsetWidth;var r=a.$.clientHeight,w=a.$.clientWidth;e=c.x-q(this,"left")-l.x||0;h=c.y-q(this,"top")-l.y||0;g=c.x+g+q(this,"right")-(l.x+w)||0;c=c.y+C+q(this,"bottom")-(l.y+r)||0;(0>h||0<c)&&f(0,!0===b?h:!1===b?c:0>h?h:c);d&&(0>e||0<g)&&f(0>e?e:g,0)},setState:function(a,b,d){b=b||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(b+"_on");this.removeClass(b+
"_off");this.removeClass(b+"_disabled");d&&this.setAttribute("aria-pressed",!0);d&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(b+"_disabled");this.removeClass(b+"_off");this.removeClass(b+"_on");d&&this.setAttribute("aria-disabled",!0);d&&this.removeAttribute("aria-pressed");break;default:this.addClass(b+"_off"),this.removeClass(b+"_on"),this.removeClass(b+"_disabled"),d&&this.removeAttribute("aria-pressed"),d&&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){var d=this.$.attributes;b=b||{};for(var g=0;g<d.length;g++){var c=d[g],e=c.nodeName.toLowerCase(),h;if(!(e in b))if("checked"==e&&(h=this.getAttribute(e)))a.setAttribute(e,h);else if(!CKEDITOR.env.ie||this.hasAttribute(e))h=this.getAttribute(e),null===h&&(h=c.nodeValue),a.setAttribute(e,h)}""!==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(!0)&&this.$.parentNode.replaceChild(a.$,this.$);a.$["data-cke-expando"]=this.$["data-cke-expando"];this.$=a.$;delete this.getName}},getChild:function(){function a(b,d){var g=b.childNodes;if(0<=d&&d<g.length)return g[d]}return function(b){var d=this.$;if(b.slice)for(b=b.slice();0<b.length&&d;)d=a(d,
b.shift());else d=a(d,b);return d?new CKEDITOR.dom.node(d):null}}(),getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT&&b.hasClass("cke_enable_context_menu")}this.on("contextmenu",function(b){b.data.getTarget().getAscendant(a,!0)||b.data.preventDefault()})},getDirection:function(a){return a?this.getComputedStyle("direction")||this.getDirection()||this.getParent()&&this.getParent().getDirection(1)||this.getDocument().$.dir||
"ltr":this.getStyle("direction")||this.getAttribute("dir")},data:function(a,b){a="data-"+a;if(void 0===b)return this.getAttribute(a);!1===b?this.removeAttribute(a):this.setAttribute(a,b);return null},getEditor:function(a){var b=CKEDITOR.instances,d,g,c;a=a||void 0===a;for(d in b)if(g=b[d],g.element.equals(this)&&g.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||!a&&(c=g.editable(),c.equals(this)||c.contains(this)))return g;return null},find:function(a){var b=f(this);a=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(c(this,
a)));b();return a},findOne:function(a){var b=f(this);a=this.$.querySelector(c(this,a));b();return a?new CKEDITOR.dom.element(a):null},forEach:function(a,b,d){if(!(d||b&&this.type!=b))var g=a(this);if(!1!==g){d=this.getChildren();for(var c=0;c<d.count();c++)g=d.getItem(c),g.type==CKEDITOR.NODE_ELEMENT?g.forEach(a,b):b&&g.type!=b||a(g)}}});var l={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,b,d){"number"==typeof b&&(!d||CKEDITOR.env.ie&&CKEDITOR.env.quirks||(b-=e.call(this,a)),this.setStyle(a,b+"px"))};CKEDITOR.dom.element.prototype.getSize=function(a,b){var d=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(a)],this.$["client"+CKEDITOR.tools.capitalize(a)])||0;b&&(d-=e.call(this,a));return d}}(),CKEDITOR.dom.documentFragment=function(a){a=a||CKEDITOR.document;this.$=a.type==CKEDITOR.NODE_DOCUMENT?a.$.createDocumentFragment():a},CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,
CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,insertAfterNode:function(a){a=a.$;a.parentNode.insertBefore(this.$,a.nextSibling)},getHtml:function(){var a=new CKEDITOR.dom.element("div");this.clone(1,1).appendTo(a);return a.getHtml().replace(/\s*data-cke-expando=".*?"/g,"")}},!0,{append:1,appendBogus:1,clone:1,getFirst:1,getHtml:1,getLast:1,getParent:1,getNext:1,getPrevious:1,appendTo:1,moveChildren:1,insertBefore:1,insertAfterNode:1,replace:1,trim:1,type:1,ltrim:1,rtrim:1,getDocument:1,
getChildCount:1,getChild:1,getChildren:1}),function(){function a(a,g){var d=this.range;if(this._.end)return null;if(!this._.start){this._.start=1;if(d.collapsed)return this.end(),null;d.optimize()}var b,c=d.startContainer;b=d.endContainer;var e=d.startOffset,h=d.endOffset,p,f=this.guard,k=this.type,m=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var l=b.type==CKEDITOR.NODE_ELEMENT?b:b.getParent(),y=b.type==CKEDITOR.NODE_ELEMENT?b.getChild(h):b.getNext();this._.guardLTR=function(a,
g){return(!g||!l.equals(a))&&(!y||!a.equals(y))&&(a.type!=CKEDITOR.NODE_ELEMENT||!g||!a.equals(d.root))}}if(a&&!this._.guardRTL){var D=c.type==CKEDITOR.NODE_ELEMENT?c:c.getParent(),F=c.type==CKEDITOR.NODE_ELEMENT?e?c.getChild(e-1):null:c.getPrevious();this._.guardRTL=function(a,g){return(!g||!D.equals(a))&&(!F||!a.equals(F))&&(a.type!=CKEDITOR.NODE_ELEMENT||!g||!a.equals(d.root))}}var E=a?this._.guardRTL:this._.guardLTR;p=f?function(a,g){return!1===E(a,g)?!1:f(a,g)}:E;this.current?b=this.current[m](!1,
k,p):(a?b.type==CKEDITOR.NODE_ELEMENT&&(b=0<h?b.getChild(h-1):!1===p(b,!0)?null:b.getPreviousSourceNode(!0,k,p)):(b=c,b.type==CKEDITOR.NODE_ELEMENT&&((b=b.getChild(e))||(b=!1===p(c,!0)?null:c.getNextSourceNode(!0,k,p)))),b&&!1===p(b)&&(b=null));for(;b&&!this._.end;){this.current=b;if(!this.evaluator||!1!==this.evaluator(b)){if(!g)return b}else if(g&&this.evaluator)return!1;b=b[m](!1,k,p)}this.end();return this.current=null}function f(g){for(var d,b=null;d=a.call(this,g);)b=d;return b}CKEDITOR.dom.walker=
CKEDITOR.tools.createClass({$:function(a){this.range=a;this._={}},proto:{end:function(){this._.end=1},next:function(){return a.call(this)},previous:function(){return a.call(this,1)},checkForward:function(){return!1!==a.call(this,0,1)},checkBackward:function(){return!1!==a.call(this,1,1)},lastForward:function(){return f.call(this)},lastBackward:function(){return f.call(this,1)},reset:function(){delete this.current;this._={}}}});var c={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},e={absolute:1,fixed:1};CKEDITOR.dom.element.prototype.isBlockBoundary=function(a){return"none"!=this.getComputedStyle("float")||this.getComputedStyle("position")in e||!c[this.getComputedStyle("display")]?!!(this.is(CKEDITOR.dtd.$block)||a&&this.is(a)):!0};CKEDITOR.dom.walker.blockBoundary=function(a){return function(g){return!(g.type==CKEDITOR.NODE_ELEMENT&&g.isBlockBoundary(a))}};CKEDITOR.dom.walker.listItemBoundary=
function(){return this.blockBoundary({br:1})};CKEDITOR.dom.walker.bookmark=function(a,g){function d(a){return a&&a.getName&&"span"==a.getName()&&a.data("cke-bookmark")}return function(b){var c,e;c=b&&b.type!=CKEDITOR.NODE_ELEMENT&&(e=b.getParent())&&d(e);c=a?c:c||d(b);return!!(g^c)}};CKEDITOR.dom.walker.whitespaces=function(a){return function(g){var d;g&&g.type==CKEDITOR.NODE_TEXT&&(d=!CKEDITOR.tools.trim(g.getText())||CKEDITOR.env.webkit&&g.getText()==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE);
return!!(a^d)}};CKEDITOR.dom.walker.invisible=function(a){var g=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.env.webkit?1:0;return function(b){g(b)?b=1:(b.type==CKEDITOR.NODE_TEXT&&(b=b.getParent()),b=b.$.offsetWidth<=d);return!!(a^b)}};CKEDITOR.dom.walker.nodeType=function(a,g){return function(d){return!!(g^d.type==a)}};CKEDITOR.dom.walker.bogus=function(a){function g(a){return!m(a)&&!l(a)}return function(d){var b=CKEDITOR.env.needsBrFiller?d.is&&d.is("br"):d.getText&&h.test(d.getText());b&&(b=d.getParent(),
d=d.getNext(g),b=b.isBlockBoundary()&&(!d||d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary()));return!!(a^b)}};CKEDITOR.dom.walker.temp=function(a){return function(g){g.type!=CKEDITOR.NODE_ELEMENT&&(g=g.getParent());g=g&&g.hasAttribute("data-cke-temp");return!!(a^g)}};var h=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,m=CKEDITOR.dom.walker.whitespaces(),l=CKEDITOR.dom.walker.bookmark(),k=CKEDITOR.dom.walker.temp(),b=function(a){return l(a)||m(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$inline)&&!a.is(CKEDITOR.dtd.$empty)};
CKEDITOR.dom.walker.ignored=function(a){return function(g){g=m(g)||l(g)||k(g);return!!(a^g)}};var d=CKEDITOR.dom.walker.ignored();CKEDITOR.dom.walker.empty=function(a){return function(g){for(var b=0,c=g.getChildCount();b<c;++b)if(!d(g.getChild(b)))return!!a;return!a}};var g=CKEDITOR.dom.walker.empty(),p=CKEDITOR.dom.walker.validEmptyBlockContainers=CKEDITOR.tools.extend(function(a){var g={},d;for(d in a)CKEDITOR.dtd[d]["#"]&&(g[d]=1);return g}(CKEDITOR.dtd.$block),{caption:1,td:1,th:1});CKEDITOR.dom.walker.editable=
function(a){return function(b){b=d(b)?!1:b.type==CKEDITOR.NODE_TEXT||b.type==CKEDITOR.NODE_ELEMENT&&(b.is(CKEDITOR.dtd.$inline)||b.is("hr")||"false"==b.getAttribute("contenteditable")||!CKEDITOR.env.needsBrFiller&&b.is(p)&&g(b))?!0:!1;return!!(a^b)}};CKEDITOR.dom.element.prototype.getBogus=function(){var a=this;do a=a.getPreviousSourceNode();while(b(a));return a&&(CKEDITOR.env.needsBrFiller?a.is&&a.is("br"):a.getText&&h.test(a.getText()))?a:!1}}(),CKEDITOR.dom.range=function(a){this.endOffset=this.endContainer=
this.startOffset=this.startContainer=null;this.collapsed=!0;var f=a instanceof CKEDITOR.dom.document;this.document=f?a:a.getDocument();this.root=f?a.getBody():a},function(){function a(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset}function f(a,d,b,c,e){function h(a,g,b,d){var c=b?a.getPrevious():a.getNext();if(d&&m)return c;r||d?g.append(a.clone(!0,e),b):(a.remove(),l&&g.append(a));return c}function f(){var a,g,b,d=Math.min(O.length,
I.length);for(a=0;a<d;a++)if(g=O[a],b=I[a],!g.equals(b))return a;return a-1}function k(){var b=R-1,d=E&&L&&!w.equals(B);b<M-1||b<Q-1||d?(d?a.moveToPosition(B,CKEDITOR.POSITION_BEFORE_START):Q==b+1&&F?a.moveToPosition(I[b],CKEDITOR.POSITION_BEFORE_END):a.moveToPosition(I[b+1],CKEDITOR.POSITION_BEFORE_START),c&&(b=O[b+1])&&b.type==CKEDITOR.NODE_ELEMENT&&(d=CKEDITOR.dom.element.createFromHtml('\x3cspan data-cke-bookmark\x3d"1" style\x3d"display:none"\x3e\x26nbsp;\x3c/span\x3e',a.document),d.insertAfter(b),
b.mergeSiblings(!1),a.moveToBookmark({startNode:d}))):a.collapse(!0)}a.optimizeBookmark();var m=0===d,l=1==d,r=2==d;d=r||l;var w=a.startContainer,B=a.endContainer,z=a.startOffset,y=a.endOffset,D,F,E,L,G,N;if(r&&B.type==CKEDITOR.NODE_TEXT&&w.equals(B))w=a.document.createText(w.substring(z,y)),b.append(w);else{B.type==CKEDITOR.NODE_TEXT?r?N=!0:B=B.split(y):0<B.getChildCount()?y>=B.getChildCount()?(B=B.getChild(y-1),F=!0):B=B.getChild(y):L=F=!0;w.type==CKEDITOR.NODE_TEXT?r?G=!0:w.split(z):0<w.getChildCount()?
0===z?(w=w.getChild(z),D=!0):w=w.getChild(z-1):E=D=!0;for(var O=w.getParents(),I=B.getParents(),R=f(),M=O.length-1,Q=I.length-1,P=b,K,W,U,S=-1,J=R;J<=M;J++){W=O[J];U=W.getNext();for(J!=M||W.equals(I[J])&&M<Q?d&&(K=P.append(W.clone(0,e))):D?h(W,P,!1,E):G&&P.append(a.document.createText(W.substring(z)));U;){if(U.equals(I[J])){S=J;break}U=h(U,P)}P=K}P=b;for(J=R;J<=Q;J++)if(b=I[J],U=b.getPrevious(),b.equals(O[J]))d&&(P=P.getChild(0));else{J!=Q||b.equals(O[J])&&Q<M?d&&(K=P.append(b.clone(0,e))):F?h(b,
P,!1,L):N&&P.append(a.document.createText(b.substring(0,y)));if(J>S)for(;U;)U=h(U,P,!0);P=K}r||k()}}function c(){var a=!1,b=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(!0),c=CKEDITOR.dom.walker.bogus();return function(e){return d(e)||b(e)?!0:c(e)&&!a?a=!0:e.type==CKEDITOR.NODE_TEXT&&(e.hasAscendant("pre")||CKEDITOR.tools.trim(e.getText()).length)||e.type==CKEDITOR.NODE_ELEMENT&&!e.is(m)?!1:!0}}function e(a){var b=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(1);
return function(c){return d(c)||b(c)?!0:!a&&l(c)||c.type==CKEDITOR.NODE_ELEMENT&&c.is(CKEDITOR.dtd.$removeEmpty)}}function h(a){return function(){var c;return this[a?"getPreviousNode":"getNextNode"](function(a){!c&&d(a)&&(c=a);return b(a)&&!(l(a)&&a.equals(c))})}}var m={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,"var":1},l=CKEDITOR.dom.walker.bogus(),k=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,
b=CKEDITOR.dom.walker.editable(),d=CKEDITOR.dom.walker.ignored(!0);CKEDITOR.dom.range.prototype={clone:function(){var a=new CKEDITOR.dom.range(this.root);a._setStartContainer(this.startContainer);a.startOffset=this.startOffset;a._setEndContainer(this.endContainer);a.endOffset=this.endOffset;a.collapsed=this.collapsed;return a},collapse:function(a){a?(this._setEndContainer(this.startContainer),this.endOffset=this.startOffset):(this._setStartContainer(this.endContainer),this.startOffset=this.endOffset);
this.collapsed=!0},cloneContents:function(a){var b=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||f(this,2,b,!1,"undefined"==typeof a?!0:a);return b},deleteContents:function(a){this.collapsed||f(this,0,null,a)},extractContents:function(a,b){var d=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||f(this,1,d,a,"undefined"==typeof b?!0:b);return d},createBookmark:function(a){var b,d,c,e,h=this.collapsed;b=this.document.createElement("span");b.data("cke-bookmark",1);b.setStyle("display",
"none");b.setHtml("\x26nbsp;");a&&(c="cke_bm_"+CKEDITOR.tools.getNextNumber(),b.setAttribute("id",c+(h?"C":"S")));h||(d=b.clone(),d.setHtml("\x26nbsp;"),a&&d.setAttribute("id",c+"E"),e=this.clone(),e.collapse(),e.insertNode(d));e=this.clone();e.collapse(!0);e.insertNode(b);d?(this.setStartAfter(b),this.setEndBefore(d)):this.moveToPosition(b,CKEDITOR.POSITION_AFTER_END);return{startNode:a?c+(h?"C":"S"):b,endNode:a?c+"E":d,serializable:a,collapsed:h}},createBookmark2:function(){function a(g){var b=
g.container,c=g.offset,e;e=b;var h=c;e=e.type!=CKEDITOR.NODE_ELEMENT||0===h||h==e.getChildCount()?0:e.getChild(h-1).type==CKEDITOR.NODE_TEXT&&e.getChild(h).type==CKEDITOR.NODE_TEXT;e&&(b=b.getChild(c-1),c=b.getLength());if(b.type==CKEDITOR.NODE_ELEMENT&&0<c){a:{for(e=b;c--;)if(h=e.getChild(c).getIndex(!0),0<=h){c=h;break a}c=-1}c+=1}if(b.type==CKEDITOR.NODE_TEXT){e=b;for(h=0;(e=e.getPrevious())&&e.type==CKEDITOR.NODE_TEXT;)h+=e.getText().replace(CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE,"").length;
e=h;b.getText()?c+=e:(h=b.getPrevious(d),e?(c=e,b=h?h.getNext():b.getParent().getFirst()):(b=b.getParent(),c=h?h.getIndex(!0)+1:0))}g.container=b;g.offset=c}function b(a,g){var d=g.getCustomData("cke-fillingChar");if(d){var c=a.container;d.equals(c)&&(a.offset-=CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE.length,0>=a.offset&&(a.offset=c.getIndex(),a.container=c.getParent()))}}var d=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT,!0);return function(d){var c=this.collapsed,e={container:this.startContainer,
offset:this.startOffset},h={container:this.endContainer,offset:this.endOffset};d&&(a(e),b(e,this.root),c||(a(h),b(h,this.root)));return{start:e.container.getAddress(d),end:c?null:h.container.getAddress(d),startOffset:e.offset,endOffset:h.offset,normalized:d,collapsed:c,is2:!0}}}(),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(!0)}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(),a?(this.setEndBefore(a),a.remove()):this.collapse(!0)},getBoundaryNodes:function(){var a=this.startContainer,b=this.endContainer,d=this.startOffset,c=this.endOffset,e;if(a.type==CKEDITOR.NODE_ELEMENT)if(e=a.getChildCount(),e>d)a=a.getChild(d);else if(1>e)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)if(e=b.getChildCount(),e>c)b=b.getChild(c).getPreviousSourceNode(!0);else if(1>e)b=b.getPreviousSourceNode();else{for(b=b.$;b.lastChild;)b=b.lastChild;b=new CKEDITOR.dom.node(b)}a.getPosition(b)&CKEDITOR.POSITION_FOLLOWING&&(a=b);return{startNode:a,endNode:b}},getCommonAncestor:function(a,b){var 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 h=d.split(c),c=d.getIndex()+1,d=d.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(h,this.endOffset-this.startOffset):d.equals(this.endContainer)&&(this.endOffset+=1)}else c=d.getIndex(),d=d.getParent();
this.setStart(d,c);if(e){this.collapse(!0);return}}d=this.endContainer;c=this.endOffset;b||e||!d||d.type!=CKEDITOR.NODE_TEXT||(c?(c>=d.getLength()||d.split(c),c=d.getIndex()+1):c=d.getIndex(),d=d.getParent(),this.setEnd(d,c))},enlarge:function(a,b){function d(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}var c=new RegExp(/[^\s\ufeff]/);switch(a){case CKEDITOR.ENLARGE_INLINE:var e=1;case CKEDITOR.ENLARGE_ELEMENT:var h=function(a,b){var d=new CKEDITOR.dom.range(k);
d.setStart(a,b);d.setEndAt(k,CKEDITOR.POSITION_BEFORE_END);var d=new CKEDITOR.dom.walker(d),g;for(d.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};g=d.next();){if(g.type!=CKEDITOR.NODE_TEXT)return!1;D=g!=a?g.getText():g.substring(b);if(c.test(D))return!1}return!0};if(this.collapsed)break;var f=this.getCommonAncestor(),k=this.root,m,l,r,w,B,z=!1,y,D;y=this.startContainer;var F=this.startOffset;y.type==CKEDITOR.NODE_TEXT?(F&&(y=!CKEDITOR.tools.trim(y.substring(0,F)).length&&
y,z=!!y),y&&((w=y.getPrevious())||(r=y.getParent()))):(F&&(w=y.getChild(F-1)||y.getLast()),w||(r=y));for(r=d(r);r||w;){if(r&&!w){!B&&r.equals(f)&&(B=!0);if(e?r.isBlockBoundary():!k.contains(r))break;z&&"inline"==r.getComputedStyle("display")||(z=!1,B?m=r:this.setStartBefore(r));w=r.getPrevious()}for(;w;)if(y=!1,w.type==CKEDITOR.NODE_COMMENT)w=w.getPrevious();else{if(w.type==CKEDITOR.NODE_TEXT)D=w.getText(),c.test(D)&&(w=null),y=/[\s\ufeff]$/.test(D);else if((w.$.offsetWidth>(CKEDITOR.env.webkit?1:
0)||b&&w.is("br"))&&!w.data("cke-bookmark"))if(z&&CKEDITOR.dtd.$removeEmpty[w.getName()]){D=w.getText();if(c.test(D))w=null;else for(var F=w.$.getElementsByTagName("*"),E=0,L;L=F[E++];)if(!CKEDITOR.dtd.$removeEmpty[L.nodeName.toLowerCase()]){w=null;break}w&&(y=!!D.length)}else w=null;y&&(z?B?m=r:r&&this.setStartBefore(r):z=!0);if(w){y=w.getPrevious();if(!r&&!y){r=w;w=null;break}w=y}else r=null}r&&(r=d(r.getParent()))}y=this.endContainer;F=this.endOffset;r=w=null;B=z=!1;y.type==CKEDITOR.NODE_TEXT?
CKEDITOR.tools.trim(y.substring(F)).length?z=!0:(z=!y.getLength(),F==y.getLength()?(w=y.getNext())||(r=y.getParent()):h(y,F)&&(r=y.getParent())):(w=y.getChild(F))||(r=y);for(;r||w;){if(r&&!w){!B&&r.equals(f)&&(B=!0);if(e?r.isBlockBoundary():!k.contains(r))break;z&&"inline"==r.getComputedStyle("display")||(z=!1,B?l=r:r&&this.setEndAfter(r));w=r.getNext()}for(;w;){y=!1;if(w.type==CKEDITOR.NODE_TEXT)D=w.getText(),h(w,0)||(w=null),y=/^[\s\ufeff]/.test(D);else if(w.type==CKEDITOR.NODE_ELEMENT){if((0<w.$.offsetWidth||
b&&w.is("br"))&&!w.data("cke-bookmark"))if(z&&CKEDITOR.dtd.$removeEmpty[w.getName()]){D=w.getText();if(c.test(D))w=null;else for(F=w.$.getElementsByTagName("*"),E=0;L=F[E++];)if(!CKEDITOR.dtd.$removeEmpty[L.nodeName.toLowerCase()]){w=null;break}w&&(y=!!D.length)}else w=null}else y=1;y&&z&&(B?l=r:this.setEndAfter(r));if(w){y=w.getNext();if(!r&&!y){r=w;w=null;break}w=y}else r=null}r&&(r=d(r.getParent()))}m&&l&&(f=m.contains(l)?l:m,this.setStartBefore(f),this.setEndAfter(f));break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:r=
new CKEDITOR.dom.range(this.root);k=this.root;r.setStartAt(k,CKEDITOR.POSITION_AFTER_START);r.setEnd(this.startContainer,this.startOffset);r=new CKEDITOR.dom.walker(r);var G,N,O=CKEDITOR.dom.walker.blockBoundary(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),I=null,R=function(a){if(a.type==CKEDITOR.NODE_ELEMENT&&"false"==a.getAttribute("contenteditable"))if(I){if(I.equals(a)){I=null;return}}else I=a;else if(I)return;var b=O(a);b||(G=a);return b},e=function(a){var b=R(a);!b&&a.is&&a.is("br")&&
(N=a);return b};r.guard=R;r=r.lastBackward();G=G||k;this.setStartAt(G,!G.is("br")&&(!r&&this.checkStartOfBlock()||r&&G.contains(r))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END);if(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){r=this.clone();r=new CKEDITOR.dom.walker(r);var M=CKEDITOR.dom.walker.whitespaces(),Q=CKEDITOR.dom.walker.bookmark();r.evaluator=function(a){return!M(a)&&!Q(a)};if((r=r.previous())&&r.type==CKEDITOR.NODE_ELEMENT&&r.is("br"))break}r=this.clone();r.collapse();r.setEndAt(k,
CKEDITOR.POSITION_BEFORE_END);r=new CKEDITOR.dom.walker(r);r.guard=a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?e:R;G=I=N=null;r=r.lastForward();G=G||k;this.setEndAt(G,!r&&this.checkEndOfBlock()||r&&G.contains(r)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);N&&this.setEndAfter(N)}},shrink:function(a,b,d){if(!this.collapsed){a=a||CKEDITOR.SHRINK_TEXT;var c=this.clone(),e=this.startContainer,h=this.endContainer,k=this.startOffset,f=this.endOffset,m=1,l=1;e&&e.type==CKEDITOR.NODE_TEXT&&(k?
k>=e.getLength()?c.setStartAfter(e):(c.setStartBefore(e),m=0):c.setStartBefore(e));h&&h.type==CKEDITOR.NODE_TEXT&&(f?f>=h.getLength()?c.setEndAfter(h):(c.setEndAfter(h),l=0):c.setEndBefore(h));var c=new CKEDITOR.dom.walker(c),r=CKEDITOR.dom.walker.bookmark();c.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var w;c.guard=function(b,c){if(r(b))return!0;if(a==CKEDITOR.SHRINK_ELEMENT&&b.type==CKEDITOR.NODE_TEXT||c&&b.equals(w)||!1===d&&b.type==
CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()||b.type==CKEDITOR.NODE_ELEMENT&&b.hasAttribute("contenteditable"))return!1;c||b.type!=CKEDITOR.NODE_ELEMENT||(w=b);return!0};m&&(e=c[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(e,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);l&&(c.reset(),(c=c[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(c,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END));return!(!m&&!l)}},insertNode:function(a){this.optimizeBookmark();
this.trim(!1,!0);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(!0)},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(b,d){b.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[b.getName()]&&(d=b.getIndex(),b=b.getParent());this._setStartContainer(b);this.startOffset=d;this.endContainer||(this._setEndContainer(b),this.endOffset=d);a(this)},setEnd:function(b,d){b.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[b.getName()]&&(d=b.getIndex()+1,b=b.getParent());this._setEndContainer(b);this.endOffset=d;this.startContainer||(this._setStartContainer(b),this.startOffset=d);a(this)},setStartAfter:function(a){this.setStart(a.getParent(),
a.getIndex()+1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())},setEndAfter:function(a){this.setEnd(a.getParent(),a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(),a.getIndex())},setStartAt:function(b,d){switch(d){case CKEDITOR.POSITION_AFTER_START:this.setStart(b,0);break;case CKEDITOR.POSITION_BEFORE_END:b.type==CKEDITOR.NODE_TEXT?this.setStart(b,b.getLength()):this.setStart(b,b.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(b);
break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(b)}a(this)},setEndAt:function(b,d){switch(d){case CKEDITOR.POSITION_AFTER_START:this.setEnd(b,0);break;case CKEDITOR.POSITION_BEFORE_END:b.type==CKEDITOR.NODE_TEXT?this.setEnd(b,b.getLength()):this.setEnd(b,b.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(b);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(b)}a(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();this.insertNode(c);var e=c.getBogus();e&&e.remove();c.appendBogus();this.moveToBookmark(d);return c},splitBlock:function(a,b){var d=new CKEDITOR.dom.elementPath(this.startContainer,this.root),c=new CKEDITOR.dom.elementPath(this.endContainer,this.root),e=d.block,h=c.block,k=null;if(!d.blockLimit.equals(c.blockLimit))return null;"br"!=a&&(e||(e=this.fixBlock(!0,a),h=(new CKEDITOR.dom.elementPath(this.endContainer,
this.root)).block),h||(h=this.fixBlock(!1,a)));d=e&&this.checkStartOfBlock();c=h&&this.checkEndOfBlock();this.deleteContents();e&&e.equals(h)&&(c?(k=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(h,CKEDITOR.POSITION_AFTER_END),h=null):d?(k=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),e=null):(h=this.splitElement(e,b||!1),e.is("ul","ol")||e.appendBogus()));return{previousBlock:e,nextBlock:h,wasStartOfBlock:d,
wasEndOfBlock:c,elementPath:k}},splitElement:function(a,b){if(!this.collapsed)return null;this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var d=this.extractContents(!1,b||!1),c=a.clone(!1,b||!1);d.appendTo(c);c.insertAfter(a);this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return c},removeEmptyBlocksAtEnd:function(){function a(g){return function(a){return b(a)||d(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable()||g.is("table")&&a.is("caption")?!1:!0}}var b=CKEDITOR.dom.walker.whitespaces(),
d=CKEDITOR.dom.walker.bookmark(!1);return function(b){for(var d=this.createBookmark(),c=this[b?"endPath":"startPath"](),e=c.block||c.blockLimit,h;e&&!e.equals(c.root)&&!e.getFirst(a(e));)h=e.getParent(),this[b?"setEndAt":"setStartAt"](e,CKEDITOR.POSITION_AFTER_END),e.remove(1),e=h;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,c=this.clone();c.collapse(d);c[d?"setStartAt":"setEndAt"](a,d?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(c);c.evaluator=e(d);return c[d?"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var a=this.startContainer,b=this.startOffset;CKEDITOR.env.ie&&b&&a.type==CKEDITOR.NODE_TEXT&&(a=CKEDITOR.tools.ltrim(a.substring(0,b)),k.test(a)&&this.trim(0,1));this.trim();a=new CKEDITOR.dom.elementPath(this.startContainer,this.root);
b=this.clone();b.collapse(!0);b.setStartAt(a.block||a.blockLimit,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(b);a.evaluator=c();return a.checkBackward()},checkEndOfBlock:function(){var a=this.endContainer,b=this.endOffset;CKEDITOR.env.ie&&a.type==CKEDITOR.NODE_TEXT&&(a=CKEDITOR.tools.rtrim(a.substring(b)),k.test(a)&&this.trim(1,0));this.trim();a=new CKEDITOR.dom.elementPath(this.endContainer,this.root);b=this.clone();b.collapse(!1);b.setEndAt(a.block||a.blockLimit,CKEDITOR.POSITION_BEFORE_END);
a=new CKEDITOR.dom.walker(b);a.evaluator=c();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("false"==b.getAttribute("contentEditable")&&!b.data("cke-editable"))return 0;if(b.is("html")||"true"==b.getAttribute("contentEditable")&&(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(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable(!1))return this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),
!0;for(var c=0;a;){if(a.type==CKEDITOR.NODE_TEXT){b&&this.endContainer&&this.checkEndOfBlock()&&k.test(a.getText())?this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);c=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable())this.moveToPosition(a,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),c=1;else if(b&&a.is("br")&&this.endContainer&&this.checkEndOfBlock())this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START);
else if("false"==a.getAttribute("contenteditable")&&a.is(CKEDITOR.dtd.$block))return this.setStartBefore(a),this.setEndAfter(a),!0;var e=a,h=c,n=void 0;e.type==CKEDITOR.NODE_ELEMENT&&e.isEditable(!1)&&(n=e[b?"getLast":"getFirst"](d));h||n||(n=e[b?"getPrevious":"getNext"](d));a=n}return!!c},moveToClosestEditablePosition:function(a,b){var d,c=0,e,h,k=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];a?(d=new CKEDITOR.dom.range(this.root),d.moveToPosition(a,k[b?0:1])):d=this.clone();if(a&&
!a.is(CKEDITOR.dtd.$block))c=1;else if(e=d[b?"getNextEditableNode":"getPreviousEditableNode"]())c=1,(h=e.type==CKEDITOR.NODE_ELEMENT)&&e.is(CKEDITOR.dtd.$block)&&"false"==e.getAttribute("contenteditable")?(d.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),d.setEndAt(e,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&h&&e.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(d.setEnd(e,0),d.collapse()):d.moveToPosition(e,k[b?1:0]);c&&this.moveToRange(d);return!!c},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)},
moveToElementEditEnd:function(a){return this.moveToElementEditablePosition(a,!0)},getEnclosedNode:function(){var a=this.clone();a.optimize();if(a.startContainer.type!=CKEDITOR.NODE_ELEMENT||a.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var a=new CKEDITOR.dom.walker(a),b=CKEDITOR.dom.walker.bookmark(!1,!0),d=CKEDITOR.dom.walker.whitespaces(!0);a.evaluator=function(a){return d(a)&&b(a)};var c=a.next();a.reset();return c&&c.equals(a.previous())?c:null},getTouchedStartNode:function(){var a=this.startContainer;
return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.startOffset)||a},getTouchedEndNode:function(){var a=this.endContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.endOffset-1)||a},getNextEditableNode:h(),getPreviousEditableNode:h(1),scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",this.document),b,d,c,e=this.clone();e.optimize();(c=e.startContainer.type==CKEDITOR.NODE_TEXT)?(d=e.startContainer.getText(),
b=e.startContainer.split(e.startOffset),a.insertAfter(e.startContainer)):e.insertNode(a);a.scrollIntoView();c&&(e.startContainer.setText(d),b.remove());a.remove()},_setStartContainer:function(a){this.startContainer=a},_setEndContainer:function(a){this.endContainer=a},_find:function(a,b){var d=this.getCommonAncestor(),c=this.getBoundaryNodes(),e=[],h,k,f,m;if(d&&d.find)for(k=d.find(a),h=0;h<k.count();h++)if(d=k.getItem(h),b||!d.isReadOnly())f=d.getPosition(c.startNode)&CKEDITOR.POSITION_FOLLOWING||
c.startNode.equals(d),m=d.getPosition(c.endNode)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_IS_CONTAINED,f&&m&&e.push(d);return e}}}(),CKEDITOR.POSITION_AFTER_START=1,CKEDITOR.POSITION_BEFORE_END=2,CKEDITOR.POSITION_BEFORE_START=3,CKEDITOR.POSITION_AFTER_END=4,CKEDITOR.ENLARGE_ELEMENT=1,CKEDITOR.ENLARGE_BLOCK_CONTENTS=2,CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS=3,CKEDITOR.ENLARGE_INLINE=4,CKEDITOR.START=1,CKEDITOR.END=2,CKEDITOR.SHRINK_ELEMENT=1,CKEDITOR.SHRINK_TEXT=2,"use strict",function(){function a(a){1>
arguments.length||(this.range=a,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function f(a){var b=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return b.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return b}function c(a,b,e,h){a:{null==h&&(h=f(e));for(var k;k=h.shift();)if(k.getDtd().p){h={element:k,remaining:h};break a}h=null}if(!h)return 0;if((k=CKEDITOR.filter.instances[h.element.data("cke-filter")])&&!k.check(b))return c(a,b,e,h.remaining);
b=new CKEDITOR.dom.range(h.element);b.selectNodeContents(h.element);b=b.createIterator();b.enlargeBr=a.enlargeBr;b.enforceRealBlocks=a.enforceRealBlocks;b.activeFilter=b.filter=k;a._.nestedEditable={element:h.element,container:e,remaining:h.remaining,iterator:b};return 1}function e(a,b,c){if(!b)return!1;a=a.clone();a.collapse(!c);return a.checkBoundaryOfElement(b,c?CKEDITOR.START:CKEDITOR.END)}var h=/^[\r\n\t ]+$/,m=CKEDITOR.dom.walker.bookmark(!1,!0),l=CKEDITOR.dom.walker.whitespaces(!0),k=function(a){return m(a)&&
l(a)},b={dd:1,dt:1,li:1};a.prototype={getNextParagraph:function(a){var g,f,l,u,t;a=a||"p";if(this._.nestedEditable){if(g=this._.nestedEditable.iterator.getNextParagraph(a))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,g;this.activeFilter=this.filter;if(c(this,a,this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(a);this._.nestedEditable=null}if(!this.range.root.getDtd()[a])return null;
if(!this._.started){var n=this.range.clone();f=n.startPath();var q=n.endPath(),x=!n.collapsed&&e(n,f.block),A=!n.collapsed&&e(n,q.block,1);n.shrink(CKEDITOR.SHRINK_ELEMENT,!0);x&&n.setStartAt(f.block,CKEDITOR.POSITION_BEFORE_END);A&&n.setEndAt(q.block,CKEDITOR.POSITION_AFTER_START);f=n.endContainer.hasAscendant("pre",!0)||n.startContainer.hasAscendant("pre",!0);n.enlarge(this.forceBrBreak&&!f||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);n.collapsed||(f=new CKEDITOR.dom.walker(n.clone()),
q=CKEDITOR.dom.walker.bookmark(!0,!0),f.evaluator=q,this._.nextNode=f.next(),f=new CKEDITOR.dom.walker(n.clone()),f.evaluator=q,f=f.previous(),this._.lastNode=f.getNextSourceNode(!0,null,n.root),this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(q=this.range.clone(),q.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),q.checkEndOfBlock()&&(q=new CKEDITOR.dom.elementPath(q.endContainer,
q.root),this._.lastNode=(q.block||q.blockLimit).getNextSourceNode(!0))),this._.lastNode&&n.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=n.document.createText(""),this._.lastNode.insertAfter(f)),n=null);this._.started=1;f=n}q=this._.nextNode;n=this._.lastNode;for(this._.nextNode=null;q;){var x=0,A=q.hasAscendant("pre"),C=q.type!=CKEDITOR.NODE_ELEMENT,r=0;if(C)q.type==CKEDITOR.NODE_TEXT&&h.test(q.getText())&&(C=0);else{var w=q.getName();if(CKEDITOR.dtd.$block[w]&&"false"==q.getAttribute("contenteditable")){g=
q;c(this,a,g);break}else if(q.isBlockBoundary(this.forceBrBreak&&!A&&{br:1})){if("br"==w)C=1;else if(!f&&!q.getChildCount()&&"hr"!=w){g=q;l=q.equals(n);break}f&&(f.setEndAt(q,CKEDITOR.POSITION_BEFORE_START),"br"!=w&&(this._.nextNode=q));x=1}else{if(q.getFirst()){f||(f=this.range.clone(),f.setStartAt(q,CKEDITOR.POSITION_BEFORE_START));q=q.getFirst();continue}C=1}}C&&!f&&(f=this.range.clone(),f.setStartAt(q,CKEDITOR.POSITION_BEFORE_START));l=(!x||C)&&q.equals(n);if(f&&!x)for(;!q.getNext(k)&&!l;){w=
q.getParent();if(w.isBlockBoundary(this.forceBrBreak&&!A&&{br:1})){x=1;C=0;l||w.equals(n);f.setEndAt(w,CKEDITOR.POSITION_BEFORE_END);break}q=w;C=1;l=q.equals(n);r=1}C&&f.setEndAt(q,CKEDITOR.POSITION_AFTER_END);q=this._getNextSourceNode(q,r,n);if((l=!q)||x&&f)break}if(!g){if(!f)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;g=new CKEDITOR.dom.elementPath(f.startContainer,f.root);q=g.blockLimit;x={div:1,th:1,td:1};g=g.block;!g&&q&&!this.enforceRealBlocks&&x[q.getName()]&&
f.checkStartOfBlock()&&f.checkEndOfBlock()&&!q.equals(f.root)?g=q:!g||this.enforceRealBlocks&&g.is(b)?(g=this.range.document.createElement(a),f.extractContents().appendTo(g),g.trim(),f.insertNode(g),u=t=!0):"li"!=g.getName()?f.checkStartOfBlock()&&f.checkEndOfBlock()||(g=g.clone(!1),f.extractContents().appendTo(g),g.trim(),t=f.splitBlock(),u=!t.wasStartOfBlock,t=!t.wasEndOfBlock,f.insertNode(g)):l||(this._.nextNode=g.equals(n)?null:this._getNextSourceNode(f.getBoundaryNodes().endNode,1,n))}u&&(u=
g.getPrevious())&&u.type==CKEDITOR.NODE_ELEMENT&&("br"==u.getName()?u.remove():u.getLast()&&"br"==u.getLast().$.nodeName.toLowerCase()&&u.getLast().remove());t&&(u=g.getLast())&&u.type==CKEDITOR.NODE_ELEMENT&&"br"==u.getName()&&(!CKEDITOR.env.needsBrFiller||u.getPrevious(m)||u.getNext(m))&&u.remove();this._.nextNode||(this._.nextNode=l||g.equals(n)||!n?null:this._getNextSourceNode(g,1,n));return g},_getNextSourceNode:function(a,b,c){function e(a){return!(a.equals(c)||a.equals(h))}var h=this.range.root;
for(a=a.getNextSourceNode(b,null,e);!m(a);)a=a.getNextSourceNode(b,null,e);return a}};CKEDITOR.dom.range.prototype.createIterator=function(){return new a(this)}}(),CKEDITOR.command=function(a,f){this.uiItems=[];this.exec=function(c){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return!1;this.editorFocus&&a.focus();return!1===this.fire("exec")?!0:!1!==f.exec.call(this,a,c)};this.refresh=function(a,c){if(!this.readOnly&&a.readOnly)return!0;if(this.context&&!c.isContextFor(this.context)||
!this.checkAllowed(!0))return this.disable(),!0;this.startDisabled||this.enable();this.modes&&!this.modes[a.mode]&&this.disable();return!1===this.fire("refresh",{editor:a,path:c})?!0:f.refresh&&!1!==f.refresh.apply(this,arguments)};var c;this.checkAllowed=function(e){return e||"boolean"!=typeof c?c=a.activeFilter.checkFeature(this):c};CKEDITOR.tools.extend(this,f,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!f.context,state:CKEDITOR.TRISTATE_DISABLED});CKEDITOR.event.call(this)},CKEDITOR.command.prototype=
{enable:function(){this.state==CKEDITOR.TRISTATE_DISABLED&&this.checkAllowed()&&this.setState(this.preserveState&&"undefined"!=typeof this.previousState?this.previousState:CKEDITOR.TRISTATE_OFF)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},setState:function(a){if(this.state==a||a!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return!1;this.previousState=this.state;this.state=a;this.fire("state");return!0},toggleState:function(){this.state==CKEDITOR.TRISTATE_OFF?this.setState(CKEDITOR.TRISTATE_ON):
this.state==CKEDITOR.TRISTATE_ON&&this.setState(CKEDITOR.TRISTATE_OFF)}},CKEDITOR.event.implementOn(CKEDITOR.command.prototype),CKEDITOR.ENTER_P=1,CKEDITOR.ENTER_BR=2,CKEDITOR.ENTER_DIV=3,CKEDITOR.config={customConfig:"config.js",autoUpdateElement:!0,language:"",defaultLanguage:"en",contentsLangDirection:"",enterMode:CKEDITOR.ENTER_P,forceEnterMode:!1,shiftEnterMode:CKEDITOR.ENTER_BR,docType:"\x3c!DOCTYPE html\x3e",bodyId:"",bodyClass:"",fullPage:!1,height:200,contentsCss:CKEDITOR.getUrl("contents.css"),
extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,width:"",baseFloatZIndex:1E4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]},function(){function a(a,b,d,c,g){var e,h;a=[];for(e in b){h=b[e];h="boolean"==typeof h?{}:"function"==typeof h?{match:h}:E(h);"$"!=e.charAt(0)&&(h.elements=e);d&&(h.featureName=d.toLowerCase());var f=h;f.elements=l(f.elements,/\s+/)||null;f.propertiesOnly=f.propertiesOnly||!0===f.elements;var n=/\s*,\s*/,k=void 0;for(k in N){f[k]=l(f[k],
n)||null;var r=f,m=O[k],p=l(f[O[k]],n),w=f[k],q=[],C=!0,B=void 0;p?C=!1:p={};for(B in w)"!"==B.charAt(0)&&(B=B.slice(1),q.push(B),p[B]=!0,C=!1);for(;B=q.pop();)w[B]=w["!"+B],delete w["!"+B];r[m]=(C?!1:p)||null}f.match=f.match||null;c.push(h);a.push(h)}b=g.elements;g=g.generic;var t;d=0;for(c=a.length;d<c;++d){e=E(a[d]);h=!0===e.classes||!0===e.styles||!0===e.attributes;f=e;k=m=n=void 0;for(n in N)f[n]=x(f[n]);r=!0;for(k in O){n=O[k];m=f[n];p=[];w=void 0;for(w in m)-1<w.indexOf("*")?p.push(new RegExp("^"+
w.replace(/\*/g,".*")+"$")):p.push(w);m=p;m.length&&(f[n]=m,r=!1)}f.nothingRequired=r;f.noProperties=!(f.attributes||f.classes||f.styles);if(!0===e.elements||null===e.elements)g[h?"unshift":"push"](e);else for(t in f=e.elements,delete e.elements,f)if(b[t])b[t][h?"unshift":"push"](e);else b[t]=[e]}}function f(a,b,d,g){if(!a.match||a.match(b))if(g||k(a,b))if(a.propertiesOnly||(d.valid=!0),d.allAttributes||(d.allAttributes=c(a.attributes,b.attributes,d.validAttributes)),d.allStyles||(d.allStyles=c(a.styles,
b.styles,d.validStyles)),!d.allClasses){a=a.classes;b=b.classes;g=d.validClasses;if(a)if(!0===a)a=!0;else{for(var e=0,h=b.length,f;e<h;++e)f=b[e],g[f]||(g[f]=a(f));a=!1}else a=!1;d.allClasses=a}}function c(a,b,d){if(!a)return!1;if(!0===a)return!0;for(var c in b)d[c]||(d[c]=a(c));return!1}function e(a,b,d){if(!a.match||a.match(b)){if(a.noProperties)return!1;d.hadInvalidAttribute=h(a.attributes,b.attributes)||d.hadInvalidAttribute;d.hadInvalidStyle=h(a.styles,b.styles)||d.hadInvalidStyle;a=a.classes;
b=b.classes;if(a){for(var c=!1,g=!0===a,e=b.length;e--;)if(g||a(b[e]))b.splice(e,1),c=!0;a=c}else a=!1;d.hadInvalidClass=a||d.hadInvalidClass}}function h(a,b){if(!a)return!1;var d=!1,c=!0===a,g;for(g in b)if(c||a(g))delete b[g],d=!0;return d}function m(a,b,d){if(a.disabled||a.customConfig&&!d||!b)return!1;a._.cachedChecks={};return!0}function l(a,b){if(!a)return!1;if(!0===a)return a;if("string"==typeof a)return a=L(a),"*"==a?!0:CKEDITOR.tools.convertArrayToObject(a.split(b));if(CKEDITOR.tools.isArray(a))return a.length?
CKEDITOR.tools.convertArrayToObject(a):!1;var d={},c=0,g;for(g in a)d[g]=a[g],c++;return c?d:!1}function k(a,d){if(a.nothingRequired)return!0;var c,g,e,h;if(e=a.requiredClasses)for(h=d.classes,c=0;c<e.length;++c)if(g=e[c],"string"==typeof g){if(-1==CKEDITOR.tools.indexOf(h,g))return!1}else if(!CKEDITOR.tools.checkIfAnyArrayItemMatches(h,g))return!1;return b(d.styles,a.requiredStyles)&&b(d.attributes,a.requiredAttributes)}function b(a,b){if(!b)return!0;for(var d=0,c;d<b.length;++d)if(c=b[d],"string"==
typeof c){if(!(c in a))return!1}else if(!CKEDITOR.tools.checkIfAnyObjectPropertyMatches(a,c))return!1;return!0}function d(a){if(!a)return{};a=a.split(/\s*,\s*/).sort();for(var b={};a.length;)b[a.shift()]="cke-test";return b}function g(a){var b,d,c,g,e={},h=1;for(a=L(a);b=a.match(I);)(d=b[2])?(c=p(d,"styles"),g=p(d,"attrs"),d=p(d,"classes")):c=g=d=null,e["$"+h++]={elements:b[1],classes:d,styles:c,attributes:g},a=a.slice(b[0].length);return e}function p(a,b){var d=a.match(R[b]);return d?L(d[1]):null}
function v(a){var b=a.styleBackup=a.attributes.style,d=a.classBackup=a.attributes["class"];a.styles||(a.styles=CKEDITOR.tools.parseCssText(b||"",1));a.classes||(a.classes=d?d.split(/\s+/):[])}function u(a,b,d,c){var g=0,h;c.toHtml&&(b.name=b.name.replace(M,"$1"));if(c.doCallbacks&&a.elementCallbacks){a:{h=a.elementCallbacks;for(var k=0,r=h.length,m;k<r;++k)if(m=h[k](b)){h=m;break a}h=void 0}if(h)return h}if(c.doTransform&&(h=a._.transformations[b.name])){v(b);for(k=0;k<h.length;++k)w(a,b,h[k]);n(b)}if(c.doFilter){a:{k=
b.name;r=a._;a=r.allowedRules.elements[k];h=r.allowedRules.generic;k=r.disallowedRules.elements[k];r=r.disallowedRules.generic;m=c.skipRequired;var p={valid:!1,validAttributes:{},validClasses:{},validStyles:{},allAttributes:!1,allClasses:!1,allStyles:!1,hadInvalidAttribute:!1,hadInvalidClass:!1,hadInvalidStyle:!1},l,B;if(a||h){v(b);if(k)for(l=0,B=k.length;l<B;++l)if(!1===e(k[l],b,p)){a=null;break a}if(r)for(l=0,B=r.length;l<B;++l)e(r[l],b,p);if(a)for(l=0,B=a.length;l<B;++l)f(a[l],b,p,m);if(h)for(l=
0,B=h.length;l<B;++l)f(h[l],b,p,m);a=p}else a=null}if(!a||!a.valid)return d.push(b),1;B=a.validAttributes;var C=a.validStyles;h=a.validClasses;var k=b.attributes,x=b.styles,r=b.classes;m=b.classBackup;var t=b.styleBackup,I,z,O=[],p=[],u=/^data-cke-/;l=!1;delete k.style;delete k["class"];delete b.classBackup;delete b.styleBackup;if(!a.allAttributes)for(I in k)B[I]||(u.test(I)?I==(z=I.replace(/^data-cke-saved-/,""))||B[z]||(delete k[I],l=!0):(delete k[I],l=!0));if(!a.allStyles||a.hadInvalidStyle){for(I in x)a.allStyles||
C[I]?O.push(I+":"+x[I]):l=!0;O.length&&(k.style=O.sort().join("; "))}else t&&(k.style=t);if(!a.allClasses||a.hadInvalidClass){for(I=0;I<r.length;++I)(a.allClasses||h[r[I]])&&p.push(r[I]);p.length&&(k["class"]=p.sort().join(" "));m&&p.length<m.split(/\s+/).length&&(l=!0)}else m&&(k["class"]=m);l&&(g=1);if(!c.skipFinalValidation&&!q(b))return d.push(b),1}c.toHtml&&(b.name=b.name.replace(Q,"cke:$1"));return g}function t(a){var b=[],d;for(d in a)-1<d.indexOf("*")&&b.push(d.replace(/\*/g,".*"));return b.length?
new RegExp("^(?:"+b.join("|")+")$"):null}function n(a){var b=a.attributes,d;delete b.style;delete b["class"];if(d=CKEDITOR.tools.writeCssText(a.styles,!0))b.style=d;a.classes.length&&(b["class"]=a.classes.sort().join(" "))}function q(a){switch(a.name){case "a":if(!(a.children.length||a.attributes.name||a.attributes.id))return!1;break;case "img":if(!a.attributes.src)return!1}return!0}function x(a){if(!a)return!1;if(!0===a)return!0;var b=t(a);return function(d){return d in a||b&&d.match(b)}}function A(){return new CKEDITOR.htmlParser.element("br")}
function C(a){return a.type==CKEDITOR.NODE_ELEMENT&&("br"==a.name||F.$block[a.name])}function r(a,b,d){var c=a.name;if(F.$empty[c]||!a.children.length)"hr"==c&&"br"==b?a.replaceWith(A()):(a.parent&&d.push({check:"it",el:a.parent}),a.remove());else if(F.$block[c]||"tr"==c)if("br"==b)a.previous&&!C(a.previous)&&(b=A(),b.insertBefore(a)),a.next&&!C(a.next)&&(b=A(),b.insertAfter(a)),a.replaceWithChildren();else{var c=a.children,g;b:{g=F[b];for(var e=0,h=c.length,f;e<h;++e)if(f=c[e],f.type==CKEDITOR.NODE_ELEMENT&&
!g[f.name]){g=!1;break b}g=!0}if(g)a.name=b,a.attributes={},d.push({check:"parent-down",el:a});else{g=a.parent;for(var e=g.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||"body"==g.name,k,n,h=c.length;0<h;)f=c[--h],e&&(f.type==CKEDITOR.NODE_TEXT||f.type==CKEDITOR.NODE_ELEMENT&&F.$inline[f.name])?(k||(k=new CKEDITOR.htmlParser.element(b),k.insertAfter(a),d.push({check:"parent-down",el:k})),k.add(f,0)):(k=null,n=F[g.name]||F.span,f.insertAfter(a),g.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||f.type!=CKEDITOR.NODE_ELEMENT||
n[f.name]||d.push({check:"el-up",el:f}));a.remove()}}else c in{style:1,script:1}?a.remove():(a.parent&&d.push({check:"it",el:a.parent}),a.replaceWithChildren())}function w(a,b,d){var c,g;for(c=0;c<d.length;++c)if(g=d[c],!(g.check&&!a.check(g.check,!1)||g.left&&!g.left(b))){g.right(b,P);break}}function B(a,b){var d=b.getDefinition(),c=d.attributes,g=d.styles,e,h,f,k;if(a.name!=d.element)return!1;for(e in c)if("class"==e)for(d=c[e].split(/\s+/),f=a.classes.join("|");k=d.pop();){if(-1==f.indexOf(k))return!1}else if(a.attributes[e]!=
c[e])return!1;for(h in g)if(a.styles[h]!=g[h])return!1;return!0}function z(a,b){var d,c;"string"==typeof a?d=a:a instanceof CKEDITOR.style?c=a:(d=a[0],c=a[1]);return[{element:d,left:c,right:function(a,d){d.transform(a,b)}}]}function y(a){return function(b){return B(b,a)}}function D(a){return function(b,d){d[a](b)}}var F=CKEDITOR.dtd,E=CKEDITOR.tools.copy,L=CKEDITOR.tools.trim,G=["","p","br","div"];CKEDITOR.FILTER_SKIP_TREE=2;CKEDITOR.filter=function(a){this.allowedContent=[];this.disallowedContent=
[];this.elementCallbacks=null;this.disabled=!1;this.editor=null;this.id=CKEDITOR.tools.getNextNumber();this._={allowedRules:{elements:{},generic:[]},disallowedRules:{elements:{},generic:[]},transformations:{},cachedTests:{}};CKEDITOR.filter.instances[this.id]=this;if(a instanceof CKEDITOR.editor){a=this.editor=a;this.customConfig=!0;var b=a.config.allowedContent;!0===b?this.disabled=!0:(b||(this.customConfig=!1),this.allow(b,"config",1),this.allow(a.config.extraAllowedContent,"extra",1),this.allow(G[a.enterMode]+
" "+G[a.shiftEnterMode],"default",1),this.disallow(a.config.disallowedContent))}else this.customConfig=!1,this.allow(a,"default",1)};CKEDITOR.filter.instances={};CKEDITOR.filter.prototype={allow:function(b,d,c){if(!m(this,b,c))return!1;var e,h;if("string"==typeof b)b=g(b);else if(b instanceof CKEDITOR.style){if(b.toAllowedContentRules)return this.allow(b.toAllowedContentRules(this.editor),d,c);e=b.getDefinition();b={};c=e.attributes;b[e.element]=e={styles:e.styles,requiredStyles:e.styles&&CKEDITOR.tools.objectKeys(e.styles)};
c&&(c=E(c),e.classes=c["class"]?c["class"].split(/\s+/):null,e.requiredClasses=e.classes,delete c["class"],e.attributes=c,e.requiredAttributes=c&&CKEDITOR.tools.objectKeys(c))}else if(CKEDITOR.tools.isArray(b)){for(e=0;e<b.length;++e)h=this.allow(b[e],d,c);return h}a(this,b,d,this.allowedContent,this._.allowedRules);return!0},applyTo:function(a,b,d,c){if(this.disabled)return!1;var g=this,e=[],h=this.editor&&this.editor.config.protectedSource,f,k=!1,n={doFilter:!d,doTransform:!0,doCallbacks:!0,toHtml:b};
a.forEach(function(a){if(a.type==CKEDITOR.NODE_ELEMENT){if("off"==a.attributes["data-cke-filter"])return!1;if(!b||"span"!=a.name||!~CKEDITOR.tools.objectKeys(a.attributes).join("|").indexOf("data-cke-"))if(f=u(g,a,e,n),f&1)k=!0;else if(f&2)return!1}else if(a.type==CKEDITOR.NODE_COMMENT&&a.value.match(/^\{cke_protected\}(?!\{C\})/)){var d;a:{var c=decodeURIComponent(a.value.replace(/^\{cke_protected\}/,""));d=[];var r,m,p;if(h)for(m=0;m<h.length;++m)if((p=c.match(h[m]))&&p[0].length==c.length){d=!0;
break a}c=CKEDITOR.htmlParser.fragment.fromHtml(c);1==c.children.length&&(r=c.children[0]).type==CKEDITOR.NODE_ELEMENT&&u(g,r,d,n);d=!d.length}d||e.push(a)}},null,!0);e.length&&(k=!0);var m;a=[];c=G[c||(this.editor?this.editor.enterMode:CKEDITOR.ENTER_P)];for(var p;d=e.pop();)d.type==CKEDITOR.NODE_ELEMENT?r(d,c,a):d.remove();for(;m=a.pop();)if(d=m.el,d.parent)switch(p=F[d.parent.name]||F.span,m.check){case "it":F.$removeEmpty[d.name]&&!d.children.length?r(d,c,a):q(d)||r(d,c,a);break;case "el-up":d.parent.type==
CKEDITOR.NODE_DOCUMENT_FRAGMENT||p[d.name]||r(d,c,a);break;case "parent-down":d.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||p[d.name]||r(d.parent,c,a)}return k},checkFeature:function(a){if(this.disabled||!a)return!0;a.toFeature&&(a=a.toFeature(this.editor));return!a.requiredContent||this.check(a.requiredContent)},disable:function(){this.disabled=!0},disallow:function(b){if(!m(this,b,!0))return!1;"string"==typeof b&&(b=g(b));a(this,b,null,this.disallowedContent,this._.disallowedRules);return!0},
addContentForms:function(a){if(!this.disabled&&a){var b,d,c=[],g;for(b=0;b<a.length&&!g;++b)d=a[b],("string"==typeof d||d instanceof CKEDITOR.style)&&this.check(d)&&(g=d);if(g){for(b=0;b<a.length;++b)c.push(z(a[b],g));this.addTransformations(c)}}},addElementCallback:function(a){this.elementCallbacks||(this.elementCallbacks=[]);this.elementCallbacks.push(a)},addFeature:function(a){if(this.disabled||!a)return!0;a.toFeature&&(a=a.toFeature(this.editor));this.allow(a.allowedContent,a.name);this.addTransformations(a.contentTransformations);
this.addContentForms(a.contentForms);return a.requiredContent&&(this.customConfig||this.disallowedContent.length)?this.check(a.requiredContent):!0},addTransformations:function(a){var b,d;if(!this.disabled&&a){var c=this._.transformations,g;for(g=0;g<a.length;++g){b=a[g];var e=void 0,h=void 0,f=void 0,k=void 0,n=void 0,r=void 0;d=[];for(h=0;h<b.length;++h)f=b[h],"string"==typeof f?(f=f.split(/\s*:\s*/),k=f[0],n=null,r=f[1]):(k=f.check,n=f.left,r=f.right),e||(e=f,e=e.element?e.element:k?k.match(/^([a-z0-9]+)/i)[0]:
e.left.getDefinition().element),n instanceof CKEDITOR.style&&(n=y(n)),d.push({check:k==e?null:k,left:n,right:"string"==typeof r?D(r):r});b=e;c[b]||(c[b]=[]);c[b].push(d)}}},check:function(a,b,c){if(this.disabled)return!0;if(CKEDITOR.tools.isArray(a)){for(var e=a.length;e--;)if(this.check(a[e],b,c))return!0;return!1}var h,f;if("string"==typeof a){f=a+"\x3c"+(!1===b?"0":"1")+(c?"1":"0")+"\x3e";if(f in this._.cachedChecks)return this._.cachedChecks[f];e=g(a).$1;h=e.styles;var k=e.classes;e.name=e.elements;
e.classes=k=k?k.split(/\s*,\s*/):[];e.styles=d(h);e.attributes=d(e.attributes);e.children=[];k.length&&(e.attributes["class"]=k.join(" "));h&&(e.attributes.style=CKEDITOR.tools.writeCssText(e.styles));h=e}else e=a.getDefinition(),h=e.styles,k=e.attributes||{},h&&!CKEDITOR.tools.isEmpty(h)?(h=E(h),k.style=CKEDITOR.tools.writeCssText(h,!0)):h={},h={name:e.element,attributes:k,classes:k["class"]?k["class"].split(/\s+/):[],styles:h,children:[]};var k=CKEDITOR.tools.clone(h),r=[],m;if(!1!==b&&(m=this._.transformations[h.name])){for(e=
0;e<m.length;++e)w(this,h,m[e]);n(h)}u(this,k,r,{doFilter:!0,doTransform:!1!==b,skipRequired:!c,skipFinalValidation:!c});b=0<r.length?!1:CKEDITOR.tools.objectCompare(h.attributes,k.attributes,!0)?!0:!1;"string"==typeof a&&(this._.cachedChecks[f]=b);return b},getAllowedEnterMode:function(){var a=["p","div","br"],b={p:CKEDITOR.ENTER_P,div:CKEDITOR.ENTER_DIV,br:CKEDITOR.ENTER_BR};return function(d,c){var g=a.slice(),e;if(this.check(G[d]))return d;for(c||(g=g.reverse());e=g.pop();)if(this.check(e))return b[e];
return CKEDITOR.ENTER_BR}}(),destroy:function(){delete CKEDITOR.filter.instances[this.id];delete this._;delete this.allowedContent;delete this.disallowedContent}};var N={styles:1,attributes:1,classes:1},O={styles:"requiredStyles",attributes:"requiredAttributes",classes:"requiredClasses"},I=/^([a-z0-9\-*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,R={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},M=/^cke:(object|embed|param)$/,
Q=/^(object|embed|param)$/,P;P=CKEDITOR.filter.transformationsTools={sizeToStyle:function(a){this.lengthToStyle(a,"width");this.lengthToStyle(a,"height")},sizeToAttribute:function(a){this.lengthToAttribute(a,"width");this.lengthToAttribute(a,"height")},lengthToStyle:function(a,b,d){d=d||b;if(!(d in a.styles)){var c=a.attributes[b];c&&(/^\d+$/.test(c)&&(c+="px"),a.styles[d]=c)}delete a.attributes[b]},lengthToAttribute:function(a,b,d){d=d||b;if(!(d in a.attributes)){var c=a.styles[b],g=c&&c.match(/^(\d+)(?:\.\d*)?px$/);
g?a.attributes[d]=g[1]:"cke-test"==c&&(a.attributes[d]="cke-test")}delete a.styles[b]},alignmentToStyle:function(a){if(!("float"in a.styles)){var b=a.attributes.align;if("left"==b||"right"==b)a.styles["float"]=b}delete a.attributes.align},alignmentToAttribute:function(a){if(!("align"in a.attributes)){var b=a.styles["float"];if("left"==b||"right"==b)a.attributes.align=b}delete a.styles["float"]},matchesStyle:B,transform:function(a,b){if("string"==typeof b)a.name=b;else{var d=b.getDefinition(),c=d.styles,
g=d.attributes,e,h,f,k;a.name=d.element;for(e in g)if("class"==e)for(d=a.classes.join("|"),f=g[e].split(/\s+/);k=f.pop();)-1==d.indexOf(k)&&a.classes.push(k);else a.attributes[e]=g[e];for(h in c)a.styles[h]=c[h]}}}}(),function(){CKEDITOR.focusManager=function(a){if(a.focusManager)return a.focusManager;this.hasFocus=!1;this.currentActive=null;this._={editor:a};return this};CKEDITOR.focusManager._={blurDelay:200};CKEDITOR.focusManager.prototype={focus:function(a){this._.timer&&clearTimeout(this._.timer);
a&&(this.currentActive=a);this.hasFocus||this._.locked||((a=CKEDITOR.currentInstance)&&a.focusManager.blur(1),this.hasFocus=!0,(a=this._.editor.container)&&a.addClass("cke_focus"),this._.editor.fire("focus"))},lock:function(){this._.locked=1},unlock:function(){delete this._.locked},blur:function(a){function f(){if(this.hasFocus){this.hasFocus=!1;var a=this._.editor.container;a&&a.removeClass("cke_focus");this._.editor.fire("blur")}}