!function(){function e(e,t){var n,i=NEW_CKEDITOR.plugins.getPath("preview"),a=e.config,o=e.title;return n=a.baseHref?'<base href="'+a.baseHref+'">':"",a.fullPage?i=e.getData().replace(/<head>/,"$&"+n).replace(/[^>]*(?=<\/title>)/,"$& &mdash; "+o):(i=a.docType+'<html dir="'+a.contentsLangDirection+'"><head>'+n+"<title>"+o+"</title>"+NEW_CKEDITOR.tools.buildStyleHtml(a.contentsCss)+'<link rel="stylesheet" media="screen" href="'+i+'styles/screen.css"></head>',a="<body>",(o=e.document&&e.document.getBody())&&(o.getAttribute("id")&&(a=a.replace(">",' id="'+o.getAttribute("id")+'">')),o.getAttribute("class")&&(a=a.replace(">",' class="'+o.getAttribute("class")+'">'))),i=i+a+e.getData()+(t?"<script>"+(NEW_CKEDITOR.env.ie?"window.onload":"document.onreadystatechange")+" = function() { previewCallback(); } <\/script>":"")+"</body></html>"),i}NEW_CKEDITOR.plugins.add("preview",{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:"preview,preview-rtl",hidpi:!0,init:function(e){e.addCommand("preview",{modes:{wysiwyg:1},canUndo:!1,readOnly:1,exec:function(){NEW_CKEDITOR.plugins.preview.createPreview(e)}}),e.ui.addButton&&e.ui.addButton("Preview",{label:e.lang.preview.preview,command:"preview",toolbar:"document,40"})}}),NEW_CKEDITOR.plugins.preview={createPreview:function(t,n){var i,a,o,r={dataValue:e(t,n)},l=function(){var e=window.screen;return{width:Math.round(.8*e.width),height:Math.round(.7*e.height),left:Math.round(.1*e.width)}}();return i=NEW_CKEDITOR.env.ie?"javascript:void( (function(){document.open();"+("("+NEW_CKEDITOR.tools.fixDomain+")();").replace(/\/\/.*?\n/g,"").replace(/parent\./g,"window.opener.")+"document.write( window.opener._cke_htmlToLoad );document.close();window.opener._cke_htmlToLoad = null;})() )":null,!1!==t.fire("contentPreview",r)&&(i&&(window._cke_htmlToLoad=r.dataValue),a=window.open("",null,["toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes","width="+l.width,"height="+l.height,"left="+l.left].join()),o=new NEW_CKEDITOR.dom.window(a),i&&a&&(a.location=i),window._cke_htmlToLoad||((l=a.document).open(),l.write(r.dataValue),l.close()),n&&(a.previewCallback=function(){"complete"===a.document.readyState&&n(o)},a.previewCallback()),o)}}}();