iknowpc.bdimg.com Open in urlscan Pro
115.238.242.49  Public Scan

URL: https://iknowpc.bdimg.com/static/common/pkg/ueditor.4550325.js
Submission: On April 01 via manual from SG — Scanned from DE

Form analysis 0 forms found in the DOM

Text Content

;/*!common:widget/js/logic/ueditor/plugin/errorCorrection/errorCorrection.es.js*/
define("common:widget/js/logic/ueditor/plugin/errorCorrection/errorCorrection.es",function(e,t){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=e("common:widget/js/util/tangram/tangram"),i=r(a),s="data-diagnose-id",c="data-error-ignore",d="strategy_error_words",u=function(){function e(t){n(this,e),this.UE=t,this.editor=null,this.show=!1,this.loading=!1,this.$word=null;var r=this;t.plugin.register("errorCorrection",function(){return{bindEvents:{ready:function(){var e=this,t=i.default("iframe#ueditor_"+e.uid).parent();r.editor=e,r.$container=t,r.render(t),r.bindEvents(),r.setParaId(e),i.default(e.document.head).append('<style type="text/css">.'+d+" {color: #ff0000;}</style>")}},outputRule:function(e){var t=r.UE.dom.domUtils,n=e.getNodesByTagName("p");t.filterNodeList(n,function(e){var r=e.getNodesByTagName("span");return r&&r.length>0&&t.filterNodeList(r,function(t){!t||t.attrs&&t.attrs[c]||e.removeChild(t,!0)}),!1})}}})}return o(e,[{key:"render",value:function(e){var t=['<div class="ueditor-error-correction">','<span class="error-correction-arrow arrow1"></span>','<span class="error-correction-arrow arrow2"></span>','<span class="error-correction-target"></span>','<span class="error-correction-line"></span>','<span class="error-correction-ignore">\u5ffd\u7565</span>',"</div>"].join(""),r=i.default(t);e.append(r),this.$tpl=r}},{key:"showTip",value:function(){this.$tpl.show(),this.show=!0}},{key:"hideTip",value:function(){this.$tpl.hide(),this.show=!1}},{key:"bindEvents",value:function(){var e=this.editor,t=(this.UE.dom.domUtils,this.$container),r=i.default(e.iframe),n=i.default(e.iframe.contentWindow),o=i.default(e.body),a=this.$tpl,u=this;e.addListener("keydown",function(t,r){r=r||window.event,("Enter"===r.code||13===r.keyCode||13===r.charCode)&&u.handleErrorEnter(e)}),e.addListener("keyup",function(t,r){if(r=r||window.event,"Enter"===r.code||13===r.keyCode||13===r.charCode){var n=u.UE.dom.domUtils.filterNodeList(e.selection.getStartElementPath(),function(e){return!e.tagName||"p"!==e.tagName.toLowerCase()&&"h2"!==e.tagName.toLowerCase()?!1:!0});i.default(n).removeAttr(s),e.fireEvent("contentchange"),setTimeout(function(){u.checkError(e)},0)}}),e.addListener("afterpaste",function(){u.checkError(e)}),e.addListener("contentChange",function(){u.setParaId(e),u.handleErrorEnter(e)}),e.addListener("fullscreenchange",function(){u.hideTip()}),o.on("click",function(e){var o=i.default(e.target);if(o.hasClass(d)&&!u.show){u.$word=o;var s=(o.parent(),o.offset()),c=t.offset(),l=r.offset(),f=n.scrollTop();a.find(".error-correction-target").text(o.data("iknow-target"));var h=l.left-c.left+s.left-(.5*a.outerWidth()-.5*o.width());a.css({top:l.top-c.top+s.top+o.height()-f+8,left:h>0?h:0}),u.showTip()}else u.show&&u.hideTip()}),n.scroll(function(){u.hideTip()}),this.$tpl.on("click",".error-correction-target",function(e){var t=i.default(e.currentTarget).text();u.$word&&u.$word.replaceWith(t),u.hideTip()}).on("click",".error-correction-ignore",function(){var e=u.$word;e&&(e.removeAttr("class data-iknow-target"),e.attr(c,1)),u.hideTip()})}},{key:"generateUid",value:function(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)},t=e()+e()+e()+e()+e()+e()+e()+e();return t}},{key:"setParaId",value:function(e){var t=this,r=e.body||"",n=i.default(r).children("p, h2");n.each(function(e,r){if(!r.getAttribute(s)){var n=t.generateUid();r.setAttribute(s,n)}})}},{key:"handleErrorEnter",value:function(e){this.hideTip();var t=this.UE.dom.domUtils.filterNodeList(e.selection.getStartElementPath(),function(e){return e.tagName&&"span"===e.tagName.toLowerCase()&&e.className===d?!0:!1});i.default(t).removeAttr("class data-iknow-target "+c)}},{key:"checkError",value:function(e){if(!this.loading){this.loading=!0;var t=this;i.default.ajax({url:"/submit/text/texterrorcorrection",type:"POST",data:{contentRich:e.getContent()},dataType:"json",timeout:3e4,success:function(r){if(0===r.errno&&r.data){var n=e.body||"",o=Object.keys(r.data);o.forEach(function(e){var t=i.default(n).find("["+s+"="+e+"]");t.replaceWith(r.data[e])})}t.loading=!1},error:function(){t.loading=!1}})}}}]),e}();t.default=u});
;/*!common:widget/js/logic/ueditor/plugin/iconControl/iconControl.es.js*/
define("common:widget/js/logic/ueditor/plugin/iconControl/iconControl.es",function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){e.plugins["icon-check"]=function(){var t=this,o=this;o.commands.blockquote.queryCommandValue=function(){var o=t.selection.getStartElementPath(),i=void 0;return e.utils.each(o,function(e){return"BLOCKQUOTE"===e.nodeName?(i=e.textContent,!1):void 0}),i};var i={bold:{type:"include",items:["undo","redo","removeformat","italic","insertunorderedlist","insertorderedlist","horizontal","blockquote","link","insertimage","insertvideo","map","template","insertcode","fullscreen"]},italic:{type:"include",items:["undo","redo","removeformat","bold","insertunorderedlist","insertorderedlist","horizontal","blockquote","link","insertimage","insertvideo","map","template","insertcode","fullscreen"]},blockquote:{type:"include",items:["link","insertorderedlist","insertunorderedlist","blockquote","bold","removeformat","undo","redo","fullscreen"]},insertcaption:{type:"include",items:["undo","redo","fullscreen"]},paragraph:{type:"include",items:["undo","redo","fullscreen"]},insertorderedlist:{type:"include",items:["bold","blockquote","removeformat","undo","redo","fullscreen","insertunorderedlist"]},insertunorderedlist:{type:"include",items:["bold","removeformat","blockquote","undo","redo","fullscreen","insertorderedlist"]}};o.ready(function(){var t=o.ui.toolbars&&o.ui.toolbars[0]&&o.ui.toolbars[0].items||[];o.queryCommandState=function(r){var n=0;for(var l in i){var d=void 0;if(d="bold"===l||"italic"===l?e.Editor.prototype.queryCommandState.call(this,l):o.queryCommandValue(l),!(null===d||void 0===d||("h2"!==d||""===d)&&["paragraph"].indexOf(l)>-1||("bold"===l||"italic"===l)&&0===d)){var s=void 0;for(var a in t)if(t[a].className==="edui-for-"+r.toLocaleLowerCase()){s=t[a];break}if(s&&s.setDisabled&&!(s instanceof e.ui.Separator))if(l!==r){if("include"===i[l].type){if(!(i[l].items.indexOf(r)>-1)){n=-1;break}n=0}else if("exclude"===i[l].type){if(i[l].items.indexOf(r)>-1){n=-1;break}n=0}}else n=1}}return-1===n||1===n?n:e.Editor.prototype.queryCommandState.apply(this,arguments)}})}};t.init=o});
;/*!common:widget/js/logic/ueditor/plugin/imageCaption/imageCaption.es.js*/
define("common:widget/js/logic/ueditor/plugin/imageCaption/imageCaption.es",function(e,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=e("common:widget/js/util/tangram/tangram"),s=n(r),o=function(){function e(t){i(this,e),this.UE=t,this.domUtils=t.dom.domUtils,this.editor=null,this.imageCaptionClass="ikqb_image_caption",this.imageCaptionDefaultText="\u8bf7\u70b9\u51fb\u8f93\u5165\u56fe\u7247\u63cf\u8ff0",this.imageCaptionLength=18;var n=this;t.plugin.register("imageCaption",function(){var e=n.domUtils,i=n.imageCaptionDefaultText,a=n.imageCaptionLength,r=n.imageCaptionClass;return t.commands.insertcaption={execCommand:function(r,s){var o=void 0,u=s.dom;s.length=s.length||a,s.text=s.text||i,u instanceof t.uNode?(o=n.getCaptionUNode(s),"p"===u.tagName.toLowerCase()&&u.parentNode.insertAfter(o,u)):u.nodeType&&(o=n.getCaptionDom(s),u=e.findParent(u,function(e){return"body"===e.parentElement.tagName.toLowerCase()},!0),e.insertAfter(u,o))},queryCommandValue:function(){var e=n.getObj();return e?e.textContent:void 0},notNeedUndo:1},{bindEvents:{ready:function(){var e=this;!n.editor&&(n.editor=e);var t=e.getOpt("getCountRule");t=t instanceof Array?t:[],t.push(function(t,n){if(n){var a=s.default(e.body).find("."+r),o=i.length;a.each(function(e,n){var a=s.default(n).text();a.indexOf(i)>-1&&(t-=o)})}return t}),e.setOpt("getCountRule",t),n.bindEvents();var a=["margin: -10px auto auto !important;","font-size: 12px;","color: #999999 !important;","line-height: 14px !important;","width: 500px;","text-align: center;"].join("");s.default(e.document.head).append('<style type="text/css">.'+r+" {"+a+"}</style>")}},inputRule:function(t){var s=this;!n.editor&&(n.editor=s);for(var o=t.getNodesByTagName("img"),u=0;u<o.length;u++){var f=o[u];if(!(f.attrs.class&&f.attrs.class.search("edui-faked-video")>-1)){var l=e.findParentByTagName(f,"p",!0);if(l){var d=l.nextSibling();d&&d.attrs&&d.attrs.class&&d.attrs.class.indexOf(r)>-1||this.execCommand("insertcaption",{dom:l,text:i,length:a})}}}},outputRule:function(t){var n=t.getNodesByTagName("p");e.filterNodeList(n,function(e){return e&&e.attrs&&e.attrs.class===r&&e.innerText()===i&&t.removeChild(e,!1),!1})}}})}return a(e,[{key:"isImageLeft",value:function(e){var t=e.startContainer,n=this.domUtils.findParentByTagName(t,["P"],!0),i=!1;if(!n)return!1;var a=n&&n.getElementsByTagName("img")[0],r=this.UE.utils.indexOf(n.childNodes,a);return t===n&&r>-1&&(0===e.startOffset&&0===e.endOffset&&"IMG"===t.firstChild.tagName||e.startOffset===e.endOffset&&e.startOffset<=r)&&(i=!0),i}},{key:"isImageRight",value:function(e){var t=e.startContainer,n=this.domUtils.findParentByTagName(t,["P"],!0),i=!1;return n?(t===n&&(1===e.startOffset&&1===e.endOffset&&"IMG"===t.firstChild.tagName||2===e.startOffset&&2===e.endOffset&&3===t.firstChild.nodeType)&&(i=!0),i):!1}},{key:"getCaptionUNode",value:function(e){var t=this.UE,n=t.uNode.createText(e.text),i=t.uNode,a=new i({type:"element",tagName:"p"});return a.appendChild(n),a.setAttr("class",this.imageCaptionClass),a}},{key:"getCaptionDom",value:function(e){var t=document.createElement("p");return t.innerHTML=e.text,this.domUtils.addClass(t,this.imageCaptionClass),t}},{key:"getObj",value:function(){var e=this,t=this.editor;return t.selection?this.domUtils.filterNodeList(t.selection.getStartElementPath(),function(t){return t&&t.tagName&&"p"===t.tagName.toLowerCase()&&t.className.indexOf(e.imageCaptionClass)>-1?!0:!1}):!1}},{key:"hasPreDomNode",value:function(e){var t=e.previousSibling;return t?3===t.nodeType?!1:t.getElementsByTagName("img").length>0?!0:!1:!1}},{key:"getBytes",value:function(e){if(!e)return 0;var t=/[\u4e00-\u9fa5\u3002\uff1f\uff01\uff0c\u3001\uff1b\uff1a\u201c\u201d\u2018\u2019\uff08\uff09\u300a\u300b\u3008\u3009\u3010\u3011\u300e\u300f\u300c\u300d\ufe43\ufe44\u3014\u3015\u2026\u2014\uff5e\ufe4f\uffe5]/g,n=e+"",i=n.match(t);return i?n.length+i.length:n.length}},{key:"substring",value:function(e,t){if(!e||0>t)return e;for(var n=Math.ceil(this.getBytes(e)/2);n>t;)e=e.substring(0,e.length-1),n=Math.ceil(this.getBytes(e)/2);return e}},{key:"bindEvents",value:function(){var e=this.editor,t=this.domUtils,n=this.imageCaptionClass,i=s.default(e.body),a=this,r=null,o=null;i.on("click","."+n,function(){var t=a.getObj();if(t&&t.textContent&&t.textContent===a.imageCaptionDefaultText){var n=e.selection.getRange();n.selectNode(t).shrinkBoundary().select()}}),e.addListener("keydown",function(i,s){var u=a.getObj();if(u)if(o=s.keyCode,13===s.keyCode){var f=e.selection.getRange().startContainer;r=t.findParent(f,function(e){return t.hasClass(e,n)},!0)}else if(8===s.keyCode){var l=e.selection.getRange(),d=l.startContainer,g=t.findParent(d,function(e){return t.hasClass(e,n)},!0),c=void 0,m=!1;g&&(c=g.previousSibling||g.parentNode&&g.parentNode.previousSibling),c&&c.childNodes.forEach(function(e){"IMG"===e.nodeName&&(m=!0)}),m&&0===l.startOffset&&s.preventDefault()}}),e.addListener("keydown",function(i,r){if(8===r.keyCode){var s=e.selection.getRange(),o=s.startContainer,u=t.findParentByTagName(o,["P"],!0),f=void 0;if(u&&(f=u.previousSibling),(0===s.startOffset&&0===s.endOffset||1===s.startOffset&&o.textContent===t.fillChar)&&f&&f.classList.contains(n)&&f.previousSibling){var l=f.previousSibling.getElementsByTagName("img");l&&l.length>0&&(s.selectNode(l[0]).setCursor(!0,!0),t.preventDefault(r))}}var d=e.selection.getRange(),g=d.startContainer,c=t.findParentByTagName(g,["P"],!0);if(!c)return!1;if(13===r.keyCode){if(a.isImageLeft(d)){var m=document.createElement("p");m.textContent=t.fillChar,e.body.insertBefore(m,c),d.setStart(m).setCursor(!1,!0),r.stopPropagation&&r.stopPropagation(),r.preventDefault&&r.preventDefault()}else if(a.isImageRight(d)&&c.nextSibling&&c.nextSibling.classList.contains(n)){var p=c.nextSibling&&c.nextSibling.nextSibling;p&&(d.setStart(p,0).setCursor(!1,!0),r.stopPropagation&&r.stopPropagation(),r.preventDefault&&r.preventDefault())}}else if(8===r.keyCode)a.isImageLeft(d)&&c&&c.previousSibling&&(t.isEmptyNode(c.previousSibling)?(t.remove(c.previousSibling,!1),c.previousSibling?d.setStart(c.previousSibling).setCursor(!1,!0):d.setCursor(!1,!0)):d.setStart(c.previousSibling).setCursor(!0,!0));else if(c&&c.getElementsByTagName("img").length>0)return setTimeout(function(){for(var e=c.childNodes.length,t=0;e>t;t++)c.childNodes[t]&&3===c.childNodes[t].nodeType&&(c.removeChild(c.childNodes[t]),e--)},0),!1}),e.addListener("keyup",function(i,s){var u=a.getObj();if(u){var f=e.selection.getRange(),l=a.imageCaptionLength,d=a.imageCaptionDefaultText;if(13===s.keyCode){if(229!==o){var g=e.selection.getRange().startContainer,c=t.findParent(g,function(e){return t.hasClass(e,n)},!0);c&&c!==r&&t.removeClasses(c,n)}r=null}if(u.textContent&&a.getBytes(u.textContent)>2*l){s.preventDefault();var m=a.substring(u.textContent,l);u.innerText=m,f.selectNodeContents(u).setCursor(!0,!0)}else if(0===u.textContent.trim().length){u.innerText=d;var p=e.selection.getRange();p.selectNode(u).shrinkBoundary().select()}}}),e.addListener("contentchange",function(){for(var i=e.document.getElementsByClassName(n),r=0;r<i.length;r++){var s=i[r],o=a.hasPreDomNode(s);o||t.remove(s)}}),e.addListener("afterpaste",function(){var t=s.default(e.body);t.find("img").forEach(function(e){var t=s.default(e),i=t.parent("p"),r=i.next();r.size()&&r.hasClass(n)||i.after('<p class="'+n+'">'+a.imageCaptionDefaultText+"</p>")})})}}]),e}();t.default=o});
;/*!common:widget/js/logic/ueditor/plugin/imageEdit/imageEdit.es.js*/
define("common:widget/js/logic/ueditor/plugin/imageEdit/imageEdit.es",function(require,exports,module){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,i,a){return i&&e(t.prototype,i),a&&e(t,a),t}}(),_tangram=require("common:widget/js/util/tangram/tangram"),_tangram2=_interopRequireDefault(_tangram),_https=require("common:widget/js/util/https/https"),_https2=_interopRequireDefault(_https),_popTip=require("common:widget/js/ui/pop-tip/pop-tip"),_popTip2=_interopRequireDefault(_popTip),_cropMin=require("common:widget/js/ui/crop/crop.min"),_cropMin2=_interopRequireDefault(_cropMin),tpl=[function(_template_object){var _template_fun_array=[],fn=function(__data__){var _template_varName="";for(var name in __data__)_template_varName+="var "+name+'=__data__["'+name+'"];';eval(_template_varName),_template_fun_array.push('<div class="ueditor-image-edit-box">        <div class="image-edit-mask"></div>        <div class="image-edit-dialog">                <div class="image-edit-close">            <span class="close-icon iknow-icons iconfont-close"></span>        </div>        <div class="image-edit-title">\u56fe\u7247\u7f16\u8f91</div>                <div class="image-edit-box">            <div class="box-loading">                <div class="loading-animation">                    <span class="loading-shallow"></span><span class="loading-dark"></span>                </div>            </div>        </div>                <div class="image-edit-beautify"><span class="beautify-check iknow-ueditor-icons"></span>\u7f8e\u5316\u56fe\u7247</div>                <div class="image-edit-button">            <div class="button-item button-cancel">\u53d6\u6d88</div>            <div class="button-item button-ok">\u5b8c\u6210</div>        </div>    </div></div>'),_template_varName=null}(_template_object);return fn=null,_template_fun_array.join("")}][0](),ImageEdit=function(){function e(t){_classCallCheck(this,e),this.UE=t,this.editor=null,this.loading=!1,this.$img=null,this.imgUrl=null,this.picBeautifyUrl=null,this.cropper=null;var i=this;t.plugin.register("imageEdit",function(){return{bindEvents:{ready:function(){var e=this,t=_tangram2.default("iframe#ueditor_"+e.uid).parent();i.$container=t,i.editor=e,i.shouldHide=!0,i.needHttpsAutoTran=e.getOpt("needHttpsAutoTrans"),i.render(t),i.bindEvent()},destroy:function(){i.$el.remove()}}}})}return _createClass(e,[{key:"render",value:function(e){var t=_tangram2.default(tpl),i='<div class="ueditor-image-eidt-btn iknow-ueditor-icons"></div>',a='<div class="ueditor-image-delete-btn iknow-ueditor-icons"></div>',n=_tangram2.default(i),o=_tangram2.default(a);_tangram2.default("body").append(t),e.append(n),e.append(o),this.$el=t,this.$editBtn=n,this.$deleteBtn=o,this.$beautifBtn=t.find(".image-edit-beautify"),this.$loading=t.find(".image-edit-box .box-loading")}},{key:"bindEvent",value:function(){var e=this.editor,t=this.$container,i=_tangram2.default(e.iframe),a=_tangram2.default(e.iframe.contentWindow),n=_tangram2.default(e.body),o=this.$editBtn,r=this.$deleteBtn,l=this;n.on("mouseover","img",function(e){var n=_tangram2.default(e.target);if(!(e.target.getAttribute("class")&&e.target.getAttribute("class").search("edui-faked-video")>-1)){var d=a.scrollTop(),s=n.offset(),u=t.offset(),c=i.offset(),p=c.left-u.left,f=c.top-u.top;o.css({top:f+s.top+n.height()-o.height()-d-10,left:p+s.left+n.width()-o.width()-10}),r.css({top:f+s.top-.5*r.height()-d,left:p+s.left+n.width()-.5*r.width()}),l.showBtn(),l.$img=n,l.shouldHide=!1}}).on("mouseleave","img",function(){l.shouldHide=!0,setTimeout(function(){l.shouldHide&&l.hideBtn()},1e3)}),a.scroll(function(){l.hideBtn()}),o.add(r).on("mouseover",function(){l.shouldHide=!1}).on("mouseleave",function(){l.shouldHide=!0,setTimeout(function(){l.shouldHide&&l.hideBtn()},200)}),r.click(function(){l.$img.parent().remove(),l.editor.fireEvent("contentchange"),l.editor.fireEvent("saveScene"),l.hideBtn()}),o.click(function(){var e=l.$img;l.imgUrl=e[0].src,l.picBeautifyUrl=null;var t=e[0].src;if(l.cropper)l.cropper.replace(t);else{var i=new Image;i.src=t,l.$el.find(".image-edit-box").append(i),l.cropper=new _cropMin2.default(i,{viewMode:2,background:!1,autoCropArea:1,guides:!1,modal:!1})}l.show()}),this.$el.on("click",".image-edit-close, .image-edit-button .button-cancel",function(){l.loading||l.hide()}).on("click",".image-edit-button .button-ok",function(){if(!l.loading){var e=l.cropper.getData(),t=l.cropper.getImageData(),i=[Math.floor(e.x),Math.floor(e.y),Math.floor(e.width),Math.floor(e.height),t.naturalWidth,t.naturalHeight].join(",");l.clipPic(i)}}).on("click",".image-edit-beautify",function(e){if(!l.loading){var t=_tangram2.default(e.currentTarget),i=void 0;t.hasClass("selected")?(i=l.$img[0].src,l.cropper.replace(i),l.imgUrl=i,t.removeClass("selected")):l.picBeautifyUrl?(i=l.picBeautifyUrl,l.cropper.replace(i),l.imgUrl=i,t.addClass("selected")):l.picBeautify()}})}},{key:"stopScroll",value:function(e){e.preventDefault()}},{key:"show",value:function(){try{window.addEventListener("mousewheel",this.stopScroll,{passive:!1}),window.addEventListener("DOMMouseScroll",this.stopScroll,{passive:!1})}catch(e){}this.$el.show()}},{key:"hide",value:function(){try{window.removeEventListener("mousewheel",this.stopScroll),window.removeEventListener("DOMMouseScroll",this.stopScroll)}catch(e){}this.$el.hide(),this.$beautifBtn.removeClass("selected")}},{key:"showBtn",value:function(){this.$editBtn.show(),this.$deleteBtn.show()}},{key:"hideBtn",value:function(){this.$editBtn.hide(),this.$deleteBtn.hide()}},{key:"clipPic",value:function(e){this.$loading.show(),this.loading=!0;var t=this;_tangram2.default.ajax({url:"/submit/picture/piccrop",type:"POST",data:{picUrl:this.imgUrl,crop:e},dataType:"json",timeout:3e4,success:function(e){0===e.errno&&e.data&&e.data.url?setTimeout(function(){t.$img[0].src=t.needHttpsAutoTran?_https2.default.autoTrans(e.data.url):e.data.url,t.editor.fireEvent("contentchange"),t.editor.fireEvent("saveScene"),t.$loading.hide(),t.loading=!1,t.hide()},3e3):(t.$loading.hide(),t.loading=!1,_popTip2.default("\u56fe\u7247\u526a\u88c1\u5931\u8d25"))},error:function(){t.$loading.hide(),t.loading=!1,_popTip2.default("\u56fe\u7247\u526a\u88c1\u5931\u8d25")}})}},{key:"picBeautify",value:function(){this.$loading.show(),this.loading=!0;var e=this;_tangram2.default.ajax({url:"/submit/picture/picoptimize",type:"GET",data:{picUrl:this.$img[0].src},dataType:"json",timeout:3e4,success:function(t){0===t.errno&&t.data&&t.data.base64?(e.cropper.replace(t.data.base64),e.imgUrl=t.data.base64,e.picBeautifyUrl=t.data.base64,e.$beautifBtn.addClass("selected")):_popTip2.default("\u56fe\u7247\u7f8e\u5316\u5931\u8d25"),e.$loading.hide(),e.loading=!1},error:function(){_popTip2.default("\u56fe\u7247\u7f8e\u5316\u5931\u8d25"),e.$loading.hide(),e.loading=!1}})}}]),e}();exports.default=ImageEdit});
;/*!common:widget/js/logic/ueditor/plugin/insert-video/screenShot.es.js*/
define("common:widget/js/logic/ueditor/plugin/insert-video/screenShot.es",function(t,e,n){"use strict";n.exports=function(){function t(){var t=window.navigator.userAgent.indexOf("MSIE");if(t>0)return!1;var e=window.navigator.userAgent.indexOf("Trident/");if(e>0)return!1;var n=document.createElement("canvas");return!!(Uint8Array&&Blob&&n.getContext&&(n.toBlob||n.toDataURL))}function e(t){for(var e=t.split(","),n=e[0].match(/:(.*?);/)[1],o=atob(e[1]),r=o.length,i=new Uint8Array(r);r--;)i[r]=o.charCodeAt(r);return new Blob([i],{type:n})}function n(t,n,r,i){function a(){d.drawImage(t,0,0,l,f,0,0,l,f);var n=null;n=h?o(u,[l,f],r):u,n.toBlob?n.toBlob(function(t){v&&s.push({blob:t}),setTimeout(function(){c(++v)},1e3)}):(s.push({blob:e(n.toDataURL()),base64:n.toDataURL()}),setTimeout(function(){c(++v)},1e3)),t.removeEventListener("canplay",a,!1)}function c(e){if(v=e,e>=m)"function"==typeof i&&i(null,s);else if(g)try{t.currentTime=n[e],setTimeout(function(){a()},500)}catch(o){t.removeEventListener("canplay",a,!1),"function"==typeof i&&i(o,null)}else a()}if(i="function"==typeof r?r:i,!(t instanceof HTMLVideoElement))return void("function"==typeof i&&i(new Error("`video` \u53c2\u6570\u5fc5\u987b\u662f HTMLVideoElement \u5bf9\u8c61"),null));var u=document.createElement("canvas"),l=t.videoWidth,f=t.videoHeight;u.width=l,u.height=f;var d=u.getContext("2d"),s=[],v=0,g="[object Array]"===Object.prototype.toString.call(n),m=g?n.length:1,h="[object Array]"===Object.prototype.toString.call(r)&&r.length>=2;return g&&t.pause(),c(0),u}function o(t,e,n){var o=document.createElement("canvas");o.width=n[0],o.height=n[1];var r=o.getContext("2d");return r.drawImage(t,0,0,e[0],e[1],0,0,n[0],n[1]),o}return{dataURLtoBlob:e,videoScreenshot:n,checkCompatible:t}}});
;/*!common:widget/js/logic/ueditor/plugin/insert-video/picEdit.es.js*/
define("common:widget/js/logic/ueditor/plugin/insert-video/picEdit.es",function(t,e){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function l(){function t(t,s){var n=t.isVertical,o=n?H[s]:m[s],f=n?w[s]:u[s],c=n?F[s]:y[s],p=n?W[s]:b[s],r=d.default(S[s]);return l(r,t),a(r,t),n?void e(r,o,f,c,p,s,t):void i(r,o,f,c,p,s,t)}function e(t,e,i,l,a,s,n){function o(){d.default(".textarea").css("cursor","default"),M=!1,j.css("border","1px dashed transparent"),W.hide(),d.default(".active-line").hide()}var f=d.default(".vertical-box"),c=f[0].offsetWidth,p=null,r="";if(f.find(".drag").length){var v=d.default(".drag")[0],h=d.default(".textarea").clone(),x=+v.style.left.slice(0,v.style.left.length-2),g=+v.style.top.slice(0,v.style.top.length-2);r=d.default(".width-box-vertical").html(),t.find(".textarea").replaceWith(h),p=t.find(".drag"),f.html(t);var u=x,m=g;p[0]&&x+p[0].offsetWidth+i>c&&(u=c-p[0].offsetWidth-i),p[0]&&g+p[0].offsetHeight+e>224&&(m=224-p[0].offsetHeight-e),a&&(u+=a),l&&(m+=l),p.css({top:m+"px",left:u+"px"})}else{f.html(t),p=t.find(".drag"),t.find(".textarea")[0].style.width="bigFont"===n.fontStyle?"100px":"82px";var b=c/2-p[0].offsetWidth/2,y=112-p[0].offsetHeight/2;p.css({top:y+"px",left:b+"px"})}f.append(S["line-vertical"],S["line-transverse"],S["width-box-vertical"]);var w="bigFont"===n.fontStyle?"20px":"16px",H="bigFont"===n.fontStyle?"120px":"112px";d.default(".width-box-vertical").css({fontSize:w,maxWidth:H}).html(r),"item1"===s&&(d.default(".first-bgc>div:nth-child(2)")[0].style.padding="9px 10px 0px 10px"),"item3"===s&&(d.default(".third-bgc>div:nth-child(2)")[0].style.padding="8px 8px 0px"),"item4"===s&&(d.default(".forth-bgc")[0].style.padding="8px 8px 0px"),"item5"===s&&(d.default(".fifth-bgc>div:nth-child(2)")[0].style.padding="8px 8px 0px"),"item6"===s&&(d.default(".sixth-bgc")[0].style.padding="8px 8px 0px"),"item7"===s&&(d.default(".seventh-bgc>div:nth-child(2)")[0].style.padding="8px 8px 0px");var W=d.default(".draw-line"),F=d.default(".textarea"),_=d.default(".width-box-vertical"),j=d.default(".safe-area"),k=d.default(".close-area");F[0].focus(),d.default(".vertical-box")[0]&&d.default(".vertical-box")[0].offsetWidth<=150&&(F[0].style.maxWidth=120-(158-d.default(".vertical-box")[0].offsetWidth)+"px",_[0].style.maxWidth=120-(158-d.default(".vertical-box")[0].offsetWidth)+"px");var C=0,L=0,I=0,P=0,M=!1;p.on("mousedown",function(t){C=t.clientX,L=t.clientY,I=this.offsetLeft,P=this.offsetTop,M=!0,W.show(),j.css("border","1px dashed #FF0000"),d.default(".textarea").css("cursor","move"),d.default(".active-line").show()}).on("mouseup",o).on("mouseenter",function(){k.show()}).on("mouseleave",function(){k.hide(),d.default(".active-line").hide()}).on("mouseenter",function(){d.default(".active-line").show()}),j.on("mousemove",function(t){if(t.stopPropagation(),M!==!1){var d=t.clientX,s=t.clientY,n=d-(C-I),o=s-(L-P);a>n&&(n=0+a),l>o&&(o=0+l),p[0]&&j[0]&&n+p[0].offsetWidth+i>j[0].offsetWidth&&(n=c-p[0].offsetWidth-i),p[0]&&j[0]&&o+p[0].offsetHeight+e>j[0].offsetHeight&&(o=224-p[0].offsetHeight-e),p[0].style.left=n+"px",p[0].style.top=o+"px"}}).on("mousedown",function(t){2===t.button&&o()}),d.default(document).on("mousemove",o),F.on("input",function(t){var l="bigFont"===n.fontStyle?25:23,a=1;if(""===t.target.value){"item1"===s&&(d.default(".first-bgc>div:nth-child(2)")[0].style.padding="9px 10px 0px 10px"),"item3"===s&&(d.default(".third-bgc>div:nth-child(2)")[0].style.padding="8px 8px 0px"),"item4"===s&&(d.default(".forth-bgc")[0].style.padding="8px 8px 0px"),"item5"===s&&(d.default(".fifth-bgc>div:nth-child(2)")[0].style.padding="8px 8px 0px"),"item6"===s&&(d.default(".sixth-bgc")[0].style.padding="8px 8px 0px"),"item7"===s&&(d.default(".seventh-bgc>div:nth-child(2)")[0].style.padding="8px 8px 0px");var o="bigFont"===n.fontStyle?100:82;return F[0].style.width=o+"px",void(F[0].style.height=l+"px")}var f=F.val().replace(/\n/g,"_#!a@").split(" ").join("&nbsp;"),r=f.indexOf("_#!a@"),v=0;if(-1===r)_.html(t.target.value.split(" ").join("&nbsp;"));else{if(v=f.split("_#!a@").length,v>=3&&"\n"!==t.target.value){var h=t.target.value.split("\n");return h.splice(0,h.lastIndexOf("\n")),t.target.value=T,_[0].innerHTML=_[0].innerHTML.split("_#!a@").join("").split("_#!a").join(""),void(T=t.target.value)}_.html(f.slice(0,r));var x=d.default('<div style="height: 20px;width: 100%"></div>');_.append(x);var g=document.createTextNode(f.slice(r+5));_.html(_[0].innerHTML+g.nodeValue)}F[0].style.width=_[0].offsetWidth+a+"px";var u=p[0].style.left.slice(0,p[0].style.left.length-2);if(p[0]&&+u+p[0].offsetWidth+i>=c&&(p[0].style.left=c-p[0].offsetWidth-i+"px"),F[0].style.height="auto",F[0].scrollTop=0,F[0]&&F[0].scrollHeight>=60&&""!==F[0].value){t.target.value=T,F[0].style.height=2*l+"px";var m=p[0].style.top.slice(0,p[0].style.top.length-2);return void(p[0]&&+m+p[0].offsetHeight+i>=224&&(p[0].style.top=224-p[0].offsetHeight-i+"px"))}T=t.target.value;var b=20,y=parseInt(F[0].scrollHeight/b,10)*l;F[0].style.height=y+"px","item1"===s&&(y===l&&(d.default(".first-bgc>div:nth-child(2)")[0].style.padding="9px 10px 0px 10px"),y===2*l&&(d.default(".first-bgc>div:nth-child(2)")[0].style.padding="14px 12x 3px 15px")),"item3"===s&&(d.default(".third-bgc>div:nth-child(2)")[0].style.padding="8px 8px 0px"),"item4"===s&&(d.default(".forth-bgc")[0].style.padding="8px 8px 0px"),"item5"===s&&(d.default(".fifth-bgc>div:nth-child(2)")[0].style.padding="8px 8px 0px"),"item6"===s&&(d.default(".sixth-bgc")[0].style.padding="8px 8px 0px"),"item7"===s&&(d.default(".seventh-bgc>div:nth-child(2)")[0].style.padding="8px 8px 0px"),F[0].style.height=parseInt(F[0].scrollHeight/b,10)*l+"px";var w=p[0].style.top.slice(0,p[0].style.top.length-2);p[0]&&+w+p[0].offsetHeight+e>=224&&(p[0].style.top=224-p[0].offsetHeight-e+"px")}).on("mousedown",function(t){t.stopPropagation()}),k.on("mousedown",function(t){t.stopPropagation()})}function i(t,e,i,l,a,s,n){function o(){d.default(".textarea").css("cursor","default"),O=!1,k.css("border","1px dashed transparent"),F.hide(),d.default(".active-line").hide()}var f=d.default(".screenshot-preview"),c=null,p="";if(f.find(".drag").length){var r=d.default(".drag")[0],v=d.default(".textarea").clone(!1)[0],h=+r.style.left.slice(0,r.style.left.length-2),x=+r.style.top.slice(0,r.style.top.length-2);p=d.default(".width-box").html();var g=t.find(".textarea")[0],u=g.parentNode;u.removeChild(g),u.appendChild(v),c=t.find(".drag"),f.html(t);var m=h,b=x;c[0]&&h+c[0].offsetWidth+i>440&&(m=440-c[0].offsetWidth-i),c[0]&&x+c[0].offsetHeight+e>257&&(b=257-c[0].offsetHeight-e),a&&(m+=a),l&&(b+=l),c.css({top:b+"px",left:m+"px"})}else{f.html(t),c=t.find(".drag"),t.find(".textarea")[0].style.width="bigFont"===n.fontStyle?"285px":"200px";var y=220-c[0].offsetWidth/2,w=128.5-c[0].offsetHeight/2;c.css({top:w+"px",left:y+"px"})}f.find(".textarea").attr("placeholder","\u8bf7\u8f93\u5165\u5c01\u9762\u6807\u9898"),f.append(S["line-vertical"],S["line-transverse"],S["width-box"]);var H="bigFont"===n.fontStyle?"40px":"28px",W="bigFont"===n.fontStyle?"320px":"315px";d.default(".width-box").css({fontSize:H,maxWidth:W}).html(p),"item1"===s&&(d.default(".first-bgc>div:nth-child(2)")[0].style.padding="13px 14px 3px 15px"),"item3"===s&&(d.default(".third-bgc>div:nth-child(2)")[0].style.padding="14px 14px 3px 14px"),"item4"===s&&(d.default(".forth-bgc")[0].style.padding="14px 14px 3px 14px"),"item5"===s&&(d.default(".fifth-bgc>div:nth-child(2)")[0].style.padding="14px 17px 3px 15px"),"item6"===s&&(d.default(".sixth-bgc")[0].style.padding="12px 12px 0px 12px"),"item7"===s&&(d.default(".seventh-bgc>div:nth-child(2)")[0].style.padding="11px 11px 0px 12px");var F=d.default(".draw-line"),_=d.default(".textarea"),j=d.default(".width-box"),k=d.default(".safe-area"),C=d.default(".close-area");_[0].focus();var L=0,I=0,P=0,M=0,O=!1;c.on("mousedown",function(t){L=t.clientX,I=t.clientY,P=this.offsetLeft,M=this.offsetTop,O=!0,F.show(),k.css("border","1px dashed #FF0000"),d.default(".textarea").css("cursor","move"),d.default(".active-line").show()}).on("mouseup",o).on("mouseenter",function(){C.show()}).on("mouseleave",function(){C.hide(),d.default(".active-line").hide()}).on("mouseenter",function(){d.default(".active-line").show()}),k.on("mousemove",function(t){if(t.stopPropagation(),O!==!1){var d=t.clientX,s=t.clientY,n=d-(L-P),o=s-(I-M);a>n&&(n=0+a),l>o&&(o=0+l),c[0]&&n+c[0].offsetWidth+i>k[0].offsetWidth&&(n=440-c[0].offsetWidth-i),c[0]&&o+c[0].offsetHeight+e>k[0].offsetHeight&&(o=257-c[0].offsetHeight-e),c[0].style.left=n+"px",c[0].style.top=o+"px"}}).on("mousedown",function(t){2===t.button&&o()}),d.default(document).on("mousemove",o),_.on("input",function(t){var l="bigFont"===n.fontStyle?49:39,a=1;if(""===t.target.value){"item1"===s&&(d.default(".first-bgc>div:nth-child(2)")[0].style.padding="14px 14px 3px 15px"),"item3"===s&&(d.default(".third-bgc>div:nth-child(2)")[0].style.padding="14px 14px 3px 14px"),"item4"===s&&(d.default(".forth-bgc")[0].style.padding="14px 14px 3px 14px"),"item5"===s&&(d.default(".fifth-bgc>div:nth-child(2)")[0].style.padding="17px 17px 3px 15px"),"item6"===s&&(d.default(".sixth-bgc")[0].style.padding="12px 12px 0px 12px"),"item7"===s&&(d.default(".seventh-bgc>div:nth-child(2)")[0].style.padding="11px 11px 0px 12px");var o="bigFont"===n.fontStyle?285:200;return _[0].style.width=o+"px",void(_[0].style.height=l+"px")}var f=_.val().replace(/\n/g,"_#!a@").split(" ").join("&nbsp;"),p=f.indexOf("_#!a@"),r=0;if(-1===p)j.html(t.target.value.split(" ").join("&nbsp;"));else{if(r=f.split("_#!a@").length,r>=3&&"\n"!==t.target.value){var v=t.target.value.split("\n");return v.splice(0,v.lastIndexOf("\n")),t.target.value=T,j[0].innerHTML=j[0].innerHTML.split("_#!a@").join("").split("_#!a").join(""),void(T=t.target.value)}j.html(f.slice(0,p));var h=d.default('<div style="height: 20px;width: 100%"></div>');j.append(h);var x=document.createTextNode(f.slice(p+5));j.html(j[0].innerHTML+x.nodeValue)}_[0].style.width=j[0].offsetWidth+a+"px";var g=c[0].style.left.slice(0,c[0].style.left.length-2);if(c[0]&&+g+c[0].offsetWidth+i>=440&&(c[0].style.left=440-c[0].offsetWidth-i+"px"),_[0].style.height="auto",_[0].scrollTop=0,_[0]&&_[0].scrollHeight>=110&&""!==_[0].value){t.target.value=T,_[0].style.height=2*l+"px";var u=c[0].style.top.slice(0,c[0].style.top.length-2);return void(c[0]&&+u+c[0].offsetHeight+i>=257&&(c[0].style.top=257-c[0].offsetHeight-i+"px"))}T=t.target.value;var m="bigFont"===n.fontStyle?40:30,b=parseInt(_[0].scrollHeight/m,10)*l;_[0].style.height=b+"px","item1"===s&&(b===l&&(d.default(".first-bgc>div:nth-child(2)")[0].style.padding="14px 14x 3px 15px"),b===2*l&&(d.default(".first-bgc>div:nth-child(2)")[0].style.padding="14px 12x 3px 15px")),"item3"===s&&(b===l&&(d.default(".third-bgc>div:nth-child(2)")[0].style.padding="14px 14px 3px 14px"),b===2*l&&(d.default(".third-bgc>div:nth-child(2)")[0].style.padding="14px 14px 0px 14px")),"item4"===s&&(b===l&&(d.default(".forth-bgc")[0].style.padding="14px 14px 3px 14px"),b===2*l&&(d.default(".forth-bgc")[0].style.padding="14px 14px 0px 14px")),"item5"===s&&(b===l&&(d.default(".fifth-bgc>div:nth-child(2)")[0].style.padding="17px 14px 3px 15px"),b===2*l&&(d.default(".fifth-bgc>div:nth-child(2)")[0].style.padding="17px 14px 0px 15px")),"item6"===s&&(b===l&&(d.default(".sixth-bgc")[0].style.padding="12px 12px 0px 12px"),b===2*l&&(d.default(".sixth-bgc")[0].style.padding="12px 12px 0px 12px")),"item7"===s&&(d.default(".seventh-bgc>div:nth-child(2)")[0].style.padding="11px 11px 0px 12px");var y=c[0].style.top.slice(0,c[0].style.top.length-2);c[0]&&+y+c[0].offsetHeight+e>=257&&(c[0].style.top=257-c[0].offsetHeight-e+"px")}).on("mousedown",function(t){t.stopPropagation()}),C.on("mousedown",function(t){t.stopPropagation()})}function l(t,e){t.find(".close-icon").on("click",function(){n.default({el:".screenshot-preview",text:"\u662f\u5426\u5220\u9664\u5c01\u9762\u6807\u9898?",confirmText:"\u5220\u9664",cancelText:"\u53d6\u6d88",onaccept:function(){d.default(".screenshot-preview").find(".safe-area").remove(),d.default(".select-active").removeClass("select-active"),delete e.fontStyle}})})}function a(t,e){var i=t.find(".big-font"),l=t.find(".little-font"),a=t.find(".font");e&&!e.fontStyle&&(i.addClass("font-active"),e.fontStyle="bigFont"),e&&"bigFont"===e.fontStyle&&i.addClass("font-active"),e&&"littleFont"===e.fontStyle&&l.addClass("font-active"),i.on("click",function(){e&&"bigFont"===e.fontStyle||(a.removeClass("font-active"),i.addClass("font-active"),e.fontStyle="bigFont",s(t,e))}),l.on("click",function(){e&&"littleFont"===e.fontStyle||(a.removeClass("font-active"),l.addClass("font-active"),e.fontStyle="littleFont",s(t,e))})}function s(t,e){var i=e.isVertical,l=e.fontStyle,a=d.default(".textarea");if(!i){var s="bigFont"===l?"40px":"28px",n="bigFont"===l?"46px":"36px",f="bigFont"===l?"320px":"315px",p="bigFont"===l?30:40,r="bigFont"===l?49:39,v=parseInt(a[0].scrollHeight/p,10)*r+"px";return a.css({fontSize:s,lineHeight:n,minHeight:n,maxWidth:f,height:v}),d.default(".width-box").css({fontSize:s,maxWidth:f}),o(d.default(".width-box")[0]),a[0].style.width=""===a[0].value?"bigFont"===l?"285px":"200px":d.default(".width-box")[0].offsetWidth+1+"px",c(i),void a.val(T)}var h="bigFont"===l?"20px":"16px",x="bigFont"===l?"24px":"22px",g="bigFont"===l?"120px":"112px",u=20,m="bigFont"===l?25:23,b=parseInt(a[0].scrollHeight/u,10)*m+"px";a.css({fontSize:h,lineHeight:x,minHeight:x,maxWidth:g,height:b}),d.default(".width-box-vertical").css({fontSize:h,maxWidth:g}),o(d.default(".width-box-vertical")[0]),a[0].style.width=""===a[0].value?"bigFont"===l?"100px":"82px":d.default(".width-box-vertical")[0].offsetWidth+1+"px",c(i),a.val(T)}function o(t){t&&t.offsetHeight>=70?(t.innerText=t.innerText.slice(0,t.innerText.length-1),o(t)):T=t.innerText}function c(t){var e=d.default(".drag")[0],i={"first-bgc":"item1","second-bgc":"item2","third-bgc":"item3","forth-bgc":"item4","fifth-bgc":"item5","sixth-bgc":"item6","seventh-bgc":"item7","eighth-bgc":"item8"},l=i[e.classList[0]],a=t?H[l]:m[l],s=t?w[l]:u[l];if(!t){var n=e.style.left.slice(0,e.style.left.length-2);e&&+n+e.offsetWidth+s>=440&&(e.style.left=440-e.offsetWidth-s+"px");var o=e.style.top.slice(0,e.style.top.length-2);e&&+o+e.offsetHeight+a>=257&&(e.style.top=257-e.offsetHeight-a+"px")}if(t){var f=e.style.left.slice(0,e.style.left.length-2),c=d.default(".vertical-box").offsetWidth;e&&+f+e.offsetWidth+s>=c&&(e.style.left=440-e.offsetWidth-s+"px");var p=e.style.top.slice(0,e.style.top.length-2);e&&+p+e.offsetHeight+a>=224&&(e.style.top=224-e.offsetHeight-a+"px")}}function r(e){d.default(".bgc-box").on("click",".titlebgc-item",function(){var i=d.default(this),l=i.attr("class");if(!l.includes("select-active")){i.siblings().removeClass("select-active"),i.addClass("select-active");var a=i.children().attr("class").split(" ")[0];t(e,a)}})}function v(t){if(t.isVertical){var e=d.default('<div style="width: '+t.width+"px; height: "+t.height+"px;background-image: url('"+t.screenShots[0].url+'\')" class="vertical-box">\n                          <div class="line-transverse"></div>\n                          <div class="line-vertical"></div>\n                      </div>');d.default(".screenshot-preview").css("paddingLeft",(528-t.width)/2+"px").append(e)}}function h(t,e){var i=t.indexOf("w_"),l=t.indexOf("h_");return e.isVertical?(t=t.substr(0,i)+"w_"+parseInt(e.width,10)+t.substr(i+5),t=t.substr(0,l)+"h_"+e.height+t.substr(l+5)):(t=t.substr(0,i)+"w_528"+t.substr(i+5),t=t.substr(0,l)+"h_317"+t.substr(l+5))}function x(t){var e=void 0;return e=d.default(t?".vertical-box":".screenshot-preview"),f.default.toPng(e[0]).then(p.default().dataURLtoBlob)}function g(){var t=d.default(".textarea")[0];return!t||t&&""!==t.value?!0:!1}var u={item1:0,item2:0,item3:5,item4:14,item5:12,item6:0,item7:5,item8:0},m={item1:12,item2:0,item3:16,item4:14,item5:12,item6:0,item7:5,item8:0},b={item1:0,item2:0,item3:0,item4:0,item5:0,item6:0,item7:5,item8:0},y={item1:0,item2:0,item3:0,item4:0,item5:0,item6:0,item7:5,item8:0},w={item1:0,item2:0,item3:5,item4:9,item5:9,item6:0,item7:12,item8:0},H={item1:8,item2:0,item3:13,item4:9,item5:9,item6:0,item7:12,item8:0},W={item1:0,item2:0,item3:0,item4:0,item5:0,item6:0,item7:12,item8:0},F={item1:0,item2:0,item3:0,item4:0,item5:0,item6:0,item7:12,item8:0},S={item1:'<div class="safe-area">\n                    <div class="first-bgc drag"> \n                        <div>\n                        </div>\n                        <div>\n                             <textarea placeholder="\u8bf7\u8f93\u5165\u6807\u9898" rows="1" class="textarea" spellcheck="false"></textarea>\n                        </div>\n                        <div class="close-area">\n                            <div class="close-icon"></div>\n                            <div class="big-font font">\u5927</div>\n                            <div class="little-font font">\u5c0f</div>\n                        </div>\n                        <div class="active-line"></div>\n                    </div>\n                  </div>',item2:'<div class="safe-area">\n                    <div class="second-bgc drag"> \n                        <textarea placeholder="\u8bf7\u8f93\u5165\u6807\u9898" rows="1" class="textarea" spellcheck="false"></textarea>\n                        <div class="close-area">\n                            <div class="close-icon"></div>\n                            <div class="big-font font">\u5927</div>\n                            <div class="little-font font">\u5c0f</div>\n                        </div>\n                         <div class="active-line"></div>\n                    </div>\n                  </div>',item3:'<div class="safe-area">\n                    <div class="third-bgc drag"> \n                        <div>\n                        </div>\n                        <div>\n                             <textarea placeholder="\u8bf7\u8f93\u5165\u6807\u9898" rows="1" class="textarea" spellcheck="false"></textarea>\n                        </div>\n                         <div class="active-line"></div>\n                        <div class="close-area">\n                            <div class="big-font font">\u5927</div>\n                            <div class="little-font font">\u5c0f</div>\n                            <div class="close-icon"></div>\n                        </div>\n                    </div>\n                  </div>',item4:'<div class="safe-area">\n                    <div class="forth-bgc drag"> \n                        <textarea placeholder="\u8bf7\u8f93\u5165\u6807\u9898" rows="1" class="textarea" spellcheck="false"></textarea>\n                        <div class="close-area">\n                            <div class="big-font font">\u5927</div>\n                            <div class="little-font font">\u5c0f</div>\n                            <div class="close-icon"></div>\n                        </div>\n                         <div class="active-line"></div>\n                    </div>\n                  </div>',item5:'<div class="safe-area">\n                    <div class="fifth-bgc drag"> \n                        <div>\n                        </div>\n                        <div>\n                             <textarea placeholder="\u8bf7\u8f93\u5165\u6807\u9898" rows="1" class="textarea" spellcheck="false"></textarea>\n                        </div>\n                        <div class="close-area">\n                            <div class="big-font font">\u5927</div>\n                            <div class="little-font font">\u5c0f</div>\n                            <div class="close-icon"></div>\n                        </div>\n                         <div class="active-line"></div>\n                    </div>\n                  </div>',item6:'<div class="safe-area">\n                    <div class="sixth-bgc drag"> \n                        <textarea placeholder="\u8bf7\u8f93\u5165\u6807\u9898" rows="1" class="textarea" spellcheck="false"></textarea>\n                        <div class="close-area">\n                            <div class="big-font font">\u5927</div>\n                            <div class="little-font font">\u5c0f</div>\n                            <div class="close-icon"></div>\n                        </div>\n                         <div class="active-line"></div>\n                    </div>\n                  </div>',item7:'<div class="safe-area">\n                    <div class="seventh-bgc drag"> \n                        <div>\n                            <div></div>\n                            <div></div>\n                            <div></div>\n                            <div></div>\n                            <div></div>\n                            <div></div>\n                            <div></div>\n                            <div></div>\n                        </div>\n                        <div>\n                             <textarea placeholder="\u8bf7\u8f93\u5165\u6807\u9898" rows="1" class="textarea" spellcheck="false"></textarea>\n                        </div>\n                        <div class="close-area">\n                            <div class="big-font font">\u5927</div>\n                            <div class="little-font font">\u5c0f</div>\n                            <div class="close-icon"></div>\n                        </div>\n                         <div class="active-line"></div>\n                    </div>\n                  </div>',item8:'<div class="safe-area">\n                    <div class="eighth-bgc drag"> \n                        <textarea placeholder="\u8bf7\u8f93\u5165\u6807\u9898" rows="1" class="textarea" spellcheck="false"></textarea>\n                        <div class="close-area">\n                            <div class="big-font font">\u5927</div>\n                            <div class="little-font font">\u5c0f</div>\n                            <div class="close-icon"></div>\n                        </div>\n                         <div class="active-line"></div>\n                    </div>\n                  </div>',"line-vertical":'<div class="line-vertical draw-line"></div>',"line-transverse":'<div class="line-transverse draw-line"></div>',"width-box":'<div class="width-box" contentEditable="true"></div>',"width-box-vertical":'<div class="width-box-vertical"></div>'},T="";return{checkTitle:g,toBlob:x,editUrlParams:h,bindEvent:r,createVerticalBox:v}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var a=t("common:widget/js/util/tangram/tangram"),d=i(a),s=t("common:widget/js/ui/newDialog/newDialog.es"),n=i(s),o=t("common:widget/js/util/domToImage/dom-to-image.es"),f=i(o),c=t("common:widget/js/logic/ueditor/plugin/insert-video/screenShot.es"),p=i(c)});
;/*!common:widget/js/logic/ueditor/plugin/insert-video/insert-video.es.js*/
define("common:widget/js/logic/ueditor/plugin/insert-video/insert-video.es",function(require,exports,module){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,i,a){return i&&e(t.prototype,i),a&&e(t,a),t}}(),_tangram=require("common:widget/js/util/tangram/tangram"),_tangram2=_interopRequireDefault(_tangram),_event=require("common:widget/js/util/event/event"),_event2=_interopRequireDefault(_event),_https=require("common:widget/js/util/https/https"),_https2=_interopRequireDefault(_https),_popTip=require("common:widget/js/ui/pop-tip/pop-tip"),_popTip2=_interopRequireDefault(_popTip),_dialog=require("common:widget/js/ui/dialog/dialog"),_dialog2=_interopRequireDefault(_dialog),_webuploader=require("common:widget/js/util/webuploader/webuploader"),_webuploader2=_interopRequireDefault(_webuploader),_picEditEs=require("common:widget/js/logic/ueditor/plugin/insert-video/picEdit.es"),_picEditEs2=_interopRequireDefault(_picEditEs),_screenShotEs=require("common:widget/js/logic/ueditor/plugin/insert-video/screenShot.es"),_screenShotEs2=_interopRequireDefault(_screenShotEs),_juicer=require("common:widget/lib/juicer/juicer"),_juicer2=_interopRequireDefault(_juicer),tpl=[function(_template_object){var _template_fun_array=[],fn=function(__data__){var _template_varName="";for(var name in __data__)_template_varName+="var "+name+'=__data__["'+name+'"];';eval(_template_varName),_template_fun_array.push('<div class="ueditor-new-insert-video">        <div class="insert-video-mask"></div>        <div class="insert-video-dialog">                <div class="insert-video-close">            <span class="close-icon iknow-icons iconfont-close"></span>        </div>                <div class="insert-video-tab">            <div class="tab-item active">\u672c\u5730\u89c6\u9891</div>        </div>                <div class="insert-video-panel">                        <div class="panel-local">                <div class="local-upload-tip">                    <div class="upload-tip-content">                        <div class="upload-tip-item upload-tip-item-line">                            <i class="upload-tip-item-icon xiangguan-icon"></i>                            <span>\u76f8\u5173</span>                            <p>\u8bf7\u4e0a\u4f20\u4e0e\u56de\u7b54\u76f8\u5173\u7684\u89c6\u9891</p>                        </div>                        <div class="upload-tip-item upload-tip-item-line">                            <i class="upload-tip-item-icon shichang-icon"></i>                            <span>\u65f6\u957f</span>                            <p>\u89c6\u9891\u65f6\u957f15\u79d2~20\u5206\u949f</p>                        </div>                        <div class="upload-tip-item upload-tip-item-line">                            <i class="upload-tip-item-icon qingxi-icon"></i>                            <span>\u6e05\u6670</span>                            <p>\u753b\u8d28\u97f3\u8d28\u6e05\u6670\uff0c\u4e0d\u542b\u65e0\u5173\u6c34\u5370</p>                        </div>                        <div class="upload-tip-item">                            <i class="upload-tip-item-icon yuanchuang-icon"></i>                            <span>\u539f\u521b</span>                            <p>\u539f\u521b\u6216\u7ecf\u8fc7\u4e00\u5b9a\u526a\u8f91\u66f4\u5bb9\u6613\u83b7\u5f97\u4f18\u8d28</p>                        </div>                    </div>                </div>                                <div class="local-upload-area">                    <div class="local-upload-btn" id="local-upload-btn">                                                <div class="upload-btn-content">                          <div class="upload-btn-icon"></div>                          <div class="upload-btn-desc">\u672c\u5730\u4e0a\u4f20</div>                        </div>                    </div>                    <div class="local-upload-nice-link">                        <span>\u70b9\u51fb\u67e5\u770b</span>                        <a target="blank" href="//zhidao.baidu.com/question/462716892854257245.html?entry=qb_uhome_tag">\u300a\u77e5\u9053\u4f18\u8d28\u89c6\u9891\u8be6\u7ec6\u653b\u7565\u300b</a>                    </div>                </div>            </div>        </div>    </div></div>'),_template_varName=null}(_template_object);return fn=null,_template_fun_array.join("")}][0](),progressHtml=[function(_template_object){var _template_fun_array=[],fn=function(__data__){var _template_varName="";for(var name in __data__)_template_varName+="var "+name+'=__data__["'+name+'"];';eval(_template_varName),_template_fun_array.push('<p id="${id}" class="ikqb_insertvideo" contenteditable="false" data-mid="${mediaId}"data-post="${postUrl}" data-duration="${oriDuration}" data-width="${width}" data-height="${height}" data-vtopic="${vtopic}"><span class="insertvideo_cover_container{@if finish && duration} finished{@/if}"><span class="insertvideo_cover" style="{@if postUrl}background: #191B1D url(${postUrl}) center center no-repeat;{@/if}{@if width > height} background-size: 100% auto;{@else} background-size: auto 100%;{@/if}"></span><span class="insertvideo_playbtn"></span>{@if duration}<span class="insertvideo_duration">${duration}</span>{@/if}</span><span class="insertvideo_status_container">{@if !finish}<span class="insertvideo_progress_status">\u4e0a\u4f20\u4e2d</span>{@else}<span class="insertvideo_progress_status">\u8f6c\u7801\u5b8c\u6210</span>{@/if}<span class="insertvideo_progress_size"></span><span class="insertvideo_progress_rate"><span class="insertvideo_progress_bar"{@if finish} style="width: 100%;"{@/if}></span></span>{@if showChoseBtn}<span class="chose-cover{@if ready} can-choose{@/if}" id="${mediaId}"><span class="loading"></span><span class="text">\u9009\u62e9\u5c01\u9762</span></span>{@/if}</span><span class="insertvideo_textholder">\u9632\u6b62\u53ea\u6709\u89c6\u9891\u5c01\u9762\u65f6\u88ab\u7f16\u8f91\u5668\u8ba4\u4e3a\u5185\u5bb9\u4e3a\u7a7a\u7684\u5360\u4f4d\u6587\u5b57</span></p>'),_template_varName=null}(_template_object);return fn=null,_template_fun_array.join("")}][0](),progressStyle=".ikqb_insertvideo{position:relative;height:200px;margin-left:3px!important;margin-right:3px!important;-webkit-user-select:none;user-select:none}.ikqb_insertvideo .insertvideo_cover_container{display:block;position:absolute;top:0;left:0;width:150px;height:200px;background:#F2F2F2;vertical-align:top;overflow:hidden;border-radius:6px 0 0 6px}.ikqb_insertvideo .insertvideo_cover_container .insertvideo_cover{display:block;position:absolute;top:0;left:0;right:0;bottom:0;width:150px;margin:auto}.ikqb_insertvideo .insertvideo_cover_container .insertvideo_duration{position:absolute;box-sizing:border-box;right:10px;bottom:10px;padding:3px 4px;height:18px;border-radius:30px;line-height:1;font-size:12px;color:#FFF;background:rgba(0,0,0,.3)}.ikqb_insertvideo .finished{background:#000}.ikqb_insertvideo .insertvideo_status_container{display:block;position:relative;left:150px;width:calc(100% - 150px);height:100%;padding:23px 20px 0;border:1px solid #E5E5E5;border-left:0;vertical-align:top;box-sizing:border-box;border-radius:0 6px 6px 0}.ikqb_insertvideo .insertvideo_status_container .insertvideo_progress_status{font-size:16px;color:#333;line-height:16px;font-family:PingFangSC-Medium}.ikqb_insertvideo .insertvideo_status_container .insertvideo_progress_size{display:inline-block;margin-left:6px;font-size:12px;color:#999;line-height:14px}.ikqb_insertvideo .insertvideo_status_container .insertvideo_progress_rate{display:block;width:100%;height:2px;margin-top:9px;background:#DEDEDE}.ikqb_insertvideo .insertvideo_status_container .insertvideo_progress_rate .insertvideo_progress_bar{display:block;height:100%;width:0;background-image:linear-gradient(90deg,#33cc75 0,#29cfb3 99%)}.ikqb_insertvideo .insertvideo_status_container .chose-cover{box-sizing:border-box;position:absolute;left:20px;bottom:12px;padding:7px 10px;border:1px solid #DDD;border-radius:4px;font-size:12px;color:rgba(51,51,51,.4);line-height:1}.ikqb_insertvideo .insertvideo_status_container .chose-cover .loading{display:inline-block;width:13px;height:13px;margin-right:6px;background:url(https://iknowpc.bdimg.com/static/common/widget/js/logic/ueditor/plugin/insert-video/img/loading.15561d7.png) no-repeat;background-size:cover;vertical-align:middle;animation:loading 1.4s infinite linear;-webkit-animation:loading 1.4s infinite linear;-moz-animation:loading 1.4s infinite linear;-o-animation:loading 1.4s infinite linear;transform:translateZ(0);-webkit-transform:translateZ(0);-moz-transform:translateZ(0);-o-transform:translateZ(0)}.ikqb_insertvideo .insertvideo_status_container .chose-cover .text{vertical-align:middle}@keyframes loading{0%{transform:rotate(0deg);-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg)}100%{transform:rotate(360deg);-webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);-ms-transform:rotate(360deg);-o-transform:rotate(360deg)}}.ikqb_insertvideo .insertvideo_status_container .can-choose{color:#333;cursor:pointer}.ikqb_insertvideo .insertvideo_status_container .can-choose .loading{display:none}.ikqb_insertvideo .insertvideo_playbtn{display:none;position:absolute;top:0;left:0;right:0;bottom:0;margin:auto;width:40px;height:40px;background:url(https://iknowpc.bdimg.com/static/common/widget/js/logic/ueditor/plugin/insert-video/img/playbtn.45b1915.svg) center center no-repeat;background-size:100% 100%}.ikqb_insertvideo .insertvideo_textholder{display:none}",topicHtml=[function(_template_object){var _template_fun_array=[],fn=function(__data__){var _template_varName="";for(var name in __data__)_template_varName+="var "+name+'=__data__["'+name+'"];';eval(_template_varName),_template_fun_array.push('<span class="insertvideo_topic_select_container">    {@if vtopic || topic[mid]}    <span class="insertvideo_topic_select_btn has_selected">        <span class="topic_icon"></span>        <span class="text">{@if vtopic}${vtopic}{@else}${topic[mid]}{@/if}</span>        <span class="arrow"></span>    </span>    {@else}    <span class="insertvideo_topic_select_btn">        <span class="topic_icon"></span>        <span class="text">\u6dfb\u52a0\u8bdd\u9898</span>        <span class="arrow"></span>    </span>    {@/if}    <span class="insertvideo_topic_rec_tip{@if vtopic || topic[mid]} hide{@/if}">        <span class="topic_icon"></span>        <span class="topic">${recommend}</span>        <span class="rec_icon"></span>    </span>    <span class="insertvideo_topic_select_list">        <span class="insertvideo_topic_select_item" data-index="0">            <span class="topic_icon"></span>            <span class="topic">\u4e0d\u6dfb\u52a0\u8bdd\u9898</span>        </span>        <span class="insertvideo_topic_select_item selected" data-index="1">            <span class="topic_icon"></span>            <span class="topic">${recommend}</span>            <span class="rec_icon"></span>        </span>        {@each other as topic, index}            <span class="insertvideo_topic_select_item" data-index="${index + 2}">                <span class="topic_icon"></span>                <span class="topic">${topic}</span>            </span>        {@/each}    </span></span>'),_template_varName=null}(_template_object);return fn=null,_template_fun_array.join("")}][0](),topicStyle=".insertvideo_topic_select_container{display:inline-block;margin-top:14px;line-height:1}.insertvideo_topic_select_container .topic_icon{display:inline-block;width:12px;height:12px;margin-right:2px;background:url(https://iknowpc.bdimg.com/static/common/widget/js/logic/ueditor/plugin/insert-video/img/topic.25e74b6.svg) no-repeat;background-size:cover;vertical-align:middle}.insertvideo_topic_select_container .topic{display:inline-block;vertical-align:middle}.insertvideo_topic_select_container .rec_icon{display:inline-block;width:17px;height:13px;margin-left:3px;background:url(https://iknowpc.bdimg.com/static/common/widget/js/logic/ueditor/plugin/insert-video/img/rec-icon.aca0460.svg) no-repeat;background-size:cover;vertical-align:middle}.insertvideo_topic_select_container .insertvideo_topic_select_btn{display:inline-block;padding:0 12px;height:28px;font-family:PingFangSC-Regular;font-size:12px;color:#333;line-height:24px;border:1px solid #EEE;box-sizing:border-box;cursor:pointer;vertical-align:top;border-radius:14px}.insertvideo_topic_select_container .insertvideo_topic_select_btn .topic_icon{display:none}.insertvideo_topic_select_container .insertvideo_topic_select_btn .text{display:inline-block;line-height:1;vertical-align:middle}.insertvideo_topic_select_container .insertvideo_topic_select_btn .arrow{display:inline-block;width:12px;height:6px;margin-left:6px;background:url(https://iknowpc.bdimg.com/static/common/widget/js/logic/ueditor/plugin/insert-video/img/arrow.fed4937.svg) no-repeat;background-size:cover;transform:rotate(0);-webkit-transform:rotate(0);transition:transform .5s;vertical-align:middle}.insertvideo_topic_select_container .has_selected{background:rgba(0,0,0,.05);border:0;line-height:26px}.insertvideo_topic_select_container .has_selected .topic_icon{display:inline-block}.insertvideo_topic_select_container .has_selected .arrow{display:none}.insertvideo_topic_select_container .insertvideo_topic_rec_tip{display:inline-block;position:relative;height:28px;padding:0 14px;margin-left:7px;font-family:PingFangSC-Regular;font-size:12px;color:#333;line-height:26px;background:rgba(0,0,0,.05);vertical-align:top;cursor:pointer;border-radius:30px}.insertvideo_topic_select_container .insertvideo_topic_rec_tip::before{position:absolute;top:10px;left:-5px;width:6px;height:7px;content:'';background:url(https://iknowpc.bdimg.com/static/common/widget/js/logic/ueditor/plugin/insert-video/img/pop-arrow.610e651.svg) no-repeat;background-size:cover}.insertvideo_topic_select_container .hide{display:none}.insertvideo_topic_select_container .insertvideo_topic_select_list{display:none;position:relative;width:190px;max-height:144px;margin-top:4px;background:#FFF;border:1px solid #EEE;box-shadow:0 2px 7px 0 rgba(0,0,0,.1);overflow-y:scroll;z-index:9;border-radius:8px}.insertvideo_topic_select_container .insertvideo_topic_select_list .insertvideo_topic_select_item{display:block;height:36px;padding:0 12px;font-family:PingFangSC-Regular;font-size:12px;color:#333;letter-spacing:0;line-height:36px;cursor:pointer}.insertvideo_topic_select_container .insertvideo_topic_select_list .insertvideo_topic_select_item:first-child{border-radius:8px 8px 0 0}.insertvideo_topic_select_container .insertvideo_topic_select_list .insertvideo_topic_select_item:first-child .topic_icon{background:url(https://iknowpc.bdimg.com/static/common/widget/js/logic/ueditor/plugin/insert-video/img/ban.0f1af12.svg) no-repeat;background-size:cover}.insertvideo_topic_select_container .insertvideo_topic_select_list .insertvideo_topic_select_item:last-child{border-radius:0 0 8px 8px}.insertvideo_topic_select_container .insertvideo_topic_select_list .insertvideo_topic_select_item:hover{background:#F8F8F9}.insertvideo_topic_select_container .insertvideo_topic_select_list .selected{background:#F8F8F9}.show .insertvideo_topic_select_btn .arrow{transform:rotate(180deg);-webkit-transform:rotate(180deg);transition:transform .5s}.show .insertvideo_topic_rec_tip{display:none}.show .insertvideo_topic_select_list{display:block}",screenShotPanelTpl=[function(_template_object){var _template_fun_array=[],fn=function(__data__){var _template_varName="";for(var name in __data__)_template_varName+="var "+name+'=__data__["'+name+'"];';eval(_template_varName),_template_fun_array.push('<div class="screen-shot-bg screen-shot-bg-${videoId}">    <div class="screen-shot-container {@if vertical}vertical{@/if}">        <div class="insert-video-close">            <span class="close-icon iknow-icons iconfont-close"></span>        </div>        <div class="insert-video-tab">            <div class="tab-item active">\u672c\u5730\u89c6\u9891</div>        </div>        <div class="uploading-cover"></div>        <div>            {@if !ready}            <img src="https://gss0.bdstatic.com/7051cy89RcgCncy6lo7D0j9wexYrbOWh7c50/iknow/pc-answer-video/placeholder.svg"                 height="135" width="135" class="placeholder">            <p class="text-wait">\u63a8\u8350\u5c01\u9762\u751f\u6210\u4e2d\uff0c\u8bf7\u8010\u5fc3\u7b49\u5f85</p>            <p class="text-upload">\u4e0d\u60f3\u7b49\u5f85\uff1f\u53ef\u76f4\u63a5\u63d0\u4ea4\u56de\u7b54\uff0c\u4f7f\u7528\u667a\u80fd\u63a8\u8350\u5c01\u9762</p>            {@else}            <div class="padding-box">                <div class="screenshot-preview vertical" style="background-image: url(${screenshots[0].url})"></div>                <div class="chose-screenshot-text">\u53ef\u9009\u62e9\u4ee5\u4e0b\u5c01\u9762</div>                <div class="chose-screenshot-list">                    <div class="first-img">                        <img id="img-0" height="{@if vertical}100{@else}52{@/if}" width="70"                             src="${screenshots[0].url}">                                            </div>                    <img id="img-1" height="{@if vertical}100{@else}52{@/if}" width="70" src="${screenshots[1].url}">                    <img id="img-2" height="{@if vertical}100{@else}52{@/if}" width="70" src="${screenshots[2].url}">                    <img id="img-3" height="{@if vertical}100{@else}52{@/if}" width="70" src="${screenshots[3].url}">                    <img id="img-4" height="{@if vertical}100{@else}52{@/if}" width="70" src="${screenshots[4].url}">                    <img id="img-5" height="{@if vertical}100{@else}52{@/if}" width="70" src="${screenshots[5].url}">                    <img id="img-6" height="{@if vertical}100{@else}52{@/if}" width="70" src="${screenshots[6].url}">                </div>            </div>            {@/if}            {@if ready}            <div class="titlebgc-choose-box {@if vertical}titlebgc-choose-box-vertical{@/if}">                <p class="titlebgc-title">\u8bbe\u7f6e\u6807\u9898</p>                <div class="test test-1">                    <div class="scrollbar"></div>                </div>                <div class="bgc-box {@if vertical}bgc-box-vertical{@/if}">                    {@each itemList as index}                    <div class="titlebgc-item">                        <div class="item${index} item"></div>                    </div>                    {@/each}                </div>            </div>            {@/if}        </div>        <div class="confirm-btn {@if vertical}vertical{@/if}">\u786e\u5b9a</div>    </div></div>'),_template_varName=null}(_template_object);return fn=null,_template_fun_array.join("")}][0](),checkStatusInterval=2e4,insertVideoClass="ikqb_insertvideo",whiteSpaceClass="ikqb_insertvideo_whitespace",InsertVideo=function(){function e(t,i,a,o){if(_classCallCheck(this,e),t&&i){var n=_tangram2.default(tpl);_tangram2.default("body").append(n),this.$el=n,this.UE=t,this.videoStatus={},this.vtopicData={},this.hasGetTopic=!1,this.midArr=[],this.screenShot=_screenShotEs2.default(),this.picEdit=_picEditEs2.default(),this.ready=!1,this.showChoseBtn=this.screenShot.checkCompatible(),this.hasInit=!1,this.bindEvent();var s=this;t.registerUI(i,function(e,i){e.needCheckVideoBoxStatus=!0,s.editor=e,s.needHttpsAutoTrans=e.getOpt("needHttpsAutoTrans"),e.registerCommand("newinsertvideo",{execCommand:function(){!s.hasInit&&s.initUploadFn(e),s.show(),s.openWebUploader();var t=e.key;if(_tangram2.default("#"+t+" .edui-editor-toolbarbox .edui-for-insertvideo img:last-child").length&&(_tangram2.default("#"+t+" .edui-editor-toolbarbox .edui-for-insertvideo img:last-child").remove(),e.getOpt("insertVideoBtnNeedNewIcon"))){var i='<span class="insertvideobtn-newicon"></span>';_tangram2.default("#"+t+" .edui-editor-toolbarbox .edui-for-insertvideo").append(i)}}});var a=new t.ui.Button({name:i,title:o||i,onclick:function(){if(F.context("user")&&1!==+F.context("user").isLogin)return void _event2.default.fire("login.check",{isLogin:function(){window.location.reload()}});!s.hasInit&&s.initUploadFn(e),s.show();var t=e.key,i=_tangram2.default("#"+t+" .edui-editor-toolbarbox .edui-for-insertvideo img:last-child");if(i.length&&(i.remove(),e.getOpt("insertVideoBtnNeedNewIcon"))){var a='<span class="insertvideobtn-newicon"></span>';_tangram2.default("#"+t+" .edui-editor-toolbarbox .edui-for-insertvideo").append(a)}}});return e.addListener("ready",function(){if(e.getOpt("showVideoGif")){var t='<img class="gif" height="72" width="157" src="https://gss0.bdstatic.com/7051cy89RcgCncy6lo7D0j9wexYrbOWh7c50/iknow/answer-video/PCask-1.gif">',i=e.key;_tangram2.default("#"+i+" .edui-editor-toolbarbox .edui-for-insertvideo").append(t),setTimeout(function(){if(_tangram2.default("#"+i+" .edui-editor-toolbarbox .edui-for-insertvideo img:last-child").remove(),e.getOpt("insertVideoBtnNeedNewIcon")){var t='<span class="insertvideobtn-newicon"></span>';_tangram2.default("#"+i+" .edui-editor-toolbarbox .edui-for-insertvideo").append(t)}},4600)}else if(e.getOpt("insertVideoBtnNeedNewIcon")){var a='<span class="insertvideobtn-newicon"></span>',o=e.key;_tangram2.default("#"+o+" .edui-editor-toolbarbox .edui-for-insertvideo").append(a)}var n=e.getOpt("getCountRule");n=n instanceof Array?n:[],n.push(function(e,t){if(t){var i=_tangram2.default(this.document.body).find("."+insertVideoClass);i.each(function(){var t=_tangram2.default(this),i=t.text().length;e=e-i+1})}return e}),e.setOpt("getCountRule",n),_tangram2.default(e.document.head).append('<style type="text/css">'+progressStyle+"</style>"),_tangram2.default(e.document.head).append('<style type="text/css">'+topicStyle+"</style>"),setTimeout(function(){var t=_tangram2.default(e.document.body),i=t.find("."+insertVideoClass);i.each(function(){var e=_tangram2.default(this),t=_webuploader2.default.guid("ikqb_insertvideo_");e.attr("id",t);var i=e.data("vtopic");s.getTopicList(t,i,e.data("mid")),e.find(".insertvideo_playbtn").show(),e.data("mid")&&!e.data("duration")&&(e.find(".insertvideo_progress_status").text("\u89c6\u9891\u8f6c\u7801\u4e2d"),e.find(".insertvideo_progress_size").text("\u53ef\u76f4\u63a5\u63d0\u4ea4\u56de\u7b54, \u65e0\u9700\u7b49\u5f85"),e.find(".insertvideo_cover_container").removeClass("finished"),e.find(".insertvideo_cover").css({background:"#F2F2F2"}),e.find(".chose-cover").removeClass("can-choose"),s.checkStatus({mediaId:e.data("mid"),$el:e,uniqueId:t}))})},500)}),e.addListener("selectionchange",function(){var t=e.queryCommandState(i);-1===t?(a.setDisabled(!0),a.setChecked(!1)):(a.setDisabled(!1),a.setChecked(t))}),e.addListener("destroy",function(){s.$el.remove()}),e.addListener("contentchange",function(){var t=_tangram2.default(e.document.body).find("."+insertVideoClass);e.videos&&e.videos.length&&e.videos.map(function(e){!e.duration||document.getElementById("video-"+e.mediaId)||!s.showChoseBtn||s.videoStatus[e.mediaId]&&s.videoStatus[e.mediaId].screenShots||s.initScreenshots(e,!1)}),t.each(function(){var e=_tangram2.default(this),t=e.prev(),i=e.find(".chose-cover")[0],a=i&&i.id||"";s.midArr.push(a),!a||i.hasClickEvent||s.videoStatus[a]&&s.videoStatus[a].hasEvent||(i.hasClickEvent=!0,s.videoStatus[a]?s.videoStatus[a].hasEvent=!0:s.videoStatus[a]={hasEvent:!0}),(!t.size()||t.hasClass(insertVideoClass))&&(e.before('<p class="'+whiteSpaceClass+'"></br></p>'),e.after('<p class="'+whiteSpaceClass+'"></br></p>'))})}),e.addInputRule(function(e){var i=e.getNodesByTagName("vvideo");t.utils.each(i,function(i){var a=i.getAttr("mid")||"",o=i.getAttr("img")||"",n=i.getAttr("duration")||"",r=parseInt(i.getAttr("width"),10)||0,d=parseInt(i.getAttr("height"),10)||0,c=i.getAttr("vtopic")||"",l={finish:!0,id:"",mediaId:a,postUrl:o,coverWidth:150,width:r,coverHeight:150*d/r,height:d,oriDuration:n?n:"",vtopic:c,ready:s.ready,duration:n?s.formateTime(n):!1,showChoseBtn:s.showChoseBtn},p=new t.uNode({type:"element",tagName:"p"});p.innerHTML(_juicer2.default(progressHtml,l));var u=p.firstChild(),v=t.dom.domUtils.findParent(i,function(e){return"p"===e.tagName});e.replaceChild(u,v?v:i)})}),e.addOutputRule(function(e){var i=e.getNodesByTagName("p");t.utils.each(i,function(i){var a=i.getAttr("class");if(a===insertVideoClass){var o=i.previousSibling(),n=i.nextSibling();o&&o.getAttr("class")===whiteSpaceClass&&o.children&&1===o.children.length&&"br"===o.children[0].tagName&&e.removeChild(o),n&&n.getAttr("class")===whiteSpaceClass&&n.children&&1===n.children.length&&"br"===n.children[0].tagName&&e.removeChild(n);var r=i.getAttr("data-mid");if(r){var d=s.videoStatus[r]&&s.videoStatus[r].cover||i.getAttr("data-post"),c=i.getAttr("data-duration")||"",l=i.getAttr("data-width")||"",p=i.getAttr("data-height")||"",u=i.getAttr("data-vtopic")||"",v=new t.uNode({type:"element",tagName:"p"});v.innerHTML('<vvideo mid="'+r+'" img="'+d+'" duration="'+c+'" width="'+l+'" height="'+p+'" vtopic="'+u+'" ></vvideo>'),e.replaceChild(v,i)}else e.removeChild(i)}})}),_tangram2.default(window).bind("beforeunload",function(){return e.checkEditor({onlyCheckUploadingVideo:!0})?"\u8fd8\u6709\u89c6\u9891\u672a\u4e0a\u4f20\u5b8c\u6210\uff0c\u786e\u8ba4\u79bb\u5f00\u4e48\uff1f":void 0}),a},[a])}}return _createClass(e,[{key:"bindTopicBtn",value:function(e){var t=this;e.on("click",".insertvideo_topic_select_btn",function(){var e=_tangram2.default(this).parent();e.hasClass("show")?e.removeClass("show"):e.addClass("show")}).on("click",".insertvideo_topic_select_item",function(){var i=_tangram2.default(this).parent(),a=_tangram2.default(this).data("index");i.parent().removeClass("show"),t.topic=0===a?"":_tangram2.default(this).find(".topic").text(),e.find(".insertvideo_topic_select_btn").addClass("has_selected"),e.find(".insertvideo_topic_select_btn .text").text(""===t.topic?"\u6dfb\u52a0\u8bdd\u9898":t.topic),e.attr("data-vtopic",t.topic),t.editor.fireEvent("contentchange"),0===a?(e.find(".insertvideo_topic_select_btn").removeClass("has_selected"),e.find(".insertvideo_topic_rec_tip").css({display:"inline-block"})):(i.find(".selected").removeClass("selected"),_tangram2.default(this).addClass("selected"),e.find(".insertvideo_topic_rec_tip").hide())}).on("click",".insertvideo_topic_rec_tip",function(){t.topic=_tangram2.default(this).find(".topic").text(),e.find(".insertvideo_topic_select_btn").addClass("has_selected"),e.find(".insertvideo_topic_select_btn .text").text(t.topic),_tangram2.default(this).hide(),e.attr("data-vtopic",t.topic),t.editor.fireEvent("contentchange")})}},{key:"getTopicList",value:function(e,t,i){var a=this;return this.hasGetTopic?void this.renderTopic(e,t):void(this.editor.extraParam&&this.editor.extraParam.qid&&""!==this.editor.extraParam.qid&&_tangram2.default.ajax({url:"/video/ajax/getvideotopic",method:"POST",data:{qid:this.editor.extraParam.qid,mid:this.midArr},success:function(o){o&&0===o.errno&&o.data&&o.data.recommend.length&&(a.vtopicData=o.data,a.renderTopic(e,t,i),a.hasGetTopic=!0)},fail:function(){}}))}},{key:"renderTopic",value:function(e,t,i){if(this.vtopicData&&this.vtopicData.recommend&&this.vtopicData.recommend.length){var a=_tangram2.default(this.editor.document).find("#"+e),o=this.vtopicData;o.vtopic=t,o.mid=i;var n=_juicer2.default(topicHtml,o);a.find(".insertvideo_progress_rate").after(n),this.bindTopicBtn(a)}}},{key:"chooseCoverEvent",value:function(e){var t=this;e.find(".can-choose").on("click",function(){var e=_tangram2.default(this).attr("id");t.screenShotPanel(e)})}},{key:"screenShotPanel",value:function(e){function t(){_tangram2.default(".chose-screenshot-list").on("click","img",function(){"none"===_tangram2.default(".uploading-cover").css("display")&&(n&&_tangram2.default(n).css("border","2px solid transparent"),n=this,_tangram2.default(this).css("border","2px solid #33cc75"),s=+this.id[4],_tangram2.default(".screenshot-preview").css("background-image","url("+this.src+")"),o.isVertical&&_tangram2.default(".vertical-box").css("backgroundImage","url('"+this.src+"')"))})}var i=this,a=this,o=a.videoStatus[e],n=null,s=0;if(!_tangram2.default(".screen-shot-bg-"+e).length){a.ready=a.videoStatus[e].screenShots&&a.videoStatus[e].screenShots.length;var r=[1,3,4,5,6,7];if(_tangram2.default(document.body).append(_juicer2.default(screenShotPanelTpl,{vertical:a.videoStatus[e].isVertical,screenshots:a.videoStatus[e].screenShots,ready:a.ready,itemList:r,videoId:e})),_tangram2.default(".screen-shot-bg-"+e+" .screen-shot-container .insert-video-close").on("click",function(){document.body.style.overflowY="auto",_tangram2.default(".screen-shot-bg-"+e).remove()}),_tangram2.default(".confirm-btn").on("click",function(){if(n){if(!a.picEdit.checkTitle())return _popTip2.default("\u5c01\u9762\u6807\u9898\u8fd8\u6ca1\u7f16\u8f91\u5b8c\u54e6\uff0c\u8bf7\u7ee7\u7eed\u7f16\u8f91\u6216\u5220\u9664\u6807\u9898\uff5e");_tangram2.default(".screen-shot-container .uploading-cover").show(),_tangram2.default(".confirm-btn").html('<div class="uploading"></div>\u4fdd\u5b58\u4e2d'),a.picEdit.toBlob(a.videoStatus[e].isVertical).then(function(t){var i=new FormData;i.append("cm",100672),i.append("type","image/png"),i.append("image",t),a.sendScreenShot(i,e,s,a.videoStatus[e].isVertical)})}else _tangram2.default(".screen-shot-bg-"+e).remove()}),a.ready)document.body.style.overflowY="hidden",t(),n=_tangram2.default("#img-0"),a.picEdit.bindEvent(a.videoStatus[e]),a.picEdit.createVerticalBox(a.videoStatus[e]);else var d=setInterval(function(){if(a.ready=a.videoStatus[e].screenShots&&a.videoStatus[e].screenShots.length,a.ready){clearInterval(d);var t=_tangram2.default(".screen-shot-bg-"+e);t.length&&(t.remove(),setTimeout(function(){i.screenShotPanel(e)},300))}},1e3)}}},{key:"changeCover",value:function(e,t,i,a){i+="&title="+(_tangram2.default(".textarea").val()||""),i=i.replace(/\n/g,"/n"),i=i.split(" ").join(""),i=i.split('"').join(""),i=i.split("'").join(""),this.videoStatus[e].cover=i;var o=_tangram2.default(this.editor.document).find("#"+e).parents(".ikqb_insertvideo"),n=o.find(".insertvideo_cover");n.css("background","#191B1D url("+i+") center center no-repeat"),a?n.css("background-size","auto 100%"):n.css("background-size","100% auto"),o.attr("data-post",i),_tangram2.default(".screen-shot-bg-"+e).remove(),document.body.style.overflowY="auto",this.editor.fireEvent("contentchange")}},{key:"sendScreenShot",value:function(e,t,i,a){var o=this;_tangram2.default.ajax({url:"/submit/ajax",method:"POST",data:e,processData:!1,contentType:!1,success:function(n){if(n=JSON.parse(n),n&&"0"===n.errorNo){var s=o.picEdit.editUrlParams(n.url,o.videoStatus[t]);o.changeCover(t,i,s,a)}else o.sendScreenShot(e,t,i,a)},fail:function(){o.sendScreenShot(e,t,i,a)}})}},{key:"screenshotMultiple",value:function(e,t,i){var a=this,o=this;this.screenShot.videoScreenshot(e,t,function(e,t){if(!e&&(a.videoStatus[i].screenShots=t.map(function(e){return{blob:e.blob,url:URL.createObjectURL(e.blob)}}),a.videoStatus[i].screenShots.length)){a.ready=!0;var n=_tangram2.default(a.editor.document.body).find("."+insertVideoClass);n.each(function(e,t){var a=_tangram2.default(t),n=a.data("mid");n===i&&(a.find(".chose-cover").addClass("can-choose"),o.chooseCoverEvent(a))})}})}},{key:"rand",value:function(e,t){return Math.floor(Math.random()*(t-e+1)+e)}},{key:"screenshotRandomMultiple",value:function(e,t){for(var i=[],a=e.duration>30?30:e.duration;i.length<8;){var o=this.rand(0,Math.round(a));1===i.length?i.push(0):8>=a?i.push(o):-1===i.indexOf(o)&&i.push(o)}this.screenshotMultiple(e,i,t)}},{key:"initScreenshots",value:function(e,t){var i=this;if(this.showChoseBtn){var a=document.createElement("video");a.setAttribute("preload","auto"),a.muted=!0,a.id="video-"+e.mediaId,a.width=0,a.height=0,!t&&(a.crossOrigin="Anonymous"),a.src=t?URL.createObjectURL(e.source.source):e.url,a.onloadedmetadata=function(){if(i.videoStatus[e.mediaId]){i.videoStatus[e.mediaId].isVertical=a.videoHeight>a.videoWidth;
var o=a.videoWidth/a.videoHeight;i.videoStatus[e.mediaId].width=(317*o).toFixed(1),i.videoStatus[e.mediaId].height=317}else i.videoStatus[e.mediaId]={isVertical:a.videoHeight>a.videoWidth};i.screenshotRandomMultiple(a,e.mediaId),!i.editor.videos&&t&&(i.editor.videos=[{mediaId:e.mediaId,url:a.src}],i.editor.fireEvent("contentchange"))}}}},{key:"stopScroll",value:function(e){var t=_tangram2.default(e.target);t.hasClass("content-list")||t.hasClass("list-col")||t.hasClass("list-col")||t.hasClass("img-item")||e.preventDefault()}},{key:"openWebUploader",value:function(){var e=this;setTimeout(function(){e.$el.find(".webuploader-container input")[0].click()},200)}},{key:"show",value:function(){try{window.addEventListener("mousewheel",this.stopScroll,{passive:!1}),window.addEventListener("DOMMouseScroll",this.stopScroll,{passive:!1})}catch(e){}this.$el.show()}},{key:"hide",value:function(){try{window.removeEventListener("mousewheel",this.stopScroll),window.removeEventListener("DOMMouseScroll",this.stopScroll)}catch(e){}this.$el.hide()}},{key:"bindEvent",value:function(){var e=this;this.$el.on("click",".insert-video-close",function(){document.body.style.overflowY="auto",e.hide()})}},{key:"formateTime",value:function(e){if(e=Number(e),!e||"number"!=typeof e)return"00:00";var t=Math.floor(e/60);t=t>=10?t:"0"+t;var i=e%60;return i=i>=10?i:"0"+i,t+":"+i}},{key:"formateSize",value:function(e){return e=Number(e),e?100*(e/1048576).toFixed(2)/100+"M":"0M"}},{key:"checkStatus",value:function(e){var t=this,i=this;_tangram2.default.ajax({url:"/video/ajax/processmedia?mediaId="+e.mediaId,type:"GET",dataType:"json",timeout:3e4,success:function(a){if(_tangram2.default("#"+t.editor.container.id).size()){var o=_tangram2.default(t.editor.document).find("#"+e.uniqueId);if(o.size()){if(t.editor.videoStatus=t.editor.videoStatus||{},t.editor.videoStatus[""+e.mediaId]=a.data.status,0===a.errno&&a.data&&"PUBLISHED"===a.data.status){var n=o.data("vtopic"),s=a.data.meta.durationInSeconds||0,r=a.data.thumbnailList[0];r=t.videoStatus[e.mediaId]&&t.videoStatus[e.mediaId].cover||(t.needHttpsAutoTrans?_https2.default.autoTrans(r):r);var d=a.data.playableUrlList[0],c=d.meta&&d.meta.widthInPixel||150,l=d.meta&&d.meta.heightInPixel||200,p={finish:!0,id:e.uniqueId,mediaId:e.mediaId,postUrl:r,coverWidth:150,width:c,coverHeight:150*l/c,height:l,oriDuration:s,vtopic:n,ready:t.ready,duration:t.formateTime(s),showChoseBtn:t.showChoseBtn},u=_juicer2.default(progressHtml,p);o.replaceWith(u),t.renderTopic(e.uniqueId,n),e.url=a.data.playableUrlList[3].url,t.videoStatus[e.mediaId]&&(t.videoStatus[e.mediaId].hasEvent=!1),t.videoStatus[e.mediaId]&&t.videoStatus[e.mediaId].screenShots||t.initScreenshots(e,!1);var v=_tangram2.default(t.editor.document).find("#"+e.uniqueId);return v.find(".insertvideo_playbtn").show(),i.chooseCoverEvent(v),void t.editor.fireEvent("contentchange")}0===a.errno&&a.data&&"RUNNING"===a.data.status&&(o.find(".insertvideo_progress_status").text("\u89c6\u9891\u8f6c\u7801\u4e2d"),o.find(".insertvideo_progress_size").text("\u53ef\u76f4\u63a5\u63d0\u4ea4\u56de\u7b54, \u65e0\u9700\u7b49\u5f85"),o.find(".insertvideo_playbtn").show()),t.pollingCheck(e)}}},fail:function(){var i=e.$el?e.$el:_tangram2.default(t.editor.document).find("#"+e.uniqueId);i.size()&&t.pollingCheck(e)}})}},{key:"pollingCheck",value:function(e){var t=this;setTimeout(function(){t.checkStatus(e)},checkStatusInterval)}},{key:"initUploadFn",value:function(e){this.hasInit=!0;var t=(this.UE,this),i=e.getOpt("videoMaxSize")||2147483648,a=_webuploader2.default.create({auto:!1,swf:"/static/swf/webuploader.swf",pick:{id:t.$el.find(".local-upload-btn")[0],multiple:!1},fileVal:"file",accept:{title:"Video",mimeTypes:"video/*,video/x-flv,video/mp4"},duplicate:!0});a.on("beforeFileQueued",function(e){return e.size>i?(_popTip2.default("\u89c6\u9891\u6587\u4ef6\u5927\u5c0f\u9700\u5c0f\u4e8e2G~"),!1):void t.hide()}),a.on("fileQueued",function(i){_tangram2.default.ajax({url:"/video/ajax/applymedia?t="+ +new Date,type:"GET",dataType:"json",timeout:3e4,success:function(o){if(0===o.errno&&o.data&&o.data.accessKey&&o.data.key&&o.data.policy&&o.data.signature&&o.data.sourceBucket&&o.data.host){var n=o.data,s=n.accessKey,r=n.key,d=n.policy,c=n.signature,l=n.sourceBucket,p=n.host,u=n.mediaId;a.option("server","https://"+l+"."+p),a.option("formData",{accessKey:s,key:r,policy:d,signature:c}),i.mediaId=u,i.uniqueId=_webuploader2.default.guid("ikqb_insertvideo_"),!document.getElementById("video-"+u)&&t.showChoseBtn&&t.initScreenshots(i,!0),a.upload(i);var v={id:i.uniqueId,size:t.formateSize(i.size),mediaId:u,coverWidth:150,coverHeight:200,showChoseBtn:t.showChoseBtn};e.execCommand("inserthtml",_juicer2.default(progressHtml,v).replace(/\s+(?=\<)/g,""),!0),t.getTopicList(i.uniqueId),e.fireEvent("contentchange")}else 10001===o.errno?_popTip2.default("\u8bf7\u5148\u767b\u5f55\u540e\u518d\u4e0a\u4f20\u89c6\u9891\u54e6~",{duration:3e3}):_popTip2.default("\u89c6\u9891\u4e0a\u4f20\u5931\u8d25\uff0c\u8bf7\u91cd\u8bd5~")},fail:function(){_popTip2.default("\u89c6\u9891\u4e0a\u4f20\u5931\u8d25\uff0c\u8bf7\u91cd\u8bd5~")}})}),a.on("uploadProgress",function(i,a){var o=_tangram2.default(e.document).find("#"+i.uniqueId);o.size()&&(o.find(".insertvideo_progress_size").text("\u5df2\u4e0a\u4f20 "+t.formateSize(i.size*a)+"/"+t.formateSize(i.size)),o.find(".insertvideo_progress_bar").css("width",100*a+"%"))}),a.on("uploadError",function(t){var i=_tangram2.default(e.document).find("#"+t.uniqueId);if(i.size()){var a=_dialog2.default.confirm("\u89c6\u9891\u4e0a\u4f20\u5931\u8d25\uff0c\u8bf7\u91cd\u8bd5~",{buttons:[{text:"\u786e\u5b9a",click:function(){a.close()}}]});i.remove(),e.fireEvent("contentchange")}}),a.on("uploadSuccess",function(i){var a=_tangram2.default(e.document).find("#"+i.uniqueId);a.size()&&(a.attr("data-mid",i.mediaId),e.fireEvent("contentchange"),e.videoStatus=e.videoStatus||{},e.videoStatus[""+i.mediaId]="PENDING"),t.checkStatus(i)})}}]),e}();exports.default=InsertVideo});
;/*!common:widget/js/logic/ueditor/plugin/insertBaiduYun/insertBaiduYun.es.js*/
define("common:widget/js/logic/ueditor/plugin/insertBaiduYun/insertBaiduYun.es",function(require,exports,module){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),_tangram=require("common:widget/js/util/tangram/tangram"),_tangram2=_interopRequireDefault(_tangram),_popTip=require("common:widget/js/ui/pop-tip/pop-tip"),_popTip2=_interopRequireDefault(_popTip),_log=require("common:widget/js/util/log/log"),_log2=_interopRequireDefault(_log),_event=require("common:widget/js/util/event/event"),_event2=_interopRequireDefault(_event),_juicer=require("common:widget/lib/juicer/juicer"),_juicer2=_interopRequireDefault(_juicer),showYunTip=!1,showYunTipTimer=null,yunBoxListener=!1,yunBoxHtml=[function(_template_object){var _template_fun_array=[],fn=function(__data__){var _template_varName="";for(var name in __data__)_template_varName+="var "+name+'=__data__["'+name+'"];';eval(_template_varName),_template_fun_array.push('<a class="insert-yun-content" contenteditable="false" ref="noopener noreferrer" target="_blank">    <span class="insert-yun-content-info">        <span id="insert-yun-close" class="insert-yun-close"></span>        <span class="insert-yun-filelogo"></span>        <span class="insert-yun-filetitle"><span class="file-title">${title}</span>{@if number > 1}<span class="file-number">\u7b49${number}\u4e2a\u6587\u4ef6</span>{@/if}</span>        <span class="insert-yun-filedesc">            <span class="insert-yun-filesize">${size}</span>            <span>\u6765\u81ea:\u767e\u5ea6\u7f51\u76d8</span>        </span>    </span>    <span class="insert-yun-content-code">        <span class="insert-yun-code {@if !code}insert-yun-no-code{@/if}">            {@if code}<span class="code-info">\u63d0\u53d6\u7801:&nbsp;${code}</span>{@/if}            <span class="code-btn">{@if code}\u590d\u5236\u63d0\u53d6\u7801\u8df3\u8f6c{@else}\u70b9\u51fb\u8df3\u8f6c\u7f51\u76d8{@/if}</span>        </span>    </span></a>'),_template_varName=null}(_template_object);return fn=null,_template_fun_array.join("")}][0](),yunBoxStyle=".insert-yun-content{display:block;position:relative;min-width:510px;max-width:510px;border-radius:4px;text-decoration:none;border:1px solid #EEE}.insert-yun-content .insert-yun-close{display:none;position:absolute;right:-7px;top:-8px;width:20px;height:20px;background-image:url(https://iknowpc.bdimg.com/static/common/widget/js/logic/ueditor/plugin/insertBaiduYun/img/close.c3cb67d.png);background-repeat:no-repeat;background-size:cover;background-position:center center}.insert-yun-content:hover{cursor:pointer}.insert-yun-content:hover .insert-yun-close{display:block}.insert-yun-content .insert-yun-content-info{display:inline-block;width:100%;box-sizing:border-box;padding:14px 12px 14px 56px}.insert-yun-content .insert-yun-content-info .insert-yun-filelogo{display:inline-block;position:absolute;top:12px;left:12px;width:36px;height:36px;background-image:url(https://gss0.bdstatic.com/7051cy89RcgCncy6lo7D0j9wexYrbOWh7c50/yun-file-logo/yun-logo.png);background-position:center center;background-repeat:no-repeat;background-size:cover}.insert-yun-content .insert-yun-content-info .insert-yun-filetitle{display:flex;line-height:1;font-size:14px;font-family:PingFangSC-Regular;color:#000;text-align:left;margin:0}.insert-yun-content .insert-yun-content-info .insert-yun-filetitle .file-title{width:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.insert-yun-content .insert-yun-content-info .insert-yun-filetitle .file-number{max-width:65px;min-width:65px}.insert-yun-content .insert-yun-content-info .insert-yun-filedesc{display:block;margin-top:8px;font-size:12px;line-height:1;color:#999;text-align:left}.insert-yun-content .insert-yun-content-info .insert-yun-filedesc .insert-yun-filesize{margin-right:20px}.insert-yun-content .insert-yun-content-code{display:block;width:100%;box-sizing:border-box;padding:9px 12px;border-top:1px solid #EEE}.insert-yun-content .insert-yun-content-code .insert-yun-code{display:flex;justify-content:space-between;align-items:center;line-height:1}.insert-yun-content .insert-yun-content-code .insert-yun-code .code-info{font-family:PingFangSC-Regular;font-size:12px;color:#999}.insert-yun-content .insert-yun-content-code .insert-yun-code .code-btn{display:block;height:24px;font-family:PingFangSC-Regular;font-size:12px;color:#33CC75;line-height:24px;padding:0 9px;border:1px solid #33CC75;border-radius:14px}.insert-yun-content .insert-yun-content-code .insert-yun-no-code{flex-direction:row-reverse}",tpl=[function(_template_object){var _template_fun_array=[],fn=function(__data__){var _template_varName="";for(var name in __data__)_template_varName+="var "+name+'=__data__["'+name+'"];';eval(_template_varName),_template_fun_array.push('<div class="ueditor-insert-yun">        <div class="insert-yun-mask"></div>        <div class="insert-yun-dialog">        <iframe style="width:100%;height:100%;"            frameborder="0"            id="baiduyun" name="baiduyun"             src="https://pan.baidu.com/disk/file-selector#style-version=1&need-share=1&dir-nochecked=1&hide-upload=1&third-type=1003&secret=697858e1&from=zhidao&header-title=\u6dfb\u52a0\u6211\u7684\u7f51\u76d8\u6587\u4ef6"></iframe>    </div></div>'),_template_varName=null}(_template_object);return fn=null,_template_fun_array.join("")}][0](),whiteSpaceClass="ikqb-insertyun-whitespace",yunBoxClass="ikqb-yun-box",InsertBaiduYun=function(){function e(t,n,a,i){if(_classCallCheck(this,e),t&&n){var r=_tangram2.default(tpl);_tangram2.default("body").append(r),this.$el=r,this.UE=t,this.bindEvent();var s=this;t.registerUI(n,function(e,n){s.editor=e;var a=new t.ui.Button({name:n,title:i||n,onclick:function(){_log2.default.send({module:"common",page:"question",area:"editor-button",action:"click"}),1===+F.context("user").isLogin?s.show():_event2.default.fire("login.check",{isLogin:function(){window.location.reload()}})}});return e.addListener("ready",function(){var t=e.key;if(e.getOpt("insertBaiduYunBtnNeedNewIcon")){var n='<span class="insertbaiduyunbtn-newicon"></span>';_tangram2.default("#"+t+" .edui-editor-toolbarbox .edui-for-uploadbaiduyun").append(n)}var a=e.getOpt("getCountRule");a=a instanceof Array?a:[],a.push(function(e,t){if(t){var n=_tangram2.default(this.document.body).find("."+yunBoxClass);n.each(function(){var t=_tangram2.default(this),n=t.text().length;e-=n})}return e}),_tangram2.default(e.document.head).append('<style type="text/css">'+yunBoxStyle+"</style>"),_tangram2.default(e.body).on("click","#insert-yun-close",function(e){var t=_tangram2.default(e.target);t.parents(".ikqb-yun-box").remove(),s.editor.fireEvent("contentchange"),s.editor.fireEvent("saveScene")})}),e.addInputRule(function(e){var n=e.getNodesByTagName("baiduyun");t.utils.each(n,function(n){var a=n.getAttr("class");if(a===yunBoxClass){var i=n.getAttr("data_title"),r=n.getAttr("data_size"),s=n.getAttr("data_number"),o=n.getAttr("data_sharelink"),l=n.getAttr("data_code")||"",u={title:i,size:r,number:s,sharelink:o,code:l},d=new t.uNode({type:"element",tagName:"p",attrs:{"class":yunBoxClass,"data-yun-title":u.title,"data-yun-size":u.size,"data-yun-number":u.number,"data-yun-sharelink":u.sharelink,"data-yun-code":u.code}});d.innerHTML(_juicer2.default(yunBoxHtml,u).replace(/\s+(?=\<)/g,"")),d.insertAfter('<p class="'+whiteSpaceClass+'"></br></p>');var c=t.dom.domUtils.findParent(n,function(e){return"p"===e.tagName});e.replaceChild(d,c?c:n)}})}),e.addOutputRule(function(e){var n=e.getNodesByTagName("p");t.utils.each(n,function(n){var a=n.getAttr("class");if(a===whiteSpaceClass&&n.children.length<1&&e.removeChild(n),a===yunBoxClass){var i=n.getAttr("data-yun-title"),r=n.getAttr("data-yun-size"),s="https://gss0.bdstatic.com/7051cy89RcgCncy6lo7D0j9wexYrbOWh7c50/yun-file-logo/yun-logo.png",o=n.getAttr("data-yun-number"),l=n.getAttr("data-yun-sharelink"),u=n.getAttr("data-yun-code")||"";if(l){var d=new t.uNode({type:"element",tagName:"p",attrs:{"class":yunBoxClass}});d.innerHTML('<baiduyun class="'+yunBoxClass+'" data_title="'+i+'" data_size="'+r+'" data_filelogo="'+s+'" data_number="'+o+'" data_sharelink="'+l+'" data_code="'+u+'"></baiduyun>'),e.replaceChild(d,n)}else e.removeChild(n)}})}),e.addListener("contentchange",function(){if(!showYunTip){var t=e.getEditorContent();if(t.indexOf("pan.baidu.com")>0){showYunTip=!0;var n='<span class="insertbaiduyunbtn-tip"><span class="arrow arrow1"></span><span class="arrow arrow2"></span><span class="tip-bg"></span>\u8bd5\u8bd5\u7f51\u76d8\u8d44\u6e90\u5206\u4eab\u65b0\u529f\u80fd\u5427!</span>',a=e.key;_tangram2.default("#"+a+" .edui-editor-toolbarbox .edui-for-uploadbaiduyun").append(n),showYunTipTimer=setTimeout(function(){_tangram2.default(".insertbaiduyunbtn-tip").remove(),showYunTipTimer&&clearTimeout(showYunTipTimer)},2e3)}}var i=_tangram2.default(e.document.body).find("."+yunBoxClass);i.each(function(){var e=_tangram2.default(this),t=e.prev();t.hasClass(yunBoxClass)&&e.before('<p class="'+whiteSpaceClass+'"></br></p>')}),_tangram2.default(e.document.body)&&_tangram2.default(e.document.body).children()&&_tangram2.default(e.document.body).children().last()&&_tangram2.default(e.document.body).children().last().hasClass(yunBoxClass)&&_tangram2.default(e.document.body).children().last().after('<p class="'+whiteSpaceClass+'"></br></p>')}),e.addListener("destroy",function(){showYunTipTimer&&clearTimeout(showYunTipTimer),s.$el.remove()}),a},[a])}}return _createClass(e,[{key:"initPostMessage",value:function(e){e&&e.data||_popTip2.default("\u9009\u62e9\u767e\u5ea6\u7f51\u76d8\u6587\u4ef6\u5931\u8d25\uff0c\u8bf7\u91cd\u8bd5~");var t=this;if(yunBoxListener=!0,e&&"https://pan.baidu.com"===e.origin&&"string"==typeof e.data){var n=JSON.parse(e.data);switch(n.eventName){case"Close":t.hide();break;case"SubmitAndClose":var a=n.param.list[0],i=n.param.list.reduce(function(e,t){return e+t.size},0),r=n.param.list.length,s={title:a.server_filename,size:t.formateSize(i),source:"\u6765\u81ea\uff1a\u767e\u5ea6\u7f51\u76d8",number:r.toString(),sharelink:n.param.link},o=new UE.uNode({type:"element",tagName:"p",attrs:{"class":yunBoxClass,"data-yun-title":s.title,"data-yun-size":s.size,"data-yun-number":s.number,"data-yun-sharelink":s.sharelink}});o.innerHTML(_juicer2.default(yunBoxHtml,s).replace(/\s+(?=\<)/g,"")),o.insertAfter('<p class="'+whiteSpaceClass+'"></br></p>'),t.editor.execCommand("inserthtml",o.toHtml(),!0),t.hide(),_log2.default.send({module:"common",page:"question",area:"yun-file-success",action:"pv"});break;case"Ready":break;default:t.hide()}}}},{key:"stopScroll",value:function(e){var t=_tangram2.default(e.target);t.hasClass("content-list")||t.hasClass("list-col")||t.hasClass("list-col")||t.hasClass("c")||e.preventDefault()}},{key:"show",value:function(){try{window.addEventListener("mousewheel",this.stopScroll,{passive:!1}),window.addEventListener("DOMMouseScroll",this.stopScroll,{passive:!1}),!yunBoxListener&&window.addEventListener("message",this.initPostMessage.bind(this),!1)}catch(e){}_tangram2.default("body").css("overflow","hidden"),this.$el.show()}},{key:"hide",value:function(){try{window.removeEventListener("mousewheel",this.stopScroll),window.removeEventListener("DOMMouseScroll",this.stopScroll)}catch(e){}_tangram2.default("body").css("overflow",""),this.$el.hide()}},{key:"bindEvent",value:function(){var e=this;this.$el.on("click",".insert-yun-mask",function(){e.hide()})}},{key:"formateSize",value:function(e){if(e=Number(e),!e)return"0M";if(1048576>e){var t=e/1024;return t=t.toFixed(2),t+"K"}if(1073741824>e){var n=e/1048576;return n=n.toFixed(2),n+"M"}if(1099511627776>e){var a=e/1073741824;return a=a.toFixed(2),a+"G"}var i=e/1099511627776;return i=i.toFixed(2),i+"T"}}]),e}();exports.default=InsertBaiduYun});
;/*!common:widget/js/logic/ueditor/plugin/insertImage/insertImage.es.js*/
define("common:widget/js/logic/ueditor/plugin/insertImage/insertImage.es",function(require,exports,module){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function _classCallCheck(e,i){if(!(e instanceof i))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,i){for(var t=0;t<i.length;t++){var a=i[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(i,t,a){return t&&e(i.prototype,t),a&&e(i,a),i}}(),_tangram=require("common:widget/js/util/tangram/tangram"),_tangram2=_interopRequireDefault(_tangram),_event=require("common:widget/js/util/event/event"),_event2=_interopRequireDefault(_event),_https=require("common:widget/js/util/https/https"),_https2=_interopRequireDefault(_https),_popTip=require("common:widget/js/ui/pop-tip/pop-tip"),_popTip2=_interopRequireDefault(_popTip),_webuploader=require("common:widget/js/util/webuploader/webuploader"),_webuploader2=_interopRequireDefault(_webuploader),tpl=[function(_template_object){var _template_fun_array=[],fn=function(__data__){var _template_varName="";for(var name in __data__)_template_varName+="var "+name+'=__data__["'+name+'"];';eval(_template_varName),_template_fun_array.push('<div class="ueditor-new-insert-image">        <div class="insert-image-mask"></div>        <div class="insert-image-dialog">                <div class="insert-image-close">            <span class="close-icon iknow-icons iconfont-close"></span>        </div>                <div class="insert-image-tab">            <div class="tab-item tab-local" data-type="local">\u672c\u5730\u56fe\u7247</div>            <div class="tab-item tab-lib" data-type="lib">\u514d\u8d39\u6b63\u7248\u56fe\u5e93</div>        </div>                <div class="insert-image-panel">                        <div class="panel-local">                                <div class="local-upload-preview">                    <div class="preview-tip"></div>                    <div class="preview-upload">                                                <div class="upload-btn-content">                          <div class="upload-btn-icon">+</div>                        </div>                    </div>                </div>                                <div class="local-upload-area">                    <div class="local-upload-btn" id="local-upload-btn">                                                <div class="upload-btn-content">                          <div class="upload-btn-icon iknow-ueditor-icons"></div>                          <div class="upload-btn-desc">\u672c\u5730\u4e0a\u4f20</div>                        </div>                    </div>                    <div class="local-upload-tip">\u652f\u6301jpg\u3001jpeg\u3001gif\u7b49\u591a\u79cd\u683c\u5f0f\uff0c\u5355\u5f20\u56fe\u7247\u6700\u5927\u652f\u630120M</div>                </div>            </div>                        <div class="panel-lib">                                <div class="lib-search-wrapper">                    <input class="search-input" placeholder="\u8bf7\u8f93\u5165\u5173\u952e\u8bcd\uff0c\u67e5\u627e\u76f8\u5173\u56fe\u7247\u7d20\u6750" /><span class="search-btn                    iknow-ueditor-icons"></span>                </div>                                <div class="lib-content-area">                                        <div class="content-default">                        <div class="default-content">                            \u5e93\u4e2d\u7684\u56fe\u7247\u4ec5\u9650\u5728\u767e\u5ea6\u77e5\u9053\u7f16\u8f91\u5185\u5bb9\u65f6\u4f7f\u7528\uff0c\u4e0d\u5f97\u7528\u4e8e\u5176\u4ed6\u4efb\u4f55\u5e73\u53f0\u53ca\u7528\u6237<br />                            \u8bf7\u9605\u8bfb                            <a target="blank" href="https://zhidao.baidu.com/special/view?id=51bb5a24626975510400">\u300a\u767e\u5ea6\u77e5\u9053\u56fe\u7247\u8bb8\u53ef\u534f\u8bae\u300b</a>\uff0c\u5f53\u60a8\u5f00\u59cb\u4f7f\u7528\u65f6\u89c6\u4e3a\u60a8\u5df2\u540c\u610f\u8be5\u534f\u8bae                        </div>                    </div>                                        <div class="content-list">                        <div class="list-col">                        </div><div class="list-col">                        </div><div class="list-col">                        </div><div class="list-col">                        </div><div class="list-col"></div>                    </div>                                        <div class="content-noresult">                        <div class="noresult-img iknow-ueditor-icons"></div>                        <div class="noresult-text">                            \u672a\u67e5\u627e\u5230\u76f8\u5173\u56fe\u7247<br />                            \u6362\u4e2a\u5173\u952e\u8bcd\u641c\u7d22\u5427                        </div>                    </div>                                        <div class="content-loading">                        <div class="loading-animation">                            <span class="loading-shallow"></span><span class="loading-dark"></span>                        </div>                    </div>                </div>            </div>        </div>                <div class="insert-image-button">            <div class="button-item button-cancel">\u53d6\u6d88</div>            <div class="button-item button-ok">\u5b8c\u6210</div>        </div>    </div></div>'),_template_varName=null}(_template_object);return fn=null,_template_fun_array.join("")}][0](),localTabName="local",libTabName="lib",imgFromBjhAttr="iknow-image-from-bjh",InsertImage=function(){function e(i,t,a,n){if(_classCallCheck(this,e),i&&t){var s=_tangram2.default(tpl);_tangram2.default("body").append(s),this.$el=s,this.UE=i,this.viewStatus=0,this.$libTab=s.find(".tab-lib"),this.$libPanel=s.find(".panel-lib"),this.$libInput=this.$libPanel.find(".search-input"),this.$list=this.$libPanel.find(".content-list"),this.$libDefault=this.$libPanel.find(".content-default"),this.$libNoResult=this.$libPanel.find(".content-noresult"),this.$libLoading=this.$libPanel.find(".content-loading"),this.$cols=this.$list.find(".list-col"),this.hasMore=0,this.libBase=0,this.libRn=20,this.insertColIndex=0,this.colNum=this.$cols.size(),this.query=null,this.loadingList=!1,this.libInserting=!1,this.libInsertArr=[],this.$localTab=s.find(".tab-local"),this.$localPanel=s.find(".panel-local"),this.$uploadArea=this.$localPanel.find(".local-upload-area"),this.$preview=this.$localPanel.find(".local-upload-preview"),this.$previewUpload=this.$preview.find(".preview-upload"),this.$previewTip=this.$preview.find(".preview-tip"),this.hasInit=!1,this.fileCount=0,this.loadedCount=0,this.tabs={current:localTabName,map:{local:{tab:this.$localTab,panel:this.$localPanel},lib:{tab:this.$libTab,panel:this.$libPanel}}},this.switchTab(this.tabs.current),this.bindEvent();var l=this;i.registerUI(t,function(e,t){var a=this;l.editor=e,l.needHttpsAutoTrans=e.getOpt("needHttpsAutoTrans");var s=new i.ui.Button({name:t,title:n||t,onclick:function(){return F.context("user")&&1!==+F.context("user").isLogin?void _event2.default.fire("login.check",{isLogin:function(){window.location.reload()}}):(!l.hasInit&&l.initUploadFn(e),l.viewStatus=1,void l.show())}});return i.commands.insertimage.queryCommandState=function(){var t=e.selection.getRange(),a=t.startContainer,n=i.dom.domUtils.findParentByTagName(a,["P"],!0);return n&&n.getElementsByTagName("img").length>0?-1:0},e.addListener("selectionchange",function(){var i=e.queryCommandState(t);-1===i?(s.setDisabled(!0),s.setChecked(!1)):(s.setDisabled(!1),s.setChecked(i))}),this.sendImageFromLibLog=function(){for(var e=a.getContent(),i=e.split(imgFromBjhAttr).length-1,t=e.split(imgFromBjhAttr),n=0;i>n;n++){var s=/data_resid="\S*"/g,l=t[n+1],o=s.exec(l),r=null;o&&(r=o[0].split('"')[1]);var d="bd_iknow_log_"+Math.floor(2147483648*Math.random()).toString(36),u=new Image,c="https://ttl-bjh.baidu.com/cms/statistics/statistics/img/s.gif?",p={urlkey:"1TKOC495NM",client_type:"pc",page_url:window.location.href,op_time:(new Date).getTime(),random:d};r&&(p.res_id=r),c+=_tangram2.default.param(p),window[d]=u,function(e,i){e.onload=e.onerror=e.onabort=function(){e.onload=e.onerror=e.onabort=null,window[i]=null,e=null,i=null}}(u,d),u.src=c}return i},e.addListener("afterExecCommand",function(){e.body.focus()}),e.addListener("destroy",function(){l.$el.remove()}),s},[a])}}return _createClass(e,[{key:"switchTab",value:function(e){if(e){var i=this.tabs.map,t=this.tabs.current,a=i[t].tab,n=i[t].panel,s=i[e].tab,l=i[e].panel;a.removeClass("active"),n.hide(),s.addClass("active"),l.show(),this.tabs.current=e}}},{key:"stopScroll",value:function(e){var i=_tangram2.default(e.target);i.hasClass("content-list")||i.hasClass("list-col")||i.hasClass("list-col")||i.hasClass("img-item")||e.preventDefault()}},{key:"show",value:function(){try{window.addEventListener("mousewheel",this.stopScroll,{passive:!1}),window.addEventListener("DOMMouseScroll",this.stopScroll,{passive:!1})}catch(e){}this.$el.show()}},{key:"hide",value:function(){try{window.removeEventListener("mousewheel",this.stopScroll),window.removeEventListener("DOMMouseScroll",this.stopScroll)}catch(e){}this.$el.hide(),this.viewStatus=0,this.switchTab(localTabName),this.fileCount=0,this.loadedCount=0,this.$previewTip.text(""),this.$previewUpload.show(),this.$preview.find(".preview-item").remove(),this.$preview.hide(),this.$uploadArea.show(),this.hasMore=0,this.libBase=0,this.query=null,this.insertColIndex=0,this.loadingList=!1,this.libInsertArr=[],this.$list.find("list-col").empty(),this.$list.hide(),this.$libLoading.hide(),this.$libNoResult.hide(),this.$libDefault.show()}},{key:"bindEvent",value:function(){var e=this,i=this;this.$el.on("click",".insert-image-close, .insert-image-button .button-cancel",function(){i.hide()}).on("click",".insert-image-button .button-ok",i.uploadFinish.bind(i)).on("click",".preview-item .preview-delete",function(t){var a=_tangram2.default(t.currentTarget),n=a.parent(".preview-item");n.find("img").hasClass("finish")&&(i.loadedCount-=1,i.$previewTip.text("\u5171"+i.loadedCount+"\u5f20\u4e0a\u4f20\u6210\u529f")),n.remove(),i.fileCount-=1,i.$preview.find(".preview-item").size()||(i.$preview.hide(),i.$uploadArea.show()),i.fileCount<10&&e.$previewUpload.show()}).on("click",".insert-image-tab .tab-item",function(e){var t=_tangram2.default(e.currentTarget),a=t.data("type");a&&i.switchTab(a)}).on("click",".panel-lib .search-btn",i.searchPic.bind(i)).on("keyup",".panel-lib .search-input",function(e){13===e.keyCode&&i.searchPic()}).on("click",".panel-lib .content-list .img-item-wrapper",function(e){var t=i.libInsertArr,a=_tangram2.default(e.currentTarget),n=a.find(".item-select"),s=void 0;if(n.size()){s=Number(n.find(".select-num").text())-1,n.remove(),t.splice(s,1);for(var l=s;l<t.length;l++){var o=t[l].find(".select-num"),r=Number(o.text());o.text(r-1)}}else{if(t.length>=10)return void _popTip2.default("\u4e00\u6b21\u6700\u591a\u6dfb\u52a010\u5f20\u56fe\u7247");s=t.length+1,a.append('<div class="item-select"><span class="select-num">'+s+"</span></div>"),t.push(a)}}),this.$el.find(".panel-lib .content-list").scroll(function(){if(i.hasMore){{var e=i.$list;e.height(),e[0].scrollHeight}e.height()+e.scrollTop()>e[0].scrollHeight-150&&i.getPicList()}})}},{key:"searchPic",value:function(){if(!this.loadingList){var e=_tangram2.default.trim(this.$libInput.val());e&&(this.$libDefault.hide(),this.$libNoResult.hide(),this.$list.show(),this.libBase=0,this.hasMore=0,this.$cols.each(function(e,i){_tangram2.default(i).empty()}),this.query=e,this.getPicList())}}},{key:"getPicList",value:function(){if(!this.loadingList){this.loadingList=!0,this.$libLoading.show();var e=this;_tangram2.default.ajax({type:"GET",url:"/submit/picture/picquery",data:{base:this.libBase,rn:this.libRn,query:this.query},timeout:3e4,dataType:"json",success:function(i){if(e.viewStatus&&0===i.errno&&i.data&&i.data.picList&&i.data.picList.length){e.libBase=i.data.base,e.hasMore=i.data.hasMore;var t=e.$cols,a=e.colNum,n=[],s=[];i.data.picList.forEach(function(e){var i=_tangram2.default('<div class="img-item-wrapper"></div>'),t=new Image,a=_tangram2.default.Deferred();t.onload=function(){a.resolve()},t.onerror=function(){a.resolve()},s.push(a),t.className="img-item",t.src=e.bos_url+"@w_200",t.setAttribute("data-src",e.bos_url),t.setAttribute("data-pwtype",e.pwType),t.setAttribute("data-resid",e.res_id),i.append(t),n.push(i)}),_tangram2.default.when.apply(_tangram2.default,s).then(function(){n.forEach(function(i){var n=void 0,s=void 0;do n=t.eq(e.insertColIndex),e.insertColIndex=++e.insertColIndex%a,s=t.eq(e.insertColIndex);while(n.height()>s.height());n.append(i)}),e.loadingList=!1,e.$libLoading.hide()})}else e.loadingList=!1,e.$libLoading.hide(),e.viewStatus&&(0===i.errno?0===e.libBase&&(e.$list.hide(),e.$libNoResult.show()):_popTip2.default("\u670d\u52a1\u5668\u7e41\u5fd9\u8bf7\u7a0d\u540e\u518d\u8bd5\uff01"))},error:function(){e.loadingList=!1,e.$libLoading.hide(),e.viewStatus&&(0===e.libBase&&e.$list.hide(),_popTip2.default("\u670d\u52a1\u5668\u7e41\u5fd9\u8bf7\u7a0d\u540e\u518d\u8bd5\uff01"))}})}}},{key:"initUploadFn",value:function(e){this.hasInit=!0;var i=(this.UE,this.$uploadArea),t=this.$preview,a=this.$previewUpload,n=this.$previewTip,s=e.getOpt("imageAllowFiles"),l=e.getOpt("imageUploadUrl")||"/submit/ajax",o=e.getOpt("imageMaxSize")||20971520,r=e.getOpt("imageUploadName")||"image",d=e.getOpt("imageUploadParams"),u=this,c=!1,p=_webuploader2.default.create({auto:!0,swf:"/static/swf/webuploader.swf",server:l,pick:{id:u.$el.find(".local-upload-btn")[0]},thumb:{width:d.width,height:d.height,allowMagnify:!1,crop:!1},fileVal:r,duplicate:!0,accept:{title:"Images",extensions:"gif,jpg,jpeg,png,bmp",mimeTypes:"image/gif,image/jpg,image/jpeg,image/png,image/bmp"},formData:d});p.on("beforeFileQueued",function(i){if(u.fileCount>=10)return _popTip2.default("\u4e00\u6b21\u6700\u591a\u6dfb\u52a010\u5f20\u56fe\u7247"),!1;var t=i.name?i.name.substr(i.name.lastIndexOf(".")):"";return(s.join("")+".").indexOf(t.toLowerCase()+".")<0?(_popTip2.default(""+e.getLang("simpleupload.exceedTypeError")+(i.name?"("+i.name+")":"")),!1):i.size>o?(_popTip2.default(""+e.getLang("simpleupload.exceedSizeError")+(i.name?"("+i.name+")":"")),!1):(u.fileCount+=1,void(u.fileCount>=10&&a.hide()))}),p.on("fileQueued",function(n){p.makeThumb(n,function(s,l){i.hide(),t.show(),c||(p.addButton({id:a[0]}),c=!0);var o=['<div class="preview-item">','<span class="preview-delete iknow-ueditor-icons"></span>','<div class="preview-loading">','<div class="loading-animation">','<span class="animation-white"></span><span class="animation-green"></span>',"</div>","</div>",'<img class="preview-img" id="ueditor-preview-img-'+n.id+'" src="'+(s?e.getOpt("waitImageUrl"):l)+'" />','<div class="preview-error">','<div class="error-msg">\u4e0a\u4f20\u5931\u8d25</div>','<div class="error-retry">\u91cd\u8bd5</div>',"</div>","</div>"];a.before(o.join(""))})}),p.on("uploadSuccess",function(i,a){var s=t.find("#ueditor-preview-img-"+i.id);if(s.size()&&u.viewStatus){var l=s.parent();"0"===a.errorNo&&a.url?setTimeout(function(){var e=t.find("#ueditor-preview-img-"+i.id);e.size()&&(l.find(".preview-loading").hide(),u.loadedCount+=1,n.text("\u5171"+u.loadedCount+"\u5f20\u4e0a\u4f20\u6210\u529f"),s.removeAttr("id"),s.attr("src",u.needHttpsAutoTrans?_https2.default.autoTrans(a.url):a.url),s.addClass("finish"))},1e3):(l.find(".preview-loading").hide(),_popTip2.default("265"===a.errorNo?e.getLang("needLoginMsg"):e.getLang("simpleupload.loadError")),l.find(".preview-error").show().click(function(e){_tangram2.default(e.currentTarget).hide(),l.find(".preview-loading").show(),p.retry(i)}))}})}},{key:"uploadFinish",value:function(){var e=this.editor,i=(this.UE,this.tabs.current),t=this;if(i===localTabName){var a=this.$preview.find(".preview-item");a.each(function(i,a){var n=_tangram2.default(a),s=n.find("img");if(s.hasClass("finish")){var l=s.attr("src"),o=(new Date).getTime(),r='<p><img src="'+l+'" data_time="'+o+'"></p>';e.execCommand("inserthtml",r),n.remove(),t.fileCount-=1,t.loadedCount-=1,t.$previewTip.text("\u5171"+t.loadedCount+"\u5f20\u4e0a\u4f20\u6210\u529f")}}),this.$preview.find(".preview-item").size()||(this.$preview.hide(),this.$uploadArea.show()),this.fileCount<10&&this.$previewUpload.show(),this.hide()}else if(i===libTabName){if(this.libInserting)return;this.libInserting=!0;var n=[],s=[];this.$libLoading.show(),this.libInsertArr.forEach(function(i){var a=i.find(".img-item").data("src"),l=i.find(".img-item").data("pwtype"),o=i.find(".img-item").data("resid"),r=_tangram2.default.Deferred(),d=_tangram2.default.Deferred();_tangram2.default.ajax({type:"POST",url:"/submit/picture/picurlcommit",data:{picUrl:a,pwType:l},timeout:3e4,dataType:"json",success:function(a){if(0===a.errno&&a.data&&a.data.url){var n=t.libInsertArr,s=i.find(".item-select"),l=Number(s.find(".select-num").text())-1;s.remove(),n.splice(l,1);for(var u=l;u<n.length;u++){var c=n[u].find(".select-num"),p=Number(c.text());c.text(p-1)}var h=new Image,v=t.needHttpsAutoTrans?_https2.default.autoTrans(a.data.url):a.data.url;h.onload=h.onerror=h.onabort=function(){d.resolve(),h=null},h.src=v,h.setAttribute("data_resid",o),setTimeout(function(){r.resolve(),e.execCommand("inserthtml","<p "+imgFromBjhAttr+'="1" ><img src="'+v+'" data_resid="'+o+'" /></p>',!0)},1e3)}else r.resolve(),_popTip2.default("\u56fe\u7247\u63d2\u5165\u5931\u8d25")},error:function(){r.resolve(),_popTip2.default("\u56fe\u7247\u63d2\u5165\u5931\u8d25")}}),n.push(r),s.push(d)}),_tangram2.default.when.apply(_tangram2.default,n).then(function(){t.$libLoading.hide(),t.libInserting=!1,t.hide()}),_tangram2.default.when.apply(_tangram2.default,s).then(function(){e.options.autoHeightEnabled&&e.adjustHeight()})}}}]),e}();exports.default=InsertImage});
;/*!common:widget/js/logic/ueditor/ueditor-core/ueditor.js*/
define("common:widget/js/logic/ueditor/ueditor-core/ueditor",function(require,exports,module){function getUEBasePath(e,t){return getBasePath(e||self.document.URL||self.location.href,t||getConfigFilePath())}function getConfigFilePath(){var e=document.getElementsByTagName("script");return e[e.length-1].src}function getBasePath(e,t){var i=t;return/^(\/|\\\\)/.test(t)?i=/^.+?\w(\/|\\\\)/.exec(e)[0]+t.replace(/^(\/|\\\\)/,""):/^[a-z]+:/i.test(t)||(e=e.split("#")[0].split("?")[0].replace(/[^\\\/]+$/,""),i=e+""+t),optimizationPath(i)}function optimizationPath(e){var t=/^[a-z]+:\/\//.exec(e)[0],i=null,n=[];for(e=e.replace(t,"").split("?")[0].split("#")[0],e=e.replace(/\\/g,"/").split(/\//),e[e.length-1]="";e.length;)".."===(i=e.shift())?n.pop():"."!==i&&n.push(i);return t+n.join("/")}function getListener(e,t,i){var n;return t=t.toLowerCase(),(n=e.__allListeners||i&&(e.__allListeners={}))&&(n[t]||i&&(n[t]=[]))}function getDomNode(e,t,i,n,o,r){var a,s=n&&e[t];for(!s&&(s=e[i]);!s&&(a=(a||e).parentNode);){if("BODY"==a.tagName||r&&!r(a))return null;s=a[i]}return s&&o&&!o(s)?getDomNode(s,t,i,!1,o):s}window.UEDITOR_HOME_URL="/html/ueditor/";var URL=window.UEDITOR_HOME_URL||getUEBasePath();window.UEDITOR_CONFIG={tooltipsMap:{bold:{label:"\u52a0\u7c97"},italic:{label:"\u659c\u4f53"},paragraph:{label:"\u6807\u9898"},insertorderedlist:{label:"\u6709\u5e8f\u5217\u8868"},insertunorderedlist:{label:"\u65e0\u5e8f\u5217\u8868"},undo:{label:"\u64a4\u9500"},redo:{label:"\u53cd\u64a4\u9500"},horizontal:{label:"\u5206\u5272\u7ebf"},removeformat:{label:"\u6e05\u9664\u683c\u5f0f"},blockquote:{label:"\u5f15\u7528"},link:{label:"\u94fe\u63a5"},insertimage:{label:"\u56fe\u7247"},insertvideo:{label:"\u89c6\u9891"},uploadbaiduyun:{label:"\u7f51\u76d8\u8d44\u6e90"},map:{label:"\u5730\u56fe"},template:{label:"\u56de\u7b54\u6a21\u677f"},insertcode:{label:"\u4ee3\u7801"},fullscreen:{label:"\u5207\u6362\u5168\u5c4f"}},UEDITOR_HOME_URL:URL,fileUploadUrl:"/submit/ajax",checkVideo:"/api/checkvideo",token:F&&F.context&&F.context("user")&&F.context("user").stoken,isLogin:F&&F.context&&F.context("user")&&"1"===F.context("user").isLogin,imageUrlPrefix:"",imageAllowFiles:[".png",".jpg",".jpeg",".gif",".bmp"],imageMaxSize:"20971520",imageUploadName:"image",waitImageUrl:"https://gss0.bdstatic.com/7051cy89QMgCncy6lo7D0j9wexYrbOWh7c50/editor/uploading.gif",imageUploadUrl:"/submit/ajax",imageRotate:!1,imageUploadParams:{width:650,height:867,cm:100672},transImageUrl:/hiphotos\.baidu\.com|bosstatic\.bdimg\.com\/editor|gss0\.baidu\.com/i,insertcode:{bash:"Bash/Shell",cpp:"C/C++",css:"Css",csharp:"C#",delphi:"Delphi",groovy:"Groovy",html:"Html",java:"Java",js:"Javascript",pl:"Perl",php:"Php",python:"Python",ruby:"Ruby",scala:"Scala",sql:"Sql",vb:"Vb",xml:"Xml"},toolbars:[["undo","redo","removeformat","|","bold","italic","paragraph","|","insertunorderedlist","insertorderedlist","horizontal","blockquote","|","link","insertimage","insertvideo","map","template","|","insertcode","fullscreen"]],theme:"iknow",themePath:URL+"themes/",zIndex:100,textarea:"editorValue",autoClearinitialContent:!0,initialFrameWidth:700,maxFrameHeight:500,pasteplain:!0,filterTxtRules:function(){function e(e){e.tagName="p",e.setAttr()}return{"-":"script style object iframe embed input select",p:{$:{}},br:{$:{}},div:{$:{}},li:{$:{}},caption:e,th:e,tr:e,img:function(){},h1:e,h2:e,h3:e,h4:e,h5:e,h6:e,td:function(e){var t=!!e.innerText();t&&e.parentNode.insertAfter(UE.uNode.createText(" &nbsp; &nbsp;"),e),e.parentNode.removeChild(e,e.innerText())}}}(),listDefaultPaddingLeft:0,enableContextMenu:!1,wordCount:!0,wordCountNormal:!1,maximumWords:1499,wordCountMsg:"\u60a8\u8fd8\u53ef\u4ee5\u8f93\u5165{#leave} \u4e2a\u5b57",wordEmptyMsg:"\u8bf7\u60a8\u8f93\u5165\u6587\u5b57\u5185\u5bb9",wordOverFlowMsg:'<span style="color:#ee5e0f;margin-right:8px;">\u5b57\u6570\u8d85\u51fa\u6700\u5927\u5141\u8bb8\u503c\uff0c\u8bf7\u5220\u51cf\uff01</span>',tabSize:4,tabNode:"&nbsp;",removeFormatAttributes:"style,lang,width,height,align,hspace,valign",maxUndoCount:20,maxInputCount:20,autoHeightEnabled:!0,xssFilterRules:!0,inputXssFilter:!0,outputXssFilter:!0,whitList:{iframe:["data-type","map","frameborder","src","class"],a:["target","href","title","class","style","rel"],abbr:["title","class","style"],address:["class","style"],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src","class","style"],b:["class","style"],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite","class","style"],br:[],caption:["class","style"],center:[],cite:[],code:["class","style"],col:["align","valign","span","width","class","style"],colgroup:["align","valign","span","width","class","style"],dd:["class","style"],del:["datetime"],details:["open"],div:["class","style"],dl:["class","style"],dt:["class","style"],em:["class","style"],font:["color","size","face"],footer:[],h1:["class","style"],h2:["class","style","data-diagnose-id"],h3:["class","style"],h4:["class","style"],h5:["class","style"],h6:["class","style"],header:[],hr:[],i:["class","style"],img:["src","alt","title","width","height","id","loadingclass","class","data_img","data_type","data_src","data_swf","data_title","data_time","data_def","data_itemid","data_resid"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:["data-diagnose-id","data-mid","data-post","data-duration","data-width","data-height","data-vtopic","class","iknow-image-from-bjh","data-yun-title","data-yun-size","data-yun-filelogo","data-yun-number","data-yun-sharelink","data-yun-code"],pre:["class","style"],s:[],section:[],small:[],span:["class","style","data-iknow-target","data-error-ignore"],sub:["class","style"],sup:["class","style"],strong:["class","style"],table:["width","border","align","valign","class","style"],tbody:["align","valign","class","style"],td:["width","rowspan","colspan","align","valign","class","style"],tfoot:["align","valign","class","style"],th:["width","rowspan","colspan","align","valign","class","style"],thead:["align","valign","class","style"],tr:["rowspan","align","valign","class","style"],tt:[],u:[],ul:[],video:["autoplay","controls","loop","preload","src","height","width","class","style","data_img","data_type","data_src","data_swf","data_title","data_time","data_def","data_itemid"],vvideo:["mid","img","duration","width","height","vtopic"],baiduyun:["class","data_title","data_size","data_filelogo","data_number","data_sharelink","data_code"]}},window.UE={getUEBasePath:getUEBasePath},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";var dom=UE.dom={};UE.I18N["zh-cn"]={labelMap:{anchor:"\u951a\u70b9",undo:"\u64a4\u9500",redo:"\u91cd\u505a",bold:"\u52a0\u7c97",indent:"\u9996\u884c\u7f29\u8fdb",snapscreen:"\u622a\u56fe",italic:"\u659c\u4f53",underline:"\u4e0b\u5212\u7ebf",strikethrough:"\u5220\u9664\u7ebf",subscript:"\u4e0b\u6807",fontborder:"\u5b57\u7b26\u8fb9\u6846",superscript:"\u4e0a\u6807",formatmatch:"\u683c\u5f0f\u5237",source:"\u6e90\u4ee3\u7801",blockquote:"\u5f15\u7528",pasteplain:"\u7eaf\u6587\u672c\u7c98\u8d34\u6a21\u5f0f",selectall:"\u5168\u9009",print:"\u6253\u5370",preview:"\u9884\u89c8",horizontal:"\u5206\u9694\u7ebf",removeformat:"\u6e05\u9664\u683c\u5f0f",time:"\u65f6\u95f4",date:"\u65e5\u671f",unlink:"\u53d6\u6d88\u94fe\u63a5",insertrow:"\u524d\u63d2\u5165\u884c",insertcol:"\u524d\u63d2\u5165\u5217",mergeright:"\u53f3\u5408\u5e76\u5355\u5143\u683c",mergedown:"\u4e0b\u5408\u5e76\u5355\u5143\u683c",deleterow:"\u5220\u9664\u884c",deletecol:"\u5220\u9664\u5217",splittorows:"\u62c6\u5206\u6210\u884c",splittocols:"\u62c6\u5206\u6210\u5217",splittocells:"\u5b8c\u5168\u62c6\u5206\u5355\u5143\u683c",deletecaption:"\u5220\u9664\u8868\u683c\u6807\u9898",inserttitle:"\u63d2\u5165\u6807\u9898",mergecells:"\u5408\u5e76\u591a\u4e2a\u5355\u5143\u683c",deletetable:"\u5220\u9664\u8868\u683c",cleardoc:"\u6e05\u7a7a\u6587\u6863",insertparagraphbeforetable:"\u8868\u683c\u524d\u63d2\u5165\u884c",insertcode:"\u4ee3\u7801",fontfamily:"\u5b57\u4f53",fontsize:"\u5b57\u53f7",paragraph:"\u6bb5\u843d\u683c\u5f0f",simpleupload:"\u5355\u56fe\u4e0a\u4f20",insertimage:"\u591a\u56fe\u4e0a\u4f20",edittable:"\u8868\u683c\u5c5e\u6027",edittd:"\u5355\u5143\u683c\u5c5e\u6027",link:"\u8d85\u94fe\u63a5",emotion:"\u8868\u60c5",spechars:"\u7279\u6b8a\u5b57\u7b26",searchreplace:"\u67e5\u8be2\u66ff\u6362",map:"\u63d2\u5165\u5730\u56fe",gmap:"Google\u5730\u56fe",insertvideo:"\u89c6\u9891",help:"\u5e2e\u52a9",justifyleft:"\u5c45\u5de6\u5bf9\u9f50",justifyright:"\u5c45\u53f3\u5bf9\u9f50",justifycenter:"\u5c45\u4e2d\u5bf9\u9f50",justifyjustify:"\u4e24\u7aef\u5bf9\u9f50",forecolor:"\u5b57\u4f53\u989c\u8272",backcolor:"\u80cc\u666f\u8272",insertorderedlist:"\u6709\u5e8f\u5217\u8868",insertunorderedlist:"\u65e0\u5e8f\u5217\u8868",fullscreen:"\u5168\u5c4f",directionalityltr:"\u4ece\u5de6\u5411\u53f3\u8f93\u5165",directionalityrtl:"\u4ece\u53f3\u5411\u5de6\u8f93\u5165",rowspacingtop:"\u6bb5\u524d\u8ddd",rowspacingbottom:"\u6bb5\u540e\u8ddd",pagebreak:"\u5206\u9875",insertframe:"\u63d2\u5165Iframe",imagenone:"\u9ed8\u8ba4",imageleft:"\u5de6\u6d6e\u52a8",imageright:"\u53f3\u6d6e\u52a8",attachment:"\u9644\u4ef6",imagecenter:"\u5c45\u4e2d",wordimage:"\u56fe\u7247\u8f6c\u5b58",lineheight:"\u884c\u95f4\u8ddd",edittip:"\u7f16\u8f91\u63d0\u793a",customstyle:"\u81ea\u5b9a\u4e49\u6807\u9898",autotypeset:"\u81ea\u52a8\u6392\u7248",webapp:"\u767e\u5ea6\u5e94\u7528",touppercase:"\u5b57\u6bcd\u5927\u5199",tolowercase:"\u5b57\u6bcd\u5c0f\u5199",background:"\u80cc\u666f",template:"\u6a21\u677f",scrawl:"\u6d82\u9e26",music:"\u97f3\u4e50",inserttable:"\u63d2\u5165\u8868\u683c",drafts:"\u4ece\u8349\u7a3f\u7bb1\u52a0\u8f7d",charts:"\u56fe\u8868"},insertorderedlist:{num:"1,2,3...",num1:"1),2),3)...",num2:"(1),(2),(3)...",cn:"\u4e00,\u4e8c,\u4e09....",cn1:"\u4e00),\u4e8c),\u4e09)....",cn2:"(\u4e00),(\u4e8c),(\u4e09)....",decimal:"1,2,3...","lower-alpha":"a,b,c...","lower-roman":"i,ii,iii...","upper-alpha":"A,B,C...","upper-roman":"I,II,III..."},insertunorderedlist:{circle:"\u25cb \u5927\u5706\u5708",disc:"\u25cf \u5c0f\u9ed1\u70b9",square:"\u25a0 \u5c0f\u65b9\u5757 ",dash:"\u2014 \u7834\u6298\u53f7",dot:" \u3002 \u5c0f\u5706\u5708"},paragraph:{p:"\u6bb5\u843d",h1:"\u6807\u9898 1",h2:"\u6807\u9898 2",h3:"\u6807\u9898 3",h4:"\u6807\u9898 4",h5:"\u6807\u9898 5",h6:"\u6807\u9898 6"},fontfamily:{songti:"\u5b8b\u4f53",kaiti:"\u6977\u4f53",heiti:"\u9ed1\u4f53",lishu:"\u96b6\u4e66",yahei:"\u5fae\u8f6f\u96c5\u9ed1",andaleMono:"andale mono",arial:"arial",arialBlack:"arial black",comicSansMs:"comic sans ms",impact:"impact",timesNewRoman:"times new roman"},customstyle:{tc:"\u6807\u9898\u5c45\u4e2d",tl:"\u6807\u9898\u5c45\u5de6",im:"\u5f3a\u8c03",hi:"\u660e\u663e\u5f3a\u8c03"},autoupload:{exceedSizeError:"\u6587\u4ef6\u5927\u5c0f\u8d85\u51fa\u9650\u5236",exceedTypeError:"\u6587\u4ef6\u683c\u5f0f\u4e0d\u5141\u8bb8",jsonEncodeError:"\u670d\u52a1\u5668\u8fd4\u56de\u683c\u5f0f\u9519\u8bef",loading:"\u6b63\u5728\u4e0a\u4f20...",loadError:"\u4e0a\u4f20\u9519\u8bef",errorLoadConfig:"\u540e\u7aef\u914d\u7f6e\u9879\u6ca1\u6709\u6b63\u5e38\u52a0\u8f7d\uff0c\u4e0a\u4f20\u63d2\u4ef6\u4e0d\u80fd\u6b63\u5e38\u4f7f\u7528\uff01"},simpleupload:{exceedSizeError:"\u6587\u4ef6\u5927\u5c0f\u8d85\u51fa\u9650\u5236",exceedTypeError:"\u6587\u4ef6\u683c\u5f0f\u4e0d\u5141\u8bb8",jsonEncodeError:"\u670d\u52a1\u5668\u8fd4\u56de\u683c\u5f0f\u9519\u8bef",loading:"\u6b63\u5728\u4e0a\u4f20...",loadError:"\u4e0a\u4f20\u9519\u8bef",errorLoadConfig:"\u540e\u7aef\u914d\u7f6e\u9879\u6ca1\u6709\u6b63\u5e38\u52a0\u8f7d\uff0c\u4e0a\u4f20\u63d2\u4ef6\u4e0d\u80fd\u6b63\u5e38\u4f7f\u7528\uff01"},elementPathTip:"\u5143\u7d20\u8def\u5f84",wordCountTip:"\u5b57\u6570\u7edf\u8ba1",wordCountMsg:"\u5f53\u524d\u5df2\u8f93\u5165{#count}\u4e2a\u5b57\u7b26, \u60a8\u8fd8\u53ef\u4ee5\u8f93\u5165{#leave}\u4e2a\u5b57\u7b26\u3002 ",wordOverFlowMsg:'<span style="color:red;">\u5b57\u6570\u8d85\u51fa\u6700\u5927\u5141\u8bb8\u503c\uff0c\u670d\u52a1\u5668\u53ef\u80fd\u62d2\u7edd\u4fdd\u5b58\uff01</span>',ok:"\u786e\u8ba4",cancel:"\u53d6\u6d88",insertLink:"\u63d2\u5165\u94fe\u63a5",insertImage:"\u63d2\u5165\u56fe\u7247",insertTemplate:"\u63d2\u5165\u6a21\u677f",insertMap:"\u63d2\u5165\u5730\u56fe\u53ca\u7ebf\u8def\u6587\u5b57",closeDialog:"\u5173\u95ed\u5bf9\u8bdd\u6846",tableDrag:"\u8868\u683c\u62d6\u52a8\u5fc5\u987b\u5f15\u5165uiUtils.js\u6587\u4ef6\uff01",autofloatMsg:"\u5de5\u5177\u680f\u6d6e\u52a8\u4f9d\u8d56\u7f16\u8f91\u5668UI\uff0c\u60a8\u9996\u5148\u9700\u8981\u5f15\u5165UI\u6587\u4ef6!",loadconfigError:"\u83b7\u53d6\u540e\u53f0\u914d\u7f6e\u9879\u8bf7\u6c42\u51fa\u9519\uff0c\u4e0a\u4f20\u529f\u80fd\u5c06\u4e0d\u80fd\u6b63\u5e38\u4f7f\u7528\uff01",loadconfigFormatError:"\u540e\u53f0\u914d\u7f6e\u9879\u8fd4\u56de\u683c\u5f0f\u51fa\u9519\uff0c\u4e0a\u4f20\u529f\u80fd\u5c06\u4e0d\u80fd\u6b63\u5e38\u4f7f\u7528\uff01",loadconfigHttpError:"\u8bf7\u6c42\u540e\u53f0\u914d\u7f6e\u9879http\u9519\u8bef\uff0c\u4e0a\u4f20\u529f\u80fd\u5c06\u4e0d\u80fd\u6b63\u5e38\u4f7f\u7528\uff01",snapScreen_plugin:{browserMsg:"\u4ec5\u652f\u6301IE\u6d4f\u89c8\u5668\uff01",callBackErrorMsg:"\u670d\u52a1\u5668\u8fd4\u56de\u6570\u636e\u6709\u8bef\uff0c\u8bf7\u68c0\u67e5\u914d\u7f6e\u9879\u4e4b\u540e\u91cd\u8bd5\u3002",uploadErrorMsg:"\u622a\u56fe\u4e0a\u4f20\u5931\u8d25\uff0c\u8bf7\u68c0\u67e5\u670d\u52a1\u5668\u7aef\u73af\u5883! "},insertcode:{as3:"ActionScript 3",bash:"Bash/Shell",cpp:"C/C++",css:"CSS",cf:"ColdFusion","c#":"C#",delphi:"Delphi",diff:"Diff",erlang:"Erlang",groovy:"Groovy",html:"HTML",java:"Java",jfx:"JavaFX",js:"JavaScript",pl:"Perl",php:"PHP",plain:"Plain Text",ps:"PowerShell",python:"Python",ruby:"Ruby",scala:"Scala",sql:"SQL",vb:"Visual Basic",xml:"XML"},confirmClear:"\u786e\u5b9a\u6e05\u7a7a\u5f53\u524d\u6587\u6863\u4e48\uff1f",contextMenu:{"delete":"\u5220\u9664",selectall:"\u5168\u9009",deletecode:"\u5220\u9664\u4ee3\u7801",cleardoc:"\u6e05\u7a7a\u6587\u6863",confirmclear:"\u786e\u5b9a\u6e05\u7a7a\u5f53\u524d\u6587\u6863\u4e48\uff1f",unlink:"\u5220\u9664\u8d85\u94fe\u63a5",paragraph:"\u6bb5\u843d\u683c\u5f0f",edittable:"\u8868\u683c\u5c5e\u6027",aligntd:"\u5355\u5143\u683c\u5bf9\u9f50\u65b9\u5f0f",aligntable:"\u8868\u683c\u5bf9\u9f50\u65b9\u5f0f",tableleft:"\u5de6\u6d6e\u52a8",tablecenter:"\u5c45\u4e2d\u663e\u793a",tableright:"\u53f3\u6d6e\u52a8",edittd:"\u5355\u5143\u683c\u5c5e\u6027",setbordervisible:"\u8bbe\u7f6e\u8868\u683c\u8fb9\u7ebf\u53ef\u89c1",justifyleft:"\u5de6\u5bf9\u9f50",justifyright:"\u53f3\u5bf9\u9f50",justifycenter:"\u5c45\u4e2d\u5bf9\u9f50",justifyjustify:"\u4e24\u7aef\u5bf9\u9f50",table:"\u8868\u683c",inserttable:"\u63d2\u5165\u8868\u683c",deletetable:"\u5220\u9664\u8868\u683c",insertparagraphbefore:"\u524d\u63d2\u5165\u6bb5\u843d",insertparagraphafter:"\u540e\u63d2\u5165\u6bb5\u843d",deleterow:"\u5220\u9664\u5f53\u524d\u884c",deletecol:"\u5220\u9664\u5f53\u524d\u5217",insertrow:"\u524d\u63d2\u5165\u884c",insertcol:"\u5de6\u63d2\u5165\u5217",insertrownext:"\u540e\u63d2\u5165\u884c",insertcolnext:"\u53f3\u63d2\u5165\u5217",insertcaption:"\u63d2\u5165\u8868\u683c\u540d\u79f0",deletecaption:"\u5220\u9664\u8868\u683c\u540d\u79f0",inserttitle:"\u63d2\u5165\u8868\u683c\u6807\u9898\u884c",deletetitle:"\u5220\u9664\u8868\u683c\u6807\u9898\u884c",inserttitlecol:"\u63d2\u5165\u8868\u683c\u6807\u9898\u5217",deletetitlecol:"\u5220\u9664\u8868\u683c\u6807\u9898\u5217",averageDiseRow:"\u5e73\u5747\u5206\u5e03\u5404\u884c",averageDisCol:"\u5e73\u5747\u5206\u5e03\u5404\u5217",mergeright:"\u5411\u53f3\u5408\u5e76",mergeleft:"\u5411\u5de6\u5408\u5e76",mergedown:"\u5411\u4e0b\u5408\u5e76",mergecells:"\u5408\u5e76\u5355\u5143\u683c",splittocells:"\u5b8c\u5168\u62c6\u5206\u5355\u5143\u683c",splittocols:"\u62c6\u5206\u6210\u5217",splittorows:"\u62c6\u5206\u6210\u884c",tablesort:"\u8868\u683c\u6392\u5e8f",enablesort:"\u8bbe\u7f6e\u8868\u683c\u53ef\u6392\u5e8f",disablesort:"\u53d6\u6d88\u8868\u683c\u53ef\u6392\u5e8f",reversecurrent:"\u9006\u5e8f\u5f53\u524d",orderbyasc:"\u6309ASCII\u5b57\u7b26\u5347\u5e8f",reversebyasc:"\u6309ASCII\u5b57\u7b26\u964d\u5e8f",orderbynum:"\u6309\u6570\u503c\u5927\u5c0f\u5347\u5e8f",reversebynum:"\u6309\u6570\u503c\u5927\u5c0f\u964d\u5e8f",borderbk:"\u8fb9\u6846\u5e95\u7eb9",setcolor:"\u8868\u683c\u9694\u884c\u53d8\u8272",unsetcolor:"\u53d6\u6d88\u8868\u683c\u9694\u884c\u53d8\u8272",setbackground:"\u9009\u533a\u80cc\u666f\u9694\u884c",unsetbackground:"\u53d6\u6d88\u9009\u533a\u80cc\u666f",redandblue:"\u7ea2\u84dd\u76f8\u95f4",threecolorgradient:"\u4e09\u8272\u6e10\u53d8",copy:"\u590d\u5236(Ctrl + c)",copymsg:"\u6d4f\u89c8\u5668\u4e0d\u652f\u6301,\u8bf7\u4f7f\u7528 'Ctrl + c'",paste:"\u7c98\u8d34(Ctrl + v)",pastemsg:"\u6d4f\u89c8\u5668\u4e0d\u652f\u6301,\u8bf7\u4f7f\u7528 'Ctrl + v'"},copymsg:"\u6d4f\u89c8\u5668\u4e0d\u652f\u6301,\u8bf7\u4f7f\u7528 'Ctrl + c'",pastemsg:"\u6d4f\u89c8\u5668\u4e0d\u652f\u6301,\u8bf7\u4f7f\u7528 'Ctrl + v'",anthorMsg:"\u94fe\u63a5",clearColor:"\u6e05\u7a7a\u989c\u8272",standardColor:"\u6807\u51c6\u989c\u8272",themeColor:"\u4e3b\u9898\u989c\u8272",property:"\u5c5e\u6027","default":"\u9ed8\u8ba4",modify:"\u4fee\u6539",justifyleft:"\u5de6\u5bf9\u9f50",justifyright:"\u53f3\u5bf9\u9f50",justifycenter:"\u5c45\u4e2d",justify:"\u9ed8\u8ba4",clear:"\u6e05\u9664",anchorMsg:"\u951a\u70b9","delete":"\u5220\u9664",clickToUpload:"\u70b9\u51fb\u4e0a\u4f20",unset:"\u5c1a\u672a\u8bbe\u7f6e\u8bed\u8a00\u6587\u4ef6",t_row:"\u884c",t_col:"\u5217",more:"\u66f4\u591a",needLoginMsg:"\u975e\u767b\u5f55\u72b6\u6001\u65e0\u6cd5\u4e0a\u4f20",pasteOpt:"\u7c98\u8d34\u9009\u9879",pasteSourceFormat:"\u4fdd\u7559\u6e90\u683c\u5f0f",tagFormat:"\u53ea\u4fdd\u7559\u6807\u7b7e",pasteTextFormat:"\u53ea\u4fdd\u7559\u6587\u672c",autoTypeSet:{mergeLine:"\u5408\u5e76\u7a7a\u884c",delLine:"\u6e05\u9664\u7a7a\u884c",removeFormat:"\u6e05\u9664\u683c\u5f0f",indent:"\u9996\u884c\u7f29\u8fdb",alignment:"\u5bf9\u9f50\u65b9\u5f0f",imageFloat:"\u56fe\u7247\u6d6e\u52a8",removeFontsize:"\u6e05\u9664\u5b57\u53f7",removeFontFamily:"\u6e05\u9664\u5b57\u4f53",removeHtml:"\u6e05\u9664\u5197\u4f59HTML\u4ee3\u7801",pasteFilter:"\u7c98\u8d34\u8fc7\u6ee4",run:"\u6267\u884c",symbol:"\u7b26\u53f7\u8f6c\u6362",bdc2sb:"\u5168\u89d2\u8f6c\u534a\u89d2",tobdc:"\u534a\u89d2\u8f6c\u5168\u89d2"},background:{"static":{lang_background_normal:"\u80cc\u666f\u8bbe\u7f6e",lang_background_local:"\u5728\u7ebf\u56fe\u7247",lang_background_set:"\u9009\u9879",lang_background_none:"\u65e0\u80cc\u666f\u8272",lang_background_colored:"\u6709\u80cc\u666f\u8272",lang_background_color:"\u989c\u8272\u8bbe\u7f6e",lang_background_netimg:"\u7f51\u7edc\u56fe\u7247",lang_background_align:"\u5bf9\u9f50\u65b9\u5f0f",lang_background_position:"\u7cbe\u786e\u5b9a\u4f4d",repeatType:{options:["\u5c45\u4e2d","\u6a2a\u5411\u91cd\u590d","\u7eb5\u5411\u91cd\u590d","\u5e73\u94fa","\u81ea\u5b9a\u4e49"]}},noUploadImage:"\u5f53\u524d\u672a\u4e0a\u4f20\u8fc7\u4efb\u4f55\u56fe\u7247\uff01",toggleSelect:"\u5355\u51fb\u53ef\u5207\u6362\u9009\u4e2d\u72b6\u6001\n\u539f\u56fe\u5c3a\u5bf8: "},insertimage:{"static":{lang_tab_remote:"\u63d2\u5165\u56fe\u7247",lang_tab_upload:"\u672c\u5730\u4e0a\u4f20",lang_tab_online:"\u5728\u7ebf\u7ba1\u7406",lang_tab_search:"\u56fe\u7247\u641c\u7d22",lang_input_url:"\u5730 \u5740\uff1a",lang_input_size:"\u5927 \u5c0f\uff1a",lang_input_width:"\u5bbd\u5ea6",lang_input_height:"\u9ad8\u5ea6",lang_input_border:"\u8fb9 \u6846\uff1a",lang_input_vhspace:"\u8fb9 \u8ddd\uff1a",lang_input_title:"\u63cf \u8ff0\uff1a",lang_input_align:"\u56fe\u7247\u6d6e\u52a8\u65b9\u5f0f\uff1a",lang_imgLoading:"\u3000\u56fe\u7247\u52a0\u8f7d\u4e2d\u2026\u2026",lang_start_upload:"\u5f00\u59cb\u4e0a\u4f20",lock:{title:"\u9501\u5b9a\u5bbd\u9ad8\u6bd4\u4f8b"},searchType:{title:"\u56fe\u7247\u7c7b\u578b",options:["\u65b0\u95fb","\u58c1\u7eb8","\u8868\u60c5","\u5934\u50cf"]},searchTxt:{value:"\u8bf7\u8f93\u5165\u641c\u7d22\u5173\u952e\u8bcd"},searchBtn:{value:"\u767e\u5ea6\u4e00\u4e0b"},searchReset:{value:"\u6e05\u7a7a\u641c\u7d22"},noneAlign:{title:"\u65e0\u6d6e\u52a8"},leftAlign:{title:"\u5de6\u6d6e\u52a8"},rightAlign:{title:"\u53f3\u6d6e\u52a8"},centerAlign:{title:"\u5c45\u4e2d\u72ec\u5360\u4e00\u884c"}},uploadSelectFile:"\u70b9\u51fb\u9009\u62e9\u56fe\u7247",uploadAddFile:"\u7ee7\u7eed\u6dfb\u52a0",uploadStart:"\u5f00\u59cb\u4e0a\u4f20",uploadPause:"\u6682\u505c\u4e0a\u4f20",uploadContinue:"\u7ee7\u7eed\u4e0a\u4f20",uploadRetry:"\u91cd\u8bd5\u4e0a\u4f20",uploadDelete:"\u5220\u9664",uploadTurnLeft:"\u5411\u5de6\u65cb\u8f6c",uploadTurnRight:"\u5411\u53f3\u65cb\u8f6c",uploadPreview:"\u9884\u89c8\u4e2d",uploadNoPreview:"\u4e0d\u80fd\u9884\u89c8",updateStatusReady:"\u9009\u4e2d_\u5f20\u56fe\u7247\uff0c\u5171_KB\u3002",updateStatusConfirm:"\u5df2\u6210\u529f\u4e0a\u4f20_\u5f20\u7167\u7247\uff0c_\u5f20\u7167\u7247\u4e0a\u4f20\u5931\u8d25",updateStatusFinish:"\u5171_\u5f20\uff08_KB\uff09\uff0c_\u5f20\u4e0a\u4f20\u6210\u529f",updateStatusError:"\uff0c_\u5f20\u4e0a\u4f20\u5931\u8d25\u3002",errorNotSupport:"WebUploader \u4e0d\u652f\u6301\u60a8\u7684\u6d4f\u89c8\u5668\uff01\u5982\u679c\u4f60\u4f7f\u7528\u7684\u662fIE\u6d4f\u89c8\u5668\uff0c\u8bf7\u5c1d\u8bd5\u5347\u7ea7 flash \u64ad\u653e\u5668\u3002",errorLoadConfig:"\u540e\u7aef\u914d\u7f6e\u9879\u6ca1\u6709\u6b63\u5e38\u52a0\u8f7d\uff0c\u4e0a\u4f20\u63d2\u4ef6\u4e0d\u80fd\u6b63\u5e38\u4f7f\u7528\uff01",errorExceedSize:"\u6587\u4ef6\u5927\u5c0f\u8d85\u51fa",errorFileType:"\u6587\u4ef6\u683c\u5f0f\u4e0d\u5141\u8bb8",errorInterrupt:"\u6587\u4ef6\u4f20\u8f93\u4e2d\u65ad",errorUploadRetry:"\u4e0a\u4f20\u5931\u8d25\uff0c\u8bf7\u91cd\u8bd5",errorHttp:"http\u8bf7\u6c42\u9519\u8bef",errorServerUpload:"\u670d\u52a1\u5668\u8fd4\u56de\u51fa\u9519",remoteLockError:"\u5bbd\u9ad8\u4e0d\u6b63\u786e,\u4e0d\u80fd\u6240\u5b9a\u6bd4\u4f8b",numError:"\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u957f\u5ea6\u6216\u8005\u5bbd\u5ea6\u503c\uff01\u4f8b\u5982\uff1a123\uff0c400",imageUrlError:"\u4e0d\u5141\u8bb8\u7684\u56fe\u7247\u683c\u5f0f\u6216\u8005\u56fe\u7247\u57df\uff01",imageLoadError:"\u56fe\u7247\u52a0\u8f7d\u5931\u8d25\uff01\u8bf7\u68c0\u67e5\u94fe\u63a5\u5730\u5740\u6216\u7f51\u7edc\u72b6\u6001\uff01",searchRemind:"\u8bf7\u8f93\u5165\u641c\u7d22\u5173\u952e\u8bcd",searchLoading:"\u56fe\u7247\u52a0\u8f7d\u4e2d\uff0c\u8bf7\u7a0d\u540e\u2026\u2026",searchRetry:" :( \uff0c\u62b1\u6b49\uff0c\u6ca1\u6709\u627e\u5230\u56fe\u7247\uff01\u8bf7\u91cd\u8bd5\u4e00\u6b21\uff01"},attachment:{"static":{lang_tab_upload:"\u4e0a\u4f20\u9644\u4ef6",lang_tab_online:"\u5728\u7ebf\u9644\u4ef6",lang_start_upload:"\u5f00\u59cb\u4e0a\u4f20",lang_drop_remind:"\u53ef\u4ee5\u5c06\u6587\u4ef6\u62d6\u5230\u8fd9\u91cc\uff0c\u5355\u6b21\u6700\u591a\u53ef\u9009100\u4e2a\u6587\u4ef6"},uploadSelectFile:"\u70b9\u51fb\u9009\u62e9\u6587\u4ef6",uploadAddFile:"\u7ee7\u7eed\u6dfb\u52a0",uploadStart:"\u5f00\u59cb\u4e0a\u4f20",uploadPause:"\u6682\u505c\u4e0a\u4f20",uploadContinue:"\u7ee7\u7eed\u4e0a\u4f20",uploadRetry:"\u91cd\u8bd5\u4e0a\u4f20",uploadDelete:"\u5220\u9664",uploadTurnLeft:"\u5411\u5de6\u65cb\u8f6c",uploadTurnRight:"\u5411\u53f3\u65cb\u8f6c",uploadPreview:"\u9884\u89c8\u4e2d",updateStatusReady:"\u9009\u4e2d_\u4e2a\u6587\u4ef6\uff0c\u5171_KB\u3002",updateStatusConfirm:"\u5df2\u6210\u529f\u4e0a\u4f20_\u4e2a\u6587\u4ef6\uff0c_\u4e2a\u6587\u4ef6\u4e0a\u4f20\u5931\u8d25",updateStatusFinish:"\u5171_\u4e2a\uff08_KB\uff09\uff0c_\u4e2a\u4e0a\u4f20\u6210\u529f",updateStatusError:"\uff0c_\u5f20\u4e0a\u4f20\u5931\u8d25\u3002",errorNotSupport:"WebUploader \u4e0d\u652f\u6301\u60a8\u7684\u6d4f\u89c8\u5668\uff01\u5982\u679c\u4f60\u4f7f\u7528\u7684\u662fIE\u6d4f\u89c8\u5668\uff0c\u8bf7\u5c1d\u8bd5\u5347\u7ea7 flash \u64ad\u653e\u5668\u3002",errorLoadConfig:"\u540e\u7aef\u914d\u7f6e\u9879\u6ca1\u6709\u6b63\u5e38\u52a0\u8f7d\uff0c\u4e0a\u4f20\u63d2\u4ef6\u4e0d\u80fd\u6b63\u5e38\u4f7f\u7528\uff01",errorExceedSize:"\u6587\u4ef6\u5927\u5c0f\u8d85\u51fa",errorFileType:"\u6587\u4ef6\u683c\u5f0f\u4e0d\u5141\u8bb8",errorInterrupt:"\u6587\u4ef6\u4f20\u8f93\u4e2d\u65ad",errorUploadRetry:"\u4e0a\u4f20\u5931\u8d25\uff0c\u8bf7\u91cd\u8bd5",errorHttp:"http\u8bf7\u6c42\u9519\u8bef",errorServerUpload:"\u670d\u52a1\u5668\u8fd4\u56de\u51fa\u9519"},insertvideo:{"static":{lang_tab_insertV:"\u63d2\u5165\u89c6\u9891",lang_tab_searchV:"\u641c\u7d22\u89c6\u9891",lang_tab_uploadV:"\u4e0a\u4f20\u89c6\u9891",lang_video_url:"\u89c6\u9891\u7f51\u5740",lang_video_size:"\u89c6\u9891\u5c3a\u5bf8",lang_videoW:"\u5bbd\u5ea6",lang_videoH:"\u9ad8\u5ea6",lang_alignment:"\u5bf9\u9f50\u65b9\u5f0f",videoSearchTxt:{value:"\u8bf7\u8f93\u5165\u641c\u7d22\u5173\u952e\u5b57\uff01"},videoType:{options:["\u5168\u90e8","\u70ed\u95e8","\u5a31\u4e50","\u641e\u7b11","\u4f53\u80b2","\u79d1\u6280","\u7efc\u827a"]},videoSearchBtn:{value:"\u767e\u5ea6\u4e00\u4e0b"},videoSearchReset:{value:"\u6e05\u7a7a\u7ed3\u679c"},lang_input_fileStatus:" \u5f53\u524d\u672a\u4e0a\u4f20\u6587\u4ef6",startUpload:{style:"background:url(upload.png) no-repeat;"},lang_upload_size:"\u89c6\u9891\u5c3a\u5bf8",lang_upload_width:"\u5bbd\u5ea6",lang_upload_height:"\u9ad8\u5ea6",lang_upload_alignment:"\u5bf9\u9f50\u65b9\u5f0f",lang_format_advice:"\u5efa\u8bae\u4f7f\u7528mp4\u683c\u5f0f."},numError:"\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u6570\u503c\uff0c\u5982123,400",floatLeft:"\u5de6\u6d6e\u52a8",floatRight:"\u53f3\u6d6e\u52a8",'"default"':"\u9ed8\u8ba4",block:"\u72ec\u5360\u4e00\u884c",urlError:"\u8f93\u5165\u7684\u89c6\u9891\u5730\u5740\u6709\u8bef\uff0c\u8bf7\u68c0\u67e5\u540e\u518d\u8bd5\uff01",loading:" &nbsp;\u89c6\u9891\u52a0\u8f7d\u4e2d\uff0c\u8bf7\u7b49\u5f85\u2026\u2026",clickToSelect:"\u70b9\u51fb\u9009\u4e2d",goToSource:"\u8bbf\u95ee\u6e90\u89c6\u9891",noVideo:" &nbsp; &nbsp;\u62b1\u6b49\uff0c\u627e\u4e0d\u5230\u5bf9\u5e94\u7684\u89c6\u9891\uff0c\u8bf7\u91cd\u8bd5\uff01",browseFiles:"\u6d4f\u89c8\u6587\u4ef6",uploadSuccess:"\u4e0a\u4f20\u6210\u529f!",delSuccessFile:"\u4ece\u6210\u529f\u961f\u5217\u4e2d\u79fb\u9664",delFailSaveFile:"\u79fb\u9664\u4fdd\u5b58\u5931\u8d25\u6587\u4ef6",statusPrompt:" \u4e2a\u6587\u4ef6\u5df2\u4e0a\u4f20\uff01 ",flashVersionError:"\u5f53\u524dFlash\u7248\u672c\u8fc7\u4f4e\uff0c\u8bf7\u66f4\u65b0FlashPlayer\u540e\u91cd\u8bd5\uff01",flashLoadingError:"Flash\u52a0\u8f7d\u5931\u8d25!\u8bf7\u68c0\u67e5\u8def\u5f84\u6216\u7f51\u7edc\u72b6\u6001",fileUploadReady:"\u7b49\u5f85\u4e0a\u4f20\u2026\u2026",delUploadQueue:"\u4ece\u4e0a\u4f20\u961f\u5217\u4e2d\u79fb\u9664",limitPrompt1:"\u5355\u6b21\u4e0d\u80fd\u9009\u62e9\u8d85\u8fc7",limitPrompt2:"\u4e2a\u6587\u4ef6\uff01\u8bf7\u91cd\u65b0\u9009\u62e9\uff01",delFailFile:"\u79fb\u9664\u5931\u8d25\u6587\u4ef6",fileSizeLimit:"\u6587\u4ef6\u5927\u5c0f\u8d85\u51fa\u9650\u5236\uff01",emptyFile:"\u7a7a\u6587\u4ef6\u65e0\u6cd5\u4e0a\u4f20\uff01",fileTypeError:"\u6587\u4ef6\u7c7b\u578b\u4e0d\u5141\u8bb8\uff01",unknownError:"\u672a\u77e5\u9519\u8bef\uff01",fileUploading:"\u4e0a\u4f20\u4e2d\uff0c\u8bf7\u7b49\u5f85\u2026\u2026",cancelUpload:"\u53d6\u6d88\u4e0a\u4f20",netError:"\u7f51\u7edc\u9519\u8bef",failUpload:"\u4e0a\u4f20\u5931\u8d25!",serverIOError:"\u670d\u52a1\u5668IO\u9519\u8bef\uff01",noAuthority:"\u65e0\u6743\u9650\uff01",fileNumLimit:"\u4e0a\u4f20\u4e2a\u6570\u9650\u5236",failCheck:"\u9a8c\u8bc1\u5931\u8d25\uff0c\u672c\u6b21\u4e0a\u4f20\u88ab\u8df3\u8fc7\uff01",fileCanceling:"\u53d6\u6d88\u4e2d\uff0c\u8bf7\u7b49\u5f85\u2026\u2026",stopUploading:"\u4e0a\u4f20\u5df2\u505c\u6b62\u2026\u2026",uploadSelectFile:"\u70b9\u51fb\u9009\u62e9\u6587\u4ef6",uploadAddFile:"\u7ee7\u7eed\u6dfb\u52a0",uploadStart:"\u5f00\u59cb\u4e0a\u4f20",uploadPause:"\u6682\u505c\u4e0a\u4f20",uploadContinue:"\u7ee7\u7eed\u4e0a\u4f20",uploadRetry:"\u91cd\u8bd5\u4e0a\u4f20",uploadDelete:"\u5220\u9664",uploadTurnLeft:"\u5411\u5de6\u65cb\u8f6c",uploadTurnRight:"\u5411\u53f3\u65cb\u8f6c",uploadPreview:"\u9884\u89c8\u4e2d",updateStatusReady:"\u9009\u4e2d_\u4e2a\u6587\u4ef6\uff0c\u5171_KB\u3002",updateStatusConfirm:"\u6210\u529f\u4e0a\u4f20_\u4e2a\uff0c_\u4e2a\u5931\u8d25",updateStatusFinish:"\u5171_\u4e2a(_KB)\uff0c_\u4e2a\u6210\u529f\u4e0a\u4f20",updateStatusError:"\uff0c_\u5f20\u4e0a\u4f20\u5931\u8d25\u3002",errorNotSupport:"WebUploader \u4e0d\u652f\u6301\u60a8\u7684\u6d4f\u89c8\u5668\uff01\u5982\u679c\u4f60\u4f7f\u7528\u7684\u662fIE\u6d4f\u89c8\u5668\uff0c\u8bf7\u5c1d\u8bd5\u5347\u7ea7 flash \u64ad\u653e\u5668\u3002",errorLoadConfig:"\u540e\u7aef\u914d\u7f6e\u9879\u6ca1\u6709\u6b63\u5e38\u52a0\u8f7d\uff0c\u4e0a\u4f20\u63d2\u4ef6\u4e0d\u80fd\u6b63\u5e38\u4f7f\u7528\uff01",errorExceedSize:"\u6587\u4ef6\u5927\u5c0f\u8d85\u51fa",errorFileType:"\u6587\u4ef6\u683c\u5f0f\u4e0d\u5141\u8bb8",errorInterrupt:"\u6587\u4ef6\u4f20\u8f93\u4e2d\u65ad",errorUploadRetry:"\u4e0a\u4f20\u5931\u8d25\uff0c\u8bf7\u91cd\u8bd5",errorHttp:"http\u8bf7\u6c42\u9519\u8bef",errorServerUpload:"\u670d\u52a1\u5668\u8fd4\u56de\u51fa\u9519"},webapp:{tip1:"\u672c\u529f\u80fd\u7531\u767e\u5ea6APP\u63d0\u4f9b\uff0c\u5982\u770b\u5230\u6b64\u9875\u9762\uff0c\u8bf7\u5404\u4f4d\u7ad9\u957f\u9996\u5148\u7533\u8bf7\u767e\u5ea6APPKey!",tip2:"\u7533\u8bf7\u5b8c\u6210\u4e4b\u540e\u8bf7\u81f3ueditor.config.js\u4e2d\u914d\u7f6e\u83b7\u5f97\u7684appkey! ",applyFor:"\u70b9\u6b64\u7533\u8bf7",anthorApi:"\u767e\u5ea6API"},template:{"static":{lang_template_insert:"\u63d2\u5165\u6a21\u7248"}},scrawl:{"static":{lang_input_previousStep:"\u4e0a\u4e00\u6b65",lang_input_nextsStep:"\u4e0b\u4e00\u6b65",lang_input_clear:"\u6e05\u7a7a",lang_input_addPic:"\u6dfb\u52a0\u80cc\u666f",lang_input_ScalePic:"\u7f29\u653e\u80cc\u666f",lang_input_removePic:"\u5220\u9664\u80cc\u666f",J_imgTxt:{title:"\u6dfb\u52a0\u80cc\u666f\u56fe\u7247"}},noScarwl:"\u5c1a\u672a\u4f5c\u753b\uff0c\u767d\u7eb8\u4e00\u5f20~",scrawlUpLoading:"\u6d82\u9e26\u4e0a\u4f20\u4e2d,\u522b\u6025\u54e6~",continueBtn:"\u7ee7\u7eed",imageError:"\u7cdf\u7cd5\uff0c\u56fe\u7247\u8bfb\u53d6\u5931\u8d25\u4e86\uff01",backgroundUploading:"\u80cc\u666f\u56fe\u7247\u4e0a\u4f20\u4e2d,\u522b\u6025\u54e6~"},music:{"static":{lang_input_tips:"\u8f93\u5165\u6b4c\u624b/\u6b4c\u66f2/\u4e13\u8f91\uff0c\u641c\u7d22\u60a8\u611f\u5174\u8da3\u7684\u97f3\u4e50\uff01",J_searchBtn:{value:"\u641c\u7d22\u6b4c\u66f2"}},emptyTxt:"\u672a\u641c\u7d22\u5230\u76f8\u5173\u97f3\u4e50\u7ed3\u679c\uff0c\u8bf7\u6362\u4e00\u4e2a\u5173\u952e\u8bcd\u8bd5\u8bd5\u3002",chapter:"\u6b4c\u66f2",singer:"\u6b4c\u624b",special:"\u4e13\u8f91",listenTest:"\u8bd5\u542c"},anchor:{"static":{lang_input_anchorName:"\u951a\u70b9\u540d\u5b57\uff1a"}},charts:{"static":{lang_data_source:"\u6570\u636e\u6e90\uff1a",lang_chart_format:"\u56fe\u8868\u683c\u5f0f\uff1a",lang_data_align:"\u6570\u636e\u5bf9\u9f50\u65b9\u5f0f",lang_chart_align_same:"\u6570\u636e\u6e90\u4e0e\u56fe\u8868X\u8f74Y\u8f74\u4e00\u81f4",lang_chart_align_reverse:"\u6570\u636e\u6e90\u4e0e\u56fe\u8868X\u8f74Y\u8f74\u76f8\u53cd",lang_chart_title:"\u56fe\u8868\u6807\u9898",lang_chart_main_title:"\u4e3b\u6807\u9898\uff1a",lang_chart_sub_title:"\u5b50\u6807\u9898\uff1a",lang_chart_x_title:"X\u8f74\u6807\u9898\uff1a",lang_chart_y_title:"Y\u8f74\u6807\u9898\uff1a",lang_chart_tip:"\u63d0\u793a\u6587\u5b57",lang_cahrt_tip_prefix:"\u63d0\u793a\u6587\u5b57\u524d\u7f00\uff1a",lang_cahrt_tip_description:"\u4ec5\u997c\u56fe\u6709\u6548\uff0c \u5f53\u9f20\u6807\u79fb\u52a8\u5230\u997c\u56fe\u4e2d\u76f8\u5e94\u7684\u5757\u4e0a\u65f6\uff0c\u63d0\u793a\u6846\u5185\u7684\u6587\u5b57\u7684\u524d\u7f00",lang_chart_data_unit:"\u6570\u636e\u5355\u4f4d",lang_chart_data_unit_title:"\u5355\u4f4d\uff1a",lang_chart_data_unit_description:"\u663e\u793a\u5728\u6bcf\u4e2a\u6570\u636e\u70b9\u4e0a\u7684\u6570\u636e\u7684\u5355\u4f4d\uff0c \u6bd4\u5982\uff1a \u6e29\u5ea6\u7684\u5355\u4f4d \u2103",lang_chart_type:"\u56fe\u8868\u7c7b\u578b\uff1a",lang_prev_btn:"\u4e0a\u4e00\u4e2a",lang_next_btn:"\u4e0b\u4e00\u4e2a"}},emotion:{"static":{lang_input_choice:"\u7cbe\u9009",lang_input_Tuzki:"\u5154\u65af\u57fa",lang_input_BOBO:"BOBO",lang_input_lvdouwa:"\u7eff\u8c46\u86d9",lang_input_babyCat:"baby\u732b",lang_input_bubble:"\u6ce1\u6ce1",lang_input_youa:"\u6709\u554a"}},gmap:{"static":{lang_input_address:"\u5730\u5740",lang_input_search:"\u641c\u7d22",address:{value:"\u5317\u4eac"}},searchError:"\u65e0\u6cd5\u5b9a\u4f4d\u5230\u8be5\u5730\u5740!"},help:{"static":{lang_input_about:"\u5173\u4e8eUEditor",lang_input_shortcuts:"\u5feb\u6377\u952e",lang_input_introduction:"UEditor\u662f\u7531\u767e\u5ea6web\u524d\u7aef\u7814\u53d1\u90e8\u5f00\u53d1\u7684\u6240\u89c1\u5373\u6240\u5f97\u5bcc\u6587\u672cweb\u7f16\u8f91\u5668\uff0c\u5177\u6709\u8f7b\u91cf\uff0c\u53ef\u5b9a\u5236\uff0c\u6ce8\u91cd\u7528\u6237\u4f53\u9a8c\u7b49\u7279\u70b9\u3002\u5f00\u6e90\u57fa\u4e8eBSD\u534f\u8bae\uff0c\u5141\u8bb8\u81ea\u7531\u4f7f\u7528\u548c\u4fee\u6539\u4ee3\u7801\u3002",lang_Txt_shortcuts:"\u5feb\u6377\u952e",lang_Txt_func:"\u529f\u80fd",lang_Txt_bold:"\u7ed9\u9009\u4e2d\u5b57\u8bbe\u7f6e\u4e3a\u52a0\u7c97",lang_Txt_copy:"\u590d\u5236\u9009\u4e2d\u5185\u5bb9",lang_Txt_cut:"\u526a\u5207\u9009\u4e2d\u5185\u5bb9",lang_Txt_Paste:"\u7c98\u8d34",lang_Txt_undo:"\u91cd\u65b0\u6267\u884c\u4e0a\u6b21\u64cd\u4f5c",lang_Txt_redo:"\u64a4\u9500\u4e0a\u4e00\u6b21\u64cd\u4f5c",lang_Txt_italic:"\u7ed9\u9009\u4e2d\u5b57\u8bbe\u7f6e\u4e3a\u659c\u4f53",lang_Txt_underline:"\u7ed9\u9009\u4e2d\u5b57\u52a0\u4e0b\u5212\u7ebf",lang_Txt_selectAll:"\u5168\u90e8\u9009\u4e2d",lang_Txt_visualEnter:"\u8f6f\u56de\u8f66",lang_Txt_fullscreen:"\u5168\u5c4f"}},insertframe:{"static":{lang_input_address:"\u5730\u5740\uff1a",lang_input_width:"\u5bbd\u5ea6\uff1a",lang_input_height:"\u9ad8\u5ea6\uff1a",lang_input_isScroll:"\u5141\u8bb8\u6eda\u52a8\u6761\uff1a",lang_input_frameborder:"\u663e\u793a\u6846\u67b6\u8fb9\u6846\uff1a",lang_input_alignMode:"\u5bf9\u9f50\u65b9\u5f0f\uff1a",align:{title:"\u5bf9\u9f50\u65b9\u5f0f",options:["\u9ed8\u8ba4","\u5de6\u5bf9\u9f50","\u53f3\u5bf9\u9f50","\u5c45\u4e2d"]}},enterAddress:"\u8bf7\u8f93\u5165\u5730\u5740!"},link:{"static":{lang_input_text:"\u6587\u672c\u5185\u5bb9\uff1a",lang_input_url:"\u94fe\u63a5\u5730\u5740\uff1a",lang_input_title:"\u6807\u9898\uff1a",lang_input_target:"\u662f\u5426\u5728\u65b0\u7a97\u53e3\u6253\u5f00\uff1a"},validLink:"\u53ea\u652f\u6301\u9009\u4e2d\u4e00\u4e2a\u94fe\u63a5\u65f6\u751f\u6548",httpPrompt:"\u60a8\u8f93\u5165\u7684\u8d85\u94fe\u63a5\u4e2d\u4e0d\u5305\u542bhttp\u7b49\u534f\u8bae\u540d\u79f0\uff0c\u9ed8\u8ba4\u5c06\u4e3a\u60a8\u6dfb\u52a0http://\u524d\u7f00"},map:{"static":{lang_city:"\u57ce\u5e02",lang_address:"\u5730\u5740",city:{value:"\u5317\u4eac"},lang_search:"\u641c\u7d22",lang_dynamicmap:"\u63d2\u5165\u52a8\u6001\u5730\u56fe"},cityMsg:"\u8bf7\u9009\u62e9\u57ce\u5e02",errorMsg:"\u62b1\u6b49\uff0c\u627e\u4e0d\u5230\u8be5\u4f4d\u7f6e\uff01"},searchreplace:{"static":{lang_tab_search:"\u67e5\u627e",lang_tab_replace:"\u66ff\u6362",lang_search1:"\u67e5\u627e",lang_search2:"\u67e5\u627e",lang_replace:"\u66ff\u6362",lang_searchReg:"\u652f\u6301\u6b63\u5219\u8868\u8fbe\u5f0f\uff0c\u6dfb\u52a0\u524d\u540e\u659c\u6760\u6807\u793a\u4e3a\u6b63\u5219\u8868\u8fbe\u5f0f\uff0c\u4f8b\u5982\u201c/\u8868\u8fbe\u5f0f/\u201d",lang_searchReg1:"\u652f\u6301\u6b63\u5219\u8868\u8fbe\u5f0f\uff0c\u6dfb\u52a0\u524d\u540e\u659c\u6760\u6807\u793a\u4e3a\u6b63\u5219\u8868\u8fbe\u5f0f\uff0c\u4f8b\u5982\u201c/\u8868\u8fbe\u5f0f/\u201d",lang_case_sensitive1:"\u533a\u5206\u5927\u5c0f\u5199",lang_case_sensitive2:"\u533a\u5206\u5927\u5c0f\u5199",nextFindBtn:{value:"\u4e0b\u4e00\u4e2a"},preFindBtn:{value:"\u4e0a\u4e00\u4e2a"},nextReplaceBtn:{value:"\u4e0b\u4e00\u4e2a"},preReplaceBtn:{value:"\u4e0a\u4e00\u4e2a"},repalceBtn:{value:"\u66ff\u6362"},repalceAllBtn:{value:"\u5168\u90e8\u66ff\u6362"}},getEnd:"\u5df2\u7ecf\u641c\u7d22\u5230\u6587\u7ae0\u672b\u5c3e\uff01",getStart:"\u5df2\u7ecf\u641c\u7d22\u5230\u6587\u7ae0\u5934\u90e8",countMsg:"\u603b\u5171\u66ff\u6362\u4e86{#count}\u5904\uff01"},snapscreen:{"static":{lang_showMsg:"\u622a\u56fe\u529f\u80fd\u9700\u8981\u9996\u5148\u5b89\u88c5UEditor\u622a\u56fe\u63d2\u4ef6\uff01 ",lang_download:"\u70b9\u6b64\u4e0b\u8f7d",lang_step1:"\u7b2c\u4e00\u6b65\uff0c\u4e0b\u8f7dUEditor\u622a\u56fe\u63d2\u4ef6\u5e76\u8fd0\u884c\u5b89\u88c5\u3002",lang_step2:"\u7b2c\u4e8c\u6b65\uff0c\u63d2\u4ef6\u5b89\u88c5\u5b8c\u6210\u540e\u5373\u53ef\u4f7f\u7528\uff0c\u5982\u4e0d\u751f\u6548\uff0c\u8bf7\u91cd\u542f\u6d4f\u89c8\u5668\u540e\u518d\u8bd5\uff01"}},spechars:{"static":{},tsfh:"\u7279\u6b8a\u5b57\u7b26",lmsz:"\u7f57\u9a6c\u5b57\u7b26",szfh:"\u6570\u5b66\u5b57\u7b26",rwfh:"\u65e5\u6587\u5b57\u7b26",xlzm:"\u5e0c\u814a\u5b57\u6bcd",ewzm:"\u4fc4\u6587\u5b57\u7b26",pyzm:"\u62fc\u97f3\u5b57\u6bcd",yyyb:"\u82f1\u8bed\u97f3\u6807",zyzf:"\u5176\u4ed6"},edittable:{"static":{lang_tableStyle:"\u8868\u683c\u6837\u5f0f",lang_insertCaption:"\u6dfb\u52a0\u8868\u683c\u540d\u79f0\u884c",lang_insertTitle:"\u6dfb\u52a0\u8868\u683c\u6807\u9898\u884c",lang_insertTitleCol:"\u6dfb\u52a0\u8868\u683c\u6807\u9898\u5217",lang_orderbycontent:"\u4f7f\u8868\u683c\u5185\u5bb9\u53ef\u6392\u5e8f",lang_tableSize:"\u81ea\u52a8\u8c03\u6574\u8868\u683c\u5c3a\u5bf8",lang_autoSizeContent:"\u6309\u8868\u683c\u6587\u5b57\u81ea\u9002\u5e94",lang_autoSizePage:"\u6309\u9875\u9762\u5bbd\u5ea6\u81ea\u9002\u5e94",lang_example:"\u793a\u4f8b",lang_borderStyle:"\u8868\u683c\u8fb9\u6846",lang_color:"\u989c\u8272:"},captionName:"\u8868\u683c\u540d\u79f0",titleName:"\u6807\u9898",cellsName:"\u5185\u5bb9",errorMsg:"\u6709\u5408\u5e76\u5355\u5143\u683c\uff0c\u4e0d\u53ef\u6392\u5e8f"},edittip:{"static":{lang_delRow:"\u5220\u9664\u6574\u884c",lang_delCol:"\u5220\u9664\u6574\u5217"}},edittd:{"static":{lang_tdBkColor:"\u80cc\u666f\u989c\u8272:"}},formula:{"static":{}},wordimage:{"static":{lang_resave:"\u8f6c\u5b58\u6b65\u9aa4",uploadBtn:{src:"upload.png",alt:"\u4e0a\u4f20"},clipboard:{style:"background: url(copy.png) -153px -1px no-repeat;"},lang_step:"1\u3001\u70b9\u51fb\u9876\u90e8\u590d\u5236\u6309\u94ae\uff0c\u5c06\u5730\u5740\u590d\u5236\u5230\u526a\u8d34\u677f\uff1b2\u3001\u70b9\u51fb\u6dfb\u52a0\u7167\u7247\u6309\u94ae\uff0c\u5728\u5f39\u51fa\u7684\u5bf9\u8bdd\u6846\u4e2d\u4f7f\u7528Ctrl+V\u7c98\u8d34\u5730\u5740\uff1b3\u3001\u70b9\u51fb\u6253\u5f00\u540e\u9009\u62e9\u56fe\u7247\u4e0a\u4f20\u6d41\u7a0b\u3002"},fileType:"\u56fe\u7247",flashError:"FLASH\u521d\u59cb\u5316\u5931\u8d25\uff0c\u8bf7\u68c0\u67e5FLASH\u63d2\u4ef6\u662f\u5426\u6b63\u786e\u5b89\u88c5\uff01",netError:"\u7f51\u7edc\u8fde\u63a5\u9519\u8bef\uff0c\u8bf7\u91cd\u8bd5\uff01",copySuccess:"\u56fe\u7247\u5730\u5740\u5df2\u7ecf\u590d\u5236\uff01",flashI18n:{}},autosave:{saving:"\u4fdd\u5b58\u4e2d...",success:"\u672c\u5730\u4fdd\u5b58\u6210\u529f"}};
var 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:e.indexOf(" applewebkit/")>-1,mac:e.indexOf("macintosh")>-1,quirks:"BackCompat"==document.compatMode};i.gecko="Gecko"==navigator.product&&!i.webkit&&!i.opera&&!i.ie;var n=0;if(i.ie){var o=e.match(/(?:msie\s([\w.]+))/),r=e.match(/(?:trident.*rv:([\w.]+))/);n=o&&r&&o[1]&&r[1]?Math.max(1*o[1],1*r[1]):o&&o[1]?1*o[1]:r&&r[1]?1*r[1]:0,i.ie11Compat=11==document.documentMode,i.ie9Compat=9==document.documentMode,i.ie8=!!document.documentMode,i.ie8Compat=8==document.documentMode,i.ie7Compat=7==n&&!document.documentMode||7==document.documentMode,i.ie6Compat=7>n||i.quirks,i.ie9above=n>8,i.ie9below=9>n,i.ie11above=n>10,i.ie11below=11>n}if(i.gecko){var a=e.match(/rv:([\d\.]+)/);a&&(a=a[1].split("."),n=1e4*a[0]+100*(a[1]||0)+1*(a[2]||0))}return/chrome\/(\d+\.\d)/i.test(e)&&(i.chrome=+RegExp.$1),/(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(e)&&!/chrome/i.test(e)&&(i.safari=+(RegExp.$1||RegExp.$2)),i.opera&&(n=parseFloat(t.version())),i.webkit&&(n=parseFloat(e.match(/ applewebkit\/(\d+)/)[1])),i.version=n,i.isCompatible=!i.mobile&&(i.ie&&n>=6||i.gecko&&n>=10801||i.opera&&n>=9.5||i.air&&n>=1||i.webkit&&n>=522||!1),i}(),ie=browser.ie,webkit=browser.webkit,gecko=browser.gecko,opera=browser.opera,utils=UE.utils={each:function(e,t,i){if(null!=e)if(e.length===+e.length){for(var n=0,o=e.length;o>n;n++)if(t.call(i,e[n],n,e)===!1)return!1}else for(var r in e)if(e.hasOwnProperty(r)&&t.call(i,e[r],r,e)===!1)return!1},makeInstance:function(e){var t=new Function;return t.prototype=e,e=new t,t.prototype=null,e},extend:function(e,t,i){if(t)for(var n in t)i&&e.hasOwnProperty(n)||(e[n]=t[n]);return e},extend2:function(e){for(var t=arguments,i=1;i<t.length;i++){var n=t[i];for(var o in n)e.hasOwnProperty(o)||(e[o]=n[o])}return e},inherits:function(e,t){var i=e.prototype,n=utils.makeInstance(t.prototype);return utils.extend(n,i,!0),e.prototype=n,n.constructor=e},bind:function(e,t){return function(){return e.apply(t,arguments)}},defer:function(e,t,i){var n;return function(){i&&clearTimeout(n),n=setTimeout(e,t)}},indexOf:function(e,t,i){var n=-1;return i=this.isNumber(i)?i:0,this.each(e,function(e,o){return o>=i&&e===t?(n=o,!1):void 0}),n},removeItem:function(e,t){for(var i=0,n=e.length;n>i;i++)e[i]===t&&(e.splice(i,1),i--)},trim:function(e){return e.replace(/(^[ \t\n\r]+)|([ \t\n\r]+$)/g,"")},listToMap:function(e){if(!e)return{};e=utils.isArray(e)?e:e.split(",");for(var t,i=0,n={};t=e[i++];)n[t.toUpperCase()]=n[t]=1;return n},unhtml:function(e,t){return e?e.replace(t||/[&<">'](?:(amp|lt|quot|gt|#39|nbsp|#\d+);)?/g,function(e,t){return t?e:{"<":"&lt;","&":"&amp;",'"':"&quot;",">":"&gt;","'":"&#39;"}[e]}):""},unhtmlForUrl:function(e,t){return e?e.replace(t||/[<">']/g,function(e){return{"<":"&lt;","&":"&amp;",'"':"&quot;",">":"&gt;","'":"&#39;"}[e]}):""},html:function(e){return e?e.replace(/&((g|l|quo)t|amp|#39|nbsp);/g,function(e){return{"&lt;":"<","&amp;":"&","&quot;":'"',"&gt;":">","&#39;":"'","&nbsp;":" "}[e]}):""},cssStyleToDomStyle:function(){var e=document.createElement("div").style,t={"float":void 0!=e.cssFloat?"cssFloat":void 0!=e.styleFloat?"styleFloat":"float"};return function(e){return t[e]||(t[e]=e.toLowerCase().replace(/-./g,function(e){return e.charAt(1).toUpperCase()}))}}(),loadFile:function(){function e(e,i){try{for(var n,o=0;n=t[o++];)if(n.doc===e&&n.url==(i.src||i.href))return n}catch(r){return null}}var t=[];return function(i,n,o){var r=e(i,n);if(r)return void(r.ready?o&&o():r.funs.push(o));if(t.push({doc:i,url:n.src||n.href,funs:[o]}),!i.body){var a=[];for(var s in n)"tag"!=s&&a.push(s+'="'+n[s]+'"');return void i.write("<"+n.tag+" "+a.join(" ")+" ></"+n.tag+">")}if(!n.id||!i.getElementById(n.id)){var l=i.createElement(n.tag);delete n.tag;for(var s in n)l.setAttribute(s,n[s]);l.onload=l.onreadystatechange=function(){if(!this.readyState||/loaded|complete/.test(this.readyState)){if(r=e(i,n),r.funs.length>0){r.ready=1;for(var t;t=r.funs.pop();)t()}l.onload=l.onreadystatechange=null}},l.onerror=function(){throw Error("The load "+(n.href||n.src)+" fails,check the url settings of file ueditor.config.js ")},i.getElementsByTagName("head")[0].appendChild(l)}}}(),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(i.length>3)return"";t="#";for(var n,o=0;n=i[o++];)n=parseInt(n.replace(/[^\d]/gi,""),10).toString(16),t+=1==n.length?"0"+n:n;t=t.toUpperCase()}return t},optCss:function(e){function t(e,t){if(!e)return"";var i=e.top,n=e.bottom,o=e.left,r=e.right,a="";if(i&&o&&n&&r)a+=";"+t+":"+(i==n&&n==o&&o==r?i:i==n&&o==r?i+" "+o:o==r?i+" "+o+" "+n:i+" "+r+" "+n+" "+o)+";";else for(var s in e)a+=";"+t+"-"+s+":"+e[s]+";";return a}var i,n;return e=e.replace(/(padding|margin|border)\-([^:]+):([^;]+);?/gi,function(e,t,o,r){if(1==r.split(" ").length)switch(t){case"padding":return!i&&(i={}),i[o]=r,"";case"margin":return!n&&(n={}),n[o]=r,"";case"border":return"initial"==r?"":e}return e}),e+=t(i,"padding")+t(n,"margin"),e.replace(/^[ \n\r\t;]*|[ \n\r\t]*$/,"").replace(/;([ \n\r\t]+)|\1;/g,";").replace(/(&((l|g)t|quot|#39))?;{2,}/g,function(e,t){return t?t+";;":";"})},clone:function(e,t){var i;t=t||{};for(var n in e)e.hasOwnProperty(n)&&(i=e[n],"object"==typeof i?(t[n]=utils.isArray(i)?[]:{},utils.clone(e[n],t[n])):t[n]=i);return t},transUnitToPx:function(e){if(!/(pt|cm)/.test(e))return e;var t;switch(e.replace(/([\d.]+)(\w+)/,function(i,n,o){e=n,t=o}),t){case"cm":e=25*parseFloat(e);break;case"pt":e=Math.round(96*parseFloat(e)/72)}return e+(e?"px":"")},domReady:function(){function e(e){e.isReady=!0;for(var i;i=t.pop();i());}var t=[];return function(i,n){n=n||window;var o=n.document;i&&t.push(i),"complete"===o.readyState?e(o):(o.isReady&&e(o),browser.ie&&11!=browser.version?(!function(){if(!o.isReady){try{o.documentElement.doScroll("left")}catch(t){return void setTimeout(arguments.callee,0)}e(o)}}(),n.attachEvent("onload",function(){e(o)})):(o.addEventListener("DOMContentLoaded",function(){o.removeEventListener("DOMContentLoaded",arguments.callee,!1),e(o)},!1),n.addEventListener("load",function(){e(o)},!1)))}}(),cssRule:browser.ie&&11!=browser.version?function(e,t,i){var n,o;return void 0===t||t&&t.nodeType&&9==t.nodeType?(i=t&&t.nodeType&&9==t.nodeType?t:i||document,n=i.indexList||(i.indexList={}),o=n[e],void 0!==o?i.styleSheets[o].cssText:void 0):(i=i||document,n=i.indexList||(i.indexList={}),o=n[e],""===t?void 0!==o?(i.styleSheets[o].cssText="",delete n[e],!0):!1:(void 0!==o?sheetStyle=i.styleSheets[o]:(sheetStyle=i.createStyleSheet("",o=i.styleSheets.length),n[e]=o),void(sheetStyle.cssText=t)))}:function(e,t,i){var n;return void 0===t||t&&t.nodeType&&9==t.nodeType?(i=t&&t.nodeType&&9==t.nodeType?t:i||document,n=i.getElementById(e),n?n.innerHTML:void 0):(i=i||document,n=i.getElementById(e),""===t?n?(n.parentNode.removeChild(n),!0):!1:void(n?n.innerHTML=t:(n=i.createElement("style"),n.id=e,n.innerHTML=t,i.getElementsByTagName("head")[0].appendChild(n))))},sort:function(e,t){t=t||function(e,t){return e.localeCompare(t)};for(var i=0,n=e.length;n>i;i++)for(var o=i,r=e.length;r>o;o++)if(t(e[i],e[o])>0){var a=e[i];e[i]=e[o],e[o]=a}return e},serializeParam:function(e){var t=[];for(var i in e)if("method"!=i&&"timeout"!=i&&"async"!=i)if("function"!=(typeof e[i]).toLowerCase()&&"object"!=(typeof e[i]).toLowerCase())t.push(encodeURIComponent(i)+"="+encodeURIComponent(e[i]));else if(utils.isArray(e[i]))for(var n=0;n<e[i].length;n++)t.push(encodeURIComponent(i)+"[]="+encodeURIComponent(e[i][n]));return t.join("&")},formatUrl:function(e){var t=e.replace(/&&/g,"&");return t=t.replace(/\?&/g,"?"),t=t.replace(/&$/g,""),t=t.replace(/&#/g,"#"),t=t.replace(/&+/g,"&")},isCrossDomainUrl:function(e){var t=document.createElement("a");return t.href=e,browser.ie&&(t.href=t.href),!(t.protocol==location.protocol&&t.hostname==location.hostname&&(t.port==location.port||"80"==t.port&&""==location.port||""==t.port&&"80"==location.port))},clearEmptyAttrs:function(e){for(var t in e)""===e[t]&&delete e[t];return e},str2json:function(e){return utils.isString(e)?window.JSON?JSON.parse(e):new Function("return "+utils.trim(e||""))():null},json2str:function(){function e(e){return/["\\\x00-\x1f]/.test(e)&&(e=e.replace(/["\\\x00-\x1f]/g,function(e){var t=o[e];return t?t:(t=e.charCodeAt(),"\\u00"+Math.floor(t/16).toString(16)+(t%16).toString(16))})),'"'+e+'"'}function t(e){var t,i,n,o=["["],r=e.length;for(i=0;r>i;i++)switch(n=e[i],typeof n){case"undefined":case"function":case"unknown":break;default:t&&o.push(","),o.push(utils.json2str(n)),t=1}return o.push("]"),o.join("")}function i(e){return 10>e?"0"+e:e}function n(e){return'"'+e.getFullYear()+"-"+i(e.getMonth()+1)+"-"+i(e.getDate())+"T"+i(e.getHours())+":"+i(e.getMinutes())+":"+i(e.getSeconds())+'"'}if(window.JSON)return JSON.stringify;var o={"\b":"\\b","	":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return function(i){switch(typeof i){case"undefined":return"undefined";case"number":return isFinite(i)?String(i):"null";case"string":return e(i);case"boolean":return String(i);default:if(null===i)return"null";if(utils.isArray(i))return t(i);if(utils.isDate(i))return n(i);var o,r,a=["{"],s=utils.json2str;for(var l in i)if(Object.prototype.hasOwnProperty.call(i,l))switch(r=i[l],typeof r){case"undefined":case"unknown":case"function":break;default:o&&a.push(","),o=1,a.push(s(l)+":"+s(r))}return a.push("}"),a.join("")}}}()};utils.each(["String","Function","Array","Number","RegExp","Object","Date"],function(e){UE.utils["is"+e]=function(t){return Object.prototype.toString.apply(t)=="[object "+e+"]"}}),UE.utils.getElementsByClass=function(e,t){if(e.querySelectorAll)return e.querySelectorAll("."+t);if(e.getElementsByClassName)return e.getElementsByClassName(t);var i,n,o,r=e.getElementsByTagName("*");t=t.split(" ");for(var a in r){var i=r[a].className;n=!0;for(var s in t)if(-1==i.indexOf(t[s])){n=!1;break}n&&o.push(r[a])}return o};var EventBase=UE.EventBase=function(){};EventBase.prototype={addListener:function(e,t){e=utils.trim(e).split(/\s+/);for(var i,n=0;i=e[n++];)getListener(this,i,!0).push(t)},on:function(e,t){return this.addListener(e,t)},off:function(e,t){return this.removeListener(e,t)},trigger:function(){return this.fireEvent.apply(this,arguments)},removeListener:function(e,t){e=utils.trim(e).split(/\s+/);for(var i,n=0;i=e[n++];)utils.removeItem(getListener(this,i)||[],t)},fireEvent:function(){var e=arguments[0];e=utils.trim(e).split(" ");for(var t,i=0;t=e[i++];){var n,o,r,a=getListener(this,t);if(a)for(r=a.length;r--;)if(a[r]){if(o=a[r].apply(this,arguments),o===!0)return o;void 0!==o&&(n=o)}(o=this["on"+t.toLowerCase()])&&(n=o.apply(this,arguments))}return n}};var dtd=dom.dtd=function(){function e(e){for(var t in e)e[t.toUpperCase()]=e[t];return e}var t=utils.extend2,i=e({isindex:1,fieldset:1}),n=e({input:1,button:1,select:1,textarea:1,label:1}),o=t(e({a:1}),n),r=t({iframe:1},o),a=e({hr:1,ul:1,menu:1,div:1,blockquote:1,noscript:1,table:1,center:1,address:1,dir:1,pre:1,h5:1,dl:1,h4:1,noframes:1,h6:1,ol:1,h1:1,h3:1,h2:1}),s=e({ins:1,del:1,script:1,style:1}),l=t(e({b:1,acronym:1,bdo:1,"var":1,"#":1,abbr:1,code:1,br:1,i:1,cite:1,kbd:1,u:1,strike:1,s:1,tt:1,strong:1,q:1,samp:1,em:1,dfn:1,span:1}),s),d=t(e({sub:1,img:1,embed:1,object:1,sup:1,basefont:1,map:1,applet:1,font:1,big:1,small:1}),l),c=t(e({p:1}),d),u=t(e({iframe:1}),d,n),m=e({img:1,embed:1,noscript:1,br:1,kbd:1,center:1,button:1,basefont:1,h5:1,h4:1,samp:1,h6:1,ol:1,h1:1,h3:1,h2:1,form:1,font:1,"#":1,select:1,menu:1,ins:1,abbr:1,label:1,code:1,table:1,script:1,cite:1,input:1,iframe:1,strong:1,textarea:1,noframes:1,big:1,small:1,span:1,hr:1,sub:1,bdo:1,"var":1,div:1,object:1,sup:1,strike:1,dir:1,map:1,dl:1,applet:1,del:1,isindex:1,fieldset:1,ul:1,b:1,acronym:1,a:1,blockquote:1,i:1,u:1,s:1,tt:1,address:1,q:1,pre:1,p:1,em:1,dfn:1}),p=t(e({a:0}),u),h=e({tr:1}),f=e({"#":1}),g=t(e({param:1}),m),v=t(e({form:1}),i,r,a,c),b=e({li:1,ol:1,ul:1}),y=e({style:1,script:1}),C=e({base:1,link:1,meta:1,title:1}),N=t(C,y),w=e({head:1,body:1}),E=e({html:1}),U=e({address:1,blockquote:1,center:1,dir:1,div:1,dl:1,fieldset:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,isindex:1,menu:1,noframes:1,ol:1,p:1,pre:1,table:1,ul:1}),x=e({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});return e({$nonBodyContent:t(E,w,C),$block:U,$inline:p,$inlineWithA:t(e({a:1}),p),$body:t(e({script:1,style:1}),U),$cdata:e({script:1,style:1}),$empty:x,$nonChild:e({iframe:1,textarea:1}),$listItem:e({dd:1,dt:1,li:1}),$list:e({ul:1,ol:1,dl:1}),$isNotEmpty:e({table:1,ul:1,ol:1,dl:1,iframe:1,area:1,base:1,col:1,hr:1,img:1,embed:1,input:1,link:1,meta:1,param:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1}),$removeEmpty:e({a:1,abbr:1,acronym:1,address: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,s:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,"var":1}),$removeEmptyBlock:e({p:1,div:1}),$tableContent:e({caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1,table:1}),$notTransContent:e({pre:1,script:1,style:1,textarea:1}),html:w,head:N,style:f,script:f,body:v,base:{},link:{},meta:{},title:f,col:{},tr:e({td:1,th:1}),img:{},embed:{},colgroup:e({thead:1,col:1,tbody:1,tr:1,tfoot:1}),noscript:v,td:v,br:{},th:v,center:v,kbd:p,button:t(c,a),basefont:{},h5:p,h4:p,samp:p,h6:p,ol:b,h1:p,h3:p,option:f,h2:p,form:t(i,r,a,c),select:e({optgroup:1,option:1}),font:p,ins:p,menu:b,abbr:p,label:p,table:e({thead:1,col:1,tbody:1,tr:1,colgroup:1,caption:1,tfoot:1}),code:p,tfoot:h,cite:p,li:v,input:{},iframe:v,strong:p,textarea:f,noframes:v,big:p,small:p,span:e({"#":1,br:1,b:1,strong:1,u:1,i:1,em:1,sub:1,sup:1,strike:1,span:1}),hr:p,dt:p,sub:p,optgroup:e({option:1}),param:{},bdo:p,"var":p,div:v,object:g,sup:p,dd:v,strike:p,area:{},dir:b,map:t(e({area:1,form:1,p:1}),i,s,a),applet:g,dl:e({dt:1,dd:1}),del:p,isindex:{},fieldset:t(e({legend:1}),m),thead:h,ul:b,acronym:p,b:p,a:t(e({a:1}),u),blockquote:t(e({td:1,tr:1,tbody:1,li:1}),v),caption:p,i:p,u:p,tbody:h,s:p,address:t(r,c),tt:p,legend:p,q:p,pre:t(l,o),p:t(e({a:1}),p),em:p,dfn:p})}(),attrFix=ie&&browser.version<9?{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder"}:{tabindex:"tabIndex",readonly:"readOnly"},styleBlock=utils.listToMap(["-webkit-box","-moz-box","block","list-item","table","table-row-group","table-header-group","table-footer-group","table-row","table-column-group","table-column","table-cell","table-caption"]),domUtils=dom.domUtils={NODE_ELEMENT:1,NODE_DOCUMENT:9,NODE_TEXT:3,NODE_COMMENT:8,NODE_DOCUMENT_FRAGMENT:11,POSITION_IDENTICAL:0,POSITION_DISCONNECTED:1,POSITION_FOLLOWING:2,POSITION_PRECEDING:4,POSITION_IS_CONTAINED:8,POSITION_CONTAINS:16,fillChar:ie&&"6"==browser.version?"\ufeff":"\u200b",keys:{8:1,46:1,16:1,17:1,18:1,37:1,38:1,39:1,40:1,13:1},getPosition:function(e,t){if(e===t)return 0;var i,n=[e],o=[t];for(i=e;i=i.parentNode;){if(i===t)return 10;n.push(i)}for(i=t;i=i.parentNode;){if(i===e)return 20;o.push(i)}if(n.reverse(),o.reverse(),n[0]!==o[0])return 1;for(var r=-1;r++,n[r]===o[r];);for(e=n[r],t=o[r];e=e.nextSibling;)if(e===t)return 4;return 2},getNodeIndex:function(e,t){for(var i=e,n=0;i=i.previousSibling;)t&&3==i.nodeType?i.nodeType!=i.nextSibling.nodeType&&n++:n++;return n},inDoc:function(e,t){return 10==domUtils.getPosition(e,t)},findParent:function(e,t,i){if(e&&!domUtils.isBody(e))for(e=i?e:e.parentNode;e;){if(!t||t(e)||domUtils.isBody(e))return t&&!t(e)&&domUtils.isBody(e)?null:e;e=e.parentNode}return null},findParentByTagName:function(e,t,i,n){return t=utils.listToMap(utils.isArray(t)?t:[t]),domUtils.findParent(e,function(e){return t[e.tagName]&&!(n&&n(e))},i)},findParents:function(e,t,i,n){for(var o=t&&(i&&i(e)||!i)?[e]:[];e=domUtils.findParent(e,i);)o.push(e);return n?o:o.reverse()},insertAfter:function(e,t){return e.nextSibling?e.parentNode.insertBefore(t,e.nextSibling):e.parentNode.appendChild(t)},remove:function(e,t){var i,n=e.parentNode;if(n){if(t&&e.hasChildNodes())for(;i=e.firstChild;)n.insertBefore(i,e);n.removeChild(e)}return e},getNextDomNode:function(e,t,i,n){return getDomNode(e,"firstChild","nextSibling",t,i,n)},getPreDomNode:function(e,t,i,n){return getDomNode(e,"lastChild","previousSibling",t,i,n)},isBookmarkNode:function(e){return 1==e.nodeType&&e.id&&/^_baidu_bookmark_/i.test(e.id)},getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},getCommonAncestor:function(e,t){if(e===t)return e;for(var i=[e],n=[t],o=e,r=-1;o=o.parentNode;){if(o===t)return o;i.push(o)}for(o=t;o=o.parentNode;){if(o===e)return o;n.push(o)}for(i.reverse(),n.reverse();r++,i[r]===n[r];);return 0==r?null:i[r-1]},clearEmptySibling:function(e,t,i){function n(e,t){for(var i;e&&!domUtils.isBookmarkNode(e)&&(domUtils.isEmptyInlineElement(e)||!new RegExp("[^	\n\r"+domUtils.fillChar+"]").test(e.nodeValue));)i=e[t],domUtils.remove(e),e=i}!t&&n(e.nextSibling,"nextSibling"),!i&&n(e.previousSibling,"previousSibling")},split:function(e,t){var i=e.ownerDocument;if(browser.ie&&t==e.nodeValue.length){var n=i.createTextNode("");return domUtils.insertAfter(e,n)}var o=e.splitText(t);if(browser.ie8){var r=i.createTextNode("");domUtils.insertAfter(o,r),domUtils.remove(r)}return o},isWhitespace:function(e){return!new RegExp("[^ 	\n\r"+domUtils.fillChar+"]").test(e.nodeValue)},getXY:function(e){for(var t=0,i=0;e.offsetParent;)i+=e.offsetTop,t+=e.offsetLeft,e=e.offsetParent;return{x:t,y:i}},on:function(e,t,i){var n=utils.isArray(t)?t:utils.trim(t).split(/\s+/),o=n.length;if(o)for(;o--;)if(t=n[o],e.addEventListener)e.addEventListener(t,i,!1);else{i._d||(i._d={els:[]});var r=t+i.toString(),a=utils.indexOf(i._d.els,e);i._d[r]&&-1!=a||(-1==a&&i._d.els.push(e),i._d[r]||(i._d[r]=function(e){return i.call(e.srcElement,e||window.event)}),e.attachEvent("on"+t,i._d[r]))}e=null},un:function(e,t,i){var n=utils.isArray(t)?t:utils.trim(t).split(/\s+/),o=n.length;if(o)for(;o--;)if(t=n[o],e.removeEventListener)e.removeEventListener(t,i,!1);else{var r=t+i.toString();try{e.detachEvent("on"+t,i._d?i._d[r]:i)}catch(a){}if(i._d&&i._d[r]){var s=utils.indexOf(i._d.els,e);-1!=s&&i._d.els.splice(s,1),0==i._d.els.length&&delete i._d[r]}}},isSameElement:function(e,t){if(e.tagName!=t.tagName)return!1;var i=e.attributes,n=t.attributes;if(!ie&&i.length!=n.length)return!1;for(var o,r,a=0,s=0,l=0;o=i[l++];){if("style"==o.nodeName){if(o.specified&&a++,domUtils.isSameStyle(e,t))continue;return!1}if(ie){if(!o.specified)continue;a++,r=n.getNamedItem(o.nodeName)}else r=t.attributes[o.nodeName];if(!r.specified||o.nodeValue!=r.nodeValue)return!1}if(ie){for(l=0;r=n[l++];)r.specified&&s++;if(a!=s)return!1}return!0},isSameStyle:function(e,t){var i=e.style.cssText.replace(/( ?; ?)/g,";").replace(/( ?: ?)/g,":"),n=t.style.cssText.replace(/( ?; ?)/g,";").replace(/( ?: ?)/g,":");if(browser.opera){if(i=e.style,n=t.style,i.length!=n.length)return!1;for(var o in i)if(!/^(\d+|csstext)$/i.test(o)&&i[o]!=n[o])return!1;return!0}if(!i||!n)return i==n;if(i=i.split(";"),n=n.split(";"),i.length!=n.length)return!1;for(var r,a=0;r=i[a++];)if(-1==utils.indexOf(n,r))return!1;return!0},isBlockElm:function(e){return 1==e.nodeType&&(dtd.$block[e.tagName]||styleBlock[domUtils.getComputedStyle(e,"display")])&&!dtd.$nonChild[e.tagName]},isBody:function(e){return e&&1==e.nodeType&&"body"==e.tagName.toLowerCase()},breakParent:function(e,t){var i,n,o,r=e,a=e;do{for(r=r.parentNode,n?(i=r.cloneNode(!1),i.appendChild(n),n=i,i=r.cloneNode(!1),i.appendChild(o),o=i):(n=r.cloneNode(!1),o=n.cloneNode(!1));i=a.previousSibling;)n.insertBefore(i,n.firstChild);for(;i=a.nextSibling;)o.appendChild(i);a=r}while(t!==r);return i=t.parentNode,i.insertBefore(n,t),i.insertBefore(o,t),i.insertBefore(e,o),domUtils.remove(t),e},isEmptyInlineElement:function(e){if(1!=e.nodeType||!dtd.$removeEmpty[e.tagName])return 0;for(e=e.firstChild;e;){if(domUtils.isBookmarkNode(e))return 0;if(1==e.nodeType&&!domUtils.isEmptyInlineElement(e)||3==e.nodeType&&!domUtils.isWhitespace(e))return 0;e=e.nextSibling}return 1},trimWhiteTextNode:function(e){function t(t){for(var i;(i=e[t])&&3==i.nodeType&&domUtils.isWhitespace(i);)e.removeChild(i)}t("firstChild"),t("lastChild")},mergeChild:function(e,t,i){for(var n,o=domUtils.getElementsByTagName(e,e.tagName.toLowerCase()),r=0;n=o[r++];)if(n.parentNode&&!domUtils.isBookmarkNode(n))if("span"!=n.tagName.toLowerCase())domUtils.isSameElement(e,n)&&domUtils.remove(n,!0);else{if(e===n.parentNode&&(domUtils.trimWhiteTextNode(e),1==e.childNodes.length)){e.style.cssText=n.style.cssText+";"+e.style.cssText,domUtils.remove(n,!0);continue}if(n.style.cssText=e.style.cssText+";"+n.style.cssText,i){var a=i.style;if(a){a=a.split(";");for(var s,l=0;s=a[l++];)n.style[utils.cssStyleToDomStyle(s.split(":")[0])]=s.split(":")[1]}}domUtils.isSameStyle(n,e)&&domUtils.remove(n,!0)}},getElementsByTagName:function(e,t,i){if(i&&utils.isString(i)){var n=i;i=function(e){return domUtils.hasClass(e,n)}}t=utils.trim(t).replace(/[ ]{2,}/g," ").split(" ");for(var o,r=[],a=0;o=t[a++];)for(var s,l=e.getElementsByTagName(o),d=0;s=l[d++];)(!i||i(s))&&r.push(s);return r},mergeToParent:function(e){for(var t=e.parentNode;t&&dtd.$removeEmpty[t.tagName];){if(t.tagName==e.tagName||"A"==t.tagName){if(domUtils.trimWhiteTextNode(t),"SPAN"==t.tagName&&!domUtils.isSameStyle(t,e)||"A"==t.tagName&&"SPAN"==e.tagName){if(t.childNodes.length>1||t!==e.parentNode){e.style.cssText=t.style.cssText+";"+e.style.cssText,t=t.parentNode;continue}t.style.cssText+=";"+e.style.cssText,"A"==t.tagName&&(t.style.textDecoration="underline")}if("A"!=t.tagName){t===e.parentNode&&domUtils.remove(e,!0);break}}t=t.parentNode}},mergeSibling:function(e,t,i){function n(e,t,i){var n;if((n=i[e])&&!domUtils.isBookmarkNode(n)&&1==n.nodeType&&domUtils.isSameElement(i,n)){for(;n.firstChild;)"firstChild"==t?i.insertBefore(n.lastChild,i.firstChild):i.appendChild(n.firstChild);domUtils.remove(n)}}!t&&n("previousSibling","firstChild",e),!i&&n("nextSibling","lastChild",e)},unSelectable:ie&&browser.ie9below||browser.opera?function(e){e.onselectstart=function(){return!1},e.onclick=e.onkeyup=e.onkeydown=function(){return!1},e.unselectable="on",e.setAttribute("unselectable","on");for(var t,i=0;t=e.all[i++];)switch(t.tagName.toLowerCase()){case"iframe":case"textarea":case"input":case"select":break;default:t.unselectable="on",e.setAttribute("unselectable","on")}}:function(e){e.style.MozUserSelect=e.style.webkitUserSelect=e.style.msUserSelect=e.style.KhtmlUserSelect="none"},removeAttributes:function(e,t){t=utils.isArray(t)?t:utils.trim(t).replace(/[ ]{2,}/g," ").split(" ");for(var i,n=0;i=t[n++];){switch(i=attrFix[i]||i){case"className":e[i]="";break;case"style":e.style.cssText="";var o=e.getAttributeNode("style");!browser.ie&&o&&e.removeAttributeNode(o)}e.removeAttribute(i)}},createElement:function(e,t,i){return domUtils.setAttributes(e.createElement(t),i)},setAttributes:function(e,t){for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];switch(i){case"class":e.className=n;break;case"style":e.style.cssText=e.style.cssText+";"+n;break;case"innerHTML":e[i]=n;break;case"value":e.value=n;break;default:e.setAttribute(attrFix[i]||i,n)}}return e},getComputedStyle:function(e,t){var i="width height top left";if(i.indexOf(t)>-1)return e["offset"+t.replace(/^\w/,function(e){return e.toUpperCase()})]+"px";if(3==e.nodeType&&(e=e.parentNode),browser.ie&&browser.version<9&&"font-size"==t&&!e.style.fontSize&&!dtd.$empty[e.tagName]&&!dtd.$nonChild[e.tagName]){var n=e.ownerDocument.createElement("span");n.style.cssText="padding:0;border:0;font-family:simsun;",n.innerHTML=".",e.appendChild(n);var o=n.offsetHeight;return e.removeChild(n),n=null,o+"px"}try{var r=domUtils.getStyle(e,t)||(window.getComputedStyle?domUtils.getWindow(e).getComputedStyle(e,"").getPropertyValue(t):(e.currentStyle||e.style)[utils.cssStyleToDomStyle(t)])}catch(a){return""}return utils.transUnitToPx(utils.fixColor(t,r))},removeClasses:function(e,t){t=utils.isArray(t)?t:utils.trim(t).replace(/[ ]{2,}/g," ").split(" ");for(var i,n=0,o=e.className;i=t[n++];)o=o.replace(new RegExp("\\b"+i+"\\b"),"");o=utils.trim(o).replace(/[ ]{2,}/g," "),o?e.className=o:domUtils.removeAttributes(e,["class"])},addClass:function(e,t){if(e){t=utils.trim(t).replace(/[ ]{2,}/g," ").split(" ");for(var i,n=0,o=e.className;i=t[n++];)new RegExp("\\b"+i+"\\b").test(o)||(o+=" "+i);e.className=utils.trim(o)}},hasClass:function(e,t){if(utils.isRegExp(t))return t.test(e.className);t=utils.trim(t).replace(/[ ]{2,}/g," ").split(" ");for(var i,n=0,o=e.className;i=t[n++];)if(!new RegExp("\\b"+i+"\\b","i").test(o))return!1;return n-1==t.length},preventDefault:function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},removeStyle:function(e,t){browser.ie?("color"==t&&(t="(^|;)"+t),e.style.cssText=e.style.cssText.replace(new RegExp(t+"[^:]*:[^;]+;?","ig"),"")):e.style.removeProperty?e.style.removeProperty(t):e.style.removeAttribute(utils.cssStyleToDomStyle(t)),e.style.cssText||domUtils.removeAttributes(e,["style"])},getStyle:function(e,t){var i=e.style[utils.cssStyleToDomStyle(t)];return utils.fixColor(t,i)},setStyle:function(e,t,i){e.style[utils.cssStyleToDomStyle(t)]=i,utils.trim(e.style.cssText)||this.removeAttributes(e,"style")},setStyles:function(e,t){for(var i in t)t.hasOwnProperty(i)&&domUtils.setStyle(e,i,t[i])},removeDirtyAttr:function(e){for(var t,i=0,n=e.getElementsByTagName("*");t=n[i++];)t.removeAttribute("_moz_dirty");e.removeAttribute("_moz_dirty")},getChildCount:function(e,t){var i=0,n=e.firstChild;for(t=t||function(){return 1};n;)t(n)&&i++,n=n.nextSibling;return i},isEmptyNode:function(e){return!e.firstChild||0==domUtils.getChildCount(e,function(e){return!domUtils.isBr(e)&&!domUtils.isBookmarkNode(e)&&!domUtils.isWhitespace(e)})},clearSelectedArr:function(e){for(var t;t=e.pop();)domUtils.removeAttributes(t,["class"])},scrollToView:function(e,t,i){var n=function(){var e=t.document,i="CSS1Compat"==e.compatMode;return{width:(i?e.documentElement.clientWidth:e.body.clientWidth)||0,height:(i?e.documentElement.clientHeight:e.body.clientHeight)||0}},o=function(e){if("pageXOffset"in e)return{x:e.pageXOffset||0,y:e.pageYOffset||0};var t=e.document;return{x:t.documentElement.scrollLeft||t.body.scrollLeft||0,y:t.documentElement.scrollTop||t.body.scrollTop||0}},r=n().height,a=-1*r+i;a+=e.offsetHeight||0;var s=domUtils.getXY(e);a+=s.y;var l=o(t).y;(a>l||l-r>a)&&t.scrollTo(0,a+(0>a?-20:20))},isBr:function(e){return 1==e.nodeType&&"BR"==e.tagName},isFillChar:function(e,t){if(3!=e.nodeType)return!1;var i=e.nodeValue;return t?new RegExp("^"+domUtils.fillChar).test(i):!i.replace(new RegExp(domUtils.fillChar,"g"),"").length},isStartInblock:function(e){var t,i=e.cloneRange(),n=0,o=i.startContainer;if(1==o.nodeType&&o.childNodes[i.startOffset]){o=o.childNodes[i.startOffset];for(var r=o.previousSibling;r&&domUtils.isFillChar(r);)o=r,r=r.previousSibling}for(this.isFillChar(o,!0)&&1==i.startOffset&&(i.setStartBefore(o),o=i.startContainer);o&&domUtils.isFillChar(o);)t=o,o=o.previousSibling;for(t&&(i.setStartBefore(t),o=i.startContainer),1==o.nodeType&&domUtils.isEmptyNode(o)&&1==i.startOffset&&i.setStart(o,0).collapse(!0);!i.startOffset;){if(o=i.startContainer,domUtils.isBlockElm(o)||domUtils.isBody(o)){n=1;break}var a,r=i.startContainer.previousSibling;if(r){for(;r&&domUtils.isFillChar(r);)a=r,r=r.previousSibling;i.setStartBefore(a?a:i.startContainer)}else i.setStartBefore(i.startContainer)}return n&&!domUtils.isBody(i.startContainer)?1:0},isEmptyBlock:function(e,t){if(1!=e.nodeType)return 0;if(t=t||new RegExp("[ \xa0	\r\n"+domUtils.fillChar+"]","g"),e[browser.ie?"innerText":"textContent"].replace(t,"").length>0)return 0;for(var i in dtd.$isNotEmpty)if(e.getElementsByTagName(i).length)return 0;return 1},setViewportOffset:function(e,t){var i=0|parseInt(e.style.left),n=0|parseInt(e.style.top),o=e.getBoundingClientRect(),r=t.left-o.left,a=t.top-o.top;r&&(e.style.left=i+r+"px"),a&&(e.style.top=n+a+"px")},fillNode:function(e,t){var i=browser.ie?e.createTextNode(domUtils.fillChar):e.createElement("br");t.innerHTML="",t.appendChild(i)},moveChild:function(e,t,i){for(;e.firstChild;)i&&t.firstChild?t.insertBefore(e.lastChild,t.firstChild):t.appendChild(e.firstChild)},hasNoAttributes:function(e){return browser.ie?/^<\w+\s*?>/.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(var i;!domUtils.isBody(e);)if(i=e,e=e.parentNode,i!==e[t])return!1;return!0},fillHtml:browser.ie11below?"&nbsp;":"<br/>"},fillCharReg=new RegExp(domUtils.fillChar,"g");!function(){function e(e){e.collapsed=e.startContainer&&e.endContainer&&e.startContainer===e.endContainer&&e.startOffset==e.endOffset}function t(e){return!e.collapsed&&1==e.startContainer.nodeType&&e.startContainer===e.endContainer&&e.endOffset-e.startOffset==1}function i(t,i,n,o){return 1==i.nodeType&&(dtd.$empty[i.tagName]||dtd.$nonChild[i.tagName])&&(n=domUtils.getNodeIndex(i)+(t?0:1),i=i.parentNode),t?(o.startContainer=i,o.startOffset=n,o.endContainer||o.collapse(!0)):(o.endContainer=i,o.endOffset=n,o.startContainer||o.collapse(!1)),e(o),o}function n(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,p=domUtils.findParents(o,!0),h=domUtils.findParents(r,!0),f=0;p[f]==h[f];)f++;for(var g,v=f;g=p[v];v++){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[v];)g=c.nextSibling,m.appendChild(t?c:c.cloneNode(!0)),c=g;m=u}m=d,p[f]||(m.appendChild(p[f-1].cloneNode(!1)),m=m.firstChild);for(var b,v=f;b=h[v];v++){if(c=b.previousSibling,b==r?n||3!=e.endContainer.nodeType||(m.appendChild(l.createTextNode(r.substringData(0,s))),t&&r.deleteData(0,s)):(u=b.cloneNode(!1),m.appendChild(u)),v!=f||!p[f])for(;c&&c!==o;)b=c.previousSibling,m.insertBefore(t?c:c.cloneNode(!0),m.firstChild),c=b;m=u}return t&&e.setStartBefore(h[f]?p[f]?h[f]:p[f-1]:h[f-1]).collapse(!0),i&&domUtils.remove(i),n&&domUtils.remove(n),d}function o(e,t){try{if(a&&domUtils.inDoc(a,e))if(a.nodeValue.replace(fillCharReg,"").length)a.nodeValue=a.nodeValue.replace(fillCharReg,"");else{var i=a.parentNode;for(domUtils.remove(a);i&&domUtils.isEmptyInlineElement(i)&&(browser.safari?!(domUtils.getPosition(i,t)&domUtils.POSITION_CONTAINS):!i.contains(t));)a=i.parentNode,domUtils.remove(i),i=a}}catch(n){}}function r(e,t){var i;for(e=e[t];e&&domUtils.isFillChar(e);)i=e[t],domUtils.remove(e),e=i}var a,s=0,l=domUtils.fillChar,d=dom.Range=function(e){var t=this;t.startContainer=t.startOffset=t.endContainer=t.endOffset=null,t.document=e,t.collapsed=!0
};d.prototype={cloneContents:function(){return this.collapsed?null:n(this,0)},deleteContents:function(){var e;return this.collapsed||n(this,1),browser.webkit&&(e=this.startContainer,3!=e.nodeType||e.nodeValue.length||(this.setStartBefore(e).collapse(!0),domUtils.remove(e))),this},extractContents:function(){return this.collapsed?null:n(this,2)},setStart:function(e,t){return i(!0,e,t,this)},setEnd:function(e,t){return i(!1,e,t,this)},setStartAfter:function(e){return this.setStart(e.parentNode,domUtils.getNodeIndex(e)+1)},setStartBefore:function(e){return this.setStart(e.parentNode,domUtils.getNodeIndex(e))},setEndAfter:function(e){return this.setEnd(e.parentNode,domUtils.getNodeIndex(e)+1)},setEndBefore:function(e){return this.setEnd(e.parentNode,domUtils.getNodeIndex(e))},setStartAtFirst:function(e){return this.setStart(e,0)},setStartAtLast:function(e){return this.setStart(e,3==e.nodeType?e.nodeValue.length:e.childNodes.length)},setEndAtFirst:function(e){return this.setEnd(e,0)},setEndAtLast:function(e){return this.setEnd(e,3==e.nodeType?e.nodeValue.length:e.childNodes.length)},selectNode:function(e){return this.setStartBefore(e).setEndAfter(e)},selectNodeContents:function(e){return this.setStart(e,0).setEndAtLast(e)},cloneRange:function(){var e=this;return new d(e.document).setStart(e.startContainer,e.startOffset).setEnd(e.endContainer,e.endOffset)},collapse:function(e){var t=this;return e?(t.endContainer=t.startContainer,t.endOffset=t.startOffset):(t.startContainer=t.endContainer,t.startOffset=t.endOffset),t.collapsed=!0,t},shrinkBoundary:function(e){function t(e){return 1==e.nodeType&&!domUtils.isBookmarkNode(e)&&!dtd.$empty[e.tagName]&&!dtd.$nonChild[e.tagName]}for(var i,n=this,o=n.collapsed;1==n.startContainer.nodeType&&(i=n.startContainer.childNodes[n.startOffset])&&t(i);)n.setStart(i,0);if(o)return n.collapse(!0);if(!e)for(;1==n.endContainer.nodeType&&n.endOffset>0&&(i=n.endContainer.childNodes[n.endOffset-1])&&t(i);)n.setEnd(i,i.childNodes.length);return n},getCommonAncestor:function(e,i){var n=this,o=n.startContainer,r=n.endContainer;return o===r?e&&t(this)&&(o=o.childNodes[n.startOffset],1==o.nodeType)?o:i&&3==o.nodeType?o.parentNode:o:domUtils.getCommonAncestor(o,r)},trimBoundary:function(e){this.txtToElmBoundary();var t=this.startContainer,i=this.startOffset,n=this.collapsed,o=this.endContainer;if(3==t.nodeType){if(0==i)this.setStartBefore(t);else if(i>=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,o=this.endContainer,3==o.nodeType&&(0==i?this.setEndBefore(o):(i<o.nodeValue.length&&domUtils.split(o,i),this.setEndAfter(o)))),this},txtToElmBoundary:function(e){function t(e,t){var i=e[t+"Container"],n=e[t+"Offset"];3==i.nodeType&&(n?n>=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("\u200d")),n.id="_baidu_bookmark_start_"+(t?"":s++),this.collapsed||(i=n.cloneNode(!0),i.id="_baidu_bookmark_end_"+(t?"":s++)),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(n=this.startContainer,1==n.nodeType?n.childNodes[this.startOffset]?i=n=n.childNodes[this.startOffset]:(n.appendChild(r),i=n=r):i=n;;){if(domUtils.isBlockElm(n)){for(n=i;(i=n.previousSibling)&&!domUtils.isBlockElm(i);)n=i;this.setStartBefore(n);break}i=n,n=n.parentNode}for(n=this.endContainer,1==n.nodeType?((i=n.childNodes[this.endOffset])?n.insertBefore(r,i):n.appendChild(r),i=n=r):i=n;;){if(domUtils.isBlockElm(n)){for(n=i;(i=n.nextSibling)&&!domUtils.isBlockElm(i);)n=i;this.setEndAfter(n);break}i=n,n=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(e,t,i){if(this.collapsed)return this;this.trimBoundary().enlarge(!1,function(e){return 1==e.nodeType&&domUtils.isBlockElm(e)}).adjustmentBoundary();for(var n,o,r=this.createBookmark(),a=r.end,s=function(e){return 1==e.nodeType?"br"!=e.tagName.toLowerCase():!domUtils.isWhitespace(e)},l=domUtils.getNextDomNode(r.start,!1,s),d=this.cloneRange();l&&domUtils.getPosition(l,a)&domUtils.POSITION_PRECEDING;)if(3==l.nodeType||dtd[e][l.tagName]){for(d.setStartBefore(l),n=l;n&&(3==n.nodeType||dtd[e][n.tagName])&&n!==a;)o=n,n=domUtils.getNextDomNode(n,1==n.nodeType,null,function(t){return dtd[e][t.tagName]});var c,u=d.setEndAfter(o).extractContents();if(i&&i.length>0){var m,p;p=m=i[0].cloneNode(!1);for(var h,f=1;h=i[f++];)m.appendChild(h.cloneNode(!1)),m=m.firstChild;c=m}else c=d.document.createElement(e);t&&domUtils.setAttributes(c,t),c.appendChild(u),d.insertNode(i?p:c);var g;if("span"==e&&t.style&&/text\-decoration/.test(t.style)&&(g=domUtils.findParentByTagName(c,"a",!0))?(domUtils.setAttributes(g,t),domUtils.remove(c,!0),c=g):(domUtils.mergeSibling(c),domUtils.clearEmptySibling(c)),domUtils.mergeChild(c,t),l=domUtils.getNextDomNode(c,!1,s),domUtils.mergeToParent(c),n===a)break}else l=domUtils.getNextDomNode(l,!0,s);return this.moveToBookmark(r)},removeInlineStyle:function(e){if(this.collapsed)return this;e=utils.isArray(e)?e:[e],this.shrinkBoundary().adjustmentBoundary();for(var t=this.startContainer,i=this.endContainer;;){if(1==t.nodeType){if(utils.indexOf(e,t.tagName.toLowerCase())>-1)break;if("body"==t.tagName.toLowerCase()){t=null;break}}t=t.parentNode}for(;;){if(1==i.nodeType){if(utils.indexOf(e,i.tagName.toLowerCase())>-1)break;if("body"==i.tagName.toLowerCase()){i=null;break}}i=i.parentNode}var n,o,r=this.createBookmark();t&&(o=this.cloneRange().setEndBefore(r.start).setStartBefore(t),n=o.extractContents(),o.insertNode(n),domUtils.clearEmptySibling(t,!0),t.parentNode.insertBefore(r.start,t)),i&&(o=this.cloneRange().setStartAfter(r.end).setEndAfter(i),n=o.extractContents(),o.insertNode(n),domUtils.clearEmptySibling(i,!1,!0),i.parentNode.insertBefore(r.end,i.nextSibling));for(var a,s=domUtils.getNextDomNode(r.start,!1,function(e){return 1==e.nodeType});s&&s!==r.end;)a=domUtils.getNextDomNode(s,!0,function(e){return 1==e.nodeType}),utils.indexOf(e,s.tagName.toLowerCase())>-1&&domUtils.remove(s,!0),s=a;return this.moveToBookmark(r)},getClosedNode:function(){var e;if(!this.collapsed){var i=this.cloneRange().adjustmentBoundary().shrinkBoundary();if(t(i)){var n=i.startContainer.childNodes[i.startOffset];n&&1==n.nodeType&&(dtd.$empty[n.tagName]||dtd.$nonChild[n.tagName])&&(e=n)}}return e},select:browser.ie?function(e,t){var i;this.collapsed||this.shrinkBoundary();var n=this.getClosedNode();if(n&&!t){try{i=this.document.body.createControlRange(),i.addElement(n),i.select()}catch(s){}return this}var d,c=this.createBookmark(),u=c.start;if(i=this.document.body.createTextRange(),i.moveToElementText(u),i.moveStart("character",1),this.collapsed){if(!e&&3!=this.startContainer.nodeType){var m=this.document.createTextNode(l),p=this.document.createElement("span");p.appendChild(this.document.createTextNode(l)),u.parentNode.insertBefore(p,u),u.parentNode.insertBefore(m,u),o(this.document,m),a=m,r(p,"previousSibling"),r(u,"nextSibling"),i.moveStart("character",-1),i.collapse(!0)}}else{var h=this.document.body.createTextRange();d=c.end,h.moveToElementText(d),i.setEndPoint("EndToEnd",h)}this.moveToBookmark(c),p&&domUtils.remove(p);try{i.select()}catch(s){}return this}:function(e){function t(e){function t(t,i,n){3==t.nodeType&&t.nodeValue.length<i&&(e[n+"Offset"]=t.nodeValue.length)}t(e.startContainer,e.startOffset,"start"),t(e.endContainer,e.endOffset,"end")}var i,n=domUtils.getWindow(this.document),s=n.getSelection();if(s){if(s.removeAllRanges(),this.collapsed&&!e){var d=this.startContainer,c=d;1==d.nodeType&&(c=d.childNodes[this.startOffset]),3==d.nodeType&&this.startOffset||(c?c.previousSibling&&3==c.previousSibling.nodeType:d.lastChild&&3==d.lastChild.nodeType)||(i=this.document.createTextNode(l),this.insertNode(i),o(this.document,i),r(i,"previousSibling"),r(i,"nextSibling"),a=i,this.setStart(i,browser.webkit?1:0).collapse(!0))}var u=this.document.createRange();if(this.collapsed&&browser.opera&&1==this.startContainer.nodeType){var c=this.startContainer.childNodes[this.startOffset];if(c){for(;c&&domUtils.isBlockElm(c)&&1==c.nodeType&&c.childNodes[0];)c=c.childNodes[0];c&&this.setStartBefore(c).collapse(!0)}else c=this.startContainer.lastChild,c&&domUtils.isBr(c)&&this.setStartBefore(c).collapse(!0)}t(this),u.setStart(this.startContainer,this.startOffset),u.setEnd(this.endContainer,this.endOffset),s.addRange(u)}return this},scrollToView:function(e,t){e=e?window:domUtils.getWindow(this.document);var i=this,n=i.document.createElement("span");return n.innerHTML="&nbsp;",i.cloneRange().insertNode(n),domUtils.scrollToView(n,e,t),domUtils.remove(n),i},inFillChar:function(){var e=this.startContainer;return this.collapsed&&3==e.nodeType&&e.nodeValue.replace(new RegExp("^"+domUtils.fillChar),"").length+1==e.nodeValue.length?!0:!1},createAddress:function(e,t){function i(e){for(var i,n=e?o.startContainer:o.endContainer,r=domUtils.findParents(n,!0,function(e){return!domUtils.isBody(e)}),a=[],s=0;i=r[s++];)a.push(domUtils.getNodeIndex(i,t));var l=0;if(t)if(3==n.nodeType){for(var d=n.previousSibling;d&&3==d.nodeType;)l+=d.nodeValue.replace(fillCharReg,"").length,d=d.previousSibling;l+=e?o.startOffset:o.endOffset}else if(n=n.childNodes[e?o.startOffset:o.endOffset])l=domUtils.getNodeIndex(n,t);else{n=e?o.startContainer:o.endContainer;for(var c=n.firstChild;c;)if(domUtils.isFillChar(c))c=c.nextSibling;else if(l++,3==c.nodeType)for(;c&&3==c.nodeType;)c=c.nextSibling;else c=c.nextSibling}else l=e?domUtils.isFillChar(n)?0:o.startOffset:o.endOffset;return 0>l&&(l=0),a.push(l),a}var n={},o=this;return n.startAddress=i(!0),e||(n.endAddress=o.collapsed?[].concat(n.startAddress):i()),n},moveToAddress:function(e,t){function i(e,t){for(var i,o,r,a=n.document.body,s=0,l=e.length;l>s;s++)if(r=e[s],i=a,a=a.childNodes[r],!a){o=r;break}t?a?n.setStartBefore(a):n.setStart(i,o):a?n.setEndBefore(a):n.setEnd(i,o)}var n=this;return i(e.startAddress,!0),!t&&e.endAddress&&i(e.endAddress),n},equals:function(e){for(var t in this)if(this.hasOwnProperty(t)&&this[t]!==e[t])return!1;return!0},traversal:function(e,t){if(this.collapsed)return this;for(var i=this.createBookmark(),n=i.end,o=domUtils.getNextDomNode(i.start,!1,t);o&&o!==n&&domUtils.getPosition(o,n)&domUtils.POSITION_PRECEDING;){var r=domUtils.getNextDomNode(o,!1,t);e(o),o=r}return this.moveToBookmark(i)}}}(),function(){function e(e,t){var i=domUtils.getNodeIndex;e=e.duplicate(),e.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;d>=l;){c=Math.floor((l+d)/2),o=a[c],s.moveToElementText(o);var u=s.compareEndPoints("StartToStart",e);if(u>0)d=c-1;else{if(!(0>u))return{container:n,offset:i(o)};l=c+1}}if(-1==c){if(s.moveToElementText(n),s.setEndPoint("StartToStart",e),r=s.text.replace(/(\r\n|\r)/g,"\n").length,a=n.childNodes,!r)return o=a[a.length-1],{container:o,offset:o.nodeValue.length};for(var m=a.length;r>0;)r-=a[--m].nodeValue.length;return{container:a[m],offset:-r}}if(s.collapse(u>0),s.setEndPoint(u>0?"StartToStart":"EndToStart",e),r=s.text.replace(/(\r\n|\r)/g,"\n").length,!r)return dtd.$empty[o.tagName]||dtd.$nonChild[o.tagName]?{container:n,offset:i(o)+(u>0?0:1)}:{container:o,offset:u>0?0:o.childNodes.length};for(;r>0;)try{var p=o;o=o[u>0?"previousSibling":"nextSibling"],r-=o.nodeValue.length}catch(h){return{container:n,offset:i(p)}}return{container:o,offset:u>0?-r:o.nodeValue.length+r}}function t(t,i){if(t.item)i.selectNode(t.item(0));else{var n=e(t,!0);i.setStart(n.container,n.offset),0!=t.compareEndPoints("StartToEnd",t)&&(n=e(t,!1),i.setEnd(n.container,n.offset))}return i}function i(e){var t;try{t=e.getNative().createRange()}catch(i){return null}var n=t.item?t.item(0):t.parentElement();return(n.ownerDocument||n)===e.document?t:null}var n=dom.Selection=function(e){var t,n=this;n.document=e,browser.ie9below&&(t=domUtils.getWindow(e).frameElement,domUtils.on(t,"beforedeactivate",function(){n._bakIERange=n.getIERange()}),domUtils.on(t,"activate",function(){try{!i(n)&&n._bakIERange&&n._bakIERange.select()}catch(e){}n._bakIERange=null})),t=e=null};n.prototype={rangeInBody:function(e,t){var i=browser.ie9below||t?e.item?e.item():e.parentElement():e.startContainer;return i===this.document.body||domUtils.inDoc(i,this.document)},getNative:function(){var e=this.document;try{return e?browser.ie9below?e.selection:domUtils.getWindow(e).getSelection():null}catch(t){return null}},getIERange:function(){var e=i(this);return!e&&this._bakIERange?this._bakIERange:e},cache:function(){this.clear(),this._cachedRange=this.getRange(),this._cachedStartElement=this.getStart(),this._cachedStartElementPath=this.getStartElementPath()},getStartElementPath:function(){if(this._cachedStartElementPath)return this._cachedStartElementPath;var e=this.getStart();return e?domUtils.findParents(e,!0,null,!0):[]},clear:function(){this._cachedStartElementPath=this._cachedRange=this._cachedStartElement=null},isFocus:function(){try{if(browser.ie9below){var e=i(this);return!(!e||!this.rangeInBody(e))}return!!this.getNative().rangeCount}catch(t){return!1}},getRange:function(){function e(e){for(var t=i.document.body.firstChild,n=e.collapsed;t&&t.firstChild;)e.setStart(t,0),t=t.firstChild;e.startContainer||e.setStart(i.document.body,0),n&&e.collapse(!0)}var i=this;if(null!=i._cachedRange)return this._cachedRange;var n=new baidu.editor.dom.Range(i.document);if(browser.ie9below){var o=i.getIERange();if(o)try{t(o,n)}catch(r){e(n)}else e(n)}else{var a=i.getNative();if(a&&a.rangeCount){var s=a.getRangeAt(0),l=a.getRangeAt(a.rangeCount-1);n.setStart(s.startContainer,s.startOffset).setEnd(l.endContainer,l.endOffset),n.collapsed&&domUtils.isBody(n.startContainer)&&!n.startOffset&&e(n)}else{if(this._bakRange&&domUtils.inDoc(this._bakRange.startContainer,this.document))return this._bakRange;e(n)}}return this._bakRange=n},getStart:function(){if(this._cachedStartElement)return this._cachedStartElement;var e,t,i,n,o=browser.ie9below?this.getIERange():this.getRange();if(browser.ie9below){if(!o)return this.document.body.firstChild;if(o.item)return o.item(0);for(e=o.duplicate(),e.text.length>0&&e.moveStart("character",1),e.collapse(1),t=e.parentElement(),n=i=o.parentElement();i=i.parentNode;)if(i==t){t=n;break}}else if(o.shrinkBoundary(),t=o.startContainer,1==t.nodeType&&t.hasChildNodes()&&(t=t.childNodes[Math.min(t.childNodes.length-1,o.startOffset)]),3==t.nodeType)return t.parentNode;return t},getText:function(){var e,t;return this.isFocus()&&(e=this.getNative())?(t=browser.ie9below?e.createRange():e.getRangeAt(0),browser.ie9below?t.text:t.toString()):""},clearRange:function(){this.getNative()[browser.ie9below?"empty":"removeAllRanges"]()}}}(),function(){function e(e,t){var i;if(t.textarea)if(utils.isString(t.textarea)){for(var n,o=0,r=domUtils.getElementsByTagName(e,"textarea");n=r[o++];)if(n.id=="ueditor_textarea_"+t.options.textarea){i=n;break}}else i=t.textarea;i||(e.appendChild(i=domUtils.createElement(document,"textarea",{name:t.options.textarea,id:"ueditor_textarea_"+t.options.textarea,style:"display:none"})),t.textarea=i),!i.getAttribute("name")&&i.setAttribute("name",t.options.textarea),i.value=t.hasContents()?t.options.allHtmlEnabled?t.getAllHtml():t.getContent(null,null,!0):""}function t(e){for(var t in e)return t}function i(e){e.langIsReady=!0,e.fireEvent("langReady")}var n,o=0,r=UE.Editor=function(e){var n=this;n.uid=o++,EventBase.call(n),n.commands={},n.options=utils.extend(utils.clone(e||{}),UEDITOR_CONFIG,!0),n.shortcutkeys={},n.inputRules=[],n.outputRules=[],n.setOpt(r.defaultOptions(n)),n.loadServerConfig(),utils.isEmptyObject(UE.I18N)?utils.loadFile(document,{src:n.options.langPath+n.options.lang+"/"+n.options.lang+".js",tag:"script",type:"text/javascript",defer:"defer"},function(){UE.plugin.load(n),i(n)}):(n.options.lang=t(UE.I18N),UE.plugin.load(n),i(n)),UE.instants["ueditorInstant"+n.uid]=n};r.prototype={registerCommand:function(e,t){this.commands[e]=t},ready:function(e){var t=this;e&&(t.isReady?e.apply(t):t.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(e){var t=this,i=t.options,n=function(t){return parseInt(domUtils.getComputedStyle(e,t))};if(utils.isString(e)&&(e=document.getElementById(e)),e){i.minFrameWidth=i.initialFrameWidth?i.initialFrameWidth:i.initialFrameWidth=e.offsetWidth,i.initialFrameHeight?i.minFrameHeight=i.initialFrameHeight:i.initialFrameHeight=i.minFrameHeight=e.offsetHeight,e.style.width=/%$/.test(i.initialFrameWidth)?"100%":i.initialFrameWidth-n("padding-left")-n("padding-right")+"px",e.style.height=/%$/.test(i.initialFrameHeight)?"100%":i.initialFrameHeight-n("padding-top")-n("padding-bottom")+"px",e.style.zIndex=i.zIndex;var o=(ie&&browser.version<9?"":"<!DOCTYPE html>")+"<html xmlns='http://www.w3.org/1999/xhtml' class='view' ><head><style type='text/css'>.view{padding:0;word-wrap:break-word;cursor:text;}\nbody{margin:8px;font-family:sans-serif;font-size:16px;}p{margin:5px 0;}</style>"+(i.iframeCssUrl?"<link rel='stylesheet' type='text/css' href='"+utils.unhtml(i.iframeCssUrl)+"'/>":"")+(i.initialStyle?"<style>"+i.initialStyle+"</style>":"")+"</head><body class='view' ></body><script type='text/javascript' "+(ie?"defer='defer'":"")+" id='_initialScript'>setTimeout(function(){editor = window.parent.UE.instants['ueditorInstant"+t.uid+"'];editor._setup(document);},0);var _tmpScript = document.getElementById('_initialScript');_tmpScript.parentNode.removeChild(_tmpScript);</script></html>";e.appendChild(domUtils.createElement(document,"iframe",{id:"ueditor_"+t.uid,width:"100%",height:"100%",frameborder:"0",src:"javascript:void(function(){document.open();"+(i.customDomain&&document.domain!=location.hostname?'document.domain="'+document.domain+'";':"")+'document.write("'+o+'");document.close();}())'})),e.style.overflow="hidden",setTimeout(function(){/%$/.test(i.initialFrameWidth)&&(i.minFrameWidth=i.initialFrameWidth=e.offsetWidth),/%$/.test(i.initialFrameHeight)&&(i.minFrameHeight=i.initialFrameHeight=e.offsetHeight,e.style.height=i.initialFrameHeight+"px")})}},_setup:function(t){var i=this,n=i.options;ie?(t.body.disabled=!0,t.body.contentEditable=!0,t.body.disabled=!1):t.body.contentEditable=!0,t.body.spellcheck=!1,i.document=t,i.window=t.defaultView||t.parentWindow,i.iframe=i.window.frameElement,i.body=t.body,i.selection=new dom.Selection(t);var o;browser.gecko&&(o=this.selection.getNative())&&o.removeAllRanges(),this._initEvents();for(var r=this.iframe.parentNode;!domUtils.isBody(r);r=r.parentNode)if("FORM"==r.tagName){i.form=r,i.options.autoSyncData?domUtils.on(i.window,"blur",function(){e(r,i)}):domUtils.on(r,"submit",function(){e(this,i)});break}if(n.initialContent)if(n.autoClearinitialContent){var a=i.execCommand;i.execCommand=function(){return i.fireEvent("firstBeforeExecCommand"),a.apply(i,arguments)},this._setDefaultContent(n.initialContent)}else this.setContent(n.initialContent,!1,!0);domUtils.isEmptyNode(i.body)&&(i.body.innerHTML="<p>"+(browser.ie?"":"<br/>")+"</p>"),n.focus&&setTimeout(function(){i.focus(i.options.focusInEnd),!i.options.autoClearinitialContent&&i._selectionChange()},0),i.container||(i.container=this.iframe.parentNode),n.fullscreen&&i.ui&&i.ui.setFullScreen(!0);try{i.document.execCommand("2D-position",!1,!1)}catch(s){}try{i.document.execCommand("enableInlineTableEditing",!1,!1)}catch(s){}try{i.document.execCommand("enableObjectResizing",!1,!1)}catch(s){}i._bindshortcutKeys(),i.isReady=1,i.fireEvent("ready"),n.onready&&n.onready.call(i),browser.ie9below||domUtils.on(i.window,["blur","focus"],function(e){if("blur"==e.type){i._bakRange=i.selection.getRange();try{i._bakNativeRange=i.selection.getNative().getRangeAt(0),i.selection.getNative().removeAllRanges()}catch(e){i._bakNativeRange=null}}else try{i._bakRange&&i._bakRange.select()}catch(e){}}),browser.gecko&&browser.version<=10902&&(i.body.contentEditable=!1,setTimeout(function(){i.body.contentEditable=!0},100),setInterval(function(){i.body.style.height=i.iframe.offsetHeight-20+"px"},100)),!n.isShow&&i.setHide(),n.readonly&&i.setDisabled()},sync:function(t){var i=this,n=t?document.getElementById(t):domUtils.findParent(i.iframe.parentNode,function(e){return"FORM"==e.tagName},!0);n&&e(n,i)},setHeight:function(e,t){e!==parseInt(this.iframe.parentNode.style.height)&&(this.iframe.parentNode.style.height=e+"px"),!t&&(this.options.minFrameHeight=this.options.initialFrameHeight=e),this.body.style.height=e+"px",!t&&this.trigger("setHeight")},addshortcutkey:function(e,t){var i={};t?i[e]=t:i=e,utils.extend(this.shortcutkeys,i)},_bindshortcutKeys:function(){var e=this,t=this.shortcutkeys;e.addListener("keydown",function(i,n){var o=n.keyCode||n.which;for(var r in t)for(var a,s=t[r].split(","),l=0;a=s[l++];){a=a.split(":");var d=a[0],c=a[1];(/^(ctrl)(\+shift)?\+(\d+)$/.test(d.toLowerCase())||/^(\d+)$/.test(d))&&(("ctrl"==RegExp.$1?n.ctrlKey||n.metaKey:0)&&(""!=RegExp.$2?n[RegExp.$2.slice(1)+"Key"]:1)&&o==RegExp.$3||o==RegExp.$1)&&(-1!=e.queryCommandState(r,c)&&e.execCommand(r,c),domUtils.preventDefault(n))}})},getContent:function(e,t,i,n,o){var r=this;if(e&&utils.isFunction(e)&&(t=e,e=""),t?!t():!this.hasContents())return"";r.fireEvent("beforegetcontent");var a=UE.htmlparser(r.body.innerHTML,n);return r.filterOutputRule(a),r.fireEvent("aftergetcontent",e,a),a.toHtml(o)},getAllHtml:function(){var e=this,t=[];if(e.fireEvent("getAllHtml",t),browser.ie&&browser.version>8){var i="";utils.each(e.document.styleSheets,function(e){i+=e.href?'<link rel="stylesheet" type="text/css" href="'+e.href+'" />':"<style>"+e.cssText+"</style>"}),utils.each(e.document.getElementsByTagName("script"),function(e){i+=e.outerHTML})}return"<html><head>"+(e.options.charset?'<meta http-equiv="Content-Type" content="text/html; charset='+e.options.charset+'"/>':"")+(i||e.document.getElementsByTagName("head")[0].innerHTML)+t.join("\n")+"</head><body "+(ie&&browser.version<9?'class="view"':"")+">"+e.getContent(null,null,!0)+"</body></html>"},getPlainTxt:function(){var e=new RegExp(domUtils.fillChar,"g"),t=this.body.innerHTML.replace(/[\n\r]/g,"");return t=t.replace(/<(p|div)[^>]*>(<br\/?>|&nbsp;)<\/\1>/gi,"\n").replace(/<br\/?>/gi,"\n").replace(/<[^>/]+>/g,"").replace(/(\n)?<\/([^>]+)>/g,function(e,t,i){return dtd.$block[i]?"\n":t?t:""}),t.replace(e,"").replace(/\u00a0/g," ").replace(/&nbsp;/g," ")},getContentTxt:function(){var e=new RegExp(domUtils.fillChar,"g");return this.body[browser.ie?"innerText":"textContent"].replace(e,"").replace(/\u00a0/g," ")},setContent:function(t,i,n){function o(e){return"DIV"==e.tagName&&e.getAttribute("cdata_tag")}var r=this;r.fireEvent("beforesetcontent",t);var a=UE.htmlparser(t);if(r.filterInputRule(a),t=a.toHtml(),r.body.innerHTML=(i?r.body.innerHTML:"")+t,"p"==r.options.enterTag){var s,l=this.body.firstChild;if(!l||1==l.nodeType&&(dtd.$cdata[l.tagName]||o(l)||domUtils.isCustomeNode(l))&&l===this.body.lastChild)this.body.innerHTML="<p>"+(browser.ie?"&nbsp;":"<br/>")+"</p>"+this.body.innerHTML;else for(var d=r.document.createElement("p");l;){for(;l&&(3==l.nodeType||1==l.nodeType&&dtd.p[l.tagName]&&!dtd.$cdata[l.tagName]);)s=l.nextSibling,d.appendChild(l),l=s;if(d.firstChild){if(!l){r.body.appendChild(d);break}l.parentNode.insertBefore(d,l),d=r.document.createElement("p")}l=l.nextSibling}}r.fireEvent("aftersetcontent"),r.fireEvent("contentchange"),!n&&r._selectionChange(),r._bakRange=r._bakIERange=r._bakNativeRange=null;var c;browser.gecko&&(c=this.selection.getNative())&&c.removeAllRanges(),r.options.autoSyncData&&r.form&&e(r.form,r)},focus:function(e){try{var t=this,i=t.selection.getRange();if(e){var n=t.body.lastChild;n&&1==n.nodeType&&!dtd.$empty[n.tagName]&&(domUtils.isEmptyBlock(n)?i.setStartAtFirst(n):i.setStartAtLast(n),i.collapse(!0)),i.setCursor(!0)}else{if(!i.collapsed&&domUtils.isBody(i.startContainer)&&0==i.startOffset){var n=t.body.firstChild;n&&1==n.nodeType&&!dtd.$empty[n.tagName]&&i.setStartAtFirst(n).collapse(!0)}i.select(!0)}this.fireEvent("focus selectionchange")}catch(o){}},isFocus:function(){return this.selection.isFocus()},blur:function(){var e=this.selection.getNative();if(e.empty&&browser.ie){var t=document.body.createTextRange();t.moveToElementText(document.body),t.collapse(!0),t.select(),e.empty()}else e.removeAllRanges()},_initEvents:function(){var e=this,t=e.document,i=e.window;e._proxyDomEvent=utils.bind(e._proxyDomEvent,e),domUtils.on(t,["click","contextmenu","mousedown","keydown","keyup","keypress","mouseup","mouseover","mouseout","selectstart"],e._proxyDomEvent),domUtils.on(i,["focus","blur"],e._proxyDomEvent),domUtils.on(e.body,"drop",function(t){browser.gecko&&t.stopPropagation&&t.stopPropagation(),e.fireEvent("contentchange")}),domUtils.on(t,["mouseup","keydown"],function(t){"keydown"==t.type&&(t.ctrlKey||t.metaKey||t.shiftKey||t.altKey)||2!=t.button&&e._selectionChange(250,t)})},_proxyDomEvent:function(e){return this.fireEvent("before"+e.type.replace(/^on/,"").toLowerCase())===!1?!1:this.fireEvent(e.type.replace(/^on/,""),e)===!1?!1:this.fireEvent("after"+e.type.replace(/^on/,"").toLowerCase())},_selectionChange:function(e,t){var i,o,r=this,a=!1;if(browser.ie&&browser.version<9&&t&&"mouseup"==t.type){var s=this.selection.getRange();s.collapsed||(a=!0,i=t.clientX,o=t.clientY)}clearTimeout(n),n=setTimeout(function(){if(r.selection&&r.selection.getNative()){var e;if(a&&"None"==r.selection.getNative().type){e=r.document.body.createTextRange();try{e.moveToPoint(i,o)}catch(n){e=null}}var s;e&&(s=r.selection.getIERange,r.selection.getIERange=function(){return e}),r.selection.cache(),s&&(r.selection.getIERange=s),r.selection._cachedRange&&r.selection._cachedStartElement&&(r.fireEvent("beforeselectionchange"),r.fireEvent("selectionchange",!!t),r.fireEvent("afterselectionchange"),r.selection.clear())}},e||50)},_callCmdFn:function(e,t){var i,n,o=t[0].toLowerCase();return i=this.commands[o]||UE.commands[o],n=i&&i[e],i&&n||"queryCommandState"!=e?n?n.apply(this,t):void 0:0},execCommand:function(e){e=e.toLowerCase();var t,i=this,n=i.commands[e]||UE.commands[e];return n&&n.execCommand?(n.notNeedUndo||i.__hasEnterExecCommand?(t=this._callCmdFn("execCommand",arguments),!i.__hasEnterExecCommand&&!n.ignoreContentChange&&!i._ignoreContentChange&&i.fireEvent("contentchange")):(i.__hasEnterExecCommand=!0,-1!=i.queryCommandState.apply(i,arguments)&&(i.fireEvent("saveScene"),i.fireEvent.apply(i,["beforeexeccommand",e].concat(arguments)),t=this._callCmdFn("execCommand",arguments),i.fireEvent.apply(i,["afterexeccommand",e].concat(arguments)),i.fireEvent("saveScene")),i.__hasEnterExecCommand=!1),!i.__hasEnterExecCommand&&!n.ignoreContentChange&&!i._ignoreContentChange&&i._selectionChange(),t):null},queryCommandState:function(){return this._callCmdFn("queryCommandState",arguments)},queryCommandValue:function(){return this._callCmdFn("queryCommandValue",arguments)},hasContents:function(e){if(e)for(var t,i=0;t=e[i++];)if(this.document.getElementsByTagName(t).length>0)return!0;if(!domUtils.isEmptyBlock(this.body))return!0;for(e=["div"],i=0;t=e[i++];)for(var n,o=domUtils.getElementsByTagName(this.document,t),r=0;n=o[r++];)if(domUtils.isCustomeNode(n))return!0;return!1},reset:function(){this.fireEvent("reset")},setEnabled:function(){var e,t=this;if("false"==t.body.contentEditable){t.body.contentEditable=!0,e=t.selection.getRange();try{e.moveToBookmark(t.lastBk),delete t.lastBk}catch(i){e.setStartAtFirst(t.body).collapse(!0)}e.select(!0),t.bkqueryCommandState&&(t.queryCommandState=t.bkqueryCommandState,delete t.bkqueryCommandState),t.bkqueryCommandValue&&(t.queryCommandValue=t.bkqueryCommandValue,delete t.bkqueryCommandValue),t.fireEvent("selectionchange")}},enable:function(){return this.setEnabled()},setDisabled:function(e){var t=this;e=e?utils.isArray(e)?e:[e]:[],"true"==t.body.contentEditable&&(t.lastBk||(t.lastBk=t.selection.getRange().createBookmark(!0)),t.body.contentEditable=!1,t.bkqueryCommandState=t.queryCommandState,t.bkqueryCommandValue=t.queryCommandValue,t.queryCommandState=function(i){return-1!=utils.indexOf(e,i)?t.bkqueryCommandState.apply(t,arguments):-1},t.queryCommandValue=function(i){return-1!=utils.indexOf(e,i)?t.bkqueryCommandValue.apply(t,arguments):null},t.fireEvent("selectionchange"))},disable:function(e){return this.setDisabled(e)},_setDefaultContent:function(){function e(){var t=this;t.document.getElementById("initContent")&&(t.body.innerHTML="<p>"+(ie?"":"<br/>")+"</p>",t.removeListener("firstBeforeExecCommand focus",e),setTimeout(function(){t.focus(),t._selectionChange()},0))}return function(t){var i=this;i.body.innerHTML='<p id="initContent">'+t+"</p>",i.addListener("firstBeforeExecCommand focus",e)}}(),setShow:function(){var e=this,t=e.selection.getRange();if("none"==e.container.style.display){try{t.moveToBookmark(e.lastBk),delete e.lastBk}catch(i){t.setStartAtFirst(e.body).collapse(!0)}setTimeout(function(){t.select(!0)},100),e.container.style.display=""}},show:function(){return this.setShow()},setHide:function(){var e=this;e.lastBk||(e.lastBk=e.selection.getRange().createBookmark(!0)),e.container.style.display="none"},hide:function(){return this.setHide()},getLang:function(e){var t=UE.I18N[this.options.lang];if(!t)throw Error("not import language file");e=(e||"").split(".");for(var i,n=0;(i=e[n++])&&(t=t[i],t););return t
},getContentLength:function(e,t){var i=this.getContent(!1,!1,!0).length;if(e){t=(t||[]).concat(["hr","img","iframe"]),i=this.getContentTxt().replace(/[\t\r\n]+/g,"").length;for(var n,o=0;n=t[o++];)i+=this.document.getElementsByTagName(n).length}return i},addInputRule:function(e){this.inputRules.push(e)},filterInputRule:function(e){for(var t,i=0;t=this.inputRules[i++];)t.call(this,e)},addOutputRule:function(e){this.outputRules.push(e)},filterOutputRule:function(e){for(var t,i=0;t=this.outputRules[i++];)t.call(this,e)},getActionUrl:function(e){var t=this.getOpt(e)||e,i=this.getOpt("imageUrl"),n=this.getOpt("serverUrl");return!n&&i&&(n=i.replace(/^(.*[\/]).+([\.].+)$/,"$1controller$2")),n?(n=n+(-1==n.indexOf("?")?"?":"&")+"action="+(t||""),utils.formatUrl(n)):""}},utils.inherits(r,EventBase)}(),UE.Editor.defaultOptions=function(e){var t=e.options.UEDITOR_HOME_URL;return{isShow:!0,initialContent:"",initialStyle:"",autoClearinitialContent:!1,iframeCssUrl:t+"themes/iframe.css?t=20190828",textarea:"editorValue",focus:!1,focusInEnd:!0,autoClearEmptyNode:!0,fullscreen:!1,readonly:!1,zIndex:999,imagePopup:!0,enterTag:"p",customDomain:!1,lang:"zh-cn",langPath:t+"lang/",theme:"default",themePath:t+"themes/",allHtmlEnabled:!1,scaleEnabled:!1,tableNativeEditInFF:!1,autoSyncData:!0,fileNameFormat:"{time}{rand:6}"}},function(){UE.Editor.prototype.loadServerConfig=function(){function showErrorMsg(){}var me=this;setTimeout(function(){try{me.options.imageUrl&&me.setOpt("serverUrl",me.options.imageUrl.replace(/^(.*[\/]).+([\.].+)$/,"$1controller$2"));var configUrl=me.getActionUrl("config"),isJsonp=utils.isCrossDomainUrl(configUrl);me._serverConfigLoaded=!1,configUrl&&UE.ajax.request(configUrl,{method:"GET",dataType:isJsonp?"jsonp":"",onsuccess:function(r){try{var config=isJsonp?r:eval("("+r.responseText+")");utils.extend(me.options,config),me.fireEvent("serverConfigLoaded"),me._serverConfigLoaded=!0}catch(e){showErrorMsg(me.getLang("loadconfigFormatError"))}},onerror:function(){showErrorMsg(me.getLang("loadconfigHttpError"))}})}catch(e){showErrorMsg(me.getLang("loadconfigError"))}})},UE.Editor.prototype.isServerConfigLoaded=function(){var e=this;return e._serverConfigLoaded||!1},UE.Editor.prototype.afterConfigReady=function(e){if(e&&utils.isFunction(e)){var t=this;e.call(t,"serverConfigLoaded")}}}(),UE.ajax=function(){function e(e){var t=[];for(var i in e)if("method"!=i&&"timeout"!=i&&"async"!=i&&"dataType"!=i&&"callback"!=i&&"headers"!=i&&void 0!=e[i]&&null!=e[i])if("function"!=(typeof e[i]).toLowerCase()&&"object"!=(typeof e[i]).toLowerCase())t.push(encodeURIComponent(i)+"="+encodeURIComponent(e[i]));else if(utils.isArray(e[i]))for(var n=0;n<e[i].length;n++)t.push(encodeURIComponent(i)+"[]="+encodeURIComponent(e[i][n]));return t.join("&")}function t(t,i){var n=r(),o=!1,a={method:"POST",timeout:5e3,async:!0,data:{},onsuccess:function(){},onerror:function(){}};if("object"==typeof t&&(i=t,t=i.url),n&&t){var s=i?utils.extend(a,i):a,l=e(s);utils.isEmptyObject(s.data)||(l+=(l?"&":"")+e(s.data));var d=setTimeout(function(){4!=n.readyState&&(o=!0,n.abort(),clearTimeout(d))},s.timeout),c=s.method.toUpperCase(),u=t+(-1==t.indexOf("?")?"?":"&")+("POST"==c?"":l+"&noCache="+ +new Date);n.open(c,u,s.async),n.onreadystatechange=function(){4==n.readyState&&(o||200!=n.status?s.onerror(n):s.onsuccess(n))},s.headers&&utils.each(s.headers,function(e,t){n.setRequestHeader(t,e)}),"POST"==c?s.data.input?n.send(s.data.input):(n.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),n.send(l)):n.send(null)}}function i(t,i){function n(e,t,i){e.setAttribute("type","text/javascript"),e.setAttribute("defer","defer"),i&&e.setAttribute("charset",i),e.setAttribute("src",t),document.getElementsByTagName("head")[0].appendChild(e)}function o(e){return function(){try{if(e)c.onerror&&c.onerror();else try{clearTimeout(a),l.apply(window,arguments)}catch(t){}}catch(i){c.onerror&&c.onerror.call(window,i)}finally{c.oncomplete&&c.oncomplete.apply(window,arguments),d.parentNode&&d.parentNode.removeChild(d),window[r]=null;try{delete window[r]}catch(t){}}}}var r,a,s,l=i.onsuccess||function(){},d=document.createElement("SCRIPT"),c=i||{},u=c.charset,m=c.jsonp||"callback",p=c.timeOut||0,h=new RegExp("(\\?|&)"+m+"=([^&]*)");utils.isFunction(l)?(r="bd__editor__"+Math.floor(2147483648*Math.random()).toString(36),window[r]=o(0)):utils.isString(l)?r=l:(s=h.exec(t))&&(r=s[2]),t=t.replace(h,"$1"+m+"="+r),t.search(h)<0&&(t+=(t.indexOf("?")<0?"?":"&")+m+"="+r);var f=e(i);utils.isEmptyObject(i.data)||(f+=(f?"&":"")+e(i.data)),f&&(t=t.replace(/\?/,"?"+f+"&")),d.onerror=o(1),p&&(a=setTimeout(o(1),p)),n(d,t,u)}var n="XMLHttpRequest()";try{new ActiveXObject("Msxml2.XMLHTTP"),n="ActiveXObject('Msxml2.XMLHTTP')"}catch(o){try{new ActiveXObject("Microsoft.XMLHTTP"),n="ActiveXObject('Microsoft.XMLHTTP')"}catch(o){}}var r=new Function("return new "+n);return{request:function(e,n){n&&"jsonp"==n.dataType?i(e,n):t(e,n)},getJSONP:function(e,t,n){var o={data:t,oncomplete:n};i(e,o)}}}();var filterWord=UE.filterWord=function(){function e(e){return/(class="?Mso|style="[^"]*\bmso\-|w:WordDocument|<(v|o):|lang=)/gi.test(e)}function t(e){return e=e.replace(/[\d.]+\w+/g,function(e){return utils.transUnitToPx(e)})}function i(e){return e.replace(/[\t\r\n]+/g," ").replace(/<!--[\s\S]*?-->/gi,"").replace(/<v:shape [^>]*>[\s\S]*?.<\/v:shape>/gi,function(e){if(browser.opera)return"";try{if(/Bitmap/i.test(e))return"";var i=e.match(/width:([ \d.]*p[tx])/i)[1],n=e.match(/height:([ \d.]*p[tx])/i)[1],o=e.match(/src=\s*"([^"]*)"/i)[1];return'<img width="'+t(i)+'" height="'+t(n)+'" src="'+o+'" />'}catch(r){return""}}).replace(/<\/?div[^>]*>/g,"").replace(/v:\w+=(["']?)[^'"]+\1/g,"").replace(/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|xml|meta|link|style|\w+:\w+)(?=[\s\/>]))[^>]*>/gi,"").replace(/<p [^>]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi,"<p><strong>$1</strong></p>").replace(/\s+(class|lang|align)\s*=\s*(['"]?)([\w-]+)\2/gi,function(e,t,i,n){return"class"==t&&"MsoListParagraph"==n?e:""}).replace(/<(font|span)[^>]*>(\s*)<\/\1>/gi,function(e,t,i){return i.replace(/[\t\r\n ]+/g," ")}).replace(/(<[a-z][^>]*)\sstyle=(["'])([^\2]*?)\2/gi,function(e,i,n,o){for(var r,a=[],s=o.replace(/^\s+|\s+$/,"").replace(/&#39;/g,"'").replace(/&quot;/gi,"'").replace(/[\d.]+(cm|pt)/g,function(e){return utils.transUnitToPx(e)}).split(/;\s*/g),l=0;r=s[l];l++){var d,c,u=r.split(":");if(2==u.length){if(d=u[0].toLowerCase(),c=u[1].toLowerCase(),/^(background)\w*/.test(d)&&0==c.replace(/(initial|\s)/g,"").length||/^(margin)\w*/.test(d)&&/^0\w+$/.test(c))continue;switch(d){case"mso-padding-alt":case"mso-padding-top-alt":case"mso-padding-right-alt":case"mso-padding-bottom-alt":case"mso-padding-left-alt":case"mso-margin-alt":case"mso-margin-top-alt":case"mso-margin-right-alt":case"mso-margin-bottom-alt":case"mso-margin-left-alt":case"mso-height":case"mso-width":case"mso-vertical-align-alt":/<table/.test(i)||(a[l]=d.replace(/^mso-|-alt$/g,"")+":"+t(c));continue;case"horiz-align":a[l]="text-align:"+c;continue;case"vert-align":a[l]="vertical-align:"+c;continue;case"font-color":case"mso-foreground":a[l]="color:"+c;continue;case"mso-background":case"mso-highlight":a[l]="background:"+c;continue;case"mso-default-height":a[l]="min-height:"+t(c);continue;case"mso-default-width":a[l]="min-width:"+t(c);continue;case"mso-padding-between-alt":a[l]="border-collapse:separate;border-spacing:"+t(c);continue;case"text-line-through":("single"==c||"double"==c)&&(a[l]="text-decoration:line-through");continue;case"mso-zero-height":"yes"==c&&(a[l]="display:none");continue;case"margin":if(!/[1-9]/.test(c))continue}if(/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?:decor|trans)|top-bar|version|vnd|word-break)/.test(d)||/text\-indent|padding|margin/.test(d)&&/\-[\d.]+/.test(c))continue;a[l]=d+":"+u[1]}}return i+(a.length?' style="'+a.join(";").replace(/;{2,}/g,";")+'"':"")})}return function(t){return e(t)?i(t):t}}();!function(){function e(e,t,i){return e.push(p),t+(i?1:-1)}function t(e,t){for(var i=0;t>i;i++)e.push(m)}function i(a,s,l,d){switch(a.type){case"root":for(var c,u=0;c=a.children[u++];)l&&"element"==c.type&&!dtd.$inlineWithA[c.tagName]&&u>1&&(e(s,d,!0),t(s,d)),i(c,s,l,d);break;case"text":n(a,s);break;case"element":o(a,s,l,d);break;case"comment":r(a,s,l)}return s}function n(e,t){t.push("pre"==e.parentNode.tagName?e.data:u[e.parentNode.tagName]?utils.html(e.data):e.data.replace(/[ ]{2}/g," &nbsp;"))}function o(n,o,r,a){var s="";if(n.attrs){s=[];var l=n.attrs;for(var d in l)s.push(d+(void 0!==l[d]?'="'+(c[d]?utils.html(l[d]).replace(/["]/g,function(){return"&quot;"}):utils.unhtml(l[d]))+'"':""));s=s.join(" ")}if(o.push("<"+n.tagName+(s?" "+s:"")+(dtd.$empty[n.tagName]?"/":"")+">"),r&&!dtd.$inlineWithA[n.tagName]&&"pre"!=n.tagName&&n.children&&n.children.length&&(a=e(o,a,!0),t(o,a)),n.children&&n.children.length)for(var u,m=0;u=n.children[m++];)r&&"element"==u.type&&!dtd.$inlineWithA[u.tagName]&&m>1&&(e(o,a),t(o,a)),i(u,o,r,a);dtd.$empty[n.tagName]||(r&&!dtd.$inlineWithA[n.tagName]&&"pre"!=n.tagName&&n.children&&n.children.length&&(a=e(o,a),t(o,a)),o.push("</"+n.tagName+">"))}function r(e,t){t.push("<!--"+e.data+"-->")}function a(e,t){var i;if("element"==e.type&&e.getAttr("id")==t)return e;if(e.children&&e.children.length)for(var n,o=0;n=e.children[o++];)if(i=a(n,t))return i}function s(e,t,i){if("element"==e.type&&e.tagName==t&&i.push(e),e.children&&e.children.length)for(var n,o=0;n=e.children[o++];)s(n,t,i)}function l(e,t){if(e.children&&e.children.length)for(var i,n=0;i=e.children[n];)l(i,t),i.parentNode&&(i.children&&i.children.length&&t(i),i.parentNode&&n++);else t(e)}var d=UE.uNode=function(e){this.type=e.type,this.data=e.data,this.tagName=e.tagName,this.parentNode=e.parentNode,this.attrs=e.attrs||{},this.children=e.children},c={href:1,src:1,_src:1,_href:1,cdata_data:1,data_img:1,data_type:1,data_src:1,data_swf:1,data_title:1,data_time:1,data_def:1,data_itemid:1},u={style:1,script:1},m="    ",p="\n";d.createElement=function(e){return/[<>]/.test(e)?UE.htmlparser(e).children[0]:new d({type:"element",children:[],tagName:e})},d.createText=function(e,t){return new UE.uNode({type:"text",data:t?e:utils.unhtml(e||"")})},d.prototype={toHtml:function(e){var t=[];return i(this,t,e,0),t.join("")},innerHTML:function(e){if("element"!=this.type||dtd.$empty[this.tagName])return this;if(utils.isString(e)){if(this.children)for(var t,i=0;t=this.children[i++];)t.parentNode=null;this.children=[];for(var t,n=UE.htmlparser(e),i=0;t=n.children[i++];)this.children.push(t),t.parentNode=this;return this}var n=new UE.uNode({type:"root",children:this.children});return n.toHtml()},innerText:function(e,t){if("element"!=this.type||dtd.$empty[this.tagName])return this;if(e){if(this.children)for(var i,n=0;i=this.children[n++];)i.parentNode=null;return this.children=[],this.appendChild(d.createText(e,t)),this}return this.toHtml().replace(/<[^>]+>/g,"")},getData:function(){return"element"==this.type?"":this.data},firstChild:function(){return this.children?this.children[0]:null},lastChild:function(){return this.children?this.children[this.children.length-1]:null},previousSibling:function(){for(var e,t=this.parentNode,i=0;e=t.children[i];i++)if(e===this)return 0==i?null:t.children[i-1]},nextSibling:function(){for(var e,t=this.parentNode,i=0;e=t.children[i++];)if(e===this)return t.children[i]},replaceChild:function(e,t){if(this.children){e.parentNode&&e.parentNode.removeChild(e);for(var i,n=0;i=this.children[n];n++)if(i===t)return this.children.splice(n,1,e),t.parentNode=null,e.parentNode=this,e}},appendChild:function(e){if("root"==this.type||"element"==this.type&&!dtd.$empty[this.tagName]){this.children||(this.children=[]),e.parentNode&&e.parentNode.removeChild(e);for(var t,i=0;t=this.children[i];i++)if(t===e){this.children.splice(i,1);break}return this.children.push(e),e.parentNode=this,e}},insertBefore:function(e,t){if(this.children){e.parentNode&&e.parentNode.removeChild(e);for(var i,n=0;i=this.children[n];n++)if(i===t)return this.children.splice(n,0,e),e.parentNode=this,e}},insertAfter:function(e,t){if(this.children){e.parentNode&&e.parentNode.removeChild(e);for(var i,n=0;i=this.children[n];n++)if(i===t)return this.children.splice(n+1,0,e),e.parentNode=this,e}},removeChild:function(e,t){if(this.children)for(var i,n=0;i=this.children[n];n++)if(i===e){if(this.children.splice(n,1),i.parentNode=null,t&&i.children&&i.children.length)for(var o,r=0;o=i.children[r];r++)this.children.splice(n+r,0,o),o.parentNode=this;return i}},getAttr:function(e){return this.attrs&&this.attrs[e.toLowerCase()]},setAttr:function(e,t){if(!e)return void delete this.attrs;if(this.attrs||(this.attrs={}),utils.isObject(e))for(var i in e)e[i]?this.attrs[i.toLowerCase()]=e[i]:delete this.attrs[i];else t?this.attrs[e.toLowerCase()]=t:delete this.attrs[e]},getIndex:function(){for(var e,t=this.parentNode,i=0;e=t.children[i];i++)if(e===this)return i;return-1},getNodeById:function(e){var t;if(this.children&&this.children.length)for(var i,n=0;i=this.children[n++];)if(t=a(i,e))return t},getNodesByTagName:function(e){e=utils.trim(e).replace(/[ ]{2,}/g," ").split(" ");var t=[],i=this;return utils.each(e,function(e){if(i.children&&i.children.length)for(var n,o=0;n=i.children[o++];)s(n,e,t)}),t},getStyle:function(e){var t=this.getAttr("style");if(!t)return"";var i=new RegExp("(^|;)\\s*"+e+":([^;]+)","i"),n=t.match(i);return n&&n[0]?n[2]:""},setStyle:function(e,t){function i(e,t){var i=new RegExp("(^|;)\\s*"+e+":([^;]+;?)","gi");n=n.replace(i,"$1"),t&&(n=e+":"+utils.unhtml(t)+";"+n)}var n=this.getAttr("style");if(n||(n=""),utils.isObject(e))for(var o in e)i(o,e[o]);else i(e,t);this.setAttr("style",utils.trim(n))},traversal:function(e){return this.children&&this.children.length&&l(this,e),this}}}();var htmlparser=UE.htmlparser=function(e,t){function i(e,t){if(m[e.tagName]){var i=c.createElement(m[e.tagName]);e.appendChild(i),i.appendChild(c.createText(t)),e=i}else e.appendChild(c.createText(t))}function n(e,t,i){var o;if(o=u[t]){for(var r,s=e;"root"!=s.type;){if(utils.isArray(o)?-1!=utils.indexOf(o,s.tagName):o==s.tagName){e=s,r=!0;break}s=s.parentNode}r||(e=n(e,utils.isArray(o)?o[0]:o))}var l=new c({parentNode:e,type:"element",tagName:t.toLowerCase(),children:dtd.$empty[t]?null:[]});if(i){for(var m,p={};m=a.exec(i);)p[m[1].toLowerCase()]=d[m[1].toLowerCase()]?m[2]||m[3]||m[4]:utils.unhtml(m[2]||m[3]||m[4]);l.attrs=p}return e.children.push(l),dtd.$empty[t]?e:l}function o(e,t){e.children.push(new c({type:"comment",data:t,parentNode:e}))}var r=/<(?:(?:\/([^>]+)>)|(?:!--([\S|\s]*?)-->)|(?:([^\s\/<>]+)\s*((?:(?:"[^"]*")|(?:'[^']*')|[^"'<>])*)\/?>))/g,a=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,s={b:1,code:1,i:1,u:1,strike:1,s:1,tt:1,strong:1,q:1,samp:1,em:1,span:1,sub:1,img:1,sup:1,font:1,big:1,small:1,iframe:1,a:1,br:1,pre:1};e=e.replace(new RegExp(domUtils.fillChar,"g"),""),t||(e=e.replace(new RegExp("[\\r\\t\\n"+(t?"":" ")+"]*</?(\\w+)\\s*(?:[^>]*)>[\\r\\t\\n"+(t?"":" ")+"]*","g"),function(e,i){return i&&s[i.toLowerCase()]?e.replace(/(^[\n\r]+)|([\n\r]+$)/g,""):e.replace(new RegExp("^[\\r\\n"+(t?"":" ")+"]+"),"").replace(new RegExp("[\\r\\n"+(t?"":" ")+"]+$"),"")}));for(var l,d={href:1,src:1},c=UE.uNode,u={td:"tr",tr:["tbody","thead","tfoot"],tbody:"table",th:"tr",thead:"table",tfoot:"table",caption:"table",li:["ul","ol"],dt:"dl",dd:"dl",option:"select"},m={ol:"li",ul:"li"},p=0,h=0,f=new c({type:"root",children:[]}),g=f;l=r.exec(e);){p=l.index;try{if(p>h&&i(g,e.slice(h,p)),l[3])dtd.$cdata[g.tagName]?i(g,l[0]):g=n(g,l[3].toLowerCase(),l[4]);else if(l[1]){if("root"!=g.type)if(dtd.$cdata[g.tagName]&&!dtd.$cdata[l[1]])i(g,l[0]);else{for(var v=g;"element"==g.type&&g.tagName!=l[1].toLowerCase();)if(g=g.parentNode,"root"==g.type)throw g=v,"break";g=g.parentNode}}else l[2]&&o(g,l[2])}catch(b){}h=r.lastIndex}return h<e.length&&i(g,e.slice(h)),f},filterNode=UE.filterNode=function(){function e(t,i){switch(t.type){case"text":break;case"element":var n;if(n=i[t.tagName])if("-"===n)t.parentNode.removeChild(t);else if(utils.isFunction(n)){var o=t.parentNode,r=t.getIndex();if(n(t),t.parentNode){if(t.children)for(var a,s=0;a=t.children[s];)e(a,i),a.parentNode&&s++}else for(var a,s=r;a=o.children[s];)e(a,i),a.parentNode&&s++}else{var l=n.$;if(l&&t.attrs){var d,c={};for(var u in l){if(d=t.getAttr(u),"style"==u&&utils.isArray(l[u])){var m=[];utils.each(l[u],function(e){var i;(i=t.getStyle(e))&&m.push(e+":"+i)}),d=m.join(";")}d&&(c[u]=d)}t.attrs=c}if(t.children)for(var a,s=0;a=t.children[s];)e(a,i),a.parentNode&&s++}else if(dtd.$cdata[t.tagName])t.parentNode.removeChild(t);else{var o=t.parentNode,r=t.getIndex();t.parentNode.removeChild(t,!0);for(var a,s=r;a=o.children[s];)e(a,i),a.parentNode&&s++}break;case"comment":t.parentNode.removeChild(t)}}return function(t,i){if(utils.isEmptyObject(i))return t;var n;(n=i["-"])&&utils.each(n.split(" "),function(e){i[e]="-"});for(var o,r=0;o=t.children[r];)e(o,i),o.parentNode&&r++;return t}}();UE.plugin=function(){var e={};return{register:function(t,i,n,o){n&&utils.isFunction(n)&&(o=n,n=null),e[t]={optionName:n||t,execFn:i,afterDisabled:o}},load:function(t){utils.each(e,function(e){var i=e.execFn.call(t);t.options[e.optionName]!==!1?i&&utils.each(i,function(e,i){switch(i.toLowerCase()){case"shortcutkey":t.addshortcutkey(e);break;case"bindevents":utils.each(e,function(e,i){t.addListener(i,e)});break;case"bindmultievents":utils.each(utils.isArray(e)?e:[e],function(e){var i=utils.trim(e.type).split(/\s+/);utils.each(i,function(i){t.addListener(i,e.handler)})});break;case"commands":utils.each(e,function(e,i){t.commands[i]=e});break;case"outputrule":t.addOutputRule(e);break;case"inputrule":t.addInputRule(e);break;case"defaultoptions":t.setOpt(e)}}):e.afterDisabled&&e.afterDisabled.call(t)}),utils.each(UE.plugins,function(e){e.call(t)})},run:function(t,i){var n=e[t];n&&n.exeFn.call(i)}}}();var keymap=UE.keymap={Backspace:8,Tab:9,Enter:13,Shift:16,Control:17,Alt:18,CapsLock:20,Esc:27,Spacebar:32,PageUp:33,PageDown:34,End:35,Home:36,Left:37,Up:38,Right:39,Down:40,Insert:45,Del:46,NumLock:144,Cmd:91,"=":187,"-":189,b:66,i:73,z:90,y:89,v:86,x:88,s:83,n:78},LocalStorage=UE.LocalStorage=function(){function e(){var e=document.createElement("div");return e.style.display="none",e.addBehavior?(e.addBehavior("#default#userdata"),{getItem:function(t){var n=null;try{document.body.appendChild(e),e.load(i),n=e.getAttribute(t),document.body.removeChild(e)}catch(o){}return n},setItem:function(t,n){document.body.appendChild(e),e.setAttribute(t,n),e.save(i),document.body.removeChild(e)},removeItem:function(t){document.body.appendChild(e),e.removeAttribute(t),e.save(i),document.body.removeChild(e)}}):null}var t=window.localStorage||e()||null,i="localStorage";return{saveLocalData:function(e,i){return t&&i?(t.setItem(e,i),!0):!1},getLocalData:function(e){return t?t.getItem(e):null},removeItem:function(e){t&&t.removeItem(e)}}}();!function(){var e="ueditor_preference";UE.Editor.prototype.setPreferences=function(t,i){var n={};utils.isString(t)?n[t]=i:n=t;var o=LocalStorage.getLocalData(e);o&&(o=utils.str2json(o))?utils.extend(o,n):o=n,o&&LocalStorage.saveLocalData(e,utils.json2str(o))},UE.Editor.prototype.getPreferences=function(t){var i=LocalStorage.getLocalData(e);return i&&(i=utils.str2json(i))?t?i[t]:i:null},UE.Editor.prototype.removePreferences=function(t){var i=LocalStorage.getLocalData(e);i&&(i=utils.str2json(i))&&(i[t]=void 0,delete i[t]),i&&LocalStorage.saveLocalData(e,utils.json2str(i))}}(),UE.iknow=UE.iknow||{};var httpsTool=require("common:widget/js/util/https/https");UE.iknow.localImage=function(e){var t=this,i=UE.htmlparser(e),n=t.getOpt("waitImageUrl"),o=(t.getOpt("transImageUrl"),t.getOpt("imageUploadUrl"));return window.localizeSuccess=function(e){var i=e.getAttribute("data-src");UE.ajax.request(o,{method:"POST",headers:{"X-Requested-With":"XMLHttpRequest"},data:{cm:100682,picUrl:i},onsuccess:function(i){var n=utils.str2json(i.responseText);if("0"===n.errorNo&&n.url){var o=(new Date).getTime();e.setAttribute("src",t.getOpt("needHttpsAutoTrans")?httpsTool.autoTrans(n.url):n.url),e.setAttribute("data_time",o),e.removeAttribute("onload"),e.removeAttribute("onerror"),e.removeAttribute("data-src")}else"265"===n.errorNo?(e.parentNode.removeChild(e),t.fireEvent("showmessage",{id:+new Date,content:t.getLang("needLoginMsg"),type:"error",timeout:1e3})):e.parentNode.removeChild(e);t.fireEvent("afterinserthtml")},onerror:function(){e.parentNode.removeChild(e),t.fireEvent("afterinserthtml")}})},window.localizeFailure=function(e){e.parentNode.removeChild(e)},utils.each(i.getNodesByTagName("img"),function(e){var t=e.attrs.src,i=e.attrs.data_resid;t&&i&&(e.attrs["data-src"]=t,e.attrs.src=n,e.attrs.onload="parent.localizeSuccess(this)",e.attrs.onerror="parent.localizeFailure(this)")}),i.toHtml()},UE.plugins.defaultfilter=function(){var e=this;e.setOpt({allowDivTransToP:!0,disabledTableInTable:!0}),e.addInputRule(function(t){function i(e){for(;e&&"element"==e.type;){if("td"==e.tagName)return!0;e=e.parentNode}return!1}var n,o=this.options.allowDivTransToP;t.traversal(function(t){if("element"==t.type){if(!dtd.$cdata[t.tagName]&&e.options.autoClearEmptyNode&&dtd.$inline[t.tagName]&&!dtd.$empty[t.tagName]&&(!t.attrs||utils.isEmptyObject(t.attrs)))return void(t.firstChild()?"span"!=t.tagName||t.attrs&&!utils.isEmptyObject(t.attrs)||t.parentNode.removeChild(t,!0):t.parentNode.removeChild(t));switch(t.tagName){case"style":case"script":t.setAttr({cdata_tag:t.tagName,cdata_data:t.innerHTML()||"",_ue_custom_node_:"true"}),t.tagName="div",t.innerHTML("");break;case"a":(n=t.getAttr("href"))&&t.setAttr("_href",n);break;case"img":if("edui-faked-video"!=t.getAttr("class")){var r=t.getAttr("src"),a=t.getAttr("id"),s=t.getAttr("data_time")||0,l=(new Date).getTime(),d=l-s,c=d>72e5&&s;!r||c?t.parentNode.removeChild(t):(t.setAttr(),t.setAttr("src",r),a&&t.setAttr("id",a),s&&t.setAttr("data_time",s))}break;case"span":browser.webkit&&(n=t.getStyle("white-space"))&&/nowrap|normal/.test(n)&&(t.setStyle("white-space",""),e.options.autoClearEmptyNode&&utils.isEmptyObject(t.attrs)&&t.parentNode.removeChild(t,!0)),n=t.getAttr("id"),n&&/^_baidu_bookmark_/i.test(n)&&t.parentNode.removeChild(t);break;case"p":(n=t.getAttr("align"))&&(t.setAttr("align"),t.setStyle("text-align",n)),utils.each(t.children,function(e){if("element"==e.type&&"p"==e.tagName){var i=e.nextSibling();t.parentNode.insertAfter(e,t);for(var n=e;i;){var o=i.nextSibling();t.parentNode.insertAfter(i,n),n=i,i=o}return!1}}),t.firstChild()||t.innerHTML(browser.ie?"&nbsp;":"<br/>");break;case"div":if(t.getAttr("cdata_tag"))break;if(n=t.getAttr("class"),n&&/^line number\d+/.test(n))break;if(!o)break;for(var u,m=UE.uNode.createElement("p");u=t.firstChild();)"text"!=u.type&&UE.dom.dtd.$block[u.tagName]?m.firstChild()?(t.parentNode.insertBefore(m,t),m=UE.uNode.createElement("p")):t.parentNode.insertBefore(u,t):m.appendChild(u);m.firstChild()&&t.parentNode.insertBefore(m,t),t.parentNode.removeChild(t);break;case"dl":t.tagName="ul";break;case"dt":case"dd":t.tagName="li";break;case"li":var p=t.getAttr("class");p&&/list\-/.test(p)||t.setAttr();var h=t.getNodesByTagName("ol ul");UE.utils.each(h,function(e){t.parentNode.insertAfter(e,t)});break;case"td":case"th":case"caption":t.children&&t.children.length||t.appendChild(browser.ie11below?UE.uNode.createText(" "):UE.uNode.createElement("br"));break;case"table":e.options.disabledTableInTable&&i(t)&&(t.parentNode.insertBefore(UE.uNode.createText(t.innerText()),t),t.parentNode.removeChild(t))}}})}),e.addOutputRule(function(t){var i;t.traversal(function(t){if("element"==t.type){if(e.options.autoClearEmptyNode&&dtd.$inline[t.tagName]&&!dtd.$empty[t.tagName]&&(!t.attrs||utils.isEmptyObject(t.attrs)))return void(t.firstChild()?"span"!=t.tagName||t.attrs&&!utils.isEmptyObject(t.attrs)||t.parentNode.removeChild(t,!0):t.parentNode.removeChild(t));switch(t.tagName){case"div":t.parentNode.removeChild(t,!0);break;case"a":(i=t.getAttr("_href"))&&t.setAttr({href:utils.html(i),_href:""});break;case"span":i=t.getAttr("id"),i&&/^_baidu_bookmark_/i.test(i)&&t.parentNode.removeChild(t);break;case"img":if("edui-faked-video"!=t.getAttr("class")){var n=t.getAttr("src"),o=t.getAttr("data_src"),r=t.getAttr("data_resid"),a=t.getAttr("data_time");t.setAttr();var s=o?o:n;/^data:/.test(s)?t.parentNode.removeChild(t):(t.setAttr("src",s),a&&t.setAttr("data_time",a),r&&t.setAttr("data_resid",r))}}}})})},UE.commands.inserthtml={execCommand:function(e,t,i){var n,o,r=this;if(t&&r.fireEvent("beforeinserthtml",t)!==!0){if(n=r.selection.getRange(),o=n.document.createElement("div"),o.style.display="inline",!i){var a=UE.htmlparser(t);r.options.filterRules&&UE.filterNode(a,r.options.filterRules),r.filterInputRule(a),t=a.toHtml()}if(UE.iknow.localImage&&(t=UE.iknow.localImage.call(r,t)),o.innerHTML=utils.trim(t),!n.collapsed){var s=n.startContainer;if(domUtils.isFillChar(s)&&n.setStartBefore(s),s=n.endContainer,domUtils.isFillChar(s)&&n.setEndAfter(s),n.txtToElmBoundary(),n.endContainer&&1==n.endContainer.nodeType&&(s=n.endContainer.childNodes[n.endOffset],s&&domUtils.isBr(s)&&n.setEndAfter(s)),0==n.startOffset&&(s=n.startContainer,domUtils.isBoundaryNode(s,"firstChild")&&(s=n.endContainer,n.endOffset==(3==s.nodeType?s.nodeValue.length:s.childNodes.length)&&domUtils.isBoundaryNode(s,"lastChild")&&(r.body.innerHTML="<p>"+(browser.ie?"&nbsp;":"<br/>")+"</p>",n.setStart(r.body.firstChild,0).collapse(!0)))),!n.collapsed&&n.deleteContents(),1==n.startContainer.nodeType){var l,d=n.startContainer.childNodes[n.startOffset];if(d&&domUtils.isBlockElm(d)&&(l=d.previousSibling)&&domUtils.isBlockElm(l)){for(n.setEnd(l,l.childNodes.length).collapse();d.firstChild;)l.appendChild(d.firstChild);domUtils.remove(d)}}}var d,c,l,u,m,p=0;n.inFillChar()&&(d=n.startContainer,domUtils.isFillChar(d)?(n.setStartBefore(d).collapse(!0),domUtils.remove(d)):domUtils.isFillChar(d,!0)&&(d.nodeValue=d.nodeValue.replace(fillCharReg,""),n.startOffset--,n.collapsed&&n.collapse(!0)));var h=domUtils.findParentByTagName(n.startContainer,"li",!0);if(h){for(var f,g;d=o.firstChild;){for(;d&&(3==d.nodeType||!domUtils.isBlockElm(d)||"HR"==d.tagName);)f=d.nextSibling,n.insertNode(d).collapse(),g=d,d=f;if(d)if(/^(ol|ul)$/i.test(d.tagName)){for(;d.firstChild;)g=d.firstChild,domUtils.insertAfter(h,d.firstChild),h=h.nextSibling;domUtils.remove(d)}else{var v;f=d.nextSibling,v=r.document.createElement("li"),domUtils.insertAfter(h,v),v.appendChild(d),g=d,d=f,h=v}}h=domUtils.findParentByTagName(n.startContainer,"li",!0),domUtils.isEmptyBlock(h)&&domUtils.remove(h),g&&n.setStartAfter(g).collapse(!0).select(!0)}else{for(;d=o.firstChild;){if(p){for(var b=r.document.createElement("p");d&&(3==d.nodeType||!dtd.$block[d.tagName]);)m=d.nextSibling,b.appendChild(d),d=m;b.firstChild&&(d=b)}if(n.insertNode(d),m=d.nextSibling,!p&&d.nodeType==domUtils.NODE_ELEMENT&&domUtils.isBlockElm(d)&&(c=domUtils.findParent(d,function(e){return domUtils.isBlockElm(e)}),c&&"body"!=c.tagName.toLowerCase()&&(!dtd[c.tagName][d.nodeName]||d.parentNode!==c))){if(dtd[c.tagName][d.nodeName])for(u=d.parentNode;u!==c;)l=u,u=u.parentNode;else l=c;domUtils.breakParent(d,l||u);var l=d.previousSibling;domUtils.trimWhiteTextNode(l),l.childNodes.length||domUtils.remove(l),!browser.ie&&(f=d.nextSibling)&&domUtils.isBlockElm(f)&&f.lastChild&&!domUtils.isBr(f.lastChild)&&f.appendChild(r.document.createElement("br")),p=1}var f=d.nextSibling;if(!o.firstChild&&f&&domUtils.isBlockElm(f)){n.setStart(f,0).collapse(!0);break}n.setEndAfter(d).collapse()}if(d=n.startContainer,m&&domUtils.isBr(m)&&domUtils.remove(m),domUtils.isBlockElm(d)&&domUtils.isEmptyNode(d))if(m=d.nextSibling)domUtils.remove(d),1==m.nodeType&&dtd.$block[m.tagName]&&n.setStart(m,0).collapse(!0).shrinkBoundary();else try{d.innerHTML=browser.ie?domUtils.fillChar:"<br/>"}catch(y){n.setStartBefore(d),domUtils.remove(d)}try{n.select(!0)}catch(y){}}setTimeout(function(){n=r.selection.getRange(),n.scrollToView(r.autoHeightEnabled,r.autoHeightEnabled?domUtils.getXY(r.iframe).y:0),r.fireEvent("afterinserthtml",t)},200)}}},UE.plugins.autotypeset=function(){function e(e,t){return e&&3!=e.nodeType?domUtils.isBr(e)?1:e&&e.parentNode&&u[e.tagName.toLowerCase()]?a&&a.contains(e)||e.getAttribute("pagebreak")?0:t?!domUtils.isEmptyBlock(e):domUtils.isEmptyBlock(e,new RegExp("[\\s"+domUtils.fillChar+"]","g")):void 0:0}function t(e){e.style.cssText||(domUtils.removeAttributes(e,["style"]),"span"==e.tagName.toLowerCase()&&domUtils.hasNoAttributes(e)&&domUtils.remove(e,!0))}function i(i,r){var s,u=this;if(r){if(!l.pasteFilter)return;s=u.document.createElement("div"),s.innerHTML=r.html}else s=u.document.body;for(var m,p=domUtils.getElementsByTagName(s,"*"),h=0;m=p[h++];)if(u.fireEvent("excludeNodeinautotype",m)!==!0){if(l.clearFontSize&&m.style.fontSize&&(domUtils.removeStyle(m,"font-size"),t(m)),l.clearFontFamily&&m.style.fontFamily&&(domUtils.removeStyle(m,"font-family"),t(m)),e(m)){if(l.mergeEmptyline)for(var f,g=m.nextSibling,v=domUtils.isBr(m);e(g)&&(f=g,g=f.nextSibling,!v||g&&(!g||domUtils.isBr(g)));)domUtils.remove(f);if(l.removeEmptyline&&domUtils.inDoc(m,s)&&!c[m.parentNode.tagName.toLowerCase()]){if(domUtils.isBr(m)&&(g=m.nextSibling,g&&!domUtils.isBr(g)))continue;domUtils.remove(m);continue}}if(e(m,!0)&&"SPAN"!=m.tagName&&(l.indent&&(m.style.textIndent=l.indentValue),l.textAlign&&(m.style.textAlign=l.textAlign)),l.removeClass&&m.className&&!d[m.className.toLowerCase()]){if(a&&a.contains(m))continue;domUtils.removeAttributes(m,["class"])}if(l.imageBlockLine&&"img"==m.tagName.toLowerCase()&&!m.getAttribute("emotion"))if(r){var b=m;switch(l.imageBlockLine){case"left":case"right":case"none":for(var f,y,g,C=b.parentNode;dtd.$inline[C.tagName]||"A"==C.tagName;)C=C.parentNode;if(f=C,"P"==f.tagName&&"center"==domUtils.getStyle(f,"text-align")&&!domUtils.isBody(f)&&1==domUtils.getChildCount(f,function(e){return!domUtils.isBr(e)&&!domUtils.isWhitespace(e)}))if(y=f.previousSibling,g=f.nextSibling,y&&g&&1==y.nodeType&&1==g.nodeType&&y.tagName==g.tagName&&domUtils.isBlockElm(y)){for(y.appendChild(f.firstChild);g.firstChild;)y.appendChild(g.firstChild);domUtils.remove(f),domUtils.remove(g)}else domUtils.setStyle(f,"text-align","");domUtils.setStyle(b,"float",l.imageBlockLine);break;case"center":if("center"!=u.queryCommandValue("imagefloat")){for(C=b.parentNode,domUtils.setStyle(b,"float","none"),f=b;C&&1==domUtils.getChildCount(C,function(e){return!domUtils.isBr(e)&&!domUtils.isWhitespace(e)})&&(dtd.$inline[C.tagName]||"A"==C.tagName);)f=C,C=C.parentNode;var N=u.document.createElement("p");domUtils.setAttributes(N,{style:"text-align:center"}),f.parentNode.insertBefore(N,f),N.appendChild(f),domUtils.setStyle(f,"float","")}}}else{var w=u.selection.getRange();w.selectNode(m).select(),u.execCommand("imagefloat",l.imageBlockLine)}l.removeEmptyNode&&l.removeTagNames[m.tagName.toLowerCase()]&&domUtils.hasNoAttributes(m)&&domUtils.isEmptyBlock(m)&&domUtils.remove(m)}if(l.tobdc){var E=UE.htmlparser(s.innerHTML);E.traversal(function(e){"text"==e.type&&(e.data=o(e.data))}),s.innerHTML=E.toHtml()}if(l.bdc2sb){var E=UE.htmlparser(s.innerHTML);E.traversal(function(e){"text"==e.type&&(e.data=n(e.data))}),s.innerHTML=E.toHtml()}r&&(r.html=s.innerHTML)}function n(e){for(var t="",i=0;i<e.length;i++){var n=e.charCodeAt(i);t+=n>=65281&&65373>=n?String.fromCharCode(e.charCodeAt(i)-65248):12288==n?String.fromCharCode(e.charCodeAt(i)-12288+32):e.charAt(i)}return t}function o(e){e=utils.html(e);for(var t="",i=0;i<e.length;i++)t+=32==e.charCodeAt(i)?String.fromCharCode(12288):e.charCodeAt(i)<127?String.fromCharCode(e.charCodeAt(i)+65248):e.charAt(i);return t}function r(){var e=s.getPreferences("autotypeset");utils.extend(s.options.autotypeset,e)}this.setOpt({autotypeset:{mergeEmptyline:!0,removeClass:!0,removeEmptyline:!1,textAlign:"left",imageBlockLine:"center",pasteFilter:!1,clearFontSize:!1,clearFontFamily:!1,removeEmptyNode:!1,removeTagNames:utils.extend({div:1},dtd.$removeEmpty),indent:!1,indentValue:"2em",bdc2sb:!1,tobdc:!1}});
var a,s=this,l=s.options.autotypeset,d={selectTdClass:1,pagebreak:1,anchorclass:1},c={li:1},u={div:1,p:1,blockquote:1,center:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,span:1};l&&(r(),l.pasteFilter&&s.addListener("beforepaste",i),s.commands.autotypeset={execCommand:function(){s.removeListener("beforepaste",i),l.pasteFilter&&s.addListener("beforepaste",i),i.call(s)}})},UE.commands.imagefloat={execCommand:function(e,t){var i=this,n=i.selection.getRange();if(!n.collapsed){var o=n.getClosedNode();if(o&&"IMG"==o.tagName)switch(t){case"left":case"right":case"none":for(var r,a,s,l=o.parentNode;dtd.$inline[l.tagName]||"A"==l.tagName;)l=l.parentNode;if(r=l,"P"==r.tagName&&"center"==domUtils.getStyle(r,"text-align")){if(!domUtils.isBody(r)&&1==domUtils.getChildCount(r,function(e){return!domUtils.isBr(e)&&!domUtils.isWhitespace(e)}))if(a=r.previousSibling,s=r.nextSibling,a&&s&&1==a.nodeType&&1==s.nodeType&&a.tagName==s.tagName&&domUtils.isBlockElm(a)){for(a.appendChild(r.firstChild);s.firstChild;)a.appendChild(s.firstChild);domUtils.remove(r),domUtils.remove(s)}else domUtils.setStyle(r,"text-align","");n.selectNode(o).select()}domUtils.setStyle(o,"float","none"==t?"":t),"none"==t&&domUtils.removeAttributes(o,"align");break;case"center":if("center"!=i.queryCommandValue("imagefloat")){for(l=o.parentNode,domUtils.setStyle(o,"float",""),domUtils.removeAttributes(o,"align"),r=o;l&&1==domUtils.getChildCount(l,function(e){return!domUtils.isBr(e)&&!domUtils.isWhitespace(e)})&&(dtd.$inline[l.tagName]||"A"==l.tagName);)r=l,l=l.parentNode;n.setStartBefore(r).setCursor(!1),l=i.document.createElement("div"),l.appendChild(r),domUtils.setStyle(r,"float",""),i.execCommand("insertHtml",'<p id="_img_parent_tmp" style="text-align:center">'+l.innerHTML+"</p>"),r=i.document.getElementById("_img_parent_tmp"),r.removeAttribute("id"),r=r.firstChild,n.selectNode(r).select(),s=r.parentNode.nextSibling,s&&domUtils.isEmptyNode(s)&&domUtils.remove(s)}}}},queryCommandValue:function(){var e,t,i=this.selection.getRange();return i.collapsed?"none":(e=i.getClosedNode(),e&&1==e.nodeType&&"IMG"==e.tagName?(t=domUtils.getComputedStyle(e,"float")||e.getAttribute("align"),"none"==t&&(t="center"==domUtils.getComputedStyle(e.parentNode,"text-align")?"center":t),{left:1,right:1,center:1}[t]?t:"none"):"none")},queryCommandState:function(){var e,t=this.selection.getRange();return t.collapsed?-1:(e=t.getClosedNode(),e&&1==e.nodeType&&"IMG"==e.tagName?0:-1)}},UE.commands.insertimage={execCommand:function(e,t){function i(e){utils.each("width,height,border,hspace,vspace".split(","),function(t){e[t]&&(e[t]=parseInt(e[t],10)||0)}),utils.each("src,_src".split(","),function(t){e[t]&&(e[t]=utils.unhtmlForUrl(e[t]))}),utils.each("title,alt".split(","),function(t){e[t]&&(e[t]=utils.unhtml(e[t]))})}if(t=utils.isArray(t)?t:[t],t.length){var n=this,o=n.selection.getRange(),r=o.getClosedNode();if(n.fireEvent("beforeinsertimage",t)!==!0){if(!r||!/img/i.test(r.tagName)||"edui-faked-video"==r.className&&-1==r.className.indexOf("edui-upload-video")||r.getAttribute("word_img")){var a,s=[],l="";if(a=t[0],1==t.length)i(a),l='<img src="'+a.src+'" '+(a._src?' _src="'+a._src+'" ':"")+(a.width?'width="'+a.width+'" ':"")+(a.height?' height="'+a.height+'" ':"")+("left"==a.floatStyle||"right"==a.floatStyle?' style="float:'+a.floatStyle+';"':"")+(a.title&&""!=a.title?' title="'+a.title+'"':"")+(a.border&&"0"!=a.border?' border="'+a.border+'"':"")+(a.alt&&""!=a.alt?' alt="'+a.alt+'"':"")+(a.hspace&&"0"!=a.hspace?' hspace = "'+a.hspace+'"':"")+(a.vspace&&"0"!=a.vspace?' vspace = "'+a.vspace+'"':"")+"/>","center"==a.floatStyle&&(l='<p style="text-align: center">'+l+"</p>"),s.push(l);else for(var d=0;a=t[d++];)i(a),l="<p "+("center"==a.floatStyle?'style="text-align: center" ':"")+'><img src="'+a.src+'" '+(a.width?'width="'+a.width+'" ':"")+(a._src?' _src="'+a._src+'" ':"")+(a.height?' height="'+a.height+'" ':"")+' style="'+(a.floatStyle&&"center"!=a.floatStyle?"float:"+a.floatStyle+";":"")+(a.border||"")+'" '+(a.title?' title="'+a.title+'"':"")+" /></p>",s.push(l);n.execCommand("insertHtml",s.join(""))}else{var c=t.shift(),u=c.floatStyle;delete c.floatStyle,domUtils.setAttributes(r,c),n.execCommand("imagefloat",u),t.length>0&&(o.setStartAfter(r).setCursor(!1,!0),n.execCommand("insertimage",t))}n.fireEvent("afterinsertimage",t)}}}},UE.plugins.link=function(){function e(e){var t=e.startContainer,i=e.endContainer;(t=domUtils.findParentByTagName(t,"a",!0))&&e.setStartBefore(t),(i=domUtils.findParentByTagName(i,"a",!0))&&e.setEndAfter(i)}function t(t,i,n){var o=t.cloneRange(),r=n.queryCommandValue("link");e(t=t.adjustmentBoundary());var a=t.startContainer;if(1==a.nodeType&&r&&(a=a.childNodes[t.startOffset],a&&1==a.nodeType&&"A"==a.tagName&&/^(?:https?|ftp|file)\s*:\s*\/\//.test(a[browser.ie?"innerText":"textContent"])&&(a[browser.ie?"innerText":"textContent"]=utils.html(i.textValue||i.href))),(!o.collapsed||r)&&(t.removeInlineStyle("a"),o=t.cloneRange()),o.collapsed){var s=t.document.createElement("a"),l="";i.textValue?(l=utils.html(i.textValue),delete i.textValue):l=utils.html(i.href),domUtils.setAttributes(s,i),a=domUtils.findParentByTagName(o.startContainer,"a",!0),a&&domUtils.isInNodeEndBoundary(o,a)&&t.setStartAfter(a).collapse(!0),s[browser.ie?"innerText":"textContent"]=l,t.insertNode(s).selectNode(s)}else t.applyInlineStyle("a",i)}UE.commands.unlink={execCommand:function(){var t,i=this.selection.getRange();(!i.collapsed||domUtils.findParentByTagName(i.startContainer,"a",!0))&&(t=i.createBookmark(),e(i),i.removeInlineStyle("a").moveToBookmark(t).select())},queryCommandState:function(){return!this.highlight&&this.queryCommandValue("link")?0:-1}},UE.commands.link={execCommand:function(e,i){var n;i._href&&(i._href=utils.unhtml(i._href,/[<">]/g)),i.href&&(i.href=utils.unhtml(i.href,/[<">]/g)),i.textValue&&(i.textValue=utils.unhtml(i.textValue,/[<">]/g)),t(n=this.selection.getRange(),i,this),n.collapse().select(!0)},queryCommandValue:function(){var e,t=this.selection.getRange();if(!t.collapsed){t.shrinkBoundary();var i=3!=t.startContainer.nodeType&&t.startContainer.childNodes[t.startOffset]?t.startContainer.childNodes[t.startOffset]:t.startContainer,n=3==t.endContainer.nodeType||0==t.endOffset?t.endContainer:t.endContainer.childNodes[t.endOffset-1],o=t.getCommonAncestor();if(e=domUtils.findParentByTagName(o,"a",!0),!e&&1==o.nodeType)for(var r,a,s,l=o.getElementsByTagName("a"),d=0;s=l[d++];)if(r=domUtils.getPosition(s,i),a=domUtils.getPosition(s,n),(r&domUtils.POSITION_FOLLOWING||r&domUtils.POSITION_CONTAINS)&&(a&domUtils.POSITION_PRECEDING||a&domUtils.POSITION_CONTAINS)){e=s;break}return e}return e=t.startContainer,e=1==e.nodeType?e:e.parentNode,e&&(e=domUtils.findParentByTagName(e,"a",!0))&&!domUtils.isInNodeEndBoundary(t,e)?e:void 0},queryCommandState:function(){var e=this.selection.getRange().getClosedNode(),t=e&&("edui-faked-video"==e.className||-1!=e.className.indexOf("edui-upload-video"));return t?-1:0}}},UE.plugins.insertframe=function(){function e(){t._iframe&&delete t._iframe}var t=this;t.addListener("selectionchange",function(){e()})},UE.plugins.removeformat=function(){var e=this;e.setOpt({removeFormatTags:"b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var",removeFormatAttributes:"class,style,lang,width,height,align,hspace,valign"}),e.commands.removeformat={execCommand:function(e,t,i,n,o){function r(e){if(3==e.nodeType||"span"!=e.tagName.toLowerCase())return 0;if(browser.ie){var t=e.attributes;if(t.length){for(var i=0,n=t.length;n>i;i++)if(t[i].specified)return 0;return 1}}return!e.attributes.length}function a(e){var t=e.createBookmark();if(e.collapsed&&e.enlarge(!0),!o){var n=domUtils.findParentByTagName(e.startContainer,"a",!0);n&&e.setStartBefore(n),n=domUtils.findParentByTagName(e.endContainer,"a",!0),n&&e.setEndAfter(n)}for(s=e.createBookmark(),f=s.start;(l=f.parentNode)&&!domUtils.isBlockElm(l);)domUtils.breakParent(f,l),domUtils.clearEmptySibling(f);if(s.end){for(f=s.end;(l=f.parentNode)&&!domUtils.isBlockElm(l);)domUtils.breakParent(f,l),domUtils.clearEmptySibling(f);for(var a,u=domUtils.getNextDomNode(s.start,!1,m);u&&u!=s.end;)a=domUtils.getNextDomNode(u,!0,m),dtd.$empty[u.tagName.toLowerCase()]||domUtils.isBookmarkNode(u)||(d.test(u.tagName)?i?(domUtils.removeStyle(u,i),r(u)&&"text-decoration"!=i&&domUtils.remove(u,!0)):domUtils.remove(u,!0):dtd.$tableContent[u.tagName]||dtd.$list[u.tagName]||(domUtils.removeAttributes(u,c),r(u)&&domUtils.remove(u,!0))),u=a}var p=s.start.parentNode;!domUtils.isBlockElm(p)||dtd.$tableContent[p.tagName]||dtd.$list[p.tagName]||domUtils.removeAttributes(p,c),p=s.end.parentNode,s.end&&domUtils.isBlockElm(p)&&!dtd.$tableContent[p.tagName]&&!dtd.$list[p.tagName]&&domUtils.removeAttributes(p,c),e.moveToBookmark(s).moveToBookmark(t);for(var h,f=e.startContainer,g=e.collapsed;1==f.nodeType&&domUtils.isEmptyNode(f)&&dtd.$removeEmpty[f.tagName];)h=f.parentNode,e.setStartBefore(f),e.startContainer===e.endContainer&&e.endOffset--,domUtils.remove(f),f=h;if(!g)for(f=e.endContainer;1==f.nodeType&&domUtils.isEmptyNode(f)&&dtd.$removeEmpty[f.tagName];)h=f.parentNode,e.setEndBefore(f),domUtils.remove(f),f=h}var s,l,d=new RegExp("^(?:"+(t||this.options.removeFormatTags).replace(/,/g,"|")+")$","i"),c=i?[]:(n||this.options.removeFormatAttributes).split(","),u=new dom.Range(this.document),m=function(e){return 1==e.nodeType};u=this.selection.getRange(),a(u),u.select()}}},UE.plugins.blockquote=function(){function e(e){return domUtils.filterNodeList(e.selection.getStartElementPath(),"blockquote")}var t=this;t.commands.blockquote={execCommand:function(t,i){var n=this.selection.getRange(),o=e(this),r=dtd.blockquote,a=n.createBookmark();if(o){var s=n.startContainer,l=domUtils.isBlockElm(s)?s:domUtils.findParent(s,function(e){return domUtils.isBlockElm(e)}),d=n.endContainer,c=domUtils.isBlockElm(d)?d:domUtils.findParent(d,function(e){return domUtils.isBlockElm(e)});l=domUtils.findParentByTagName(l,"li",!0)||l,c=domUtils.findParentByTagName(c,"li",!0)||c,"LI"==l.tagName||"TD"==l.tagName||l===o||domUtils.isBody(l)?domUtils.remove(o,!0):domUtils.breakParent(l,o),l!==c&&(o=domUtils.findParentByTagName(c,"blockquote"),o&&("LI"==c.tagName||"TD"==c.tagName||domUtils.isBody(c)?o.parentNode&&domUtils.remove(o,!0):domUtils.breakParent(c,o)));for(var u,m=domUtils.getElementsByTagName(this.document,"blockquote"),p=0;u=m[p++];)u.childNodes.length?domUtils.getPosition(u,l)&domUtils.POSITION_FOLLOWING&&domUtils.getPosition(u,c)&domUtils.POSITION_PRECEDING&&domUtils.remove(u,!0):domUtils.remove(u)}else{for(var h=n.cloneRange(),f=1==h.startContainer.nodeType?h.startContainer:h.startContainer.parentNode,g=f,v=1;;){if(domUtils.isBody(f)){g!==f?n.collapsed?(h.selectNode(g),v=0):h.setStartBefore(g):h.setStart(f,0);break}if(!r[f.tagName]){n.collapsed?h.selectNode(g):h.setStartBefore(g);break}g=f,f=f.parentNode}if(v)for(g=f=f=1==h.endContainer.nodeType?h.endContainer:h.endContainer.parentNode;;){if(domUtils.isBody(f)){g!==f?h.setEndAfter(g):h.setEnd(f,f.childNodes.length);break}if(!r[f.tagName]){h.setEndAfter(g);break}g=f,f=f.parentNode}f=n.document.createElement("blockquote"),domUtils.setAttributes(f,i),f.appendChild(h.extractContents()),h.insertNode(f);for(var b,y=domUtils.getElementsByTagName(f,"blockquote"),p=0;b=y[p++];)b.parentNode&&domUtils.remove(b,!0);var C,N=f.nextElementSibling;N||(C=document.createElement("p"),C.innerHTML=browser.ie?"&nbsp;":"<br/>",domUtils.insertAfter(f,C))}n.moveToBookmark(a).select()},queryCommandState:function(){return e(this)?1:0}}},UE.plugins.selectall=function(){var e=this;e.commands.selectall={execCommand:function(){var e=this,t=e.body,i=e.selection.getRange();i.selectNodeContents(t),domUtils.isEmptyBlock(t)&&(browser.opera&&t.firstChild&&1==t.firstChild.nodeType&&i.setStartAtFirst(t.firstChild),i.collapse(!0)),i.select(!0)},notNeedUndo:1},e.addshortcutkey({selectAll:"ctrl+65"})},UE.plugins.paragraph=function(){var e=this,t=domUtils.isBlockElm,i=["TD","LI","PRE"],n=function(e,n,o,r){var a,s=e.createBookmark(),l=function(e){return 1==e.nodeType?"br"!=e.tagName.toLowerCase()&&!domUtils.isBookmarkNode(e):!domUtils.isWhitespace(e)};e.enlarge(!0);for(var d,c=e.createBookmark(),u=domUtils.getNextDomNode(c.start,!1,l),m=e.cloneRange();u&&!(domUtils.getPosition(u,c.end)&domUtils.POSITION_FOLLOWING);)if(3!=u.nodeType&&t(u))u=domUtils.getNextDomNode(u,!0,l);else{for(m.setStartBefore(u);u&&u!==c.end&&!t(u);)d=u,u=domUtils.getNextDomNode(u,!1,null,function(e){return!t(e)});m.setEndAfter(d),a=e.document.createElement(n),o&&(domUtils.setAttributes(a,o),r&&"customstyle"==r&&o.style&&(a.style.cssText=o.style)),a.appendChild(m.extractContents()),domUtils.isEmptyNode(a)&&domUtils.fillChar(e.document,a),m.insertNode(a);var p=a.parentNode;t(p)&&!domUtils.isBody(a.parentNode)&&-1==utils.indexOf(i,p.tagName)&&(r&&"customstyle"==r||(p.getAttribute("dir")&&a.setAttribute("dir",p.getAttribute("dir")),p.style.cssText&&(a.style.cssText=p.style.cssText+";"+a.style.cssText),p.style.textAlign&&!a.style.textAlign&&(a.style.textAlign=p.style.textAlign),p.style.textIndent&&!a.style.textIndent&&(a.style.textIndent=p.style.textIndent),p.style.padding&&!a.style.padding&&(a.style.padding=p.style.padding)),o&&/h\d/i.test(p.tagName)&&!/h\d/i.test(a.tagName)?(domUtils.setAttributes(p,o),r&&"customstyle"==r&&o.style&&(p.style.cssText=o.style),domUtils.remove(a,!0),a=p):domUtils.remove(a.parentNode,!0)),u=-1!=utils.indexOf(i,p.tagName)?p:a,u=domUtils.getNextDomNode(u,!1,l)}return e.moveToBookmark(c).moveToBookmark(s)};e.setOpt("paragraph",{p:"",h1:"",h2:"",h3:"",h4:"",h5:"",h6:""}),e.commands.paragraph={execCommand:function(e,t,i,o){var r=this.selection.getRange();if(r.collapsed){var a=this.document.createTextNode("p");if(r.insertNode(a),browser.ie){var s=a.previousSibling;s&&domUtils.isWhitespace(s)&&domUtils.remove(s),s=a.nextSibling,s&&domUtils.isWhitespace(s)&&domUtils.remove(s)}}if(r=n(r,t,i,o),a&&(r.setStartBefore(a).collapse(!0),pN=a.parentNode,domUtils.remove(a),domUtils.isBlockElm(pN)&&domUtils.isEmptyNode(pN)&&domUtils.fillNode(this.document,pN)),browser.gecko&&r.collapsed&&1==r.startContainer.nodeType){var l=r.startContainer.childNodes[r.startOffset];l&&1==l.nodeType&&l.tagName.toLowerCase()==t&&r.setStart(l,0).collapse(!0)}return r.select(),!0},queryCommandValue:function(){var e=domUtils.filterNodeList(this.selection.getStartElementPath(),"p h1 h2 h3 h4 h5 h6");return e?e.tagName.toLowerCase():""}}},UE.plugins.horizontal=function(){var e=this;e.commands.horizontal={execCommand:function(e){var t=this;if(-1!==t.queryCommandState(e)){t.execCommand("insertHtml","<hr>");var i=t.selection.getRange(),n=i.startContainer;if(1==n.nodeType&&!n.childNodes[i.startOffset]){var o;(o=n.childNodes[i.startOffset-1])&&1==o.nodeType&&"HR"==o.tagName&&("p"==t.options.enterTag?(o=t.document.createElement("p"),i.insertNode(o),i.setStart(o,0).setCursor()):(o=t.document.createElement("br"),i.insertNode(o),i.setStartBefore(o).setCursor()))}return!0}},queryCommandState:function(){return domUtils.filterNodeList(this.selection.getStartElementPath(),"table")?-1:0}},e.addListener("delkeydown",function(e,t){var i=this.selection.getRange();if(i.txtToElmBoundary(!0),domUtils.isStartInblock(i)){var n=i.startContainer,o=n.previousSibling;if(o&&domUtils.isTagNode(o,"hr"))return domUtils.remove(o),i.select(),domUtils.preventDefault(t),!0}})},UE.plugins.insertcode=function(){var e=this;e.ready(function(){utils.cssRule("pre","pre{margin:.5em 0;padding:.4em .6em;border-radius:8px;background:#f8f8f8;}",e.document)}),e.setOpt("insertcode",{as3:"ActionScript3",bash:"Bash/Shell",cpp:"C/C++",css:"Css",cf:"CodeFunction","c#":"C#",delphi:"Delphi",diff:"Diff",erlang:"Erlang",groovy:"Groovy",html:"Html",java:"Java",jfx:"JavaFx",js:"Javascript",pl:"Perl",php:"Php",plain:"Plain Text",ps:"PowerShell",python:"Python",ruby:"Ruby",scala:"Scala",sql:"Sql",vb:"Vb",xml:"Xml"}),e.commands.insertcode={execCommand:function(e,t){var i=this,n=i.selection.getRange(),o=domUtils.findParentByTagName(n.startContainer,"pre",!0);if(o)o.className="brush:"+t+";toolbar:false;";else{var r="";if(n.collapsed)r=browser.ie&&browser.ie11below?browser.version<=8?"&nbsp;":"":"<br/>";else{var a=n.extractContents(),s=i.document.createElement("div");s.appendChild(a),utils.each(UE.filterNode(UE.htmlparser(s.innerHTML.replace(/[\r\t]/g,"")),i.options.filterTxtRules).children,function(e){if(browser.ie&&browser.ie11below&&browser.version>8)"element"==e.type?"br"==e.tagName?r+="\n":dtd.$empty[e.tagName]||(utils.each(e.children,function(t){"element"==t.type?"br"==t.tagName?r+="\n":dtd.$empty[e.tagName]||(r+=t.innerText()):r+=t.data}),/\n$/.test(r)||(r+="\n")):r+=e.data+"\n",!e.nextSibling()&&/\n$/.test(r)&&(r=r.replace(/\n$/,""));else if(browser.ie&&browser.ie11below)"element"==e.type?"br"==e.tagName?r+="<br>":dtd.$empty[e.tagName]||(utils.each(e.children,function(t){"element"==t.type?"br"==t.tagName?r+="<br>":dtd.$empty[e.tagName]||(r+=t.innerText()):r+=t.data}),/br>$/.test(r)||(r+="<br>")):r+=e.data+"<br>",!e.nextSibling()&&/<br>$/.test(r)&&(r=r.replace(/<br>$/,""));else if(r+="element"==e.type?dtd.$empty[e.tagName]?"":e.innerText():e.data,!/br\/?\s*>$/.test(r)){if(!e.nextSibling())return;r+="<br>"}})}i.execCommand("inserthtml",'<pre id="coder"class="brush:'+t+';toolbar:false">'+r+"</pre>",!0),o=i.document.getElementById("coder"),domUtils.removeAttributes(o,"id");var l=o.previousSibling;l&&(3==l.nodeType&&1==l.nodeValue.length&&browser.ie&&6==browser.version||domUtils.isEmptyBlock(l))&&domUtils.remove(l);var n=i.selection.getRange();domUtils.isEmptyBlock(o)?n.setStart(o,0).setCursor(!1,!0):n.selectNodeContents(o).select()}},queryCommandValue:function(){var e=this.selection.getStartElementPath(),t="";return utils.each(e,function(e){if("PRE"==e.nodeName){var i=e.className.match(/brush:([^;]+)/);return t=i&&i[1]?i[1]:"",!1}}),t}},e.addInputRule(function(e){utils.each(e.getNodesByTagName("pre"),function(e){var t=e.getNodesByTagName("br");if(t.length)return void(browser.ie&&browser.ie11below&&browser.version>8&&utils.each(t,function(e){var t=UE.uNode.createText("\n");e.parentNode.insertBefore(t,e),e.parentNode.removeChild(e)}));if(!(browser.ie&&browser.ie11below&&browser.version>8)){var i=e.innerText().split(/\n/);e.innerHTML(""),utils.each(i,function(t){t.length&&e.appendChild(UE.uNode.createText(t)),e.appendChild(UE.uNode.createElement("br"))})}})}),e.addOutputRule(function(e){utils.each(e.getNodesByTagName("pre"),function(e){var t="";utils.each(e.children,function(e){t+="text"==e.type?e.data.replace(/[ ]/g,"&nbsp;").replace(/\n$/,""):"br"==e.tagName?"\n":dtd.$empty[e.tagName]?e.innerText():""}),e.innerText(t.replace(/(&nbsp;|\n)+$/,""))})}),e.notNeedCodeQuery={help:1,undo:1,redo:1,source:1,print:1,searchreplace:1,fullscreen:1,preview:1,insertparagraph:1,elementpath:1,insertcode:1,inserthtml:1,selectall:1};e.queryCommandState;e.queryCommandState=function(e){var t=this;return!t.notNeedCodeQuery[e.toLowerCase()]&&t.selection&&t.queryCommandValue("insertcode")?-1:UE.Editor.prototype.queryCommandState.apply(this,arguments)},e.addListener("beforeenterkeydown",function(){var t=e.selection.getRange(),i=domUtils.findParentByTagName(t.startContainer,"pre",!0);if(i){if(e.fireEvent("saveScene"),t.collapsed||t.deleteContents(),!browser.ie||browser.ie9above){var i,n=e.document.createElement("br");t.insertNode(n).setStartAfter(n).collapse(!0);var o=n.nextSibling;o||browser.ie&&!(browser.version>10)?t.setStartAfter(n):t.insertNode(n.cloneNode(!1)),i=n.previousSibling;for(var r;i;)if(r=i,i=i.previousSibling,!i||"BR"==i.nodeName){i=r;break}if(i){for(var a="";i&&"BR"!=i.nodeName&&new RegExp("^[\\s"+domUtils.fillChar+"]*$").test(i.nodeValue);)a+=i.nodeValue,i=i.nextSibling;if("BR"!=i.nodeName){var s=i.nodeValue.match(new RegExp("^([\\s"+domUtils.fillChar+"]+)"));s&&s[1]&&(a+=s[1])}a&&(a=e.document.createTextNode(a),t.insertNode(a).setStartAfter(a))}t.collapse(!0).select(!0)}else if(browser.version>8){var l=e.document.createTextNode("\n"),d=t.startContainer;if(0==t.startOffset){var c=d.previousSibling;if(c){t.insertNode(l);var u=e.document.createTextNode(" ");t.setStartAfter(l).insertNode(u).setStart(u,0).collapse(!0).select(!0)}}else{t.insertNode(l).setStartAfter(l);var u=e.document.createTextNode(" ");d=t.startContainer.childNodes[t.startOffset],d&&!/^\n/.test(d.nodeValue)&&t.setStartBefore(l),t.insertNode(u).setStart(u,0).collapse(!0).select(!0)}}else{var n=e.document.createElement("br");t.insertNode(n),t.insertNode(e.document.createTextNode(domUtils.fillChar)),t.setStartAfter(n),i=n.previousSibling;for(var r;i;)if(r=i,i=i.previousSibling,!i||"BR"==i.nodeName){i=r;break}if(i){for(var a="";i&&"BR"!=i.nodeName&&new RegExp("^[ "+domUtils.fillChar+"]*$").test(i.nodeValue);)a+=i.nodeValue,i=i.nextSibling;if("BR"!=i.nodeName){var s=i.nodeValue.match(new RegExp("^([ "+domUtils.fillChar+"]+)"));s&&s[1]&&(a+=s[1])}a=e.document.createTextNode(a),t.insertNode(a).setStartAfter(a)}t.collapse(!0).select()}return e.fireEvent("saveScene"),!0}}),e.addListener("tabkeydown",function(t,i){var n=e.selection.getRange(),o=domUtils.findParentByTagName(n.startContainer,"pre",!0);if(o){if(e.fireEvent("saveScene"),i.shiftKey);else if(n.collapsed){var r=e.document.createTextNode("    ");n.insertNode(r).setStartAfter(r).collapse(!0).select(!0)}else{for(var a=n.createBookmark(),s=a.start.previousSibling;s;){if(o.firstChild===s&&!domUtils.isBr(s)){o.insertBefore(e.document.createTextNode("    "),s);break}if(domUtils.isBr(s)){o.insertBefore(e.document.createTextNode("    "),s.nextSibling);break}s=s.previousSibling}var l=a.end;for(s=a.start.nextSibling,o.firstChild===a.start&&o.insertBefore(e.document.createTextNode("    "),s.nextSibling);s&&s!==l;){if(domUtils.isBr(s)&&s.nextSibling){if(s.nextSibling===l)break;o.insertBefore(e.document.createTextNode("    "),s.nextSibling)}s=s.nextSibling}n.moveToBookmark(a).select()}return e.fireEvent("saveScene"),!0}}),e.addListener("beforeinserthtml",function(e,t){var i=this,n=i.selection.getRange(),o=domUtils.findParentByTagName(n.startContainer,"pre",!0);if(o){n.collapsed||n.deleteContents();var r="";if(browser.ie&&browser.version>8){utils.each(UE.filterNode(UE.htmlparser(t),i.options.filterTxtRules).children,function(e){"element"==e.type?"br"==e.tagName?r+="\n":dtd.$empty[e.tagName]||(utils.each(e.children,function(t){"element"==t.type?"br"==t.tagName?r+="\n":dtd.$empty[e.tagName]||(r+=t.innerText()):r+=t.data}),/\n$/.test(r)||(r+="\n")):r+=e.data+"\n",!e.nextSibling()&&/\n$/.test(r)&&(r=r.replace(/\n$/,""))});var a=i.document.createTextNode(utils.html(r.replace(/&nbsp;/g," ")));n.insertNode(a).selectNode(a).select()}else{var s=i.document.createDocumentFragment();utils.each(UE.filterNode(UE.htmlparser(t),i.options.filterTxtRules).children,function(e){"element"==e.type?"br"==e.tagName?s.appendChild(i.document.createElement("br")):dtd.$empty[e.tagName]||(utils.each(e.children,function(t){"element"==t.type?"br"==t.tagName?s.appendChild(i.document.createElement("br")):dtd.$empty[e.tagName]||s.appendChild(i.document.createTextNode(utils.html(t.innerText().replace(/&nbsp;/g," ")))):s.appendChild(i.document.createTextNode(utils.html(t.data.replace(/&nbsp;/g," "))))}),"BR"!=s.lastChild.nodeName&&s.appendChild(i.document.createElement("br"))):s.appendChild(i.document.createTextNode(utils.html(e.data.replace(/&nbsp;/g," ")))),e.nextSibling()||"BR"!=s.lastChild.nodeName||s.removeChild(s.lastChild)}),n.insertNode(s).select()}return!0}}),e.addListener("keydown",function(e,t){var i=this,n=t.keyCode||t.which;if(40==n){var o,r=i.selection.getRange(),a=r.startContainer;if(r.collapsed&&(o=domUtils.findParentByTagName(r.startContainer,"pre",!0))&&!o.nextSibling){for(var s=o.lastChild;s&&"BR"==s.nodeName;)s=s.previousSibling;(s===a||r.startContainer===o&&r.startOffset==o.childNodes.length)&&(i.execCommand("insertparagraph"),domUtils.preventDefault(t))}}}),e.addListener("delkeydown",function(t,i){var n=this.selection.getRange();n.txtToElmBoundary(!0);var o=n.startContainer;if(domUtils.isTagNode(o,"pre")&&n.collapsed&&domUtils.isStartInblock(n)){var r=e.document.createElement("p");return domUtils.fillNode(e.document,r),o.parentNode.insertBefore(r,o),domUtils.remove(o),n.setStart(r,0).setCursor(!1,!0),domUtils.preventDefault(i),!0}})},UE.plugins.wordcount=function(){var e=this;e.setOpt("wordCount",!0),e.addListener("contentchange",function(){e.fireEvent("wordcount")});var t;e.addListener("ready",function(){var e=this;domUtils.on(e.body,"keyup",function(i){var n=i.keyCode||i.which,o={16:1,18:1,20:1,37:1,38:1,39:1,40:1};n in o||(clearTimeout(t),t=setTimeout(function(){e.fireEvent("wordcount")},200))})})},UE.plugins.undo=function(){function e(e,t){if(e.length!=t.length)return 0;for(var i=0,n=e.length;n>i;i++)if(e[i]!=t[i])return 0;return 1}function t(t,i){return t.collapsed!=i.collapsed?0:e(t.startAddress,i.startAddress)&&e(t.endAddress,i.endAddress)?1:0}function i(){this.list=[],this.index=0,this.hasUndo=!1,this.hasRedo=!1,this.undo=function(){if(this.hasUndo){if(!this.list[this.index-1]&&1==this.list.length)return void this.reset();for(;this.list[this.index].content==this.list[this.index-1].content;)if(this.index--,0==this.index)return this.restore(0);this.restore(--this.index)}},this.redo=function(){if(this.hasRedo){for(;this.list[this.index].content==this.list[this.index+1].content;)if(this.index++,this.index==this.list.length-1)return this.restore(this.index);this.restore(++this.index)}},this.restore=function(){var e=this.editor,t=this.list[this.index],i=UE.htmlparser(t.content.replace(s,""));e.options.autoClearEmptyNode=!1,e.filterInputRule(i),e.options.autoClearEmptyNode=d,e.document.body.innerHTML=i.toHtml(),e.fireEvent("afterscencerestore"),browser.ie&&utils.each(domUtils.getElementsByTagName(e.document,"td th caption p"),function(t){domUtils.isEmptyNode(t)&&domUtils.fillNode(e.document,t)});try{var n=new dom.Range(e.document).moveToAddress(t.address);n.select(l[n.startContainer.nodeName.toLowerCase()])}catch(o){}this.update(),this.clearKey(),e.fireEvent("reset",!0)},this.getScene=function(){var e=this.editor,t=e.selection.getRange(),i=t.createAddress(!1,!0);e.fireEvent("beforegetscene");var n=UE.htmlparser(e.body.innerHTML);e.options.autoClearEmptyNode=!1,e.filterOutputRule(n),e.options.autoClearEmptyNode=d;var o=n.toHtml();return e.fireEvent("aftergetscene"),{address:i,content:o}},this.save=function(e,i){clearTimeout(n);var a=this.getScene(i),s=this.list[this.index];s&&s.content!=a.content&&o.fireEvent("contentchange"),s&&s.content==a.content&&(e?1:t(s.address,a.address))||(this.list=this.list.slice(0,this.index+1),this.list.push(a),this.list.length>r&&this.list.shift(),this.index=this.list.length-1,this.clearKey(),this.update())},this.update=function(){this.hasRedo=!!this.list[this.index+1],this.hasUndo=!!this.list[this.index-1]},this.reset=function(){this.list=[],this.index=0,this.hasUndo=!1,this.hasRedo=!1,this.clearKey()},this.clearKey=function(){m=0,c=null}}var n,o=this,r=o.options.maxUndoCount||20,a=o.options.maxInputCount||20,s=new RegExp(domUtils.fillChar+"|</hr>","gi"),l={ol:1,ul:1,table:1,tbody:1,tr:1,body:1},d=o.options.autoClearEmptyNode;o.undoManger=new i,o.undoManger.editor=o,o.addListener("saveScene",function(){var e=Array.prototype.splice.call(arguments,1);this.undoManger.save.apply(this.undoManger,e)}),o.addListener("reset",function(e,t){t||this.undoManger.reset()}),o.commands.redo=o.commands.undo={execCommand:function(e){this.undoManger[e]()},queryCommandState:function(e){return this.undoManger["has"+("undo"==e.toLowerCase()?"Undo":"Redo")]?0:-1},notNeedUndo:1};var c,u={16:1,17:1,18:1,37:1,38:1,39:1,40:1},m=0,p=!1;o.addListener("ready",function(){domUtils.on(this.body,"compositionstart",function(){p=!0}),domUtils.on(this.body,"compositionend",function(){p=!1})}),o.addshortcutkey({Undo:"ctrl+90",Redo:"ctrl+89"});var h=!0;o.addListener("keydown",function(e,t){function i(e){e.undoManger.save(!1,!0),e.fireEvent("selectionchange")}var o=this,r=t.keyCode||t.which;if(!(u[r]||t.ctrlKey||t.metaKey||t.shiftKey||t.altKey)){if(p)return;if(!o.selection.getRange().collapsed)return o.undoManger.save(!1,!0),void(h=!1);0==o.undoManger.list.length&&o.undoManger.save(!0),clearTimeout(n),n=setTimeout(function(){if(p)var e=setInterval(function(){p||(i(o),clearInterval(e))},300);else i(o)},200),c=r,m++,m>=a&&i(o)}}),o.addListener("keyup",function(e,t){var i=t.keyCode||t.which;if(!(u[i]||t.ctrlKey||t.metaKey||t.shiftKey||t.altKey)){if(p)return;h||(this.undoManger.save(!1,!0),h=!0)}}),o.stopCmdUndo=function(){o.__hasEnterExecCommand=!0},o.startCmdUndo=function(){o.__hasEnterExecCommand=!1}},UE.plugins.paste=function(){function e(e){var t=this.document;if(!t.getElementById("baidu_pastebin")){var i=this.selection.getRange(),n=i.createBookmark(),o=t.createElement("div");o.id="baidu_pastebin",browser.webkit&&o.appendChild(t.createTextNode(domUtils.fillChar+domUtils.fillChar)),t.body.appendChild(o),n.start.style.display="",o.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;left:-1000px;white-space:nowrap;top:"+domUtils.getXY(n.start).y+"px",i.selectNodeContents(o).select(!0),setTimeout(function(){if(browser.webkit)for(var r,a=0,s=t.querySelectorAll("#baidu_pastebin");r=s[a++];){if(!domUtils.isEmptyNode(r)){o=r;break}domUtils.remove(r)}try{o.parentNode.removeChild(o)}catch(l){}i.moveToBookmark(n).select(!0),e(o)},0)}}function t(e){return e.replace(/<(\/?)([\w\-]+)([^>]*)>/gi,function(e,t,i,n){return i=i.toLowerCase(),{img:1}[i]?e:(n=n.replace(/([\w\-]*?)\s*=\s*(("([^"]*)")|('([^']*)')|([^\s>]+))/gi,function(e,t,i){return{src:1,href:1,name:1}[t.toLowerCase()]?t+"="+i+" ":""}),{span:1,div:1}[i]?"":"<"+t+i+" "+utils.trim(n)+">")})}function i(e){var i;if(e.firstChild){for(var s,l=domUtils.getElementsByTagName(e,"span"),d=0;s=l[d++];)("_baidu_cut_start"==s.id||"_baidu_cut_end"==s.id)&&domUtils.remove(s);if(browser.webkit){for(var c,u=e.querySelectorAll("div br"),d=0;c=u[d++];){var m=c.parentNode;"DIV"==m.tagName&&1==m.childNodes.length&&(m.innerHTML="<p><br/></p>",domUtils.remove(m))}for(var p,h=e.querySelectorAll("#baidu_pastebin"),d=0;p=h[d++];){var f=n.document.createElement("p");for(p.parentNode.insertBefore(f,p);p.firstChild;)f.appendChild(p.firstChild);domUtils.remove(p)}for(var g,v=e.querySelectorAll("meta"),d=0;g=v[d++];)domUtils.remove(g);var u=e.querySelectorAll("br");for(d=0;g=u[d++];)/^apple-/i.test(g.className)&&domUtils.remove(g)}if(browser.gecko){var b=e.querySelectorAll("[_moz_dirty]");for(d=0;g=b[d++];)g.removeAttribute("_moz_dirty")}if(!browser.ie)for(var g,y=e.querySelectorAll("span.Apple-style-span"),d=0;g=y[d++];)domUtils.remove(g,!0);i=e.innerHTML,i=UE.filterWord(i);var C=UE.htmlparser(i);if(n.options.filterRules&&UE.filterNode(C,n.options.filterRules),n.filterInputRule(C),browser.webkit){var N=C.lastChild();N&&"element"==N.type&&"br"==N.tagName&&C.removeChild(N),utils.each(n.body.querySelectorAll("div"),function(e){domUtils.isEmptyBlock(e)&&domUtils.remove(e,!0)})}if(C.traversal(function(e){e.attrs&&"ikqb_image_caption"===e.attrs.class&&C.removeChild(e)}),i={html:C.toHtml()},n.fireEvent("beforepaste",i,C),!i.html)return;if(C=UE.htmlparser(i.html,!0),1===n.queryCommandState("pasteplain")){var w=UE.filterNode(C,n.options.filterTxtRules).toHtml();/^(http|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])+$/i.test(w)&&(w='<a href="'+w+'" rel="nofollow noopener" class="iknow-ueditor-link" target="_blank" title="\u7f51\u9875\u94fe\u63a5">\u7f51\u9875\u94fe\u63a5</a>'),n.execCommand("insertHtml",w,!0)}else UE.filterNode(C,n.options.filterTxtRules),o=C.toHtml(),r=i.html,a=n.selection.getRange().createAddress(!0),n.execCommand("insertHtml",n.getOpt("retainOnlyLabelPasted")===!0?t(r):r,!0);n.fireEvent("afterpaste",i)}}var n=this;n.setOpt({retainOnlyLabelPasted:!1});var o,r,a;n.addListener("pasteTransfer",function(e,i){if(a&&o&&r&&o!=r){var s=n.selection.getRange();if(s.moveToAddress(a,!0),!s.collapsed){for(;!domUtils.isBody(s.startContainer);){var l=s.startContainer;if(1==l.nodeType){if(l=l.childNodes[s.startOffset],!l){s.setStartBefore(s.startContainer);
continue}var d=l.previousSibling;d&&3==d.nodeType&&new RegExp("^[\n\r	 "+domUtils.fillChar+"]*$").test(d.nodeValue)&&s.setStartBefore(d)}if(0!=s.startOffset)break;s.setStartBefore(s.startContainer)}for(;!domUtils.isBody(s.endContainer);){var c=s.endContainer;if(1==c.nodeType){if(c=c.childNodes[s.endOffset],!c){s.setEndAfter(s.endContainer);continue}var u=c.nextSibling;u&&3==u.nodeType&&new RegExp("^[\n\r	"+domUtils.fillChar+"]*$").test(u.nodeValue)&&s.setEndAfter(u)}if(s.endOffset!=s.endContainer[3==s.endContainer.nodeType?"nodeValue":"childNodes"].length)break;s.setEndAfter(s.endContainer)}}s.deleteContents(),s.select(!0),n.__hasEnterExecCommand=!0;var m=r;2===i?m=t(m):i&&(m=o),n.execCommand("inserthtml",m,!0),n.__hasEnterExecCommand=!1;for(var p=n.selection.getRange();!domUtils.isBody(p.startContainer)&&!p.startOffset&&p.startContainer[3==p.startContainer.nodeType?"nodeValue":"childNodes"].length;)p.setStartBefore(p.startContainer);var h=p.createAddress(!0);a.endAddress=h.startAddress}}),n.addListener("ready",function(){domUtils.on(n.body,"cut",function(){var e=n.selection.getRange();!e.collapsed&&n.undoManger&&n.undoManger.save()}),domUtils.on(n.body,browser.ie||browser.opera?"keydown":"paste",function(t){(!browser.ie&&!browser.opera||(t.ctrlKey||t.metaKey)&&"86"==t.keyCode)&&e.call(n,function(e){i(e)})})}),n.commands.paste={execCommand:function(){browser.ie&&(e.call(n,function(e){i(e)}),n.document.execCommand("paste"))}}},UE.plugins.pasteplain=function(){var e=this;e.setOpt({pasteplain:!1,filterTxtRules:function(){function e(e){e.tagName="p",e.setStyle()}function t(e){e.parentNode.removeChild(e,!0)}return{"-":"script style object iframe embed input select",p:{$:{}},br:{$:{}},div:function(e){for(var t,i=UE.uNode.createElement("p");t=e.firstChild();)"text"!=t.type&&UE.dom.dtd.$block[t.tagName]?i.firstChild()?(e.parentNode.insertBefore(i,e),i=UE.uNode.createElement("p")):e.parentNode.insertBefore(t,e):i.appendChild(t);i.firstChild()&&e.parentNode.insertBefore(i,e),e.parentNode.removeChild(e)},ol:t,ul:t,dl:t,dt:t,dd:t,li:t,caption:e,th:e,tr:e,h1:e,h2:e,h3:e,h4:e,h5:e,h6:e,td:function(e){var t=!!e.innerText();t&&e.parentNode.insertAfter(UE.uNode.createText(" &nbsp; &nbsp;"),e),e.parentNode.removeChild(e,e.innerText())}}}()});var t=e.options.pasteplain;e.commands.pasteplain={queryCommandState:function(){return t?1:0},execCommand:function(){t=0|!t},notNeedUndo:1}},UE.plugins.list=function(){function e(e){var t=[];for(var i in e)t.push(i);return t}function t(e){var t=e.className;return domUtils.hasClass(e,/custom_/)?t.match(/custom_(\w+)/)[1]:domUtils.getStyle(e,"list-style-type")}function i(e,i){utils.each(domUtils.getElementsByTagName(e,"ol ul"),function(r){if(domUtils.inDoc(r,e)){var a=r.parentNode;if(a.tagName==r.tagName){var s=t(r)||("OL"==r.tagName?"decimal":"disc"),l=t(a)||("OL"==a.tagName?"decimal":"disc");if(s==l){var u=utils.indexOf(c[r.tagName],s);u=u+1==c[r.tagName].length?0:u+1,o(r,c[r.tagName][u])}}var m=0,p=2;domUtils.hasClass(r,/custom_/)?/[ou]l/i.test(a.tagName)&&domUtils.hasClass(a,/custom_/)||(p=1):/[ou]l/i.test(a.tagName)&&domUtils.hasClass(a,/custom_/)&&(p=3);var h=domUtils.getStyle(r,"list-style-type");h&&(r.style.cssText="list-style-type:"+h),r.className=utils.trim(r.className.replace(/list-paddingleft-\w+/,""))+" list-paddingleft-"+p,utils.each(domUtils.getElementsByTagName(r,"li"),function(e){if(e.style.cssText&&(e.style.cssText=""),!e.firstChild)return void domUtils.remove(e);if(e.parentNode===r){if(m++,domUtils.hasClass(r,/custom_/)){var i=1,n=t(r);if("OL"==r.tagName){if(n)switch(n){case"cn":case"cn1":case"cn2":m>10&&(m%10==0||m>10&&20>m)?i=2:m>20&&(i=3);break;case"num2":m>9&&(i=2)}e.className="list-"+d[n]+m+" list-"+n+"-paddingleft-"+i}else e.className="list-"+d[n]+" list-"+n+"-paddingleft"}else e.className=e.className.replace(/list-[\w\-]+/gi,"");var o=e.getAttribute("class");null===o||o.replace(/\s/g,"")||domUtils.removeAttributes(e,"class")}}),!i&&n(r,r.tagName.toLowerCase(),t(r)||domUtils.getStyle(r,"list-style-type"),!0)}})}function n(e,n,o,r){var a=e.nextSibling;a&&1==a.nodeType&&a.tagName.toLowerCase()==n&&(t(a)||domUtils.getStyle(a,"list-style-type")||("ol"==n?"decimal":"disc"))==o&&(domUtils.moveChild(a,e),0==a.childNodes.length&&domUtils.remove(a)),a&&domUtils.isFillChar(a)&&domUtils.remove(a);var s=e.previousSibling;s&&1==s.nodeType&&s.tagName.toLowerCase()==n&&(t(s)||domUtils.getStyle(s,"list-style-type")||("ol"==n?"decimal":"disc"))==o&&domUtils.moveChild(e,s),s&&domUtils.isFillChar(s)&&domUtils.remove(s),!r&&domUtils.isEmptyBlock(e)&&domUtils.remove(e),t(e)&&i(e.ownerDocument,!0)}function o(e,t){d[t]&&(e.className="custom_"+t);try{domUtils.setStyle(e,"list-style-type",t)}catch(i){}}function r(e){var t=e.previousSibling;t&&domUtils.isEmptyBlock(t)&&domUtils.remove(t),t=e.nextSibling,t&&domUtils.isEmptyBlock(t)&&domUtils.remove(t)}function a(e){for(;e&&!domUtils.isBody(e);){if("TABLE"==e.nodeName)return null;if("LI"==e.nodeName)return e;e=e.parentNode}}var s=this,l={TD:1,PRE:1,BLOCKQUOTE:1},d={cn:"cn-1-",cn1:"cn-2-",cn2:"cn-3-",num:"num-1-",num1:"num-2-",num2:"num-3-",dash:"dash",dot:"dot"};s.setOpt({autoTransWordToList:!1,insertorderedlist:{num:"",num1:"",num2:"",cn:"",cn1:"",cn2:"",decimal:"","lower-alpha":"","lower-roman":"","upper-alpha":"","upper-roman":""},insertunorderedlist:{circle:"",disc:"",square:"",dash:"",dot:""},listDefaultPaddingLeft:"30",listiconpath:"http://bs.baidu.com/listicon/",maxListLevel:-1,disablePInList:!1});var c={OL:e(s.options.insertorderedlist),UL:e(s.options.insertunorderedlist)},u=s.options.listiconpath;for(var m in d)s.options.insertorderedlist.hasOwnProperty(m)||s.options.insertunorderedlist.hasOwnProperty(m)||delete d[m];s.ready(function(){var e=[];for(var t in d){if("dash"==t||"dot"==t)e.push("li.list-"+d[t]+"{background-image:url("+u+d[t]+".gif)}"),e.push("ul.custom_"+t+"{list-style:none;}ul.custom_"+t+" li{background-position:0 3px;background-repeat:no-repeat}");else{for(var i=0;99>i;i++)e.push("li.list-"+d[t]+i+"{background-image:url("+u+"list-"+d[t]+i+".gif)}");e.push("ol.custom_"+t+"{list-style:none;}ol.custom_"+t+" li{background-position:0 3px;background-repeat:no-repeat}")}switch(t){case"cn":e.push("li.list-"+t+"-paddingleft-1{padding-left:25px}"),e.push("li.list-"+t+"-paddingleft-2{padding-left:40px}"),e.push("li.list-"+t+"-paddingleft-3{padding-left:55px}");break;case"cn1":e.push("li.list-"+t+"-paddingleft-1{padding-left:30px}"),e.push("li.list-"+t+"-paddingleft-2{padding-left:40px}"),e.push("li.list-"+t+"-paddingleft-3{padding-left:55px}");break;case"cn2":e.push("li.list-"+t+"-paddingleft-1{padding-left:40px}"),e.push("li.list-"+t+"-paddingleft-2{padding-left:55px}"),e.push("li.list-"+t+"-paddingleft-3{padding-left:68px}");break;case"num":case"num1":e.push("li.list-"+t+"-paddingleft-1{padding-left:25px}");break;case"num2":e.push("li.list-"+t+"-paddingleft-1{padding-left:35px}"),e.push("li.list-"+t+"-paddingleft-2{padding-left:40px}");break;case"dash":e.push("li.list-"+t+"-paddingleft{padding-left:35px}");break;case"dot":e.push("li.list-"+t+"-paddingleft{padding-left:20px}")}}e.push(".list-paddingleft-1{padding-left:0}"),e.push(".list-paddingleft-2{padding-left:"+s.options.listDefaultPaddingLeft+"px}"),e.push(".list-paddingleft-3{padding-left:"+2*s.options.listDefaultPaddingLeft+"px}"),utils.cssRule("list","ol,ul{margin:0;pading:0;"+(browser.ie?"":"width:95%")+"}li{clear:both;}"+e.join("\n"),s.document)}),s.ready(function(){domUtils.on(s.body,"cut",function(){setTimeout(function(){var e,t=s.selection.getRange();if(!t.collapsed&&(e=domUtils.findParentByTagName(t.startContainer,"li",!0))&&!e.nextSibling&&domUtils.isEmptyBlock(e)){var i,n=e.parentNode;if(i=n.previousSibling)domUtils.remove(n),t.setStartAtLast(i).collapse(!0),t.select(!0);else if(i=n.nextSibling)domUtils.remove(n),t.setStartAtFirst(i).collapse(!0),t.select(!0);else{var o=s.document.createElement("p");domUtils.fillNode(s.document,o),n.parentNode.insertBefore(o,n),domUtils.remove(n),t.setStart(o,0).collapse(!0),t.select(!0)}}})})}),s.addListener("beforepaste",function(e,i){var n,o=this,r=o.selection.getRange(),a=UE.htmlparser(i.html,!0);if(n=domUtils.findParentByTagName(r.startContainer,"li",!0)){var s=n.parentNode,l="OL"==s.tagName?"ul":"ol";utils.each(a.getNodesByTagName(l),function(i){if(i.tagName=s.tagName,i.setAttr(),i.parentNode===a)e=t(s)||("OL"==s.tagName?"decimal":"disc");else{var n=i.parentNode.getAttr("class");e=n&&/custom_/.test(n)?n.match(/custom_(\w+)/)[1]:i.parentNode.getStyle("list-style-type"),e||(e="OL"==s.tagName?"decimal":"disc")}var o=utils.indexOf(c[s.tagName],e);i.parentNode!==a&&(o=o+1==c[s.tagName].length?0:o+1);var r=c[s.tagName][o];d[r]?i.setAttr("class","custom_"+r):i.setStyle("list-style-type",r)})}i.html=a.toHtml()}),s.getOpt("disablePInList")===!0&&s.addOutputRule(function(e){utils.each(e.getNodesByTagName("li"),function(e){var t=[],i=0;utils.each(e.children,function(n){if("p"==n.tagName){for(var o;o=n.children.pop();)t.splice(i,0,o),o.parentNode=e,lastNode=o;if(o=t[t.length-1],!o||"element"!=o.type||"br"!=o.tagName){var r=UE.uNode.createElement("br");r.parentNode=e,t.push(r)}i=t.length}}),t.length&&(e.children=t)})}),s.addInputRule(function(e){function t(e,t){var o=t.firstChild();if(o&&"element"==o.type&&"span"==o.tagName&&/Wingdings|Symbol/.test(o.getStyle("font-family"))){for(var r in n)if(n[r]==o.data)return r;return"disc"}for(var r in i)if(i[r].test(e))return r}if(utils.each(e.getNodesByTagName("li"),function(e){for(var t,i=UE.uNode.createElement("p"),n=0;t=e.children[n];)"text"==t.type||dtd.p[t.tagName]?i.appendChild(t):i.firstChild()?(e.insertBefore(i,t),i=UE.uNode.createElement("p"),n+=2):n++;(i.firstChild()&&!i.parentNode||!e.firstChild())&&e.appendChild(i),i.firstChild()||i.innerHTML(browser.ie?"&nbsp;":"<br/>");var o=e.firstChild(),r=o.lastChild();r&&"text"==r.type&&/^\s*$/.test(r.data)&&o.removeChild(r)}),s.options.autoTransWordToList){var i={num1:/^\d+\)/,decimal:/^\d+\./,"lower-alpha":/^[a-z]+\)/,"upper-alpha":/^[A-Z]+\./,cn:/^[\u4E00\u4E8C\u4E09\u56DB\u516d\u4e94\u4e03\u516b\u4e5d]+[\u3001]/,cn2:/^\([\u4E00\u4E8C\u4E09\u56DB\u516d\u4e94\u4e03\u516b\u4e5d]+\)/},n={square:"n"};utils.each(e.getNodesByTagName("p"),function(e){function n(e,t,n){if("ol"==e.tagName)if(browser.ie){var o=t.firstChild();"element"==o.type&&"span"==o.tagName&&i[n].test(o.innerText())&&t.removeChild(o)}else t.innerHTML(t.innerHTML().replace(i[n],""));else t.removeChild(t.firstChild());var r=UE.uNode.createElement("li");r.appendChild(t),e.appendChild(r)}if("MsoListParagraph"==e.getAttr("class")){e.setStyle("margin",""),e.setStyle("margin-left",""),e.setAttr("class","");var o,r=e,a=e;if("li"!=e.parentNode.tagName&&(o=t(e.innerText(),e))){var l=UE.uNode.createElement(s.options.insertorderedlist.hasOwnProperty(o)?"ol":"ul");for(d[o]?l.setAttr("class","custom_"+o):l.setStyle("list-style-type",o);e&&"li"!=e.parentNode.tagName&&t(e.innerText(),e);)r=e.nextSibling(),r||e.parentNode.insertBefore(l,e),n(l,e,o),e=r;!l.parentNode&&e&&e.parentNode&&e.parentNode.insertBefore(l,e)}var c=a.firstChild();c&&"element"==c.type&&"span"==c.tagName&&/^\s*(&nbsp;)+\s*$/.test(c.innerText())&&c.parentNode.removeChild(c)}})}}),s.addListener("contentchange",function(){i(s.document)}),s.addListener("keydown",function(e,t){function i(){t.preventDefault?t.preventDefault():t.returnValue=!1,s.fireEvent("contentchange"),s.undoManger&&s.undoManger.save()}function n(e,t){for(;e&&!domUtils.isBody(e);){if(t(e))return null;if(1==e.nodeType&&/[ou]l/i.test(e.tagName))return e;e=e.parentNode}return null}var o=t.keyCode||t.which;if(13==o&&!t.shiftKey){var a=s.selection.getRange(),l=domUtils.findParent(a.startContainer,function(e){return domUtils.isBlockElm(e)},!0),d=domUtils.findParentByTagName(a.startContainer,"li",!0);if(l&&"PRE"!=l.tagName&&!d){var c=l.innerHTML.replace(new RegExp(domUtils.fillChar,"g"),"");/^\s*1\s*\.[^\d]/.test(c)&&(l.innerHTML=c.replace(/^\s*1\s*\./,""),a.setStartAtLast(l).collapse(!0).select(),s.__hasEnterExecCommand=!0,s.execCommand("insertorderedlist"),s.__hasEnterExecCommand=!1)}var u=s.selection.getRange(),m=n(u.startContainer,function(e){return"TABLE"==e.tagName}),p=u.collapsed?m:n(u.endContainer,function(e){return"TABLE"==e.tagName});if(m&&p&&m===p){if(!u.collapsed){if(m=domUtils.findParentByTagName(u.startContainer,"li",!0),p=domUtils.findParentByTagName(u.endContainer,"li",!0),!m||!p||m!==p){var h=u.cloneRange(),f=h.collapse(!1).createBookmark();u.deleteContents(),h.moveToBookmark(f);var d=domUtils.findParentByTagName(h.startContainer,"li",!0);return r(d),h.select(),void i()}if(u.deleteContents(),d=domUtils.findParentByTagName(u.startContainer,"li",!0),d&&domUtils.isEmptyBlock(d))return N=d.previousSibling,next=d.nextSibling,b=s.document.createElement("p"),domUtils.fillNode(s.document,b),g=d.parentNode,N&&next?(u.setStart(next,0).collapse(!0).select(!0),domUtils.remove(d)):((N||next)&&N?d.parentNode.parentNode.insertBefore(b,g.nextSibling):g.parentNode.insertBefore(b,g),domUtils.remove(d),g.firstChild||domUtils.remove(g),u.setStart(b,0).setCursor()),void i()}if(d=domUtils.findParentByTagName(u.startContainer,"li",!0)){if(domUtils.isEmptyBlock(d)){f=u.createBookmark();var g=d.parentNode;if(d!==g.lastChild?(domUtils.breakParent(d,g),r(d)):(g.parentNode.insertBefore(d,g.nextSibling),domUtils.isEmptyNode(g)&&domUtils.remove(g)),!dtd.$list[d.parentNode.tagName])if(domUtils.isBlockElm(d.firstChild))domUtils.remove(d,!0);else{for(b=s.document.createElement("p"),d.parentNode.insertBefore(b,d);d.firstChild;)b.appendChild(d.firstChild);domUtils.remove(d)}u.moveToBookmark(f).select()}else{var v=d.firstChild;if(!v||!domUtils.isBlockElm(v)){var b=s.document.createElement("p");for(!d.firstChild&&domUtils.fillNode(s.document,b);d.firstChild;)b.appendChild(d.firstChild);d.appendChild(b),v=b}var y=s.document.createElement("span");u.insertNode(y),domUtils.breakParent(y,d);var C=y.nextSibling;v=C.firstChild,v||(b=s.document.createElement("p"),domUtils.fillNode(s.document,b),C.appendChild(b),v=b),domUtils.isEmptyNode(v)&&(v.innerHTML="",domUtils.fillNode(s.document,v)),u.setStart(v,0).collapse(!0).shrinkBoundary().select(),domUtils.remove(y);var N=C.previousSibling;N&&domUtils.isEmptyBlock(N)&&(N.innerHTML="<p></p>",domUtils.fillNode(s.document,N.firstChild))}i()}}}if(8==o&&(u=s.selection.getRange(),u.collapsed&&domUtils.isStartInblock(u)&&(h=u.cloneRange().trimBoundary(),d=domUtils.findParentByTagName(u.startContainer,"li",!0),d&&domUtils.isStartInblock(h)))){if(m=domUtils.findParentByTagName(u.startContainer,"p",!0),m&&m!==d.firstChild){var g=domUtils.findParentByTagName(m,["ol","ul"]);return domUtils.breakParent(m,g),r(m),s.fireEvent("contentchange"),u.setStart(m,0).setCursor(!1,!0),s.fireEvent("saveScene"),void domUtils.preventDefault(t)}if(d&&(N=d.previousSibling)){if(46==o&&d.childNodes.length)return;if(dtd.$list[N.tagName]&&(N=N.lastChild),s.undoManger&&s.undoManger.save(),v=d.firstChild,domUtils.isBlockElm(v))if(domUtils.isEmptyNode(v))for(N.appendChild(v),u.setStart(v,0).setCursor(!1,!0);d.firstChild;)N.appendChild(d.firstChild);else y=s.document.createElement("span"),u.insertNode(y),domUtils.isEmptyBlock(N)&&(N.innerHTML=""),domUtils.moveChild(d,N),u.setStartBefore(y).collapse(!0).select(!0),domUtils.remove(y);else if(domUtils.isEmptyNode(d)){var b=s.document.createElement("p");N.appendChild(b),u.setStart(b,0).setCursor()}else for(u.setEnd(N,N.childNodes.length).collapse().select(!0);d.firstChild;)N.appendChild(d.firstChild);return domUtils.remove(d),s.fireEvent("contentchange"),s.fireEvent("saveScene"),void domUtils.preventDefault(t)}if(d&&!d.previousSibling){var g=d.parentNode,f=u.createBookmark();if(domUtils.isTagNode(g.parentNode,"ol ul"))g.parentNode.insertBefore(d,g),domUtils.isEmptyNode(g)&&domUtils.remove(g);else{for(;d.firstChild;)g.parentNode.insertBefore(d.firstChild,g);domUtils.remove(d),domUtils.isEmptyNode(g)&&domUtils.remove(g)}return u.moveToBookmark(f).setCursor(!1,!0),s.fireEvent("contentchange"),s.fireEvent("saveScene"),void domUtils.preventDefault(t)}}}),s.addListener("keyup",function(e,i){var o=i.keyCode||i.which;if(8==o){var r,a=s.selection.getRange();(r=domUtils.findParentByTagName(a.startContainer,["ol","ul"],!0))&&n(r,r.tagName.toLowerCase(),t(r)||domUtils.getComputedStyle(r,"list-style-type"),!0)}}),s.addListener("tabkeydown",function(){function e(e){if(-1!=s.options.maxListLevel){for(var t=e.parentNode,i=0;/[ou]l/i.test(t.tagName);)i++,t=t.parentNode;if(i>=s.options.maxListLevel)return!0}}var i=s.selection.getRange(),r=domUtils.findParentByTagName(i.startContainer,"li",!0);if(r){var a;if(!i.collapsed){s.fireEvent("saveScene"),a=i.createBookmark();for(var l,d,u=0,m=domUtils.findParents(r);d=m[u++];)if(domUtils.isTagNode(d,"ol ul")){l=d;break}var p=r;if(a.end)for(;p&&!(domUtils.getPosition(p,a.end)&domUtils.POSITION_FOLLOWING);)if(e(p))p=domUtils.getNextDomNode(p,!1,null,function(e){return e!==l});else{var h=p.parentNode,f=s.document.createElement(h.tagName),g=utils.indexOf(c[f.tagName],t(h)||domUtils.getComputedStyle(h,"list-style-type")),v=g+1==c[f.tagName].length?0:g+1,b=c[f.tagName][v];for(o(f,b),h.insertBefore(f,p);p&&!(domUtils.getPosition(p,a.end)&domUtils.POSITION_FOLLOWING);){if(r=p.nextSibling,f.appendChild(p),!r||domUtils.isTagNode(r,"ol ul")){if(r)for(;(r=r.firstChild)&&"LI"!=r.tagName;);else r=domUtils.getNextDomNode(p,!1,null,function(e){return e!==l});break}p=r}n(f,f.tagName.toLowerCase(),b),p=r}return s.fireEvent("contentchange"),i.moveToBookmark(a).select(),!0}if(e(r))return!0;var h=r.parentNode,f=s.document.createElement(h.tagName),g=utils.indexOf(c[f.tagName],t(h)||domUtils.getComputedStyle(h,"list-style-type"));g=g+1==c[f.tagName].length?0:g+1;var b=c[f.tagName][g];if(o(f,b),domUtils.isStartInblock(i))return s.fireEvent("saveScene"),a=i.createBookmark(),h.insertBefore(f,r),f.appendChild(r),n(f,f.tagName.toLowerCase(),b),s.fireEvent("contentchange"),i.moveToBookmark(a).select(!0),!0}}),s.commands.insertorderedlist=s.commands.insertunorderedlist={execCommand:function(e,i){i||(i="insertorderedlist"==e.toLowerCase()?"decimal":"disc");var r=this,s=this.selection.getRange(),d=function(e){return 1==e.nodeType?"br"!=e.tagName.toLowerCase():!domUtils.isWhitespace(e)},c="insertorderedlist"==e.toLowerCase()?"ol":"ul",u=r.document.createDocumentFragment();s.adjustmentBoundary().shrinkBoundary();var m,p,h,f,g=s.createBookmark(!0),v=a(r.document.getElementById(g.start)),b=0,y=a(r.document.getElementById(g.end)),C=0;if(v||y){if(v&&(m=v.parentNode),g.end||(y=v),y&&(p=y.parentNode),m===p){for(;v!==y;){if(f=v,v=v.nextSibling,!domUtils.isBlockElm(f.firstChild)){for(var N=r.document.createElement("p");f.firstChild;)N.appendChild(f.firstChild);f.appendChild(N)}u.appendChild(f)}if(f=r.document.createElement("span"),m.insertBefore(f,y),!domUtils.isBlockElm(y.firstChild)){for(N=r.document.createElement("p");y.firstChild;)N.appendChild(y.firstChild);y.appendChild(N)}u.appendChild(y),domUtils.breakParent(f,m),domUtils.isEmptyNode(f.previousSibling)&&domUtils.remove(f.previousSibling),domUtils.isEmptyNode(f.nextSibling)&&domUtils.remove(f.nextSibling);var w=t(m)||domUtils.getComputedStyle(m,"list-style-type")||("insertorderedlist"==e.toLowerCase()?"decimal":"disc");if(m.tagName.toLowerCase()==c&&w==i){for(var E,U=0,x=r.document.createDocumentFragment();E=u.firstChild;)if(domUtils.isTagNode(E,"ol ul"))x.appendChild(E);else for(;E.firstChild;)x.appendChild(E.firstChild),domUtils.remove(E);f.parentNode.insertBefore(x,f)}else h=r.document.createElement(c),o(h,i),h.appendChild(u),f.parentNode.insertBefore(h,f);return domUtils.remove(f),h&&n(h,c,i),void s.moveToBookmark(g).select()}if(v){for(;v;){if(f=v.nextSibling,domUtils.isTagNode(v,"ol ul"))u.appendChild(v);else{for(var k=r.document.createDocumentFragment(),S=0;v.firstChild;)domUtils.isBlockElm(v.firstChild)&&(S=1),k.appendChild(v.firstChild);if(S)u.appendChild(k);else{var _=r.document.createElement("p");_.appendChild(k),u.appendChild(_)}domUtils.remove(v)}v=f}m.parentNode.insertBefore(u,m.nextSibling),domUtils.isEmptyNode(m)?(s.setStartBefore(m),domUtils.remove(m)):s.setStartAfter(m),b=1}if(y&&domUtils.inDoc(p,r.document)){for(v=p.firstChild;v&&v!==y;){if(f=v.nextSibling,domUtils.isTagNode(v,"ol ul"))u.appendChild(v);else{for(k=r.document.createDocumentFragment(),S=0;v.firstChild;)domUtils.isBlockElm(v.firstChild)&&(S=1),k.appendChild(v.firstChild);S?u.appendChild(k):(_=r.document.createElement("p"),_.appendChild(k),u.appendChild(_)),domUtils.remove(v)}v=f}var T=domUtils.createElement(r.document,"div",{tmpDiv:1});domUtils.moveChild(y,T),u.appendChild(T),domUtils.remove(y),p.parentNode.insertBefore(u,p),s.setEndBefore(p),domUtils.isEmptyNode(p)&&domUtils.remove(p),C=1}}b||s.setStartBefore(r.document.getElementById(g.start)),g.end&&!C&&s.setEndAfter(r.document.getElementById(g.end)),s.enlarge(!0,function(e){return l[e.tagName]}),u=r.document.createDocumentFragment();for(var B,L=s.createBookmark(),A=domUtils.getNextDomNode(L.start,!1,d),D=s.cloneRange(),R=domUtils.isBlockElm;A&&A!==L.end&&domUtils.getPosition(A,L.end)&domUtils.POSITION_PRECEDING;)if(3==A.nodeType||dtd.li[A.tagName]){if(1==A.nodeType&&dtd.$list[A.tagName]){for(;A.firstChild;)u.appendChild(A.firstChild);B=domUtils.getNextDomNode(A,!1,d),domUtils.remove(A),A=B;continue}for(B=A,D.setStartBefore(A);A&&A!==L.end&&(!R(A)||domUtils.isBookmarkNode(A));)B=A,A=domUtils.getNextDomNode(A,!1,null,function(e){return!l[e.tagName]});A&&R(A)&&(f=domUtils.getNextDomNode(B,!1,d),f&&domUtils.isBookmarkNode(f)&&(A=domUtils.getNextDomNode(f,!1,d),B=f)),D.setEndAfter(B),A=domUtils.getNextDomNode(B,!1,d);var I=s.document.createElement("li");if(I.appendChild(D.extractContents()),domUtils.isEmptyNode(I)){for(var B=s.document.createElement("p");I.firstChild;)B.appendChild(I.firstChild);I.appendChild(B)}u.appendChild(I)}else A=domUtils.getNextDomNode(A,!0,d);s.moveToBookmark(L).collapse(!0),h=r.document.createElement(c),o(h,i),h.appendChild(u),s.insertNode(h),n(h,c,i);for(var E,U=0,O=domUtils.getElementsByTagName(h,"div");E=O[U++];)E.getAttribute("tmpDiv")&&domUtils.remove(E,!0);s.moveToBookmark(g).select()},queryCommandState:function(e){for(var t,i="insertorderedlist"==e.toLowerCase()?"ol":"ul",n=this.selection.getStartElementPath(),o=0;t=n[o++];){if("TABLE"==t.nodeName)return 0;if(i==t.nodeName.toLowerCase())return 1}return 0},queryCommandValue:function(e){for(var i,n,o="insertorderedlist"==e.toLowerCase()?"ol":"ul",r=this.selection.getStartElementPath(),a=0;n=r[a++];){if("TABLE"==n.nodeName){i=null;break}if(o==n.nodeName.toLowerCase()){i=n;break}}return i?t(i)||domUtils.getComputedStyle(i,"list-style-type"):null}}},UE.plugins.enterkey=function(){var e,t=this,i=t.options.enterTag;t.addListener("keyup",function(i,n){var o=n.keyCode||n.which;if(13==o){var r,a=t.selection.getRange(),s=a.startContainer;if(browser.ie)t.fireEvent("saveScene",!0,!0);else{if(/h\d/i.test(e)){if(browser.gecko){var l=domUtils.findParentByTagName(s,["h1","h2","h3","h4","h5","h6","blockquote","caption","table"],!0);l||(t.document.execCommand("formatBlock",!1,"<p>"),r=1)}else if(1==s.nodeType){var d,c=t.document.createTextNode("");if(a.insertNode(c),d=domUtils.findParentByTagName(c,"div",!0)){for(var u=t.document.createElement("p");d.firstChild;)u.appendChild(d.firstChild);d.parentNode.insertBefore(u,d),domUtils.remove(d),a.setStartBefore(c).setCursor(),r=1}domUtils.remove(c)}t.undoManger&&r&&t.undoManger.save()}browser.opera&&a.select()}}}),t.addListener("keydown",function(n,o){var r=o.keyCode||o.which;if(13==r){if(t.fireEvent("beforeenterkeydown"))return void domUtils.preventDefault(o);t.fireEvent("saveScene",!0,!0),e="";var a=t.selection.getRange();if(!a.collapsed){var s=a.startContainer,l=a.endContainer,d=domUtils.findParentByTagName(s,"td",!0),c=domUtils.findParentByTagName(l,"td",!0);if(d&&c&&d!==c||!d&&c||d&&!c)return void(o.preventDefault?o.preventDefault():o.returnValue=!1)}if("p"==i)browser.ie||(s=domUtils.findParentByTagName(a.startContainer,["ol","ul","p","h1","h2","h3","h4","h5","h6","blockquote","caption"],!0),s||browser.opera?(e=s.tagName,"p"==s.tagName.toLowerCase()&&browser.gecko&&domUtils.removeDirtyAttr(s)):(t.document.execCommand("formatBlock",!1,"<p>"),browser.gecko&&(a=t.selection.getRange(),s=domUtils.findParentByTagName(a.startContainer,"p",!0),s&&domUtils.removeDirtyAttr(s))));else if(o.preventDefault?o.preventDefault():o.returnValue=!1,a.collapsed){m=a.document.createElement("br"),a.insertNode(m);var u=m.parentNode;u.lastChild===m?(m.parentNode.insertBefore(m.cloneNode(!0),m),a.setStartBefore(m)):a.setStartAfter(m),a.setCursor()}else if(a.deleteContents(),s=a.startContainer,1==s.nodeType&&(s=s.childNodes[a.startOffset])){for(;1==s.nodeType;){if(dtd.$empty[s.tagName])return a.setStartBefore(s).setCursor(),t.undoManger&&t.undoManger.save(),!1;if(!s.firstChild){var m=a.document.createElement("br");return s.appendChild(m),a.setStart(s,0).setCursor(),t.undoManger&&t.undoManger.save(),!1}s=s.firstChild}s===a.startContainer.childNodes[a.startOffset]?(m=a.document.createElement("br"),a.insertNode(m).setCursor()):a.setStart(s,0).setCursor()}else m=a.document.createElement("br"),a.insertNode(m).setStartAfter(m).setCursor()}})},UE.plugins.keystrokes=function(){var e=this,t=!0;e.addListener("keydown",function(i,n){var o=n.keyCode||n.which,r=e.selection.getRange();if(!r.collapsed&&!(n.ctrlKey||n.shiftKey||n.altKey||n.metaKey)&&(o>=65&&90>=o||o>=48&&57>=o||o>=96&&111>=o||{13:1,8:1,46:1}[o])){var a=r.startContainer;if(domUtils.isFillChar(a)&&r.setStartBefore(a),a=r.endContainer,domUtils.isFillChar(a)&&r.setEndAfter(a),r.txtToElmBoundary(),r.endContainer&&1==r.endContainer.nodeType&&(a=r.endContainer.childNodes[r.endOffset],a&&domUtils.isBr(a)&&r.setEndAfter(a)),0==r.startOffset&&(a=r.startContainer,domUtils.isBoundaryNode(a,"firstChild")&&(a=r.endContainer,r.endOffset==(3==a.nodeType?a.nodeValue.length:a.childNodes.length)&&domUtils.isBoundaryNode(a,"lastChild"))))return e.fireEvent("saveScene"),e.body.innerHTML="<p>"+(browser.ie?"":"<br/>")+"</p>",r.setStart(e.body.firstChild,0).setCursor(!1,!0),void e._selectionChange()}if(o==keymap.Backspace){if(r=e.selection.getRange(),t=r.collapsed,e.fireEvent("delkeydown",n))return;var s,l;if(r.collapsed&&r.inFillChar()&&(s=r.startContainer,domUtils.isFillChar(s)?(r.setStartBefore(s).shrinkBoundary(!0).collapse(!0),domUtils.remove(s)):(s.nodeValue=s.nodeValue.replace(new RegExp("^"+domUtils.fillChar),""),r.startOffset--,r.collapse(!0).select(!0))),s=r.getClosedNode())return e.fireEvent("saveScene"),r.setStartBefore(s),domUtils.remove(s),r.setCursor(),e.fireEvent("saveScene"),void domUtils.preventDefault(n);if(!browser.ie&&(s=domUtils.findParentByTagName(r.startContainer,"table",!0),l=domUtils.findParentByTagName(r.endContainer,"table",!0),s&&!l||!s&&l||s!==l))return void n.preventDefault()}if(o==keymap.Tab){var d={ol:1,ul:1,table:1};if(e.fireEvent("tabkeydown",n))return void domUtils.preventDefault(n);var c=e.selection.getRange();e.fireEvent("saveScene");for(var u=0,m="",p=e.options.tabSize||4,h=e.options.tabNode||"&nbsp;";p>u;u++)m+=h;var f=e.document.createElement("span");if(f.innerHTML=m+domUtils.fillChar,c.collapsed)c.insertNode(f.cloneNode(!0).firstChild).setCursor(!0);else{var g=function(e){return domUtils.isBlockElm(e)&&!d[e.tagName.toLowerCase()]};if(s=domUtils.findParent(c.startContainer,g,!0),l=domUtils.findParent(c.endContainer,g,!0),s&&l&&s===l)c.deleteContents(),c.insertNode(f.cloneNode(!0).firstChild).setCursor(!0);else{var v=c.createBookmark();c.enlarge(!0);for(var b=c.createBookmark(),y=domUtils.getNextDomNode(b.start,!1,g);y&&!(domUtils.getPosition(y,b.end)&domUtils.POSITION_FOLLOWING);)y.insertBefore(f.cloneNode(!0).firstChild,y.firstChild),y=domUtils.getNextDomNode(y,!1,g);c.moveToBookmark(b).moveToBookmark(v).select()}}domUtils.preventDefault(n)}if(browser.gecko&&46==o&&(c=e.selection.getRange(),c.collapsed&&(s=c.startContainer,domUtils.isEmptyBlock(s)))){for(var C=s.parentNode;1==domUtils.getChildCount(C)&&!domUtils.isBody(C);)s=C,C=C.parentNode;return void(s===C.lastChild&&n.preventDefault())}}),e.addListener("keyup",function(e,i){var n,o=i.keyCode||i.which,r=this;if(o==keymap.Backspace){if(r.fireEvent("delkeyup"))return;if(n=r.selection.getRange(),n.collapsed){var a,s=["h1","h2","h3","h4","h5","h6"];if((a=domUtils.findParentByTagName(n.startContainer,s,!0))&&domUtils.isEmptyBlock(a)){var l=a.previousSibling;if(l&&"TABLE"!=l.nodeName)return domUtils.remove(a),void n.setStartAtLast(l).setCursor(!1,!0);var d=a.nextSibling;if(d&&"TABLE"!=d.nodeName)return domUtils.remove(a),void n.setStartAtFirst(d).setCursor(!1,!0)}if(domUtils.isBody(n.startContainer)){var a=domUtils.createElement(r.document,"p",{innerHTML:browser.ie?domUtils.fillChar:"<br/>"});n.insertNode(a).setStart(a,0).setCursor(!1,!0)}}if(!t&&(3==n.startContainer.nodeType||1==n.startContainer.nodeType&&domUtils.isEmptyBlock(n.startContainer)))if(browser.ie){var c=n.document.createElement("span");n.insertNode(c).setStartBefore(c).collapse(!0),n.select(),domUtils.remove(c)}else n.select()}})},UE.plugins.autoheight=function(){function e(){var e=this;clearTimeout(r),d||(!e.queryCommandState||e.queryCommandState&&1!=e.queryCommandState("source"))&&(r=setTimeout(function(){for(var t=e.body.lastChild;t&&1!=t.nodeType;)t=t.previousSibling;t&&1==t.nodeType&&(t.style.clear="both",n=Math.max(domUtils.getXY(t).y+t.offsetHeight+25,Math.max(s.minFrameHeight,s.initialFrameHeight)),o=n>l,e.autoHeightEnabled=!o,n=o?l:n,n!=a&&(n!==parseInt(e.iframe.parentNode.style.height)&&(e.document.body.style.overflowY=o?"":"hidden",e.iframe.parentNode.style.height=n+"px"),e.body.style.height=n-32+"px",a=n),domUtils.removeStyle(t,"clear"))},50))}var t=this;if(t.autoHeightEnabled=t.options.autoHeightEnabled!==!1,t.autoHeightEnabled){var i,n,o,r,a=0,s=t.options,l=t.getOpt("maxFrameHeight");t.adjustHeight=e;var d;t.addListener("fullscreenchanged",function(e,t){d=t}),t.addListener("destroy",function(){t.removeListener("contentchange afterinserthtml keyup mouseup",e)}),t.enableAutoHeight=function(){var t=this;if(t.autoHeightEnabled){var n=t.document;t.autoHeightEnabled=!0,i=n.body.style.overflowY,n.body.style.overflowY=o?"":"hidden",t.addListener("contentchange afterinserthtml keyup mouseup",e),setTimeout(function(){e.call(t)},browser.gecko?100:0),t.fireEvent("autoheightchanged",t.autoHeightEnabled)}},t.disableAutoHeight=function(){t.body.style.overflowY=i||"",t.removeListener("contentchange",e),t.removeListener("keyup",e),t.removeListener("mouseup",e),t.autoHeightEnabled=!1,t.fireEvent("autoheightchanged",t.autoHeightEnabled)},t.on("setHeight",function(){t.disableAutoHeight()}),t.addListener("ready",function(){t.enableAutoHeight();var i;domUtils.on(browser.ie?t.body:t.document,browser.webkit?"dragover":"drop",function(){clearTimeout(i),i=setTimeout(function(){e.call(t)},100)});var n;window.onscroll=function(){null===n?n=this.scrollY:0==this.scrollY&&0!=n&&(t.window.scrollTo&&t.window.scrollTo(0,0),n=null)}})}},UE.plugins.video=function(){function e(e){utils.each(e.getNodesByTagName("img"),function(e){if("edui-faked-video"===e.getAttr("class")){var t=['<video style="display:none"',' class="',e.getAttr("class"),'"',' data_type="',e.getAttr("data_type"),'"',' data_img="',e.getAttr("data_img"),'"',' data_src="',e.getAttr("data_src"),'"',' data_swf="',e.getAttr("data_swf"),'"',' data_title="',e.getAttr("data_title"),'"',' data_time="',e.getAttr("data_time"),'"',' data_def="',e.getAttr("data_def"),'"',' data_itemid="',e.getAttr("data_itemid"),'"',">","</video>"];e.parentNode.replaceChild(UE.uNode.createElement(t.join("")),e)}})}function t(e){utils.each(e.getNodesByTagName("video"),function(e){if("edui-faked-video"===e.getAttr("class")){var t=['<img src="https://gss0.bdstatic.com/7051cy89RsgCncy6lo7D0j9wexYrbOWh7c50/editor/video-bg.png"',' class="',e.getAttr("class"),'" width=219 height=175',' data_type="',e.getAttr("data_type"),'"',' data_img="',e.getAttr("data_img"),'"',' data_src="',e.getAttr("data_src"),'"',' data_swf="',e.getAttr("data_swf"),'"',' data_title="',e.getAttr("data_title"),'"',' data_time="',e.getAttr("data_time"),'"',' data_def="',e.getAttr("data_def"),'"',' data_itemid="',e.getAttr("data_itemid"),'"',">"];
e.parentNode.replaceChild(UE.uNode.createElement(t.join("")),e)}})}var i=this;i.addOutputRule(function(t){e(t)}),i.addInputRule(function(e){t(e)}),i.commands.insertvideo={execCommand:function(e,t){var n=['<img src="https://gss0.bdstatic.com/7051cy89RsgCncy6lo7D0j9wexYrbOWh7c50/editor/video-bg.png"',' class="edui-faked-video" width=219 height=175',' data_type="',t.type,'"',' data_img="',t.img,'"',' data_src="',t.src,'"',' data_swf="',t.swf,'"',' data_title="',t.title,'"',' data_time="',t.time,'"',' data_def="',t.def,'"',' data_itemid="',t.itemid,'"',">"];i.execCommand("inserthtml",n.join(""),!0)},queryCommandState:function(){var e=i.selection.getRange().getClosedNode(),t=e&&"edui-faked-video"==e.className;return t?1:0}}},UE.plugins.shortcutmenu=function(){var e,t=this,i=t.options.shortcutMenu||[];i.length&&(t.addListener("contextmenu mouseup",function(t,n){var o=this,r={type:t,target:n.target||n.srcElement,screenX:n.screenX,screenY:n.screenY,clientX:n.clientX,clientY:n.clientY};if(setTimeout(function(){var n=o.selection.getRange();(n.collapsed===!1||"contextmenu"==t)&&(e||(e=new baidu.editor.ui.ShortCutMenu({editor:o,items:i,theme:o.options.theme,className:"edui-shortcutmenu"}),e.render(),o.fireEvent("afterrendershortcutmenu",e)),e.show(r,!!UE.plugins.contextmenu))}),"contextmenu"==t&&(domUtils.preventDefault(n),browser.ie9below)){var a;try{a=o.selection.getNative().createRange()}catch(n){return}if(a.item){var s=new dom.Range(o.document);s.selectNode(a.item(0)).select(!0,!0)}}}),t.addListener("keydown",function(t){"keydown"==t&&e&&!e.isHidden&&e.hide()}))},UE.plugins.basestyle=function(){var e={bold:["strong","b"],italic:["em","i"],subscript:["sub"],superscript:["sup"]},t=function(e,t){return domUtils.filterNodeList(e.selection.getStartElementPath(),t)},i=this;i.addshortcutkey({Bold:"ctrl+66",Italic:"ctrl+73",Underline:"ctrl+85"}),i.addInputRule(function(e){utils.each(e.getNodesByTagName("b i"),function(e){switch(e.tagName){case"b":e.tagName="strong";break;case"i":e.tagName="em"}})});for(var n in e)!function(e,n){i.commands[e]={execCommand:function(e){var o=i.selection.getRange(),r=t(this,n);if(o.collapsed){if(r){var a=i.document.createTextNode("");o.insertNode(a).removeInlineStyle(n),o.setStartBefore(a),domUtils.remove(a)}else{var s=o.document.createElement(n[0]);("superscript"==e||"subscript"==e)&&(a=i.document.createTextNode(""),o.insertNode(a).removeInlineStyle(["sub","sup"]).setStartBefore(a).collapse(!0)),o.insertNode(s).setStart(s,0)}o.collapse(!0)}else("superscript"==e||"subscript"==e)&&(r&&r.tagName.toLowerCase()==e||o.removeInlineStyle(["sub","sup"])),r?o.removeInlineStyle(n):o.applyInlineStyle(n[0]);o.select()},queryCommandState:function(){return t(this,n)?1:0}}}(n,e[n])},UE.plugins.template=function(){UE.commands.template={execCommand:function(e,t){t.html&&this.execCommand("inserthtml",t.html,!0)}},this.addListener("click",function(e,t){var i=t.target||t.srcElement,n=this.selection.getRange();if(n.collapsed){var o=domUtils.findParent(i,function(e){return e.className&&domUtils.hasClass(e,"ue_t")?e:void 0},!0);o&&n.selectNode(o).shrinkBoundary().select()}})},UE.plugin.register("autoupload",function(){function e(e,t){var i,n,o,r,a,s,l,d,c=t,u=/image\/\w+/i.test(e.type)?"image":"file",m="loading_"+(+new Date).toString(36);if(i=c.getOpt(u+"UploadName"),n=c.getOpt(u+"UrlPrefix")||"",o=c.getOpt(u+"MaxSize")||0,r=c.getOpt(u+"AllowFiles"),a=c.getOpt(u+"UploadUrl"),l=function(e){var t=c.document.getElementById(m);t&&domUtils.remove(t),c.fireEvent("showmessage",{id:m,content:e,type:"error",timeout:1e3})},"image"==u?(s='<p><img class="loadingclass" id="'+m+'" src="'+c.options.waitImageUrl+'" title="'+(c.getLang("autoupload.loading")||"")+'" ></p>',d=function(e){var t=n+e.url,i=c.document.getElementById(m);if(i){var o=(new Date).getTime();i.setAttribute("data_src",t),i.setAttribute("data_time",o),i.removeAttribute("id")}}):(s='<p><img class="loadingclass" id="'+m+'" src="'+c.options.themePath+c.options.theme+'/images/spacer.gif" title="'+(c.getLang("autoupload.loading")||"")+'" ></p>',d=function(e){var t=n+e.url,i=c.document.getElementById(m),o=c.selection.getRange(),r=o.createBookmark();o.selectNode(i).select(),c.execCommand("insertfile",{url:t}),o.moveToBookmark(r).select()}),!t.getOpt("isLogin")&&"image"!==u)return void l(c.getLang("needLoginMsg"));if(c.execCommand("inserthtml",s),e.size>o)return void l(c.getLang("autoupload.exceedSizeError"));var p=e.name?e.name.substr(e.name.lastIndexOf(".")):"";if(p&&"image"!=u||r&&-1==(r.join("")+".").indexOf(p.toLowerCase()+"."))return void l(c.getLang("autoupload.exceedTypeError"));if("image"===u){var h=new FileReader;h.onload=function(e){var i=c.document.getElementById(m);i.setAttribute("src",e.target.result),domUtils.removeClasses(i,"loadingclass"),i.onload=function(){var e=t.selection.getRange();e.scrollToView(t.autoHeightEnabled,t.autoHeightEnabled?domUtils.getXY(t.iframe).y:0),t.fireEvent("afterinserthtml")}},h.readAsDataURL(e)}var f=new FormData,g=utils.formatUrl(a),v=c.getOpt("imageUploadParams");utils.each(v,function(e,t){f.append(t,e)}),f.append(i,e),UE.ajax.request(g,{method:"POST",data:{input:f},onsuccess:function(e){var t=utils.str2json(e.responseText);if("0"===t.errorNo&&t.url)d(t);else if("265"===t.errorNo){var i=c.document.getElementById(m);i&&i.parentNode.removeChild(i),l(c.getLang("needLoginMsg"))}else{var i=c.document.getElementById(m);i&&i.parentNode.removeChild(i),l(t.index)}},onerror:function(){var e=c.document.getElementById(m);e&&e.parentNode.removeChild(e),l(c.getLang("autoupload.loadError"))}})}function t(e){return e.clipboardData&&e.clipboardData.items&&1==e.clipboardData.items.length&&/^image\//.test(e.clipboardData.items[0].type)?e.clipboardData.items:null}function i(e){return e.dataTransfer&&e.dataTransfer.files?e.dataTransfer.files:null}return{outputRule:function(e){utils.each(e.getNodesByTagName("img"),function(e){/\b(loaderrorclass)|(bloaderrorclass)\b/.test(e.getAttr("class"))&&e.parentNode.removeChild(e)}),utils.each(e.getNodesByTagName("p"),function(e){/\bloadpara\b/.test(e.getAttr("class"))&&e.parentNode.removeChild(e)})},bindEvents:{ready:function(){var n=this;window.FormData&&window.FileReader&&(domUtils.on(n.body,"paste drop",function(o){var r,a=!1;if(r="paste"==o.type?t(o):i(o)){for(var s,l=r.length;l--;)s=r[l],s.getAsFile&&(s=s.getAsFile()),s&&s.size>0&&(e(s,n),a=!0);a&&o.preventDefault()}}),domUtils.on(n.body,"dragover",function(e){"Files"==e.dataTransfer.types[0]&&e.preventDefault()}),utils.cssRule("loading",".loadingclass{display:inline-block;cursor:default;border:1px solid #cccccc;margin-left:1px;height: 22px;width: 22px;}\n.loaderrorclass{display:inline-block;cursor:default;border:1px solid #cccccc;margin-right:1px;height: 22px;width: 22px;}",this.document))}}}}),UE.plugin.register("simpleupload",function(){function e(){var e=document.createElement("iframe");e.src=i.ui.mapUrl("~/dialogs/simpleupload/simpleupload.html")+"?editor="+i.uid,e.style.cssText="display:block;width:97px;height:40px;overflow:hidden;border:0;margin:0;padding:0;position:absolute;top:0;left:0;filter:alpha(opacity=0);-moz-opacity:0;-khtml-opacity: 0;opacity: 0;cursor:pointer;",t.appendChild(e)}var t,i=this;return{bindEvents:{simpleuploadbtnready:function(n,o){t=o,i.afterConfigReady(e)}},outputRule:function(e){utils.each(e.getNodesByTagName("img"),function(e){/\b(loaderrorclass)|(bloaderrorclass)\b/.test(e.getAttr("class"))&&e.parentNode.removeChild(e)})}}}),UE.plugin.register("tooltip",function(){var e=this;e.addListener("ready",function(){var t=e.getOpt("tooltipsMap");if(t){var i=e.ui.toolbars;utils.each(i,function(i){utils.each(i.items,function(i){if(!(i instanceof baidu.editor.ui.Separator)){var n=i.Stateful_onMouseEnter,o=i.Stateful_onMouseLeave;i.Stateful_onMouseEnter=function(o,r){if(n.call(i,arguments),this.toolbarLabel)this.toolbarLabel.style.display="block";else{var a=this.className.replace("edui-for-","");if(a&&t&&t[a]){var s=t[a],l=domUtils.createElement(document,"div",{"class":"iknow-toolbar-label"});l.style.zIndex=e.getOpt("zIndex")+10,l.innerHTML='<span class="toolbar-label-arrow arrow1"></span><span class="toolbar-label-arrow arrow2"></span>'+s.label,domUtils.insertAfter(r,l),this.toolbarLabel=l;var d=r.children[0].children[0];d&&domUtils.removeAttributes(d,"title")}}},i.Stateful_onMouseLeave=function(){o.call(i,arguments),this.toolbarLabel&&(this.toolbarLabel.style.display="none")};var r=i.onclick;i.onclick=function(){i.toolbarLabel&&(i.toolbarLabel.style.display="none"),r.call(i,arguments)};var a=i.showPopup;i.showPopup=function(){i.toolbarLabel&&(i.toolbarLabel.style.display="none"),a.call(i,arguments)}}})})}})}),UE.plugins.xssFilter=function(){function e(e){var t=e.tagName,n=e.attrs;return i.hasOwnProperty(t)?void UE.utils.each(n,function(n,o){-1===i[t].indexOf(o)&&e.setAttr(o)}):(e.parentNode.removeChild(e),!1)}var t=UEDITOR_CONFIG,i=t.whitList;i&&t.xssFilterRules&&(this.options.filterRules=function(){var t={};return UE.utils.each(i,function(i,n){t[n]=function(t){return e(t)}}),t}());var n=[];UE.utils.each(i,function(e,t){n.push(t)}),i&&t.inputXssFilter&&this.addInputRule(function(t){t.traversal(function(t){return"element"!==t.type?!1:void e(t)})}),i&&t.outputXssFilter&&this.addOutputRule(function(t){t.traversal(function(t){return"element"!==t.type?!1:void e(t)})})};var baidu=baidu||{};baidu.editor=baidu.editor||{},UE.ui=baidu.editor.ui={},function(){function e(){var e=document.getElementById("edui_fixedlayer");l.setViewportOffset(e,{left:0,top:0})}function t(){n.on(window,"scroll",e),n.on(window,"resize",baidu.editor.utils.defer(e,0,!0))}var i=baidu.editor.browser,n=baidu.editor.dom.domUtils,o="$EDITORUI",r=window[o]={},a="ID"+o,s=0,l=baidu.editor.ui.uiUtils={uid:function(e){return e?e[a]||(e[a]=++s):++s},hook:function(e,t){var i;return e&&e._callbacks?i=e:(i=function(){var t;e&&(t=e.apply(this,arguments));for(var n=i._callbacks,o=n.length;o--;){var r=n[o].apply(this,arguments);void 0===t&&(t=r)}return t},i._callbacks=[]),i._callbacks.push(t),i},createElementByHtml:function(e){var t=document.createElement("div");return t.innerHTML=e,t=t.firstChild,t.parentNode.removeChild(t),t},getViewportElement:function(){return i.ie&&i.quirks?document.body:document.documentElement},getClientRect:function(e){var t;try{t=e.getBoundingClientRect()}catch(i){t={left:0,top:0,height:0,width:0}}for(var o,r={left:Math.round(t.left),top:Math.round(t.top),height:Math.round(t.bottom-t.top),width:Math.round(t.right-t.left)};(o=e.ownerDocument)!==document&&(e=n.getWindow(o).frameElement);)t=e.getBoundingClientRect(),r.left+=t.left,r.top+=t.top;return r.bottom=r.top+r.height,r.right=r.left+r.width,r},getViewportRect:function(){var e=l.getViewportElement(),t=0|(window.innerWidth||e.clientWidth),i=0|(window.innerHeight||e.clientHeight);return{left:0,top:0,height:i,width:t,bottom:i,right:t}},setViewportOffset:function(e,t){var i=l.getFixedLayer();e.parentNode===i?(e.style.left=t.left+"px",e.style.top=t.top+"px"):n.setViewportOffset(e,t)},getEventOffset:function(e){var t=e.target||e.srcElement,i=l.getClientRect(t),n=l.getViewportOffsetByEvent(e);return{left:n.left-i.left,top:n.top-i.top}},getViewportOffsetByEvent:function(e){var t=e.target||e.srcElement,i=n.getWindow(t).frameElement,o={left:e.clientX,top:e.clientY};if(i&&t.ownerDocument!==document){var r=l.getClientRect(i);o.left+=r.left,o.top+=r.top}return o},setGlobal:function(e,t){return r[e]=t,o+'["'+e+'"]'},unsetGlobal:function(e){delete r[e]},copyAttributes:function(e,t){for(var o=t.attributes,r=o.length;r--;){var a=o[r];"style"==a.nodeName||"class"==a.nodeName||i.ie&&!a.specified||e.setAttribute(a.nodeName,a.nodeValue)}t.className&&n.addClass(e,t.className),t.style.cssText&&(e.style.cssText+=";"+t.style.cssText)},removeStyle:function(e,t){if(e.style.removeProperty)e.style.removeProperty(t);else{if(!e.style.removeAttribute)throw"";e.style.removeAttribute(t)}},contains:function(e,t){return e&&t&&(e===t?!1:e.contains?e.contains(t):16&e.compareDocumentPosition(t))},startDrag:function(e,t,i){function n(e){var i=e.clientX-a,n=e.clientY-s;t.ondragmove(i,n,e),e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function o(){i.removeEventListener("mousemove",n,!0),i.removeEventListener("mouseup",o,!0),window.removeEventListener("mouseup",o,!0),t.ondragstop()}function r(){l.releaseCapture(),l.detachEvent("onmousemove",n),l.detachEvent("onmouseup",r),l.detachEvent("onlosecaptrue",r),t.ondragstop()}var i=i||document,a=e.clientX,s=e.clientY;if(i.addEventListener)i.addEventListener("mousemove",n,!0),i.addEventListener("mouseup",o,!0),window.addEventListener("mouseup",o,!0),e.preventDefault();else{var l=e.srcElement;l.setCapture(),l.attachEvent("onmousemove",n),l.attachEvent("onmouseup",r),l.attachEvent("onlosecaptrue",r),e.returnValue=!1}t.ondragstart()},getFixedLayer:function(){var n=document.getElementById("edui_fixedlayer");return null==n&&(n=document.createElement("div"),n.id="edui_fixedlayer",document.body.appendChild(n),i.ie&&i.version<=8?(n.style.position="absolute",t(),setTimeout(e)):n.style.position="fixed",n.style.left="0",n.style.top="0",n.style.width="0",n.style.height="0"),n},makeUnselectable:function(e){if(i.opera||i.ie&&i.version<9){if(e.unselectable="on",e.hasChildNodes())for(var t=0;t<e.childNodes.length;t++)1==e.childNodes[t].nodeType&&l.makeUnselectable(e.childNodes[t])}else void 0!==e.style.MozUserSelect?e.style.MozUserSelect="none":void 0!==e.style.WebkitUserSelect?e.style.WebkitUserSelect="none":void 0!==e.style.KhtmlUserSelect&&(e.style.KhtmlUserSelect="none")}}}(),function(){var e=baidu.editor.utils,t=baidu.editor.ui.uiUtils,i=baidu.editor.EventBase,n=baidu.editor.ui.UIBase=function(){};n.prototype={className:"",uiName:"",initOptions:function(e){var i=this;for(var n in e)i[n]=e[n];this.id=this.id||"edui"+t.uid()},initUIBase:function(){this._globalKey=e.unhtml(t.setGlobal(this.id,this))},render:function(e){for(var i,n=this.renderHtml(),o=t.createElementByHtml(n),r=domUtils.getElementsByTagName(o,"*"),a="edui-"+(this.theme||this.editor.options.theme),s=document.getElementById("edui_fixedlayer"),l=0;i=r[l++];)domUtils.addClass(i,a);domUtils.addClass(o,a),s&&(s.className="",domUtils.addClass(s,a));var d=this.getDom();null!=d?(d.parentNode.replaceChild(o,d),t.copyAttributes(o,d)):("string"==typeof e&&(e=document.getElementById(e)),e=e||t.getFixedLayer(),domUtils.addClass(e,a),e.appendChild(o)),this.postRender()},getDom:function(e){return document.getElementById(e?this.id+"_"+e:this.id)},postRender:function(){this.fireEvent("postrender")},getHtmlTpl:function(){return""},formatHtml:function(e){var t="edui-"+this.uiName;return e.replace(/##/g,this.id).replace(/%%-/g,this.uiName?t+"-":"").replace(/%%/g,(this.uiName?t:"")+" "+this.className).replace(/\$\$/g,this._globalKey)},renderHtml:function(){return this.formatHtml(this.getHtmlTpl())},dispose:function(){var e=this.getDom();e&&baidu.editor.dom.domUtils.remove(e),t.unsetGlobal(this.id)}},e.inherits(n,i)}(),function(){var e=baidu.editor.utils,t=baidu.editor.ui.UIBase,i=baidu.editor.ui.Separator=function(e){this.initOptions(e),this.initSeparator()};i.prototype={uiName:"separator",initSeparator:function(){this.initUIBase()},getHtmlTpl:function(){return'<div id="##" class="edui-box %%"></div>'}},e.inherits(i,t)}(),function(){var e=baidu.editor.utils,t=baidu.editor.dom.domUtils,i=baidu.editor.ui.UIBase,n=baidu.editor.ui.uiUtils,o=baidu.editor.ui.Mask=function(e){this.initOptions(e),this.initUIBase()};o.prototype={getHtmlTpl:function(){return'<div id="##" class="edui-mask %%" onclick="return $$._onClick(event, this);" onmousedown="return $$._onMouseDown(event, this);"></div>'},postRender:function(){var e=this;t.on(window,"resize",function(){setTimeout(function(){e.isHidden()||e._fill()})})},show:function(e){this._fill(),this.getDom().style.display="",this.getDom().style.zIndex=e},hide:function(){this.getDom().style.display="none",this.getDom().style.zIndex=""},isHidden:function(){return"none"==this.getDom().style.display},_onMouseDown:function(){return!1},_onClick:function(e,t){this.fireEvent("click",e,t)},_fill:function(){var e=this.getDom(),t=n.getViewportRect();e.style.width=t.width+"px",e.style.height=t.height+"px"}},e.inherits(o,i)}(),function(){function e(e,t){for(var i=0;i<a.length;i++){var n=a[i];if(!n.isHidden()&&n.queryAutoHide(t)!==!1){if(e&&/scroll/gi.test(e.type)&&"edui-wordpastepop"==n.className)return;n.hide()}}a.length&&n.editor.fireEvent("afterhidepop")}var t=baidu.editor.utils,i=baidu.editor.ui.uiUtils,n=baidu.editor.dom.domUtils,o=baidu.editor.ui.UIBase,r=baidu.editor.ui.Popup=function(e){this.initOptions(e),this.initPopup()},a=[];r.postHide=e;var s=["edui-anchor-topleft","edui-anchor-topright","edui-anchor-bottomleft","edui-anchor-bottomright"];r.prototype={SHADOW_RADIUS:5,content:null,_hidden:!1,autoRender:!0,canSideLeft:!0,canSideUp:!0,initPopup:function(){this.initUIBase(),a.push(this)},getHtmlTpl:function(){return'<div id="##" class="edui-popup %%" onmousedown="return false;"> <div id="##_body" class="edui-popup-body"> <iframe style="position:absolute;z-index:-1;left:0;top:0;background-color: transparent;" frameborder="0" width="100%" height="100%" src="about:blank"></iframe> <div class="edui-shadow"></div> <div id="##_content" class="edui-popup-content">'+this.getContentHtmlTpl()+"  </div> </div></div>"},getContentHtmlTpl:function(){return this.content?"string"==typeof this.content?this.content:this.content.renderHtml():""},_UIBase_postRender:o.prototype.postRender,postRender:function(){if(this.content instanceof o&&this.content.postRender(),this.captureWheel&&!this.captured){this.captured=!0;var e=(document.documentElement.clientHeight||document.body.clientHeight)-80,t=this.getDom().offsetHeight,r=i.getClientRect(this.combox.getDom()).top,a=this.getDom("content"),s=this.getDom("body").getElementsByTagName("iframe"),l=this;for(s.length&&(s=s[0]);r+t>e;)t-=30;a.style.height=t+"px",s&&(s.style.height=t+"px"),window.XMLHttpRequest?n.on(a,"onmousewheel"in document.body?"mousewheel":"DOMMouseScroll",function(e){e.preventDefault?e.preventDefault():e.returnValue=!1,a.scrollTop-=e.wheelDelta?e.wheelDelta/120*60:e.detail/-3*60}):n.on(this.getDom(),"mousewheel",function(e){e.returnValue=!1,l.getDom("content").scrollTop-=e.wheelDelta/120*60})}this.fireEvent("postRenderAfter"),this.hide(!0),this._UIBase_postRender()},_doAutoRender:function(){!this.getDom()&&this.autoRender&&this.render()},mesureSize:function(){var e=this.getDom("content");return i.getClientRect(e)},fitSize:function(){if(this.captureWheel&&this.sized)return this.__size;this.sized=!0;var e=this.getDom("body");e.style.width="",e.style.height="";var t=this.mesureSize();if(this.captureWheel){e.style.width=-(-20-t.width)+"px";var i=parseInt(this.getDom("content").style.height,10);!window.isNaN(i)&&(t.height=i)}else e.style.width=t.width+"px";return e.style.height=t.height+"px",this.__size=t,this.captureWheel&&(this.getDom("content").style.overflow="auto"),t},showAnchor:function(e,t){this.showAnchorRect(i.getClientRect(e),t)},showAnchorRect:function(e,t){this._doAutoRender();var o=i.getViewportRect();this.getDom().style.visibility="hidden",this._show();var r,a,l,d,c=this.fitSize();t?(r=this.canSideLeft&&e.right+c.width>o.right&&e.left>c.width,a=this.canSideUp&&e.top+c.height>o.bottom&&e.bottom>c.height,l=r?e.left-c.width:e.right,d=a?e.bottom-c.height:e.top):(r=this.canSideLeft&&e.right+c.width>o.right&&e.left>c.width,a=this.canSideUp&&e.top+c.height>o.bottom&&e.bottom>c.height,l=r?e.right-c.width:e.left,d=a?e.top-c.height:e.bottom);var u=this.getDom();this.anchorEl&&"a"===this.anchorEl.tagName.toLowerCase()?i.setViewportOffset(u,{left:l,top:d+8}):i.setViewportOffset(u,{left:l,top:d}),n.removeClasses(u,s),u.className+=" "+s[2*(a?1:0)+(r?1:0)],this.editor&&(u.style.zIndex=1*this.editor.container.style.zIndex+10,baidu.editor.ui.uiUtils.getFixedLayer().style.zIndex=u.style.zIndex-1),this.getDom().style.visibility="visible"},showAt:function(e){var t=e.left,i=e.top,n={left:t,top:i,right:t,bottom:i,height:0,width:0};this.showAnchorRect(n,!1,!0)},_show:function(){if(this._hidden){var e=this.getDom();e.style.display="",this._hidden=!1,this.fireEvent("show")}},isHidden:function(){return this._hidden},show:function(){this._doAutoRender(),this._show()},hide:function(e){!this._hidden&&this.getDom()&&(this.getDom().style.display="none",this._hidden=!0,e||this.fireEvent("hide"))},queryAutoHide:function(e){return!e||!i.contains(this.getDom(),e)}},t.inherits(r,o),n.on(document,"mousedown",function(t){var i=t.target||t.srcElement;e(t,i)}),n.on(window,"scroll",function(t,i){e(t,i)})}(),function(){var e=baidu.editor.browser,t=baidu.editor.dom.domUtils,i=baidu.editor.ui.uiUtils,n='onmousedown="$$.Stateful_onMouseDown(event, this);" onmouseup="$$.Stateful_onMouseUp(event, this);"'+(e.ie?' onmouseenter="$$.Stateful_onMouseEnter(event, this);" onmouseleave="$$.Stateful_onMouseLeave(event, this);"':' onmouseover="$$.Stateful_onMouseOver(event, this);" onmouseout="$$.Stateful_onMouseOut(event, this);"');baidu.editor.ui.Stateful={alwalysHoverable:!1,target:null,Stateful_init:function(){this._Stateful_dGetHtmlTpl=this.getHtmlTpl,this.getHtmlTpl=this.Stateful_getHtmlTpl},Stateful_getHtmlTpl:function(){var e=this._Stateful_dGetHtmlTpl();return e.replace(/stateful/g,function(){return n})},Stateful_onMouseEnter:function(e,t){this.target=t,(!this.isDisabled()||this.alwalysHoverable)&&(this.addState("hover"),this.fireEvent("over"))},Stateful_onMouseLeave:function(){(!this.isDisabled()||this.alwalysHoverable)&&(this.removeState("hover"),this.removeState("active"),this.fireEvent("out"))},Stateful_onMouseOver:function(e,t){var n=e.relatedTarget;i.contains(t,n)||t===n||this.Stateful_onMouseEnter(e,t)},Stateful_onMouseOut:function(e,t){var n=e.relatedTarget;i.contains(t,n)||t===n||this.Stateful_onMouseLeave(e,t)},Stateful_onMouseDown:function(){this.isDisabled()||this.addState("active")},Stateful_onMouseUp:function(){this.isDisabled()||this.removeState("active")},Stateful_postRender:function(){this.disabled&&!this.hasState("disabled")&&this.addState("disabled")},hasState:function(e){return t.hasClass(this.getStateDom(),"edui-state-"+e)},addState:function(e){this.hasState(e)||(this.getStateDom().className+=" edui-state-"+e)},removeState:function(e){this.hasState(e)&&t.removeClasses(this.getStateDom(),["edui-state-"+e])},getStateDom:function(){return this.getDom("state")},isChecked:function(){return this.hasState("checked")},setChecked:function(e){!this.isDisabled()&&e?this.addState("checked"):this.removeState("checked")},isDisabled:function(){return this.hasState("disabled")},setDisabled:function(e){e?(this.removeState("hover"),this.removeState("checked"),this.removeState("active"),this.addState("disabled")):this.removeState("disabled")}}}(),function(){var e=baidu.editor.utils,t=baidu.editor.ui.UIBase,i=baidu.editor.ui.Stateful,n=baidu.editor.ui.Button=function(e){if(e.name){var t=e.name,i=e.cssRules;e.className||(e.className="edui-for-"+t),e.cssRules=".edui-default  .edui-for-"+t+" .edui-icon {"+i+"}"}this.initOptions(e),this.initButton()};n.prototype={uiName:"button",label:"",title:"",showIcon:!0,showText:!0,cssRules:"",initButton:function(){this.initUIBase(),this.Stateful_init(),this.cssRules&&e.cssRule("edui-customize-"+this.name+"-style",this.cssRules)},getHtmlTpl:function(){return'<div id="##" class="edui-box %%"><div id="##_state" stateful><div class="%%-wrap"><div id="##_body" unselectable="on" '+(this.title?'title="'+this.title+'"':"")+' class="%%-body" onmousedown="return $$._onMouseDown(event, this);" onclick="return $$._onClick(event, this);">'+(this.showIcon?'<div class="edui-box edui-icon"></div>':"")+(this.showText?'<div class="edui-box edui-label">'+this.label+"</div>":"")+"</div></div></div></div>"},postRender:function(){this.Stateful_postRender(),this.setDisabled(this.disabled)},_onMouseDown:function(e){var t=e.target||e.srcElement,i=t&&t.tagName&&t.tagName.toLowerCase();return"input"==i||"object"==i||"object"==i?!1:void 0},_onClick:function(){this.isDisabled()||this.fireEvent("click")},setTitle:function(e){var t=this.getDom("label");t.innerHTML=e}},e.inherits(n,t),e.extend(n.prototype,i)}(),function(){var e=baidu.editor.utils,t=baidu.editor.ui.uiUtils,i=(baidu.editor.dom.domUtils,baidu.editor.ui.UIBase),n=baidu.editor.ui.Stateful,o=baidu.editor.ui.SplitButton=function(e){this.initOptions(e),this.initSplitButton()};o.prototype={popup:null,uiName:"splitbutton",title:"",initSplitButton:function(){this.initUIBase(),this.Stateful_init();if(null!=this.popup){var e=this.popup;this.popup=null,this.setPopup(e)}},_UIBase_postRender:i.prototype.postRender,postRender:function(){this.Stateful_postRender(),this._UIBase_postRender()},setPopup:function(i){this.popup!==i&&(null!=this.popup&&this.popup.dispose(),i.addListener("show",e.bind(this._onPopupShow,this)),i.addListener("hide",e.bind(this._onPopupHide,this)),i.addListener("postrender",e.bind(function(){i.getDom("body").appendChild(t.createElementByHtml('<div id="'+this.popup.id+'_bordereraser" class="edui-bordereraser edui-background" style="width:'+(t.getClientRect(this.getDom()).width+20)+'px"></div>')),i.getDom().className+=" "+this.className},this)),this.popup=i)},_onPopupShow:function(){this.addState("opened")},_onPopupHide:function(){this.removeState("opened")},getHtmlTpl:function(){return'<div id="##" class="edui-box %%"><div '+(this.title?'title="'+this.title+'"':"")+' id="##_state" stateful><div class="%%-body"><div id="##_button_body" class="edui-box edui-button-body" onclick="$$._onButtonClick(event, this);"><div class="edui-box edui-icon"></div></div><div class="edui-box edui-splitborder"></div><div class="edui-box edui-arrow" onclick="$$._onArrowClick();"></div></div></div></div>'},showPopup:function(){var e=t.getClientRect(this.getDom());e.top-=this.popup.SHADOW_RADIUS,e.height+=this.popup.SHADOW_RADIUS,this.popup.showAnchorRect(e)},_onArrowClick:function(){this.isDisabled()||this.showPopup()},_onButtonClick:function(){this.isDisabled()||this.fireEvent("buttonclick")}},e.inherits(o,i),e.extend(o.prototype,n,!0)}(),function(){var e=baidu.editor.utils,t=baidu.editor.ui.UIBase,i=baidu.editor.ui.AutoTypeSetPicker=function(e){this.initOptions(e),this.initAutoTypeSetPicker()};i.prototype={initAutoTypeSetPicker:function(){this.initUIBase()},getHtmlTpl:function(){var e=this.editor,t=e.options.autotypeset,i=e.getLang("autoTypeSet"),n="textAlignValue"+e.uid,o="imageBlockLineValue"+e.uid,r="symbolConverValue"+e.uid;return'<div id="##" class="edui-autotypesetpicker %%"><div class="edui-autotypesetpicker-body"><table ><tr><td nowrap><input type="checkbox" name="mergeEmptyline" '+(t.mergeEmptyline?"checked":"")+">"+i.mergeLine+'</td><td colspan="2"><input type="checkbox" name="removeEmptyline" '+(t.removeEmptyline?"checked":"")+">"+i.delLine+'</td></tr><tr><td nowrap><input type="checkbox" name="removeClass" '+(t.removeClass?"checked":"")+">"+i.removeFormat+'</td><td colspan="2"><input type="checkbox" name="indent" '+(t.indent?"checked":"")+">"+i.indent+'</td></tr><tr><td nowrap><input type="checkbox" name="textAlign" '+(t.textAlign?"checked":"")+">"+i.alignment+'</td><td colspan="2" id="'+n+'"><input type="radio" name="'+n+'" value="left" '+(t.textAlign&&"left"==t.textAlign?"checked":"")+">"+e.getLang("justifyleft")+'<input type="radio" name="'+n+'" value="center" '+(t.textAlign&&"center"==t.textAlign?"checked":"")+">"+e.getLang("justifycenter")+'<input type="radio" name="'+n+'" value="right" '+(t.textAlign&&"right"==t.textAlign?"checked":"")+">"+e.getLang("justifyright")+'</td></tr><tr><td nowrap><input type="checkbox" name="imageBlockLine" '+(t.imageBlockLine?"checked":"")+">"+i.imageFloat+'</td><td nowrap id="'+o+'"><input type="radio" name="'+o+'" value="none" '+(t.imageBlockLine&&"none"==t.imageBlockLine?"checked":"")+">"+e.getLang("default")+'<input type="radio" name="'+o+'" value="left" '+(t.imageBlockLine&&"left"==t.imageBlockLine?"checked":"")+">"+e.getLang("justifyleft")+'<input type="radio" name="'+o+'" value="center" '+(t.imageBlockLine&&"center"==t.imageBlockLine?"checked":"")+">"+e.getLang("justifycenter")+'<input type="radio" name="'+o+'" value="right" '+(t.imageBlockLine&&"right"==t.imageBlockLine?"checked":"")+">"+e.getLang("justifyright")+'</td></tr><tr><td nowrap><input type="checkbox" name="clearFontSize" '+(t.clearFontSize?"checked":"")+">"+i.removeFontsize+'</td><td colspan="2"><input type="checkbox" name="clearFontFamily" '+(t.clearFontFamily?"checked":"")+">"+i.removeFontFamily+'</td></tr><tr><td nowrap colspan="3"><input type="checkbox" name="removeEmptyNode" '+(t.removeEmptyNode?"checked":"")+">"+i.removeHtml+'</td></tr><tr><td nowrap colspan="3"><input type="checkbox" name="pasteFilter" '+(t.pasteFilter?"checked":"")+">"+i.pasteFilter+'</td></tr><tr><td nowrap><input type="checkbox" name="symbolConver" '+(t.bdc2sb||t.tobdc?"checked":"")+">"+i.symbol+'</td><td id="'+r+'"><input type="radio" name="bdc" value="bdc2sb" '+(t.bdc2sb?"checked":"")+">"+i.bdc2sb+'<input type="radio" name="bdc" value="tobdc" '+(t.tobdc?"checked":"")+">"+i.tobdc+'</td><td nowrap align="right"><button >'+i.run+"</button></td></tr></table></div></div>"},_UIBase_render:t.prototype.render},e.inherits(i,t)}(),function(){function e(e){for(var i,n={},o=e.getDom(),r=e.editor.uid,a=null,s=null,l=domUtils.getElementsByTagName(o,"input"),d=l.length-1;i=l[d--];)if(a=i.getAttribute("type"),"checkbox"==a)if(s=i.getAttribute("name"),n[s]&&delete n[s],i.checked){var c=document.getElementById(s+"Value"+r);if(c){if(/input/gi.test(c.tagName))n[s]=c.value;else for(var u,m=c.getElementsByTagName("input"),p=m.length-1;u=m[p--];)if(u.checked){n[s]=u.value;break}}else n[s]=!0}else n[s]=!1;else n[i.getAttribute("value")]=i.checked;for(var h,f=domUtils.getElementsByTagName(o,"select"),d=0;h=f[d++];){var g=h.getAttribute("name");n[g]=n[g]?h.value:""}t.extend(e.editor.options.autotypeset,n),e.editor.setPreferences("autotypeset",n)}var t=baidu.editor.utils,i=baidu.editor.ui.Popup,n=baidu.editor.ui.AutoTypeSetPicker,o=baidu.editor.ui.SplitButton,r=baidu.editor.ui.AutoTypeSetButton=function(e){this.initOptions(e),this.initAutoTypeSetButton()};r.prototype={initAutoTypeSetButton:function(){var t=this;this.popup=new i({content:new n({editor:t.editor}),editor:t.editor,hide:function(){!this._hidden&&this.getDom()&&(e(this),this.getDom().style.display="none",this._hidden=!0,this.fireEvent("hide"))}});var o=0;this.popup.addListener("postRenderAfter",function(){var i=this;if(!o){var n=this.getDom(),r=n.getElementsByTagName("button")[0];r.onclick=function(){e(i),t.editor.execCommand("autotypeset"),i.hide()},domUtils.on(n,"click",function(n){var o=n.target||n.srcElement,r=t.editor.uid;if(o&&"INPUT"==o.tagName){if("imageBlockLine"==o.name||"textAlign"==o.name||"symbolConver"==o.name)for(var a=o.checked,s=document.getElementById(o.name+"Value"+r),l=s.getElementsByTagName("input"),d={imageBlockLine:"none",textAlign:"left",symbolConver:"tobdc"},c=0;c<l.length;c++)a?l[c].value==d[o.name]&&(l[c].checked="checked"):l[c].checked=!1;if(o.name=="imageBlockLineValue"+r||o.name=="textAlignValue"+r||"bdc"==o.name){var u=o.parentNode.previousSibling.getElementsByTagName("input");u&&(u[0].checked=!0)}e(i)}}),o=1}}),this.initSplitButton()}},t.inherits(r,o)}(),function(){var e=baidu.editor.utils,t=baidu.editor.ui.uiUtils,i=baidu.editor.ui.UIBase,n=baidu.editor.ui.Toolbar=function(e){this.initOptions(e),this.initToolbar()};n.prototype={items:null,initToolbar:function(){this.items=this.items||[],this.initUIBase()},add:function(e,t){void 0===t?this.items.push(e):this.items.splice(t,0,e)},getHtmlTpl:function(){for(var e=[],t=0;t<this.items.length;t++)e[t]=this.items[t].renderHtml();return'<div id="##" class="edui-toolbar %%" onselectstart="return false;" onmousedown="return $$._onMouseDown(event, this);">'+e.join("")+"</div>"},postRender:function(){for(var e=this.getDom(),i=0;i<this.items.length;i++)this.items[i].postRender();t.makeUnselectable(e)},_onMouseDown:function(e){var t=e.target||e.srcElement,i=t&&t.tagName&&t.tagName.toLowerCase();
return"input"==i||"object"==i||"object"==i?!1:void 0}},e.inherits(n,i)}(),function(){var e=baidu.editor.utils,t=baidu.editor.dom.domUtils,i=baidu.editor.ui.uiUtils,n=baidu.editor.ui.UIBase,o=baidu.editor.ui.Popup,r=baidu.editor.ui.Stateful,a=baidu.editor.ui.CellAlignPicker,s=baidu.editor.ui.Menu=function(e){this.initOptions(e),this.initMenu()},l={renderHtml:function(){return'<div class="edui-menuitem edui-menuseparator"><div class="edui-menuseparator-inner"></div></div>'},postRender:function(){},queryAutoHide:function(){return!0}};s.prototype={items:null,uiName:"menu",initMenu:function(){this.items=this.items||[],this.initPopup(),this.initItems()},initItems:function(){for(var e=0;e<this.items.length;e++){var t=this.items[e];"-"==t?this.items[e]=this.getSeparator():t instanceof d||(t.editor=this.editor,t.theme=this.editor.options.theme,this.items[e]=this.createItem(t))}},getSeparator:function(){return l},createItem:function(e){return e.menu=this,new d(e)},_Popup_getContentHtmlTpl:o.prototype.getContentHtmlTpl,getContentHtmlTpl:function(){if(0==this.items.length)return this._Popup_getContentHtmlTpl();for(var e=[],t=0;t<this.items.length;t++){var i=this.items[t];e[t]=i.renderHtml()}return'<div class="%%-body">'+e.join("")+"</div>"},_Popup_postRender:o.prototype.postRender,postRender:function(){for(var e=this,n=0;n<this.items.length;n++){var o=this.items[n];o.ownerMenu=this,o.postRender()}t.on(this.getDom(),"mouseover",function(t){t=t||event;var n=t.relatedTarget||t.fromElement,o=e.getDom();i.contains(o,n)||o===n||e.fireEvent("over")}),this._Popup_postRender()},queryAutoHide:function(e){if(e){if(i.contains(this.getDom(),e))return!1;for(var t=0;t<this.items.length;t++){var n=this.items[t];if(n.queryAutoHide(e)===!1)return!1}}},clearItems:function(){for(var e=0;e<this.items.length;e++){var t=this.items[e];clearTimeout(t._showingTimer),clearTimeout(t._closingTimer),t.subMenu&&t.subMenu.destroy()}this.items=[]},destroy:function(){this.getDom()&&t.remove(this.getDom()),this.clearItems()},dispose:function(){this.destroy()}},e.inherits(s,o);var d=baidu.editor.ui.MenuItem=function(e){if(this.initOptions(e),this.initUIBase(),this.Stateful_init(),this.subMenu&&!(this.subMenu instanceof s))if(e.className&&-1!=e.className.indexOf("aligntd")){var i=this;this.subMenu.selected=this.editor.queryCommandValue("cellalignment"),this.subMenu=new o({content:new a(this.subMenu),parentMenu:i,editor:i.editor,destroy:function(){this.getDom()&&t.remove(this.getDom())}}),this.subMenu.addListener("postRenderAfter",function(){t.on(this.getDom(),"mouseover",function(){i.addState("opened")})})}else this.subMenu=new s(this.subMenu)};d.prototype={label:"",subMenu:null,ownerMenu:null,uiName:"menuitem",alwalysHoverable:!0,getHtmlTpl:function(){return'<div id="##" class="%%" stateful onclick="$$._onClick(event, this);"><div class="%%-body">'+this.renderLabelHtml()+"</div></div>"},postRender:function(){var e=this;this.addListener("over",function(){e.ownerMenu.fireEvent("submenuover",e),e.subMenu&&e.delayShowSubMenu()}),this.subMenu&&(this.getDom().className+=" edui-hassubmenu",this.subMenu.render(),this.addListener("out",function(){e.delayHideSubMenu()}),this.subMenu.addListener("over",function(){clearTimeout(e._closingTimer),e._closingTimer=null,e.addState("opened")}),this.ownerMenu.addListener("hide",function(){e.hideSubMenu()}),this.ownerMenu.addListener("submenuover",function(t,i){i!==e&&e.delayHideSubMenu()}),this.subMenu._bakQueryAutoHide=this.subMenu.queryAutoHide,this.subMenu.queryAutoHide=function(t){return t&&i.contains(e.getDom(),t)?!1:this._bakQueryAutoHide(t)}),this.getDom().style.tabIndex="-1",i.makeUnselectable(this.getDom()),this.Stateful_postRender()},delayShowSubMenu:function(){var e=this;e.isDisabled()||(e.addState("opened"),clearTimeout(e._showingTimer),clearTimeout(e._closingTimer),e._closingTimer=null,e._showingTimer=setTimeout(function(){e.showSubMenu()},250))},delayHideSubMenu:function(){var e=this;e.isDisabled()||(e.removeState("opened"),clearTimeout(e._showingTimer),e._closingTimer||(e._closingTimer=setTimeout(function(){e.hasState("opened")||e.hideSubMenu(),e._closingTimer=null},400)))},renderLabelHtml:function(){return'<div class="edui-arrow"></div><div class="edui-box edui-icon"></div><div class="edui-box edui-label %%-label">'+(this.label||"")+"</div>"},getStateDom:function(){return this.getDom()},queryAutoHide:function(e){return this.subMenu&&this.hasState("opened")?this.subMenu.queryAutoHide(e):void 0},_onClick:function(e,t){this.hasState("disabled")||this.fireEvent("click",e,t)!==!1&&(this.subMenu?this.showSubMenu():o.postHide(e))},showSubMenu:function(){var e=i.getClientRect(this.getDom());e.right-=5,e.left+=2,e.width-=7,e.top-=4,e.bottom+=4,e.height+=8,this.subMenu.showAnchorRect(e,!0,!0)},hideSubMenu:function(){this.subMenu.hide()}},e.inherits(d,n),e.extend(d.prototype,r,!0)}(),function(){var e=baidu.editor.utils,t=baidu.editor.ui.uiUtils,i=baidu.editor.ui.Menu,n=baidu.editor.ui.SplitButton,o=baidu.editor.ui.Combox=function(e){this.initOptions(e),this.initCombox()};o.prototype={uiName:"combox",onbuttonclick:function(){this.showPopup()},initCombox:function(){var e=this;this.items=this.items||[];for(var t=0;t<this.items.length;t++){var n=this.items[t];n.uiName="listitem",n.index=t,n.onclick=function(){e.selectByIndex(this.index)}}this.popup=new i({items:this.items,uiName:"list",editor:this.editor,captureWheel:!0,combox:this}),this.initSplitButton()},_SplitButton_postRender:n.prototype.postRender,postRender:function(){this._SplitButton_postRender(),this.setLabel(this.label||""),this.setValue(this.initValue||"")},showPopup:function(){var e=t.getClientRect(this.getDom());e.top+=1,e.bottom-=1,e.height-=2,this.popup.showAnchorRect(e)},getValue:function(){return this.value},setValue:function(e){var t=this.indexByValue(e);-1!=t?(this.selectedIndex=t,this.setLabel(this.items[t].label),this.value=this.items[t].value):(this.selectedIndex=-1,this.setLabel(this.getLabelForUnknowValue(e)),this.value=e)},setLabel:function(e){this.getDom("button_body").innerHTML=e,this.label=e},getLabelForUnknowValue:function(e){return e},indexByValue:function(e){for(var t=0;t<this.items.length;t++)if(e==this.items[t].value)return t;return-1},getItem:function(e){return this.items[e]},selectByIndex:function(e){e<this.items.length&&this.fireEvent("select",e)!==!1&&(this.selectedIndex=e,this.value=this.items[e].value,this.setLabel(this.items[e].label))}},e.inherits(o,n)}(),function(){var e,t,i,n=baidu.editor.utils,o=baidu.editor.dom.domUtils,r=baidu.editor.ui.uiUtils,a=baidu.editor.ui.Mask,s=baidu.editor.ui.UIBase,l=baidu.editor.ui.Button,d=baidu.editor.ui.Dialog=function(e){if(e.name){var t=e.name,i=e.cssRules;e.className||(e.className="edui-for-"+t),i&&(e.cssRules=".edui-default .edui-for-"+t+" .edui-dialog-content  {"+i+"}")}this.initOptions(n.extend({autoReset:!0,draggable:!0,onok:function(){},oncancel:function(){},onclose:function(e,t){return t?this.onok():this.oncancel()},holdScroll:!1},e)),this.initDialog()};d.prototype={draggable:!1,uiName:"dialog",initDialog:function(){var o=this,r=this.editor.options.theme;if(this.cssRules&&n.cssRule("edui-customize-"+this.name+"-style",this.cssRules),this.initUIBase(),this.modalMask=e||(e=new a({className:"edui-dialog-modalmask",theme:r,onclick:function(){i&&i.close(!1)}})),this.dragMask=t||(t=new a({className:"edui-dialog-dragmask",theme:r})),this.closeButton=new l({className:"edui-dialog-closebutton",title:o.closeDialog,theme:r,onclick:function(){o.close(!1)}}),this.fullscreen&&this.initResizeEvent(),this.buttons)for(var s=0;s<this.buttons.length;s++)this.buttons[s]instanceof l||(this.buttons[s]=new l(n.extend(this.buttons[s],{editor:this.editor},!0)))},initResizeEvent:function(){var e=this;o.on(window,"resize",function(){e._hidden||void 0===e._hidden||(e.__resizeTimer&&window.clearTimeout(e.__resizeTimer),e.__resizeTimer=window.setTimeout(function(){e.__resizeTimer=null;var t=e.getDom(),i=e.getDom("content"),n=UE.ui.uiUtils.getClientRect(t),o=UE.ui.uiUtils.getClientRect(i),a=r.getViewportRect();i.style.width=a.width-n.width+o.width+"px",i.style.height=a.height-n.height+o.height+"px",t.style.width=a.width+"px",t.style.height=a.height+"px",e.fireEvent("resize")},100))})},fitSize:function(){var e=this.getDom("body"),t=this.mesureSize();return e.style.width=t.width+"px",e.style.height=t.height+"px",t},safeSetOffset:function(e){var t=this,i=t.getDom(),n=r.getViewportRect(),o=r.getClientRect(i),a=e.left;a+o.width>n.right&&(a=n.right-o.width);var s=e.top;s+o.height>n.bottom&&(s=n.bottom-o.height),i.style.left=Math.max(a,0)+"px",i.style.top=Math.max(s,0)+"px"},showAtCenter:function(){var e=r.getViewportRect();if(this.fullscreen){var t=this.getDom(),i=this.getDom("content");t.style.display="block";var n=UE.ui.uiUtils.getClientRect(t),a=UE.ui.uiUtils.getClientRect(i);t.style.left="-100000px",i.style.width=e.width-n.width+a.width+"px",i.style.height=e.height-n.height+a.height+"px",t.style.width=e.width+"px",t.style.height=e.height+"px",t.style.left=0,this._originalContext={html:{overflowX:document.documentElement.style.overflowX,overflowY:document.documentElement.style.overflowY},body:{overflowX:document.body.style.overflowX,overflowY:document.body.style.overflowY}},document.documentElement.style.overflowX="hidden",document.documentElement.style.overflowY="hidden",document.body.style.overflowX="hidden",document.body.style.overflowY="hidden"}else{this.getDom().style.display="";var s=this.fitSize(),l=0|this.getDom("titlebar").offsetHeight,d=e.width/2-s.width/2,c=e.height/2-(s.height-l)/2-l,u=this.getDom();this.safeSetOffset({left:Math.max(0|d,0),top:Math.max(0|c,0)}),o.hasClass(u,"edui-state-centered")||(u.className+=" edui-state-centered")}this._show()},getContentHtml:function(){var e="";return"string"==typeof this.content?e=this.content:this.iframeUrl&&(e=(this.isPopup?'<div class="edui-iknow-arrow"></div>':"")+'<span id="'+this.id+'_contmask" class="dialogcontmask"></span><iframe id="'+this.id+'_iframe" class="%%-iframe" height="100%" width="100%" frameborder="0" src="'+this.iframeUrl+'"></iframe>'),e},getHtmlTpl:function(){var e="";if(this.buttons){for(var t=[],i=0;i<this.buttons.length;i++)t[i]=this.buttons[i].renderHtml();e='<div class="%%-foot"><div id="##_buttons" class="%%-buttons">'+t.join("")+"</div></div>"}return'<div id="##" class="%%"><div '+(this.fullscreen?'class="%%-wrap edui-dialog-fullscreen-flag"':'class="%%"')+'><div id="##_body" class="%%-body"><div class="%%-shadow"></div><div id="##_titlebar" class="%%-titlebar"><div class="%%-draghandle" onmousedown="$$._onTitlebarMouseDown(event, this);"><span class="%%-caption">'+(this.title||"")+"</span></div>"+this.closeButton.renderHtml()+'</div><div id="##_content" class="%%-content">'+(this.autoReset?"":this.getContentHtml())+"</div>"+e+"</div></div></div>"},postRender:function(){var e=this;if(this.modalMask.getDom()||(this.modalMask.render(),this.modalMask.hide()),this.isPopup?(this.modalMask.getDom().style.opacity=0,this.modalMask.getDom().style.filter="alpha(opacity = 0)"):(this.modalMask.getDom().style.opacity=.3,this.modalMask.getDom().style.filter="alpha(opacity = 30)"),this.addListener("show",function(){e.modalMask.show(this.getDom().style.zIndex-2)}),this.addListener("hide",function(){e.modalMask.hide()}),this.dragMask.getDom()||(this.dragMask.render(),this.dragMask.hide()),this.buttons)for(var t=0;t<this.buttons.length;t++)this.buttons[t].postRender();o.on(window,"resize",function(){setTimeout(function(){e.isHidden()||e.safeSetOffset(r.getClientRect(e.getDom()))})}),this._hide()},mesureSize:function(){var e=this.getDom("body"),t=r.getClientRect(this.getDom("content")).width,i=e.style;return i.width=t,r.getClientRect(e)},_onTitlebarMouseDown:function(e){if(this.draggable){var t,i=(r.getViewportRect(),this);r.startDrag(e,{ondragstart:function(){t=r.getClientRect(i.getDom()),i.getDom("contmask").style.visibility="visible",i.dragMask.show(i.getDom().style.zIndex-1)},ondragmove:function(e,n){var o=t.left+e,r=t.top+n;i.safeSetOffset({left:o,top:r})},ondragstop:function(){i.getDom("contmask").style.visibility="hidden",o.removeClasses(i.getDom(),["edui-state-centered"]),i.dragMask.hide()}})}},reset:function(){this.getDom("content").innerHTML=this.getContentHtml(),this.fireEvent("dialogafterreset")},_show:function(){var e=r.getFixedLayer();this._hidden&&(this.getDom().style.display="",this.editor.container.style.zIndex&&(this.getDom().style.zIndex=10*this.editor.container.style.zIndex+10),this._hidden=!1,this.fireEvent("show"),e.style.zIndex=this.getDom().style.zIndex-4,this.isPopup&&(e.style.position="absolute",this.reRend()),this.templateOpen=!0)},isHidden:function(){return this._hidden},_hide:function(){if(!this._hidden){var e=r.getFixedLayer();this.isPopup&&(e.style.position="fixed");var t=this.getDom();t.style.display="none",t.style.zIndex="",t.style.width="",t.style.height="",this._hidden=!0,this.fireEvent("hide"),this.templateOpen=!1}},open:function(){if(this.autoReset)try{this.reset()}catch(e){this.render(),this.open()}if(this.computerPosition(),this.iframeUrl)try{this.getDom("iframe").focus()}catch(t){}i=this},reRend:function(){var e=this,t=e.getDom(),i=e.editor.ui.getDom("toolbarbox"),a=n.getElementsByClass(i,this.className);if(a&&a.length){var s=o.getXY(a[0]),l=r.getClientRect(a[0]),d=e.getDom("content").offsetWidth;s.y+=37,s.x=s.x+l.width/2-d/2,t.style.left=Math.max(s.x,0)+"px",t.style.top=Math.max(s.y,0)+"px"}},computerPosition:function(){this.isPopup?this._show():this.showAtCenter()},_onCloseButtonClick:function(){this.close(!1)},close:function(e){if(this.fireEvent("close",e)!==!1){this.fullscreen&&(document.documentElement.style.overflowX=this._originalContext.html.overflowX,document.documentElement.style.overflowY=this._originalContext.html.overflowY,document.body.style.overflowX=this._originalContext.body.overflowX,document.body.style.overflowY=this._originalContext.body.overflowY,delete this._originalContext),this._hide();var t=this.getDom("content"),i=this.getDom("iframe");if(t&&i){var n=i.contentDocument||i.contentWindow.document;n&&(n.body.innerHTML=""),o.remove(t)}}}},n.inherits(d,s)}(),function(){var e=baidu.editor.utils,t=baidu.editor.ui.Menu,i=baidu.editor.ui.SplitButton,n=baidu.editor.ui.MenuButton=function(e){this.initOptions(e),this.initMenuButton()};n.prototype={initMenuButton:function(){var e=this;this.uiName="menubutton",this.popup=new t({items:e.items,className:e.className,editor:e.editor}),this.popup.addListener("show",function(){for(var t=this,i=0;i<t.items.length;i++)t.items[i].removeState("checked"),t.items[i].value==e._value&&(t.items[i].addState("checked"),this.value=e._value)}),this.initSplitButton()},setValue:function(e){this._value=e}},e.inherits(n,i)}(),function(){var e=baidu.editor.utils,t=baidu.editor.ui.Popup,i=baidu.editor.ui.SplitButton,n=baidu.editor.ui.MultiMenuPop=function(e){this.initOptions(e),this.initMultiMenu()};n.prototype={initMultiMenu:function(){var e=this;this.popup=new t({content:"",editor:e.editor,iframe_rendered:!1,onshow:function(){this.iframe_rendered||(this.iframe_rendered=!0,this.getDom("content").innerHTML='<iframe id="'+e.id+'_iframe" src="'+e.iframeUrl+'" frameborder="0"></iframe>',e.editor.container.style.zIndex&&(this.getDom().style.zIndex=1*e.editor.container.style.zIndex+1))}}),this.onbuttonclick=function(){this.showPopup()},this.initSplitButton()}},e.inherits(n,i)}(),function(){function e(e){var t=e.target||e.srcElement,i=a.findParent(t,function(e){return a.hasClass(e,"edui-shortcutmenu")||a.hasClass(e,"edui-popup")},!0);if(!i)for(var n,o=0;n=s[o++];)n.hide()}var t,i=baidu.editor.ui,n=i.UIBase,o=i.uiUtils,r=baidu.editor.utils,a=baidu.editor.dom.domUtils,s=[],l=!1,d=i.ShortCutMenu=function(e){this.initOptions(e),this.initShortCutMenu()};d.postHide=e,d.prototype={isHidden:!0,SPACE:5,initShortCutMenu:function(){this.items=this.items||[],this.initUIBase(),this.initItems(),this.initEvent(),s.push(this)},initEvent:function(){var e=this,i=e.editor.document;a.on(i,"mousemove",function(i){if(e.isHidden===!1){if(e.getSubMenuMark()||"contextmenu"==e.eventType)return;var n=!0,o=e.getDom(),r=o.offsetWidth,a=o.offsetHeight,s=r/2+e.SPACE,l=a/2,d=Math.abs(i.screenX-e.left),c=Math.abs(i.screenY-e.top);clearTimeout(t),t=setTimeout(function(){c>0&&l>c?e.setOpacity(o,"1"):c>l&&l+70>c?(e.setOpacity(o,"0.5"),n=!1):c>l+70&&l+140>c&&e.hide(),n&&d>0&&s>d?e.setOpacity(o,"1"):d>s&&s+70>d?e.setOpacity(o,"0.5"):d>s+70&&s+140>d&&e.hide()})}}),browser.chrome&&a.on(i,"mouseout",function(t){var i=t.relatedTarget||t.toElement;(null==i||"HTML"==i.tagName)&&e.hide()}),e.editor.addListener("afterhidepop",function(){e.isHidden||(l=!0)})},initItems:function(){if(r.isArray(this.items))for(var e=0,t=this.items.length;t>e;e++){var n=this.items[e].toLowerCase();i[n]&&(this.items[e]=new i[n](this.editor),this.items[e].className+=" edui-shortcutsubmenu ")}},setOpacity:function(e,t){browser.ie&&browser.version<9?e.style.filter="alpha(opacity = "+100*parseFloat(t)+");":e.style.opacity=t},getSubMenuMark:function(){l=!1;for(var e,t=o.getFixedLayer(),i=a.getElementsByTagName(t,"div",function(e){return a.hasClass(e,"edui-shortcutsubmenu edui-popup")}),n=0;e=i[n++];)"none"!=e.style.display&&(l=!0);return l},show:function(e,t){function i(e){e.left<0&&(e.left=0),e.top<0&&(e.top=0),l.style.cssText="position:absolute;left:"+e.left+"px;top:"+e.top+"px;"}function n(e){e.tagName||(e=e.getDom()),s.left=parseInt(e.style.left),s.top=parseInt(e.style.top),s.top-=l.offsetHeight+15,i(s)}var r=this,s={},l=this.getDom(),d=o.getFixedLayer();if(r.eventType=e.type,l.style.cssText="display:block;left:-9999px","contextmenu"==e.type&&t){var c=a.getElementsByTagName(d,"div","edui-contextmenu")[0];c?n(c):r.editor.addListener("aftershowcontextmenu",function(e,t){n(t)})}else s=o.getViewportOffsetByEvent(e),s.top-=l.offsetHeight+r.SPACE,s.left+=r.SPACE+20,i(s),r.setOpacity(l,.2);r.isHidden=!1,r.left=e.screenX+l.offsetWidth/2-r.SPACE,r.top=e.screenY-l.offsetHeight/2-r.SPACE,r.editor&&(l.style.zIndex=1*r.editor.container.style.zIndex+10,d.style.zIndex=l.style.zIndex-1)},hide:function(){this.getDom()&&(this.getDom().style.display="none"),this.isHidden=!0},postRender:function(){if(r.isArray(this.items))for(var e,t=0;e=this.items[t++];)e.postRender()},getHtmlTpl:function(){var e;if(r.isArray(this.items)){e=[];for(var t=0;t<this.items.length;t++)e[t]=this.items[t].renderHtml();e=e.join("")}else e=this.items;return'<div id="##" class="%% edui-toolbar" data-src="shortcutmenu" onmousedown="return false;" onselectstart="return false;" >'+e+"</div>"}},r.inherits(d,n),a.on(document,"mousedown",function(t){e(t)}),a.on(window,"scroll",function(t){e(t)})}(),function(){var e=baidu.editor.utils,t=baidu.editor.dom.domUtils,i=baidu.editor.ui.UIBase,n=baidu.editor.ui.Message=function(e){this.initOptions(e),this.initMessage()};n.prototype={initMessage:function(){this.initUIBase()},getHtmlTpl:function(){return'<div id="##" class="edui-message %%"> <div id="##_closer" class="edui-message-closer">\xd7</div> <div id="##_body" class="edui-message-body edui-message-type-info"> <iframe style="position:absolute;z-index:-1;left:0;top:0;background-color: transparent;" frameborder="0" width="100%" height="100%" src="about:blank"></iframe> <div class="edui-shadow"></div> <div id="##_content" class="edui-message-content">  </div> </div></div>'},reset:function(e){var t=this;e.keepshow||(clearTimeout(this.timer),t.timer=setTimeout(function(){t.hide()},e.timeout||4e3)),void 0!==e.content&&t.setContent(e.content),void 0!==e.type&&t.setType(e.type),t.show()},postRender:function(){var e=this,i=this.getDom("closer");i&&t.on(i,"click",function(){e.hide()})},setContent:function(e){this.getDom("content").innerHTML=e},setType:function(e){e=e||"info";var t=this.getDom("body");t.className=t.className.replace(/edui-message-type-[\w-]+/,"edui-message-type-"+e)},getContent:function(){return this.getDom("content").innerHTML},getType:function(){var e=this.getDom("body").match(/edui-message-type-([\w-]+)/);return e?e[1]:""},show:function(){this.getDom().style.display="block"},hide:function(){var e=this.getDom();e&&(e.style.display="none",e.parentNode&&e.parentNode.removeChild(e))}},e.inherits(n,i)}(),function(){var e=UE.log=require("common:widget/js/util/log/log"),t=baidu.editor.utils,i=baidu.editor.ui,n=i.Dialog;i.buttons={},i.Dialog=function(e){var t=new n(e);return t.addListener("hide",function(){if(t.editor){var e=t.editor;try{if(browser.gecko){var i=e.window.scrollY,n=e.window.scrollX;e.body.focus(),e.window.scrollTo(n,i)}else e.focus()}catch(o){}}}),t};for(var o,r={anchor:"~/dialogs/anchor/anchor.html",insertimage:"~/dialogs/image/image.html",link:"~/dialogs/link/link.html",spechars:"~/dialogs/spechars/spechars.html",searchreplace:"~/dialogs/searchreplace/searchreplace.html",map:"~/dialogs/map/map.html",gmap:"~/dialogs/gmap/gmap.html",insertvideo:"~/dialogs/video/video.html",help:"~/dialogs/help/help.html",preview:"~/dialogs/preview/preview.html",emotion:"~/dialogs/emotion/emotion.html",wordimage:"~/dialogs/wordimage/wordimage.html",attachment:"~/dialogs/attachment/attachment.html",insertframe:"~/dialogs/insertframe/insertframe.html",edittip:"~/dialogs/table/edittip.html",edittable:"~/dialogs/table/edittable.html",edittd:"~/dialogs/table/edittd.html",webapp:"~/dialogs/webapp/webapp.html",snapscreen:"~/dialogs/snapscreen/snapscreen.html",scrawl:"~/dialogs/scrawl/scrawl.html",music:"~/dialogs/music/music.html",template:"~/dialogs/template/template.html",background:"~/dialogs/background/background.html",charts:"~/dialogs/charts/charts.html"},a=["undo","redo","formatmatch","bold","italic","underline","fontborder","touppercase","tolowercase","strikethrough","subscript","superscript","source","indent","outdent","blockquote","pasteplain","pagebreak","selectall","print","horizontal","removeformat","time","date","unlink","insertparagraphbeforetable","insertrow","insertcol","mergeright","mergedown","deleterow","deletecol","splittorows","splittocols","splittocells","mergecells","deletetable","drafts"],s=0;o=a[s++];)o=o.toLowerCase(),i[o]=function(t){return function(n){var o=new i.Button({className:"edui-for-"+t,title:n.options.labelMap[t]||n.getLang("labelMap."+t)||"",onclick:function(){n.execCommand(t),e.send({module:"common",pathname:window.location.pathname,page:"common",area:"ueditor-btn",action:"click",btn:t})},theme:n.options.theme,showText:!1});return i.buttons[t]=o,n.addListener("selectionchange",function(e,i,r){var a=n.queryCommandState(t);-1==a?(o.setDisabled(!0),o.setChecked(!1)):r||(o.setDisabled(!1),o.setChecked(a))}),o}}(o);i.cleardoc=function(e){var t=new i.Button({className:"edui-for-cleardoc",title:e.options.labelMap.cleardoc||e.getLang("labelMap.cleardoc")||"",theme:e.options.theme,onclick:function(){confirm(e.getLang("confirmClear"))&&e.execCommand("cleardoc")}});return i.buttons.cleardoc=t,e.addListener("selectionchange",function(){t.setDisabled(-1==e.queryCommandState("cleardoc"))}),t};var l={justify:["left","right","center","justify"],imagefloat:["none","left","center","right"],directionality:["ltr","rtl"]};for(var d in l)!function(e,t){for(var n,o=0;n=t[o++];)!function(t){i[e.replace("float","")+t]=function(n){var o=new i.Button({className:"edui-for-"+e.replace("float","")+t,title:n.options.labelMap[e.replace("float","")+t]||n.getLang("labelMap."+e.replace("float","")+t)||"",theme:n.options.theme,onclick:function(){n.execCommand(e,t)}});return i.buttons[e]=o,n.addListener("selectionchange",function(i,r,a){o.setDisabled(-1==n.queryCommandState(e)),o.setChecked(n.queryCommandValue(e)==t&&!a)}),o}}(n)}(d,l[d]);for(var o,s=0;o=["backcolor","forecolor"][s++];)i[o]=function(e){return function(t){var n=new i.ColorButton({className:"edui-for-"+e,color:"default",title:t.options.labelMap[e]||t.getLang("labelMap."+e)||"",editor:t,onpickcolor:function(i,n){t.execCommand(e,n)},onpicknocolor:function(){t.execCommand(e,"default"),this.setColor("transparent"),this.color="default"},onbuttonclick:function(){t.execCommand(e,this.color)}});return i.buttons[e]=n,t.addListener("selectionchange",function(){n.setDisabled(-1==t.queryCommandState(e))}),n}}(o);var c={noOk:["searchreplace","help","spechars","webapp","preview"],ok:["attachment","anchor","link","map","gmap","insertframe","wordimage","insertvideo","insertframe","edittip","edittable","edittd","scrawl","template","music","background","charts"]};for(var d in c)!function(n,o){for(var a,s=0;a=o[s++];)browser.opera&&"searchreplace"===a||!function(o){i[o]=function(a,s,l){s=s||(a.options.iframeUrlMap||{})[o]||r[o],l=a.options.labelMap[o]||a.getLang("labelMap."+o)||"";var d,c={link:[{className:"edui-cancelbutton",label:a.getLang("cancel"),editor:a,onclick:function(){d.close(!1)}},{className:"edui-okbutton",label:a.getLang("insertLink"),editor:a,onclick:function(){d.close(!0)}}],template:[{className:"edui-cancelbutton",label:a.getLang("cancel"),editor:a,onclick:function(){d.close(!1),d.templateOpen=!1}},{className:"edui-okbutton",label:a.getLang("insertTemplate"),editor:a,onclick:function(){d.close(!0),d.templateOpen=!1}}],map:[{className:"edui-cancelbutton",label:a.getLang("cancel"),editor:a,onclick:function(){}},{className:"edui-okbutton",label:a.getLang("insertMap"),editor:a,onclick:function(){d.close(!0)}}]};if(s){var u=/link|template|insertvideo/.test(o);u=a.options.cmdSettings&&a.options.cmdSettings[o]&&"undefined"!=typeof a.options.cmdSettings[o].isPopup?a.options.cmdSettings[o].isPopup:u,d=new i.Dialog(t.extend({iframeUrl:a.ui.mapUrl(s),editor:a,isPopup:u,draggable:!u,className:"edui-for-"+o,title:l,holdScroll:"insertimage"===o,fullscreen:/charts|preview/.test(o),closeDialog:a.getLang("closeDialog")},"ok"==n?{buttons:c[o]?c[o]:[{className:"edui-okbutton",label:a.getLang("ok"),editor:a,onclick:function(){d.close(!0)}},{className:"edui-cancelbutton",label:a.getLang("cancel"),editor:a,onclick:function(){d.close(!1)}}]}:{})),a.ui._dialogs[o+"Dialog"]=d}var m=new i.Button({className:"edui-for-"+o,title:l,onclick:function(){if(d){switch(o){case"wordimage":var t=a.execCommand("wordimage");t&&t.length&&(d.render(),d.open());break;case"scrawl":-1!=a.queryCommandState("scrawl")&&(d.render(),d.open());break;case"template":d.templateOpen?(d.close(!1),d.templateOpen=!1):(d.render(),d.open(),d.templateOpen=!0),m.setChecked(!0);break;case"map":d.render(),d.open(),m.setChecked(!0);break;default:d.render(),d.open(),m.setChecked(!0)}e.send({module:"common",pathname:window.location.pathname,page:"common",area:"ueditor-btn",action:"click",btn:o})}},theme:a.options.theme,disabled:"scrawl"==o&&-1==a.queryCommandState("scrawl")||"charts"==o});return i.buttons[o]=m,a.addListener("selectionchange",function(){var e={edittable:1};if(!(o in e)){var t=a.queryCommandState(o);m.getDom()&&(m.setDisabled(-1==t),m.setChecked(t))}}),browser.gecko&&a.addListener("focus",function(){if(/link|insertvideo|map|template/.test(o)){var e=a.queryCommandState(o);m.getDom()&&(m.setDisabled(-1==e),m.setChecked(e))}}),m}}(a.toLowerCase())}(d,c[d]);var u=function(e,i){var n=document.createElement(e);return t.each(i,function(e,t){n[t]=e}),n},m=function(e){return document.getElementById(e)};i.insertimage=function(n,o,a){var s="insertimage";o=o||(n.options.iframeUrlMap||{})[s]||r[s],a=n.options.labelMap[s]||n.getLang("labelMap."+s)||"";var l,d=new i.Button({className:"edui-for-"+s,title:a,onclick:function(){var t=(d.getDom(),m("insertimage-iknowmenu"+n.uid)),i=m("insertimage-iknowmask"+n.uid);t&&"block"===t.style.display?(d.setDisabled(!1),d.setChecked(!1),i.style.display="none",t.style.display="none"):(d.setDisabled(!1),d.setChecked(!0),i.style.display="block",t.style.display="block"),e.send({module:"common",pathname:window.location.pathname,page:"common",area:"ueditor-btn",action:"click",btn:s})},theme:n.options.theme,disabled:!1});return i.buttons[s]=d,o&&(l=new i.Dialog(t.extend({iframeUrl:n.ui.mapUrl(o),editor:n,draggable:!0,className:"edui-for-"+s,title:a,holdScroll:!0,fullscreen:!1,closeDialog:n.getLang("closeDialog")},{buttons:[{className:"edui-cancelbutton",label:n.getLang("cancel"),editor:n,onclick:function(){d.setChecked(!1),l.close(!1)}},{className:"edui-okbutton",label:n.getLang("insertImage"),editor:n,onclick:function(){l.close(!0)}}]})),n.ui._dialogs[s+"Dialog"]=l),n.addListener("ready",function(){var i,o=d.getDom(),r=m("insertimage-iknowmask"+n.uid),a=m("insertimage-iknowmenu"+n.uid);a||(a=u("ul",{id:"insertimage-iknowmenu"+n.uid,className:"insertimage-iknowmenu"}),a.style.zIndex=n.getOpt("zIndex")+20,t.each([{el:u("li",{className:"edui-iknow-arrow"}),type:"arrow"},{el:u("li",{innerHTML:"\u672c\u5730\u56fe\u7247"}),type:"local"},{el:u("li",{className:"edui-iknow-item-line"}),type:"line"},{el:u("li",{innerHTML:"\u56fe\u7247\u94fe\u63a5"}),type:"network"}],function(t){a.appendChild(t.el),domUtils.on(t.el,"click",function(){"local"===t.type||l&&(r.style.display="none",a.style.display="none",l.render(),l.open(),e.send({module:"common",pathname:window.location.pathname,page:"common",area:"ueditor-btn",action:"click",btn:"networkimage"}))}),UE.browser.ie&&"local"===t.type&&(domUtils.on(t.el,"mouseenter",function(){this.style.color="#34B458"}),domUtils.on(t.el,"mouseleave",function(){this.style.color="#323232"})),"local"===t.type&&(i=t.el,i.style.width="97px",i.style.height="40px")}),o.appendChild(a),r=u("div",{id:"insertimage-iknowmask"+n.uid,className:"insertimage-iknowmask"}),r.style.zIndex=n.getOpt("zIndex")+18,domUtils.on(r,"click",function(){d.setDisabled(!1),d.setChecked(!1),a.style.display="none",r.style.display="none",n.focus()}),o.appendChild(r),n.fireEvent("simpleuploadbtnready",i),n.addListener("closeInsertImage",function(){d.setChecked(!1),r.style.display="none",a.style.display="none"}))}),n.addListener("selectionchange",function(){var e=n.queryCommandState(s);d.getDom()&&(d.setDisabled(-1==e),d.setChecked(e))}),d},i.snapscreen=function(e,t,n){n=e.options.labelMap.snapscreen||e.getLang("labelMap.snapscreen")||"";var o=new i.Button({className:"edui-for-snapscreen",title:n,onclick:function(){e.execCommand("snapscreen")},theme:e.options.theme});if(i.buttons.snapscreen=o,t=t||(e.options.iframeUrlMap||{}).snapscreen||r.snapscreen){var a=new i.Dialog({iframeUrl:e.ui.mapUrl(t),editor:e,className:"edui-for-snapscreen",title:n,buttons:[{className:"edui-okbutton",label:e.getLang("ok"),editor:e,onclick:function(){a.close(!0)}},{className:"edui-cancelbutton",label:e.getLang("cancel"),editor:e,onclick:function(){a.close(!1)}}]});a.render(),e.ui._dialogs.snapscreenDialog=a}return e.addListener("selectionchange",function(){o.setDisabled(-1==e.queryCommandState("snapscreen"))}),o},i.insertcode=function(e,n,o){n=e.options.insertcode||[],o=e.options.labelMap.insertcode||e.getLang("labelMap.insertcode")||"";var r=[];t.each(n,function(t,i){r.push({label:t,value:i,theme:e.options.theme,renderLabelHtml:function(){return'<div class="edui-label %%-label" >'+(this.label||"")+"</div>"}})});var a=new i.Combox({editor:e,items:r,onselect:function(t,i){e.execCommand("insertcode",this.items[i].value)},onbuttonclick:function(){this.showPopup()},title:o,initValue:o,className:"edui-for-insertcode",indexByValue:function(e){if(e)for(var t,i=0;t=this.items[i];i++)if(-1!=t.value.indexOf(e))return i;return-1}});return i.buttons.insertcode=a,e.addListener("selectionchange",function(t,i,n){if(!n){var r=e.queryCommandState("insertcode");if(-1==r)a.setDisabled(!0);else{a.setDisabled(!1);var s=e.queryCommandValue("insertcode");if(!s)return void a.setValue(o);s&&(s=s.replace(/['"]/g,"").split(",")[0]),a.setValue(s)}}}),a},i.fontfamily=function(e,n,o){if(n=e.options.fontfamily||[],o=e.options.labelMap.fontfamily||e.getLang("labelMap.fontfamily")||"",n.length){for(var r,a=0,s=[];r=n[a];a++){var l=e.getLang("fontfamily")[r.name]||"";!function(i,n){s.push({label:i,value:n,theme:e.options.theme,renderLabelHtml:function(){return'<div class="edui-label %%-label" style="font-family:'+t.unhtml(this.value)+'">'+(this.label||"")+"</div>"}})}(r.label||l,r.val)}var d=new i.Combox({editor:e,items:s,onselect:function(t,i){e.execCommand("FontFamily",this.items[i].value)
},onbuttonclick:function(){this.showPopup()},title:o,initValue:o,className:"edui-for-fontfamily",indexByValue:function(e){if(e)for(var t,i=0;t=this.items[i];i++)if(-1!=t.value.indexOf(e))return i;return-1}});return i.buttons.fontfamily=d,e.addListener("selectionchange",function(t,i,n){if(!n){var o=e.queryCommandState("FontFamily");if(-1==o)d.setDisabled(!0);else{d.setDisabled(!1);var r=e.queryCommandValue("FontFamily");r&&(r=r.replace(/['"]/g,"").split(",")[0]),d.setValue(r)}}}),d}},i.fontsize=function(e,t,n){if(n=e.options.labelMap.fontsize||e.getLang("labelMap.fontsize")||"",t=t||e.options.fontsize||[],t.length){for(var o=[],r=0;r<t.length;r++){var a=t[r]+"px";o.push({label:a,value:a,theme:e.options.theme,renderLabelHtml:function(){return'<div class="edui-label %%-label" style="line-height:1;font-size:'+this.value+'">'+(this.label||"")+"</div>"}})}var s=new i.Combox({editor:e,items:o,title:n,initValue:n,onselect:function(t,i){e.execCommand("FontSize",this.items[i].value)},onbuttonclick:function(){this.showPopup()},className:"edui-for-fontsize"});return i.buttons.fontsize=s,e.addListener("selectionchange",function(t,i,n){if(!n){var o=e.queryCommandState("FontSize");-1==o?s.setDisabled(!0):(s.setDisabled(!1),s.setValue(e.queryCommandValue("FontSize")))}}),s}},i.paragraph=function(t){var n=new i.Button({className:"edui-for-paragraph",title:t.options.labelMap.paragraph||t.getLang("labelMap.paragraph")||"",theme:t.options.theme,onclick:function(){var i=t.queryCommandValue("paragraph");t.execCommand("paragraph","h2"===i?"p":"h2"),e.send({module:"common",pathname:window.location.pathname,page:"common",area:"ueditor-btn",action:"click",btn:"title"})}});return i.buttons.paragraph=n,t.addListener("selectionchange",function(){var e=t.queryCommandState("paragraph");n.setDisabled(-1==e);var i=t.queryCommandValue("paragraph");n.setChecked("h2"===i)}),n},i.customstyle=function(e){var t=e.options.customstyle||[],n=e.options.labelMap.customstyle||e.getLang("labelMap.customstyle")||"";if(t.length){for(var o,r=e.getLang("customstyle"),a=0,s=[];o=t[a++];)!function(t){var i={};i.label=t.label?t.label:r[t.name],i.style=t.style,i.className=t.className,i.tag=t.tag,s.push({label:i.label,value:i,theme:e.options.theme,renderLabelHtml:function(){return'<div class="edui-label %%-label"><'+i.tag+" "+(i.className?' class="'+i.className+'"':"")+(i.style?' style="'+i.style+'"':"")+">"+i.label+"</"+i.tag+"></div>"}})}(o);var l=new i.Combox({editor:e,items:s,title:n,initValue:n,className:"edui-for-customstyle",onselect:function(t,i){e.execCommand("customstyle",this.items[i].value)},onbuttonclick:function(){this.showPopup()},indexByValue:function(e){for(var t,i=0;t=this.items[i++];)if(t.label==e)return i-1;return-1}});return i.buttons.customstyle=l,e.addListener("selectionchange",function(t,i,n){if(!n){var o=e.queryCommandState("customstyle");if(-1==o)l.setDisabled(!0);else{l.setDisabled(!1);var r=e.queryCommandValue("customstyle"),a=l.indexByValue(r);l.setValue(-1!=a?r:l.initValue)}}}),l}},i.inserttable=function(e,t,n){n=e.options.labelMap.inserttable||e.getLang("labelMap.inserttable")||"";var o=new i.TableButton({editor:e,title:n,className:"edui-for-inserttable",onpicktable:function(t,i,n){e.execCommand("InsertTable",{numRows:n,numCols:i,border:1})},onbuttonclick:function(){this.showPopup()}});return i.buttons.inserttable=o,e.addListener("selectionchange",function(){o.setDisabled(-1==e.queryCommandState("inserttable"))}),o},i.lineheight=function(e){var t=e.options.lineheight||[];if(t.length){for(var n,o=0,r=[];n=t[o++];)r.push({label:n,value:n,theme:e.options.theme,onclick:function(){e.execCommand("lineheight",this.value)}});var a=new i.MenuButton({editor:e,className:"edui-for-lineheight",title:e.options.labelMap.lineheight||e.getLang("labelMap.lineheight")||"",items:r,onbuttonclick:function(){var t=e.queryCommandValue("LineHeight")||this.value;e.execCommand("LineHeight",t)}});return i.buttons.lineheight=a,e.addListener("selectionchange",function(){var t=e.queryCommandState("LineHeight");if(-1==t)a.setDisabled(!0);else{a.setDisabled(!1);var i=e.queryCommandValue("LineHeight");i&&a.setValue((i+"").replace(/cm/,"")),a.setChecked(t)}}),a}};for(var p,h=["top","bottom"],f=0;p=h[f++];)!function(e){i["rowspacing"+e]=function(t){var n=t.options["rowspacing"+e]||[];if(!n.length)return null;for(var o,r=0,a=[];o=n[r++];)a.push({label:o,value:o,theme:t.options.theme,onclick:function(){t.execCommand("rowspacing",this.value,e)}});var s=new i.MenuButton({editor:t,className:"edui-for-rowspacing"+e,title:t.options.labelMap["rowspacing"+e]||t.getLang("labelMap.rowspacing"+e)||"",items:a,onbuttonclick:function(){var i=t.queryCommandValue("rowspacing",e)||this.value;t.execCommand("rowspacing",i,e)}});return i.buttons[e]=s,t.addListener("selectionchange",function(){var i=t.queryCommandState("rowspacing",e);if(-1==i)s.setDisabled(!0);else{s.setDisabled(!1);var n=t.queryCommandValue("rowspacing",e);n&&s.setValue((n+"").replace(/%/,"")),s.setChecked(i)}}),s}}(p);for(var g,v=["insertorderedlist","insertunorderedlist"],b=0;g=v[b++];)!function(t){i[t]=function(n){var o=new i.Button({className:"edui-for-"+t,title:n.getLang("labelMap."+t)||"",theme:n.options.theme,onclick:function(){var i=n.queryCommandValue(t)||this.value;n.execCommand(t,i),e.send({module:"common",pathname:window.location.pathname,page:"common",area:"ueditor-btn",action:"click",btn:t})}});return i.buttons[t]=o,n.addListener("selectionchange",function(){var e=n.queryCommandState(t);o.setDisabled(-1==e),o.setChecked(e)}),o}}(g);i.fullscreen=function(e,t){t=e.options.labelMap.fullscreen||e.getLang("labelMap.fullscreen")||"";var n=new i.Button({className:"edui-for-fullscreen",title:t,theme:e.options.theme,onclick:function(){e.ui&&e.ui.setFullScreen(!e.ui.isFullScreen()),this.setChecked(e.ui.isFullScreen())}});return i.buttons.fullscreen=n,e.addListener("selectionchange",function(){var t=e.queryCommandState("fullscreen");n.setDisabled(-1==t),n.setChecked(e.ui.isFullScreen())}),n},i.emotion=function(e,t){var n="emotion",o=new i.MultiMenuPop({title:e.options.labelMap[n]||e.getLang("labelMap."+n)||"",editor:e,className:"edui-for-"+n,iframeUrl:e.ui.mapUrl(t||(e.options.iframeUrlMap||{})[n]||r[n])});return i.buttons[n]=o,e.addListener("selectionchange",function(){o.setDisabled(-1==e.queryCommandState(n))}),o},i.autotypeset=function(e){var t=new i.AutoTypeSetButton({editor:e,title:e.options.labelMap.autotypeset||e.getLang("labelMap.autotypeset")||"",className:"edui-for-autotypeset",onbuttonclick:function(){e.execCommand("autotypeset")}});return i.buttons.autotypeset=t,e.addListener("selectionchange",function(){t.setDisabled(-1==e.queryCommandState("autotypeset"))}),t},i.simpleupload=function(e){var t="simpleupload",n=new i.Button({className:"edui-for-"+t,title:e.options.labelMap[t]||e.getLang("labelMap."+t)||"",onclick:function(){},theme:e.options.theme,showText:!1});return i.buttons[t]=n,e.addListener("ready",function(){var t=n.getDom("body"),i=t.children[0];e.fireEvent("simpleuploadbtnready",i)}),e.addListener("selectionchange",function(i,o,r){var a=e.queryCommandState(t);-1==a?(n.setDisabled(!0),n.setChecked(!1)):r||(n.setDisabled(!1),n.setChecked(a))}),n}}(),function(){function e(e){this.initOptions(e),this.initEditorUI()}var t=baidu.editor.utils,i=baidu.editor.ui.uiUtils,n=baidu.editor.ui.UIBase,o=baidu.editor.dom.domUtils,r=[];e.prototype={uiName:"editor",initEditorUI:function(){function e(e,t){e.setOpt({wordCount:!0,maximumWords:1e4,wordCountMsg:e.options.wordCountMsg||e.getLang("wordCountMsg"),wordOverFlowMsg:e.options.wordOverFlowMsg||e.getLang("wordOverFlowMsg")});var i=e.options,n=i.maximumWords,o=i.wordCountMsg,r=i.wordOverFlowMsg,a=t.getDom("wordcount");if(i.wordCount){var s=e.getContentLength(!0);s>n?(a.innerHTML=r,e.fireEvent("wordcountoverflow")):(a.innerHTML="",e.options.wordCountNormal&&(a.innerHTML=o.replace("{#leave}",n-s).replace("{#count}",s)))}}this.editor.ui=this,this._dialogs={},this.initUIBase(),this._initToolbars();var t=this.editor,i=this;t.addListener("ready",function(){function n(){e(t,i),o.un(t.document,"click",arguments.callee)}t.getDialog=function(e){return t.ui._dialogs[e+"Dialog"]},o.on(t.window,"scroll",function(e){baidu.editor.ui.Popup.postHide(e)}),t.ui._actualFrameWidth=t.options.initialFrameWidth,UE.browser.ie&&6===UE.browser.version&&t.container.ownerDocument.execCommand("BackgroundImageCache",!1,!0),t.options.elementPathEnabled&&(t.ui.getDom("elementpath").innerHTML='<div class="edui-editor-breadcrumb">'+t.getLang("elementPathTip")+":</div>"),t.options.wordCount&&o.on(t.document,"click",n),t.ui._scale(),t.options.scaleEnabled?(t.autoHeightEnabled&&t.disableAutoHeight(),i.enableScale()):i.disableScale(),t.options.elementPathEnabled||t.options.wordCount||t.options.scaleEnabled||(t.ui.getDom("elementpath").style.display="none",t.ui.getDom("wordcount").style.display="none",t.ui.getDom("scale").style.display="none"),t.selection.isFocus()&&t.fireEvent("selectionchange",!1,!0)}),t.addListener("mousedown",function(e,t){var i=t.target||t.srcElement;baidu.editor.ui.Popup.postHide(t,i),baidu.editor.ui.ShortCutMenu.postHide(t)}),t.addListener("delcells",function(){UE.ui.edittip&&new UE.ui.edittip(t),t.getDialog("edittip").open()});var n,r,a=!1;t.addListener("afterpaste",function(){t.queryCommandState("pasteplain")||(baidu.editor.ui.PastePicker&&(n=new baidu.editor.ui.Popup({content:new baidu.editor.ui.PastePicker({editor:t}),editor:t,className:"edui-wordpastepop"}),n.render()),a=!0)}),t.addListener("afterinserthtml",function(){clearTimeout(r),r=setTimeout(function(){if(n&&(a||t.ui._isTransfer)){if(n.isHidden()){var e=o.createElement(t.document,"span",{style:"line-height:0px;",innerHTML:"\ufeff"}),i=t.selection.getRange();i.insertNode(e);var r=getDomNode(e,"firstChild","previousSibling");r&&n.showAnchor(3==r.nodeType?r.parentNode:r),o.remove(e)}else n.show();delete t.ui._isTransfer,a=!1}},200)}),t.addListener("contextmenu",function(e,t){baidu.editor.ui.Popup.postHide(t)}),t.addListener("keydown",function(e,t){n&&n.dispose(t);var i=t.keyCode||t.which;t.altKey&&90==i&&UE.ui.buttons.fullscreen.onclick()}),t.addListener("wordcount",function(){e(this,i)}),t.addListener("selectionchange",function(){t.options.elementPathEnabled&&i[(-1==t.queryCommandState("elementpath")?"dis":"en")+"ableElementPath"](),t.options.scaleEnabled&&i[(-1==t.queryCommandState("scale")?"dis":"en")+"ableScale"]()});var s=new baidu.editor.ui.Popup({editor:t,content:"",className:"edui-bubble",_onEditButtonClick:function(){this.hide(),t.ui._dialogs.linkDialog.open()},_onImgEditButtonClick:function(e){this.hide(),t.ui._dialogs[e]&&t.ui._dialogs[e].open()},_onImgSetFloat:function(e){this.hide(),t.execCommand("imagefloat",e)},_setIframeAlign:function(e){var t=s.anchorEl,i=t.cloneNode(!0);switch(e){case-2:i.setAttribute("align","");break;case-1:i.setAttribute("align","left");break;case 1:i.setAttribute("align","right")}t.parentNode.insertBefore(i,t),o.remove(t),s.anchorEl=i,s.showAnchor(s.anchorEl)},_updateIframe:function(){var e=t._iframe=s.anchorEl;o.hasClass(e,"ueditor_baidumap")?(t.selection.getRange().selectNode(e).select(),t.ui._dialogs.mapDialog.open(),s.hide()):(t.ui._dialogs.insertframeDialog.open(),s.hide())},_onRemoveButtonClick:function(e){t.execCommand(e),this.hide()},queryAutoHide:function(e){return e&&e.ownerDocument==t.document&&("img"==e.tagName.toLowerCase()||o.findParentByTagName(e,"a",!0))?e!==s.anchorEl:baidu.editor.ui.Popup.prototype.queryAutoHide.call(this,e)}});s.render(),t.options.imagePopup&&(t.addListener("mouseover",function(e,i){i=i||window.event;var n=i.target||i.srcElement;if(t.ui._dialogs.insertframeDialog&&/iframe/gi.test(n.tagName)){var o=s.formatHtml("<nobr>"+t.getLang("property")+': <span onclick=$$._setIframeAlign(-2) class="edui-clickable">'+t.getLang("default")+'</span>&nbsp;&nbsp;<span onclick=$$._setIframeAlign(-1) class="edui-clickable">'+t.getLang("justifyleft")+'</span>&nbsp;&nbsp;<span onclick=$$._setIframeAlign(1) class="edui-clickable">'+t.getLang("justifyright")+'</span>&nbsp;&nbsp; <span onclick="$$._updateIframe( this);" class="edui-clickable">'+t.getLang("modify")+"</span></nobr>");o?(s.getDom("content").innerHTML=o,s.anchorEl=n,s.showAnchor(s.anchorEl)):s.hide()}}),t.addListener("selectionchange",function(e,i){if(i){var n="",r="",a=t.selection.getRange().getClosedNode(),l=t.ui._dialogs;if(a&&"IMG"==a.tagName){var d="insertimageDialog";if((-1!=a.className.indexOf("edui-faked-video")||-1!=a.className.indexOf("edui-upload-video"))&&(d="insertvideoDialog"),-1!=a.className.indexOf("edui-faked-webapp")&&(d="webappDialog"),-1!=a.src.indexOf("http://api.map.baidu.com")&&(d="mapDialog"),-1!=a.className.indexOf("edui-faked-music")&&(d="musicDialog"),-1!=a.src.indexOf("http://maps.google.com/maps/api/staticmap")&&(d="gmapDialog"),a.getAttribute("anchorname")&&(d="anchorDialog",n=s.formatHtml("<nobr>"+t.getLang("property")+': <span onclick=$$._onImgEditButtonClick("anchorDialog") class="edui-clickable">'+t.getLang("modify")+"</span>&nbsp;&nbsp;<span onclick=$$._onRemoveButtonClick('anchor') class=\"edui-clickable\">"+t.getLang("delete")+"</span></nobr>")),a.getAttribute("word_img")&&(t.word_img=[a.getAttribute("word_img")],d="wordimageDialog"),(o.hasClass(a,"loadingclass")||o.hasClass(a,"loaderrorclass"))&&(d=""),!l[d])return;r="<nobr>"+t.getLang("property")+': <span onclick=$$._onImgSetFloat("none") class="edui-clickable">'+t.getLang("default")+'</span>&nbsp;&nbsp;<span onclick=$$._onImgSetFloat("left") class="edui-clickable">'+t.getLang("justifyleft")+'</span>&nbsp;&nbsp;<span onclick=$$._onImgSetFloat("right") class="edui-clickable">'+t.getLang("justifyright")+'</span>&nbsp;&nbsp;<span onclick=$$._onImgSetFloat("center") class="edui-clickable">'+t.getLang("justifycenter")+"</span>&nbsp;&nbsp;<span onclick=\"$$._onImgEditButtonClick('"+d+'\');" class="edui-clickable">'+t.getLang("modify")+"</span></nobr>",!n&&(n=s.formatHtml(r))}if(t.ui._dialogs.linkDialog){var c,u=t.queryCommandValue("link");if(u&&(c=u.getAttribute("_href")||u.getAttribute("href",2))){var m=c;c.length>30&&(m=c.substring(0,20)+"..."),n&&(n+='<div style="height:5px;"></div>'),n+=s.formatHtml('<div class="link-edit-arrow"></div><nobr><a target="_blank" href="'+c+'" title="'+c+'" >'+m+'</a><span class="edui-clickable link-edit-button" onclick="$$._onEditButtonClick();"></span> <span class="edui-clickable" style="display:none;" onclick="$$._onRemoveButtonClick(\'unlink\');"> '+t.getLang("clear")+"</span></nobr>"),s.showAnchor(u)}}n?(s.getDom("content").innerHTML=n,s.anchorEl=a||u,s.anchorEl===u&&s.showAnchor(s.anchorEl)):s.hide()}}))},_initToolbars:function(){for(var e=this.editor,i=this.toolbars||[],n=[],o=0;o<i.length;o++){for(var r=i[o],a=new baidu.editor.ui.Toolbar({theme:e.options.theme}),s=0;s<r.length;s++){var l=r[s],d=null;if("string"==typeof l){if(l=l.toLowerCase(),"|"==l&&(l="Separator"),"||"==l&&(l="Breakline"),baidu.editor.ui[l]&&(d=new baidu.editor.ui[l](e)),"fullscreen"==l){n&&n[0]?n[0].items.splice(0,0,d):d&&a.items.splice(0,0,d);continue}}else d=l;d&&d.id&&a.add(d)}n[o]=a}t.each(UE._customizeUI,function(t,i){var n,o;return t.id&&t.id!=e.key?!1:(n=t.execFn.call(e,e,i),void(n&&(o=t.index,void 0===o&&(o=a.items.length),a.add(n,o))))}),this.toolbars=n},getHtmlTpl:function(){return'<div id="##" class="%%"><div id="##_toolbarbox" class="%%-toolbarbox">'+(this.toolbars.length?'<div id="##_toolbarboxouter" class="%%-toolbarboxouter"><div class="%%-toolbarboxinner">'+this.renderToolbarBoxHtml()+"</div></div>":"")+'<div id="##_toolbarmsg" class="%%-toolbarmsg" style="display:none;"><div id = "##_upload_dialog" class="%%-toolbarmsg-upload" onclick="$$.showWordImageDialog();">'+this.editor.getLang("clickToUpload")+'</div><div class="%%-toolbarmsg-close" onclick="$$.hideToolbarMsg();">x</div><div id="##_toolbarmsg_label" class="%%-toolbarmsg-label"></div><div style="height:0;overflow:hidden;clear:both;"></div></div><div id="##_message_holder" class="%%-messageholder"></div></div><div id="##_iframeholder" class="%%-iframeholder"></div><div id="##_bottombar" class="%%-bottomContainer"><table><tr><td id="##_elementpath" class="%%-bottombar"></td><td id="##_wordcount" class="%%-wordcount"></td><td id="##_scale" class="%%-scale"><div class="%%-icon"></div></td></tr></table></div><div id="##_scalelayer"></div></div>'},showWordImageDialog:function(){this._dialogs.wordimageDialog.open()},renderToolbarBoxHtml:function(){for(var e=[],t=0;t<this.toolbars.length;t++)e.push(this.toolbars[t].renderHtml());return e.join("")},setFullScreen:function(e){var t=this.editor,i=t.container.parentNode.parentNode;if(this._fullscreen!=e){if(this._fullscreen=e,this.editor.fireEvent("beforefullscreenchange",e),baidu.editor.browser.gecko)var n=t.selection.getRange().createBookmark();if(e){for(;"BODY"!=i.tagName;){var o=baidu.editor.dom.domUtils.getComputedStyle(i,"position");r.push(o),i.style.position="static",i=i.parentNode}this._bakHtmlOverflow=document.documentElement.style.overflow,this._bakBodyOverflow=document.body.style.overflow,this._bakAutoHeight=this.editor.autoHeightEnabled,this._bakScrollTop=Math.max(document.documentElement.scrollTop,document.body.scrollTop),this._bakEditorContaninerWidth=t.iframe.parentNode.offsetWidth,this._bakAutoHeight&&(t.autoHeightEnabled=!1,this.editor.disableAutoHeight()),document.documentElement.style.overflow="hidden",window.scrollTo(0,window.scrollY),this._bakCssText=this.getDom().style.cssText,this._bakCssText1=this.getDom("iframeholder").style.cssText,t.iframe.parentNode.style.width="",this._updateFullScreen()}else{for(;"BODY"!=i.tagName;)i.style.position=r.shift(),i=i.parentNode;this.getDom().style.cssText=this._bakCssText,this.getDom("iframeholder").style.cssText=this._bakCssText1,this._bakAutoHeight&&(t.autoHeightEnabled=!0,this.editor.enableAutoHeight()),document.documentElement.style.overflow=this._bakHtmlOverflow,document.body.style.overflow=this._bakBodyOverflow,t.iframe.parentNode.style.width=this._bakEditorContaninerWidth+"px",window.scrollTo(0,this._bakScrollTop),this.editor.submitBtn&&(this.editor.submitBtn.style.zIndex="")}var a=this;if(browser.gecko&&"true"===t.body.contentEditable){var s=document.createElement("input");document.body.appendChild(s),t.body.contentEditable=!1,setTimeout(function(){s.focus(),setTimeout(function(){t.body.contentEditable=!0,t.fireEvent("fullscreenchanged",e),t.selection.getRange().moveToBookmark(n).select(!0),baidu.editor.dom.domUtils.remove(s),e&&window.scroll(0,0),!e&&window.scrollTo(0,a._bakScrollTop)},0)},0)}"true"===t.body.contentEditable&&(this.editor.fireEvent("fullscreenchanged",e),this.triggerLayout())}},_updateFullScreen:function(){if(this._fullscreen){var e=i.getViewportRect(),t=1*this.getDom().style.zIndex+900;this.getDom().style.cssText="border:0;position:absolute;left:0;top:"+(this.editor.options.topOffset||0)+"px;width:"+e.width+"px;height:"+e.height+"px;z-index:"+t,this.editor.submitBtn&&(this.editor.submitBtn.style.zIndex=t+1),i.setViewportOffset(this.getDom(),{left:0,top:this.editor.options.topOffset||0}),this.editor.setHeight(e.height-this.getDom("toolbarbox").offsetHeight-this.getDom("bottombar").offsetHeight-(this.editor.options.topOffset||0)-120,!0),browser.gecko&&(this.getDom().style.top=0)}},_updateElementPath:function(){var e,t=this.getDom("elementpath");if(this.elementPathEnabled&&(e=this.editor.queryCommandValue("elementpath"))){for(var i,n=[],o=0;i=e[o];o++)n[o]=this.formatHtml('<span unselectable="on" onclick="$$.editor.execCommand(&quot;elementpath&quot;, &quot;'+o+'&quot;);">'+i+"</span>");t.innerHTML='<div class="edui-editor-breadcrumb" onmousedown="return false;">'+this.editor.getLang("elementPathTip")+": "+n.join(" &gt; ")+"</div>"}else t.style.display="none"},disableElementPath:function(){var e=this.getDom("elementpath");e.innerHTML="",e.style.display="none",this.elementPathEnabled=!1},enableElementPath:function(){var e=this.getDom("elementpath");e.style.display="",this.elementPathEnabled=!0,this._updateElementPath()},_scale:function(){function e(){h=o.getXY(s),f||(f=a.options.minFrameHeight+d.offsetHeight+c.offsetHeight),m.style.cssText="position:absolute;left:0;display:;top:0;background-color:#41ABFF;opacity:0.4;filter: Alpha(opacity=40);width:"+s.offsetWidth+"px;height:"+s.offsetHeight+"px;z-index:"+(a.options.zIndex+1),o.on(r,"mousemove",t),o.on(l,"mouseup",i),o.on(r,"mouseup",i)}function t(e){n();var t=e||window.event;v=t.pageX||r.documentElement.scrollLeft+t.clientX,b=t.pageY||r.documentElement.scrollTop+t.clientY,y=v-h.x,C=b-h.y,y>=g&&(p=!0,m.style.width=y+"px"),C>=f&&(p=!0,m.style.height=C+"px")}function i(){p&&(p=!1,a.ui._actualFrameWidth=m.offsetWidth-2,s.style.width=a.ui._actualFrameWidth+"px",a.setHeight(m.offsetHeight-c.offsetHeight-d.offsetHeight-2,!0)),m&&(m.style.display="none"),n(),o.un(r,"mousemove",t),o.un(l,"mouseup",i),o.un(r,"mouseup",i)}function n(){browser.ie?r.selection.clear():window.getSelection().removeAllRanges()}var r=document,a=this.editor,s=a.container,l=a.document,d=this.getDom("toolbarbox"),c=this.getDom("bottombar"),u=this.getDom("scale"),m=this.getDom("scalelayer"),p=!1,h=null,f=0,g=a.options.minFrameWidth,v=0,b=0,y=0,C=0,N=this;this.editor.addListener("fullscreenchanged",function(e,t){if(t)N.disableScale();else if(N.editor.options.scaleEnabled){N.enableScale();var i=N.editor.document.createElement("span");N.editor.body.appendChild(i),N.editor.body.style.height=Math.max(o.getXY(i).y,N.editor.iframe.offsetHeight-20)+"px",o.remove(i)}}),this.enableScale=function(){1!=a.queryCommandState("source")&&(u.style.display="",this.scaleEnabled=!0,o.on(u,"mousedown",e))},this.disableScale=function(){u.style.display="none",this.scaleEnabled=!1,o.un(u,"mousedown",e)}},isFullScreen:function(){return this._fullscreen},postRender:function(){n.prototype.postRender.call(this);for(var e=0;e<this.toolbars.length;e++)this.toolbars[e].postRender();var t,i=this,o=baidu.editor.dom.domUtils,r=function(){clearTimeout(t),t=setTimeout(function(){i._updateFullScreen()})};o.on(window,"resize",r),i.addListener("destroy",function(){o.un(window,"resize",r),clearTimeout(t)})},showToolbarMsg:function(e,t){if(this.getDom("toolbarmsg_label").innerHTML=e,this.getDom("toolbarmsg").style.display="",!t){var i=this.getDom("upload_dialog");i.style.display="none"}},hideToolbarMsg:function(){this.getDom("toolbarmsg").style.display="none"},mapUrl:function(e){return e?e.replace("~/",this.editor.options.UEDITOR_HOME_URL||""):""},triggerLayout:function(){var e=this.getDom();e.style.zoom="1"==e.style.zoom?"100%":"1"}},t.inherits(e,baidu.editor.ui.UIBase);var a={};UE.ui.Editor=function(i){var n=new UE.Editor(i);n.options.editor=n,t.loadFile(document,{href:n.options.themePath+n.options.theme+"/css/ueditor.css?t=20200521",tag:"link",type:"text/css",rel:"stylesheet"});var r=n.render;return n.render=function(i,s){i.constructor===String&&(n.key=i,a[i]=n),t.domReady(function(){function t(){if(n.setOpt({labelMap:n.options.labelMap||n.getLang("labelMap")}),new e(n.options),i&&(i.constructor===String&&(i=document.getElementById(i)),i&&i.getAttribute("name")&&(n.options.textarea=i.getAttribute("name")),i&&/script|textarea/gi.test(i.tagName))){var t=document.createElement("div");i.parentNode.insertBefore(t,i);var a=i.value||i.innerHTML;n.options.initialContent=/^[\t\r\n ]*$/.test(a)?n.options.initialContent:a.replace(/>[\n\r\t]+([ ]{4})+/g,">").replace(/[\n\r\t]+([ ]{4})+</g,"<").replace(/>[\n\r\t]+</g,"><"),i.className&&(t.className=i.className),i.style.cssText&&(t.style.cssText=i.style.cssText),/textarea/i.test(i.tagName)?(n.textarea=i,n.textarea.style.display="none"):i.parentNode.removeChild(i),i.id&&(t.id=i.id,o.removeAttributes(i,"id")),i=t,i.innerHTML=""}o.addClass(i,"edui-"+n.options.theme),n.ui.render(i);var l=n.options;n.container=n.ui.getDom();for(var d,c=o.findParents(i,!0),u=[],m=0;d=c[m];m++)u[m]=d.style.display,d.style.display="block";if(l.initialFrameWidth)l.minFrameWidth=l.initialFrameWidth;else{l.minFrameWidth=l.initialFrameWidth=i.offsetWidth;var p=i.style.width;/%$/.test(p)&&(l.initialFrameWidth=p)}l.initialFrameHeight?l.minFrameHeight=l.initialFrameHeight:l.initialFrameHeight=l.minFrameHeight=i.offsetHeight;for(var d,m=0;d=c[m];m++)d.style.display=u[m];i&&i.style.height&&(i.style.height=""),n.container.style.width=l.initialFrameWidth+(/%$/.test(l.initialFrameWidth)?"":"px"),n.container.style.zIndex=l.zIndex,r.call(n,n.ui.getDom("iframeholder")),s&&(n.container.style.display="none"),n.fireEvent("afteruiready")}n.langIsReady?t():n.addListener("langReady",t)})},n},UE.getEditor=function(e,t){var i=a[e];return(!i||t.forceRecreate)&&(i=a[e]=new UE.ui.Editor(t),i.render(e,t.dontShowAtFirst)),i},UE.delEditor=function(e){var t;(t=a[e])&&(t.key&&t.destroy(),delete a[e])},UE.registerUI=function(e,i,n,o){t.each(e.split(/\s+/),function(e){UE._customizeUI[e]={id:o,execFn:i,index:n}})}}(),UE.registerUI("message",function(e){function t(){var e=a.ui.getDom("toolbarbox"),t=a.getOpt("initialFrameHeight"),n=domUtils.getComputedStyle(i,"width");e&&(i.style.top=e.offsetHeight+(t>100?103:3)+"px"),i.style.right="50%",i.style.marginRight="-"+parseInt(n,10)/2+"px",i.style.zIndex=Math.max(a.options.zIndex,a.iframe.style.zIndex)+1}var i,n=baidu.editor.ui,o=n.Message,r=[],a=e;a.addListener("ready",function(){i=document.getElementById(a.ui.id+"_message_holder"),t(),setTimeout(function(){t()},500)}),a.addListener("showmessage",function(e,n){n=utils.isString(n)?{content:n}:n,n.content=n.content||"\u670d\u52a1\u5668\u51fa\u9519";var s=new o({timeout:n.timeout,type:n.type,content:n.content,keepshow:n.keepshow,editor:a}),l=n.id||"msg_"+(+new Date).toString(36);return s.render(i),r[l]=s,s.reset(n),t(),l}),a.addListener("updatemessage",function(e,t,n){n=utils.isString(n)?{content:n}:n;var o=r[t];o.render(i),o&&o.reset(n)}),a.addListener("hidemessage",function(e,t){var i=r[t];i&&i.hide()})}),UE.registerUI("imgrotate",function(e){var t,i=function(e){this.editor=e,this.rotateDeg=0};i.prototype={init:function(){this.cover=document.createElement("div"),this.handle=document.createElement("div"),this.rotateLeft=document.createElement("a"),this.rotateRight=document.createElement("a"),this.initStyle(),this.bindEvent(),this.render()},render:function(){this.handle.appendChild(this.rotateLeft),this.handle.appendChild(this.rotateRight),this.cover.appendChild(this.handle),this.editor.ui.getDom().appendChild(this.cover)},initStyle:function(){this.cover.className="imagedeal-cover",this.handle.className="imagedeal-handle",this.rotateLeft.className="imagedeal-rotate",this.rotateLeft.href="javascript:void(0)",this.rotateLeft.innerHTML='<span class="rotate-left"></span>\u5411\u5de6\u8f6c',this.rotateRight.className="imagedeal-rotate",this.rotateRight.href="javascript:void(0)",this.rotateRight.innerHTML='<span class="rotate-right"></span>\u5411\u53f3\u8f6c',utils.cssRule("imgrotatestyles",[".imagedeal-cover{position:absolute;display:none;z-index:"+this.editor.options.zIndex+";left:0;top:0;}",".imagedeal-handle{position:absolute;bottom:0;right:0;background: rgba(51,51,51,.4);line-height:30px;text-align:center;border-top-left-radius:4px;padding:0 5px 0 10px;}",".imagedeal-rotate{font-size:12px;color:#fff;display:inline-block;width:60px;opacity:.8;text-decoration:none;}",".imagedeal-handle:hover{background: rgba(51,51,51,.6);}",".imagedeal-rotate:hover{opacity:1;text-decoration:none;}",'.imagedeal-rotate span{font-family:"iknow-ueditor-icons";font-style:normal;-webkit-font-smoothing:antialiased;-webkit-text-stroke-width:0.2px;-moz-osx-font-smoothing:grayscale;font-size:14px;color:#fff;position:relative;left:-3px;top:2px;}','.rotate-left:before{content: "\\e68a";}','.rotate-right:before{content:"\\e68b";}'].join(""))},rotate:function(){var t=this,i=t.rotateDeg,n=t.editor.getOpt("imageUploadUrl");if(!t.editor.imageRotateStatus){t.editor.imageRotateStatus=!0,t.close();var o=t._getRealSrc();if(t.target.src=t.editor.getOpt("waitImageUrl"),/^data:/.test(o))return t.target.src=o,void(t.editor.imageRotateStatus=!1);UE.ajax.request(n,{method:"POST",data:{cm:100683,picUrl:o,degree:i},onsuccess:function(i){var n=utils.str2json(i.responseText);"0"===n.errorNo&&n.url?setTimeout(function(){t.target.src=n.url,t.target.onload=function(){e.fireEvent("afterinserthtml"),t.editor.imageRotateStatus=!1}},1e3):"265"===n.errorNo?(t.target.src=o,t.editor.fireEvent("showmessage",{id:+new Date,content:t.editor.getLang("needLoginMsg"),type:"error",timeout:1e3}),t.editor.imageRotateStatus=!1):"3"===n.errorNo?(t.target.src=o,t.editor.fireEvent("showmessage",{id:+new Date,content:"\u8be5\u56fe\u7247\u4e0d\u652f\u6301\u65cb\u8f6c",type:"error",timeout:1e3}),t.editor.imageRotateStatus=!1):t.editor.imageRotateStatus=!1},onerror:function(){t.target.src=o,t.editor.imageRotateStatus=!1}})}},bindEvent:function(){var e=this;domUtils.on(e.rotateLeft,"click",function(){e.rotateDeg=270,e.rotate()}),domUtils.on(e.rotateRight,"click",function(){e.rotateDeg=90,e.rotate()}),domUtils.on(e.cover,"mouseleave",function(){e.close()}),domUtils.on(document,void 0!==document.mozFullScreen?"DOMMouseScroll":"mousewheel",function(){e.close()})},_attachTo:function(){var e=this,t=e.cover,i=domUtils.getXY(e.target),n=domUtils.getXY(e.editor.iframe),o=domUtils.getXY(t.parentNode),r=e._getTargetSize(),a=e.editor.document.documentElement.scrollTop+e.editor.body.scrollTop,s=e.editor.document.documentElement.scrollLeft+e.editor.body.scrollLeft;domUtils.setStyles(t,{width:r.width+"px",height:r.height+"px",left:n.x+i.x-s-o.x-parseInt(e.target.style.borderLeftWidth||0,10)+"px",top:n.y+i.y-a-o.y-parseInt(e.target.style.borderTopWidth||0,10)+"px"})},_getTargetSize:function(){var e=this.target,t=domUtils.getComputedStyle(e,"width"),i=domUtils.getComputedStyle(e,"height");return{width:parseInt(t,10),height:parseInt(i,10)}},_invalidTarget:function(){var e=this,t=e.target.getBoundingClientRect(),i={width:e.editor.iframe.offsetWidth,height:e.editor.iframe.offsetHeight};return t.top>=0&&t.left>=0&&t.right<=i.width&&t.bottom<=i.height},_render:function(){var e=this;e._invalidTarget()&&(e._attachTo(),e.cover.style.display="block")},_getRealSrc:function(){var e=this,t=e.target.getAttribute("data_src");return t&&e.target.removeAttribute("data_src"),t?t:e.target.getAttribute("src")},open:function(e){if(e){var t=this;t.editor.imageRotateStatus||(t.target=e,t._render())}},close:function(){this.cover.style.display="none"}},e.setOpt("imageRotate",!0),e.getOpt("imageRotate")&&e.addListener("mouseover",function(n,o){var r=o.target||o.srcElement;if("IMG"==r.tagName&&"false"!=e.body.contentEditable){if(-1!=r.className.indexOf("edui-faked-music")||-1!=r.className.indexOf("edui-faked-video")||r.getAttribute("anchorname")||domUtils.hasClass(r,"loadingclass")||domUtils.hasClass(r,"loaderrorclass")||r.getAttribute("src")===e.getOpt("waitImageUrl"))return;t||(t=new i(e),t.init()),t.open(r)}})});var httpsTool=require("common:widget/js/util/https/https"),$=require("common:widget/lib/jquery/jquery");UE.plugin.register("iknow",function(){var e=this;e.isExpanded=!0,e.collapseEditor=function(e){var t=this,i=t.container,n=i.parentNode,o=domUtils.getComputedStyle(n,"height");o=parseInt(o,10),$(n).css({overflow:"hidden",visibility:"visible",height:o}).animate({height:0},500,function(){e&&"function"==typeof e&&e(n),t.isExpanded=!1})},e.expandEditor=function(e){var t=this,i=t.container;if(i){var n=i.parentNode,o=t.getOpt("initialFrameHeight");o+=48,$(n).css({overflow:"hidden",visibility:"visible",height:0}).animate({height:o},500,function(){$(n).css({visibility:"inherit",height:"",overflow:"inherit"}),e&&"function"==typeof e&&e(n),t.isExpanded=!0})}},e.formatEnter=function(e){for(var t="",i=e.replace(/<br\s*\/*>/gi,"\n").replace(/ /g,"&nbsp;").replace(/\r\n/g,"\n").split("\n"),n=0;n<i.length;n++)t+=""!=utils.trim(i[n])?"<p>"+utils.trim(i[n])+"</p>":"<p><br /></p>";return t},e.getEditorContent=function(e,t,i,n,o){var r=this,a=r.getContent(e,t,i,n,o);return a=a.replace(/^((&nbsp;|\s)*\<p\>)(&nbsp;|\s)+/g,function(){return"<p>"}).replace(/(&nbsp;|\s)+(\<\/p\>(&nbsp;|\s)*)$/g,function(){return"</p>"
}).replace(/(&nbsp;|\s)*(\<br\>|\<br\s*\/\>)(&nbsp;|\s)+/g,function(){return"<br/>"}).replace(/(&nbsp;|\s)*<p>(&nbsp;|\s)+/g,function(){return"<p>"}).replace(/\s+class="ue_t"/gi,function(){return""}).replace(/<p><br\s*\/><\/p>/gi,function(){return""}),r.filterHighlight(a)},e.extractVideoUrl=function(e){var t=[],i=[],n=[],o=[],r=[];if(e.indexOf("<vvideo")>-1){t=e.match(/mid="(.*?)"/g),i=e.match(/duration="(.*?)"/g),n=e.match(/width="(.*?)"/g),o=e.match(/height="(.*?)"/g),r=e.match(/vtopic="(.*?)"/g);for(var a=0,s=t.length;s>a;a++){var l=t[a].replace('mid="',"").replace('"',""),d=i[a].replace('duration="',"").replace('"',""),c=n&&n[a].replace('width="',"").replace('"',"")||150,u=o&&o[a].replace('height="',"").replace('"',"")||200,m=r&&r[a].replace('vtopic="',"").replace('"',"");t[a]={mediaId:l,duration:d,width:c,height:u,vtopic:m,url:"https://ggkkmuup9wuugp6ep8d.exp.bcevod.com/"+l+"/navideo720/"+l+".mp4"}}}return t},e.setEditorContent=function(e,t,i,n){var o=this;e&&(t&&(e=o.formatEnter(e)),o.videos=o.extractVideoUrl(e),e=o.filterMapClew(e),e=o.formatCode(e),o.setContent(e,i,n),setTimeout(function(){o.fireEvent("contentchange")},2e3)),o.focus()},e.filterHighlight=function(e){if(!e)return"";var t=/<pre(.*?)>([\s\S]+?)<\/pre>/g,i=e.match(t);return i?e.replace(t,function(e,t,i){var n=t&&t.match(/class="brush:\s*(.+?);.*?"/);return n&&n[1]?'<pre t="code" l="'+n[1]+'">'+i+"</pre>":i}):e},e.filterMapClew=function(e){return e=e.replace(/<a[^>]*>([\S\s]*?)<\s*\/\s*a\s*>/gi,function(e,t){return/<img[^>]*>/i.test(t)?t:e}),e=e.replace(/<iframe.+?><\/iframe>/gi,function(e){var t,i="",n="";return(t=e.match(/src="(.+?)"/i))&&(i=t[1]),(t=e.match(/map="(.+?)"/i))&&(n=t[1]),i=i?i:n,i=i.replace(/^http:/,""),i?(i=i.replace(/^.*?(html\/map\/|iknow\/)/i,"//"+location.hostname+"/static/common/widget/js/logic/ueditor/dialogs/map/"),'<iframe data-type="map" map="'+i+'" frameborder="0" src="'+i+'" class="ikqb-mapshow"></iframe>'):e})},e.formatCode=function(e){if(!e)return"";var t=/<pre(.*?)>([\s\S]+?)<\/pre>/g,i=e.match(t);return i?e.replace(t,function(e,t,i){var n=t&&t.match(/t="code" l="\s*(.+?)"/);return n&&n[1]?'<pre class="brush:'+n[1]+';toolbar:false">'+i+"</pre>":i}):e},e.iknowInit=function(e,t){var i=this;i.extraParam=e.extraParam,i.addListener("ready",function(){var n=i.container,o=document.createElement("div");if(domUtils.addClass(o,"addons line"),n.parentNode.appendChild(o),e.authcode){var r=document.createElement("div");domUtils.addClass(r,"ik-authcode-outer"),o.appendChild(r),r.style.display="none";var a=require("common:widget/js/logic/authcode/authcode"),s=!1;i.addListener("focus",function(){s||i.authcode||(s=!0,i.authcode=new a({container:r,from:e.authcode}))})}if(e.submitBtn&&(i.submitBtn=document.createElement("a"),domUtils.addClass(i.submitBtn,"btn-32-green grid-r new-editor-deliver-btn"),i.submitBtn.innerHTML=e.submitBtn,o.appendChild(i.submitBtn)),e.cancelBtn&&(i.cancelBtn=document.createElement("a"),domUtils.addClass(i.cancelBtn,"btn-32-white grid-r new-editor-cancel-btn"),i.cancelBtn.innerHTML=e.cancelBtn,o.appendChild(i.cancelBtn)),e.anonymouse){i.anonymouse=document.createElement("input"),domUtils.setAttributes(i.anonymouse,{type:"checkbox",name:"md"});var l=document.createElement("label");domUtils.addClass(l,"unname"),domUtils.setAttributes(l,{"alog-action":"qb-unname"}),l.appendChild(i.anonymouse);var d=document.createElement("span");d.innerText="\u533f\u540d",l.appendChild(d),o.appendChild(l)}e.text&&(i.addtext=document.createElement("p"),i.addtext.innerHTML=e.text,o.appendChild(i.addtext)),t&&t(i.submitBtn,i.anonymouse,i.uploadVideo)})};var t=function(){e.submitBtn&&(e.submitBtn.style.right=(document.body.scrollWidth-910)/2+"px")};e.addListener("fullscreenchanged",function(e,i){var n=this.container,o=n.parentNode;i?(domUtils.addClass(n,"iknow-editor-fullscreen"),domUtils.addClass(o,"editor-status-fullscreen"),t(),domUtils.on(window,"resize",t)):(domUtils.removeClasses(o,"editor-status-fullscreen"),domUtils.removeClasses(n,"iknow-editor-fullscreen"),this.submitBtn&&(this.submitBtn.style.right="auto"),domUtils.un(window,"resize",t))}),e.hasCon=function(){return this.getContentTxt().length>0?!this.document.getElementById("initContent"):/<(?:img|iframe)\s+(?:[^>]+\s+)*src\s*=\s*("|')+[^\1]+\1+\s*\/*>/i.test(this.getContent())},e.checkEditor=function(t){var i=this;if(t=t||{},i.imageRotateStatus)return i.fireEvent("showmessage",{id:+new Date,content:"\u6b63\u5728\u65cb\u8f6c\u56fe\u7247\uff0c\u8bf7\u7b49\u5f85...",type:"error",timeout:1e3}),!1;var n=i.document,o=i.getOpt("insertVideoBoxClassName")||"ikqb_insertvideo",r=i.getOpt("insertVideoBoxDataName")||"data-mid",a=n.querySelectorAll("."+o);if(i.needCheckVideoBoxStatus||t.onlyCheckUploadingVideo){var s=!1;if(utils.each(a,function(t){var i=t.getAttribute(r);i?e.videoStatus&&"PENDING"===e.videoStatus[i]&&(s=!0):s=!0}),t.onlyCheckUploadingVideo)return s?!0:!1;if(s)return i.fireEvent("showmessage",{id:+new Date,content:"\u8fd8\u6709\u672a\u4e0a\u4f20\u5b8c\u6210\u7684\u89c6\u9891\uff0c\u8bf7\u7b49\u5f85...",type:"error",timeout:1e3}),!1}if(t.checkVideoStatus&&e.videoStatus){var l=[];utils.each(a,function(e){var t=e.getAttribute(r);t?l.push(t):s=!0});for(var d=0,c=l.length;c>d;d++)if("RUNNING"!==e.videoStatus[l[d]]||"PUBLISHED"!==e.videoStatus[l[d]])return!1}if(!i.hasCon()&&!t.dontCheckEmpty)return i.focus(),i.fireEvent("showmessage",{id:+new Date,content:i.getOpt("wordEmptyMsg"),type:"error",timeout:1e3}),!1;if(i.ui.isFullScreen()&&i.authcode&&i.authcode._authData["IK_AUTHCODE_"+i.authcode.guid].show){var u=i.authcode.getAuthElement("input");if(""===u.val())return i.ui.setFullScreen(!1),setTimeout(function(){u.blur(),u.focus()},500),!1}return!0},e.hasImg=function(){return/<img[^>]+src\s*=\s*['\"]([^'\"]+)['\"][^>]*>/i.test(this.getContent())}}),module.exports=window.UE});
;/*!common:widget/js/logic/ueditor/ueditor.js*/
define("common:widget/js/logic/ueditor/ueditor",function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var o=t("common:widget/js/util/tangram/tangram"),r=(i(o),t("common:widget/js/logic/ueditor/ueditor-core/ueditor")),a=i(r),u=t("common:widget/js/logic/ueditor/plugin/iconControl/iconControl.es"),d=t("common:widget/js/logic/ueditor/plugin/insertImage/insertImage.es"),l=i(d),g=t("common:widget/js/logic/ueditor/plugin/insert-video/insert-video.es"),s=i(g),c=t("common:widget/js/logic/ueditor/plugin/insertBaiduYun/insertBaiduYun.es"),f=i(c),m=t("common:widget/js/logic/ueditor/plugin/errorCorrection/errorCorrection.es"),p=i(m),w=t("common:widget/js/logic/ueditor/plugin/imageEdit/imageEdit.es"),h=i(w),v=t("common:widget/js/logic/ueditor/plugin/imageCaption/imageCaption.es"),C=i(v),b={btnMap:[{btnName:"insertimage",title:"\u56fe\u7247","class":l.default},{btnName:"uploadvideo",realBtnName:"insertvideo",title:"\u89c6\u9891","class":s.default},{btnName:"uploadbaiduyun",title:"\u7f51\u76d8\u8d44\u6e90","class":f.default}],init:function(){var t=this,e=a.default.getEditor.bind(a.default);return a.default.getEditor=function(n,i){u.init(a.default);new h.default(a.default);if(i.imageCaption){new C.default(a.default)}new p.default(a.default);i.toolbars&&(i.toolbars=t.addBtn(i.toolbars)),a.default.plugin.register("newWordCount",function(){return{bindEvents:{ready:function(){this.getContentLength=function(t,e){var n=this.getContent(!1,!1,!0).length;if(t){e=(e||[]).concat(["hr","img","iframe"]),n=this.getContentTxt().replace(/[\t\r\n]+/g,"").length;for(var i,o=0;i=e[o++];)n+=this.document.getElementsByTagName(i).length}var r=this.getOpt("getCountRule");if(r&&r instanceof Array)for(var a=0;a<r.length;a++)"function"==typeof r[a]&&(n=r[a].call(this,n,t,e)||n);return n}}}}}),i.wordCountNormal=!0,i.wordCountMsg="{#count}\u5b57";var o=e(n,i);return o},a.default},addBtn:function(t){for(var e=this,n=function(n){var i=t[n],o=i.concat([]),r=i.indexOf("fullscreen");e.btnMap.forEach(function(t){var e=t.btnName,n=t.realBtnName,u=t.title,d=i.indexOf(e);if(!(0>d)){i.splice(d,1);var l=o.indexOf(e);r>-1&&r>l&&(l+=1);{new t.class(a.default,n||e,l,u)}}})},i=0;i<t.length;i++)n(i);return t}};n.exports=b.init()});