!function(){var o={readOnly:1,preserveState:!0,editorFocus:!1,exec:function(o){this.toggleState(),this.refresh(o)},refresh:function(o){if(o.document){var e=this.state!=NEW_CKEDITOR.TRISTATE_ON||o.elementMode==NEW_CKEDITOR.ELEMENT_MODE_INLINE&&!o.focusManager.hasFocus?"removeClass":"attachClass";o.editable()[e]("edi_show_blocks")}}};NEW_CKEDITOR.plugins.add("showblocks",{lang:"af,ar,az,bg,bn,bs,ca,cs,cy,da,de,de-ch,el,en,en-au,en-ca,en-gb,eo,es,es-mx,et,eu,fa,fi,fo,fr,fr-ca,gl,gu,he,hi,hr,hu,id,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,oc,pl,pt,pt-br,ro,ru,si,sk,sl,sq,sr,sr-latn,sv,th,tr,tt,ug,uk,vi,zh,zh-cn",icons:"showblocks,showblocks-rtl",hidpi:!0,onLoad:function(){var o,e,t,s,n,i,d="p div pre address blockquote h1 h2 h3 h4 h5 h6".split(" "),a=NEW_CKEDITOR.getUrl(this.path),l=!(NEW_CKEDITOR.env.ie&&9>NEW_CKEDITOR.env.version),c=l?":not([contenteditable=false]):not(.edi_show_blocks_off)":"";for(o=e=t=s="";n=d.pop();)o+=".edi_show_blocks "+n+c+(i=d.length?",":""),t+=".edi_show_blocks.edi_contents_ltr "+n+c+i,s+=".edi_show_blocks.edi_contents_rtl "+n+c+i,e+=".edi_show_blocks "+n+c+"{background-image:url("+NEW_CKEDITOR.getUrl(a+"images/block_"+n+".png")+")}";NEW_CKEDITOR.addCss((o+"{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px}").concat(e,t+"{background-position:top left;padding-left:8px}",s+"{background-position:top right;padding-right:8px}")),l||NEW_CKEDITOR.addCss(".edi_show_blocks [contenteditable=false],.edi_show_blocks .edi_show_blocks_off{border:none;padding-top:0;background-image:none}.edi_show_blocks.edi_contents_rtl [contenteditable=false],.edi_show_blocks.edi_contents_rtl .edi_show_blocks_off{padding-right:0}.edi_show_blocks.edi_contents_ltr [contenteditable=false],.edi_show_blocks.edi_contents_ltr .edi_show_blocks_off{padding-left:0}")},init:function(e){function t(){s.refresh(e)}if(!e.blockless){var s=e.addCommand("showblocks",o);s.canUndo=!1,e.config.startupOutlineBlocks&&s.setState(NEW_CKEDITOR.TRISTATE_ON),e.ui.addButton&&e.ui.addButton("ShowBlocks",{label:e.lang.showblocks.toolbar,command:"showblocks",toolbar:"tools,20"}),e.on("mode",(function(){s.state!=NEW_CKEDITOR.TRISTATE_DISABLED&&s.refresh(e)})),e.elementMode==NEW_CKEDITOR.ELEMENT_MODE_INLINE&&(e.on("focus",t),e.on("blur",t)),e.on("contentDom",(function(){s.state!=NEW_CKEDITOR.TRISTATE_DISABLED&&s.refresh(e)}))}}})}();