!function(){UEDITOR_CONFIG=window.UEDITOR_CONFIG||{};var baidu=window.baidu||{};window.baidu=baidu,window.UE=baidu.editor=window.UE||{},UE.plugins={},UE.commands={},UE.instants={},UE.I18N={},UE._customizeUI={},UE.version="1.4.3",UE.promptAlert=function(){},UE.showFormulaDialogue=function(){};var dom=UE.dom={},dom_key="Q29weXJpZ2h0IOatpuaxieaAnee7tOi3s+i3g+enkeaKgOaciemZkOWFrOWPuCDniYjmnYPmiYDmnIk=",browser=UE.browser=function(){var e=navigator.userAgent.toLowerCase(),t=window.opera,i={ie:/(msie\s|trident.*rv:)([\w.]+)/.test(e),opera:!!t&&t.version,webkit:-1'](?:(amp|lt|quot|gt|#39|nbsp|#\d+);)?/g,function(e,t){return t?e:{"<":"<","&":"&",'"':""",">":">","'":"'"}[e]}):""},unhtmlForUrl:function(e,t){return e?e.replace(t||/[<">']/g,function(e){return{"<":"<","&":"&",'"':""",">":">","'":"'"}[e]}):""},html:function(e){return e?e.replace(/&((g|l|quo)t|amp|#39|nbsp);/g,function(e){return{"<":"<","&":"&",""":'"',">":">","'":"'"," ":" "}[e]}):""},cssStyleToDomStyle:(ia=document.createElement("div").style,ja={float:null!=ia.cssFloat?"cssFloat":null!=ia.styleFloat?"styleFloat":"float"},function(e){return ja[e]||(ja[e]=e.toLowerCase().replace(/-./g,function(e){return e.charAt(1).toUpperCase()}))}),loadFile:(ma=[],function(t,i,e){var n=na(t,i);if(n)n.ready?e&&e():n.funs.push(e);else if(ma.push({doc:t,url:i.src||i.href,funs:[e]}),t.body){if(!i.id||!t.getElementById(i.id)){var o=t.createElement(i.tag);for(var r in delete i.tag,i)o.setAttribute(r,i[r]);o.onload=o.onreadystatechange=function(){if(!this.readyState||/loaded|complete/.test(this.readyState)){if(0<(n=na(t,i)).funs.length){n.ready=1;for(var e;e=n.funs.pop();)e()}o.onload=o.onreadystatechange=null}},o.onerror=function(){throw Error("The load "+(i.href||i.src)+" fails,check the url settings of file ueditor.config.js ")},t.getElementsByTagName("head")[0].appendChild(o)}}else{var a=[];for(var r in i)"tag"!=r&&a.push(r+'="'+i[r]+'"');t.write("<"+i.tag+" "+a.join(" ")+" >")}}),isEmptyObject:function(e){if(null==e)return!0;if(this.isArray(e)||this.isString(e))return 0===e.length;for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},fixColor:function(e,t){if(/color/i.test(e)&&/rgba?/.test(t)){var i=t.split(",");if(3/.test(e.outerHTML):0==e.attributes.length},isCustomeNode:function(e){return 1==e.nodeType&&e.getAttribute("_ue_custom_node_")},isTagNode:function(e,t){return 1==e.nodeType&&new RegExp("\\b"+e.tagName+"\\b","i").test(t)},filterNodeList:function(e,t,i){var n=[];if(!utils.isFunction(t)){var o=t;t=function(e){return-1!=utils.indexOf(utils.isArray(o)?o:o.split(" "),e.tagName.toLowerCase())}}return utils.each(e,function(e){t(e)&&n.push(e)}),0==n.length?null:1!=n.length&&i?n:n[0]},isInNodeEndBoundary:function(e,t){var i=e.startContainer;if(3==i.nodeType&&e.startOffset!=i.nodeValue.length)return 0;if(1==i.nodeType&&e.startOffset!=i.childNodes.length)return 0;for(;i!==t;){if(i.nextSibling)return 0;i=i.parentNode}return 1},isBoundaryNode:function(e,t){for(;!domUtils.isBody(e);)if(e!==(e=e.parentNode)[t])return!1;return!0},fillHtml:browser.ie11below?" ":"
"},fillCharReg=new RegExp(domUtils.fillChar,"g"),si,qi,ri,xi;function ui(e){return!e.collapsed&&1==e.startContainer.nodeType&&e.startContainer===e.endContainer&&e.endOffset-e.startOffset==1}function vi(e,t,i,n){var o;return 1==t.nodeType&&(dtd.$empty[t.tagName]||dtd.$nonChild[t.tagName])&&(i=domUtils.getNodeIndex(t)+(e?0:1),t=t.parentNode),e?(n.startContainer=t,n.startOffset=i,n.endContainer||n.collapse(!0)):(n.endContainer=t,n.endOffset=i,n.startContainer||n.collapse(!1)),(o=n).collapsed=o.startContainer&&o.endContainer&&o.startContainer===o.endContainer&&o.startOffset==o.endOffset,n}function wi(e,t){var i,n,o=e.startContainer,r=e.endContainer,a=e.startOffset,s=e.endOffset,l=e.document,d=l.createDocumentFragment();if(1==o.nodeType&&(o=o.childNodes[a]||(i=o.appendChild(l.createTextNode("")))),1==r.nodeType&&(r=r.childNodes[s]||(n=r.appendChild(l.createTextNode("")))),o===r&&3==o.nodeType)return d.appendChild(l.createTextNode(o.substringData(a,s-a))),t&&(o.deleteData(a,s-a),e.collapse(!0)),d;for(var c,u,m=d,f=domUtils.findParents(o,!0),h=domUtils.findParents(r,!0),p=0;f[p]==h[p];)p++;for(var g,b=p;g=f[b];b++){for(c=g.nextSibling,g==o?i||(3==e.startContainer.nodeType?(m.appendChild(l.createTextNode(o.nodeValue.slice(a))),t&&o.deleteData(a,o.nodeValue.length-a)):m.appendChild(t?o:o.cloneNode(!0))):(u=g.cloneNode(!1),m.appendChild(u));c&&c!==r&&c!==h[b];)g=c.nextSibling,m.appendChild(t?c:c.cloneNode(!0)),c=g;m=u}m=d,f[p]||(m.appendChild(f[p-1].cloneNode(!1)),m=m.firstChild);var v;for(b=p;v=h[b];b++){if(c=v.previousSibling,v==r?n||3!=e.endContainer.nodeType||(m.appendChild(l.createTextNode(r.substringData(0,s))),t&&r.deleteData(0,s)):(u=v.cloneNode(!1),m.appendChild(u)),b!=p||!f[p])for(;c&&c!==o;)v=c.previousSibling,m.insertBefore(t?c:c.cloneNode(!0),m.firstChild),c=v;m=u}return t&&e.setStartBefore(h[p]?f[p]?h[p]:f[p-1]:h[p-1]).collapse(!0),i&&domUtils.remove(i),n&&domUtils.remove(n),d}function yi(e,t){try{if(si&&domUtils.inDoc(si,e))if(si.nodeValue.replace(fillCharReg,"").length)si.nodeValue=si.nodeValue.replace(fillCharReg,"");else{var i=si.parentNode;for(domUtils.remove(si);i&&domUtils.isEmptyInlineElement(i)&&(browser.safari?!(domUtils.getPosition(i,t)&domUtils.POSITION_CONTAINS):!i.contains(t));)si=i.parentNode,domUtils.remove(i),i=si}}catch(e){}}function zi(e,t){var i;for(e=e[t];e&&domUtils.isFillChar(e);)i=e[t],domUtils.remove(e),e=i}function im(e,t){var i=domUtils.getNodeIndex;(e=e.duplicate()).collapse(t);var n=e.parentElement();if(!n.hasChildNodes())return{container:n,offset:0};for(var o,r,a=n.children,s=e.duplicate(),l=0,d=a.length-1,c=-1;l<=d;){o=a[c=Math.floor((l+d)/2)],s.moveToElementText(o);var u=s.compareEndPoints("StartToStart",e);if(0=t.nodeValue.length)this.setStartAfter(t);else{var r=domUtils.split(t,i);t===o?this.setEnd(r,this.endOffset-i):t.parentNode===o&&(this.endOffset+=1),this.setStartBefore(r)}if(n)return this.collapse(!0)}return e||(i=this.endOffset,3==(o=this.endContainer).nodeType&&(0==i?this.setEndBefore(o):(i=i.nodeValue.length&&e["set"+t.replace(/(\w)/,function(e){return e.toUpperCase()})+"After"](i):e["set"+t.replace(/(\w)/,function(e){return e.toUpperCase()})+"Before"](i))}return!e&&this.collapsed||(t(this,"start"),t(this,"end")),this},insertNode:function(e){var t=e,i=1;11==e.nodeType&&(t=e.firstChild,i=e.childNodes.length),this.trimBoundary(!0);var n=this.startContainer,o=this.startOffset,r=n.childNodes[o];return r?n.insertBefore(e,r):n.appendChild(e),t.parentNode===this.endContainer&&(this.endOffset=this.endOffset+i),this.setStartBefore(t)},setCursor:function(e,t){return this.collapse(!e).select(t)},createBookmark:function(e,t){var i,n=this.document.createElement("span");return n.style.cssText="display:none;line-height:0px;",n.appendChild(this.document.createTextNode("‍")),n.id="_baidu_bookmark_start_"+(t?"":qi++),this.collapsed||((i=n.cloneNode(!0)).id="_baidu_bookmark_end_"+(t?"":qi++)),this.insertNode(n),i&&this.collapse().insertNode(i).setEndBefore(i),this.setStartAfter(n),{start:e?n.id:n,end:i?e?i.id:i:null,id:e}},moveToBookmark:function(e){var t=e.id?this.document.getElementById(e.start):e.start,i=e.end&&e.id?this.document.getElementById(e.end):e.end;return this.setStartBefore(t),domUtils.remove(t),i?(this.setEndBefore(i),domUtils.remove(i)):this.collapse(!0),this},enlarge:function(e,t){var i,n,o=domUtils.isBody,r=this.document.createTextNode("");if(e){for(i=1==(n=this.startContainer).nodeType?n=n.childNodes[this.startOffset]?n.childNodes[this.startOffset]:(n.appendChild(r),r):n;;){if(domUtils.isBlockElm(n)){for(n=i;(i=n.previousSibling)&&!domUtils.isBlockElm(i);)n=i;this.setStartBefore(n);break}n=(i=n).parentNode}for(i=1==(n=this.endContainer).nodeType?((i=n.childNodes[this.endOffset])?n.insertBefore(r,i):n.appendChild(r),n=r):n;;){if(domUtils.isBlockElm(n)){for(n=i;(i=n.nextSibling)&&!domUtils.isBlockElm(i);)n=i;this.setEndAfter(n);break}n=(i=n).parentNode}r.parentNode===this.endContainer&&this.endOffset--,domUtils.remove(r)}if(!this.collapsed){for(;!(0!=this.startOffset||t&&t(this.startContainer)||o(this.startContainer));)this.setStartBefore(this.startContainer);for(;!(this.endOffset!=(1==this.endContainer.nodeType?this.endContainer.childNodes.length:this.endContainer.nodeValue.length)||t&&t(this.endContainer)||o(this.endContainer));)this.setEndAfter(this.endContainer)}return this},enlargeToBlockElm:function(e){for(;!domUtils.isBlockElm(this.startContainer);)this.setStartBefore(this.startContainer);if(!e)for(;!domUtils.isBlockElm(this.endContainer);)this.setEndAfter(this.endContainer);return this},adjustmentBoundary:function(){if(!this.collapsed){for(;!domUtils.isBody(this.startContainer)&&this.startOffset==this.startContainer[3==this.startContainer.nodeType?"nodeValue":"childNodes"].length&&this.startContainer[3==this.startContainer.nodeType?"nodeValue":"childNodes"].length;)this.setStartAfter(this.startContainer);for(;!domUtils.isBody(this.endContainer)&&!this.endOffset&&this.endContainer[3==this.endContainer.nodeType?"nodeValue":"childNodes"].length;)this.setEndBefore(this.endContainer)}return this},applyInlineStyle:function(t,e,i){if(this.collapsed)return this;this.trimBoundary().enlarge(!1,function(e){return 1==e.nodeType&&domUtils.isBlockElm(e)}).adjustmentBoundary();function n(e){return 1==e.nodeType?"br"!=e.tagName.toLowerCase():!domUtils.isWhitespace(e)}for(var o,r,a=this.createBookmark(),s=a.end,l=domUtils.getNextDomNode(a.start,!1,n),d=this.cloneRange();l&&domUtils.getPosition(l,s)&domUtils.POSITION_PRECEDING;)if(3==l.nodeType||dtd[t][l.tagName]){for(d.setStartBefore(l),o=l;o&&(3==o.nodeType||dtd[t][o.tagName])&&o!==s;)r=o,o=domUtils.getNextDomNode(o,1==o.nodeType,null,function(e){return dtd[t][e.tagName]});var c,u,m=d.setEndAfter(r).extractContents();if(i&&0'+(ie?"":"
")+"

",e.removeListener("firstBeforeExecCommand focus",Np),setTimeout(function(){e.focus(),e._selectionChange()},0))}Editor.prototype={registerCommand:function(e,t){this.commands[e]=t},ready:function(e){e&&(this.isReady?e.apply(this):this.addListener("ready",e))},setOpt:function(e,t){var i={};utils.isString(e)?i[e]=t:i=e,utils.extend(this.options,i,!0)},getOpt:function(e){return this.options[e]},destroy:function(){var e=this;e.fireEvent("destroy");var t=e.container.parentNode,i=e.textarea;i?i.style.display="":(i=document.createElement("textarea"),t.parentNode.insertBefore(i,t)),i.style.width=e.iframe.offsetWidth+"px",i.style.height=e.iframe.offsetHeight+"px",i.value=e.getContent(),i.id=e.key,t.innerHTML="",domUtils.remove(t);var n=e.key;for(var o in e)e.hasOwnProperty(o)&&delete this[o];UE.delEditor(n)},render:function(t){function e(e){return parseInt(domUtils.getComputedStyle(t,e))}var i=this.options;if(utils.isString(t)&&(t=document.getElementById(t)),t){i.initialFrameWidth?i.minFrameWidth=i.initialFrameWidth:i.minFrameWidth=i.initialFrameWidth=t.offsetWidth,i.initialFrameHeight?i.minFrameHeight=i.initialFrameHeight:i.initialFrameHeight=i.minFrameHeight=t.offsetHeight,t.style.width=/%$/.test(i.initialFrameWidth)?"100%":i.initialFrameWidth-e("padding-left")-e("padding-right")+"px",t.style.height=/%$/.test(i.initialFrameHeight)?"100%":i.initialFrameHeight-e("padding-top")-e("padding-bottom")+"px",t.style.zIndex=i.zIndex;var n=(ie&&browser.version<9?"":"")+""+(i.iframeCssUrl?"":"")+(i.initialStyle?"":"")+"