File "ckeditor.min.js"

Full Path: /home/warrior1/public_html/wp-content/plugins/file-manager/libs/elFinder/js/cdn/ckeditor.min.js
File size: 638.6 KB
MIME-type: text/plain
Charset: utf-8

!function(){function e(e,t){var n=CKEDITOR.getUrl("plugins/"+t);e=e.split(",");for(var i=0;i<e.length;i++)CKEDITOR.skin.icons[e[i]]={path:n,offset:-e[++i],bgsize:e[++i]}}function t(e){function t(n){var i=!1;r.attachListener(r,"keydown",function(){var e=o.getBody().getElementsByTag(n);if(!i){for(var t=0;t<e.count();t++)e.getItem(t).setCustomData("retain",!0);i=!0}},null,null,1),r.attachListener(r,"keyup",function(){var e=o.getElementsByTag(n);i&&(1==e.count()&&!e.getItem(0).getCustomData("retain")&&CKEDITOR.tools.isEmpty(e.getItem(0).getAttributes())&&e.getItem(0).remove(1),i=!1)})}var i=this.editor;if(i&&!i.isDetached()){var o=e.document,n=o.body,a=o.getElementById("cke_actscrpt");a&&a.parentNode.removeChild(a),(a=o.getElementById("cke_shimscrpt"))&&a.parentNode.removeChild(a),(a=o.getElementById("cke_basetagscrpt"))&&a.parentNode.removeChild(a),n.contentEditable=!0,CKEDITOR.env.ie&&(n.hideFocus=!0,n.disabled=!0,n.removeAttribute("disabled")),delete this._.isLoadingData,this.$=n,o=new CKEDITOR.dom.document(o),this.setup(),this.fixInitialSelection();var r=this;CKEDITOR.env.ie&&!CKEDITOR.env.edge&&o.getDocumentElement().addClass(o.$.compatMode),CKEDITOR.env.ie&&!CKEDITOR.env.edge&&i.enterMode!=CKEDITOR.ENTER_P?t("p"):CKEDITOR.env.edge&&CKEDITOR.env.version<15&&i.enterMode!=CKEDITOR.ENTER_DIV&&t("div"),(CKEDITOR.env.webkit||CKEDITOR.env.ie&&10<CKEDITOR.env.version)&&o.getDocumentElement().on("mousedown",function(e){e.data.getTarget().is("html")&&setTimeout(function(){i.editable().focus()})}),function(n){function i(e){e.returnValue=!1}if(CKEDITOR.env.gecko)try{var e=n.document.$;e.execCommand("enableObjectResizing",!1,!n.config.disableObjectResizing),e.execCommand("enableInlineTableEditing",!1,!n.config.disableNativeTableHandles)}catch(e){}else CKEDITOR.env.ie&&CKEDITOR.env.version<11&&n.config.disableObjectResizing&&function(){var t;n.editable().attachListener(n,"selectionChange",function(){var e=n.getSelection().getSelectedElement();e&&(t&&(t.detachEvent("onresizestart",i),t=null),e.$.attachEvent("onresizestart",i),t=e.$)})}()}(i);try{i.document.$.execCommand("2D-position",!1,!0)}catch(e){}(CKEDITOR.env.gecko||CKEDITOR.env.ie&&"CSS1Compat"==i.document.$.compatMode)&&this.attachListener(this,"keydown",function(e){var t,n=e.data.getKeystroke();33!=n&&34!=n||(CKEDITOR.env.ie?setTimeout(function(){i.getSelection().scrollIntoView()},0):i.window.$.innerHeight>this.$.offsetHeight&&((t=i.createRange())[33==n?"moveToElementEditStart":"moveToElementEditEnd"](this),t.select(),e.data.preventDefault()))}),CKEDITOR.env.ie&&this.attachListener(o,"blur",function(){try{o.$.selection.empty()}catch(e){}}),CKEDITOR.env.iOS&&this.attachListener(o,"touchend",function(){e.focus()}),(n=i.document.getElementsByTag("title").getItem(0)).data("cke-title",n.getText()),CKEDITOR.env.ie&&(i.document.$.title=this._.docTitle),CKEDITOR.tools.setTimeout(function(){"unloaded"==this.status&&(this.status="ready"),i.fire("contentDom"),this._.isPendingFocus&&(i.focus(),this._.isPendingFocus=!1),setTimeout(function(){i.fire("dataReady")},0)},0,this)}}var c,u,d,o,a,r,n,i,s,l,h,f,g,m,E,O,D,p,T,C,I,R,v,b,y,K,_,k,w,N,S,x,A,L,F,P,B,M,$,H,q,U,z,V,W,j,G,X,Y,Z,J,Q,ee,te,ne,ie,oe,ae,re,se,le,ce,de,ue,he,fe,ge,me,Ee,pe,Te,Ce,Ie,Oe,De,Re,ve,be,ye,Ke,_e,ke,we,Ne,Se,xe,Ae,Le,Fe,Pe,Be,Me,$e,He,qe,Ue,ze,Ve,We,je,Ge,Xe,Ye,Ze;function Je(e){return e<=9&&(e="0"+e),String(e)}function Qe(e,t,n){this.editor=e,this.notification=null,this._message=new CKEDITOR.template(t),this._singularMessage=n?new CKEDITOR.template(n):null,this._tasks=[],this._doneTasks=this._doneWeights=this._totalWeights=0}function et(e){this._weight=e||1,this._doneWeight=0,this._isCanceled=!1}function tt(e){return e.getName&&!e.hasAttribute("data-cke-temp")}function nt(e,t){function n(e){return!t||t.contains(e)&&e.getAscendant("table",!0).equals(t)}function i(e){0<o.length||e.type!=CKEDITOR.NODE_ELEMENT||!/^(?:td|th)$/.test(e.getName())||e.getCustomData("selected_cell")||(CKEDITOR.dom.element.setMarker(a,e,"selected_cell",!0),o.push(e))}var o=[],a={};if(!e)return o;for(var r=e.getRanges(),s=0;s<r.length;s++){var l,c=r[s];if(c.collapsed)(c=c.getCommonAncestor().getAscendant({td:1,th:1},!0))&&n(c)&&o.push(c);else for((c=new CKEDITOR.dom.walker(c)).guard=i;l=c.next();)l.type==CKEDITOR.NODE_ELEMENT&&l.is(CKEDITOR.dtd.table)||(l=l.getAscendant({td:1,th:1},!0))&&!l.getCustomData("selected_cell")&&n(l)&&(CKEDITOR.dom.element.setMarker(a,l,"selected_cell",!0),o.push(l))}return CKEDITOR.dom.element.clearAllMarkers(a),o}function it(e,t){for(var n,i=(o=(s=d(e)?e:nt(e))[0]).getAscendant("table"),o=o.getDocument(),a=(e=s[0].getParent()).$.rowIndex,r=(s=s[s.length-1]).getParent().$.rowIndex+s.$.rowSpan-1,s=new CKEDITOR.dom.element(i.$.rows[r]),a=t?a:r,e=t?e:s,i=(s=CKEDITOR.tools.buildTableMap(i))[a],a=t?s[a-1]:s[a+1],s=s[0].length,o=o.createElement("tr"),r=0;i[r]&&r<s;r++)1<i[r].rowSpan&&a&&i[r]==a[r]?(n=i[r]).rowSpan+=1:((n=new CKEDITOR.dom.element(i[r]).clone()).removeAttribute("rowSpan"),n.appendBogus(),o.append(n),n=n.$),r+=n.colSpan-1;return t?o.insertBefore(e):o.insertAfter(e),o}function ot(e){for(var t=e.getParent().$.cells,n=0,i=0;i<t.length;i++){var o=t[i],n=n+o.colSpan;if(o==e.$)break}return n-1}function at(e,t){for(var n=t?1/0:0,i=0;i<e.length;i++){var o=ot(e[i]);(t?o<n:n<o)&&(n=o)}return n}function rt(e,t){for(var n=(o=d(e)?e:nt(e))[0].getAscendant("table"),i=at(o,1),o=at(o),a=t?i:o,r=CKEDITOR.tools.buildTableMap(n),n=[],i=[],o=[],s=r.length,l=0;l<s;l++){var c=t?r[l][a-1]:r[l][a+1];n.push(r[l][a]),i.push(c)}for(l=0;l<s;l++)n[l]&&(1<n[l].colSpan&&i[l]==n[l]?(r=n[l]).colSpan+=1:((r=(a=new CKEDITOR.dom.element(n[l])).clone()).removeAttribute("colSpan"),r.appendBogus(),r[t?"insertBefore":"insertAfter"].call(r,a),o.push(r),r=r.$),l+=r.rowSpan-1);return o}function st(e){var t,n,i=(e=CKEDITOR.env.webkit&&!e.isFake?function(e){var t,n,i=e.getRanges();if(1!==i.length)return e;if((i=i[0]).collapsed||0!==i.endOffset)return e;if("td"!==(n=(t=i.endContainer).getName().toLowerCase())&&"th"!==n)return e;for((n=t.getPrevious())||(n=t.getParent().getPrevious().getLast());n.type!==CKEDITOR.NODE_TEXT&&"br"!==n.getName().toLowerCase();)if(!(n=n.getLast()))return e;return i.setEndAt(n,CKEDITOR.POSITION_BEFORE_END),i.select()}(e):e).getRanges(),o=(r=nt(e))[0],a=r[r.length-1],r=o.getAscendant("table"),s=CKEDITOR.tools.buildTableMap(r),l=[];e.reset();var c=0;for(e=s.length;c<e;c++)for(var d=0,u=s[c].length;d<u;d++)void 0===t&&s[c][d]==o.$&&(t=d),s[c][d]==a.$&&(n=d);for(c=t;c<=n;c++)for(d=0;d<s.length;d++)a=s[d],o=new CKEDITOR.dom.element(r.$.rows[d]),(a=new CKEDITOR.dom.element(a[c])).$&&(1==a.$.colSpan?a.remove():--a.$.colSpan,d+=a.$.rowSpan-1,o.$.cells.length||l.push(o));return t=s[0].length-1>n?new CKEDITOR.dom.element(s[0][n+1]):t&&-1!==s[0][t-1].cellIndex?new CKEDITOR.dom.element(s[0][t-1]):new CKEDITOR.dom.element(r.$.parentNode),l.length==e&&(i[0].moveToPosition(r,CKEDITOR.POSITION_AFTER_END),i[0].select(),r.remove()),t}function lt(e,t){var n=e.getStartElement().getAscendant({td:1,th:1},!0);n&&((e=n.clone()).appendBogus(),t?e.insertBefore(n):e.insertAfter(n))}function ct(e,t){var n=e.getDocument(),i=CKEDITOR.document;CKEDITOR.env.ie&&10==CKEDITOR.env.version&&(i.focus(),n.focus()),(n=new CKEDITOR.dom.range(n))["moveToElementEdit"+(t?"End":"Start")](e)||(n.selectNodeContents(e),n.collapse(!t)),n.select(!0)}function dt(e,t,n){if(e=e[t],void 0===n)return e;for(t=0;e&&t<e.length;t++){if(n.is&&e[t]==n.$)return t;if(t==n)return new CKEDITOR.dom.element(e[t])}return n.is?-1:null}function ut(e,t,n){var i=nt(e);if((t?1!=i.length:i.length<2)||(o=e.getCommonAncestor())&&o.type==CKEDITOR.NODE_ELEMENT&&o.is("table"))return!1;var o=(e=i[0]).getAscendant("table"),a=CKEDITOR.tools.buildTableMap(o),r=a.length,s=a[0].length,l=e.getParent().$.rowIndex,c=dt(a,l,e);if(t){try{var d=parseInt(e.getAttribute("rowspan"),10)||1,u=parseInt(e.getAttribute("colspan"),10)||1,h=a["up"==t?l-d:"down"==t?l+d:l]["left"==t?c-u:"right"==t?c+u:c]}catch(e){return!1}if(!h||e.$==h)return!1;i["up"==t||"left"==t?"unshift":"push"](new CKEDITOR.dom.element(h))}t=e.getDocument();var f=l,d=h=0,g=!n&&new CKEDITOR.dom.documentFragment(t),m=0;for(t=0;t<i.length;t++){var E=(u=i[t]).getParent(),p=u.getFirst(),T=u.$.colSpan,C=u.$.rowSpan,I=dt(a,E=E.$.rowIndex,u),m=m+T*C,d=Math.max(d,I-c+T);h=Math.max(h,E-l+C),n||((C=(T=u).getBogus())&&C.remove(),T.trim(),u.getChildren().count()&&(E==f||!p||p.isBlockBoundary&&p.isBlockBoundary({br:1})||(!(f=g.getLast(CKEDITOR.dom.walker.whitespaces(!0)))||f.is&&f.is("br")||g.append("br")),u.moveChildren(g)),t?u.remove():u.setHtml("")),f=E}if(n)return h*d==m;for(g.moveChildren(e),e.appendBogus(),s<=d?e.removeAttribute("rowSpan"):e.$.rowSpan=h,r<=h?e.removeAttribute("colSpan"):e.$.colSpan=d,t=(i=(n=new CKEDITOR.dom.nodeList(o.$.rows)).count())-1;0<=t;t--)(o=n.getItem(t)).$.cells.length||(o.remove(),i++);return e}function ht(e,t){e=nt(e);if(1<e.length)return!1;if(t)return!0;var n=(r=(e=e[0]).getParent()).getAscendant("table"),i=dt(s=CKEDITOR.tools.buildTableMap(n),l=r.$.rowIndex,e);if(1<(t=e.$.rowSpan)){for(var o,a=Math.ceil(t/2),t=Math.floor(t/2),r=l+a,n=new CKEDITOR.dom.element(n.$.rows[r]),s=dt(s,r),r=e.clone(),l=0;l<s.length;l++){if((o=s[l]).parentNode==n.$&&i<l){r.insertBefore(new CKEDITOR.dom.element(o));break}o=null}o||n.append(r)}else for(t=a=1,(n=r.clone()).insertAfter(r),n.append(r=e.clone()),o=dt(s,l),i=0;i<o.length;i++)o[i].rowSpan++;return r.appendBogus(),e.$.rowSpan=a,r.$.rowSpan=t,1==a&&e.removeAttribute("rowSpan"),1==t&&r.removeAttribute("rowSpan"),r}function ft(e,t){var n=nt(e);if(1<n.length)return!1;if(t)return!0;var e=(n=n[0]).getParent(),i=e.getAscendant("table"),o=dt(i=CKEDITOR.tools.buildTableMap(i),e.$.rowIndex,n);if(1<(t=n.$.colSpan))e=Math.ceil(t/2),t=Math.floor(t/2);else{for(var t=e=1,a=[],r=0;r<i.length;r++){var s=i[r];a.push(s[o]),1<s[o].rowSpan&&(r+=s[o].rowSpan-1)}for(i=0;i<a.length;i++)a[i].colSpan++}return(i=n.clone()).insertAfter(n),i.appendBogus(),n.$.colSpan=e,i.$.colSpan=t,1==e&&n.removeAttribute("colSpan"),1==t&&i.removeAttribute("colSpan"),i}function gt(s){return{editorFocus:!1,canUndo:!1,modes:{wysiwyg:1},exec:function(e){if(e.editable().hasFocus){var t,n=e.getSelection();if(t=new CKEDITOR.dom.elementPath(n.getCommonAncestor(),n.root).contains({td:1,th:1},1)){n=e.createRange();if((o=CKEDITOR.tools.tryThese(function(){var e=t.getParent().$.cells[t.$.cellIndex+(s?-1:1)];return e.parentNode.parentNode,e},function(){var e=t.getParent();return(e=e.getAscendant("table").$.rows[e.$.rowIndex+(s?-1:1)]).cells[s?e.cells.length-1:0]}))||s){if(!o)return!0;o=new CKEDITOR.dom.element(o),n.moveToElementEditStart(o),n.checkStartOfBlock()&&n.checkEndOfBlock()||n.selectNodeContents(o)}else{for(var i=t.getAscendant("table").$,o=t.getParent().$.cells,i=new CKEDITOR.dom.element(i.insertRow(-1),e.document),a=0,r=o.length;a<r;a++)i.append(new CKEDITOR.dom.element(o[a],e.document).clone(!1,!1)).appendBogus();n.moveToElementEditStart(i)}return n.select(!0),!0}}return!1}}}function mt(e,n){var i,t,o=0;if(!CKEDITOR.tools.array.isArray(e)||0===e.length)return!0;if(0<(i=CKEDITOR.tools.array.filter(e,function(e){return-1===CKEDITOR.tools.array.indexOf(s,e)})).length)for(t=0;t<i.length;t++)!function(t){CKEDITOR.scriptLoader.queue(t,function(e){e&&s.push(t),++o===i.length&&n()})}(i[t]);return 0===i.length}function Et(){if(!CKEDITOR.env.ie||"file:"!=location.protocol)try{return new XMLHttpRequest}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}return null}function pt(e,t){if(4!=e.readyState||!(200<=e.status&&e.status<300||304==e.status||0===e.status||1223==e.status))return null;switch(t){case"text":return e.responseText;case"xml":var n=e.responseXML;return new CKEDITOR.xml(n&&n.firstChild?n:e.responseText);case"arraybuffer":return e.response;default:return null}}function Tt(e,t,n){var i=!!t,o=Et();return o?(i&&"text"!==n&&"xml"!==n&&(o.responseType=n),o.open("GET",e,i),i&&(o.onreadystatechange=function(){4==o.readyState&&(t(pt(o,n)),o=null)}),o.send(null),i?"":pt(o,n)):null}function Ct(e){if(!e||e.type!=CKEDITOR.NODE_ELEMENT||"form"!=e.getName())return[];for(var t=[],n=["style","className"],i=0;i<n.length;i++){var o=e.$.elements.namedItem(n[i]);o&&(o=new CKEDITOR.dom.element(o),t.push([o,o.nextSibling]),o.remove())}return t}function It(e,t){if(e&&e.type==CKEDITOR.NODE_ELEMENT&&"form"==e.getName()&&0<t.length)for(var n=t.length-1;0<=n;n--){var i=t[n][0],o=t[n][1];o?i.insertBefore(o):i.appendTo(e)}}function Ot(e,t){var n=Ct(e),i={},e=e.$;return t||(i.class=e.className||"",e.className=""),i.inline=e.style.cssText||"",t||(e.style.cssText="position: static; overflow: visible"),It(n),i}function Dt(e,t){var n=Ct(e),e=e.$;"class"in t&&(e.className=t.class),"inline"in t&&(e.style.cssText=t.inline),It(n)}function Rt(e){if(!e.editable().isInline()){var t,n=CKEDITOR.instances;for(t in n){var i=n[t];"wysiwyg"!=i.mode||i.readOnly||((i=i.document.getBody()).setAttribute("contentEditable",!1),i.setAttribute("contentEditable",!0))}e.editable().hasFocus&&(e.toolbox.focus(),e.focus())}}function vt(e,t){var n=g.exec(e),e=g.exec(t);if(n){if(!n[2]&&"px"==e[2])return e[1];if("px"==n[2]&&!e[2])return e[1]+"px"}return t}function bt(e,t){if((t=t||e.getSelection().getSelectedElement())&&t.is("img")&&!t.data("cke-realelement")&&!t.isReadOnly())return t}function yt(e){var t=e.getStyle("float");return t=(t="inherit"==t||"none"==t?0:t)||e.getAttribute("align")}function Kt(e,t){var n,i=[];if(!t)return e;for(n in t)i.push(n+"="+encodeURIComponent(t[n]));return e+(-1!=e.indexOf("?")?"&":"?")+i.join("&")}function _t(e){return(e+="").charAt(0).toUpperCase()+e.substr(1)}function kt(){var e=(n=this.getDialog()).getParentEditor();e._.filebrowserSe=this;var t=e.config["filebrowser"+_t(n.getName())+"WindowWidth"]||e.config.filebrowserWindowWidth||"80%",n=e.config["filebrowser"+_t(n.getName())+"WindowHeight"]||e.config.filebrowserWindowHeight||"70%",i=this.filebrowser.params||{};i.CKEditor=e.name,i.CKEditorFuncNum=e._.filebrowserFn,i.langCode||(i.langCode=e.langCode),i=Kt(this.filebrowser.url,i),e.popup(i,t,n,e.config.filebrowserWindowFeatures||e.config.fileBrowserWindowFeatures)}function wt(){var e=this.getDialog();return e.getParentEditor()._.filebrowserSe=this,!(!e.getContentElement(this.for[0],this.for[1]).getInputElement().$.value||!e.getContentElement(this.for[0],this.for[1]).getAction())}function Nt(a,e,t,n){if(n&&n.length)for(var i=n.length;i--;){var r,s;"hbox"!=(d=n[i]).type&&"vbox"!=d.type&&"fieldset"!=d.type||Nt(a,e,t,d.children),d.filebrowser&&("string"==typeof d.filebrowser&&(d.filebrowser={action:"fileButton"==d.type?"QuickUpload":"Browse",target:d.filebrowser}),"Browse"==d.filebrowser.action?(void 0!==(r=d.filebrowser.url)||void 0===(r=a.config["filebrowser"+_t(e)+"BrowseUrl"])&&(r=a.config.filebrowserBrowseUrl),r&&(d.onClick=kt,d.filebrowser.url=r,d.hidden=!1)):"QuickUpload"==d.filebrowser.action&&d.for&&(void 0===(r=d.filebrowser.url)&&(void 0===(r=a.config["filebrowser"+_t(e)+"UploadUrl"])&&(r=a.config.filebrowserUploadUrl)),r)&&(s=d.onClick,d.onClick=function(e){var t,n=e.sender,i=n.getDialog().getContentElement(this.for[0],this.for[1]).getInputElement(),o=CKEDITOR.fileTools&&CKEDITOR.fileTools.isFileUploadSupported;return(!s||!1!==s.call(n,e))&&(!!wt.call(n,e)&&("form"!==a.config.filebrowserUploadMethod&&o?((e=a.uploadRepository.create(i.$.files[0])).on("uploaded",function(e){var t=e.sender.responseData;xt.call(e.sender.editor,t.url,t.message)}),e.on("error",St.bind(this)),e.on("abort",St.bind(this)),e.loadAndUpload(!(t=r).match(/command=QuickUpload/)||t.match(/(\?|&)responseType=json/)?t:Kt(t,{responseType:"json"})),"xhr"):(t=i,(i=new CKEDITOR.dom.element(t.$.form))&&((t=i.$.elements.ckCsrfToken)?t=new CKEDITOR.dom.element(t):((t=new CKEDITOR.dom.element("input")).setAttributes({name:"ckCsrfToken",type:"hidden"}),i.append(t)),t.setAttribute("value",CKEDITOR.tools.getCsrfToken())),!0)))},d.filebrowser.url=r,d.hidden=!1,o=a,l=t.getContents(d.for[0]).get(d.for[1]),c=d.filebrowser,d=void 0,(d=c.params||{}).CKEditor=o.name,d.CKEditorFuncNum=o._.filebrowserFn,d.langCode||(d.langCode=o.langCode),l.action=Kt(c.url,d),l.filebrowser=c))}var o,l,c,d}function St(e){var t={};try{t=JSON.parse(e.sender.xhr.response)||{}}catch(e){}this.enable(),alert((t.error||e.sender).message)}function xt(e,t){var n=this._.filebrowserSe.getDialog(),i=this._.filebrowserSe.for,o=this._.filebrowserSe.filebrowser.onSelect;i&&n.getContentElement(i[0],i[1]).reset(),"function"==typeof t&&!1===t.call(this._.filebrowserSe)||o&&!1===o.call(this._.filebrowserSe,e,t)||("string"==typeof t&&t&&alert(t),e&&(n=(i=this._.filebrowserSe).getDialog(),i=i.filebrowser.target||null)&&(i=i.split(":"),(o=n.getContentElement(i[0],i[1]))&&(o.setValue(e),n.selectPage(i[0]))))}function At(e,i){var o={},a=[],r={nbsp:" ",shy:"­",gt:">",lt:"<",amp:"&",apos:"'",quot:'"'};if(e=(e=e.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(e,t){var n=i?"&"+t+";":r[t];return o[n]=i?r[t]:"&"+t+";",a.push(n),""})).replace(/,$/,""),!i&&e){e=e.split(",");var t,n=document.createElement("div");for(n.innerHTML="&"+e.join(";&")+";",t=n.innerHTML,n=null,n=0;n<t.length;n++){var s=t.charAt(n);o[s]="&"+e[n]+";",a.push(s)}}return o.regex=a.join(i?"|":""),o}function Lt(u){for(var h,f=this,g=this.database,m=this.context,e=((e=u.getSelection())&&e.getRanges()).createIterator();h=e.getNextRange();){for(var t,n=h.getCommonAncestor();n&&(n.type!=CKEDITOR.NODE_ELEMENT||!m[n.getName()]);){if(u.editable().equals(n)){n=!1;break}n=n.getParent()}if(n||(n=h.startPath().contains(m))&&h.setEndAt(n,CKEDITOR.POSITION_BEFORE_END),n||(t=h.getEnclosedNode())&&t.type==CKEDITOR.NODE_ELEMENT&&t.getName()in m&&(h.setStartAt(t,CKEDITOR.POSITION_AFTER_START),h.setEndAt(t,CKEDITOR.POSITION_BEFORE_END),n=t),n&&h.startContainer.type==CKEDITOR.NODE_ELEMENT&&h.startContainer.getName()in m&&((t=new CKEDITOR.dom.walker(h)).evaluator=Ft,h.startContainer=t.next()),n&&h.endContainer.type==CKEDITOR.NODE_ELEMENT&&h.endContainer.getName()in m&&((t=new CKEDITOR.dom.walker(h)).evaluator=Ft,h.endContainer=t.previous()),n)return function(e){for(var t=h.startContainer,n=h.endContainer;t&&!t.getParent().equals(e);)t=t.getParent();for(;n&&!n.getParent().equals(e);)n=n.getParent();if(!t||!n)return!1;for(var i=[],o=!1;!o;)t.equals(n)&&(o=!0),i.push(t),t=t.getNext();if(i.length<1)return!1;for(t=e.getParents(!0),n=0;n<t.length;n++)if(t[n].getName&&m[t[n].getName()]){e=t[n];break}for(var a,t=f.isIndent?1:-1,n=i[0],i=i[i.length-1],r=(o=CKEDITOR.plugins.list.listToArray(e,g))[i.getCustomData("listarray_index")].indent,n=n.getCustomData("listarray_index");n<=i.getCustomData("listarray_index");n++)if(o[n].indent+=t,0<t){for(var s=o[n].parent,l=n-1;0<=l;l--)if(o[l].indent===t){s=o[l].parent;break}o[n].parent=new CKEDITOR.dom.element(s.getName(),s.getDocument())}for(n=i.getCustomData("listarray_index")+1;n<o.length&&o[n].indent>r;n++)o[n].indent+=t;if(t=CKEDITOR.plugins.list.arrayToList(o,g,null,u.config.enterMode,e.getDirection()),!f.isIndent&&(a=e.getParent())&&a.is("li"))for(var c,d=[],n=(i=t.listNode.getChildren()).count()-1;0<=n;n--)(c=i.getItem(n))&&c.is&&c.is("li")&&d.push(c);if(t&&t.listNode.replace(e),d&&d.length)for(n=0;n<d.length;n++){for(c=e=d[n];(c=c.getNext())&&c.is&&c.getName()in m;)CKEDITOR.env.needsNbspFiller&&!e.getFirst(Pt)&&e.append(h.document.createText(" ")),e.append(c);e.insertAfter(a)}return t&&u.fire("contentDomInvalidated"),!0}(n)}return 0}function Ft(e){return e.type==CKEDITOR.NODE_ELEMENT&&e.is("li")}function Pt(e){return p(e)&&T(e)}function Bt(t,e){var n,i;e.on("refresh",function(e){var t,n=[R];for(t in e.data.states)n.push(e.data.states[t]);this.setState(CKEDITOR.tools.search(n,v)?v:R)},e,null,100),e.on("exec",function(e){n=t.getSelection(),i=n.createBookmarks(1),e.data||(e.data={}),e.data.done=!1},e,null,0),e.on("exec",function(){t.forceNextSelectionCheck(),n.selectBookmarks(i)},e,null,100)}function Mt(e,t,n){return t.type||(t.type="auto"),!(n&&!1===e.fire("beforePaste",t)||!t.dataValue&&t.dataTransfer.isEmpty())&&(t.dataValue||(t.dataValue=""),CKEDITOR.env.gecko&&"drop"==t.method&&e.toolbox&&e.once("afterPaste",function(){e.toolbox.focus()}),e.fire("paste",t))}function $t(h){function e(){var e,t,n=h.editable();CKEDITOR.plugins.clipboard.isCustomCopyCutSupported&&(n.on("copy",e=function(e){h.getSelection().isCollapsed()||(h.readOnly&&"cut"==e.name||f.initPasteDataTransfer(e,h),e.data.preventDefault())}),n.on("cut",e),n.on("cut",function(){h.readOnly||h.extractSelectedHtml()},null,null,999)),n.on(f.mainPasteEvent,function(e){"beforepaste"==f.mainPasteEvent&&g||l(e)}),"beforepaste"==f.mainPasteEvent&&(n.on("paste",function(e){m||(r(),e.data.preventDefault(),l(e),s("paste"))}),n.on("contextmenu",i,null,null,0),n.on("beforepaste",function(e){!e.data||e.data.$.ctrlKey||e.data.$.shiftKey||i()},null,null,0)),n.on("beforecut",function(){g||o()}),n.attachListener(CKEDITOR.env.ie?n:h.document.getDocumentElement(),"mouseup",function(){t=setTimeout(c,0)}),h.on("destroy",function(){clearTimeout(t)}),n.on("keyup",c)}function t(e){return{type:e,canUndo:"cut"==e,startDisabled:!0,fakeKeystroke:"cut"==e?CKEDITOR.CTRL+88:CKEDITOR.CTRL+67,exec:function(){var t;"cut"==this.type&&o();var e=this.type;if(CKEDITOR.env.ie)t=s(e);else try{t=h.document.$.execCommand(e,!1,null)}catch(e){t=!1}return t||h.showNotification(h.lang.clipboard[this.type+"Error"]),t}}}function r(){m=1,setTimeout(function(){m=0},100)}function i(){g=1,setTimeout(function(){g=0},10)}function s(e){function t(){o=!0}var n=h.document,i=n.getBody(),o=!1;return i.on(e,t),(7<CKEDITOR.env.version?n.$:n.$.selection.createRange()).execCommand(e),i.removeListener(e,t),o}function o(){var e,t,n,i;!CKEDITOR.env.ie||CKEDITOR.env.quirks||(e=h.getSelection()).getType()==CKEDITOR.SELECTION_ELEMENT&&(t=e.getSelectedElement())&&(n=e.getRanges()[0],(i=h.document.createText("")).insertBefore(t),n.setStartBefore(i),n.setEndAfter(t),e.selectRanges([n]),setTimeout(function(){t.getParent()&&(i.remove(),e.selectElement(t))},0))}function a(e,t){function n(e){e.cancel()}var i,o,a,r,s,l,c,d=h.document,u=h.editable();d.getById("cke_pastebin")||(o=h.getSelection(),a=o.createBookmarks(),CKEDITOR.env.ie&&o.root.fire("selectionchange"),(r=new CKEDITOR.dom.element(!CKEDITOR.env.webkit&&!u.is("body")||CKEDITOR.env.ie?"div":"body",d)).setAttributes({id:"cke_pastebin","data-cke-temp":"1"}),s=0,d=d.getWindow(),CKEDITOR.env.webkit?(u.append(r),r.addClass("cke_editable"),u.is("body")||(s=(s="static"!=u.getComputedStyle("position")?u:CKEDITOR.dom.element.get(u.$.offsetParent)).getDocumentPosition().y)):u.getAscendant(CKEDITOR.env.ie?"body":"html",1).append(r),r.setStyles({position:"absolute",top:d.getScrollPosition().y-s+10+"px",width:"1px",height:Math.max(1,d.getViewPaneSize().height-20)+"px",overflow:"hidden",margin:0,padding:0}),CKEDITOR.env.safari&&r.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","text")),(s=r.getParent().isReadOnly())?(r.setOpacity(0),r.setAttribute("contenteditable",!0)):r.setStyle("ltr"==h.config.contentsLangDirection?"left":"right","-10000px"),h.on("selectionChange",n,null,null,0),(CKEDITOR.env.webkit||CKEDITOR.env.gecko)&&(i=u.once("blur",n,null,null,-100)),s&&r.focus(),(s=new CKEDITOR.dom.range(r)).selectNodeContents(r),l=s.select(),CKEDITOR.env.ie&&(i=u.once("blur",function(){h.lockSelection(l)})),c=CKEDITOR.document.getWindow().getScrollPosition().y,setTimeout(function(){var e;CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=c),i&&i.removeListener(),CKEDITOR.env.ie&&u.focus(),o.selectBookmarks(a),r.remove(),CKEDITOR.env.webkit&&(e=r.getFirst())&&e.is&&e.hasClass("Apple-style-span")&&(r=e),h.removeListener("selectionChange",n),t(r.getHtml())},0))}function n(e){if("wysiwyg"==h.mode)switch(e.data.keyCode){case CKEDITOR.CTRL+86:case CKEDITOR.SHIFT+45:e=h.editable(),r(),"paste"==f.mainPasteEvent&&e.fire("beforepaste");break;case CKEDITOR.CTRL+88:case CKEDITOR.SHIFT+46:h.fire("saveSnapshot"),setTimeout(function(){h.fire("saveSnapshot")},50)}}function l(e){var t={type:"auto",method:"paste",dataTransfer:f.initPasteDataTransfer(e)};t.dataTransfer.cacheData();var n=!1!==h.fire("beforePaste",t);n&&f.canClipboardApiBeTrusted(t.dataTransfer,h)?(e.data.preventDefault(),setTimeout(function(){Mt(h,t)},0)):a(0,function(e){t.dataValue=e.replace(/<span[^>]+data-cke-bookmark[^<]*?<\/span>/gi,""),n&&Mt(h,t)})}function c(){var e;"wysiwyg"==h.mode&&(e=d("paste"),h.getCommand("cut").setState(d("cut")),h.getCommand("copy").setState(d("copy")),h.getCommand("paste").setState(e),h.fire("pasteState",e))}function d(e){var t=(t=h.getSelection())&&t.getRanges()[0];return(h.readOnly||t&&t.checkReadOnly())&&e in{paste:1,cut:1}?CKEDITOR.TRISTATE_DISABLED:"paste"==e?CKEDITOR.TRISTATE_OFF:(t=(e=h.getSelection()).getRanges(),e.getType()==CKEDITOR.SELECTION_NONE||1==t.length&&t[0].collapsed?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF)}var u,f=CKEDITOR.plugins.clipboard,g=0,m=0;function E(e,t,n,i,o){var a=h.lang.clipboard[t];h.addCommand(t,n),h.ui.addButton&&h.ui.addButton(e,{label:a,command:t,toolbar:"clipboard,"+i}),h.addMenuItems&&h.addMenuItem(t,{label:a,command:t,group:"clipboard",order:o})}h.on("key",n),h.on("contentDom",e),h.on("selectionChange",c),h.contextMenu&&(h.contextMenu.addListener(function(){return{cut:d("cut"),copy:d("copy"),paste:d("paste")}}),u=null,h.on("menuShow",function(){u&&(u.removeListener(),u=null);var e=h.contextMenu.findItemByCommandName("paste");e&&e.element&&(u=e.element.on("touchend",function(){h._.forcePasteDialog=!0}))})),h.ui.addButton&&h.once("instanceReady",function(){h._.pasteButtons&&CKEDITOR.tools.array.forEach(h._.pasteButtons,function(e){(e=h.ui.get(e))&&(e=CKEDITOR.document.getById(e._.id))&&e.on("touchend",function(){h._.forcePasteDialog=!0})})}),E("Cut","cut",t("cut"),10,1),E("Copy","copy",t("copy"),20,4),E("Paste","paste",{canUndo:!1,async:!0,fakeKeystroke:CKEDITOR.CTRL+86,exec:function(n,e){function t(e,t){t=void 0===t||t,e?(e.method="paste",e.dataTransfer||(e.dataTransfer=f.initPasteDataTransfer()),Mt(n,e,t)):o&&!n._.forcePasteDialog&&n.showNotification(s,"info",n.config.clipboard_notificationDuration),n._.forcePasteDialog=!1,n.fire("afterCommandExec",{name:"paste",command:i,returnValue:!!e})}var i=this,o=void 0===(e=null!=e?e:{}).notification||e.notification,a=e.type,r=CKEDITOR.tools.keystrokeToString(n.lang.common.keyboard,n.getCommandKeystroke(this)),s="string"==typeof o?o:n.lang.clipboard.pasteNotification.replace(/%1/,'<kbd aria-label="'+r.aria+'">'+r.display+"</kbd>"),r="string"==typeof e?e:e.dataValue;a&&!0!==n.config.forcePasteAsPlainText&&"allow-word"!==n.config.forcePasteAsPlainText?n._.nextPasteType=a:delete n._.nextPasteType,"string"==typeof r?t({dataValue:r}):n.getClipboardData(t)}},30,8),h._.pasteButtons||(h._.pasteButtons=[]),h._.pasteButtons.push("Paste"),h.getClipboardData=function(e,t){function n(e){e.removeListener(),e.cancel(),t(e.data)}function i(e){e.removeListener(),e.cancel(),t({type:a,dataValue:e.data.dataValue,dataTransfer:e.data.dataTransfer,method:"paste"})}var o=!1,a="auto";t||(t=e,e=null),h.on("beforePaste",function(e){e.removeListener(),o=!0,a=e.data.type},null,null,1e3),h.on("paste",n,null,null,0),!1===function(){if("paste"==f.mainPasteEvent)return h.fire("beforePaste",{type:"auto",method:"paste"}),!1;h.focus(),r();var e=h.focusManager;return e.lock(),h.editable().fire(f.mainPasteEvent)&&!s("paste")?(e.unlock(),!1):(e.unlock(),!0)}()&&(h.removeListener("paste",n),h._.forcePasteDialog&&o&&h.fire("pasteDialog")?(h.on("pasteDialogCommit",i),h.on("dialogHide",function(e){e.removeListener(),e.data.removeListener("pasteDialogCommit",i),e.data._.committed||t(null)})):t(null))}}function Ht(e,t){function n(e){return CKEDITOR.tools.repeat("</p><p>",~~(e/2))+(1==e%2?"<br>":"")}return(t=(t=t.replace(/(?!\u3000)\s+/g," ").replace(/> +</g,"><").replace(/<br ?\/>/gi,"<br>")).replace(/<\/?[A-Z]+>/g,function(e){return e.toLowerCase()})).match(/^[^<]$/)||(CKEDITOR.env.webkit&&-1<t.indexOf("<div>")&&(t=(t=(t=(t=t.replace(/^(<div>(<br>|)<\/div>)(?!$|(<div>(<br>|)<\/div>))/g,"<br>").replace(/^(<div>(<br>|)<\/div>){2}(?!$)/g,"<div></div>")).match(/<div>(<br>|)<\/div>/)?"<p>"+t.replace(/(<div>(<br>|)<\/div>)+/g,function(e){return n(e.split("</div><div>").length+1)})+"</p>":t).replace(/<\/div><div>/g,"<br>")).replace(/<\/?div>/g,"")),!CKEDITOR.env.gecko||e.enterMode==CKEDITOR.ENTER_BR||-1<(t=CKEDITOR.env.gecko?t.replace(/^<br><br>$/,"<br>"):t).indexOf("<br><br>")&&(t="<p>"+t.replace(/(<br>){2,}/g,function(e){return n(e.length/4)})+"</p>"),t=t,(e=e).enterMode==CKEDITOR.ENTER_BR?t=t.replace(/(<\/p><p>)+/g,function(e){return CKEDITOR.tools.repeat("<br>",e.length/7*2)}).replace(/<\/?p>/g,""):e.enterMode==CKEDITOR.ENTER_DIV&&(t=t.replace(/<(\/)?p>/g,"<$1div>"))),t}function qt(t){var n={};return{get:function(e){return"plain-text"==e?n.plainText||(n.plainText=new CKEDITOR.filter(t,"br")):"semantic-content"==e?((e=n.semanticContent)||((e=new CKEDITOR.filter(t,{})).allow({$1:{elements:function(){var e,t={};for(e in CKEDITOR.dtd)"$"!=e.charAt(0)&&"div"!=e&&"span"!=e&&(t[e]=1);return t}(),attributes:!0,styles:!1,classes:!1}}),e=n.semanticContent=e),e):e?new CKEDITOR.filter(t,e):null}}}function Ut(e,t,n){t=CKEDITOR.htmlParser.fragment.fromHtml(t);var i=new CKEDITOR.htmlParser.basicWriter;return n.applyTo(t,!0,!1,e.activeEnterMode),t.writeHtml(i),i.getHtml()}function zt(e){e.data.preventDefault(),e.data.$.dataTransfer.dropEffect="none"}function Vt(r){var s=CKEDITOR.plugins.clipboard;r.on("contentDom",function(){function i(e,t,n){var i={$:e.data.$,target:e.data.getTarget()};t&&(i.dragRange=t),n&&(i.dropRange=n),!1===r.fire(e.name,i)&&e.data.preventDefault()}function t(e){return(e=e.type!=CKEDITOR.NODE_ELEMENT?e.getParent():e).getChildCount()}var e=r.editable(),n=CKEDITOR.plugins.clipboard.getDropTarget(r),o=r.ui.space("top"),a=r.ui.space("bottom");s.preventDefaultDropOnElement(o),s.preventDefaultDropOnElement(a),e.attachListener(n,"dragstart",i),e.attachListener(r,"dragstart",s.resetDragDataTransfer,s,null,1),e.attachListener(r,"dragstart",function(e){s.initDragDataTransfer(e,r)},null,null,2),e.attachListener(r,"dragstart",function(){var e=s.dragRange=r.getSelection().getRanges()[0];CKEDITOR.env.ie&&CKEDITOR.env.version<10&&(s.dragStartContainerChildCount=e?t(e.startContainer):null,s.dragEndContainerChildCount=e?t(e.endContainer):null)},null,null,100),e.attachListener(n,"dragend",i),e.attachListener(r,"dragend",s.initDragDataTransfer,s,null,1),e.attachListener(r,"dragend",s.resetDragDataTransfer,s,null,100),e.attachListener(n,"dragover",function(e){var t;(CKEDITOR.env.edge||(t=e.data.getTarget())&&t.is&&t.is("html")||CKEDITOR.env.ie&&CKEDITOR.plugins.clipboard.isFileApiSupported&&e.data.$.dataTransfer.types.contains("Files"))&&e.data.preventDefault()}),e.attachListener(n,"drop",function(e){var t,n;e.data.$.defaultPrevented||(e.data.preventDefault(),r.readOnly)||(!(t=e.data.getTarget()).isReadOnly()||t.type==CKEDITOR.NODE_ELEMENT&&t.is("html"))&&(t=s.getRangeAtDropPosition(e,r),n=s.dragRange,t&&i(e,n,t))},null,null,9999),e.attachListener(r,"drop",s.initDragDataTransfer,s,null,1),e.attachListener(r,"drop",function(e){var t,n,i,o;(e=e.data)&&(t=e.dropRange,n=e.dragRange,(i=e.dataTransfer).getTransferType(r)==CKEDITOR.DATA_TRANSFER_INTERNAL?setTimeout(function(){s.internalDrop(n,t,i,r)},0):i.getTransferType(r)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?(e=n,o=i,t.select(),Mt(r,{dataTransfer:o,method:"drop"},1),o.sourceEditor.fire("saveSnapshot"),o.sourceEditor.editable().extractHtmlFromRange(e),o.sourceEditor.getSelection().selectRanges([e]),o.sourceEditor.fire("saveSnapshot")):(o=i,t.select(),Mt(r,{dataTransfer:o,method:"drop"},1),s.resetDragDataTransfer()))},null,null,9999)})}function Wt(e,t){CKEDITOR.tools.extend(this,t,{editor:e,id:"cke-"+CKEDITOR.tools.getUniqueId(),area:e._.notificationArea}),t.type||(this.type="info"),this.element=this._createElement(),e.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(this.element)}function jt(e){var t=this;this.editor=e,this.notifications=[],this.element=this._createElement(),this._uiBuffer=CKEDITOR.tools.eventsBuffer(10,this._layout,this),this._changeBuffer=CKEDITOR.tools.eventsBuffer(500,this._layout,this),e.on("destroy",function(){t._removeListeners(),t.element.remove()})}function Gt(e,t){return Yt(e)?e=Math.round(t*(parseFloat(e)/100)):"string"==typeof e&&e.match(/^\d+$/gm)&&(e=parseInt(e,10)),e}function Xt(e,t){return Yt(e)?e=t*(parseFloat(e)/100):"string"==typeof e&&e.match(/^\d?\.\d+/gm)&&(e=parseFloat(e)),e}function Yt(e){return"string"==typeof e&&e.match(/^((\d*\.\d+)|(\d+))%{1}$/gm)}function Zt(e,t,n){return!isNaN(e)&&t<=e&&e<=n}function Jt(e){return 1==(e=e.toString(16)).length?"0"+e:e}function Qt(e){var t,n=e.editor,i=e.data.path,o=i.blockLimit,a=e.data.selection,r=a.getRanges()[0];(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)&&(a=function(e,t){if(e.isFake)return 0;e=t.block||t.blockLimit,t=e&&e.getLast(tn);return!e||!e.isBlockBoundary()||t&&t.type==CKEDITOR.NODE_ELEMENT&&t.isBlockBoundary()||e.is("pre")||e.getBogus()?void 0:e}(a,i))&&(a.appendBogus(),t=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.edge&&n._.previousActive),nn(n,i.block,o)&&r.collapsed&&!r.getCommonAncestor().isReadOnly()&&((i=r.clone()).enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),(o=new CKEDITOR.dom.walker(i)).guard=function(e){return!tn(e)||e.type==CKEDITOR.NODE_COMMENT||e.isReadOnly()},!o.checkForward()||i.checkStartOfBlock()&&i.checkEndOfBlock())&&(n=r.fixBlock(!0,n.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p"),CKEDITOR.env.needsBrFiller||(n=n.getFirst(tn))&&n.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(n.getText()).match(/^(?:&nbsp;|\xa0)$/)&&n.remove(),t=1,e.cancel()),t&&r.select()}function en(e){var t=e.data.getTarget();t.is("input")&&("submit"!=(t=t.getAttribute("type"))&&"reset"!=t||e.data.preventDefault())}function tn(e){return S(e)&&x(e)}function nn(e,t,n){return!1!==e.config.autoParagraph&&e.activeEnterMode!=CKEDITOR.ENTER_BR&&(e.editable().equals(n)&&!t||t&&"true"==t.getAttribute("contenteditable"))}function on(e){return e.activeEnterMode!=CKEDITOR.ENTER_BR&&!1!==e.config.autoParagraph&&(e.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p")}function an(e){e&&e.isEmptyInlineRemoveable()&&e.remove()}function rn(e){var t=e.editor;t.getSelection().scrollIntoView(),setTimeout(function(){t.fire("saveSnapshot")},0)}function sn(e,t,n){var i=e.getCommonAncestor(t);for(t=e=n?t:e;(e=e.getParent())&&!i.equals(e)&&1==e.getChildCount();)t=e;t.remove()}function ln(e){return e.type==CKEDITOR.NODE_ELEMENT}function cn(e){return ln(e.startContainer)&&e.startContainer.getChild(e.startOffset-1)}function dn(e){return e&&ln(e)&&(e.is(q.$removeEmpty)||e.is("a")&&!e.isBlockBoundary())}function un(e){return(e=new CKEDITOR.dom.walker(e)).guard=function(e,t){return!t&&(e.type==CKEDITOR.NODE_ELEMENT?e.is(CKEDITOR.dtd.$tableContent):void 0)},e.evaluator=function(e){return e.type==CKEDITOR.NODE_ELEMENT},e}function hn(e,t,n){return t=e.getDocument().createElement(t),e.append(t,n),t}function fn(e){for(var t,n=e.count();0<n--;)t=e.getItem(n),CKEDITOR.tools.trim(t.getHtml())||(t.appendBogus(),CKEDITOR.env.ie&&CKEDITOR.env.version<9&&t.getChildCount()&&t.getFirst().remove())}function gn(e){return(e=new CKEDITOR.dom.walker(e)).guard=function(e,t){return!t&&(e.type==CKEDITOR.NODE_ELEMENT?e.is(CKEDITOR.dtd.$list)||e.is(CKEDITOR.dtd.$listItem):void 0)},e.evaluator=function(e){return e.type==CKEDITOR.NODE_ELEMENT&&e.is(CKEDITOR.dtd.$listItem)},e}function mn(e,t){var n=e.getParent();n.is(CKEDITOR.dtd.$inline)&&e[t?"insertBefore":"insertAfter"](n)}function En(e,t,n){mn(t),mn(n,1);for(var i;i=n.getNext();)i.insertAfter(t),t=i;A(e)&&e.remove()}function pn(e,t){e=new CKEDITOR.dom.range(e);return e.setStartAfter(t.startNode),e.setEndBefore(t.endNode),e}function Tn(o){var a,r=[],e=new CKEDITOR.dom.walker(o),s=o.startPath().contains(W),l=o.endPath().contains(W),c={};return e.guard=function(e,t){if(e.type==CKEDITOR.NODE_ELEMENT){if(e.getCustomData(i="visited_"+(t?"out":"in")))return;CKEDITOR.dom.element.setMarker(c,e,i,1)}var n,i;t&&s&&e.equals(s)?((a=o.clone()).setEndAt(s,CKEDITOR.POSITION_BEFORE_END),r.push(a)):!t&&l&&e.equals(l)?((a=o.clone()).setStartAt(l,CKEDITOR.POSITION_AFTER_START),r.push(a)):(i=!(i=(i=!t)?e.type==CKEDITOR.NODE_ELEMENT&&e.is(W)&&(!s||Cn(e,s))&&(!l||Cn(e,l)):i)&&(i=t)?e.is(W)?(i=s&&s.getAscendant("table",!0),n=l&&l.getAscendant("table",!0),t=e.getAscendant("table",!0),i&&i.contains(t)||n&&n.contains(t)):void 0:i)&&((a=o.clone()).selectNodeContents(e),r.push(a))},e.lastForward(),CKEDITOR.dom.element.clearAllMarkers(c),r}function Cn(e,t){var n=CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED,t=e.getPosition(t);return t!==CKEDITOR.POSITION_IDENTICAL&&0==(t&n)}function In(s,e,t,l){if(!(s=CKEDITOR.editor._getEditorElement(s)))return null;var c=new CKEDITOR.editor(e,s,l);return l==CKEDITOR.ELEMENT_MODE_REPLACE&&(s.setStyle("visibility","hidden"),c._.required=s.hasAttribute("required"),s.removeAttribute("required")),t&&c.setData(t,null,!0),c.on("loaded",function(){var e,t,n,i,o,a,r;c.isDestroyed()||c.isDetached()||(t=(e=c).name,n=e.element,i=e.elementMode,o=e.fire("uiSpace",{space:"top",html:""}).html,a=e.fire("uiSpace",{space:"bottom",html:""}).html,r=new CKEDITOR.template('<{outerEl} id="cke_{name}" class="{id} cke cke_reset cke_chrome cke_editor_{name} cke_{langDir} '+CKEDITOR.env.cssClass+'"  dir="{langDir}" lang="{langCode}" role="application"'+(e.title?' aria-labelledby="cke_{name}_arialbl"':"")+">"+(e.title?'<span id="cke_{name}_arialbl" class="cke_voice_label">{voiceLabel}</span>':"")+'<{outerEl} class="cke_inner cke_reset" role="presentation">{topHtml}<{outerEl} id="{contentId}" class="cke_contents cke_reset" role="presentation"></{outerEl}>{bottomHtml}</{outerEl}></{outerEl}>'),t=CKEDITOR.dom.element.createFromHtml(r.output({id:e.id,name:t,langDir:e.lang.dir,langCode:e.langCode,voiceLabel:e.title,topHtml:o?'<span id="'+e.ui.spaceId("top")+'" class="cke_top cke_reset_all" role="presentation" style="height:auto">'+o+"</span>":"",contentId:e.ui.spaceId("contents"),bottomHtml:a?'<span id="'+e.ui.spaceId("bottom")+'" class="cke_bottom cke_reset_all" role="presentation">'+a+"</span>":"",outerEl:CKEDITOR.env.ie?"span":"div"})),i==CKEDITOR.ELEMENT_MODE_REPLACE?(n.hide(),t.insertAfter(n)):n.append(t),e.container=t,e.ui.contentsElement=e.ui.space("contents"),o&&e.ui.space("top").unselectable(),a&&e.ui.space("bottom").unselectable(),n=e.config.width,i=e.config.height,n&&t.setStyle("width",CKEDITOR.tools.cssLength(n)),i&&e.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(i)),t.disableContextMenu(),CKEDITOR.env.webkit&&t.on("focus",function(){e.focus()}),e.fireOnce("uiReady"),l==CKEDITOR.ELEMENT_MODE_REPLACE&&c.config.autoUpdateElement&&s.$.form&&c._attachToForm(),c.setMode(c.config.startupMode,function(){c.resetDirty(),c.status="ready",c.fireOnce("instanceReady"),CKEDITOR.fire("instanceReady",null,c)}))}),c.on("destroy",On),c}function On(){var e=this.container,t=this.element;e&&(e.clearCustomData(),e.remove()),t&&(t.clearCustomData(),this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(t.show(),this._.required&&t.setAttribute("required","required")),delete this.element)}function Dn(e,t){return(e=e[0])<(t=t[0])?-1:t<e?1:0}function Rn(){this.rules=[]}function vn(e,t,n,i){var o,a;for(o in t)(a=e[o])||(a=e[o]=new Rn),a.add(t[o],n,i)}function bn(e){return!e.attributes["data-cke-survive"]&&("a"==e.name&&e.attributes.href||CKEDITOR.dtd.$removeEmpty[e.name])}function yn(){var e;(e=ne[0])&&this.load(e.scriptUrl,e.callback,CKEDITOR,0)}function Kn(e){var t=(e=e.data).getKeystroke(),n=this.keystrokes[t],i=this._.editor;return(ae=!(ae=!1===i.fire("key",{keyCode:t,domEvent:e}))?(ae=n?!1!==i.execCommand(n,{from:"keystrokeHandler"}):ae)||!!this.blockedKeystrokes[t]:ae)&&e.preventDefault(!0),!ae}function _n(e){ae&&(ae=!1,e.data.preventDefault(!0))}function kn(e){arguments.length<1||(this.range=e,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function wn(e,t,n,i){e:{null==i&&(a=[],n.forEach(function(e){if("true"==e.getAttribute("contenteditable"))return a.push(e),!1},CKEDITOR.NODE_ELEMENT,!0),i=a);for(var o;o=i.shift();)if(o.getDtd().p){i={element:o,remaining:i};break e}i=null}var a;return i?(o=CKEDITOR.filter.instances[i.element.data("cke-filter")])&&!o.check(t)?wn(e,t,n,i.remaining):((t=new CKEDITOR.dom.range(i.element)).selectNodeContents(i.element),(t=t.createIterator()).enlargeBr=e.enlargeBr,t.enforceRealBlocks=e.enforceRealBlocks,t.activeFilter=t.filter=o,e._.nestedEditable={element:i.element,container:n,remaining:i.remaining,iterator:t},1):0}function Nn(e,t,n){return!!t&&((e=e.clone()).collapse(!n),e.checkBoundaryOfElement(t,n?CKEDITOR.START:CKEDITOR.END))}function Sn(e){return se(e)&&le(e)}function xn(e){e.collapsed=e.startContainer&&e.endContainer&&e.startContainer.equals(e.endContainer)&&e.startOffset==e.endOffset}function An(e,t,n,i,a){function o(e,t,n,i){var o=n?e.getPrevious():e.getNext();return i&&r||(l||i?t.append(e.clone(!0,a),n):(e.remove(),s&&t.append(e,n))),o}e.optimizeBookmark();var r=0===t,s=1==t,l=2==t;t=l||s;var c,d,u,h,f,g,m,E,p=e.startContainer,T=e.endContainer,C=e.startOffset,I=e.endOffset;if(l&&T.type==CKEDITOR.NODE_TEXT&&(p.equals(T)||p.type===CKEDITOR.NODE_ELEMENT&&p.getFirst().equals(T)))n.append(e.document.createText(T.substring(C,I)));else{T.type==CKEDITOR.NODE_TEXT?l?g=!0:T=T.split(I):0<T.getChildCount()?I>=T.getChildCount()?(T=T.getChild(I-1),d=!0):T=T.getChild(I):h=d=!0,p.type==CKEDITOR.NODE_TEXT?l?f=!0:p.split(C):0<p.getChildCount()?0===C?(p=p.getChild(C),c=!0):p=p.getChild(C-1):u=c=!0;for(var O,D,R,v=p.getParents(),b=T.getParents(),y=function(){for(var e,t,n=Math.min(v.length,b.length),i=0;i<n;i++)if(e=v[i],t=b[i],!e.equals(t))return i;return i-1}(),K=v.length-1,_=b.length-1,k=n,w=-1,N=y;N<=K;N++){for(R=(D=v[N]).getNext(),N!=K||D.equals(b[N])&&K<_?t&&(O=k.append(D.clone(0,a))):c?o(D,k,!1,u):f&&k.append(e.document.createText(D.substring(C)));R;){if(R.equals(b[N])){w=N;break}R=o(R,k)}k=O}for(k=n,N=y;N<=_;N++)if(R=(n=b[N]).getPrevious(),n.equals(v[N]))t&&(k=k.getChild(0));else{if(N!=_||n.equals(v[N])&&_<K?t&&(O=k.append(n.clone(0,a))):d?o(n,k,!1,h):g&&k.append(e.document.createText(n.substring(0,I))),w<N)for(;R;)R=o(R,k,!0);k=O}l||(m=y-1,E=u&&h&&!p.equals(T),m<K-1||m<_-1||E?(E?e.moveToPosition(T,CKEDITOR.POSITION_BEFORE_START):_==m+1&&d?e.moveToPosition(b[m],CKEDITOR.POSITION_BEFORE_END):e.moveToPosition(b[m+1],CKEDITOR.POSITION_BEFORE_START),i&&(m=v[m+1])&&m.type==CKEDITOR.NODE_ELEMENT&&((E=CKEDITOR.dom.element.createFromHtml('<span data-cke-bookmark="1" style="display:none">&nbsp;</span>',e.document)).insertAfter(m),m.mergeSiblings(!1),e.moveToBookmark({startNode:E}))):e.collapse(!0))}}function Ln(){var t=!1,n=CKEDITOR.dom.walker.whitespaces(),i=CKEDITOR.dom.walker.bookmark(!0),o=CKEDITOR.dom.walker.bogus();return function(e){return!(!i(e)&&!n(e))||(o(e)&&!t?t=!0:!(e.type==CKEDITOR.NODE_TEXT&&(e.hasAscendant("pre")||CKEDITOR.tools.trim(e.getText()).length)||e.type==CKEDITOR.NODE_ELEMENT&&!e.is(fe)))}}function Fn(e){return function(){var t;return this[e?"getPreviousNode":"getNextNode"](function(e){return!t&&pe(e)&&(t=e),Ee(e)&&!(ge(e)&&e.equals(t))})}}function Pn(e,t){for(;e;){if(e.type==CKEDITOR.NODE_ELEMENT){if("false"==e.getAttribute("contentEditable")&&!e.data("cke-editable"))return;if(e.is("html")||"true"==e.getAttribute("contentEditable")&&(e.contains(t)||e.equals(t)))break}e=e.getParent()}return 1}function Bn(e){var t=e.container,n=e.offset,i=t,o=n;if((i=i.type!=CKEDITOR.NODE_ELEMENT||0===o||o==i.getChildCount()?0:i.getChild(o-1).type==CKEDITOR.NODE_TEXT&&i.getChild(o).type==CKEDITOR.NODE_TEXT)&&(n=(t=t.getChild(n-1)).getLength()),t.type==CKEDITOR.NODE_ELEMENT&&0<n){e:{for(i=t;n--;)if(0<=(o=i.getChild(n).getIndex(!0))){n=o;break e}n=-1}n+=1}if(t.type==CKEDITOR.NODE_TEXT){for(i=t,o=0;(i=i.getPrevious())&&i.type==CKEDITOR.NODE_TEXT;)o+=i.getText().replace(CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE,"").length;i=o,t.isEmpty()?(o=t.getPrevious(he),i?(n=i,t=o?o.getNext():t.getParent().getFirst()):(t=t.getParent(),n=o?o.getIndex(!0)+1:0)):n+=i}e.container=t,e.offset=n}function Mn(e,t){var n=t.getCustomData("cke-fillingChar");n&&(t=e.container,n.equals(t)&&(e.offset-=CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE.length,e.offset<=0&&(e.offset=t.getIndex(),e.container=t.getParent())))}function $n(e,t,n){this._minInterval=e,this._context=n,this._lastOutput=this._scheduledTimer=0,this._output=CKEDITOR.tools.bind(t,n||{});var i=this;this.input=function(){function e(){i._lastOutput=(new Date).getTime(),i._scheduledTimer=0,i._call()}var t;i._scheduledTimer&&!1===i._reschedule()||((t=(new Date).getTime()-i._lastOutput)<i._minInterval?i._scheduledTimer=setTimeout(e,i._minInterval-t):e())}}function Hn(e,t,n){$n.call(this,e,t,n),this._args=[];var i=this;this.input=CKEDITOR.tools.override(this.input,function(e){return function(){i._args=Array.prototype.slice.call(arguments),e.call(this)}})}function qn(e,t){return"#"==t[0]?String.fromCharCode(parseInt(t.slice(1),10)):Ue[t]}function Un(e){var t=zn(this);return t[e]||(t[e]=new Vn(e))}function zn(e){return(e=e.getPrivate&&e.getPrivate()||e._||(e._={})).events||(e.events={})}function Vn(e){this.name=e,this.listeners=[]}function Wn(){ze=1}function jn(){Ve=1}function Gn(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded",Gn,!1),window.removeEventListener("load",Gn,!1),Xn()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",Gn),window.detachEvent("onload",Gn),Xn())}catch(e){}}function Xn(){for(var e;e=je.shift();)e()}window.CKEDITOR&&window.CKEDITOR.dom||(window.CKEDITOR||(window.CKEDITOR=(Xe=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,Ye={timestamp:"L4KA",version:"4.16.1 (Standard)",revision:"cae20318d4",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:Xe},status:"unloaded",basePath:function(){var e=window.CKEDITOR_BASEPATH||"";if(!e)for(var t=document.getElementsByTagName("script"),n=0;n<t.length;n++){var i=t[n].src.match(Xe);if(i){e=i[1];break}}if(!(e=-1==e.indexOf(":/")&&"//"!=e.slice(0,2)?0===e.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+e:location.href.match(/^[^\?]*\/(?:)/)[0]+e: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(e){return-1==e.indexOf(":/")&&0!==e.indexOf("/")&&(e=this.basePath+e),this.timestamp&&"/"!=e.charAt(e.length-1)&&!/[&?]t=/.test(e)&&(e+=(0<=e.indexOf("?")?"&":"?")+"t="+this.timestamp),e},domReady:(je=[],function(e){if(je.push(e),"complete"===document.readyState&&setTimeout(Gn,1),1==je.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",Gn,!1),window.addEventListener("load",Gn,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",Gn),window.attachEvent("onload",Gn),e=!1;try{e=!window.frameElement}catch(e){}document.documentElement.doScroll&&e&&function t(){try{document.documentElement.doScroll("left")}catch(e){return void setTimeout(t,1)}Gn()}()}})},(Ze=window.CKEDITOR_GETURL)&&(Ge=Ye.getUrl,Ye.getUrl=function(e){return Ze.call(Ye,e)||Ge.call(Ye,e)}),Ye)),We={},CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(e){var t,n=CKEDITOR.event.prototype;for(t in n)null==e[t]&&(e[t]=n[t])},CKEDITOR.event.prototype=(Vn.prototype={getListenerIndex:function(e){for(var t=0,n=this.listeners;t<n.length;t++)if(n[t].fn==e)return t;return-1}},{define:function(e,t){e=Un.call(this,e);CKEDITOR.tools.extend(e,t,!0)},on:function(o,a,r,s,e){function t(e,t,n,i){return!(e={name:o,sender:this,editor:e,data:t,listenerData:s,stop:n,cancel:i,removeListener:l})===a.call(r,e)?We:e.data}function l(){n.removeListener(o,a)}var n=this,i=Un.call(this,o);if(i.getListenerIndex(a)<0){i=i.listeners,r=r||this,isNaN(e)&&(e=10),t.fn=a,t.priority=e;for(var c=i.length-1;0<=c;c--)if(i[c].priority<=e)return i.splice(c+1,0,t),{removeListener:l};i.unshift(t)}return{removeListener:l}},once:function(){var e=Array.prototype.slice.call(arguments),t=e[1];return e[1]=function(e){return e.removeListener(),t.apply(this,arguments)},this.on.apply(this,e)},capture:function(){CKEDITOR.event.useCapture=1;var e=this.on.apply(this,arguments);return CKEDITOR.event.useCapture=0,e},fire:(Ve=ze=0,function(e,t,n){var i=zn(this)[e];e=ze;var o=Ve;if((ze=Ve=0,i)&&(r=i.listeners).length)for(var a,r=r.slice(0),s=0;s<r.length;s++){if(i.errorProof)try{a=r[s].call(this,n,t,Wn,jn)}catch(e){}else a=r[s].call(this,n,t,Wn,jn);if(a===We?Ve=1:void 0!==a&&(t=a),ze||Ve)break}return t=!Ve&&(void 0===t||t),ze=e,Ve=o,t}),fireOnce:function(e,t,n){return t=this.fire(e,t,n),delete zn(this)[e],t},removeListener:function(e,t){e=zn(this)[e];!e||0<=(t=e.getListenerIndex(t))&&e.listeners.splice(t,1)},removeAllListeners:function(){var e,t=zn(this);for(e in t)delete t[e]},hasListeners:function(e){return(e=zn(this)[e])&&0<e.listeners.length}})),CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]),CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(e,t){return e in{instanceReady:1,loaded:1}&&(this[e]=!0),CKEDITOR.event.prototype.fire.call(this,e,t,this)},CKEDITOR.editor.prototype.fireOnce=function(e,t){return e in{instanceReady:1,loaded:1}&&(this[e]=!0),CKEDITOR.event.prototype.fireOnce.call(this,e,t,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)),CKEDITOR.env||(CKEDITOR.env=function(){var e=navigator.userAgent.toLowerCase(),t=e.match(/edge[ \/](\d+.?\d*)/),n=-1<e.indexOf("trident/");(n={ie:n=!(!t&&!n),edge:!!t,webkit:!n&&-1<e.indexOf(" applewebkit/"),air:-1<e.indexOf(" adobeair/"),mac:-1<e.indexOf("macintosh"),quirks:"BackCompat"==document.compatMode&&(!document.documentMode||document.documentMode<10),mobile:-1<e.indexOf("mobile"),iOS:/(ipad|iphone|ipod)/.test(e),isCustomDomain:function(){if(!this.ie)return!1;var e=document.domain,t=window.location.hostname;return e!=t&&e!="["+t+"]"},secure:"https:"==location.protocol}).gecko="Gecko"==navigator.product&&!n.webkit&&!n.ie,n.webkit&&(-1<e.indexOf("chrome")?n.chrome=!0:n.safari=!0);var i=0;return n.ie&&(i=t?parseFloat(t[1]):n.quirks||!document.documentMode?parseFloat(e.match(/msie (\d+)/)[1]):document.documentMode,n.ie9Compat=9==i,n.ie8Compat=8==i,n.ie7Compat=7==i,n.ie6Compat=i<7||n.quirks),n.gecko&&(t=e.match(/rv:([\d\.]+)/))&&(i=1e4*(t=t[1].split("."))[0]+100*(t[1]||0)+ +(t[2]||0)),n.air&&(i=parseFloat(e.match(/ adobeair\/(\d+)/)[1])),n.webkit&&(i=parseFloat(e.match(/ applewebkit\/(\d+)/)[1])),n.version=i,n.isCompatible=!(n.ie&&i<7||n.gecko&&i<4e4||n.webkit&&i<534),n.hidpi=2<=window.devicePixelRatio,n.needsBrFiller=n.gecko||n.webkit||n.ie&&10<i,n.needsNbspFiller=n.ie&&i<11,n.cssClass="cke_browser_"+(n.ie?"ie":n.gecko?"gecko":n.webkit?"webkit":"unknown"),n.quirks&&(n.cssClass+=" cke_browser_quirks"),n.ie&&(n.cssClass+=" cke_browser_ie"+(n.quirks?"6 cke_browser_iequirks":n.version)),n.air&&(n.cssClass+=" cke_browser_air"),n.iOS&&(n.cssClass+=" cke_browser_ios"),n.hidpi&&(n.cssClass+=" cke_hidpi"),n}()),"unloaded"==CKEDITOR.status&&(CKEDITOR.event.implementOn(CKEDITOR),CKEDITOR.loadFullCore=function(){var e;"basic_ready"!=CKEDITOR.status?CKEDITOR.loadFullCore._load=1:(delete CKEDITOR.loadFullCore,(e=document.createElement("script")).type="text/javascript",e.src=CKEDITOR.basePath+"ckeditor.js",document.getElementsByTagName("head")[0].appendChild(e))},CKEDITOR.loadFullCoreTimeout=0,CKEDITOR.add=function(e){(this._.pending||(this._.pending=[])).push(e)},CKEDITOR.domReady(function(){var e=CKEDITOR.loadFullCore,t=CKEDITOR.loadFullCoreTimeout;e&&(CKEDITOR.status="basic_ready",e&&e._load?e():t&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},1e3*t))}),CKEDITOR.status="basic_loaded"),CKEDITOR.VERBOSITY_WARN=1,CKEDITOR.VERBOSITY_ERROR=2,CKEDITOR.verbosity=CKEDITOR.VERBOSITY_WARN|CKEDITOR.VERBOSITY_ERROR,CKEDITOR.warn=function(e,t){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:e,additionalData:t})},CKEDITOR.error=function(e,t){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log",{type:"error",errorCode:e,additionalData:t})},CKEDITOR.on("log",function(e){var t,n;window.console&&window.console.log&&(t=console[e.data.type]?e.data.type:"log",n=e.data.errorCode,(e=e.data.additionalData)?console[t]("[CKEDITOR] Error code: "+n+".",e):console[t]("[CKEDITOR] Error code: "+n+"."),console[t]("[CKEDITOR] For more information about this error go to https://ckeditor.com/docs/ckeditor4/latest/guide/dev_errors.html#"+n))},null,null,999),CKEDITOR.dom={},Fe=[],Pe=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",Be=/&/g,Me=/>/g,$e=/</g,He=/"/g,qe=/&(lt|gt|amp|quot|nbsp|shy|#\d{1,5});/g,Ue={lt:"<",gt:">",amp:"&",quot:'"',nbsp:" ",shy:"­"},CKEDITOR.on("reset",function(){Fe=[]}),CKEDITOR.tools={arrayCompare:function(e,t){if(!e&&!t)return!0;if(!e||!t||e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0},getIndex:function(e,t){for(var n=0;n<e.length;++n)if(t(e[n]))return n;return-1},clone:function(e){if(e&&e instanceof Array){for(var t=[],n=0;n<e.length;n++)t[n]=CKEDITOR.tools.clone(e[n]);return t}if(null===e||"object"!=typeof e||e instanceof String||e instanceof Number||e instanceof Boolean||e instanceof Date||e instanceof RegExp||e.nodeType||e.window===e)return e;for(n in t=new e.constructor,e)t[n]=CKEDITOR.tools.clone(e[n]);return t},capitalize:function(e,t){return e.charAt(0).toUpperCase()+(t?e.slice(1):e.slice(1).toLowerCase())},extend:function(t){var n,i,e=arguments.length;"boolean"==typeof(n=arguments[e-1])?e--:"boolean"==typeof(n=arguments[e-2])&&(i=arguments[e-1],e-=2);for(var o=1;o<e;o++){var a=arguments[o]||{};CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(a),function(e){!0!==n&&null!=t[e]||(!i||e in i)&&(t[e]=a[e])})}return t},prototypedCopy:function(e){function t(){}return t.prototype=e,new t},copy:function(e){var t,n={};for(t in e)n[t]=e[t];return n},isArray:function(e){return"[object Array]"==Object.prototype.toString.call(e)},isEmpty:function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},cssVendorPrefix:function(e,t,n){return n?Pe+e+":"+t+";"+e+":"+t:((n={})[e]=t,n[Pe+e]=t,n)},cssStyleToDomStyle:(Ae=document.createElement("div").style,Le=void 0!==Ae.cssFloat?"cssFloat":void 0!==Ae.styleFloat?"styleFloat":"float",function(e){return"float"==e?Le:e.replace(/-./g,function(e){return e.substr(1).toUpperCase()})}),buildStyleHtml:function(e){e=[].concat(e);for(var t,n=[],i=0;i<e.length;i++)(t=e[i])&&(/@import|[{}]/.test(t)?n.push("<style>"+t+"</style>"):n.push('<link type="text/css" rel=stylesheet href="'+t+'">'));return n.join("")},htmlEncode:function(e){return null==e?"":String(e).replace(Be,"&amp;").replace(Me,"&gt;").replace($e,"&lt;")},htmlDecode:function(e){return e.replace(qe,qn)},htmlEncodeAttr:function(e){return CKEDITOR.tools.htmlEncode(e).replace(He,"&quot;")},htmlDecodeAttr:function(e){return CKEDITOR.tools.htmlDecode(e)},transformPlainTextToHtml:function(e,t){var n,i,o=t==CKEDITOR.ENTER_BR,a=(a=this.htmlEncode(e.replace(/\r\n/g,"\n"))).replace(/\t/g,"&nbsp;&nbsp; &nbsp;"),e=t==CKEDITOR.ENTER_P?"p":"div";return o||(t=/\n{2}/g).test(a)&&(i="</"+e+">",a=(n="<"+e+">")+a.replace(t,function(){return i+n})+i),a=a.replace(/\n/g,"<br>"),(a=(a=!o?a.replace(new RegExp("<br>(?=</"+e+">)"),function(e){return CKEDITOR.tools.repeat(e,2)}):a).replace(/^ | $/g,"&nbsp;")).replace(/(>|\s) /g,function(e,t){return t+"&nbsp;"}).replace(/ (?=<)/g,"&nbsp;")},getNextNumber:(xe=0,function(){return++xe}),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var e="e",t=0;t<8;t++)e+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return e},override:function(e,t){t=t(e);return t.prototype=e.prototype,t},setTimeout:function(e,t,n,i,o){return o=o||window,n=n||o,o.setTimeout(function(){i?e.apply(n,[].concat(i)):e.apply(n)},t||0)},throttle:function(e,t,n){return new this.buffers.throttle(e,t,n)},trim:(Se=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,function(e){return e.replace(Se,"")}),ltrim:(Ne=/^[ \t\n\r]+/g,function(e){return e.replace(Ne,"")}),rtrim:(we=/[ \t\n\r]+$/g,function(e){return e.replace(we,"")}),indexOf:function(e,t){if("function"==typeof t){for(var n=0,i=e.length;n<i;n++)if(t(e[n]))return n}else{if(e.indexOf)return e.indexOf(t);for(n=0,i=e.length;n<i;n++)if(e[n]===t)return n}return-1},search:function(e,t){t=CKEDITOR.tools.indexOf(e,t);return 0<=t?e[t]:null},bind:function(e,t){var n=Array.prototype.slice.call(arguments,2);return function(){return e.apply(t,n.concat(Array.prototype.slice.call(arguments)))}},createClass:function(e){var i,t=e.$,n=e.base,o=e.privates||e._,a=e.proto;return e=e.statics,t=t||function(){n&&this.base.apply(this,arguments)},o&&(i=t,t=function(){var e,t=this._||(this._={});for(e in o){var n=o[e];t[e]="function"==typeof n?CKEDITOR.tools.bind(n,this):n}i.apply(this,arguments)}),n&&(t.prototype=this.prototypedCopy(n.prototype),(t.prototype.constructor=t).base=n,t.baseProto=n.prototype,t.prototype.base=function e(){this.base=n.prototype.base,n.apply(this,arguments),this.base=e}),a&&this.extend(t.prototype,a,!0),e&&this.extend(t,e,!0),t},addFunction:function(e,t){return Fe.push(function(){return e.apply(t||this,arguments)})-1},removeFunction:function(e){Fe[e]=null},callFunction:function(e){var t=Fe[e];return t&&t.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:(ke=/^-?\d+\.?\d*px$/,function(e){return _e=CKEDITOR.tools.trim(e+"")+"px",ke.test(_e)?_e:e||""}),convertToPx:function(e){if(Ke||(Ke=CKEDITOR.dom.element.createFromHtml('<div style="position:absolute;left:-9999px;top:-9999px;margin:0px;padding:0px;border:0px;"></div>',CKEDITOR.document),CKEDITOR.document.getBody().append(Ke)),/%$/.test(e))return e;var t=parseFloat(e)<0;return t&&(e=e.replace("-","")),Ke.setStyle("width",e),e=Ke.$.clientWidth,t?-e:e},repeat:function(e,t){return Array(t+1).join(e)},tryThese:function(){for(var e,t=0,n=arguments.length;t<n;t++){var i=arguments[t];try{e=i();break}catch(e){}}return e},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(n){return function(){var e=arguments,t=this;window.setTimeout(function(){n.apply(t,e)},0)}},normalizeCssText:function(e,t){var n,i=[],o=CKEDITOR.tools.parseCssText(e,!0,t);for(n in o)i.push(n+":"+o[n]);return i.sort(),i.length?i.join(";")+";":""},convertRgbToHex:function(e){return e.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,function(e,t,n,i){for(e=[t,n,i],t=0;t<3;t++)e[t]=("0"+parseInt(e[t],10).toString(16)).slice(-2);return"#"+e.join("")})},normalizeHex:function(e){return e.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi,function(e,t,n,i){return"#"+(e=3==(e=t.toLowerCase()).length?[(e=e.split(""))[0],e[0],e[1],e[1],e[2],e[2]].join(""):e)+i})},_isValidColorFormat:function(e){return!!e&&(e=e.replace(/\s+/g,""),/^[a-z0-9()#%,./]+$/i.test(e))},parseCssText:function(e,i,t){var o={};return(e=(e=t?new CKEDITOR.dom.element("span").setAttribute("style",e).getAttribute("style")||"":e)&&CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(e)))&&";"!=e&&e.replace(/&quot;/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(e,t,n){i&&("font-family"==(t=t.toLowerCase())&&(n=n.replace(/\s*,\s*/g,",")),n=CKEDITOR.tools.trim(n)),o[t]=n}),o},writeCssText:function(e,t){var n,i=[];for(n in e)i.push(n+":"+e[n]);return t&&i.sort(),i.join("; ")},objectCompare:function(e,t,n){if(!e&&!t)return!0;if(!e||!t)return!1;for(var i in e)if(e[i]!=t[i])return!1;if(!n)for(i in t)if(e[i]!=t[i])return!1;return!0},objectKeys:function(e){return CKEDITOR.tools.object.keys(e)},convertArrayToObject:function(e,t){var n={};1==arguments.length&&(t=!0);for(var i=0,o=e.length;i<o;++i)n[e[i]]=t;return n},getStyledSpans:function(t,e){var n=CKEDITOR.env.ie&&8==CKEDITOR.env.version?t.toUpperCase():t,n=e.find("span[style*="+n+"]").toArray();return CKEDITOR.tools.array.filter(n,function(e){return!!e.getStyle(t)})},fixDomain:function(){for(var t;;)try{t=window.parent.document.domain;break}catch(e){if(!(t=t?t.replace(/.+?(?:\.|$)/,""):document.domain))break;document.domain=t}return!!t},eventsBuffer:function(e,t,n){return new this.buffers.event(e,t,n)},enableHtml5Elements:function(e,t){for(var n,i="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(" "),o=i.length;o--;)n=e.createElement(i[o]),t&&e.appendChild(n)},checkIfAnyArrayItemMatches:function(e,t){for(var n=0,i=e.length;n<i;++n)if(e[n].match(t))return!0;return!1},checkIfAnyObjectPropertyMatches:function(e,t){for(var n in e)if(n.match(t))return!0;return!1},keystrokeToString:function(e,t){t=this.keystrokeToArray(e,t);return t.display=t.display.join("+"),t.aria=t.aria.join("+"),t},keystrokeToArray:function(e,t){var n=16711680&t,i=65535&t,o=CKEDITOR.env.mac,a=[],t=[];return n&CKEDITOR.CTRL&&(a.push(o?"⌘":e[17]),t.push(o?e[224]:e[17])),n&CKEDITOR.ALT&&(a.push(o?"⌥":e[18]),t.push(e[18])),n&CKEDITOR.SHIFT&&(a.push(o?"⇧":e[16]),t.push(e[16])),i&&(e[i]?(a.push(e[i]),t.push(e[i])):(a.push(String.fromCharCode(i)),t.push(String.fromCharCode(i)))),{display:a,aria:t}},transparentImageData:"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==",getCookie:function(e){e=e.toLowerCase();for(var t,n=document.cookie.split(";"),i=0;i<n.length;i++)if(t=n[i].split("="),decodeURIComponent(CKEDITOR.tools.trim(t[0]).toLowerCase())===e)return decodeURIComponent(1<t.length?t[1]:"");return null},setCookie:function(e,t){document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+";path=/"},getCsrfToken:function(){if(!(e=CKEDITOR.tools.getCookie("ckCsrfToken"))||40!=e.length){var e=[],t="";if(window.crypto&&window.crypto.getRandomValues)e=new Uint8Array(40),window.crypto.getRandomValues(e);else for(var n=0;n<40;n++)e.push(Math.floor(256*Math.random()));for(n=0;n<e.length;n++)var i="abcdefghijklmnopqrstuvwxyz0123456789".charAt(e[n]%36),t=t+(.5<Math.random()?i.toUpperCase():i);e=t,CKEDITOR.tools.setCookie("ckCsrfToken",e)}return e},escapeCss:function(e){return e?window.CSS&&CSS.escape?CSS.escape(e):isNaN(parseInt(e.charAt(0),10))?e:"\\3"+e.charAt(0)+" "+e.substring(1,e.length):""},getMouseButton:function(e){return!!(e=e&&e.data?e.data.$:e)&&CKEDITOR.tools.normalizeMouseButton(e.button)},normalizeMouseButton:function(e,t){if(!CKEDITOR.env.ie||9<=CKEDITOR.env.version&&!CKEDITOR.env.ie6Compat)return e;for(var n=[[CKEDITOR.MOUSE_BUTTON_LEFT,1],[CKEDITOR.MOUSE_BUTTON_MIDDLE,4],[CKEDITOR.MOUSE_BUTTON_RIGHT,2]],i=0;i<n.length;i++){var o=n[i];if(o[0]===e&&t)return o[1];if(!t&&o[1]===e)return o[0]}},convertHexStringToBytes:function(e){for(var t=[],n=e.length/2,i=0;i<n;i++)t.push(parseInt(e.substr(2*i,2),16));return t},convertBytesToBase64:function(e){for(var t="",n=e.length,i=0;i<n;i+=3){var o,a=e.slice(i,i+3),r=a.length,s=[];if(r<3)for(o=r;o<3;o++)a[o]=0;for(s[0]=(252&a[0])>>2,s[1]=(3&a[0])<<4|a[1]>>4,s[2]=(15&a[1])<<2|(192&a[2])>>6,s[3]=63&a[2],o=0;o<4;o++)t=o<=r?t+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(s[o]):t+"="}return t},style:{parse:{_borderStyle:"none hidden dotted dashed solid double groove ridge inset outset".split(" "),_widthRegExp:/^(thin|medium|thick|[\+-]?\d+(\.\d+)?[a-z%]+|[\+-]?0+(\.0+)?|\.\d+[a-z%]+)$/,_rgbaRegExp:/rgba?\(\s*\d+%?\s*,\s*\d+%?\s*,\s*\d+%?\s*(?:,\s*[0-9.]+\s*)?\)/gi,_hslaRegExp:/hsla?\(\s*[0-9.]+\s*,\s*\d+%\s*,\s*\d+%\s*(?:,\s*[0-9.]+\s*)?\)/gi,background:function(t){var e={},n=this._findColor(t);return n.length&&(e.color=n[0],CKEDITOR.tools.array.forEach(n,function(e){t=t.replace(e,"")})),(t=CKEDITOR.tools.trim(t))&&(e.unprocessed=t),e},margin:function(e){return CKEDITOR.tools.style.parse.sideShorthand(e,function(e){return e.match(/(?:\-?[\.\d]+(?:%|\w*)|auto|inherit|initial|unset|revert)/g)||["0px"]})},sideShorthand:function(e,t){function n(e){i.top=o[e[0]],i.right=o[e[1]],i.bottom=o[e[2]],i.left=o[e[3]]}var i={},o=t?t(e):e.split(/\s+/);switch(o.length){case 1:n([0,0,0,0]);break;case 2:n([0,1,0,1]);break;case 3:n([0,1,2,1]);break;case 4:n([0,1,2,3])}return i},border:function(e){return CKEDITOR.tools.style.border.fromCssRule(e)},_findColor:function(e){var t=[],n=CKEDITOR.tools.array;return(t=(t=t.concat(e.match(this._rgbaRegExp)||[])).concat(e.match(this._hslaRegExp)||[])).concat(n.filter(e.split(/\s+/),function(e){return!!e.match(/^\#[a-f0-9]{3}(?:[a-f0-9]{3})?$/gi)||e.toLowerCase()in CKEDITOR.tools.style.parse._colors}))}}},array:{filter:function(n,i,o){var a=[];return this.forEach(n,function(e,t){i.call(o,e,t,n)&&a.push(e)}),a},find:function(e,t,n){for(var i=e.length,o=0;o<i;){if(t.call(n,e[o],o,e))return e[o];o++}},forEach:function(e,t,n){for(var i=e.length,o=0;o<i;o++)t.call(n,e[o],o,e)},map:function(e,t,n){for(var i=[],o=0;o<e.length;o++)i.push(t.call(n,e[o],o,e));return i},reduce:function(e,t,n,i){for(var o=0;o<e.length;o++)n=t.call(i,n,e[o],o,e);return n},every:function(e,t,n){return!e.length||(t=this.filter(e,t,n),e.length===t.length)},some:function(e,t,n){for(var i=0;i<e.length;i++)if(t.call(n,e[i],i,e))return!0;return!1},zip:function(e,n){return CKEDITOR.tools.array.map(e,function(e,t){return[e,n[t]]})},unique:function(n){return this.filter(n,function(e,t){return t===CKEDITOR.tools.array.indexOf(n,e)})}},object:{DONT_ENUMS:"toString toLocaleString valueOf hasOwnProperty isPrototypeOf propertyIsEnumerable constructor".split(" "),entries:function(t){return CKEDITOR.tools.array.map(CKEDITOR.tools.object.keys(t),function(e){return[e,t[e]]})},values:function(t){return CKEDITOR.tools.array.map(CKEDITOR.tools.object.keys(t),function(e){return t[e]})},keys:function(e){var t,n=Object.prototype.hasOwnProperty,i=[],o=CKEDITOR.tools.object.DONT_ENUMS;if(CKEDITOR.env.ie&&CKEDITOR.env.version<9&&(!e||"object"!=typeof e)){if(n=[],"string"==typeof e)for(i=0;i<e.length;i++)n.push(String(i));return n}for(t in e)i.push(t);if(CKEDITOR.env.ie&&CKEDITOR.env.version<9)for(t=0;t<o.length;t++)n.call(e,o[t])&&i.push(o[t]);return i},findKey:function(e,t){if("object"!=typeof e)return null;for(var n in e)if(e[n]===t)return n;return null},merge:function(e,t){var n=CKEDITOR.tools,i=n.clone(e),o=n.clone(t);return n.array.forEach(n.object.keys(o),function(e){i[e]="object"==typeof o[e]&&"object"==typeof i[e]?n.object.merge(i[e],o[e]):o[e]}),i}},getAbsoluteRectPosition:function(e,t){var i=CKEDITOR.tools.copy(t);!function e(t){var n;t&&(n=t.getClientRect(),i.top+=n.top,i.left+=n.left,"x"in i&&"y"in i&&(i.x+=n.x,i.y+=n.y),e(t.getWindow().getFrame()))}(e.getFrame());e=CKEDITOR.document.getWindow().getScrollPosition();return i.top+=e.y,i.left+=e.x,"x"in i&&"y"in i&&(i.y+=e.y,i.x+=e.x),i.right=i.left+i.width,i.bottom=i.top+i.height,i}},$n.prototype={reset:function(){this._lastOutput=0,this._clearTimer()},_reschedule:function(){return!1},_call:function(){this._output()},_clearTimer:function(){this._scheduledTimer&&clearTimeout(this._scheduledTimer),this._scheduledTimer=0}},(Hn.prototype=CKEDITOR.tools.prototypedCopy($n.prototype))._reschedule=function(){this._scheduledTimer&&this._clearTimer()},Hn.prototype._call=function(){this._output.apply(this._context,this._args)},CKEDITOR.tools.buffers={},CKEDITOR.tools.buffers.event=$n,CKEDITOR.tools.buffers.throttle=Hn,CKEDITOR.tools.style.border=CKEDITOR.tools.createClass({$:function(e){this.width=(e=e||{}).width,this.style=e.style,this.color=e.color,this._.normalize()},_:{normalizeMap:{color:[[/windowtext/g,"black"]]},normalize:function(){for(var e in this._.normalizeMap){var t=this[e];t&&(this[e]=CKEDITOR.tools.array.reduce(this._.normalizeMap[e],function(e,t){return e.replace(t[0],t[1])},t))}}},proto:{toString:function(){return CKEDITOR.tools.array.filter([this.width,this.style,this.color],function(e){return!!e}).join(" ")}},statics:{fromCssRule:function(e){var t={},n=e.split(/\s+/g);return(e=CKEDITOR.tools.style.parse._findColor(e)).length&&(t.color=e[0]),CKEDITOR.tools.array.forEach(n,function(e){t.style||-1===CKEDITOR.tools.indexOf(CKEDITOR.tools.style.parse._borderStyle,e)?!t.width&&CKEDITOR.tools.style.parse._widthRegExp.test(e)&&(t.width=e):t.style=e}),new CKEDITOR.tools.style.border(t)},splitCssValues:function(a,i){i=i||{};var r=CKEDITOR.tools.array.reduce(["width","style","color"],function(e,t){var n=a["border-"+t]||i[t];return e[t]=n?CKEDITOR.tools.style.parse.sideShorthand(n):null,e},{});return CKEDITOR.tools.array.reduce(["top","right","bottom","left"],function(e,t){var n,i={};for(n in r){var o=a["border-"+t+"-"+n];i[n]=o||r[n]&&r[n][t]}return e["border-"+t]=new CKEDITOR.tools.style.border(i),e},{})}}}),CKEDITOR.tools.array.indexOf=CKEDITOR.tools.indexOf,CKEDITOR.tools.array.isArray=CKEDITOR.tools.isArray,CKEDITOR.MOUSE_BUTTON_LEFT=0,CKEDITOR.MOUSE_BUTTON_MIDDLE=1,CKEDITOR.MOUSE_BUTTON_RIGHT=2,CKEDITOR.dtd=(Ce=CKEDITOR.tools.extend,Ie=function(e,t){for(var n=CKEDITOR.tools.clone(e),i=1;i<arguments.length;i++)for(var o in t=arguments[i])delete n[o];return n},De={},Re={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},ve={command:1,link:1,meta:1,noscript:1,script:1,style:1},be={},ye={center:1,dir:1,noframes:1},Ce(Oe={},{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},Ae={"#":1},{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1}),Ce(De,Re,Oe,ye),Ie={a:Ie(Oe,{a:1,button:1}),abbr:Oe,address:De,area:be,article:De,aside:De,audio:Ce({source:1,track:1},De),b:Oe,base:be,bdi:Oe,bdo:Oe,blockquote:De,body:De,br:be,button:Ie(Oe,{a:1,button:1}),canvas:Oe,caption:De,cite:Oe,code:Oe,col:be,colgroup:{col:1},command:be,datalist:Ce({option:1},Oe),dd:De,del:Oe,details:Ce({summary:1},De),dfn:Oe,div:De,dl:{dt:1,dd:1},dt:De,em:Oe,embed:be,fieldset:Ce({legend:1},De),figcaption:De,figure:Ce({figcaption:1},De),footer:De,form:De,h1:Oe,h2:Oe,h3:Oe,h4:Oe,h5:Oe,h6:Oe,head:Ce({title:1,base:1},ve),header:De,hgroup:{h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},hr:be,html:Ce({head:1,body:1},De,ve),i:Oe,iframe:Ae,img:be,input:be,ins:Oe,kbd:Oe,keygen:be,label:Oe,legend:Oe,li:De,link:be,main:De,map:De,mark:Oe,menu:Ce({li:1},De),meta:be,meter:Ie(Oe,{meter:1}),nav:De,noscript:Ce({link:1,meta:1,style:1},Oe),object:Ce({param:1},Oe),ol:{li:1},optgroup:{option:1},option:Ae,output:Oe,p:Oe,param:be,pre:Oe,progress:Ie(Oe,{progress:1}),q:Oe,rp:Oe,rt:Oe,ruby:Ce({rp:1,rt:1},Oe),s:Oe,samp:Oe,script:Ae,section:De,select:{optgroup:1,option:1},small:Oe,source:be,span:Oe,strong:Oe,style:Ae,sub:Oe,summary:Ce({h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},Oe),sup:Oe,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:De,textarea:Ae,tfoot:{tr:1},th:De,thead:{tr:1},time:Ie(Oe,{time:1}),title:Ae,tr:{th:1,td:1},track:be,u:Oe,ul:{li:1},var:Oe,video:Ce({source:1,track:1},De),wbr:be,acronym:Oe,applet:Ce({param:1},De),basefont:be,big:Oe,center:De,dialog:be,dir:{li:1},font:Oe,isindex:be,noframes:De,strike:Oe,tt:Oe},Ce(Ie,{$block:Ce({audio:1,dd:1,dt:1,figcaption:1,li:1,video:1},Re,ye),$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:Oe,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:Ce({body:1,head:1,html:1},Ie.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}}),Ie),CKEDITOR.dom.event=function(e){this.$=e},CKEDITOR.dom.event.prototype={getKey:function(){return this.$.keyCode||this.$.which},getKeystroke:function(){var e=this.getKey();return(this.$.ctrlKey||this.$.metaKey)&&(e+=CKEDITOR.CTRL),this.$.shiftKey&&(e+=CKEDITOR.SHIFT),this.$.altKey&&(e+=CKEDITOR.ALT),e},preventDefault:function(e){var t=this.$;t.preventDefault?t.preventDefault():t.returnValue=!1,e&&this.stopPropagation()},stopPropagation:function(){var e=this.$;e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},getTarget:function(){var e=this.$.target||this.$.srcElement;return e?new CKEDITOR.dom.node(e):null},getPhase:function(){return this.$.eventPhase||2},getPageOffset:function(){var e=this.getTarget().getDocument().$;return{x:this.$.pageX||this.$.clientX+(e.documentElement.scrollLeft||e.body.scrollLeft),y:this.$.pageY||this.$.clientY+(e.documentElement.scrollTop||e.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(e){e&&(this.$=e)},CKEDITOR.dom.domObject.prototype={getPrivate:function(){var e;return(e=this.getCustomData("_"))||this.setCustomData("_",e={}),e},on:function(e){var t,n,i=this.getCustomData("_cke_nativeListeners");return i||this.setCustomData("_cke_nativeListeners",i={}),i[e]||(i=i[e]=(t=this,n=e,function(e){"undefined"!=typeof CKEDITOR&&t.fire(n,new CKEDITOR.dom.event(e))}),this.$.addEventListener?this.$.addEventListener(e,i,!!CKEDITOR.event.useCapture):this.$.attachEvent&&this.$.attachEvent("on"+e,i)),CKEDITOR.event.prototype.on.apply(this,arguments)},removeListener:function(e){var t,n;CKEDITOR.event.prototype.removeListener.apply(this,arguments),this.hasListeners(e)||(n=(t=this.getCustomData("_cke_nativeListeners"))&&t[e])&&(this.$.removeEventListener?this.$.removeEventListener(e,n,!1):this.$.detachEvent&&this.$.detachEvent("on"+e,n),delete t[e])},removeAllListeners:function(){try{var e,t=this.getCustomData("_cke_nativeListeners");for(e in t){var n=t[e];this.$.detachEvent?this.$.detachEvent("on"+e,n):this.$.removeEventListener&&this.$.removeEventListener(e,n,!1),delete t[e]}}catch(e){if(!CKEDITOR.env.edge||-2146828218!==e.number)throw e}CKEDITOR.event.prototype.removeAllListeners.call(this)}},Ie=CKEDITOR.dom.domObject.prototype,Te={},CKEDITOR.on("reset",function(){Te={}}),Ie.equals=function(e){try{return e&&e.$===this.$}catch(e){return!1}},Ie.setCustomData=function(e,t){var n=this.getUniqueId();return(Te[n]||(Te[n]={}))[e]=t,this},Ie.getCustomData=function(e){var t=this.$["data-cke-expando"];return(t=t&&Te[t])&&e in t?t[e]:null},Ie.removeCustomData=function(e){var t,n,i=this.$["data-cke-expando"];return(i=i&&Te[i])&&(t=i[e],n=e in i,delete i[e]),n?t:null},Ie.clearCustomData=function(){this.removeAllListeners();var e=this.getUniqueId();e&&delete Te[e]},Ie.getUniqueId=function(){return this.$["data-cke-expando"]||(this.$["data-cke-expando"]=CKEDITOR.tools.getNextNumber())},CKEDITOR.event.implementOn(Ie),CKEDITOR.dom.node=function(e){return e?new CKEDITOR.dom[e.nodeType==CKEDITOR.NODE_DOCUMENT?"document":e.nodeType==CKEDITOR.NODE_ELEMENT?"element":e.nodeType==CKEDITOR.NODE_TEXT?"text":e.nodeType==CKEDITOR.NODE_COMMENT?"comment":e.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT?"documentFragment":"domObject"](e):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(e,t){return e.append(this,t),e},clone:function(i,o){var e=this.$.cloneNode(i);return function e(t){if(t["data-cke-expando"]&&(t["data-cke-expando"]=!1),(t.nodeType==CKEDITOR.NODE_ELEMENT||t.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&(o||t.nodeType!=CKEDITOR.NODE_ELEMENT||t.removeAttribute("id",!1),i)){t=t.childNodes;for(var n=0;n<t.length;n++)e(t[n])}}(e),e=new CKEDITOR.dom.node(e),CKEDITOR.env.ie&&CKEDITOR.env.version<9&&(this.type==CKEDITOR.NODE_ELEMENT||this.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&function e(t){var n;if((t.type==CKEDITOR.NODE_ELEMENT||t.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&(t.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||":"==(n=t.getName())[0]&&t.renameNode(n.substring(1)),i))for(n=0;n<t.getChildCount();n++)e(t.getChild(n))}(e),e},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(e){return e.$.parentNode.insertBefore(this.$,e.$.nextSibling),e},insertBefore:function(e){return e.$.parentNode.insertBefore(this.$,e.$),e},insertBeforeMe:function(e){return this.$.parentNode.insertBefore(e.$,this.$),e},getAddress:function(e){for(var t=[],n=this.getDocument().$.documentElement,i=this;i&&i!=n;){var o=i.getParent();o&&t.unshift(this.getIndex.call(i,e)),i=o}return t},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(e){function n(e,t){e=t?e.getNext():e.getPrevious();return e&&e.type==CKEDITOR.NODE_TEXT?e.isEmpty()?n(e,t):e:null}var t,i=this,o=-1;if(!this.getParent()||e&&i.type==CKEDITOR.NODE_TEXT&&i.isEmpty()&&!n(i)&&!n(i,!0))return-1;for(;e&&!i.equals(this)&&i.type==CKEDITOR.NODE_TEXT&&(t||i.isEmpty())||(o++,t=i.type==CKEDITOR.NODE_TEXT),i=i.getPrevious(););return o},getNextSourceNode:function(e,t,n){var i,o;if(n&&!n.call&&(i=n,n=function(e){return!e.equals(i)}),!(e=!e&&this.getFirst&&this.getFirst())){if(this.type==CKEDITOR.NODE_ELEMENT&&n&&!1===n(this,!0))return null;e=this.getNext()}for(;!e&&(o=(o||this).getParent());){if(n&&!1===n(o,!0))return null;e=o.getNext()}return!e||n&&!1===n(e)?null:t&&t!=e.type?e.getNextSourceNode(!1,t,n):e},getPreviousSourceNode:function(e,t,n){var i,o;if(n&&!n.call&&(i=n,n=function(e){return!e.equals(i)}),!(e=!e&&this.getLast&&this.getLast())){if(this.type==CKEDITOR.NODE_ELEMENT&&n&&!1===n(this,!0))return null;e=this.getPrevious()}for(;!e&&(o=(o||this).getParent());){if(n&&!1===n(o,!0))return null;e=o.getPrevious()}return!e||n&&!1===n(e)?null:t&&e.type!=t?e.getPreviousSourceNode(!1,t,n):e},getPrevious:function(e){for(var t,n=this.$;(t=(n=n.previousSibling)&&10!=n.nodeType&&new CKEDITOR.dom.node(n))&&e&&!e(t););return t},getNext:function(e){for(var t,n=this.$;(t=(n=n.nextSibling)&&new CKEDITOR.dom.node(n))&&e&&!e(t););return t},getParent:function(e){var t=this.$.parentNode;return t&&(t.nodeType==CKEDITOR.NODE_ELEMENT||e&&t.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(t):null},getParents:function(e){for(var t=this,n=[];n[e?"push":"unshift"](t),t=t.getParent(););return n},getCommonAncestor:function(e){if(e.equals(this))return this;if(e.contains&&e.contains(this))return e;var t=this.contains?this:this.getParent();do{if(t.contains(e))return t}while(t=t.getParent());return null},getPosition:function(e){var t=this.$,n=e.$;if(t.compareDocumentPosition)return t.compareDocumentPosition(n);if(t==n)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&e.type==CKEDITOR.NODE_ELEMENT){if(t.contains){if(t.contains(n))return CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING;if(n.contains(t))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in t)return t.sourceIndex<0||n.sourceIndex<0?CKEDITOR.POSITION_DISCONNECTED:t.sourceIndex<n.sourceIndex?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING}t=this.getAddress(),e=e.getAddress();for(var n=Math.min(t.length,e.length),i=0;i<n;i++)if(t[i]!=e[i])return t[i]<e[i]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;return t.length<e.length?CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING},getAscendant:function(t,e){var n,i,o=this.$;for(e||(o=o.parentNode),n="function"==typeof t?(i=!0,t):(i=!1,function(e){return e="string"==typeof e.nodeName?e.nodeName.toLowerCase():"","string"==typeof t?e==t:e in t});o;){if(n(i?new CKEDITOR.dom.node(o):o))return new CKEDITOR.dom.node(o);try{o=o.parentNode}catch(e){o=null}}return null},hasAscendant:function(e,t){var n=this.$;for(t||(n=n.parentNode);n;){if(n.nodeName&&n.nodeName.toLowerCase()==e)return!0;n=n.parentNode}return!1},move:function(e,t){e.append(this.remove(),t)},remove:function(e){var t=this.$,n=t.parentNode;if(n){if(e)for(;e=t.firstChild;)n.insertBefore(t.removeChild(e),t);n.removeChild(t)}return this},replace:function(e){this.insertBefore(e),e.remove()},trim:function(){this.ltrim(),this.rtrim()},ltrim:function(){for(var e;this.getFirst&&(e=this.getFirst());){if(e.type==CKEDITOR.NODE_TEXT){var t=CKEDITOR.tools.ltrim(e.getText()),n=e.getLength();if(!t){e.remove();continue}t.length<n&&(e.split(n-t.length),this.$.removeChild(this.$.firstChild))}break}},rtrim:function(){for(var e;this.getLast&&(e=this.getLast());){if(e.type==CKEDITOR.NODE_TEXT){var t=CKEDITOR.tools.rtrim(e.getText()),n=e.getLength();if(!t){e.remove();continue}t.length<n&&(e.split(t.length),this.$.lastChild.parentNode.removeChild(this.$.lastChild))}break}CKEDITOR.env.needsBrFiller&&(e=this.$.lastChild)&&1==e.type&&"br"==e.nodeName.toLowerCase()&&e.parentNode.removeChild(e)},isReadOnly:function(e){var t=this;if(this.type!=CKEDITOR.NODE_ELEMENT&&(t=this.getParent()),!(e=CKEDITOR.env.edge&&t&&t.is("textarea","input")?!0:e)&&t&&void 0!==t.$.isContentEditable)return!(t.$.isContentEditable||t.data("cke-editable"));for(;t;){if(t.data("cke-editable"))return!1;if(t.hasAttribute("contenteditable"))return"false"==t.getAttribute("contenteditable");t=t.getParent()}return!0}}),CKEDITOR.dom.window=function(e){CKEDITOR.dom.domObject.call(this,e)},CKEDITOR.dom.window.prototype=new CKEDITOR.dom.domObject,CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype,{focus:function(){this.$.focus()},getViewPaneSize:function(){var e=this.$.document,t="CSS1Compat"==e.compatMode;return{width:(t?e.documentElement:e.body).clientWidth||0,height:(t?e.documentElement:e.body).clientHeight||0}},getScrollPosition:function(){var e=this.$;return"pageXOffset"in e?{x:e.pageXOffset||0,y:e.pageYOffset||0}:{x:(e=e.document).documentElement.scrollLeft||e.body.scrollLeft||0,y:e.documentElement.scrollTop||e.body.scrollTop||0}},getFrame:function(){var e=this.$.frameElement;return e?new CKEDITOR.dom.element.get(e):null}}),CKEDITOR.dom.document=function(e){CKEDITOR.dom.domObject.call(this,e)},CKEDITOR.dom.document.prototype=new CKEDITOR.dom.domObject,CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype,{type:CKEDITOR.NODE_DOCUMENT,appendStyleSheet:function(e){var t;this.$.createStyleSheet?this.$.createStyleSheet(e):((t=new CKEDITOR.dom.element("link")).setAttributes({rel:"stylesheet",type:"text/css",href:e}),this.getHead().append(t))},appendStyleText:function(e){var t,n;return this.$.createStyleSheet?(t=this.$.createStyleSheet("")).cssText=e:((n=new CKEDITOR.dom.element("style",this)).append(new CKEDITOR.dom.text(e,this)),this.getHead().append(n)),t||n.$.sheet},createElement:function(e,t){e=new CKEDITOR.dom.element(e,this);return t&&(t.attributes&&e.setAttributes(t.attributes),t.styles&&e.setStyles(t.styles)),e},createText:function(e){return new CKEDITOR.dom.text(e,this)},focus:function(){this.getWindow().focus()},getActive:function(){var e;try{e=this.$.activeElement}catch(e){return null}return new CKEDITOR.dom.element(e)},getById:function(e){return(e=this.$.getElementById(e))?new CKEDITOR.dom.element(e):null},getByAddress:function(e,t){for(var n=this.$.documentElement,i=0;n&&i<e.length;i++){var o=e[i];if(t)for(var a=-1,r=0;r<n.childNodes.length;r++){var s=n.childNodes[r];if((!0!==t||3!=s.nodeType||!s.previousSibling||3!=s.previousSibling.nodeType)&&++a==o){n=s;break}}else n=n.childNodes[o]}return n?new CKEDITOR.dom.node(n):null},getElementsByTag:function(e,t){return CKEDITOR.env.ie&&document.documentMode<=8||!t||(e=t+":"+e),new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(e))},getHead:function(){var e=this.$.getElementsByTagName("head")[0];return e?new CKEDITOR.dom.element(e):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(e){this.$.open("text/html","replace"),CKEDITOR.env.ie&&(e=e.replace(/(?:^\s*<!DOCTYPE[^>]*?>)|^/i,'$&\n<script data-cke-temp="1">('+CKEDITOR.tools.fixDomain+")();<\/script>")),this.$.write(e),this.$.close()},find:function(e){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(e))},findOne:function(e){return(e=this.$.querySelector(e))?new CKEDITOR.dom.element(e):null},_getHtml5ShivFrag:function(){var e=this.getCustomData("html5ShivFrag");return e||(e=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(e,!0),this.setCustomData("html5ShivFrag",e)),e}}),CKEDITOR.dom.nodeList=function(e){this.$=e},CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(e){return!(e<0||e>=this.$.length)&&(e=this.$[e])?new CKEDITOR.dom.node(e):null},toArray:function(){return CKEDITOR.tools.array.map(this.$,function(e){return new CKEDITOR.dom.node(e)})}},CKEDITOR.dom.element=function(e,t){"string"==typeof e&&(e=(t?t.$:document).createElement(e)),CKEDITOR.dom.domObject.call(this,e)},CKEDITOR.dom.element.get=function(e){return(e="string"==typeof e?document.getElementById(e)||document.getElementsByName(e)[0]:e)&&(e.$?e:new CKEDITOR.dom.element(e))},CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node,CKEDITOR.dom.element.createFromHtml=function(e,t){t=new CKEDITOR.dom.element("div",t);return t.setHtml(e),t.getFirst().remove()},CKEDITOR.dom.element.setMarker=function(e,t,n,i){var o=t.getCustomData("list_marker_id")||t.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),a=t.getCustomData("list_marker_names")||t.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");return e[o]=t,a[n]=1,t.setCustomData(n,i)},CKEDITOR.dom.element.clearAllMarkers=function(e){for(var t in e)CKEDITOR.dom.element.clearMarkers(e,e[t],1)},CKEDITOR.dom.element.clearMarkers=function(e,t,n){var i,o=t.getCustomData("list_marker_names"),a=t.getCustomData("list_marker_id");for(i in o)t.removeCustomData(i);t.removeCustomData("list_marker_names"),n&&(t.removeCustomData("list_marker_id"),delete e[a])},function(){function n(e,t){return-1<(" "+e+" ").replace(r," ").indexOf(" "+t+" ")}function i(e){var t=!0;return e.$.id||(e.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),t=!1),function(){t||e.removeAttribute("id")}}function o(e,t){e=CKEDITOR.tools.escapeCss(e.$.id);return"#"+e+" "+t.split(/,\s*/).join(", #"+e+" ")}function a(e){for(var t=0,n=0,i=h[e].length;n<i;n++)t+=parseFloat(this.getComputedStyle(h[e][n])||0,10)||0;return t}var t,e=void 0!==(e=document.createElement("_").classList)&&null!==String(e.add).match(/\[Native code\]/gi),r=/[\n\t\r]/g;function s(e,t){e=e.childNodes;if(0<=t&&t<e.length)return e[t]}function l(e,t){return this.$.setAttribute(e,t),this}function c(e,t,n){if(t&&t.type==CKEDITOR.NODE_ELEMENT){for(var i=[];t.data("cke-bookmark")||t.isEmptyInlineRemoveable();)if(i.push(t),!(t=n?t.getNext():t.getPrevious())||t.type!=CKEDITOR.NODE_ELEMENT)return;if(e.isIdentical(t)){for(var o=n?e.getLast():e.getFirst();i.length;)i.shift().move(e,!n);t.moveChildren(e,!n),t.remove(),o&&o.type==CKEDITOR.NODE_ELEMENT&&o.mergeSiblings()}}}function d(e){var t=this.$.attributes.getNamedItem(e);if("input"==this.getName())switch(e){case"class":return 0<this.$.className.length;case"checked":return!!this.$.checked;case"value":return"checkbox"==(e=this.getAttribute("type"))||"radio"==e?"on"!=this.$.value:!!this.$.value}return!!t&&t.specified}function u(){try{this.$.focus()}catch(e){}}CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:e?function(e){return this.$.classList.add(e),this}:function(e){var t=this.$.className;return t&&(n(t,e)||(t+=" "+e)),this.$.className=t||e,this},removeClass:e?function(e){var t=this.$;return t.classList.remove(e),t.className||t.removeAttribute("class"),this}:function(e){var t=this.getAttribute("class");return t&&n(t,e)&&((t=t.replace(new RegExp("(?:^|\\s+)"+e+"(?=\\s|$)"),"").replace(/^\s+/,""))?this.setAttribute("class",t):this.removeAttribute("class")),this},hasClass:function(e){return n(this.$.className,e)},append:function(e,t){return"string"==typeof e&&(e=this.getDocument().createElement(e)),t?this.$.insertBefore(e.$,this.$.firstChild):this.$.appendChild(e.$),e},appendHtml:function(e){var t;this.$.childNodes.length?((t=new CKEDITOR.dom.element("div",this.getDocument())).setHtml(e),t.moveChildren(this)):this.setHtml(e)},appendText:function(e){null!=this.$.text&&CKEDITOR.env.ie&&CKEDITOR.env.version<9?this.$.text+=e:this.append(new CKEDITOR.dom.text(e))},appendBogus:function(e){if(e||CKEDITOR.env.needsBrFiller){for(e=this.getLast();e&&e.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(e.getText());)e=e.getPrevious();e&&e.is&&e.is("br")||(e=this.getDocument().createElement("br"),CKEDITOR.env.gecko&&e.setAttribute("type","_moz"),this.append(e))}},breakParent:function(e,t){var n=new CKEDITOR.dom.range(this.getDocument());n.setStartAfter(this),n.setEndAfter(e);var i,o=n.extractContents(!1,t||!1);if(n.insertNode(this.remove()),CKEDITOR.env.ie&&!CKEDITOR.env.edge){for(n=new CKEDITOR.dom.element("div");i=o.getFirst();)i.$.style.backgroundColor&&(i.$.style.backgroundColor=i.$.style.backgroundColor),n.append(i);n.insertAfter(this),n.remove(!0)}else o.insertAfterNode(this)},contains:document.compareDocumentPosition?function(e){return!!(16&this.$.compareDocumentPosition(e.$))}:function(e){var t=this.$;return e.type!=CKEDITOR.NODE_ELEMENT?t.contains(e.getParent().$):t!=e.$&&t.contains(e.$)},focus:function(e){e?CKEDITOR.tools.setTimeout(u,100,this):u.call(this)},getHtml:function(){var e=this.$.innerHTML;return CKEDITOR.env.ie?e.replace(/<\?[^>]*>/g,""):e},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var e=this.$.ownerDocument.createElement("div");return e.appendChild(this.$.cloneNode(!0)),e.innerHTML},getClientRect:function(e){var t=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());return t.width||(t.width=t.right-t.left),t.height||(t.height=t.bottom-t.top),e?CKEDITOR.tools.getAbsoluteRectPosition(this.getWindow(),t):t},setHtml:CKEDITOR.env.ie&&CKEDITOR.env.version<9?function(t){try{var n=this.$;if(this.getParent())return n.innerHTML=t;var e=this.getDocument()._getHtml5ShivFrag();return e.appendChild(n),n.innerHTML=t,e.removeChild(n),t}catch(e){for(this.$.innerHTML="",(n=new CKEDITOR.dom.element("body",this.getDocument())).$.innerHTML=t,n=n.getChildren();n.count();)this.append(n.getItem(0));return t}}:function(e){return this.$.innerHTML=e},setText:((t=document.createElement("p")).innerHTML="x",t=t.textContent,function(e){this.$[t?"textContent":"innerText"]=e}),getAttribute:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(e){switch(e){case"class":e="className";break;case"http-equiv":e="httpEquiv";break;case"name":return this.$.name;case"tabindex":return e=0!==(e=this.$.getAttribute(e,2))&&0===this.$.tabIndex?null:e;case"checked":return((e=this.$.attributes.getNamedItem(e)).specified?e.nodeValue:this.$.checked)?"checked":null;case"hspace":case"value":return this.$[e];case"style":return this.$.style.cssText;case"contenteditable":case"contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(e,2)}:function(e){return this.$.getAttribute(e,2)},getAttributes:function(e){var t,n={},i=this.$.attributes;for(e=CKEDITOR.tools.isArray(e)?e:[],t=0;t<i.length;t++)-1===CKEDITOR.tools.indexOf(e,i[t].name)&&(n[i[t].name]=i[t].value);return n},getChildren:function(){return new CKEDITOR.dom.nodeList(this.$.childNodes)},getClientSize:function(){return{width:this.$.clientWidth,height:this.$.clientHeight}},getComputedStyle:document.defaultView&&document.defaultView.getComputedStyle?function(e){var t=this.getWindow().$.getComputedStyle(this.$,null);return t?t.getPropertyValue(e):""}:function(e){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(e)]},getDtd:function(){var e=CKEDITOR.dtd[this.getName()];return this.getDtd=function(){return e},e},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag,getTabIndex:function(){var e=this.$.tabIndex;return 0!==e||CKEDITOR.dtd.$tabIndex[this.getName()]||0===parseInt(this.getAttribute("tabindex"),10)?e:-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 e,t=this.$.nodeName.toLowerCase();return CKEDITOR.env.ie&&document.documentMode<=8&&("HTML"!=(e=this.$.scopeName)&&(t=e.toLowerCase()+":"+t)),this.getName=function(){return t},this.getName()},getValue:function(){return this.$.value},getFirst:function(e){var t=this.$.firstChild;return t=(t=t&&new CKEDITOR.dom.node(t))&&e&&!e(t)?t.getNext(e):t},getLast:function(e){var t=this.$.lastChild;return t=(t=t&&new CKEDITOR.dom.node(t))&&e&&!e(t)?t.getPrevious(e):t},getStyle:function(e){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(e)]},is:function(){var e=this.getName();if("object"==typeof arguments[0])return!!arguments[0][e];for(var t=0;t<arguments.length;t++)if(arguments[t]==e)return!0;return!1},isEditable:function(e){var t=this.getName();return!(this.isReadOnly()||"none"==this.getComputedStyle("display")||"hidden"==this.getComputedStyle("visibility")||CKEDITOR.dtd.$nonEditable[t]||CKEDITOR.dtd.$empty[t]||this.is("a")&&(this.data("cke-saved-name")||this.hasAttribute("name"))&&!this.getChildCount())&&(!1===e||!(!(e=CKEDITOR.dtd[t]||CKEDITOR.dtd.span)||!e["#"]))},isIdentical:function(e){var t,n=this.clone(0,1);return e=e.clone(0,1),n.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]),e.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]),n.$.isEqualNode?(n.$.style.cssText=CKEDITOR.tools.normalizeCssText(n.$.style.cssText),e.$.style.cssText=CKEDITOR.tools.normalizeCssText(e.$.style.cssText),n.$.isEqualNode(e.$)):(n=n.getOuterHtml(),e=e.getOuterHtml(),CKEDITOR.env.ie&&CKEDITOR.env.version<9&&this.is("a")&&((t=this.getParent()).type==CKEDITOR.NODE_ELEMENT&&((t=t.clone()).setHtml(n),n=t.getHtml(),t.setHtml(e),e=t.getHtml())),n==e)},isVisible:function(){var e,t,n=(this.$.offsetHeight||this.$.offsetWidth)&&"hidden"!=this.getComputedStyle("visibility");return n&&CKEDITOR.env.webkit&&(!(e=this.getWindow()).equals(CKEDITOR.document.getWindow())&&(t=e.$.frameElement)&&(n=new CKEDITOR.dom.element(t).isVisible())),!!n},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return!1;for(var e=this.getChildren(),t=0,n=e.count();t<n;t++){var i=e.getItem(t);if((i.type!=CKEDITOR.NODE_ELEMENT||!i.data("cke-bookmark"))&&(i.type==CKEDITOR.NODE_ELEMENT&&!i.isEmptyInlineRemoveable()||i.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(i.getText())))return!1}return!0},hasAttributes:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(){for(var e=this.$.attributes,t=0;t<e.length;t++){var n=e[t];switch(n.nodeName){case"class":if(this.getAttribute("class"))return!0;case"data-cke-expando":continue;default:if(n.specified)return!0}}return!1}:function(){var e=this.$.attributes,t=e.length,n={"data-cke-expando":1,_moz_dirty:1};return 0<t&&(2<t||!n[e[0].nodeName]||2==t&&!n[e[1].nodeName])},hasAttribute:CKEDITOR.env.ie?CKEDITOR.env.version<8?function(e){return"name"==e?!!this.$.name:d.call(this,e)}:d:function(e){return!!this.$.attributes.getNamedItem(e)},hide:function(){this.setStyle("display","none")},moveChildren:function(e,t){var n,i=this.$;if(i!=(e=e.$))if(t)for(;n=i.lastChild;)e.insertBefore(i.removeChild(n),e.firstChild);else for(;n=i.firstChild;)e.appendChild(i.removeChild(n))},mergeSiblings:function(e){(!1===e||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))&&(c(this,this.getNext(),!0),c(this,this.getPrevious()))},show:function(){this.setStyles({display:"",visibility:""})},setAttribute:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(e,t){return"class"==e?this.$.className=t:"style"==e?this.$.style.cssText=t:"tabindex"==e?this.$.tabIndex=t:"checked"==e?this.$.checked=t:"contenteditable"==e?l.call(this,"contentEditable",t):l.apply(this,arguments),this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(e,t){if("src"==e&&t.match(/^http:\/\//))try{l.apply(this,arguments)}catch(e){}else l.apply(this,arguments);return this}:l,setAttributes:function(e){for(var t in e)this.setAttribute(t,e[t]);return this},setValue:function(e){return this.$.value=e,this},removeAttribute:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(e){"class"==e?e="className":"tabindex"==e?e="tabIndex":"contenteditable"==e&&(e="contentEditable"),this.$.removeAttribute(e)}:function(e){this.$.removeAttribute(e)},removeAttributes:function(e){if(CKEDITOR.tools.isArray(e))for(var t=0;t<e.length;t++)this.removeAttribute(e[t]);else for(t in e=e||this.getAttributes())e.hasOwnProperty(t)&&this.removeAttribute(t)},removeStyle:function(e){if((i=this.$.style).removeProperty||"border"!=e&&"margin"!=e&&"padding"!=e)i.removeProperty?i.removeProperty(e):i.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(e)),this.$.style.cssText||this.removeAttribute("style");else{var t,n=["top","left","right","bottom"];"border"==e&&(t=["color","style","width"]);for(var i=[],o=0;o<n.length;o++)if(t)for(var a=0;a<t.length;a++)i.push([e,n[o],t[a]].join("-"));else i.push([e,n[o]].join("-"));for(e=0;e<i.length;e++)this.removeStyle(i[e])}},setStyle:function(e,t){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(e)]=t,this},setStyles:function(e){for(var t in e)this.setStyle(t,e[t]);return this},setOpacity:function(e){CKEDITOR.env.ie&&CKEDITOR.env.version<9?(e=Math.round(100*e),this.setStyle("filter",100<=e?"":"progid:DXImageTransform.Microsoft.Alpha(opacity="+e+")")):this.setStyle("opacity",e)},unselectable:function(){if(this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","none")),CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var e=this.getElementsByTag("*"),t=0,n=e.count();t<n;t++)e.getItem(t).setAttribute("unselectable","on")}},getPositionedAncestor:function(){for(var e=this;"html"!=e.getName();){if("static"!=e.getComputedStyle("position"))return e;e=e.getParent()}return null},getDocumentPosition:function(e){var t=0,n=0,i=this.getDocument(),o=i.getBody(),a="BackCompat"==i.$.compatMode;if(!document.documentElement.getBoundingClientRect||CKEDITOR.env.ie&&8===CKEDITOR.env.version)for(l=this,c=null;l&&"body"!=l.getName()&&"html"!=l.getName();){for(t+=l.$.offsetLeft-l.$.scrollLeft,n+=l.$.offsetTop-l.$.scrollTop,l.equals(this)||(t+=l.$.clientLeft||0,n+=l.$.clientTop||0);c&&!c.equals(l);)t-=c.$.scrollLeft,n-=c.$.scrollTop,c=c.getParent();l=(r=(c=l).$.offsetParent)?new CKEDITOR.dom.element(r):null}else{var r=this.$.getBoundingClientRect(),s=i.$.documentElement,l=s.clientTop||o.$.clientTop||0,c=s.clientLeft||o.$.clientLeft||0,d=!0;CKEDITOR.env.ie&&(d=i.getDocumentElement().contains(this),i=i.getBody().contains(this),d=a&&i||!a&&d),d&&(n=CKEDITOR.env.webkit||CKEDITOR.env.ie&&12<=CKEDITOR.env.version?(t=o.$.scrollLeft||s.scrollLeft,o.$.scrollTop||s.scrollTop):(t=(n=a?o.$:s).scrollLeft,n.scrollTop),t=r.left+t-c,n=r.top+n-l)}return e&&(r=this.getWindow(),l=e.getWindow(),!r.equals(l)&&r.$.frameElement&&(t+=(e=new CKEDITOR.dom.element(r.$.frameElement).getDocumentPosition(e)).x,n+=e.y)),document.documentElement.getBoundingClientRect||!CKEDITOR.env.gecko||a||(t+=this.$.clientLeft?1:0,n+=this.$.clientTop?1:0),{x:t,y:n}},scrollIntoView:function(e){var t=this.getParent();if(t)do{if((t.$.clientWidth&&t.$.clientWidth<t.$.scrollWidth||t.$.clientHeight&&t.$.clientHeight<t.$.scrollHeight)&&!t.is("body")&&this.scrollIntoParent(t,e,1),t.is("html")){var n=t.getWindow();try{var i=n.$.frameElement;i&&(t=new CKEDITOR.dom.element(i))}catch(e){}}}while(t=t.getParent())},scrollIntoParent:function(n,e,t){var i;function o(e,t){/body|html/.test(n.getName())?n.getWindow().$.scrollBy(e,t):(n.$.scrollLeft+=e,n.$.scrollTop+=t)}function a(e,t){var n,i={x:0,y:0};return e.is(l?"body":"html")||(n=e.$.getBoundingClientRect(),i.x=n.left,i.y=n.top),(n=e.getWindow()).equals(t)||(n=a(CKEDITOR.dom.element.get(n.$.frameElement),t),i.x+=n.x,i.y+=n.y),i}function r(e,t){return parseInt(e.getComputedStyle("margin-"+t)||0,10)||0}var s,l="BackCompat"==(s=(n=n||this.getWindow()).getDocument()).$.compatMode;n instanceof CKEDITOR.dom.window&&(n=l?s.getBody():s.getDocumentElement()),CKEDITOR.env.webkit&&(s=this.getEditor(!1))&&(s._.previousScrollTop=null);var c=a(this,s=n.getWindow()),d=a(n,s),u=this.$.offsetHeight,h=this.$.offsetWidth,f=n.$.clientHeight,g=n.$.clientWidth;s=c.x-r(this,"left")-d.x||0,i=c.y-r(this,"top")-d.y||0,h=c.x+h+r(this,"right")-(d.x+g)||0,c=c.y+u+r(this,"bottom")-(d.y+f)||0,(i<0||0<c)&&o(0,!0===e||!1!==e&&i<0?i:c),t&&(s<0||0<h)&&o(s<0?s:h,0)},setState:function(e,t,n){switch(t=t||"cke",e){case CKEDITOR.TRISTATE_ON:this.addClass(t+"_on"),this.removeClass(t+"_off"),this.removeClass(t+"_disabled"),n&&this.setAttribute("aria-pressed",!0),n&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(t+"_disabled"),this.removeClass(t+"_off"),this.removeClass(t+"_on"),n&&this.setAttribute("aria-disabled",!0),n&&this.removeAttribute("aria-pressed");break;default:this.addClass(t+"_off"),this.removeClass(t+"_on"),this.removeClass(t+"_disabled"),n&&this.removeAttribute("aria-pressed"),n&&this.removeAttribute("aria-disabled")}},getFrameDocument:function(){var t=this.$;try{t.contentWindow.document}catch(e){t.src=t.src}return t&&new CKEDITOR.dom.document(t.contentWindow.document)},copyAttributes:function(e,t){var n=this.$.attributes;t=t||{};for(var i=0;i<n.length;i++){var o,a=n[i],r=a.nodeName.toLowerCase();r in t||("checked"==r&&(o=this.getAttribute(r))?e.setAttribute(r,o):CKEDITOR.env.ie&&!this.hasAttribute(r)||(null===(o=this.getAttribute(r))&&(o=a.nodeValue),e.setAttribute(r,o)))}""!==this.$.style.cssText&&(e.$.style.cssText=this.$.style.cssText)},renameNode:function(e){var t;this.getName()!=e&&(t=this.getDocument(),e=new CKEDITOR.dom.element(e,t),this.copyAttributes(e),this.moveChildren(e),this.getParent(!0)&&this.$.parentNode.replaceChild(e.$,this.$),e.$["data-cke-expando"]=this.$["data-cke-expando"],this.$=e.$,delete this.getName)},getChild:function(e){var t=this.$;if(e.slice)for(e=e.slice();0<e.length&&t;)t=s(t,e.shift());else t=s(t,e);return t?new CKEDITOR.dom.node(t):null},getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){function t(e){return e.type==CKEDITOR.NODE_ELEMENT&&e.hasClass("cke_enable_context_menu")}this.on("contextmenu",function(e){e.data.getTarget().getAscendant(t,!0)||e.data.preventDefault()})},getDirection:function(e){return e?this.getComputedStyle("direction")||this.getDirection()||this.getParent()&&this.getParent().getDirection(1)||this.getDocument().$.dir||"ltr":this.getStyle("direction")||this.getAttribute("dir")},data:function(e,t){return e="data-"+e,void 0===t?this.getAttribute(e):(!1===t?this.removeAttribute(e):this.setAttribute(e,t),null)},getEditor:function(e){var t,n,i,o=CKEDITOR.instances;for(t in e=e||void 0===e,o)if(n=o[t],n.element.equals(this)&&n.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||!e&&(i=n.editable())&&(i.equals(this)||i.contains(this)))return n;return null},find:function(e){var t=i(this);return e=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(o(this,e))),t(),e},findOne:function(e){var t=i(this);return e=this.$.querySelector(o(this,e)),t(),e?new CKEDITOR.dom.element(e):null},forEach:function(e,t,n){var i;if(!1!==(i=!(n||t&&this.type!=t)?e(this):i)){n=this.getChildren();for(var o=0;o<n.count();o++)(i=n.getItem(o)).type==CKEDITOR.NODE_ELEMENT?i.forEach(e,t):t&&i.type!=t||e(i)}},fireEventHandler:function(e,t){var n="on"+e,i=this.$;if(CKEDITOR.env.ie&&CKEDITOR.env.version<9){var o,a=i.ownerDocument.createEventObject();for(o in t)a[o]=t[o];i.fireEvent(n,a)}else i[i[e]?e:n](t)},isDetached:function(){var e=this.getDocument(),t=e.getDocumentElement();return!t.equals(this)&&!t.contains(this)||(!CKEDITOR.env.ie||8<CKEDITOR.env.version&&!CKEDITOR.env.quirks)&&!e.$.defaultView}});var h={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(e,t,n){"number"==typeof t&&(!n||CKEDITOR.env.ie&&CKEDITOR.env.quirks||(t-=a.call(this,e)),this.setStyle(e,t+"px"))},CKEDITOR.dom.element.prototype.getSize=function(e,t){var n=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(e)],this.$["client"+CKEDITOR.tools.capitalize(e)])||0;return t&&(n-=a.call(this,e)),n}}(),CKEDITOR.dom.documentFragment=function(e){e=e||CKEDITOR.document,this.$=e.type==CKEDITOR.NODE_DOCUMENT?e.$.createDocumentFragment():e},CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,insertAfterNode:function(e){(e=e.$).parentNode.insertBefore(this.$,e.nextSibling)},getHtml:function(){var e=new CKEDITOR.dom.element("div");return this.clone(1,1).appendTo(e),e.getHtml().replace(/\s*data-cke-expando=".*?"/g,"")}},!0,{append:1,appendBogus:1,clone:1,getFirst:1,getHtml:1,getLast:1,getParent:1,getNext:1,getPrevious:1,appendTo:1,moveChildren:1,insertBefore:1,insertAfterNode:1,replace:1,trim:1,type:1,ltrim:1,rtrim:1,getDocument:1,getChildCount:1,getChild:1,getChildren:1}),CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.document.prototype,!0,{find:1,findOne:1}),function(){function i(e,t){var n=this.range;if(this._.end)return null;if(!this._.start){if(this._.start=1,n.collapsed)return this.end(),null;n.optimize()}var i,o,a,r,s=n.startContainer,l=n.endContainer,c=n.startOffset,d=n.endOffset,u=this.guard,h=this.type,f=e?"getPreviousSourceNode":"getNextSourceNode";e||this._.guardLTR||(i=l.type==CKEDITOR.NODE_ELEMENT?l:l.getParent(),o=l.type==CKEDITOR.NODE_ELEMENT?l.getChild(d):l.getNext(),this._.guardLTR=function(e,t){return!(t&&i.equals(e)||o&&e.equals(o)||e.type==CKEDITOR.NODE_ELEMENT&&t&&e.equals(n.root))}),e&&!this._.guardRTL&&(a=s.type==CKEDITOR.NODE_ELEMENT?s:s.getParent(),r=s.type==CKEDITOR.NODE_ELEMENT?c?s.getChild(c-1):null:s.getPrevious(),this._.guardRTL=function(e,t){return!(t&&a.equals(e)||r&&e.equals(r)||e.type==CKEDITOR.NODE_ELEMENT&&t&&e.equals(n.root))});var g=e?this._.guardRTL:this._.guardLTR,m=u?function(e,t){return!1!==g(e,t)&&u(e,t)}:g;for(this.current?l=this.current[f](!1,h,m):(e?l.type==CKEDITOR.NODE_ELEMENT&&(l=0<d?l.getChild(d-1):!1===m(l,!0)?null:l.getPreviousSourceNode(!0,h,m)):(l=s).type==CKEDITOR.NODE_ELEMENT&&((l=l.getChild(c))||(l=!1===m(s,!0)?null:s.getNextSourceNode(!0,h,m))),l&&!1===m(l)&&(l=null));l&&!this._.end;){if(this.current=l,this.evaluator&&!1===this.evaluator(l)){if(t&&this.evaluator)return!1}else if(!t)return l;l=l[f](!1,h,m)}return this.end(),this.current=null}function e(e){for(var t,n=null;t=i.call(this,e);)n=t;return n}CKEDITOR.dom.walker=CKEDITOR.tools.createClass({$:function(e){this.range=e,this._={}},proto:{end:function(){this._.end=1},next:function(){return i.call(this)},previous:function(){return i.call(this,1)},checkForward:function(){return!1!==i.call(this,0,1)},checkBackward:function(){return!1!==i.call(this,1,1)},lastForward:function(){return e.call(this)},lastBackward:function(){return e.call(this,1)},reset:function(){delete this.current,this._={}}}});var t={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},n={absolute:1,fixed:1};CKEDITOR.dom.element.prototype.isBlockBoundary=function(e){return!("none"!=this.getComputedStyle("float")||this.getComputedStyle("position")in n||!t[this.getComputedStyle("display")])||!!(this.is(CKEDITOR.dtd.$block)||e&&this.is(e))},CKEDITOR.dom.walker.blockBoundary=function(t){return function(e){return!(e.type==CKEDITOR.NODE_ELEMENT&&e.isBlockBoundary(t))}},CKEDITOR.dom.walker.listItemBoundary=function(){return this.blockBoundary({br:1})},CKEDITOR.dom.walker.bookmark=function(n,i){function o(e){return e&&e.getName&&"span"==e.getName()&&e.data("cke-bookmark")}return function(e){var t=e&&e.type!=CKEDITOR.NODE_ELEMENT&&(t=e.getParent())&&o(t);return t=n?t:t||o(e),!!(i^t)}},CKEDITOR.dom.walker.whitespaces=function(n){return function(e){var t;return e&&e.type==CKEDITOR.NODE_TEXT&&(t=!CKEDITOR.tools.trim(e.getText())||CKEDITOR.env.webkit&&e.getText()==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE),!!(n^t)}},CKEDITOR.dom.walker.invisible=function(t){var n=CKEDITOR.dom.walker.whitespaces(),i=CKEDITOR.env.webkit?1:0;return function(e){return e=n(e)?1:(e=e.type==CKEDITOR.NODE_TEXT?e.getParent():e).$.offsetWidth<=i,!!(t^e)}},CKEDITOR.dom.walker.nodeType=function(t,n){return function(e){return!!(n^e.type==t)}},CKEDITOR.dom.walker.bogus=function(n){function i(e){return!a(e)&&!r(e)}return function(e){var t=CKEDITOR.env.needsBrFiller?e.is&&e.is("br"):e.getText&&o.test(e.getText());return t&&(t=e.getParent(),e=e.getNext(i),t=t.isBlockBoundary()&&(!e||e.type==CKEDITOR.NODE_ELEMENT&&e.isBlockBoundary())),!!(n^t)}},CKEDITOR.dom.walker.temp=function(t){return function(e){return e=(e=e.type!=CKEDITOR.NODE_ELEMENT?e.getParent():e)&&e.hasAttribute("data-cke-temp"),!!(t^e)}};var o=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,a=CKEDITOR.dom.walker.whitespaces(),r=CKEDITOR.dom.walker.bookmark(),s=CKEDITOR.dom.walker.temp();CKEDITOR.dom.walker.ignored=function(t){return function(e){return e=a(e)||r(e)||s(e),!!(t^e)}};var l=CKEDITOR.dom.walker.ignored();CKEDITOR.dom.walker.empty=function(i){return function(e){for(var t=0,n=e.getChildCount();t<n;++t)if(!l(e.getChild(t)))return!!i;return!i}};var c=CKEDITOR.dom.walker.empty(),d=CKEDITOR.dom.walker.validEmptyBlockContainers=CKEDITOR.tools.extend(function(){var e,t={};for(e in CKEDITOR.dtd.$block)CKEDITOR.dtd[e]["#"]&&(t[e]=1);return t}(),{caption:1,td:1,th:1});CKEDITOR.dom.walker.editable=function(t){return function(e){return e=!l(e)&&!!(e.type==CKEDITOR.NODE_TEXT||e.type==CKEDITOR.NODE_ELEMENT&&(e.is(CKEDITOR.dtd.$inline)||e.is("hr")||"false"==e.getAttribute("contenteditable")||!CKEDITOR.env.needsBrFiller&&e.is(d)&&c(e))),!!(t^e)}},CKEDITOR.dom.element.prototype.getBogus=function(){for(var e,t=this;t=t.getPreviousSourceNode(),r(e=t)||a(e)||e.type==CKEDITOR.NODE_ELEMENT&&e.is(CKEDITOR.dtd.$inline)&&!e.is(CKEDITOR.dtd.$empty););return!(!t||!(CKEDITOR.env.needsBrFiller?t.is&&t.is("br"):t.getText&&o.test(t.getText())))&&t}}(),CKEDITOR.dom.range=function(e){this.endOffset=this.endContainer=this.startOffset=this.startContainer=null,this.collapsed=!0;var t=e instanceof CKEDITOR.dom.document;this.document=t?e:e.getDocument(),this.root=t?e.getBody():e},fe={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},ge=CKEDITOR.dom.walker.bogus(),me=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,Ee=CKEDITOR.dom.walker.editable(),pe=CKEDITOR.dom.walker.ignored(!0),CKEDITOR.dom.range.prototype={clone:function(){var e=new CKEDITOR.dom.range(this.root);return e._setStartContainer(this.startContainer),e.startOffset=this.startOffset,e._setEndContainer(this.endContainer),e.endOffset=this.endOffset,e.collapsed=this.collapsed,e},collapse:function(e){e?(this._setEndContainer(this.startContainer),this.endOffset=this.startOffset):(this._setStartContainer(this.endContainer),this.startOffset=this.endOffset),this.collapsed=!0},cloneContents:function(e){var t=new CKEDITOR.dom.documentFragment(this.document);return this.collapsed||An(this,2,t,!1,void 0===e||e),t},deleteContents:function(e){this.collapsed||An(this,0,null,e)},extractContents:function(e,t){var n=new CKEDITOR.dom.documentFragment(this.document);return this.collapsed||An(this,1,n,e,void 0===t||t),n},equals:function(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset&&this.startContainer.equals(e.startContainer)&&this.endContainer.equals(e.endContainer)},createBookmark:function(e){function t(e){return e.getAscendant(function(e){var t;return t=(t=e.data&&e.data("cke-temp"))?-1===CKEDITOR.tools.array.indexOf(["cke_copybin","cke_pastebin"],e.getAttribute("id")):t},!0)}var n,i,o,a=this.startContainer,r=this.endContainer,s=this.collapsed,l=this.document.createElement("span");return l.data("cke-bookmark",1),l.setStyle("display","none"),l.setHtml("&nbsp;"),e&&(i="cke_bm_"+CKEDITOR.tools.getNextNumber(),l.setAttribute("id",i+(s?"C":"S"))),s||((n=l.clone()).setHtml("&nbsp;"),e&&n.setAttribute("id",i+"E"),o=this.clone(),t(r)&&(r=t(r),o.moveToPosition(r,CKEDITOR.POSITION_AFTER_END)),o.collapse(),o.insertNode(n)),o=this.clone(),t(a)&&(r=t(a),o.moveToPosition(r,CKEDITOR.POSITION_BEFORE_START)),o.collapse(!0),o.insertNode(l),n?(this.setStartAfter(l),this.setEndBefore(n)):this.moveToPosition(l,CKEDITOR.POSITION_AFTER_END),{startNode:e?i+(s?"C":"S"):l,endNode:e?i+"E":n,serializable:e,collapsed:s}},createBookmark2:(he=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT,!0),function(e){var t=this.collapsed,n={container:this.startContainer,offset:this.startOffset},i={container:this.endContainer,offset:this.endOffset};return e&&(Bn(n),Mn(n,this.root),t||(Bn(i),Mn(i,this.root))),{start:n.container.getAddress(e),end:t?null:i.container.getAddress(e),startOffset:n.offset,endOffset:i.offset,normalized:e,collapsed:t,is2:!0}}),moveToBookmark:function(e){var t,n,i;e.is2?(t=this.document.getByAddress(e.start,e.normalized),n=e.startOffset,i=e.end&&this.document.getByAddress(e.end,e.normalized),e=e.endOffset,this.setStart(t,n),i?this.setEnd(i,e):this.collapse(!0)):(t=(n=e.serializable)?this.document.getById(e.startNode):e.startNode,e=n?this.document.getById(e.endNode):e.endNode,this.setStartBefore(t),t.remove(),e?(this.setEndBefore(e),e.remove()):this.collapse(!0))},getBoundaryNodes:function(){var e,t=this.startContainer,n=this.endContainer,i=this.startOffset,o=this.endOffset;if(t.type==CKEDITOR.NODE_ELEMENT)if(i<(e=t.getChildCount()))t=t.getChild(i);else if(e<1)t=t.getPreviousSourceNode();else{for(t=t.$;t.lastChild;)t=t.lastChild;t=(t=new CKEDITOR.dom.node(t)).getNextSourceNode()||t}if(n.type==CKEDITOR.NODE_ELEMENT)if(o<(e=n.getChildCount()))n=n.getChild(o).getPreviousSourceNode(!0);else if(e<1)n=n.getPreviousSourceNode();else{for(n=n.$;n.lastChild;)n=n.lastChild;n=new CKEDITOR.dom.node(n)}return{startNode:t=t.getPosition(n)&CKEDITOR.POSITION_FOLLOWING?n:t,endNode:n}},getCommonAncestor:function(e,t){var n=this.startContainer,i=this.endContainer,n=n.equals(i)?e&&n.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?n.getChild(this.startOffset):n:n.getCommonAncestor(i);return t&&!n.is?n.getParent():n},optimize:function(){var e=this.startContainer,t=this.startOffset;e.type!=CKEDITOR.NODE_ELEMENT&&(t?t>=e.getLength()&&this.setStartAfter(e):this.setStartBefore(e)),e=this.endContainer,t=this.endOffset,e.type!=CKEDITOR.NODE_ELEMENT&&(t?t>=e.getLength()&&this.setEndAfter(e):this.setEndBefore(e))},optimizeBookmark:function(){var e=this.startContainer,t=this.endContainer;e.is&&e.is("span")&&e.data("cke-bookmark")&&this.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),t&&t.is&&t.is("span")&&t.data("cke-bookmark")&&this.setEndAt(t,CKEDITOR.POSITION_AFTER_END)},trim:function(e,t){var n=this.startContainer,i=this.startOffset,o=this.collapsed;if((!e||o)&&n&&n.type==CKEDITOR.NODE_TEXT&&(i?i>=n.getLength()?(i=n.getIndex()+1,n=n.getParent()):(e=n.split(i),i=n.getIndex()+1,n=n.getParent(),this.startContainer.equals(this.endContainer)?this.setEnd(e,this.endOffset-this.startOffset):n.equals(this.endContainer)&&(this.endOffset+=1)):(i=n.getIndex(),n=n.getParent()),this.setStart(n,i),o))return void this.collapse(!0);n=this.endContainer,i=this.endOffset,t||o||!n||n.type!=CKEDITOR.NODE_TEXT||(i=i?(i>=n.getLength()||n.split(i),n.getIndex()+1):n.getIndex(),n=n.getParent(),this.setEnd(n,i))},enlarge:function(e,t){function n(e){return e&&e.type==CKEDITOR.NODE_ELEMENT&&e.hasAttribute("contenteditable")?null:e}var o=new RegExp(/[^\s\ufeff]/);switch(e){case CKEDITOR.ENLARGE_INLINE:var i=1;case CKEDITOR.ENLARGE_ELEMENT:function a(e,t){var n,i=new CKEDITOR.dom.range(h);for(i.setStart(e,t),i.setEndAt(h,CKEDITOR.POSITION_BEFORE_END),(i=new CKEDITOR.dom.walker(i)).guard=function(e){return!(e.type==CKEDITOR.NODE_ELEMENT&&e.isBlockBoundary())};n=i.next();){if(n.type!=CKEDITOR.NODE_TEXT)return!1;if(d=n!=e?n.getText():n.substring(t),o.test(d))return!1}return!0}if(this.collapsed)break;var r,s,l,c,d,u=this.getCommonAncestor(),h=this.root,f=!1,g=this.startContainer,m=this.startOffset;for(g.type==CKEDITOR.NODE_TEXT?(m&&(f=!!(g=!CKEDITOR.tools.trim(g.substring(0,m)).length&&g)),g&&((l=g.getPrevious())||(R=g.getParent()))):(l=m?g.getChild(m-1)||g.getLast():l)||(R=g),R=n(R);R||l;){if(R&&!l){if(!c&&R.equals(u)&&(c=!0),i?R.isBlockBoundary():!h.contains(R))break;f&&"inline"==R.getComputedStyle("display")||(f=!1,c?r=R:this.setStartBefore(R)),l=R.getPrevious()}for(;l;)if(g=!1,l.type==CKEDITOR.NODE_COMMENT)l=l.getPrevious();else{if(l.type==CKEDITOR.NODE_TEXT)d=l.getText(),o.test(d)&&(l=null),g=/[\s\ufeff]$/.test(d);else if((l.$.offsetWidth>(CKEDITOR.env.webkit?1:0)||t&&l.is("br"))&&!l.data("cke-bookmark"))if(f&&CKEDITOR.dtd.$removeEmpty[l.getName()]){if(d=l.getText(),o.test(d))l=null;else for(var E,m=l.$.getElementsByTagName("*"),p=0;E=m[p++];)if(!CKEDITOR.dtd.$removeEmpty[E.nodeName.toLowerCase()]){l=null;break}l&&(g=!!d.length)}else l=null;if(g&&(f?c?r=R:R&&this.setStartBefore(R):f=!0),l){if(g=l.getPrevious(),!R&&!g){R=l,l=null;break}l=g}else R=null}R=R&&n(R.getParent())}for(g=this.endContainer,m=this.endOffset,R=l=null,c=f=!1,g.type==CKEDITOR.NODE_TEXT?CKEDITOR.tools.trim(g.substring(m)).length?f=!0:(f=!g.getLength(),m==g.getLength()?(l=g.getNext())||(R=g.getParent()):a(g,m)&&(R=g.getParent())):(l=g.getChild(m))||(R=g);R||l;){if(R&&!l){if(!c&&R.equals(u)&&(c=!0),i?R.isBlockBoundary():!h.contains(R))break;f&&"inline"==R.getComputedStyle("display")||(f=!1,c?s=R:R&&this.setEndAfter(R)),l=R.getNext()}for(;l;){if(g=!1,l.type==CKEDITOR.NODE_TEXT)d=l.getText(),a(l,0)||(l=null),g=/^[\s\ufeff]/.test(d);else if(l.type==CKEDITOR.NODE_ELEMENT){if((0<l.$.offsetWidth||t&&l.is("br"))&&!l.data("cke-bookmark"))if(f&&CKEDITOR.dtd.$removeEmpty[l.getName()]){if(d=l.getText(),o.test(d))l=null;else for(m=l.$.getElementsByTagName("*"),p=0;E=m[p++];)if(!CKEDITOR.dtd.$removeEmpty[E.nodeName.toLowerCase()]){l=null;break}l&&(g=!!d.length)}else l=null}else g=1;if(g&&f&&(c?s=R:this.setEndAfter(R)),l){if(g=l.getNext(),!R&&!g){R=l,l=null;break}l=g}else R=null}R=R&&n(R.getParent())}r&&s&&(u=r.contains(s)?s:r,this.setStartBefore(u),this.setEndAfter(u));break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:R=new CKEDITOR.dom.range(this.root),h=this.root,R.setStartAt(h,CKEDITOR.POSITION_AFTER_START),R.setEnd(this.startContainer,this.startOffset),R=new CKEDITOR.dom.walker(R);function T(e){if(e.type==CKEDITOR.NODE_ELEMENT&&"false"==e.getAttribute("contenteditable"))if(D){if(D.equals(e))return void(D=null)}else D=e;else if(D)return;var t=O(e);return t||(C=e),t}var C,I,O=CKEDITOR.dom.walker.blockBoundary(e==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),D=null,i=function(e){var t=T(e);return!t&&e.is&&e.is("br")&&(I=e),t};if(R.guard=T,R=R.lastBackward(),this.setStartAt(C=C||h,!C.is("br")&&(!R&&this.checkStartOfBlock()||R&&C.contains(R))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END),e==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){R=this.clone();var R=new CKEDITOR.dom.walker(R),v=CKEDITOR.dom.walker.whitespaces(),b=CKEDITOR.dom.walker.bookmark();if(R.evaluator=function(e){return!v(e)&&!b(e)},(R=R.previous())&&R.type==CKEDITOR.NODE_ELEMENT&&R.is("br"))break}(R=this.clone()).collapse(),R.setEndAt(h,CKEDITOR.POSITION_BEFORE_END),(R=new CKEDITOR.dom.walker(R)).guard=e==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?i:T,C=D=I=null,R=R.lastForward(),this.setEndAt(C=C||h,!R&&this.checkEndOfBlock()||R&&C.contains(R)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START),I&&this.setEndAfter(I)}},shrink:function(n,e,t){var i="boolean"==typeof t?t:!t||"boolean"!=typeof t.shrinkOnBlockBoundary||t.shrinkOnBlockBoundary,o=t&&t.skipBogus;if(!this.collapsed){n=n||CKEDITOR.SHRINK_TEXT;var a=this.clone(),r=this.startContainer,s=this.endContainer,l=this.startOffset,c=this.endOffset,d=t=1;r&&r.type==CKEDITOR.NODE_TEXT&&(l?l>=r.getLength()?a.setStartAfter(r):(a.setStartBefore(r),t=0):a.setStartBefore(r)),s&&s.type==CKEDITOR.NODE_TEXT&&(c?c>=s.getLength()?a.setEndAfter(s):(a.setEndAfter(s),d=0):a.setEndBefore(s));var u,a=new CKEDITOR.dom.walker(a),h=CKEDITOR.dom.walker.bookmark(),f=CKEDITOR.dom.walker.bogus();return a.evaluator=function(e){return e.type==(n==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)},a.guard=function(e,t){return!!(o&&f(e)||h(e))||!(n==CKEDITOR.SHRINK_ELEMENT&&e.type==CKEDITOR.NODE_TEXT||t&&e.equals(u)||!1===i&&e.type==CKEDITOR.NODE_ELEMENT&&e.isBlockBoundary()||e.type==CKEDITOR.NODE_ELEMENT&&e.hasAttribute("contenteditable"))&&(t||e.type!=CKEDITOR.NODE_ELEMENT||(u=e),!0)},t&&(r=a[n==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(r,e?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START),d&&(a.reset(),(a=a[n==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(a,e?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END)),!(!t&&!d)}},insertNode:function(e){this.optimizeBookmark(),this.trim(!1,!0);var t=this.startContainer,n=t.getChild(this.startOffset);n?e.insertBefore(n):t.append(e),e.getParent()&&e.getParent().equals(this.endContainer)&&this.endOffset++,this.setStartBefore(e)},moveToPosition:function(e,t){this.setStartAt(e,t),this.collapse(!0)},moveToRange:function(e){this.setStart(e.startContainer,e.startOffset),this.setEnd(e.endContainer,e.endOffset)},selectNodeContents:function(e){this.setStart(e,0),this.setEnd(e,e.type==CKEDITOR.NODE_TEXT?e.getLength():e.getChildCount())},setStart:function(e,t){e.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[e.getName()]&&(t=e.getIndex(),e=e.getParent()),this._setStartContainer(e),this.startOffset=t,this.endContainer||(this._setEndContainer(e),this.endOffset=t),xn(this)},setEnd:function(e,t){e.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[e.getName()]&&(t=e.getIndex()+1,e=e.getParent()),this._setEndContainer(e),this.endOffset=t,this.startContainer||(this._setStartContainer(e),this.startOffset=t),xn(this)},setStartAfter:function(e){this.setStart(e.getParent(),e.getIndex()+1)},setStartBefore:function(e){this.setStart(e.getParent(),e.getIndex())},setEndAfter:function(e){this.setEnd(e.getParent(),e.getIndex()+1)},setEndBefore:function(e){this.setEnd(e.getParent(),e.getIndex())},setStartAt:function(e,t){switch(t){case CKEDITOR.POSITION_AFTER_START:this.setStart(e,0);break;case CKEDITOR.POSITION_BEFORE_END:e.type==CKEDITOR.NODE_TEXT?this.setStart(e,e.getLength()):this.setStart(e,e.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(e);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(e)}xn(this)},setEndAt:function(e,t){switch(t){case CKEDITOR.POSITION_AFTER_START:this.setEnd(e,0);break;case CKEDITOR.POSITION_BEFORE_END:e.type==CKEDITOR.NODE_TEXT?this.setEnd(e,e.getLength()):this.setEnd(e,e.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(e);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(e)}xn(this)},fixBlock:function(e,t){var n=this.createBookmark(),t=this.document.createElement(t);this.collapse(e),this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),this.extractContents().appendTo(t),t.trim(),this.insertNode(t);e=t.getBogus();return e&&e.remove(),t.appendBogus(),this.moveToBookmark(n),t},splitBlock:function(e,t){var n=new CKEDITOR.dom.elementPath(this.startContainer,this.root),i=new CKEDITOR.dom.elementPath(this.endContainer,this.root),o=n.block,a=i.block,r=null;return n.blockLimit.equals(i.blockLimit)?("br"!=e&&(o||(o=this.fixBlock(!0,e),a=new CKEDITOR.dom.elementPath(this.endContainer,this.root).block),a=a||this.fixBlock(!1,e)),n=o&&this.checkStartOfBlock(),i=a&&this.checkEndOfBlock(),this.deleteContents(),o&&o.equals(a)&&(i?(r=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END),a=null):n?(r=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(o,CKEDITOR.POSITION_BEFORE_START),o=null):(a=this.splitElement(o,t||!1),o.is("ul","ol")||o.appendBogus())),{previousBlock:o,nextBlock:a,wasStartOfBlock:n,wasEndOfBlock:i,elementPath:r}):null},splitElement:function(e,t){if(!this.collapsed)return null;this.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);var n=this.extractContents(!1,t||!1),t=e.clone(!1,t||!1);return n.appendTo(t),t.insertAfter(e),this.moveToPosition(e,CKEDITOR.POSITION_AFTER_END),t},removeEmptyBlocksAtEnd:(de=CKEDITOR.dom.walker.whitespaces(),ue=CKEDITOR.dom.walker.bookmark(!1),function(e){for(var t,n=this.createBookmark(),i=this[e?"endPath":"startPath"](),o=i.block||i.blockLimit;o&&!o.equals(i.root)&&!o.getFirst(function(t){return function(e){return!(de(e)||ue(e)||e.type==CKEDITOR.NODE_ELEMENT&&e.isEmptyInlineRemoveable()||t.is("table")&&e.is("caption"))}}(o));)t=o.getParent(),this[e?"setEndAt":"setStartAt"](o,CKEDITOR.POSITION_AFTER_END),o.remove(1),o=t;this.moveToBookmark(n)}),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,this.root)},checkBoundaryOfElement:function(e,t){var n,i,o,a=t==CKEDITOR.START,t=this.clone();return t.collapse(a),t[a?"setStartAt":"setEndAt"](e,a?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END),(t=new CKEDITOR.dom.walker(t)).evaluator=(n=a,i=CKEDITOR.dom.walker.whitespaces(),o=CKEDITOR.dom.walker.bookmark(1),function(e){return!(!o(e)&&!i(e))||(!n&&ge(e)||e.type==CKEDITOR.NODE_ELEMENT&&e.is(CKEDITOR.dtd.$removeEmpty))}),t[a?"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var e=this.startContainer,t=this.startOffset;return CKEDITOR.env.ie&&t&&e.type==CKEDITOR.NODE_TEXT&&(e=CKEDITOR.tools.ltrim(e.substring(0,t)),me.test(e)&&this.trim(0,1)),this.trim(),e=new CKEDITOR.dom.elementPath(this.startContainer,this.root),(t=this.clone()).collapse(!0),t.setStartAt(e.block||e.blockLimit,CKEDITOR.POSITION_AFTER_START),(e=new CKEDITOR.dom.walker(t)).evaluator=Ln(),e.checkBackward()},checkEndOfBlock:function(){var e=this.endContainer,t=this.endOffset;return CKEDITOR.env.ie&&e.type==CKEDITOR.NODE_TEXT&&(e=CKEDITOR.tools.rtrim(e.substring(t)),me.test(e)&&this.trim(1,0)),this.trim(),e=new CKEDITOR.dom.elementPath(this.endContainer,this.root),(t=this.clone()).collapse(!1),t.setEndAt(e.block||e.blockLimit,CKEDITOR.POSITION_BEFORE_END),(e=new CKEDITOR.dom.walker(t)).evaluator=Ln(),e.checkForward()},getPreviousNode:function(e,t,n){var i=this.clone();return i.collapse(1),i.setStartAt(n||this.root,CKEDITOR.POSITION_AFTER_START),(n=new CKEDITOR.dom.walker(i)).evaluator=e,n.guard=t,n.previous()},getNextNode:function(e,t,n){var i=this.clone();return i.collapse(),i.setEndAt(n||this.root,CKEDITOR.POSITION_BEFORE_END),(n=new CKEDITOR.dom.walker(i)).evaluator=e,n.guard=t,n.next()},checkReadOnly:function(){var e=this.startContainer,t=this.endContainer;return!(Pn(e,t)&&Pn(t,e))},moveToElementEditablePosition:function(e,t){if(e.type==CKEDITOR.NODE_ELEMENT&&!e.isEditable(!1))return this.moveToPosition(e,t?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),!0;for(var n=0;e;){if(e.type==CKEDITOR.NODE_TEXT){t&&this.endContainer&&this.checkEndOfBlock()&&me.test(e.getText())?this.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(e,t?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),n=1;break}if(e.type==CKEDITOR.NODE_ELEMENT)if(e.isEditable())this.moveToPosition(e,t?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),n=1;else if(t&&e.is("br")&&this.endContainer&&this.checkEndOfBlock())this.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START);else if("false"==e.getAttribute("contenteditable")&&e.is(CKEDITOR.dtd.$block))return this.setStartBefore(e),this.setEndAfter(e),!0;var i=e,o=n,a=void 0;i.type==CKEDITOR.NODE_ELEMENT&&i.isEditable(!1)&&(a=i[t?"getLast":"getFirst"](pe)),e=a=!o&&!a?i[t?"getPrevious":"getNext"](pe):a}return!!n},moveToClosestEditablePosition:function(e,t){var n,i,o=0,a=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];return e?(n=new CKEDITOR.dom.range(this.root)).moveToPosition(e,a[t?0:1]):n=this.clone(),e&&!e.is(CKEDITOR.dtd.$block)?o=1:(i=n[t?"getNextEditableNode":"getPreviousEditableNode"]())&&(o=1,(e=i.type==CKEDITOR.NODE_ELEMENT)&&i.is(CKEDITOR.dtd.$block)&&"false"==i.getAttribute("contenteditable")?(n.setStartAt(i,CKEDITOR.POSITION_BEFORE_START),n.setEndAt(i,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&e&&i.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(n.setEnd(i,0),n.collapse()):n.moveToPosition(i,a[t?1:0])),o&&this.moveToRange(n),!!o},moveToElementEditStart:function(e){return this.moveToElementEditablePosition(e)},moveToElementEditEnd:function(e){return this.moveToElementEditablePosition(e,!0)},getEnclosedNode:function(){if((e=this.clone()).optimize(),e.startContainer.type!=CKEDITOR.NODE_ELEMENT||e.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var e=new CKEDITOR.dom.walker(e),t=CKEDITOR.dom.walker.bookmark(!1,!0),n=CKEDITOR.dom.walker.whitespaces(!0);e.evaluator=function(e){return n(e)&&t(e)};var i=e.next();return e.reset(),i&&i.equals(e.previous())?i:null},getTouchedStartNode:function(){var e=this.startContainer;return!this.collapsed&&e.type==CKEDITOR.NODE_ELEMENT&&e.getChild(this.startOffset)||e},getTouchedEndNode:function(){var e=this.endContainer;return!this.collapsed&&e.type==CKEDITOR.NODE_ELEMENT&&e.getChild(this.endOffset-1)||e},getNextEditableNode:Fn(),getPreviousEditableNode:Fn(1),_getTableElement:function(e){e=e||{td:1,th:1,tr:1,tbody:1,thead:1,tfoot:1,table:1};var t=this.getTouchedStartNode(),n=this.getTouchedEndNode(),i=t.getAscendant("table",!0),n=n.getAscendant("table",!0);return i&&!this.root.contains(i)?null:this.getEnclosedNode()?this.getEnclosedNode().getAscendant(e,!0):i&&n&&(i.equals(n)||i.contains(n)||n.contains(i))?t.getAscendant(e,!0):null},scrollIntoView:function(){var e,t,n,i=new CKEDITOR.dom.element.createFromHtml("<span>&nbsp;</span>",this.document),o=this.clone();o.optimize(),(n=o.startContainer.type==CKEDITOR.NODE_TEXT)?(t=o.startContainer.getText(),e=o.startContainer.split(o.startOffset),i.insertAfter(o.startContainer)):o.insertNode(i),i.scrollIntoView(),n&&(o.startContainer.setText(t),e.remove()),i.remove()},getClientRects:function(){function r(e,n){var i,t,o,a=CKEDITOR.tools.array.map(e,function(e){return e}),e=new CKEDITOR.dom.range(n.root);if(n.startContainer instanceof CKEDITOR.dom.element&&(t=0===n.startOffset&&n.startContainer.hasAttribute("data-widget")),n.endContainer instanceof CKEDITOR.dom.element&&(o=(o=n.endOffset===(n.endContainer.getChildCount?n.endContainer.getChildCount():n.endContainer.length))&&n.endContainer.hasAttribute("data-widget")),t&&e.setStart(n.startContainer.getParent(),n.startContainer.getIndex()),o&&e.setEnd(n.endContainer.getParent(),n.endContainer.getIndex()+1),e=(n=t||o?e:n).cloneContents().find("[data-cke-widget-id]").toArray(),e=CKEDITOR.tools.array.map(e,function(e){var t=n.root.editor;return e=e.getAttribute("data-cke-widget-id"),t.widgets.instances[e].element}))return e=CKEDITOR.tools.array.map(e,function(e){var t=e.getParent().hasClass("cke_widget_wrapper")?e.getParent():e;return(i=this.root.getDocument().$.createRange()).setStart(t.getParent().$,t.getIndex()),i.setEnd(t.getParent().$,t.getIndex()+1),(t=i.getClientRects()).widgetRect=e.getClientRect(),t},n),CKEDITOR.tools.array.forEach(e,function(i){var o;!function e(n){CKEDITOR.tools.array.forEach(a,function(e,t){(CKEDITOR.tools.objectCompare(i[n],e)||CKEDITOR.tools.objectCompare(i.widgetRect,e))&&(Array.prototype.splice.call(a,t,i.length-n,i.widgetRect),o=!0)}),o||(n<a.length-1?e(n+1):a.push(i.widgetRect))}(0)}),a}function s(e,t,n){return e=CKEDITOR.tools.extend({},e),(e=t?CKEDITOR.tools.getAbsoluteRectPosition(n.document.getWindow(),e):e).width||(e.width=e.right-e.left),e.height||(e.height=e.bottom-e.top),e}function l(e){var t,n=e.startNode;return e=e.endNode,n.setText("​"),n.removeStyle("display"),e?(e.setText("​"),e.removeStyle("display"),t=[n.getClientRect(),e.getClientRect()],e.remove()):t=[n.getClientRect(),n.getClientRect()],n.remove(),{right:Math.max(t[0].right,t[1].right),bottom:Math.max(t[0].bottom,t[1].bottom),left:Math.min(t[0].left,t[1].left),top:Math.min(t[0].top,t[1].top),width:Math.abs(t[0].left-t[1].left),height:Math.max(t[0].bottom,t[1].bottom)-Math.min(t[0].top,t[1].top)}}return void 0!==this.document.getSelection?function(t){var e,n,i,o,a=this.root.getDocument().$.createRange();return a.setStart(this.startContainer.$,this.startOffset),a.setEnd(this.endContainer.$,this.endOffset),(e=r(e=a.getClientRects(),this)).length||(n=e,o=this,(i=a).collapsed?o.startContainer instanceof CKEDITOR.dom.element?(n=o.checkStartOfBlock(),a=new CKEDITOR.dom.text("​"),n?o.startContainer.append(a,!0):0===o.startOffset?a.insertBefore(o.startContainer.getFirst()):(o=o.startContainer.getChildren().getItem(o.startOffset-1),a.insertAfter(o)),i.setStart(a.$,0),i.setEnd(a.$,0),n=i.getClientRects(),a.remove()):o.startContainer instanceof CKEDITOR.dom.text&&(""===o.startContainer.getText()?(o.startContainer.setText("​"),n=i.getClientRects(),o.startContainer.setText("")):n=[l(o.createBookmark())]):n=[l(o.createBookmark())],e=n),CKEDITOR.tools.array.map(e,function(e){return s(e,t,this)},this)}:function(e){return[s(l(this.createBookmark()),e,this)]}}(),_setStartContainer:function(e){this.startContainer=e},_setEndContainer:function(e){this.endContainer=e},_find:function(e,t){var n,i,o,a,r=this.getCommonAncestor(),s=this.getBoundaryNodes(),l=[];if(r&&r.find)for(i=r.find(e),n=0;n<i.count();n++)r=i.getItem(n),!t&&r.isReadOnly()||(o=r.getPosition(s.startNode)&CKEDITOR.POSITION_FOLLOWING||s.startNode.equals(r),a=r.getPosition(s.endNode)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_IS_CONTAINED||s.endNode.equals(r),o&&a&&l.push(r));return l}},CKEDITOR.dom.range.mergeRanges=function(e){return CKEDITOR.tools.array.reduce(e,function(e,t){var n=e[e.length-1],i=!1;if((t=t.clone()).enlarge(CKEDITOR.ENLARGE_ELEMENT),n){var o=new CKEDITOR.dom.range(t.root),i=new CKEDITOR.dom.walker(o),a=CKEDITOR.dom.walker.whitespaces();for(o.setStart(n.endContainer,n.endOffset),o.setEnd(t.startContainer,t.startOffset),o=i.next();a(o)||t.endContainer.equals(o);)o=i.next();i=!o}return i?n.setEnd(t.endContainer,t.endOffset):e.push(t),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,re=/^[\r\n\t ]+$/,se=CKEDITOR.dom.walker.bookmark(!1,!0),le=CKEDITOR.dom.walker.whitespaces(!0),ce={dd:1,dt:1,li:1},kn.prototype={getNextParagraph:function(e){var t,n,i,o,a,r,s;if(e=e||"p",this._.nestedEditable){if(t=this._.nestedEditable.iterator.getNextParagraph(e))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,t;if(this.activeFilter=this.filter,wn(this,e,this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(e);this._.nestedEditable=null}if(!this.range.root.getDtd()[e])return null;for(this._.started||(r=(a=this.range.clone()).startPath(),s=a.endPath(),l=!a.collapsed&&Nn(a,r.block),c=!a.collapsed&&Nn(a,s.block,1),a.shrink(CKEDITOR.SHRINK_ELEMENT,!0),l&&a.setStartAt(r.block,CKEDITOR.POSITION_BEFORE_END),c&&a.setEndAt(s.block,CKEDITOR.POSITION_AFTER_START),r=a.endContainer.hasAscendant("pre",!0)||a.startContainer.hasAscendant("pre",!0),a.enlarge(this.forceBrBreak&&!r||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS),a.collapsed||(r=new CKEDITOR.dom.walker(a.clone()),s=CKEDITOR.dom.walker.bookmark(!0,!0),r.evaluator=s,this._.nextNode=r.next(),(r=new CKEDITOR.dom.walker(a.clone())).evaluator=s,r=r.previous(),this._.lastNode=r.getNextSourceNode(!0,null,a.root),this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&((s=this.range.clone()).moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),s.checkEndOfBlock()&&(s=new CKEDITOR.dom.elementPath(s.endContainer,s.root),this._.lastNode=(s.block||s.blockLimit).getNextSourceNode(!0))),this._.lastNode&&a.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=a.document.createText(""),this._.lastNode.insertAfter(r)),a=null),this._.started=1,r=a),s=this._.nextNode,a=this._.lastNode,this._.nextNode=null;s;){var l=0,c=s.hasAscendant("pre"),d=s.type!=CKEDITOR.NODE_ELEMENT,u=0;if(d)s.type==CKEDITOR.NODE_TEXT&&re.test(s.getText())&&(d=0);else{var h=s.getName();if(CKEDITOR.dtd.$block[h]&&"false"==s.getAttribute("contenteditable")){wn(this,e,t=s);break}if(s.isBlockBoundary(this.forceBrBreak&&!c&&{br:1})){if("br"==h)d=1;else if(!r&&!s.getChildCount()&&"hr"!=h){n=(t=s).equals(a);break}r&&(r.setEndAt(s,CKEDITOR.POSITION_BEFORE_START),"br"!=h&&(this._.nextNode=s)),l=1}else{if(s.getFirst()){r||(r=this.range.clone()).setStartAt(s,CKEDITOR.POSITION_BEFORE_START),s=s.getFirst();continue}d=1}}if(d&&!r&&(r=this.range.clone()).setStartAt(s,CKEDITOR.POSITION_BEFORE_START),n=(!l||d)&&s.equals(a),r&&!l)for(;!s.getNext(Sn)&&!n;){if((h=s.getParent()).isBlockBoundary(this.forceBrBreak&&!c&&{br:1})){l=1,d=0,n||h.equals(a),r.setEndAt(h,CKEDITOR.POSITION_BEFORE_END);break}d=1,n=(s=h).equals(a),u=1}if(d&&r.setEndAt(s,CKEDITOR.POSITION_AFTER_END),(n=!(s=this._getNextSourceNode(s,u,a)))||l&&r)break}if(!t){if(!r)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;s=(t=new CKEDITOR.dom.elementPath(r.startContainer,r.root)).blockLimit,l={div:1,th:1,td:1},!(t=t.block)&&s&&!this.enforceRealBlocks&&l[s.getName()]&&r.checkStartOfBlock()&&r.checkEndOfBlock()&&!s.equals(r.root)?t=s:!t||this.enforceRealBlocks&&t.is(ce)?(t=this.range.document.createElement(e),r.extractContents().appendTo(t),t.trim(),r.insertNode(t),i=o=!0):"li"!=t.getName()?r.checkStartOfBlock()&&r.checkEndOfBlock()||(t=t.clone(!1),r.extractContents().appendTo(t),t.trim(),i=!(o=r.splitBlock()).wasStartOfBlock,o=!o.wasEndOfBlock,r.insertNode(t)):n||(this._.nextNode=t.equals(a)?null:this._getNextSourceNode(r.getBoundaryNodes().endNode,1,a))}return(i=i&&t.getPrevious())&&i.type==CKEDITOR.NODE_ELEMENT&&("br"==i.getName()?i.remove():i.getLast()&&"br"==i.getLast().$.nodeName.toLowerCase()&&i.getLast().remove()),o&&(i=t.getLast())&&i.type==CKEDITOR.NODE_ELEMENT&&"br"==i.getName()&&(!CKEDITOR.env.needsBrFiller||i.getPrevious(se)||i.getNext(se))&&i.remove(),this._.nextNode||(this._.nextNode=n||t.equals(a)||!a?null:this._getNextSourceNode(t,1,a)),t},_getNextSourceNode:function(e,t,n){function i(e){return!(e.equals(n)||e.equals(o))}var o=this.range.root;for(e=e.getNextSourceNode(t,null,i);!se(e);)e=e.getNextSourceNode(t,null,i);return e}},CKEDITOR.dom.range.prototype.createIterator=function(){return new kn(this)},CKEDITOR.command=function(t,n){var i;this.uiItems=[],this.exec=function(e){return!(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())&&(this.editorFocus&&t.focus(),!1===this.fire("exec")||!1!==n.exec.call(this,t,e))},this.refresh=function(e,t){return!(this.readOnly||!e.readOnly)||(this.context&&!t.isContextFor(this.context)||!this.checkAllowed(!0)?(this.disable(),!0):(this.startDisabled||this.enable(),this.modes&&!this.modes[e.mode]&&this.disable(),!1===this.fire("refresh",{editor:e,path:t})||n.refresh&&!1!==n.refresh.apply(this,arguments)))},this.checkAllowed=function(e){return e||"boolean"!=typeof i?i=t.activeFilter.checkFeature(this):i},CKEDITOR.tools.extend(this,n,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!n.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&&void 0!==this.previousState?this.previousState:CKEDITOR.TRISTATE_OFF)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},setState:function(e){return!(this.state==e||e!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())&&(this.previousState=this.state,this.state=e,this.fire("state"),!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:"<!DOCTYPE html>",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(e,t,n,i,o){var a,r,s;for(a in e=[],t){r="boolean"==typeof(r=t[a])?{}:"function"==typeof r?{match:r}:K(r),"$"!=a.charAt(0)&&(r.elements=a),n&&(r.featureName=n.toLowerCase());var l=r;l.elements=T(l.elements,/\s+/)||null,l.propertiesOnly=l.propertiesOnly||!0===l.elements;var c=/\s*,\s*/,d=void 0;for(d in w){l[d]=T(l[d],c)||null;var u=l,h=N[d],f=T(l[N[d]],c),g=l[d],m=[],E=!0,p=void 0;for(p in f?E=!1:f={},g)"!"==p.charAt(0)&&(p=p.slice(1),m.push(p),f[p]=!0,E=!1);for(;p=m.pop();)g[p]=g["!"+p],delete g["!"+p];u[h]=!E&&f||null}l.match=l.match||null,i.push(r),e.push(r)}for(t=o.elements,o=o.generic,n=0,i=e.length;n<i;++n){for(c in r=!0===(a=K(e[n])).classes||!0===a.styles||!0===a.attributes,l=a,d=h=c=void 0,w)l[c]=function(t){if(!t)return!1;if(!0===t)return!0;var n=function(e){var t,n=[];for(t in e)-1<t.indexOf("*")&&n.push(t.replace(/\*/g,".*"));return n.length?new RegExp("^(?:"+n.join("|")+")$"):null}(t);return function(e){return e in t||n&&e.match(n)}}(l[c]);for(d in u=!0,N){for(g in f=[],g=void 0,h=l[c=N[d]])-1<g.indexOf("*")?f.push(new RegExp("^"+g.replace(/\*/g,".*")+"$")):f.push(g);(h=f).length&&(l[c]=h,u=!1)}if(l.nothingRequired=u,l.noProperties=!(l.attributes||l.classes||l.styles),!0===a.elements||null===a.elements)o[r?"unshift":"push"](a);else for(s in l=a.elements,delete a.elements,l)t[s]?t[s][r?"unshift":"push"](a):t[s]=[a]}}function C(e,t,n,i){if((!e.match||e.match(t))&&(i||function(e,t){if(e.nothingRequired)return!0;var n,i,o,a;if(o=e.requiredClasses)for(a=t.classes,n=0;n<o.length;++n)if("string"==typeof(i=o[n])){if(-1==CKEDITOR.tools.indexOf(a,i))return!1}else if(!CKEDITOR.tools.checkIfAnyArrayItemMatches(a,i))return!1;return c(t.styles,e.requiredStyles)&&c(t.attributes,e.requiredAttributes)}(e,t))&&(e.propertiesOnly||(n.valid=!0),n.allAttributes||(n.allAttributes=s(e.attributes,t.attributes,n.validAttributes)),n.allStyles||(n.allStyles=s(e.styles,t.styles,n.validStyles)),!n.allClasses)){if(e=e.classes,t=t.classes,i=n.validClasses,e)if(!0===e)e=!0;else{for(var o,a=0,r=t.length;a<r;++a)i[o=t[a]]||(i[o]=e(o));e=!1}else e=!1;n.allClasses=e}}function s(e,t,n){if(!e)return!1;if(!0===e)return!0;for(var i in t)n[i]||(n[i]=e(i));return!1}function I(e,t,n){if(!e.match||e.match(t)){if(e.noProperties)return!1;if(n.hadInvalidAttribute=r(e.attributes,t.attributes)||n.hadInvalidAttribute,n.hadInvalidStyle=r(e.styles,t.styles)||n.hadInvalidStyle,e=e.classes,t=t.classes,e){for(var i=!1,o=!0===e,a=t.length;a--;)(o||e(t[a]))&&(t.splice(a,1),i=!0);e=i}else e=!1;n.hadInvalidClass=e||n.hadInvalidClass}}function r(e,t){if(!e)return!1;var n,i=!1,o=!0===e;for(n in t)(o||e(n))&&(delete t[n],i=!0);return i}function l(e,t,n){return!(e.disabled||e.customConfig&&!n)&&t&&(e._.cachedChecks={})}function T(e,t){if(!e)return!1;if(!0===e)return e;if("string"==typeof e)return"*"==(e=_(e))||CKEDITOR.tools.convertArrayToObject(e.split(t));if(CKEDITOR.tools.isArray(e))return!!e.length&&CKEDITOR.tools.convertArrayToObject(e);var n,i={},o=0;for(n in e)i[n]=e[n],o++;return!!o&&i}function c(e,t){if(!t)return!0;for(var n,i=0;i<t.length;++i)if("string"==typeof(n=t[i])){if(!(n in e))return!1}else if(!CKEDITOR.tools.checkIfAnyObjectPropertyMatches(e,n))return!1;return!0}function d(e){if(!e)return{};e=e.split(/\s*,\s*/).sort();for(var t={};e.length;)t[e.shift()]="cke-test";return t}function u(e){var t,n,i,o,a={},r=1;for(e=_(e);t=e.match(S);)(n=t[2])?(i=h(n,"styles"),o=h(n,"attrs"),n=h(n,"classes")):i=o=n=null,a["$"+r++]={elements:t[1],classes:n,styles:i,attributes:o},e=e.slice(t[0].length);return a}function h(e,t){t=e.match(n[t]);return t?_(t[1]):null}function O(e){var t=e.styleBackup=e.attributes.style,n=e.classBackup=e.attributes.class;e.styles||(e.styles=CKEDITOR.tools.parseCssText(t||"",1)),e.classes||(e.classes=n?n.split(/\s+/):[])}function f(e,t,n,i){var o=0;if(i.toHtml&&(t.name=t.name.replace(x,"$1")),i.doCallbacks&&e.elementCallbacks){e:{for(var a,r=0,s=(a=e.elementCallbacks).length;r<s;++r)if(l=a[r](t)){a=l;break e}a=void 0}if(a)return a}if(i.doTransform&&(a=e._.transformations[t.name])){for(O(t),r=0;r<a.length;++r)v(e,t,a[r]);D(t)}if(i.doFilter){e:{r=t.name,e=(s=e._).allowedRules.elements[r],a=s.allowedRules.generic,r=s.disallowedRules.elements[r],s=s.disallowedRules.generic;var l=i.skipRequired,c={valid:!1,validAttributes:{},validClasses:{},validStyles:{},allAttributes:!1,allClasses:!1,allStyles:!1,hadInvalidAttribute:!1,hadInvalidClass:!1,hadInvalidStyle:!1};if(e||a){if(O(t),r)for(T=0,d=r.length;T<d;++T)if(!1===I(r[T],t,c)){e=null;break e}if(s)for(T=0,d=s.length;T<d;++T)I(s[T],t,c);if(e)for(T=0,d=e.length;T<d;++T)C(e[T],t,c,l);if(a)for(T=0,d=a.length;T<d;++T)C(a[T],t,c,l);e=c}else e=null}if(!e||!e.valid)return n.push(t),1;var d=e.validAttributes,u=e.validStyles;a=e.validClasses;var r=t.attributes,h=t.styles,s=t.classes;l=t.classBackup;var f,g,m=t.styleBackup,E=[],c=[],p=/^data-cke-/,T=!1;if(delete r.style,delete r.class,delete t.classBackup,delete t.styleBackup,!e.allAttributes)for(f in r)d[f]||p.test(f)&&(f==(g=f.replace(/^data-cke-saved-/,""))||d[g])||(delete r[f],T=!0);if(!e.allStyles||e.hadInvalidStyle){for(f in h)e.allStyles||u[f]?E.push(f+":"+h[f]):T=!0;E.length&&(r.style=E.sort().join("; "))}else m&&(r.style=m);if(!e.allClasses||e.hadInvalidClass){for(f=0;f<s.length;++f)(e.allClasses||a[s[f]])&&c.push(s[f]);c.length&&(r.class=c.sort().join(" ")),l&&c.length<l.split(/\s+/).length&&(T=!0)}else l&&(r.class=l);if(T&&(o=1),!i.skipFinalValidation&&!R(t))return n.push(t),1}return i.toHtml&&(t.name=t.name.replace(A,"cke:$1")),o}function D(e){var t,n=e.attributes;delete n.style,delete n.class,(t=CKEDITOR.tools.writeCssText(e.styles,!0))&&(n.style=t),e.classes.length&&(n.class=e.classes.sort().join(" "))}function R(e){switch(e.name){case"a":if(!(e.children.length||e.attributes.name||e.attributes.id))return;break;case"img":if(!e.attributes.src)return}return 1}function g(){return new CKEDITOR.htmlParser.element("br")}function m(e){return e.type==CKEDITOR.NODE_ELEMENT&&("br"==e.name||y.$block[e.name])}function E(e,t,n){var i=e.name;if(y.$empty[i]||!e.children.length)"hr"==i&&"br"==t?e.replaceWith(g()):(e.parent&&n.push({check:"it",el:e.parent}),e.remove());else if(y.$block[i]||"tr"==i)if("br"==t)e.previous&&!m(e.previous)&&(t=g()).insertBefore(e),e.next&&!m(e.next)&&(t=g()).insertAfter(e),e.replaceWithChildren();else{i=e.children;e:{for(var o,a=y[t],r=0,s=i.length;r<s;++r)if((o=i[r]).type==CKEDITOR.NODE_ELEMENT&&!a[o.name]){a=!1;break e}a=!0}if(a)e.name=t,e.attributes={},n.push({check:"parent-down",el:e});else{for(var l,c,r=(a=e.parent).type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||"body"==a.name,s=i.length;0<s;)o=i[--s],r&&(o.type==CKEDITOR.NODE_TEXT||o.type==CKEDITOR.NODE_ELEMENT&&y.$inline[o.name])?(l||((l=new CKEDITOR.htmlParser.element(t)).insertAfter(e),n.push({check:"parent-down",el:l})),l.add(o,0)):(l=null,c=y[a.name]||y.span,o.insertAfter(e),a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||o.type!=CKEDITOR.NODE_ELEMENT||c[o.name]||n.push({check:"el-up",el:o}));e.remove()}}else i in{style:1,script:1}?e.remove():(e.parent&&n.push({check:"it",el:e.parent}),e.replaceWithChildren())}function v(e,t,n){for(var i,o=0;o<n.length;++o)if(!((i=n[o]).check&&!e.check(i.check,!1)||i.left&&!i.left(t))){i.right(t,L);break}}function p(e,t){var n,i,o,a,r=t.getDefinition(),s=r.attributes,l=r.styles;if(e.name!=r.element)return!1;for(n in s)if("class"==n){for(r=s[n].split(/\s+/),o=e.classes.join("|");a=r.pop();)if(-1==o.indexOf(a))return!1}else if(e.attributes[n]!=s[n])return!1;for(i in l)if(e.styles[i]!=l[i])return!1;return!0}var o,b,y=CKEDITOR.dtd,K=CKEDITOR.tools.copy,_=CKEDITOR.tools.trim,k=["","p","br","div"];CKEDITOR.FILTER_SKIP_TREE=2,CKEDITOR.filter=function(e,t){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:{},cachedChecks:{}};var n,i=(CKEDITOR.filter.instances[this.id]=this).editor=e instanceof CKEDITOR.editor?e:null;i&&!t?(this.customConfig=!0)===(n=i.config.allowedContent)?this.disabled=!0:(n||(this.customConfig=!1),this.allow(n,"config",1),this.allow(i.config.extraAllowedContent,"extra",1),this.allow(k[i.enterMode]+" "+k[i.shiftEnterMode],"default",1),this.disallow(i.config.disallowedContent)):(this.customConfig=!1,this.allow(t||e,"default",1))},CKEDITOR.filter.instances={},CKEDITOR.filter.prototype={allow:function(e,t,n){if(!l(this,e,n))return!1;var i,o;if("string"==typeof e)e=u(e);else if(e instanceof CKEDITOR.style){if(e.toAllowedContentRules)return this.allow(e.toAllowedContentRules(this.editor),t,n);n=(i=e.getDefinition()).attributes,(e={})[i.element]=i={styles:i.styles,requiredStyles:i.styles&&CKEDITOR.tools.object.keys(i.styles)},n&&(n=K(n),i.classes=n.class?n.class.split(/\s+/):null,i.requiredClasses=i.classes,delete n.class,i.attributes=n,i.requiredAttributes=n&&CKEDITOR.tools.object.keys(n))}else if(CKEDITOR.tools.isArray(e)){for(i=0;i<e.length;++i)o=this.allow(e[i],t,n);return o}return a(this,e,t,this.allowedContent,this._.allowedRules),!0},applyTo:function(e,r,t,n){if(this.disabled)return!1;var s,i,o,l=this,c=[],d=this.editor&&this.editor.config.protectedSource,u=!1,h={doFilter:!t,doTransform:!0,doCallbacks:!0,toHtml:r};for(e.forEach(function(e){if(e.type==CKEDITOR.NODE_ELEMENT){if("off"==e.attributes["data-cke-filter"])return!1;if(!r||"span"!=e.name||!~CKEDITOR.tools.object.keys(e.attributes).join("|").indexOf("data-cke-"))if(1&(s=f(l,e,c,h)))u=!0;else if(2&s)return!1}else if(e.type==CKEDITOR.NODE_COMMENT&&e.value.match(/^\{cke_protected\}(?!\{C\})/)){e:{var t,n,i,o=decodeURIComponent(e.value.replace(/^\{cke_protected\}/,"")),a=[];if(d)for(n=0;n<d.length;++n)if((i=o.match(d[n]))&&i[0].length==o.length){a=!0;break e}1==(o=CKEDITOR.htmlParser.fragment.fromHtml(o)).children.length&&(t=o.children[0]).type==CKEDITOR.NODE_ELEMENT&&f(l,t,a,h),a=!a.length}a||c.push(e)}},null,!0),c.length&&(u=!0),e=[],n=k[n||(this.editor?this.editor.enterMode:CKEDITOR.ENTER_P)];t=c.pop();)t.type==CKEDITOR.NODE_ELEMENT?E(t,n,e):t.remove();for(;i=e.pop();)if((t=i.el).parent)switch(o=y[t.parent.name]||y.span,i.check){case"it":(!y.$removeEmpty[t.name]||t.children.length)&&R(t)||E(t,n,e);break;case"el-up":t.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||o[t.name]||E(t,n,e);break;case"parent-down":t.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||o[t.name]||E(t.parent,n,e)}return u},checkFeature:function(e){return!(!this.disabled&&e)||(!(e=e.toFeature?e.toFeature(this.editor):e).requiredContent||this.check(e.requiredContent))},disable:function(){this.disabled=!0},disallow:function(e){return!!l(this,e,!0)&&(a(this,e="string"==typeof e?u(e):e,null,this.disallowedContent,this._.disallowedRules),!0)},addContentForms:function(e){if(!this.disabled&&e){for(var t,n,i=[],o=0;o<e.length&&!n;++o)("string"==typeof(t=e[o])||t instanceof CKEDITOR.style)&&this.check(t)&&(n=t);if(n){for(o=0;o<e.length;++o)i.push(function(e,n){var t,i;return"string"==typeof e?t=e:i=e instanceof CKEDITOR.style?e:(t=e[0],e[1]),[{element:t,left:i,right:function(e,t){t.transform(e,n)}}]}(e[o],n));this.addTransformations(i)}}},addElementCallback:function(e){this.elementCallbacks||(this.elementCallbacks=[]),this.elementCallbacks.push(e)},addFeature:function(e){return!(!this.disabled&&e)||(e.toFeature&&(e=e.toFeature(this.editor)),this.allow(e.allowedContent,e.name),this.addTransformations(e.contentTransformations),this.addContentForms(e.contentForms),!e.requiredContent||!this.customConfig&&!this.disallowedContent.length||this.check(e.requiredContent))},addTransformations:function(e){if(!this.disabled&&e)for(var t=this._.transformations,n=0;n<e.length;++n){for(var i=e[n],o=void 0,a=void 0,r=void 0,s=void 0,l=void 0,c=void 0,d=[],a=0;a<i.length;++a)c="string"==typeof(r=i[a])?(s=(r=r.split(/\s*:\s*/))[0],l=null,r[1]):(s=r.check,l=r.left,r.right),o||(o=(o=r).element||(s?s.match(/^([a-z0-9]+)/i)[0]:o.left.getDefinition().element)),l instanceof CKEDITOR.style&&(l=function(t){return function(e){return p(e,t)}}(l)),d.push({check:s==o?null:s,left:l,right:"string"==typeof c?function(n){return function(e,t){t[n](e)}}(c):c});t[i=o]||(t[i]=[]),t[i].push(d)}},check:function(e,t,n){if(this.disabled)return!0;if(CKEDITOR.tools.isArray(e)){for(var i=e.length;i--;)if(this.check(e[i],t,n))return!0;return!1}var o;if("string"==typeof e){if((o=e+"<"+(!1===t?"0":"1")+(n?"1":"0")+">")in this._.cachedChecks)return this._.cachedChecks[o];var a,r=(a=u(e).$1).styles,i=a.classes;a.name=a.elements,a.classes=i=i?i.split(/\s*,\s*/):[],a.styles=d(r),a.attributes=d(a.attributes),a.children=[],i.length&&(a.attributes.class=i.join(" ")),r&&(a.attributes.style=CKEDITOR.tools.writeCssText(a.styles))}else r=(a=e.getDefinition()).styles,i=a.attributes||{},r&&!CKEDITOR.tools.isEmpty(r)?(r=K(r),i.style=CKEDITOR.tools.writeCssText(r,!0)):r={},a={name:a.element,attributes:i,classes:i.class?i.class.split(/\s+/):[],styles:r,children:[]};var s,r=CKEDITOR.tools.clone(a),l=[];if(!1!==t&&(s=this._.transformations[a.name])){for(i=0;i<s.length;++i)v(this,a,s[i]);D(a)}return f(this,r,l,{doFilter:!0,doTransform:!1!==t,skipRequired:!n,skipFinalValidation:!n}),0<l.length?n=!1:((t=a.attributes.class)&&(a.attributes.class=a.attributes.class.split(" ").sort().join(" ")),n=CKEDITOR.tools.objectCompare(a.attributes,r.attributes,!0),t&&(a.attributes.class=t)),"string"==typeof e&&(this._.cachedChecks[o]=n),n},getAllowedEnterMode:(o=["p","div","br"],b={p:CKEDITOR.ENTER_P,div:CKEDITOR.ENTER_DIV,br:CKEDITOR.ENTER_BR},function(e,t){var n,i=o.slice();if(this.check(k[e]))return e;for(t||(i=i.reverse());n=i.pop();)if(this.check(n))return b[n];return CKEDITOR.ENTER_BR}),clone:function(){var e=new CKEDITOR.filter,t=CKEDITOR.tools.clone;return e.allowedContent=t(this.allowedContent),e._.allowedRules=t(this._.allowedRules),e.disallowedContent=t(this.disallowedContent),e._.disallowedRules=t(this._.disallowedRules),e._.transformations=t(this._.transformations),e.disabled=this.disabled,e.editor=this.editor,e},destroy:function(){delete CKEDITOR.filter.instances[this.id],delete this._,delete this.allowedContent,delete this.disallowedContent}};var w={styles:1,attributes:1,classes:1},N={styles:"requiredStyles",attributes:"requiredAttributes",classes:"requiredClasses"},S=/^([a-z0-9\-*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,n={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},x=/^cke:(object|embed|param)$/,A=/^(object|embed|param)$/,L=CKEDITOR.filter.transformationsTools={sizeToStyle:function(e){this.lengthToStyle(e,"width"),this.lengthToStyle(e,"height")},sizeToAttribute:function(e){this.lengthToAttribute(e,"width"),this.lengthToAttribute(e,"height")},lengthToStyle:function(e,t,n){var i;(n=n||t)in e.styles||(i=e.attributes[t])&&(/^\d+$/.test(i)&&(i+="px"),e.styles[n]=i),delete e.attributes[t]},lengthToAttribute:function(e,t,n){var i,o;(n=n||t)in e.attributes||((o=(i=e.styles[t])&&i.match(/^(\d+)(?:\.\d*)?px$/))?e.attributes[n]=o[1]:"cke-test"==i&&(e.attributes[n]="cke-test")),delete e.styles[t]},alignmentToStyle:function(e){var t;"float"in e.styles||("left"!=(t=e.attributes.align)&&"right"!=t||(e.styles.float=t)),delete e.attributes.align},alignmentToAttribute:function(e){var t;"align"in e.attributes||("left"!=(t=e.styles.float)&&"right"!=t||(e.attributes.align=t)),delete e.styles.float},splitBorderShorthand:function(e){var t;e.styles.border&&((t=CKEDITOR.tools.style.parse.border(e.styles.border)).color&&(e.styles["border-color"]=t.color),t.style&&(e.styles["border-style"]=t.style),t.width&&(e.styles["border-width"]=t.width),delete e.styles.border)},listTypeToStyle:function(e){if(e.attributes.type)switch(e.attributes.type){case"a":e.styles["list-style-type"]="lower-alpha";break;case"A":e.styles["list-style-type"]="upper-alpha";break;case"i":e.styles["list-style-type"]="lower-roman";break;case"I":e.styles["list-style-type"]="upper-roman";break;case"1":e.styles["list-style-type"]="decimal";break;default:e.styles["list-style-type"]=e.attributes.type}},splitMarginShorthand:function(t){function e(e){t.styles["margin-top"]=n[e[0]],t.styles["margin-right"]=n[e[1]],t.styles["margin-bottom"]=n[e[2]],t.styles["margin-left"]=n[e[3]]}if(t.styles.margin){var n=t.styles.margin.match(/(auto|0|(?:\-?[\.\d]+(?:\w+|%)))/g)||["0px"];switch(n.length){case 1:e([0,0,0,0]);break;case 2:e([0,1,0,1]);break;case 3:e([0,1,2,1]);break;case 4:e([0,1,2,3])}delete t.styles.margin}},matchesStyle:p,transform:function(e,t){if("string"==typeof t)e.name=t;else{var n,i,o,a,r=t.getDefinition(),s=r.styles,l=r.attributes;for(n in e.name=r.element,l)if("class"==n)for(r=e.classes.join("|"),o=l[n].split(/\s+/);a=o.pop();)-1==r.indexOf(a)&&e.classes.push(a);else e.attributes[n]=l[n];for(i in s)e.styles[i]=s[i]}}}}(),CKEDITOR.focusManager=function(e){return e.focusManager||(this.hasFocus=!1,this.currentActive=null,this._={editor:e},this)},CKEDITOR.focusManager._={blurDelay:200},CKEDITOR.focusManager.prototype={focus:function(e){this._.timer&&clearTimeout(this._.timer),e&&(this.currentActive=e),this.hasFocus||this._.locked||((e=CKEDITOR.currentInstance)&&e.focusManager.blur(1),this.hasFocus=!0,(e=this._.editor.container)&&e.addClass("cke_focus"),this._.editor.fire("focus"))},lock:function(){this._.locked=1},unlock:function(){delete this._.locked},blur:function(e){function t(){var e;this.hasFocus&&(this.hasFocus=!1,(e=this._.editor.container)&&e.removeClass("cke_focus"),this._.editor.fire("blur"))}var n;this._.locked||(this._.timer&&clearTimeout(this._.timer),n=CKEDITOR.focusManager._.blurDelay,e||!n?t.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer,t.call(this)},n,this))},add:function(e,t){var n,i,o=e.getCustomData("focusmanager");o&&o==this||(o&&o.remove(e),o="focus",n="blur",t&&(CKEDITOR.env.ie?(o="focusin",n="focusout"):CKEDITOR.event.useCapture=1),i={blur:function(){e.equals(this.currentActive)&&this.blur()},focus:function(){this.focus(e)}},e.on(o,i.focus,this),e.on(n,i.blur,this),t&&(CKEDITOR.event.useCapture=0),e.setCustomData("focusmanager",this),e.setCustomData("focusmanager_handlers",i))},remove:function(e){e.removeCustomData("focusmanager");var t=e.removeCustomData("focusmanager_handlers");e.removeListener("blur",t.blur),e.removeListener("focus",t.focus)}},CKEDITOR.keystrokeHandler=function(e){return e.keystrokeHandler||(this.keystrokes={},this.blockedKeystrokes={},this._={editor:e},this)},CKEDITOR.keystrokeHandler.prototype={attach:function(e){e.on("keydown",Kn,this),CKEDITOR.env.gecko&&CKEDITOR.env.mac&&e.on("keypress",_n,this)}},CKEDITOR.lang={languages:{af:1,ar:1,az:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,"en-au":1,"en-ca":1,"en-gb":1,en:1,eo:1,es:1,"es-mx":1,et:1,eu:1,fa:1,fi:1,fo:1,"fr-ca":1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,is:1,it:1,ja:1,ka:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,ms:1,nb:1,nl:1,no:1,oc:1,pl:1,"pt-br":1,pt:1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,"sr-latn":1,sr:1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,"zh-cn":1,zh:1},rtl:{ar:1,fa:1,he:1,ku:1,ug:1},load:function(e,t,n){e&&CKEDITOR.lang.languages[e]||(e=this.detect(t,e));var i=this;t=function(){i[e].dir=i.rtl[e]?"rtl":"ltr",n(e,i[e])},this[e]?t():CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+e+".js"),t,this)},detect:function(e,t){var n=this.languages,i=(t=(t=t||navigator.userLanguage||navigator.language||e).toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/))[1],t=t[2];return n[i+"-"+t]?i=i+"-"+t:n[i]||(i=null),CKEDITOR.lang.detect=i?function(){return i}:function(e){return e},i||e}},CKEDITOR.scriptLoader=(ie={},oe={},{load:function(e,i,t,n){var o="string"==typeof e;o&&(e=[e]),t=t||CKEDITOR;function a(e){i&&(o?i.call(t,e):i.call(t,l,c))}var r=e.length,s=r,l=[],c=[];if(0===s)a(!0);else{function d(e,t){(t?l:c).push(e),--s<=0&&(n&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),a(t))}function u(e,t){ie[e]=1;var n=oe[e];delete oe[e];for(var i=0;i<n.length;i++)n[i](e,t)}n&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var h=0;h<r;h++)!function(e){var t,n;ie[e]?d(e,!0):((t=oe[e]||(oe[e]=[])).push(d),1<t.length||((n=new CKEDITOR.dom.element("script")).setAttributes({type:"text/javascript",src:e}),i&&(CKEDITOR.env.ie&&(CKEDITOR.env.version<=8||CKEDITOR.env.ie9Compat)?n.$.onreadystatechange=function(){"loaded"!=n.$.readyState&&"complete"!=n.$.readyState||(n.$.onreadystatechange=null,u(e,!0))}:(n.$.onload=function(){setTimeout(function(){n.$.onload=null,n.$.onerror=null,u(e,!0)},0)},n.$.onerror=function(){n.$.onload=null,n.$.onerror=null,u(e,!1)})),n.appendTo(CKEDITOR.document.getHead())))}(e[h])}},queue:(ne=[],function(e,t){var n=this;ne.push({scriptUrl:e,callback:function(){t&&t.apply(this,arguments),ne.shift(),yn.call(n)}}),1==ne.length&&yn.call(this)})}),CKEDITOR.resourceManager=function(e,t){this.basePath=e,this.fileName=t,this.registered={},this.loaded={},this.externals={},this._={waitingList:{}}},CKEDITOR.resourceManager.prototype={add:function(e,t){if(this.registered[e])throw Error('[CKEDITOR.resourceManager.add] The resource name "'+e+'" is already registered.');t=this.registered[e]=t||{};return t.name=e,t.path=this.getPath(e),CKEDITOR.fire(e+CKEDITOR.tools.capitalize(this.fileName)+"Ready",t),this.get(e)},get:function(e){return this.registered[e]||null},getPath:function(e){var t=this.externals[e];return CKEDITOR.getUrl(t&&t.dir||this.basePath+e+"/")},getFilePath:function(e){var t=this.externals[e];return CKEDITOR.getUrl(this.getPath(e)+(t?t.file:this.fileName+".js"))},addExternal:function(e,t,n){n||(t=t.replace(/[^\/]+$/,function(e){return n=e,""})),n=n||this.fileName+".js",e=e.split(",");for(var i=0;i<e.length;i++)this.externals[e[i]]={dir:t,file:n}},load:function(e,r,s){CKEDITOR.tools.isArray(e)||(e=e?[e]:[]);for(var l=this.loaded,t=this.registered,n=[],c={},d={},i=0;i<e.length;i++){var o,a=e[i];a&&(l[a]||t[a]?d[a]=this.get(a):(o=this.getFilePath(a),n.push(o),o in c||(c[o]=[]),c[o].push(a)))}CKEDITOR.scriptLoader.load(n,function(e,t){if(t.length)throw Error('[CKEDITOR.resourceManager.load] Resource name "'+c[t[0]].join(",")+'" was not found at "'+t[0]+'".');for(var n=0;n<e.length;n++)for(var i=c[e[n]],o=0;o<i.length;o++){var a=i[o];d[a]=this.get(a),l[a]=1}r.call(s,d)},this)}},CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin"),CKEDITOR.plugins.load=CKEDITOR.tools.override(CKEDITOR.plugins.load,function(t){var u={};return function(e,s,l){var c={},d=function(e){t.call(this,e,function(e){CKEDITOR.tools.extend(c,e);var t,n=[];for(t in e){var i=e[t],o=i&&i.requires;if(!u[t]){if(i.icons)for(var a=i.icons.split(","),r=a.length;r--;)CKEDITOR.skin.addIcon(a[r],i.path+"icons/"+(CKEDITOR.env.hidpi&&i.hidpi?"hidpi/":"")+a[r]+".png");i.isSupportedEnvironment=i.isSupportedEnvironment||function(){return!0},u[t]=1}if(o)for(o.split&&(o=o.split(",")),i=0;i<o.length;i++)c[o[i]]||n.push(o[i])}if(n.length)d.call(this,n);else{for(t in c)i=c[t],i.onLoad&&!i.onLoad._called&&(!1===i.onLoad()&&delete c[t],i.onLoad._called=1);s&&s.call(l||window,c)}},this)};d.call(this,e)}}),CKEDITOR.plugins.setLang=function(e,t,n){var i=this.get(e);e=i.langEntries||(i.langEntries={}),(i=i.lang||(i.lang=[])).split&&(i=i.split(",")),-1==CKEDITOR.tools.indexOf(i,t)&&i.push(t),e[t]=n},CKEDITOR.ui=function(e){return e.ui||(this.items={},this.instances={},this.editor=e,this._={handlers:{}},this)},CKEDITOR.ui.prototype={add:function(e,t,n){n.name=e.toLowerCase();var i=this.items[e]={type:t,command:n.command||null,args:Array.prototype.slice.call(arguments,2)};CKEDITOR.tools.extend(i,n)},get:function(e){return this.instances[e]},create:function(e){var t=this.items[e],n=t&&this._.handlers[t.type],i=t&&t.command&&this.editor.getCommand(t.command),n=n&&n.create.apply(this,t.args);return this.instances[e]=n,i&&i.uiItems.push(n),n&&!n.type&&(n.type=t.type),n},addHandler:function(e,t){this._.handlers[e]=t},space:function(e){return CKEDITOR.document.getById(this.spaceId(e))},spaceId:function(e){return this.editor.id+"_"+e}},CKEDITOR.event.implementOn(CKEDITOR.ui),function(){function e(e,t,n){if(CKEDITOR.event.call(this),e=e&&CKEDITOR.tools.clone(e),void 0!==t){if(!(t instanceof CKEDITOR.dom.element))throw Error("Expect element of type CKEDITOR.dom.element.");if(!n)throw Error("One of the element modes must be specified.");if(CKEDITOR.env.ie&&CKEDITOR.env.quirks&&n==CKEDITOR.ELEMENT_MODE_INLINE)throw Error("Inline element mode is not supported on IE quirks.");if(i=t,!((o=n)==CKEDITOR.ELEMENT_MODE_INLINE?i.is(CKEDITOR.dtd.$editable)||i.is("textarea"):o==CKEDITOR.ELEMENT_MODE_REPLACE?!i.is(CKEDITOR.dtd.$nonBodyContent):1))throw Error('The specified element mode is not supported on element: "'+t.getName()+'".');this.element=t,this.elementMode=n,this.name=this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO&&(t.getId()||t.getNameAtt())}else this.elementMode=CKEDITOR.ELEMENT_MODE_NONE;var i,o;this._={},this.commands={},this.templates={},this.name=this.name||function(){do{var e="editor"+ ++s}while(CKEDITOR.instances[e]);return e}(),this.id=CKEDITOR.tools.getNextId(),this.status="unloaded",this.config=CKEDITOR.tools.prototypedCopy(CKEDITOR.config),this.ui=new CKEDITOR.ui(this),this.focusManager=new CKEDITOR.focusManager(this),this.keystrokeHandler=new CKEDITOR.keystrokeHandler(this),this.on("readOnly",a),this.on("selectionChange",function(e){r(this,e.data.path)}),this.on("activeFilterChange",function(){r(this,this.elementPath(),!0)}),this.on("mode",a),CKEDITOR.dom.selection.setupEditorOptimization(this),this.on("instanceReady",function(){var e;this.config.startupFocus&&("end"===this.config.startupFocus&&((e=this.createRange()).selectNodeContents(this.editable()),e.shrink(CKEDITOR.SHRINK_ELEMENT,!0),e.collapse(),this.getSelection().selectRanges([e])),this.focus())}),CKEDITOR.fire("instanceCreated",null,this),CKEDITOR.add(this),CKEDITOR.tools.setTimeout(function(){var n,i;this.isDestroyed()||this.isDetached()||(i=e,(n=this).on("customConfigLoaded",function(){if(i){if(i.on)for(var e in i.on)n.on(e,i.on[e]);CKEDITOR.tools.extend(n.config,i,!0),delete n.config.on}var t,e=n.config;n.readOnly=!!e.readOnly||(n.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?n.element.is("textarea")?n.element.hasAttribute("disabled")||n.element.hasAttribute("readonly"):n.element.isReadOnly():n.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(n.element.hasAttribute("disabled")||n.element.hasAttribute("readonly"))),n.blockless=n.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&!(n.element.is("textarea")||CKEDITOR.dtd[n.element.getName()].p),n.tabIndex=e.tabIndex||n.element&&n.element.getAttribute("tabindex")||0,n.activeEnterMode=n.enterMode=n.blockless?CKEDITOR.ENTER_BR:e.enterMode,n.activeShiftEnterMode=n.shiftEnterMode=n.blockless?CKEDITOR.ENTER_BR:e.shiftEnterMode,e.skin&&(CKEDITOR.skinName=e.skin),n.fireOnce("configLoaded"),n.dataProcessor=new CKEDITOR.htmlDataProcessor(n),n.filter=n.activeFilter=new CKEDITOR.filter(n),t=n,CKEDITOR.skin.loadPart("editor",function(){var o;o=t,CKEDITOR.lang.load(o.config.language,o.config.defaultLanguage,function(e,t){var n,i=o.config.title;o.langCode=e,o.lang=CKEDITOR.tools.prototypedCopy(t),o.title="string"==typeof i||!1===i?i:[o.lang.editor,o.name].join(", "),o.config.contentsLangDirection||(o.config.contentsLangDirection=o.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?o.element.getDirection(1):o.lang.dir),o.fire("langLoaded"),(n=o).getStylesSet(function(e){n.once("loaded",function(){n.fire("stylesSet",{styles:e})},null,null,1),function(d){function e(e){return e?(e=CKEDITOR.tools.isArray(e)?e.join(","):e).replace(/\s/g,""):""}var u=d.config,t=e(u.plugins),n=e(u.extraPlugins),i=e(u.removePlugins);{var o;n&&(o=new RegExp("(?:^|,)(?:"+n.replace(/,/g,"|")+")(?=,|$)","g"),t=(t=t.replace(o,""))+","+n)}{var h;i&&(h=new RegExp("(?:^|,)(?:"+i.replace(/,/g,"|")+")(?=,|$)","g"),t=t.replace(h,""))}CKEDITOR.env.air&&(t+=",adobeair"),CKEDITOR.plugins.load(t.split(","),function(e){var t,o=[],a=[],n=[];for(t in d.plugins=CKEDITOR.tools.extend({},d.plugins,e),e){var i,r=e[t],s=r.lang,l=null,c=r.requires;if((c=CKEDITOR.tools.isArray(c)?c.join(","):c)&&(i=c.match(h)))for(;c=i.pop();)CKEDITOR.error("editor-plugin-required",{plugin:c.replace(",",""),requiredBy:t});s&&!d.lang[t]&&(s.split&&(s=s.split(",")),l=0<=CKEDITOR.tools.indexOf(s,d.langCode)?d.langCode:(l=d.langCode.replace(/-.*/,""))!=d.langCode&&0<=CKEDITOR.tools.indexOf(s,l)?l:0<=CKEDITOR.tools.indexOf(s,"en")?"en":s[0],r.langEntries&&r.langEntries[l]?(d.lang[t]=r.langEntries[l],l=null):n.push(CKEDITOR.getUrl(r.path+"lang/"+l+".js"))),a.push(l),o.push(r)}CKEDITOR.scriptLoader.load(n,function(){if(!d.isDestroyed()&&!d.isDetached()){for(var e=["beforeInit","init","afterInit"],t=0;t<e.length;t++)for(var n=0;n<o.length;n++){var i=o[n];0===t&&a[n]&&i.lang&&i.langEntries&&(d.lang[i.name]=i.langEntries[a[n]]),i[e[t]]&&i[e[t]](d)}for(d.fireOnce("pluginsLoaded"),u.keystrokes&&d.setKeystroke(d.config.keystrokes),n=0;n<d.config.blockedKeystrokes.length;n++)d.keystrokeHandler.blockedKeystrokes[d.config.blockedKeystrokes[n]]=1;d.status="loaded",d.fireOnce("loaded"),CKEDITOR.fire("instanceLoaded",null,d)}})})}(n)})})})}),i&&null!=i.customConfig&&(n.config.customConfig=i.customConfig),function e(t){var n=t.config.customConfig;if(!n)return!1;var n=CKEDITOR.getUrl(n),i=l[n]||(l[n]={});i.fn?(i.fn.call(t,t.config),CKEDITOR.getUrl(t.config.customConfig)!=n&&e(t)||t.fireOnce("customConfigLoaded")):CKEDITOR.scriptLoader.queue(n,function(){i.fn=i.fn||CKEDITOR.editorConfig||function(){},e(t)});return!0}(n)||n.fireOnce("customConfigLoaded"))},0,this)}function a(){var e,t=this.commands;for(e in t)n(this,t[e])}function n(e,t){t[!t.startDisabled&&(!e.readOnly||t.readOnly)&&t.modes[e.mode]?"enable":"disable"]()}function r(e,t,n){if(t){var i,o,a=e.commands;for(o in a)i=a[o],(n||i.contextSensitive)&&i.refresh(e,t)}}function i(){var e=this.element;if(e&&this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO){var t=this.getData();return this.config.htmlEncodeOutput&&(t=CKEDITOR.tools.htmlEncode(t)),e.is("textarea")?e.setValue(t):e.setHtml(t),!0}return!1}e.prototype=CKEDITOR.editor.prototype,CKEDITOR.editor=e;var s=0,l={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{plugins:{detectConflict:function(e,t){for(var n=0;n<t.length;n++){var i=t[n];if(this[i])return CKEDITOR.warn("editor-plugin-conflict",{plugin:e,replacedWith:i}),!0}return!1}},addCommand:function(e,t){t.name=e.toLowerCase();t=t instanceof CKEDITOR.command?t:new CKEDITOR.command(this,t);return this.mode&&n(this,t),this.commands[e]=t},_attachToForm:function(){function t(e){n.updateElement(),n._.required&&!i.getValue()&&!1===n.fire("required")&&e.data.preventDefault()}var e,n=this,i=n.element,o=new CKEDITOR.dom.element(i.$.form);i.is("textarea")&&o&&(o.on("submit",t),(e=o.$.submit)&&e.call&&e.apply&&(o.$.submit=CKEDITOR.tools.override(o.$.submit,function(e){return function(){t(),e.apply?e.apply(this):e()}})),n.on("destroy",function(){o.removeListener("submit",t)}))},destroy:function(e){var t=CKEDITOR.filter.instances,n=this;this.fire("beforeDestroy"),e||i.call(this),this.editable(null),this.filter&&delete this.filter,CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(t),function(e){e=t[e],n===e.editor&&e.destroy()}),delete this.activeFilter,this.status="destroyed",this.fire("destroy"),this.removeAllListeners(),CKEDITOR.remove(this),CKEDITOR.fire("instanceDestroyed",null,this)},elementPath:function(e){if(!e){if(!(e=this.getSelection()))return null;e=e.getStartElement()}return e?new CKEDITOR.dom.elementPath(e,this.editable()):null},createRange:function(){var e=this.editable();return e?new CKEDITOR.dom.range(e):null},execCommand:function(e,t){var n=this.getCommand(e),t={name:e,commandData:t||{},command:n};return!(!n||n.state==CKEDITOR.TRISTATE_DISABLED||!1===this.fire("beforeCommandExec",t)||(t.returnValue=n.exec(t.commandData),n.async||!1===this.fire("afterCommandExec",t)))&&t.returnValue},getCommand:function(e){return this.commands[e]},getData:function(e){e||this.fire("beforeGetData");var t={dataValue:t="string"!=typeof(t=this._.data)?(t=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?t.is("textarea")?t.getValue():t.getHtml():"":t};return e||this.fire("getData",t),t.dataValue},getSnapshot:function(){var e=this.fire("getSnapshot");return e="string"!=typeof e?(e=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?e.is("textarea")?e.getValue():e.getHtml():"":e},loadSnapshot:function(e){this.fire("loadSnapshot",e)},setData:function(e,t,n){var i=!0,o=t;t&&"object"==typeof t&&(n=t.internal,o=t.callback,i=!t.noSnapshot),!n&&i&&this.fire("saveSnapshot"),!o&&n||this.once("dataReady",function(e){!n&&i&&this.fire("saveSnapshot"),o&&o.call(e.editor)}),e={dataValue:e},n||this.fire("setData",e),this._.data=e.dataValue,n||this.fire("afterSetData",e)},setReadOnly:function(e){this.readOnly!=(e=null==e||e)&&(this.readOnly=e,this.keystrokeHandler.blockedKeystrokes[8]=+e,this.editable().setReadOnly(e),this.fire("readOnly"))},insertHtml:function(e,t,n){this.fire("insertHtml",{dataValue:e,mode:t,range:n})},insertText:function(e){this.fire("insertText",e)},insertElement:function(e){this.fire("insertElement",e)},getSelectedHtml:function(e){var t=this.editable(),n=(n=this.getSelection())&&n.getRanges();return t&&n&&0!==n.length?(t=function(e,t){for(var n,i,o,a,r,s,l=new CKEDITOR.dom.documentFragment,c=0;c<e.length;c++){var d=e[c],u=d.startContainer.getAscendant("tr",!0);s=r=void 0,r=(a=d).startContainer,s=a.endContainer,!r.is||!(r.is("tr")||r.is("td")&&r.equals(s)&&a.endOffset===r.getChildCount())?l.append(d.cloneContents()):(n||((n=u.getAscendant("table").clone()).append(u.getAscendant({thead:1,tbody:1,tfoot:1}).clone()),l.append(n),n=n.findOne("thead, tbody, tfoot")),i&&i.equals(u)||(o=(i=u).clone(),n.append(o)),o.append((u=void 0,(u=(d=d).startContainer).is("tr")?d.cloneContents():u.clone(!0))))}return n?l:t.getHtmlFromRange(e[0])}(n,t),e?t.getHtml():t):null},extractSelectedHtml:function(e,t){var n,i=this.editable(),o=this.getSelection().getRanges(),a=new CKEDITOR.dom.documentFragment;if(!i||0===o.length)return null;for(n=0;n<o.length;n++)a.append(i.extractHtmlFromRange(o[n],t));return t||this.getSelection().selectRanges([o[0]]),e?a.getHtml():a},focus:function(){this.fire("beforeFocus")},checkDirty:function(){return"ready"==this.status&&this._.previousValue!==this.getSnapshot()},resetDirty:function(){this._.previousValue=this.getSnapshot()},updateElement:function(){return i.call(this)},setKeystroke:function(){for(var e,t,n=this.keystrokeHandler.keystrokes,i=CKEDITOR.tools.isArray(arguments[0])?arguments[0]:[[].slice.call(arguments,0)],o=i.length;o--;)e=i[o],t=0,CKEDITOR.tools.isArray(e)&&(t=e[1],e=e[0]),t?n[e]=t:delete n[e]},getCommandKeystroke:function(e,t){var e="string"==typeof e?this.getCommand(e):e,n=[];if(e){var i=CKEDITOR.tools.object.findKey(this.commands,e),o=this.keystrokeHandler.keystrokes;if(e.fakeKeystroke)n.push(e.fakeKeystroke);else for(var a in o)o[a]===i&&n.push(a)}return t?n:n[0]||null},addFeature:function(e){return this.filter.addFeature(e)},setActiveFilter:function(e){e=e||this.filter,this.activeFilter!==e&&(this.activeFilter=e,this.fire("activeFilterChange"),e===this.filter?this.setActiveEnterMode(null,null):this.setActiveEnterMode(e.getAllowedEnterMode(this.enterMode),e.getAllowedEnterMode(this.shiftEnterMode,!0)))},setActiveEnterMode:function(e,t){e=e?this.blockless?CKEDITOR.ENTER_BR:e:this.enterMode,t=t?this.blockless?CKEDITOR.ENTER_BR:t:this.shiftEnterMode,this.activeEnterMode==e&&this.activeShiftEnterMode==t||(this.activeEnterMode=e,this.activeShiftEnterMode=t,this.fire("activeEnterModeChange"))},showNotification:function(e){alert(e)},isDetached:function(){return!!this.container&&this.container.isDetached()},isDestroyed:function(){return"destroyed"===this.status}}),CKEDITOR.editor._getEditorElement=function(e){if(!CKEDITOR.env.isCompatible)return null;var t=CKEDITOR.dom.element.get(e);return t?t.getEditor()?(CKEDITOR.error("editor-element-conflict",{editorName:t.getEditor().name}),null):t:(CKEDITOR.error("editor-incorrect-element",{element:e}),null)}}(),CKEDITOR.ELEMENT_MODE_NONE=0,CKEDITOR.ELEMENT_MODE_REPLACE=1,CKEDITOR.ELEMENT_MODE_APPENDTO=2,CKEDITOR.ELEMENT_MODE_INLINE=3,CKEDITOR.htmlParser=function(){this._={htmlPartsRegex:/<(?:(?:\/([^>]+)>)|(?:!--([\S|\s]*?)--!?>)|(?:([^\/\s>]+)((?:\s+[\w\-:.]+(?:\s*=\s*?(?:(?:"[^"]*")|(?:'[^']*')|[^\s"'\/>]+))?)*)[\S\s]*?(\/?)>))/g}},ee=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,te={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1},CKEDITOR.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(e){for(var t,n,i=0;r=this._.htmlPartsRegex.exec(e);)if(i<(t=r.index)&&(i=e.substring(i,t),n?n.push(i):this.onText(i)),i=this._.htmlPartsRegex.lastIndex,!(t=r[1])||(t=t.toLowerCase(),n&&CKEDITOR.dtd.$cdata[t]&&(this.onCDATA(n.join("")),n=null),n))if(n)n.push(r[0]);else if(t=r[3]){if(t=t.toLowerCase(),!/="/.test(t)){var o={},a=r[4],r=!!r[5];if(a)for(;l=ee.exec(a);){var s=l[1].toLowerCase(),l=l[2]||l[3]||l[4]||"";o[s]=!l&&te[s]?s:CKEDITOR.tools.htmlDecodeAttr(l)}this.onTagOpen(t,o,r),!n&&CKEDITOR.dtd.$cdata[t]&&(n=[])}}else(t=r[2])&&this.onComment(t);else this.onTagClose(t);e.length>i&&this.onText(e.substring(i,e.length))}},CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(e){this._.output.push("<",e)},openTagClose:function(e,t){t?this._.output.push(" />"):this._.output.push(">")},attribute:function(e,t){"string"==typeof t&&(t=CKEDITOR.tools.htmlEncodeAttr(t)),this._.output.push(" ",e,'="',t,'"')},closeTag:function(e){this._.output.push("</",e,">")},text:function(e){this._.output.push(e)},comment:function(e){this._.output.push("\x3c!--",e,"--\x3e")},write:function(e){this._.output.push(e)},reset:function(){this._.output=[],this._.indent=!1},getHtml:function(e){var t=this._.output.join("");return e&&this.reset(),t}}}),CKEDITOR.htmlParser.node=function(){},CKEDITOR.htmlParser.node.prototype={remove:function(){var e=this.parent.children,t=CKEDITOR.tools.indexOf(e,this),n=this.previous,i=this.next;n&&(n.next=i),i&&(i.previous=n),e.splice(t,1),this.parent=null},replaceWith:function(e){var t=this.parent.children,n=CKEDITOR.tools.indexOf(t,this),i=e.previous=this.previous,o=e.next=this.next;i&&(i.next=e),o&&(o.previous=e),(t[n]=e).parent=this.parent,this.parent=null},insertAfter:function(e){var t=e.parent.children,n=CKEDITOR.tools.indexOf(t,e),i=e.next;t.splice(n+1,0,this),this.next=e.next,(this.previous=e).next=this,i&&(i.previous=this),this.parent=e.parent},insertBefore:function(e){var t=e.parent.children,n=CKEDITOR.tools.indexOf(t,e);t.splice(n,0,this),this.next=e,(this.previous=e.previous)&&(e.previous.next=this),(e.previous=this).parent=e.parent},getAscendant:function(t){for(var e="function"==typeof t?t:"string"==typeof t?function(e){return e.name==t}:function(e){return e.name in t},n=this.parent;n&&n.type==CKEDITOR.NODE_ELEMENT;){if(e(n))return n;n=n.parent}return null},wrapWith:function(e){return this.replaceWith(e),e.add(this),e},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(e){return e||{}}},CKEDITOR.htmlParser.comment=function(e){this.value=e,this._={isBlockLike:!1}},CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(e,t){var n=this.value;return(n=e.onComment(t,n,this))?"string"!=typeof n?(this.replaceWith(n),!1):(this.value=n,!0):(this.remove(),!1)},writeHtml:function(e,t){t&&this.filter(t),e.comment(this.value)}}),CKEDITOR.htmlParser.text=function(e){this.value=e,this._={isBlockLike:!1}},CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(e,t){if(!(this.value=e.onText(t,this.value,this)))return this.remove(),!1},writeHtml:function(e,t){t&&this.filter(t),e.text(this.value)}}),CKEDITOR.htmlParser.cdata=function(e){this.value=e},CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(e){e.write(this.value)}}),CKEDITOR.htmlParser.fragment=function(){this.children=[],this.parent=null,this._={isBlockLike:!0,hasInlineStarted:!1}},Y=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),Z={ol:1,ul:1},J=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),Q={ul:"li",ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"},CKEDITOR.htmlParser.fragment.fromHtml=function(e,t,r){function o(e){var t;if(0<f.length)for(var n=0;n<f.length;n++){var i=f[n],o=i.name,a=CKEDITOR.dtd[o],r=m.name&&CKEDITOR.dtd[m.name];r&&!r[o]||e&&a&&!a[e]&&CKEDITOR.dtd[e]?o==m.name&&(l(m,m.parent,1),n--):(t||(s(),t=1),(i=i.clone()).parent=m,m=i,f.splice(n,1),n--)}}function s(){for(;g.length;)l(g.shift(),m)}function a(e){var t,n,i;e._.isBlockLike&&"pre"!=e.name&&"textarea"!=e.name&&(t=e.children.length,(n=e.children[t-1])&&n.type==CKEDITOR.NODE_TEXT&&((i=CKEDITOR.tools.rtrim(n.value))?n.value=i:e.children.length=t-1))}function l(e,t,n){t=t||m||h;var i=m;void 0===e.previous&&(c(t,e)&&(m=t,u.onTagOpen(r,{}),e.returnPoint=t=m),a(e),bn(e)&&!e.children.length||t.add(e),"pre"==e.name&&(p=!1),"textarea"==e.name&&(E=!1)),e.returnPoint?(m=e.returnPoint,delete e.returnPoint):m=n?t:i}function c(e,t){var n;return!(e!=h&&"body"!=e.name||!r||e.name&&!CKEDITOR.dtd[e.name][r])&&((n=t.attributes&&(n=t.attributes["data-cke-real-element-type"])?n:t.name)&&n in CKEDITOR.dtd.$inline&&!(n in CKEDITOR.dtd.head)&&!t.isOrphan||t.type==CKEDITOR.NODE_TEXT)}function d(e,t){return(e in CKEDITOR.dtd.$listItem||e in CKEDITOR.dtd.$tableContent)&&(e==t||"dt"==e&&"dd"==t||"dd"==e&&"dt"==t)}var u=new CKEDITOR.htmlParser,h=t instanceof CKEDITOR.htmlParser.element?t:"string"==typeof t?new CKEDITOR.htmlParser.element(t):new CKEDITOR.htmlParser.fragment,f=[],g=[],m=h,E="textarea"==h.name,p="pre"==h.name;for(u.onTagOpen=function(e,t,n,i){if((t=new CKEDITOR.htmlParser.element(e,t)).isUnknown&&n&&(t.isEmpty=!0),t.isOptionalClose=i,bn(t))f.push(t);else{if("pre"==e)p=!0;else{if("br"==e&&p)return void m.add(new CKEDITOR.htmlParser.text("\n"));"textarea"==e&&(E=!0)}if("br"==e)g.push(t);else{for(;i=(n=m.name)?CKEDITOR.dtd[n]||(m._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):J,!(t.isUnknown||m.isUnknown||i[e]);)if(m.isOptionalClose)u.onTagClose(n);else if(e in Z&&n in Z)(n=(n=m.children)[n.length-1])&&"li"==n.name||l(n=new CKEDITOR.htmlParser.element("li"),m),t.returnPoint||(t.returnPoint=m),m=n;else if(e in CKEDITOR.dtd.$listItem&&!d(e,n))u.onTagOpen("li"==e?"ul":"dl",{},0,1);else if(n in Y&&!d(e,n))t.returnPoint||(t.returnPoint=m),m=m.parent;else{if(n in CKEDITOR.dtd.$inline&&f.unshift(m),!m.parent){t.isOrphan=1;break}l(m,m.parent,1)}o(e),s(),t.parent=m,t.isEmpty?l(t):m=t}}},u.onTagClose=function(e){for(var t=f.length-1;0<=t;t--)if(e==f[t].name)return void f.splice(t,1);for(var n=[],i=[],o=m;o!=h&&o.name!=e;)o._.isBlockLike||i.unshift(o),n.push(o),o=o.returnPoint||o.parent;if(o!=h){for(t=0;t<n.length;t++){var a=n[t];l(a,a.parent)}(m=o)._.isBlockLike&&s(),l(o,o.parent),o==m&&(m=m.parent),f=f.concat(i)}"body"==e&&(r=!1)},u.onText=function(e){var t,n;(m._.hasInlineStarted&&!g.length||p||E||0!==(e=CKEDITOR.tools.ltrim(e)).length)&&(n=(t=m.name)?CKEDITOR.dtd[t]||(m._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):J,!E&&!n["#"]&&t in Y?(u.onTagOpen(Q[t]||""),u.onText(e)):(s(),o(),p||E||(e=e.replace(/[\t\r\n ]{2,}|[\t\r\n]/g," ")),e=new CKEDITOR.htmlParser.text(e),c(m,e)&&this.onTagOpen(r,{},0,1),m.add(e)))},u.onCDATA=function(e){m.add(new CKEDITOR.htmlParser.cdata(e))},u.onComment=function(e){s(),o(),m.add(new CKEDITOR.htmlParser.comment(e))},u.parse(e),s();m!=h;)l(m,m.parent,1);return a(h),h},CKEDITOR.htmlParser.fragment.prototype={type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,add:function(e,t){var n=0<(t=isNaN(t)?this.children.length:t)?this.children[t-1]:null;if(n){if(e._.isBlockLike&&n.type==CKEDITOR.NODE_TEXT&&(n.value=CKEDITOR.tools.rtrim(n.value),0===n.value.length))return this.children.pop(),void this.add(e);n.next=e}e.previous=n,(e.parent=this).children.splice(t,0,e),this._.hasInlineStarted||(this._.hasInlineStarted=e.type==CKEDITOR.NODE_TEXT||e.type==CKEDITOR.NODE_ELEMENT&&!e._.isBlockLike)},filter:function(e,t){t=this.getFilterContext(t),e.onRoot(t,this),this.filterChildren(e,!1,t)},filterChildren:function(e,t,n){if(this.childrenFilteredBy!=e.id)for(n=this.getFilterContext(n),t&&!this.parent&&e.onRoot(n,this),this.childrenFilteredBy=e.id,t=0;t<this.children.length;t++)!1===this.children[t].filter(e,n)&&t--},writeHtml:function(e,t){t&&this.filter(t),this.writeChildrenHtml(e)},writeChildrenHtml:function(e,t,n){var i=this.getFilterContext();for(n&&!this.parent&&t&&t.onRoot(i,this),t&&this.filterChildren(t,!1,i),t=0,i=(n=this.children).length;t<i;t++)n[t].writeHtml(e)},forEach:function(e,t,n){var i;if(!1!==(i=!(n||t&&this.type!=t)?e(this):i)){n=this.children;for(var o=0;o<n.length;o++)(i=n[o]).type==CKEDITOR.NODE_ELEMENT?i.forEach(e,t):t&&i.type!=t||e(i)}},getFilterContext:function(e){return e||{}}},CKEDITOR.htmlParser.filter=CKEDITOR.tools.createClass({$:function(e){this.id=CKEDITOR.tools.getNextNumber(),this.elementNameRules=new Rn,this.attributeNameRules=new Rn,this.elementsRules={},this.attributesRules={},this.textRules=new Rn,this.commentRules=new Rn,this.rootRules=new Rn,e&&this.addRules(e,10)},proto:{addRules:function(e,t){var n;"number"==typeof t?n=t:t&&"priority"in t&&(n=t.priority),"number"!=typeof n&&(n=10),"object"!=typeof t&&(t={}),e.elementNames&&this.elementNameRules.addMany(e.elementNames,n,t),e.attributeNames&&this.attributeNameRules.addMany(e.attributeNames,n,t),e.elements&&vn(this.elementsRules,e.elements,n,t),e.attributes&&vn(this.attributesRules,e.attributes,n,t),e.text&&this.textRules.add(e.text,n,t),e.comment&&this.commentRules.add(e.comment,n,t),e.root&&this.rootRules.add(e.root,n,t)},applyTo:function(e){e.filter(this)},onElementName:function(e,t){return this.elementNameRules.execOnName(e,t)},onAttributeName:function(e,t){return this.attributeNameRules.execOnName(e,t)},onText:function(e,t,n){return this.textRules.exec(e,t,n)},onComment:function(e,t,n){return this.commentRules.exec(e,t,n)},onRoot:function(e,t){return this.rootRules.exec(e,t)},onElement:function(e,t){for(var n,i=[this.elementsRules["^"],this.elementsRules[t.name],this.elementsRules.$],o=0;o<3;o++)if(n=i[o]){if(!1===(n=n.exec(e,t,this)))return null;if(n&&n!=t)return this.onNode(e,n);if(t.parent&&!t.name)break}return t},onNode:function(e,t){var n=t.type;return n==CKEDITOR.NODE_ELEMENT?this.onElement(e,t):n==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(e,t.value,t)):n==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(e,t.value,t)):null},onAttribute:function(e,t,n,i){return(n=this.attributesRules[n])?n.exec(e,i,t,this):i}}}),(CKEDITOR.htmlParser.filterRulesGroup=Rn).prototype={add:function(e,t,n){this.rules.splice(this.findIndex(t),0,{value:e,priority:t,options:n})},addMany:function(e,t,n){for(var i=[this.findIndex(t),0],o=0,a=e.length;o<a;o++)i.push({value:e[o],priority:t,options:n});this.rules.splice.apply(this.rules,i)},findIndex:function(e){for(var t=this.rules,n=t.length-1;0<=n&&e<t[n].priority;)n--;return n+1},exec:function(e,t){for(var n,i,o,a=t instanceof CKEDITOR.htmlParser.node||t instanceof CKEDITOR.htmlParser.fragment,r=Array.prototype.slice.call(arguments,1),s=this.rules,l=s.length,c=0;c<l;c++)if(a&&(n=t.type,i=t.name),o=s[c],!(e.nonEditable&&!o.options.applyToAll||e.nestedEditable&&o.options.excludeNestedEditable)){if(!1===(o=o.value.apply(null,r))||a&&o&&(o.name!=i||o.type!=n))return o;null!=o&&(r[0]=t=o)}return t},execOnName:function(e,t){for(var n,i=0,o=this.rules,a=o.length;t&&i<a;i++)n=o[i],e.nonEditable&&!n.options.applyToAll||e.nestedEditable&&n.options.excludeNestedEditable||(t=t.replace(n.value[0],n.value[1]));return t}},function(){function n(e,t){function s(e){return e||CKEDITOR.env.needsNbspFiller?new CKEDITOR.htmlParser.text(" "):new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function n(a,r){return function(e){if(e.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var t,n,i=[],o=d(e);if(o)for(l(o,1)&&i.push(o);o;)f(o)&&(t=u(o))&&l(t)&&((n=u(t))&&!f(n)?i.push(t):(s(c).insertAfter(t),t.remove())),o=o.previous;for(o=0;o<i.length;o++)i[o].remove();(i=(i=!a||!1!==("function"==typeof r?r(e):r))?!(!c&&!CKEDITOR.env.needsBrFiller&&e.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&(!(!c&&!CKEDITOR.env.needsBrFiller&&(7<document.documentMode||e.name in CKEDITOR.dtd.tr||e.name in CKEDITOR.dtd.$listItem))&&(!(i=d(e))||"form"==e.name&&"input"==i.name)):i)&&e.add(s(a))}}}function l(e,t){return!(c&&!CKEDITOR.env.needsBrFiller||e.type!=CKEDITOR.NODE_ELEMENT||"br"!=e.name||e.attributes["data-cke-eol"])||!!(e.type==CKEDITOR.NODE_TEXT&&(n=e.value.match(E))&&(n.index&&(new CKEDITOR.htmlParser.text(e.value.substring(0,n.index)).insertBefore(e),e.value=n[0]),!CKEDITOR.env.needsBrFiller&&c&&(!t||e.parent.name in r)||!c&&((n=e.previous)&&"br"==n.name||!n||f(n))));var n}var i,o,a={elements:{}},c="html"==t,r=CKEDITOR.tools.extend({},C);for(i in r)"#"in T[i]||delete r[i];for(i in r)a.elements[i]=n(c,e.config.fillEmptyBlocks);return a.root=n(c,!1),a.elements.br=(o=c,function(e){if(e.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var t=e.attributes;if("data-cke-bogus"in t||"data-cke-eol"in t)delete t["data-cke-bogus"];else{for(t=e.next;t&&h(t);)t=t.next;var n=u(e);!t&&f(e.parent)?g(e.parent,s(o)):f(t)&&n&&!f(n)&&s(o).insertBefore(t)}}}),a}function a(e,t){return e!=CKEDITOR.ENTER_BR&&!1!==t&&(e==CKEDITOR.ENTER_DIV?"div":"p")}function d(e){for(e=e.children[e.children.length-1];e&&h(e);)e=e.previous;return e}function u(e){for(e=e.previous;e&&h(e);)e=e.previous;return e}function h(e){return e.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(e.value)||e.type==CKEDITOR.NODE_ELEMENT&&e.attributes["data-cke-bookmark"]}function f(e){return e&&(e.type==CKEDITOR.NODE_ELEMENT&&e.name in C||e.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function g(e,t){var n=e.children[e.children.length-1];e.children.push(t),t.parent=e,n&&((n.next=t).previous=n)}function e(e){"false"!=(e=e.attributes).contenteditable&&(e["data-cke-editable"]=e.contenteditable?"true":1),e.contenteditable="false"}function t(e){switch((e=e.attributes)["data-cke-editable"]){case"true":e.contenteditable="true";break;case"1":delete e.contenteditable}}function r(e,t){return e.replace(t,function(e,t,n){return 0===e.indexOf("<textarea")&&(e=t+s(n).replace(/</g,"&lt;").replace(/>/g,"&gt;")+"</textarea>"),"<cke:encoded>"+encodeURIComponent(e)+"</cke:encoded>"})}function s(e){return e.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,function(e,t){return decodeURIComponent(t)})}function l(e,t){var n=t._.dataStore;return e.replace(/\x3c!--\{cke_protected\}([\s\S]+?)--\x3e/g,function(e,t){return decodeURIComponent(t)}).replace(/\{cke_protected_(\d+)\}/g,function(e,t){return n&&n[t]||""})}function c(e,o){var i=[],t=o.config.protectedSource,n=o._.dataStore||(o._.dataStore={id:1}),a=/<\!--\{cke_temp(comment)?\}(\d*?)--\x3e/g,t=[/<script[\s\S]*?(<\/script>|$)/gi,/<noscript[\s\S]*?<\/noscript>/gi,/<meta[\s\S]*?\/?>/gi].concat(t);e=e.replace(/\x3c!--[\s\S]*?--\x3e/g,function(e){return"\x3c!--{cke_tempcomment}"+(i.push(e)-1)+"--\x3e"});for(var r=0;r<t.length;r++)e=e.replace(t[r],function(e){return e=e.replace(a,function(e,t,n){return i[n]}),/cke_temp(comment)?/.test(e)?e:"\x3c!--{cke_temp}"+(i.push(e)-1)+"--\x3e"});return(e=(e=e.replace(a,function(e,t,n){return"\x3c!--"+p+(t?"{C}":"")+encodeURIComponent(i[n]).replace(/--/g,"%2D%2D")+"--\x3e"})).replace(/<\w+(?:\s+(?:(?:[^\s=>]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=\/>]+))+\s*\/?>/g,function(e){return e.replace(/\x3c!--\{cke_protected\}([^>]*)--\x3e/g,function(e,t){return n[n.id]=decodeURIComponent(t),"{cke_protected_"+n.id+++"}"})})).replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(e,t,n,i){return"<"+t+n+">"+l(s(i),o)+"</"+t+">"})}var m;CKEDITOR.htmlDataProcessor=function(o){var e,t,i=this;this.editor=o,this.dataFilter=e=new CKEDITOR.htmlParser.filter,this.htmlFilter=t=new CKEDITOR.htmlParser.filter,this.writer=new CKEDITOR.htmlParser.basicWriter,e.addRules(I),e.addRules(O,{applyToAll:!0}),e.addRules(n(o,"data"),{applyToAll:!0}),t.addRules(D),t.addRules(R,{applyToAll:!0}),t.addRules(n(o,"html"),{applyToAll:!0}),o.on("toHtml",function(e){var t,n=(e=e.data).dataValue,n=r(n=c(n=m(n),o),k),n=(n=(n=(n=(n=r(n=n.replace(b,function(e,t,n){return"<"+t+n.replace(y,function(e,t){return K.test(t)&&-1==n.indexOf("data-cke-saved-"+t)?" data-cke-saved-"+e+" data-cke-"+CKEDITOR.rnd+"-"+e:e})+">"}),_)).replace(N,"$1cke:$2")).replace(x,"<cke:$1$2></cke:$1>")).replace(/(<pre\b[^>]*>)(\r\n|\n)/g,"$1$2$2")).replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2"),i=e.context||o.editable().getName();CKEDITOR.env.ie&&CKEDITOR.env.version<9&&"pre"==i&&(i="div",n="<pre>"+n+"</pre>",t=1),(i=o.document.createElement(i)).setHtml("a"+n),n=(n=i.getHtml().substr(1)).replace(new RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),""),n=s(n=(n=(n=t?n.replace(/^<pre>|<\/pre>$/gi,""):n).replace(S,"$1$2")).replace(w,function(e,t){return decodeURIComponent(t)})),i=!1!==e.fixForBody&&a(e.enterMode,o.config.autoParagraph),n=CKEDITOR.htmlParser.fragment.fromHtml(n,e.context,i),!i||!(t=n).children.length&&CKEDITOR.dtd[t.name][i]&&(i=new CKEDITOR.htmlParser.element(i),t.add(i)),e.dataValue=n},null,null,5),o.on("toHtml",function(e){e.data.filter.applyTo(e.data.dataValue,!0,e.data.dontFilter,e.data.enterMode)&&o.fire("dataFiltered")},null,null,6),o.on("toHtml",function(e){e.data.dataValue.filterChildren(i.dataFilter,!0)},null,null,10),o.on("toHtml",function(e){var t=(e=e.data).dataValue,n=new CKEDITOR.htmlParser.basicWriter;t.writeChildrenHtml(n),t=n.getHtml(!0),e.dataValue=t.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g,function(e){return"\x3c!--"+p+"{C}"+encodeURIComponent(e).replace(/--/g,"%2D%2D")+"--\x3e"})},null,null,15),o.on("toDataFormat",function(e){var t=e.data.dataValue;e.data.enterMode!=CKEDITOR.ENTER_BR&&(t=t.replace(/^<br *\/?>/i,"")),e.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(t,e.data.context,a(e.data.enterMode,o.config.autoParagraph))},null,null,5),o.on("toDataFormat",function(e){e.data.dataValue.filterChildren(i.htmlFilter,!0)},null,null,10),o.on("toDataFormat",function(e){e.data.filter.applyTo(e.data.dataValue,!1,!0)},null,null,11),o.on("toDataFormat",function(e){var t=e.data.dataValue,n=i.writer;n.reset(),t.writeChildrenHtml(n),t=l(t=s(t=n.getHtml(!0)),o),e.data.dataValue=t},null,null,15)},CKEDITOR.htmlDataProcessor.prototype={toHtml:function(e,t,n,i){var o,a,r,s,l=this.editor;return t&&"object"==typeof t?(o=t.context,n=t.fixForBody,i=t.dontFilter,a=t.filter,r=t.enterMode,s=t.protectedWhitespaces):o=t,o||null===o||(o=l.editable().getName()),l.fire("toHtml",{dataValue:e,context:o,fixForBody:n,dontFilter:i,filter:a||l.filter,enterMode:r||l.enterMode,protectedWhitespaces:s}).dataValue},toDataFormat:function(e,t){var n,i,o;return t&&(n=t.context,i=t.filter,o=t.enterMode),n||null===n||(n=this.editor.editable().getName()),this.editor.fire("toDataFormat",{dataValue:e,filter:i||this.editor.filter,context:n,enterMode:o||this.editor.enterMode}).dataValue},protectSource:function(e){return c(e,this.editor)},unprotectSource:function(e){return l(e,this.editor)}};var E=/(?:&nbsp;|\xa0)$/,p="{cke_protected}",T=CKEDITOR.dtd,o="caption colgroup col thead tfoot tbody".split(" "),C=CKEDITOR.tools.extend({},T.$blockLimit,T.$block),I={elements:{input:e,textarea:e}},O={attributeNames:[[/^on/,"data-cke-pa-on"],[/^srcdoc/,"data-cke-pa-srcdoc"],[/^data-cke-expando$/,""]],elements:{iframe:function(e){var t;e.attributes&&e.attributes.src&&(0!==(t=e.attributes.src.toLowerCase().replace(/[^a-z]/gi,"")).indexOf("javascript")&&0!==t.indexOf("data")||(e.attributes["data-cke-pa-src"]=e.attributes.src,delete e.attributes.src))}}},D={elements:{embed:function(e){var t,n=e.parent;n&&"object"==n.name&&(t=n.attributes.width,n=n.attributes.height,t&&(e.attributes.width=t),n&&(e.attributes.height=n))},a:function(e){var t=e.attributes;if(!(e.children.length||t.name||t.id||e.attributes["data-cke-saved-name"]))return!1}}},R={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(e){var t=e.attributes;if(t){if(t["data-cke-temp"])return!1;for(var n=["name","href","src"],i=0;i<n.length;i++)"data-cke-saved-"+n[i]in t&&delete t[n[i]]}return e},table:function(e){e.children.slice(0).sort(function(e,t){var n,i;return e.type==CKEDITOR.NODE_ELEMENT&&t.type==e.type&&(n=CKEDITOR.tools.indexOf(o,e.name),i=CKEDITOR.tools.indexOf(o,t.name)),-1<n&&-1<i&&n!=i||(n=e.parent?e.getIndex():-1,i=t.parent?t.getIndex():-1),i<n?1:-1})},param:function(e){return e.children=[],e.isEmpty=!0,e},span:function(e){"Apple-style-span"==e.attributes.class&&delete e.name},html:function(e){delete e.attributes.contenteditable,delete e.attributes.class},body:function(e){delete e.attributes.spellcheck,delete e.attributes.contenteditable},style:function(e){var t=e.children[0];t&&t.value&&(t.value=CKEDITOR.tools.trim(t.value)),e.attributes.type||(e.attributes.type="text/css")},title:function(e){var t=e.children[0];t||g(e,t=new CKEDITOR.htmlParser.text),t.value=e.attributes["data-cke-title"]||""},input:t,textarea:t},attributes:{class:function(e){return CKEDITOR.tools.ltrim(e.replace(/(?:^|\s+)cke_[^\s]*/g,""))||!1}}};CKEDITOR.env.ie&&(R.attributes.style=function(e){return e.replace(/(^|;)([^\:]+)/g,function(e){return e.toLowerCase()})});var i,v,b=/<(a|area|img|input|source)\b([^>]*)>/gi,y=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,K=/^(href|src|name)$/i,_=/(?:<style(?=[ >])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,k=/(<textarea(?=[ >])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,w=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,N=/(<\/?)((?:object|embed|param|html|body|head|title)([\s][^>]*)?>)/gi,S=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,x=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi;function A(e){return CKEDITOR.tools.array.reduce(e.split(""),function(e,t){var n=t.toLowerCase(),i=t.toUpperCase(),t=L(n);return n!==i&&(t+="|"+L(i)),e+"("+t+")"},"")}function L(e){var t,n=e.charCodeAt(0),i=n.toString(16);for(t in n={htmlCode:"&#"+n+";?",hex:"&#x0*"+i+";?",entity:{"<":"&lt;",">":"&gt;",":":"&colon;"}[e]})n[t]&&(e+="|"+n[t]);return e}i=new RegExp("("+A("<cke:encoded>")+"(.*?)"+A("</cke:encoded>")+")|("+A("<")+A("/")+"?"+A("cke:encoded>")+")","gi"),v=new RegExp("(("+A("{cke_protected")+")(_[0-9]*)?"+A("}")+")","gi"),m=function(e){return e.replace(i,"").replace(v,"")}}(),CKEDITOR.htmlParser.element=function(e,t){this.name=e,this.attributes=t||{},this.children=[];var n=e||"",t=n.match(/^cke:(.*)/);t&&(n=t[1]),n=!!(CKEDITOR.dtd.$nonBodyContent[n]||CKEDITOR.dtd.$block[n]||CKEDITOR.dtd.$listItem[n]||CKEDITOR.dtd.$tableContent[n]||CKEDITOR.dtd.$nonEditable[n]||"br"==n),this.isEmpty=!!CKEDITOR.dtd.$empty[e],this.isUnknown=!CKEDITOR.dtd[e],this._={isBlockLike:n,hasInlineStarted:this.isEmpty||!n}},CKEDITOR.htmlParser.cssStyle=function(e){var i={};return((e instanceof CKEDITOR.htmlParser.element?e.attributes.style:e)||"").replace(/&quot;/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(e,t,n){"font-family"==t&&(n=n.replace(/["']/g,"")),i[t.toLowerCase()]=n}),{rules:i,populate:function(e){var t=this.toString();t&&(e instanceof CKEDITOR.dom.element?e.setAttribute("style",t):e instanceof CKEDITOR.htmlParser.element?e.attributes.style=t:e.style=t)},toString:function(){var e,t=[];for(e in i)i[e]&&t.push(e,":",i[e],";");return t.join("")}}},Ie=CKEDITOR.htmlParser.fragment.prototype,CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:Ie.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(e,t){var n,i,o,a,r=this;for(t=r.getFilterContext(t),r.parent||e.onRoot(t,r);;){if(n=r.name,!(i=e.onElementName(t,n)))return this.remove(),!1;if(r.name=i,!(r=e.onElement(t,r)))return this.remove(),!1;if(r!==this)return this.replaceWith(r),!1;if(r.name==n)break;if(r.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(r),!1;if(!r.name)return this.replaceWithChildren(),!1}for(o in n=r.attributes){for(i=n[o];;){if(!(a=e.onAttributeName(t,o))){delete n[o];break}if(a==o)break;delete n[o],o=a}a&&(!1===(i=e.onAttribute(t,r,a,i))?delete n[a]:n[a]=i)}return r.isEmpty||this.filterChildren(e,!1,t),!0},filterChildren:Ie.filterChildren,writeHtml:function(e,t){t&&this.filter(t);var n,i,t=this.name,o=[],a=this.attributes;for(n in e.openTag(t,a),a)o.push([n,a[n]]);for(e.sortAttributes&&o.sort(Dn),n=0,i=o.length;n<i;n++)a=o[n],e.attribute(a[0],a[1]);e.openTagClose(t,this.isEmpty),this.writeChildrenHtml(e),this.isEmpty||e.closeTag(t)},writeChildrenHtml:Ie.writeChildrenHtml,replaceWithChildren:function(){for(var e=this.children,t=e.length;t;)e[--t].insertAfter(this);this.remove()},forEach:Ie.forEach,getFirst:function(e){if(!e)return this.children.length?this.children[0]:null;var t;"function"!=typeof e&&(t=e,e=function(e){return e.type==CKEDITOR.NODE_ELEMENT&&("string"==typeof t?e.name==t:e.name in t)});for(var n=0,i=this.children.length;n<i;++n)if(e(this.children[n]))return this.children[n];return null},getHtml:function(){var e=new CKEDITOR.htmlParser.basicWriter;return this.writeChildrenHtml(e),e.getHtml()},setHtml:function(e){for(var t=0,n=(e=this.children=CKEDITOR.htmlParser.fragment.fromHtml(e).children).length;t<n;++t)e[t].parent=this},getOuterHtml:function(){var e=new CKEDITOR.htmlParser.basicWriter;return this.writeHtml(e),e.getHtml()},split:function(e){for(var t=this.children.splice(e,this.children.length-e),n=this.clone(),i=0;i<t.length;++i)t[i].parent=n;return(n.children=t)[0]&&(t[0].previous=null),0<e&&(this.children[e-1].next=null),this.parent.add(n,this.getIndex()+1),n},find:function(e,t){void 0===t&&(t=!1);for(var n=[],i=0;i<this.children.length;i++){var o=this.children[i];("function"==typeof e&&e(o)||"string"==typeof e&&o.name===e)&&n.push(o),t&&o.find&&(n=n.concat(o.find(e,t)))}return n},findOne:function(n,i){var o=null,e=CKEDITOR.tools.array.find(this.children,function(e){var t="function"==typeof n?n(e):e.name===n;return t||!i?t:!!(o=e.children&&e.findOne?e.findOne(n,!0):o)});return o||e||null},addClass:function(e){var t;this.hasClass(e)||(t=this.attributes.class||"",this.attributes.class=t+(t?" ":"")+e)},removeClass:function(e){var t=this.attributes.class;t&&((t=CKEDITOR.tools.trim(t.replace(new RegExp("(?:\\s+|^)"+e+"(?:\\s+|$)")," ")))?this.attributes.class=t:delete this.attributes.class)},hasClass:function(e){var t=this.attributes.class;return!!t&&new RegExp("(?:^|\\s)"+e+"(?=\\s|$)").test(t)},getFilterContext:function(e){var t=[];if((e=e||{nonEditable:!1,nestedEditable:!1}).nonEditable||"false"!=this.attributes.contenteditable?e.nonEditable&&!e.nestedEditable&&"true"==this.attributes.contenteditable&&t.push("nestedEditable",!0):t.push("nonEditable",!0),t.length){e=CKEDITOR.tools.copy(e);for(var n=0;n<t.length;n+=2)e[t[n]]=t[n+1]}return e}},!0),X=/{([^}]+)}/g,CKEDITOR.template=function(e){this.source="function"==typeof e?e:String(e)},CKEDITOR.template.prototype.output=function(n,e){var t=("function"==typeof this.source?this.source(n):this.source).replace(X,function(e,t){return void 0!==n[t]?n[t]:e});return e?e.push(t):t},delete CKEDITOR.loadFullCore,CKEDITOR.instances={},CKEDITOR.document=new CKEDITOR.dom.document(document),CKEDITOR.add=function(e){function t(){CKEDITOR.currentInstance==e&&(CKEDITOR.currentInstance=null,CKEDITOR.fire("currentInstance"))}(CKEDITOR.instances[e.name]=e).on("focus",function(){CKEDITOR.currentInstance!=e&&(CKEDITOR.currentInstance=e,CKEDITOR.fire("currentInstance"))}),e.on("blur",t),e.on("destroy",t),CKEDITOR.fire("instance",null,e)},CKEDITOR.remove=function(e){delete CKEDITOR.instances[e.name]},G={},CKEDITOR.addTemplate=function(e,t){var n=G[e];return n||(n={name:e,source:t},CKEDITOR.fire("template",n),G[e]=new CKEDITOR.template(n.source))},CKEDITOR.getTemplate=function(e){return G[e]},j=[],CKEDITOR.addCss=function(e){j.push(e)},CKEDITOR.getCss=function(){return j.join("\n")},CKEDITOR.on("instanceDestroyed",function(){CKEDITOR.tools.isEmpty(this.instances)&&CKEDITOR.fire("reset")}),CKEDITOR.TRISTATE_ON=1,CKEDITOR.TRISTATE_OFF=2,CKEDITOR.TRISTATE_DISABLED=0,CKEDITOR.inline=function(e,t){if(!(e=CKEDITOR.editor._getEditorElement(e)))return null;var n=new CKEDITOR.editor(t,e,CKEDITOR.ELEMENT_MODE_INLINE),i=e.is("textarea")?e:null;return i?(n.setData(i.getValue(),null,!0),(e=CKEDITOR.dom.element.createFromHtml('<div contenteditable="'+!!n.readOnly+'" class="cke_textarea_inline">'+i.getValue()+"</div>",CKEDITOR.document)).insertAfter(i),i.hide(),i.$.form&&n._attachToForm()):(t&&void 0!==t.readOnly&&!t.readOnly&&e.setAttribute("contenteditable","true"),n.setData(e.getHtml(),null,!0)),n.on("loaded",function(){n.fire("uiReady"),n.editable(e),n.container=e,n.ui.contentsElement=e,n.setData(n.getData(1)),n.resetDirty(),n.fire("contentDom"),n.mode="wysiwyg",n.fire("mode"),n.status="ready",n.fireOnce("instanceReady"),CKEDITOR.fire("instanceReady",null,n)},null,null,1e4),n.on("destroy",function(){var e=n.container;i&&e&&(e.clearCustomData(),e.remove()),i&&i.show(),n.element.clearCustomData(),delete n.element}),n},CKEDITOR.inlineAll=function(){var e,t,n;for(n in CKEDITOR.dtd.$editable)for(var i=CKEDITOR.document.getElementsByTag(n),o=0,a=i.count();o<a;o++)e=i.getItem(o),"true"!=e.getAttribute("contenteditable")||e.getEditor()||(t={element:e,config:{}},!1!==CKEDITOR.fire("inline",t)&&CKEDITOR.inline(e,t.config))},CKEDITOR.domReady(function(){CKEDITOR.disableAutoInline||CKEDITOR.inlineAll()}),CKEDITOR.replaceClass="ckeditor",CKEDITOR.replace=function(e,t){return In(e,t,null,CKEDITOR.ELEMENT_MODE_REPLACE)},CKEDITOR.appendTo=function(e,t,n){return In(e,t,n,CKEDITOR.ELEMENT_MODE_APPENDTO)},CKEDITOR.replaceAll=function(){for(var e=document.getElementsByTagName("textarea"),t=0;t<e.length;t++){var n=null,i=e[t];if(i.name||i.id){if("string"==typeof arguments[0]){if(!new RegExp("(?:^|\\s)"+arguments[0]+"(?:$|\\s)").test(i.className))continue}else if("function"==typeof arguments[0]&&!(n={})===arguments[0](i,n))continue;this.replace(i,n)}}},CKEDITOR.editor.prototype.addMode=function(e,t){(this._.modes||(this._.modes={}))[e]=t},CKEDITOR.editor.prototype.setMode=function(e,t){var n,i,o,a=this,r=this._.modes;e!=a.mode&&r&&r[e]&&(a.fire("beforeSetMode",e),a.mode?(n=a.checkDirty(),r=a._.previousModeData,o=0,a.fire("beforeModeUnload"),a.editable(0),a._.previousMode=a.mode,a._.previousModeData=i=a.getData(1),"source"==a.mode&&r==i&&(a.fire("lockSnapshot",{forceUpdate:!0}),o=1),a.ui.space("contents").setHtml(""),a.mode=""):a._.previousModeData=a.getData(1),this._.modes[e](function(){a.mode=e,void 0===n||n||a.resetDirty(),o?a.fire("unlockSnapshot"):"wysiwyg"==e&&a.fire("saveSnapshot"),setTimeout(function(){a.isDestroyed()||a.isDetached()||(a.fire("mode"),t&&t.call(a))},0)}))},CKEDITOR.editor.prototype.resize=function(e,t,n,i){var o=this.container,a=this.ui.space("contents"),r=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement;i=i?this.container.getFirst(function(e){return e.type==CKEDITOR.NODE_ELEMENT&&e.hasClass("cke_inner")}):o,!e&&0!==e||(e=CKEDITOR.tools.convertToPx(CKEDITOR.tools.cssLength(e))),i.setSize("width",e,!0),r&&(r.style.width="1%"),t=CKEDITOR.tools.convertToPx(CKEDITOR.tools.cssLength(t));var s=(i.$.offsetHeight||0)-(a.$.clientHeight||0),o=Math.max(t-(n?0:s),0);t=n?t+s:t,a.setStyle("height",CKEDITOR.tools.cssLength(o)),r&&(r.style.width="100%"),this.fire("resize",{outerHeight:t,contentsHeight:o,outerWidth:e||i.getSize("width")})},CKEDITOR.editor.prototype.getResizable=function(e){return e?this.ui.space("contents"):this.container},CKEDITOR.domReady(function(){CKEDITOR.replaceClass&&CKEDITOR.replaceAll(CKEDITOR.replaceClass)}),CKEDITOR.config.startupMode="wysiwyg",CKEDITOR.editable=CKEDITOR.tools.createClass({base:CKEDITOR.dom.element,$:function(e,t){this.base(t.$||t),this.editor=e,this.status="unloaded",this.hasFocus=!1,this.setup()},proto:{focus:function(){var e,t;if(CKEDITOR.env.webkit&&!this.hasFocus&&(e=this.editor._.previousActive||this.getDocument().getActive(),this.contains(e)))e.focus();else{CKEDITOR.env.edge&&14<CKEDITOR.env.version&&!this.hasFocus&&this.getDocument().equals(CKEDITOR.document)&&(this.editor._.previousScrollTop=this.$.scrollTop);try{!CKEDITOR.env.ie||CKEDITOR.env.edge&&14<CKEDITOR.env.version||!this.getDocument().equals(CKEDITOR.document)?CKEDITOR.env.chrome?(t=this.$.scrollTop,this.$.focus(),this.$.scrollTop=t):this.$.focus():this.$.setActive()}catch(e){if(!CKEDITOR.env.ie)throw e}CKEDITOR.env.safari&&!this.isInline()&&((e=CKEDITOR.document.getActive()).equals(this.getWindow().getFrame())||this.getWindow().focus())}},on:function(e,t){var n,i,o=Array.prototype.slice.call(arguments,0);return CKEDITOR.env.ie&&/^focus|blur$/.exec(e)&&(n=t,i=this,t=function(e){var t=e.data.$.toElement||e.data.$.fromElement||e.data.$.relatedTarget;(t=t&&t.nodeType==CKEDITOR.NODE_ELEMENT?new CKEDITOR.dom.element(t):null)&&(i.equals(t)||i.contains(t))||n.call(this,e)},o[0]=e="focus"==e?"focusin":"focusout",o[1]=t),CKEDITOR.dom.element.prototype.on.apply(this,o)},attachListener:function(e){this._.listeners||(this._.listeners=[]);var t=Array.prototype.slice.call(arguments,1),t=e.on.apply(e,t);return this._.listeners.push(t),t},clearListeners:function(){var e=this._.listeners;try{for(;e.length;)e.pop().removeListener()}catch(e){}},restoreAttrs:function(){var e,t,n=this._.attrChanges;for(t in n)n.hasOwnProperty(t)&&(e=n[t],null!==e?this.setAttribute(t,e):this.removeAttribute(t))},attachClass:function(e){var t=this.getCustomData("classes");this.hasClass(e)||((t=!t?[]:t).push(e),this.setCustomData("classes",t),this.addClass(e))},changeAttr:function(e,t){var n=this.getAttribute(e);t!==n&&(this._.attrChanges||(this._.attrChanges={}),e in this._.attrChanges||(this._.attrChanges[e]=n),this.setAttribute(e,t))},insertText:function(e){this.editor.focus(),this.insertHtml(this.transformPlainTextToHtml(e),"text")},transformPlainTextToHtml:function(e){var t=this.editor.getSelection().getStartElement().hasAscendant("pre",!0)?CKEDITOR.ENTER_BR:this.editor.activeEnterMode;return CKEDITOR.tools.transformPlainTextToHtml(e,t)},insertHtml:function(e,t,n){var i=this.editor;i.focus(),i.fire("saveSnapshot"),n=n||i.getSelection().getRanges()[0],P(this,t||"html",e,n),n.select(),rn(this),this.editor.fire("afterInsertHtml",{})},insertHtmlIntoRange:function(e,t,n){P(this,n||"html",e,t),this.editor.fire("afterInsertHtml",{intoRange:t})},insertElement:function(e,t){(i=this.editor).focus(),i.fire("saveSnapshot");var n=i.activeEnterMode,i=i.getSelection(),o=e.getName(),o=CKEDITOR.dtd.$block[o];t=t||i.getRanges()[0],this.insertElementIntoRange(e,t)&&(t.moveToPosition(e,CKEDITOR.POSITION_AFTER_END),o&&((o=e.getNext(function(e){return tn(e)&&!L(e)}))&&o.type==CKEDITOR.NODE_ELEMENT&&o.is(CKEDITOR.dtd.$block)?o.getDtd()["#"]?t.moveToElementEditStart(o):t.moveToElementEditEnd(e):o||n==CKEDITOR.ENTER_BR||(o=t.fixBlock(!0,n==CKEDITOR.ENTER_DIV?"div":"p"),t.moveToElementEditStart(o)))),i.selectRanges([t]),rn(this)},insertElementIntoSelection:function(e){this.insertElement(e)},insertElementIntoRange:function(e,t){var n,i,o,a=this.editor,r=a.config.enterMode,s=e.getName(),l=CKEDITOR.dtd.$block[s];if(t.checkReadOnly())return!1;if(t.deleteContents(1),t.startContainer.type==CKEDITOR.NODE_ELEMENT&&(t.startContainer.is({tr:1,table:1,tbody:1,thead:1,tfoot:1})?B(t):t.startContainer.is(CKEDITOR.dtd.$list)&&M(t)),l)for(;(n=t.getCommonAncestor(0,1))&&(i=CKEDITOR.dtd[n.getName()])&&(!i||!i[s]);)n.getName()in CKEDITOR.dtd.span?(l=t.splitElement(n),o=t.createBookmark(),an(n),an(l),t.moveToBookmark(o)):t.checkStartOfBlock()&&t.checkEndOfBlock()?(t.setStartBefore(n),t.collapse(!0),n.remove()):t.splitBlock(r==CKEDITOR.ENTER_DIV?"div":"p",a.editable());return t.insertNode(e),!0},setData:function(e,t){t||(e=this.editor.dataProcessor.toHtml(e)),this.setHtml(e),this.fixInitialSelection(),"unloaded"==this.status&&(this.status="ready"),this.editor.fire("dataReady")},getData:function(e){var t=this.getHtml();return t=!e?this.editor.dataProcessor.toDataFormat(t):t},setReadOnly:function(e){this.setAttribute("contenteditable",!e)},detach:function(){this.status="detached",this.editor.setData(this.editor.getData(),{internal:!0}),this.clearListeners();try{this._.cleanCustomData()}catch(e){if(!CKEDITOR.env.ie||-2146828218!==e.number)throw e}this.editor.fire("contentDomUnload"),delete this.editor.document,delete this.editor.window,delete this.editor},isInline:function(){return this.getDocument().equals(CKEDITOR.document)},fixInitialSelection:function(){function e(){var e=o.getDocument().$,t=e.getSelection(),n=!(!t.anchorNode||t.anchorNode!=o.$)||(!(!(CKEDITOR.env.webkit&&(n=o.getDocument().getActive())&&n.equals(o))||t.anchorNode)||void 0);n&&((n=new CKEDITOR.dom.range(o)).moveToElementEditStart(o),(e=e.createRange()).setStart(n.startContainer.$,n.startOffset),e.collapse(!0),t.removeAllRanges(),t.addRange(e))}var t,n,i,o=this;CKEDITOR.env.ie&&(CKEDITOR.env.version<9||CKEDITOR.env.quirks)?this.hasFocus&&(this.focus(),t=o.getDocument().$,n=t.selection,i=o.getDocument().getActive(),"None"==n.type&&i.equals(o)&&(n=new CKEDITOR.dom.range(o),t=t.body.createTextRange(),n.moveToElementEditStart(o),(n=n.startContainer).type!=CKEDITOR.NODE_ELEMENT&&(n=n.getParent()),t.moveToElementText(n.$),t.collapse(!0),t.select())):this.hasFocus?(this.focus(),e()):this.once("focus",function(){e()},null,null,-999)},getHtmlFromRange:function(e){return e.collapsed?new CKEDITOR.dom.documentFragment(e.document):(e={doc:this.getDocument(),range:e.clone()},$.eol.detect(e,this),$.bogus.exclude(e),$.cell.shrink(e),e.fragment=e.range.cloneContents(),$.tree.rebuild(e,this),$.eol.fix(e,this),new CKEDITOR.dom.documentFragment(e.fragment.$))},extractHtmlFromRange:function(e,t){var n=H,i={range:e,doc:e.document},o=this.getHtmlFromRange(e);if(e.collapsed)return e.optimize(),o;if(e.enlarge(CKEDITOR.ENLARGE_INLINE,1),n.table.detectPurge(i),i.bookmark=e.createBookmark(),delete i.range,(r=this.editor.createRange()).moveToPosition(i.bookmark.startNode,CKEDITOR.POSITION_BEFORE_START),i.targetBookmark=r.createBookmark(),n.list.detectMerge(i,this),n.table.detectRanges(i,this),n.block.detectMerge(i,this),i.tableContentsRanges?(n.table.deleteRanges(i),e.moveToBookmark(i.bookmark),i.range=e):(e.moveToBookmark(i.bookmark),(i.range=e).extractContents(n.detectExtractMerge(i))),e.moveToBookmark(i.targetBookmark),e.optimize(),n.fixUneditableRangePosition(e),n.list.merge(i,this),n.table.purge(i,this),n.block.merge(i,this),t){if(n=e.startPath(),i=e.checkStartOfBlock()&&e.checkEndOfBlock()&&n.block&&!e.root.equals(n.block)){e:{var a,r=0;if(i=n.block.getElementsByTag("span"))for(;a=i.getItem(r++);)if(!x(a)){i=!0;break e}i=!1}i=!i}i&&(e.moveToPosition(n.block,CKEDITOR.POSITION_BEFORE_START),n.block.remove())}else n.autoParagraph(this.editor,e),A(e.startContainer)&&e.startContainer.appendBogus();return e.startContainer.mergeSiblings(),o},setup:function(){var t,e,n,i,o,l,c=this.editor;this.attachListener(c,"beforeGetData",function(){var e=this.getData();this.is("textarea")||!1!==c.config.ignoreEmptyParagraph&&(e=e.replace(F,function(e,t){return t})),c.setData(e,null,1)},this),this.attachListener(c,"getSnapshot",function(e){e.data=this.getData(1)},this),this.attachListener(c,"afterSetData",function(){this.setData(c.getData(1))},this),this.attachListener(c,"loadSnapshot",function(e){this.setData(e.data,1)},this),this.attachListener(c,"beforeFocus",function(){var e=c.getSelection();(e=e&&e.getNative())&&"Control"==e.type||this.focus()},this),this.attachListener(c,"insertHtml",function(e){this.insertHtml(e.data.dataValue,e.data.mode,e.data.range)},this),this.attachListener(c,"insertElement",function(e){this.insertElement(e.data)},this),this.attachListener(c,"insertText",function(e){this.insertText(e.data)},this),this.setReadOnly(c.readOnly),this.attachClass("cke_editable"),c.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?this.attachClass("cke_editable_inline"):c.elementMode!=CKEDITOR.ELEMENT_MODE_REPLACE&&c.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||this.attachClass("cke_editable_themed"),this.attachClass("cke_contents_"+c.config.contentsLangDirection),c.keystrokeHandler.blockedKeystrokes[8]=+c.readOnly,c.keystrokeHandler.attach(this),this.on("blur",function(){this.hasFocus=!1},null,null,-1),this.on("focus",function(){this.hasFocus=!0},null,null,-1),CKEDITOR.env.webkit&&this.on("scroll",function(){c._.previousScrollTop=c.editable().$.scrollTop},null,null,-1),CKEDITOR.env.edge&&14<CKEDITOR.env.version&&(t=function(){var e=c.editable();null!=c._.previousScrollTop&&e.getDocument().equals(CKEDITOR.document)&&(e.$.scrollTop=c._.previousScrollTop,c._.previousScrollTop=null,this.removeListener("scroll",t))},this.on("scroll",t)),c.focusManager.add(this),this.equals(CKEDITOR.document.getActive())&&(this.hasFocus=!0,c.once("contentDom",function(){c.focusManager.focus(this)},this)),this.isInline()&&this.changeAttr("tabindex",c.tabIndex),this.is("textarea")||(c.document=this.getDocument(),c.window=this.getWindow(),e=c.document,this.changeAttr("spellcheck",!c.config.disableNativeSpellChecker),i=c.config.contentsLangDirection,this.getDirection(1)!=i&&this.changeAttr("dir",i),(n=CKEDITOR.getCss())&&((o=(i=e.getHead()).getCustomData("stylesheet"))?n!=o.getText()&&(CKEDITOR.env.ie&&CKEDITOR.env.version<9?o.$.styleSheet.cssText=n:o.setText(n)):(n=e.appendStyleText(n),n=new CKEDITOR.dom.element(n.ownerNode||n.owningElement),i.setCustomData("stylesheet",n),n.data("cke-temp",1))),i=e.getCustomData("stylesheet_ref")||0,e.setCustomData("stylesheet_ref",i+1),this.setCustomData("cke_includeReadonly",!c.config.disableReadonlyStyling),this.attachListener(this,"click",function(e){e=e.data;var t=new CKEDITOR.dom.elementPath(e.getTarget(),this).contains("a");t&&2!=e.$.button&&t.isReadOnly()&&e.preventDefault()}),l={8:1,46:1},this.attachListener(c,"key",function(e){if(c.readOnly)return!0;var t,n,i,o,a,r,s=e.data.domEvent.getKey();return 0!==(e=c.getSelection()).getRanges().length?(s in l&&(i=(n=e.getRanges()[0]).startPath(),s=8==s,CKEDITOR.env.ie&&CKEDITOR.env.version<11&&(o=e.getSelectedElement())||(o=function(e){function t(n){return function(e,t){if(t&&e.type==CKEDITOR.NODE_ELEMENT&&e.is(o)&&(i=e),!(t||!tn(e)||n&&L(e)))return!1}}var i,n=e.getRanges()[0];e=e.root;var o={table:1,ul:1,ol:1,dl:1};if(n.startPath().contains(o)){var a=n.clone();if(a.collapse(1),a.setStartAt(e,CKEDITOR.POSITION_AFTER_START),(e=new CKEDITOR.dom.walker(a)).guard=t(),e.checkBackward(),i)return(a=n.clone()).collapse(),a.setEndAt(i,CKEDITOR.POSITION_AFTER_END),(e=new CKEDITOR.dom.walker(a)).guard=t(!0),i=!1,e.checkForward(),i}return null}(e))?(c.fire("saveSnapshot"),n.moveToPosition(o,CKEDITOR.POSITION_BEFORE_START),o.remove(),n.select(),c.fire("saveSnapshot"),t=1):n.collapsed&&((o=i.block)&&(r=o[s?"getPrevious":"getNext"](S))&&r.type==CKEDITOR.NODE_ELEMENT&&r.is("table")&&n[s?"checkStartOfBlock":"checkEndOfBlock"]()?(c.fire("saveSnapshot"),n[s?"checkEndOfBlock":"checkStartOfBlock"]()&&o.remove(),n["moveToElementEdit"+(s?"End":"Start")](r),n.select(),c.fire("saveSnapshot"),t=1):i.blockLimit&&i.blockLimit.is("td")&&(a=i.blockLimit.getAscendant("table"))&&n.checkBoundaryOfElement(a,s?CKEDITOR.START:CKEDITOR.END)&&(r=a[s?"getPrevious":"getNext"](S))?(c.fire("saveSnapshot"),n["moveToElementEdit"+(s?"End":"Start")](r),n.checkStartOfBlock()&&n.checkEndOfBlock()?r.remove():n.select(),c.fire("saveSnapshot"),t=1):(a=i.contains(["td","th","caption"]))&&n.checkBoundaryOfElement(a,s?CKEDITOR.START:CKEDITOR.END)&&(t=1))),!t):void 0}),c.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&&this.attachListener(this,"keyup",function(e){e.data.getKeystroke()in l&&!this.getFirst(tn)&&(this.appendBogus(),(e=c.createRange()).moveToPosition(this,CKEDITOR.POSITION_AFTER_START),e.select())}),this.attachListener(this,"dblclick",function(e){return!c.readOnly&&(e={element:e.data.getTarget()},void c.fire("doubleclick",e))}),CKEDITOR.env.ie&&this.attachListener(this,"click",en),CKEDITOR.env.ie&&!CKEDITOR.env.edge||this.attachListener(this,"mousedown",function(e){var t=e.data.getTarget();t.is("img","hr","input","textarea","select")&&!t.isReadOnly()&&(c.getSelection().selectElement(t),t.is("input","textarea","select")&&e.data.preventDefault())}),CKEDITOR.env.edge&&this.attachListener(this,"mouseup",function(e){(e=e.data.getTarget())&&e.is("img")&&!e.isReadOnly()&&c.getSelection().selectElement(e)}),CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(e){var t;2!=e.data.$.button||((e=e.data.getTarget()).getAscendant("table")||e.getOuterHtml().replace(F,""))||((t=c.createRange()).moveToElementEditStart(e),t.select(!0))}),CKEDITOR.env.webkit&&(this.attachListener(this,"click",function(e){e.data.getTarget().is("input","select")&&e.data.preventDefault()}),this.attachListener(this,"mouseup",function(e){e.data.getTarget().is("input","textarea")&&e.data.preventDefault()})),CKEDITOR.env.webkit&&this.attachListener(c,"key",function(e){if(c.readOnly)return!0;if((t=e.data.domEvent.getKey())in l&&0!==(e=c.getSelection()).getRanges().length){var t=8==t;if(e=(i=e.getRanges()[0]).startPath(),i.collapsed)e:{var n,i,o=e.block;if(o&&i[t?"checkStartOfBlock":"checkEndOfBlock"]()&&i.moveToClosestEditablePosition(o,!t)&&i.collapsed){if(i.startContainer.type==CKEDITOR.NODE_ELEMENT){var a=i.startContainer.getChild(i.startOffset-(t?1:0));if(a&&a.type==CKEDITOR.NODE_ELEMENT&&a.is("hr")){c.fire("saveSnapshot"),a.remove(),e=!0;break e}}e=!(i=i.startPath().block)||i&&i.contains(o)?void 0:(c.fire("saveSnapshot"),(n=(t?i:o).getBogus())&&n.remove(),a=(n=c.getSelection()).createBookmarks(),(t?o:i).moveChildren(t?i:o,!1),e.lastElement.mergeSiblings(),sn(o,i,!t),n.selectBookmarks(a),!0)}else e=!1}else n=e.block,i=(t=i).endPath().block,e=!(!n||!i||n.equals(i))&&(c.fire("saveSnapshot"),(o=n.getBogus())&&o.remove(),t.enlarge(CKEDITOR.ENLARGE_INLINE),t.deleteContents(),i.getParent()&&(i.moveChildren(n,!1),e.lastElement.mergeSiblings(),sn(n,i,!0)),(t=c.getSelection().getRanges()[0]).collapse(1),t.optimize(),""===t.startContainer.getHtml()&&t.startContainer.appendBogus(),t.select(),!0);if(e)return c.getSelection().scrollIntoView(),c.fire("saveSnapshot"),!1}},this,null,100))},getUniqueId:function(){var t;try{this._.expandoNumber=t=CKEDITOR.dom.domObject.prototype.getUniqueId.call(this)}catch(e){t=this._&&this._.expandoNumber}return t}},_:{cleanCustomData:function(){this.removeClass("cke_editable"),this.restoreAttrs();for(var e,t,n=this.removeCustomData("classes");n&&n.length;)this.removeClass(n.pop());this.is("textarea")||(e=(n=this.getDocument()).getHead()).getCustomData("stylesheet")&&(t=n.getCustomData("stylesheet_ref"),--t?n.setCustomData("stylesheet_ref",t):(n.removeCustomData("stylesheet_ref"),e.removeCustomData("stylesheet").remove()))}}}),CKEDITOR.editor.prototype.editable=function(e){var t=this._.editable;return t&&e?0:arguments.length?(t=e?e instanceof CKEDITOR.editable?e:new CKEDITOR.editable(this,e):(t&&t.detach(),null),this._.editable=t):t},CKEDITOR.on("instanceLoaded",function(e){var n=e.editor;n.on("insertElement",function(e){(e=e.data).type==CKEDITOR.NODE_ELEMENT&&(e.is("input")||e.is("textarea"))&&("false"!=e.getAttribute("contentEditable")&&e.data("cke-editable",e.hasAttribute("contenteditable")?"true":"1"),e.setAttribute("contentEditable",!1))}),n.on("selectionChange",function(e){var t;n.readOnly||(t=n.getSelection())&&!t.isLocked&&(t=n.checkDirty(),n.fire("lockSnapshot"),Qt(e),n.fire("unlockSnapshot"),t||n.resetDirty())})}),CKEDITOR.on("instanceCreated",function(e){var o=e.editor;o.on("mode",function(){var e,t,n,i=o.editable();i&&i.isInline()&&(e=o.title,i.changeAttr("role","textbox"),i.changeAttr("aria-multiline","true"),i.changeAttr("aria-label",e),e&&i.changeAttr("title",e),(n=o.fire("ariaEditorHelpLabel",{}).label)&&(e=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents"))&&(t=CKEDITOR.tools.getNextId(),n=CKEDITOR.dom.element.createFromHtml('<span id="'+t+'" class="cke_voice_label">'+n+"</span>"),e.append(n),i.changeAttr("aria-describedby",t)))})}),CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}"),S=CKEDITOR.dom.walker.whitespaces(!0),x=CKEDITOR.dom.walker.bookmark(!1,!0),A=CKEDITOR.dom.walker.empty(),L=CKEDITOR.dom.walker.bogus(),F=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>|&nbsp;|\u00A0|&#160;)?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,q=CKEDITOR.dtd,U={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,li:1,pre:1,dl:1,blockquote:1},z={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},delete(V=CKEDITOR.tools.extend({},q.$inline)).br,P=function(e,t,n,i){var o,a,r,s,l=e.editor,c=!1;if("unfiltered_html"==t&&(t="html",c=!0),!i.checkReadOnly()){var d,u,h,f,c=(t={type:t,dontFilter:c,editable:e,editor:l,range:i,blockLimit:g=new CKEDITOR.dom.elementPath(i.startContainer,i.root).blockLimit||i.root,mergeCandidates:[],zombies:[]}).range,g=t.mergeCandidates,m="html"===t.type;for("text"==t.type&&c.shrink(CKEDITOR.SHRINK_ELEMENT,!0,!1)&&(d=CKEDITOR.dom.element.createFromHtml("<span>&nbsp;</span>",c.document),c.insertNode(d),c.setStartAfter(d)),b=new CKEDITOR.dom.elementPath(c.startContainer),t.endPath=y=new CKEDITOR.dom.elementPath(c.endContainer),c.collapsed||(u=y.block||y.blockLimit,K=c.getCommonAncestor(),u&&!u.equals(K)&&!u.contains(K)&&c.checkEndOfBlock()&&t.zombies.push(u),c.deleteContents());(D=cn(c))&&ln(D)&&D.isBlockBoundary()&&b.contains(D);)c.moveToPosition(D,CKEDITOR.POSITION_BEFORE_END);for(!function e(t,n,i,o){var a,r=t.clone();r.setEndAt(n,CKEDITOR.POSITION_BEFORE_END),(r=new CKEDITOR.dom.walker(r).next())&&ln(r)&&U[r.getName()]&&(a=r.getPrevious())&&ln(a)&&!a.getParent().equals(t.startContainer)&&i.contains(a)&&o.contains(r)&&r.isIdentical(a)&&(r.moveChildren(a),r.remove(),e(t,n,i,o))}(c,t.blockLimit,b,y),d&&(c.setEndBefore(d),c.collapse(),d.remove()),(u=(d=c.startPath()).contains(dn,!1,1))&&(C=c.splitElement(u),t.inlineStylesRoot=u,t.inlineStylesPeak=d.lastElement),d=c.createBookmark(),m&&(an(u),an(C)),(u=d.startNode.getPrevious(tn))&&ln(u)&&dn(u)&&g.push(u),(u=d.startNode.getNext(tn))&&ln(u)&&dn(u)&&g.push(u),u=d.startNode;(u=u.getParent())&&dn(u);)g.push(u);if(c.moveToBookmark(d),C=""===(C=e.getHtml())||C.match(F),l.enterMode===CKEDITOR.ENTER_DIV&&C&&((l=e.getFirst())&&l.remove(),i.setStartAt(e,CKEDITOR.POSITION_AFTER_START),i.collapse(!0)),e=n){if(e=t.range,"text"==t.type&&t.inlineStylesRoot){for(l=(i=t.inlineStylesPeak).getDocument().createText("{cke-peak}"),C=t.inlineStylesRoot.getParent();!i.equals(C);)l=l.appendTo(i.clone()),i=i.getParent();n=l.getOuterHtml().split("{cke-peak}").join(n)}if(i=t.blockLimit.getName(),/^\s+|\s+$/.test(n)&&"span"in CKEDITOR.dtd[i]&&(n=(I='<span data-cke-marker="1">&nbsp;</span>')+n+I),n=t.editor.dataProcessor.toHtml(n,{context:null,fixForBody:!1,protectedWhitespaces:!!I,dontFilter:t.dontFilter,filter:t.editor.activeFilter,enterMode:t.editor.activeEnterMode}),(i=e.document.createElement("body")).setHtml(n),I&&(i.getFirst().remove(),i.getLast().remove()),(I=e.startPath().block)&&(1!=I.getChildCount()||!I.getBogus()))e:if(1==i.getChildCount()&&ln(h=i.getFirst())&&h.is(z)&&!h.hasAttribute("contenteditable")){for(e=0,C=(I=h.getElementsByTag("*")).count();e<C;e++)if(!(l=I.getItem(e)).is(V))break e;h.moveChildren(h.getParent(1)),h.remove()}t.dataWrapper=i,e=n}if(e){e=(h=t.range).document,i=t.blockLimit;var E,p,T,C=0,I=[];n=d=0;var O,D,l=h.startContainer,c=(D=t.endPath.elements[0]).getPosition(l),g=!(!D.getCommonAncestor(l)||c==CKEDITOR.POSITION_IDENTICAL||c&CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED),l=function e(t,n){for(var i,o,a,r=[],s=n.range.startContainer,l=n.range.startPath(),s=q[s.getName()],c=0,d=t.getChildren(),u=d.count(),h=-1,f=-1,g=0,m=l.contains(q.$list);c<u;++c)ln(l=d.getItem(c))?(o=l.getName(),m&&o in CKEDITOR.dtd.$list?r=r.concat(e(l,n)):(a=!!s[o],"br"!=o||!l.data("cke-eol")||c&&c!=u-1||(g=(i=c?r[c-1].node:d.getItem(c+1))&&(!ln(i)||!i.is("br")),i=i&&ln(i)&&q.$block[i.getName()]),-1!=h||a||(h=c),a||(f=c),r.push({isElement:1,isLineBreak:g,isBlock:l.isBlockBoundary(),hasBlockSibling:i,node:l,name:o,allowed:a}),i=g=0)):r.push({isElement:0,node:l,allowed:1});return-1<h&&(r[h].firstNotAllowed=1),-1<f&&(r[f].lastNotAllowed=1),r}(t.dataWrapper,t);for(o=l,r=(a=h).endContainer.getChild(a.endOffset),s=a.endContainer.getChild(a.endOffset-1),r&&w(r,o[o.length-1]),s&&w(s,o[0])&&(a.setEnd(a.endContainer,a.endOffset-1),a.collapse());C<l.length;C++)if((m=(c=l[C]).isLineBreak)&&(m=h,u=i,y=b=void 0,m=c.hasBlockSibling?1:(b=m.startContainer.getAscendant(q.$block,1))&&b.is({div:1,p:1})?(y=b.getPosition(u))==CKEDITOR.POSITION_IDENTICAL||y==CKEDITOR.POSITION_CONTAINS?0:(u=m.splitElement(b),m.moveToPosition(u,CKEDITOR.POSITION_AFTER_START),1):0),m)n=0<C;else{if(m=h.startPath(),!c.isBlock&&nn(t.editor,m.block,m.blockLimit)&&(T=on(t.editor))&&((T=e.createElement(T)).appendBogus(),h.insertNode(T),CKEDITOR.env.needsBrFiller&&(E=T.getBogus())&&E.remove(),h.moveToPosition(T,CKEDITOR.POSITION_BEFORE_END)),(m=h.startPath().block)&&!m.equals(p)&&((E=m.getBogus())&&(E.remove(),I.push(m)),p=m),(d=c.firstNotAllowed?1:d)&&c.isElement){for(m=h.startContainer,u=null;m&&!q[m.getName()][c.name];){if(m.equals(i)){m=null;break}m=(u=m).getParent()}if(m)u&&(O=h.splitElement(u),t.zombies.push(O),t.zombies.push(u));else{u=i.getName();for(var R,v=!C,m=C==l.length-1,b=[],y=(u=function e(t,n){var i,o=[],a=t.getChildren(),r=a.count(),s=0,l=q[n],t=!t.is(q.$inline)||t.is("br");for(t&&o.push(" ");s<r;s++)ln(i=a.getItem(s))&&!i.is(l)?o=o.concat(e(i,n)):o.push(i);return t&&o.push(" "),o}(c.node,u)).length,K=0,_=0,k=-1;K<y;K++)_=" "==(R=u[K])?(_||v&&!K||(b.push(new CKEDITOR.dom.text(" ")),k=b.length),1):(b.push(R),0);m&&k==b.length&&b.pop(),v=b}}if(v){for(;m=v.pop();)h.insertNode(m);v=0}else h.insertNode(c.node);c.lastNotAllowed&&C<l.length-1&&((O=g?D:O)&&h.setEndAt(O,CKEDITOR.POSITION_AFTER_START),d=0),h.collapse()}(E=1==l.length&&((E=l[0]).isElement&&"false"==E.node.getAttribute("contenteditable")))&&(n=!0,m=l[0].node,h.setStartAt(m,CKEDITOR.POSITION_BEFORE_START),h.setEndAt(m,CKEDITOR.POSITION_AFTER_END)),t.dontMoveCaret=n,t.bogusNeededBlocks=I}for(E=t.range,v=t.bogusNeededBlocks,p=E.createBookmark();T=t.zombies.pop();)T.getParent()&&((O=E.clone()).moveToElementEditStart(T),O.removeEmptyBlocksAtEnd());if(v)for(;T=v.pop();)CKEDITOR.env.needsBrFiller?T.appendBogus():T.append(E.document.createText(" "));for(;T=t.mergeCandidates.pop();)T.mergeSiblings();if(CKEDITOR.env.webkit&&E.startPath()&&((T=E.startPath()).block?T.block.$.normalize():T.blockLimit&&T.blockLimit.$.normalize()),E.moveToBookmark(p),!t.dontMoveCaret){for(T=cn(E);T&&ln(T)&&!T.is(q.$empty);){if(T.isBlockBoundary())E.moveToPosition(T,CKEDITOR.POSITION_BEFORE_END);else{if(dn(T)&&T.getHtml().match(/(\s|&nbsp;)$/g)){f=null;break}(f=E.clone()).moveToPosition(T,CKEDITOR.POSITION_BEFORE_END)}T=T.getLast(tn)}f&&E.moveToRange(f)}}function w(e,t){return t.isBlock&&t.isElement&&!t.node.is("br")&&ln(e)&&e.is("br")&&(e.remove(),1)}},B=function(e){var t=e.startContainer,n=t.getAscendant("table",1),i=!1;fn(n.getElementsByTag("td")),fn(n.getElementsByTag("th")),(n=e.clone()).setStart(t,0),(n=un(n).lastBackward())||((n=e.clone()).setEndAt(t,CKEDITOR.POSITION_BEFORE_END),n=un(n).lastForward(),i=!0),(n=n||t).is("table")?(e.setStartAt(n,CKEDITOR.POSITION_BEFORE_START),e.collapse(!0),n.remove()):((t=(n=(n=n.is({tbody:1,thead:1,tfoot:1})?hn(n,"tr",i):n).is("tr")?hn(n,n.getParent().is("thead")?"th":"td",i):n).getBogus())&&t.remove(),e.moveToPosition(n,i?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END))},M=function(e){var t=e.startContainer,n=!1,i=e.clone();i.setStart(t,0),(i=gn(i).lastBackward())||((i=e.clone()).setEndAt(t,CKEDITOR.POSITION_BEFORE_END),i=gn(i).lastForward(),n=!0),(i=i||t).is(CKEDITOR.dtd.$list)?(e.setStartAt(i,CKEDITOR.POSITION_BEFORE_START),e.collapse(!0),i.remove()):((t=i.getBogus())&&t.remove(),e.moveToPosition(i,n?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END),e.select())},$={eol:{detect:function(e,t){var n=e.range,i=n.clone(),o=n.clone(),a=new CKEDITOR.dom.elementPath(n.startContainer,t),t=new CKEDITOR.dom.elementPath(n.endContainer,t);i.collapse(1),o.collapse(),a.block&&i.checkBoundaryOfElement(a.block,CKEDITOR.END)&&(n.setStartAfter(a.block),e.prependEolBr=1),t.block&&o.checkBoundaryOfElement(t.block,CKEDITOR.START)&&(n.setEndBefore(t.block),e.appendEolBr=1)},fix:function(e,t){var n,t=t.getDocument();e.appendEolBr&&(n=this.createEolBr(t),e.fragment.append(n)),!e.prependEolBr||n&&!n.getPrevious()||e.fragment.append(this.createEolBr(t),1)},createEolBr:function(e){return e.createElement("br",{attributes:{"data-cke-eol":1}})}},bogus:{exclude:function(e){var t=e.range.getBoundaryNodes(),n=t.startNode;!(t=t.endNode)||!L(t)||n&&n.equals(t)||e.range.setEndBefore(t)}},tree:{rebuild:function(e,t){var n,i,o,a=(l=e.range).getCommonAncestor(),r=new CKEDITOR.dom.elementPath(a,t),s=new CKEDITOR.dom.elementPath(l.startContainer,t),l=new CKEDITOR.dom.elementPath(l.endContainer,t);a.type==CKEDITOR.NODE_TEXT&&(a=a.getParent()),r.blockLimit.is({tr:1,table:1})?(n=r.contains("table").getParent(),i=function(e){return!e.equals(n)}):r.block&&r.block.is(CKEDITOR.dtd.$listItem)&&(s=s.contains(CKEDITOR.dtd.$list),l=l.contains(CKEDITOR.dtd.$list),!s.equals(l))&&(o=r.contains(CKEDITOR.dtd.$list).getParent(),i=function(e){return!e.equals(o)}),this.rebuildFragment(e,t,a,i=i||function(e){return!e.equals(r.block)&&!e.equals(r.blockLimit)})},rebuildFragment:function(e,t,n,i){for(var o;n&&!n.equals(t)&&i(n);)o=n.clone(0,1),e.fragment.appendTo(o),e.fragment=o,n=n.getParent()}},cell:{shrink:function(e){var t=(e=e.range).startContainer,n=e.endContainer,i=e.startOffset,o=e.endOffset;t.type==CKEDITOR.NODE_ELEMENT&&t.equals(n)&&t.is("tr")&&++i==o&&e.shrink(CKEDITOR.SHRINK_TEXT)}}},H={list:{detectMerge:function(e,t){var n=pn(t,e.bookmark),i=n.startPath(),o=n.endPath(),a=i.contains(CKEDITOR.dtd.$list),t=o.contains(CKEDITOR.dtd.$list);e.mergeList=a&&t&&a.getParent().equals(t.getParent())&&!a.equals(t),e.mergeListItems=i.block&&o.block&&i.block.is(CKEDITOR.dtd.$listItem)&&o.block.is(CKEDITOR.dtd.$listItem),(e.mergeList||e.mergeListItems)&&((n=n.clone()).setStartBefore(e.bookmark.startNode),n.setEndAfter(e.bookmark.endNode),e.mergeListBookmark=n.createBookmark())},merge:function(e,t){var n,i,o,a,r;e.mergeListBookmark&&(n=e.mergeListBookmark.startNode,i=e.mergeListBookmark.endNode,o=new CKEDITOR.dom.elementPath(n,t),a=new CKEDITOR.dom.elementPath(i,t),e.mergeList&&(r=o.contains(CKEDITOR.dtd.$list),t=a.contains(CKEDITOR.dtd.$list),r.equals(t)||(t.moveChildren(r),t.remove())),e.mergeListItems&&(o=o.contains(CKEDITOR.dtd.$listItem),a=a.contains(CKEDITOR.dtd.$listItem),o.equals(a)||En(a,n,i)),n.remove(),i.remove())}},block:{detectMerge:function(e,t){e.tableContentsRanges||e.mergeListBookmark||((t=new CKEDITOR.dom.range(t)).setStartBefore(e.bookmark.startNode),t.setEndAfter(e.bookmark.endNode),e.mergeBlockBookmark=t.createBookmark())},merge:function(e,t){var n,i;e.mergeBlockBookmark&&!e.purgeTableBookmark&&(n=e.mergeBlockBookmark.startNode,i=e.mergeBlockBookmark.endNode,e=new CKEDITOR.dom.elementPath(n,t),t=new CKEDITOR.dom.elementPath(i,t),e=e.block,t=t.block,e&&t&&!e.equals(t)&&En(t,n,i),n.remove(),i.remove())}},table:(W={td:1,th:1,caption:1},{detectPurge:function(e){var t=e.range;(i=t.clone()).enlarge(CKEDITOR.ENLARGE_ELEMENT);var n,i=new CKEDITOR.dom.walker(i),o=0;i.evaluator=function(e){e.type==CKEDITOR.NODE_ELEMENT&&e.is(W)&&++o},i.checkForward(),1<o&&(i=t.startPath().contains("table"),n=t.endPath().contains("table"),i&&n&&t.checkBoundaryOfElement(i,CKEDITOR.START)&&t.checkBoundaryOfElement(n,CKEDITOR.END)&&((t=e.range.clone()).setStartBefore(i),t.setEndAfter(n),e.purgeTableBookmark=t.createBookmark()))},detectRanges:function(e,t){var n,i=pn(t,e.bookmark),o=i.clone(),t=a=(a=i.getCommonAncestor()).is(CKEDITOR.dtd.$tableContent)&&!a.is(W)?a.getAscendant("table",!0):a,a=new CKEDITOR.dom.elementPath(i.startContainer,t);t=new CKEDITOR.dom.elementPath(i.endContainer,t),a=a.contains("table"),t=t.contains("table"),(a||t)&&(a&&t&&Cn(a,t)?((e.tableSurroundingRange=o).setStartAt(a,CKEDITOR.POSITION_AFTER_END),o.setEndAt(t,CKEDITOR.POSITION_BEFORE_START),(o=i.clone()).setEndAt(a,CKEDITOR.POSITION_AFTER_END),(n=i.clone()).setStartAt(t,CKEDITOR.POSITION_BEFORE_START),n=Tn(o).concat(Tn(n))):a?t||((e.tableSurroundingRange=o).setStartAt(a,CKEDITOR.POSITION_AFTER_END),i.setEndAt(a,CKEDITOR.POSITION_AFTER_END)):((e.tableSurroundingRange=o).setEndAt(t,CKEDITOR.POSITION_BEFORE_START),i.setStartAt(t,CKEDITOR.POSITION_AFTER_START)),e.tableContentsRanges=n||Tn(i))},deleteRanges:function(e){for(var t;t=e.tableContentsRanges.pop();)t.extractContents(),A(t.startContainer)&&t.startContainer.appendBogus();e.tableSurroundingRange&&e.tableSurroundingRange.extractContents()},purge:function(e){var t,n;e.purgeTableBookmark&&(n=e.doc,t=e.range.clone(),(n=n.createElement("p")).insertBefore(e.purgeTableBookmark.startNode),t.moveToBookmark(e.purgeTableBookmark),t.deleteContents(),e.range.moveToPosition(n,CKEDITOR.POSITION_AFTER_START))}}),detectExtractMerge:function(e){return!(e.range.startPath().contains(CKEDITOR.dtd.$listItem)&&e.range.endPath().contains(CKEDITOR.dtd.$listItem))},fixUneditableRangePosition:function(e){e.startContainer.getDtd()["#"]||e.moveToClosestEditablePosition(null,!0)},autoParagraph:function(e,t){var n,i=t.startPath();nn(e,i.block,i.blockLimit)&&(n=on(e))&&((n=t.document.createElement(n)).appendBogus(),t.insertNode(n),t.moveToPosition(n,CKEDITOR.POSITION_AFTER_START))}},function(){function d(e){return CKEDITOR.plugins.widget&&CKEDITOR.plugins.widget.isDomWidget(e)}function h(e,t){if(0===e.length||d(e[0].getEnclosedNode()))return!1;var n,i,o;if((i=!t&&1===e.length)&&!(i=e[0].collapsed)&&(i=(n=e[0]).startContainer.getAscendant({td:1,th:1},!0),t=n.endContainer.getAscendant({td:1,th:1},!0),o=CKEDITOR.tools.trim,i=!(!i||!i.equals(t)||i.findOne("td, th, tr, tbody, table"))&&(!(n=n.cloneContents()).getFirst()||o(n.getFirst().getText())!==o(i.getText()))),i)return!1;for(o=0;o<e.length;o++)if(!(i=e[o]._getTableElement()))return!1;return!0}function a(e){for(var t,n=[],i=0;i<e.length;i++)(t=e[i]._getTableElement()).is&&t.is({td:1,th:1})?n.push(t):n=n.concat(function(e){e=e.find("td, th");for(var t=[],n=0;n<e.count();n++)t.push(e.getItem(n));return t}(t));return n}function f(e){var t=this.root.editor,n=t.getSelection(1);this.reset(),E=!0,n.root.once("selectionchange",function(e){e.cancel()},null,null,0),n.selectRanges([e[0]]),(n=this._.cache).ranges=new CKEDITOR.dom.rangeList(e),n.type=CKEDITOR.SELECTION_TEXT,n.selectedElement=e[0]._getTableElement(),n.selectedText=function(e){e=a(e);for(var t,n="",i=[],o=0;o<e.length;o++)t&&!t.equals(e[o].getAscendant("tr"))?(n+=i.join("\t")+"\n",t=e[o].getAscendant("tr"),i=[]):0===o&&(t=e[o].getAscendant("tr")),i.push(e[o].getText());return n+i.join("\t")}(e),n.nativeSel=null,this.isFake=1,this.rev=s++,t._.fakeSelection=this,E=!1,this.root.fire("selectionchange")}function p(){var e,t,n,i,o,a,r,s,l,c=this._.fakeSelection;c&&(!(s=!(l=this.getSelection(1)))&&(s=!l.isHidden())&&(s=c,e=l.getRanges(),a=s.getRanges(),r=e.length&&e[0]._getTableElement()&&e[0]._getTableElement().getAscendant("table",!0),t=a.length&&a[0]._getTableElement()&&a[0]._getTableElement().getAscendant("table",!0),n=1===e.length&&e[0]._getTableElement()&&e[0]._getTableElement().is("table"),i=1===a.length&&a[0]._getTableElement()&&a[0]._getTableElement().is("table"),s=!(s=!d(s.getSelectedElement())&&(o=1===e.length&&e[0].collapsed,a=h(e,!!CKEDITOR.env.webkit)&&h(a),!(!(r=!(!r||!t)&&(r.equals(t)||t.contains(r)))||!o&&!a)&&(n&&!i&&s.selectRanges(e),!0)))),s&&(c.reset(),c=0)),(c||(c=l||this.getSelection(1))&&c.getType()!=CKEDITOR.SELECTION_NONE)&&(this.fire("selectionCheck",c),(l=this.elementPath()).compare(this._.selectionPreviousPath)||(s=this._.selectionPreviousPath&&this._.selectionPreviousPath.blockLimit.equals(l.blockLimit),!CKEDITOR.env.webkit&&!CKEDITOR.env.gecko||s||(this._.previousActive=this.document.getActive()),this._.selectionPreviousPath=l,this.fire("selectionChange",{selection:c,path:l})))}function T(){n=!0,t||(e.call(this),t=CKEDITOR.tools.setTimeout(e,200,this))}function e(){t=null,n&&(CKEDITOR.tools.setTimeout(p,0,this),n=!1)}function g(e){return!(!u(e)&&(e.type!=CKEDITOR.NODE_ELEMENT||e.is(CKEDITOR.dtd.$empty)))}function m(e){C(e,!1);var t=e.getDocument().createText(l);return e.setCustomData("cke-fillingChar",t),t}function C(e,t){var n,i,o,a=e&&e.removeCustomData("cke-fillingChar");a&&(!1!==t&&(i=(n=e.getDocument().getSelection().getNative())&&"None"!=n.type&&n.getRangeAt(0),t=l.length,a.getLength()>t&&i&&i.intersectsNode(a.$)&&(o=[{node:n.anchorNode,offset:n.anchorOffset},{node:n.focusNode,offset:n.focusOffset}],n.anchorNode==a.$&&n.anchorOffset>t&&(o[0].offset-=t),n.focusNode==a.$&&n.focusOffset>t&&(o[1].offset-=t))),a.setText(r(a.getText(),1)),o&&(n=(a=e.getDocument().$).getSelection(),(a=a.createRange()).setStart(o[0].node,o[0].offset),a.collapse(!0),n.removeAllRanges(),n.addRange(a),n.extend(o[1].node,o[1].offset)))}function r(e,t){return t?e.replace(c,function(e,t){return t?" ":""}):e.replace(l,"")}var E,t,n,i,o,I="function"!=typeof window.getSelection,s=1,l=CKEDITOR.tools.repeat("​",7),c=new RegExp(l+"( )?","g"),u=CKEDITOR.dom.walker.invisible(1),O=(i=D(),o=D(1),{37:i,38:i,39:o,40:o,8:R(),46:R(1)});function D(n){return function(e){var t=e.editor.createRange();return t.moveToClosestEditablePosition(e.selected,n)&&e.editor.getSelection().selectRanges([t]),!1}}function R(o){return function(e){var t,n=e.editor,i=n.createRange();if(!n.readOnly)return(t=!(t=i.moveToClosestEditablePosition(e.selected,o))?i.moveToClosestEditablePosition(e.selected,!o):t)&&n.getSelection().selectRanges([i]),n.fire("saveSnapshot"),e.selected.remove(),t||(i.moveToElementEditablePosition(n.editable()),n.getSelection().selectRanges([i])),n.fire("saveSnapshot"),!1}}CKEDITOR.on("instanceCreated",function(e){function t(){var e=E.getSelection();e&&e.removeAllRanges()}var E=e.editor;E.on("contentDom",function(){function e(){(i=new CKEDITOR.dom.selection(E.getSelection())).lock()}function n(){u.removeListener("mouseup",n),g.removeListener("mouseup",n);var e=CKEDITOR.document.$.selection,t=e.createRange();"None"!=e.type&&t.parentElement()&&t.parentElement().ownerDocument==d.$&&t.select()}var t,i,o,a,r,s,l,c,d=E.document,u=CKEDITOR.document,h=E.editable(),f=d.getBody(),g=d.getDocumentElement(),m=h.isInline();CKEDITOR.env.gecko&&h.attachListener(h,"focus",function(e){e.removeListener(),0!==t&&(e=E.getSelection().getNative())&&e.isCollapsed&&e.anchorNode==h.$&&((e=E.createRange()).moveToElementEditStart(h),e.select())},null,null,-2),h.attachListener(h,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusin":"focus",function(){var e;t&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)&&(t=E._.previousActive&&E._.previousActive.equals(d.getActive()),e=null!=E._.previousScrollTop&&E._.previousScrollTop!=h.$.scrollTop,CKEDITOR.env.webkit&&t&&e&&(h.$.scrollTop=E._.previousScrollTop)),E.unlockSelection(t),t=0},null,null,-1),h.attachListener(h,"mousedown",function(){t=0}),(CKEDITOR.env.ie||CKEDITOR.env.gecko||m)&&(I?h.attachListener(h,"beforedeactivate",e,null,null,-1):h.attachListener(E,"selectionCheck",e,null,null,-1),h.attachListener(h,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusout":"blur",function(){var e=i&&(i.isFake||i.getRanges().length<2);CKEDITOR.env.gecko&&!m&&e||(E.lockSelection(i),t=1)},null,null,-1),h.attachListener(h,"mousedown",function(){t=0})),CKEDITOR.env.ie&&!m&&(h.attachListener(h,"mousedown",function(e){2==e.data.$.button&&((e=E.document.getSelection())&&e.getType()!=CKEDITOR.SELECTION_NONE||(o=E.window.getScrollPosition()))}),h.attachListener(h,"mouseup",function(e){2==e.data.$.button&&o&&(E.document.$.documentElement.scrollLeft=o.x,E.document.$.documentElement.scrollTop=o.y),o=null}),"BackCompat"!=d.$.compatMode&&((CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&g.on("mousedown",function(e){function t(e){if(e=e.data.$,a){var t=f.$.createTextRange();try{t.moveToPoint(e.clientX,e.clientY)}catch(e){}a.setEndPoint(r.compareEndPoints("StartToStart",t)<0?"EndToEnd":"StartToStart",t),a.select()}}function n(){g.removeListener("mousemove",t),u.removeListener("mouseup",n),g.removeListener("mouseup",n),a.select()}if((e=e.data).getTarget().is("html")&&e.$.y<g.$.clientHeight&&e.$.x<g.$.clientWidth){a=f.$.createTextRange();try{a.moveToPoint(e.$.clientX,e.$.clientY)}catch(e){}r=a.duplicate(),g.on("mousemove",t),u.on("mouseup",n),g.on("mouseup",n)}}),7<CKEDITOR.env.version&&CKEDITOR.env.version<11&&g.on("mousedown",function(e){e.data.getTarget().is("html")&&(u.on("mouseup",n),g.on("mouseup",n))}))),h.attachListener(h,"selectionchange",p,E),h.attachListener(h,"keyup",T,E),h.attachListener(h,"touchstart",T,E),h.attachListener(h,"touchend",T,E),CKEDITOR.env.ie&&h.attachListener(h,"keydown",function(e){var t,n=!!(n=this.document.getActive())&&("input"===n.getName()||"textarea"===n.getName());n||(n=this.getSelection(1),(t=(t=(t=n).getRanges()[0])&&(t=t.startContainer.getAscendant(function(e){return e.type==CKEDITOR.NODE_ELEMENT&&e.hasAttribute("contenteditable")},!0))&&"false"===t.getAttribute("contenteditable")?t:null)&&!t.equals(h)&&(n.selectElement(t),e.data.preventDefault()))},E),h.attachListener(h,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusin":"focus",function(){E.forceNextSelectionCheck(),E.selectionChange(1)}),m&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)?(h.attachListener(h,"mousedown",function(){s=1}),h.attachListener(d.getDocumentElement(),"mouseup",function(){s&&T.call(E),s=0})):h.attachListener(CKEDITOR.env.ie?h:d.getDocumentElement(),"mouseup",T,E),CKEDITOR.env.webkit&&h.attachListener(d,"keydown",function(e){switch(e.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:h.hasFocus&&C(h)}},null,null,-1),h.attachListener(h,"keydown",(l=E,c={37:1,39:1,8:1,46:1},function(e){var t,n,i=e.data.getKeystroke();c[i]&&(n=(t=l.getSelection()).getRanges()[0],t.isCollapsed()&&(n=n[i<38?"getPreviousEditableNode":"getNextEditableNode"]())&&n.type==CKEDITOR.NODE_ELEMENT&&"false"==n.getAttribute("contenteditable")&&(!(t=t.getStartElement()).isBlockBoundary()||""!==(void 0===t.$.textContent?t.$.innerText:t.$.textContent)||8!==i&&46!==i||(t.remove(),l.fire("saveSnapshot")),l.getSelection().fake(n),e.data.preventDefault(),e.cancel()))}),null,null,-1)}),E.on("setData",function(){E.unlockSelection(),CKEDITOR.env.webkit&&t()}),E.on("contentDomUnload",function(){E.unlockSelection()}),CKEDITOR.env.ie9Compat&&E.on("beforeDestroy",t,null,null,9),E.on("dataReady",function(){delete E._.fakeSelection,delete E._.hiddenSelectionContainer,E.selectionChange(1)}),E.on("loadSnapshot",function(){var e=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT),t=E.editable().getLast(e);t&&t.hasAttribute("data-cke-hidden-sel")&&(t.remove(),CKEDITOR.env.gecko&&(e=E.editable().getFirst(e))&&e.is("br")&&e.getAttribute("_moz_editor_bogus_node")&&e.remove())},null,null,100),E.on("key",function(e){if("wysiwyg"==E.mode){var t=E.getSelection();if(t.isFake){var n=O[e.data.keyCode];if(n)return n({editor:E,selected:t.getSelectedElement(),selection:t,keyEvent:e})}}})}),CKEDITOR.env.webkit&&CKEDITOR.on("instanceReady",function(e){var n=e.editor;n.on("selectionChange",function(){var e=n.editable(),t=e.getCustomData("cke-fillingChar");t&&(t.getCustomData("ready")?(C(e),e.editor.fire("selectionCheck")):t.setCustomData("ready",1))},null,null,-1),n.on("beforeSetMode",function(){C(n.editable())},null,null,-1),n.on("getSnapshot",function(e){e.data&&(e.data=r(e.data))},n,null,20),n.on("toDataFormat",function(e){e.data.dataValue=r(e.data.dataValue)},null,null,0)}),CKEDITOR.editor.prototype.selectionChange=function(e){(e?p:T).call(this)},CKEDITOR.editor.prototype.getSelection=function(e){return!this._.savedSelection&&!this._.fakeSelection||e?(e=this.editable())&&"wysiwyg"==this.mode?new CKEDITOR.dom.selection(e):null:this._.savedSelection||this._.fakeSelection},CKEDITOR.editor.prototype.getSelectedRanges=function(e){var t=this.getSelection();return t&&t.getRanges(e)||[]},CKEDITOR.editor.prototype.lockSelection=function(e){return(e=e||this.getSelection(1)).getType()!=CKEDITOR.SELECTION_NONE&&(e.isLocked||e.lock(),this._.savedSelection=e,!0)},CKEDITOR.editor.prototype.unlockSelection=function(e){var t=this._.savedSelection;return!!t&&(t.unlock(e),delete this._.savedSelection,!0)},CKEDITOR.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath},CKEDITOR.dom.document.prototype.getSelection=function(){return new CKEDITOR.dom.selection(this)},CKEDITOR.dom.range.prototype.select=function(){var e=this.root instanceof CKEDITOR.editable?this.root.editor.getSelection():new CKEDITOR.dom.selection(this.root);return e.selectRanges([this]),e},CKEDITOR.SELECTION_NONE=1,CKEDITOR.SELECTION_TEXT=2,CKEDITOR.SELECTION_ELEMENT=3,CKEDITOR.dom.selection=function(e){var t,n,i,o=(e=e instanceof CKEDITOR.dom.selection?(t=e).root:e)instanceof CKEDITOR.dom.element;if(this.rev=t?t.rev:s++,this.document=e instanceof CKEDITOR.dom.document?e:e.getDocument(),this.root=o?e:this.document.getBody(),this.isLocked=0,this._={cache:{}},t)return CKEDITOR.tools.extend(this._.cache,t._.cache),this.isFake=t.isFake,this.isLocked=t.isLocked,this;if(e=this.getNative())if(e.getRangeAt)n=(i=e.rangeCount&&e.getRangeAt(0))&&new CKEDITOR.dom.node(i.commonAncestorContainer);else{try{i=e.createRange()}catch(e){}n=i&&CKEDITOR.dom.element.get(i.item&&i.item(0)||i.parentElement())}return n&&(n.type==CKEDITOR.NODE_ELEMENT||n.type==CKEDITOR.NODE_TEXT)&&(this.root.equals(n)||this.root.contains(n))||(this._.cache.type=CKEDITOR.SELECTION_NONE,this._.cache.startElement=null,this._.cache.selectedElement=null,this._.cache.selectedText="",this._.cache.ranges=new CKEDITOR.dom.rangeList),this};var v,b={img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1,select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1};function y(e){return new CKEDITOR.dom.node(e).getIndex()}function K(e,t){(e=e.duplicate()).collapse(t);var n=e.parentElement();if(!n.hasChildNodes())return{container:n,offset:0};for(var i,o,a,r,s=n.children,l=e.duplicate(),c=0,d=s.length-1,u=-1;c<=d;)if(i=s[u=Math.floor((c+d)/2)],l.moveToElementText(i),0<(a=l.compareEndPoints("StartToStart",e)))d=u-1;else{if(!(a<0))return{container:n,offset:y(i)};c=u+1}if(-1==u||u==s.length-1&&a<0){if(l.moveToElementText(n),l.setEndPoint("StartToStart",e),l=l.text.replace(/(\r\n|\r)/g,"\n").length,s=n.childNodes,!l)return(i=s[s.length-1]).nodeType!=CKEDITOR.NODE_TEXT?{container:n,offset:s.length}:{container:i,offset:i.nodeValue.length};for(n=s.length;0<l&&0<n;)(o=s[--n]).nodeType==CKEDITOR.NODE_TEXT&&(l-=(r=o).nodeValue.length);return{container:r,offset:-l}}if(l.collapse(0<a),l.setEndPoint(0<a?"StartToStart":"EndToStart",e),!(l=l.text.replace(/(\r\n|\r)/g,"\n").length))return{container:n,offset:y(i)+(0<a?0:1)};for(;0<l;)try{(o=i[0<a?"previousSibling":"nextSibling"]).nodeType==CKEDITOR.NODE_TEXT&&(l-=o.nodeValue.length,r=o),i=o}catch(e){return{container:n,offset:y(i)}}return{container:r,offset:0<a?-l:r.nodeValue.length+l}}CKEDITOR.tools.extend(CKEDITOR.dom.selection,{_removeFillingCharSequenceString:r,_createFillingCharSequenceNode:m,FILLING_CHAR_SEQUENCE:l}),CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel=I?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:I?function(){var e=this._.cache;if(e.type)return e.type;var t=CKEDITOR.SELECTION_NONE;try{var n=this.getNative(),i=n.type;"Text"==i&&(t=CKEDITOR.SELECTION_TEXT),"Control"==i&&(t=CKEDITOR.SELECTION_ELEMENT),n.createRange().parentElement()&&(t=CKEDITOR.SELECTION_TEXT)}catch(e){}return e.type=t}:function(){var e=this._.cache;if(e.type)return e.type;var t,n=CKEDITOR.SELECTION_TEXT,i=this.getNative();return i&&i.rangeCount?1!=i.rangeCount||(t=(i=i.getRangeAt(0)).startContainer)==i.endContainer&&1==t.nodeType&&1==i.endOffset-i.startOffset&&b[t.childNodes[i.startOffset].nodeName.toLowerCase()]&&(n=CKEDITOR.SELECTION_ELEMENT):n=CKEDITOR.SELECTION_NONE,e.type=n},getRanges:(v=I?function(){var e=(r=this.getNative())&&r.createRange(),t=this.getType();if(!r)return[];if(t==CKEDITOR.SELECTION_TEXT)return r=new CKEDITOR.dom.range(this.root),t=K(e,!0),r.setStart(new CKEDITOR.dom.node(t.container),t.offset),t=K(e),r.setEnd(new CKEDITOR.dom.node(t.container),t.offset),r.endContainer.getPosition(r.startContainer)&CKEDITOR.POSITION_PRECEDING&&r.endOffset<=r.startContainer.getIndex()&&r.collapse(),[r];if(t!=CKEDITOR.SELECTION_ELEMENT)return[];for(var t=[],n=0;n<e.length;n++){for(var i=e.item(n),o=i.parentNode,a=0,r=new CKEDITOR.dom.range(this.root);a<o.childNodes.length&&o.childNodes[a]!=i;a++);r.setStart(new CKEDITOR.dom.node(o),a),r.setEnd(new CKEDITOR.dom.node(o),a+1),t.push(r)}return t}:function(){var e=[],t=this.getNative();if(!t)return e;for(var n=0;n<t.rangeCount;n++){var i,o=t.getRangeAt(n);(i=new CKEDITOR.dom.range(this.root)).setStart(new CKEDITOR.dom.node(o.startContainer),o.startOffset),i.setEnd(new CKEDITOR.dom.node(o.endContainer),o.endOffset),e.push(i)}return e},function(e){var t=this._.cache,n=t.ranges;return n||(t.ranges=n=new CKEDITOR.dom.rangeList(v.call(this))),e?function(n){for(var i=0;i<n.length;i++){var o=n[i];if(o.getCommonAncestor().isReadOnly()&&n.splice(i,1),!o.collapsed){if(o.startContainer.isReadOnly())for(var e=o.startContainer;e&&!((t=e.type==CKEDITOR.NODE_ELEMENT)&&e.is("body")||!e.isReadOnly());)t&&"false"==e.getAttribute("contentEditable")&&o.setStartAfter(e),e=e.getParent();var e=o.startContainer,t=o.endContainer,a=o.startOffset,r=o.endOffset,s=o.clone();e&&e.type==CKEDITOR.NODE_TEXT&&(a>=e.getLength()?s.setStartAfter(e):s.setStartBefore(e)),t&&t.type==CKEDITOR.NODE_TEXT&&(r?s.setEndAfter(t):s.setEndBefore(t)),(e=new CKEDITOR.dom.walker(s)).evaluator=function(e){if(e.type==CKEDITOR.NODE_ELEMENT&&e.isReadOnly()){var t=o.clone();return o.setEndBefore(e),o.collapsed&&n.splice(i--,1),e.getPosition(s.endContainer)&CKEDITOR.POSITION_CONTAINS||(t.setStartAfter(e),t.collapsed||n.splice(i+1,0,t)),!0}return!1},e.next()}}return n}(new CKEDITOR.dom.rangeList(n.slice())):n}),getStartElement:function(){var e,t=this._.cache;if(void 0!==t.startElement)return t.startElement;switch(this.getType()){case CKEDITOR.SELECTION_ELEMENT:return this.getSelectedElement();case CKEDITOR.SELECTION_TEXT:var n=this.getRanges()[0];if(n){if(n.collapsed)(e=n.startContainer).type!=CKEDITOR.NODE_ELEMENT&&(e=e.getParent());else{for(n.optimize();e=n.startContainer,n.startOffset==(e.getChildCount?e.getChildCount():e.getLength())&&!e.isBlockBoundary();)n.setStartAfter(e);if((e=n.startContainer).type!=CKEDITOR.NODE_ELEMENT)return e.getParent();if((e=e.getChild(n.startOffset))&&e.type==CKEDITOR.NODE_ELEMENT)for(n=e.getFirst();n&&n.type==CKEDITOR.NODE_ELEMENT;)n=(e=n).getFirst();else e=n.startContainer}e=e.$}}return t.startElement=e?new CKEDITOR.dom.element(e):null},getSelectedElement:function(){var e=this._.cache;if(void 0!==e.selectedElement)return e.selectedElement;var o=this,t=CKEDITOR.tools.tryThese(function(){return o.getNative().createRange().item(0)},function(){for(var e,t,n=o.getRanges()[0].clone(),i=2;i&&!((e=n.getEnclosedNode())&&e.type==CKEDITOR.NODE_ELEMENT&&b[e.getName()]&&(t=e));i--)n.shrink(CKEDITOR.SHRINK_ELEMENT);return t&&t.$});return e.selectedElement=t?new CKEDITOR.dom.element(t):null},getSelectedText:function(){var e=this._.cache;if(void 0!==e.selectedText)return e.selectedText;var t=this.getNative(),t=I?"Control"==t.type?"":t.createRange().text:t.toString();return e.selectedText=t},lock:function(){this.getRanges(),this.getStartElement(),this.getSelectedElement(),this.getSelectedText(),this._.cache.nativeSel=null,this.isLocked=1},unlock:function(e){var t,n,i;this.isLocked&&(e&&(t=this.getSelectedElement(),n=this.getRanges(),i=this.isFake),this.isLocked=0,this.reset(),(e=e&&(t||n[0]&&n[0].getCommonAncestor()))&&e.getAscendant("body",1)&&((e=this.root.editor)&&e.plugins.tableselection&&e.plugins.tableselection.isSupportedEnvironment(e)&&h(n)?f.call(this,n):i?this.fake(t):t&&n.length<2?this.selectElement(t):this.selectRanges(n)))},reset:function(){this._.cache={},this.isFake=0;var e,t,n=this.root.editor;n&&n._.fakeSelection&&(this.rev==n._.fakeSelection.rev?(delete n._.fakeSelection,(e=n._.hiddenSelectionContainer)&&(t=n.checkDirty(),n.fire("lockSnapshot"),e.remove(),n.fire("unlockSnapshot"),t||n.resetDirty()),delete n._.hiddenSelectionContainer):CKEDITOR.warn("selection-fake-reset")),this.rev=s++},selectElement:function(e){var t=new CKEDITOR.dom.range(this.root);t.setStartBefore(e),t.setEndAfter(e),this.selectRanges([t])},selectRanges:function(e){var t=this.root.editor,n=t&&t._.hiddenSelectionContainer;if(this.reset(),n)for(var i,n=this.root,o=0;o<e.length;++o)(i=e[o]).endContainer.equals(n)&&(i.endOffset=Math.min(i.endOffset,n.getChildCount()));if(e.length)if(this.isLocked){var a=CKEDITOR.document.getActive();this.unlock(),this.selectRanges(e),this.lock(),a&&!a.equals(this.root)&&a.focus()}else if(d=1!=e.length||(u=e[0]).collapsed||!(d=u.getEnclosedNode())||d.type!=CKEDITOR.NODE_ELEMENT||((u=u.clone()).shrink(CKEDITOR.SHRINK_ELEMENT,!0),"false"!=(d=(c=u.getEnclosedNode())&&c.type==CKEDITOR.NODE_ELEMENT?c:d).getAttribute("contenteditable"))?void 0:d)this.fake(d);else if(t&&t.plugins.tableselection&&t.plugins.tableselection.isSupportedEnvironment(t)&&h(e)&&!E&&!e[0]._getTableElement({table:1}).hasAttribute("data-cke-tableselection-ignored"))f.call(this,e);else{if(I){var r,s,l,c=CKEDITOR.dom.walker.whitespaces(!0),d=/\ufeff|\u00a0/,u={table:1,tbody:1,tr:1};if(1<e.length&&(t=e[e.length-1],e[0].setEnd(t.endContainer,t.endOffset)),e=(t=e[0]).collapsed,(n=t.getEnclosedNode())&&n.type==CKEDITOR.NODE_ELEMENT&&n.getName()in b&&(!n.is("a")||!n.getText()))try{return(l=n.$.createControlRange()).addElement(n.$),void l.select()}catch(e){}(t.startContainer.type==CKEDITOR.NODE_ELEMENT&&t.startContainer.getName()in u||t.endContainer.type==CKEDITOR.NODE_ELEMENT&&t.endContainer.getName()in u)&&(t.shrink(CKEDITOR.NODE_ELEMENT,!0),e=t.collapsed),u=(l=t.createBookmark()).startNode,e||(a=l.endNode),(l=t.document.$.body.createTextRange()).moveToElementText(u.$),l.moveStart("character",1),a?((d=t.document.$.body.createTextRange()).moveToElementText(a.$),l.setEndPoint("EndToEnd",d),l.moveEnd("character",-1)):(r=u.getNext(c),s=u.hasAscendant("pre"),r=!(r&&r.getText&&r.getText().match(d))&&(s||!u.hasPrevious()||u.getPrevious().is&&u.getPrevious().is("br")),(s=t.document.createElement("span")).setHtml("&#65279;"),s.insertBefore(u),r&&t.document.createText("\ufeff").insertBefore(u)),t.setStartBefore(u),u.remove(),e?(r?(l.moveStart("character",-1),l.select(),t.document.$.selection.clear()):l.select(),t.moveToPosition(s,CKEDITOR.POSITION_BEFORE_START),s.remove()):(t.setEndBefore(a),a.remove(),l.select())}else{if(!(a=this.getNative()))return;for(this.removeAllRanges(),l=0;l<e.length;l++)if(l<e.length-1&&(r=e[l],s=e[l+1],(d=r.clone()).setStart(r.endContainer,r.endOffset),d.setEnd(s.startContainer,s.startOffset),!d.collapsed&&(d.shrink(CKEDITOR.NODE_ELEMENT,!0),t=d.getCommonAncestor(),d=d.getEnclosedNode(),t.isReadOnly()||d&&d.isReadOnly())))s.setStart(r.startContainer,r.startOffset),e.splice(l--,1);else{t=e[l],s=this.document.$.createRange(),t.collapsed&&CKEDITOR.env.webkit&&function(n){function e(e,t){return e&&e.type!=CKEDITOR.NODE_TEXT&&n.clone()["moveToElementEdit"+(t?"End":"Start")](e)}if(n.root instanceof CKEDITOR.editable){var t=n.startContainer,i=n.getPreviousNode(g,null,t),o=n.getNextNode(g,null,t);return!(!e(i)&&!e(o,1)&&(i||o||t.type==CKEDITOR.NODE_ELEMENT&&t.isBlockBoundary()&&t.getBogus()))}}(t)&&(d=m(this.root),t.insertNode(d),(r=d.getNext())&&!d.getPrevious()&&r.type==CKEDITOR.NODE_ELEMENT&&"br"==r.getName()?(C(this.root),t.moveToPosition(r,CKEDITOR.POSITION_BEFORE_START)):t.moveToPosition(d,CKEDITOR.POSITION_AFTER_END)),s.setStart(t.startContainer.$,t.startOffset);try{s.setEnd(t.endContainer.$,t.endOffset)}catch(e){if(!(0<=e.toString().indexOf("NS_ERROR_ILLEGAL_VALUE")))throw e;t.collapse(1),s.setEnd(t.endContainer.$,t.endOffset)}a.addRange(s)}}this.reset(),this.root.fire("selectionchange")}},fake:function(e,t){var n=this.root.editor;void 0===t&&e.hasAttribute("aria-label")&&(t=e.getAttribute("aria-label")),this.reset(),function(e,t){var n=t&&CKEDITOR.tools.htmlEncode(t)||"&nbsp;",n=CKEDITOR.dom.element.createFromHtml('<div data-cke-hidden-sel="1" data-cke-temp="1" style="'+(CKEDITOR.env.ie&&CKEDITOR.env.version<14?"display:none":"position:fixed;top:0;left:-1000px;width:0;height:0;overflow:hidden;")+'">'+n+"</div>",e.document);e.fire("lockSnapshot"),e.editable().append(n);var i=e.getSelection(1),o=e.createRange(),t=i.root.on("selectionchange",function(e){e.cancel()},null,null,0);o.setStartAt(n,CKEDITOR.POSITION_AFTER_START),o.setEndAt(n,CKEDITOR.POSITION_BEFORE_END),i.selectRanges([o]),t.removeListener(),e.fire("unlockSnapshot"),e._.hiddenSelectionContainer=n}(n,t);var i=this._.cache,t=new CKEDITOR.dom.range(this.root);t.setStartBefore(e),t.setEndAfter(e),i.ranges=new CKEDITOR.dom.rangeList(t),i.selectedElement=i.startElement=e,i.type=CKEDITOR.SELECTION_ELEMENT,i.selectedText=i.nativeSel=null,this.isFake=1,this.rev=s++,(n._.fakeSelection=this).root.fire("selectionchange")},isHidden:function(){var e=this.getCommonAncestor();return!(!(e=e&&e.type==CKEDITOR.NODE_TEXT?e.getParent():e)||!e.data("cke-hidden-sel"))},isInTable:function(e){return h(this.getRanges(),e)},isCollapsed:function(){var e=this.getRanges();return 1===e.length&&e[0].collapsed},createBookmarks:function(e){return e=this.getRanges().createBookmarks(e),this.isFake&&(e.isFake=1),e},createBookmarks2:function(e){return e=this.getRanges().createBookmarks2(e),this.isFake&&(e.isFake=1),e},selectBookmarks:function(e){for(var t,n=[],i=0;i<e.length;i++){var o=new CKEDITOR.dom.range(this.root);o.moveToBookmark(e[i]),n.push(o)}return e.isFake&&((t=h(n)?n[0]._getTableElement():n[0].getEnclosedNode())&&t.type==CKEDITOR.NODE_ELEMENT||(CKEDITOR.warn("selection-not-fake"),e.isFake=0)),e.isFake&&!h(n)?this.fake(t):this.selectRanges(n),this},getCommonAncestor:function(){var e=this.getRanges();return e.length?e[0].startContainer.getCommonAncestor(e[e.length-1].endContainer):null},scrollIntoView:function(){this.getType()!=CKEDITOR.SELECTION_NONE&&this.getRanges()[0].scrollIntoView()},removeAllRanges:function(){if(this.getType()!=CKEDITOR.SELECTION_NONE){var e=this.getNative();try{e&&e[I?"empty":"removeAllRanges"]()}catch(e){}this.reset()}}}}(),CKEDITOR.STYLE_BLOCK=1,CKEDITOR.STYLE_INLINE=2,CKEDITOR.STYLE_OBJECT=3,function(){function y(e,t){for(var n,i,o;(e=e.getParent())&&!e.equals(t);)e.getAttribute("data-nostyle")?n=e:i||("false"==(o=e.getAttribute("contentEditable"))?n=e:"true"==o&&(i=1));return n}function K(e,t,n,i){return(e.getPosition(t)|i)==i&&(!n.childRule||n.childRule(e))}function _(e){var t=e.document;if(e.collapsed)t=w(this,t),e.insertNode(t),e.moveToPosition(t,CKEDITOR.POSITION_BEFORE_END);else{var n,i=this.element,o=this._.definition,a=(I=o.ignoreReadonly)||o.includeReadonly;null==a&&(a=e.root.getCustomData("cke_includeReadonly"));var r=CKEDITOR.dtd[i];r||(n=!0,r=CKEDITOR.dtd.span),e.enlarge(CKEDITOR.ENLARGE_INLINE,1),e.trim();var s,l=e.createBookmark(),c=l.startNode,d=l.endNode,u=c;for(I||(I=y(c,h=e.getCommonAncestor()),h=y(d,h),I&&(u=I.getNextSourceNode(!0)),h&&(d=h)),u.getPosition(d)==CKEDITOR.POSITION_FOLLOWING&&(u=0);u;){if(I=!1,u.equals(d))I=!(u=null);else{var h=(C=u.type==CKEDITOR.NODE_ELEMENT?u.getName():null)&&"false"==u.getAttribute("contentEditable"),f=C&&-1!==CKEDITOR.tools.array.indexOf(CKEDITOR.style.unstylableElements,C),f=C&&(u.getAttribute("data-nostyle")||f);if(C&&u.data("cke-bookmark")||u.type===CKEDITOR.NODE_COMMENT){u=u.getNextSourceNode(!0);continue}if(h&&a&&CKEDITOR.dtd.$block[C])for(var g=void 0,m=0,E=(b=(v=function(e){var t=[];return e.forEach(function(e){if("true"==e.getAttribute("contenteditable"))return t.push(e),!1},CKEDITOR.NODE_ELEMENT,!0),t}(E=u)).length)&&new CKEDITOR.dom.range(E.getDocument());m<b;++m){var g=v[m],p=CKEDITOR.filter.instances[g.data("cke-filter")];p&&!p.check(this)||(E.selectNodeContents(g),_.call(this,E))}if(v=C?!r[C]||f||h&&!a?0:K(u,d,o,S):1){if(v=o,b=i,m=n,!(g=u.getParent())||!(g.getDtd()||CKEDITOR.dtd.span)[b]&&!m||v.parentRule&&!v.parentRule(g))I=!0;else if(s||C&&CKEDITOR.dtd.$removeEmpty[C]&&(u.getPosition(d)|S)!=S||(s=e.clone()).setStartBefore(u),(C=u.type)==CKEDITOR.NODE_TEXT||h||C==CKEDITOR.NODE_ELEMENT&&!u.getChildCount()){for(var T,C=u;(I=!C.getNext(N))&&r[(T=C.getParent()).getName()]&&K(T,c,o,x);)C=T;s.setEndAfter(C)}}else I=!0;u=u.getNextSourceNode(f||h)}if(I&&s&&!s.collapsed){for(var I,O,D,R,h=(I=w(this,t)).hasAttributes(),f=s.getCommonAncestor(),C={},v={},g={},b={};I&&f;){if(f.getName()==i){for(O in o.attributes)!b[O]&&(R=f.getAttribute(D))&&(I.getAttribute(O)==R?v[O]=1:b[O]=1);for(D in o.styles)!g[D]&&(R=f.getStyle(D))&&(I.getStyle(D)==R?C[D]=1:g[D]=1)}f=f.getParent()}for(O in v)I.removeAttribute(O);for(D in C)I.removeStyle(D);(I=h&&!I.hasAttributes()?null:I)?(s.extractContents().appendTo(I),s.insertNode(I),k.call(this,I),I.mergeSiblings(),CKEDITOR.env.ie||I.$.normalize()):(I=new CKEDITOR.dom.element("span"),s.extractContents().appendTo(I),s.insertNode(I),k.call(this,I),I.remove(!0)),s=null}}e.moveToBookmark(l),e.shrink(CKEDITOR.SHRINK_TEXT),e.shrink(CKEDITOR.NODE_ELEMENT,!0)}}function t(e){function t(){for(var e=new CKEDITOR.dom.elementPath(r.getParent()),t=new CKEDITOR.dom.elementPath(d.getParent()),n=null,i=null,o=0;o<e.elements.length;o++){var a=e.elements[o];if(a==e.block||a==e.blockLimit)break;u.checkElementRemovable(a,!0)&&(n=a)}for(o=0;o<t.elements.length&&((a=t.elements[o])!=t.block&&a!=t.blockLimit);o++)u.checkElementRemovable(a,!0)&&(i=a);i&&d.breakParent(i),n&&r.breakParent(n)}e.enlarge(CKEDITOR.ENLARGE_INLINE,1);var n=e.createBookmark(),r=n.startNode,i=this._.definition.alwaysRemoveElement;if(e.collapsed){for(var o,a,s,l=new CKEDITOR.dom.elementPath(r.getParent(),e.root),c=0;c<l.elements.length&&(a=l.elements[c])&&a!=l.block&&a!=l.blockLimit;c++)this.checkElementRemovable(a)&&(!i&&e.collapsed&&(e.checkBoundaryOfElement(a,CKEDITOR.END)||(s=e.checkBoundaryOfElement(a,CKEDITOR.START)))?(o=a).match=s?"start":"end":(a.mergeSiblings(),a.is(this.element)?h.call(this,a):f(a,g(this)[a.getName()])));if(o){for(i=r,c=0;!(a=l.elements[c]).equals(o);c++)a.match||((a=a.clone()).append(i),i=a);i["start"==o.match?"insertBefore":"insertAfter"](o)}}else{var d=n.endNode,u=this;for(t(),l=r;!l.equals(d);)o=l.getNextSourceNode(),l.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(l)&&(l.getName()==this.element?h.call(this,l):f(l,g(this)[l.getName()]),o.type==CKEDITOR.NODE_ELEMENT&&o.contains(r)&&(t(),o=r.getNext())),l=o}e.moveToBookmark(n),e.shrink(CKEDITOR.NODE_ELEMENT,!0)}function n(e){var t=e.getEnclosedNode()||e.getCommonAncestor(!1,!0);(e=new CKEDITOR.dom.elementPath(t,e.root).contains(this.element,1))&&!e.isReadOnly()&&s(e,this)}function i(e){var t=e.getCommonAncestor(!0,!0);if(e=new CKEDITOR.dom.elementPath(t,e.root).contains(this.element,1)){var n=(t=this._.definition).attributes;if(n)for(var i in n)e.removeAttribute(i,n[i]);if(t.styles)for(var o in t.styles)t.styles.hasOwnProperty(o)&&e.removeStyle(o)}}function o(e){var t=e.createBookmark(!0),n=e.createIterator();n.enforceRealBlocks=!0,this._.enterMode&&(n.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR);for(var i,o=e.document;i=n.getNextParagraph();)i.isReadOnly()||n.activeFilter&&!n.activeFilter.check(this)||r(i,w(this,o,i));e.moveToBookmark(t)}function a(e){var t,n,i=e.createBookmark(1),o=e.createIterator();for(o.enforceRealBlocks=!0,o.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;t=o.getNextParagraph();)this.checkElementRemovable(t)&&(t.is("pre")?((n=this._.enterMode==CKEDITOR.ENTER_BR?null:e.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))&&t.copyAttributes(n),r(t,n)):h.call(this,t));e.moveToBookmark(i)}function r(e,t){var n=!t;n&&(t=e.getDocument().createElement("div"),e.copyAttributes(t));var i,o,a=t&&t.is("pre"),r=e.is("pre"),s=!a&&r;a&&!r?(r=t,(s=e.getBogus())&&s.remove(),s=(s=(s=(s=l(s=e.getHtml(),/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,"")).replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi,"$1")).replace(/([ \t\n\r]+|&nbsp;)/g," ")).replace(/<br\b[^>]*>/gi,"\n"),CKEDITOR.env.ie?((i=e.getDocument().createElement("div")).append(r),r.$.outerHTML="<pre>"+s+"</pre>",r.copyAttributes(i.getFirst()),r=i.getFirst().remove()):r.setHtml(s),t=r):s?t=function(e,t){var n;1<e.length&&(n=new CKEDITOR.dom.documentFragment(t.getDocument()));for(var i=0;i<e.length;i++){var o,a=l(a=(a=e[i]).replace(/(\r\n|\r)/g,"\n"),/^[ \t]*\n/,""),a=l(a,/\n$/,""),a=(a=(a=l(a,/^[ \t]+|[ \t]+$/g,function(e,t){return 1==e.length?"&nbsp;":t?" "+CKEDITOR.tools.repeat("&nbsp;",e.length-1):CKEDITOR.tools.repeat("&nbsp;",e.length-1)+" "})).replace(/\n/g,"<br>")).replace(/[ \t]{2,}/g,function(e){return CKEDITOR.tools.repeat("&nbsp;",e.length-1)+" "});n?((o=t.clone()).setHtml(a),n.append(o)):t.setHtml(a)}return n||t}(n?[e.getHtml()]:(o=[],l(e.getOuterHtml(),/(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(e,t,n){return t+"</pre>"+n+"<pre>"}).replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi,function(e,t){o.push(t)}),o),t):e.moveChildren(t),t.replace(e),a?(e=(n=t).getPrevious(I))&&e.type==CKEDITOR.NODE_ELEMENT&&e.is("pre")&&(a=l(e.getHtml(),/\n$/,"")+"\n\n"+l(n.getHtml(),/^\n/,""),CKEDITOR.env.ie?n.$.outerHTML="<pre>"+a+"</pre>":n.setHtml(a),e.remove()):n&&c(t)}function l(e,t,n){var i="",o="";return e=e.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,function(e,t,n){return t&&(i=t),n&&(o=n),""}),i+e.replace(t,n)+o}function h(e,t){var n,i,o=(a=this._.definition).attributes,a=a.styles,r=g(this)[e.getName()],s=CKEDITOR.tools.isEmpty(o)&&CKEDITOR.tools.isEmpty(a);for(n in o)("class"==n||this._.definition.fullMatch)&&e.getAttribute(n)!=u(n,o[n])||t&&"data-"==n.slice(0,5)||(s=e.hasAttribute(n),e.removeAttribute(n));for(i in a)this._.definition.fullMatch&&e.getStyle(i)!=u(i,a[i],!0)||(s=s||!!e.getStyle(i),e.removeStyle(i));f(e,r,E[e.getName()]),s&&(this._.definition.alwaysRemoveElement?c(e,1):!CKEDITOR.dtd.$block[e.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!e.hasAttributes()?c(e):e.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function k(e){for(var t,n,i=g(this),o=e.getElementsByTag(this.element),a=o.count();0<=--a;)(t=o.getItem(a)).isReadOnly()||h.call(this,t,!0);for(n in i)if(n!=this.element)for(o=e.getElementsByTag(n),a=o.count()-1;0<=a;a--)t=o.getItem(a),t.isReadOnly()||f(t,i[n])}function f(e,t,n){if(t=t&&t.attributes)for(var i=0;i<t.length;i++){var o,a,r=t[i][0];!(o=e.getAttribute(r))||(null===(a=t[i][1])||a.test&&a.test(o)||"string"==typeof a&&o==a)&&e.removeAttribute(r)}n||c(e)}function c(e,t){var n,i;e.hasAttributes()&&!t||(CKEDITOR.dtd.$block[e.getName()]?(n=e.getPrevious(I),i=e.getNext(I),!n||n.type!=CKEDITOR.NODE_TEXT&&n.isBlockBoundary({br:1})||e.append("br",1),!i||i.type!=CKEDITOR.NODE_TEXT&&i.isBlockBoundary({br:1})||e.append("br"),e.remove(!0)):(n=e.getFirst(),i=e.getLast(),e.remove(!0),n&&(n.type==CKEDITOR.NODE_ELEMENT&&n.mergeSiblings(),i&&!n.equals(i)&&i.type==CKEDITOR.NODE_ELEMENT&&i.mergeSiblings())))}function w(e,t,n){var i=e.element;return"*"==i&&(i="span"),i=new CKEDITOR.dom.element(i,t),n&&n.copyAttributes(i),i=s(i,e),t.getCustomData("doc_processing_style")&&i.hasAttribute("id")?i.removeAttribute("id"):t.setCustomData("doc_processing_style",1),i}function s(e,t){var n=(t=t._.definition).attributes,t=CKEDITOR.style.getStyleText(t);if(n)for(var i in n)e.setAttribute(i,n[i]);return t&&e.setAttribute("style",t),e.getDocument().removeCustomData("doc_processing_style"),e}function d(e,n){for(var t in e)e[t]=e[t].replace(C,function(e,t){return n[t]})}function g(e){if(e._.overrides)return e._.overrides;var t=e._.overrides={},n=e._.definition.overrides;if(n){CKEDITOR.tools.isArray(n)||(n=[n]);for(var i,o,a=0;a<n.length;a++)if("string"==typeof(s=n[a])?i=s.toLowerCase():(i=s.element?s.element.toLowerCase():e.element,o=s.attributes),s=t[i]||(t[i]={}),o){var r,s=s.attributes=s.attributes||[];for(r in o)s.push([r.toLowerCase(),o[r]])}}return t}function u(e,t,n){var i=new CKEDITOR.dom.element("span");return i[n?"setStyle":"setAttribute"](e,t),i[n?"getStyle":"getAttribute"](e)}function m(e,t,n){var i=e.getRanges();t=t?this.removeFromRange:this.applyToRange;for(var o,a=i.createIterator();o=a.getNextRange();)t.call(this,o,n);e.selectRanges(i)}var E={address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,details:1,datagrid:1,datalist:1},p={a:1,blockquote:1,embed:1,hr:1,img:1,li:1,object:1,ol:1,table:1,td:1,tr:1,th:1,ul:1,dl:1,dt:1,dd:1,form:1,audio:1,video:1},T=/\s*(?:;\s*|$)/,C=/#\((.+?)\)/g,N=CKEDITOR.dom.walker.bookmark(0,1),I=CKEDITOR.dom.walker.whitespaces(1);CKEDITOR.style=function(e,t){if("string"==typeof e.type)return new CKEDITOR.style.customHandlers[e.type](e);var n=e.attributes;n&&n.style&&(e.styles=CKEDITOR.tools.extend({},e.styles,CKEDITOR.tools.parseCssText(n.style)),delete n.style),t&&(d((e=CKEDITOR.tools.clone(e)).attributes,t),d(e.styles,t)),n=this.element=e.element?"string"==typeof e.element?e.element.toLowerCase():e.element:"*",this.type=e.type||(E[n]?CKEDITOR.STYLE_BLOCK:p[n]?CKEDITOR.STYLE_OBJECT:CKEDITOR.STYLE_INLINE),"object"==typeof this.element&&(this.type=CKEDITOR.STYLE_OBJECT),this._={definition:e}},CKEDITOR.style.prototype={apply:function(e){if(e instanceof CKEDITOR.dom.document)return m.call(this,e.getSelection());var t;this.checkApplicable(e.elementPath(),e)&&((t=this._.enterMode)||(this._.enterMode=e.activeEnterMode),m.call(this,e.getSelection(),0,e),this._.enterMode=t)},remove:function(e){if(e instanceof CKEDITOR.dom.document)return m.call(this,e.getSelection(),1);var t;this.checkApplicable(e.elementPath(),e)&&((t=this._.enterMode)||(this._.enterMode=e.activeEnterMode),m.call(this,e.getSelection(),1,e),this._.enterMode=t)},applyToRange:function(e){return this.applyToRange=this.type==CKEDITOR.STYLE_INLINE?_:this.type==CKEDITOR.STYLE_BLOCK?o:this.type==CKEDITOR.STYLE_OBJECT?n:null,this.applyToRange(e)},removeFromRange:function(e){return this.removeFromRange=this.type==CKEDITOR.STYLE_INLINE?t:this.type==CKEDITOR.STYLE_BLOCK?a:this.type==CKEDITOR.STYLE_OBJECT?i:null,this.removeFromRange(e)},applyToObject:function(e){s(e,this)},checkActive:function(e,t){switch(this.type){case CKEDITOR.STYLE_BLOCK:return this.checkElementRemovable(e.block||e.blockLimit,!0,t);case CKEDITOR.STYLE_OBJECT:case CKEDITOR.STYLE_INLINE:for(var n,i=e.elements,o=0;o<i.length;o++)if(n=i[o],this.type!=CKEDITOR.STYLE_INLINE||n!=e.block&&n!=e.blockLimit){if(this.type==CKEDITOR.STYLE_OBJECT){var a=n.getName();if(!("string"==typeof this.element?a==this.element:a in this.element))continue}if(this.checkElementRemovable(n,!0,t))return!0}}return!1},checkApplicable:function(e,t,n){if((n=t&&t instanceof CKEDITOR.filter?t:n)&&!n.check(this))return!1;switch(this.type){case CKEDITOR.STYLE_OBJECT:return!!e.contains(this.element);case CKEDITOR.STYLE_BLOCK:return!!e.blockLimit.getDtd()[this.element]}return!0},checkElementMatch:function(e,t){var n=this._.definition;if(!e||!n.ignoreReadonly&&e.isReadOnly())return!1;var i=e.getName();if("string"==typeof this.element?i==this.element:i in this.element){if(!t&&!e.hasAttributes())return!0;if(i=n._AC)n=i;else{var i={},o=0,a=n.attributes;if(a)for(var r in a)o++,i[r]=a[r];(r=CKEDITOR.style.getStyleText(n))&&(i.style||o++,i.style=r),i._length=o,n=n._AC=i}if(!n._length)return!0;for(var s in n)if("_length"!=s)if(i=e.getAttribute(s)||"","style"==s?function(e,t){function n(e,t){return"font-family"==t.toLowerCase()?e.replace(/["']/g,""):e}for(var i in"string"==typeof e&&(e=CKEDITOR.tools.parseCssText(e)),"string"==typeof t&&(t=CKEDITOR.tools.parseCssText(t,!0)),e)if(!(i in t)||n(t[i],i)!=n(e[i],i)&&"inherit"!=e[i]&&"inherit"!=t[i])return;return 1}(n[s],i):n[s]==i){if(!t)return!0}else if(t)return!1;if(t)return!0}return!1},checkElementRemovable:function(e,t,n){if(this.checkElementMatch(e,t,n))return!0;if(t=g(this)[e.getName()]){var i;if(!(t=t.attributes))return!0;for(n=0;n<t.length;n++)if(i=t[n][0],i=e.getAttribute(i)){var o=t[n][1];if(null===o)return!0;if("string"==typeof o){if(i==o)return!0}else if(o.test(i))return!0}}return!1},buildPreview:function(e){var t=this._.definition,n=[],i=t.element,n=["<",i="bdo"==i?"span":i],o=t.attributes;if(o)for(var a in o)n.push(" ",a,'="',o[a],'"');return(o=CKEDITOR.style.getStyleText(t))&&n.push(' style="',o,'"'),n.push(">",e||t.name,"</",i,">"),n.join("")},getDefinition:function(){return this._.definition}},CKEDITOR.style.getStyleText=function(e){if(n=e._ST)return n;var t,n=e.styles,i=e.attributes&&e.attributes.style||"",o="";for(t in i.length&&(i=i.replace(T,";")),n){var a=n[t],r=(t+":"+a).replace(T,";");"inherit"==a?o+=r:i+=r}return i.length&&(i=CKEDITOR.tools.normalizeCssText(i,!0)),e._ST=i+o},CKEDITOR.style.customHandlers={},CKEDITOR.style.unstylableElements=[],CKEDITOR.style.addCustomHandler=function(e){function t(e){this._={definition:e},this.setup&&this.setup(e)}return t.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.style.prototype),{assignedTo:CKEDITOR.STYLE_OBJECT},e,!0),this.customHandlers[e.type]=t};var S=CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED,x=CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED}(),CKEDITOR.styleCommand=function(e,t){this.requiredContent=this.allowedContent=this.style=e,CKEDITOR.tools.extend(this,t,!0)},CKEDITOR.styleCommand.prototype.exec=function(e){e.focus(),this.state==CKEDITOR.TRISTATE_OFF?e.applyStyle(this.style):this.state==CKEDITOR.TRISTATE_ON&&e.removeStyle(this.style)},CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet"),CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet),CKEDITOR.loadStylesSet=function(e,t,n){CKEDITOR.stylesSet.addExternal(e,t,""),CKEDITOR.stylesSet.load(e,n)},CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{attachStyleStateChange:function(e,t){var o=this._.styleStateChangeCallbacks;o||(o=this._.styleStateChangeCallbacks=[],this.on("selectionChange",function(e){for(var t=0;t<o.length;t++){var n=o[t],i=n.style.checkActive(e.data.path,this)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;n.fn.call(this,i)}})),o.push({style:e,fn:t})},applyStyle:function(e){e.apply(this)},removeStyle:function(e){e.remove(this)},getStylesSet:function(t){var n,e,i;this._.stylesDefinitions?t(this._.stylesDefinitions):!1===(e=(n=this).config.stylesCombo_stylesSet||n.config.stylesSet)?t(null):e instanceof Array?(n._.stylesDefinitions=e,t(e)):(i=(e=(e=e||"default").split(":"))[0],CKEDITOR.stylesSet.addExternal(i,e[1]?e.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),""),CKEDITOR.stylesSet.load(i,function(e){n._.stylesDefinitions=e[i],t(n._.stylesDefinitions)}))}}),function(){if(window.Promise)CKEDITOR.tools.promise=Promise;else{var t=CKEDITOR.getUrl("vendor/promise.js");if("function"==typeof window.define&&window.define.amd&&"function"==typeof window.require)return window.require([t],function(e){CKEDITOR.tools.promise=e});CKEDITOR.scriptLoader.load(t,function(e){return e?void 0!==window.ES6Promise?CKEDITOR.tools.promise=ES6Promise:void 0:CKEDITOR.error("no-vendor-lib",{path:t})})}}(),N=!(w=!0),CKEDITOR.dom.selection.setupEditorOptimization=function(t){t.on("selectionCheck",function(e){e.data&&!N&&e.data.optimizeInElementEnds(),N=!1}),t.on("contentDom",function(){var e=t.editable();e&&(e.attachListener(e,"keydown",function(e){this._.shiftPressed=e.data.$.shiftKey},this),e.attachListener(e,"keyup",function(e){this._.shiftPressed=e.data.$.shiftKey},this))})},CKEDITOR.dom.selection.prototype.optimizeInElementEnds=function(){var e,t,n,i,o,a=this.getRanges()[0],r=this.root.editor;(e=!(this.root.editor._.shiftPressed||this.isFake||a.isCollapsed||a.startContainer.equals(a.endContainer))&&(0===a.endOffset||(e=a.startContainer.type===CKEDITOR.NODE_TEXT,t=a.endContainer.type===CKEDITOR.NODE_TEXT,n=e?a.startContainer.getLength():a.startContainer.getChildCount(),a.startOffset===n||e^t)))&&(e=a.clone(),a.shrink(CKEDITOR.SHRINK_TEXT,!1,{skipBogus:!CKEDITOR.env.webkit}),w=!1,i=a,o=e,r.once("selectionCheck",function(e){var t;w||(t=e.data.getRanges()[0],o.equals(t)?e.cancel():i.equals(t)&&(N=!0))},null,null,-1),a.select(),w=!0)},CKEDITOR.tools.color=CKEDITOR.tools.createClass({$:function(e,t){this._.initialColorCode=e,this._.defaultValue=t,this._.parseInput(e)},proto:{getHex:function(){if(!this._.isValidColor)return this._.defaultValue;var e=this._.blendAlphaColor(this._.red,this._.green,this._.blue,this._.alpha);return this._.formatHexString(e[0],e[1],e[2])},getHexWithAlpha:function(){if(!this._.isValidColor)return this._.defaultValue;var e=Math.round(this._.alpha*CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE);return this._.formatHexString(this._.red,this._.green,this._.blue,e)},getRgb:function(){if(!this._.isValidColor)return this._.defaultValue;var e=this._.blendAlphaColor(this._.red,this._.green,this._.blue,this._.alpha);return this._.formatRgbString("rgb",e[0],e[1],e[2])},getRgba:function(){return this._.isValidColor?this._.formatRgbString("rgba",this._.red,this._.green,this._.blue,this._.alpha):this._.defaultValue},getHsl:function(){if(!this._.isValidColor)return this._.defaultValue;var e=this._.blendAlphaColor(this._.red,this._.green,this._.blue,this._.alpha),e=this._.rgbToHsl(e[0],e[1],e[2]);return this._.formatHslString("hsl",e[0],e[1],e[2])},getHsla:function(){if(!this._.isValidColor)return this._.defaultValue;var e=this._.rgbToHsl(this._.red,this._.green,this._.blue);return this._.formatHslString("hsla",e[0],e[1],e[2],this._.alpha)},getInitialValue:function(){return this._.initialColorCode}},_:{initialColorCode:"",isValidColor:!0,red:0,green:0,blue:0,alpha:1,blendAlphaColor:function(e,t,n,i){return CKEDITOR.tools.array.map([e,t,n],function(e){return Math.round(CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE-i*(CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE-e))})},formatHexString:function(e,t,n,i){return e="#"+Jt(e)+Jt(t)+Jt(n),void 0!==i&&(e+=Jt(i)),e.toUpperCase()},formatRgbString:function(e,t,n,i,o){return t=[t,n,i],void 0!==o&&t.push(o),e+"("+t.join(",")+")"},formatHslString:function(e,t,n,i,o){return e+"("+t+","+n+"%,"+i+"%"+(void 0!==o?","+o:"")+")"},parseInput:function(e){var t,n;"string"!=typeof e?this._.isValidColor=!1:(e=CKEDITOR.tools.trim(e),t=this._.matchStringToNamedColor(e),t=this._.extractColorChannelsFromHex(e=t?t:e),n=this._.extractColorChannelsFromRgba(e),e=this._.extractColorChannelsFromHsla(e),(e=t||n||e)?(this._.red=e[0],this._.green=e[1],this._.blue=e[2],this._.alpha=e[3]):this._.isValidColor=!1)},matchStringToNamedColor:function(e){return CKEDITOR.tools.color.namedColors[e.toLowerCase()]||null},extractColorChannelsFromHex:function(e){if(!(e=e.match(CKEDITOR.tools.color.hex3CharsRegExp)?this._.hex3ToHex6(e):e).match(CKEDITOR.tools.color.hex6CharsRegExp)&&!e.match(CKEDITOR.tools.color.hex8CharsRegExp))return null;var t=1;return(e=e.split(""))[7]&&e[8]&&(t=parseInt(e[7]+e[8],16),t/=CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE,t=Number(t.toFixed(1))),[parseInt(e[1]+e[2],16),parseInt(e[3]+e[4],16),parseInt(e[5]+e[6],16),t]},extractColorChannelsFromRgba:function(e){var t=this._.extractColorChannelsByPattern(e,CKEDITOR.tools.color.rgbRegExp);if(!t||(e=0===e.indexOf("rgba"))&&4!==t.length||!e&&3!==t.length)return null;var n=Gt(t[0],CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE),i=Gt(t[1],CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE),o=Gt(t[2],CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE),a=1;return e&&(a=Xt(t[3],CKEDITOR.tools.color.MAX_ALPHA_CHANNEL_VALUE)),this._.areColorChannelsValid(n,i,o,a)?[n,i,o,a]:null},extractColorChannelsFromHsla:function(e){var t=this._.extractColorChannelsByPattern(e,CKEDITOR.tools.color.hslRegExp);if(!t||(e=0===e.indexOf("hsla"))&&4!==t.length||!e&&3!==t.length)return null;var n=Gt(t[0],CKEDITOR.tools.color.MAX_HUE_CHANNEL_VALUE),i=Xt(t[1],CKEDITOR.tools.color.MAX_SATURATION_LIGHTNESS_CHANNEL_VALUE),o=Xt(t[2],CKEDITOR.tools.color.MAX_SATURATION_LIGHTNESS_CHANNEL_VALUE),a=1,n=this._.hslToRgb(n,i,o);return e&&(a=Xt(t[3],CKEDITOR.tools.color.MAX_ALPHA_CHANNEL_VALUE)),n.push(a),this._.areColorChannelsValid(n[0],n[1],n[2],n[3])?n:null},hex3ToHex6:function(e){return"#"+(e=e.split(""))[1]+e[1]+e[2]+e[2]+e[3]+e[3]},extractColorChannelsByPattern:function(e,t){t=e.match(t);return t?(t=t[2].split(","),CKEDITOR.tools.array.map(t,function(e){return CKEDITOR.tools.trim(e)})):null},areColorChannelsValid:function(e,t,n,i){return Zt(e,0,CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)&&Zt(t,0,CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)&&Zt(n,0,CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)&&Zt(i,0,CKEDITOR.tools.color.MAX_ALPHA_CHANNEL_VALUE)},hslToRgb:function(n,i,o){function e(e){var t=(e+n/30)%12;return e=i*Math.min(o,1-o),t=Math.min(t-3,9-t,1),t=Math.max(-1,t),Math.round((o-e*t)*CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)}return[e(0),e(8),e(4)]},rgbToHsl:function(e,t,n){e/=CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE,t/=CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE;var i=n/CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE,o=Math.max(e,t,i),a=Math.min(e,t,i);n=o-a;var r=0;switch(o){case e:r=(t-i)/n%6;break;case t:r=(i-e)/n+2;break;case i:r=(e-t)/n+4}return e=0===n?0:60*r,t=(o+a)/2,o=0,1!==t&&0!==t&&(o=n/(1-Math.abs(2*t-1))),[e=Math.round(e),o=100*Math.round(o),100*t]}},statics:{MAX_RGB_CHANNEL_VALUE:255,MAX_ALPHA_CHANNEL_VALUE:1,MAX_HUE_CHANNEL_VALUE:360,MAX_SATURATION_LIGHTNESS_CHANNEL_VALUE:1,hex3CharsRegExp:/#([0-9a-f]{3}$)/gim,hex6CharsRegExp:/#([0-9a-f]{6}$)/gim,hex8CharsRegExp:/#([0-9a-f]{8}$)/gim,rgbRegExp:/(rgb[a]?)\(([.,\d\s%]*)\)/i,hslRegExp:/(hsl[a]?)\(([.,\d\s%]*)\)/i,namedColors:{aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",green:"#008000",greenyellow:"#ADFF2F",grey:"#808080",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",windowtext:"windowtext",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"}}}),CKEDITOR.tools.style.parse._colors=CKEDITOR.tools.color.namedColors,CKEDITOR.dom.comment=function(e,t){"string"==typeof e&&(e=(t?t.$:document).createComment(e)),CKEDITOR.dom.domObject.call(this,e)},CKEDITOR.dom.comment.prototype=new CKEDITOR.dom.node,CKEDITOR.tools.extend(CKEDITOR.dom.comment.prototype,{type:CKEDITOR.NODE_COMMENT,getOuterHtml:function(){return"\x3c!--"+this.$.nodeValue+"--\x3e"}}),function(){var e,d={},u={};for(e in CKEDITOR.dtd.$blockLimit)e in CKEDITOR.dtd.$list||(d[e]=1);for(e in CKEDITOR.dtd.$block)e in CKEDITOR.dtd.$blockLimit||e in CKEDITOR.dtd.$empty||(u[e]=1);CKEDITOR.dom.elementPath=function(e,t){var n=null,i=null,o=[],a=e;t=t||e.getDocument().getBody(),a=a||t;do{if(a.type==CKEDITOR.NODE_ELEMENT){if(o.push(a),!this.lastElement&&((this.lastElement=a).is(CKEDITOR.dtd.$object)||"false"==a.getAttribute("contenteditable")))continue;if(a.equals(t))break;if(!i&&(r=a.getName(),"true"==a.getAttribute("contenteditable")?i=a:!n&&u[r]&&(n=a),d[r])){if(r=!n&&"div"==r){e:{for(var r,s=0,l=(r=a.getChildren()).count();s<l;s++){var c=r.getItem(s);if(c.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[c.getName()]){r=!0;break e}}r=!1}r=!r}r?n=a:i=a}}}while(a=a.getParent());i=i||t,this.block=n,this.blockLimit=i,this.root=t,this.elements=o}}(),CKEDITOR.dom.elementPath.prototype={compare:function(e){var t=this.elements;if(!(e=e&&e.elements)||t.length!=e.length)return!1;for(var n=0;n<t.length;n++)if(!t[n].equals(e[n]))return!1;return!0},contains:function(t,e,n){var i,o=0;"string"==typeof t&&(i=function(e){return e.getName()==t}),t instanceof CKEDITOR.dom.element?i=function(e){return e.equals(t)}:CKEDITOR.tools.isArray(t)?i=function(e){return-1<CKEDITOR.tools.indexOf(t,e.getName())}:"function"==typeof t?i=t:"object"==typeof t&&(i=function(e){return e.getName()in t});var a=this.elements,r=a.length;for(e&&(n?o+=1:--r),n&&(a=Array.prototype.slice.call(a,0)).reverse();o<r;o++)if(i(a[o]))return a[o];return null},isContextFor:function(e){return!(e in CKEDITOR.dtd.$block)||!!(this.contains(CKEDITOR.dtd.$intermediate)||this.root.equals(this.block)&&this.block||this.blockLimit).getDtd()[e]},direction:function(){return(this.block||this.blockLimit||this.root).getDirection(1)}},CKEDITOR.dom.text=function(e,t){"string"==typeof e&&(e=(t?t.$:document).createTextNode(e)),this.$=e},CKEDITOR.dom.text.prototype=new CKEDITOR.dom.node,CKEDITOR.tools.extend(CKEDITOR.dom.text.prototype,{type:CKEDITOR.NODE_TEXT,getLength:function(){return this.$.nodeValue.length},getText:function(){return this.$.nodeValue},setText:function(e){this.$.nodeValue=e},isEmpty:function(e){var t=this.getText();return!(t=e?CKEDITOR.tools.trim(t):t)||t===CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE},split:function(e){var t=this.$.parentNode,n=t.childNodes.length,i=this.getLength(),o=this.getDocument(),a=new CKEDITOR.dom.text(this.$.splitText(e),o);return t.childNodes.length==n&&(i<=e?(a=o.createText("")).insertAfter(this):((e=o.createText("")).insertAfter(a),e.remove())),a},substring:function(e,t){return"number"!=typeof t?this.$.nodeValue.substr(e):this.$.nodeValue.substring(e,t)}}),function(){function a(e,t,n){var i=e.serializable,o=t[n?"endContainer":"startContainer"],a=n?"endOffset":"startOffset",r=i?t.document.getById(e.startNode):e.startNode;return e=i?t.document.getById(e.endNode):e.endNode,o.equals(r.getPrevious())?(t.startOffset=t.startOffset-o.getLength()-e.getPrevious().getLength(),o=e.getNext()):o.equals(e.getPrevious())&&(t.startOffset-=o.getLength(),o=e.getNext()),o.equals(r.getParent())&&t[a]++,o.equals(e.getParent())&&t[a]++,t[n?"endContainer":"startContainer"]=o,t}CKEDITOR.dom.rangeList=function(e){return e instanceof CKEDITOR.dom.rangeList?e:(e?e instanceof CKEDITOR.dom.range&&(e=[e]):e=[],CKEDITOR.tools.extend(e,t))};var t={createIterator:function(){var a,r=this,s=CKEDITOR.dom.walker.bookmark(),l=[];return{getNextRange:function(e){var t=r[a=void 0===a?0:a+1];if(t&&1<r.length){if(!a)for(var n=r.length-1;0<=n;n--)l.unshift(r[n].createBookmark(!0));if(e)for(var i=0;r[a+i+1];){var o=t.document;for(e=0,n=o.getById(l[i].endNode),o=o.getById(l[i+1].startNode);;){if(n=n.getNextSourceNode(!1),o.equals(n))e=1;else if(s(n)||n.type==CKEDITOR.NODE_ELEMENT&&n.isBlockBoundary())continue;break}if(!e)break;i++}for(t.moveToBookmark(l.shift());i--;)(n=r[++a]).moveToBookmark(l.shift()),t.setEnd(n.endContainer,n.endOffset)}return t}}},createBookmarks:function(e){for(var t,n=[],i=0;i<this.length;i++){n.push(t=this[i].createBookmark(e,!0));for(var o=i+1;o<this.length;o++)this[o]=a(t,this[o]),this[o]=a(t,this[o],!0)}return n},createBookmarks2:function(e){for(var t=[],n=0;n<this.length;n++)t.push(this[n].createBookmark2(e));return t},moveToBookmarks:function(e){for(var t=0;t<this.length;t++)this[t].moveToBookmark(e[t])}}}(),function(){function a(){return CKEDITOR.getUrl(CKEDITOR.skinName.split(",")[1]||"skins/"+CKEDITOR.skinName.split(",")[0]+"/")}function n(e){var t=CKEDITOR.skin["ua_"+e],n=CKEDITOR.env;if(t)for(var i,t=t.split(",").sort(function(e,t){return t<e?-1:1}),o=0;o<t.length;o++)if(i=t[o],n[i=n.ie&&(i.replace(/^ie/,"")==n.version||n.quirks&&"iequirks"==i)?"ie":i]){e+="_"+t[o];break}return CKEDITOR.getUrl(a()+e+".css")}function i(e,t){o[e]||(CKEDITOR.document.appendStyleSheet(n(e)),o[e]=1),t&&t()}function r(e){var t=e.getById(l);return t||((t=e.getHead().append("style")).setAttribute("id",l),t.setAttribute("type","text/css")),t}function s(e,t,n){var i,o,a;if(CKEDITOR.env.webkit)for(t=t.split("}").slice(0,-1),o=0;o<t.length;o++)t[o]=t[o].split("{");for(var r=0;r<e.length;r++)if(CKEDITOR.env.webkit)for(o=0;o<t.length;o++){for(a=t[o][1],i=0;i<n.length;i++)a=a.replace(n[i][0],n[i][1]);e[r].$.sheet.addRule(t[o][0],a)}else{for(a=t,i=0;i<n.length;i++)a=a.replace(n[i][0],n[i][1]);CKEDITOR.env.ie&&CKEDITOR.env.version<11?e[r].$.styleSheet.cssText+=a:e[r].$.innerHTML+=a}}var o={};CKEDITOR.skin={path:a,loadPart:function(e,t){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(a()+"skin.js"),function(){i(e,t)}):i(e,t)},getPath:function(e){return CKEDITOR.getUrl(n(e))},icons:{},addIcon:function(e,t,n,i){e=e.toLowerCase(),this.icons[e]||(this.icons[e]={path:t,offset:n||0,bgsize:i||"16px"})},getIconStyle:function(e,t,n,i,o){var a;return e&&(e=e.toLowerCase(),a=(a=t?this.icons[e+"-rtl"]:a)||this.icons[e]),e=n||a&&a.path||"",i=i||a&&a.offset,o=o||a&&a.bgsize||"16px",(e=e&&e.replace(/'/g,"\\'"))&&"background-image:url('"+CKEDITOR.getUrl(e)+"');background-position:0 "+i+"px;background-size:"+o+";"}},CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(e){var o=r(CKEDITOR.document);return(this.setUiColor=function(e){this.uiColor=e;var t=CKEDITOR.skin.chameleon,n="",i="";"function"==typeof t&&(n=t(this,"editor"),i=t(this,"panel")),s([o],n,e=[[d,e]]),s(c,i,e)}).call(this,e)}});var l="cke_ui_color",c=[],d=/\$color/g;CKEDITOR.on("instanceLoaded",function(e){var n;CKEDITOR.env.ie&&CKEDITOR.env.quirks||(n=e.editor,e=function(e){var t;(e=(e.data[0]||e.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument()).getById("cke_ui_color")||(t=r(e),c.push(t),n.on("destroy",function(){c=CKEDITOR.tools.array.filter(c,function(e){return t!==e})}),(e=n.getUiColor())&&s([t],CKEDITOR.skin.chameleon(n,"panel"),[[d,e]]))},n.on("panelShow",e),n.on("menuShow",e),n.config.uiColor&&n.setUiColor(n.config.uiColor))})}(),function(){var e=CKEDITOR.dom.element.createFromHtml('<div style="width:0;height:0;position:absolute;left:-10000px;border:1px solid;border-color:red blue"></div>',CKEDITOR.document);e.appendTo(CKEDITOR.document.getHead());try{var t=e.getComputedStyle("border-top-color"),n=e.getComputedStyle("border-right-color");CKEDITOR.env.hc=!(!t||t!=n)}catch(e){CKEDITOR.env.hc=!1}if(e.remove(),CKEDITOR.env.hc&&(CKEDITOR.env.cssClass+=" cke_hc"),CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}"),CKEDITOR.status="loaded",CKEDITOR.fireOnce("loaded"),e=CKEDITOR._.pending)for(delete CKEDITOR._.pending,t=0;t<e.length;t++)CKEDITOR.editor.prototype.constructor.apply(e[t][0],e[t][1]),CKEDITOR.add(e[t][0])}(),CKEDITOR.skin.name="moono-lisa",CKEDITOR.skin.ua_editor="ie,iequirks,ie8,gecko",CKEDITOR.skin.ua_dialog="ie,iequirks,ie8",CKEDITOR.skin.chameleon=(_=function(e,t){for(var n=e.match(/[^#]./g),i=0;i<3;i++){var o=i,a=parseInt(n[i],16);a=("0"+(t<0?0|a*(1+t):0|a+(255-a)*t).toString(16)).slice(-2),n[o]=a}return"#"+n.join("")},k={editor:new CKEDITOR.template("{id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ background-color:{defaultBackground};border-bottom-color:{defaultBorder};] {id} .cke_bottom [background-color:{defaultBackground};border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color:{ckeResizer}] {id} .cke_dialog_title [background-color:{defaultBackground};border-bottom-color:{defaultBorder};] {id} .cke_dialog_footer [background-color:{defaultBackground};outline-color:{defaultBorder};] {id} .cke_dialog_tab [background-color:{dialogTab};border-color:{defaultBorder};] {id} .cke_dialog_tab:hover [background-color:{lightBackground};] {id} .cke_dialog_contents [border-top-color:{defaultBorder};] {id} .cke_dialog_tab_selected, {id} .cke_dialog_tab_selected:hover [background:{dialogTabSelected};border-bottom-color:{dialogTabSelectedBorder};] {id} .cke_dialog_body [background:{dialogBody};border-color:{defaultBorder};] {id} a.cke_button_off:hover,{id} a.cke_button_off:focus,{id} a.cke_button_off:active [background-color:{darkBackground};border-color:{toolbarElementsBorder};] {id} .cke_button_on [background-color:{ckeButtonOn};border-color:{toolbarElementsBorder};] {id} .cke_toolbar_separator,{id} .cke_toolgroup a.cke_button:last-child:after,{id} .cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after [background-color: {toolbarElementsBorder};border-color: {toolbarElementsBorder};] {id} a.cke_combo_button:hover,{id} a.cke_combo_button:focus,{id} .cke_combo_on a.cke_combo_button [border-color:{toolbarElementsBorder};background-color:{darkBackground};] {id} .cke_combo:after [border-color:{toolbarElementsBorder};] {id} .cke_path_item [color:{elementsPathColor};] {id} a.cke_path_item:hover,{id} a.cke_path_item:focus,{id} a.cke_path_item:active [background-color:{darkBackground};] {id}.cke_panel [border-color:{defaultBorder};] "),panel:new CKEDITOR.template(".cke_panel_grouptitle [background-color:{lightBackground};border-color:{defaultBorder};] .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active [background-color:{menubuttonHover};] .cke_menubutton:hover .cke_menubutton_icon, .cke_menubutton:focus .cke_menubutton_icon, .cke_menubutton:active .cke_menubutton_icon [background-color:{menubuttonIconHover};] .cke_menubutton_disabled:hover .cke_menubutton_icon,.cke_menubutton_disabled:focus .cke_menubutton_icon,.cke_menubutton_disabled:active .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menuseparator [background-color:{menubuttonIcon};] a:hover.cke_colorbox, a:active.cke_colorbox [border-color:{defaultBorder};] a:hover.cke_colorauto, a:hover.cke_colormore, a:active.cke_colorauto, a:active.cke_colormore [background-color:{ckeColorauto};border-color:{defaultBorder};] ")},function(e,t){var n=_(e.uiColor,.4),n={id:"."+e.id,defaultBorder:_(n,-.2),toolbarElementsBorder:_(n,-.25),defaultBackground:n,lightBackground:_(n,.8),darkBackground:_(n,-.15),ckeButtonOn:_(n,.4),ckeResizer:_(n,-.4),ckeColorauto:_(n,.8),dialogBody:_(n,.7),dialogTab:_(n,.65),dialogTabSelected:"#FFF",dialogTabSelectedBorder:"#FFF",elementsPathColor:_(n,-.6),menubuttonHover:_(n,.1),menubuttonIcon:_(n,.5),menubuttonIconHover:_(n,.3)};return k[t].output(n).replace(/\[/g,"{").replace(/\]/g,"}")}),CKEDITOR.plugins.add("dialogui",{onLoad:function(){function c(e){this._||(this._={}),this._.default=this._.initValue=e.default||"",this._.required=e.required||!1;for(var t=[this._],n=1;n<arguments.length;n++)t.push(arguments[n]);return t.push(!0),CKEDITOR.tools.extend.apply(CKEDITOR.tools,t),this._}function m(e){for(var t in e)!o.test(t)&&"title"!=t&&"type"!=t||delete e[t];return e}function s(e){(e=e.data.getKeystroke())==CKEDITOR.SHIFT+CKEDITOR.ALT+36?this.setDirectionMarker("ltr"):e==CKEDITOR.SHIFT+CKEDITOR.ALT+35&&this.setDirectionMarker("rtl")}var l,d,u,e={build:function(e,t,n){return new CKEDITOR.ui.dialog.textInput(e,t,n)}},t={build:function(e,t,n){return new CKEDITOR.ui.dialog[t.type](e,t,n)}},n={isChanged:function(){return this.getValue()!=this.getInitValue()},reset:function(e){this.setValue(this.getInitValue(),e)},setInitValue:function(){this._.initValue=this.getValue()},resetInitValue:function(){this._.initValue=this._.default},getInitValue:function(){return this._.initValue}},i=CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onChange:function(e,t){this._.domOnChangeRegistered||(e.on("load",function(){this.getInputElement().on("change",function(){e.parts.dialog.isVisible()&&this.fire("change",{value:this.getValue()})},this)},this),this._.domOnChangeRegistered=!0),this.on("change",t)}},!0),o=/^on([A-Z]\w+)/;CKEDITOR.tools.extend(CKEDITOR.ui.dialog,{labeledElement:function(n,i,e,o){var a,t;arguments.length<4||((a=c.call(this,i)).labelId=CKEDITOR.tools.getNextId()+"_label",this._.children=[],t={role:i.role||"presentation"},i.includeLabel&&(t["aria-labelledby"]=a.labelId),CKEDITOR.ui.dialog.uiElement.call(this,n,i,e,"div",null,t,function(){var e=[],t=i.required?" cke_required":"";return"horizontal"!=i.labelLayout?e.push('<label class="cke_dialog_ui_labeled_label'+t+'" ',' id="'+a.labelId+'"',a.inputId?' for="'+a.inputId+'"':"",(i.labelStyle?' style="'+i.labelStyle+'"':"")+">",i.label,"</label>",'<div class="cke_dialog_ui_labeled_content"',i.controlStyle?' style="'+i.controlStyle+'"':"",' role="presentation">',o.call(this,n,i),"</div>"):(t={type:"hbox",widths:i.widths,padding:0,children:[{type:"html",html:'<label class="cke_dialog_ui_labeled_label'+t+'" id="'+a.labelId+'" for="'+a.inputId+'"'+(i.labelStyle?' style="'+i.labelStyle+'"':"")+">"+CKEDITOR.tools.htmlEncode(i.label)+"</label>"},{type:"html",html:'<span class="cke_dialog_ui_labeled_content"'+(i.controlStyle?' style="'+i.controlStyle+'"':"")+">"+o.call(this,n,i)+"</span>"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(n,t,e)),e.join("")}))},textInput:function(t,n,e){var i,o,a,r;arguments.length<3||(c.call(this,n),i=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",o={class:"cke_dialog_ui_input_"+n.type,id:i,type:n.type},n.validate&&(this.validate=n.validate),n.maxLength&&(o.maxlength=n.maxLength),n.size&&(o.size=n.size),n.inputStyle&&(o.style=n.inputStyle),a=this,r=!1,t.on("load",function(){a.getInputElement().on("keydown",function(e){13==e.data.getKeystroke()&&(r=!0)}),a.getInputElement().on("keyup",function(e){13==e.data.getKeystroke()&&r&&(t.getButton("ok")&&setTimeout(function(){t.getButton("ok").click()},0),r=!1),a.bidi&&s.call(a,e)},null,null,1e3)}),CKEDITOR.ui.dialog.labeledElement.call(this,t,n,e,function(){var e,t=['<div class="cke_dialog_ui_input_',n.type,'" role="presentation"'];for(e in n.width&&t.push('style="width:'+n.width+'" '),t.push("><input "),o["aria-labelledby"]=this._.labelId,this._.required&&(o["aria-required"]=this._.required),o)t.push(e+'="'+o[e]+'" ');return t.push(" /></div>"),t.join("")}))},textarea:function(e,t,n){var i,o,a;arguments.length<3||(c.call(this,t),o=(i=this)._.inputId=CKEDITOR.tools.getNextId()+"_textarea",a={},t.validate&&(this.validate=t.validate),a.rows=t.rows||5,a.cols=t.cols||20,a.class="cke_dialog_ui_input_textarea "+(t.class||""),void 0!==t.inputStyle&&(a.style=t.inputStyle),t.dir&&(a.dir=t.dir),i.bidi&&e.on("load",function(){i.getInputElement().on("keyup",s)},i),CKEDITOR.ui.dialog.labeledElement.call(this,e,t,n,function(){a["aria-labelledby"]=this._.labelId,this._.required&&(a["aria-required"]=this._.required);var e,t=['<div class="cke_dialog_ui_input_textarea" role="presentation"><textarea id="',o,'" '];for(e in a)t.push(e+'="'+CKEDITOR.tools.htmlEncode(a[e])+'" ');return t.push(">",CKEDITOR.tools.htmlEncode(i._.default),"</textarea></div>"),t.join("")}))},checkbox:function(o,a,e){var r;arguments.length<3||(r=c.call(this,a,{default:!!a.default}),a.validate&&(this.validate=a.validate),CKEDITOR.ui.dialog.uiElement.call(this,o,a,e,"span",null,null,function(){var e=CKEDITOR.tools.extend({},a,{id:a.id?a.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),t=[],n=CKEDITOR.tools.getNextId()+"_label",i={class:"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":n};return m(e),a.default&&(i.checked="checked"),void 0!==e.inputStyle&&(e.style=e.inputStyle),r.checkbox=new CKEDITOR.ui.dialog.uiElement(o,e,t,"input",null,i),t.push(' <label id="',n,'" for="',i.id,'"'+(a.labelStyle?' style="'+a.labelStyle+'"':"")+">",CKEDITOR.tools.htmlEncode(a.label),"</label>"),t.join("")}))},radio:function(u,h,e){var f,g;arguments.length<3||(c.call(this,h),this._.default||(this._.default=this._.initValue=h.items[0][1]),h.validate&&(this.validate=h.validate),f=[],g=this,h.role="radiogroup",h.includeLabel=!0,CKEDITOR.ui.dialog.labeledElement.call(this,u,h,e,function(){for(var e=[],t=[],n=(h.id||CKEDITOR.tools.getNextId())+"_radio",i=0;i<h.items.length;i++){var o=h.items[i],a=void 0!==o[2]?o[2]:o[0],r=void 0!==o[1]?o[1]:o[0],s=(l=CKEDITOR.tools.getNextId()+"_radio_input")+"_label",l=CKEDITOR.tools.extend({},h,{id:l,title:null,type:null},!0),a=CKEDITOR.tools.extend({},l,{title:a},!0),c={type:"radio",class:"cke_dialog_ui_radio_input",name:n,value:r,"aria-labelledby":s},d=[];g._.default==r&&(c.checked="checked"),m(l),m(a),void 0!==l.inputStyle&&(l.style=l.inputStyle),l.keyboardFocusable=!0,f.push(new CKEDITOR.ui.dialog.uiElement(u,l,d,"input",null,c)),d.push(" "),new CKEDITOR.ui.dialog.uiElement(u,a,d,"label",null,{id:s,for:c.id},o[0]),e.push(d.join(""))}return new CKEDITOR.ui.dialog.hbox(u,f,e,t),t.join("")}),this._.children=f)},button:function(e,t,n){var i,o,a;arguments.length&&("function"==typeof t&&(t=t(e.getParentEditor())),c.call(this,t,{disabled:t.disabled||!1}),CKEDITOR.event.implementOn(this),e.on("load",function(){var e=this.getElement();e.on("click",function(e){i.click(),e.data.preventDefault()}),e.on("keydown",function(e){e.data.getKeystroke()in{32:1}&&(i.click(),e.data.preventDefault())}),e.unselectable()},i=this),delete(o=CKEDITOR.tools.extend({},t)).style,a=CKEDITOR.tools.getNextId()+"_label",CKEDITOR.ui.dialog.uiElement.call(this,e,o,n,"a",null,{style:t.style,href:"javascript:void(0)",title:t.label,hidefocus:"true",class:t.class,role:"button","aria-labelledby":a},'<span id="'+a+'" class="cke_dialog_ui_button">'+CKEDITOR.tools.htmlEncode(t.label)+"</span>"))},select:function(r,s,e){var l;arguments.length<3||(l=c.call(this,s),s.validate&&(this.validate=s.validate),l.inputId=CKEDITOR.tools.getNextId()+"_select",CKEDITOR.ui.dialog.labeledElement.call(this,r,s,e,function(){var e=CKEDITOR.tools.extend({},s,{id:s.id?s.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),t=[],n=[],i={id:l.inputId,class:"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};t.push('<div class="cke_dialog_ui_input_',s.type,'" role="presentation"'),s.width&&t.push('style="width:'+s.width+'" '),t.push(">"),void 0!==s.size&&(i.size=s.size),void 0!==s.multiple&&(i.multiple=s.multiple),m(e);for(var o,a=0;a<s.items.length&&(o=s.items[a]);a++)n.push('<option value="',CKEDITOR.tools.htmlEncode(void 0!==o[1]?o[1]:o[0]).replace(/"/g,"&quot;"),'" /> ',CKEDITOR.tools.htmlEncode(o[0]));return void 0!==e.inputStyle&&(e.style=e.inputStyle),l.select=new CKEDITOR.ui.dialog.uiElement(r,e,t,"select",null,i,n.join("")),t.push("</div>"),t.join("")}))},file:function(e,t,n){var i;arguments.length<3||(void 0===t.default&&(t.default=""),i=CKEDITOR.tools.extend(c.call(this,t),{definition:t,buttons:[]}),t.validate&&(this.validate=t.validate),e.on("load",function(){CKEDITOR.document.getById(i.frameId).getParent().addClass("cke_dialog_ui_input_file")}),CKEDITOR.ui.dialog.labeledElement.call(this,e,t,n,function(){i.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var e=['<iframe frameborder="0" allowtransparency="0" class="cke_dialog_ui_input_file" role="presentation" id="',i.frameId,'" title="',t.label,'" src="javascript:void('];return e.push(CKEDITOR.env.ie?"(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"})()":"0"),e.push(')"></iframe>'),e.join("")}))},fileButton:function(n,i,e){var t,o,a=this;arguments.length<3||(c.call(this,i),i.validate&&(this.validate=i.validate),t=CKEDITOR.tools.extend({},i),o=t.onClick,t.className=(t.className?t.className+" ":"")+"cke_dialog_ui_button",t.onClick=function(e){var t=i.for;!1!==(e=!!o&&o.call(this,e))&&("xhr"!==e&&n.getContentElement(t[0],t[1]).submit(),this.disable())},n.on("load",function(){n.getContentElement(i.for[0],i.for[1])._.buttons.push(a)}),CKEDITOR.ui.dialog.button.call(this,n,t,e))},html:(l=/^\s*<[\w:]+\s+([^>]*)?>/,d=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,u=/\/$/,function(e,t,n){var i,o,a,r;arguments.length<3||(i=[],"<"!=(o=t.html).charAt(0)&&(o="<span>"+o+"</span>"),(a=t.focus)&&(r=this.focus,this.focus=function(){("function"==typeof a?a:r).call(this),this.fire("focus")},t.isFocusable&&(this.isFocusable=this.isFocusable),this.keyboardFocusable=!0),CKEDITOR.ui.dialog.uiElement.call(this,e,t,i,"span",null,null,""),i=i.join("").match(l),o=o.match(d)||["","",""],u.test(o[1])&&(o[1]=o[1].slice(0,-1),o[2]="/"+o[2]),n.push([o[1]," ",i[1]||"",o[2]].join("")))}),fieldset:function(e,t,n,i,o){var a=o.label;this._={children:t},CKEDITOR.ui.dialog.uiElement.call(this,e,o,i,"fieldset",null,null,function(){var e=[];a&&e.push("<legend"+(o.labelStyle?' style="'+o.labelStyle+'"':"")+">"+a+"</legend>");for(var t=0;t<n.length;t++)e.push(n[t]);return e.join("")})}},!0),CKEDITOR.ui.dialog.html.prototype=new CKEDITOR.ui.dialog.uiElement,CKEDITOR.ui.dialog.labeledElement.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setLabel:function(e){var t=CKEDITOR.document.getById(this._.labelId);return t.getChildCount()<1?new CKEDITOR.dom.text(e,CKEDITOR.document).appendTo(t):t.getChild(0).$.nodeValue=e,this},getLabel:function(){var e=CKEDITOR.document.getById(this._.labelId);return!e||e.getChildCount()<1?"":e.getChild(0).getText()},eventProcessors:i},!0),CKEDITOR.ui.dialog.button.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){return!this._.disabled&&this.fire("click",{dialog:this._.dialog})},enable:function(){this._.disabled=!1;var e=this.getElement();e&&e.removeClass("cke_disabled")},disable:function(){this._.disabled=!0,this.getElement().addClass("cke_disabled")},isVisible:function(){return this.getElement().getFirst().isVisible()},isEnabled:function(){return!this._.disabled},eventProcessors:CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onClick:function(e,t){this.on("click",function(){t.apply(this,arguments)})}},!0),accessKeyUp:function(){this.click()},accessKeyDown:function(){this.focus()},keyboardFocusable:!0},!0),CKEDITOR.ui.dialog.textInput.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return CKEDITOR.document.getById(this._.inputId)},focus:function(){var t=this.selectParentTab();setTimeout(function(){var e=t.getInputElement();e&&e.$.focus()},0)},select:function(){var t=this.selectParentTab();setTimeout(function(){var e=t.getInputElement();e&&(e.$.focus(),e.$.select())},0)},accessKeyUp:function(){this.select()},setValue:function(e){var t;return this.bidi&&((t="‪"==(t=e&&e.charAt(0))?"ltr":"‫"==t?"rtl":null)&&(e=e.slice(1)),this.setDirectionMarker(t)),e=e||"",CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)},getValue:function(){var e,t=CKEDITOR.ui.dialog.uiElement.prototype.getValue.call(this);return this.bidi&&t&&((e=this.getDirectionMarker())&&(t=("ltr"==e?"‪":"‫")+t)),t},setDirectionMarker:function(e){var t=this.getInputElement();e?t.setAttributes({dir:e,"data-cke-dir-marker":e}):this.getDirectionMarker()&&t.removeAttributes(["dir","data-cke-dir-marker"])},getDirectionMarker:function(){return this.getInputElement().data("cke-dir-marker")},keyboardFocusable:!0},n,!0),CKEDITOR.ui.dialog.textarea.prototype=new CKEDITOR.ui.dialog.textInput,CKEDITOR.ui.dialog.select.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return this._.select.getElement()},add:function(e,t,n){var i=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),o=this.getInputElement().$;return i.$.text=e,i.$.value=null==t?e:t,null==n?CKEDITOR.env.ie?o.add(i.$):o.add(i.$,null):o.add(i.$,n),this},remove:function(e){return this.getInputElement().$.remove(e),this},clear:function(){for(var e=this.getInputElement().$;0<e.length;)e.remove(0);return this},keyboardFocusable:!0},n,!0),CKEDITOR.ui.dialog.checkbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getInputElement:function(){return this._.checkbox.getElement()},setValue:function(e,t){this.getInputElement().$.checked=e,t||this.fire("change",{value:e})},getValue:function(){return this.getInputElement().$.checked},accessKeyUp:function(){this.setValue(!this.getValue())},eventProcessors:{onChange:function(e,t){return!CKEDITOR.env.ie||8<CKEDITOR.env.version?i.onChange.apply(this,arguments):(e.on("load",function(){var t=this._.checkbox.getElement();t.on("propertychange",function(e){"checked"==(e=e.data.$).propertyName&&this.fire("change",{value:t.$.checked})},this)},this),this.on("change",t),null)}},keyboardFocusable:!0},n,!0),CKEDITOR.ui.dialog.radio.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setValue:function(e,t){for(var n,i=this._.children,o=0;o<i.length&&(n=i[o]);o++)n.getElement().$.checked=n.getValue()==e;t||this.fire("change",{value:e})},getValue:function(){for(var e=this._.children,t=0;t<e.length;t++)if(e[t].getElement().$.checked)return e[t].getValue();return null},accessKeyUp:function(){for(var e=this._.children,t=0;t<e.length;t++)if(e[t].getElement().$.checked)return void e[t].getElement().focus();e[0].getElement().focus()},eventProcessors:{onChange:function(e,t){return!CKEDITOR.env.ie||8<CKEDITOR.env.version?i.onChange.apply(this,arguments):(e.on("load",function(){for(var e=this._.children,t=this,n=0;n<e.length;n++)e[n].getElement().on("propertychange",function(e){"checked"==(e=e.data.$).propertyName&&this.$.checked&&t.fire("change",{value:this.getAttribute("value")})})},this),this.on("change",t),null)}}},n,!0),CKEDITOR.ui.dialog.file.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,n,{getInputElement:function(){var e=CKEDITOR.document.getById(this._.frameId).getFrameDocument();return 0<e.$.forms.length?new CKEDITOR.dom.element(e.$.forms[0].elements[0]):this.getElement()},submit:function(){return this.getInputElement().getParent().$.submit(),this},getAction:function(){return this.getInputElement().getParent().$.action},registerEvents:function(e){var t,n,i=/^on([A-Z]\w+)/;for(n in e)(t=n.match(i))&&(this.eventProcessors[n]?this.eventProcessors[n].call(this,this._.dialog,e[n]):function(e,t,n){e.on("formLoaded",function(){e.getInputElement().on(t,n,e)})}(this,(this._.dialog,t[1].toLowerCase()),e[n]));return this},reset:function(){function e(){i.$.open();var e="";o.size&&(e=o.size-(CKEDITOR.env.ie?7:0));var t=n.frameId+"_input";for(i.$.write(['<html dir="'+l+'" lang="'+c+'"><head><title></title></head><body style="margin: 0; overflow: hidden; background: transparent;">','<form enctype="multipart/form-data" method="POST" dir="'+l+'" lang="'+c+'" action="',CKEDITOR.tools.htmlEncode(o.action),'"><label id="',n.labelId,'" for="',t,'" style="display:none">',CKEDITOR.tools.htmlEncode(o.label),'</label><input style="width:100%" id="',t,'" aria-labelledby="',n.labelId,'" type="file" name="',CKEDITOR.tools.htmlEncode(o.id||"cke_upload"),'" size="',CKEDITOR.tools.htmlEncode(0<e?e:""),'" /></form></body></html><script>',CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"","window.parent.CKEDITOR.tools.callFunction("+r+");","window.onbeforeunload = function() {window.parent.CKEDITOR.tools.callFunction("+s+")}","<\/script>"].join("")),i.$.close(),e=0;e<a.length;e++)a[e].enable()}var n=this._,i=CKEDITOR.document.getById(n.frameId).getFrameDocument(),o=n.definition,a=n.buttons,r=this.formLoadedNumber,s=this.formUnloadNumber,l=n.dialog._.editor.lang.dir,c=n.dialog._.editor.langCode;r||(r=this.formLoadedNumber=CKEDITOR.tools.addFunction(function(){this.fire("formLoaded")},this),s=this.formUnloadNumber=CKEDITOR.tools.addFunction(function(){this.getInputElement().clearCustomData()},this),this.getDialog()._.editor.on("destroy",function(){CKEDITOR.tools.removeFunction(r),CKEDITOR.tools.removeFunction(s)})),CKEDITOR.env.gecko?setTimeout(e,500):e()},getValue:function(){return this.getInputElement().$.value||""},setInitValue:function(){this._.initValue=""},eventProcessors:{onChange:function(e,t){this._.domOnChangeRegistered||(this.on("formLoaded",function(){this.getInputElement().on("change",function(){this.fire("change",{value:this.getValue()})},this)},this),this._.domOnChangeRegistered=!0),this.on("change",t)}},keyboardFocusable:!0},!0),CKEDITOR.ui.dialog.fileButton.prototype=new CKEDITOR.ui.dialog.button,CKEDITOR.ui.dialog.fieldset.prototype=CKEDITOR.tools.clone(CKEDITOR.ui.dialog.hbox.prototype),CKEDITOR.dialog.addUIElement("text",e),CKEDITOR.dialog.addUIElement("password",e),CKEDITOR.dialog.addUIElement("tel",e),CKEDITOR.dialog.addUIElement("textarea",t),CKEDITOR.dialog.addUIElement("checkbox",t),CKEDITOR.dialog.addUIElement("radio",t),CKEDITOR.dialog.addUIElement("button",t),CKEDITOR.dialog.addUIElement("select",t),CKEDITOR.dialog.addUIElement("file",t),CKEDITOR.dialog.addUIElement("fileButton",t),CKEDITOR.dialog.addUIElement("html",t),CKEDITOR.dialog.addUIElement("fieldset",{build:function(e,t,n){for(var i,o=t.children,a=[],r=[],s=0;s<o.length&&(i=o[s]);s++){var l=[];a.push(l),r.push(CKEDITOR.dialog._.uiElementBuilders[i.type].build(e,i,l))}return new CKEDITOR.ui.dialog[t.type](e,r,a,n,t)}})}}),CKEDITOR.DIALOG_RESIZE_NONE=0,CKEDITOR.DIALOG_RESIZE_WIDTH=1,CKEDITOR.DIALOG_RESIZE_HEIGHT=2,CKEDITOR.DIALOG_RESIZE_BOTH=3,CKEDITOR.DIALOG_STATE_IDLE=1,CKEDITOR.DIALOG_STATE_BUSY=2,function(){function q(e){e._.tabBarMode=!0,e._.tabs[e._.currentTabId][0].focus(),e._.currentFocusIndex=-1}function U(){for(var e=this._.tabIdList.length,t=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId)+e,n=t-1;t-e<n;n--)if(this._.tabs[this._.tabIdList[n%e]][0].$.offsetHeight)return this._.tabIdList[n%e];return null}function a(e,t){for(var n=e.$.getElementsByTagName("input"),i=0,o=n.length;i<o;i++){var a=new CKEDITOR.dom.element(n[i]);"text"==a.getAttribute("type").toLowerCase()&&(t?(a.setAttribute("value",a.getCustomData("fake_value")||""),a.removeCustomData("fake_value")):(a.setCustomData("fake_value",a.getAttribute("value")),a.setAttribute("value","")))}}function i(e,t,n){this.element=t,this.focusIndex=n,this.tabIndex=0,this.isFocusable=function(){return!t.getAttribute("disabled")&&t.isVisible()},this.focus=function(){e._.currentFocusIndex=this.focusIndex,this.element.focus()},t.on("keydown",function(e){e.data.getKeystroke()in{32:1,13:1}&&this.fire("click")}),t.on("focus",function(){this.fire("mouseover")}),t.on("blur",function(){this.fire("mouseout")})}function z(e,t){this.dialog=e;for(var n,i=t.contents,o=0;n=i[o];o++)i[o]=n&&new r(e,n);CKEDITOR.tools.extend(this,t)}function r(e,t){this._={dialog:e},CKEDITOR.tools.extend(this,t)}function V(e,t,n){var i=e.parts.dialog.getParent().getClientSize(),o=e.getSize(),a=e._.viewportRatio,r=Math.max(i.width-o.width,0),i=Math.max(i.height-o.height,0);a.width=r?t/r:a.width,a.height=i?n/i:a.height,e._.viewportRatio=a}function s(e){e.data.preventDefault(1)}function l(e){var t=e.config,n=CKEDITOR.skinName||e.config.skin,i=t.dialog_backgroundCoverColor||("moono-lisa"==n?"black":"white"),n=t.dialog_backgroundCoverOpacity,o=t.baseFloatZIndex,t=CKEDITOR.tools.genKey(i,n,o),a=K[t];CKEDITOR.document.getBody().addClass("cke_dialog_open"),a?a.show():(o=['<div tabIndex="-1" style="position: ',CKEDITOR.env.ie6Compat?"absolute":"fixed","; z-index: ",o,"; top: 0px; left: 0px; ","; width: 100%; height: 100%;",CKEDITOR.env.ie6Compat?"":"background-color: "+i,'" class="cke_dialog_background_cover">'],CKEDITOR.env.ie6Compat&&(i="<html><body style=\\'background-color:"+i+";\\'></body></html>",o.push('<iframe hidefocus="true" frameborder="0" id="cke_dialog_background_iframe" src="javascript:'),o.push("void((function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.write( '"+i+"' );document.close();")+"})())"),o.push('" style="position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0)"></iframe>')),o.push("</div>"),(a=CKEDITOR.dom.element.createFromHtml(o.join(""))).setOpacity(void 0!==n?n:.5),a.on("keydown",s),a.on("keypress",s),a.on("keyup",s),a.appendTo(CKEDITOR.document.getBody()),K[t]=a),e.focusManager.add(a),W=a,CKEDITOR.env.mac&&CKEDITOR.env.webkit||a.focus()}function c(e){CKEDITOR.document.getBody().removeClass("cke_dialog_open"),W&&(e.focusManager.remove(W),W.hide())}function d(e){var t=e.data.$.ctrlKey||e.data.$.metaKey,n=e.data.$.altKey,i=e.data.$.shiftKey,o=String.fromCharCode(e.data.$.keyCode);(t=_[(t?"CTRL+":"")+(n?"ALT+":"")+(i?"SHIFT+":"")+o])&&t.length&&((t=t[t.length-1]).keydown&&t.keydown.call(t.uiElement,t.dialog,t.key),e.data.preventDefault())}function u(e){var t=e.data.$.ctrlKey||e.data.$.metaKey,n=e.data.$.altKey,i=e.data.$.shiftKey,o=String.fromCharCode(e.data.$.keyCode);(t=_[(t?"CTRL+":"")+(n?"ALT+":"")+(i?"SHIFT+":"")+o])&&t.length&&((t=t[t.length-1]).keyup&&(t.keyup.call(t.uiElement,t.dialog,t.key),e.data.preventDefault()))}function E(e,t,n,i,o){(_[n]||(_[n]=[])).push({uiElement:e,dialog:t,key:n,keyup:o||e.accessKeyUp,keydown:i||e.accessKeyDown})}function h(e,t){e._.accessKeyMap[t]&&e.selectPage(e._.accessKeyMap[t])}function f(){}var W,g=CKEDITOR.tools.cssLength,e=!1,m=!CKEDITOR.env.ie||CKEDITOR.env.edge,j='<div class="cke_reset_all cke_dialog_container {editorId} {editorDialogClass} {hidpi}" dir="{langDir}" style="'+(m?"display:flex":"")+'" lang="{langCode}" role="dialog" aria-labelledby="cke_dialog_title_{id}"><table class="cke_dialog '+CKEDITOR.env.cssClass+' cke_{langDir}" style="'+(m?"margin:auto":"position:absolute")+'" role="presentation"><tr><td role="presentation"><div class="cke_dialog_body" role="presentation"><div id="cke_dialog_title_{id}" class="cke_dialog_title" role="presentation"></div><a id="cke_dialog_close_button_{id}" class="cke_dialog_close_button" href="javascript:void(0)" title="{closeTitle}" role="button"><span class="cke_label">X</span></a><div id="cke_dialog_tabs_{id}" class="cke_dialog_tabs" role="tablist"></div><table class="cke_dialog_contents" role="presentation"><tr><td id="cke_dialog_contents_{id}" class="cke_dialog_contents_body" role="presentation"></td></tr><tr><td id="cke_dialog_footer_{id}" class="cke_dialog_footer" role="presentation"></td></tr></table></div></td></tr></table></div>';function t(e){e.reset&&e.reset(1)}function n(e,t){return t=t||{},CKEDITOR.tools.extend({id:"cancel",type:"button",label:e.lang.common.cancel,class:"cke_dialog_ui_button_cancel",onClick:function(e){!1!==(e=e.data.dialog).fire("cancel",{hide:!0}).hide&&e.hide()}},t,!0)}function o(e,t){return t=t||{},CKEDITOR.tools.extend({id:"ok",type:"button",label:e.lang.common.ok,class:"cke_dialog_ui_button_ok",onClick:function(e){!1!==(e=e.data.dialog).fire("ok",{hide:!0}).hide&&e.hide()}},t,!0)}CKEDITOR.dialog=function(i,e){function o(e){var t=C._.focusList;if(e=e||0,!(t.length<1)){var n=C._.currentFocusIndex;C._.tabBarMode&&e<0&&(n=0);try{t[n].getInputElement().$.blur()}catch(e){}var i=n,o=1<C._.pageCount;do{if(i+=e,o&&!C._.tabBarMode&&(i==t.length||-1==i))return C._.tabBarMode=!0,C._.tabs[C._.currentTabId][0].focus(),void(C._.currentFocusIndex=-1)}while((i=(i+t.length)%t.length)!=n&&(e&&!t[i].isFocusable()));t[i].focus(),"text"==t[i].type&&t[i].select()}}function t(e){if(C==CKEDITOR.dialog._.currentTop){var t=e.data.getKeystroke(),n="rtl"==i.lang.dir;if(r=s=0,9==t||t==CKEDITOR.SHIFT+9)o(t==CKEDITOR.SHIFT+9?-1:1),r=1;else if(t==CKEDITOR.ALT+121&&!C._.tabBarMode&&1<C.getPageCount())q(C),r=1;else if(-1!=CKEDITOR.tools.indexOf([37,38,39,40],t)&&C._.tabBarMode)t=(-1!=CKEDITOR.tools.indexOf([n?39:37,38],t)?U:function(){for(var e=this._.tabIdList.length,t=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId),n=t+1;n<t+e;n++)if(this._.tabs[this._.tabIdList[n%e]][0].$.offsetHeight)return this._.tabIdList[n%e];return null}).call(C),C.selectPage(t),C._.tabs[t][0].focus(),r=1;else if(13!=t&&32!=t||!C._.tabBarMode)if(13==t)(t=e.data.getTarget()).is("a","button","select","textarea")||t.is("input")&&"button"==t.$.type||((t=this.getButton("ok"))&&CKEDITOR.tools.setTimeout(t.click,0,t),r=1),s=1;else{if(27!=t)return;(t=this.getButton("cancel"))?CKEDITOR.tools.setTimeout(t.click,0,t):!1!==this.fire("cancel",{hide:!0}).hide&&this.hide(),s=1}else this.selectPage(this._.currentTabId),this._.tabBarMode=!1,this._.currentFocusIndex=-1,o(1),r=1;a(e)}}function a(e){r?e.data.preventDefault(1):s&&e.data.stopPropagation()}var r,s,n,l,c,d,u,h,f=CKEDITOR.dialog._.dialogDefinitions[e],g=CKEDITOR.tools.clone(G),m=i.config.dialog_buttonsOrder||"OS",E=i.lang.dir,p={};if(("OS"==m&&CKEDITOR.env.mac||"rtl"==m&&"ltr"==E||"ltr"==m&&"rtl"==E)&&g.buttons.reverse(),f=CKEDITOR.tools.extend(f(i),g),f=new z(this,f=CKEDITOR.tools.clone(f)),n=i,l=CKEDITOR.dom.element.createFromHtml(CKEDITOR.addTemplate("dialog",j).output({id:CKEDITOR.tools.getNextNumber(),editorId:n.id,langDir:n.lang.dir,langCode:n.langCode,editorDialogClass:"cke_editor_"+n.name.replace(/\./g,"\\.")+"_dialog",closeTitle:n.lang.common.close,hidpi:CKEDITOR.env.hidpi?"cke_hidpi":""})),c=l.getChild([0,0,0,0,0]),d=c.getChild(0),u=c.getChild(1),n.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(c),!CKEDITOR.env.ie||CKEDITOR.env.quirks||CKEDITOR.env.edge||(n="javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())",CKEDITOR.dom.element.createFromHtml('<iframe frameBorder="0" class="cke_iframe_shim" src="'+n+'" tabIndex="-1"></iframe>').appendTo(c.getParent())),d.unselectable(),u.unselectable(),g={element:l,parts:{dialog:l.getChild(0),title:d,close:u,tabs:c.getChild(2),contents:c.getChild([3,0,0,0]),footer:c.getChild([3,0,1,0])}},this._={editor:i,element:g.element,name:e,model:null,contentSize:{width:0,height:0},size:{width:0,height:0},contents:{},buttons:{},accessKeyMap:{},viewportRatio:{width:.5,height:.5},tabs:{},tabIdList:[],currentTabId:null,currentTabIndex:null,pageCount:0,lastTab:null,tabBarMode:!1,focusList:[],currentFocusIndex:0,hasFocus:!1},this.parts=g.parts,CKEDITOR.tools.setTimeout(function(){i.fire("ariaWidget",this.parts.contents)},0,this),g={top:0,visibility:"hidden"},CKEDITOR.env.ie6Compat&&(g.position="absolute"),g["rtl"==E?"right":"left"]=0,this.parts.dialog.setStyles(g),CKEDITOR.event.call(this),this.definition=f=CKEDITOR.fire("dialogDefinition",{name:e,definition:f,dialog:this},i).definition,!("removeDialogTabs"in i._)&&i.config.removeDialogTabs){for(g=i.config.removeDialogTabs.split(";"),E=0;E<g.length;E++)2==(m=g[E].split(":")).length&&(p[h=m[0]]||(p[h]=[]),p[h].push(m[1]));i._.removeDialogTabs=p}if(i._.removeDialogTabs&&(p=i._.removeDialogTabs[e]))for(E=0;E<p.length;E++)f.removeContents(p[E]);f.onLoad&&this.on("load",f.onLoad),f.onShow&&this.on("show",f.onShow),f.onHide&&this.on("hide",f.onHide),f.onOk&&this.on("ok",function(e){i.fire("saveSnapshot"),setTimeout(function(){i.fire("saveSnapshot")},0),!1===f.onOk.call(this,e)&&(e.data.hide=!1)}),this.state=CKEDITOR.DIALOG_STATE_IDLE,f.onCancel&&this.on("cancel",function(e){!1===f.onCancel.call(this,e)&&(e.data.hide=!1)});function T(e){var t,n=C._.contents;for(t in n)for(var i in n[t])if(e.call(this,n[t][i]))return}var C=this;this.on("ok",function(i){T(function(e){if(e.validate){var t=e.validate(this),n="string"==typeof t||!1===t;return n&&(i.data.hide=!1,i.stop()),function(e,t){var n=this.getInputElement();n&&(e?n.removeAttribute("aria-invalid"):n.setAttribute("aria-invalid",!0)),e||(this.select?this.select():this.focus()),t&&alert(t),this.fire("validated",{valid:e,msg:t})}.call(e,!n,"string"==typeof t?t:void 0),n}})},this,null,0),this.on("cancel",function(t){T(function(e){if(e.isChanged())return i.config.dialog_noConfirmCancel||confirm(i.lang.common.confirmCancel)||(t.data.hide=!1),!0})},this,null,0),this.parts.close.on("click",function(e){!1!==this.fire("cancel",{hide:!0}).hide&&this.hide(),e.data.preventDefault()},this),this.changeFocus=o;var I,O,D,R,v,b,y,K,_,k,w,N,S,x,A,L,F,P=this._.element;function B(e){var t=I.getSize(),n=I.parts.dialog.getParent().getClientSize(),i=e.data.$.screenX,o=e.data.$.screenY,a=i-O.x,r=o-O.y;O={x:i,y:o},D.x+=a,D.y+=r,i=D.x+b[3]<v?-b[3]:D.x-b[1]>n.width-t.width-v?n.width-t.width+("rtl"==R.lang.dir?0:b[1]):D.x,t=D.y+b[0]<v?-b[0]:D.y-b[2]>n.height-t.height-v?n.height-t.height+b[2]:D.y,i=Math.floor(i),t=Math.floor(t),I.move(i,t,1),e.data.preventDefault()}function M(){var e;CKEDITOR.document.removeListener("mousemove",B),CKEDITOR.document.removeListener("mouseup",M),CKEDITOR.env.ie6Compat&&((e=W.getChild(0).getFrameDocument()).removeListener("mousemove",B),e.removeListener("mouseup",M))}function $(e){var t="rtl"==K.lang.dir,n=S.width,i=S.height,o=n+(e.data.$.screenX-N.x)*(t?-1:1)*(y._.moved?1:2),a=i+(e.data.$.screenY-N.y)*(y._.moved?1:2),r=y._.element.getFirst(),r=t&&parseInt(r.getComputedStyle("right"),10),s=y.getPosition();s.x=s.x||0,s.y=s.y||0,s.y+a>w.height&&(a=w.height-s.y),(t?r:s.x)+o>w.width&&(o=w.width-(t?r:s.x)),a=Math.floor(a),o=Math.floor(o),F!=CKEDITOR.DIALOG_RESIZE_WIDTH&&F!=CKEDITOR.DIALOG_RESIZE_BOTH||(n=Math.max(L.minWidth||0,o-_)),F!=CKEDITOR.DIALOG_RESIZE_HEIGHT&&F!=CKEDITOR.DIALOG_RESIZE_BOTH||(i=Math.max(L.minHeight||0,a-k)),y.resize(n,i),y._.moved&&V(y,y._.position.x,y._.position.y),y._.moved||y.layout(),e.data.preventDefault()}function H(){var e;CKEDITOR.document.removeListener("mouseup",H),CKEDITOR.document.removeListener("mousemove",$),x&&(x.remove(),x=null),CKEDITOR.env.ie6Compat&&((e=W.getChild(0).getFrameDocument()).removeListener("mouseup",H),e.removeListener("mousemove",$))}for(i.focusManager.add(P,1),this.on("show",function(){P.on("keydown",t,this),CKEDITOR.env.gecko&&P.on("keypress",a,this)}),this.on("hide",function(){P.removeListener("keydown",t),CKEDITOR.env.gecko&&P.removeListener("keypress",a),T(function(e){!function(){var e=this.getInputElement();e&&e.removeAttribute("aria-invalid")}.apply(e)})}),this.on("iframeAdded",function(e){new CKEDITOR.dom.document(e.data.iframe.$.contentWindow.document).on("keydown",t,this,null,0)}),this.on("show",function(){!function(){var e=C._.focusList;e.sort(function(e,t){return e.tabIndex!=t.tabIndex?t.tabIndex-e.tabIndex:e.focusIndex-t.focusIndex});for(var t=e.length,n=0;n<t;n++)e[n].focusIndex=n}();var e=1<C._.pageCount;i.config.dialog_startupFocusTab&&e?(C._.tabBarMode=!0,C._.tabs[C._.currentTabId][0].focus(),C._.currentFocusIndex=-1):this._.hasFocus||(this._.currentFocusIndex=e?-1:this._.focusList.length-1,f.onFocus?(e=f.onFocus.call(this))&&e.focus():o(1))},this,null,4294967295),CKEDITOR.env.ie6Compat&&this.on("load",function(){var e=this.getElement(),t=e.getFirst();t.remove(),t.appendTo(e)},this),D=O=null,R=(I=this).getParentEditor(),v=R.config.dialog_magnetDistance,b=CKEDITOR.skin.margins||[0,0,0,0],void 0===v&&(v=20),I.parts.title.on("mousedown",function(e){var t;I._.moved||((t=I._.element).getFirst().setStyle("position","absolute"),t.removeStyle("display"),I._.moved=!0,I.layout()),O={x:e.data.$.screenX,y:e.data.$.screenY},CKEDITOR.document.on("mousemove",B),CKEDITOR.document.on("mouseup",M),D=I.getPosition(),CKEDITOR.env.ie6Compat&&((t=W.getChild(0).getFrameDocument()).on("mousemove",B),t.on("mouseup",M)),e.data.preventDefault()},I),L=(y=this).definition,(F=L.resizable)!=CKEDITOR.DIALOG_RESIZE_NONE&&(K=y.getParentEditor(),A=CKEDITOR.tools.addFunction(function(e){function t(e){return e.isVisible()}S=y.getSize();var n=y.parts.contents,i=n.$.getElementsByTagName("iframe").length,o=!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks);i&&(x=CKEDITOR.dom.element.createFromHtml('<div class="cke_dialog_resize_cover" style="height: 100%; position: absolute; width: 100%; left:0; top:0;"></div>'),n.append(x)),k=S.height-y.parts.contents.getFirst(t).getSize("height",o),_=S.width-y.parts.contents.getFirst(t).getSize("width",1),N={x:e.screenX,y:e.screenY},w=CKEDITOR.document.getWindow().getViewPaneSize(),CKEDITOR.document.on("mousemove",$),CKEDITOR.document.on("mouseup",H),CKEDITOR.env.ie6Compat&&((n=W.getChild(0).getFrameDocument()).on("mousemove",$),n.on("mouseup",H)),e.preventDefault&&e.preventDefault()}),y.on("load",function(){var e="";F==CKEDITOR.DIALOG_RESIZE_WIDTH?e=" cke_resizer_horizontal":F==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(e=" cke_resizer_vertical"),e=CKEDITOR.dom.element.createFromHtml('<div class="cke_resizer'+e+" cke_resizer_"+K.lang.dir+'" title="'+CKEDITOR.tools.htmlEncode(K.lang.common.resize)+'" onmousedown="CKEDITOR.tools.callFunction('+A+', event )">'+("ltr"==K.lang.dir?"◢":"◣")+"</div>"),y.parts.footer.append(e,1)}),K.on("destroy",function(){CKEDITOR.tools.removeFunction(A)})),new CKEDITOR.dom.text(f.title,CKEDITOR.document).appendTo(this.parts.title),E=0;E<f.contents.length;E++)(p=f.contents[E])&&this.addPage(p);for(this.parts.tabs.on("click",function(e){var t=e.data.getTarget();t.hasClass("cke_dialog_tab")&&(t=t.$.id,this.selectPage(t.substring(4,t.lastIndexOf("_"))),q(this),e.data.preventDefault())},this),E=[],p=CKEDITOR.dialog._.uiElementBuilders.hbox.build(this,{type:"hbox",className:"cke_dialog_footer_buttons",widths:[],children:f.buttons},E).getChild(),this.parts.footer.setHtml(E.join("")),E=0;E<p.length;E++)this._.buttons[p[E].id]=p[E]},CKEDITOR.dialog.prototype={destroy:function(){this.hide(),this._.element.remove()},resize:function(e,t){var n;this._.contentSize&&this._.contentSize.width==e&&this._.contentSize.height==t||(CKEDITOR.dialog.fire("resize",{dialog:this,width:e,height:t},this._.editor),this.fire("resize",{width:e,height:t},this._.editor),this.parts.contents.setStyles({width:e+"px",height:t+"px"}),"rtl"==this._.editor.lang.dir&&this._.position&&(n=this.parts.dialog.getParent().getClientSize().width,this._.position.x=n-this._.contentSize.width-parseInt(this._.element.getFirst().getStyle("right"),10)),this._.contentSize={width:e,height:t})},getSize:function(){var e=this._.element.getFirst();return{width:e.$.offsetWidth||0,height:e.$.offsetHeight||0}},move:function(e,t,n){var i=this._.element.getFirst(),o="rtl"==this._.editor.lang.dir;CKEDITOR.env.ie&&i.setStyle("zoom","100%");var a=this.parts.dialog.getParent().getClientSize(),r=this.getSize(),s=this._.viewportRatio,l=Math.max(a.width-r.width,0),a=Math.max(a.height-r.height,0);this._.position&&this._.position.x==e&&this._.position.y==t?(e=Math.floor(l*s.width),t=Math.floor(a*s.height)):V(this,e,t),this._.position={x:e,y:t},(t={top:(0<t?t:0)+"px"})[o?"right":"left"]=(0<(e=o?l-e:e)?e:0)+"px",i.setStyles(t),n&&(this._.moved=1)},getPosition:function(){return CKEDITOR.tools.extend({},this._.position)},show:function(){var e,t=this._.element,n=this.definition,i=CKEDITOR.document.getBody(),o=this._.editor.config.baseFloatZIndex;for(e in t.getParent()&&t.getParent().equals(i)?t.setStyle("display",m?"flex":"block"):t.appendTo(i),this.resize(this._.contentSize&&this._.contentSize.width||n.width||n.minWidth,this._.contentSize&&this._.contentSize.height||n.height||n.minHeight),this.reset(),null===this._.currentTabId&&this.selectPage(this.definition.contents[0].id),null===CKEDITOR.dialog._.currentZIndex&&(CKEDITOR.dialog._.currentZIndex=o),this._.element.getFirst().setStyle("z-index",CKEDITOR.dialog._.currentZIndex+=10),this.getElement().setStyle("z-index",CKEDITOR.dialog._.currentZIndex),null===CKEDITOR.dialog._.currentTop?((CKEDITOR.dialog._.currentTop=this)._.parentDialog=null,l(this._.editor)):(this._.parentDialog=CKEDITOR.dialog._.currentTop,(i=this._.parentDialog.getElement().getFirst()).$.style.zIndex-=Math.floor(o/2),this._.parentDialog.getElement().setStyle("z-index",i.$.style.zIndex),CKEDITOR.dialog._.currentTop=this),t.on("keydown",d),t.on("keyup",u),this._.hasFocus=!1,n.contents)if(n.contents[e]){var t=n.contents[e],o=this._.tabs[t.id],i=t.requiredContent,a=0;if(o){for(var r in this._.contents[t.id]){r=this._.contents[t.id][r];"hbox"!=r.type&&"vbox"!=r.type&&r.getInputElement()&&(r.requiredContent&&!this._.editor.activeFilter.check(r.requiredContent)?r.disable():(r.enable(),a++))}!a||i&&!this._.editor.activeFilter.check(i)?o[0].addClass("cke_dialog_tab_disabled"):o[0].removeClass("cke_dialog_tab_disabled")}}CKEDITOR.tools.setTimeout(function(){function e(){t.layout()}var t,n;this.layout(),t=this,(n=CKEDITOR.document.getWindow()).on("resize",e),t.on("hide",function(){n.removeListener("resize",e)}),this.parts.dialog.setStyle("visibility",""),this.fireOnce("load",{}),CKEDITOR.ui.fire("ready",this),this.fire("show",{}),this._.editor.fire("dialogShow",this),this._.parentDialog||this._.editor.focusManager.lock(),this.foreach(function(e){e.setInitValue&&e.setInitValue()})},100,this)},layout:function(){var e,t,n,i=this.parts.dialog;!this._.moved&&m||(n=this.getSize(),e=CKEDITOR.document.getWindow().getViewPaneSize(),n=this._.moved&&this._.position?(t=this._.position.x,this._.position.y):(t=(e.width-n.width)/2,(e.height-n.height)/2),CKEDITOR.env.ie6Compat||(i.setStyle("position","absolute"),i.removeStyle("margin")),t=Math.floor(t),n=Math.floor(n),this.move(t,n))},foreach:function(e){for(var t in this._.contents)for(var n in this._.contents[t])e.call(this,this._.contents[t][n]);return this},reset:function(){return this.foreach(t),this},setupContent:function(){var t=arguments;this.foreach(function(e){e.setup&&e.setup.apply(e,t)})},commitContent:function(){var t=arguments;this.foreach(function(e){CKEDITOR.env.ie&&this._.currentFocusIndex==e.focusIndex&&e.getInputElement().$.blur(),e.commit&&e.commit.apply(e,t)})},hide:function(){if(this.parts.dialog.isVisible()){this.fire("hide",{}),this._.editor.fire("dialogHide",this),this.selectPage(this._.tabIdList[0]);var e,t,n=this._.element;for(n.setStyle("display","none"),this.parts.dialog.setStyle("visibility","hidden"),function(e){for(var t in _){for(var n=_[t],i=n.length-1;0<=i;i--)n[i].dialog!=e&&n[i].uiElement!=e||n.splice(i,1);0===n.length&&delete _[t]}}(this);CKEDITOR.dialog._.currentTop!=this;)CKEDITOR.dialog._.currentTop.hide();this._.parentDialog?(e=this._.parentDialog.getElement().getFirst(),this._.parentDialog.getElement().removeStyle("z-index"),e.setStyle("z-index",parseInt(e.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2))):c(this._.editor),(CKEDITOR.dialog._.currentTop=this._.parentDialog)?CKEDITOR.dialog._.currentZIndex-=10:(CKEDITOR.dialog._.currentZIndex=null,n.removeListener("keydown",d),n.removeListener("keyup",u),(t=this._.editor).focus(),setTimeout(function(){t.focusManager.unlock(),CKEDITOR.env.iOS&&t.window.focus()},0)),delete this._.parentDialog,this.foreach(function(e){e.resetInitValue&&e.resetInitValue()}),this.setState(CKEDITOR.DIALOG_STATE_IDLE)}},addPage:function(e){if(!e.requiredContent||this._.editor.filter.check(e.requiredContent)){for(var t=[],n=e.label?' title="'+CKEDITOR.tools.htmlEncode(e.label)+'"':"",i=CKEDITOR.dialog._.uiElementBuilders.vbox.build(this,{type:"vbox",className:"cke_dialog_page_contents",children:e.elements,expand:!!e.expand,padding:e.padding,style:e.style||"width: 100%;"},t),o=this._.contents[e.id]={},a=i.getChild(),r=0;i=a.shift();)i.notAllowed||"hbox"==i.type||"vbox"==i.type||r++,"function"==typeof(o[i.id]=i).getChild&&a.push.apply(a,i.getChild());r||(e.hidden=!0),(t=CKEDITOR.dom.element.createFromHtml(t.join(""))).setAttribute("role","tabpanel"),t.setStyle("min-height","100%"),i=CKEDITOR.env,o="cke_"+e.id+"_"+CKEDITOR.tools.getNextNumber(),n=CKEDITOR.dom.element.createFromHtml(['<a class="cke_dialog_tab"',0<this._.pageCount?" cke_last":"cke_first",n,e.hidden?' style="display:none"':"",' id="',o,'"',i.gecko&&!i.hc?"":' href="javascript:void(0)"',' tabIndex="-1" hidefocus="true" role="tab">',e.label,"</a>"].join("")),t.setAttribute("aria-labelledby",o),this._.tabs[e.id]=[n,t],this._.tabIdList.push(e.id),e.hidden||this._.pageCount++,this._.lastTab=n,this.updateStyle(),t.setAttribute("name",e.id),t.appendTo(this.parts.contents),n.unselectable(),this.parts.tabs.append(n),e.accessKey&&(E(this,this,"CTRL+"+e.accessKey,f,h),this._.accessKeyMap["CTRL+"+e.accessKey]=e.id)}},selectPage:function(e){if(this._.currentTabId!=e&&!this._.tabs[e][0].hasClass("cke_dialog_tab_disabled")&&!1!==this.fire("selectPage",{page:e,currentPage:this._.currentTabId})){for(var t in this._.tabs){var n=this._.tabs[t][0],i=this._.tabs[t][1];t!=e&&(n.removeClass("cke_dialog_tab_selected"),n.removeAttribute("aria-selected"),i.hide()),i.setAttribute("aria-hidden",t!=e)}var o=this._.tabs[e];o[0].addClass("cke_dialog_tab_selected"),o[0].setAttribute("aria-selected",!0),CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat?(a(o[1]),o[1].show(),setTimeout(function(){a(o[1],1)},0)):o[1].show(),this._.currentTabId=e,this._.currentTabIndex=CKEDITOR.tools.indexOf(this._.tabIdList,e)}},updateStyle:function(){this.parts.dialog[(1===this._.pageCount?"add":"remove")+"Class"]("cke_single_page")},hidePage:function(e){var t=this._.tabs[e]&&this._.tabs[e][0];t&&1!=this._.pageCount&&t.isVisible()&&(e==this._.currentTabId&&this.selectPage(U.call(this)),t.hide(),this._.pageCount--,this.updateStyle())},showPage:function(e){(e=this._.tabs[e]&&this._.tabs[e][0])&&(e.show(),this._.pageCount++,this.updateStyle())},getElement:function(){return this._.element},getName:function(){return this._.name},getContentElement:function(e,t){e=this._.contents[e];return e&&e[t]},getValueOf:function(e,t){return this.getContentElement(e,t).getValue()},setValueOf:function(e,t,n){return this.getContentElement(e,t).setValue(n)},getButton:function(e){return this._.buttons[e]},click:function(e){return this._.buttons[e].click()},disableButton:function(e){return this._.buttons[e].disable()},enableButton:function(e){return this._.buttons[e].enable()},getPageCount:function(){return this._.pageCount},getParentEditor:function(){return this._.editor},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement()},addFocusable:function(e,t){if(void 0===t)t=this._.focusList.length,this._.focusList.push(new i(this,e,t));else{this._.focusList.splice(t,0,new i(this,e,t));for(var n=t+1;n<this._.focusList.length;n++)this._.focusList[n].focusIndex++}},setState:function(e){var t,n;this.state!=e&&((this.state=e)==CKEDITOR.DIALOG_STATE_BUSY?(this.parts.spinner||((n={attributes:{class:"cke_dialog_spinner"},styles:{float:"rtl"==(t=this.getParentEditor().lang.dir)?"right":"left"}}).styles["margin-"+("rtl"==t?"left":"right")]="8px",this.parts.spinner=CKEDITOR.document.createElement("div",n),this.parts.spinner.setHtml("&#8987;"),this.parts.spinner.appendTo(this.parts.title,1)),this.parts.spinner.show(),this.getButton("ok").disable()):e==CKEDITOR.DIALOG_STATE_IDLE&&(this.parts.spinner&&this.parts.spinner.hide(),this.getButton("ok").enable()),this.fire("state",e))},getModel:function(e){return this._.model||(this.definition.getModel?this.definition.getModel(e):null)},setModel:function(e){this._.model=e},getMode:function(e){return this.definition.getMode?this.definition.getMode(e):!(e=this.getModel(e))||e instanceof CKEDITOR.dom.element&&!e.getParent()?CKEDITOR.dialog.CREATION_MODE:CKEDITOR.dialog.EDITING_MODE}},CKEDITOR.tools.extend(CKEDITOR.dialog,{CREATION_MODE:0,EDITING_MODE:1,add:function(e,t){this._.dialogDefinitions[e]&&"function"!=typeof t||(this._.dialogDefinitions[e]=t)},exists:function(e){return!!this._.dialogDefinitions[e]},getCurrent:function(){return CKEDITOR.dialog._.currentTop},isTabEnabled:function(e,t,n){return!((e=e.config.removeDialogTabs)&&e.match(new RegExp("(?:^|;)"+t+":"+n+"(?:$|;)","i")))},okButton:(o.type="button",o.override=function(t){return CKEDITOR.tools.extend(function(e){return o(e,t)},{type:"button"},!0)},o),cancelButton:(n.type="button",n.override=function(t){return CKEDITOR.tools.extend(function(e){return n(e,t)},{type:"button"},!0)},n),addUIElement:function(e,t){this._.uiElementBuilders[e]=t}}),CKEDITOR.dialog._={uiElementBuilders:{},dialogDefinitions:{},currentTop:null,currentZIndex:null},CKEDITOR.event.implementOn(CKEDITOR.dialog),CKEDITOR.event.implementOn(CKEDITOR.dialog.prototype);var G={resizable:CKEDITOR.DIALOG_RESIZE_BOTH,minWidth:600,minHeight:400,buttons:[CKEDITOR.dialog.okButton,CKEDITOR.dialog.cancelButton]},p=function(e,t,n){for(var i,o=0;i=e[o];o++)if(i.id==t||n&&i[n]&&(i=p(i[n],t,n)))return i;return null},T=function(e,t,n,i,o){if(n){for(var a,r=0;a=e[r];r++){if(a.id==n)return e.splice(r,0,t),t;if(i&&a[i]&&(a=T(a[i],t,n,i,!0)))return a}if(o)return null}return e.push(t),t},C=function(e,t,n){for(var i,o=0;i=e[o];o++){if(i.id==t)return e.splice(o,1);if(n&&i[n]&&(i=C(i[n],t,n)))return i}return null};z.prototype={getContents:function(e){return p(this.contents,e)},getButton:function(e){return p(this.buttons,e)},addContents:function(e,t){return T(this.contents,e,t)},addButton:function(e,t){return T(this.buttons,e,t)},removeContents:function(e){C(this.contents,e)},removeButton:function(e){C(this.buttons,e)}},r.prototype={get:function(e){return p(this.elements,e,"children")},add:function(e,t){return T(this.elements,e,t,"children")},remove:function(e){C(this.elements,e,"children")}};var I,O,D,R,v,b,y,K={},_={};CKEDITOR.ui.dialog={uiElement:function(n,i,e,t,o,a,r){if(!(arguments.length<4)){var s=(t.call?t(i):t)||"div",l=["<",s," "],c=(o&&o.call?o(i):o)||{},d=(a&&a.call?a(i):a)||{},u=(r&&r.call?r.call(this,n,i):r)||"",h=this.domId=d.id||CKEDITOR.tools.getNextId()+"_uiElement";i.requiredContent&&!n.getParentEditor().filter.check(i.requiredContent)&&(c.display="none",this.notAllowed=!0),d.id=h;var f={};i.type&&(f["cke_dialog_ui_"+i.type]=1),i.className&&(f[i.className]=1),i.disabled&&(f.cke_disabled=1);for(var g=d.class&&d.class.split?d.class.split(" "):[],h=0;h<g.length;h++)g[h]&&(f[g[h]]=1);for(h in g=[],f)g.push(h);for(h in d.class=g.join(" "),i.title&&(d.title=i.title),f=(i.style||"").split(";"),i.align&&(g=i.align,c["margin-left"]="left"==g?0:"auto",c["margin-right"]="right"==g?0:"auto"),c)f.push(h+":"+c[h]);for(i.hidden&&f.push("display:none"),h=f.length-1;0<=h;h--)""===f[h]&&f.splice(h,1);for(h in 0<f.length&&(d.style=(d.style?d.style+"; ":"")+f.join("; ")),d)l.push(h+'="'+CKEDITOR.tools.htmlEncode(d[h])+'" ');l.push(">",u,"</",s,">"),e.push(l.join("")),(this._||(this._={})).dialog=n,"boolean"==typeof i.isChanged&&(this.isChanged=function(){return i.isChanged}),"function"==typeof i.isChanged&&(this.isChanged=i.isChanged),"function"==typeof i.setValue&&(this.setValue=CKEDITOR.tools.override(this.setValue,function(t){return function(e){t.call(this,i.setValue.call(this,e))}})),"function"==typeof i.getValue&&(this.getValue=CKEDITOR.tools.override(this.getValue,function(e){return function(){return i.getValue.call(this,e.call(this))}})),CKEDITOR.event.implementOn(this),this.registerEvents(i),this.accessKeyUp&&this.accessKeyDown&&i.accessKey&&E(this,n,"CTRL+"+i.accessKey);var m=this;n.on("load",function(){var e,t=m.getInputElement();t&&(e=m.type in{checkbox:1,ratio:1}&&CKEDITOR.env.ie&&CKEDITOR.env.version<8?"cke_dialog_ui_focused":"",t.on("focus",function(){n._.tabBarMode=!1,n._.hasFocus=!0,m.fire("focus"),e&&this.addClass(e)}),t.on("blur",function(){m.fire("blur"),e&&this.removeClass(e)}))}),CKEDITOR.tools.extend(this,i),this.keyboardFocusable&&(this.tabIndex=i.tabIndex||0,this.focusIndex=n._.focusList.push(this)-1,this.on("focus",function(){n._.currentFocusIndex=m.focusIndex}))}},hbox:function(e,t,i,n,o){var a,r,s,l,c;arguments.length<4||(this._||(this._={}),a=this._.children=t,r=o&&o.widths||null,s=o&&o.height||null,c={role:"presentation"},o&&o.align&&(c.align=o.align),CKEDITOR.ui.dialog.uiElement.call(this,e,o||{type:"hbox"},n,"table",{},c,function(){var e=['<tbody><tr class="cke_dialog_ui_hbox">'];for(l=0;l<i.length;l++){var t="cke_dialog_ui_hbox_child",n=[];0===l&&(t="cke_dialog_ui_hbox_first"),l==i.length-1&&(t="cke_dialog_ui_hbox_last"),e.push('<td class="',t,'" role="presentation" '),r?r[l]&&n.push("width:"+g(r[l])):n.push("width:"+Math.floor(100/i.length)+"%"),s&&n.push("height:"+g(s)),o&&void 0!==o.padding&&n.push("padding:"+g(o.padding)),CKEDITOR.env.ie&&CKEDITOR.env.quirks&&a[l].align&&n.push("text-align:"+a[l].align),0<n.length&&e.push('style="'+n.join("; ")+'" '),e.push(">",i[l],"</td>")}return e.push("</tr></tbody>"),e.join("")}))},vbox:function(i,e,o,t,a){var r,s,l;arguments.length<3||(this._||(this._={}),r=this._.children=e,s=a&&a.width||null,l=a&&a.heights||null,CKEDITOR.ui.dialog.uiElement.call(this,i,a||{type:"vbox"},t,"div",null,{role:"presentation"},function(){var e=['<table role="presentation" cellspacing="0" border="0" '];e.push('style="'),a&&a.expand&&e.push("height:100%;"),e.push("width:"+g(s||"100%"),";"),CKEDITOR.env.webkit&&e.push("float:none;"),e.push('"'),e.push('align="',CKEDITOR.tools.htmlEncode(a&&a.align||("ltr"==i.getParentEditor().lang.dir?"left":"right")),'" '),e.push("><tbody>");for(var t=0;t<o.length;t++){var n=[];e.push('<tr><td role="presentation" '),s&&n.push("width:"+g(s||"100%")),l?n.push("height:"+g(l[t])):a&&a.expand&&n.push("height:"+Math.floor(100/o.length)+"%"),a&&void 0!==a.padding&&n.push("padding:"+g(a.padding)),CKEDITOR.env.ie&&CKEDITOR.env.quirks&&r[t].align&&n.push("text-align:"+r[t].align),0<n.length&&e.push('style="',n.join("; "),'" '),e.push(' class="cke_dialog_ui_vbox_child">',o[t],"</td></tr>")}return e.push("</tbody></table>"),e.join("")}))}},CKEDITOR.ui.dialog.uiElement.prototype={getElement:function(){return CKEDITOR.document.getById(this.domId)},getInputElement:function(){return this.getElement()},getDialog:function(){return this._.dialog},setValue:function(e,t){return this.getInputElement().setValue(e),t||this.fire("change",{value:e}),this},getValue:function(){return this.getInputElement().getValue()},isChanged:function(){return!1},selectParentTab:function(){for(var e=this.getInputElement();(e=e.getParent())&&-1==e.$.className.search("cke_dialog_page_contents"););return e&&(e=e.getAttribute("name"),this._.dialog._.currentTabId!=e&&this._.dialog.selectPage(e)),this},focus:function(){return this.selectParentTab().getInputElement().focus(),this},registerEvents:function(e){var t,n,i=/^on([A-Z]\w+)/;for(n in e)(t=n.match(i))&&(this.eventProcessors[n]?this.eventProcessors[n].call(this,this._.dialog,e[n]):function(e,t,n,i){t.on("load",function(){e.getInputElement().on(n,i,e)})}(this,this._.dialog,t[1].toLowerCase(),e[n]));return this},eventProcessors:{onLoad:function(e,t){e.on("load",t,this)},onShow:function(e,t){e.on("show",t,this)},onHide:function(e,t){e.on("hide",t,this)}},accessKeyDown:function(){this.focus()},accessKeyUp:function(){},disable:function(){var e=this.getElement();this.getInputElement().setAttribute("disabled","true"),e.addClass("cke_disabled")},enable:function(){var e=this.getElement();this.getInputElement().removeAttribute("disabled"),e.removeClass("cke_disabled")},isEnabled:function(){return!this.getElement().hasClass("cke_disabled")},isVisible:function(){return this.getInputElement().isVisible()},isFocusable:function(){return!(!this.isEnabled()||!this.isVisible())}},CKEDITOR.ui.dialog.hbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getChild:function(e){return arguments.length<1?this._.children.concat():(e=!e.splice?[e]:e).length<2?this._.children[e[0]]:this._.children[e[0]]&&this._.children[e[0]].getChild?this._.children[e[0]].getChild(e.slice(1,e.length)):null}},!0),CKEDITOR.ui.dialog.vbox.prototype=new CKEDITOR.ui.dialog.hbox,I={build:function(e,t,n){for(var i,o=t.children,a=[],r=[],s=0;s<o.length&&(i=o[s]);s++){var l=[];a.push(l),r.push(CKEDITOR.dialog._.uiElementBuilders[i.type].build(e,i,l))}return new CKEDITOR.ui.dialog[t.type](e,r,a,n,t)}},CKEDITOR.dialog.addUIElement("hbox",I),CKEDITOR.dialog.addUIElement("vbox",I),CKEDITOR.dialogCommand=function(e,t){this.dialogName=e,CKEDITOR.tools.extend(this,t,!0)},CKEDITOR.dialogCommand.prototype={exec:function(e){var t=this.tabId;e.openDialog(this.dialogName,function(e){t&&e.selectPage(t)})},canUndo:!1,editorFocus:1},O=/^([a]|[^a])+$/,D=/^\d*$/,R=/^\d*(?:\.\d+)?$/,v=/^(((\d*(\.\d+))|(\d*))(px|\%)?)?$/,b=/^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|\%)?)?$/i,y=/^(--|-?([a-zA-Z_]|\\))(\\|[a-zA-Z0-9-_])*\s*?:\s*?[^:;]+$/,CKEDITOR.VALIDATE_OR=1,CKEDITOR.VALIDATE_AND=2,CKEDITOR.dialog.validate={functions:function(){var r=arguments;return function(){for(var e,t=this&&this.getValue?this.getValue():r[0],n=CKEDITOR.VALIDATE_AND,i=[],o=0;o<r.length&&"function"==typeof r[o];o++)i.push(r[o]);o<r.length&&"string"==typeof r[o]&&(e=r[o],o++);var a=(n=o<r.length&&"number"==typeof r[o]?r[o]:n)==CKEDITOR.VALIDATE_AND;for(o=0;o<i.length;o++)a=n==CKEDITOR.VALIDATE_AND?a&&i[o](t):a||i[o](t);return!!a||e}},regex:function(t,n){return function(e){return e=this&&this.getValue?this.getValue():e,!!t.test(e)||n}},notEmpty:function(e){return this.regex(O,e)},integer:function(e){return this.regex(D,e)},number:function(e){return this.regex(R,e)},cssLength:function(e){return this.functions(function(e){return b.test(CKEDITOR.tools.trim(e))},e)},htmlLength:function(e){return this.functions(function(e){return v.test(CKEDITOR.tools.trim(e))},e)},inlineStyle:function(e){return this.functions(function(e){return""===(e=CKEDITOR.tools.trim(e).split(";"))[e.length-1]&&e.pop(),CKEDITOR.tools.array.every(e,function(e){return y.test(CKEDITOR.tools.trim(e))})},e)},equals:function(t,e){return this.functions(function(e){return e==t},e)},notEqual:function(t,e){return this.functions(function(e){return e!=t},e)}},CKEDITOR.on("instanceDestroyed",function(e){if(CKEDITOR.tools.isEmpty(CKEDITOR.instances)){for(var t,n;t=CKEDITOR.dialog._.currentTop;)t.hide();for(n in K)K[n].remove();K={}}for(var i in e=e.editor._.storedDialogs)e[i].destroy()}),CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{openDialog:function(e,t,n){var i=null,o=CKEDITOR.dialog._.dialogDefinitions[e];if(null===CKEDITOR.dialog._.currentTop&&l(this),"function"==typeof o)o=this._.storedDialogs||(this._.storedDialogs={}),(i=o[e]||(o[e]=new CKEDITOR.dialog(this,e))).setModel(n),t&&t.call(i,i),i.show();else{if("failed"==o)throw c(this),Error('[CKEDITOR.dialog.openDialog] Dialog "'+e+'" failed when loading definition.');"string"==typeof o&&CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(o),function(){"function"!=typeof CKEDITOR.dialog._.dialogDefinitions[e]&&(CKEDITOR.dialog._.dialogDefinitions[e]="failed"),this.openDialog(e,t,n)},this,0,1)}return CKEDITOR.skin.loadPart("dialog"),i&&i.once("hide",function(){i.setModel(null)},null,null,999),i}}),CKEDITOR.plugins.add("dialog",{requires:"dialogui",init:function(t){e||(CKEDITOR.document.appendStyleSheet(this.path+"styles/dialog.css"),e=!0),t.on("doubleclick",function(e){e.data.dialog&&t.openDialog(e.data.dialog)},null,null,999)}})}(),CKEDITOR.plugins.add("a11yhelp",{requires:"dialog",availableLangs:{af:1,ar:1,az:1,bg:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,en:1,"en-au":1,"en-gb":1,eo:1,es:1,"es-mx":1,et:1,eu:1,fa:1,fi:1,fo:1,fr:1,"fr-ca":1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,nb:1,nl:1,no:1,oc:1,pl:1,pt:1,"pt-br":1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,sr:1,"sr-latn":1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,zh:1,"zh-cn":1},init:function(t){var n=this;t.addCommand("a11yHelp",{exec:function(){var e=t.langCode,e=n.availableLangs[e]?e:n.availableLangs[e.replace(/-.*/,"")]?e.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(n.path+"dialogs/lang/"+e+".js"),function(){t.lang.a11yhelp=n.langEntries[e],t.openDialog("a11yHelp")})},modes:{wysiwyg:1,source:1},readOnly:1,canUndo:!1}),t.setKeystroke(CKEDITOR.ALT+48,"a11yHelp"),CKEDITOR.dialog.add("a11yHelp",this.path+"dialogs/a11yhelp.js"),t.on("ariaEditorHelpLabel",function(e){e.data.label=t.lang.common.editorHelp})}}),CKEDITOR.plugins.add("about",{requires:"dialog",init:function(e){var t=e.addCommand("about",new CKEDITOR.dialogCommand("about"));t.modes={wysiwyg:1,source:1},t.canUndo=!1,t.readOnly=1,e.ui.addButton&&e.ui.addButton("About",{label:e.lang.about.dlgTitle,command:"about",toolbar:"about"}),CKEDITOR.dialog.add("about",this.path+"dialogs/about.js")}}),CKEDITOR.plugins.add("basicstyles",{init:function(a){function e(e,t,n,i){var o;i&&(i=new CKEDITOR.style(i),(o=s[n]).unshift(i),a.attachStyleStateChange(i,function(e){a.readOnly||a.getCommand(n).setState(e)}),a.addCommand(n,new CKEDITOR.styleCommand(i,{contentForms:o})),a.ui.addButton&&a.ui.addButton(e,{label:t,command:n,toolbar:"basicstyles,"+(r+=10)}))}var r=0,s={bold:["strong","b",["span",function(e){return"bold"==(e=e.styles["font-weight"])||700<=+e}]],italic:["em","i",["span",function(e){return"italic"==e.styles["font-style"]}]],underline:["u",["span",function(e){return"underline"==e.styles["text-decoration"]}]],strike:["s","strike",["span",function(e){return"line-through"==e.styles["text-decoration"]}]],subscript:["sub"],superscript:["sup"]},t=a.config,n=a.lang.basicstyles;e("Bold",n.bold,"bold",t.coreStyles_bold),e("Italic",n.italic,"italic",t.coreStyles_italic),e("Underline",n.underline,"underline",t.coreStyles_underline),e("Strike",n.strike,"strike",t.coreStyles_strike),e("Subscript",n.subscript,"subscript",t.coreStyles_subscript),e("Superscript",n.superscript,"superscript",t.coreStyles_superscript),a.setKeystroke([[CKEDITOR.CTRL+66,"bold"],[CKEDITOR.CTRL+73,"italic"],[CKEDITOR.CTRL+85,"underline"]])}}),CKEDITOR.config.coreStyles_bold={element:"strong",overrides:"b"},CKEDITOR.config.coreStyles_italic={element:"em",overrides:"i"},CKEDITOR.config.coreStyles_underline={element:"u"},CKEDITOR.config.coreStyles_strike={element:"s",overrides:"strike"},CKEDITOR.config.coreStyles_subscript={element:"sub"},CKEDITOR.config.coreStyles_superscript={element:"sup"},K={exec:function(e){var t=e.getCommand("blockquote").state,n=e.getSelection(),i=n&&n.getRanges()[0];if(i){var o=n.createBookmarks();if(CKEDITOR.env.ie){var a=o[0].startNode,r=o[0].endNode;if(a&&"blockquote"==a.getParent().getName())for(s=a;s=s.getNext();)if(s.type==CKEDITOR.NODE_ELEMENT&&s.isBlockBoundary()){a.move(s,!0);break}if(r&&"blockquote"==r.getParent().getName())for(s=r;s=s.getPrevious();)if(s.type==CKEDITOR.NODE_ELEMENT&&s.isBlockBoundary()){r.move(s);break}}if((l=i.createIterator()).enlargeBr=e.config.enterMode!=CKEDITOR.ENTER_BR,t==CKEDITOR.TRISTATE_OFF){for(a=[];t=l.getNextParagraph();)a.push(t);for(a.length<1&&(t=e.document.createElement(e.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),r=o.shift(),i.insertNode(t),t.append(new CKEDITOR.dom.text("\ufeff",e.document)),i.moveToBookmark(r),i.selectNodeContents(t),i.collapse(!0),r=i.createBookmark(),a.push(t),o.unshift(r)),s=a[0].getParent(),i=[],r=0;r<a.length;r++)t=a[r],s=s.getCommonAncestor(t.getParent());for(t={table:1,tbody:1,tr:1,ol:1,ul:1};t[s.getName()];)s=s.getParent();for(r=null;0<a.length;){for(t=a.shift();!t.getParent().equals(s);)t=t.getParent();t.equals(r)||i.push(t),r=t}for(;0<i.length;)if("blockquote"==(t=i.shift()).getName()){for(r=new CKEDITOR.dom.documentFragment(e.document);t.getFirst();)r.append(t.getFirst().remove()),a.push(r.getLast());r.replace(t)}else a.push(t);for((i=e.document.createElement("blockquote")).insertBefore(a[0]);0<a.length;)t=a.shift(),i.append(t)}else if(t==CKEDITOR.TRISTATE_ON){for(r=[],s={};t=l.getNextParagraph();){for(a=i=null;t.getParent();){if("blockquote"==t.getParent().getName()){i=t.getParent(),a=t;break}t=t.getParent()}i&&a&&!a.getCustomData("blockquote_moveout")&&(r.push(a),CKEDITOR.dom.element.setMarker(s,a,"blockquote_moveout",!0))}for(CKEDITOR.dom.element.clearAllMarkers(s),t=[],a=[],s={};0<r.length;)i=(l=r.shift()).getParent(),l.getPrevious()?l.getNext()?(l.breakParent(l.getParent()),a.push(l.getNext())):l.remove().insertAfter(i):l.remove().insertBefore(i),i.getCustomData("blockquote_processed")||(a.push(i),CKEDITOR.dom.element.setMarker(s,i,"blockquote_processed",!0)),t.push(l);for(CKEDITOR.dom.element.clearAllMarkers(s),r=a.length-1;0<=r;r--){e:{for(var s,l=0,c=(s=i=a[r]).getChildCount(),d=void 0;l<c&&(d=s.getChild(l));l++)if(d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary()){s=!1;break e}s=!0}s&&i.remove()}if(e.config.enterMode==CKEDITOR.ENTER_BR)for(i=!0;t.length;)if("div"==(l=t.shift()).getName()){for(r=new CKEDITOR.dom.documentFragment(e.document),!i||!l.getPrevious()||l.getPrevious().type==CKEDITOR.NODE_ELEMENT&&l.getPrevious().isBlockBoundary()||r.append(e.document.createElement("br")),i=l.getNext()&&!(l.getNext().type==CKEDITOR.NODE_ELEMENT&&l.getNext().isBlockBoundary());l.getFirst();)l.getFirst().remove().appendTo(r);i&&r.append(e.document.createElement("br")),r.replace(l),i=!1}}n.selectBookmarks(o),e.focus()}},refresh:function(e,t){this.setState(e.elementPath(t.block||t.blockLimit).contains("blockquote",1)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)},context:"blockquote",allowedContent:"blockquote",requiredContent:"blockquote"},CKEDITOR.plugins.add("blockquote",{init:function(e){e.blockless||(e.addCommand("blockquote",K),e.ui.addButton&&e.ui.addButton("Blockquote",{label:e.lang.blockquote.toolbar,command:"blockquote",toolbar:"blocks,10"}))}}),CKEDITOR.plugins.add("notification",{init:function(a){a._.notificationArea=new jt(a),a.showNotification=function(e,t,n){var i,o;return"progress"==t?i=n:o=n,(e=new CKEDITOR.plugins.notification(a,{message:e,type:t,progress:i,duration:o})).show(),e},a.on("key",function(e){var t,n,i;27!=e.data.keyCode||(t=a._.notificationArea.notifications).length&&(n=a.lang.notification.closed,(i=new CKEDITOR.dom.element("div")).setStyles({position:"fixed","margin-left":"-9999px"}),i.setAttributes({"aria-live":"assertive","aria-atomic":"true"}),i.setText(n),CKEDITOR.document.getBody().append(i),setTimeout(function(){i.remove()},100),t[t.length-1].hide(),e.cancel())})}}),Wt.prototype={show:function(){!1!==this.editor.fire("notificationShow",{notification:this})&&(this.area.add(this),this._hideAfterTimeout())},update:function(e){var t=!0;!1===this.editor.fire("notificationUpdate",{notification:this,options:e})&&(t=!1);var n=this.element,i=n.findOne(".cke_notification_message"),o=n.findOne(".cke_notification_progress"),a=e.type;n.removeAttribute("role"),(a=e.progress&&"progress"!=this.type?"progress":a)&&(n.removeClass(this._getClass()),n.removeAttribute("aria-label"),this.type=a,n.addClass(this._getClass()),n.setAttribute("aria-label",this.type),"progress"!=this.type||o?"progress"!=this.type&&o&&o.remove():(o=this._createProgressElement()).insertBefore(i)),void 0!==e.message&&(this.message=e.message,i.setHtml(this.message)),void 0!==e.progress&&(this.progress=e.progress,o&&o.setStyle("width",this._getPercentageProgress())),t&&e.important&&(n.setAttribute("role","alert"),this.isVisible()||this.area.add(this)),this.duration=e.duration,this._hideAfterTimeout()},hide:function(){!1!==this.editor.fire("notificationHide",{notification:this})&&this.area.remove(this)},isVisible:function(){return 0<=CKEDITOR.tools.indexOf(this.area.notifications,this)},_createElement:function(){var e,t=this,n=this.editor.lang.common.close,i=new CKEDITOR.dom.element("div");return i.addClass("cke_notification"),i.addClass(this._getClass()),i.setAttributes({id:this.id,role:"alert","aria-label":this.type}),"progress"==this.type&&i.append(this._createProgressElement()),(e=new CKEDITOR.dom.element("p")).addClass("cke_notification_message"),e.setHtml(this.message),i.append(e),e=CKEDITOR.dom.element.createFromHtml('<a class="cke_notification_close" href="javascript:void(0)" title="'+n+'" role="button" tabindex="-1"><span class="cke_label">X</span></a>'),i.append(e),e.on("click",function(){t.editor.focus(),t.hide()}),i},_getClass:function(){return"progress"==this.type?"cke_notification_info":"cke_notification_"+this.type},_createProgressElement:function(){var e=new CKEDITOR.dom.element("span");return e.addClass("cke_notification_progress"),e.setStyle("width",this._getPercentageProgress()),e},_getPercentageProgress:function(){return Math.round(100*(this.progress||0))+"%"},_hideAfterTimeout:function(){var e,t=this;this._hideTimeoutId&&clearTimeout(this._hideTimeoutId),"number"==typeof this.duration?e=this.duration:"info"!=this.type&&"success"!=this.type||(e="number"==typeof this.editor.config.notification_duration?this.editor.config.notification_duration:5e3),e&&(t._hideTimeoutId=setTimeout(function(){t.hide()},e))}},jt.prototype={add:function(e){this.notifications.push(e),this.element.append(e.element),1==this.element.getChildCount()&&(CKEDITOR.document.getBody().append(this.element),this._attachListeners()),this._layout()},remove:function(e){var t=CKEDITOR.tools.indexOf(this.notifications,e);t<0||(this.notifications.splice(t,1),e.element.remove(),this.element.getChildCount()||(this._removeListeners(),this.element.remove()))},_createElement:function(){var e=this.editor,t=e.config,n=new CKEDITOR.dom.element("div");return n.addClass("cke_notifications_area"),n.setAttribute("id","cke_notifications_area_"+e.name),n.setStyle("z-index",t.baseFloatZIndex-2),n},_attachListeners:function(){var e=CKEDITOR.document.getWindow(),t=this.editor;e.on("scroll",this._uiBuffer.input),e.on("resize",this._uiBuffer.input),t.on("change",this._changeBuffer.input),t.on("floatingSpaceLayout",this._layout,this,null,20),t.on("blur",this._layout,this,null,20)},_removeListeners:function(){var e=CKEDITOR.document.getWindow(),t=this.editor;e.removeListener("scroll",this._uiBuffer.input),e.removeListener("resize",this._uiBuffer.input),t.removeListener("change",this._changeBuffer.input),t.removeListener("floatingSpaceLayout",this._layout),t.removeListener("blur",this._layout)},_layout:function(){function e(){i.setStyle("left",m(E+a.width-l-c))}var t,n,i=this.element,o=this.editor,a=o.ui.contentsElement.getClientRect(),r=o.ui.contentsElement.getDocumentPosition(),s=i.getClientRect(),l=this._notificationWidth,c=this._notificationMargin,d=CKEDITOR.document.getWindow(),u=d.getScrollPosition(),h=d.getViewPaneSize(),f=CKEDITOR.document.getBody(),g=f.getDocumentPosition(),m=CKEDITOR.tools.cssLength;l&&c||(d=this.element.getChild(0),l=this._notificationWidth=d.getClientRect().width,c=this._notificationMargin=parseInt(d.getComputedStyle("margin-left"),10)+parseInt(d.getComputedStyle("margin-right"),10)),o.toolbar&&(n=(t=o.ui.space(o.config.toolbarLocation)).getClientRect()),t&&t.isVisible()&&n.bottom>a.top&&n.bottom<a.bottom-s.height?i.setStyles({position:"fixed",top:m(n.bottom)}):0<a.top?i.setStyles({position:"absolute",top:m(r.y)}):r.y+a.height-s.height>u.y?i.setStyles({position:"fixed",top:0}):i.setStyles({position:"absolute",top:m(r.y+a.height-s.height)});var E="fixed"==i.getStyle("position")?a.left:"static"!=f.getComputedStyle("position")?r.x-g.x:r.x;a.width<l+c?r.x+l+c>u.x+h.width?e():i.setStyle("left",m(E)):r.x+l+c>u.x+h.width?i.setStyle("left",m(E)):r.x+a.width/2+l/2+c>u.x+h.width?i.setStyle("left",m(E-r.x+u.x+h.width-l-c)):a.left+a.width-l-c<0?e():a.left+a.width/2-l/2<0?i.setStyle("left",m(E-r.x+u.x)):i.setStyle("left",m(E+a.width/2-l/2-c/2))}},CKEDITOR.plugins.notification=Wt,function(){var e='<a id="{id}" class="cke_button cke_button__{name} cke_button_{state} {cls}"'+(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href=\"javascript:void('{titleJs}')\"")+' title="{title}" tabindex="-1" hidefocus="true" role="button" aria-labelledby="{id}_label" aria-describedby="{id}_description" aria-haspopup="{hasArrow}" aria-disabled="{ariaDisabled}"';CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(e+=' onkeypress="return false;"'),CKEDITOR.env.gecko&&(e+=' onblur="this.style.cssText = this.style.cssText;"');var t="",e=e+' onkeydown="return CKEDITOR.tools.callFunction({keydownFn},event);" onfocus="return CKEDITOR.tools.callFunction({focusFn},event);" onclick="'+(t=CKEDITOR.env.ie?'return false;" onmouseup="CKEDITOR.tools.getMouseButton(event)==CKEDITOR.MOUSE_BUTTON_LEFT&&':t)+'CKEDITOR.tools.callFunction({clickFn},this);return false;"><span class="cke_button_icon cke_button__{iconName}_icon" style="{style}">&nbsp;</span><span id="{id}_label" class="cke_button_label cke_button__{name}_label" aria-hidden="false">{label}</span><span id="{id}_description" class="cke_button_label" aria-hidden="false">{ariaShortcutSpace}{ariaShortcut}</span>{arrowHtml}</a>',T=CKEDITOR.addTemplate("buttonArrow",'<span class="cke_button_arrow">'+(CKEDITOR.env.hc?"&#9660;":"")+"</span>"),C=CKEDITOR.addTemplate("button",e);CKEDITOR.plugins.add("button",{beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_BUTTON,CKEDITOR.ui.button.handler)}}),CKEDITOR.UI_BUTTON="button",CKEDITOR.ui.button=function(t){CKEDITOR.tools.extend(this,t,{title:t.label,click:t.click||function(e){e.execCommand(t.command)}}),this._={}},CKEDITOR.ui.button.handler={create:function(e){return new CKEDITOR.ui.button(e)}},CKEDITOR.ui.button.prototype={render:function(i,e){function t(){var e=i.mode;e&&(e=this.modes[e]?void 0!==a[e]?a[e]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,e=i.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:e,this.setState(e),this.refresh&&this.refresh())}var n,o,a=null,r=CKEDITOR.env,s=this._.id=CKEDITOR.tools.getNextId(),l="",c=this.command;this._.editor=i;var d={id:s,button:this,editor:i,focus:function(){CKEDITOR.document.getById(s).focus()},execute:function(){this.button.click(i)},attach:function(e){this.button.attach(e)}},u=CKEDITOR.tools.addFunction(function(e){if(d.onkey)return e=new CKEDITOR.dom.event(e),!1!==d.onkey(d,e.getKeystroke())}),h=CKEDITOR.tools.addFunction(function(e){var t;return t=d.onfocus?!1!==d.onfocus(d,new CKEDITOR.dom.event(e)):t}),f=0;d.clickFn=n=CKEDITOR.tools.addFunction(function(){f&&(i.unlockSelection(1),f=0),d.execute(),r.iOS&&i.focus()}),this.modes?(a={},i.on("beforeModeUnload",function(){i.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(a[i.mode]=this._.state)},this),i.on("activeFilterChange",t,this),i.on("mode",t,this),this.readOnly||i.on("readOnly",t,this)):(c=c&&i.getCommand(c))&&(c.on("state",function(){this.setState(c.state)},this),l+=c.state==CKEDITOR.TRISTATE_ON?"on":c.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off"),this.directional&&i.on("contentDirChanged",function(e){var t=CKEDITOR.document.getById(this._.id),n=t.getFirst();(e=e.data)!=i.lang.dir?t.addClass("cke_"+e):t.removeClass("cke_ltr").removeClass("cke_rtl"),n.setAttribute("style",CKEDITOR.skin.getIconStyle(p,"rtl"==e,this.icon,this.iconOffset))},this),c?(g=i.getCommandKeystroke(c))&&(o=CKEDITOR.tools.keystrokeToString(i.lang.common.keyboard,g)):l+="off";var g=this.name||this.command,m=null,E=this.icon,p=g;return this.icon&&!/\./.test(this.icon)?(p=this.icon,E=null):(this.icon&&(m=this.icon),CKEDITOR.env.hidpi&&this.iconHiDpi&&(m=this.iconHiDpi)),m?(CKEDITOR.skin.addIcon(m,m),E=null):m=p,l={id:s,name:g,iconName:p,label:this.label,cls:(this.hasArrow?"cke_button_expandable ":"")+(this.className||""),state:l,ariaDisabled:"disabled"==l?"true":"false",title:this.title+(o?" ("+o.display+")":""),ariaShortcutSpace:o?"&nbsp;":"",ariaShortcut:o?i.lang.common.keyboardShortcut+" "+o.aria:"",titleJs:r.gecko&&!r.hc?"":(this.title||"").replace("'",""),hasArrow:"string"==typeof this.hasArrow&&this.hasArrow||(this.hasArrow?"true":"false"),keydownFn:u,focusFn:h,clickFn:n,style:CKEDITOR.skin.getIconStyle(m,"rtl"==i.lang.dir,E,this.iconOffset),arrowHtml:this.hasArrow?T.output():""},C.output(l,e),this.onRender&&this.onRender(),d},setState:function(e){if(this._.state==e)return!1;this._.state=e;var t=CKEDITOR.document.getById(this._.id);return!!t&&(t.setState(e,"cke_button"),t.setAttribute("aria-disabled",e==CKEDITOR.TRISTATE_DISABLED),this.hasArrow?t.setAttribute("aria-expanded",e==CKEDITOR.TRISTATE_ON):e===CKEDITOR.TRISTATE_ON?t.setAttribute("aria-pressed",!0):t.removeAttribute("aria-pressed"),!0)},getState:function(){return this._.state},toFeature:function(e){if(this._.feature)return this._.feature;var t=this;return this.allowedContent||this.requiredContent||!this.command||(t=e.getCommand(this.command)||t),this._.feature=t}},CKEDITOR.ui.prototype.addButton=function(e,t){this.add(e,CKEDITOR.UI_BUTTON,t)}}(),function(){function R(s){function l(e,t){if(t.length){e.items?e.items.push(s.ui.create("-")):e.items=[];for(var n;n=t.shift();)n="string"==typeof n?n:n.name,i&&-1!=CKEDITOR.tools.indexOf(i,n)||(n=s.ui.create(n))&&s.addFeature(n)&&e.items.push(n)}}var i=(i=s.config.removeButtons)&&i.split(","),e=s.config.toolbar;return"string"==typeof e&&(e=s.config["toolbar_"+e]),s.toolbar=e?function(e){for(var t,n,i=[],o=0;o<e.length;++o)n={},"/"==(t=e[o])?i.push(t):CKEDITOR.tools.isArray(t)?(l(n,CKEDITOR.tools.clone(t)),i.push(n)):t.items&&(l(n,CKEDITOR.tools.clone(t.items)),n.name=t.name,i.push(n));return i}(e):function(){for(var e=function(){var e,t,n,i={};for(e in s.ui.items)t=s.ui.items[e],n=t.toolbar||"others",n=n.split(","),t=n[0],n=parseInt(n[1]||-1,10),i[t]||(i[t]=[]),i[t].push({name:e,order:n});for(t in i)i[t]=i[t].sort(function(e,t){return e.order==t.order?0:t.order<0||!(e.order<0)&&e.order<t.order?-1:1});return i}(),t=CKEDITOR.tools.clone(s.config.toolbarGroups)||c(s),n=0;n<t.length;n++){var i=t[n];if("/"!=i){var o,a=(i="string"==typeof i?t[n]={name:i}:i).groups;if(a)for(var r=0;r<a.length;r++)(o=e[o=a[r]])&&l(i,o);(o=e[i.name])&&l(i,o)}}return t}()}function c(e){return e._.toolbarGroups||(e._.toolbarGroups=[{name:"document",groups:["mode","document","doctools"]},{name:"clipboard",groups:["clipboard","undo"]},{name:"editing",groups:["find","selection","spellchecker"]},{name:"forms"},"/",{name:"basicstyles",groups:["basicstyles","cleanup"]},{name:"paragraph",groups:["list","indent","blocks","align","bidi"]},{name:"links"},{name:"insert"},"/",{name:"styles"},{name:"colors"},{name:"tools"},{name:"others"},{name:"about"}])}function v(){this.toolbars=[],this.focusCommandExecuted=!1}v.prototype.focus=function(){for(var e,t=0;e=this.toolbars[t++];)for(var n,i=0;n=e.items[i++];)if(n.focus)return void n.focus()};var e={modes:{wysiwyg:1,source:1},readOnly:1,exec:function(e){e.toolbox&&(e.toolbox.focusCommandExecuted=!0,CKEDITOR.env.ie||CKEDITOR.env.air?setTimeout(function(){e.toolbox.focus()},100):e.toolbox.focus())}};CKEDITOR.plugins.add("toolbar",{requires:"button",init:function(O){var r,D=function(e,t){var n,i=(o="rtl"==O.lang.dir)?37:39,o=o?39:37,a=void 0===(a=O.config.toolbarGroupCycling)||a;switch(t){case 9:case CKEDITOR.SHIFT+9:for(;!n||!n.items.length;)if((n=9==t?(n||e.toolbar).next||O.toolbox.toolbars[0]:(n||e.toolbar).previous||O.toolbox.toolbars[O.toolbox.toolbars.length-1]).items.length)for(e=n.items[r?n.items.length-1:0];e&&!e.focus;)(e=r?e.previous:e.next)||(n=0);return e&&e.focus(),!1;case i:for(n=e;(n=!(n=n.next)&&a?e.toolbar.items[0]:n)&&!n.focus;);return n?n.focus():D(e,9),!1;case 40:return e.button&&e.button.hasArrow?e.execute():D(e,40==t?i:o),!1;case o:case 38:for(n=e;(n=!(n=n.previous)&&a?e.toolbar.items[e.toolbar.items.length-1]:n)&&!n.focus;);return n?n.focus():(r=1,D(e,CKEDITOR.SHIFT+9),r=0),!1;case 27:return O.focus(),!1;case 13:case 32:return e.execute(),!1}return!0};O.on("uiSpace",function(e){if(e.data.space==O.config.toolbarLocation){e.removeListener(),O.toolbox=new v;var t,n,i=['<span id="',o=CKEDITOR.tools.getNextId(),'" class="cke_voice_label">',O.lang.toolbar.toolbars,"</span>",'<span id="'+O.ui.spaceId("toolbox")+'" class="cke_toolbox" role="group" aria-labelledby="',o,'" onmousedown="return false;">'],o=!1!==O.config.toolbarStartupExpanded;O.config.toolbarCanCollapse&&O.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&i.push('<span class="cke_toolbox_main"'+(o?">":' style="display:none">'));for(var a,r=O.toolbox.toolbars,s=R(O),l=s.length,c=0;c<l;c++){var d,u,h=0,f=s[c],g="/"!==f&&("/"===s[c+1]||c==l-1);if(f)if(t&&(i.push("</span>"),n=t=0),"/"===f)i.push('<span class="cke_toolbar_break"></span>');else{for(var m=f.items||f,E=0;E<m.length;E++){var p,T,C,I=m[E];I&&(p=function(e){e=e.render(O,i),0<(T=h.items.push(e)-1)&&(e.previous=h.items[T-1],e.previous.next=e),e.toolbar=h,e.onkey=D,e.onfocus=function(){O.toolbox.focusCommandExecuted||O.focus()}},I.type==CKEDITOR.UI_SEPARATOR?n=t&&I:(C=!1!==I.canGroup,h||(d=CKEDITOR.tools.getNextId(),h={id:d,items:[]},u=f.name&&(O.lang.toolbar.toolbarGroups[f.name]||f.name),i.push('<span id="',d,'" class="cke_toolbar'+(g?' cke_toolbar_last"':'"'),u?' aria-labelledby="'+d+'_label"':"",' role="toolbar">'),u&&i.push('<span id="',d,'_label" class="cke_voice_label">',u,"</span>"),i.push('<span class="cke_toolbar_start"></span>'),0<(T=r.push(h)-1)&&(h.previous=r[T-1],h.previous.next=h)),C?t||(i.push('<span class="cke_toolgroup" role="presentation">'),t=1):t&&(i.push("</span>"),t=0),n&&(p(n),n=0),p(I)))}t&&(i.push("</span>"),n=t=0),h&&i.push('<span class="cke_toolbar_end"></span></span>')}}O.config.toolbarCanCollapse&&i.push("</span>"),O.config.toolbarCanCollapse&&O.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&(a=CKEDITOR.tools.addFunction(function(){O.execCommand("toolbarCollapse")}),O.on("destroy",function(){CKEDITOR.tools.removeFunction(a)}),O.addCommand("toolbarCollapse",{readOnly:1,exec:function(e){var t=e.ui.space("toolbar_collapser"),n=t.getPrevious(),i=e.ui.space("contents"),o=n.getParent(),a=parseInt(i.$.style.height,10),r=o.$.offsetHeight,s=t.hasClass("cke_toolbox_collapser_min");s?(n.show(),t.removeClass("cke_toolbox_collapser_min"),t.setAttribute("title",e.lang.toolbar.toolbarCollapse)):(n.hide(),t.addClass("cke_toolbox_collapser_min"),t.setAttribute("title",e.lang.toolbar.toolbarExpand)),t.getFirst().setText(s?"▲":"◀"),i.setStyle("height",a-(o.$.offsetHeight-r)+"px"),e.fire("resize",{outerHeight:e.container.$.offsetHeight,contentsHeight:i.$.offsetHeight,outerWidth:e.container.$.offsetWidth})},modes:{wysiwyg:1,source:1}}),O.setKeystroke(CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),"toolbarCollapse"),i.push('<a title="'+(o?O.lang.toolbar.toolbarCollapse:O.lang.toolbar.toolbarExpand)+'" id="'+O.ui.spaceId("toolbar_collapser")+'" tabIndex="-1" class="cke_toolbox_collapser'),o||i.push(" cke_toolbox_collapser_min"),i.push('" onclick="CKEDITOR.tools.callFunction('+a+')">','<span class="cke_arrow">&#9650;</span>',"</a>")),i.push("</span>"),e.data.html+=i.join("")}}),O.on("destroy",function(){if(this.toolbox)for(var e,t,n,i=0,o=this.toolbox.toolbars;i<o.length;i++)for(t=o[i].items,e=0;e<t.length;e++)(n=t[e]).clickFn&&CKEDITOR.tools.removeFunction(n.clickFn),n.keyDownFn&&CKEDITOR.tools.removeFunction(n.keyDownFn)}),O.on("uiReady",function(){var e=O.ui.space("toolbox");e&&O.focusManager.add(e,1)}),O.addCommand("toolbarFocus",e),O.setKeystroke(CKEDITOR.ALT+121,"toolbarFocus"),O.ui.add("-",CKEDITOR.UI_SEPARATOR,{}),O.ui.addHandler(CKEDITOR.UI_SEPARATOR,{create:function(){return{render:function(e,t){return t.push('<span class="cke_toolbar_separator" role="separator"></span>'),{}}}}})}}),CKEDITOR.ui.prototype.addToolbarGroup=function(e,t,n){var i=c(this.editor),o=0===t,a={name:e};if(n){if(n=CKEDITOR.tools.search(i,function(e){return e.name==n}))return n.groups||(n.groups=[]),t&&0<=(t=CKEDITOR.tools.indexOf(n.groups,t))?void n.groups.splice(t+1,0,e):void(o?n.groups.splice(0,0,e):n.groups.push(e));t=null}t=t&&CKEDITOR.tools.indexOf(i,function(e){return e.name==t}),o?i.splice(0,0,e):"number"==typeof t?i.splice(t+1,0,a):i.push(e)}}(),CKEDITOR.UI_SEPARATOR="separator",CKEDITOR.config.toolbarLocation="top",CKEDITOR.plugins.add("clipboard",{requires:"dialog,notification,toolbar",init:function(s){var e,o,a,l=qt(s);s.config.forcePasteAsPlainText?e="plain-text":s.config.pasteFilter?e=s.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in s.config||(e="semantic-content"),s.pasteFilter=l.get(e),$t(s),Vt(s),CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js")),CKEDITOR.env.gecko&&(o=["image/png","image/jpeg","image/gif"],s.on("paste",function(e){var t,n=e.data,i=n.dataTransfer;!n.dataValue&&"paste"==n.method&&function(e){if(e&&a!==e.id){var t=1===(t=e.getTypes()).length&&"Files"===t[0];return e=1===e.getFilesCount(),t&&e}}(i)&&(i=i.getFile(0),-1!=CKEDITOR.tools.indexOf(o,i.type))&&((t=new FileReader).addEventListener("load",function(){e.data.dataValue='<img src="'+t.result+'" />',s.fire("paste",e.data)},!1),t.addEventListener("abort",function(){s.fire("paste",e.data)},!1),t.addEventListener("error",function(){s.fire("paste",e.data)},!1),t.readAsDataURL(i),a=n.dataTransfer.id,e.stop())},null,null,1)),s.on("paste",function(e){var t,n;e.data.dataTransfer||(e.data.dataTransfer=new CKEDITOR.plugins.clipboard.dataTransfer),e.data.dataValue||((n=(t=e.data.dataTransfer).getData("text/html"))?(e.data.dataValue=n,e.data.type="html"):(n=t.getData("text/plain"))&&(e.data.dataValue=s.editable().transformPlainTextToHtml(n),e.data.type="text"))},null,null,1),s.on("paste",function(n){var e=n.data.dataValue,i=CKEDITOR.dtd.$block;if(-1<e.indexOf("Apple-")&&(e=e.replace(/<span class="Apple-converted-space">&nbsp;<\/span>/gi," "),-1<(e="html"!=n.data.type?e.replace(/<span class="Apple-tab-span"[^>]*>([^<]*)<\/span>/gi,function(e,t){return t.replace(/\t/g,"&nbsp;&nbsp; &nbsp;")}):e).indexOf('<br class="Apple-interchange-newline">')&&(n.data.startsWithEOL=1,n.data.preSniffing="html",e=e.replace(/<br class="Apple-interchange-newline">/,"")),e=e.replace(/(<[^>]+) class="Apple-[^"]*"/gi,"$1")),e.match(/^<[^<]+cke_(editable|contents)/i)){var t,o,a=new CKEDITOR.dom.element("div");for(a.setHtml(e);1==a.getChildCount()&&(t=a.getFirst())&&t.type==CKEDITOR.NODE_ELEMENT&&(t.hasClass("cke_editable")||t.hasClass("cke_contents"));)a=o=t;o&&(e=o.getHtml().replace(/<br>$/i,""))}CKEDITOR.env.ie?e=e.replace(/^&nbsp;(?: |\r\n)?<(\w+)/g,function(e,t){return t.toLowerCase()in i?(n.data.preSniffing="html","<"+t):e}):CKEDITOR.env.webkit?e=e.replace(/<\/(\w+)><div><br><\/div>$/,function(e,t){return t in i?(n.data.endsWithEOL=1,"</"+t+">"):e}):CKEDITOR.env.gecko&&(e=e.replace(/(\s)<br>$/,"$1")),n.data.dataValue=e},null,null,3),s.on("paste",function(e){e=e.data;var t=s._.nextPasteType||e.type,n=e.dataValue,i=s.config.clipboard_defaultContentType||"html",o=e.dataTransfer.getTransferType(s)==CKEDITOR.DATA_TRANSFER_EXTERNAL,a=!0===s.config.forcePasteAsPlainText,r="html"==t||"html"==e.preSniffing?"html":function(e){if(CKEDITOR.env.webkit){if(!e.match(/^[^<]*$/g)&&!e.match(/^(<div><br( ?\/)?><\/div>|<div>[^<]*<\/div>)*$/gi))return"html"}else if(CKEDITOR.env.ie){if(!e.match(/^([^<]|<br( ?\/)?>)*$/gi)&&!e.match(/^(<p>([^<]|<br( ?\/)?>)*<\/p>|(\r\n))*$/gi))return"html"}else{if(!CKEDITOR.env.gecko)return"html";if(!e.match(/^([^<]|<br( ?\/)?>)*$/gi))return"html"}return"htmlifiedtext"}(n);delete s._.nextPasteType,"htmlifiedtext"==r&&(n=Ht(s.config,n)),"text"==t&&"html"==r?n=Ut(s,n,l.get("plain-text")):(o&&s.pasteFilter&&!e.dontFilter||a)&&(n=Ut(s,n,s.pasteFilter)),e.startsWithEOL&&(n='<br data-cke-eol="1">'+n),e.endsWithEOL&&(n+='<br data-cke-eol="1">'),e.type=t="auto"==t?"html"==r||"html"==i?"html":"text":t,e.dataValue=n,delete e.preSniffing,delete e.startsWithEOL,delete e.endsWithEOL},null,null,6),s.on("paste",function(e){(e=e.data).dataValue&&(s.insertHtml(e.dataValue,e.type,e.range),setTimeout(function(){s.fire("afterPaste")},0))},null,null,1e3),s.on("pasteDialog",function(e){setTimeout(function(){s.openDialog("paste",e.data)},0)})}}),CKEDITOR.plugins.clipboard={isCustomCopyCutSupported:!(CKEDITOR.env.ie&&CKEDITOR.env.version<16||CKEDITOR.env.iOS&&CKEDITOR.env.version<605),isCustomDataTypesSupported:!CKEDITOR.env.ie||16<=CKEDITOR.env.version,isFileApiSupported:!CKEDITOR.env.ie||9<CKEDITOR.env.version,mainPasteEvent:CKEDITOR.env.ie&&!CKEDITOR.env.edge?"beforepaste":"paste",addPasteButton:function(e,t,n){e.ui.addButton&&(e.ui.addButton(t,n),e._.pasteButtons||(e._.pasteButtons=[]),e._.pasteButtons.push(t))},canClipboardApiBeTrusted:function(e,t){return!!(e.getTransferType(t)!=CKEDITOR.DATA_TRANSFER_EXTERNAL||CKEDITOR.env.chrome&&!e.isEmpty()||CKEDITOR.env.gecko&&(e.getData("text/html")||e.getFilesCount())||CKEDITOR.env.safari&&603<=CKEDITOR.env.version&&!CKEDITOR.env.iOS||CKEDITOR.env.iOS&&605<=CKEDITOR.env.version||CKEDITOR.env.edge&&16<=CKEDITOR.env.version)},getDropTarget:function(e){var t=e.editable();return CKEDITOR.env.ie&&CKEDITOR.env.version<9||t.isInline()?t:e.document},fixSplitNodesAfterDrop:function(e,o,t,n){function i(e,t,n){var i=e;return(i=e.type==CKEDITOR.NODE_TEXT?e.getParent():i).equals(t)&&n!=t.getChildCount()&&(e=o.startContainer.getChild(o.startOffset-1),t=o.startContainer.getChild(o.startOffset),e&&e.type==CKEDITOR.NODE_TEXT&&t&&t.type==CKEDITOR.NODE_TEXT&&(n=e.getLength(),e.setText(e.getText()+t.getText()),t.remove(),o.setStart(e,n),o.collapse(!0)),1)}var a=o.startContainer;"number"==typeof n&&"number"==typeof t&&a.type==CKEDITOR.NODE_ELEMENT&&(i(e.startContainer,a,t)||i(e.endContainer,a,n))},isDropRangeAffectedByDragRange:function(e,t){var n=t.startContainer,t=t.endOffset;return!!(e.endContainer.equals(n)&&e.endOffset<=t||e.startContainer.getParent().equals(n)&&e.startContainer.getIndex()<t||e.endContainer.getParent().equals(n)&&e.endContainer.getIndex()<t)},internalDrop:function(e,t,n,i){var o,a,r=CKEDITOR.plugins.clipboard,s=i.editable();i.fire("saveSnapshot"),i.fire("lockSnapshot",{dontUpdate:1}),CKEDITOR.env.ie&&CKEDITOR.env.version<10&&this.fixSplitNodesAfterDrop(e,t,r.dragStartContainerChildCount,r.dragEndContainerChildCount),(a=this.isDropRangeAffectedByDragRange(e,t))||(o=e.createBookmark(!1)),r=t.clone().createBookmark(!1),e=(o=a?e.createBookmark(!1):o).startNode,t=o.endNode,a=r.startNode,t&&e.getPosition(a)&CKEDITOR.POSITION_PRECEDING&&t.getPosition(a)&CKEDITOR.POSITION_FOLLOWING&&a.insertBefore(e),(e=i.createRange()).moveToBookmark(o),s.extractHtmlFromRange(e,1),t=i.createRange(),r.startNode.getCommonAncestor(s)||(r=i.getSelection().createBookmarks()[0]),t.moveToBookmark(r),Mt(i,{dataTransfer:n,method:"drop",range:t},1),i.fire("unlockSnapshot")},getRangeAtDropPosition:function(e,t){var n=e.data.$,i=n.clientX,o=n.clientY,a=t.getSelection(!0).getRanges()[0],r=t.createRange();if(e.data.testRange)return e.data.testRange;if(document.caretRangeFromPoint&&t.document.$.caretRangeFromPoint(i,o))n=t.document.$.caretRangeFromPoint(i,o),r.setStart(CKEDITOR.dom.node(n.startContainer),n.startOffset),r.collapse(!0);else if(n.rangeParent)r.setStart(CKEDITOR.dom.node(n.rangeParent),n.rangeOffset),r.collapse(!0);else{if(CKEDITOR.env.ie&&8<CKEDITOR.env.version&&a&&t.editable().hasFocus)return a;if(!document.body.createTextRange)return null;t.focus(),n=t.document.getBody().$.createTextRange();try{for(var s=!1,l=0;l<20&&!s;l++){if(!s)try{n.moveToPoint(i,o-l),s=!0}catch(e){}if(!s)try{n.moveToPoint(i,o+l),s=!0}catch(e){}}if(s){var c="cke-temp-"+(new Date).getTime();n.pasteHTML('<span id="'+c+'">​</span>');var d=t.document.getById(c);r.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START),d.remove()}else{var u=t.document.$.elementFromPoint(i,o),h=new CKEDITOR.dom.element(u);if(h.equals(t.editable())||"html"==h.getName())return a&&a.startContainer&&!a.startContainer.equals(t.editable())?a:null;i<h.getClientRect().left?r.setStartAt(h,CKEDITOR.POSITION_AFTER_START):r.setStartAt(h,CKEDITOR.POSITION_BEFORE_END),r.collapse(!0)}}catch(e){return null}}return r},initDragDataTransfer:function(e,t){var n=e.data.$?e.data.$.dataTransfer:null,t=new this.dataTransfer(n,t);"dragstart"===e.name&&t.storeId(),n?this.dragData&&t.id==this.dragData.id?t=this.dragData:this.dragData=t:this.dragData?t=this.dragData:this.dragData=t,e.data.dataTransfer=t},resetDragDataTransfer:function(){this.dragData=null},initPasteDataTransfer:function(e,t){if(this.isCustomCopyCutSupported){if(e&&e.data&&e.data.$){var n=e.data.$.clipboardData,i=new this.dataTransfer(n,t);return"copy"!==e.name&&"cut"!==e.name||i.storeId(),this.copyCutData&&i.id==this.copyCutData.id?(i=this.copyCutData).$=n:this.copyCutData=i,i}return new this.dataTransfer(null,t)}return new this.dataTransfer(CKEDITOR.env.edge&&e&&e.data.$&&e.data.$.clipboardData||null,t)},preventDefaultDropOnElement:function(e){e&&e.on("dragover",zt)}},y=CKEDITOR.plugins.clipboard.isCustomDataTypesSupported?"cke/id":"Text",CKEDITOR.plugins.clipboard.dataTransfer=function(e,t){e&&(this.$=e),this._={metaRegExp:/^<meta.*?>/i,bodyRegExp:/<body(?:[\s\S]*?)>([\s\S]*)<\/body>/i,fragmentRegExp:/\s*\x3c!--StartFragment--\x3e|\x3c!--EndFragment--\x3e\s*/g,data:{},files:[],nativeHtmlCache:"",normalizeType:function(e){return"text"==(e=e.toLowerCase())||"text/plain"==e?"Text":"url"==e?"URL":e}},this._.fallbackDataTransfer=new CKEDITOR.plugins.clipboard.fallbackDataTransfer(this),this.id=this.getData(y),this.id||(this.id="Text"==y?"":"cke-"+CKEDITOR.tools.getUniqueId()),t&&(this.sourceEditor=t,this.setData("text/html",t.getSelectedHtml(1)),"Text"==y||this.getData("text/plain")||this.setData("text/plain",t.getSelection().getSelectedText()))},CKEDITOR.DATA_TRANSFER_INTERNAL=1,CKEDITOR.DATA_TRANSFER_CROSS_EDITORS=2,CKEDITOR.DATA_TRANSFER_EXTERNAL=3,CKEDITOR.plugins.clipboard.dataTransfer.prototype={getData:function(e,t){var n="text/html"==(e=this._.normalizeType(e))&&t?this._.nativeHtmlCache:this._.data[e];if(null==n||""===n){if(this._.fallbackDataTransfer.isRequired())n=this._.fallbackDataTransfer.getData(e,t);else try{n=this.$.getData(e)||""}catch(e){n=""}"text/html"!=e||t||(n=this._stripHtml(n))}return n="string"==typeof(n="Text"==e&&CKEDITOR.env.gecko&&this.getFilesCount()&&"file://"==n.substring(0,7)?"":n)?-1!==(e=n.indexOf("</html>"))?n.substring(0,e+7):n:n},setData:function(e,t){if("text/html"==(e=this._.normalizeType(e))?(this._.data[e]=this._stripHtml(t),this._.nativeHtmlCache=t):this._.data[e]=t,CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"URL"==e||"Text"==e)if("Text"==y&&"Text"==e&&(this.id=t),this._.fallbackDataTransfer.isRequired())this._.fallbackDataTransfer.setData(e,t);else try{this.$.setData(e,t)}catch(e){}},storeId:function(){"Text"!=y&&this.setData(y,this.id)},getTransferType:function(e){return this.sourceEditor?this.sourceEditor==e?CKEDITOR.DATA_TRANSFER_INTERNAL:CKEDITOR.DATA_TRANSFER_CROSS_EDITORS:CKEDITOR.DATA_TRANSFER_EXTERNAL},cacheData:function(){function e(e){e=i._.normalizeType(e);var t=i.getData(e);"text/html"==e&&(i._.nativeHtmlCache=i.getData(e,!0),t=i._stripHtml(t)),t&&(i._.data[e]=t)}if(this.$){var t,n,i=this;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(t=0;t<this.$.types.length;t++)e(this.$.types[t])}else e("Text"),e("URL");if(n=this._getImageFromClipboard(),this.$&&this.$.files||n){if(this._.files=[],this.$.files&&this.$.files.length)for(t=0;t<this.$.files.length;t++)this._.files.push(this.$.files[t]);0===this._.files.length&&n&&this._.files.push(n)}}},getFilesCount:function(){return this._.files.length||(this.$&&this.$.files&&this.$.files.length?this.$.files.length:this._getImageFromClipboard()?1:0)},getFile:function(e){return this._.files.length?this._.files[e]:this.$&&this.$.files&&this.$.files.length?this.$.files[e]:0===e?this._getImageFromClipboard():void 0},isEmpty:function(){var e,t={};if(this.getFilesCount())return!1;if(CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(this._.data),function(e){t[e]=1}),this.$)if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(var n=0;n<this.$.types.length;n++)t[this.$.types[n]]=1}else t.Text=1,t.URL=1;for(e in"Text"!=y&&(t[y]=0),t)if(t[e]&&""!==this.getData(e))return!1;return!0},getTypes:function(){return this.$&&this.$.types?[].slice.call(this.$.types):[]},_getImageFromClipboard:function(){var e;try{if(this.$&&this.$.items&&this.$.items[0]&&(e=this.$.items[0].getAsFile())&&e.type)return e}catch(e){}},_stripHtml:function(e){var t;return e&&e.length&&(e=e.replace(this._.metaRegExp,""),(t=this._.bodyRegExp.exec(e))&&t.length&&(e=(e=t[1]).replace(this._.fragmentRegExp,""))),e}},CKEDITOR.plugins.clipboard.fallbackDataTransfer=function(e){this._dataTransfer=e,this._customDataFallbackType="text/html"},CKEDITOR.plugins.clipboard.fallbackDataTransfer._isCustomMimeTypeSupported=null,CKEDITOR.plugins.clipboard.fallbackDataTransfer._customTypes=[],CKEDITOR.plugins.clipboard.fallbackDataTransfer.prototype={isRequired:function(){var e=CKEDITOR.plugins.clipboard.fallbackDataTransfer,t=this._dataTransfer.$;if(null===e._isCustomMimeTypeSupported){if(!t)return!1;if(e._isCustomMimeTypeSupported=!1,CKEDITOR.env.edge&&17<=CKEDITOR.env.version)return!0;try{t.setData("cke/mimetypetest","cke test value"),e._isCustomMimeTypeSupported="cke test value"===t.getData("cke/mimetypetest"),t.clearData("cke/mimetypetest")}catch(e){}}return!e._isCustomMimeTypeSupported},getData:function(e,t){var n=this._getData(this._customDataFallbackType,!0);if(t)return n;n=this._extractDataComment(n),t=null;return null!==(t=e===this._customDataFallbackType?n.content:n.data&&n.data[e]?n.data[e]:this._getData(e,!0))?t:""},setData:function(t,n){var i=n=(a=t===this._customDataFallbackType)?this._applyDataComment(n,this._getFallbackTypeData()):n,o=this._dataTransfer.$;try{o.setData(t,i),a&&(this._dataTransfer._.nativeHtmlCache=i)}catch(e){if(this._isUnsupportedMimeTypeError(e)){a=CKEDITOR.plugins.clipboard.fallbackDataTransfer,-1===CKEDITOR.tools.indexOf(a._customTypes,t)&&a._customTypes.push(t);var a=this._getFallbackTypeContent(),n=this._getFallbackTypeData();n[t]=i;try{i=this._applyDataComment(a,n),o.setData(this._customDataFallbackType,i),this._dataTransfer._.nativeHtmlCache=i}catch(e){i=""}}}return i},_getData:function(e,t){var n=this._dataTransfer._.data;if(!t&&n[e])return n[e];try{return this._dataTransfer.$.getData(e)}catch(e){return null}},_getFallbackTypeContent:function(){return this._dataTransfer._.data[this._customDataFallbackType]||this._extractDataComment(this._getData(this._customDataFallbackType,!0)).content},_getFallbackTypeData:function(){var e=CKEDITOR.plugins.clipboard.fallbackDataTransfer._customTypes,t=this._extractDataComment(this._getData(this._customDataFallbackType,!0)).data||{},n=this._dataTransfer._.data;return CKEDITOR.tools.array.forEach(e,function(e){void 0!==n[e]?t[e]=n[e]:void 0!==t[e]&&(t[e]=t[e])},this),t},_isUnsupportedMimeTypeError:function(e){return e.message&&-1!==e.message.search(/element not found/gi)},_extractDataComment:function(e){var t,n={data:null,content:e||""};return e&&16<e.length&&(t=/\x3c!--cke-data:(.*?)--\x3e/g.exec(e))&&t[1]&&(n.data=JSON.parse(decodeURIComponent(t[1])),n.content=e.replace(t[0],"")),n},_applyDataComment:function(e,t){var n="";return(n=t&&CKEDITOR.tools.object.keys(t).length?"\x3c!--cke-data:"+encodeURIComponent(JSON.stringify(t))+"--\x3e":n)+(e&&e.length?e:"")}},CKEDITOR.config.clipboard_notificationDuration=1e4,function(){CKEDITOR.plugins.add("panel",{beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_PANEL,CKEDITOR.ui.panel.handler)}}),CKEDITOR.UI_PANEL="panel",CKEDITOR.ui.panel=function(e,t){t&&CKEDITOR.tools.extend(this,t),CKEDITOR.tools.extend(this,{className:"",css:[]}),this.id=CKEDITOR.tools.getNextId(),this.document=e,this.isFramed=this.forceIFrame||this.css.length,this._={blocks:{}}},CKEDITOR.ui.panel.handler={create:function(e){return new CKEDITOR.ui.panel(e)}};var o=CKEDITOR.addTemplate("panel",'<div lang="{langCode}" id="{id}" dir={dir} class="cke cke_reset_all {editorId} cke_panel cke_panel {cls} cke_{dir}" style="z-index:{z-index}" role="presentation">{frame}</div>'),a=CKEDITOR.addTemplate("panel-frame",'<iframe id="{id}" class="cke_panel_frame" role="presentation" frameborder="0" src="{src}"></iframe>'),r=CKEDITOR.addTemplate("panel-frame-inner",'<!DOCTYPE html><html class="cke_panel_container {env}" dir="{dir}" lang="{langCode}"><head>{css}</head><body class="cke_{dir}" style="margin:0;padding:0" onload="{onload}"></body></html>');CKEDITOR.ui.panel.prototype={render:function(e,t){var n,i={editorId:e.id,id:this.id,langCode:e.langCode,dir:e.lang.dir,cls:this.className,frame:"",env:CKEDITOR.env.cssClass,"z-index":e.config.baseFloatZIndex+1};return this.getHolderElement=function(){var e,t=this._.holder;return t||(this.isFramed?(e=(t=this.document.getById(this.id+"_frame")).getParent(),t=t.getFrameDocument(),CKEDITOR.env.iOS&&e.setStyles({overflow:"scroll","-webkit-overflow-scrolling":"touch"}),e=CKEDITOR.tools.addFunction(CKEDITOR.tools.bind(function(){this.isLoaded=!0,this.onLoad&&this.onLoad()},this)),t.write(r.output(CKEDITOR.tools.extend({css:CKEDITOR.tools.buildStyleHtml(this.css),onload:"window.parent.CKEDITOR.tools.callFunction("+e+");"},i))),t.getWindow().$.CKEDITOR=CKEDITOR,t.on("keydown",function(e){var t=e.data.getKeystroke(),n=this.document.getById(this.id).getAttribute("dir");("input"!==e.data.getTarget().getName()||37!==t&&39!==t)&&(this._.onKeyDown&&!1===this._.onKeyDown(t)?"input"===e.data.getTarget().getName()&&32===t||e.data.preventDefault():27!=t&&t!=("rtl"==n?39:37)||!this.onEscape||!1!==this.onEscape(t)||e.data.preventDefault())},this),(t=t.getBody()).unselectable(),CKEDITOR.env.air&&CKEDITOR.tools.callFunction(e)):t=this.document.getById(this.id),this._.holder=t),t},this.isFramed&&(n=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())":"",i.frame=a.output({id:this.id+"_frame",src:n})),n=o.output(i),t&&t.push(n),n},addBlock:function(e,t){return t=this._.blocks[e]=t instanceof CKEDITOR.ui.panel.block?t:new CKEDITOR.ui.panel.block(this.getHolderElement(),t),this._.currentBlock||this.showBlock(e),t},getBlock:function(e){return this._.blocks[e]},showBlock:function(e){e=this._.blocks[e];var t=this._.currentBlock,n=!this.forceIFrame||CKEDITOR.env.ie?this._.holder:this.document.getById(this.id+"_frame");return t&&t.hide(),this._.currentBlock=e,CKEDITOR.fire("ariaWidget",n),e._.focusIndex=-1,this._.onKeyDown=e.onKeyDown&&CKEDITOR.tools.bind(e.onKeyDown,e),e.show(),e},destroy:function(){this.element&&this.element.remove()}},CKEDITOR.ui.panel.block=CKEDITOR.tools.createClass({$:function(e,t){this.element=e.append(e.getDocument().createElement("div",{attributes:{tabindex:-1,class:"cke_panel_block"},styles:{display:"none"}})),t&&CKEDITOR.tools.extend(this,t),this.element.setAttributes({role:this.attributes.role||"presentation","aria-label":this.attributes["aria-label"],title:this.attributes.title||this.attributes["aria-label"]}),this.keys={},this._.focusIndex=-1,this.element.disableContextMenu()},_:{markItem:function(e){-1!=e&&(e=this._.getItems().getItem(this._.focusIndex=e),CKEDITOR.env.webkit&&e.getDocument().getWindow().focus(),e.focus(),this.onMark&&this.onMark(e))},markFirstDisplayed:function(e){function t(e){return e.type==CKEDITOR.NODE_ELEMENT&&"none"==e.getStyle("display")}for(var n,i,o=this._.getItems(),a=o.count()-1;0<=a;a--)if((n=o.getItem(a)).getAscendant(t)||(i=n,this._.focusIndex=a),"true"==n.getAttribute("aria-selected")){i=n,this._.focusIndex=a;break}i&&(e&&e(),CKEDITOR.env.webkit&&i.getDocument().getWindow().focus(),i.focus(),this.onMark&&this.onMark(i))},getItems:function(){return this.element.find("a,input")}},proto:{show:function(){this.element.setStyle("display","")},hide:function(){this.onHide&&!0===this.onHide.call(this)||this.element.setStyle("display","none")},onKeyDown:function(e,t){switch(o=this.keys[e]){case"next":for(var n,i=this._.focusIndex,o=this._.getItems();n=o.getItem(++i);)if(n.getAttribute("_cke_focus")&&n.$.offsetWidth){this._.focusIndex=i,n.focus(!0);break}return!n&&!t&&(this._.focusIndex=-1,this.onKeyDown(e,1));case"prev":for(i=this._.focusIndex,o=this._.getItems();0<i&&(n=o.getItem(--i));){if(n.getAttribute("_cke_focus")&&n.$.offsetWidth){this._.focusIndex=i,n.focus(!0);break}n=null}return!n&&!t&&(this._.focusIndex=o.count(),this.onKeyDown(e,1));case"click":case"mouseup":return(n=0<=(i=this._.focusIndex)&&this._.getItems().getItem(i))&&n.fireEventHandler(o,{button:CKEDITOR.tools.normalizeMouseButton(CKEDITOR.MOUSE_BUTTON_LEFT,!0)}),!1}return!0}}})}(),CKEDITOR.plugins.add("floatpanel",{requires:"panel"}),b={},CKEDITOR.ui.floatPanel=CKEDITOR.tools.createClass({$:function(e,t,n,i){function o(){l.hide()}n.forceIFrame=1;var a=(t=n.toolbarRelated&&e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?CKEDITOR.document.getById("cke_"+e.name):t).getDocument(),r=(i=function(e,t,n,i,o){o=CKEDITOR.tools.genKey(t.getUniqueId(),n.getUniqueId(),e.lang.dir,e.uiColor||"",i.css||"",o||"");var a=b[o];return a||((a=b[o]=new CKEDITOR.ui.panel(t,i)).element=n.append(CKEDITOR.dom.element.createFromHtml(a.render(e),t)),a.element.setStyles({display:"none",position:"absolute"})),a}(e,a,t,n,i||0)).element,s=r.getFirst(),l=this;r.disableContextMenu(),this.element=r,this._={editor:e,panel:i,parentElement:t,definition:n,document:a,iframe:s,children:[],dir:e.lang.dir,showBlockParams:null,markFirst:void 0===n.markFirst||n.markFirst},e.on("mode",o),e.on("resize",o),a.getWindow().on("resize",function(){this.reposition()},this)},proto:{addBlock:function(e,t){return this._.panel.addBlock(e,t)},addListBlock:function(e,t){return this._.panel.addListBlock(e,t)},getBlock:function(e){return this._.panel.getBlock(e)},showBlock:function(e,t,n,i,o,r){var s=this._.panel,l=s.showBlock(e);this._.showBlockParams=[].slice.call(arguments),this.allowBlur(!1);var a=this._.editor.editable();this._.returnFocus=a.hasFocus?a:new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement),this._.hideTimeout=0;var c=this.element,a=this._.iframe,a=CKEDITOR.env.ie&&!CKEDITOR.env.edge?a:new CKEDITOR.dom.window(a.$.contentWindow),d=c.getDocument(),u=this._.parentElement.getPositionedAncestor(),h=t.getDocumentPosition(d),d=u?u.getDocumentPosition(d):{x:0,y:0},f="rtl"==this._.dir,g=h.x+(i||0)-d.x,m=h.y+(o||0)-d.y;!f||1!=n&&4!=n?f||2!=n&&3!=n||(g+=t.$.offsetWidth-1):g+=t.$.offsetWidth,3!=n&&4!=n||(m+=t.$.offsetHeight-1),this._.panel._.offsetParentId=t.getId(),c.setStyles({top:m+"px",left:0,display:""}),c.setOpacity(0),c.getFirst().removeStyle("width"),this._.editor.focusManager.add(a),this._.blurSet||(CKEDITOR.event.useCapture=!0,a.on("blur",function(e){function t(){delete this._.returnFocus,this.hide()}this.allowBlur()&&e.data.getPhase()==CKEDITOR.EVENT_PHASE_AT_TARGET&&this.visible&&!this._.activeChild&&(CKEDITOR.env.iOS?this._.hideTimeout||(this._.hideTimeout=CKEDITOR.tools.setTimeout(t,0,this)):t.call(this))},this),a.on("focus",function(){this._.focused=!0,this.hideChild(),this.allowBlur(!0)},this),CKEDITOR.env.iOS&&(a.on("touchstart",function(){clearTimeout(this._.hideTimeout)},this),a.on("touchend",function(){this._.hideTimeout=0,this.focus()},this)),CKEDITOR.event.useCapture=!1,this._.blurSet=1),s.onEscape=CKEDITOR.tools.bind(function(e){if(this.onEscape&&!1===this.onEscape(e))return!1},this),CKEDITOR.tools.setTimeout(function(){var e=CKEDITOR.tools.bind(function(){(t=c).removeStyle("width"),l.autoSize?(e=l.element.getDocument(),e=(CKEDITOR.env.webkit||CKEDITOR.env.edge?l.element:e.getBody()).$.scrollWidth,CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<e&&(e+=(t.$.offsetWidth||0)-(t.$.clientWidth||0)+3),t.setStyle("width",e+10+"px"),e=l.element.$.scrollHeight,CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<e&&(e+=(t.$.offsetHeight||0)-(t.$.clientHeight||0)+3),t.setStyle("height",e+"px"),s._.currentBlock.element.setStyle("display","none").removeStyle("display")):t.removeStyle("height"),f&&(g-=c.$.offsetWidth),c.setStyle("left",g+"px");var e=s.element.getWindow(),t=c.$.getBoundingClientRect(),e=e.getViewPaneSize(),n=t.width||t.right-t.left,i=t.height||t.bottom-t.top,o=f?t.right:e.width-t.left,a=f?e.width-t.right:t.left;f?o<n&&(g=n<a?g+n:e.width>n?g-t.left:g-t.right+e.width):o<n&&(g=n<a?g-n:e.width>n?g-t.right+e.width:g-t.left),n=t.top,e.height-t.top<i&&(m=i<n?m-i:e.height>i?m-t.bottom+e.height:m-t.top),!CKEDITOR.env.ie||CKEDITOR.env.edge||(e=(e=t=c.$.offsetParent&&new CKEDITOR.dom.element(c.$.offsetParent))&&"html"==e.getName()?e.getDocument().getBody():e)&&"rtl"==e.getComputedStyle("direction")&&(g=CKEDITOR.env.ie8Compat?g-2*c.getDocument().getDocumentElement().$.scrollLeft:g-(t.$.scrollWidth-t.$.clientWidth)),(e=(t=c.getFirst()).getCustomData("activePanel"))&&e.onHide&&e.onHide.call(this,1),t.setCustomData("activePanel",this),c.setStyles({top:m+"px",left:g+"px"}),c.setOpacity(1),r&&r()},this);s.isLoaded?e():s.onLoad=e,CKEDITOR.tools.setTimeout(function(){var e=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus(),l.element.focus(),CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=e),this.allowBlur(!0),this._.markFirst&&(CKEDITOR.env.ie?CKEDITOR.tools.setTimeout(function(){(l.markFirstDisplayed?l:l._).markFirstDisplayed()},0):(l.markFirstDisplayed?l:l._).markFirstDisplayed()),this._.editor.fire("panelShow",this)},0,this)},CKEDITOR.env.air?200:0,this),this.visible=1,this.onShow&&this.onShow.call(this)},reposition:function(){var e=this._.showBlockParams;this.visible&&this._.showBlockParams&&(this.hide(),this.showBlock.apply(this,e))},focus:function(){var e;!CKEDITOR.env.webkit||(e=CKEDITOR.document.getActive())&&!e.equals(this._.iframe)&&e.$.blur(),(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var e=this._.iframe.getFrameDocument().getActive();e&&e.is("a")&&(this._.lastFocused=e)},hide:function(e){!this.visible||this.onHide&&!0===this.onHide.call(this)||(this.hideChild(),CKEDITOR.env.gecko&&this._.iframe.getFrameDocument().$.activeElement.blur(),this.element.setStyle("display","none"),this.visible=0,this.element.getFirst().removeCustomData("activePanel"),(e=e&&this._.returnFocus)&&(CKEDITOR.env.webkit&&e.type&&e.getWindow().$.focus(),e.focus()),delete this._.lastFocused,this._.showBlockParams=null,this._.editor.fire("panelHide",this))},allowBlur:function(e){var t=this._.panel;return void 0!==e&&(t.allowBlur=e),t.allowBlur},showAsChild:function(e,t,n,i,o,a){this._.activeChild==e&&e._.panel._.offsetParentId==n.getId()||(this.hideChild(),e.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=e,this._.focused=!1,e.showBlock(t,n,i,o,a),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){e.element.getChild(0).$.style.cssText+=""},100))},hideChild:function(e){var t=this._.activeChild;t&&(delete t.onHide,delete this._.activeChild,t.hide(),e&&this.focus())}}}),CKEDITOR.on("instanceDestroyed",function(){var e,t=CKEDITOR.tools.isEmpty(CKEDITOR.instances);for(e in b){var n=b[e];t?n.destroy():n.element.hide()}t&&(b={})}),CKEDITOR.plugins.add("menu",{requires:"floatpanel",beforeInit:function(e){for(var t=e.config.menu_groups.split(","),n=e._.menuGroups={},i=e._.menuItems={},o=0;o<t.length;o++)n[t[o]]=o+1;e.addMenuGroup=function(e,t){n[e]=t||100},e.addMenuItem=function(e,t){n[t.group]&&(i[e]=new CKEDITOR.menuItem(this,e,t))},e.addMenuItems=function(e){for(var t in e)this.addMenuItem(t,e[t])},e.getMenuItem=function(e){return i[e]},e.removeMenuItem=function(e){delete i[e]}}}),function(){var e='<span class="cke_menuitem"><a id="{id}" class="cke_menubutton cke_menubutton__{name} cke_menubutton_{state} {cls}" href="{href}" title="{title}" tabindex="-1" _cke_focus=1 hidefocus="true" role="{role}" aria-label="{attrLabel}" aria-describedby="{id}_description" aria-haspopup="{hasPopup}" aria-disabled="{disabled}" {ariaChecked} draggable="false"',t="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(e+=' onkeypress="return false;"'),CKEDITOR.env.gecko&&(e+=' onblur="this.style.cssText = this.style.cssText;" ondragstart="return false;"');var e=e+' onmouseover="CKEDITOR.tools.callFunction({hoverFn},{index});" onmouseout="CKEDITOR.tools.callFunction({moveOutFn},{index});" onclick="'+(t=CKEDITOR.env.ie?'return false;" onmouseup="CKEDITOR.tools.getMouseButton(event)===CKEDITOR.MOUSE_BUTTON_LEFT&&':t)+'CKEDITOR.tools.callFunction({clickFn},{index}); return false;"><span class="cke_menubutton_inner"><span class="cke_menubutton_icon"><span class="cke_button_icon cke_button__{iconName}_icon" style="{iconStyle}"></span></span><span class="cke_menubutton_label">{label}</span>{shortcutHtml}{arrowHtml}</span></a><span id="{id}_description" class="cke_voice_label" aria-hidden="false">{ariaShortcut}</span></span>',f=CKEDITOR.addTemplate("menuItem",e),g=CKEDITOR.addTemplate("menuArrow",'<span class="cke_menuarrow"><span>{label}</span></span>'),m=CKEDITOR.addTemplate("menuShortcut",'<span class="cke_menubutton_label cke_menubutton_shortcut">{shortcut}</span>');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(e,t){t=this._.definition=t||{},this.id=CKEDITOR.tools.getNextId(),this.editor=e,this.items=[],this._.listeners=[],this._.level=t.level||1;e=CKEDITOR.tools.extend({},t.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level-1,block:{}}),t=e.block.attributes=e.attributes||{};t.role||(t.role="menu"),this._.panelDefinition=e},_:{onShow:function(){var e=this.editor.getSelection(),t=e&&e.getStartElement(),n=this.editor.elementPath(),i=this._.listeners;this.removeAll();for(var o=0;o<i.length;o++){var a=i[o](t,e,n);if(a)for(var r in a){var s=this.editor.getMenuItem(r);!s||s.command&&!this.editor.getCommand(s.command).state||(s.state=a[r],this.add(s))}}},onClick:function(e){this.hide(),e.onClick?e.onClick():e.command&&this.editor.execCommand(e.command)},onEscape:function(e){var t=this.parent;return t?t._.panel.hideChild(1):27==e&&this.hide(1),!1},onHide:function(){this.onHide&&this.onHide()},showSubMenu:function(e){var t=this._.subMenu,n=this.items[e];if(n=n.getItems&&n.getItems()){for(var i in t?t.removeAll():((t=this._.subMenu=new CKEDITOR.menu(this.editor,CKEDITOR.tools.extend({},this._.definition,{level:this._.level+1},!0))).parent=this,t._.onClick=CKEDITOR.tools.bind(this._.onClick,this)),n){var o=this.editor.getMenuItem(i);o&&(o.state=n[i],t.add(o))}var a=this._.panel.getBlock(this.id).element.getDocument().getById(this.id+String(e));setTimeout(function(){t.show(a,2)},0)}else this._.panel.hideChild(1)}},proto:{add:function(e){e.order||(e.order=this.items.length),this.items.push(e)},removeAll:function(){this.items=[]},show:function(e,t,n,i){if(this.parent||(this._.onShow(),this.items.length)){t=t||("rtl"==this.editor.lang.dir?2:1);var o=this.items,a=this.editor,r=this._.panel,s=this._.element;r||((r=this._.panel=new CKEDITOR.ui.floatPanel(this.editor,CKEDITOR.document.getBody(),this._.panelDefinition,this._.level)).onEscape=CKEDITOR.tools.bind(function(e){if(!1===this._.onEscape(e))return!1},this),r.onShow=function(){r._.panel.getHolderElement().getParent().addClass("cke").addClass("cke_reset_all")},r.onHide=CKEDITOR.tools.bind(function(){this._.onHide&&this._.onHide()},this),(s=r.addBlock(this.id,this._.panelDefinition.block)).autoSize=!0,(l=s.keys)[40]="next",l[9]="next",l[38]="prev",l[CKEDITOR.SHIFT+9]="prev",l["rtl"==a.lang.dir?37:39]=CKEDITOR.env.ie?"mouseup":"click",l[32]=CKEDITOR.env.ie?"mouseup":"click",CKEDITOR.env.ie&&(l[13]="mouseup"),(l=(s=this._.element=s.element).getDocument()).getBody().setStyle("overflow","hidden"),l.getElementsByTag("html").getItem(0).setStyle("overflow","hidden"),this._.itemOverFn=CKEDITOR.tools.addFunction(function(e){clearTimeout(this._.showSubTimeout),this._.showSubTimeout=CKEDITOR.tools.setTimeout(this._.showSubMenu,a.config.menu_subMenuDelay||400,this,[e])},this),this._.itemOutFn=CKEDITOR.tools.addFunction(function(){clearTimeout(this._.showSubTimeout)},this),this._.itemClickFn=CKEDITOR.tools.addFunction(function(e){var t=this.items[e];t.state==CKEDITOR.TRISTATE_DISABLED?this.hide(1):t.getItems?this._.showSubMenu(e):this._.onClick(t)},this)),o.sort(function(e,t){return e.group<t.group?-1:e.group>t.group?1:e.order<t.order?-1:e.order>t.order?1:0});for(var l=['<div class="cke_menu'+((l=a.elementPath())&&l.direction()!=a.lang.dir?" cke_mixed_dir_content":"")+'" role="presentation">'],c=o.length,d=c&&o[0].group,u=0;u<c;u++){var h=o[u];d!=h.group&&(l.push('<div class="cke_menuseparator" role="separator"></div>'),d=h.group),h.render(this,u,l)}l.push("</div>"),s.setHtml(l.join("")),CKEDITOR.ui.fire("ready",this),this.parent?this.parent._.panel.showAsChild(r,this.id,e,t,n,i):r.showBlock(this.id,e,t,n,i),a.fire("menuShow",[r])}},addListener:function(e){this._.listeners.push(e)},hide:function(e){this._.onHide&&this._.onHide(),this._.panel&&this._.panel.hide(e)},findItemByCommandName:function(t){var e=CKEDITOR.tools.array.filter(this.items,function(e){return t===e.command});return e.length?{item:e=e[0],element:this._.element.findOne("."+e.className)}:null}}}),CKEDITOR.menuItem=CKEDITOR.tools.createClass({$:function(e,t,n){CKEDITOR.tools.extend(this,n,{order:0,className:"cke_menubutton__"+t}),this.group=e._.menuGroups[this.group],this.editor=e,this.name=t},proto:{render:function(e,t,n){var i,o,a=e.id+String(t),r=void 0===this.state?CKEDITOR.TRISTATE_OFF:this.state,s="",l=this.editor,c=r==CKEDITOR.TRISTATE_ON?"on":r==CKEDITOR.TRISTATE_DISABLED?"disabled":"off";this.role in{menuitemcheckbox:1,menuitemradio:1}&&(s=' aria-checked="'+(r==CKEDITOR.TRISTATE_ON?"true":"false")+'"');var d=this.getItems,u="&#"+("rtl"==this.editor.lang.dir?"9668":"9658")+";",h=this.name;this.icon&&!/\./.test(this.icon)&&(h=this.icon),this.command&&(i=l.getCommand(this.command),(i=l.getCommandKeystroke(i))&&(o=CKEDITOR.tools.keystrokeToString(l.lang.common.keyboard,i))),i=CKEDITOR.tools.htmlEncodeAttr(this.label),e={id:a,name:this.name,iconName:h,label:this.label,attrLabel:i,cls:this.className||"",state:c,hasPopup:d?"true":"false",disabled:r==CKEDITOR.TRISTATE_DISABLED,title:i+(o?" ("+o.display+")":""),ariaShortcut:o?l.lang.common.keyboardShortcut+" "+o.aria:"",href:"javascript:void('"+(i||"").replace("'")+"')",hoverFn:e._.itemOverFn,moveOutFn:e._.itemOutFn,clickFn:e._.itemClickFn,index:t,iconStyle:CKEDITOR.skin.getIconStyle(h,"rtl"==this.editor.lang.dir,h==this.icon?null:this.icon,this.iconOffset),shortcutHtml:o?m.output({shortcut:o.display}):"",arrowHtml:d?g.output({label:u}):"",role:this.role||"menuitem",ariaChecked:s},f.output(e,n)}}})}(),CKEDITOR.config.menu_groups="clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div",CKEDITOR.plugins.add("contextmenu",{requires:"menu",onLoad:function(){CKEDITOR.plugins.contextMenu=CKEDITOR.tools.createClass({base:CKEDITOR.menu,$:function(e){this.base.call(this,e,{panel:{css:e.config.contextmenu_contentsCss,className:"cke_menu_panel",attributes:{"aria-label":e.lang.contextmenu.options}}})},proto:{addTarget:function(e,r){function t(){l=!1}var s,l,n;e.on("contextmenu",function(e){e=e.data;var t,n,i,o,a=CKEDITOR.env.webkit?s:CKEDITOR.env.mac?e.$.metaKey:e.$.ctrlKey;r&&a||(e.preventDefault(),l||(CKEDITOR.env.mac&&CKEDITOR.env.webkit&&(a=this.editor,(n=new CKEDITOR.dom.elementPath(e.getTarget(),a.editable()).contains(function(e){return e.hasAttribute("contenteditable")},!0))&&"false"==n.getAttribute("contenteditable")&&a.getSelection().fake(n)),n=e.getTarget().getDocument(),t=e.getTarget().getDocument().getDocumentElement(),a=!n.equals(CKEDITOR.document),n=n.getWindow().getScrollPosition(),i=a?e.$.clientX:e.$.pageX||n.x+e.$.clientX,o=a?e.$.clientY:e.$.pageY||n.y+e.$.clientY,CKEDITOR.tools.setTimeout(function(){this.open(t,null,i,o)},CKEDITOR.env.ie?200:0,this)))},this),CKEDITOR.env.webkit&&(n=function(){s=0},e.on("keydown",function(e){s=CKEDITOR.env.mac?e.data.$.metaKey:e.data.$.ctrlKey}),e.on("keyup",n),e.on("contextmenu",n)),CKEDITOR.env.gecko&&!CKEDITOR.env.mac&&(e.on("keydown",function(e){e.data.$.shiftKey&&121===e.data.$.keyCode&&(l=!0)},null,null,0),e.on("keyup",t),e.on("contextmenu",t))},open:function(e,t,n,i){!1!==this.editor.config.enableContextMenu&&this.editor.getSelection().getType()!==CKEDITOR.SELECTION_NONE&&(this.editor.focus(),e=e||CKEDITOR.document.getDocumentElement(),this.editor.selectionChange(1),this.show(e,t,n,i))}}})},beforeInit:function(e){var t=e.contextMenu=new CKEDITOR.plugins.contextMenu(e);e.on("contentDom",function(){t.addTarget(e.editable(),!1!==e.config.browserContextMenuOnCtrl)}),e.addCommand("contextMenu",{exec:function(e){var t=0,n=0,i=e.getSelection().getRanges();(i=(i=i[i.length-1].getClientRects(e.editable().isInline()))[i.length-1])&&(t=i["rtl"===e.lang.dir?"left":"right"],n=i.bottom),e.contextMenu.open(e.document.getBody().getParent(),null,t,n)}}),e.setKeystroke(CKEDITOR.SHIFT+121,"contextMenu"),e.setKeystroke(CKEDITOR.CTRL+CKEDITOR.SHIFT+121,"contextMenu")}}),function(){var n={editorFocus:!1,readOnly:1,exec:function(e){(e=CKEDITOR.document.getById(e._.elementsPath.idBase+"0"))&&e.focus(CKEDITOR.env.ie||CKEDITOR.env.air)}},e="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(e+=' onkeypress="return false;"'),CKEDITOR.env.gecko&&(e+=' onblur="this.style.cssText = this.style.cssText;"');var C=CKEDITOR.addTemplate("pathItem",'<a id="{id}" href="{jsTitle}" tabindex="-1" class="cke_path_item" title="{label}"'+e+' hidefocus="true"  draggable="false"  ondragstart="return false;" onkeydown="return CKEDITOR.tools.callFunction({keyDownFn},{index}, event );" onclick="CKEDITOR.tools.callFunction({clickFn},{index}); return false;" role="button" aria-label="{label}">{text}</a>');CKEDITOR.plugins.add("elementspath",{init:function(t){t._.elementsPath={idBase:"cke_elementspath_"+CKEDITOR.tools.getNextNumber()+"_",filters:[]},t.on("uiSpace",function(e){"bottom"==e.data.space&&function(h,e){function o(e){var t;(e=m.list[e]).equals(h.editable())||"true"==e.getAttribute("contenteditable")?((t=h.createRange()).selectNodeContents(e),t=t.select()):(t=h.getSelection()).selectElement(e),CKEDITOR.env.ie&&h.fire("selectionChange",{selection:t,path:new CKEDITOR.dom.elementPath(e)}),h.focus()}function t(){f&&f.setHtml('<span class="cke_path_empty">&nbsp;</span>'),delete m.list}var f,g=h.ui.spaceId("path"),m=h._.elementsPath,E=m.idBase;e.html+='<span id="'+g+'_label" class="cke_voice_label">'+h.lang.elementspath.eleLabel+'</span><span id="'+g+'" class="cke_path" role="group" aria-labelledby="'+g+'_label"><span class="cke_path_empty">&nbsp;</span></span>',h.on("uiReady",function(){var e=h.ui.space("path");e&&h.focusManager.add(e,1)}),m.onClick=o;var p=CKEDITOR.tools.addFunction(o),T=CKEDITOR.tools.addFunction(function(e,t){var n,i=m.idBase;switch(t=new CKEDITOR.dom.event(t),n="rtl"==h.lang.dir,t.getKeystroke()){case n?39:37:case 9:return(n=!(n=CKEDITOR.document.getById(i+(e+1)))?CKEDITOR.document.getById(i+"0"):n).focus(),!1;case n?37:39:case CKEDITOR.SHIFT+9:return(n=!(n=CKEDITOR.document.getById(i+(e-1)))?CKEDITOR.document.getById(i+(m.list.length-1)):n).focus(),!1;case 27:return h.focus(),!1;case 13:case 32:return o(e),!1}return!0});h.on("selectionChange",function(e){for(var t=[],n=m.list=[],i=[],o=m.filters,a=!0,r=e.data.path.elements,s=r.length;s--;){var l=r[s],c=0;e=l.data("cke-display-name")?l.data("cke-display-name"):l.data("cke-real-element-type")?l.data("cke-real-element-type"):l.getName(),(a=l.hasAttribute("contenteditable")?"true"==l.getAttribute("contenteditable"):a)||l.hasAttribute("contenteditable")||(c=1);for(var d=0;d<o.length;d++){var u=o[d](l,e);if(!1===u){c=1;break}e=u||e}c||(n.unshift(l),i.unshift(e))}for(n=n.length,o=0;o<n;o++)e=i[o],a=h.lang.elementspath.eleTitle.replace(/%1/,e),e=C.output({id:E+o,label:a,text:e,jsTitle:"javascript:void('"+e+"')",index:o,keyDownFn:T,clickFn:p}),t.unshift(e);(i=f=f||CKEDITOR.document.getById(g)).setHtml(t.join("")+'<span class="cke_path_empty">&nbsp;</span>'),h.fire("elementsPathUpdate",{space:i})}),h.on("readOnly",t),h.on("contentDomUnload",t),h.addCommand("elementsPathFocus",n),h.setKeystroke(CKEDITOR.ALT+122,"elementsPathFocus")}(t,e.data)})}})}(),R=CKEDITOR.TRISTATE_DISABLED,v=CKEDITOR.TRISTATE_OFF,CKEDITOR.plugins.add("indent",{init:function(l){var e=CKEDITOR.plugins.indent.genericDefinition;Bt(l,l.addCommand("indent",new e(!0))),Bt(l,l.addCommand("outdent",new e)),l.ui.addButton&&(l.ui.addButton("Indent",{label:l.lang.indent.indent,command:"indent",directional:!0,toolbar:"indent,20"}),l.ui.addButton("Outdent",{label:l.lang.indent.outdent,command:"outdent",directional:!0,toolbar:"indent,10"})),l.on("dirChanged",function(e){var t=l.createRange(),n=e.data.node;t.setStartBefore(n),t.setEndAfter(n);for(var i,o=new CKEDITOR.dom.walker(t);i=o.next();)if(i.type==CKEDITOR.NODE_ELEMENT)if(!i.equals(n)&&i.getDirection())t.setStartAfter(i),o=new CKEDITOR.dom.walker(t);else{var a=l.config.indentClasses;if(a)for(var r="ltr"==e.data.dir?["_rtl",""]:["","_rtl"],s=0;s<a.length;s++)i.hasClass(a[s]+r[0])&&(i.removeClass(a[s]+r[0]),i.addClass(a[s]+r[1]));a=i.getStyle("margin-right"),r=i.getStyle("margin-left"),a?i.setStyle("margin-left",a):i.removeStyle("margin-left"),r?i.setStyle("margin-right",r):i.removeStyle("margin-right")}})}}),CKEDITOR.plugins.indent={genericDefinition:function(e){this.isIndent=!!e,this.startDisabled=!this.isIndent},specificDefinition:function(e,t,n){this.name=t,this.editor=e,this.jobs={},this.enterBr=e.config.enterMode==CKEDITOR.ENTER_BR,this.isIndent=!!n,this.relatedGlobal=n?"indent":"outdent",this.indentKey=n?9:CKEDITOR.SHIFT+9,this.database={}},registerCommands:function(e,t){e.on("pluginsLoaded",function(){for(var e in t)!function(t,n){var i,e=t.getCommand(n.relatedGlobal);for(i in n.jobs)e.on("exec",function(e){e.data.done||(t.fire("lockSnapshot"),n.execJob(t,i)&&(e.data.done=!0),t.fire("unlockSnapshot"),CKEDITOR.dom.element.clearAllMarkers(n.database))},this,null,i),e.on("refresh",function(e){e.data.states||(e.data.states={}),e.data.states[n.name+"@"+i]=n.refreshJob(t,i,e.data.path)},this,null,i);t.addFeature(n)}(this,t[e])})}},CKEDITOR.plugins.indent.genericDefinition.prototype={context:"p",exec:function(){}},CKEDITOR.plugins.indent.specificDefinition.prototype={execJob:function(e,t){t=this.jobs[t];if(t.state!=R)return t.exec.call(this,e)},refreshJob:function(e,t,n){return t=this.jobs[t],e.activeFilter.checkFeature(this)?t.state=t.refresh.call(this,e,n):t.state=R,t.state},getContext:function(e){return e.contains(this.context)}},p=CKEDITOR.dom.walker.whitespaces(!0),T=CKEDITOR.dom.walker.bookmark(!1,!0),C=CKEDITOR.TRISTATE_DISABLED,I=CKEDITOR.TRISTATE_OFF,CKEDITOR.plugins.add("indentlist",{requires:"indent",init:function(e){function t(i){n.specificDefinition.apply(this,arguments),this.requiredContent=["ul","ol"],i.on("key",function(e){var t,n=i.elementPath();"wysiwyg"==i.mode&&e.data.keyCode==this.indentKey&&n&&(!(t=this.getContext(n))||this.isIndent&&CKEDITOR.plugins.indentList.firstItemInPath(this.context,n,t)||(i.execCommand(this.relatedGlobal),e.cancel()))},this),this.jobs[this.isIndent?10:30]={refresh:this.isIndent?function(e,t){var n=this.getContext(t),t=CKEDITOR.plugins.indentList.firstItemInPath(this.context,t,n);return n&&this.isIndent&&!t?I:C}:function(e,t){return!this.getContext(t)||this.isIndent?C:I},exec:CKEDITOR.tools.bind(Lt,this)}}var n=CKEDITOR.plugins.indent;n.registerCommands(e,{indentlist:new t(e,"indentlist",!0),outdentlist:new t(e,"outdentlist")}),CKEDITOR.tools.extend(t.prototype,n.specificDefinition.prototype,{context:{ol:1,ul:1}})}}),CKEDITOR.plugins.indentList={},CKEDITOR.plugins.indentList.firstItemInPath=function(e,t,n){var i=t.contains(Ft);return(n=n||t.contains(e))&&i&&i.equals(n.getFirst(Ft))},function(){function m(e,t,n,i){for(var o=CKEDITOR.plugins.list.listToArray(t.root,n),a=[],r=0;r<t.contents.length;r++)(l=(l=t.contents[r]).getAscendant("li",!0))&&!l.getCustomData("list_item_processed")&&(a.push(l),CKEDITOR.dom.element.setMarker(n,l,"list_item_processed",!0));for(var s,l=t.root.getDocument(),r=0;r<a.length;r++){var c,d=a[r].getCustomData("listarray_index");(c=o[d].parent).is(this.type)||(s=l.createElement(this.type),c.copyAttributes(s,{start:1,type:1}),s.removeStyle("list-style-type"),o[d].parent=s)}for(var u,o=(n=CKEDITOR.plugins.list.arrayToList(o,n,null,e.config.enterMode)).listNode.getChildCount(),r=0;r<o&&(u=n.listNode.getChild(r));r++)u.getName()==this.type&&i.push(u);n.listNode.replace(t.root),e.fire("contentDomInvalidated")}function E(e,t,n){var i,o,a,r=t.contents,s=t.root.getDocument(),l=[];for(1==r.length&&r[0].equals(t.root)&&(i=s.createElement("div"),r[0].moveChildren&&r[0].moveChildren(i),r[0].append(i),r[0]=i),t=t.contents[0].getParent(),i=0;i<r.length;i++)t=t.getCommonAncestor(r[i].getParent());for(e=void 0===(e=e.config.useComputedState)||e,i=0;i<r.length;i++)for(var c,d=r[i];c=d.getParent();){if(c.equals(t)){l.push(d),!a&&d.getDirection()&&(a=1),d=d.getDirection(e),null!==o&&(o=o&&o!=d?null:d);break}d=c}if(!(l.length<1)){for(r=l[l.length-1].getNext(),i=s.createElement(this.type),n.push(i);l.length;)n=l.shift(),e=s.createElement("li"),(d=n).is("pre")||C.test(d.getName())||"false"==d.getAttribute("contenteditable")?n.appendTo(e):(n.copyAttributes(e),o&&n.getDirection()&&(e.removeStyle("direction"),e.removeAttribute("dir")),n.moveChildren(e),n.remove()),e.appendTo(i);o&&a&&i.setAttribute("dir",o),r?i.insertBefore(r):i.appendTo(t)}}function p(t,n,e){function i(e){!(l=d[e?"getFirst":"getLast"]())||l.is&&l.isBlockBoundary()||!(c=n.root[e?"getPrevious":"getNext"](CKEDITOR.dom.walker.invisible(!0)))||c.is&&c.isBlockBoundary({br:1})||t.document.createElement("br")[e?"insertBefore":"insertAfter"](l)}for(var o=CKEDITOR.plugins.list.listToArray(n.root,e),a=[],r=0;r<n.contents.length;r++){var s=n.contents[r];(s=s.getAscendant("li",!0))&&!s.getCustomData("list_item_processed")&&(a.push(s),CKEDITOR.dom.element.setMarker(e,s,"list_item_processed",!0))}for(s=null,r=0;r<a.length;r++)o[s=a[r].getCustomData("listarray_index")].indent=-1;for(r=s+1;r<o.length;r++)if(o[r].indent>o[r-1].indent+1){for(a=o[r-1].indent+1-o[r].indent,s=o[r].indent;o[r]&&o[r].indent>=s;)o[r].indent+=a,r++;r--}var l,c,d=CKEDITOR.plugins.list.arrayToList(o,e,null,t.config.enterMode,n.root.getAttribute("dir")).listNode;i(!0),i(),d.replace(n.root),t.fire("contentDomInvalidated")}function e(e,t){this.name=e,this.context=this.type=t,this.allowedContent=t+" li",this.requiredContent=t}function c(e,t,n,i){for(var o,a;o=e[i?"getLast":"getFirst"](r);)(a=o.getDirection(1))!==t.getDirection(1)&&o.setAttribute("dir",a),o.remove(),n?o[i?"insertBefore":"insertAfter"](n):t.append(o,i),n=o}function T(n){function e(e){var t=n[e?"getPrevious":"getNext"](y);t&&t.type==CKEDITOR.NODE_ELEMENT&&t.is(n.getName())&&(c(n,t,null,!e),n.remove(),n=t)}e(),e(1)}function u(e){return e.type==CKEDITOR.NODE_ELEMENT&&(e.getName()in CKEDITOR.dtd.$block||e.getName()in CKEDITOR.dtd.$listItem)&&CKEDITOR.dtd[e.getName()]["#"]}function h(e,t,n){e.fire("saveSnapshot"),n.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);var i=n.extractContents();t.trim(!1,!0);var o=t.createBookmark(),a=(r=new CKEDITOR.dom.elementPath(t.startContainer)).block,r=r.lastElement.getAscendant("li",1)||a,s=(l=new CKEDITOR.dom.elementPath(n.startContainer)).contains(CKEDITOR.dtd.$listItem),l=l.contains(CKEDITOR.dtd.$list);for(a?(a=a.getBogus())&&a.remove():l&&(a=l.getPrevious(y))&&g(a)&&a.remove(),(a=i.getLast())&&a.type==CKEDITOR.NODE_ELEMENT&&a.is("br")&&a.remove(),(a=t.startContainer.getChild(t.startOffset))?i.insertBefore(a):t.startContainer.append(i),s&&(i=f(s))&&(r.contains(s)?(c(i,s.getParent(),s),i.remove()):r.append(i));n.checkStartOfBlock()&&n.checkEndOfBlock()&&(i=(l=n.startPath()).block);)i.is("li")&&(r=i.getParent(),i.equals(r.getLast(y))&&i.equals(r.getFirst(y))&&(i=r)),n.moveToPosition(i,CKEDITOR.POSITION_BEFORE_START),i.remove();n=n.clone(),i=e.editable(),n.setEndAt(i,CKEDITOR.POSITION_BEFORE_END),(n=new CKEDITOR.dom.walker(n)).evaluator=function(e){return y(e)&&!g(e)},(n=n.next())&&n.type==CKEDITOR.NODE_ELEMENT&&n.getName()in CKEDITOR.dtd.$list&&T(n),t.moveToBookmark(o),t.select(),e.fire("saveSnapshot")}function f(e){return(e=e.getLast(y))&&e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in v?e:null}var v={ol:1,ul:1},t=CKEDITOR.dom.walker.whitespaces(),b=CKEDITOR.dom.walker.bookmark(),y=function(e){return!(t(e)||b(e))},g=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list={listToArray:function(e,t,n,i,o){if(!v[e.getName()])return[];i=i||0,n=n||[];for(var a=0,r=e.getChildCount();a<r;a++){var s=e.getChild(a);if(s.type==CKEDITOR.NODE_ELEMENT&&s.getName()in CKEDITOR.dtd.$list&&CKEDITOR.plugins.list.listToArray(s,t,n,i+1),"li"==s.$.nodeName.toLowerCase()){var l={parent:e,indent:i,element:s,contents:[]};o?l.grandparent=o:(l.grandparent=e.getParent(),l.grandparent&&"li"==l.grandparent.$.nodeName.toLowerCase()&&(l.grandparent=l.grandparent.getParent())),t&&CKEDITOR.dom.element.setMarker(t,s,"listarray_index",n.length),n.push(l);for(var c,d=0,u=s.getChildCount();d<u;d++)(c=s.getChild(d)).type==CKEDITOR.NODE_ELEMENT&&v[c.getName()]?CKEDITOR.plugins.list.listToArray(c,t,n,i+1,l.grandparent):l.contents.push(c)}}return n},arrayToList:function(e,t,n,i,o){if(n=n||0,!e||e.length<n+1)return null;for(var a,r=e[n].parent.getDocument(),s=new CKEDITOR.dom.documentFragment(r),l=null,c=n,d=Math.max(e[n].indent,0),u=null,h=i==CKEDITOR.ENTER_P?"p":"div";;){var f=e[c];if(R=f.grandparent,a=f.element.getDirection(1),f.indent==d){for(l&&e[c].parent.getName()==l.getName()||(l=e[c].parent.clone(!1,1),o&&l.setAttribute("dir",o),s.append(l)),u=l.append(f.element.clone(0,1)),a!=l.getDirection(1)&&u.setAttribute("dir",a),R=0;R<f.contents.length;R++)u.append(f.contents[R].clone(1,1));c++}else if(f.indent==Math.max(d,0)+1)f=e[c-1].element.getDirection(1),c=CKEDITOR.plugins.list.arrayToList(e,null,c,i,f!=a?a:null),!u.getChildCount()&&CKEDITOR.env.needsNbspFiller&&r.$.documentMode<=7&&u.append(r.createText(" ")),u.append(c.listNode),c=c.nextIndex;else{if(-1!=f.indent||n||!R)return null;v[R.getName()]?(u=f.element.clone(!1,!0),a!=R.getDirection(1)&&u.setAttribute("dir",a)):u=new CKEDITOR.dom.documentFragment(r);for(var g,m,E,p,l=R.getDirection(1)!=a,T=f.element,C=T.getAttribute("class"),I=T.getAttribute("style"),O=u.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(i!=CKEDITOR.ENTER_BR||l||I||C),D=f.contents.length,R=0;R<D;R++)g=f.contents[R],b(g)&&1<D?O?m=g.clone(1,1):u.append(g.clone(1,1)):g.type==CKEDITOR.NODE_ELEMENT&&g.isBlockBoundary()?(l&&!g.getDirection()&&g.setAttribute("dir",a),E=g,(p=T.getAttribute("style"))&&E.setAttribute("style",p.replace(/([^;])$/,"$1;")+(E.getAttribute("style")||"")),C&&g.addClass(C),E=null,m&&(u.append(m),m=null),u.append(g.clone(1,1))):O?(E||(E=r.createElement(h),u.append(E),l&&E.setAttribute("dir",a)),I&&E.setAttribute("style",I),C&&E.setAttribute("class",C),m&&(E.append(m),m=null),E.append(g.clone(1,1))):u.append(g.clone(1,1));m&&((E||u).append(m),m=null),u.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&c!=e.length-1&&(CKEDITOR.env.needsBrFiller&&(a=u.getLast())&&a.type==CKEDITOR.NODE_ELEMENT&&a.is("br")&&a.remove(),(a=u.getLast(y))&&a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$block)||u.append(r.createElement("br"))),"div"!=(a=u.$.nodeName.toLowerCase())&&"p"!=a||u.appendBogus(),s.append(u),l=null,c++}if(E=null,e.length<=c||Math.max(e[c].indent,0)<d)break}if(t)for(e=s.getFirst();e;){if(e.type==CKEDITOR.NODE_ELEMENT&&(CKEDITOR.dom.element.clearMarkers(t,e),e.getName()in CKEDITOR.dtd.$listItem&&(r=o=i=void 0,i=(n=e).getDirection()))){for(o=n.getParent();o&&!(r=o.getDirection());)o=o.getParent();i==r&&n.removeAttribute("dir")}e=e.getNextSourceNode()}return{listNode:s,nextIndex:c}}};var C=/^h[1-6]$/,r=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT);e.prototype={exec:function(e){function t(e){return v[e.root.getName()]&&(e=e.root,t=[CKEDITOR.NODE_COMMENT],!CKEDITOR.tools.array.filter(e.getChildren().toArray(),function(e){return-1===CKEDITOR.tools.array.indexOf(t,e.type)}).length);var t}this.refresh(e,e.elementPath());var n,i=e.config,o=e.getSelection(),a=o&&o.getRanges();this.state==CKEDITOR.TRISTATE_OFF&&((r=e.editable()).getFirst(y)?(i=(n=1==a.length&&a[0])&&n.getEnclosedNode())&&i.is&&this.type==i.getName()&&this.setState(CKEDITOR.TRISTATE_ON):(i.enterMode==CKEDITOR.ENTER_BR?r.appendBogus():a[0].fixBlock(1,i.enterMode==CKEDITOR.ENTER_P?"p":"div"),o.selectRanges(a)));for(var i=o.createBookmarks(!0),r=[],s={},a=a.createIterator(),l=0;(n=a.getNextRange())&&++l;){var c=n.getBoundaryNodes(),d=c.startNode,u=c.endNode;for(d.type==CKEDITOR.NODE_ELEMENT&&"td"==d.getName()&&n.setStartAt(c.startNode,CKEDITOR.POSITION_AFTER_START),u.type==CKEDITOR.NODE_ELEMENT&&"td"==u.getName()&&n.setEndAt(c.endNode,CKEDITOR.POSITION_BEFORE_END),(n=n.createIterator()).forceBrBreak=this.state==CKEDITOR.TRISTATE_OFF;c=n.getNextParagraph();)if(!c.getCustomData("list_block")&&!function(e){var t=!0;return 0!==e.getChildCount()&&(e.forEach(function(e){if(e.type!==CKEDITOR.NODE_COMMENT)return t=!1},null,!0),t)}(c)){CKEDITOR.dom.element.setMarker(s,c,"list_block",1);for(var h,d=(f=e.elementPath(c)).elements,u=0,f=f.blockLimit,g=d.length-1;0<=g&&(h=d[g]);g--)if(v[h.getName()]&&f.contains(h)){f.removeCustomData("list_group_object_"+l),(d=h.getCustomData("list_group_object"))?d.contents.push(c):(r.push(d={root:h,contents:[c]}),CKEDITOR.dom.element.setMarker(s,h,"list_group_object",d)),u=1;break}u||((u=f).getCustomData("list_group_object_"+l)?u.getCustomData("list_group_object_"+l).contents.push(c):(d={root:u,contents:[c]},CKEDITOR.dom.element.setMarker(s,u,"list_group_object_"+l,d),r.push(d)))}}for(h=[];0<r.length;)d=r.shift(),this.state==CKEDITOR.TRISTATE_OFF?t(d)||(v[d.root.getName()]?m.call(this,e,d,s,h):E.call(this,e,d,h)):this.state==CKEDITOR.TRISTATE_ON&&v[d.root.getName()]&&!t(d)&&p.call(this,e,d,s);for(g=0;g<h.length;g++)T(h[g]);CKEDITOR.dom.element.clearAllMarkers(s),o.selectBookmarks(i),e.focus()},refresh:function(e,t){var n=t.contains(v,1),t=t.blockLimit||t.root;n&&t.contains(n)?this.setState(n.is(this.type)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_OFF)}},CKEDITOR.plugins.add("list",{requires:"indentlist",init:function(d){d.blockless||(d.addCommand("numberedlist",new e("numberedlist","ol")),d.addCommand("bulletedlist",new e("bulletedlist","ul")),d.ui.addButton&&(d.ui.addButton("NumberedList",{label:d.lang.list.numberedlist,command:"numberedlist",directional:!0,toolbar:"list,10"}),d.ui.addButton("BulletedList",{label:d.lang.list.bulletedlist,command:"bulletedlist",directional:!0,toolbar:"list,20"})),d.on("key",function(e){var t,n=e.data.domEvent.getKey();if("wysiwyg"==d.mode&&n in{8:1,46:1}){var i=d.getSelection().getRanges()[0],o=i&&i.startPath();if(i&&i.collapsed){var a,r,s=8==n,l=d.editable(),c=new CKEDITOR.dom.walker(i.clone());if(c.evaluator=function(e){return y(e)&&!g(e)},c.guard=function(e,t){return!(t&&e.type==CKEDITOR.NODE_ELEMENT&&e.is("table"))},n=i.clone(),s)(a=o.contains(v))&&i.checkBoundaryOfElement(a,CKEDITOR.START)&&(a=a.getParent())&&a.is("li")&&(a=f(a))?(a=(t=a).getPrevious(y),n.moveToPosition(a&&g(a)?a:t,CKEDITOR.POSITION_BEFORE_START)):(c.range.setStartAt(l,CKEDITOR.POSITION_AFTER_START),c.range.setEnd(i.startContainer,i.startOffset),(a=c.previous())&&a.type==CKEDITOR.NODE_ELEMENT&&(a.getName()in v||a.is("li"))&&(a.is("li")||(c.range.selectNodeContents(a),c.reset(),c.evaluator=u,a=c.previous()),n.moveToElementEditEnd(t=a),n.moveToPosition(n.endPath().block,CKEDITOR.POSITION_BEFORE_END))),t?(h(d,n,i),e.cancel()):(r=o.contains(v))&&i.checkBoundaryOfElement(r,CKEDITOR.START)&&(t=r.getFirst(y),i.checkBoundaryOfElement(t,CKEDITOR.START)&&(a=r.getPrevious(y),f(t)?a&&(i.moveToElementEditEnd(a),i.select()):d.execCommand("outdent"),e.cancel()));else if(t=o.contains("li")){if(c.range.setEndAt(l,CKEDITOR.POSITION_BEFORE_END),s=(l=t.getLast(y))&&u(l)?l:t,o=0,(a=c.next())&&a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in v&&a.equals(l)?(o=1,a=c.next()):i.checkBoundaryOfElement(s,CKEDITOR.END)&&(o=2),o&&a){if((i=i.clone()).moveToElementEditStart(a),1==o&&(n.optimize(),!n.startContainer.equals(t))){for(t=n.startContainer;t.is(CKEDITOR.dtd.$inline);)t=(r=t).getParent();r&&n.moveToPosition(r,CKEDITOR.POSITION_AFTER_END)}2==o&&(n.moveToPosition(n.endPath().block,CKEDITOR.POSITION_BEFORE_END),i.endPath().block&&i.moveToPosition(i.endPath().block,CKEDITOR.POSITION_AFTER_START)),h(d,n,i),e.cancel()}}else c.range.setEndAt(l,CKEDITOR.POSITION_BEFORE_END),(a=c.next())&&a.type==CKEDITOR.NODE_ELEMENT&&a.is(v)&&(a=a.getFirst(y),o.block&&i.checkStartOfBlock()&&i.checkEndOfBlock()?(o.block.remove(),i.moveToElementEditStart(a),i.select()):f(a)?(i.moveToElementEditStart(a),i.select()):((i=i.clone()).moveToElementEditStart(a),h(d,n,i)),e.cancel());setTimeout(function(){d.selectionChange(1)})}}}))}})}(),function(){function t(e,t,n){var i;n=e.config.forceEnterMode||n,"wysiwyg"==e.mode&&(t=t||e.activeEnterMode,(i=e.elementPath())&&!i.isContextFor("p")&&(t=CKEDITOR.ENTER_BR,n=1),e.fire("saveSnapshot"),(t==CKEDITOR.ENTER_BR?T:c)(e,t,null,n),e.fire("saveSnapshot"))}function p(e){for(var t=(e=e.getSelection().getRanges(!0)).length-1;0<t;t--)e[t].deleteContents();return e[0]}CKEDITOR.plugins.add("enterkey",{init:function(e){e.addCommand("enter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(e){t(e)}}),e.addCommand("shiftEnter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(e){t(e,e.activeShiftEnterMode,1)}}),e.setKeystroke([[13,"enter"],[CKEDITOR.SHIFT+13,"shiftEnter"]])}});var e,T,c,C,I=CKEDITOR.dom.walker.whitespaces(),O=CKEDITOR.dom.walker.bookmark();CKEDITOR.plugins.enterkey={enterBlock:function(e,t,n,i){if(n=n||p(e)){g=(s=n).startContainer.getAscendant(function(e){return e.type==CKEDITOR.NODE_ELEMENT&&"true"==e.getAttribute("contenteditable")},!0);var o,a=(n=s.root.equals(g)?s:((g=new CKEDITOR.dom.range(g)).moveToRange(s),g)).document,r=n.checkStartOfBlock(),s=n.checkEndOfBlock(),l=e.elementPath(n.startContainer),c=l.block,d=t==CKEDITOR.ENTER_DIV?"div":"p";if(c&&r&&s){if((r=c.getParent()).is("li")&&1<r.getChildCount())return a=new CKEDITOR.dom.element("li"),o=e.createRange(),a.insertAfter(r),c.remove(),o.setStart(a,0),void e.getSelection().selectRanges([o]);if(c.is("li")||c.getParent().is("li")){o=(r=!c.is("li")?(c=c.getParent()).getParent():r).getParent(),n=!c.hasPrevious();var u=!c.hasNext(),d=(i=e.getSelection()).createBookmarks(),h=c.getDirection(1),s=c.getAttribute("class"),f=c.getAttribute("style"),g=o.getDirection(1)!=h;if(e=e.enterMode!=CKEDITOR.ENTER_BR||g||f||s,o.is("li"))n||u?(n&&u&&r.remove(),c[u?"insertAfter":"insertBefore"](o)):c.breakParent(o);else{if(e)l.block.is("li")?(o=a.createElement(t==CKEDITOR.ENTER_P?"p":"div"),g&&o.setAttribute("dir",h),f&&o.setAttribute("style",f),s&&o.setAttribute("class",s),c.moveChildren(o)):o=l.block,n||u?o[n?"insertBefore":"insertAfter"](r):(c.breakParent(r),o.insertAfter(r));else if(c.appendBogus(!0),n||u)for(;a=c[n?"getFirst":"getLast"]();)a[n?"insertBefore":"insertAfter"](r);else for(c.breakParent(r);a=c.getLast();)a.insertAfter(r);c.remove()}return void i.selectBookmarks(d)}if(c&&c.getParent().is("blockquote"))return c.breakParent(c.getParent()),c.getPrevious().getFirst(CKEDITOR.dom.walker.invisible(1))||c.getPrevious().remove(),c.getNext().getFirst(CKEDITOR.dom.walker.invisible(1))||c.getNext().remove(),n.moveToElementEditStart(c),void n.select()}else if(c&&c.is("pre")&&!s)return void T(e,t,n,i);if(f=n.splitBlock(d)){if(e=f.previousBlock,c=f.nextBlock,r=f.wasStartOfBlock,s=f.wasEndOfBlock,c?(u=c.getParent()).is("li")&&(c.breakParent(u),c.move(c.getNext(),1)):e&&(u=e.getParent())&&u.is("li")&&(e.breakParent(u),u=e.getNext(),n.moveToElementEditStart(u),e.move(e.getPrevious())),r||s)if((m=t)===CKEDITOR.ENTER_BR||-1===CKEDITOR.tools.indexOf(["td","th"],l.lastElement.getName())||1!==l.lastElement.getChildCount()||((E=(m=l.lastElement.getChild(0).clone(!0)).getBogus())&&E.remove(),m.getText().length)){if(e?!e.is("li")&&(C.test(e.getName())||e.is("pre"))||(o=e.clone()):c&&(o=c.clone()),o?i&&!o.is("li")&&o.renameNode(d):u&&u.is("li")?o=u:(o=a.createElement(d),e&&(h=e.getDirection())&&o.setAttribute("dir",h)),a=f.elementPath)for(t=0,i=a.elements.length;t<i&&(!(d=a.elements[t]).equals(a.block)&&!d.equals(a.blockLimit));t++)CKEDITOR.dtd.$removeEmpty[d.getName()]&&(d=d.clone(),o.moveChildren(d),o.append(d));o.appendBogus(),o.getParent()||n.insertNode(o),o.is("li")&&o.removeAttribute("value"),!CKEDITOR.env.ie||!r||s&&e.getChildCount()||(n.moveToElementEditStart(s?e:o),n.select()),n.moveToElementEditStart(r&&!s?c:o)}else n.moveToElementEditStart(n.getTouchedStartNode());else c.is("li")&&((o=n.clone()).selectNodeContents(c),(o=new CKEDITOR.dom.walker(o)).evaluator=function(e){return!(O(e)||I(e)||e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in CKEDITOR.dtd.$inline&&!(e.getName()in CKEDITOR.dtd.$empty))},(u=o.next())&&u.type==CKEDITOR.NODE_ELEMENT&&u.is("ul","ol")&&(CKEDITOR.env.needsBrFiller?a.createElement("br"):a.createText(" ")).insertBefore(u)),c&&n.moveToElementEditStart(c);n.select(),n.scrollIntoView()}}var m,E,s,g},enterBr:function(e,t,n,i){var o,a,r,s,l;(n=n||p(e))&&(o=n.document,a=n.checkEndOfBlock(),l=(s=(r=new CKEDITOR.dom.elementPath(e.getSelection().getStartElement())).block)&&r.block.getName(),i||"li"!=l?(!i&&a&&C.test(l)?(a=s.getDirection())?((o=o.createElement("div")).setAttribute("dir",a),o.insertAfter(s),n.setStart(o,0)):(o.createElement("br").insertAfter(s),CKEDITOR.env.gecko&&o.createText("").insertAfter(s),n.setStartAt(s.getNext(),CKEDITOR.env.ie?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_START)):(e="pre"==l&&CKEDITOR.env.ie&&CKEDITOR.env.version<8?o.createText("\r"):o.createElement("br"),n.deleteContents(),n.insertNode(e),CKEDITOR.env.needsBrFiller?(o.createText("\ufeff").insertAfter(e),a&&(s||r.blockLimit).appendBogus(),e.getNext().$.nodeValue="",n.setStartAt(e.getNext(),CKEDITOR.POSITION_AFTER_START)):n.setStartAt(e,CKEDITOR.POSITION_AFTER_END)),n.collapse(!0),n.select(),n.scrollIntoView()):c(e,t,n,i))}},e=CKEDITOR.plugins.enterkey,T=e.enterBr,c=e.enterBlock,C=/^h[1-6]$/}(),CKEDITOR.plugins.add("entities",{afterInit:function(e){function t(e){return r[e]}function n(e){return"force"!=l.entities_processNumerical&&o[e]?o[e]:"&#"+e.charCodeAt(0)+";"}var i,o,a,r,s,l=e.config;(e=(e=e.dataProcessor)&&e.htmlFilter)&&(!(i=[])!==l.basicEntities&&i.push("nbsp,gt,lt,amp"),l.entities&&(i.length&&i.push("quot,iexcl,cent,pound,curren,yen,brvbar,sect,uml,copy,ordf,laquo,not,shy,reg,macr,deg,plusmn,sup2,sup3,acute,micro,para,middot,cedil,sup1,ordm,raquo,frac14,frac12,frac34,iquest,times,divide,fnof,bull,hellip,prime,Prime,oline,frasl,weierp,image,real,trade,alefsym,larr,uarr,rarr,darr,harr,crarr,lArr,uArr,rArr,dArr,hArr,forall,part,exist,empty,nabla,isin,notin,ni,prod,sum,minus,lowast,radic,prop,infin,ang,and,or,cap,cup,int,there4,sim,cong,asymp,ne,equiv,le,ge,sub,sup,nsub,sube,supe,oplus,otimes,perp,sdot,lceil,rceil,lfloor,rfloor,lang,rang,loz,spades,clubs,hearts,diams,circ,tilde,ensp,emsp,thinsp,zwnj,zwj,lrm,rlm,ndash,mdash,lsquo,rsquo,sbquo,ldquo,rdquo,bdquo,dagger,Dagger,permil,lsaquo,rsaquo,euro"),l.entities_latin&&i.push("Agrave,Aacute,Acirc,Atilde,Auml,Aring,AElig,Ccedil,Egrave,Eacute,Ecirc,Euml,Igrave,Iacute,Icirc,Iuml,ETH,Ntilde,Ograve,Oacute,Ocirc,Otilde,Ouml,Oslash,Ugrave,Uacute,Ucirc,Uuml,Yacute,THORN,szlig,agrave,aacute,acirc,atilde,auml,aring,aelig,ccedil,egrave,eacute,ecirc,euml,igrave,iacute,icirc,iuml,eth,ntilde,ograve,oacute,ocirc,otilde,ouml,oslash,ugrave,uacute,ucirc,uuml,yacute,thorn,yuml,OElig,oelig,Scaron,scaron,Yuml"),l.entities_greek&&i.push("Alpha,Beta,Gamma,Delta,Epsilon,Zeta,Eta,Theta,Iota,Kappa,Lambda,Mu,Nu,Xi,Omicron,Pi,Rho,Sigma,Tau,Upsilon,Phi,Chi,Psi,Omega,alpha,beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,mu,nu,xi,omicron,pi,rho,sigmaf,sigma,tau,upsilon,phi,chi,psi,omega,thetasym,upsih,piv"),l.entities_additional&&i.push(l.entities_additional)),o=At(i.join(",")),a=o.regex?"["+o.regex+"]":"a^",delete o.regex,l.entities&&l.entities_processNumerical&&(a="[^ -~]|"+a),a=new RegExp(a,"g"),r=At("nbsp,gt,lt,amp,shy",!0),s=new RegExp(r.regex,"g"),e.addRules({text:function(e){return e.replace(s,t).replace(a,n)}},{applyToAll:!0,excludeNestedEditable:!0}))}}),CKEDITOR.config.basicEntities=!0,CKEDITOR.config.entities=!0,CKEDITOR.config.entities_latin=!0,CKEDITOR.config.entities_greek=!0,CKEDITOR.config.entities_additional="#39",CKEDITOR.plugins.add("popup"),CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{popup:function(t,e,n,i){n=n||"70%",(e="string"==typeof(e=e||"80%")&&1<e.length&&"%"==e.substr(e.length-1,1)?parseInt(window.screen.width*parseInt(e,10)/100,10):e)<640&&(e=640),(n="string"==typeof n&&1<n.length&&"%"==n.substr(n.length-1,1)?parseInt(window.screen.height*parseInt(n,10)/100,10):n)<420&&(n=420);var o=parseInt((window.screen.height-n)/2,10),a=parseInt((window.screen.width-e)/2,10);i=(i||"location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes")+",width="+e+",height="+n+",top="+o+",left="+a;var r=window.open("",null,i,!0);if(!r)return!1;try{-1==navigator.userAgent.toLowerCase().indexOf(" chrome/")&&(r.moveTo(a,o),r.resizeTo(e,n)),r.focus(),r.location.href=t}catch(e){window.open(t,null,i,!0)}return!0}}),function(){function e(e){this.editor=e,this.loaders=[]}function o(e,t,n){var i=e.config.fileTools_defaultFileName;this.editor=e,this.lang=e.lang,"string"==typeof t?(this.data=t,this.file=function(e){var t=e.match(s)[1];e=e.replace(s,""),e=atob(e);var n,i,o,a,r=[];for(n=0;n<e.length;n+=512){for(i=e.slice(n,n+512),o=Array(i.length),a=0;a<i.length;a++)o[a]=i.charCodeAt(a);i=new Uint8Array(o),r.push(i)}return new Blob(r,{type:t})}(this.data),this.loaded=this.total=this.file.size):(this.data=null,this.file=t,this.total=this.file.size,this.loaded=0),n?this.fileName=n:this.file.name?this.fileName=this.file.name:(e=this.file.type.split("/"),i&&(e[0]=i),this.fileName=e.join(".")),this.uploaded=0,this.responseData=this.uploadTotal=null,this.status="created",this.abort=function(){this.changeStatus("abort")}}CKEDITOR.plugins.add("filetools",{beforeInit:function(s){s.uploadRepository=new e(s),s.on("fileUploadRequest",function(e){var t=e.data.fileLoader;t.xhr.open("POST",t.uploadUrl,!0),e.data.requestData.upload={file:t.file,name:t.fileName}},null,null,5),s.on("fileUploadRequest",function(e){var t=e.data.fileLoader,n=new FormData;e=e.data.requestData;var i,o,a=s.config.fileTools_requestHeaders;for(o in e){var r=e[o];"object"==typeof r&&r.file?n.append(o,r.file,r.name):n.append(o,r)}if(n.append("ckCsrfToken",CKEDITOR.tools.getCsrfToken()),a)for(i in a)t.xhr.setRequestHeader(i,a[i]);t.xhr.send(n)},null,null,999),s.on("fileUploadResponse",function(t){var n=t.data.fileLoader,i=n.xhr,o=t.data;try{var e=JSON.parse(i.responseText);if(e.error&&e.error.message&&(o.message=e.error.message),e.uploaded)for(var a in e)o[a]=e[a];else t.cancel()}catch(e){o.message=n.lang.filetools.responseError,CKEDITOR.warn("filetools-response-error",{responseText:i.responseText}),t.cancel()}},null,null,999)}}),e.prototype={create:function(e,t,n){var i=this.loaders.length;return(e=new(n=n||o)(this.editor,e,t)).id=i,this.loaders[i]=e,this.fire("instanceCreated",e),e},isFinished:function(){for(var e=0;e<this.loaders.length;++e)if(!this.loaders[e].isFinished())return!1;return!0}},o.prototype={loadAndUpload:function(t,n){var i=this;this.once("loaded",function(e){e.cancel(),i.once("update",function(e){e.cancel()},null,null,0),i.upload(t,n)},null,null,0),this.load()},load:function(){var t=this,e=this.reader=new FileReader;t.changeStatus("loading"),this.abort=function(){t.reader.abort()},e.onabort=function(){t.changeStatus("abort")},e.onerror=function(){t.message=t.lang.filetools.loadError,t.changeStatus("error")},e.onprogress=function(e){t.loaded=e.loaded,t.update()},e.onload=function(){t.loaded=t.total,t.data=e.result,t.changeStatus("loaded")},e.readAsDataURL(this.file)},upload:function(e,t){t=t||{};e?(this.uploadUrl=e,this.xhr=new XMLHttpRequest,this.attachRequestListeners(),this.editor.fire("fileUploadRequest",{fileLoader:this,requestData:t})&&this.changeStatus("uploading")):(this.message=this.lang.filetools.noUrlError,this.changeStatus("error"))},attachRequestListeners:function(){function e(){"error"!=a.status&&(a.message=a.lang.filetools.networkError,a.changeStatus("error"))}function t(){"abort"!=a.status&&a.changeStatus("abort")}var a=this,r=this.xhr;a.abort=function(){r.abort(),t()},r.onerror=e,r.onabort=t,r.upload?(r.upload.onprogress=function(e){e.lengthComputable&&(a.uploadTotal||(a.uploadTotal=e.total),a.uploaded=e.loaded,a.update())},r.upload.onerror=e,r.upload.onabort=t):(a.uploadTotal=a.total,a.update()),r.onload=function(){if(a.update(),"abort"!=a.status)if(a.uploaded=a.uploadTotal,r.status<200||299<r.status)a.message=a.lang.filetools["httpError"+r.status],a.message||(a.message=a.lang.filetools.httpError.replace("%1",r.status)),a.changeStatus("error");else{for(var e={fileLoader:a},t=["message","fileName","url"],n=a.editor.fire("fileUploadResponse",e),i=0;i<t.length;i++){var o=t[i];"string"==typeof e[o]&&(a[o]=e[o])}a.responseData=e,delete a.responseData.fileLoader,!1===n?a.changeStatus("error"):a.changeStatus("uploaded")}}},changeStatus:function(e){"error"!=(this.status=e)&&"abort"!=e&&"loaded"!=e&&"uploaded"!=e||(this.abort=function(){}),this.fire(e),this.update()},update:function(){this.fire("update")},isFinished:function(){return!!this.status.match(/^(?:loaded|uploaded|error|abort)$/)}},CKEDITOR.event.implementOn(e.prototype),CKEDITOR.event.implementOn(o.prototype);var s=/^data:(\S*?);base64,/;CKEDITOR.fileTools||(CKEDITOR.fileTools={}),CKEDITOR.tools.extend(CKEDITOR.fileTools,{uploadRepository:e,fileLoader:o,getUploadUrl:function(e,t){var n=CKEDITOR.tools.capitalize;return t&&e[t+"UploadUrl"]?e[t+"UploadUrl"]:e.uploadUrl||(t&&e["filebrowser"+n(t,1)+"UploadUrl"]?e["filebrowser"+n(t,1)+"UploadUrl"]+"&responseType=json":e.filebrowserUploadUrl?e.filebrowserUploadUrl+"&responseType=json":null)},isTypeSupported:function(e,t){return!!e.type.match(t)},isFileUploadSupported:"function"==typeof FileReader&&"function"==typeof(new FileReader).readAsDataURL&&"function"==typeof FormData&&"function"==typeof(new FormData).append&&"function"==typeof XMLHttpRequest&&"function"==typeof Blob})}(),CKEDITOR.plugins.add("filebrowser",{requires:"popup,filetools",init:function(e){e._.filebrowserFn=CKEDITOR.tools.addFunction(xt,e),e.on("destroy",function(){CKEDITOR.tools.removeFunction(this._.filebrowserFn)})}}),CKEDITOR.on("dialogDefinition",function(e){if(e.editor.plugins.filebrowser)for(var t,n=e.data.definition,i=0;i<n.contents.length;++i)(t=n.contents[i])&&(Nt(e.editor,e.data.name,n,t.elements),t.hidden&&t.filebrowser&&(t.hidden=!function e(t,n,i){if(-1===i.indexOf(";"))return(t=t.getContents(n).get(i).filebrowser)&&t.url;i=i.split(";");for(var o=0;o<i.length;o++)if(e(t,n,i[o]))return 1}(n,t.id,t.filebrowser)))}),O=CKEDITOR.document.getWindow(),D=CKEDITOR.tools.cssLength,CKEDITOR.plugins.add("floatingspace",{init:function(e){e.on("loaded",function(){function n(e,t,n){E.setStyle(t,D(n)),E.setStyle("position",e)}function i(e){var t=r.getDocumentPosition();switch(e){case"top":n("absolute","top",t.y-d-f);break;case"pin":n("fixed","top",m);break;case"bottom":n("absolute","top",t.y+(l.height||l.bottom-l.top)+f)}a=e}var o,a,r,s,l,c,d,u,h,f,g,m,e,E,t,p,T,C,I;T=(o=this).config,C=o.fire("uiSpace",{space:"top",html:""}).html,h=T.floatSpaceDockedOffsetX||0,f=T.floatSpaceDockedOffsetY||0,g=T.floatSpacePinnedOffsetX||0,m=T.floatSpacePinnedOffsetY||0,I=function(e){var t;(r=o.editable())&&((t=e&&"focus"==e.name)&&E.show(),o.fire("floatingSpaceLayout",{show:t}),E.removeStyle("left"),E.removeStyle("right"),s=E.getClientRect(),l=r.getClientRect(),c=O.getViewPaneSize(),d=s.height,u="pageXOffset"in O.$?O.$.pageXOffset:CKEDITOR.document.$.documentElement.scrollLeft,a?(d+f<=l.top?i("top"):d+f>c.height-l.bottom?i("pin"):i("bottom"),e=c.width/2,e=T.floatSpacePreferRight?"right":0<l.left&&l.right<c.width&&l.width>s.width?"rtl"==T.contentsLangDirection?"right":"left":e-l.left>l.right-e?"left":"right",s.width>c.width?(e="left",t=0):(t="left"==e?0<l.left?l.left:0:l.right<c.width?c.width-l.right:0)+s.width>c.width&&(e="left"==e?"right":"left",t=0),E.setStyle(e,D(("pin"==a?g:h)+t+("pin"==a?0:"left"==e?u:-u)))):(i(a="pin"),I(e)))},C&&(e=new CKEDITOR.template('<div id="cke_{name}" class="cke {id} cke_reset_all cke_chrome cke_editor_{name} cke_float cke_{langDir} '+CKEDITOR.env.cssClass+'" dir="{langDir}" title="'+(CKEDITOR.env.gecko?" ":"")+'" lang="{langCode}" role="application" style="{style}"'+(o.title?' aria-labelledby="cke_{name}_arialbl"':" ")+">"+(o.title?'<span id="cke_{name}_arialbl" class="cke_voice_label">{voiceLabel}</span>':" ")+'<div class="cke_inner"><div id="{topId}" class="cke_top" role="presentation">{content}</div></div></div>'),E=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(e.output({content:C,id:o.id,langDir:o.lang.dir,langCode:o.langCode,name:o.name,style:"display:none;z-index:"+(T.baseFloatZIndex-1),topId:o.ui.spaceId("top"),voiceLabel:o.title}))),t=CKEDITOR.tools.eventsBuffer(500,I),p=CKEDITOR.tools.eventsBuffer(100,I),E.unselectable(),E.on("mousedown",function(e){(e=e.data).getTarget().hasAscendant("a",1)||e.preventDefault()}),o.on("focus",function(e){I(e),o.on("change",t.input),O.on("scroll",p.input),O.on("resize",p.input)}),o.on("blur",function(){E.hide(),o.removeListener("change",t.input),O.removeListener("scroll",p.input),O.removeListener("resize",p.input)}),o.on("destroy",function(){O.removeListener("scroll",p.input),O.removeListener("resize",p.input),E.clearCustomData(),E.remove()}),o.focusManager.hasFocus&&E.show(),o.focusManager.add(E,1))},null,null,20)}}),CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var t=CKEDITOR.addTemplate("panel-list",'<ul role="presentation" class="cke_panel_list">{items}</ul>'),o=CKEDITOR.addTemplate("panel-list-item",'<li id="{id}" class="cke_panel_listItem" role=presentation><a id="{id}_option" _cke_focus=1 hidefocus=true title="{title}" draggable="false" ondragstart="return false;" href="javascript:void(\'{val}\')"  onclick="{onclick}CKEDITOR.tools.callFunction({clickFn},\'{val}\'); return false;" role="option">{text}</a></li>'),n=CKEDITOR.addTemplate("panel-list-group",'<h1 id="{id}" draggable="false" ondragstart="return false;" class="cke_panel_grouptitle" role="presentation" >{label}</h1>'),a=/\'/g;CKEDITOR.ui.panel.prototype.addListBlock=function(e,t){return this.addBlock(e,new CKEDITOR.ui.listBlock(this.getHolderElement(),t))},CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(e,t){var n=(t=t||{}).attributes||(t.attributes={});(this.multiSelect=!!t.multiSelect)&&(n["aria-multiselectable"]=!0),n.role||(n.role="listbox"),this.base.apply(this,arguments),this.element.setAttribute("role",n.role),(n=this.keys)[40]="next",n[9]="next",n[38]="prev",n[CKEDITOR.SHIFT+9]="prev",n[32]=CKEDITOR.env.ie?"mouseup":"click",CKEDITOR.env.ie&&(n[13]="mouseup"),this._.pendingHtml=[],this._.pendingList=[],this._.items={},this._.groups={}},_:{close:function(){var e;this._.started&&(e=t.output({items:this._.pendingList.join("")}),this._.pendingList=[],this._.pendingHtml.push(e),delete this._.started)},getClick:function(){return this._.click||(this._.click=CKEDITOR.tools.addFunction(function(e){var t=this.toggle(e);this.onClick&&this.onClick(e,t)},this)),this._.click}},proto:{add:function(e,t,n){var i=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0),e={id:this._.items[e]=i,val:CKEDITOR.tools.htmlEncodeAttr(e).replace(a,"\\'"),onclick:CKEDITOR.env.ie?'return false;" onmouseup="CKEDITOR.tools.getMouseButton(event)===CKEDITOR.MOUSE_BUTTON_LEFT&&':"",clickFn:this._.getClick(),title:CKEDITOR.tools.htmlEncodeAttr(n||e),text:t||e},this._.pendingList.push(o.output(e))},startGroup:function(e){this._.close();var t=CKEDITOR.tools.getNextId();this._.groups[e]=t,this._.pendingHtml.push(n.output({id:t,label:e}))},commit:function(){this._.close(),this.element.appendHtml(this._.pendingHtml.join("")),delete this._.size,this._.pendingHtml=[]},toggle:function(e){var t=this.isMarked(e);return t?this.unmark(e):this.mark(e),!t},hideGroup:function(e){var t=(e=this.element.getDocument().getById(this._.groups[e]))&&e.getNext();e&&(e.setStyle("display","none"),t&&"ul"==t.getName()&&t.setStyle("display","none"))},hideItem:function(e){this.element.getDocument().getById(this._.items[e]).setStyle("display","none")},showAll:function(){var e,t,n=this._.items,i=this._.groups,o=this.element.getDocument();for(e in n)o.getById(n[e]).setStyle("display","");for(t in i)n=o.getById(i[t]),e=n.getNext(),n.setStyle("display",""),e&&"ul"==e.getName()&&e.setStyle("display","")},mark:function(e){this.multiSelect||this.unmarkAll(),e=this._.items[e];var t=this.element.getDocument().getById(e);t.addClass("cke_selected"),this.element.getDocument().getById(e+"_option").setAttribute("aria-selected",!0),this.onMark&&this.onMark(t)},markFirstDisplayed:function(){var e=this;this._.markFirstDisplayed(function(){e.multiSelect||e.unmarkAll()})},unmark:function(e){var t=this.element.getDocument();e=this._.items[e];var n=t.getById(e);n.removeClass("cke_selected"),t.getById(e+"_option").removeAttribute("aria-selected"),this.onUnmark&&this.onUnmark(n)},unmarkAll:function(){var e,t=this._.items,n=this.element.getDocument();for(e in t){var i=t[e];n.getById(i).removeClass("cke_selected"),n.getById(i+"_option").removeAttribute("aria-selected")}this.onUnmark&&this.onUnmark()},isMarked:function(e){return this.element.getDocument().getById(this._.items[e]).hasClass("cke_selected")},focus:function(e){this._.focusIndex=-1;var t,n=this.element.getElementsByTag("a"),i=-1;if(e){for(t=this.element.getDocument().getById(this._.items[e]).getFirst();e=n.getItem(++i);)if(e.equals(t)){this._.focusIndex=i;break}}else this.element.focus();t&&setTimeout(function(){t.focus()},0)}}})}}),CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_RICHCOMBO,CKEDITOR.ui.richCombo.handler)}}),function(){var e='<span id="{id}" class="cke_combo cke_combo__{name} {cls}" role="presentation"><span id="{id}_label" class="cke_combo_label">{label}</span><a class="cke_combo_button" title="{title}" tabindex="-1"'+(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href=\"javascript:void('{titleJs}')\"")+' hidefocus="true" role="button" aria-labelledby="{id}_label" aria-haspopup="listbox"',t="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(e+=' onkeypress="return false;"'),CKEDITOR.env.gecko&&(e+=' onblur="this.style.cssText = this.style.cssText;"');var e=e+(' onkeydown="return CKEDITOR.tools.callFunction({keydownFn},event,this);" onfocus="return CKEDITOR.tools.callFunction({focusFn},event);" onclick="'+(t=CKEDITOR.env.ie?'return false;" onmouseup="CKEDITOR.tools.getMouseButton(event)==CKEDITOR.MOUSE_BUTTON_LEFT&&':t)+'CKEDITOR.tools.callFunction({clickFn},this);return false;"><span id="{id}_text" class="cke_combo_text cke_combo_inlinelabel">{label}</span><span class="cke_combo_open"><span class="cke_combo_arrow">'+(CKEDITOR.env.hc?"&#9660;":CKEDITOR.env.air?"&nbsp;":""))+"</span></span></a></span>",u=CKEDITOR.addTemplate("combo",e);CKEDITOR.UI_RICHCOMBO="richcombo",CKEDITOR.ui.richCombo=CKEDITOR.tools.createClass({$:function(e){CKEDITOR.tools.extend(this,e,{canGroup:!1,title:e.label,modes:{wysiwyg:1},editorFocus:1}),e=this.panel||{},delete this.panel,this.id=CKEDITOR.tools.getNextNumber(),this.document=e.parent&&e.parent.getDocument()||CKEDITOR.document,e.className="cke_combopanel",e.block={multiSelect:e.multiSelect,attributes:e.attributes},e.toolbarRelated=!0,this._={panelDefinition:e,items:{},listeners:[]}},proto:{renderHtml:function(e){var t=[];return this.render(e,t),t.join("")},render:function(i,e){function t(){var e;this.getState()!=CKEDITOR.TRISTATE_ON&&(e=this.modes[i.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,i.readOnly&&!this.readOnly&&(e=CKEDITOR.TRISTATE_DISABLED),this.setState(e),this.setValue(""),e!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh())}var n=CKEDITOR.env,o="cke_"+this.id,a=CKEDITOR.tools.addFunction(function(e){d&&(i.unlockSelection(1),d=0),s.execute(e)},this),r=this,s={id:o,combo:this,focus:function(){CKEDITOR.document.getById(o).getChild(1).focus()},execute:function(e){var t,n=r._;n.state!=CKEDITOR.TRISTATE_DISABLED&&(r.createPanel(i),n.on?n.panel.hide():(r.commit(),(t=r.getValue())?n.list.mark(t):n.list.unmarkAll(),n.panel.showBlock(r.id,new CKEDITOR.dom.element(e),4)))},clickFn:a};this._.listeners.push(i.on("activeFilterChange",t,this)),this._.listeners.push(i.on("mode",t,this)),this._.listeners.push(i.on("selectionChange",t,this)),this.readOnly||this._.listeners.push(i.on("readOnly",t,this));var l=CKEDITOR.tools.addFunction(function(e,t){var n=(e=new CKEDITOR.dom.event(e)).getKeystroke();switch(n){case 13:case 32:case 40:CKEDITOR.tools.callFunction(a,t);break;default:s.onkey(s,n)}e.preventDefault()}),c=CKEDITOR.tools.addFunction(function(){s.onfocus&&s.onfocus()}),d=0;return s.keyDownFn=l,n={id:o,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:n.gecko&&!n.hc?"":(this.title||"").replace("'",""),keydownFn:l,focusFn:c,clickFn:a},u.output(n,e),this.onRender&&this.onRender(),s},createPanel:function(t){var e,n,i,o,a,r;this._.panel||(a=this._.panelDefinition,e=this._.panelDefinition.block,n=a.parent||CKEDITOR.document.getBody(),i="cke_combopanel__"+this.name,a=(o=new CKEDITOR.ui.floatPanel(t,n,a)).addListBlock(this.id,e),r=this,o.onShow=function(){this.element.addClass(i),r.setState(CKEDITOR.TRISTATE_ON),r._.on=1,r.editorFocus&&!t.focusManager.hasFocus&&t.focus(),r.onOpen&&r.onOpen()},o.onHide=function(e){this.element.removeClass(i),r.setState(r.modes&&r.modes[t.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),r._.on=0,!e&&r.onClose&&r.onClose()},o.onEscape=function(){o.hide(1)},a.onClick=function(e,t){r.onClick&&r.onClick.call(r,e,t),o.hide()},this._.panel=o,this._.list=a,o.getBlock(this.id).onHide=function(){r._.on=0,r.setState(CKEDITOR.TRISTATE_OFF)},this.init&&this.init())},setValue:function(e,t){this._.value=e,(i=this.document.getById("cke_"+this.id+"_text"))&&(e||t?i.removeClass("cke_combo_inlinelabel"):(t=this.label,i.addClass("cke_combo_inlinelabel")),i.setText(void 0!==t?t:e));var n=this.label,i=(i=void 0!==t?t:e)===n?i:i+", "+n;(n=this.document.getById("cke_"+this.id+"_label"))&&n.setText(i)},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(e){this._.list.mark(e)},hideItem:function(e){this._.list.hideItem(e)},hideGroup:function(e){this._.list.hideGroup(e)},showAll:function(){this._.list.showAll()},add:function(e,t,n){this._.items[e]=n||e,this._.list.add(e,t,n)},startGroup:function(e){this._.list.startGroup(e)},commit:function(){this._.committed||(this._.list.commit(),this._.committed=1,CKEDITOR.ui.fire("ready",this)),this._.committed=1},setState:function(e){var t,n;this._.state!=e&&(n=(t=this.document.getById("cke_"+this.id)).getElementsByTag("a").getItem(0),t.setState(e,"cke_combo"),e==CKEDITOR.TRISTATE_DISABLED?t.setAttribute("aria-disabled",!0):t.removeAttribute("aria-disabled"),n&&n.setAttribute("aria-expanded",e==CKEDITOR.TRISTATE_ON),this._.state=e)},getState:function(){return this._.state},enable:function(){this._.state==CKEDITOR.TRISTATE_DISABLED&&this.setState(this._.lastState)},disable:function(){this._.state!=CKEDITOR.TRISTATE_DISABLED&&(this._.lastState=this._.state,this.setState(CKEDITOR.TRISTATE_DISABLED))},destroy:function(){CKEDITOR.tools.array.forEach(this._.listeners,function(e){e.removeListener()}),this._.listeners=[]},select:function(e){if(!CKEDITOR.tools.isEmpty(this._.items))for(var t in this._.items)if(e({value:t,text:this._.items[t]})){this.setValue(t);break}}},statics:{handler:{create:function(e){return new CKEDITOR.ui.richCombo(e)}}}}),CKEDITOR.ui.prototype.addRichCombo=function(e,t){this.add(e,CKEDITOR.UI_RICHCOMBO,t)}}(),CKEDITOR.plugins.add("format",{requires:"richcombo",init:function(i){if(!i.blockless){for(var e=i.config,n=i.lang.format,t=e.format_tags.split(";"),o={},a=0,r=[],s=0;s<t.length;s++){var l=t[s],c=new CKEDITOR.style(e["format_"+l]);i.filter.customConfig&&!i.filter.check(c)||(a++,o[l]=c,o[l]._.enterMode=i.config.enterMode,r.push(c))}0!==a&&i.ui.addRichCombo("Format",{label:n.label,title:n.panelTitle,toolbar:"styles,20",allowedContent:r,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(e.contentsCss),multiSelect:!1,attributes:{"aria-label":n.panelTitle}},init:function(){for(var e in this.startGroup(n.panelTitle),o){var t=n["tag_"+e];this.add(e,o[e].buildPreview(t),t)}},onClick:function(e){i.focus(),i.fire("saveSnapshot"),e=o[e];var t=i.elementPath();i.fire("stylesRemove",{type:CKEDITOR.STYLE_BLOCK}),e.checkActive(t,i)||i.applyStyle(e),setTimeout(function(){i.fire("saveSnapshot")},0)},onRender:function(){i.on("selectionChange",function(e){var t,n=this.getValue();for(t in e=e.data.path,this.refresh(),o)if(o[t].checkActive(e,i))return void(t!=n&&this.setValue(t,i.lang.format["tag_"+t]));this.setValue("")},this)},onOpen:function(){for(var e in this.showAll(),o)i.activeFilter.check(o[e])||this.hideItem(e)},refresh:function(){var e=i.elementPath();if(e){if(e.isContextFor("p"))for(var t in o)if(i.activeFilter.check(o[t]))return;this.setState(CKEDITOR.TRISTATE_DISABLED)}}})}}}),CKEDITOR.config.format_tags="p;h1;h2;h3;h4;h5;h6;pre;address;div",CKEDITOR.config.format_p={element:"p"},CKEDITOR.config.format_div={element:"div"},CKEDITOR.config.format_pre={element:"pre"},CKEDITOR.config.format_address={element:"address"},CKEDITOR.config.format_h1={element:"h1"},CKEDITOR.config.format_h2={element:"h2"},CKEDITOR.config.format_h3={element:"h3"},CKEDITOR.config.format_h4={element:"h4"},CKEDITOR.config.format_h5={element:"h5"},CKEDITOR.config.format_h6={element:"h6"},E={canUndo:!1,exec:function(e){var t=e.document.createElement("hr");e.insertElement(t)},allowedContent:"hr",requiredContent:"hr"},CKEDITOR.plugins.add("horizontalrule",{init:function(e){e.blockless||(e.addCommand("horizontalrule",E),e.ui.addButton&&e.ui.addButton("HorizontalRule",{label:e.lang.horizontalrule.toolbar,command:"horizontalrule",toolbar:"insert,40"}))}}),CKEDITOR.plugins.add("htmlwriter",{init:function(e){var t=new CKEDITOR.htmlWriter;t.forceSimpleAmpersand=e.config.forceSimpleAmpersand,t.indentationChars="string"==typeof e.config.dataIndentationChars?e.config.dataIndentationChars:"\t",e.dataProcessor.writer=t}}),CKEDITOR.htmlWriter=CKEDITOR.tools.createClass({base:CKEDITOR.htmlParser.basicWriter,$:function(){this.base(),this.indentationChars="\t",this.selfClosingEnd=" />",this.lineBreakChars="\n",this.sortAttributes=1,this._.indent=0,this._.indentation="",this._.inPre=0,this._.rules={};var e,t=CKEDITOR.dtd;for(e in CKEDITOR.tools.extend({},t.$nonBodyContent,t.$block,t.$listItem,t.$tableContent))this.setRules(e,{indent:!t[e]["#"],breakBeforeOpen:1,breakBeforeClose:!t[e]["#"],breakAfterClose:1,needsSpace:e in t.$block&&!(e in{li:1,dt:1,dd:1})});this.setRules("br",{breakAfterOpen:1}),this.setRules("title",{indent:0,breakAfterOpen:0}),this.setRules("style",{indent:0,breakBeforeClose:1}),this.setRules("pre",{breakAfterOpen:1,indent:0})},proto:{openTag:function(e){var t=this._.rules[e];this._.afterCloser&&t&&t.needsSpace&&this._.needsSpace&&this._.output.push("\n"),this._.indent?this.indentation():t&&t.breakBeforeOpen&&(this.lineBreak(),this.indentation()),this._.output.push("<",e),this._.afterCloser=0},openTagClose:function(e,t){var n=this._.rules[e];t?(this._.output.push(this.selfClosingEnd),n&&n.breakAfterClose&&(this._.needsSpace=n.needsSpace)):(this._.output.push(">"),n&&n.indent&&(this._.indentation+=this.indentationChars)),n&&n.breakAfterOpen&&this.lineBreak(),"pre"==e&&(this._.inPre=1)},attribute:function(e,t){"string"==typeof t&&(t=CKEDITOR.tools.htmlEncodeAttr(t),this.forceSimpleAmpersand&&(t=t.replace(/&amp;/g,"&"))),this._.output.push(" ",e,'="',t,'"')},closeTag:function(e){var t=this._.rules[e];t&&t.indent&&(this._.indentation=this._.indentation.substr(this.indentationChars.length)),this._.indent?this.indentation():t&&t.breakBeforeClose&&(this.lineBreak(),this.indentation()),this._.output.push("</",e,">"),"pre"==e&&(this._.inPre=0),t&&t.breakAfterClose&&(this.lineBreak(),this._.needsSpace=t.needsSpace),this._.afterCloser=1},text:function(e){this._.indent&&(this.indentation(),this._.inPre||(e=CKEDITOR.tools.ltrim(e))),this._.output.push(e)},comment:function(e){this._.indent&&this.indentation(),this._.output.push("\x3c!--",e,"--\x3e")},lineBreak:function(){!this._.inPre&&0<this._.output.length&&this._.output.push(this.lineBreakChars),this._.indent=1},indentation:function(){!this._.inPre&&this._.indentation&&this._.output.push(this._.indentation),this._.indent=0},reset:function(){this._.output=[],this._.indent=0,this._.indentation="",this._.afterCloser=0,this._.inPre=0,this._.needsSpace=0},setRules:function(e,t){var n=this._.rules[e];n?CKEDITOR.tools.extend(n,t,!0):this._.rules[e]=t}}}),CKEDITOR.plugins.add("image",{requires:"dialog",init:function(t){var e;t.plugins.detectConflict("image",["easyimage","image2"])||(CKEDITOR.dialog.add("image",this.path+"dialogs/image.js"),e="img[alt,!src]{border-style,border-width,float,height,margin,margin-bottom,margin-left,margin-right,margin-top,width}",CKEDITOR.dialog.isTabEnabled(t,"image","advanced")&&(e="img[alt,dir,id,lang,longdesc,!src,title]{*}(*)"),t.addCommand("image",new CKEDITOR.dialogCommand("image",{allowedContent:e,requiredContent:"img[alt,src]",contentTransformations:[["img{width}: sizeToStyle","img[width]: sizeToAttribute"],["img{float}: alignmentToStyle","img[align]: alignmentToAttribute"]]})),t.ui.addButton&&t.ui.addButton("Image",{label:t.lang.common.image,command:"image",toolbar:"insert,10"}),t.on("doubleclick",function(e){var t=e.data.element;!t.is("img")||t.data("cke-realelement")||t.isReadOnly()||(e.data.dialog="image")}),t.addMenuItems&&t.addMenuItems({image:{label:t.lang.image.menu,command:"image",group:"image"}}),t.contextMenu&&t.contextMenu.addListener(function(e){if(bt(t,e))return{image:CKEDITOR.TRISTATE_OFF}}))},afterInit:function(i){function e(n){var e=i.getCommand("justify"+n);e&&("left"!=n&&"right"!=n||e.on("exec",function(e){var t=bt(i);t&&(yt(t)==n?(t.removeStyle("float"),n==yt(t)&&t.removeAttribute("align")):t.setStyle("float",n),e.cancel())}),e.on("refresh",function(e){var t=bt(i);t&&(t=yt(t),this.setState(t==n?CKEDITOR.TRISTATE_ON:"right"==n||"left"==n?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),e.cancel())}))}i.plugins.image2||(e("left"),e("right"),e("center"),e("block"))}}),CKEDITOR.config.image_removeLinkByEmptyURL=!0,h=CKEDITOR.htmlParser.cssStyle,f=CKEDITOR.tools.cssLength,g=/^((?:\d*(?:\.\d+))|(?:\d+))(.*)?$/i,m={elements:{$:function(e){var t,n,i=e.attributes;return(i=(i=(i=i&&i["data-cke-realelement"])&&new CKEDITOR.htmlParser.fragment.fromHtml(decodeURIComponent(i)))&&i.children[0])&&e.attributes["data-cke-resizable"]&&(n=new h(e).rules,e=i.attributes,t=n.width,n=n.height,t&&(e.width=vt(e.width,t)),n&&(e.height=vt(e.height,n))),i}}},CKEDITOR.plugins.add("fakeobjects",{init:function(e){e.filter.allow("img[!data-cke-realelement,src,alt,title](*){*}","fakeobjects")},afterInit:function(e){(e=(e=e.dataProcessor)&&e.htmlFilter)&&e.addRules(m,{applyToAll:!0})}}),CKEDITOR.editor.prototype.createFakeElement=function(e,t,n,i){var o=(o=this.lang.fakeobjects)[n]||o.unknown;return t={class:t,"data-cke-realelement":encodeURIComponent(e.getOuterHtml()),"data-cke-real-node-type":e.type,alt:o,title:o,align:e.getAttribute("align")||""},CKEDITOR.env.hc||(t.src=CKEDITOR.tools.transparentImageData),n&&(t["data-cke-real-element-type"]=n),i&&(t["data-cke-resizable"]=i,n=new h,i=e.getAttribute("width"),e=e.getAttribute("height"),i&&(n.rules.width=f(i)),e&&(n.rules.height=f(e)),n.populate(t)),this.document.createElement("img",{attributes:t})},CKEDITOR.editor.prototype.createFakeParserElement=function(e,t,n,i){var o=(o=this.lang.fakeobjects)[n]||o.unknown,a=new CKEDITOR.htmlParser.basicWriter;return e.writeHtml(a),a=a.getHtml(),t={class:t,"data-cke-realelement":encodeURIComponent(a),"data-cke-real-node-type":e.type,alt:o,title:o,align:e.attributes.align||""},CKEDITOR.env.hc||(t.src=CKEDITOR.tools.transparentImageData),n&&(t["data-cke-real-element-type"]=n),i&&(t["data-cke-resizable"]=i,i=e.attributes,e=new h,n=i.width,i=i.height,void 0!==n&&(e.rules.width=f(n)),void 0!==i&&(e.rules.height=f(i)),e.populate(t)),new CKEDITOR.htmlParser.element("img",t)},CKEDITOR.editor.prototype.restoreRealElement=function(e){if(e.data("cke-real-node-type")!=CKEDITOR.NODE_ELEMENT)return null;var t,n=CKEDITOR.dom.element.createFromHtml(decodeURIComponent(e.data("cke-realelement")),this.document);return e.data("cke-resizable")&&(t=e.getStyle("width"),e=e.getStyle("height"),t&&n.setAttribute("width",vt(n.getAttribute("width"),t)),e&&n.setAttribute("height",vt(n.getAttribute("height"),e))),n},function(){function u(e){return e.replace(/'/g,"\\$&")}CKEDITOR.plugins.add("link",{requires:"dialog,fakeobjects",onLoad:function(){function e(e){return n.replace(/%1/g,"rtl"==e?"right":"left").replace(/%2/g,"cke_contents_"+e)}var t="background:url("+CKEDITOR.getUrl(this.path+"images"+(CKEDITOR.env.hidpi?"/hidpi":"")+"/anchor.png")+") no-repeat %1 center;border:1px dotted #00f;background-size:16px;",n=".%2 a.cke_anchor,.%2 a.cke_anchor_empty,.cke_editable.%2 a[name],.cke_editable.%2 a[data-cke-saved-name]{"+t+"padding-%1:18px;cursor:auto;}.%2 img.cke_anchor{"+t+"width:16px;min-height:15px;height:1.15em;vertical-align:text-bottom;}";CKEDITOR.addCss(e("ltr")+e("rtl"))},init:function(n){var i,e="a[!href]";CKEDITOR.dialog.isTabEnabled(n,"link","advanced")&&(e=e.replace("]",",accesskey,charset,dir,id,lang,name,rel,tabindex,title,type,download]{*}(*)")),CKEDITOR.dialog.isTabEnabled(n,"link","target")&&(e=e.replace("]",",target,onclick]")),n.addCommand("link",new CKEDITOR.dialogCommand("link",{allowedContent:e,requiredContent:"a[href]"})),n.addCommand("anchor",new CKEDITOR.dialogCommand("anchor",{allowedContent:"a[!name,id]",requiredContent:"a[name]"})),n.addCommand("unlink",new CKEDITOR.unlinkCommand),n.addCommand("removeAnchor",new CKEDITOR.removeAnchorCommand),n.setKeystroke(CKEDITOR.CTRL+76,"link"),n.setKeystroke(CKEDITOR.CTRL+75,"link"),n.ui.addButton&&(n.ui.addButton("Link",{label:n.lang.link.toolbar,command:"link",toolbar:"links,10"}),n.ui.addButton("Unlink",{label:n.lang.link.unlink,command:"unlink",toolbar:"links,20"}),n.ui.addButton("Anchor",{label:n.lang.link.anchor.toolbar,command:"anchor",toolbar:"links,30"})),CKEDITOR.dialog.add("link",this.path+"dialogs/link.js"),CKEDITOR.dialog.add("anchor",this.path+"dialogs/anchor.js"),n.on("doubleclick",function(e){var t=e.data.element.getAscendant({a:1,img:1},!0);t&&!t.isReadOnly()&&(t.is("a")?(e.data.dialog=!t.getAttribute("name")||t.getAttribute("href")&&t.getChildCount()?"link":"anchor",e.data.link=t):CKEDITOR.plugins.link.tryRestoreFakeAnchor(n,t)&&(e.data.dialog="anchor"))},null,null,0),n.on("doubleclick",function(e){e.data.dialog in{link:1,anchor:1}&&e.data.link&&n.getSelection().selectElement(e.data.link)},null,null,20),n.addMenuItems&&n.addMenuItems({anchor:{label:n.lang.link.anchor.menu,command:"anchor",group:"anchor",order:1},removeAnchor:{label:n.lang.link.anchor.remove,command:"removeAnchor",group:"anchor",order:5},link:{label:n.lang.link.menu,command:"link",group:"link",order:1},unlink:{label:n.lang.link.unlink,command:"unlink",group:"link",order:5}}),n.contextMenu&&n.contextMenu.addListener(function(e){if(!e||e.isReadOnly())return null;if(!(e=CKEDITOR.plugins.link.tryRestoreFakeAnchor(n,e))&&!(e=CKEDITOR.plugins.link.getSelectedLink(n)))return null;var t={};return e.getAttribute("href")&&e.getChildCount()&&(t={link:CKEDITOR.TRISTATE_OFF,unlink:CKEDITOR.TRISTATE_OFF}),e&&e.hasAttribute("name")&&(t.anchor=t.removeAnchor=CKEDITOR.TRISTATE_OFF),t}),this.compiledProtectionFunction=((e=(e=n).config.emailProtection||"")&&"encode"!=e&&(i={},e.replace(/^([^(]+)\(([^)]+)\)$/,function(e,t,n){i.name=t,i.params=[],n.replace(/[^,\s]+/g,function(e){i.params.push(e)})})),i)},afterInit:function(n){n.dataProcessor.dataFilter.addRules({elements:{a:function(e){return!e.attributes.name||e.children.length?null:n.createFakeParserElement(e,"cke_anchor","anchor")}}});var e=n._.elementsPath&&n._.elementsPath.filters;e&&e.push(function(e,t){if("a"==t&&(CKEDITOR.plugins.link.tryRestoreFakeAnchor(n,e)||e.getAttribute("name")&&(!e.getAttribute("href")||!e.getChildCount())))return"anchor"})}});var l=/^javascript:/,c=/^(?:mailto)(?:(?!\?(subject|body)=).)+/i,d=/subject=([^;?:@&=$,\/]*)/i,h=/body=([^;?:@&=$,\/]*)/i,f=/^#(.*)$/,g=/^((?:http|https|ftp|news):\/\/)?(.*)$/,m=/^(_(?:self|top|parent|blank))$/,E=/^javascript:void\(location\.href='mailto:'\+String\.fromCharCode\(([^)]+)\)(?:\+'(.*)')?\)$/,p=/^javascript:([^(]+)\(([^)]+)\)$/,T=/\s*window.open\(\s*this\.href\s*,\s*(?:'([^']*)'|null)\s*,\s*'([^']*)'\s*\)\s*;\s*return\s*false;*\s*/,C=/(?:^|,)([^=]+)=(\d+|yes|no)/gi,I=/^tel:(.*)$/,O={id:"advId",dir:"advLangDir",accessKey:"advAccessKey",name:"advName",lang:"advLangCode",tabindex:"advTabIndex",title:"advTitle",type:"advContentType",class:"advCSSClasses",charset:"advCharset",style:"advStyles",rel:"advRel"};CKEDITOR.plugins.link={getSelectedLink:function(e,t){var n,i=e.getSelection(),o=i.getSelectedElement(),a=i.getRanges(),r=[];if(!t&&o&&o.is("a"))return o;for(o=0;o<a.length;o++)if((n=i.getRanges()[o]).shrink(CKEDITOR.SHRINK_ELEMENT,!0,{skipBogus:!0}),(n=e.elementPath(n.getCommonAncestor()).contains("a",1))&&t)r.push(n);else if(n)return n;return t?r:null},getEditorAnchors:function(e){for(var t,n=(i=(n=e.editable()).isInline()&&!e.plugins.divarea?e.document:n).getElementsByTag("a"),i=i.getElementsByTag("img"),o=[],a=0;t=n.getItem(a++);)(t.data("cke-saved-name")||t.hasAttribute("name"))&&o.push({name:t.data("cke-saved-name")||t.getAttribute("name"),id:t.getAttribute("id")});for(a=0;t=i.getItem(a++);)(t=this.tryRestoreFakeAnchor(e,t))&&o.push({name:t.getAttribute("name"),id:t.getAttribute("id")});return o},fakeAnchor:!0,tryRestoreFakeAnchor:function(e,t){if(t&&t.data("cke-real-element-type")&&"anchor"==t.data("cke-real-element-type")){t=e.restoreRealElement(t);if(t.data("cke-saved-name"))return t}},parseLinkAttributes:function(e,t){var n,i=t&&(t.data("cke-saved-href")||t.getAttribute("href"))||"",r=e.plugins.link.compiledProtectionFunction,o=e.config.emailProtection,s={};if(i.match(l)&&("encode"==o?i=i.replace(E,function(e,t,n){return n=n||"","mailto:"+String.fromCharCode.apply(String,t.split(","))+n.replace(/\\'/g,"'")}):o&&i.replace(p,function(e,t,n){if(t==r.name){s.type="email",e=s.email={},t=/(^')|('$)/g;for(var i,o=(n=n.match(/[^,\s]+/g)).length,a=0;a<o;a++)i=decodeURIComponent(n[a].replace(t,"").replace(/\\'/g,"'")),e[r.params[a].toLowerCase()]=i;e.address=[e.name,e.domain].join("@")}})),s.type||((o=i.match(f))?(s.type="anchor",s.anchor={},s.anchor.name=s.anchor.id=o[1]):(o=i.match(I))?(s.type="tel",s.tel=o[1]):(o=i.match(c))?(n=i.match(d),i=i.match(h),e=s.email={},s.type="email",e.address=o[0].replace("mailto:",""),n&&(e.subject=decodeURIComponent(n[1])),i&&(e.body=decodeURIComponent(i[1]))):i&&(n=i.match(g))&&(s.type="url",s.url={},s.url.protocol=n[1],s.url.url=n[2])),t){if(i=t.getAttribute("target"))s.target={type:i.match(m)?i:"frame",name:i};else if(i=(i=t.data("cke-pa-onclick")||t.getAttribute("onclick"))&&i.match(T))for(s.target={type:"popup",name:i[1]};o=C.exec(i[2]);)"yes"!=o[2]&&"1"!=o[2]||o[1]in{height:1,width:1,top:1,left:1}?isFinite(o[2])&&(s.target[o[1]]=o[2]):s.target[o[1]]=!0;null!==t.getAttribute("download")&&(s.download=!0);var a,i={};for(a in O)(o=t.getAttribute(a))&&(i[O[a]]=o);(a=t.data("cke-saved-name")||i.advName)&&(i.advName=a),CKEDITOR.tools.isEmpty(i)||(s.advanced=i)}return s},getLinkAttributes:function(e,t){var n,i=e.config.emailProtection||"",o={};switch(t.type){case"url":var i=t.url&&void 0!==t.url.protocol?t.url.protocol:"http://",a=t.url&&CKEDITOR.tools.trim(t.url.url)||"";o["data-cke-saved-href"]=0===a.indexOf("/")?a:i+a;break;case"anchor":i=t.anchor&&t.anchor.id,o["data-cke-saved-href"]="#"+(t.anchor&&t.anchor.name||i||"");break;case"email":a=(l=t.email).address;switch(i){case"":case"encode":var r=encodeURIComponent(l.subject||""),s=encodeURIComponent(l.body||""),l=[];r&&l.push("subject="+r),s&&l.push("body="+s),l=l.length?"?"+l.join("&"):"","encode"==i?(i=["javascript:void(location.href='mailto:'+",function(e){for(var t,n=e.length,i=[],o=0;o<n;o++)t=e.charCodeAt(o),i.push(t);return"String.fromCharCode("+i.join(",")+")"}(a)],l&&i.push("+'",u(l),"'"),i.push(")")):i=["mailto:",a,l];break;default:i=a.split("@",2),l.name=i[0],l.domain=i[1],i=["javascript:",function(e,t){for(var n,i,o=(a=e.plugins.link).compiledProtectionFunction.params,a=[a.compiledProtectionFunction.name,"("],r=0;r<o.length;r++)i=t[n=o[r].toLowerCase()],0<r&&a.push(","),a.push("'",i?u(encodeURIComponent(t[n])):"","'");return a.push(")"),a.join("")}(e,l)]}o["data-cke-saved-href"]=i.join("");break;case"tel":o["data-cke-saved-href"]="tel:"+t.tel}if(t.target)if("popup"==t.target.type){for(var i=["window.open(this.href, '",t.target.name||"","', '"],c="resizable status location toolbar menubar fullscreen scrollbars dependent".split(" "),a=c.length,r=function(e){t.target[e]&&c.push(e+"="+t.target[e])},l=0;l<a;l++)c[l]+=t.target[c[l]]?"=yes":"=no";r("width"),r("left"),r("height"),r("top"),i.push(c.join(","),"'); return false;"),o["data-cke-pa-onclick"]=i.join("")}else"notSet"!=t.target.type&&t.target.name&&(o.target=t.target.name);if(t.download&&(o.download=""),t.advanced){for(var d in O)(i=t.advanced[O[d]])&&(o[d]=i);o.name&&(o["data-cke-saved-name"]=o.name)}for(n in o["data-cke-saved-href"]&&(o.href=o["data-cke-saved-href"]),d={target:1,onclick:1,"data-cke-pa-onclick":1,"data-cke-saved-name":1,download:1},t.advanced&&CKEDITOR.tools.extend(d,O),o)delete d[n];return{set:o,removed:CKEDITOR.tools.object.keys(d)}},showDisplayTextForElement:function(e,t){var n=t.getSelection();return!(t.widgets&&t.widgets.focused||n&&1<n.getRanges().length)&&(!e||!e.getName||!e.is({img:1,table:1,tbody:1,thead:1,tfoot:1,input:1,select:1,textarea:1}))}},CKEDITOR.unlinkCommand=function(){},CKEDITOR.unlinkCommand.prototype={exec:function(e){var t,n,i;CKEDITOR.env.ie&&(n=(t=e.getSelection().getRanges()[0]).getPreviousEditableNode()&&t.getPreviousEditableNode().getAscendant("a",!0)||t.getNextEditableNode()&&t.getNextEditableNode().getAscendant("a",!0),t.collapsed&&n&&(i=t.createBookmark(),t.selectNodeContents(n),t.select())),n=new CKEDITOR.style({element:"a",type:CKEDITOR.STYLE_INLINE,alwaysRemoveElement:1}),e.removeStyle(n),i&&(t.moveToBookmark(i),t.select())},refresh:function(e,t){t=t.lastElement&&t.lastElement.getAscendant("a",!0);t&&"a"==t.getName()&&t.getAttribute("href")&&t.getChildCount()?this.setState(CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)},contextSensitive:1,startDisabled:1,requiredContent:"a[href]",editorFocus:1},CKEDITOR.removeAnchorCommand=function(){},CKEDITOR.removeAnchorCommand.prototype={exec:function(e){var t,n=e.getSelection(),i=n.createBookmarks();n&&(t=n.getSelectedElement())&&(t.getChildCount()?t.is("a"):CKEDITOR.plugins.link.tryRestoreFakeAnchor(e,t))?t.remove(1):(t=CKEDITOR.plugins.link.getSelectedLink(e))&&(t.hasAttribute("href")?(t.removeAttributes({name:1,"data-cke-saved-name":1}),t.removeClass("cke_anchor")):t.remove(1)),n.selectBookmarks(i)},requiredContent:"a[name]"},CKEDITOR.tools.extend(CKEDITOR.config,{linkShowAdvancedTab:!0,linkShowTargetTab:!0,linkDefaultProtocol:"http://"})}(),function(){function u(e,t,n){return p(t)&&p(n)&&n.equals(t.getNext(function(e){return!(X(e)||Y(e)||T(e))}))}function h(e){this.upper=e[0],this.lower=e[1],this.set.apply(this,e.slice(2))}function f(e){var t=e.element;if(t&&p(t)&&(t=t.getAscendant(e.triggers,!0))&&e.editable.contains(t)){var n=r(t);if("true"==n.getAttribute("contenteditable"))return t;if(n.is(e.triggers))return n}return null}function g(t,e,n){return e[n?"getPrevious":"getNext"](function(e){return e&&e.type==CKEDITOR.NODE_TEXT&&!X(e)||p(e)&&!T(e)&&!E(t,e)})}function m(e,t,n){return t<e&&e<n}function r(e,t){if(e.data("cke-editable"))return null;for(t||(e=e.getParent());e&&!e.data("cke-editable");){if(e.hasAttribute("contenteditable"))return e;e=e.getParent()}return null}function d(e,t,n){var i,o=new CKEDITOR.dom.range(e.doc),a=e.editor;N.ie&&e.enterMode==CKEDITOR.ENTER_BR?i=e.doc.createText(l):(i=(i=r(e.element,!0))&&i.data("cke-enter-mode")||e.enterMode,(i=new k(s[i],e.doc)).is("br")||e.doc.createText(l).appendTo(i)),n&&a.fire("saveSnapshot"),t(i),o.moveToPosition(i,CKEDITOR.POSITION_AFTER_START),a.getSelection().selectRanges([o]),e.hotNode=i,n&&a.fire("saveSnapshot")}function c(i,o){return{canUndo:!0,modes:{wysiwyg:1},exec:function(e){var t,n;e=(e=e.getSelection().getStartElement()).getAscendant(z,1),O(i,e)||!e||e.equals(i.editable)||e.contains(i.editable)||((t=r(e))&&"false"==t.getAttribute("contenteditable")&&(e=t),i.element=e,p(t=g(i,e,!o))&&t.is(i.triggers)&&t.is(U)&&(!g(i,t,!o)||(n=g(i,t,!o))&&p(n)&&n.is(i.triggers))?a(t):p(n=f(i))&&(!g(i,n,!o)||(e=g(i,n,!o))&&p(e)&&e.is(i.triggers))&&a(n))}};function a(t){var e=N.ie&&N.version<9?" ":l,n=i.hotNode&&i.hotNode.getText()==e&&i.element.equals(i.hotNode)&&i.lastCmdDirection===!!o;d(i,function(e){n&&i.hotNode&&i.hotNode.remove(),e[o?"insertAfter":"insertBefore"](t),e.setAttributes({"data-cke-magicline-hot":1,"data-cke-magicline-dir":!!o}),i.lastCmdDirection=!!o}),N.ie||i.enterMode==CKEDITOR.ENTER_BR||i.hotNode.scrollIntoView(),i.line.detach()}}function E(e,t){if(!t||t.type!=CKEDITOR.NODE_ELEMENT||!t.$)return!1;e=e.line;return e.wrap.equals(t)||e.wrap.contains(t)}function p(e){return e&&e.type==CKEDITOR.NODE_ELEMENT&&e.$}function T(e){var t;return p(e)&&((t=C(e))?t:!!p(e)&&!(!(t={left:1,right:1,center:1})[e.getComputedStyle("float")]&&!t[e.getAttribute("align")]))}function C(e){return!!{absolute:1,fixed:1}[e.getComputedStyle("position")]}function I(e,t){return p(t)&&t.is(e.triggers)}function O(e,t){if(t)for(var n=t.getParents(1),i=n.length;i--;)for(var o=e.tabuList.length;o--;)if(n[i].hasAttribute(e.tabuList[o]))return 1}function D(e){var t=e.editable,n=e.mouse,i=e.view,o=e.triggerOffset;y(e);var a=n.y>(e.inInlineMode?i.editable.top+i.editable.height/2:Math.min(i.editable.height,i.pane.height)/2);return(t=t[a?"getLast":"getFirst"](function(e){return!(X(e)||Y(e))}))&&p(t=E(e,t)?e.line.wrap[a?"getPrevious":"getNext"](function(e){return!(X(e)||Y(e))}):t)&&!T(t)&&I(e,t)?(b(e,t),!a&&0<=t.size.top&&m(n.y,0,t.size.top+o)?(e=e.inInlineMode||0===i.scroll.y?B:$,new h([null,t,A,P,e])):a&&t.size.bottom<=i.pane.height&&m(n.y,t.size.bottom-o,i.pane.height)?(e=e.inInlineMode||m(t.size.bottom,i.pane.height-o,i.pane.height)?M:$,new h([t,null,L,P,e])):null):null}function R(e){var t=e.mouse,n=e.view,i=e.triggerOffset,o=f(e);if(!o)return null;b(e,o);var a,r,s,l,i=Math.min(i,0|o.size.outerHeight/2),c=[];if(m(t.y,o.size.top-1,o.size.top+i))r=!1;else{if(!m(t.y,o.size.bottom-i,o.size.bottom+1))return null;r=!0}if(T(o)||(s=e,(d=(d=o)[(l=r)?"getLast":"getFirst"](function(e){return s.isRelevant(e)&&!e.is(q)}))&&(b(s,d),l?d.size.top>s.mouse.y:d.size.bottom<s.mouse.y))||o.getParent().is(H))return null;var d=g(e,o,!r);if(d){if(d&&d.type==CKEDITOR.NODE_TEXT)return null;if(p(d)){if(T(d)||!I(e,d)||d.getParent().is(H))return null;c=[d,o][r?"reverse":"concat"]().concat([F,P])}}else o.equals(e.editable[r?"getLast":"getFirst"](e.isRelevant))?(y(e),r&&m(t.y,o.size.bottom-i,n.pane.height)&&m(o.size.bottom,n.pane.height-i,n.pane.height)?a=M:m(t.y,0,o.size.top+i)&&(a=B)):a=$,c=[null,o][r?"reverse":"concat"]().concat([r?L:A,P,a,o.equals(e.editable[r?"getLast":"getFirst"](e.isRelevant))?r?M:B:$]);return 0 in c?new h(c):null}function v(e,t,n,i){for(var o=t.getDocumentPosition(),a={},r={},s={},l={},c=J.length;c--;)a[J[c]]=parseInt(t.getComputedStyle.call(t,"border-"+J[c]+"-width"),10)||0,s[J[c]]=parseInt(t.getComputedStyle.call(t,"padding-"+J[c]),10)||0,r[J[c]]=parseInt(t.getComputedStyle.call(t,"margin-"+J[c]),10)||0;return n&&!i||K(e,i),l.top=o.y-(n?0:e.view.scroll.y),l.left=o.x-(n?0:e.view.scroll.x),l.outerWidth=t.$.offsetWidth,l.outerHeight=t.$.offsetHeight,l.height=l.outerHeight-(s.top+s.bottom+a.top+a.bottom),l.width=l.outerWidth-(s.left+s.right+a.left+a.right),l.bottom=l.top+l.outerHeight,l.right=l.left+l.outerWidth,e.inInlineMode&&(l.scroll={top:t.$.scrollTop,left:t.$.scrollLeft}),_({border:a,padding:s,margin:r,ignoreScroll:n},l,!0)}function b(e,t,n){if(!p(t))return t.size=null;if(t.size){if(t.size.ignoreScroll==n&&t.size.date>new Date-i)return}else t.size={};return _(t.size,v(e,t,n),{date:+new Date},!0)}function y(e,t){e.view.editable=v(e,e.editable,t,!0)}function K(e,t){e.view||(e.view={});var n=e.view;!t&&n&&n.date>new Date-i||(n=(t=e.win).getScrollPosition(),t=t.getViewPaneSize(),_(e.view,{scroll:{x:n.x,y:n.y,width:e.doc.$.documentElement.scrollWidth-t.width,height:e.doc.$.documentElement.scrollHeight-t.height},pane:{width:t.width,height:t.height,bottom:t.height+n.y},date:+new Date},!0))}CKEDITOR.plugins.add("magicline",{init:function(o){var i,a,r,s=o.config,e=s.magicline_triggerOffset||30,l={editor:o,enterMode:s.enterMode,triggerOffset:e,holdDistance:0|e*(s.magicline_holdDistance||.5),boxColor:s.magicline_color||"#ff0000",rtl:"rtl"==s.contentsLangDirection,tabuList:["data-cke-hidden-sel"].concat(s.magicline_tabuList||[]),triggers:s.magicline_everywhere?z:{table:1,hr:1,div:1,ul:1,ol:1,dl:1,form:1,blockquote:1},isRelevant:function(e){return p(e)&&!E(l,e)&&!T(e)}};o.on("contentDom",function(){var e=o.editable(),t=o.document,n=o.window;_(l,{editable:e,inInlineMode:e.isInline(),doc:t,win:n,hotNode:null},!0),l.boundary=l.inInlineMode?l.editable:l.doc.getDocumentElement(),e.is(x.$inline)||(l.inInlineMode&&!C(e)&&e.setStyles({position:"relative",top:null,left:null}),function(c){var e=c.doc,t=w('<span contenteditable="false" data-cke-magic-line="1" style="'+V+"position:absolute;border-top:1px dashed "+c.boxColor+'"></span>',e),n=CKEDITOR.getUrl(this.path+"images/"+(N.hidpi?"hidpi/":"")+"icon"+(c.rtl?"-rtl":"")+".png");for(_(t,{attach:function(){return this.wrap.getParent()||this.wrap.appendTo(c.editable,!0),this},lineChildren:[_(w('<span title="'+c.editor.lang.magicline.title+'" contenteditable="false">&#8629;</span>',e),{base:V+"height:17px;width:17px;"+(c.rtl?"left":"right")+":17px;background:url("+n+") center no-repeat "+c.boxColor+";cursor:pointer;"+(N.hc?"font-size: 15px;line-height:14px;border:1px solid #fff;text-align:center;":"")+(N.hidpi?"background-size: 9px 10px;":""),looks:["top:-8px; border-radius: 2px;","top:-17px; border-radius: 2px 2px 0px 0px;","top:-1px; border-radius: 0px 0px 2px 2px;"]}),_(w(j,e),{base:W+"left:0px;border-left-color:"+c.boxColor+";",looks:["border-width:8px 0 8px 8px;top:-8px","border-width:8px 0 0 8px;top:-8px","border-width:0 0 8px 8px;top:0px"]}),_(w(j,e),{base:W+"right:0px;border-right-color:"+c.boxColor+";",looks:["border-width:8px 8px 8px 0;top:-8px","border-width:8px 8px 0 0;top:-8px","border-width:0 8px 8px 0;top:0px"]})],detach:function(){return this.wrap.getParent()&&this.wrap.remove(),this},mouseNear:function(){b(c,this);var e=c.holdDistance,t=this.size;return!!(t&&m(c.mouse.y,t.top-e,t.bottom+e)&&m(c.mouse.x,t.left-e,t.right+e))},place:function(){var e,t=c.view,n=c.editable,i=c.trigger,o=i.upper,a=i.lower,r=o||a,s=r.getParent(),l={};for(e in this.trigger=i,o&&b(c,o,!0),a&&b(c,a,!0),b(c,s,!0),c.inInlineMode&&y(c,!0),s.equals(n)?(l.left=t.scroll.x,l.right=-t.scroll.x,l.width=""):(l.left=r.size.left-r.size.margin.left+t.scroll.x-(c.inInlineMode?t.editable.left+t.editable.border.left:0),l.width=r.size.outerWidth+r.size.margin.left+r.size.margin.right+t.scroll.x,l.right=""),o&&a?l.top=o.size.margin.bottom===a.size.margin.top?0|o.size.bottom+o.size.margin.bottom/2:o.size.margin.bottom<a.size.margin.top?o.size.bottom+o.size.margin.bottom:o.size.bottom+o.size.margin.bottom-a.size.margin.top:o?a||(l.top=o.size.bottom+o.size.margin.bottom):l.top=a.size.top-a.size.margin.top,i.is(B)||m(l.top,t.scroll.y-15,t.scroll.y+5)?(l.top=c.inInlineMode?0:t.scroll.y,this.look(B)):i.is(M)||m(l.top,t.pane.bottom-5,t.pane.bottom+15)?(l.top=c.inInlineMode?t.editable.height+t.editable.padding.top+t.editable.padding.bottom:t.pane.bottom-1,this.look(M)):(c.inInlineMode&&(l.top-=t.editable.top+t.editable.border.top),this.look($)),c.inInlineMode&&(l.top--,l.top+=t.editable.scroll.top,l.left+=t.editable.scroll.left),l)l[e]=CKEDITOR.tools.cssLength(l[e]);this.setStyles(l)},look:function(e){if(this.oldLook!=e){for(var t,n=this.lineChildren.length;n--;)(t=this.lineChildren[n]).setAttribute("style",t.base+t.looks[0|e/2]);this.oldLook=e}},wrap:new k("span",c.doc)}),e=t.lineChildren.length;e--;)t.lineChildren[e].appendTo(t);t.look($),t.appendTo(t.wrap),t.unselectable(),t.lineChildren[0].on("mouseup",function(e){t.detach(),d(c,function(e){var t=c.line.trigger;e[t.is(A)?"insertBefore":"insertAfter"](t.is(A)?t.lower:t.upper)},!0),c.editor.focus(),N.ie||c.enterMode==CKEDITOR.ENTER_BR||c.hotNode.scrollIntoView(),e.data.preventDefault(!0)}),t.on("mousedown",function(e){e.data.preventDefault(!0)}),c.line=t}.call(this,l),K(l),e.attachListener(o,"beforeUndoImage",function(){l.line.detach()}),e.attachListener(o,"beforeGetData",function(){l.line.wrap.getParent()&&(l.line.detach(),o.once("getData",function(){l.line.attach()},null,null,1e3))},null,null,0),e.attachListener(l.inInlineMode?t:t.getWindow().getFrame(),"mouseout",function(e){var t,n,i;"wysiwyg"==o.mode&&(l.inInlineMode?(t=e.data.$.clientX,e=e.data.$.clientY,K(l),y(l,!0),n=l.view.editable,i=l.view.scroll,t>n.left-i.x&&t<n.right-i.x&&e>n.top-i.y&&e<n.bottom-i.y||(clearTimeout(r),r=null,l.line.detach())):(clearTimeout(r),r=null,l.line.detach()))}),e.attachListener(e,"keyup",function(){l.hiddenMode=0}),e.attachListener(e,"keydown",function(e){if("wysiwyg"==o.mode)switch(e.data.getKeystroke()){case 2228240:case 16:l.hiddenMode=1,l.line.detach()}}),e.attachListener(l.inInlineMode?e:t,"mousemove",function(e){var t;a=!0,"wysiwyg"!=o.mode||o.readOnly||r||(t={x:e.data.$.clientX,y:e.data.$.clientY},r=setTimeout(function(){l.mouse=t,r=l.trigger=null,K(l),a&&!l.hiddenMode&&o.focusManager.hasFocus&&!l.line.mouseNear()&&(l.element=G(l,!0))&&((l.trigger=D(l)||R(l)||Z(l))&&!O(l,l.trigger.upper||l.trigger.lower)?l.line.attach().place():(l.trigger=null,l.line.detach()),a=!1)},30))}),e.attachListener(n,"scroll",function(){"wysiwyg"==o.mode&&(l.line.detach(),N.webkit&&(l.hiddenMode=1,clearTimeout(i),i=setTimeout(function(){l.mouseDown||(l.hiddenMode=0)},50)))}),e.attachListener(S?t:n,"mousedown",function(){"wysiwyg"==o.mode&&(l.line.detach(),l.hiddenMode=1,l.mouseDown=1)}),e.attachListener(S?t:n,"mouseup",function(){l.hiddenMode=0,l.mouseDown=0}),o.addCommand("accessPreviousSpace",c(l)),o.addCommand("accessNextSpace",c(l,!0)),o.setKeystroke([[s.magicline_keystrokePrevious,"accessPreviousSpace"],[s.magicline_keystrokeNext,"accessNextSpace"]]),o.on("loadSnapshot",function(){var e,t,n,i;for(i in{p:1,br:1,div:1})for(e=o.document.getElementsByTag(i),n=e.count();n--;)if((t=e.getItem(n)).data("cke-magicline-hot"))return l.hotNode=t,void(l.lastCmdDirection="true"===t.data("cke-magicline-dir"))}),o._.magiclineBackdoor={accessFocusSpace:d,boxTrigger:h,isLine:E,getAscendantTrigger:f,getNonEmptyNeighbour:g,getSize:v,that:l,triggerEdge:R,triggerEditable:D,triggerExpand:Z})},this)}});var _=CKEDITOR.tools.extend,k=CKEDITOR.dom.element,w=k.createFromHtml,N=CKEDITOR.env,S=CKEDITOR.env.ie&&CKEDITOR.env.version<9,x=CKEDITOR.dtd,s={},A=128,L=64,F=32,P=16,B=4,M=2,$=1,l=" ",H=x.$listItem,q=x.$tableContent,U=_({},x.$nonEditable,x.$empty),z=x.$block,i=100,V="width:0px;height:0px;padding:0px;margin:0px;display:block;z-index:9999;color:#fff;position:absolute;font-size: 0px;line-height:0px;",W=V+"border-color:transparent;display:block;border-style:solid;",j="<span>"+l+"</span>";s[CKEDITOR.ENTER_BR]="br",s[CKEDITOR.ENTER_P]="p",s[CKEDITOR.ENTER_DIV]="div",h.prototype={set:function(e,t,n){return this.properties=e+t+(n||$),this},is:function(e){return(this.properties&e)==e}};var G=function(e,t,n){if(!e.mouse)return null;var i=e.doc,o=e.line.wrap,a=ee(i,n=n||e.mouse);return t&&E(e,a)&&(o.hide(),a=ee(i,n),o.show()),!a||a.type!=CKEDITOR.NODE_ELEMENT||!a.$||N.ie&&N.version<9&&!e.boundary.equals(a)&&!e.boundary.contains(a)?null:a},X=CKEDITOR.dom.walker.whitespaces(),Y=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT),Z=function(e){var t,n,i=o(e);return(t=i)&&(t=i.upper,n=i.lower,t=!(!t||!n||T(n)||T(t)||n.equals(t)||t.equals(n)||n.contains(t)||t.contains(n))&&!!(I(e,t)&&I(e,n)&&u(0,t,n))),t?i:null},J=["top","left","right","bottom"];function o(t){var e,n,i;if(!p(d=t.element)||d.contains(t.editable)||d.isReadOnly())return null;if(u(0,e=(i=function(e,t,n,i){for(var o=i,a=i,r=0,s=!1,l=!1,c=e.view.pane.height,d=e.mouse;d.y+r<c&&0<d.y-r&&(s=s||t(o,i),l=l||t(a,i),!s&&0<d.y-r&&(o=n(e,{x:d.x,y:d.y-r})),!l&&d.y+r<c&&(a=n(e,{x:d.x,y:d.y+r})),!s||!l);)r+=2;return new h([o,a,null,null])}(t,function(e,t){return!t.equals(e)},function(e,t){return G(e,!0,t)},d)).upper,n=i.lower))return i.set(F,8);if(e&&d.contains(e))for(;!e.getParent().equals(d);)e=e.getParent();else e=d.getFirst(function(e){return Q(t,e)});if(n&&d.contains(n))for(;!n.getParent().equals(d);)n=n.getParent();else n=d.getLast(function(e){return Q(t,e)});if(!e||!n)return null;if(b(t,e),b(t,n),!m(t.mouse.y,e.size.top,n.size.bottom))return null;for(var o,a,r,s,l,c,d=Number.MAX_VALUE;n&&!n.equals(e)&&(o=e.getNext(t.isRelevant));)(c=Math.abs((c=o,b(s=t,l=e),b(s,c),s=l.size.bottom,c=c.size.top,(s&&c?0|(s+c)/2:s||c)-t.mouse.y)))<d&&(d=c,a=e,r=o),b(t,e=o);return a&&r&&m(t.mouse.y,a.size.top,r.size.bottom)?(i.upper=a,i.lower=r,i.set(F,8)):null}function Q(e,t){return!(t&&t.type==CKEDITOR.NODE_TEXT||Y(t)||T(t)||E(e,t)||t.type==CKEDITOR.NODE_ELEMENT&&t.$&&t.is("br"))}function ee(e,t){t=e.$.elementFromPoint(t.x,t.y);return t&&t.nodeType?new CKEDITOR.dom.element(t):null}}(),CKEDITOR.config.magicline_keystrokePrevious=CKEDITOR.CTRL+CKEDITOR.SHIFT+51,CKEDITOR.config.magicline_keystrokeNext=CKEDITOR.CTRL+CKEDITOR.SHIFT+52,CKEDITOR.plugins.add("maximize",{init:function(a){function r(){var e=c.getViewPaneSize();a.resize(e.width,e.height,null,!0)}var s,l,c,d,u,h,f;a.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&(s=a.lang,l=CKEDITOR.document,c=l.getWindow(),f=CKEDITOR.TRISTATE_OFF,a.addCommand("maximize",{modes:{wysiwyg:!CKEDITOR.env.iOS,source:!CKEDITOR.env.iOS},readOnly:1,editorFocus:!1,exec:function(){var e,t=a.container.getFirst(function(e){return e.type==CKEDITOR.NODE_ELEMENT&&e.hasClass("cke_inner")}),n=a.ui.space("contents");if(u="wysiwyg"==a.mode?(i=a.getSelection(),d=i&&i.getRanges(),c.getScrollPosition()):(e=a.editable().$,d=!CKEDITOR.env.ie&&[e.selectionStart,e.selectionEnd],[e.scrollLeft,e.scrollTop]),this.state==CKEDITOR.TRISTATE_OFF){for(c.on("resize",r),h=c.getScrollPosition(),i=a.container;i=i.getParent();)i.setCustomData("maximize_saved_styles",Ot(i)),i.setStyle("z-index",a.config.baseFloatZIndex-5);n.setCustomData("maximize_saved_styles",Ot(n,!0)),t.setCustomData("maximize_saved_styles",Ot(t,!0)),n={overflow:CKEDITOR.env.webkit?"":"hidden",width:0,height:0},l.getDocumentElement().setStyles(n),CKEDITOR.env.gecko||l.getDocumentElement().setStyle("position","fixed"),CKEDITOR.env.gecko&&CKEDITOR.env.quirks||l.getBody().setStyles(n),CKEDITOR.env.ie?setTimeout(function(){c.$.scrollTo(0,0)},0):c.$.scrollTo(0,0),t.setStyle("position",CKEDITOR.env.gecko&&CKEDITOR.env.quirks?"fixed":"absolute"),t.$.offsetLeft,t.setStyles({"z-index":a.config.baseFloatZIndex-5,left:"0px",top:"0px"}),t.addClass("cke_maximized"),r(),n=t.getDocumentPosition(),t.setStyles({left:-1*n.x+"px",top:-1*n.y+"px"}),CKEDITOR.env.gecko&&Rt(a)}else if(this.state==CKEDITOR.TRISTATE_ON){c.removeListener("resize",r);for(var i=[n,t],o=0;o<i.length;o++)Dt(i[o],i[o].getCustomData("maximize_saved_styles")),i[o].removeCustomData("maximize_saved_styles");for(i=a.container;i=i.getParent();)Dt(i,i.getCustomData("maximize_saved_styles")),i.removeCustomData("maximize_saved_styles");CKEDITOR.env.ie?setTimeout(function(){c.$.scrollTo(h.x,h.y)},0):c.$.scrollTo(h.x,h.y),t.removeClass("cke_maximized"),CKEDITOR.env.webkit&&(t.setStyle("display","inline"),setTimeout(function(){t.setStyle("display","block")},0)),a.fire("resize",{outerHeight:a.container.$.offsetHeight,contentsHeight:n.$.offsetHeight,outerWidth:a.container.$.offsetWidth})}this.toggleState(),(i=this.uiItems[0])&&(n=this.state==CKEDITOR.TRISTATE_OFF?s.maximize.maximize:s.maximize.minimize,(i=CKEDITOR.document.getById(i._.id)).getChild(1).setHtml(n),i.setAttribute("title",n),i.setAttribute("href",'javascript:void("'+n+'");')),"wysiwyg"==a.mode?d?(CKEDITOR.env.gecko&&Rt(a),a.getSelection().selectRanges(d),(e=a.getSelection().getStartElement())&&e.scrollIntoView(!0)):c.$.scrollTo(u.x,u.y):(d&&(e.selectionStart=d[0],e.selectionEnd=d[1]),e.scrollLeft=u[0],e.scrollTop=u[1]),d=u=null,f=this.state,a.fire("maximize",this.state)},canUndo:!1}),a.ui.addButton&&a.ui.addButton("Maximize",{label:s.maximize.maximize,command:"maximize",toolbar:"tools,10"}),a.on("mode",function(){var e=a.getCommand("maximize");e.setState(e.state==CKEDITOR.TRISTATE_DISABLED?CKEDITOR.TRISTATE_DISABLED:f)},null,null,100))}}),CKEDITOR.plugins.add("xml",{}),CKEDITOR.xml=function(e){var t=null;if("object"==typeof e)t=e;else if(e=(e||"").replace(/&nbsp;/g," "),"ActiveXObject"in window){try{t=new ActiveXObject("MSXML2.DOMDocument")}catch(e){try{t=new ActiveXObject("Microsoft.XmlDom")}catch(e){}}t&&(t.async=!1,t.resolveExternals=!1,t.validateOnParse=!1,t.loadXML(e))}else window.DOMParser&&(t=(new DOMParser).parseFromString(e,"text/xml"));this.baseXml=t},CKEDITOR.xml.prototype={selectSingleNode:function(e,t){var n=this.baseXml;if(t=t||n){if("selectSingleNode"in t)return t.selectSingleNode(e);if(n.evaluate)return(n=n.evaluate(e,t,null,9,null))&&n.singleNodeValue||null}return null},selectNodes:function(e,t){var n,i=this.baseXml,o=[];if(t=t||i){if("selectNodes"in t)return t.selectNodes(e);if(i.evaluate&&(i=i.evaluate(e,t,null,5,null)))for(;n=i.iterateNext();)o.push(n)}return o},getInnerXml:function(e,t){var n=this.selectSingleNode(e,t),i=[];if(n)for(n=n.firstChild;n;)n.xml?i.push(n.xml):window.XMLSerializer&&i.push((new XMLSerializer).serializeToString(n)),n=n.nextSibling;return i.length?i.join(""):null}},CKEDITOR.plugins.add("ajax",{requires:"xml"}),CKEDITOR.ajax={load:function(e,t,n){return Tt(e,t,n||"text")},post:function(e,t,n,i){return function(e,t,n,i,o){var a=Et();if(!a)return null;a.open("POST",e,!0),a.onreadystatechange=function(){4==a.readyState&&(i&&i(pt(a,o)),a=null)},a.setRequestHeader("Content-type",n||"application/x-www-form-urlencoded; charset=UTF-8"),a.send(t)}(e,t,n,i,"text")},loadXml:function(e,t){return Tt(e,t,"xml")},loadText:function(e,t){return Tt(e,t,"text")},loadBinary:function(e,t){return Tt(e,t,"arraybuffer")}},s=[],l=CKEDITOR.tools.createClass({$:function(){this.handlers=[]},proto:{register:function(e){"number"!=typeof e.priority&&(e.priority=10),this.handlers.push(e)},addPasteListener:function(o){o.on("paste",function(e){var t,n,i,t=(t=this.handlers,n=e,CKEDITOR.tools.array.filter(t,function(e){return e.canHandle(n)}).sort(function(e,t){return e.priority===t.priority?0:e.priority-t.priority}));if(0!==t.length){if(i=CKEDITOR.tools.array.reduce(t,function(e,t){return CKEDITOR.tools.array.isArray(t.filters)?e.concat(t.filters):e},[]),!mt(CKEDITOR.tools.array.filter(i,function(e,t){return CKEDITOR.tools.array.indexOf(i,e)===t}),function(){return o.fire("paste",e.data)}))return e.cancel();!function e(t,n){var i=t.shift();i&&i.handle(n,function(){e(t,n)})}(t,e)}},this,null,3)}}}),CKEDITOR.plugins.add("pastetools",{requires:["clipboard","ajax"],beforeInit:function(e){e.pasteTools=new l,e.pasteTools.addPasteListener(e)}}),CKEDITOR.plugins.pastetools={filters:{},loadFilters:mt,createFilter:function(e){var a=CKEDITOR.tools.array.isArray(e.rules)?e.rules:[e.rules],r=e.additionalTransforms;return function(t,n){var e,i=new CKEDITOR.htmlParser.basicWriter,o=new CKEDITOR.htmlParser.filter;return r&&(t=r(t,n)),CKEDITOR.tools.array.forEach(a,function(e){o.addRules(e(t,n,o))}),e=CKEDITOR.htmlParser.fragment.fromHtml(t),o.applyTo(e),e.writeHtml(i),i.getHtml()}},getClipboardData:function(e,t){var n;return CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"text/html"===t?(n=e.dataTransfer.getData(t,!0))||"text/html"!==t?n:e.dataValue:null},getConfigValue:function(e,t){if(e&&e.config){var n=CKEDITOR.tools,e=e.config,i=n.object.keys(e),t=["pasteTools_"+t,"pasteFromWord_"+t,"pasteFromWord"+n.capitalize(t,!0)];return e[t=n.array.find(t,function(e){return-1!==n.array.indexOf(i,e)})]}},getContentGeneratorName:function(e){if((e=/<meta\s+name=["']?generator["']?\s+content=["']?(\w+)/gi.exec(e))&&e.length)return 0===(e=e[1].toLowerCase()).indexOf("microsoft")?"microsoft":0===e.indexOf("libreoffice")?"libreoffice":"unknown"}},CKEDITOR.pasteFilters=CKEDITOR.plugins.pastetools.filters,CKEDITOR.plugins.add("pastefromgdocs",{requires:"pastetools",init:function(i){var e=CKEDITOR.plugins.getPath("pastetools"),t=this.path;i.pasteTools.register({filters:[CKEDITOR.getUrl(e+"filter/common.js"),CKEDITOR.getUrl(t+"filter/default.js")],canHandle:function(e){return/id=(\"|\')?docs\-internal\-guid\-/.test(e.data.dataValue)},handle:function(e,t){var n=e.data,e=CKEDITOR.plugins.pastetools.getClipboardData(n,"text/html");n.dontFilter=!0,n.dataValue=CKEDITOR.pasteFilters.gdocs(e,i),!0===i.config.forcePasteAsPlainText&&(n.type="text"),t()}})}}),CKEDITOR.plugins.add("pastefromlibreoffice",{requires:"pastetools",isSupportedEnvironment:function(){var e=CKEDITOR.env.ie&&CKEDITOR.env.version<=11;return!(CKEDITOR.env.webkit&&!CKEDITOR.env.chrome||e)},init:function(i){var e,t;this.isSupportedEnvironment()&&(e=CKEDITOR.plugins.getPath("pastetools"),t=this.path,i.pasteTools.register({priority:100,filters:[CKEDITOR.getUrl(e+"filter/common.js"),CKEDITOR.getUrl(e+"filter/image.js"),CKEDITOR.getUrl(t+"filter/default.js")],canHandle:function(e){return!!(e=(e=e.data).dataTransfer.getData("text/html",!0)||e.dataValue)&&"libreoffice"===CKEDITOR.plugins.pastetools.getContentGeneratorName(e)},handle:function(e,t){var n=e.data,e=n.dataValue||CKEDITOR.plugins.pastetools.getClipboardData(n,"text/html");n.dontFilter=!0,e=CKEDITOR.pasteFilters.image(e,i,CKEDITOR.plugins.pastetools.getClipboardData(n,"text/rtf")),n.dataValue=CKEDITOR.pasteFilters.libreoffice(e,i),!0===i.config.forcePasteAsPlainText&&(n.type="text"),t()}}))}}),CKEDITOR.plugins.add("pastefromword",{requires:"pastetools",init:function(o){var a=0,e=CKEDITOR.plugins.getPath("pastetools"),t=this.path,r=void 0===o.config.pasteFromWord_inlineImages||o.config.pasteFromWord_inlineImages,e=[CKEDITOR.getUrl(e+"filter/common.js"),CKEDITOR.getUrl(e+"filter/image.js"),CKEDITOR.getUrl(t+"filter/default.js")];o.addCommand("pastefromword",{canUndo:!1,async:!0,exec:function(e,t){a=1,e.execCommand("paste",{type:"html",notification:!t||void 0===t.notification||t.notification})}}),CKEDITOR.plugins.clipboard.addPasteButton(o,"PasteFromWord",{label:o.lang.pastefromword.toolbar,command:"pastefromword",toolbar:"clipboard,50"}),o.pasteTools.register({filters:o.config.pasteFromWordCleanupFile?[o.config.pasteFromWordCleanupFile]:e,canHandle:function(e){e=CKEDITOR.plugins.pastetools.getClipboardData(e.data,"text/html");var t=(t=CKEDITOR.plugins.pastetools.getContentGeneratorName(e))?"microsoft"===t:/(class="?Mso|style=["'][^"]*?\bmso\-|w:WordDocument|<o:\w+>|<\/font>)/.test(e);return e&&(a||t)},handle:function(e,t){var n=e.data,i=CKEDITOR.plugins.pastetools.getClipboardData(n,"text/html"),e=CKEDITOR.plugins.pastetools.getClipboardData(n,"text/rtf");!1===o.fire("pasteFromWord",i={dataValue:i,dataTransfer:{"text/rtf":e}})&&!a||(n.dontFilter=!0,!a&&o.config.pasteFromWordPromptCleanup&&!confirm(o.lang.pastefromword.confirmCleanup)||(i.dataValue=CKEDITOR.cleanWord(i.dataValue,o),CKEDITOR.plugins.clipboard.isCustomDataTypesSupported&&r&&CKEDITOR.pasteFilters.image&&(i.dataValue=CKEDITOR.pasteFilters.image(i.dataValue,o,e)),o.fire("afterPasteFromWord",i),n.dataValue=i.dataValue,!0===o.config.forcePasteAsPlainText?n.type="text":CKEDITOR.plugins.clipboard.isCustomCopyCutSupported||"allow-word"!==o.config.forcePasteAsPlainText||(n.type="html")),a=0,t())}})}}),i={canUndo:!1,async:!0,exec:function(e,t){var n=e.lang,i=CKEDITOR.tools.keystrokeToString(n.common.keyboard,e.getCommandKeystroke(CKEDITOR.env.ie?e.commands.paste:this)),t=t&&void 0!==t.notification?t.notification:!t||!t.from||"keystrokeHandler"===t.from&&CKEDITOR.env.ie,n=t&&"string"==typeof t?t:n.pastetext.pasteNotification.replace(/%1/,'<kbd aria-label="'+i.aria+'">'+i.display+"</kbd>");e.execCommand("paste",{type:"text",notification:!!t&&n})}},CKEDITOR.plugins.add("pastetext",{requires:"clipboard",init:function(t){var e=CKEDITOR.env.safari?CKEDITOR.CTRL+CKEDITOR.ALT+CKEDITOR.SHIFT+86:CKEDITOR.CTRL+CKEDITOR.SHIFT+86;t.addCommand("pastetext",i),t.setKeystroke(e,"pastetext"),CKEDITOR.plugins.clipboard.addPasteButton(t,"PasteText",{label:t.lang.pastetext.button,command:"pastetext",toolbar:"clipboard,40"}),t.config.forcePasteAsPlainText&&t.on("beforePaste",function(e){"html"!=e.data.type&&(e.data.type="text")}),t.on("pasteState",function(e){t.getCommand("pastetext").setState(e.data)})}}),CKEDITOR.plugins.add("removeformat",{init:function(e){e.addCommand("removeFormat",CKEDITOR.plugins.removeformat.commands.removeformat),e.ui.addButton&&e.ui.addButton("RemoveFormat",{label:e.lang.removeformat.toolbar,command:"removeFormat",toolbar:"cleanup,10"})}}),CKEDITOR.plugins.removeformat={commands:{removeformat:{exec:function(a){function e(e){return e.type==CKEDITOR.NODE_ELEMENT}for(var t,r=a._.removeFormatRegex||(a._.removeFormatRegex=new RegExp("^(?:"+a.config.removeFormatTags.replace(/,/g,"|")+")$","i")),n=a._.removeAttributes||(a._.removeAttributes=a.config.removeFormatAttributes.split(",")),s=CKEDITOR.plugins.removeformat.filter,i=a.getSelection().getRanges(),o=i.createIterator();t=o.getNextRange();){t.enlarge(CKEDITOR.ENLARGE_INLINE);var l=t.createBookmark(),c=l.startNode,d=l.endNode,u=function(e){for(var t,n=a.elementPath(e),i=n.elements,o=1;(t=i[o])&&!t.equals(n.block)&&!t.equals(n.blockLimit);o++)r.test(t.getName())&&s(a,t)&&e.breakParent(t)};if(u(c),d)for(u(d),c=c.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT);c&&!c.equals(d);)if(c.isReadOnly()){if(c.getPosition(d)&CKEDITOR.POSITION_CONTAINS)break;c=c.getNext(e)}else u=c.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT),"img"==c.getName()&&c.data("cke-realelement")||!s(a,c)||(r.test(c.getName())?c.remove(1):(c.removeAttributes(n),a.fire("removeFormatCleanup",c))),c=u;t.moveToBookmark(l)}a.forceNextSelectionCheck(),a.getSelection().selectRanges(i)}}},filter:function(e,t){for(var n=e._.removeFormatFilters||[],i=0;i<n.length;i++)if(!1===n[i](t))return!1;return!0}},CKEDITOR.editor.prototype.addRemoveFormatFilter=function(e){this._.removeFormatFilters||(this._.removeFormatFilters=[]),this._.removeFormatFilters.push(e)},CKEDITOR.config.removeFormatTags="b,big,cite,code,del,dfn,em,font,i,ins,kbd,q,s,samp,small,span,strike,strong,sub,sup,tt,u,var",CKEDITOR.config.removeFormatAttributes="class,style,lang,width,height,align,hspace,valign",CKEDITOR.plugins.add("resize",{init:function(o){function t(e){var t=r.width,n=r.height,i=t+(e.data.$.screenX-a.x)*("rtl"==h?-1:1);e=n+(e.data.$.screenY-a.y),s&&(t=Math.max(d.resize_minWidth,Math.min(i,d.resize_maxWidth))),l&&(n=Math.max(d.resize_minHeight,Math.min(e,d.resize_maxHeight))),o.resize(s?t:null,n)}function n(){CKEDITOR.document.removeListener("mousemove",t),CKEDITOR.document.removeListener("mouseup",n),o.document&&(o.document.removeListener("mousemove",t),o.document.removeListener("mouseup",n))}var i,a,r,s,l,c,d=o.config,u=o.ui.spaceId("resizer"),h=o.element?o.element.getDirection(1):"ltr";d.resize_dir||(d.resize_dir="vertical"),void 0===d.resize_maxWidth&&(d.resize_maxWidth=3e3),void 0===d.resize_maxHeight&&(d.resize_maxHeight=3e3),void 0===d.resize_minWidth&&(d.resize_minWidth=750),void 0===d.resize_minHeight&&(d.resize_minHeight=250),!1!==d.resize_enabled&&(i=null,s=("both"==d.resize_dir||"horizontal"==d.resize_dir)&&d.resize_minWidth!=d.resize_maxWidth,l=("both"==d.resize_dir||"vertical"==d.resize_dir)&&d.resize_minHeight!=d.resize_maxHeight,c=CKEDITOR.tools.addFunction(function(e){i=i||o.getResizable(),r={width:i.$.offsetWidth||0,height:i.$.offsetHeight||0},a={x:e.screenX,y:e.screenY},d.resize_minWidth>r.width&&(d.resize_minWidth=r.width),d.resize_minHeight>r.height&&(d.resize_minHeight=r.height),CKEDITOR.document.on("mousemove",t),CKEDITOR.document.on("mouseup",n),o.document&&(o.document.on("mousemove",t),o.document.on("mouseup",n)),e.preventDefault&&e.preventDefault()}),o.on("destroy",function(){CKEDITOR.tools.removeFunction(c)}),o.on("uiSpace",function(e){var t,n;"bottom"==e.data.space&&(n='<span id="'+u+'" class="cke_resizer'+(t=!s&&l?" cke_resizer_vertical":s&&!l?" cke_resizer_horizontal":"")+" cke_resizer_"+h+'" title="'+CKEDITOR.tools.htmlEncode(o.lang.common.resize)+'" onmousedown="CKEDITOR.tools.callFunction('+c+', event)">'+("ltr"==h?"◢":"◣")+"</span>","ltr"==h&&"ltr"==t?e.data.html+=n:e.data.html=n+e.data.html)},o,null,100),o.on("maximize",function(e){o.ui.space("resizer")[e.data==CKEDITOR.TRISTATE_ON?"hide":"show"]()}))}}),CKEDITOR.plugins.add("menubutton",{requires:"button,menu",onLoad:function(){function t(t){var n=this._,e=n.menu;n.state!==CKEDITOR.TRISTATE_DISABLED&&(n.on&&e?e.hide():(n.previousState=n.state,e||((e=n.menu=new CKEDITOR.menu(t,{panel:{className:"cke_menu_panel",attributes:{"aria-label":t.lang.common.options}}})).onHide=CKEDITOR.tools.bind(function(){var e=(this.command?t.getCommand(this.command):this).modes;this.setState(!e||e[t.mode]?n.previousState:CKEDITOR.TRISTATE_DISABLED),n.on=0},this),this.onMenu&&e.addListener(this.onMenu)),this.setState(CKEDITOR.TRISTATE_ON),n.on=1,setTimeout(function(){e.show(CKEDITOR.document.getById(n.id),4)},0)))}CKEDITOR.ui.menuButton=CKEDITOR.tools.createClass({base:CKEDITOR.ui.button,$:function(e){delete e.panel,this.base(e),this.hasArrow="menu",this.click=t},statics:{handler:{create:function(e){return new CKEDITOR.ui.menuButton(e)}}}})},beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_MENUBUTTON,CKEDITOR.ui.menuButton.handler)}}),CKEDITOR.UI_MENUBUTTON="menubutton",CKEDITOR.plugins.add("scayt",{requires:"menubutton,dialog",tabToOpen:null,dialogName:"scaytDialog",onLoad:function(e){"moono-lisa"==(CKEDITOR.skinName||e.config.skin)&&CKEDITOR.document.appendStyleSheet(CKEDITOR.getUrl(this.path+"skins/"+CKEDITOR.skin.name+"/scayt.css")),CKEDITOR.document.appendStyleSheet(CKEDITOR.getUrl(this.path+"dialogs/dialog.css"));var t=!1;CKEDITOR.on("instanceLoaded",function(e){var n;!t&&CKEDITOR.plugins.autocomplete&&(t=!0,n=CKEDITOR.plugins.autocomplete.prototype.getModel,CKEDITOR.plugins.autocomplete.prototype.getModel=function(e){var t=this.editor;return(e=n.bind(this)(e)).on("change-isActive",function(e){e.data?t.fire("autocompletePanelShow"):t.fire("autocompletePanelHide")}),e})})},init:function(a){var r=this,n=CKEDITOR.plugins.scayt;this.bindEvents(a),this.parseConfig(a),this.addRule(a),CKEDITOR.dialog.add(this.dialogName,CKEDITOR.getUrl(this.path+"dialogs/options.js")),this.addMenuItems(a);var e=a.lang.scayt,t=CKEDITOR.env;a.ui.add("Scayt",CKEDITOR.UI_MENUBUTTON,{label:e.text_title,title:a.plugins.wsc?a.lang.wsc.title:e.text_title,modes:{wysiwyg:!(t.ie&&(t.version<8||t.quirks))},toolbar:"spellchecker,20",refresh:function(){var e=a.ui.instances.Scayt.getState();a.scayt&&(e=n.state.scayt[a.name]?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF),a.fire("scaytButtonState",e)},onRender:function(){var t=this;a.on("scaytButtonState",function(e){e.data,t.setState(e.data)})},onMenu:function(){var e=a.scayt;a.getMenuItem("scaytToggle").label=a.lang.scayt[e&&n.state.scayt[a.name]?"btn_disable":"btn_enable"];var t={scaytToggle:CKEDITOR.TRISTATE_OFF,scaytOptions:e?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytLangs:e?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytDict:e?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytAbout:e?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,WSC:a.plugins.wsc?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED};return a.config.scayt_uiTabs[0]||delete t.scaytOptions,a.config.scayt_uiTabs[1]||delete t.scaytLangs,a.config.scayt_uiTabs[2]||delete t.scaytDict,e&&!CKEDITOR.plugins.scayt.isNewUdSupported(e)&&(delete t.scaytDict,a.config.scayt_uiTabs[2]=0,CKEDITOR.plugins.scayt.alarmCompatibilityMessage()),t}}),a.contextMenu&&a.addMenuItems&&(a.contextMenu.addListener(function(e,t){var n,i,o=a.scayt;return o&&(i=o.getSelectionNode())&&(n=r.menuGenerator(a,i),o.showBanner("."+a.contextMenu._.definition.panel.className.split(" ").join(" ."))),n}),a.contextMenu._.onHide=CKEDITOR.tools.override(a.contextMenu._.onHide,function(t){return function(){var e=a.scayt;return e&&e.hideBanner(),t.apply(this)}}))},addMenuItems:function(n){var t=this,i=CKEDITOR.plugins.scayt;n.addMenuGroup("scaytButton");for(var e=n.config.scayt_contextMenuItemsOrder.split("|"),o=0;o<e.length;o++)e[o]="scayt_"+e[o];if((e=["grayt_description","grayt_suggest","grayt_control"].concat(e))&&e.length)for(o=0;o<e.length;o++)n.addMenuGroup(e[o],o-10);n.addCommand("scaytToggle",{exec:function(e){var t=e.scayt;i.state.scayt[e.name]=!i.state.scayt[e.name],!0===i.state.scayt[e.name]?t||i.createScayt(e):t&&i.destroy(e)}}),n.addCommand("scaytAbout",{exec:function(e){e.scayt.tabToOpen="about",i.openDialog(t.dialogName,e)}}),n.addCommand("scaytOptions",{exec:function(e){e.scayt.tabToOpen="options",i.openDialog(t.dialogName,e)}}),n.addCommand("scaytLangs",{exec:function(e){e.scayt.tabToOpen="langs",i.openDialog(t.dialogName,e)}}),n.addCommand("scaytDict",{exec:function(e){e.scayt.tabToOpen="dictionaries",i.openDialog(t.dialogName,e)}}),e={scaytToggle:{label:n.lang.scayt.btn_enable,group:"scaytButton",command:"scaytToggle"},scaytAbout:{label:n.lang.scayt.btn_about,group:"scaytButton",command:"scaytAbout"},scaytOptions:{label:n.lang.scayt.btn_options,group:"scaytButton",command:"scaytOptions"},scaytLangs:{label:n.lang.scayt.btn_langs,group:"scaytButton",command:"scaytLangs"},scaytDict:{label:n.lang.scayt.btn_dictionaries,group:"scaytButton",command:"scaytDict"}},n.plugins.wsc&&(e.WSC={label:n.lang.wsc.toolbar,group:"scaytButton",onClick:function(){var e=CKEDITOR.plugins.scayt,t=n.scayt;(n.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?n.container:n.document.getBody()).getText().replace(/\s/g,"")?(t&&e.state.scayt[n.name]&&t.setMarkupPaused&&t.setMarkupPaused(!0),n.lockSelection(),n.execCommand("checkspell")):alert("Nothing to check!")}}),n.addMenuItems(e)},bindEvents:function(a){function t(){r.destroy(a)}function o(){!r.state.scayt[a.name]||a.readOnly||a.scayt||r.createScayt(a)}function e(){!s||a.config.scayt_inlineModeImmediateMarkup?o():(a.on("blur",function(){setTimeout(t,0)}),a.on("focus",o),a.focusManager.hasFocus&&o()),function(){var e=a.editable();e.attachListener(e,"focus",function(e){var t,n;if(CKEDITOR.plugins.scayt&&!a.scayt&&setTimeout(o,0),e=CKEDITOR.plugins.scayt&&CKEDITOR.plugins.scayt.state.scayt[a.name]&&a.scayt,(s||e)&&a._.savedSelection){e=!(e=a._.savedSelection.getSelectedElement())&&a._.savedSelection.getRanges();for(var i=0;i<e.length;i++)"string"==typeof(n=e[i]).startContainer.$.nodeValue&&(((t=n.startContainer.getText().length)<n.startOffset||t<n.endOffset)&&a.unlockSelection(!1))}},this,null,-10)}();var e=a.editable();e.attachListener(e,"mousedown",function(e){e=e.data.getTarget();var t=a.widgets&&a.widgets.getByElement(e);t&&(t.wrapper=e.getAscendant(function(e){return e.hasAttribute("data-cke-widget-wrapper")},!0))},this,null,-10)}var r=CKEDITOR.plugins.scayt,s=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE;a.on("contentDom",e),a.on("beforeCommandExec",function(e){var t=a.scayt,n=!1,i=!1,o=!0;e.data.name in r.options.disablingCommandExec&&"wysiwyg"==a.mode?t&&(r.destroy(a),a.fire("scaytButtonState",CKEDITOR.TRISTATE_DISABLED)):"bold"!==e.data.name&&"italic"!==e.data.name&&"underline"!==e.data.name&&"strike"!==e.data.name&&"subscript"!==e.data.name&&"superscript"!==e.data.name&&"enter"!==e.data.name&&"cut"!==e.data.name&&"language"!==e.data.name||!t||("cut"===e.data.name&&(i=!(o=!1)),"language"===e.data.name&&(i=n=!0),a.fire("reloadMarkupScayt",{removeOptions:{removeInside:o,forceBookmark:i,language:n},timeout:0}))}),a.on("beforeSetMode",function(e){"source"==e.data&&((e=a.scayt)&&(r.destroy(a),a.fire("scaytButtonState",CKEDITOR.TRISTATE_DISABLED)),a.document&&a.document.getBody().removeAttribute("_jquid"))}),a.on("afterCommandExec",function(e){"wysiwyg"!=a.mode||"undo"!=e.data.name&&"redo"!=e.data.name||setTimeout(function(){r.reloadMarkup(a.scayt)},250)}),a.on("readOnly",function(e){var t;e&&(t=a.scayt,!0===e.editor.readOnly?t&&t.fire("removeMarkupInDocument",{}):t?r.reloadMarkup(t):"wysiwyg"==e.editor.mode&&!0===r.state.scayt[e.editor.name]&&(r.createScayt(a),e.editor.fire("scaytButtonState",CKEDITOR.TRISTATE_ON)))}),a.on("beforeDestroy",t),a.on("setData",function(){t(),a.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&!a.plugins.divarea||e()},this,null,50),a.on("reloadMarkupScayt",function(e){var t=e.data&&e.data.removeOptions,n=e.data&&e.data.timeout,i=e.data&&e.data.language,o=a.scayt;o&&setTimeout(function(){i&&(t.selectionNode=a.plugins.language.getCurrentLangElement(a),t.selectionNode=t.selectionNode&&t.selectionNode.$||null),o.removeMarkupInSelectionNode(t),r.reloadMarkup(o)},n||0)}),a.on("insertElement",function(){a.fire("reloadMarkupScayt",{removeOptions:{forceBookmark:!0}})},this,null,50),a.on("insertHtml",function(){a.scayt&&a.scayt.setFocused&&a.scayt.setFocused(!0),a.fire("reloadMarkupScayt")},this,null,50),a.on("insertText",function(){a.scayt&&a.scayt.setFocused&&a.scayt.setFocused(!0),a.fire("reloadMarkupScayt")},this,null,50),a.on("scaytDialogShown",function(e){e.data.selectPage(a.scayt.tabToOpen)}),a.on("autocompletePanelShow",function(e){(e=a.scayt)&&e.setMarkupPaused&&e.setMarkupPaused(!0)}),a.on("autocompletePanelHide",function(e){(e=a.scayt)&&e.setMarkupPaused&&e.setMarkupPaused(!1)})},parseConfig:function(e){var t,n,a,r,s,l,i=CKEDITOR.plugins.scayt;i.replaceOldOptionsNames(e.config),"boolean"!=typeof e.config.scayt_autoStartup&&(e.config.scayt_autoStartup=!1),i.state.scayt[e.name]=e.config.scayt_autoStartup,"boolean"!=typeof e.config.grayt_autoStartup&&(e.config.grayt_autoStartup=!1),"boolean"!=typeof e.config.scayt_inlineModeImmediateMarkup&&(e.config.scayt_inlineModeImmediateMarkup=!1),i.state.grayt[e.name]=e.config.grayt_autoStartup,e.config.scayt_contextCommands||(e.config.scayt_contextCommands="ignoreall|add"),e.config.scayt_contextMenuItemsOrder||(e.config.scayt_contextMenuItemsOrder="suggest|moresuggest|control"),e.config.scayt_sLang||(e.config.scayt_sLang="en_US"),(void 0===e.config.scayt_maxSuggestions||"number"!=typeof e.config.scayt_maxSuggestions||e.config.scayt_maxSuggestions<0)&&(e.config.scayt_maxSuggestions=3),(void 0===e.config.scayt_minWordLength||"number"!=typeof e.config.scayt_minWordLength||e.config.scayt_minWordLength<1)&&(e.config.scayt_minWordLength=3),void 0!==e.config.scayt_customDictionaryIds&&"string"==typeof e.config.scayt_customDictionaryIds||(e.config.scayt_customDictionaryIds=""),void 0!==e.config.scayt_userDictionaryName&&"string"==typeof e.config.scayt_userDictionaryName||(e.config.scayt_userDictionaryName=null),"string"==typeof e.config.scayt_uiTabs&&3===e.config.scayt_uiTabs.split(",").length?(t=[],n=[],e.config.scayt_uiTabs=e.config.scayt_uiTabs.split(","),CKEDITOR.tools.search(e.config.scayt_uiTabs,function(e){1===Number(e)||0===Number(e)?(n.push(!0),t.push(Number(e))):n.push(!1)}),null===CKEDITOR.tools.search(n,!1)?e.config.scayt_uiTabs=t:e.config.scayt_uiTabs=[1,1,1]):e.config.scayt_uiTabs=[1,1,1],"string"!=typeof e.config.scayt_serviceProtocol&&(e.config.scayt_serviceProtocol=null),"string"!=typeof e.config.scayt_serviceHost&&(e.config.scayt_serviceHost=null),"string"!=typeof e.config.scayt_servicePort&&(e.config.scayt_servicePort=null),"string"!=typeof e.config.scayt_servicePath&&(e.config.scayt_servicePath=null),e.config.scayt_moreSuggestions||(e.config.scayt_moreSuggestions="on"),"string"!=typeof e.config.scayt_customerId&&(e.config.scayt_customerId="1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2"),"string"!=typeof e.config.scayt_customPunctuation&&(e.config.scayt_customPunctuation="-"),"string"!=typeof e.config.scayt_srcUrl&&(i=-1!=(i=document.location.protocol).search(/https?:/)?i:"http:",e.config.scayt_srcUrl=i+"//svc.webspellchecker.net/spellcheck31/wscbundle/wscbundle.js"),"boolean"!=typeof CKEDITOR.config.scayt_handleCheckDirty&&(CKEDITOR.config.scayt_handleCheckDirty=!0),"boolean"!=typeof CKEDITOR.config.scayt_handleUndoRedo&&(CKEDITOR.config.scayt_handleUndoRedo=!0),CKEDITOR.config.scayt_handleUndoRedo=!!CKEDITOR.plugins.undo&&CKEDITOR.config.scayt_handleUndoRedo,e.config.scayt_ignoreAllCapsWords&&"boolean"!=typeof e.config.scayt_ignoreAllCapsWords&&(e.config.scayt_ignoreAllCapsWords=!1),e.config.scayt_ignoreDomainNames&&"boolean"!=typeof e.config.scayt_ignoreDomainNames&&(e.config.scayt_ignoreDomainNames=!1),e.config.scayt_ignoreWordsWithMixedCases&&"boolean"!=typeof e.config.scayt_ignoreWordsWithMixedCases&&(e.config.scayt_ignoreWordsWithMixedCases=!1),e.config.scayt_ignoreWordsWithNumbers&&"boolean"!=typeof e.config.scayt_ignoreWordsWithNumbers&&(e.config.scayt_ignoreWordsWithNumbers=!1),e.config.scayt_disableOptionsStorage&&(i=CKEDITOR.tools.isArray(e.config.scayt_disableOptionsStorage)?e.config.scayt_disableOptionsStorage:"string"==typeof e.config.scayt_disableOptionsStorage?[e.config.scayt_disableOptionsStorage]:void 0,a="all options lang ignore-all-caps-words ignore-domain-names ignore-words-with-mixed-cases ignore-words-with-numbers".split(" "),r=["lang","ignore-all-caps-words","ignore-domain-names","ignore-words-with-mixed-cases","ignore-words-with-numbers"],s=CKEDITOR.tools.search,l=CKEDITOR.tools.indexOf,e.config.scayt_disableOptionsStorage=function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n],o=!!s(e,"options");if(!s(a,i)||o&&s(r,function(e){if("lang"===e)return!1}))return;if(s(r,i)&&r.splice(l(r,i),1),"all"===i||o&&s(e,"lang"))return[];"options"===i&&(r=["lang"])}return t.concat(r)}(i))},addRule:function(n){var i=CKEDITOR.plugins.scayt,e=(o=n.dataProcessor)&&o.htmlFilter,t=n._.elementsPath&&n._.elementsPath.filters,o=o&&o.dataFilter,a=n.addRemoveFormatFilter;t&&t.push(function(e){if(n.scayt&&(e.hasAttribute(i.options.data_attribute_name)||e.hasAttribute(i.options.problem_grammar_data_attribute)))return!1}),o&&o.addRules({elements:{span:function(e){var t=e.hasClass(i.options.misspelled_word_class)&&e.attributes[i.options.data_attribute_name],n=e.hasClass(i.options.problem_grammar_class)&&e.attributes[i.options.problem_grammar_data_attribute];return i&&(t||n)&&delete e.name,e}}}),e&&e.addRules({elements:{span:function(e){var t=e.hasClass(i.options.misspelled_word_class)&&e.attributes[i.options.data_attribute_name],n=e.hasClass(i.options.problem_grammar_class)&&e.attributes[i.options.problem_grammar_data_attribute];return i&&(t||n)&&delete e.name,e}}}),a&&a.call(n,function(e){var t=!0;return t=n.scayt&&(e.hasAttribute(i.options.data_attribute_name)||e.hasAttribute(i.options.problem_grammar_data_attribute))?!1:t})},scaytMenuDefinition:function(e){var t=this,n=CKEDITOR.plugins.scayt;return{scayt:{scayt_ignore:{label:(e=e.scayt).getLocal("btn_ignore"),group:"scayt_control",order:1,exec:function(e){e.scayt.ignoreWord()}},scayt_ignoreall:{label:e.getLocal("btn_ignoreAll"),group:"scayt_control",order:2,exec:function(e){e.scayt.ignoreAllWords()}},scayt_add:{label:e.getLocal("btn_addWord"),group:"scayt_control",order:3,exec:function(e){var t=e.scayt;setTimeout(function(){t.addWordToUserDictionary()},10)}},scayt_option:{label:e.getLocal("btn_options"),group:"scayt_control",order:4,exec:function(e){e.scayt.tabToOpen="options",n.openDialog(t.dialogName,e)},verification:function(e){return 1==e.config.scayt_uiTabs[0]}},scayt_language:{label:e.getLocal("btn_langs"),group:"scayt_control",order:5,exec:function(e){e.scayt.tabToOpen="langs",n.openDialog(t.dialogName,e)},verification:function(e){return 1==e.config.scayt_uiTabs[1]}},scayt_dictionary:{label:e.getLocal("btn_dictionaries"),group:"scayt_control",order:6,exec:function(e){e.scayt.tabToOpen="dictionaries",n.openDialog(t.dialogName,e)},verification:function(e){return 1==e.config.scayt_uiTabs[2]}},scayt_about:{label:e.getLocal("btn_about"),group:"scayt_control",order:7,exec:function(e){e.scayt.tabToOpen="about",n.openDialog(t.dialogName,e)}}},grayt:{grayt_problemdescription:{label:"Grammar problem description",group:"grayt_description",order:1,state:CKEDITOR.TRISTATE_DISABLED,exec:function(e){}},grayt_ignore:{label:e.getLocal("btn_ignore"),group:"grayt_control",order:2,exec:function(e){e.scayt.ignorePhrase()}},grayt_ignoreall:{label:e.getLocal("btn_ignoreAll"),group:"grayt_control",order:3,exec:function(e){e.scayt.ignoreAllPhrases()}}}}},buildSuggestionMenuItems:function(e,t,n){var i={},o={},a=n?"word":"phrase",r=n?"startGrammarCheck":"startSpellCheck",s=e.scayt;if(0<t.length&&"no_any_suggestions"!==t[0])if(n)for(n=0;n<t.length;n++){var l="scayt_suggest_"+CKEDITOR.plugins.scayt.suggestions[n].replace(" ","_");e.addCommand(l,this.createCommand(CKEDITOR.plugins.scayt.suggestions[n],a,r)),n<e.config.scayt_maxSuggestions?(e.addMenuItem(l,{label:t[n],command:l,group:"scayt_suggest",order:n+1}),i[l]=CKEDITOR.TRISTATE_OFF):(e.addMenuItem(l,{label:t[n],command:l,group:"scayt_moresuggest",order:n+1}),o[l]=CKEDITOR.TRISTATE_OFF,"on"===e.config.scayt_moreSuggestions&&(e.addMenuItem("scayt_moresuggest",{label:s.getLocal("btn_moreSuggestions"),group:"scayt_moresuggest",order:10,getItems:function(){return o}}),i.scayt_moresuggest=CKEDITOR.TRISTATE_OFF))}else for(n=0;n<t.length;n++)l="grayt_suggest_"+CKEDITOR.plugins.scayt.suggestions[n].replace(" ","_"),e.addCommand(l,this.createCommand(CKEDITOR.plugins.scayt.suggestions[n],a,r)),e.addMenuItem(l,{label:t[n],command:l,group:"grayt_suggest",order:n+1}),i[l]=CKEDITOR.TRISTATE_OFF;else i.no_scayt_suggest=CKEDITOR.TRISTATE_DISABLED,e.addCommand("no_scayt_suggest",{exec:function(){}}),e.addMenuItem("no_scayt_suggest",{label:s.getLocal("btn_noSuggestions")||"no_scayt_suggest",command:"no_scayt_suggest",group:"scayt_suggest",order:0});return i},menuGenerator:function(e,t){var n,i,o=e.scayt,a=this.scaytMenuDefinition(e),r={},s=e.config.scayt_contextCommands.split("|"),l=t.getAttribute(o.getLangAttribute())||o.getLang(),c=o.isScaytNode(t),d=o.isGraytNode(t);if(c?(a=a.scayt,n=t.getAttribute(o.getScaytNodeAttributeName()),o.fire("getSuggestionsList",{lang:l,word:n}),r=this.buildSuggestionMenuItems(e,CKEDITOR.plugins.scayt.suggestions,c)):d&&(a=a.grayt,r=t.getAttribute(o.getGraytNodeAttributeName()),o.getGraytNodeRuleAttributeName?(n=t.getAttribute(o.getGraytNodeRuleAttributeName()),o.getProblemDescriptionText(r,n,l)):o.getProblemDescriptionText(r,l),t=o.getProblemDescriptionText(r,n,l),a.grayt_problemdescription&&t&&(t=t.replace(/([.!?])\s/g,"$1<br>"),a.grayt_problemdescription.label=t),o.fire("getGrammarSuggestionsList",{lang:l,phrase:r,rule:n}),r=this.buildSuggestionMenuItems(e,CKEDITOR.plugins.scayt.suggestions,c)),c&&"off"==e.config.scayt_contextCommands)return r;for(i in a)c&&-1==CKEDITOR.tools.indexOf(s,i.replace("scayt_",""))&&"all"!=e.config.scayt_contextCommands||d&&"grayt_problemdescription"!==i&&-1==CKEDITOR.tools.indexOf(s,i.replace("grayt_",""))&&"all"!=e.config.scayt_contextCommands||(r[i]=void 0!==a[i].state?a[i].state:CKEDITOR.TRISTATE_OFF,"function"!=typeof a[i].verification||a[i].verification(e)||delete r[i],e.addCommand(i,{exec:a[i].exec}),e.addMenuItem(i,{label:e.lang.scayt[a[i].label]||a[i].label,command:i,group:a[i].group,order:a[i].order}));return r},createCommand:function(n,i,o){return{exec:function(e){e=e.scayt;var t={};t[i]=n,e.replaceSelectionNode(t),"startGrammarCheck"===o&&e.removeMarkupInSelectionNode({grammarOnly:!0}),e.fire(o)}}}}),CKEDITOR.plugins.scayt={charsToObserve:[{charName:"cke-fillingChar",charCode:function(){var e,t,n=CKEDITOR.version,i=[4,5,6],o=String.fromCharCode(8203),a=Array(8).join(o);if(!n)return o;for(var n=n.split("."),r=0;r<i.length;r++){if((e=i[r])<(t=Number(n[r])))return a;if(t<e)break}return o}()}],state:{scayt:{},grayt:{}},warningCounter:0,suggestions:[],options:{disablingCommandExec:{source:!0,newpage:!0,templates:!0},data_attribute_name:"data-scayt-word",misspelled_word_class:"scayt-misspell-word",problem_grammar_data_attribute:"data-grayt-phrase",problem_grammar_class:"gramm-problem"},backCompatibilityMap:{scayt_service_protocol:"scayt_serviceProtocol",scayt_service_host:"scayt_serviceHost",scayt_service_port:"scayt_servicePort",scayt_service_path:"scayt_servicePath",scayt_customerid:"scayt_customerId"},openDialog:function(e,t){var n=t.scayt;n.isAllModulesReady&&!1===n.isAllModulesReady()||(t.lockSelection(),t.openDialog(e))},alarmCompatibilityMessage:function(){this.warningCounter<5&&(console.warn("You are using the latest version of SCAYT plugin for CKEditor with the old application version. In order to have access to the newest features, it is recommended to upgrade the application version to latest one as well. Contact us for more details at support@webspellchecker.net."),this.warningCounter+=1)},isNewUdSupported:function(e){return!!e.getUserDictionary},reloadMarkup:function(e){var t;e&&(t=e.getScaytLangList(),e.reloadMarkup?e.reloadMarkup():(this.alarmCompatibilityMessage(),t&&t.ltr&&t.rtl&&e.fire("startSpellCheck, startGrammarCheck")))},replaceOldOptionsNames:function(e){for(var t in e)t in this.backCompatibilityMap&&(e[this.backCompatibilityMap[t]]=e[t],delete e[t])},createScayt:function(e){var a=this,r=CKEDITOR.plugins.scayt;this.loadScaytLibrary(e,function(i){function t(e){return new SCAYT.CKSCAYT(e,function(){},function(){})}if(o=i.window?"BODY"==i.editable().$.nodeName?i.window.getFrame():i.editable():o){var n,o={lang:i.config.scayt_sLang,container:o.$,customDictionary:i.config.scayt_customDictionaryIds,userDictionaryName:i.config.scayt_userDictionaryName,localization:i.langCode,customer_id:i.config.scayt_customerId,customPunctuation:i.config.scayt_customPunctuation,debug:i.config.scayt_debug,data_attribute_name:a.options.data_attribute_name,misspelled_word_class:a.options.misspelled_word_class,problem_grammar_data_attribute:a.options.problem_grammar_data_attribute,problem_grammar_class:a.options.problem_grammar_class,"options-to-restore":i.config.scayt_disableOptionsStorage,focused:i.editable().hasFocus,ignoreElementsRegex:i.config.scayt_elementsToIgnore,ignoreGraytElementsRegex:i.config.grayt_elementsToIgnore,minWordLength:i.config.scayt_minWordLength,graytAutoStartup:i.config.grayt_autoStartup,charsToObserve:r.charsToObserve};i.config.scayt_serviceProtocol&&(o.service_protocol=i.config.scayt_serviceProtocol),i.config.scayt_serviceHost&&(o.service_host=i.config.scayt_serviceHost),i.config.scayt_servicePort&&(o.service_port=i.config.scayt_servicePort),i.config.scayt_servicePath&&(o.service_path=i.config.scayt_servicePath),"boolean"==typeof i.config.scayt_ignoreAllCapsWords&&(o["ignore-all-caps-words"]=i.config.scayt_ignoreAllCapsWords),"boolean"==typeof i.config.scayt_ignoreDomainNames&&(o["ignore-domain-names"]=i.config.scayt_ignoreDomainNames),"boolean"==typeof i.config.scayt_ignoreWordsWithMixedCases&&(o["ignore-words-with-mixed-cases"]=i.config.scayt_ignoreWordsWithMixedCases),"boolean"==typeof i.config.scayt_ignoreWordsWithNumbers&&(o["ignore-words-with-numbers"]=i.config.scayt_ignoreWordsWithNumbers);try{n=t(o)}catch(e){a.alarmCompatibilityMessage(),delete o.charsToObserve,n=t(o)}n.subscribe("suggestionListSend",function(e){for(var t={},n=[],i=0;i<e.suggestionList.length;i++)t["word_"+e.suggestionList[i]]||(t["word_"+e.suggestionList[i]]=e.suggestionList[i],n.push(e.suggestionList[i]));CKEDITOR.plugins.scayt.suggestions=n}),n.subscribe("selectionIsChanged",function(e){i.getSelection().isLocked&&"restoreSelection"!==e.action&&i.lockSelection(),"restoreSelection"===e.action&&i.selectionChange(!0)}),n.subscribe("graytStateChanged",function(e){r.state.grayt[i.name]=e.state}),n.addMarkupHandler&&n.addMarkupHandler(function(e){var t=i.editable(),n=t.getCustomData(e.charName);n&&(n.$=e.node,t.setCustomData(e.charName,n))}),i.scayt=n,i.fire("scaytButtonState",i.readOnly?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_ON)}else r.state.scayt[i.name]=!1})},destroy:function(e){e.scayt&&e.scayt.destroy(),delete e.scayt,e.fire("scaytButtonState",CKEDITOR.TRISTATE_OFF)},loadScaytLibrary:function(e,t){function n(){CKEDITOR.fireOnce("scaytReady"),e.scayt||"function"==typeof t&&t(e)}var i;void 0===window.SCAYT||"function"!=typeof window.SCAYT.CKSCAYT?(i=e.config.scayt_srcUrl,CKEDITOR.scriptLoader.load(i,function(e){e&&n()})):window.SCAYT&&"function"==typeof window.SCAYT.CKSCAYT&&n()}},CKEDITOR.on("dialogDefinition",function(e){var t=e.data.name;e=e.data.definition.dialog,"scaytDialog"!==t&&"checkspell"!==t&&(e.on("show",function(e){e=e.sender&&e.sender.getParentEditor();var t=CKEDITOR.plugins.scayt,n=e.scayt;n&&t.state.scayt[e.name]&&n.setMarkupPaused&&n.setMarkupPaused(!0)}),e.on("hide",function(e){e=e.sender&&e.sender.getParentEditor();var t=CKEDITOR.plugins.scayt,n=e.scayt;n&&t.state.scayt[e.name]&&n.setMarkupPaused&&n.setMarkupPaused(!1)})),"scaytDialog"===t&&e.on("cancel",function(e){return!1},this,null,-1),"checkspell"===t&&e.on("cancel",function(e){e=e.sender&&e.sender.getParentEditor();var t=CKEDITOR.plugins.scayt,n=e.scayt;n&&t.state.scayt[e.name]&&n.setMarkupPaused&&n.setMarkupPaused(!1),e.unlockSelection()},this,null,-2),"link"===t&&e.on("ok",function(e){var t=e.sender&&e.sender.getParentEditor();t&&setTimeout(function(){t.fire("reloadMarkupScayt",{removeOptions:{removeInside:!0,forceBookmark:!0},timeout:0})},0)}),"replace"===t&&e.on("hide",function(e){e=e.sender&&e.sender.getParentEditor();var t=CKEDITOR.plugins.scayt,n=e.scayt;e&&setTimeout(function(){n&&(n.fire("removeMarkupInDocument",{}),t.reloadMarkup(n))},0)})}),CKEDITOR.on("scaytReady",function(){var e,t;!0===CKEDITOR.config.scayt_handleCheckDirty&&((e=CKEDITOR.editor.prototype).checkDirty=CKEDITOR.tools.override(e.checkDirty,function(i){return function(){var e,t=null,n=this.scayt;return CKEDITOR.plugins.scayt&&CKEDITOR.plugins.scayt.state.scayt[this.name]&&this.scayt?(t="ready"==this.status)&&(e=n.removeMarkupFromString(this.getSnapshot()),n=n.removeMarkupFromString(this._.previousValue),t=t&&n!==e):t=i.call(this),t}}),e.resetDirty=CKEDITOR.tools.override(e.resetDirty,function(t){return function(){var e=this.scayt;CKEDITOR.plugins.scayt&&CKEDITOR.plugins.scayt.state.scayt[this.name]&&this.scayt?this._.previousValue=e.removeMarkupFromString(this.getSnapshot()):t.call(this)}})),!0===CKEDITOR.config.scayt_handleUndoRedo&&(t="function"==typeof(e=CKEDITOR.plugins.undo.Image.prototype).equalsContent?"equalsContent":"equals",e[t]=CKEDITOR.tools.override(e[t],function(a){return function(e){var t,n=e.editor.scayt,i=this.contents,o=e.contents;return CKEDITOR.plugins.scayt&&CKEDITOR.plugins.scayt.state.scayt[e.editor.name]&&e.editor.scayt&&(this.contents=n.removeMarkupFromString(i)||"",e.contents=n.removeMarkupFromString(o)||""),t=a.apply(this,arguments),this.contents=i,e.contents=o,t}}))}),n={preserveState:!0,editorFocus:!1,readOnly:1,exec:function(e){this.toggleState(),this.refresh(e)},refresh:function(e){var t;e.document&&(t=this.state==CKEDITOR.TRISTATE_ON?"attachClass":"removeClass",e.editable()[t]("cke_show_borders"))}},CKEDITOR.plugins.add("showborders",{modes:{wysiwyg:1},onLoad:function(){var e=(CKEDITOR.env.ie6Compat?[".%1 table.%2,",".%1 table.%2 td, .%1 table.%2 th","{","border : #d3d3d3 1px dotted","}"]:".%1 table.%2,;.%1 table.%2 > tr > td, .%1 table.%2 > tr > th,;.%1 table.%2 > tbody > tr > td, .%1 table.%2 > tbody > tr > th,;.%1 table.%2 > thead > tr > td, .%1 table.%2 > thead > tr > th,;.%1 table.%2 > tfoot > tr > td, .%1 table.%2 > tfoot > tr > th;{;border : #d3d3d3 1px dotted;}".split(";")).join("").replace(/%2/g,"cke_show_border").replace(/%1/g,"cke_show_borders ");CKEDITOR.addCss(e)},init:function(t){var e=t.addCommand("showborders",n);(e.canUndo=!1)!==t.config.startupShowBorders&&e.setState(CKEDITOR.TRISTATE_ON),t.on("mode",function(){e.state!=CKEDITOR.TRISTATE_DISABLED&&e.refresh(t)},null,null,100),t.on("contentDom",function(){e.state!=CKEDITOR.TRISTATE_DISABLED&&e.refresh(t)}),t.on("removeFormatCleanup",function(e){e=e.data,t.getCommand("showborders").state==CKEDITOR.TRISTATE_ON&&e.is("table")&&(!e.hasAttribute("border")||parseInt(e.getAttribute("border"),10)<=0)&&e.addClass("cke_show_border")})},afterInit:function(e){var t=e.dataProcessor;e=t&&t.dataFilter,t=t&&t.htmlFilter,e&&e.addRules({elements:{table:function(e){var t=(e=e.attributes).class,n=parseInt(e.border,10);n&&!(n<=0)||t&&-1!=t.indexOf("cke_show_border")||(e.class=(t||"")+" cke_show_border")}}}),t&&t.addRules({elements:{table:function(e){var t=(e=e.attributes).class;t&&(e.class=t.replace("cke_show_border","").replace(/\s{2}/," ").replace(/^\s+|\s+$/,""))}}})}}),CKEDITOR.on("dialogDefinition",function(e){var t=e.data.name;"table"!=t&&"tableProperties"!=t||((t=(e=e.data.definition).getContents("info").get("txtBorder")).commit=CKEDITOR.tools.override(t.commit,function(i){return function(e,t){i.apply(this,arguments);var n=parseInt(this.getValue(),10);t[!n||n<=0?"addClass":"removeClass"]("cke_show_border")}}),(e=(e=e.getContents("advanced"))&&e.get("advCSSClasses"))&&(e.setup=CKEDITOR.tools.override(e.setup,function(e){return function(){e.apply(this,arguments),this.setValue(this.getValue().replace(/cke_show_border/,""))}}),e.commit=CKEDITOR.tools.override(e.commit,function(n){return function(e,t){n.apply(this,arguments),parseInt(t.getAttribute("border"),10)||t.addClass("cke_show_border")}})))}),function(){CKEDITOR.plugins.add("sourcearea",{init:function(n){function i(){var e=t&&this.equals(CKEDITOR.document.getActive());this.hide(),this.setStyle("height",this.getParent().$.clientHeight+"px"),this.setStyle("width",this.getParent().$.clientWidth+"px"),this.show(),e&&this.focus()}var e,t;n.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&(e=CKEDITOR.plugins.sourcearea,n.addMode("source",function(e){var t=n.ui.space("contents").getDocument().createElement("textarea");t.setStyles(CKEDITOR.tools.extend({width:CKEDITOR.env.ie7Compat?"99%":"100%",height:"100%",resize:"none",outline:"none","text-align":"left"},CKEDITOR.tools.cssVendorPrefix("tab-size",n.config.sourceAreaTabSize||4))),t.setAttribute("dir","ltr"),t.addClass("cke_source").addClass("cke_reset").addClass("cke_enable_context_menu"),n.ui.space("contents").append(t),(t=n.editable(new o(n,t))).setData(n.getData(1)),CKEDITOR.env.ie&&(t.attachListener(n,"resize",i,t),t.attachListener(CKEDITOR.document.getWindow(),"resize",i,t),CKEDITOR.tools.setTimeout(i,0,t)),n.fire("ariaWidget",this),e()}),n.addCommand("source",e.commands.source),n.ui.addButton&&n.ui.addButton("Source",{label:n.lang.sourcearea.toolbar,command:"source",toolbar:"mode,10"}),n.on("mode",function(){n.getCommand("source").setState("source"==n.mode?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)}),t=CKEDITOR.env.ie&&9==CKEDITOR.env.version)}});var o=CKEDITOR.tools.createClass({base:CKEDITOR.editable,proto:{setData:function(e){this.setValue(e),this.status="ready",this.editor.fire("dataReady")},getData:function(){return this.getValue()},insertHtml:function(){},insertElement:function(){},insertText:function(){},setReadOnly:function(e){this[(e?"set":"remove")+"Attribute"]("readOnly","readonly")},detach:function(){o.baseProto.detach.call(this),this.clearCustomData(),this.remove()}}})}(),CKEDITOR.plugins.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:!1,readOnly:1,exec:function(e){"wysiwyg"==e.mode&&e.fire("saveSnapshot"),e.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED),e.setMode("source"==e.mode?"wysiwyg":"source")},canUndo:!1}}},CKEDITOR.plugins.add("specialchar",{availableLangs:{af:1,ar:1,az:1,bg:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,en:1,"en-au":1,"en-ca":1,"en-gb":1,eo:1,es:1,"es-mx":1,et:1,eu:1,fa:1,fi:1,fr:1,"fr-ca":1,gl:1,he:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ko:1,ku:1,lt:1,lv:1,nb:1,nl:1,no:1,oc:1,pl:1,pt:1,"pt-br":1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,sr:1,"sr-latn":1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,zh:1,"zh-cn":1},requires:"dialog",init:function(t){var n=this;CKEDITOR.dialog.add("specialchar",this.path+"dialogs/specialchar.js"),t.addCommand("specialchar",{exec:function(){var e=t.langCode,e=n.availableLangs[e]?e:n.availableLangs[e.replace(/-.*/,"")]?e.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(n.path+"dialogs/lang/"+e+".js"),function(){CKEDITOR.tools.extend(t.lang.specialchar,n.langEntries[e]),t.openDialog("specialchar")})},modes:{wysiwyg:1},canUndo:!1}),t.ui.addButton&&t.ui.addButton("SpecialChar",{label:t.lang.specialchar.toolbar,command:"specialchar",toolbar:"insert,50"})}}),CKEDITOR.config.specialChars="! &quot; # $ % &amp; ' ( ) * + - . / 0 1 2 3 4 5 6 7 8 9 : ; &lt; = &gt; ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ &euro; &lsquo; &rsquo; &ldquo; &rdquo; &ndash; &mdash; &iexcl; &cent; &pound; &curren; &yen; &brvbar; &sect; &uml; &copy; &ordf; &laquo; &not; &reg; &macr; &deg; &sup2; &sup3; &acute; &micro; &para; &middot; &cedil; &sup1; &ordm; &raquo; &frac14; &frac12; &frac34; &iquest; &Agrave; &Aacute; &Acirc; &Atilde; &Auml; &Aring; &AElig; &Ccedil; &Egrave; &Eacute; &Ecirc; &Euml; &Igrave; &Iacute; &Icirc; &Iuml; &ETH; &Ntilde; &Ograve; &Oacute; &Ocirc; &Otilde; &Ouml; &times; &Oslash; &Ugrave; &Uacute; &Ucirc; &Uuml; &Yacute; &THORN; &szlig; &agrave; &aacute; &acirc; &atilde; &auml; &aring; &aelig; &ccedil; &egrave; &eacute; &ecirc; &euml; &igrave; &iacute; &icirc; &iuml; &eth; &ntilde; &ograve; &oacute; &ocirc; &otilde; &ouml; &divide; &oslash; &ugrave; &uacute; &ucirc; &uuml; &yacute; &thorn; &yuml; &OElig; &oelig; &#372; &#374 &#373 &#375; &sbquo; &#8219; &bdquo; &hellip; &trade; &#9658; &bull; &rarr; &rArr; &hArr; &diams; &asymp;".split(" "),CKEDITOR.plugins.add("stylescombo",{requires:"richcombo",init:function(r){var s=r.config,l=r.lang.stylescombo,c={},d=[],u=[];r.on("stylesSet",function(e){if(e=e.data.styles){for(var t,n,i,o=0,a=e.length;o<a;o++)t=e[o],r.blockless&&t.element in CKEDITOR.dtd.$block||"string"==typeof t.type&&!CKEDITOR.style.customHandlers[t.type]||(n=t.name,t=new CKEDITOR.style(t),r.filter.customConfig&&!r.filter.check(t))||(t._name=n,t._.enterMode=s.enterMode,t._.type=i=t.assignedTo||t.type,t._.weight=o+1e3*(i==CKEDITOR.STYLE_OBJECT?1:i==CKEDITOR.STYLE_BLOCK?2:3),c[n]=t,d.push(t),u.push(t));d.sort(function(e,t){return e._.weight-t._.weight})}}),r.on("stylesRemove",function(e){var t,n=void 0===(e=e.data&&e.data.type);for(t in c){var i=c[t];!n&&i.type!==e||r.removeStyle(i)}}),r.ui.addRichCombo("Styles",{label:l.label,title:l.panelTitle,toolbar:"styles,10",allowedContent:u,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(s.contentsCss),multiSelect:!0,attributes:{"aria-label":l.panelTitle}},init:function(){for(var e,t,n,i,o=0,a=d.length;o<a;o++)t=(e=d[o])._name,(i=e._.type)!=n&&(this.startGroup(l["panelTitle"+String(i)]),n=i),this.add(t,e.type==CKEDITOR.STYLE_OBJECT?t:e.buildPreview(),t);this.commit()},onClick:function(e){r.focus(),r.fire("saveSnapshot"),e=c[e];var t=r.elementPath();e.group&&e.removeStylesFromSameGroup(r)?r.applyStyle(e):r[e.checkActive(t,r)?"removeStyle":"applyStyle"](e),r.fire("saveSnapshot")},onRender:function(){r.on("selectionChange",function(e){for(var t,n=this.getValue(),i=0,o=(e=e.data.path.elements).length;i<o;i++)for(var a in t=e[i],c)if(c[a].checkElementRemovable(t,!0,r))return void(a!=n&&this.setValue(a));this.setValue("")},this)},onOpen:function(){var e,t=(t=r.getSelection()).getSelectedElement()||t.getStartElement()||r.editable(),t=r.elementPath(t),n=[0,0,0,0];for(e in this.showAll(),this.unmarkAll(),c){var i=c[e],o=i._.type;i.checkApplicable(t,r,r.activeFilter)?n[o]++:this.hideItem(e),i.checkActive(t,r)&&this.mark(e)}n[CKEDITOR.STYLE_BLOCK]||this.hideGroup(l["panelTitle"+String(CKEDITOR.STYLE_BLOCK)]),n[CKEDITOR.STYLE_INLINE]||this.hideGroup(l["panelTitle"+String(CKEDITOR.STYLE_INLINE)]),n[CKEDITOR.STYLE_OBJECT]||this.hideGroup(l["panelTitle"+String(CKEDITOR.STYLE_OBJECT)])},refresh:function(){var e=r.elementPath();if(e){for(var t in c)if(c[t].checkApplicable(e,r,r.activeFilter))return;this.setState(CKEDITOR.TRISTATE_DISABLED)}},reset:function(){c={},d=[]}})}}),o={editorFocus:!1,modes:{wysiwyg:1,source:1}},a={exec:function(e){e.container.focusNext(!0,e.tabIndex)}},r={exec:function(e){e.container.focusPrevious(!0,e.tabIndex)}},CKEDITOR.plugins.add("tab",{init:function(t){for(var e=!1!==t.config.enableTabKeyTools,n=t.config.tabSpaces||0,i="";n--;)i+=" ";i&&t.on("key",function(e){9==e.data.keyCode&&(t.insertText(i),e.cancel())}),e&&t.on("key",function(e){(9==e.data.keyCode&&t.execCommand("selectNextCell")||e.data.keyCode==CKEDITOR.SHIFT+9&&t.execCommand("selectPreviousCell"))&&e.cancel()}),t.addCommand("blur",CKEDITOR.tools.extend(a,o)),t.addCommand("blurBack",CKEDITOR.tools.extend(r,o)),t.addCommand("selectNextCell",gt()),t.addCommand("selectPreviousCell",gt(!0))}}),CKEDITOR.dom.element.prototype.focusNext=function(e,t){var n,i,o,a,r,s,l=void 0===t?this.getTabIndex():t;if(l<=0)for(r=this.getNextSourceNode(e,CKEDITOR.NODE_ELEMENT);r;){if(r.isVisible()&&0===r.getTabIndex()){o=r;break}r=r.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT)}else for(r=this.getDocument().getBody().getFirst();r=r.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!n)if(!i&&r.equals(this)){if(i=!0,e){if(!(r=r.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;n=1}}else i&&!this.contains(r)&&(n=1);if(r.isVisible()&&!((s=r.getTabIndex())<0)){if(n&&s==l){o=r;break}(l<s&&(!o||!a||s<a)||!o&&0===s)&&(o=r,a=s)}}o&&o.focus()},CKEDITOR.dom.element.prototype.focusPrevious=function(e,t){for(var n,i,o,a,r=void 0===t?this.getTabIndex():t,s=0,l=this.getDocument().getBody().getLast();l=l.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!n)if(!i&&l.equals(this)){if(i=!0,e){if(!(l=l.getPreviousSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;n=1}}else i&&!this.contains(l)&&(n=1);if(l.isVisible()&&!((a=l.getTabIndex())<0))if(r<=0){if(n&&0===a){o=l;break}s<a&&(o=l,s=a)}else{if(n&&a==r){o=l;break}a<r&&(!o||s<a)&&(o=l,s=a)}}o&&o.focus()},CKEDITOR.plugins.add("table",{requires:"dialog",init:function(e){function t(e){return CKEDITOR.tools.extend(e||{},{contextSensitive:1,refresh:function(e,t){this.setState(t.contains("table",1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}var n;e.blockless||(n=e.lang.table,e.addCommand("table",new CKEDITOR.dialogCommand("table",{context:"table",allowedContent:"table{width,height,border-collapse}[align,border,cellpadding,cellspacing,summary];caption tbody thead tfoot;th td tr[scope];td{border*,background-color,vertical-align,width,height}[colspan,rowspan];"+(e.plugins.dialogadvtab?"table"+e.plugins.dialogadvtab.allowedContent():""),requiredContent:"table",contentTransformations:[["table{width}: sizeToStyle","table[width]: sizeToAttribute"],["td: splitBorderShorthand"],[{element:"table",right:function(e){var t,n;e.styles&&(e.styles.border?t=CKEDITOR.tools.style.parse.border(e.styles.border):!CKEDITOR.env.ie||8!==CKEDITOR.env.version||(n=e.styles)["border-left"]&&n["border-left"]===n["border-right"]&&n["border-right"]===n["border-top"]&&n["border-top"]===n["border-bottom"]&&(t=CKEDITOR.tools.style.parse.border(n["border-top"])),t&&t.style&&"solid"===t.style&&t.width&&0!==parseFloat(t.width)&&(e.attributes.border=1),"collapse"==e.styles["border-collapse"]&&(e.attributes.cellspacing=0))}}]]})),e.addCommand("tableProperties",new CKEDITOR.dialogCommand("tableProperties",t())),e.addCommand("tableDelete",t({exec:function(e){var t,n,i=e.elementPath().contains("table",1);i&&(t=i.getParent(),n=e.editable(),1!=t.getChildCount()||t.is("td","th")||t.equals(n)||(i=t),(e=e.createRange()).moveToPosition(i,CKEDITOR.POSITION_BEFORE_START),i.remove(),e.select())}})),e.ui.addButton&&e.ui.addButton("Table",{label:n.toolbar,command:"table",toolbar:"insert,30"}),CKEDITOR.dialog.add("table",this.path+"dialogs/table.js"),CKEDITOR.dialog.add("tableProperties",this.path+"dialogs/table.js"),e.addMenuItems&&e.addMenuItems({table:{label:n.menu,command:"tableProperties",group:"table",order:5},tabledelete:{label:n.deleteTable,command:"tableDelete",group:"table",order:1}}),e.on("doubleclick",function(e){e.data.element.is("table")&&(e.data.dialog="tableProperties")}),e.contextMenu&&e.contextMenu.addListener(function(){return{tabledelete:CKEDITOR.TRISTATE_OFF,table:CKEDITOR.TRISTATE_OFF}}))}}),d=CKEDITOR.tools.isArray,CKEDITOR.plugins.tabletools={requires:"table,dialog,contextmenu",init:function(n){function e(e){return CKEDITOR.tools.extend(e||{},{contextSensitive:1,refresh:function(e,t){this.setState(t.contains({td:1,th:1},1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}function t(e,t){t=n.addCommand(e,t);n.addFeature(t)}var i=n.lang.table,o=CKEDITOR.tools.style.parse,a="td{width} td{height} td{border-color} td{background-color} td{white-space} td{vertical-align} td{text-align} td[colspan] td[rowspan] th".split(" ");t("cellProperties",new CKEDITOR.dialogCommand("cellProperties",e({allowedContent:"td th{width,height,border-color,background-color,white-space,vertical-align,text-align}[colspan,rowspan]",requiredContent:a,contentTransformations:[[{element:"td",left:function(e){return e.styles.background&&o.background(e.styles.background).color},right:function(e){e.styles["background-color"]=o.background(e.styles.background).color}},{element:"td",check:"td{vertical-align}",left:function(e){return e.attributes&&e.attributes.valign},right:function(e){e.styles["vertical-align"]=e.attributes.valign,delete e.attributes.valign}}],[{element:"tr",check:"td{height}",left:function(e){return e.styles&&e.styles.height},right:function(t){CKEDITOR.tools.array.forEach(t.children,function(e){e.name in{td:1,th:1}&&(e.attributes["cke-row-height"]=t.styles.height)}),delete t.styles.height}}],[{element:"td",check:"td{height}",left:function(e){return(e=e.attributes)&&e["cke-row-height"]},right:function(e){e.styles.height=e.attributes["cke-row-height"],delete e.attributes["cke-row-height"]}}]]}))),CKEDITOR.dialog.add("cellProperties",this.path+"dialogs/tableCell.js"),t("rowDelete",e({requiredContent:"table",exec:function(e){(e=function e(t){if(t instanceof CKEDITOR.dom.selection){var n=t.getRanges(),i=(s=nt(t))[0].getAscendant("table"),o=CKEDITOR.tools.buildTableMap(i),a=s[0].getParent().$.rowIndex,r=(s=s[s.length-1]).getParent().$.rowIndex+s.$.rowSpan-1,s=[];for(t.reset(),t=a;t<=r;t++){for(var l=o[t],c=new CKEDITOR.dom.element(i.$.rows[t]),d=0;d<l.length;d++){var u=new CKEDITOR.dom.element(l[d]),h=u.getParent().$.rowIndex;1==u.$.rowSpan?u.remove():(--u.$.rowSpan,h==t&&((h=o[t+1])[d-1]?u.insertAfter(new CKEDITOR.dom.element(h[d-1])):new CKEDITOR.dom.element(i.$.rows[t+1]).append(u,1))),d+=u.$.colSpan-1}s.push(c)}for(o=i.$.rows,n[0].moveToPosition(i,CKEDITOR.POSITION_BEFORE_START),a=new CKEDITOR.dom.element(o[1+r]||(0<a?o[a-1]:null)||i.$.parentNode),t=s.length;0<=t;t--)e(s[t]);return i.$.parentNode?a:(n[0].select(),null)}return t instanceof CKEDITOR.dom.element&&(1==(i=t.getAscendant("table")).$.rows.length?i:t).remove(),null}(e=e.getSelection()))&&ct(e)}})),t("rowInsertBefore",e({requiredContent:"table",exec:function(e){it(e=nt(e=e.getSelection()),!0)}})),t("rowInsertAfter",e({requiredContent:"table",exec:function(e){it(e=nt(e=e.getSelection()))}})),t("columnDelete",e({requiredContent:"table",exec:function(e){(e=st(e=e.getSelection()))&&ct(e,!0)}})),t("columnInsertBefore",e({requiredContent:"table",exec:function(e){rt(e=nt(e=e.getSelection()),!0)}})),t("columnInsertAfter",e({requiredContent:"table",exec:function(e){rt(e=nt(e=e.getSelection()))}})),t("cellDelete",e({requiredContent:"table",exec:function(e){(function e(t){if(t instanceof CKEDITOR.dom.selection){var n=t.getRanges(),i=nt(t),o=i[0]&&i[0].getAscendant("table");e:{for(var a,r,s=0,l=i.length-1,c={};a=i[s++];)CKEDITOR.dom.element.setMarker(c,a,"delete_cell",!0);for(s=0;a=i[s++];)if((r=a.getPrevious())&&!r.getCustomData("delete_cell")||(r=a.getNext())&&!r.getCustomData("delete_cell")){CKEDITOR.dom.element.clearAllMarkers(c),l=r;break e}CKEDITOR.dom.element.clearAllMarkers(c),l=(s=(s=i[0].getParent()).getPrevious())?s.getLast():(s=(s=i[l].getParent()).getNext())?s.getChild(0):null}for(t.reset(),t=i.length-1;0<=t;t--)e(i[t]);l?ct(l,!0):o&&(n[0].moveToPosition(o,CKEDITOR.POSITION_BEFORE_START),n[0].select(),o.remove())}else t instanceof CKEDITOR.dom.element&&(1==(n=t.getParent()).getChildCount()?n:t).remove()})(e=e.getSelection())}})),t("cellMerge",e({allowedContent:"td[colspan,rowspan]",requiredContent:"td[colspan,rowspan]",exec:function(e,t){t.cell=ut(e.getSelection()),ct(t.cell,!0)}})),t("cellMergeRight",e({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(e,t){t.cell=ut(e.getSelection(),"right"),ct(t.cell,!0)}})),t("cellMergeDown",e({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(e,t){t.cell=ut(e.getSelection(),"down"),ct(t.cell,!0)}})),t("cellVerticalSplit",e({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(e){ct(ft(e.getSelection()))}})),t("cellHorizontalSplit",e({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(e){ct(ht(e.getSelection()))}})),t("cellInsertBefore",e({requiredContent:"table",exec:function(e){lt(e=e.getSelection(),!0)}})),t("cellInsertAfter",e({requiredContent:"table",exec:function(e){lt(e=e.getSelection())}})),n.addMenuItems&&n.addMenuItems({tablecell:{label:i.cell.menu,group:"tablecell",order:1,getItems:function(){var e=nt(t=n.getSelection()),t={tablecell_insertBefore:CKEDITOR.TRISTATE_OFF,tablecell_insertAfter:CKEDITOR.TRISTATE_OFF,tablecell_delete:CKEDITOR.TRISTATE_OFF,tablecell_merge:ut(t,null,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_right:ut(t,"right",!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_down:ut(t,"down",!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_vertical:ft(t,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_horizontal:ht(t,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED};return n.filter.check(a)&&(t.tablecell_properties=0<e.length?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),t}},tablecell_insertBefore:{label:i.cell.insertBefore,group:"tablecell",command:"cellInsertBefore",order:5},tablecell_insertAfter:{label:i.cell.insertAfter,group:"tablecell",command:"cellInsertAfter",order:10},tablecell_delete:{label:i.cell.deleteCell,group:"tablecell",command:"cellDelete",order:15},tablecell_merge:{label:i.cell.merge,group:"tablecell",command:"cellMerge",order:16},tablecell_merge_right:{label:i.cell.mergeRight,group:"tablecell",command:"cellMergeRight",order:17},tablecell_merge_down:{label:i.cell.mergeDown,group:"tablecell",command:"cellMergeDown",order:18},tablecell_split_horizontal:{label:i.cell.splitHorizontal,group:"tablecell",command:"cellHorizontalSplit",order:19},tablecell_split_vertical:{label:i.cell.splitVertical,group:"tablecell",command:"cellVerticalSplit",order:20},tablecell_properties:{label:i.cell.title,group:"tablecellproperties",command:"cellProperties",order:21},tablerow:{label:i.row.menu,group:"tablerow",order:1,getItems:function(){return{tablerow_insertBefore:CKEDITOR.TRISTATE_OFF,tablerow_insertAfter:CKEDITOR.TRISTATE_OFF,tablerow_delete:CKEDITOR.TRISTATE_OFF}}},tablerow_insertBefore:{label:i.row.insertBefore,group:"tablerow",command:"rowInsertBefore",order:5},tablerow_insertAfter:{label:i.row.insertAfter,group:"tablerow",command:"rowInsertAfter",order:10},tablerow_delete:{label:i.row.deleteRow,group:"tablerow",command:"rowDelete",order:15},tablecolumn:{label:i.column.menu,group:"tablecolumn",order:1,getItems:function(){return{tablecolumn_insertBefore:CKEDITOR.TRISTATE_OFF,tablecolumn_insertAfter:CKEDITOR.TRISTATE_OFF,tablecolumn_delete:CKEDITOR.TRISTATE_OFF}}},tablecolumn_insertBefore:{label:i.column.insertBefore,group:"tablecolumn",command:"columnInsertBefore",order:5},tablecolumn_insertAfter:{label:i.column.insertAfter,group:"tablecolumn",command:"columnInsertAfter",order:10},tablecolumn_delete:{label:i.column.deleteColumn,group:"tablecolumn",command:"columnDelete",order:15}}),n.contextMenu&&n.contextMenu.addListener(function(e,t,n){return(e=n.contains({td:1,th:1},1))&&!e.isReadOnly()?{tablecell:CKEDITOR.TRISTATE_OFF,tablerow:CKEDITOR.TRISTATE_OFF,tablecolumn:CKEDITOR.TRISTATE_OFF}:null})},getCellColIndex:ot,insertRow:it,insertColumn:rt,getSelectedCells:nt},CKEDITOR.plugins.add("tabletools",CKEDITOR.plugins.tabletools),CKEDITOR.tools.buildTableMap=function(e,t,n,i,o){e=e.$.rows,n=n||0,i="number"==typeof i?i:e.length-1,o="number"==typeof o?o:-1;var a=-1,r=[];for(t=t||0;t<=i;t++){r[++a]||(r[a]=[]);for(var s=-1,l=n;l<=(-1===o?e[t].cells.length-1:o);l++){if(!(d=e[t].cells[l]))break;for(s++;r[a][s];)s++;for(var c=isNaN(d.colSpan)?1:d.colSpan,d=isNaN(d.rowSpan)?1:d.rowSpan,u=0;u<d&&!(i<t+u);u++){r[a+u]||(r[a+u]=[]);for(var h=0;h<c;h++)r[a+u][s+h]=e[t].cells[l]}if(s+=c-1,-1!==o&&o<=s)break}}return r},function(){function f(e){return CKEDITOR.plugins.widget&&CKEDITOR.plugins.widget.isDomWidget(e)}function E(e,t){var n,i,o=e.getAscendant("table"),a=t.getAscendant("table"),r=CKEDITOR.tools.buildTableMap(o),s=u(e),l=u(t),c=[],d={};for((l=o.contains(a)?u(t=t.getAscendant({td:1,th:1})):l)<s&&(o=s,s=l,l=o,o=e,e=t,t=o),o=0;o<r[s].length;o++)if(e.$===r[s][o]){n=o;break}for(o=0;o<r[l].length;o++)if(t.$===r[l][o]){i=o;break}for(i<n&&(o=n,n=i,i=o),o=s;o<=l;o++)for(s=n;s<=i;s++)(a=new CKEDITOR.dom.element(r[o][s])).$&&!a.getCustomData("selected_cell")&&(c.push(a),CKEDITOR.dom.element.setMarker(d,a,"selected_cell",!0));return CKEDITOR.dom.element.clearAllMarkers(d),c}function g(e,t){var n,i=e.editable().find(".cke_table-faked-selection"),o=e.editable().findOne("[data-cke-table-faked-selection-table]");for(e.fire("lockSnapshot"),e.editable().removeClass("cke_table-faked-selection-editor"),n=0;n<i.count();n++)i.getItem(n).removeClass("cke_table-faked-selection");o&&o.data("cke-table-faked-selection-table",!1),e.fire("unlockSnapshot"),t&&(I={active:!1},e.getSelection().isInTable()&&e.getSelection().reset())}function p(e,t){for(var n,i=[],o=0;o<t.length;o++)(n=e.createRange()).setStartBefore(t[o]),n.setEndAfter(t[o]),i.push(n);e.getSelection().selectRanges(i)}function o(e){var t,n=(e=e.editor||e.sender.editor)&&e.getSelection(),i=n&&n.getRanges()||[],o=(o=i&&i[0].getEnclosedNode())&&o.type==CKEDITOR.NODE_ELEMENT&&o.is("img");if(n&&(g(e),n.isInTable()&&n.isFake))if(o)e.getSelection().reset();else if(!i[0]._getTableElement({table:1}).hasAttribute("data-cke-tableselection-ignored")){for(1===i.length&&i[0]._getTableElement()&&i[0]._getTableElement().is("table")&&(t=i[0]._getTableElement()),t=C(n,t),e.fire("lockSnapshot"),n=0;n<t.length;n++)t[n].addClass("cke_table-faked-selection");0<t.length&&(e.editable().addClass("cke_table-faked-selection-editor"),t[0].getAscendant("table").data("cke-table-faked-selection-table","")),e.fire("unlockSnapshot")}}function u(e){return e.getAscendant("tr",!0).$.rowIndex}function m(e){function t(e){return!e.getAscendant("table",!0)&&e.getDocument().equals(n.document)}var n,i,o,a,r,s,l,c,d,u,h;!e.data.getTarget().getName||"mouseup"!==e.name&&f(e.data.getTarget())||(i=(n=e.editor||e.listenerData.editor).getSelection(1),h=n,o=(h=n.editable().findOne(".cke_table-faked-selection"))&&h.getAscendant("table"),h=(r=e.data.getTarget())&&r.getAscendant({td:1,th:1},!0),r=r&&r.getAscendant("table",!0),a={table:1,thead:1,tbody:1,tfoot:1,tr:1,td:1,th:1},r&&r.hasAttribute("data-cke-tableselection-ignored")||(d=i,u=r,("mousedown"!==(c=e).name||CKEDITOR.tools.getMouseButton(c)!==CKEDITOR.MOUSE_BUTTON_LEFT&&u)&&((d=c.name===(CKEDITOR.env.gecko?"mousedown":"mouseup")&&!t(c.data.getTarget()))?(c=c.data.getTarget().getAscendant({td:1,th:1},!0))&&c.hasClass("cke_table-faked-selection"):!d)||g(n,!0),!I.active&&"mousedown"===e.name&&CKEDITOR.tools.getMouseButton(e)===CKEDITOR.MOUSE_BUTTON_LEFT&&r&&(I={active:!0},CKEDITOR.document.on("mouseup",m,null,{editor:n})),(h||r)&&function(e,t,n){var i,o=C(e.getSelection(!0));if(t=t.is("table")?null:t,(i=I.active&&!I.first)&&!(i=t)&&(i=e.getSelection().getRanges(),i=!!(1<o.length||i[0]&&!i[0].collapsed)),i)I.first=t||o[0],I.dirty=!t&&1!==o.length;else if(I.active&&t&&I.first.getAscendant("table").equals(t.getAscendant("table"))){if(o=E(I.first,t),!I.dirty&&1===o.length&&!f(n.data.getTarget()))return g(e,"mouseup"===n.name);I.dirty=!0,I.last=t,p(e,o)}}(n,h||r,e),"mouseup"===e.name&&(CKEDITOR.tools.getMouseButton(e)===CKEDITOR.MOUSE_BUTTON_LEFT&&(t(e.data.getTarget())||(l=r,(s=o)&&l&&(s.equals(l)||s.contains(l)||l.contains(s)||s.getCommonAncestor(l).is(a))))&&((r=(h=n).editable().find(".cke_table-faked-selection")).count()<1||p(h,r=E(r.getItem(0),r.getItem(r.count()-1)))),I={active:!1},CKEDITOR.document.removeListener("mouseup",m))))}function a(e){var t=e.data.getTarget().getAscendant("table",!0);t&&t.hasAttribute("data-cke-tableselection-ignored")||(t=e.data.getTarget().getAscendant({td:1,th:1},!0))&&!t.hasClass("cke_table-faked-selection")&&(e.cancel(),e.data.preventDefault())}function i(e,t){var n,i,o,a,r=e.getSelection(),s=r.createBookmarks(),l=e.document,c=e.createRange(),d=l.getDocumentElement().$,u=CKEDITOR.env.ie&&CKEDITOR.env.version<9,h=e.blockless||CKEDITOR.env.ie?"span":"div";l.getById("cke_table_copybin")||(n=l.createElement(h),(i=l.createElement(h)).setAttributes({id:"cke_table_copybin","data-cke-temp":"1"}),n.setStyles({position:"absolute",width:"1px",height:"1px",overflow:"hidden"}),n.setStyle("ltr"==e.config.contentsLangDirection?"left":"right","-5000px"),n.setHtml(e.getSelectedHtml(!0)),e.fire("lockSnapshot"),i.append(n),e.editable().append(i),a=e.on("selectionChange",function(e){e.cancel()},null,null,0),u&&(o=d.scrollTop),c.selectNodeContents(n),c.select(),u&&(d.scrollTop=o),setTimeout(function(){i.remove(),r.selectBookmarks(s),a.removeListener(),e.fire("unlockSnapshot"),t&&(e.extractSelectedHtml(),e.fire("saveSnapshot"))},100))}function r(e){var t=e.editor||e.sender.editor,n=t.getSelection();n.isInTable()&&(n.getRanges()[0]._getTableElement({table:1}).hasAttribute("data-cke-tableselection-ignored")||i(t,"cut"===e.name))}function T(e){this._reset(),e&&this.setSelectedCells(e)}function e(t,n,i){t.on("beforeCommandExec",function(e){-1!==CKEDITOR.tools.array.indexOf(n,e.data.name)&&(e.data.selectedCells=C(t.getSelection()))}),t.on("afterCommandExec",function(e){-1!==CKEDITOR.tools.array.indexOf(n,e.data.name)&&i(t,e.data)})}var t,C,h,l,s,I={active:!1};(T.prototype={})._reset=function(){this.cells={first:null,last:null,all:[]},this.rows={first:null,last:null}},T.prototype.setSelectedCells=function(e){this._reset(),e=e.slice(0),this._arraySortByDOMOrder(e),this.cells.all=e,this.cells.first=e[0],this.cells.last=e[e.length-1],this.rows.first=e[0].getAscendant("tr"),this.rows.last=this.cells.last.getAscendant("tr")},T.prototype.getTableMap=function(){var e=h(this.cells.first);e:{for(var t,n=(t=this.cells.last).getAscendant("table"),i=u(t),n=CKEDITOR.tools.buildTableMap(n),o=0;o<n[i].length;o++)if(new CKEDITOR.dom.element(n[i][o]).equals(t)){t=o;break e}t=void 0}return CKEDITOR.tools.buildTableMap(this._getTable(),u(this.rows.first),e,u(this.rows.last),t)},T.prototype._getTable=function(){return this.rows.first.getAscendant("table")},T.prototype.insertRow=function(e,t,n){if(void 0===e)e=1;else if(e<=0)return;for(var i,o=this.cells.first.$.cellIndex,a=this.cells.last.$.cellIndex,r=n?[]:this.cells.all,s=0;s<e;s++)i=l(n?this.cells.all:r,t),i=CKEDITOR.tools.array.filter(i.find("td, th").toArray(),function(e){return!!n||e.$.cellIndex>=o&&e.$.cellIndex<=a}),r=t?i.concat(r):r.concat(i);this.setSelectedCells(r)},T.prototype.insertColumn=function(e){function t(e){return e=u(e),i<=e&&e<=o}if(void 0===e)e=1;else if(e<=0)return;for(var n=(a=this.cells).all,i=u(a.first),o=u(a.last),a=0;a<e;a++)n=n.concat(CKEDITOR.tools.array.filter(s(n),t));this.setSelectedCells(n)},T.prototype.emptyCells=function(e){e=e||this.cells.all;for(var t=0;t<e.length;t++)e[t].setHtml("")},T.prototype._arraySortByDOMOrder=function(e){e.sort(function(e,t){return e.getPosition(t)&CKEDITOR.POSITION_PRECEDING?-1:1})};var n={onPaste:function(e){function t(e){return Math.max.apply(null,CKEDITOR.tools.array.map(e,function(e){return e.length},0))}var n,i,o,a,r,s,l,c,d,u=e.editor,h=u.getSelection(),f=C(h),g=h.isInTable(!0)&&this.isBoundarySelection(h),m=this.findTableInPastedContent(u,e.data.dataValue);s=f,l=m,c=g,d=(r=(r=h).getRanges()).length&&r[0]._getTableElement({table:1}),!s.length||d&&d.hasAttribute("data-cke-tableselection-ignored")||c&&!l||(s=(s=!c)?!(s=(s=r[0])?((s=s.clone()).enlarge(CKEDITOR.ENLARGE_ELEMENT),(s=s.getEnclosedNode())&&s.is&&s.is(CKEDITOR.dtd.$tableContent)):void 0):s)||(f=f[0].getAscendant("table"),n=new T(C(h,f)),u.once("afterPaste",function(){var e,t;e=i?(e=new CKEDITOR.dom.element(i[0][0]),t=i[i.length-1],E(e,new CKEDITOR.dom.element(t[t.length-1]))):n.cells.all,p(u,e)}),m?(e.stop(),g?(n.insertRow(1,1===g,!0),h.selectElement(n.rows.first)):(n.emptyCells(),p(u,n.cells.all)),e=n.getTableMap(),i=CKEDITOR.tools.buildTableMap(m),n.insertRow(i.length-e.length),n.insertColumn(t(i)-t(e)),e=n.getTableMap(),this.pasteTable(n,e,i),u.fire("saveSnapshot"),setTimeout(function(){u.fire("afterPaste")},0)):(o=n.cells.first,(a=u.createRange()).selectNodeContents(o),a.select(),u.once("afterPaste",function(){u.fire("lockSnapshot"),n.emptyCells(n.cells.all.slice(1)),p(u,n.cells.all),u.fire("unlockSnapshot")})))},isBoundarySelection:function(e){var t=(e=e.getRanges()[0]).endContainer.getAscendant("tr",!0);if(t&&e.collapsed){if(e.checkBoundaryOfElement(t,CKEDITOR.START))return 1;if(e.checkBoundaryOfElement(t,CKEDITOR.END))return 2}return 0},findTableInPastedContent:function(e,t){var n=e.dataProcessor,i=new CKEDITOR.dom.element("body"),n=n||new CKEDITOR.htmlDataProcessor(e);return i.setHtml(n.toHtml(t),{fixForBody:!1}),1<i.getChildCount()?null:i.findOne("table")},pasteTable:function(e,t,n){for(var i,o,a,r,s=h(e.cells.first),l=e._getTable(),c={},d=0;d<n.length;d++)for(o=new CKEDITOR.dom.element(l.$.rows[e.rows.first.$.rowIndex+d]),r=0;r<n[d].length;r++)a=new CKEDITOR.dom.element(n[d][r]),i=t[d]&&t[d][r]?new CKEDITOR.dom.element(t[d][r]):null,a&&!a.getCustomData("processed")?(i&&i.getParent()?a.replace(i):0!==r&&!n[d][r-1]||((i=0!==r?new CKEDITOR.dom.element(n[d][r-1]):null)&&o.equals(i.getParent())?a.insertAfter(i):0<s?o.$.cells[s]?a.insertAfter(new CKEDITOR.dom.element(o.$.cells[s])):o.append(a):o.append(a,!0)),CKEDITOR.dom.element.setMarker(c,a,"processed",!0)):a.getCustomData("processed")&&i&&i.remove();CKEDITOR.dom.element.clearAllMarkers(c)}};CKEDITOR.plugins.tableselection={getCellsBetween:E,keyboardIntegration:function(o){function l(e){var t=e.getEnclosedNode();t&&"function"==typeof t.is&&t.is({td:1,th:1})?t.setText(""):e.deleteContents(),CKEDITOR.tools.array.forEach(e._find("td"),function(e){e.appendBogus()})}var c,d,u,e=o.editable();e.attachListener(e,"keydown",(c=o,d={37:1,38:1,39:1,40:1,8:1,46:1,13:1},delete(u=CKEDITOR.tools.extend({table:1},CKEDITOR.dtd.$tableContent)).td,delete u.th,function(e){var t,n,i,o,a=e.data.getKey(),r=e.data.getKeystroke(),s=37===a||38==a;if(d[a]&&!c.readOnly&&(t=c.getSelection())&&t.isInTable()&&t.isFake)if(i=(n=t.getRanges())[0]._getTableElement(),o=n[n.length-1]._getTableElement(),13===a&&!c.plugins.enterkey||(e.data.preventDefault(),e.cancel()),36<a&&a<41)n[0].moveToElementEditablePosition(s?i:o,!s),t.selectRanges([n[0]]);else if(13!==a||13===r||r===CKEDITOR.SHIFT+13){for(e=0;e<n.length;e++)l(n[e]);(e=function(e){if(!e.length)return null;var t=c.createRange(),n=CKEDITOR.dom.range.mergeRanges(e);CKEDITOR.tools.array.forEach(n,function(e){e.enlarge(CKEDITOR.ENLARGE_ELEMENT)});var i,o=(a=n[0].getBoundaryNodes()).startNode,a=a.endNode;if(o&&o.is&&o.is(u)){for(var r=o.getAscendant("table",!0),s=o.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT,r),e=!1;s&&(i=s,o.contains(i)||!i.is||!i.is("td","th"));)s=s.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT,r);return!s&&a&&a.is&&!a.is("table")&&a.getNext()&&(s=a.getNext().findOne("td, th"),e=!0),s?t["moveToElementEdit"+(e?"Start":"End")](s):(t.setStartBefore(o.getAscendant("table",!0)),t.collapse(!0)),n[0].deleteContents(),[t]}return o?(t.moveToElementEditablePosition(o),[t]):void 0}(n))?n=e:n[0].moveToElementEditablePosition(i),t.selectRanges(n),13===a&&c.plugins.enterkey?(c.fire("lockSnapshot"),13===r?c.execCommand("enter"):c.execCommand("shiftEnter"),c.fire("unlockSnapshot"),c.fire("saveSnapshot")):13!==a&&c.fire("saveSnapshot")}}),null,null,-1),e.attachListener(e,"keypress",function(e){var t,n=o.getSelection(),i=e.data.$.charCode||13===e.data.getKey();if(!o.readOnly&&n&&n.isInTable()&&n.isFake&&i&&!(e.data.getKeystroke()&CKEDITOR.CTRL)){for(i=(e=n.getRanges())[0].getEnclosedNode().getAscendant({td:1,th:1},!0),t=0;t<e.length;t++)l(e[t]);i&&(e[0].moveToElementEditablePosition(i),n.selectRanges([e[0]]))}},null,null,-1)}},CKEDITOR.plugins.add("tableselection",{requires:"clipboard,tabletools",isSupportedEnvironment:function(){return!(CKEDITOR.env.ie&&CKEDITOR.env.version<11)},onLoad:function(){t=CKEDITOR.plugins.tabletools,C=t.getSelectedCells,h=t.getCellColIndex,l=t.insertRow,s=t.insertColumn,CKEDITOR.document.appendStyleSheet(this.path+"styles/tableselection.css")},init:function(i){this.isSupportedEnvironment()&&(i.addContentsCss&&i.addContentsCss(this.path+"styles/tableselection.css"),i.on("contentDom",function(){var e=i.editable(),t=e.isInline()?e:i.document,n={editor:i};e.attachListener(t,"mousedown",m,null,n),e.attachListener(t,"mousemove",m,null,n),e.attachListener(t,"mouseup",m,null,n),e.attachListener(e,"dragstart",a),e.attachListener(i,"selectionCheck",o),CKEDITOR.plugins.tableselection.keyboardIntegration(i),CKEDITOR.plugins.clipboard&&!CKEDITOR.plugins.clipboard.isCustomCopyCutSupported&&(e.attachListener(e,"cut",r),e.attachListener(e,"copy",r))}),i.on("paste",n.onPaste,n),e(i,"rowInsertBefore rowInsertAfter columnInsertBefore columnInsertAfter cellInsertBefore cellInsertAfter".split(" "),function(e,t){p(e,t.selectedCells)}),e(i,["cellMerge","cellMergeRight","cellMergeDown"],function(e,t){p(e,[t.commandData.cell])}),e(i,["cellDelete"],function(e){g(e,!0)}))}})}(),function(){var s=[CKEDITOR.CTRL+90,CKEDITOR.CTRL+89,CKEDITOR.CTRL+CKEDITOR.SHIFT+90],n={8:1,46:1};CKEDITOR.plugins.add("undo",{init:function(e){function t(e){i.enabled&&!1!==e.data.command.canUndo&&i.save()}function n(){i.enabled=!e.readOnly&&"wysiwyg"==e.mode,i.onChange()}var i=e.undoManager=new l(e),o=i.editingHandler=new c(i),a=e.addCommand("undo",{exec:function(){i.undo()&&(e.selectionChange(),this.fire("afterUndo"))},startDisabled:!0,canUndo:!1}),r=e.addCommand("redo",{exec:function(){i.redo()&&(e.selectionChange(),this.fire("afterRedo"))},startDisabled:!0,canUndo:!1});e.setKeystroke([[s[0],"undo"],[s[1],"redo"],[s[2],"redo"]]),i.onChange=function(){a.setState(i.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),r.setState(i.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)},e.on("beforeCommandExec",t),e.on("afterCommandExec",t),e.on("saveSnapshot",function(e){i.save(e.data&&e.data.contentOnly)}),e.on("contentDom",o.attachListeners,o),e.on("instanceReady",function(){e.fire("saveSnapshot")}),e.on("beforeModeUnload",function(){"wysiwyg"==e.mode&&i.save(!0)}),e.on("mode",n),e.on("readOnly",n),e.ui.addButton&&(e.ui.addButton("Undo",{label:e.lang.undo.undo,command:"undo",toolbar:"undo,10"}),e.ui.addButton("Redo",{label:e.lang.undo.redo,command:"redo",toolbar:"undo,20"})),e.resetUndo=function(){i.reset(),e.fire("saveSnapshot")},e.on("updateSnapshot",function(){i.currentImage&&i.update()}),e.on("lockSnapshot",function(e){e=e.data,i.lock(e&&e.dontUpdate,e&&e.forceUpdate)}),e.on("unlockSnapshot",i.unlock,i)}}),CKEDITOR.plugins.undo={};var l=CKEDITOR.plugins.undo.UndoManager=function(e){this.strokesRecorded=[0,0],this.locked=null,this.previousKeyGroup=-1,this.limit=e.config.undoStackSize||20,this.strokesLimit=25,this._filterRules=[],this.editor=e,this.reset(),CKEDITOR.env.ie&&this.addFilterRule(function(e){return e.replace(/\s+data-cke-expando=".*?"/g,"")})};l.prototype={type:function(e,t){var n=l.getKeyGroup(e),e=this.strokesRecorded[n]+1;t=t||e>=this.strokesLimit,this.typing||(this.hasUndo=this.typing=!0,this.hasRedo=!1,this.onChange()),t?(e=0,this.editor.fire("saveSnapshot")):this.editor.fire("change"),this.strokesRecorded[n]=e,this.previousKeyGroup=n},keyGroupChanged:function(e){return l.getKeyGroup(e)!=this.previousKeyGroup},reset:function(){this.snapshots=[],this.index=-1,this.currentImage=null,this.hasRedo=this.hasUndo=!1,this.locked=null,this.resetType()},resetType:function(){this.strokesRecorded=[0,0],this.typing=!1,this.previousKeyGroup=-1},refreshState:function(){this.hasUndo=!!this.getNextImage(!0),this.hasRedo=!!this.getNextImage(!1),this.resetType(),this.onChange()},save:function(e,t,n){var i=this.editor;if(this.locked||"ready"!=i.status||"wysiwyg"!=i.mode)return!1;var o=i.editable();if(!o||"ready"!=o.status)return!1;if(o=this.snapshots,!1===(t=t||new a(i)).contents)return!1;if(this.currentImage)if(t.equalsContent(this.currentImage)){if(e||t.equalsSelection(this.currentImage))return!1}else!1!==n&&i.fire("change");return o.splice(this.index+1,o.length-this.index-1),o.length==this.limit&&o.shift(),this.index=o.push(t)-1,this.currentImage=t,!1!==n&&this.refreshState(),!0},restoreImage:function(e){var t,n=this.editor;e.bookmarks&&(n.focus(),t=n.getSelection()),this.locked={level:999},this.editor.loadSnapshot(e.contents),e.bookmarks?t.selectBookmarks(e.bookmarks):CKEDITOR.env.ie&&((t=this.editor.document.getBody().$.createTextRange()).collapse(!0),t.select()),this.locked=null,this.index=e.index,this.currentImage=this.snapshots[this.index],this.update(),this.refreshState(),n.fire("change")},getNextImage:function(e){var t,n=this.snapshots,i=this.currentImage;if(i)if(e){for(t=this.index-1;0<=t;t--)if(e=n[t],!i.equalsContent(e))return e.index=t,e}else for(t=this.index+1;t<n.length;t++)if(e=n[t],!i.equalsContent(e))return e.index=t,e;return null},redoable:function(){return this.enabled&&this.hasRedo},undoable:function(){return this.enabled&&this.hasUndo},undo:function(){if(this.undoable()){this.save(!0);var e=this.getNextImage(!0);if(e)return this.restoreImage(e),!0}return!1},redo:function(){if(this.redoable()&&(this.save(!0),this.redoable())){var e=this.getNextImage(!1);if(e)return this.restoreImage(e),!0}return!1},update:function(e){if(!this.locked){e=e||new a(this.editor);for(var t=this.index,n=this.snapshots;0<t&&this.currentImage.equalsContent(n[t-1]);)--t;n.splice(t,this.index-t+1,e),this.index=t,this.currentImage=e}},updateSelection:function(e){if(!this.snapshots.length)return!1;var t=this.snapshots,n=t[t.length-1];return!(!n.equalsContent(e)||n.equalsSelection(e))&&(this.currentImage=t[t.length-1]=e,!0)},lock:function(e,t){this.locked?this.locked.level++:e?this.locked={level:1}:(e=null,t?e=!0:(t=new a(this.editor,!0),this.currentImage&&this.currentImage.equalsContent(t)&&(e=t)),this.locked={update:e,level:1})},unlock:function(){var e,t;this.locked&&!--this.locked.level&&(e=this.locked.update,!(this.locked=null)===e?this.update():e&&(t=new a(this.editor,!0),e.equalsContent(t)||this.update()))},addFilterRule:function(e){this._filterRules.push(e)}},l.navigationKeyCodes={37:1,38:1,39:1,40:1,36:1,35:1,33:1,34:1},l.keyGroups={PRINTABLE:0,FUNCTIONAL:1},l.isNavigationKey=function(e){return!!l.navigationKeyCodes[e]},l.getKeyGroup=function(e){var t=l.keyGroups;return n[e]?t.FUNCTIONAL:t.PRINTABLE},l.getOppositeKeyGroup=function(e){var t=l.keyGroups;return e==t.FUNCTIONAL?t.PRINTABLE:t.FUNCTIONAL},l.ieFunctionalKeysBug=function(e){return CKEDITOR.env.ie&&l.getKeyGroup(e)==l.keyGroups.FUNCTIONAL};var a=CKEDITOR.plugins.undo.Image=function(e,t){(this.editor=e).fire("beforeUndoImage");var n,i=e.getSnapshot();i&&(this.contents=(n=e.undoManager._filterRules,CKEDITOR.tools.array.reduce(n,function(e,t){return t(e)},i))),t||(this.bookmarks=(i=i&&e.getSelection())&&i.createBookmarks2(!0)),e.fire("afterUndoImage")},i=/\b(?:href|src|name)="[^"]*?"/gi;a.prototype={equalsContent:function(e){var t=this.contents;return e=e.contents,CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)&&(t=t.replace(i,""),e=e.replace(i,"")),t==e},equalsSelection:function(e){var t=this.bookmarks;if(e=e.bookmarks,t||e){if(!t||!e||t.length!=e.length)return!1;for(var n=0;n<t.length;n++){var i=t[n],o=e[n];if(i.startOffset!=o.startOffset||i.endOffset!=o.endOffset||!CKEDITOR.tools.arrayCompare(i.start,o.start)||!CKEDITOR.tools.arrayCompare(i.end,o.end))return!1}}return!0}};var c=CKEDITOR.plugins.undo.NativeEditingHandler=function(e){this.undoManager=e,this.ignoreInputEvent=!1,this.keyEventsStack=new t,this.lastKeydownImage=null};c.prototype={onKeydown:function(e){var t=e.data.getKey();229!==t&&(-1<CKEDITOR.tools.indexOf(s,e.data.getKeystroke())?e.data.preventDefault():(this.keyEventsStack.cleanUp(e),e=this.undoManager,this.keyEventsStack.getLast(t)||this.keyEventsStack.push(t),this.lastKeydownImage=new a(e.editor),!l.isNavigationKey(t)&&!this.undoManager.keyGroupChanged(t)||(e.strokesRecorded[0]||e.strokesRecorded[1])&&(e.save(!1,this.lastKeydownImage,!1),e.resetType())))},onInput:function(){var e;this.ignoreInputEvent?this.ignoreInputEvent=!1:(e=(e=this.keyEventsStack.getLast())||this.keyEventsStack.push(0),this.keyEventsStack.increment(e.keyCode),this.keyEventsStack.getTotalInputs()>=this.undoManager.strokesLimit&&(this.undoManager.type(e.keyCode,!0),this.keyEventsStack.resetInputs()))},onKeyup:function(e){var t=this.undoManager;e=e.data.getKey();var n=this.keyEventsStack.getTotalInputs();this.keyEventsStack.remove(e),l.ieFunctionalKeysBug(e)&&this.lastKeydownImage&&this.lastKeydownImage.equalsContent(new a(t.editor,!0))||(0<n?t.type(e):l.isNavigationKey(e)&&this.onNavigationKey(!0))},onNavigationKey:function(e){var t=this.undoManager;!e&&t.save(!0,null,!1)||t.updateSelection(new a(t.editor)),t.resetType()},ignoreInputEventListener:function(){this.ignoreInputEvent=!0},activateInputEventListener:function(){this.ignoreInputEvent=!1},attachListeners:function(){var e=this.undoManager.editor,t=e.editable(),n=this;t.attachListener(t,"keydown",function(e){n.onKeydown(e),l.ieFunctionalKeysBug(e.data.getKey())&&n.onInput()},null,null,999),t.attachListener(t,CKEDITOR.env.ie?"keypress":"input",n.onInput,n,null,999),t.attachListener(t,"keyup",n.onKeyup,n,null,999),t.attachListener(t,"paste",n.ignoreInputEventListener,n,null,999),t.attachListener(t,"drop",n.ignoreInputEventListener,n,null,999),e.on("afterPaste",n.activateInputEventListener,n,null,999),t.attachListener(t.isInline()?t:e.document.getDocumentElement(),"click",function(){n.onNavigationKey()},null,null,999),t.attachListener(this.undoManager.editor,"blur",function(){n.keyEventsStack.remove(9)},null,null,999)}};var t=CKEDITOR.plugins.undo.KeyEventsStack=function(){this.stack=[]};t.prototype={push:function(e){return e=this.stack.push({keyCode:e,inputs:0}),this.stack[e-1]},getLastIndex:function(e){if("number"!=typeof e)return this.stack.length-1;for(var t=this.stack.length;t--;)if(this.stack[t].keyCode==e)return t;return-1},getLast:function(e){return-1!=(e=this.getLastIndex(e))?this.stack[e]:null},increment:function(e){this.getLast(e).inputs++},remove:function(e){-1!=(e=this.getLastIndex(e))&&this.stack.splice(e,1)},resetInputs:function(e){if("number"==typeof e)this.getLast(e).inputs=0;else for(e=this.stack.length;e--;)this.stack[e].inputs=0},getTotalInputs:function(){for(var e=this.stack.length,t=0;e--;)t+=this.stack[e].inputs;return t},cleanUp:function(e){(e=e.data.$).ctrlKey||e.metaKey||this.remove(17),e.shiftKey||this.remove(16),e.altKey||this.remove(18)}}}(),function(){function e(e,t){CKEDITOR.tools.extend(this,{editor:e,editable:e.editable(),doc:e.document,win:e.window},t,!0),this.inline=this.editable.isInline(),this.inline||(this.frame=this.win.getFrame()),this.target=this[this.inline?"editable":"doc"]}function t(e,t){CKEDITOR.tools.extend(this,t,{editor:e},!0)}function n(e,t){var n=e.editable();CKEDITOR.tools.extend(this,{editor:e,editable:n,inline:n.isInline(),doc:e.document,win:e.window,container:CKEDITOR.document.getBody(),winTop:CKEDITOR.document.getWindow()},t,!0),this.hidden={},this.visible={},this.inline||(this.frame=this.win.getFrame()),this.queryViewport();var i=CKEDITOR.tools.bind(this.queryViewport,this),o=CKEDITOR.tools.bind(this.hideVisible,this),t=CKEDITOR.tools.bind(this.removeAll,this);n.attachListener(this.winTop,"resize",i),n.attachListener(this.winTop,"scroll",i),n.attachListener(this.winTop,"resize",o),n.attachListener(this.win,"scroll",o),n.attachListener(this.inline?n:this.frame,"mouseout",function(e){var t=e.data.$.clientX;e=e.data.$.clientY,this.queryViewport(),(t<=this.rect.left||t>=this.rect.right||e<=this.rect.top||e>=this.rect.bottom)&&this.hideVisible(),(t<=0||t>=this.winTopPane.width||e<=0||e>=this.winTopPane.height)&&this.hideVisible()},this),n.attachListener(e,"resize",i),n.attachListener(e,"mode",t),e.on("destroy",t),this.lineTpl=new CKEDITOR.template('<div data-cke-lineutils-line="1" class="cke_reset_all" style="{lineStyle}"><span style="{tipLeftStyle}">&nbsp;</span><span style="{tipRightStyle}">&nbsp;</span></div>').output({lineStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},g,this.lineStyle,!0)),tipLeftStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},f,{left:"0px","border-left-color":"red","border-width":"6px 0 6px 6px"},this.tipCss,this.tipLeftStyle,!0)),tipRightStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},f,{right:"0px","border-right-color":"red","border-width":"6px 6px 6px 0"},this.tipCss,this.tipRightStyle,!0))})}function s(e){var t;return(t=(t=e&&e.type==CKEDITOR.NODE_ELEMENT)?!(m[e.getComputedStyle("float")]||m[e.getAttribute("align")]):t)&&!E[e.getComputedStyle("position")]}function a(e,t,n,i,o){for(var a,r=0;o(n)&&(n+=i,25!=++r);)if(a=this.doc.$.elementFromPoint(t,n))if(a==e)r=0;else if(l(e,a)&&(r=0,s(a=new CKEDITOR.dom.element(a))))return a}var l,i,o,r,c,d;function u(e,t,n){var i=e.getUniqueId();i in n?n[i].type|=t:n[i]={element:e,type:t}}function h(e,t){var n=e.element[t===CKEDITOR.LINEUTILS_BEFORE?"getPrevious":"getNext"]();return n&&s(n)?(e.siblingRect=n.getClientRect(),t==CKEDITOR.LINEUTILS_BEFORE?(e.siblingRect.bottom+e.elementRect.top)/2:(e.elementRect.bottom+e.siblingRect.top)/2):t==CKEDITOR.LINEUTILS_BEFORE?e.elementRect.top:e.elementRect.bottom}CKEDITOR.plugins.add("lineutils"),CKEDITOR.LINEUTILS_BEFORE=1,CKEDITOR.LINEUTILS_AFTER=2,CKEDITOR.LINEUTILS_INSIDE=4,e.prototype={start:function(e){var t,n,i,o=this,a=this.editor,r=this.doc,s=CKEDITOR.tools.eventsBuffer(50,function(){a.readOnly||"wysiwyg"!=a.mode||(o.relations={},(t=r.$.elementFromPoint(n,i))&&t.nodeType&&(t=new CKEDITOR.dom.element(t),o.traverseSearch(t),isNaN(n+i)||o.pixelSearch(t,n,i),e&&e(o.relations,n,i)))});this.listener=this.editable.attachListener(this.target,"mousemove",function(e){n=e.data.$.clientX,i=e.data.$.clientY,s.input()}),this.editable.attachListener(this.inline?this.editable:this.frame,"mouseout",function(){s.reset()})},stop:function(){this.listener&&this.listener.removeListener()},getRange:((i={})[CKEDITOR.LINEUTILS_BEFORE]=CKEDITOR.POSITION_BEFORE_START,i[CKEDITOR.LINEUTILS_AFTER]=CKEDITOR.POSITION_AFTER_END,i[CKEDITOR.LINEUTILS_INSIDE]=CKEDITOR.POSITION_AFTER_START,function(e){var t=this.editor.createRange();return t.moveToPosition(this.relations[e.uid].element,i[e.type]),t}),store:function(e,t){var n;t&CKEDITOR.LINEUTILS_AFTER&&s(n=e.getNext())&&n.isVisible()&&(u(n,CKEDITOR.LINEUTILS_BEFORE,this.relations),t^=CKEDITOR.LINEUTILS_AFTER),t&CKEDITOR.LINEUTILS_INSIDE&&s(n=e.getFirst())&&n.isVisible()&&(u(n,CKEDITOR.LINEUTILS_BEFORE,this.relations),t^=CKEDITOR.LINEUTILS_INSIDE),u(e,t,this.relations)},traverseSearch:function(e){var t,n,i;do{if(!((i=e.$["data-cke-expando"])&&i in this.relations)){if(e.equals(this.editable))break;if(s(e))for(t in this.lookups)(n=this.lookups[t](e))&&this.store(e,n)}}while((!e||e.type!=CKEDITOR.NODE_ELEMENT||"true"!=e.getAttribute("contenteditable"))&&(e=e.getParent()))},pixelSearch:(l=CKEDITOR.env.ie||CKEDITOR.env.webkit?function(e,t){return e.contains(t)}:function(e,t){return!!(16&e.compareDocumentPosition(t))},function(e,t,n){var i=this.win.getViewPaneSize().height,o=a.call(this,e.$,t,n,-1,function(e){return 0<e});if(t=a.call(this,e.$,t,n,1,function(e){return e<i}),o)for(this.traverseSearch(o);!o.getParent().equals(e);)o=o.getParent();if(t)for(this.traverseSearch(t);!t.getParent().equals(e);)t=t.getParent();for(;(o||t)&&((o=o&&o.getNext(s))&&!o.equals(t))&&(this.traverseSearch(o),(t=t&&t.getPrevious(s))&&!t.equals(o));)this.traverseSearch(t)}),greedySearch:function(){this.relations={};for(var e,t,n,i=this.editable.getElementsByTag("*"),o=0;e=i.getItem(o++);)if(!e.equals(this.editable)&&e.type==CKEDITOR.NODE_ELEMENT&&(e.hasAttribute("contenteditable")||!e.isReadOnly())&&s(e)&&e.isVisible())for(n in this.lookups)(t=this.lookups[n](e))&&this.store(e,t);return this.relations}},t.prototype={locate:function(e){var t,n;for(n in this.locations={},e)t=e[n],t.elementRect=t.element.getClientRect(),t.type&CKEDITOR.LINEUTILS_BEFORE&&this.store(n,CKEDITOR.LINEUTILS_BEFORE,h(t,CKEDITOR.LINEUTILS_BEFORE)),t.type&CKEDITOR.LINEUTILS_AFTER&&this.store(n,CKEDITOR.LINEUTILS_AFTER,h(t,CKEDITOR.LINEUTILS_AFTER)),t.type&CKEDITOR.LINEUTILS_INSIDE&&this.store(n,CKEDITOR.LINEUTILS_INSIDE,(t.elementRect.top+t.elementRect.bottom)/2);return this.locations},sort:function(e,t){for(var n in o=this.locations,r=[],o)for(var i in o[n])if(c=Math.abs(e-o[n][i]),r.length){for(d=0;d<r.length;d++)if(c<r[d].dist){r.splice(d,0,{uid:+n,type:i,dist:c});break}d==r.length&&r.push({uid:+n,type:i,dist:c})}else r.push({uid:+n,type:i,dist:c});return void 0!==t?r.slice(0,t):r},store:function(e,t,n){this.locations[e]||(this.locations[e]={}),this.locations[e][t]=n}};var f={display:"block",width:"0px",height:"0px","border-color":"transparent","border-style":"solid",position:"absolute",top:"-6px"},g={height:"0px","border-top":"1px dashed red",position:"absolute","z-index":9999};n.prototype={removeAll:function(){for(var e in this.hidden)this.hidden[e].remove(),delete this.hidden[e];for(e in this.visible)this.visible[e].remove(),delete this.visible[e]},hideLine:function(e){var t=e.getUniqueId();e.hide(),this.hidden[t]=e,delete this.visible[t]},showLine:function(e){var t=e.getUniqueId();e.show(),this.visible[t]=e,delete this.hidden[t]},hideVisible:function(){for(var e in this.visible)this.hideLine(this.visible[e])},placeLine:function(e,t){var n,i;if(e=this.getStyle(e.uid,e.type)){for(i in this.visible)if(this.visible[i].getCustomData("hash")!==this.hash){n=this.visible[i];break}if(!n)for(i in this.hidden)if(this.hidden[i].getCustomData("hash")!==this.hash){this.showLine(n=this.hidden[i]);break}n||this.showLine(n=this.addLine()),n.setCustomData("hash",this.hash),(this.visible[n.getUniqueId()]=n).setStyles(e),t&&t(n)}},getStyle:function(e,t){var n,i=this.relations[e],t=this.locations[e][t],o={};if(o.width=i.siblingRect?Math.max(i.siblingRect.width,i.elementRect.width):i.elementRect.width,o.top=this.inline?t+this.winTopScroll.y-this.rect.relativeY:this.rect.top+this.winTopScroll.y+t,o.top-this.winTopScroll.y<this.rect.top||o.top-this.winTopScroll.y>this.rect.bottom)return!1;for(n in this.inline?o.left=i.elementRect.left-this.rect.relativeX:(0<i.elementRect.left?o.left=this.rect.left+i.elementRect.left:(o.width+=i.elementRect.left,o.left=this.rect.left),0<(i=o.left+o.width-(this.rect.left+this.winPane.width))&&(o.width-=i)),o.left+=this.winTopScroll.x,o)o[n]=CKEDITOR.tools.cssLength(o[n]);return o},addLine:function(){var e=CKEDITOR.dom.element.createFromHtml(this.lineTpl);return e.appendTo(this.container),e},prepare:function(e,t){this.relations=e,this.locations=t,this.hash=Math.random()},cleanup:function(){var e,t;for(t in this.visible)e=this.visible[t],e.getCustomData("hash")!==this.hash&&this.hideLine(e)},queryViewport:function(){this.winPane=this.win.getViewPaneSize(),this.winTopScroll=this.winTop.getScrollPosition(),this.winTopPane=this.winTop.getViewPaneSize(),this.rect=this.getClientRect(this.inline?this.editable:this.frame)},getClientRect:function(e){e=e.getClientRect();var t=this.container.getDocumentPosition(),n=this.container.getComputedStyle("position");return e.relativeX=e.relativeY=0,"static"!=n&&(e.relativeY=t.y,e.relativeX=t.x,e.top-=e.relativeY,e.bottom-=e.relativeY,e.left-=e.relativeX,e.right-=e.relativeX),e}};var m={left:1,right:1,center:1},E={absolute:1,fixed:1};CKEDITOR.plugins.lineutils={finder:e,locator:t,liner:n}}(),CKEDITOR.plugins.add("widgetselection",{init:function(e){var n;CKEDITOR.env.webkit&&(n=CKEDITOR.plugins.widgetselection,e.on("contentDom",function(e){var t=(e=e.editor).editable();t.attachListener(t,"keydown",function(e){e.data.getKeystroke()==CKEDITOR.CTRL+65&&CKEDITOR.tools.setTimeout(function(){n.addFillers(t)||n.removeFillers(t)},0)},null,null,-1),e.on("selectionCheck",function(e){n.removeFillers(e.editor.editable())}),e.on("paste",function(e){e.data.dataValue=n.cleanPasteData(e.data.dataValue)}),"selectall"in e.plugins&&n.addSelectAllIntegration(e)}))}}),CKEDITOR.plugins.widgetselection={startFiller:null,endFiller:null,fillerAttribute:"data-cke-filler-webkit",fillerContent:"&nbsp;",fillerTagName:"div",addFillers:function(e){var t=e.editor;if(!this.isWholeContentSelected(e)&&0<e.getChildCount()){var n=e.getFirst(tt),i=e.getLast(tt);if(n&&n.type==CKEDITOR.NODE_ELEMENT&&!n.isEditable()&&(this.startFiller=this.createFiller(),e.append(this.startFiller,1)),i&&i.type==CKEDITOR.NODE_ELEMENT&&!i.isEditable()&&(this.endFiller=this.createFiller(!0),e.append(this.endFiller,0)),this.hasFiller(e))return(t=t.createRange()).selectNodeContents(e),t.select(),!0}return!1},removeFillers:function(e){var t,n;this.hasFiller(e)&&!this.isWholeContentSelected(e)&&(t=e.findOne(this.fillerTagName+"["+this.fillerAttribute+"=start]"),n=e.findOne(this.fillerTagName+"["+this.fillerAttribute+"=end]"),this.startFiller&&t&&this.startFiller.equals(t)?this.removeFiller(this.startFiller,e):this.startFiller=t,this.endFiller&&n&&this.endFiller.equals(n)?this.removeFiller(this.endFiller,e):this.endFiller=n)},cleanPasteData:function(e){return e=e&&e.length?e.replace(this.createFillerRegex(),"").replace(this.createFillerRegex(!0),""):e},isWholeContentSelected:function(e){var t=e.editor.getSelection().getRanges()[0];return!(!t||t&&t.collapsed)&&((t=t.clone()).enlarge(CKEDITOR.ENLARGE_ELEMENT),!!(t&&e&&t.startContainer&&t.endContainer&&0===t.startOffset&&t.endOffset===e.getChildCount()&&t.startContainer.equals(e)&&t.endContainer.equals(e)))},hasFiller:function(e){return 0<e.find(this.fillerTagName+"["+this.fillerAttribute+"]").count()},createFiller:function(e){var t=new CKEDITOR.dom.element(this.fillerTagName);return t.setHtml(this.fillerContent),t.setAttribute(this.fillerAttribute,e?"end":"start"),t.setAttribute("data-cke-temp",1),t.setStyles({display:"block",width:0,height:0,padding:0,border:0,margin:0,position:"absolute",top:0,left:"-9999px",opacity:0,overflow:"hidden"}),t},removeFiller:function(e,t){var n,i,o,a,r;e&&(n=t.editor,i=t.editor.getSelection().getRanges()[0].startPath(),o=n.createRange(),i.contains(e)&&(a=e.getHtml(),r=!0),i="start"==e.getAttribute(this.fillerAttribute),e.remove(),a&&0<a.length&&a!=this.fillerContent?(t.insertHtmlIntoRange(a,n.getSelection().getRanges()[0]),o.setStartAt(t.getChild(t.getChildCount()-1),CKEDITOR.POSITION_BEFORE_END),n.getSelection().selectRanges([o])):r&&(i?o.setStartAt(t.getFirst().getNext(),CKEDITOR.POSITION_AFTER_START):o.setEndAt(t.getLast().getPrevious(),CKEDITOR.POSITION_BEFORE_END),t.editor.getSelection().selectRanges([o])))},createFillerRegex:function(e){var t=this.createFiller(e).getOuterHtml().replace(/style="[^"]*"/gi,'style="[^"]*"').replace(/>[^<]*</gi,">[^<]*<");return new RegExp((e?"":"^")+t+(e?"$":""))},addSelectAllIntegration:function(n){var i=this;n.editable().attachListener(n,"beforeCommandExec",function(e){var t=n.editable();"selectAll"==e.data.name&&t&&i.addFillers(t)},null,null,9999)}},function(){function t(e){var a,c,r,s,l,d,o,u,h,f,g,t,n,i;function m(e){n.selected.length<1||v(i,"cut"===e.name)}this.editor=e,this.registered={},this.instances={},this.selected=[],this.widgetHoldingFocusedEditable=this.focused=null,this._={nextId:0,upcasts:[],upcastCallbacks:[],filters:{}},(s=(a=this).editor).on("toHtml",function(e){var t,r,s,l,n=(r=[],s=a._.upcasts,l=a._.upcastCallbacks,{toBeWrapped:r,iterator:function(e){var t,n,i,o,a;if("data-cke-widget-wrapper"in e.attributes)return(e=e.getFirst(E.isParserWidgetElement))&&r.push([e]),!1;if("data-widget"in e.attributes)return r.push([e]),!1;if(a=s.length){if(e.attributes["data-cke-widget-upcasted"])return!1;for(o=0,t=l.length;o<t;++o)if(!1===l[o](e))return;for(o=0;o<a;++o)if(n=(t=s[o])[0](e,i={}))return(e=n instanceof CKEDITOR.htmlParser.element?n:e).attributes["data-cke-widget-data"]=encodeURIComponent(JSON.stringify(i)),e.attributes["data-cke-widget-upcasted"]=1,r.push([e,t[1]]),!1}}});for(e.data.dataValue.forEach(n.iterator,CKEDITOR.NODE_ELEMENT,!0);t=n.toBeWrapped.pop();){var i=t[0],o=i.parent;o.type==CKEDITOR.NODE_ELEMENT&&o.attributes["data-cke-widget-wrapper"]&&o.replaceWith(i),a.wrapElement(t[0],t[1])}c=e.data.protectedWhitespaces?3==e.data.dataValue.children.length&&E.isParserWidgetWrapper(e.data.dataValue.children[1]):1==e.data.dataValue.children.length&&E.isParserWidgetWrapper(e.data.dataValue.children[0])},null,null,8),s.on("dataReady",function(){if(r)for(var e,t,n=s.editable().find(".cke_widget_wrapper"),i=0,o=n.count();i<o;++i)(t=(e=n.getItem(i)).getFirst(E.isDomWidgetElement)).type==CKEDITOR.NODE_ELEMENT&&t.data("widget")?(t.replace(e),a.wrapElement(t)):e.remove();r=0,a.destroyAll(!0),a.initOnAll()}),s.on("loadSnapshot",function(e){/data-cke-widget/.test(e.data)&&(r=1),a.destroyAll(!0)},null,null,9),s.on("paste",function(e){(e=e.data).dataValue=e.dataValue.replace(N,D),e.range&&(e=E.getNestedEditable(s.editable(),e.range.startContainer))&&(e=CKEDITOR.filter.instances[e.data("cke-filter")])&&s.setActiveFilter(e)}),s.on("afterInsertHtml",function(e){e.data.intoRange?a.checkWidgets({initOnlyNew:!0}):(s.fire("lockSnapshot"),a.checkWidgets({initOnlyNew:!0,focusInited:c}),s.fire("unlockSnapshot"))}),e=(l=this).editor,d={},e.on("toDataFormat",function(e){var t=CKEDITOR.tools.getNextNumber(),o=[];e.data.downcastingSessionId=t,d[t]=o,e.data.dataValue.forEach(function(e){var t,n,i=e.attributes;if("data-cke-widget-white-space"in i&&(t=C(e),n=I(e),t.parent.attributes["data-cke-white-space-first"]&&(t.value=t.value.replace(/^&nbsp;/g," ")),n.parent.attributes["data-cke-white-space-last"]&&(n.value=n.value.replace(/&nbsp;$/g," "))),"data-cke-widget-id"in i)(i=l.instances[i["data-cke-widget-id"]])&&(t=e.getFirst(E.isParserWidgetElement),o.push({wrapper:e,element:t,widget:i,editables:{}}),"1"!=t.attributes["data-cke-widget-keep-attr"]&&delete t.attributes["data-widget"]);else if("data-cke-widget-editable"in i)return 0<o.length&&(o[o.length-1].editables[i["data-cke-widget-editable"]]=e),!1},CKEDITOR.NODE_ELEMENT,!0)},null,null,8),e.on("toDataFormat",function(e){if(e.data.downcastingSessionId)for(var t,n,i,o,a,r,s=d[e.data.downcastingSessionId];t=s.shift();){for(r in n=t.widget,i=t.element,o=n._.downcastFn&&n._.downcastFn.call(n,i),e.data.widgetsCopy&&n.getClipboardHtml&&(o=(o=CKEDITOR.htmlParser.fragment.fromHtml(n.getClipboardHtml())).children[0]),t.editables)a=t.editables[r],delete a.attributes.contenteditable,a.setHtml(n.editables[r].getData());t.wrapper.replaceWith(o=o||i)}},null,null,13),e.on("contentDomUnload",function(){l.destroyAll(!0)}),this.on("checkWidgets",T),this.editor.on("contentDomInvalidated",this.checkWidgets,this),function(i){function o(e){return e?e.type==CKEDITOR.NODE_TEXT?o(e.getParent()):a.widgets.getByElement(e):null}function e(){i.fire("checkSelection")}var a=i.editor;a.on("selectionCheck",e),a.on("contentDom",function(){a.editable().attachListener(a,"key",function(){setTimeout(e,10)})}),CKEDITOR.env.ie||i.on("checkSelection",function(){var e,t,n=a.getSelection();(n=n&&n.getRanges()[0])&&!n.collapsed&&(e=o(n.startContainer),t=o(n.endContainer),!e&&t?(n.setEndBefore(t.wrapper),n.select()):e&&!t&&(n.setStartAfter(e.wrapper),n.select()))});i.on("checkSelection",i.checkSelection,i),a.on("selectionChange",function(e){var t=(e=E.getNestedEditable(a.editable(),e.data.selection.getStartElement()))&&i.getByElement(e),n=i.widgetHoldingFocusedEditable;n?n===t&&n.focusedEditable.equals(e)||(O(i,n,null),t&&e&&O(i,t,e)):t&&e&&O(i,t,e)}),a.on("dataReady",function(){R(i).commit()}),a.on("blur",function(){var e;(e=i.focused)&&p(i,e),(e=i.widgetHoldingFocusedEditable)&&O(i,e,null)})}(this),(u=(o=this).editor).on("contentDom",function(){var n,i,e=u.editable(),t=e.isInline()?e:u.document;e.attachListener(t,"mousedown",function(e){var t=e.data.getTarget();n=t instanceof CKEDITOR.dom.element?o.getByElement(t):null,i=0,n&&(n.inline&&t.type==CKEDITOR.NODE_ELEMENT&&t.hasAttribute("data-cke-widget-drag-handler")?(i=1,o.focused!=n&&u.getSelection().removeAllRanges()):E.getNestedEditable(n.wrapper,t)?n=null:(e.data.preventDefault(),CKEDITOR.env.ie||n.focus()))}),e.attachListener(t,"mouseup",function(){i&&n&&n.wrapper&&(i=0,n.focus())}),CKEDITOR.env.ie&&e.attachListener(t,"mouseup",function(){setTimeout(function(){n&&n.wrapper&&e.contains(n.wrapper)&&(n.focus(),n=null)})})}),u.on("doubleclick",function(e){var t=o.getByElement(e.data.element);if(t&&!E.getNestedEditable(t.wrapper,e.data.element))return t.fire("doubleclick",{element:e.data.element})},null,null,1),(h=this).editor.on("key",function(e){var t,n=h.focused,i=h.widgetHoldingFocusedEditable;return n?t=n.fire("key",{keyCode:e.data.keyCode}):i&&(n=e.data.keyCode,e=i.focusedEditable,t=n==CKEDITOR.CTRL+65?(n=e.getBogus(),(i=i.editor.createRange()).selectNodeContents(e),n&&i.setEndAt(n,CKEDITOR.POSITION_BEFORE_START),i.select(),!1):8==n||46==n?(i=(t=i.editor.getSelection().getRanges())[0],!(1==t.length&&i.collapsed&&i.checkBoundaryOfElement(e,CKEDITOR[8==n?"START":"END"]))):void 0),t},null,null,1),g=(f=this).editor,t=CKEDITOR.plugins.lineutils,g.on("dragstart",function(e){var t=e.data.target;E.isDomDragHandler(t)&&(t=f.getByElement(t),e.data.dataTransfer.setData("cke/widget-id",t.id),g.focus(),t.focus())}),g.on("drop",function(e){var t,n,i,o=(r=e.data.dataTransfer).getData("cke/widget-id"),a=r.getTransferType(g),r=g.createRange(),t=((t=(t=e.data.dropRange).getBoundaryNodes().startNode).type!==CKEDITOR.NODE_ELEMENT&&(t=t.getParent()),g.widgets.getByElement(t));""!==o&&a===CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?e.cancel():a==CKEDITOR.DATA_TRANSFER_INTERNAL&&(""===o&&0<g.widgets.selected.length?e.data.dataTransfer.setData("text/html",b(g)):(o=f.instances[o])&&(i=t,(n=o)&&i&&(n.wrapper.equals(i.wrapper)||n.wrapper.contains(i.wrapper))?e.cancel():(r.setStartBefore(o.wrapper),r.setEndAfter(o.wrapper),e.data.dragRange=r,delete CKEDITOR.plugins.clipboard.dragStartContainerChildCount,delete CKEDITOR.plugins.clipboard.dragEndContainerChildCount,e.data.dataTransfer.setData("text/html",o.getClipboardHtml()),g.widgets.destroy(o,!0))))}),g.on("contentDom",function(){var n=g.editable();CKEDITOR.tools.extend(f,{finder:new t.finder(g,{lookups:{default:function(e){if(!e.is(CKEDITOR.dtd.$listItem)&&e.is(CKEDITOR.dtd.$block)&&!E.isDomNestedEditable(e)&&!f._.draggedWidget.wrapper.contains(e)){var t=E.getNestedEditable(n,e);if(t){if(e=f._.draggedWidget,f.getByElement(t)==e)return;if(t=CKEDITOR.filter.instances[t.data("cke-filter")],e=e.requiredContent,t&&e&&!t.check(e))return}return CKEDITOR.LINEUTILS_BEFORE|CKEDITOR.LINEUTILS_AFTER}}}}),locator:new t.locator(g),liner:new t.liner(g,{lineStyle:{cursor:"move !important","border-top-color":"#666"},tipLeftStyle:{"border-left-color":"#666"},tipRightStyle:{"border-right-color":"#666"}})},!0)}),(i=(n=this).editor).on("contentDom",function(){var e=i.editable();e.attachListener(e,"copy",m),e.attachListener(e,"cut",m)})}function E(e,t,n,i,o){var a=e.editor;CKEDITOR.tools.extend(this,i,{editor:a,id:t,inline:"span"==n.getParent().getName(),element:n,data:CKEDITOR.tools.extend({},"function"==typeof i.defaults?i.defaults():i.defaults),dataReady:!1,inited:!1,ready:!1,edit:E.prototype.edit,focusedEditable:null,definition:i,repository:e,draggable:!1!==i.draggable,_:{downcastFn:i.downcast&&"string"==typeof i.downcast?i.downcasts[i.downcast]:i.downcast}},!0),e.fire("instanceCreated",this),function(n,e){(function(e){(e.wrapper=e.element.getParent()).setAttribute("data-cke-widget-id",e.id)})(n),f(n),function(e){var t,n,i=e.editables;if(e.editables={},e.editables)for(t in i)n=i[t],e.initEditable(t,"string"==typeof n?{selector:n}:n)}(n),m(n),function(e){{var t,n,i;e.draggable&&(t=e.editor,(n=e.wrapper.getLast(E.isDomDragHandlerContainer))?i=n.findOne("img"):((n=new CKEDITOR.dom.element("span",t.document)).setAttributes({class:"cke_reset cke_widget_drag_handler_container",style:"background:rgba(220,220,220,0.5);background-image:url("+t.plugins.widget.path+"images/handle.png);display:none;"}),(i=new CKEDITOR.dom.element("img",t.document)).setAttributes({class:"cke_reset cke_widget_drag_handler","data-cke-widget-drag-handler":"1",src:CKEDITOR.tools.transparentImageData,width:15,title:t.lang.widget.move,height:15,role:"presentation"}),e.inline&&i.setAttribute("draggable","true"),n.append(i),e.wrapper.append(n)),e.wrapper.on("dragover",function(e){e.data.preventDefault()}),e.wrapper.on("mouseenter",e.updateDragHandlerPosition,e),setTimeout(function(){e.on("data",e.updateDragHandlerPosition,e)},50),!e.inline&&(i.on("mousedown",K,e),CKEDITOR.env.ie&&CKEDITOR.env.version<9)&&i.on("dragstart",function(e){e.data.preventDefault(!0)}),e.dragHandlerContainer=n)}}(n),function(e){var n=null;e.on("data",function(){var e,t=this.data.classes;if(n!=t){for(e in n)t&&t[e]||this.removeClass(e);for(e in t)this.addClass(e);n=t}})}(n),function(t){t.on("data",function(){var e;t.wrapper&&(e=this.getLabel?this.getLabel():this.editor.lang.widget.label.replace(/%1/,this.pathName||this.element.getName()),t.wrapper.setAttribute("role","region"),t.wrapper.setAttribute("aria-label",e))},null,null,9999)}(n),CKEDITOR.env.ie&&CKEDITOR.env.version<9&&n.wrapper.on("dragstart",function(e){var t=e.data.getTarget();E.getNestedEditable(n,t)||n.inline&&E.isDomDragHandler(t)||e.data.preventDefault()});n.wrapper.removeClass("cke_widget_new"),n.element.addClass("cke_widget_element"),n.on("key",function(e){if(13==(e=e.data.keyCode))n.edit();else{if(e==CKEDITOR.CTRL+67||e==CKEDITOR.CTRL+88)return void v(n.editor,e==CKEDITOR.CTRL+88);if(e in S||CKEDITOR.CTRL&e||CKEDITOR.ALT&e)return}return!1},null,null,999),n.on("doubleclick",function(e){n.edit()&&e.cancel()}),e.data&&n.on("data",e.data);e.edit&&n.on("edit",e.edit)}(this,i),this.init&&this.init(),this.inited=!0,(e=this.element.data("cke-widget-data"))&&this.setData(JSON.parse(decodeURIComponent(e))),o&&this.setData(o),this.data.classes||this.setData("classes",this.getClasses()),this.dataReady=!0,_(this),this.fire("data",this.data),this.isInited()&&a.editable().contains(this.wrapper)&&(this.ready=!0,this.fire("ready"))}function i(e,t,n){CKEDITOR.dom.element.call(this,t.$),this.editor=e,this._={},t=this.filter=n.filter,CKEDITOR.dtd[this.getName()].p?(this.enterMode=t?t.getAllowedEnterMode(e.enterMode):e.enterMode,this.shiftEnterMode=t?t.getAllowedEnterMode(e.shiftEnterMode,!0):e.shiftEnterMode):this.enterMode=this.shiftEnterMode=CKEDITOR.ENTER_BR}function a(o,a){function e(e,t,n){var i=CKEDITOR.tools.getIndex(o._.upcasts,function(e){return e[2]>n});i<0&&(i=o._.upcasts.length),o._.upcasts.splice(i,0,[CKEDITOR.tools.bind(e,t),t.name,n])}var t=a.upcast,n=a.upcastPriority||10;t&&e("string"==typeof t?function(e,t){for(var n,i=a.upcast.split(","),o=0;o<i.length;o++)if((n=i[o])===e.name)return a.upcasts[n].call(this,e,t);return!1}:t,a,n)}function p(e,t){var n;e.focused=null,t.isInited()&&(n=t.editor.checkDirty(),e.fire("widgetBlurred",{widget:t}),t.setFocused(!1),n||t.editor.resetDirty())}function T(e){if(e=e.data,"wysiwyg"==this.editor.mode){var t,n=this.editor.editable(),i=this.instances;if(n){for(a in i)i[a].isReady()&&!n.contains(i[a].wrapper)&&this.destroy(i[a],!0);if(e&&e.initOnlyNew)i=this.initOnAll();else for(var o=n.find(".cke_widget_wrapper"),i=[],a=0,r=o.count();a<r;a++){if(t=o.getItem(a),s=!this.getByElement(t,!0)){e:{for(var s=c,l=t;l=l.getParent();)if(s(l)){s=!0;break e}s=!1}s=!s}s&&n.contains(t)&&(t.addClass("cke_widget_new"),i.push(this.initOn(t.getFirst(E.isDomWidgetElement))))}e&&e.focusInited&&1==i.length&&i[0].focus()}}}function r(e){var t,n,i;void 0!==e.attributes&&e.attributes["data-widget"]&&(t=C(e),n=I(e),i=!1,t&&t.value&&t.value.match(/^\s/g)&&(t.parent.attributes["data-cke-white-space-first"]=1,t.value=t.value.replace(/^\s/g,"&nbsp;"),i=!0),n&&n.value&&n.value.match(/\s$/g)&&(n.parent.attributes["data-cke-white-space-last"]=1,n.value=n.value.replace(/\s$/g,"&nbsp;"),i=!0),i&&(e.attributes["data-cke-widget-white-space"]=1))}function C(e){return e.find(function(e){return 3===e.type},!0).shift()}function I(e){return e.find(function(e){return 3===e.type},!0).pop()}function o(e,t,n){if(!n.allowedContent&&!n.disallowedContent)return null;var i=this._.filters[e];return i||(this._.filters[e]=i={}),(e=i[t])||(e=n.allowedContent?new CKEDITOR.filter(n.allowedContent):this.editor.filter.clone(),i[t]=e,n.disallowedContent&&e.disallow(n.disallowedContent)),e}function s(e,t){return{tabindex:-1,contenteditable:"false","data-cke-widget-wrapper":1,"data-cke-filter":"off",class:"cke_widget_wrapper cke_widget_new cke_widget_"+(e?"inline":"block")+(t?" cke_widget_"+t:"")}}function l(e,t){return"boolean"==typeof e.inline?e.inline:!!CKEDITOR.dtd.$inline[t]}function c(e){return e.hasAttribute("data-cke-temp")}function O(e,t,n,i){var o=e.editor;o.fire("lockSnapshot"),n?(i=n.data("cke-widget-editable"),i=t.editables[i],(e.widgetHoldingFocusedEditable=t).focusedEditable=i,n.addClass("cke_widget_editable_focused"),i.filter&&o.setActiveFilter(i.filter),o.setActiveEnterMode(i.enterMode,i.shiftEnterMode)):(i||t.focusedEditable.removeClass("cke_widget_editable_focused"),t.focusedEditable=null,e.widgetHoldingFocusedEditable=null,o.setActiveFilter(null),o.setActiveEnterMode(null,null)),o.fire("unlockSnapshot")}function D(e,t){return CKEDITOR.tools.trim(t)}function R(i){var o=i.selected,a=[],r=o.slice(0),s=null;return{select:function(e){return CKEDITOR.tools.indexOf(o,e)<0&&a.push(e),0<=(e=CKEDITOR.tools.indexOf(r,e))&&r.splice(e,1),this},focus:function(e){return s=e,this},commit:function(){var e,t,n=i.focused!==s;for(i.editor.fire("lockSnapshot"),n&&(e=i.focused)&&p(i,e);e=r.pop();)o.splice(CKEDITOR.tools.indexOf(o,e),1),e.isInited()&&(t=e.editor.checkDirty(),e.setSelected(!1),t||e.editor.resetDirty());for(n&&s&&(t=i.editor.checkDirty(),i.focused=s,i.fire("widgetFocused",{widget:s}),s.setFocused(!0),t||i.editor.resetDirty());e=a.pop();)o.push(e),e.setSelected(!0);i.editor.fire("unlockSnapshot")}}}function n(e,t,n){var i=0;t=d(t);var o,a=e.data.classes||{};if(t){for(a=CKEDITOR.tools.clone(a);o=t.pop();)n?a[o]||(i=a[o]=1):a[o]&&(delete a[o],i=1);i&&e.setData("classes",a)}}function g(e){e.cancel()}function v(e,t){var n,i,o,a=e.widgets.focused;x.hasCopyBin(e)||(i=new x(e,{beforeDestroy:function(){!t&&a&&a.focus(),o&&e.getSelection().selectBookmarks(o),n&&CKEDITOR.plugins.widgetselection.addFillers(e.editable())},afterDestroy:function(){t&&!e.readOnly&&(a?e.widgets.del(a):e.extractSelectedHtml(),e.fire("saveSnapshot"))}}),a||(n=CKEDITOR.env.webkit&&CKEDITOR.plugins.widgetselection.isWholeContentSelected(e.editable()),o=e.getSelection().createBookmarks(!0)),i.handle(b(e)))}function d(e){return(e=(e=e.getDefinition().attributes)&&e.class)?e.split(/\s+/):null}function u(){var e=CKEDITOR.document.getActive(),t=this.editor,n=t.editable();(n.isInline()?n:t.document.getWindow().getFrame()).equals(e)&&t.focusManager.focus(n)}function h(){CKEDITOR.env.gecko&&this.editor.unlockSelection(),CKEDITOR.env.webkit||(this.editor.forceNextSelectionCheck(),this.editor.selectionChange(1))}function b(e){var t=e.getSelectedHtml(!0);return e.widgets.focused?e.widgets.focused.getClipboardHtml():(e.once("toDataFormat",function(e){e.data.widgetsCopy=!0},null,null,-1),e.dataProcessor.toDataFormat(t))}function f(e,t){if(e.partSelectors||(e.partSelectors=e.parts),e.parts){var n,i,o={};for(i in e.partSelectors)t||!e.parts[i]||"string"==typeof e.parts[i]?(n=e.wrapper.findOne(e.partSelectors[i]),o[i]=n):o[i]=e.parts[i];e.parts=o}}function m(e){if(!0===e.mask)(s=(r=e).wrapper.findOne(".cke_widget_mask"))||((s=new CKEDITOR.dom.element("img",r.editor.document)).setAttributes({src:CKEDITOR.tools.transparentImageData,class:"cke_reset cke_widget_mask"}),r.wrapper.append(s)),r.mask=s;else if(e.mask){var t,n,i,o=new CKEDITOR.tools.buffers.throttle(250,y,e),a=CKEDITOR.env.gecko?300:0;for(i in e.on("focus",function(){o.input(),t=e.editor.on("change",o.input),n=e.on("blur",function(){t.removeListener(),n.removeListener()})}),e.editor.on("instanceReady",function(){setTimeout(function(){o.input()},a)}),e.editor.on("mode",function(){setTimeout(function(){o.input()},a)}),CKEDITOR.env.gecko&&(s=e.element.find("img"),CKEDITOR.tools.array.forEach(s.toArray(),function(e){e.on("load",function(){o.input()})})),e.editables)e.editables[i].on("focus",function(){e.editor.on("change",o.input),n&&n.removeListener()}),e.editables[i].on("blur",function(){e.editor.removeListener("change",o.input)});o.input()}var r,s}function y(){var e,t,n,i,o;this.wrapper&&(this.maskPart=this.maskPart||this.mask,(e=this.parts[this.maskPart])&&"string"!=typeof e&&((t=this.wrapper.findOne(".cke_widget_partial_mask"))||((t=new CKEDITOR.dom.element("img",this.editor.document)).setAttributes({src:CKEDITOR.tools.transparentImageData,class:"cke_reset cke_widget_partial_mask"}),this.wrapper.append(t)),n=(this.mask=t).$,i=e.$,o=!(n.offsetTop==i.offsetTop&&n.offsetLeft==i.offsetLeft),n.offsetWidth==i.offsetWidth&&n.offsetHeight==i.offsetHeight&&!o||(n=e.getParent(),i=CKEDITOR.plugins.widget.isDomWidget(n),t.setStyles({top:e.$.offsetTop+(i?0:n.$.offsetTop)+"px",left:e.$.offsetLeft+(i?0:n.$.offsetLeft)+"px",width:e.$.offsetWidth+"px",height:e.$.offsetHeight+"px"}))))}function K(r){function e(){for(h.reset();t=s.pop();)t.removeListener();var e=l,t=r.sender,n=this.repository.finder,i=this.repository.liner,o=this.editor,a=this.editor.editable();CKEDITOR.tools.isEmpty(i.visible)||(e=n.getRange(e[0]),this.focus(),o.fire("drop",{dropRange:e,target:e.startContainer})),a.removeClass("cke_widget_dragging"),i.hideVisible(),o.fire("dragend",{target:t})}var t,n,i,o,a,s,l,c,d,u,h;CKEDITOR.tools.getMouseButton(r)===CKEDITOR.MOUSE_BUTTON_LEFT&&(t=this.repository.finder,n=this.repository.locator,i=this.repository.liner,a=(o=this.editor).editable(),s=[],l=[],this.repository._.draggedWidget=this,u=t.greedySearch(),h=CKEDITOR.tools.eventsBuffer(50,function(){c=n.locate(u),(l=n.sort(d,1)).length&&(i.prepare(u,c),i.placeLine(l[0]),i.cleanup())}),a.addClass("cke_widget_dragging"),s.push(a.on("mousemove",function(e){d=e.data.$.clientY,h.input()})),o.fire("dragstart",{target:r.sender}),s.push(o.document.once("mouseup",e,this)),a.isInline()||s.push(CKEDITOR.document.once("mouseup",e,this)))}function _(e){e.element.data("cke-widget-data",encodeURIComponent(JSON.stringify(e.data)))}function e(){function e(){}function t(e,t,n){return!(!n||!this.checkElement(e))&&((e=n.widgets.getByElement(e,!0))&&e.checkStyleActive(this))}function n(e){function t(t){return function(e){return function e(t,n){var i,o=CKEDITOR.tools.object.keys(t),a=CKEDITOR.tools.object.keys(n);if(o.length!==a.length)return!1;for(i in t)if(("object"!=typeof t[i]||"object"!=typeof n[i]||!e(t[i],n[i]))&&t[i]!==n[i])return!1;return!0}(t.getDefinition(),e.getDefinition())}}var n,i=e.widget;s[i]||(s[i]={});for(var o=0,a=e.group.length;o<a;o++)n=e.group[o],s[i][n]||(s[i][n]=[]),function(e,t,n){for(var i=e.length,o=0;o<i;){if(t.call(n,e[o],o,e))return e[o];o++}}(n=s[i][n],t(e))||n.push(e)}var s={};CKEDITOR.style.addCustomHandler({type:"widget",setup:function(e){this.widget=e.widget,(this.group="string"==typeof e.group?[e.group]:e.group)&&n(this)},apply:function(e){var t;e instanceof CKEDITOR.editor&&this.checkApplicable(e.elementPath(),e)&&(t=e.widgets.focused,this.group&&this.removeStylesFromSameGroup(e),t.applyStyle(this))},remove:function(e){e instanceof CKEDITOR.editor&&this.checkApplicable(e.elementPath(),e)&&e.widgets.focused.removeStyle(this)},removeStylesFromSameGroup:function(e){var t,n=!1;if(!(e instanceof CKEDITOR.editor))return!1;if(t=e.elementPath(),this.checkApplicable(t,e))for(var i=0,o=this.group.length;i<o;i++)for(var a=s[this.widget][this.group[i]],r=0;r<a.length;r++)a[r]!==this&&a[r].checkActive(t,e)&&(e.widgets.focused.removeStyle(a[r]),n=!0);return n},checkActive:function(e,t){return this.checkElementMatch(e.lastElement,0,t)},checkApplicable:function(e,t){return t instanceof CKEDITOR.editor&&this.checkElement(e.lastElement)},checkElementMatch:t,checkElementRemovable:t,checkElement:function(e){return!!E.isDomWidgetWrapper(e)&&((e=e.getFirst(E.isDomWidgetElement))&&e.data("widget")==this.widget)},buildPreview:function(e){return e||this._.definition.name},toAllowedContentRules:function(e){if(!e)return null;var t,n={};return(e=e.widgets.registered[this.widget])?e.styleableElements?(t=this.getClassesArray())?(n[e.styleableElements]={classes:t,propertiesOnly:!0},n):null:e.styleToAllowedContentRules?e.styleToAllowedContentRules(this):null:null},getClassesArray:function(){var e=this._.definition.attributes&&this._.definition.attributes.class;return e?CKEDITOR.tools.trim(e).split(/\s+/):null},applyToRange:e,removeFromRange:e,applyToObject:e})}function k(e){return e.is(w)&&e.data("cke-widget-id")}var w;CKEDITOR.plugins.add("widget",{requires:"lineutils,clipboard,widgetselection",onLoad:function(){void 0!==CKEDITOR.document.$.querySelectorAll&&(CKEDITOR.addCss('.cke_widget_wrapper{position:relative;outline:none}.cke_widget_inline{display:inline-block}.cke_widget_wrapper:hover>.cke_widget_element{outline:2px solid #ffd25c;cursor:default}.cke_widget_wrapper:hover .cke_widget_editable{outline:2px solid #ffd25c}.cke_widget_wrapper.cke_widget_focused>.cke_widget_element,.cke_widget_wrapper .cke_widget_editable.cke_widget_editable_focused{outline:2px solid #47a4f5}.cke_widget_editable{cursor:text}.cke_widget_drag_handler_container{position:absolute;width:15px;height:0;display:block;opacity:0.75;transition:height 0s 0.2s;line-height:0}.cke_widget_wrapper:hover>.cke_widget_drag_handler_container{height:15px;transition:none}.cke_widget_drag_handler_container:hover{opacity:1}.cke_editable[contenteditable="false"] .cke_widget_drag_handler_container{display:none;}img.cke_widget_drag_handler{cursor:move;width:15px;height:15px;display:inline-block}.cke_widget_mask{position:absolute;top:0;left:0;width:100%;height:100%;display:block}.cke_widget_partial_mask{position:absolute;display:block}.cke_editable.cke_widget_dragging, .cke_editable.cke_widget_dragging *{cursor:move !important}'),e())},beforeInit:function(e){void 0!==CKEDITOR.document.$.querySelectorAll&&(e.widgets=new t(e))},afterInit:function(e){if(void 0!==CKEDITOR.document.$.querySelectorAll){var t,n,i,o=e.widgets.registered;for(n in o)t=o[n],(i=t.button)&&e.ui.addButton&&e.ui.addButton(CKEDITOR.tools.capitalize(t.name,!0),{label:i,command:t.name,toolbar:"insert,10"});(r=e).contextMenu&&r.contextMenu.addListener(function(e){if(e=r.widgets.getByElement(e,!0))return e.fire("contextMenu",{})}),(a=e.undoManager)&&a.addFilterRule(function(e){return e.replace(/\s*cke_widget_selected/g,"").replace(/\s*cke_widget_focused/g,"").replace(/<span[^>]*cke_widget_drag_handler_container[^>]*.*?<\/span>/gim,"")})}var a,r}}),t.prototype={MIN_SELECTION_CHECK_INTERVAL:500,add:function(e,n){var s,i,o=this.editor;return(n=CKEDITOR.tools.prototypedCopy(n)).name=e,n._=n._||{},o.fire("widgetDefinition",n),n.template&&(n.template=new CKEDITOR.template(n.template)),s=n,o.addCommand(s.name,{exec:function(i,e){function o(){i.widgets.finalizeCreation(n)}var a,t,n,r=i.widgets.focused;r&&r.name==s.name?r.edit():s.insert?s.insert({editor:i,commandData:e}):s.template&&(r="function"==typeof s.defaults?s.defaults():s.defaults,r=CKEDITOR.dom.element.createFromHtml(s.template.output(r),i.document),t=i.widgets.wrapElement(r,s.name),(n=new CKEDITOR.dom.documentFragment(t.getDocument())).append(t),(a=i.widgets.initOn(r,s,e&&e.startupData))?(r=a.once("edit",function(e){e.data.dialog?a.once("dialog",function(e){var t,n;e=e.data,t=e.once("ok",o,null,null,20),n=e.once("cancel",function(e){e.data&&!1===e.data.hide||i.widgets.destroy(a,!0)}),e.once("hide",function(){t.removeListener(),n.removeListener()})}):o()},null,null,999),a.edit(),r.removeListener()):o())},allowedContent:s.allowedContent,requiredContent:s.requiredContent,contentForms:s.contentForms,contentTransformations:s.contentTransformations}),a(this,n),(this.registered[e]=n).dialog&&o.plugins.dialog&&(i=CKEDITOR.on("dialogDefinition",function(e){var t=(e=e.data.definition).dialog;e.getMode||t.getName()!==n.dialog||(e.getMode=function(){var e=t.getModel(o);return e&&e instanceof CKEDITOR.plugins.widget&&e.ready?CKEDITOR.dialog.EDITING_MODE:CKEDITOR.dialog.CREATION_MODE}),i.removeListener()})),n},addUpcastCallback:function(e){this._.upcastCallbacks.push(e)},checkSelection:function(){if(this.editor.getSelection()){var e,t=this.editor.getSelection(),n=t.getSelectedElement(),i=R(this);if(n&&(e=this.getByElement(n,!0)))return i.focus(e).select(e).commit();if(!(t=t.getRanges()[0])||t.collapsed)return i.commit();for((t=new CKEDITOR.dom.walker(t)).evaluator=E.isDomWidgetWrapper;n=t.next();)i.select(this.getByElement(n));i.commit()}},checkWidgets:function(e){this.fire("checkWidgets",CKEDITOR.tools.copy(e||{}))},del:function(e){var t,n,i;this.focused!==e||(i=!(i=(n=(t=e.editor).createRange()).moveToClosestEditablePosition(e.wrapper,!0))?n.moveToClosestEditablePosition(e.wrapper,!1):i)&&t.getSelection().selectRanges([n]),e.wrapper.remove(),this.destroy(e,!0)},destroy:function(e,t){this.widgetHoldingFocusedEditable===e&&O(this,e,null,t),e.destroy(t),delete this.instances[e.id],this.fire("instanceDestroyed",e)},destroyAll:function(e,t){var n,i=this.instances;if(t&&!e)for(var o,i=(o=t.find(".cke_widget_wrapper")).count(),a=0;a<i;++a)(n=this.getByElement(o.getItem(a),!0))&&this.destroy(n);else for(o in i)n=i[o],this.destroy(n,e)},finalizeCreation:function(e){(e=e.getFirst())&&E.isDomWidgetWrapper(e)&&(this.editor.insertElement(e),(e=this.getByElement(e)).ready=!0,e.fire("ready"),e.focus())},getByElement:(w={div:1,span:1},function(e,t){if(!e)return null;var n=k(e);if(!t&&!n)for(var i=this.editor.editable();(e=e.getParent())&&!e.equals(i)&&!(n=k(e)););return this.instances[n]||null}),initOn:function(e,t,n){if(t?"string"==typeof t&&(t=this.registered[t]):t=this.registered[e.data("widget")],!t)return null;var i=this.wrapElement(e,t.name);return i?i.hasClass("cke_widget_new")?(e=new E(this,this._.nextId++,e,t,n)).isInited()?this.instances[e.id]=e:null:this.getByElement(e):null},initOnAll:function(e){for(var t,n=[],i=(e=(e||this.editor.editable()).find(".cke_widget_new")).count();i--;)(t=this.initOn(e.getItem(i).getFirst(E.isDomWidgetElement)))&&n.push(t);return n},onWidget:function(t){var e,n=Array.prototype.slice.call(arguments);for(e in n.shift(),this.instances){var i=this.instances[e];i.name==t&&i.on.apply(i,n)}this.on("instanceCreated",function(e){(e=e.data).name==t&&e.on.apply(e,n)})},parseElementClasses:function(e){if(!e)return null;e=CKEDITOR.tools.trim(e).split(/\s+/);for(var t,n={},i=0;t=e.pop();)-1==t.indexOf("cke_")&&(n[t]=i=1);return i?n:null},wrapElement:function(e,t){var n,i,o,a=null;if(e instanceof CKEDITOR.dom.element){if(t=t||e.data("widget"),!(n=this.registered[t]))return null;if((a=e.getParent())&&a.type==CKEDITOR.NODE_ELEMENT&&a.data("cke-widget-wrapper"))return a;e.hasAttribute("data-cke-widget-keep-attr")||e.data("cke-widget-keep-attr",e.data("widget")?1:0),e.data("widget",t),(i=l(n,e.getName()))&&r(e),(a=new CKEDITOR.dom.element(i?"span":"div",e.getDocument())).setAttributes(s(i,t)),a.data("cke-display-name",n.pathName||e.getName()),e.getParent(!0)&&a.replace(e),e.appendTo(a)}else if(e instanceof CKEDITOR.htmlParser.element){if(t=t||e.attributes["data-widget"],!(n=this.registered[t]))return null;if((a=e.parent)&&a.type==CKEDITOR.NODE_ELEMENT&&a.attributes["data-cke-widget-wrapper"])return a;"data-cke-widget-keep-attr"in e.attributes||(e.attributes["data-cke-widget-keep-attr"]=e.attributes["data-widget"]?1:0),t&&(e.attributes["data-widget"]=t),(i=l(n,e.name))&&r(e),(a=new CKEDITOR.htmlParser.element(i?"span":"div",s(i,t))).attributes["data-cke-display-name"]=n.pathName||e.name,(n=e.parent)&&(o=e.getIndex(),e.remove()),a.add(e),n&&function e(t,n,i){if(t.type==CKEDITOR.NODE_ELEMENT&&(o=CKEDITOR.dtd[t.name])&&!o[i.name]){var o=t.split(n),a=t.parent;return n=o.getIndex(),t.children.length||(--n,t.remove()),o.children.length||o.remove(),e(a,n,i)}t.add(i,n)}(n,o,a)}return a},_tests_createEditableFilter:o},CKEDITOR.event.implementOn(t.prototype),E.prototype={addClass:function(e){this.element.addClass(e),this.wrapper.addClass(E.WRAPPER_CLASS_PREFIX+e)},applyStyle:function(e){n(this,e,1)},checkStyleActive:function(e){var t;if(!(e=d(e)))return!1;for(;t=e.pop();)if(!this.hasClass(t))return!1;return!0},destroy:function(e){if(this.fire("destroy"),this.editables)for(var t in this.editables)this.destroyEditable(t,e);e||("0"==this.element.data("cke-widget-keep-attr")&&this.element.removeAttribute("data-widget"),this.element.removeAttributes(["data-cke-widget-data","data-cke-widget-keep-attr"]),this.element.removeClass("cke_widget_element"),this.element.replace(this.wrapper)),this.wrapper=null},destroyEditable:function(e,t){var n=this.editables[e],i=!0;if(n.removeListener("focus",h),n.removeListener("blur",u),this.editor.focusManager.remove(n),n.filter){for(var o in this.repository.instances){o=this.repository.instances[o];o.editables&&(o=o.editables[e])&&o!==n&&n.filter===o.filter&&(i=!1)}i&&(n.filter.destroy(),(i=this.repository._.filters[this.name])&&delete i[e])}t||(this.repository.destroyAll(!1,n),n.removeClass("cke_widget_editable"),n.removeClass("cke_widget_editable_focused"),n.removeAttributes(["contenteditable","data-cke-widget-editable","data-cke-enter-mode"])),delete this.editables[e]},edit:function(){var e={dialog:this.dialog},i=this;return!(!1===this.fire("edit",e)||!e.dialog)&&(this.editor.openDialog(e.dialog,function(n){var e,t;!1!==i.fire("dialog",n)&&(e=n.on("show",function(){n.setupContent(i)}),t=n.on("ok",function(){var t,e=i.on("data",function(e){t=1,e.cancel()},null,null,0);i.editor.fire("saveSnapshot"),n.commitContent(i),e.removeListener(),t&&(i.fire("data",i.data),i.editor.fire("saveSnapshot"))}),n.once("hide",function(){e.removeListener(),t.removeListener()}))},i),!0)},getClasses:function(){return this.repository.parseElementClasses(this.element.getAttribute("class"))},getClipboardHtml:function(){var e=this.editor.createRange();return e.setStartBefore(this.wrapper),e.setEndAfter(this.wrapper),this.editor.editable().getHtmlFromRange(e).getHtml()},hasClass:function(e){return this.element.hasClass(e)},initEditable:function(e,t){var n=this._findOneNotNested(t.selector);return!(!n||!n.is(CKEDITOR.dtd.$editable))&&(n=new i(this.editor,n,{filter:o.call(this.repository,this.name,e,t)}),(this.editables[e]=n).setAttributes({contenteditable:"true","data-cke-widget-editable":e,"data-cke-enter-mode":n.enterMode}),n.filter&&n.data("cke-filter",n.filter.id),n.addClass("cke_widget_editable"),n.removeClass("cke_widget_editable_focused"),t.pathName&&n.data("cke-display-name",t.pathName),this.editor.focusManager.add(n),n.on("focus",h,this),CKEDITOR.env.ie&&n.on("blur",u,this),n._.initialSetData=!0,n.setData(n.getHtml()),!0)},_findOneNotNested:function(e){e=this.wrapper.find(e);for(var t,n,i=0;i<e.count();i++)if(n=(t=e.getItem(i)).getAscendant(E.isDomWidgetWrapper),this.wrapper.equals(n))return t;return null},isInited:function(){return!(!this.wrapper||!this.inited)},isReady:function(){return this.isInited()&&this.ready},focus:function(){var e,t=this.editor.getSelection();t&&(e=this.editor.checkDirty(),t.fake(this.wrapper),e||this.editor.resetDirty()),this.editor.focus()},refreshMask:function(){m(this)},refreshParts:function(e){f(this,void 0===e||e)},removeClass:function(e){this.element.removeClass(e),this.wrapper.removeClass(E.WRAPPER_CLASS_PREFIX+e)},removeStyle:function(e){n(this,e,0)},setData:function(e,t){var n=this.data,i=0;if("string"==typeof e)n[e]!==t&&(n[e]=t,i=1);else{var o=e;for(e in o)n[e]!==o[e]&&(i=1,n[e]=o[e])}return i&&this.dataReady&&(_(this),this.fire("data",n)),this},setFocused:function(e){return this.wrapper[e?"addClass":"removeClass"]("cke_widget_focused"),this.fire(e?"focus":"blur"),this},setSelected:function(e){return this.wrapper[e?"addClass":"removeClass"]("cke_widget_selected"),this.fire(e?"select":"deselect"),this},updateDragHandlerPosition:function(){var e=this.editor,t=this.element.$,n=this._.dragHandlerOffset,t={x:t.offsetLeft,y:t.offsetTop-15};n&&t.x==n.x&&t.y==n.y||(n=e.checkDirty(),e.fire("lockSnapshot"),this.dragHandlerContainer.setStyles({top:t.y+"px",left:t.x+"px"}),this.dragHandlerContainer.removeStyle("display"),e.fire("unlockSnapshot"),n||e.resetDirty(),this._.dragHandlerOffset=t)}},CKEDITOR.event.implementOn(E.prototype),E.getNestedEditable=function(e,t){return!t||t.equals(e)?null:E.isDomNestedEditable(t)?t:E.getNestedEditable(e,t.getParent())},E.isDomDragHandler=function(e){return e.type==CKEDITOR.NODE_ELEMENT&&e.hasAttribute("data-cke-widget-drag-handler")},E.isDomDragHandlerContainer=function(e){return e.type==CKEDITOR.NODE_ELEMENT&&e.hasClass("cke_widget_drag_handler_container")},E.isDomNestedEditable=function(e){return e.type==CKEDITOR.NODE_ELEMENT&&e.hasAttribute("data-cke-widget-editable")},E.isDomWidgetElement=function(e){return e.type==CKEDITOR.NODE_ELEMENT&&e.hasAttribute("data-widget")},E.isDomWidgetWrapper=function(e){return e.type==CKEDITOR.NODE_ELEMENT&&e.hasAttribute("data-cke-widget-wrapper")},E.isDomWidget=function(e){return!!e&&(this.isDomWidgetWrapper(e)||this.isDomWidgetElement(e))},E.isParserWidgetElement=function(e){return e.type==CKEDITOR.NODE_ELEMENT&&!!e.attributes["data-widget"]},E.isParserWidgetWrapper=function(e){return e.type==CKEDITOR.NODE_ELEMENT&&!!e.attributes["data-cke-widget-wrapper"]},E.WRAPPER_CLASS_PREFIX="cke_widget_wrapper_",i.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.dom.element.prototype),{setData:function(e){this._.initialSetData||this.editor.widgets.destroyAll(!1,this),this._.initialSetData=!1,e=this.editor.dataProcessor.unprotectSource(e),e=this.editor.dataProcessor.toHtml(e,{context:this.getName(),filter:this.filter,enterMode:this.enterMode}),this.setHtml(e),this.editor.widgets.initOnAll(this)},getData:function(){return this.editor.dataProcessor.toDataFormat(this.getHtml(),{context:this.getName(),filter:this.filter,enterMode:this.enterMode})}});var N=/^(?:<(?:div|span)(?: data-cke-temp="1")?(?: id="cke_copybin")?(?: data-cke-temp="1")?>)?(?:<(?:div|span)(?: style="[^"]+")?>)?<span [^>]*data-cke-copybin-start="1"[^>]*>.?<\/span>([\s\S]+)<span [^>]*data-cke-copybin-end="1"[^>]*>.?<\/span>(?:<\/(?:div|span)>)?(?:<\/(?:div|span)>)?$/i,S={37:1,38:1,39:1,40:1,8:1,46:1};S[CKEDITOR.SHIFT+121]=1;var x=CKEDITOR.tools.createClass({$:function(e,t){this._.createCopyBin(e,t),this._.createListeners(t)},_:{createCopyBin:function(e){var t=e.document,n=CKEDITOR.env.edge&&16<=CKEDITOR.env.version,i=!e.blockless&&!CKEDITOR.env.ie||n?"div":"span",n=t.createElement(i);(t=t.createElement(i)).setAttributes({id:"cke_copybin","data-cke-temp":"1"}),n.setStyles({position:"absolute",width:"1px",height:"1px",overflow:"hidden"}),n.setStyle("ltr"==e.config.contentsLangDirection?"left":"right","-5000px"),this.editor=e,this.copyBin=n,this.container=t},createListeners:function(e){e&&(e.beforeDestroy&&(this.beforeDestroy=e.beforeDestroy),e.afterDestroy&&(this.afterDestroy=e.afterDestroy))}},proto:{handle:function(e){var t,n,i,o=this.copyBin,a=this.editor,r=this.container,s=CKEDITOR.env.ie&&CKEDITOR.env.version<9,l=a.document.getDocumentElement().$,c=a.createRange(),d=this,u=CKEDITOR.env.mac&&CKEDITOR.env.webkit,h=u?100:0,f=window.requestAnimationFrame&&!u?requestAnimationFrame:setTimeout;return o.setHtml('<span data-cke-copybin-start="1">​</span>'+e+'<span data-cke-copybin-end="1">​</span>'),a.fire("lockSnapshot"),r.append(o),a.editable().append(r),t=a.on("selectionChange",g,null,null,0),n=a.widgets.on("checkSelection",g,null,null,0),s&&(i=l.scrollTop),c.selectNodeContents(o),c.select(),s&&(l.scrollTop=i),new CKEDITOR.tools.promise(function(e){f(function(){d.beforeDestroy&&d.beforeDestroy(),r.remove(),t.removeListener(),n.removeListener(),a.fire("unlockSnapshot"),d.afterDestroy&&d.afterDestroy(),e()},h)})}},statics:{hasCopyBin:function(e){return!!x.getCopyBin(e)},getCopyBin:function(e){return e.document.getById("cke_copybin")}}});(CKEDITOR.plugins.widget=E).repository=t,E.nestedEditable=i}(),CKEDITOR.plugins.add("notificationaggregator",{requires:"notification"}),Qe.prototype={createTask:function(e){e=e||{};var t,n=!this.notification;return n&&(this.notification=this._createNotification()),(t=this._addTask(e)).on("updated",this._onTaskUpdate,this),t.on("done",this._onTaskDone,this),t.on("canceled",function(){this._removeTask(t)},this),this.update(),n&&this.notification.show(),t},update:function(){this._updateNotification(),this.isFinished()&&this.fire("finished")},getPercentage:function(){return 0===this.getTaskCount()?1:this._doneWeights/this._totalWeights},isFinished:function(){return this.getDoneTaskCount()===this.getTaskCount()},getTaskCount:function(){return this._tasks.length},getDoneTaskCount:function(){return this._doneTasks},_updateNotification:function(){this.notification.update({message:this._getNotificationMessage(),progress:this.getPercentage()})},_getNotificationMessage:function(){var e=this.getTaskCount(),t={current:this.getDoneTaskCount(),max:e,percentage:Math.round(100*this.getPercentage())};return(1==e&&this._singularMessage?this._singularMessage:this._message).output(t)},_createNotification:function(){return new CKEDITOR.plugins.notification(this.editor,{type:"progress"})},_addTask:function(e){return e=new et(e.weight),this._tasks.push(e),this._totalWeights+=e._weight,e},_removeTask:function(e){var t=CKEDITOR.tools.indexOf(this._tasks,e);-1!==t&&(e._doneWeight&&(this._doneWeights-=e._doneWeight),this._totalWeights-=e._weight,this._tasks.splice(t,1),this.update())},_onTaskUpdate:function(e){this._doneWeights+=e.data,this.update()},_onTaskDone:function(){this._doneTasks+=1,this.update()}},CKEDITOR.event.implementOn(Qe.prototype),et.prototype={done:function(){this.update(this._weight)},update:function(e){var t;this.isDone()||this.isCanceled()||(t=(e=Math.min(this._weight,e))-this._doneWeight,this._doneWeight=e,this.fire("updated",t),this.isDone()&&this.fire("done"))},cancel:function(){this.isDone()||this.isCanceled()||(this._isCanceled=!0,this.fire("canceled"))},isDone:function(){return this._weight===this._doneWeight},isCanceled:function(){return this._isCanceled}},CKEDITOR.event.implementOn(et.prototype),CKEDITOR.plugins.notificationAggregator=Qe,CKEDITOR.plugins.notificationAggregator.task=et,CKEDITOR.plugins.add("uploadwidget",{requires:"widget,clipboard,filetools,notificationaggregator",init:function(e){e.filter.allow("*[!data-widget,!data-cke-upload-id]")},isSupportedEnvironment:function(){return CKEDITOR.plugins.clipboard.isFileApiSupported}}),CKEDITOR.fileTools||(CKEDITOR.fileTools={}),CKEDITOR.tools.extend(CKEDITOR.fileTools,{addUploadWidget:function(l,c,e){var d=CKEDITOR.fileTools,u=l.uploadRepository,t=e.supportedTypes?10:20;e.fileToElement&&l.on("paste",function(e){e=e.data;var t,n,i,o=l.widgets.registered[c],a=e.dataTransfer,r=a.getFilesCount(),s=o.loadMethod||"loadAndUpload";if(!e.dataValue&&r)for(t=0;t<r;t++)i=a.getFile(t),o.supportedTypes&&!d.isTypeSupported(i,o.supportedTypes)||(n=o.fileToElement(i),i=u.create(i,void 0,o.loaderType),n&&(i[s](o.uploadUrl,o.additionalRequestParameters),CKEDITOR.fileTools.markElement(n,c,i.id),"loadAndUpload"!=s&&"upload"!=s||o.skipNotifications||CKEDITOR.fileTools.bindNotifications(l,i),e.dataValue+=n.getOuterHtml()))},null,null,t),CKEDITOR.tools.extend(e,{downcast:function(){return new CKEDITOR.htmlParser.text("")},init:function(){var t,n,i=this,o=this.wrapper.findOne("[data-cke-upload-id]").data("cke-upload-id"),a=u.loaders[o],r=CKEDITOR.tools.capitalize;a.on("update",function(e){"abort"===a.status&&"function"==typeof i.onAbort&&i.onAbort(a),i.wrapper&&i.wrapper.getParent()?(l.fire("lockSnapshot"),e="on"+r(a.status),"abort"!==a.status&&"function"==typeof i[e]&&!1===i[e](a)||(n="cke_upload_"+a.status,i.wrapper&&n!=t&&(t&&i.wrapper.removeClass(t),i.wrapper.addClass(n),t=n),"error"!=a.status&&"abort"!=a.status||l.widgets.del(i)),l.fire("unlockSnapshot")):(CKEDITOR.instances[l.name]&&l.editable().find('[data-cke-upload-id="'+o+'"]').count()||a.abort(),e.removeListener())}),a.update()},replaceWith:function(e,t){var n,i,o,a,r;""===e.trim()?l.widgets.del(this):(n=this==l.widgets.focused,i=l.editable(),o=l.createRange(),n||(r=l.getSelection().createBookmarks()),o.setStartBefore(this.wrapper),o.setEndAfter(this.wrapper),n&&(a=o.createBookmark()),i.insertHtmlIntoRange(e,o,t),l.widgets.checkWidgets({initOnlyNew:!0}),l.widgets.destroy(this,!0),n?(o.moveToBookmark(a),o.select()):l.getSelection().selectBookmarks(r))},_getLoader:function(){var e=this.wrapper.findOne("[data-cke-upload-id]");return e?this.editor.uploadRepository.loaders[e.data("cke-upload-id")]:null}}),l.widgets.add(c,e)},markElement:function(e,t,n){e.setAttributes({"data-cke-upload-id":n,"data-widget":t})},bindNotifications:function(t,e){var n,i=null;e.on("update",function(){!i&&e.uploadTotal&&((n=t._.uploadWidgetNotificaionAggregator)&&!n.isFinished()||(n=t._.uploadWidgetNotificaionAggregator=new CKEDITOR.plugins.notificationAggregator(t,t.lang.uploadwidget.uploadMany,t.lang.uploadwidget.uploadOne)).once("finished",function(){var e=n.getTaskCount();0===e?n.notification.hide():n.notification.update({message:1==e?t.lang.uploadwidget.doneOne:t.lang.uploadwidget.doneMany.replace("%1",e),type:"success",important:1})}),i=n.createTask({weight:e.uploadTotal})),i&&"uploading"==e.status&&i.update(e.uploaded)}),e.on("uploaded",function(){i&&i.done()}),e.on("error",function(){i&&i.cancel(),t.showNotification(e.message,"warning")}),e.on("abort",function(){i&&i.cancel(),CKEDITOR.instances[t.name]&&t.showNotification(t.lang.uploadwidget.abort,"info")})}}),u=0,CKEDITOR.plugins.add("uploadimage",{requires:"uploadwidget",onLoad:function(){CKEDITOR.addCss(".cke_upload_uploading img{opacity: 0.3}")},isSupportedEnvironment:function(){return CKEDITOR.plugins.clipboard.isFileApiSupported},init:function(l){var c,d;this.isSupportedEnvironment()&&(c=CKEDITOR.fileTools,(d=c.getUploadUrl(l.config,"image"))&&(c.addUploadWidget(l,"uploadimage",{supportedTypes:/image\/(jpeg|png|gif|bmp)/,uploadUrl:d,fileToElement:function(){var e=new CKEDITOR.dom.element("img");return e.setAttribute("src","data:image/gif;base64,R0lGODlhDgAOAIAAAAAAAP///yH5BAAAAAAALAAAAAAOAA4AAAIMhI+py+0Po5y02qsKADs="),e},parts:{img:"img"},onUploading:function(e){this.parts.img.setAttribute("src",e.data)},onUploaded:function(e){var t=this.parts.img.$;this.replaceWith('<img src="'+e.url+'" width="'+(e.responseData.width||t.naturalWidth)+'" height="'+(e.responseData.height||t.naturalHeight)+'">')}}),l.on("paste",function(e){if(e.data.dataValue.match(/<img[\s\S]+data:/i)){e=e.data;var t,n,i=document.implementation.createHTMLDocument("");for((i=new CKEDITOR.dom.element(i.body)).data("cke-editable",1),i.appendHtml(e.dataValue),t=i.find("img"),n=0;n<t.count();n++){var o,a=(o=t.getItem(n)).getAttribute("src"),r=a&&"data:"==a.substring(0,5),s=null===o.data("cke-realelement");r&&s&&!o.data("cke-upload-id")&&!o.isReadOnly(1)&&(r=(r=a.match(/image\/([a-z]+?);/i))&&r[1]||"jpg",(a=l.uploadRepository.create(a,(s=r,r=void 0,r=[(r=new Date).getFullYear(),r.getMonth()+1,r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds()],u+=1,"image-"+CKEDITOR.tools.array.map(r,Je).join("")+"-"+u+"."+s))).upload(d),c.markElement(o,"uploadimage",a.id),c.bindNotifications(l,a))}e.dataValue=i.getHtml()}})))}}),CKEDITOR.plugins.add("wysiwygarea",{init:function(l){l.config.fullPage&&l.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]",requiredContent:"body"}),l.addMode("wysiwyg",function(t){function e(e){e&&e.removeListener(),l.isDestroyed()||l.isDetached()||(l.editable(new c(l,i.$.contentWindow.document.body)),l.setData(l.getData(1),t))}var n="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"")+"document.close();",n=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent(n)+"}())":"",i=CKEDITOR.dom.element.createFromHtml('<iframe src="'+n+'" frameBorder="0"></iframe>');i.setStyles({width:"100%",height:"100%"}),i.addClass("cke_wysiwyg_frame").addClass("cke_reset"),(n=l.ui.space("contents")).append(i);var o=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.gecko;o&&i.on("load",e);var a,r=l.title,s=l.fire("ariaEditorHelpLabel",{}).label;r&&(CKEDITOR.env.ie&&s&&(r+=", "+s),i.setAttribute("title",r)),s&&(r=CKEDITOR.tools.getNextId(),a=CKEDITOR.dom.element.createFromHtml('<span id="'+r+'" class="cke_voice_label">'+s+"</span>"),n.append(a,1),i.setAttribute("aria-describedby",r)),l.on("beforeModeUnload",function(e){e.removeListener(),a&&a.remove()}),i.setAttributes({tabIndex:l.tabIndex,allowTransparency:"true"}),o||e(),l.fire("ariaWidget",i)})}}),CKEDITOR.editor.prototype.addContentsCss=function(e){var t=this.config,n=t.contentsCss;CKEDITOR.tools.isArray(n)||(t.contentsCss=n?[n]:[]),t.contentsCss.push(e)},c=CKEDITOR.tools.createClass({$:function(){this.base.apply(this,arguments),this._.frameLoadedHandler=CKEDITOR.tools.addFunction(function(e){CKEDITOR.tools.setTimeout(t,0,this,e)},this),this._.docTitle=this.getWindow().getFrame().getAttribute("title")},base:CKEDITOR.editable,proto:{setData:function(t,e){var n=this.editor;if(e)this.setHtml(t),this.fixInitialSelection(),n.fire("dataReady");else{this._.isLoadingData=!0,n._.dataStore={id:1};var i=n.config,o=i.fullPage,a=i.docType,r=CKEDITOR.tools.buildStyleHtml(function(){var e=[];if(8<=CKEDITOR.document.$.documentMode){e.push("html.CSS1Compat [contenteditable=false]{min-height:0 !important}");var t,n=[];for(t in CKEDITOR.dtd.$removeEmpty)n.push("html.CSS1Compat "+t+"[contenteditable=false]");e.push(n.join(",")+"{display:inline-block}")}else CKEDITOR.env.gecko&&(e.push("html{height:100% !important}"),e.push("img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"));return e.push("html{cursor:text;*cursor:auto}"),e.push("img,input,textarea{cursor:default}"),e.join("\n")}()).replace(/<style>/,'<style data-cke-temp="1">');o||(r+=CKEDITOR.tools.buildStyleHtml(n.config.contentsCss));e=i.baseHref?'<base href="'+i.baseHref+'" data-cke-temp="1" />':"";o&&(t=t.replace(/<!DOCTYPE[^>]*>/i,function(e){return n.docType=a=e,""}).replace(/<\?xml\s[^\?]*\?>/i,function(e){return n.xmlDeclaration=e,""})),t=n.dataProcessor.toHtml(t),t=o?(/<body[\s|>]/.test(t)||(t="<body>"+t),/<html[\s|>]/.test(t)||(t="<html>"+t+"</html>"),/<head[\s|>]/.test(t)?/<title[\s|>]/.test(t)||(t=t.replace(/<head[^>]*>/,"$&<title></title>")):t=t.replace(/<html[^>]*>/,"$&<head><title></title></head>"),t=(t=e?t.replace(/<head[^>]*?>/,"$&"+e):t).replace(/<\/head\s*>/,r+"$&"),a+t):i.docType+'<html dir="'+i.contentsLangDirection+'" lang="'+(i.contentsLanguage||n.langCode)+'"><head><title>'+this._.docTitle+"</title>"+e+r+"</head><body"+(i.bodyId?' id="'+i.bodyId+'"':"")+(i.bodyClass?' class="'+i.bodyClass+'"':"")+">"+t+"</body></html>",CKEDITOR.env.gecko&&(t=t.replace(/<body/,'<body contenteditable="true" '),CKEDITOR.env.version<2e4&&(t=t.replace(/<body[^>]*>/,"$&\x3c!-- cke-content-start --\x3e"))),i='<script id="cke_actscrpt" type="text/javascript"'+(CKEDITOR.env.ie?' defer="defer" ':"")+">var wasLoaded=0;function onload(){if(!wasLoaded)window.parent.CKEDITOR.tools.callFunction("+this._.frameLoadedHandler+",window);wasLoaded=1;}"+(CKEDITOR.env.ie?"onload();":'document.addEventListener("DOMContentLoaded", onload, false );')+"<\/script>",CKEDITOR.env.ie&&CKEDITOR.env.version<9&&(i+='<script id="cke_shimscrpt">window.parent.CKEDITOR.tools.enableHtml5Elements(document)<\/script>'),e&&CKEDITOR.env.ie&&CKEDITOR.env.version<10&&(i+='<script id="cke_basetagscrpt">var baseTag = document.querySelector( "base" );baseTag.href = baseTag.href;<\/script>'),t=t.replace(/(?=\s*<\/(:?head)>)/,i),this.clearCustomData(),this.clearListeners(),n.fire("contentDomUnload");var s=this.getDocument();try{s.write(t)}catch(e){setTimeout(function(){s.write(t)},0)}}},getData:function(e){if(e)return this.getHtml();var t=(e=this.editor).config,n=(a=t.fullPage)&&e.docType,i=a&&e.xmlDeclaration,o=this.getDocument(),a=a?o.getDocumentElement().getOuterHtml():o.getBody().getHtml();return CKEDITOR.env.gecko&&t.enterMode!=CKEDITOR.ENTER_BR&&(a=a.replace(/<br>(?=\s*(:?$|<\/body>))/,"")),a=e.dataProcessor.toDataFormat(a),i&&(a=i+"\n"+a),a=n?n+"\n"+a:a},focus:function(){this._.isLoadingData?this._.isPendingFocus=!0:c.baseProto.focus.call(this)},detach:function(){var e=(t=this.editor).document,t=t.container.findOne("iframe.cke_wysiwyg_frame");c.baseProto.detach.call(this),this.clearCustomData(this._.expandoNumber),e.getDocumentElement().clearCustomData(),CKEDITOR.tools.removeFunction(this._.frameLoadedHandler),t&&(t.clearCustomData(),(e=t.removeCustomData("onResize"))&&e.removeListener(),t.isDetached()||t.remove())}}}),CKEDITOR.config.disableObjectResizing=!1,CKEDITOR.config.disableNativeTableHandles=!0,CKEDITOR.config.disableNativeSpellChecker=!0,CKEDITOR.config.plugins="dialogui,dialog,a11yhelp,about,basicstyles,blockquote,notification,button,toolbar,clipboard,panel,floatpanel,menu,contextmenu,elementspath,indent,indentlist,list,enterkey,entities,popup,filetools,filebrowser,floatingspace,listblock,richcombo,format,horizontalrule,htmlwriter,image,fakeobjects,link,magicline,maximize,xml,ajax,pastetools,pastefromgdocs,pastefromlibreoffice,pastefromword,pastetext,removeformat,resize,menubutton,scayt,showborders,sourcearea,specialchar,stylescombo,tab,table,tabletools,tableselection,undo,lineutils,widgetselection,widget,notificationaggregator,uploadwidget,uploadimage,wysiwygarea",CKEDITOR.config.skin="moono-lisa",CKEDITOR.env.hidpi?e("about,0,,bold,24,,italic,48,,strike,72,,subscript,96,,superscript,120,,underline,144,,bidiltr,168,,bidirtl,192,,blockquote,216,,copy-rtl,240,,copy,264,,cut-rtl,288,,cut,312,,paste-rtl,336,,paste,360,,codesnippet,384,,bgcolor,408,,textcolor,432,,copyformatting,456,,creatediv,480,,docprops-rtl,504,,docprops,528,,easyimagealigncenter,552,,easyimagealignleft,576,,easyimagealignright,600,,easyimagealt,624,,easyimagefull,648,,easyimageside,672,,easyimageupload,696,,embed,720,,embedsemantic,744,,emojipanel,768,,exportpdf,792,,find-rtl,816,,find,840,,replace,864,,flash,888,,button,912,,checkbox,936,,form,960,,hiddenfield,984,,imagebutton,1008,,radio,1032,,select-rtl,1056,,select,1080,,textarea-rtl,1104,,textarea,1128,,textfield-rtl,1152,,textfield,1176,,horizontalrule,1200,,iframe,1224,,image,1248,,indent-rtl,1272,,indent,1296,,outdent-rtl,1320,,outdent,1344,,justifyblock,1368,,justifycenter,1392,,justifyleft,1416,,justifyright,1440,,language,1464,,anchor-rtl,1488,,anchor,1512,,link,1536,,unlink,1560,,bulletedlist-rtl,1584,,bulletedlist,1608,,numberedlist-rtl,1632,,numberedlist,1656,,mathjax,1680,,maximize,1704,,newpage-rtl,1728,,newpage,1752,,pagebreak-rtl,1776,,pagebreak,1800,,pastefromword-rtl,1824,,pastefromword,1848,,pastetext-rtl,1872,,pastetext,1896,,placeholder,1920,,preview-rtl,1944,,preview,1968,,print,1992,,removeformat,2016,,save,2040,,scayt,2064,,selectall,2088,,showblocks-rtl,2112,,showblocks,2136,,smiley,2160,,source-rtl,2184,,source,2208,,sourcedialog-rtl,2232,,sourcedialog,2256,,specialchar,2280,,table,2304,,templates-rtl,2328,,templates,2352,,uicolor,2376,,redo-rtl,2400,,redo,2424,,undo-rtl,2448,,undo,2472,,simplebox,4992,auto,spellchecker,2520,","icons_hidpi.png"):e("about,0,auto,bold,24,auto,italic,48,auto,strike,72,auto,subscript,96,auto,superscript,120,auto,underline,144,auto,bidiltr,168,auto,bidirtl,192,auto,blockquote,216,auto,copy-rtl,240,auto,copy,264,auto,cut-rtl,288,auto,cut,312,auto,paste-rtl,336,auto,paste,360,auto,codesnippet,384,auto,bgcolor,408,auto,textcolor,432,auto,copyformatting,456,auto,creatediv,480,auto,docprops-rtl,504,auto,docprops,528,auto,easyimagealigncenter,552,auto,easyimagealignleft,576,auto,easyimagealignright,600,auto,easyimagealt,624,auto,easyimagefull,648,auto,easyimageside,672,auto,easyimageupload,696,auto,embed,720,auto,embedsemantic,744,auto,emojipanel,768,auto,exportpdf,792,auto,find-rtl,816,auto,find,840,auto,replace,864,auto,flash,888,auto,button,912,auto,checkbox,936,auto,form,960,auto,hiddenfield,984,auto,imagebutton,1008,auto,radio,1032,auto,select-rtl,1056,auto,select,1080,auto,textarea-rtl,1104,auto,textarea,1128,auto,textfield-rtl,1152,auto,textfield,1176,auto,horizontalrule,1200,auto,iframe,1224,auto,image,1248,auto,indent-rtl,1272,auto,indent,1296,auto,outdent-rtl,1320,auto,outdent,1344,auto,justifyblock,1368,auto,justifycenter,1392,auto,justifyleft,1416,auto,justifyright,1440,auto,language,1464,auto,anchor-rtl,1488,auto,anchor,1512,auto,link,1536,auto,unlink,1560,auto,bulletedlist-rtl,1584,auto,bulletedlist,1608,auto,numberedlist-rtl,1632,auto,numberedlist,1656,auto,mathjax,1680,auto,maximize,1704,auto,newpage-rtl,1728,auto,newpage,1752,auto,pagebreak-rtl,1776,auto,pagebreak,1800,auto,pastefromword-rtl,1824,auto,pastefromword,1848,auto,pastetext-rtl,1872,auto,pastetext,1896,auto,placeholder,1920,auto,preview-rtl,1944,auto,preview,1968,auto,print,1992,auto,removeformat,2016,auto,save,2040,auto,scayt,2064,auto,selectall,2088,auto,showblocks-rtl,2112,auto,showblocks,2136,auto,smiley,2160,auto,source-rtl,2184,auto,source,2208,auto,sourcedialog-rtl,2232,auto,sourcedialog,2256,auto,specialchar,2280,auto,table,2304,auto,templates-rtl,2328,auto,templates,2352,auto,uicolor,2376,auto,redo-rtl,2400,auto,redo,2424,auto,undo-rtl,2448,auto,undo,2472,auto,simplebox,2496,auto,spellchecker,2520,auto","icons.png"))}();