UNPKG

nimble-ui-pc

Version:

基础vue ui库 配置化组件 后台管理系统组件

6 lines 369 kB
/*! * UEditor * version: ueditor * build: Tue Aug 25 2015 15:26:07 GMT+0800 (CST) */ (function(){function v(n,t,i){var r;return t=t.toLowerCase(),(r=n.__allListeners||i&&(n.__allListeners={}))&&(r[t]||i&&(r[t]=[]))}function l(n,t,i,r,u,f){var e=r&&n[t],o;for(e||(e=n[i]);!e&&(o=(o||n).parentNode);){if(o.tagName=="BODY"||f&&!f(o))return null;e=o[i]}return e&&u&&!u(e)?l(e,t,i,!1,u):e}var c,f,b,k,d,a,s,u;UEDITOR_CONFIG=window.UEDITOR_CONFIG||{};u=window.baidu||{};window.baidu=u;window.UE=u.editor=window.UE||{};UE.plugins={};UE.commands={};UE.instants={};UE.I18N={};UE._customizeUI={};UE.version="1.4.3";var e=UE.dom={},r=UE.browser=function(){var i=navigator.userAgent.toLowerCase(),e=window.opera,n={ie:/(msie\s|trident.*rv:)([\w.]+)/.test(i),opera:!!e&&e.version,webkit:i.indexOf(" applewebkit/")>-1,mac:i.indexOf("macintosh")>-1,quirks:document.compatMode=="BackCompat"},t,r,u,f;return n.gecko=navigator.product=="Gecko"&&!n.webkit&&!n.opera&&!n.ie,t=0,n.ie&&(r=i.match(/(?:msie\s([\w.]+))/),u=i.match(/(?:trident.*rv:([\w.]+))/),t=r&&u&&r[1]&&u[1]?Math.max(r[1]*1,u[1]*1):r&&r[1]?r[1]*1:u&&u[1]?u[1]*1:0,n.ie11Compat=document.documentMode==11,n.ie9Compat=document.documentMode==9,n.ie8=!!document.documentMode,n.ie8Compat=document.documentMode==8,n.ie7Compat=t==7&&!document.documentMode||document.documentMode==7,n.ie6Compat=t<7||n.quirks,n.ie9above=t>8,n.ie9below=t<9,n.ie11above=t>10,n.ie11below=t<11),n.gecko&&(f=i.match(/rv:([\d\.]+)/),f&&(f=f[1].split("."),t=f[0]*1e4+(f[1]||0)*100+(f[2]||0)*1)),/chrome\/(\d+\.\d)/i.test(i)&&(n.chrome=+RegExp.$1),/(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(i)&&!/chrome/i.test(i)&&(n.safari=+(RegExp.$1||RegExp.$2)),n.opera&&(t=parseFloat(e.version())),n.webkit&&(t=parseFloat(i.match(/ applewebkit\/(\d+)/)[1])),n.version=t,n.isCompatible=!n.mobile&&(n.ie&&t>=6||n.gecko&&t>=10801||n.opera&&t>=9.5||n.air&&t>=1||n.webkit&&t>=522||!1),n}(),o=r.ie,g=r.webkit,nt=r.gecko,p=r.opera,t=UE.utils={each:function(n,t,i){var r,f,u;if(n!=null)if(n.length===+n.length){for(r=0,f=n.length;r<f;r++)if(t.call(i,n[r],r,n)===!1)return!1}else for(u in n)if(n.hasOwnProperty(u)&&t.call(i,n[u],u,n)===!1)return!1},makeInstance:function(n){var t=new Function;return t.prototype=n,n=new t,t.prototype=null,n},extend:function(n,t,i){if(t)for(var r in t)i&&n.hasOwnProperty(r)||(n[r]=t[r]);return n},extend2:function(n){for(var r,t,u=arguments,i=1;i<u.length;i++){r=u[i];for(t in r)n.hasOwnProperty(t)||(n[t]=r[t])}return n},inherits:function(n,i){var u=n.prototype,r=t.makeInstance(i.prototype);return t.extend(r,u,!0),n.prototype=r,r.constructor=n},bind:function(n,t){return function(){return n.apply(t,arguments)}},defer:function(n,t,i){var r;return function(){i&&clearTimeout(r);r=setTimeout(n,t)}},indexOf:function(n,t,i){var r=-1;return i=this.isNumber(i)?i:0,this.each(n,function(n,u){if(u>=i&&n===t)return r=u,!1}),r},removeItem:function(n,t){for(var i=0,r=n.length;i<r;i++)n[i]===t&&(n.splice(i,1),i--)},trim:function(n){return n.replace(/(^[ \t\n\r]+)|([ \t\n\r]+$)/g,"")},listToMap:function(n){if(!n)return{};n=t.isArray(n)?n:n.split(",");for(var u=0,i,r={};i=n[u++];)r[i.toUpperCase()]=r[i]=1;return r},unhtml:function(n,t){return n?n.replace(t||/[&<">'](?:(amp|lt|quot|gt|#39|nbsp|#\d+);)?/g,function(n,t){return t?n:{"<":"&lt;","&":"&amp;",'"':"&quot;",">":"&gt;","'":"&#39;"}[n]}):""},html:function(n){return n?n.replace(/&((g|l|quo)t|amp|#39|nbsp);/g,function(n){return{"&lt;":"<","&amp;":"&","&quot;":'"',"&gt;":">","&#39;":"'","&nbsp;":" "}[n]}):""},cssStyleToDomStyle:function(){var n=document.createElement("div").style,t={float:n.cssFloat!=undefined?"cssFloat":n.styleFloat!=undefined?"styleFloat":"float"};return function(n){return t[n]||(t[n]=n.toLowerCase().replace(/-./g,function(n){return n.charAt(1).toUpperCase()}))}}(),loadFile:function(){function t(t,i){try{for(var u=0,r;r=n[u++];)if(r.doc===t&&r.url==(i.src||i.href))return r}catch(f){return null}}var n=[];return function(i,r,u){var e=t(i,r),s,f,o;if(e){e.ready?u&&u():e.funs.push(u);return}if(n.push({doc:i,url:r.src||r.href,funs:[u]}),!i.body){s=[];for(o in r)o!="tag"&&s.push(o+'="'+r[o]+'"');i.write("<"+r.tag+" "+s.join(" ")+" ><\/"+r.tag+">");return}if(!r.id||!i.getElementById(r.id)){f=i.createElement(r.tag);delete r.tag;for(o in r)f.setAttribute(o,r[o]);f.onload=f.onreadystatechange=function(){if(!this.readyState||/loaded|complete/.test(this.readyState)){if(e=t(i,r),e.funs.length>0){e.ready=1;for(var n;n=e.funs.pop();)n()}f.onload=f.onreadystatechange=null}};f.onerror=function(){throw Error("The load "+(r.href||r.src)+" fails,check the url settings of file ueditor.config.js ");};i.getElementsByTagName("head")[0].appendChild(f)}}}(),isEmptyObject:function(n){if(n==null)return!0;if(this.isArray(n)||this.isString(n))return n.length===0;for(var t in n)if(n.hasOwnProperty(t))return!1;return!0},fixColor:function(n,t){var r,u,i;if(/color/i.test(n)&&/rgba?/.test(t)){if(r=t.split(","),r.length>3)return"";for(t="#",u=0;i=r[u++];)i=parseInt(i.replace(/[^\d]/gi,""),10).toString(16),t+=i.length==1?"0"+i:i;t=t.toUpperCase()}return t},optCss:function(n){function r(n,t){var o;if(!n)return"";var r=n.top,u=n.bottom,i=n.left,f=n.right,e="";if(r&&i&&u&&f)e+=";"+t+":"+(r==u&&u==i&&i==f?r:r==u&&i==f?r+" "+i:i==f?r+" "+i+" "+u:r+" "+f+" "+u+" "+i)+";";else for(o in n)e+=";"+t+"-"+o+":"+n[o]+";";return e}var t,i;return n=n.replace(/(padding|margin|border)\-([^:]+):([^;]+);?/gi,function(n,r,u,f){if(f.split(" ").length==1)switch(r){case"padding":return t||(t={}),t[u]=f,"";case"margin":return i||(i={}),i[u]=f,"";case"border":return f=="initial"?"":n}return n}),n+=r(t,"padding")+r(i,"margin"),n.replace(/^[ \n\r\t;]*|[ \n\r\t]*$/,"").replace(/;([ \n\r\t]+)|\1;/g,";").replace(/(&((l|g)t|quot|#39))?;{2,}/g,function(n,t){return t?t+";;":";"})},clone:function(n,i){var u,r;i=i||{};for(r in n)n.hasOwnProperty(r)&&(u=n[r],typeof u=="object"?(i[r]=t.isArray(u)?[]:{},t.clone(n[r],i[r])):i[r]=u);return i},transUnitToPx:function(n){if(!/(pt|cm)/.test(n))return n;var t;n.replace(/([\d.]+)(\w+)/,function(i,r,u){n=r;t=u});switch(t){case"cm":n=parseFloat(n)*25;break;case"pt":n=Math.round(parseFloat(n)*96/72)}return n+(n?"px":"")},domReady:function(){function n(n){n.isReady=!0;for(var i;i=t.pop();i());}var t=[];return function(i,u){u=u||window;var f=u.document;i&&t.push(i);f.readyState==="complete"?n(f):(f.isReady&&n(f),r.ie&&r.version!=11?(function(){if(!f.isReady){try{f.documentElement.doScroll("left")}catch(t){setTimeout(arguments.callee,0);return}n(f)}}(),u.attachEvent("onload",function(){n(f)})):(f.addEventListener("DOMContentLoaded",function(){f.removeEventListener("DOMContentLoaded",arguments.callee,!1);n(f)},!1),u.addEventListener("load",function(){n(f)},!1)))}}(),cssRule:r.ie&&r.version!=11?function(n,t,i){var u,r;if(t===undefined||t&&t.nodeType&&t.nodeType==9)return(i=t&&t.nodeType&&t.nodeType==9?t:i||document,u=i.indexList||(i.indexList={}),r=u[n],r!==undefined)?i.styleSheets[r].cssText:undefined;if(i=i||document,u=i.indexList||(i.indexList={}),r=u[n],t==="")return r!==undefined?(i.styleSheets[r].cssText="",delete u[n],!0):!1;r!==undefined?sheetStyle=i.styleSheets[r]:(sheetStyle=i.createStyleSheet("",r=i.styleSheets.length),u[n]=r);sheetStyle.cssText=t}:function(n,t,i){var r;if(t===undefined||t&&t.nodeType&&t.nodeType==9)return i=t&&t.nodeType&&t.nodeType==9?t:i||document,r=i.getElementById(n),r?r.innerHTML:undefined;if(i=i||document,r=i.getElementById(n),t==="")return r?(r.parentNode.removeChild(r),!0):!1;r?r.innerHTML=t:(r=i.createElement("style"),r.id=n,r.innerHTML=t,i.getElementsByTagName("head")[0].appendChild(r))},sort:function(n,t){var i,u,r,f,e;for(t=t||function(n,t){return n.localeCompare(t)},i=0,u=n.length;i<u;i++)for(r=i,f=n.length;r<f;r++)t(n[i],n[r])>0&&(e=n[i],n[i]=n[r],n[r]=e);return n},serializeParam:function(n){var u=[],i,r;for(i in n)if(i!="method"&&i!="timeout"&&i!="async")if((typeof n[i]).toLowerCase()=="function"||(typeof n[i]).toLowerCase()=="object"){if(t.isArray(n[i]))for(r=0;r<n[i].length;r++)u.push(encodeURIComponent(i)+"[]="+encodeURIComponent(n[i][r]))}else u.push(encodeURIComponent(i)+"="+encodeURIComponent(n[i]));return u.join("&")},formatUrl:function(n){var t=n.replace(/&&/g,"&");return t=t.replace(/\?&/g,"?"),t=t.replace(/&$/g,""),t=t.replace(/&#/g,"#"),t.replace(/&+/g,"&")},isCrossDomainUrl:function(n){var t=document.createElement("a");return t.href=n,r.ie&&(t.href=t.href),!(t.protocol==location.protocol&&t.hostname==location.hostname&&(t.port==location.port||t.port=="80"&&location.port==""||t.port==""&&location.port=="80"))},clearEmptyAttrs:function(n){for(var t in n)n[t]===""&&delete n[t];return n},str2json:function(n){return t.isString(n)?window.JSON?JSON.parse(n):new Function("return "+t.trim(n||""))():null},json2str:function(){if(window.JSON)return JSON.stringify;var i={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function r(n){return/["\\\x00-\x1f]/.test(n)&&(n=n.replace(/["\\\x00-\x1f]/g,function(n){var t=i[n];return t?t:(t=n.charCodeAt(),"\\u00"+Math.floor(t/16).toString(16)+(t%16).toString(16))})),'"'+n+'"'}function u(n){for(var i=["["],e=n.length,f,u,r=0;r<e;r++){u=n[r];switch(typeof u){case"undefined":case"function":case"unknown":break;default:f&&i.push(",");i.push(t.json2str(u));f=1}}return i.push("]"),i.join("")}function n(n){return n<10?"0"+n:n}function f(t){return'"'+t.getFullYear()+"-"+n(t.getMonth()+1)+"-"+n(t.getDate())+"T"+n(t.getHours())+":"+n(t.getMinutes())+":"+n(t.getSeconds())+'"'}return function(n){var i,o,h,s,e;switch(typeof n){case"undefined":return"undefined";case"number":return isFinite(n)?String(n):"null";case"string":return r(n);case"boolean":return String(n);default:if(n===null)return"null";if(t.isArray(n))return u(n);if(t.isDate(n))return f(n);i=["{"];o=t.json2str;for(e in n)if(Object.prototype.hasOwnProperty.call(n,e)){s=n[e];switch(typeof s){case"undefined":case"unknown":case"function":break;default:h&&i.push(",");h=1;i.push(o(e)+":"+o(s))}}return i.push("}"),i.join("")}}}()};t.each(["String","Function","Array","Number","RegExp","Object","Date"],function(n){UE.utils["is"+n]=function(t){return Object.prototype.toString.apply(t)=="[object "+n+"]"}});c=UE.EventBase=function(){};c.prototype={addListener:function(n,i){n=t.trim(n).split(/\s+/);for(var u=0,r;r=n[u++];)v(this,r,!0).push(i)},on:function(n,t){return this.addListener(n,t)},off:function(n,t){return this.removeListener(n,t)},trigger:function(){return this.fireEvent.apply(this,arguments)},removeListener:function(n,i){n=t.trim(n).split(/\s+/);for(var u=0,r;r=n[u++];)t.removeItem(v(this,r)||[],i)},fireEvent:function(){for(var u=arguments[0],f,i,e,n,r,u=t.trim(u).split(" "),o=0;f=u[o++];){if(i=v(this,f),i)for(r=i.length;r--;)if(i[r]){if(n=i[r].apply(this,arguments),n===!0)return n;n!==undefined&&(e=n)}(n=this["on"+f.toLowerCase()])&&(e=n.apply(this,arguments))}return e}};f=e.dtd=function(){function n(n){for(var t in n)n[t.toUpperCase()]=n[t];return n}var r=t.extend2,h=n({isindex:1,fieldset:1}),a=n({input:1,button:1,select:1,textarea:1,label:1}),v=r(n({a:1}),a),c=r({iframe:1},v),e=n({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}),y=n({ins:1,del:1,script:1,style:1}),p=r(n({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}),y),w=r(n({sub:1,img:1,embed:1,object:1,sup:1,basefont:1,map:1,applet:1,font:1,big:1,small:1}),p),o=r(n({p:1}),w),b=r(n({iframe:1}),w,a),k=n({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}),i=r(n({a:0}),b),l=n({tr:1}),f=n({"#":1}),d=r(n({param:1}),k),u=r(n({form:1}),h,c,e,o),s=n({li:1,ol:1,ul:1}),it=n({style:1,script:1}),g=n({base:1,link:1,meta:1,title:1}),rt=r(g,it),nt=n({head:1,body:1}),ut=n({html:1}),tt=n({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}),ft=n({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 n({$nonBodyContent:r(ut,nt,g),$block:tt,$inline:i,$inlineWithA:r(n({a:1}),i),$body:r(n({script:1,style:1}),tt),$cdata:n({script:1,style:1}),$empty:ft,$nonChild:n({iframe:1,textarea:1}),$listItem:n({dd:1,dt:1,li:1}),$list:n({ul:1,ol:1,dl:1}),$isNotEmpty:n({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:n({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:n({p:1,div:1}),$tableContent:n({caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1,table:1}),$notTransContent:n({pre:1,script:1,style:1,textarea:1}),html:nt,head:rt,style:f,script:f,body:u,base:{},link:{},meta:{},title:f,col:{},tr:n({td:1,th:1}),img:{},embed:{},colgroup:n({thead:1,col:1,tbody:1,tr:1,tfoot:1}),noscript:u,td:u,br:{},th:u,center:u,kbd:i,button:r(o,e),basefont:{},h5:i,h4:i,samp:i,h6:i,ol:s,h1:i,h3:i,option:f,h2:i,form:r(h,c,e,o),select:n({optgroup:1,option:1}),font:i,ins:i,menu:s,abbr:i,label:i,table:n({thead:1,col:1,tbody:1,tr:1,colgroup:1,caption:1,tfoot:1}),code:i,tfoot:l,cite:i,li:u,input:{},iframe:u,strong:i,textarea:f,noframes:u,big:i,small:i,span:n({"#":1,br:1,b:1,strong:1,u:1,i:1,em:1,sub:1,sup:1,strike:1,span:1}),hr:i,dt:i,sub:i,optgroup:n({option:1}),param:{},bdo:i,"var":i,div:u,object:d,sup:i,dd:u,strike:i,area:{},dir:s,map:r(n({area:1,form:1,p:1}),h,y,e),applet:d,dl:n({dt:1,dd:1}),del:i,isindex:{},fieldset:r(n({legend:1}),k),thead:l,ul:s,acronym:i,b:i,a:r(n({a:1}),b),blockquote:r(n({td:1,tr:1,tbody:1,li:1}),u),caption:i,i:i,u:i,tbody:l,s:i,address:r(c,o),tt:i,legend:i,q:i,pre:r(p,v),p:r(n({a:1}),i),em:i,dfn:i})}();var y=o&&r.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"},w=t.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"]),n=e.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:o&&r.version=="6"?"":"​",keys:{8:1,46:1,16:1,17:1,18:1,37:1,38:1,39:1,40:1,13:1},getPosition:function(n,t){var i,r,u,f;if(n===t)return 0;for(r=[n],u=[t],i=n;i=i.parentNode;){if(i===t)return 10;r.push(i)}for(i=t;i=i.parentNode;){if(i===n)return 20;u.push(i)}if(r.reverse(),u.reverse(),r[0]!==u[0])return 1;for(f=-1;f++,r[f]===u[f];);for(n=r[f],t=u[f];n=n.nextSibling;)if(n===t)return 4;return 2},getNodeIndex:function(n,t){for(var i=n,r=0;i=i.previousSibling;){if(t&&i.nodeType==3){i.nodeType!=i.nextSibling.nodeType&&r++;continue}r++}return r},inDoc:function(t,i){return n.getPosition(t,i)==10},findParent:function(t,i,r){if(t&&!n.isBody(t))for(t=r?t:t.parentNode;t;){if(!i||i(t)||n.isBody(t))return i&&!i(t)&&n.isBody(t)?null:t;t=t.parentNode}return null},findParentByTagName:function(i,r,u,f){return r=t.listToMap(t.isArray(r)?r:[r]),n.findParent(i,function(n){return r[n.tagName]&&!(f&&f(n))},u)},findParents:function(t,i,r,u){for(var f=i&&(r&&r(t)||!r)?[t]:[];t=n.findParent(t,r);)f.push(t);return u?f:f.reverse()},insertAfter:function(n,t){return n.nextSibling?n.parentNode.insertBefore(t,n.nextSibling):n.parentNode.appendChild(t)},remove:function(n,t){var i=n.parentNode,r;if(i){if(t&&n.hasChildNodes())while(r=n.firstChild)i.insertBefore(r,n);i.removeChild(n)}return n},getNextDomNode:function(n,t,i,r){return l(n,"firstChild","nextSibling",t,i,r)},getPreDomNode:function(n,t,i,r){return l(n,"lastChild","previousSibling",t,i,r)},isBookmarkNode:function(n){return n.nodeType==1&&n.id&&/^_baidu_bookmark_/i.test(n.id)},getWindow:function(n){var t=n.ownerDocument||n;return t.defaultView||t.parentWindow},getCommonAncestor:function(n,t){if(n===t)return n;for(var u=[n],f=[t],i=n,r=-1;i=i.parentNode;){if(i===t)return i;u.push(i)}for(i=t;i=i.parentNode;){if(i===n)return i;f.push(i)}for(u.reverse(),f.reverse();r++,u[r]===f[r];);return r==0?null:u[r-1]},clearEmptySibling:function(t,i,r){function u(t,i){for(var r;t&&!n.isBookmarkNode(t)&&(n.isEmptyInlineElement(t)||!new RegExp("[^\t\n\r"+n.fillChar+"]").test(t.nodeValue));)r=t[i],n.remove(t),t=r}i||u(t.nextSibling,"nextSibling");r||u(t.previousSibling,"previousSibling")},split:function(t,i){var e=t.ownerDocument,o,u,f;return r.ie&&i==t.nodeValue.length?(o=e.createTextNode(""),n.insertAfter(t,o)):(u=t.splitText(i),r.ie8&&(f=e.createTextNode(""),n.insertAfter(u,f),n.remove(f)),u)},isWhitespace:function(t){return!new RegExp("[^ \t\n\r"+n.fillChar+"]").test(t.nodeValue)},getXY:function(n){for(var t=0,i=0;n.offsetParent;)i+=n.offsetTop,t+=n.offsetLeft,n=n.offsetParent;return{x:t,y:i}},on:function(n,i,r){var o=t.isArray(i)?i:t.trim(i).split(/\s+/),f=o.length,u,e;if(f)while(f--)i=o[f],n.addEventListener?n.addEventListener(i,r,!1):(r._d||(r._d={els:[]}),u=i+r.toString(),e=t.indexOf(r._d.els,n),r._d[u]&&e!=-1||(e==-1&&r._d.els.push(n),r._d[u]||(r._d[u]=function(n){return r.call(n.srcElement,n||window.event)}),n.attachEvent("on"+i,r._d[u])));n=null},un:function(n,i,r){var o=t.isArray(i)?i:t.trim(i).split(/\s+/),f=o.length,u,e;if(f)while(f--)if(i=o[f],n.removeEventListener)n.removeEventListener(i,r,!1);else{u=i+r.toString();try{n.detachEvent("on"+i,r._d?r._d[u]:r)}catch(s){}r._d&&r._d[u]&&(e=t.indexOf(r._d.els,n),e!=-1&&r._d.els.splice(e,1),r._d.els.length==0&&delete r._d[u])}},isSameElement:function(t,i){var h,f,r,u,e,c,s;if(t.tagName!=i.tagName||(h=t.attributes,f=i.attributes,!o&&h.length!=f.length))return!1;for(e=0,c=0,s=0;r=h[s++];){if(r.nodeName=="style")if(r.specified&&e++,n.isSameStyle(t,i))continue;else return!1;if(o)if(r.specified)e++,u=f.getNamedItem(r.nodeName);else continue;else u=i.attributes[r.nodeName];if(!u.specified||r.nodeValue!=u.nodeValue)return!1}if(o){for(s=0;u=f[s++];)u.specified&&c++;if(e!=c)return!1}return!0},isSameStyle:function(n,i){var u=n.style.cssText.replace(/( ?; ?)/g,";").replace(/( ?: ?)/g,":"),f=i.style.cssText.replace(/( ?; ?)/g,";").replace(/( ?: ?)/g,":"),e,o,s;if(r.opera){if(u=n.style,f=i.style,u.length!=f.length)return!1;for(e in u)if(!/^(\d+|csstext)$/i.test(e)&&u[e]!=f[e])return!1;return!0}if(!u||!f)return u==f;if(u=u.split(";"),f=f.split(";"),u.length!=f.length)return!1;for(o=0;s=u[o++];)if(t.indexOf(f,s)==-1)return!1;return!0},isBlockElm:function(t){return t.nodeType==1&&(f.$block[t.tagName]||w[n.getComputedStyle(t,"display")])&&!f.$nonChild[t.tagName]},isBody:function(n){return n&&n.nodeType==1&&n.tagName.toLowerCase()=="body"},breakParent:function(t,i){var r,f=t,o=t,u,e;do{for(f=f.parentNode,u?(r=f.cloneNode(!1),r.appendChild(u),u=r,r=f.cloneNode(!1),r.appendChild(e),e=r):(u=f.cloneNode(!1),e=u.cloneNode(!1));r=o.previousSibling;)u.insertBefore(r,u.firstChild);while(r=o.nextSibling)e.appendChild(r);o=f}while(i!==f);return r=i.parentNode,r.insertBefore(u,i),r.insertBefore(e,i),r.insertBefore(t,e),n.remove(i),t},isEmptyInlineElement:function(t){if(t.nodeType!=1||!f.$removeEmpty[t.tagName])return 0;for(t=t.firstChild;t;){if(n.isBookmarkNode(t)||t.nodeType==1&&!n.isEmptyInlineElement(t)||t.nodeType==3&&!n.isWhitespace(t))return 0;t=t.nextSibling}return 1},trimWhiteTextNode:function(t){function i(i){for(var r;(r=t[i])&&r.nodeType==3&&n.isWhitespace(r);)t.removeChild(r)}i("firstChild");i("lastChild")},mergeChild:function(i,r,u){for(var e,s,o,h=n.getElementsByTagName(i,i.tagName.toLowerCase()),c=0,f;f=h[c++];)if(f.parentNode&&!n.isBookmarkNode(f)){if(f.tagName.toLowerCase()=="span"){if(i===f.parentNode&&(n.trimWhiteTextNode(i),i.childNodes.length==1)){i.style.cssText=f.style.cssText+";"+i.style.cssText;n.remove(f,!0);continue}if(f.style.cssText=i.style.cssText+";"+f.style.cssText,u&&(e=u.style,e))for(e=e.split(";"),s=0;o=e[s++];)f.style[t.cssStyleToDomStyle(o.split(":")[0])]=o.split(":")[1];n.isSameStyle(f,i)&&n.remove(f,!0);continue}n.isSameElement(i,f)&&n.remove(f,!0)}},getElementsByTagName:function(i,r,u){var o,f,s,h,c,l,e;for(u&&t.isString(u)&&(o=u,u=function(t){return n.hasClass(t,o)}),r=t.trim(r).replace(/[ ]{2,}/g," ").split(" "),f=[],s=0;h=r[s++];)for(c=i.getElementsByTagName(h),l=0;e=c[l++];)(!u||u(e))&&f.push(e);return f},mergeToParent:function(t){for(var i=t.parentNode;i&&f.$removeEmpty[i.tagName];){if(i.tagName==t.tagName||i.tagName=="A"){if(n.trimWhiteTextNode(i),i.tagName=="SPAN"&&!n.isSameStyle(i,t)||i.tagName=="A"&&t.tagName=="SPAN")if(i.childNodes.length>1||i!==t.parentNode){t.style.cssText=i.style.cssText+";"+t.style.cssText;i=i.parentNode;continue}else i.style.cssText+=";"+t.style.cssText,i.tagName=="A"&&(i.style.textDecoration="underline");if(i.tagName!="A"){i===t.parentNode&&n.remove(t,!0);break}}i=i.parentNode}},mergeSibling:function(t,i,r){function u(t,i,r){var u;if((u=r[t])&&!n.isBookmarkNode(u)&&u.nodeType==1&&n.isSameElement(r,u)){while(u.firstChild)i=="firstChild"?r.insertBefore(u.lastChild,r.firstChild):r.appendChild(u.firstChild);n.remove(u)}}i||u("previousSibling","firstChild",t);r||u("nextSibling","lastChild",t)},unSelectable:o&&r.ie9below||r.opera?function(n){n.onselectstart=function(){return!1};n.onclick=n.onkeyup=n.onkeydown=function(){return!1};n.unselectable="on";n.setAttribute("unselectable","on");for(var i=0,t;t=n.all[i++];)switch(t.tagName.toLowerCase()){case"iframe":case"textarea":case"input":case"select":break;default:t.unselectable="on";n.setAttribute("unselectable","on")}}:function(n){n.style.MozUserSelect=n.style.webkitUserSelect=n.style.msUserSelect=n.style.KhtmlUserSelect="none"},removeAttributes:function(n,i){var e,u,f;for(i=t.isArray(i)?i:t.trim(i).replace(/[ ]{2,}/g," ").split(" "),e=0;u=i[e++];){u=y[u]||u;switch(u){case"className":n[u]="";break;case"style":n.style.cssText="";f=n.getAttributeNode("style");!r.ie&&f&&n.removeAttributeNode(f)}n.removeAttribute(u)}},createElement:function(t,i,r){return n.setAttributes(t.createElement(i),r)},setAttributes:function(n,t){var i,r;for(i in t)if(t.hasOwnProperty(i)){r=t[i];switch(i){case"class":n.className=r;break;case"style":n.style.cssText=n.style.cssText+";"+r;break;case"innerHTML":n[i]=r;break;case"value":n.value=r;break;default:n.setAttribute(y[i]||i,r)}}return n},getComputedStyle:function(i,u){var e,o,s;if("width height top left".indexOf(u)>-1)return i["offset"+u.replace(/^\w/,function(n){return n.toUpperCase()})]+"px";if(i.nodeType==3&&(i=i.parentNode),r.ie&&r.version<9&&u=="font-size"&&!i.style.fontSize&&!f.$empty[i.tagName]&&!f.$nonChild[i.tagName])return e=i.ownerDocument.createElement("span"),e.style.cssText="padding:0;border:0;font-family:simsun;",e.innerHTML=".",i.appendChild(e),o=e.offsetHeight,i.removeChild(e),e=null,o+"px";try{s=n.getStyle(i,u)||(window.getComputedStyle?n.getWindow(i).getComputedStyle(i,"").getPropertyValue(u):(i.currentStyle||i.style)[t.cssStyleToDomStyle(u)])}catch(h){return""}return t.transUnitToPx(t.fixColor(u,s))},removeClasses:function(i,r){r=t.isArray(r)?r:t.trim(r).replace(/[ ]{2,}/g," ").split(" ");for(var e=0,f,u=i.className;f=r[e++];)u=u.replace(new RegExp("\\b"+f+"\\b"),"");u=t.trim(u).replace(/[ ]{2,}/g," ");u?i.className=u:n.removeAttributes(i,["class"])},addClass:function(n,i){if(n){i=t.trim(i).replace(/[ ]{2,}/g," ").split(" ");for(var f=0,r,u=n.className;r=i[f++];)new RegExp("\\b"+r+"\\b").test(u)||(u+=" "+r);n.className=t.trim(u)}},hasClass:function(n,i){if(t.isRegExp(i))return i.test(n.className);i=t.trim(i).replace(/[ ]{2,}/g," ").split(" ");for(var r=0,u,f=n.className;u=i[r++];)if(!new RegExp("\\b"+u+"\\b","i").test(f))return!1;return r-1==i.length},preventDefault:function(n){n.preventDefault?n.preventDefault():n.returnValue=!1},removeStyle:function(i,u){r.ie?(u=="color"&&(u="(^|;)"+u),i.style.cssText=i.style.cssText.replace(new RegExp(u+"[^:]*:[^;]+;?","ig"),"")):i.style.removeProperty?i.style.removeProperty(u):i.style.removeAttribute(t.cssStyleToDomStyle(u));i.style.cssText||n.removeAttributes(i,["style"])},getStyle:function(n,i){var r=n.style[t.cssStyleToDomStyle(i)];return t.fixColor(i,r)},setStyle:function(n,i,r){n.style[t.cssStyleToDomStyle(i)]=r;t.trim(n.style.cssText)||this.removeAttributes(n,"style")},setStyles:function(t,i){for(var r in i)i.hasOwnProperty(r)&&n.setStyle(t,r,i[r])},removeDirtyAttr:function(n){for(var i=0,t,r=n.getElementsByTagName("*");t=r[i++];)t.removeAttribute("_moz_dirty");n.removeAttribute("_moz_dirty")},getChildCount:function(n,t){var r=0,i=n.firstChild;for(t=t||function(){return 1};i;)t(i)&&r++,i=i.nextSibling;return r},isEmptyNode:function(t){return!t.firstChild||n.getChildCount(t,function(t){return!n.isBr(t)&&!n.isBookmarkNode(t)&&!n.isWhitespace(t)})==0},clearSelectedArr:function(t){for(var i;i=t.pop();)n.removeAttributes(i,["class"])},scrollToView:function(t,i,r){var s=function(){var n=i.document,t=n.compatMode=="CSS1Compat";return{width:(t?n.documentElement.clientWidth:n.body.clientWidth)||0,height:(t?n.documentElement.clientHeight:n.body.clientHeight)||0}},h=function(n){if("pageXOffset"in n)return{x:n.pageXOffset||0,y:n.pageYOffset||0};var t=n.document;return{x:t.documentElement.scrollLeft||t.body.scrollLeft||0,y:t.documentElement.scrollTop||t.body.scrollTop||0}},e=s().height,u=e*-1+r,o,f;u+=t.offsetHeight||0;o=n.getXY(t);u+=o.y;f=h(i).y;(u>f||u<f-e)&&i.scrollTo(0,u+(u<0?-20:20))},isBr:function(n){return n.nodeType==1&&n.tagName=="BR"},isFillChar:function(t,i){if(t.nodeType!=3)return!1;var r=t.nodeValue;return i?new RegExp("^"+n.fillChar).test(r):!r.replace(new RegExp(n.fillChar,"g"),"").length},isStartInblock:function(t){var r=t.cloneRange(),o=0,i=r.startContainer,f,u,e;if(i.nodeType==1&&i.childNodes[r.startOffset])for(i=i.childNodes[r.startOffset],u=i.previousSibling;u&&n.isFillChar(u);)i=u,u=u.previousSibling;for(this.isFillChar(i,!0)&&r.startOffset==1&&(r.setStartBefore(i),i=r.startContainer);i&&n.isFillChar(i);)f=i,i=i.previousSibling;for(f&&(r.setStartBefore(f),i=r.startContainer),i.nodeType==1&&n.isEmptyNode(i)&&r.startOffset==1&&r.setStart(i,0).collapse(!0);!r.startOffset;){if(i=r.startContainer,n.isBlockElm(i)||n.isBody(i)){o=1;break}if(u=r.startContainer.previousSibling,u){while(u&&n.isFillChar(u))e=u,u=u.previousSibling;e?r.setStartBefore(e):r.setStartBefore(r.startContainer)}else r.setStartBefore(r.startContainer)}return o&&!n.isBody(r.startContainer)?1:0},isEmptyBlock:function(t,i){if(t.nodeType!=1||(i=i||new RegExp("[  \t\r\n"+n.fillChar+"]","g"),t[r.ie?"innerText":"textContent"].replace(i,"").length>0))return 0;for(var u in f.$isNotEmpty)if(t.getElementsByTagName(u).length)return 0;return 1},setViewportOffset:function(n,t){var f=parseInt(n.style.left)|0,e=parseInt(n.style.top)|0,i=n.getBoundingClientRect(),r=t.left-i.left,u=t.top-i.top;r&&(n.style.left=f+r+"px");u&&(n.style.top=e+u+"px")},fillNode:function(t,i){var u=r.ie?t.createTextNode(n.fillChar):t.createElement("br");i.innerHTML="";i.appendChild(u)},moveChild:function(n,t,i){while(n.firstChild)i&&t.firstChild?t.insertBefore(n.lastChild,t.firstChild):t.appendChild(n.firstChild)},hasNoAttributes:function(n){return r.ie?/^<\w+\s*?>/.test(n.outerHTML):n.attributes.length==0},isCustomeNode:function(n){return n.nodeType==1&&n.getAttribute("_ue_custom_node_")},isTagNode:function(n,t){return n.nodeType==1&&new RegExp("\\b"+n.tagName+"\\b","i").test(t)},filterNodeList:function(n,i,r){var u=[],f;return t.isFunction(i)||(f=i,i=function(n){return t.indexOf(t.isArray(f)?f:f.split(" "),n.tagName.toLowerCase())!=-1}),t.each(n,function(n){i(n)&&u.push(n)}),u.length==0?null:u.length==1||!r?u[0]:u},isInNodeEndBoundary:function(n,t){var i=n.startContainer;if(i.nodeType==3&&n.startOffset!=i.nodeValue.length||i.nodeType==1&&n.startOffset!=i.childNodes.length)return 0;while(i!==t){if(i.nextSibling)return 0;i=i.parentNode}return 1},isBoundaryNode:function(t,i){for(var r;!n.isBody(t);)if(r=t,t=t.parentNode,r!==t[i])return!1;return!0},fillHtml:r.ie11below?"&nbsp;":"<br/>"},h=new RegExp(n.fillChar,"g");(function(){function p(n){n.collapsed=n.startContainer&&n.endContainer&&n.startContainer===n.endContainer&&n.startOffset==n.endOffset}function l(n){return!n.collapsed&&n.startContainer.nodeType==1&&n.startContainer===n.endContainer&&n.endOffset-n.startOffset==1}function a(t,i,r,u){return i.nodeType==1&&(f.$empty[i.tagName]||f.$nonChild[i.tagName])&&(r=n.getNodeIndex(i)+(t?0:1),i=i.parentNode),t?(u.startContainer=i,u.startOffset=r,u.endContainer||u.collapse(!0)):(u.endContainer=i,u.endOffset=r,u.startContainer||u.collapse(!1)),p(u),u}function s(t,i){var r=t.startContainer,o=t.endContainer,s=t.startOffset,w=t.endOffset,l=t.document,b=l.createDocumentFragment(),k,d,f,y,h,p;if(r.nodeType==1&&(r=r.childNodes[s]||(k=r.appendChild(l.createTextNode("")))),o.nodeType==1&&(o=o.childNodes[w]||(d=o.appendChild(l.createTextNode("")))),r===o&&r.nodeType==3)return b.appendChild(l.createTextNode(r.substringData(s,w-s))),i&&(r.deleteData(s,w-s),t.collapse(!0)),b;var u,a,e=b,c=n.findParents(r,!0),v=n.findParents(o,!0);for(f=0;c[f]==v[f];)f++;for(h=f;y=c[h];h++){for(u=y.nextSibling,y==r?k||(t.startContainer.nodeType==3?(e.appendChild(l.createTextNode(r.nodeValue.slice(s))),i&&r.deleteData(s,r.nodeValue.length-s)):e.appendChild(i?r:r.cloneNode(!0))):(a=y.cloneNode(!1),e.appendChild(a));u;){if(u===o||u===v[h])break;y=u.nextSibling;e.appendChild(i?u:u.cloneNode(!0));u=y}e=a}for(e=b,c[f]||(e.appendChild(c[f-1].cloneNode(!1)),e=e.firstChild),h=f;p=v[h];h++){if(u=p.previousSibling,p==o?d||t.endContainer.nodeType!=3||(e.appendChild(l.createTextNode(o.substringData(0,w))),i&&o.deleteData(0,w)):(a=p.cloneNode(!1),e.appendChild(a)),h!=f||!c[f])while(u){if(u===r)break;p=u.previousSibling;e.insertBefore(i?u:u.cloneNode(!0),e.firstChild);u=p}e=a}return i&&t.setStartBefore(v[f]?c[f]?v[f]:c[f-1]:v[f-1]).collapse(!0),k&&n.remove(k),d&&n.remove(d),b}function y(t,u){try{if(i&&n.inDoc(i,t))if(i.nodeValue.replace(h,"").length)i.nodeValue=i.nodeValue.replace(h,"");else{var f=i.parentNode;for(n.remove(i);f&&n.isEmptyInlineElement(f)&&(r.safari?!(n.getPosition(f,u)&n.POSITION_CONTAINS):!f.contains(u));)i=f.parentNode,n.remove(f),f=i}}catch(e){}}function u(t,i){var r;for(t=t[i];t&&n.isFillChar(t);)r=t[i],n.remove(t),t=r}var c=0,o=n.fillChar,i,v=e.Range=function(n){var t=this;t.startContainer=t.startOffset=t.endContainer=t.endOffset=null;t.document=n;t.collapsed=!0};v.prototype={cloneContents:function(){return this.collapsed?null:s(this,0)},deleteContents:function(){var t;return this.collapsed||s(this,1),r.webkit&&(t=this.startContainer,t.nodeType!=3||t.nodeValue.length||(this.setStartBefore(t).collapse(!0),n.remove(t))),this},extractContents:function(){return this.collapsed?null:s(this,2)},setStart:function(n,t){return a(!0,n,t,this)},setEnd:function(n,t){return a(!1,n,t,this)},setStartAfter:function(t){return this.setStart(t.parentNode,n.getNodeIndex(t)+1)},setStartBefore:function(t){return this.setStart(t.parentNode,n.getNodeIndex(t))},setEndAfter:function(t){return this.setEnd(t.parentNode,n.getNodeIndex(t)+1)},setEndBefore:function(t){return this.setEnd(t.parentNode,n.getNodeIndex(t))},setStartAtFirst:function(n){return this.setStart(n,0)},setStartAtLast:function(n){return this.setStart(n,n.nodeType==3?n.nodeValue.length:n.childNodes.length)},setEndAtFirst:function(n){return this.setEnd(n,0)},setEndAtLast:function(n){return this.setEnd(n,n.nodeType==3?n.nodeValue.length:n.childNodes.length)},selectNode:function(n){return this.setStartBefore(n).setEndAfter(n)},selectNodeContents:function(n){return this.setStart(n,0).setEndAtLast(n)},cloneRange:function(){var n=this;return new v(n.document).setStart(n.startContainer,n.startOffset).setEnd(n.endContainer,n.endOffset)},collapse:function(n){var t=this;return n?(t.endContainer=t.startContainer,t.endOffset=t.startOffset):(t.startContainer=t.endContainer,t.startOffset=t.endOffset),t.collapsed=!0,t},shrinkBoundary:function(t){function u(t){return t.nodeType==1&&!n.isBookmarkNode(t)&&!f.$empty[t.tagName]&&!f.$nonChild[t.tagName]}for(var i=this,r,e=i.collapsed;i.startContainer.nodeType==1&&(r=i.startContainer.childNodes[i.startOffset])&&u(r);)i.setStart(r,0);if(e)return i.collapse(!0);if(!t)while(i.endContainer.nodeType==1&&i.endOffset>0&&(r=i.endContainer.childNodes[i.endOffset-1])&&u(r))i.setEnd(r,r.childNodes.length);return i},getCommonAncestor:function(t,i){var u=this,r=u.startContainer,f=u.endContainer;return r===f?t&&l(this)&&(r=r.childNodes[u.startOffset],r.nodeType==1)?r:i&&r.nodeType==3?r.parentNode:r:n.getCommonAncestor(r,f)},trimBoundary:function(t){var f;this.txtToElmBoundary();var u=this.startContainer,i=this.startOffset,e=this.collapsed,r=this.endContainer;return u.nodeType==3&&(i==0?this.setStartBefore(u):i>=u.nodeValue.length?this.setStartAfter(u):(f=n.split(u,i),u===r?this.setEnd(f,this.endOffset-i):u.parentNode===r&&(this.endOffset+=1),this.setStartBefore(f)),e)?this.collapse(!0):(t||(i=this.endOffset,r=this.endContainer,r.nodeType==3&&(i==0?this.setEndBefore(r):(i<r.nodeValue.length&&n.split(r,i),this.setEndAfter(r)))),this)},txtToElmBoundary:function(n){function t(n,t){var i=n[t+"Container"],r=n[t+"Offset"];i.nodeType==3&&(r?r>=i.nodeValue.length&&n["set"+t.replace(/(\w)/,function(n){return n.toUpperCase()})+"After"](i):n["set"+t.replace(/(\w)/,function(n){return n.toUpperCase()})+"Before"](i))}return(n||!this.collapsed)&&(t(this,"start"),t(this,"end")),this},insertNode:function(n){var t=n,r=1;n.nodeType==11&&(t=n.firstChild,r=n.childNodes.length);this.trimBoundary(!0);var i=this.startContainer,f=this.startOffset,u=i.childNodes[f];return u?i.insertBefore(n,u):i.appendChild(n),t.parentNode===this.endContainer&&(this.endOffset=this.endOffset+r),this.setStartBefore(t)},setCursor:function(n,t){return this.collapse(!n).select(t)},createBookmark:function(n,t){var i,r=this.document.createElement("span");return r.style.cssText="display:none;line-height:0px;",r.appendChild(this.document.createTextNode("‍")),r.id="_baidu_bookmark_start_"+(t?"":c++),this.collapsed||(i=r.cloneNode(!0),i.id="_baidu_bookmark_end_"+(t?"":c++)),this.insertNode(r),i&&this.collapse().insertNode(i).setEndBefore(i),this.setStartAfter(r),{start:n?r.id:r,end:i?n?i.id:i:null,id:n}},moveToBookmark:function(t){var r=t.id?this.document.getElementById(t.start):t.start,i=t.end&&t.id?this.document.getElementById(t.end):t.end;return this.setStartBefore(r),n.remove(r),i?(this.setEndBefore(i),n.remove(i)):this.collapse(!0),this},enlarge:function(t,i){var e=n.isBody,u,r,f=this.document.createTextNode("");if(t){for(r=this.startContainer,r.nodeType==1?r.childNodes[this.startOffset]?u=r=r.childNodes[this.startOffset]:(r.appendChild(f),u=r=f):u=r;;){if(n.isBlockElm(r)){for(r=u;(u=r.previousSibling)&&!n.isBlockElm(u);)r=u;this.setStartBefore(r);break}u=r;r=r.parentNode}for(r=this.endContainer,r.nodeType==1?((u=r.childNodes[this.endOffset])?r.insertBefore(f,u):r.appendChild(f),u=r=f):u=r;;){if(n.isBlockElm(r)){for(r=u;(u=r.nextSibling)&&!n.isBlockElm(u);)r=u;this.setEndAfter(r);break}u=r;r=r.parentNode}f.parentNode===this.endContainer&&this.endOffset--;n.remove(f)}if(!this.collapsed){while(this.startOffset==0){if(i&&i(this.startContainer))break;if(e(this.startContainer))break;this.setStartBefore(this.startContainer)}while(this.endOffset==(this.endContainer.nodeType==1?this.endContainer.childNodes.length:this.endContainer.nodeValue.length)){if(i&&i(this.endContainer))break;if(e(this.endContainer))break;this.setEndAfter(this.endContainer)}}return this},enlargeToBlockElm:function(t){while(!n.isBlockElm(this.startContainer))this.setStartBefore(this.startContainer);if(!t)while(!n.isBlockElm(this.endContainer))this.setEndAfter(this.endContainer);return this},adjustmentBoundary:function(){if(!this.collapsed){while(!n.isBody(this.startContainer)&&this.startOffset==this.startContainer[this.startContainer.nodeType==3?"nodeValue":"childNodes"].length&&this.startContainer[this.startContainer.nodeType==3?"nodeValue":"childNodes"].length)this.setStartAfter(this.startContainer);while(!n.isBody(this.endContainer)&&!this.endOffset&&this.endContainer[this.endContainer.nodeType==3?"nodeValue":"childNodes"].length)this.setEndBefore(this.endContainer)}return this},applyInlineStyle:function(t,i,r){var p,u,s,w,b,k,v;if(this.collapsed)return this;this.trimBoundary().enlarge(!1,function(t){return t.nodeType==1&&n.isBlockElm(t)}).adjustmentBoundary();for(var c=this.createBookmark(),l=c.end,a=function(t){return t.nodeType==1?t.tagName.toLowerCase()!="br":!n.isWhitespace(t)},o=n.getNextDomNode(c.start,!1,a),e,y,h=this.cloneRange();o&&n.getPosition(o,l)&n.POSITION_PRECEDING;)if(o.nodeType==3||f[t][o.tagName]){for(h.setStartBefore(o),e=o;e&&(e.nodeType==3||f[t][e.tagName])&&e!==l;)y=e,e=n.getNextDomNode(e,e.nodeType==1,null,function(n){return f[t][n.tagName]});if(p=h.setEndAfter(y).extractContents(),r&&r.length>0){for(w=s=r[0].cloneNode(!1),b=1;k=r[b++];)s.appendChild(k.cloneNode(!1)),s=s.firstChild;u=s}else u=h.document.createElement(t);if(i&&n.setAttributes(u,i),u.appendChild(p),h.insertNode(r?w:u),t=="span"&&i.style&&/text\-decoration/.test(i.style)&&(v=n.findParentByTagName(u,"a",!0))?(n.setAttributes(v,i),n.remove(u,!0),u=v):(n.mergeSibling(u),n.clearEmptySibling(u)),n.mergeChild(u,i),o=n.getNextDomNode(u,!1,a),n.mergeToParent(u),e===l)break}else o=n.getNextDomNode(o,!0,a);return this.moveToBookmark(c)},removeInlineStyle:function(i){var r,u,f,s,o,e,h;if(this.collapsed)return this;for(i=t.isArray(i)?i:[i],this.shrinkBoundary().adjustmentBoundary(),r=this.startContainer,u=this.endContainer;;){if(r.nodeType==1){if(t.indexOf(i,r.tagName.toLowerCase())>-1)break;if(r.tagName.toLowerCase()=="body"){r=null;break}}r=r.parentNode}for(;;){if(u.nodeType==1){if(t.indexOf(i,u.tagName.toLowerCase())>-1)break;if(u.tagName.toLowerCase()=="body"){u=null;break}}u=u.parentNode}for(f=this.createBookmark(),r&&(o=this.cloneRange().setEndBefore(f.start).setStartBefore(r),s=o.extractContents(),o.insertNode(s),n.clearEmptySibling(r,!0),r.parentNode.insertBefore(f.start,r)),u&&(o=this.cloneRange().setStartAfter(f.end).setEndAfter(u),s=o.extractContents(),o.insertNode(s),n.clearEmptySibling(u,!1,!0),u.parentNode.insertBefore(f.end,u.nextSibling)),e=n.getNextDomNode(f.start,!1,function(n){return n.nodeType==1});e&&e!==f.end;)h=n.getNextDomNode(e,!0,function(n){return n.nodeType==1}),t.indexOf(i,e.tagName.toLowerCase())>-1&&n.remove(e,!0),e=h;return this.moveToBookmark(f)},getClosedNode:function(){var i,t,n;return this.collapsed||(t=this.cloneRange().adjustmentBoundary().shrinkBoundary(),l(t)&&(n=t.startContainer.childNodes[t.startOffset],n&&n.nodeType==1&&(f.$empty[n.tagName]||f.$nonChild[n.tagName])&&(i=n))),i},select:r.ie?function(t,r){var f,l,h,e,v,a,c,s;if(this.collapsed||this.shrinkBoundary(),l=this.getClosedNode(),l&&!r){try{f=this.document.body.createControlRange();f.addElement(l);f.select()}catch(p){}return this}h=this.createBookmark();e=h.start;f=this.document.body.createTextRange();f.moveToElementText(e);f.moveStart("character",1);this.collapsed?t||this.startContainer.nodeType==3||(c=this.document.createTextNode(o),s=this.document.createElement("span"),s.appendChild(this.document.createTextNode(o)),e.parentNode.insertBefore(s,e),e.parentNode.insertBefore(c,e),y(this.document,c),i=c,u(s,"previousSibling"),u(e,"nextSibling"),f.moveStart("character",-1),f.collapse(!0)):(a=this.document.body.createTextRange(),v=h.end,a.moveToElementText(v),f.setEndPoint("EndToEnd",a));this.moveToBookmark(h);s&&n.remove(s);try{f.select()}catch(p){}return this}:function(t){function a(n){function t(t,i,r){t.nodeType==3&&t.nodeValue.length<i&&(n[r+"Offset"]=t.nodeValue.length)}t(n.startContainer,n.startOffset,"start");t(n.endContainer,n.endOffset,"end")}var l=n.getWindow(this.document),c=l.getSelection(),e,s,h,f;if(r.gecko?this.document.body.focus():l.focus(),c){if(c.removeAllRanges(),this.collapsed&&!t&&(s=this.startContainer,f=s,s.nodeType==1&&(f=s.childNodes[this.startOffset]),s.nodeType==3&&this.startOffset||(f?f.previousSibling&&f.previousSibling.nodeType==3:s.lastChild&&s.lastChild.nodeType==3)||(e=this.document.createTextNode(o),this.insertNode(e),y(this.document,e),u(e,"previousSibling"),u(e,"nextSibling"),i=e,this.setStart(e,r.webkit?1:0).collapse(!0))),h=this.document.createRange(),this.collapsed&&r.opera&&this.startContainer.nodeType==1)if(f=this.startContainer.childNodes[this.startOffset],f){while(f&&n.isBlockElm(f))if(f.nodeType==1&&f.childNodes[0])f=f.childNodes[0];else break;f&&this.setStartBefore(f).collapse(!0)}else f=this.startContainer.lastChild,f&&n.isBr(f)&&this.setStartBefore(f).collapse(!0);a(this);h.setStart(this.startContainer,this.startOffset);h.setEnd(this.endContainer,this.endOffset);c.addRange(h)}return this},scrollToView:function(t,i){t=t?window:n.getWindow(this.document);var u=this,r=u.document.createElement("span");return r.innerHTML="&nbsp;",u.cloneRange().insertNode(r),n.scrollToView(r,t,i),n.remove(r),u},inFillChar:function(){var t=this.startContainer;return this.collapsed&&t.nodeType==3&&t.nodeValue.replace(new RegExp("^"+n.fillChar),"").length+1==t.nodeValue.length?!0:!1},createAddress:function(t,i){function f(t){for(var e,o,u,f=t?r.startContainer:r.endContainer,l=n.findParents(f,!0,function(t){return!n.isBody(t)}),s=[],a=0,c;c=l[a++];)s.push(n.getNodeIndex(c,i));if(e=0,i)if(f.nodeType==3){for(o=f.previousSibling;o&&o.nodeType==3;)e+=o.nodeValue.replace(h,"").length,o=o.previousSibling;e+=t?r.startOffset:r.endOffset}else if(f=f.childNodes[t?r.startOffset:r.endOffset],f)e=n.getNodeIndex(f,i);else for(f=t?r.startContainer:r.endContainer,u=f.firstChild;u;){if(n.isFillChar(u)){u=u.nextSibling;continue}if(e++,u.nodeType==3)while(u&&u.nodeType==3)u=u.nextSibling;else u=u.nextSibling}else e=t?n.isFillChar(f)?0:r.startOffset:r.endOffset;return e<0&&(e=0),s.push(e),s}var u={},r=this;return u.startAddress=f(!0),t||(u.endAddress=r.collapsed?[].concat(u.startAddress):f()),u},moveToAddress:function(n,t){function r(n,t){for(var r=i.document.body,u,f,e=0,o,s=n.length;e<s;e++)if(o=n[e],u=r,r=r.childNodes[o],!r){f=o;break}t?r?i.setStartBefore(r):i.setStart(u,f):r?i.setEndBefore(r):i.setEnd(u,f)}var i=this;return r(n.startAddress,!0),!t&&n.endAddress&&r(n.endAddress),i},equals:function(n){for(var t in this)if(this.hasOwnProperty(t)&&this[t]!==n[t])return!1;return!0},traversal:function(t,i){var e;if(this.collapsed)return this;for(var u=this.createBookmark(),f=u.end,r=n.getNextDomNode(u.start,!1,i);r&&r!==f&&n.getPosition(r,f)&n.POSITION_PRECEDING;)e=n.getNextDomNode(r,!1,i),t(r),r=e;return this.moveToBookmark(u)}}})(),function(){function i(t,i){var l=n.getNodeIndex,e,o,y,p;if(t=t.duplicate(),t.collapse(i),e=t.parentElement(),!e.hasChildNodes())return{container:e,offset:0};for(var s=e.children,r,h=t.duplicate(),a=0,v=s.length-1,c=-1,u;a<=v;)if(c=Math.floor((a+v)/2),r=s[c],h.moveToElementText(r),o=h.compareEndPoints("StartToStart",t),o>0)v=c-1;else if(o<0)a=c+1;else return{container:e,offset:l(r)};if(c==-1){if(h.moveToElementText(e),h.setEndPoint("StartToStart",t),u=h.text.replace(/(\r\n|\r)/g,"\n").length,s=e.childNodes,!u)return r=s[s.length-1],{container:r,offset:r.nodeValue.length};for(y=s.length;u>0;)u-=s[--y].nodeValue.length;return{container:s[y],offset:-u}}if(h.collapse(o>0),h.setEndPoint(o>0?"StartToStart":"EndToStart",t),u=h.text.replace(/(\r\n|\r)/g,"\n").length,!u)return f.$empty[r.tagName]||f.$nonChild[r.tagName]?{container:e,offset:l(r)+(o>0?0:1)}:{container:r,offset:o>0?0:r.childNodes.length};while(u>0)try{p=r;r=r[o>0?"previousSibling":"nextSibling"];u-=r.nodeValue.length}catch(w){return{container:e,offset:l(p)}}return{container:r,offset:o>0?-u:r.nodeValue.length+u}}function o(n,t){if(n.item)t.selectNode(n.item(0));else{var r=i(n,!0);t.setStart(r.container,r.offset);n.compareEndPoints("StartToEnd",n)!=0&&(r=i(n,!1),t.setEnd(r.container,r.offset))}return t}function t(n){var t,i;try{t=n.getNative().createRange()}catch(r){return null}return(i=t.item?t.item(0):t.parentElement(),(i.ownerDocument||i)===n.document)?t:null}var s=e.Selection=function(i){var u=this,f;if(u.document=i,r.ie9below){f=n.getWindow(i).frameElement;n.on(f,"beforedeactivate",function(){u._bakIERange=u.getIERange()});n.on(f,"activate",function(){try{!t(u)&&u._bakIERange&&u._bakIERange.select()}catch(n){}u._bakIERange=null})}f=i=null};s.prototype={rangeInBody:function(t,i){var u=r.ie9below||i?t.item?t.item():t.parentElement():t.startContainer;return u===this.document.body||n.inDoc(u,this.document)},getNative:function(){var t=this.document;try{return t?r.ie9below?t.selection:n.getWindow(t).getSelection():null}catch(i){return null}},getIERange:function(){var n=t(this);return!n&&this._bakIERange?this._bakIERange:n},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 t=this.getStart();return t?n.findParents(t,!0,null,!0):[]},clear:function(){this._cachedStartElementPath=this._cachedRange=this._cachedStartElement=null},isFocus:function(){try{if(r.ie9below){var n=t(this);return!!(n&&this.rangeInBody(n))}return!!this.getNative().rangeCount}catch(i){return!1}},getRange:function(){function e(n){for(var t=i.document.body.firstChild,r=n.collapsed;t&&t.firstChild;)n.setStart(t,0),t=t.firstChild;n.startContainer||n.setStart(i.document.body,0);r&&n.collapse(!0)}var i=this,t,s,f,h,c;if(i._cachedRange!=null)return this._cachedRange;if(t=new u.editor.dom.Range(i.document),r.ie9below)if(s=i.getIERange(),s)try{o(s,t)}catch(l){e(t)}else e(t);else if(f=i.getNative(),f&&f.rangeCount)h=f.getRangeAt(0),c=f.getRangeAt(f.rangeCount-1),t.setStart(h.startContainer,h.startOffset).setEnd(c.endContainer,c.endOffset),t.collapsed&&n.isBody(t.startContainer)&&!t.startOffset&&e(t);else{if(this._bakRange&&n.inDoc(this._bakRange.startContainer,this.document))return this._bakRange;e(t)}return this._bakRange=t},getStart:function(){if(this._cachedStartElement)return this._cachedStartElement;var t=r.ie9below?this.getIERange():this.getRange(),i,n,u,f;if(r.ie9below){if(!t)return this.document.body.firstChild;if(t.item)return t.item(0);for(i=t.duplicate(),i.text.length>0&&i.moveStart("character",1),i.collapse(1),n=i.parentElement(),f=u=t.parentElement();u=u.parentNode;)if(u==n){n=f;break}}else if(t.shrinkBoundary(),n=t.startContainer,n.nodeType==1&&n.hasChildNodes()&&(n=n.childNodes[Math.min(n.childNodes.length-1,t.startOffset)]),n.nodeType==3)return n.parentNode;return n},getText:function(){var n,t;return this.isFocus()&&(n=this.getNative())?(t=r.ie9below?n.createRange():n.getRangeAt(0),r.ie9below?t.text:t.toString()):""},clearRange:function(){this.getNative()[r.ie9below?"empty":"removeAllRanges"]()}}}(),function(){function i(i,r){var u,e,f,o;if(r.textarea)if(t.isString(r.textarea)){for(e=0,o=n.getElementsByTagName(i,"textarea");f=o[e++];)if(f.id=="ueditor_textarea_"+r.options.textarea){u=f;break}}else u=r.textarea;u||(i.appendChild(u=n.createElement(document,"textarea",{name:r.options.textarea,id:"ueditor_textarea_"+r.options.textarea,style:"display:none"})),r.textarea=u);u.getAttribute("name")||u.setAttribute("name",r.options.textarea);u.value=r.hasContents()?r.options.allHtmlEnabled?r.getAllHtml():r.getContent(null,null,!0):""}function a(n){for(var t in n)return t}function h(n){n.langIsReady=!0;n.fireEvent("langReady")}var l=0,s,u=UE.Editor=function(n){var i=this;i.uid=l++;c.call(i);i.commands={};i.options=t.extend(t.clone(n||{}),UEDITOR_CONFIG,!0);i.shortcutkeys={};i.inputRules=[];i.outputRules=[];i.setOpt(u.defaultOptions(i));i.loadServerConfig();t.isEmptyObject(UE.I18N)?t.loadFile(document,{src:i.options.langPath+i.options.lang+"/"+i.options.lang+".js",tag:"script",type:"text/javascript",defer:"defer"},function(){UE.plugin.load(i);h(i)}):(i.options.lang=a(UE.I18N),UE.plugin.load(i),h(i));UE.instants["ueditorInstant"+i.uid]=i};u.prototype={registerCommand:function(n,t){this.commands[n]=t},ready:function(n){var t=this;n&&(t.isReady?n.apply(t):t.addListener("ready",n))},setOpt:function(n,i){var r={};t.isString(n)?r[n]=i:r=n;t.extend(this.options,r,!0)},getOpt:function(n){return this.options[n]},destroy:function(){var t=this,r,i,f,u;t.fireEvent("destroy");r=t.container.parentNode;i=t.textarea;i?i.style.display="":(i=document.createElement("textarea"),r.parentNode.insertBefore(i,r));i.style.width=t.iframe.offsetWidth+"px";i.style.height=t.iframe.offsetHeight+"px";i.value=t.getContent();i.id=t.key;r.innerHTML="";n.remove(r);f=t.key;for(u in t)t.hasOwnProperty(u)&&delete this[u];UE.delEditor(f)},render:function(i){var e=this,u=e.options,f=function(t){return parseInt(n.getComputedStyle(i,t))},s;t.isString(i)&&(i=document.getElementById(i));i&&(u.minFrameWidth=u.initialFrameWidth?u.initialFrameWidth:u.initialFrameWidth=i.offsetWidth,u.initialFrameHeight?u.minFrameHeight=u.initialFrameHeight:u.initialFrameHeight=u.minFrameHeight=i.offsetHeight,i.style.width=/%$/.test(u.initialFrameWidth)?"100%":u.initialFrameWidth-f("padding-left")-f("padding-right")+"px",i.style.height=/%$/.test(u.initialFrameHeight)?"100%":u.initialFrameHeight-f("padding-top")-f("padding-bottom")+"px",i.style.zIndex=u.zIndex,s=(o&&r.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-wo