UNPKG

ecui

Version:

Enterprise Classic User Interface.

1 lines 86.8 kB
var ecui;(()=>{var u,s,n,i,o,r,a,t=(c=ecui={}).array={},e=c.dom={},l=(c.ext={},c.json={}),h=c.string={},c=(c.ui={},c.util={}),d=window,g=document,f=Date,O=Function,p=Math,_=RegExp,W=p.abs,m=p.floor,$=p.max,v=parseInt,y=isNaN,b=navigator.userAgent,C="CSS1Compat"==g.compatMode,S=/msie (\d+\.\d)/i.test(b)?g.documentMode||+_.$1:u,T=/firefox\/(\d+\.\d)/i.test(b)?+_.$1:u,w=/opera\/(\d+\.\d)/i.test(b)?+_.$1:u,p=/(\d+\.\d)(\.\d)?\s+safari/i.test(b)&&!/chrome/i.test(b)?+_.$1:u,x={utf8:{byteLength:function(t){return t.replace(/[\x80-\u07ff]/g," ").replace(/[\u0800-\uffff]/g," ").length},codeLength:function(t){return 2047<t?3:127<t?2:1}},gbk:{byteLength:function(t){return t.replace(/[\x80-\uffff]/g," ").length},codeLength:function(t){return 127<t?2:1}},"":{byteLength:function(t){return t.length},codeLength:function(t){return 1}}},E={display:S<8?{get:function(t,e){return"inline"==e.display&&1==e.zoom?"inline-block":e.display},set:function(t,e){"inline-block"==e&&(e="inline",t.style.zoom=1),t.style.display=e}}:T<3?{get:function(t,e){return"-moz-inline-box"==e.display?"inline-block":e.display},set:function(t,e){t.style.display="inline-block"==e?"-moz-inline-box":e}}:u,opacity:S?{get:function(t,e){return/alpha\(opacity=(\d+)/.test(e.filter)?+_.$1/100+"":"1"},set:function(t,e){t.style.filter=t.style.filter.replace(/alpha\([^\)]*\)/gi,"")+"alpha(opacity="+100*e+")"}}:u,float:S?"styleFloat":"cssFloat"},L=(t.indexOf=function(t,e){for(var i=t.length;i--&&t[i]!==e;);return i},t.remove=function(t,e){for(var i=t.length;i--;)t[i]===e&&t.splice(i,1)},e.addClass=function(t,e){t.className+=" "+e},e.children=function(t){for(var e=[],i=t.firstChild;i;i=i.nextSibling)1==i.nodeType&&e.push(i);return e},e.contain=T?function(t,e){return t==e||!!(16&t.compareDocumentPosition(e))}:function(t,e){return t.contains(e)},e.create=function(t,e,i){return i=g.createElement(i||"DIV"),t&&(i.className=t),e&&(i.style.cssText=e),i}),A=(e.first=function(t){return M(t.firstChild,"nextSibling")},e.getAttribute=S<8?function(t,e){return t[e]}:function(t,e){return t.getAttribute(e)}),B=e.getParent=S?function(t){return t.parentElement}:function(t){return t.parentNode},P=(e.getPosition=function(t){var e=0,i=0,s=g.body,n=B(s);if(S)C||(o=P(s),y(e=v(o.borderTopWidth))&&(e=-2),y(i=v(o.borderLeftWidth))&&(i=-2)),o=t.getBoundingClientRect(),e+=n.scrollTop+s.scrollTop-n.clientTop+m(o.top),i+=n.scrollLeft+s.scrollLeft-n.clientLeft+m(o.left);else if(t==s)e=n.scrollTop+s.scrollTop,i=n.scrollLeft+s.scrollLeft;else if(t!=n){for(o=t;o;o=o.offsetParent)e+=o.offsetTop,i+=o.offsetLeft;(w||/webkit/i.test(b)&&"absolute"==P(t,"position"))&&(e-=s.offsetTop);for(var o=B(t),r=P(t);o!=s;o=B(o),r=t)i-=o.scrollLeft,w?"TR"!=o.tagName&&(e-=o.scrollTop):(t=P(o),n=T&&"visible"!=t.overflow&&"absolute"==r.position?2:1,e+=F(t.borderTopWidth)*n-o.scrollTop,i+=F(t.borderLeftWidth)*n)}return{top:e,left:i}},e.getStyle=function(t,e){var i=E[e],s=t.currentStyle||(S?t.style:getComputedStyle(t,null));return e?i&&i.get?i.get(t,s):s[i||e]:s}),N=(e.getText=T?function(t){return t.textContent}:function(t){return t.innerText},e.insertAfter=function(t,e){var i=B(e);return i?i.insertBefore(t,e.nextSibling):H(t)},e.insertBefore=function(t,e){var i=B(e);return i?i.insertBefore(t,e):H(t)},e.insertHTML=T?function(t,e,i){var s={AFTERBEGIN:"selectNodeContents",BEFOREEND:"selectNodeContents",BEFOREBEGIN:"setStartBefore",AFTEREND:"setEndAfter"}[e.toUpperCase()],n=g.createRange();n[s](t),n.collapse(9<e.length),n.insertNode(n.createContextualFragment(i))}:function(t,e,i){t.insertAdjacentHTML(e,i)}),H=(e.last=function(t){return M(t.lastChild,"previousSibling")},e.empty=function(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t},e.moveElements=function(t,e,i){for(var s=t.firstChild;s;s=t)t=s.nextSibling,!i&&1!=s.nodeType||e.appendChild(s)},e.next=function(t){return M(t.nextSibling,"nextSibling")},e.remove=function(t){var e=B(t);return e&&e.removeChild(t),t}),D=(e.removeClass=function(t,e){for(var i=t.className.split(/\s+/).sort(),s=e.split(/\s+/).sort(),n=i.length,o=s.length;n&&o;)i[n-1]==s[o-1]?i.splice(--n,1):i[n-1]<s[o-1]?o--:n--;t.className=i.join(" ")},e.setInput=function(t,e,i){if(!t)if("textarea"==i)t=L("","","textarea");else{if(S<9)return L("","",'<input type="'+(i||"")+'" name="'+(e||"")+'">');t=L("","","input")}return e=e===u?t.name:e,i=i===u?t.type:i,t.name==e&&t.type==i||(S&&"textarea"!=i||t.type!=i&&("textarea"==t.type||"textarea"==i)?(N(t,"AFTEREND","<"+("textarea"==i?"textarea":'input type="'+i+'"')+' name="'+e+'" class="'+t.className+'" style="'+t.style.cssText+'" '+(t.disabled?"disabled":"")+(t.readOnly?" readOnly":"")+">"),(t=(e=t).nextSibling).value=e.value,"radio"==i&&(t.checked=e.checked),H(e)):(t.type=i,t.name=e)),t},e.setStyle=function(t,e,i){var s=E[e];s&&s.set?s.set(t,i):t.style[s||e]=i}),z=(e.setStyles=function(t,e){for(var i in e||{})D(t,i,e[i]);return t},e.setText=T?function(t,e){t.textContent=e}:function(t,e){t.innerText=e},l.parse=function(t){return new Function("return ("+t+")")()},l.stringify=(a={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},function(t){switch(typeof t){case"undefined":case"function":case"unknown":return u;case"number":if(!isFinite(t))return"null";case"boolean":return t.toString();case"string":return Y(t);default:if(null===t)return"null";if(t instanceof Array){for(var e,i=t,s=0,n=[],s=(i.length,0),n=[],o=i.length;s<o;s++)(e=z(i[s]))!==u&&n.push(e);return"["+n.join(",")+"]"}if(t instanceof Date)return'"'+(h=t).getFullYear()+"-"+k(h.getMonth()+1)+"-"+k(h.getDate())+"T"+k(h.getHours())+":"+k(h.getMinutes())+":"+k(h.getSeconds())+'"';var r,a,l=[];for(a in t)(r=z(t[a]))!==u&&l.push(Y(a)+":"+r);return"{"+l.join(",")+"}"}var h})),t=(h.decodeHTML=(r={quot:'"',lt:"<",gt:">",amp:"&"},function(t){return t.replace(/&(quot|lt|gt|amp|#([\d]+));/g,function(t,e,i){return r[e]||String.fromCharCode(+i)})}),h.format=function(t,e){t=String(t);var s=Array.prototype.slice.call(arguments,1),n=Object.prototype.toString;return s.length?(s=1==s.length&&null!==e&&/\[object Array\]|\[object Object\]/.test(n.call(e))?e:s,t.replace(/#\{(.+?)\}/g,function(t,e){var i=s[e];return void 0===(i="[object Function]"==n.call(i)?i(e):i)?"":i})):t},h.subByte=h.encodeHTML=function(t){return t.replace(/[&<>"']/g,function(t){return"&#"+t.charCodeAt(0)+";"})},h.getByteLength=function(t,e){return x[e||""].byteLength(t)},h.sliceByte=function(t,e,i){for(var s=0,n=x[i||""].codeLength;s<t.length;s++)if((e-=n(t.charCodeAt(s)))<0)return t.slice(0,s);return t},h.toCamelCase=function(t){return t.indexOf("-")<0?t:t.replace(/\-./g,function(t){return t.charAt(1).toUpperCase()})},h.toHalfWidth=function(t){return t.replace(/[\u3000\uFF01-\uFF5E]/g,function(t){return String.fromCharCode($(t.charCodeAt(0)-65248,32))})},h.trim=function(t){return t&&t.replace(/^\s+|\s+$/g,"")},h.parseDate=function(t){return!(t instanceof Date)&&"Invalid Date"==(t=t?new f("number"==typeof t?t:String(t).replace(/-/g,"/")):new f).toString()?new f:t},h.addDate=function(t,e){},h.formatDate=function(t,e){var i=t.getFullYear(),s=t.getMonth()+1,n=t.getDate(),o=t.getHours(),r=t.getMinutes(),a=t.getSeconds();return e.replace(/(y+|M+|d+|H+|h+|m+|s+)/g,function(t){var e=t.length;switch(t.charAt()){case"y":return 2<e?i:i.toString().slice(2);case"M":t=s;break;case"d":t=n;break;case"H":t=o;break;case"h":t=o%12;break;case"m":t=r;break;case"s":t=a}return 1<e&&t<10?"0"+t:t})},c.attachEvent=S?function(t,e,i){t.attachEvent("on"+e,i)}:function(t,e,i){t.addEventListener(e,i,!1)}),V=(c.blank=function(){},c.callSuper=function(t,i){function e(t,e){for(;t;t=t.constructor.superClass)if(t[i]==e){for(;t=t.constructor.superClass;)if(t[i]!=e)return t[i];return null}}var s=t.constructor.prototype,n=V.caller,o=e(s,n);if(o=o===u?e(s,n.caller):o)return o.apply(t,n.arguments)}),U=(c.cancel=function(){return!1},c.detachEvent=S?function(t,e,i){t.detachEvent("on"+e,i)}:function(t,e,i){t.removeEventListener(e,i,!1)},c.extend=function(t,e){for(var i in e)t[i]=e[i];return t}),I=(c.getView=function(){var t=g.body,e=B(t),i=C?e:t,s=e.scrollTop+t.scrollTop,n=e.scrollLeft+t.scrollLeft,o=i.clientWidth,i=i.clientHeight;return{top:s,right:n+o,bottom:s+i,left:n,width:o,height:i,pageWidth:$(e.scrollWidth,t.scrollWidth,o),pageHeight:$(e.scrollHeight,t.scrollHeight,i)}},c.inherits=function(t,e){var i=t.prototype,s=new O;return s.prototype=e.prototype,U(t.prototype=new s,i),(t.prototype.constructor=t).superClass=e.prototype,t.prototype},c.setDefault=function(t,e,i){t.hasOwnProperty(e)||(t[e]=i)},c.timer=function(e,i,s){function n(){return(i<0?setInterval:setTimeout)(function(){e.apply(s,r),i<0||(e=s=r=null)},W(i))}var o,r=Array.prototype.slice.call(arguments,3),a=n();return function(t){(i<0?clearInterval:clearTimeout)(a),t?(o&&(a=n()),o=!o):e=s=r=null}}),F=c.toNumber=function(t){return v(t)||0};function R(){if(!i){i=!0;for(var t,e=0;t=o[e++];)t()}}function Y(t){return'"'+(t=/["\\\x00-\x1f]/.test(t)?t.replace(/["\\\x00-\x1f]/g,function(t){var e=a[t];return e||(e=t.charCodeAt(),"\\u00"+m(e/16)+(e%16).toString(16))}):t)+'"'}function k(t){return t<10?"0"+t:t}function M(t,e){for(;t&&1!=t.nodeType;t=t[e]);return t}e.ready=(i=!1,o=[],g.addEventListener&&!w?g.addEventListener("DOMContentLoaded",R,!1):S&&d==top?s=function(){try{g.documentElement.doScroll("left"),R()}catch(t){I(s,0)}}:p&&(s=function(){var t,e=0,i=g.readyState;if("loaded"!=i&&"complete"!=i)I(s,0);else{if(n===u&&(n=0,(t=g.getElementsByTagName("style"))&&(n+=t.length),t=g.getElementsByTagName("link")))for(;i=t[e++];)"stylesheet"==A(i,"rel")&&n++;g.styleSheets.length!=n?I(s,0):R()}}),s&&s(),t(d,"load",R),function(t){i?t():o.push(t)});try{g.execCommand("BackgroundImageCache",!1,!0)}catch(t){}})(),(()=>{var h,O,W,A,N,D,z,V,U,l,u,c,F,Y,j,X,K,q,d,g,n,G,f,p,_,m,r,a,$,J,Q,v,s,y,b,Z,tt,et,it,C,o,st,S,nt,ot,T=ecui,rt=T.array,t=T.dom,at=T.ext,lt=T.string,e=T.util,w=T.ui,x=window,E=document,ht=Date,i=Math,L=RegExp,ut=i.abs,B=i.max,ct=i.min,i=(isNaN,navigator.userAgent),dt="CSS1Compat"==E.compatMode,P=/msie (\d+\.\d)/i.test(i)?E.documentMode||+L.$1:h,gt=/firefox\/(\d+\.\d)/i.test(i)?+L.$1:h,ft=rt.indexOf,pt=rt.remove,_t=t.addClass,H=t.contain,mt=t.create,$t=t.getAttribute,vt=t.getParent,yt=t.getPosition,I=t.getStyle,bt=t.insertHTML,i=t.ready,Ct=t.remove,St=t.removeClass,Tt=t.setStyle,wt=lt.toCamelCase,xt=e.attachEvent,Et=e.blank,Lt=e.detachEvent,Bt=e.extend,Pt=e.getView,Ht=e.inherits,It=e.timer,R=e.toNumber,k=(T.NORMAL=0,T.LOADING=1,T.REPAINT=2,T.findControl=function(t){for(;t;t=vt(t))if(t.getControl)return t.getControl();return null}),Rt=["mousedown","mouseover","mousemove","mouseout","mouseup","click","dblclick","focus","blur","activate","deactivate","keydown","keypress","keyup","mousewheel"];function M(t,e,i,s){for((i=i||new r(e)).cancelBubble=!1;t!=s;t=t.getParent())if(i.returnValue=h,u(t,e,i),i.cancelBubble)return}function kt(t,e){if(t!=e){for(var i=0,s=[],n=[];t;t=t.getParent())s.push(t);for(;e;e=e.getParent())n.push(e);for(s.reverse(),n.reverse();s[i]==n[i];i++);t=s[i-1]}return t||null}function Mt(){return this._cControl}function Ot(t,e,i,s){var n=t.getOuter().style,o=t.getX(),r=t.getY();n.left=o+"px",n.top=r+"px",n.position="absolute",i.target=t,i.actived=p,Ft(i),p=null,u(t,s+"start",e),P&&E.body.setCapture()}function Wt(){if(!f){for(e in G=1,at)Q[e]=at[e];for(e in C)xt(E,e,C[e]);f={};var e=N(E.body,"data-ecui");return $=e.name||$,F=e.globalId,Y=ft(["class","all"],e.structural)+1,bt(E.body,"BEFOREEND",'<div style="position:absolute;overflow:scroll;top:-90px;left:-90px;width:80px;height:80px;border:1px solid"><div style="position:absolute;top:0px;height:90px"></div></div>'),e=E.body.lastChild,j=80<e.offsetWidth,X=e.lastChild.offsetTop,K=e.offsetWidth-e.clientWidth-2,Ct(e),xt(x,"resize",ot),xt(x,"unload",function(){for(var t=0;e=y[t++];)e.$dispose();E=v=null}),xt(x,"scroll",Vt),nt(E.body),_t(E.body,"ecui-loaded"),G=0,1}}function At(){return n.time>(new ht).getTime()-200}function Nt(t){var e=t.target,i=yt(e),s=I(e);return t.pageX-i.left-R(s.borderLeftWidth)>=e.clientWidth!=t.pageY-i.top-R(s.borderTopWidth)>=e.clientHeight}function Dt(t,e){M(p=t,"activate",e),M(t,"mousedown",e),Ut(t,e)}function zt(t,e){if(t.oncreate&&t.oncreate(e),y.push(t),e.id&&(f[e.id]=t,F)&&(x[e.id]=t),e.ext)for(var i in e.ext)Q[i]&&(Q[i](t,e.ext[i],e),i=t["$init"+i.charAt(0).toUpperCase()+wt(i.slice(1))])&&i.call(t,e)}function Vt(t){t=c(t);for(var e,i=0;e=b[i++];)u(e,"pagescroll",t);z(!0)}function Ut(t,e){for(;t;t=t.getParent())if(!t.isUserSelect())return void e.preventDefault()}function Ft(t){var e={};Yt(C,!0),Bt(e,C),Bt(e,t),e.x=d,e.y=g,Yt(e),it.push(C),C=e}function Yt(t,e){for(var i,s=0,n=e?Lt:xt;s<5;)t[i=Rt[s++]]&&n(E,i,t[i])}r=w.Event=function(t,e){this.type=t,e?(this.pageX=e.pageX,this.pageY=e.pageY,this.which=e.which,this.target=e.target,this._oNative=e):(this.pageX=d,this.pageY=g,this.which=s,this.target=E)},a=r.prototype,$="ecui",Q={},v=[],y=[],b=[],Z=s=J=0,tt={},et={},it=[],C={click:function(t){t=c(t);var e=k(t.target);e&&e.isDisabled()&&t.preventDefault()},mousedown:function(t){if(p)M(p,"deactivate"),p=null;else{var e=(t=c(t)).getControl(),i=P<8&&Nt(t),s=e;if(n&&At()||(n={time:(new ht).getTime()}),e){if(!i){for(;s;s=s.getParent())if(s.isFocusable()){s!=e&&s.contain(m)||l(s);break}i||Dt(e,t)}}else(e=k(s=t.target))&&(Ut(e,t),"INPUT"!=s.tagName&&"SELECT"!=s.tagName&&"TEXTAREA"!=s.tagName&&"BUTTON"!=s.tagName||It(function(){s.blur()})),l(),p=h}},mouseover:function(t){var e,i;"drag"!=C.type&&"zoom"!=C.type&&(i=kt(e=(t=c(t)).getControl(),_),M(_,"mouseout",t,i),M(e,"mouseover",t,i),_=e)},mousemove:function(t){M((t=c(t)).getControl(),"mousemove",t)},mouseup:function(t){var e,i=(t=c(t)).getControl();null!==p&&(M(i,"mouseup",t),p&&(M(e=kt(i,p),"click",t),n&&(At()&&n.target==i?(M(e,"dblclick",t),n=null):n.target=i),M(p,"deactivate",t)),p=null)}},o={type:"drag",mousemove:function(t){t=c(t);var e=C.target,i=e.getX()+d-C.x,s=e.getY()+g-C.y,n=ct(B(i,C.left),C.right),o=ct(B(s,C.top),C.bottom);u(e,"dragmove",t,[n,o])&&e.setPosition(n,o),C.x=d+e.getX()-i,C.y=g+e.getY()-s},mouseup:function(t){t=c(t);var e=C.target;u(e,"dragend",t),p=C.actived,U(),C.mouseover(t),C.mouseup(t)}},st={type:"intercept",mousedown:function(t){t=c(t);var e=C.target,i=C,s=t.getControl();n=null,Nt(t)||(s&&!s.isFocusable()?Dt(s,t):u(e,"intercept",t)?U():t.cancelBubble||(i==C?s&&Dt(s,t):C.mousedown(t)))}},S={type:"zoom",mousemove:function(t){t=c(t);var e=C.target,i=C.width=d-C.x+C.width,s=C.height=g-C.y+C.height,n=C.minWidth,o=C.maxWidth,r=C.minHeight,a=C.maxHeight;C.x=d,C.y=g,s=s<r?r:a<s?a:s,e.setPosition(C.left+ct(i=i<n?n:o<i?o:i,0),C.top+ct(s,0)),u(e,"zoom",t)&&e.setSize(ut(i),ut(s))},mouseup:function(t){t=c(t);var e=C.target;u(e,"zoomend",t),p=C.actived,U(),ot(),C.mouseover(t),C.mouseup(t)}},nt=T.init=function(t){if(!Wt()&&t){var e,i=0,s=[],n=t.all||t.getElementsByTagName("*"),o=[t],r={};for(J++||Lt(x,"resize",ot);e=n[i++];)$t(e,$)&&o.push(e);for(i=0;t=o[i];i++)(e=(n=N(t)).type)&&(n.main=t,s.push(W(w[wt(e.charAt(0).toUpperCase()+e.slice(1))],n)),n.id)&&(r[n.id]=s[s.length-1]);for(i=0;e=s[i++];)e.cache();for(i=0;e=s[i++];)e.init();return--J||xt(x,"resize",ot),r}},ot=T.repaint=function(){var t,e=0,i=[],s=[];if(P){if(t=(dt?E.documentElement:E.body).clientWidth,q==t)return void Vt(new r("scroll"));q=t}if(G=2,t=C.type,z(!1),"zoom"!=t){for("drag"==t&&C.mouseup(),t=null;t!==h;t=i[e++])for(var n=0,o=V({parent:t});t=o[n++];)t.isShow()&&t.isResizable()&&i.push(t);for(e=0;t=i[e++];)t.repaint=Et,u(t,"resize"),delete t.repaint,P<8&&"auto"==(t=I(n=t.getMain())).width&&"block"==t.display&&(n.style.width="100%");if(P<8){for(e=0;t=i[e];)s[e++]=t.getMain().offsetWidth;for(;t=i[e--];)t.getMain().style.width=s[e]-(j?2*t.$getBasicWidth():0)+"px"}for(e=0;t=i[e++];)t.cache(!0,!0);for(e=0;t=i[e++];)t.$setSize(t.getWidth(),t.getHeight())}P<8?It(z,0,null,!0):z(!0),G=0},T.$bind=function(t,e){t._cControl=e,t.getControl=Mt},O=T.$clearState=function(t){var e=t.getParent();D(t),t.contain(p)&&M(p,"deactivate",null,p=e),t.contain(_)&&M(_,"mouseout",null,_=e)},T.$connect=function(t,e,i){var s;i&&((s=f[i])?e.call(t,s):(tt[i]=tt[i]||[]).push({func:e,caller:t}))},W=T.$create=function(t,e){t=t.client||t;var i,s=0,n=(e=e||{}).parent,o=e.main,r=e.primary||"";if(e.uid="ecui-"+ ++Z,o){if(Y?i=o.className:o.className=i=o.className+" "+r+t.agent.TYPES,r||(/\s*([^\s]+)/.test(i),e.primary=L.$1),o.getControl)return o.getControl()}else o=e.main=mt(r+t.agent.TYPES),r||(e.primary=t.agent.types[0]);if(t=new t(o,e),n?n instanceof w.Control?t.setParent(n):t.appendTo(n):t.$setParent(k(vt(t.getOuter()))),zt(t,e),b.push(t),o=tt[e.id])for(tt[e.id]=null;r=o[s++];)r.func.call(r.caller,t);return t},T.$fastCreate=function(t,e,i,s){return t=t.client||t,(s=s||{}).uid="ecui-"+ ++Z,s.primary||(/\s*([^\s]+)/.test(e.className),s.primary=L.$1),(t=new t(e,s)).$setParent(i),zt(t,s),t},T.addEventListener=function(t,e,i){e=t.getUID()+e,(et[e]=et[e]||[]).push(i)},T.calcHeightRevise=function(t){return j?R(t.borderTopWidth)+R(t.borderBottomWidth)+R(t.paddingTop)+R(t.paddingBottom):0},T.calcLeftRevise=function(t){var e=I(t.offsetParent);return!gt||"visible"!=e.overflow&&"absolute"==I(t,"position")?R(e.borderLeftWidth)*X:0},T.calcTopRevise=function(t){var e=I(t.offsetParent);return!gt||"visible"!=e.overflow&&"absolute"==I(t,"position")?R(e.borderTopWidth)*X:0},T.calcWidthRevise=function(t){return j?R(t.borderLeftWidth)+R(t.borderRightWidth)+R(t.paddingLeft)+R(t.paddingRight):0},A=T.create=function(t,e){return(t=W("string"==typeof t?w[t]:t,e)).cache(),t.init(),t},T.dispose=function(t){var e,i=y.length,s=t instanceof w.Control,n={},o=[];for(e in s?O(t):(e=k(vt(t)),m&&H(t,m.getOuter())&&l(e),p&&H(t,p.getOuter())&&M(p,"deactivate",null,p=e),_&&H(t,_.getOuter())&&M(_,"mouseout",null,_=e)),f)n[f[e].getUID()]=e;for(;i--;)e=y[i],(s?t.contain(e):e.getOuter()&&H(t,e.getOuter()))&&(o.push(e),pt(b,e),(e=n[e.getUID()])&&delete f[e],y.splice(i,1));for(;e=o[++i];)e.$dispose()},T.$dispose=function(t,e){var i,s,n=t instanceof w.Control,o={},r=[],a=[];for(i in n?O(t):(i=k(vt(t)),m&&H(t,m.getOuter())&&l(i),p&&H(t,p.getOuter())&&M(p,"deactivate",null,p=i),_&&H(t,_.getOuter())&&M(_,"mouseout",null,_=i)),f)o[f[i].getUID()]=i,a.push(f[i]);for(e&&(a=[t]),s=0;i=a[s];s++)(n?t.contain(i):i.getOuter()&&H(t,i.getOuter()))&&(r.push(i),pt(b,i),pt(y,i),i=o[i.getUID()])&&delete f[i];for(s=0;i=r[s];s++)i.$dispose()},T.drag=function(t,e,i){var s,n;"mousedown"==e.type&&(s=t.getOuter().offsetParent,n=I(s),Bt(o,"BODY"==s.tagName||"HTML"==s.tagName?Pt():{top:0,right:s.offsetWidth-R(n.borderLeftWidth)-R(n.borderRightWidth),bottom:s.offsetHeight-R(n.borderTopWidth)-R(n.borderBottomWidth),left:0}),Bt(o,i),o.right=B(o.right-t.getWidth(),o.left),o.bottom=B(o.bottom-t.getHeight(),o.top),Ot(t,e,o,"drag"))},T.get=function(t){return Wt(),f[t]||null},T.getActived=function(){return p||null},T.getAttributeName=function(){return $},T.getFocused=function(){return m||null},T.getHovered=function(){return _},T.getKey=function(){return s},T.getMouseX=function(t){return t?(t=t.getBody(),d-yt(t).left-R(I(t,"borderLeftWidth"))):d},T.getMouseY=function(t){return t?(t=t.getBody(),g-yt(t).top-R(I(t,"borderTopWidth"))):g},T.getNamedControls=function(){return Bt({},f)},N=T.getOptions=function(t,e){var i,s,n=$t(t,e=e||$);if(n){if(t.removeAttribute(e),!T.onparseoptions||!(i=T.onparseoptions(n)))for(n=n.replace(/\:(\s*)\;/g,":false;"),i={};/^(\s*;)?\s*(ext\-)?([\w\-]+)\s*(:\s*([^;\s]+(\s+[^;\s]+)*)\s*)?($|;)/.test(n);)n=L["$'"],t=L.$5,(e=L.$2?i.ext=i.ext||{}:i)[wt(L.$3)]=(s=void 0,s=RegExp.$5,/^(true|false)$/.test(s)?!("true"!=s):/^(-)?(|\.|\d)+$/.test(s)?10<s.length?s:Number(s):"undefined"==s?h:"null"==s?null:s);return i}return{}},T.getScrollNarrow=function(){return K},T.getStatus=function(){return G},T.inherits=function(i,t,e,s){function n(t){return A(n.client,t)}var o=n.client=function(t,e){n.preprocess&&(t=n.preprocess.call(this,t,e)||t),i&&i.client.call(this,t,e),s&&s.call(this,t,e)};return n.preprocess=e,i?(Ht(n,i),t&&"*"==t.charAt(0)?(n.types=i.types.slice())[0]=t.slice(1):n.types=(t?[t]:[]).concat(i.types)):n.types=[],n.TYPES=" "+n.types.join(" "),Ht(o,n),o.agent=n},T.intercept=function(t){st.target=t,Ft(st)},T.isContentBox=function(){return j},D=T.loseFocus=function(t){t.contain(m)&&l(t.getParent())},z=T.mask=function(t,e){var i=0,s=E.body,n=Pt(),o=B(n.top-2*n.height,0),r=B(n.left-2*n.width,0),a=";top:"+o+"px;left:"+r+"px;width:"+ct(5*n.width,n.pageWidth-r)+"px;height:"+ct(5*n.height,n.pageHeight-o)+"px;display:";if("boolean"==typeof t)for(a+=t?"block":"none";n=v[i++];)n.style.cssText+=a;else if(t===h)Ct(v.pop()),v.length||St(s,"ecui-mask");else{if(v.length||_t(s,"ecui-mask"),v.push(n=s.appendChild(mt("","position:absolute;background-color:#000;z-index:"+(e||32767)))),Tt(n,"opacity",t),P<8){n.innerHTML='<iframe style="width:100%;filter:alpha(opacity=0);-moz-opacity:0; height:100%; position:absolute; z-index:'+(e-2)+'"></iframe>';try{var l=baidu.dom.query("iframe",n)[0];l.contentWindow.document.onclick=function(){n.removeChild(l),baidu.event.fire(n,"mousedown"),baidu.event.fire(s,"mousedown")}}catch(t){}}n.style.cssText+=a+"block"}},T.needInitClass=function(){return!Y},V=T.query=function(t){for(var e,i=0,s=[],n=(t=t||{}).parent,o=t.custom;e=b[i++];)t.type&&!(e instanceof t.type)||n!==h&&e.getParent()!==n||o&&!o.call(this,e)||s.push(e);return s},T.removeEventListener=function(t,e,i){(e=et[t.getUID()+e])&&pt(e,i)},U=T.restore=function(){!P||"drag"!=C.type&&"zoom"!=C.type||E.body.releaseCapture(),Yt(C,!0),Yt(C=it.pop())},l=T.setFocused=function(t){t&&t.isDisabled()&&(t=null);var e=kt(m,t);M(m,"blur",null,e),M(m=t,"focus",null,e)},u=T.triggerEvent=function(t,e,i,s){if(s&&i?s.splice(0,0,i):s=i?[i]:(i={returnValue:i,preventDefault:a.preventDefault},s||[]),n=et[t.getUID()+e])for(var n,o,r=0;o=n[r++];)o.apply(t,s);return(t["on"+e]&&!1===t["on"+e].apply(t,s)||!1===i.returnValue||t["$"+e]&&!1===t["$"+e].apply(t,s))&&i.preventDefault(),!1!==i.returnValue},c=T.wrapEvent=function(t){var e,i;return t instanceof r?t:(e=E.body,i=vt(e),P&&((t=x.event).pageX=i.scrollLeft+e.scrollLeft-i.clientLeft+t.clientX-e.clientLeft,t.pageY=i.scrollTop+e.scrollTop-i.clientTop+t.clientY-e.clientTop,t.target=t.srcElement,t.which=t.keyCode),"mousemove"==t.type&&(n=null),d=t.pageX,g=t.pageY,new r(t.type,t))},T.zoom=function(t,e,i){"mousedown"==e.type&&(i&&Bt(S,i),S.top=t.getY(),S.left=t.getX(),S.width=t.getWidth(),S.height=t.getHeight(),Ot(t,e,S,"zoom"))},C.keydown=C.keypress=C.keyup=function(t){var e=(t=c(t)).type,i=t.which;"keydown"==e&&(s=i),M(m,e,t),"keyup"==e&&s==i&&(s=0)},P&&(C.dblclick=function(t){C.mousedown(t),C.mouseup(t)},C.selectstart=function(t){t=c(t),Ut(k(t.target),t)}),C[gt?"DOMMouseScroll":"mousewheel"]=function(t){(t=c(t)).detail=t._oNative.detail===h?t._oNative.wheelDelta/-40:t._oNative.detail,"drag"==C.type?t.preventDefault():(M(_,"mousewheel",t),t.cancelBubble||M(m,"mousewheel",t))},a.getControl=function(){var t=k(this.target);if(t&&!t.isDisabled())for(;t;t=t.getParent())if(t.isCapturable())return t;return null},a.getNative=function(){return this._oNative},a.preventDefault=function(){this.returnValue=!1,this._oNative&&(P?this._oNative.returnValue=!1:this._oNative.preventDefault())},a.stopPropagation=function(){this.cancelBubble=!0,this._oNative&&(P?this._oNative.cancelBubble=!1:this._oNative.stopPropagation())},a.exit=function(){this.preventDefault(),this.stopPropagation()},i(nt)})(),(()=>{var s,i,t=ecui,e=t.array,n=t.dom,o=t.ui,r=t.util,a=document,l=RegExp,h=navigator.userAgent,u=/msie (\d+\.\d)/i.test(h)?a.documentMode||+l.$1:s,c=e.remove,d=n.addClass,g=n.getParent,f=n.getStyle,p=n.removeClass,_=n.remove,m=r.blank,$=r.timer,v=r.toNumber,y=t.REPAINT,b=t.$bind,C=t.$clearState,S=t.calcLeftRevise,T=t.calcTopRevise,w=t.dispose,x=t.findControl,E=t.getActived,L=t.getFocused,O=t.getHovered,W=t.getStatus,h=t.inherits,B=t.isContentBox,A=t.loseFocus,P=t.query,N=t.setFocused,H=t.triggerEvent,D=["mousedown","mouseover","mousemove","mouseout","mouseup","click","dblclick","focus","blur","activate","deactivate","keydown","keypress","keyup","mousewheel"],I=(o.Control=h(null,null,null,function(t,e){b(t,this),this._bDisabled=!!e.disabled,this._sUID=e.uid,this._sPrimary=e.primary||"",this._sClass=e.current||this._sPrimary,this._eMain=this._eBody=t,this._cParent=null,this._bCapturable=!1!==e.capturable,this._bUserSelect=!1!==e.userSelect,this._bFocusable=!1!==e.focusable,!1!==e.resizable?(this._bResizable=!0,t=t.style,this._sWidth=t.width,this._sHeight=t.height):this._bResizable=!1,this._aStatus=[""," "]})).prototype,R={custom:function(t){return this!=t&&this.contain(t)&&t.isShow()}};function k(t,e,i){var s=t._cParent,n=t.getOuter(),o=t._bCreated&&t.isShow();if(e!=s){if(s&&!H(s,"remove",null,[t]))return;!e||H(e,"append",null,[t])||(e=i=null)}i!=g(n)&&(i?i.appendChild(n):_(n),t.$setParent(e)),o!=(t._bCreated&&t.isShow())&&H(t,o?"hide":"show",!1)}I.$activate=function(){this.alterClass("+active")},I.$blur=function(){this.alterClass("-focus")},I.$cache=function(t,e){if(u<8)0<(i=t.borderWidth).indexOf(" ")?(i=i.split(" "),this.$$borderTopWidth=v(i[0]),this.$$borderRightWidth=v(i[1]),this.$$borderBottomWidth=i[2]?v(i[2]):this.$$borderTopWidth,this.$$borderLeftWidth=i[3]?v(i[3]):this.$$borderRightWidth=v(i[1])):this.$$borderTopWidth=this.$$borderLeftWidth=this.$$borderRightWidth=this.$$borderBottomWidth=v(i),0<(i=t.padding).indexOf(" ")?(i=i.split(" "),this.$$paddingTop=v(i[0]),this.$$paddingRight=v(i[1]),this.$$paddingBottom=i[2]?v(i[2]):this.$$paddingTop,this.$$paddingLeft=i[3]?v(i[3]):this.$$paddingRight):this.$$paddingTop=this.$$paddingLeft=this.$$paddingRight=this.$$paddingBottom=v(i);else for(var i,s=0,n=["borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","paddingTop","paddingLeft","paddingRight","paddingBottom"];i=n[s++];)this["$$"+i]=v(t[i]);this.$$position=t.position,!1!==e&&(i=B(),this.$$width=this._eMain.offsetWidth||v(t.width)+(i?this.$getBasicWidth():0),this.$$height=this._eMain.offsetHeight||v(t.height)+(i?this.$getBasicHeight():0))},I.$deactivate=function(){this.alterClass("-active")},I.$dispose=function(){try{H(this,"dispose",!1)}catch(t){}this._eMain.getControl=s,this._eMain=this._eBody=null,this.$ready=m},I.$focus=function(){this.alterClass("+focus")},I.$getBasicHeight=function(){return this.$$borderTopWidth+this.$$borderBottomWidth+this.$$paddingTop+this.$$paddingBottom},I.$getBasicWidth=function(){return this.$$borderLeftWidth+this.$$borderRightWidth+this.$$paddingLeft+this.$$paddingRight},I.$getSection=function(t){return this["_u"+t]},I.$hide=function(){if(this._sDisplay===s){if(this._bCreated)for(var t,e=0,i=P.call(this,R);t=i[e++];)H(t,"hide",!1);t=this.getOuter().style,this._sDisplay=t.display,t.display="none",C(this)}},I.$locate=function(){"static"==this.$$position&&(this._eMain.style.position=this.$$position="relative")},I.$mouseout=function(){this.alterClass("-hover")},I.$mouseover=function(){this.alterClass("+hover")},I.$resize=function(){var t,e=this._eMain,i=e.style;i.width=this._sWidth,u<8&&W()!=y&&"auto"==(t=f(e)).width&&"block"==t.display&&(i.width="100%",i.width=e.offsetWidth-(B()?2*this.$getBasicWidth():0)+"px"),i.height=this._sHeight},I.$setBody=function(t){this._eBody=t},I.$setParent=function(t){this._cParent=t},I.$setSize=function(t,e){var i=this._eMain.style,s=this._eMain.tagName,n=B()&&"BUTTON"!=s&&"INPUT"!=s;t&&0<(s=t-(n?this.$getBasicWidth():0))&&(i.width=s+"px",this.$$width=t),e&&0<(s=e-(n?this.$getBasicHeight():0))&&(i.height=s+"px",this.$$height=e)},I.$show=function(){if(this.getOuter().style.display=this._sDisplay||"",this._sDisplay=s,this._bCreated)for(var t,e=0,i=P.call(this,R);t=i[e++];)H(t,"show",!1)},I.alterClass=function(t){var e="+"==t.charAt(0);e?t="-"+t.slice(1)+" ":t+=" ",(e?d:p)(this._eMain,this.getTypes().concat([this._sClass,""]).join(t)),e?this._aStatus.push(t):c(this._aStatus,t)},I.appendTo=function(t){k(this,t&&x(t),t)},I.blur=function(){A(this)},I.cache=function(t,e){!e&&this._bCached||(this._bCached=!0,this.$cache(f(this._eMain),t))},I.clearCache=function(){this._bCached=!1},I.contain=function(t){for(;t;t=t._cParent)if(t==this)return!0;return!1},I.disable=function(){return!this._bDisabled&&(this.alterClass("+disabled"),this._bDisabled=!0,C(this),!0)},I.dispose=function(){w(this)},I.enable=function(){return!(!this._bDisabled||(this.alterClass("-disabled"),this._bDisabled=!1))},I.focus=function(){this.isFocused()||N(this)},I.getBody=function(){return this._eBody},I.getBodyHeight=function(){return this.getHeight()-this.getMinimumHeight()},I.getBodyWidth=function(){return this.getWidth()-this.getMinimumWidth()},I.getClass=function(){return this._sClass},I.getContent=function(){return this._eBody.innerHTML},I.getHeight=function(){return this.cache(),this.$$height},I.getMain=function(){return this._eMain},I.getMinimumHeight=function(){return this.cache(),this.$getBasicHeight()+(this.$$bodyHeightRevise||0)},I.getMinimumWidth=function(){return this.cache(),this.$getBasicWidth()+(this.$$bodyWidthRevise||0)},I.getOuter=function(){return this._eMain},I.getParent=function(){return this._cParent||null},I.getPrimary=function(){return this._sPrimary},I.getType=function(){return this.constructor.agent.types[0]},I.getTypes=function(){return this.constructor.agent.types.slice()},I.getUID=function(){return this._sUID},I.getWidth=function(){return this.cache(),this.$$width},I.getX=function(){var t=this.getOuter();return this.isShow()?t.offsetLeft-S(t):0},I.getY=function(){var t=this.getOuter();return this.isShow()?t.offsetTop-T(t):0},I.hide=function(){this.isShow()&&H(this,"hide")},I.init=function(){this._bCreated||(this._bDisabled&&this.alterClass("+disabled"),this.$setSize(this.getWidth(),this.getHeight()),null===i?this.$ready():(i||(i=[],$(function(){for(var t,e=0;t=i[e++];)t.$ready();i=null})),this.$ready!=m&&i.push(this)),this._bCreated=!0)},I.isActived=function(){return this.contain(E())},I.isCapturable=function(){return this._bCapturable},I.isDisabled=function(){return this._bDisabled||!!this._cParent&&this._cParent.isDisabled()},I.isFocusable=function(){return this._bFocusable},I.isFocused=function(){return this.contain(L())},I.isHovered=function(){return this.contain(O())},I.isResizable=function(){return this._bResizable},I.isShow=function(){return!!this.getOuter().offsetWidth},I.isUserSelect=function(){return this._bUserSelect},I.render=function(){this.resize()},I.repaint=function(){this.cache(!0,!0),this.$setSize(this.getWidth(),this.getHeight())},I.resize=function(){this._bResizable&&(this.$resize(),this.repaint())},I.setBodySize=function(t,e){this.setSize(t&&t+this.getMinimumWidth(),e&&e+this.getMinimumHeight())},I.setClass=function(t){var e=0,i=this._sClass,s=this.getTypes(),n=[];if((t=t||this._sPrimary)!=i){for(s.splice(0,0,this._sClass=t);s[e];)n[e]=this._aStatus.join(s[e++]);s[0]=i,this._eMain.className=n.join("")+this._eMain.className.split(/\s+/).join(" ").replace(new l("(^| )("+s.join("|")+")(-[^ ]+)?( |$)","g"),"")}},I.setContent=function(t){this._eBody.innerHTML=t},I.setParent=function(t){k(this,t,t&&t._eBody)},I.setPosition=function(t,e){var i=this.getOuter().style;i.left=t+"px",i.top=e+"px"},I.setSize=function(t,e){var i;this._bResizable&&(this.cache(),i=this._eMain.style,t<this.getMinimumWidth()&&(t=0),e<this.getMinimumHeight()&&(e=0),this.$setSize(t,e),t&&(this._sWidth=i.width),e)&&(this._sHeight=i.height)},I.show=function(){return!this.isShow()&&(H(this,"show"),!0)};for(var M,z=0;M=D[z++];)I["$"+M]=I["$"+M]||m;I.$intercept=I.$append=I.$remove=I.$zoomstart=I.$zoom=I.$zoomend=I.$dragstart=I.$dragmove=I.$dragend=I.$ready=I.$pagescroll=m})(),(()=>{var s,t=ecui,e=t.dom,i=t.string,n=t.ui,o=t.util,r=document,a=RegExp,l=navigator.userAgent,l=/msie (\d+\.\d)/i.test(l)?r.documentMode||+a.$1:s,h=e.create,u=e.insertBefore,c=e.setInput,d=e.setStyle,g=i.encodeHTML,f=o.attachEvent,a=o.blank,p=o.detachEvent,_=(o.timer,t.$bind),e=t.inherits,m=t.triggerEvent,$=t.wrapEvent,v=(i=n.Control).prototype,y=(n.InputControl=e(i,null,function(t,e){var i;return"INPUT"==t.tagName||"TEXTAREA"==t.tagName?(u(t=h((i=t).className,i.style.cssText,"span"),i).appendChild(i),i.className=""):(i=t.getElementsByTagName("INPUT")[0]||t.getElementsByTagName("TEXTAREA")[0])||((i=c(null,e.name,e.inputType)).defaultValue=i.value=e.value===s?"":e.value.toString(),t.appendChild(i)),d(t,"display","inline-block"),i.style.border="0px",e.hidden&&(i.style.display="none"),e.checked&&(i.defaultChecked=i.checked=!0),t},function(t,e){this._bHidden=e.hidden,this._eInput=t.getElementsByTagName("INPUT")[0]||t.getElementsByTagName("TEXTAREA")[0],o.validator&&(this._aValidateRules=o.validator.collectRules(e)),C(this)})).prototype,b={};function C(t){if(_(t._eInput,t),!t._bHidden)for(var e in b)f(t._eInput,e,b[e])}function S(e){y["$"+e]=function(){v["$"+e].call(this);var t=this._eInput;p(t,e,b[e]);try{t[e]()}catch(t){}f(t,e,b[e])}}b.blur=b.focus=function(t){var e=t.type;(t=$(t).target.getControl())["$"+e]=v["$"+e],t[e](),delete t["$"+e]},b.dragover=b.drop=function(t){$(t).exit()},l?b.propertychange=function(t){"value"==t.propertyName&&m($(t).target.getControl(),"change")}:b.input=function(t){m(this.getControl(),"change")},y.$dispose=function(){this._eInput.getControl=s,this._eInput=null,v.$dispose.call(this)},y.$reset=function(){this.$ready()},y.$setParent=function(t){v.$setParent.call(this,t),(t=this._eInput.form)&&t.getControl&&t.getControl().addItem(this.getName(),this)},y.$setSize=function(t,e){v.$setSize.call(this,t,e),this._eInput.style.width=this.getBodyWidth()+"px",this._eInput.style.height=this.getBodyHeight()+"px"},y.$submit=a,y.disable=function(){var t;return!!v.disable.call(this)&&(t=this.getBody(),this._bHidden?this._eInput.disabled=!0:(t.removeChild(this._eInput),"password"!=this._eInput.type&&(t.innerHTML=g(this._eInput.value))),!0)},y.enable=function(){var t;return!!v.enable.call(this)&&(t=this.getBody(),this._bHidden?this._eInput.disabled=!1:(t.innerHTML="",t.appendChild(this._eInput)),!0)},y.getInput=function(){return this._eInput},y.getName=function(){return this._eInput.name},y.getSelectionEnd=l?function(){var t=r.selection.createRange().duplicate();return t.moveStart("character",-this._eInput.value.length),t.text.length}:function(){return this._eInput.selectionEnd},y.getSelectionStart=l?function(){var t=r.selection.createRange().duplicate(),e=this._eInput.value.length;return t.moveEnd("character",e),e-t.text.length}:function(){return this._eInput.selectionStart},y.getValue=function(){return this._eInput.value},y.setCaret=l?function(t){var e=this._eInput.createTextRange();e.collapse(),e.select(),e.moveStart("character",t),e.collapse(),e.select()}:function(t){this._eInput.setSelectionRange(t,t)},y.setName=function(t){t=c(this._eInput,t||"");this._eInput!=t&&(C(this),this._eInput=t)},y.setValue=function(t){var e=this._eInput,i=b.propertychange;i&&p(e,"propertychange",i),e.value=t,i&&f(e,"propertychange",i)},y.validate=function(){return!0},y.setDefaultValue=function(){var t=this.getValue();this._eInput.defaultValue=t},S("blur"),S("focus")})(),(()=>{var t=ecui,e=t.dom,i=t.ui,s=e.setText,n=t.util.setDefault,e=t.inherits,o=(t=i.Control).prototype;(i=(i.Button=e(t,"ui-button",function(t,e){n(e,"userSelect",!1),e.text&&s(t,e.text)})).prototype).$activate=function(t){o.$activate.call(this,t),t.stopPropagation()},i.$mouseout=function(t){o.$mouseout.call(this,t),this.isActived()&&this.alterClass("-active")},i.$mouseover=function(t){o.$mouseover.call(this,t),this.isActived()&&this.alterClass("+active")},i.setText=function(t){s(this.getBody(),t)},i.$setSize=function(){this.getParent()&&o.$setSize.apply(this,[].slice.call(arguments))}})(),(()=>{var t=(b=ecui).dom,e=b.ui,i=b.util,o=(p=Math).floor,r=p.max,s=p.min,n=t.children,a=i.blank,l=i.setDefault,h=i.timer,u=b.$fastCreate,c=b.drag,d=b.getActived,g=b.getMouseX,f=b.getMouseY,p=b.inherits,_=b.triggerEvent,m=(t=e.Control).prototype,$=(i=e.Button).prototype,v=e.Scrollbar=p(t,"ui-scrollbar",function(t,e){l(e,"userSelect",!1),l(e,"focusable",!1);e=this.getType();t.innerHTML='<div class="'+e+"-prev"+this.Button.TYPES+'" style="position:absolute;top:0px;left:0px"></div><div class="'+e+"-next"+this.Button.TYPES+'" style="position:absolute;top:0px;left:0px"></div><div class="'+this.Thumb.TYPES+'" style="position:absolute"></div>'},function(t,e){t=n(t),this._nValue=this._nTotal=0,this._nStep=1,this._uPrev=u(this.Button,t[0],this,{focusable:!1}),this._uNext=u(this.Button,t[1],this,{focusable:!1}),this._uThumb=u(this.Thumb,t[2],this,{focusable:!1}),this._oStop=a}),y=v.prototype,b=(y.Thumb=p(i,"ui-scrollbar-thumb")).prototype,t=(y.Button=p(i,"ui-scrollbar-button")).prototype;function C(t,e,i){var s=t._nValue,n=t.getMouseDirection();t._oStop(),-1==n&&e<0||1==n&&0<e?t.setValue(s+e):s=-1,t._oStop=t._nValue!=s?h(C,i||200,null,t,e,40):a}function S(t){var e,i=t.getParent();i&&(i.$scroll(),v[e=i.getUID()]||(h(function(){delete v[e],_(i,"scroll",!1)}),v[e]=!0))}b.$activate=function(t){$.$activate.call(this,t),c(this,t,this._oRange)},b.$dragmove=function(t,e,i){$.$dragmove.call(this,t,e,i);t=this.getParent(),e=t.$calculateValue(e,i);t.$setValue(e==t._nTotal?e:e-e%t._nStep),S(t)},b.setRange=function(t,e,i,s){this._oRange={top:t,right:e,bottom:i,left:s}},t.$activate=function(t){$.$activate.call(this,t);t=this.getParent();C(t,t.getMouseDirection()*r(t._nStep,5))},t.$deactivate=function(t){$.$deactivate.call(this,t),this.getParent()._oStop()},t.$mouseout=function(t){$.$mouseout.call(this,t),d()==this&&this.getParent()._oStop(!0)},t.$mouseover=function(t){$.$mouseover.call(this,t),d()==this&&this.getParent()._oStop(!0)},y.$activate=function(t){m.$activate.call(this,t),C(this,this.getMouseDirection()*this.$getPageStep())},y.$cache=function(t,e){m.$cache.call(this,t,e),this._uPrev.cache(!0,!0),this._uNext.cache(!0,!0),this._uThumb.cache(!0,!0)},y.$deactivate=function(t){m.$deactivate.call(this,t),this._oStop()},y.$hide=function(){m.$hide.call(this),y.setValue.call(this,0)},y.$mouseout=function(t){m.$mouseout.call(this,t),d()==this&&this._oStop(!0)},y.$mouseover=function(t){m.$mouseover.call(this,t),d()==this&&this._oStop(!0)},y.$setPageStep=function(t){this._nPageStep=t},y.$setSize=function(t,e){m.$setSize.call(this,t,e),this.$locate()},y.$setValue=function(t){this._nValue=t},y.getStep=function(){return this._nStep},y.getTotal=function(){return this._nTotal},y.getValue=function(){return this._nValue},y.init=function(){m.init.call(this),this._uPrev.init(),this._uNext.init(),this._uThumb.init()},y.setStep=function(t){0<t&&(this._nStep=t)},y.setTotal=function(t){0<=t&&this._nTotal!=t&&(this._nTotal=t,this._nValue>t&&(this._nValue=t,S(this)),this.$flushThumb())},y.setValue=function(t){t=s(r(0,t),this._nTotal),this._nValue!=t&&(this._nValue=t,S(this),this.$flushThumb())},y.skip=function(t){this.setValue(this._nValue+t*this._nStep)},(i=(e.VScrollbar=p(v,"ui-vscrollbar")).prototype).$calculateValue=function(t,e){var i=this._uThumb,s=i._oRange;return(e-s.top)/(s.bottom-this._uPrev.getHeight()-i.getHeight())*this._nTotal},i.$flushThumb=function(){var t=this._uThumb,e=this._nTotal,i=this.getHeight(),s=this._uPrev.getHeight(),n=this.getBodyHeight(),i=r(o(n*i/(i+e)),t.getMinimumHeight()+5);e&&(t.$setSize(0,i),t.setPosition(0,s+o(this._nValue/e*(n-i))),t.setRange(s,0,n+s,0))},i.$getPageStep=function(){var t=this.getHeight();return this._nPageStep||t-t%this._nStep},i.$setSize=function(t,e){y.$setSize.call(this,t,e);var t=this.getBodyWidth(),e=this.$$paddingTop,i=this._uNext;this._uPrev.$setSize(t,e),i.$setSize(t,this.$$paddingBottom),this._uThumb.$setSize(t),i.setPosition(0,this.getBodyHeight()+e),this.$flushThumb()},i.getMouseDirection=function(){return f(this)<this._uThumb.getY()?-1:f(this)>this._uThumb.getY()+this._uThumb.getHeight()?1:0},(b=(e.HScrollbar=p(v,"ui-hscrollbar")).prototype).$calculateValue=function(t,e){var i=this._uThumb,s=i._oRange;return(t-s.left)/(s.right-this._uPrev.getWidth()-i.getWidth())*this._nTotal},b.$flushThumb=function(){var t=this._uThumb,e=this._nTotal,i=this.getWidth(),s=this._uPrev.getWidth(),n=this.getBodyWidth(),i=r(o(n*i/(i+e)),t.getMinimumWidth()+5);e&&(t.$setSize(i),t.setPosition(s+o(this._nValue/e*(n-i)),0),t.setRange(0,n+s,0,s))},b.$getPageStep=function(){var t=this.getWidth();return t-t%this._nStep},b.$setSize=function(t,e){y.$setSize.call(this,t,e);var t=this.getBodyHeight(),e=this.$$paddingLeft,i=this._uNext;this._uPrev.$setSize(e,t),i.$setSize(this.$$paddingRight,t),this._uThumb.$setSize(0,t),i.setPosition(this.getBodyWidth()+e,0),this.$flushThumb()},b.getMouseDirection=function(){return g(this)<this._uThumb.getX()?-1:g(this)>this._uThumb.getX()+this._uThumb.getWidth()?1:0}})(),(()=>{var t=ecui,e=t.dom,i=t.ui,s=t.util,l=(C=Math).max,n=C.min,o=C.floor,r=e.create,y=e.getParent,h=e.getPosition,u=e.getStyle,a=e.moveElements,c=s.attachEvent,d=s.blank,g=s.detachEvent,f=s.toNumber,p=t.$fastCreate,_=t.calcHeightRevise,m=t.calcWidthRevise,$=t.findControl,v=t.getKey,b=t.getScrollNarrow,C=t.inherits,S=t.triggerEvent,T=t.wrapEvent,w=i.Control,x=w.prototype,e=i.VScrollbar,s=i.HScrollbar,E=(t=C(w,null,null,function(t,e){g(t,"scroll",L),c(t,"scroll",L)})).prototype;function L(t){S($(y(T(t).target)),"scroll")}E.$hide=E.hide=function(){this.getMain().style[this._aProperty[0]]="hidden",E.setValue.call(this,0)},E.$setValue=function(t){this.getMain()[this._aProperty[1]]=n(l(0,t),this.getTotal())},E.$show=E.show=function(){this.getMain().style[this._aProperty[0]]="scroll"},E.getHeight=function(){return this._aProperty[4]?this.getMain()[this._aProperty[4]]:b()},E.getTotal=function(){return f(this.getMain().lastChild.style[this._aProperty[2]])},E.getValue=function(){return this.getMain()[this._aProperty[1]]},E.getWidth=function(){return this._aProperty[3]?this.getMain()[this._aProperty[3]]:b()},E.isShow=function(){return"hidden"!=this.getMain().style[this._aProperty[0]]},E.setTotal=function(t){this.getMain().lastChild.style[this._aProperty[2]]=t+"px"},E.setValue=function(t){this.$setValue(t),S(this.getParent(),"scroll")},E.$cache=E.$getPageStep=E.$setPageStep=E.$setSize=E.alterClass=E.cache=E.getStep=E.init=E.setPosition=E.setStep=E.skip=d;var B,P=C(t,null,null,function(t,e){this._aProperty=["overflowY","scrollTop","height",null,"offsetHeight"]}),H=C(t,null,null,function(t,e){this._aProperty=["overflowX","scrollLeft","width","offsetWidth",null]}),I=C(w),R=I.prototype;for(B in x)R[B]=d;(t=(i.Panel=C(w,"ui-panel",function(t,e){var i=!1!==e.vScroll,s=!1!==e.hScroll,n=this.getType(),o=r(n+"-body","position:absolute;top:0px;left:0px"+(s?";white-space:nowrap":""));t.style.overflow="hidden",a(t,o,!0),t.innerHTML=(e.browser?'<div style="position:absolute;top:0px;left:0px;overflow:auto;padding:0px;border:0px"><div style="width:1px;height:1px;padding:0px;border:0px"></div></div>':(i?'<div class="'+n+"-vscrollbar"+this.VScrollbar.TYPES+'" style="position:absolute"></div>':"")+(s?'<div class="'+n+"-hscrollbar"+this.HScrollbar.TYPES+'" style="position:absolute"></div>':"")+(i&&s?'<div class="'+n+"-corner"+w.TYPES+'" style="position:absolute"></div>':""))+'<div class="'+n+'-layout" style="position:relative;overflow:hidden;padding:0px"></div>',t.lastChild.appendChild(o)},function(t,e){var i,s=0,n=e.browser,o=!1!==e.vScroll,r=!1!==e.hScroll,a=[[o,"_uVScrollbar",n?P:this.VScrollbar],[r,"_uHScrollbar",n?H:this.HScrollbar],[o&&r,"_uCorner",n?I:w]];for(this.$setBody(t.lastChild.lastChild),this._bAbsolute=e.absolute,this._nWheelDelta=e.wheelDelta,t=t.firstChild,n&&(this._eBrowser=t);i=a[s++];)i[0]&&(this[i[1]]=p(i[2],t,this),n||(t=t.nextSibling))})).prototype).VScrollbar=e,t.HScrollbar=s,t.$cache=function(t,e){x.$cache.call(this,t,e);var i=this.getBody(),s=i.offsetWidth,n=i.offsetHeight;if(t=u(y(i)),this.$$bodyWidthRevise=m(t),this.$$bodyHeightRevise=_(t),this._bAbsolute)for(var o=0,r=i.all||i.getElementsByTagName("*"),a=h(i);i=r[o++];)i.offsetWidth&&"absolute"==u(i,"position")&&(t=h(i),s=l(s,t.left-a.left+i.offsetWidth),n=l(n,t.top-a.top+i.offsetHeight));this.$$mainWidth=s,this.$$mainHeight=n,this._uVScrollbar&&this._uVScrollbar.cache(!0,!0),this._uHScrollbar&&this._uHScrollbar.cache(!0,!0),this._uCorner&&this._uCorner.cache(!0,!0)},t.$dispose=function(){this._eBrowser=null,x.$dispose.call(this)},t.$keydown=t.$keypress=function(t){var e=v(),i=e%2?this._uHScrollbar:this._uVScrollbar;if(37<=e&&e<=40&&!t.target.value)return i&&i.skip(e+e%2-39),!1},t.$mousewheel=function(t){if(this.isHovered()){var e,i,s=this._uVScrollbar;if(s&&s.isShow())return e=s.getValue(),i=this._nWheelDelta||o(20/s.getStep())||1,s.skip(0<t.detail?i:-i),t.stopPropagation(),e==s.getValue()}},t.$scroll=function(){var t=this.getBody().style;t.left=-l(this.getScrollLeft(),0)+"px",t.top=-l(this.getScrollTop(),0)+"px"},t.$setSize=function(t,e){x.$setSize.call(this,t,e),this.$locate();var i=this.$getBasicWidth(),s=this.$getBasicHeight(),n=this.$$paddingLeft+this.$$paddingRight,o=this.$$paddingTop+this.$$paddingBottom,r=this.getWidth()-i,a=this.getHeight()-s,l=this.$$mainWidth,h=this.$$mainHeight,u=this._eBrowser,c=this._uVScrollbar,d=this._uHScrollbar,g=this._uCorner,f=c?c.getWidth():0,p=d?d.getHeight():0,_=r-f,m=a-p,$=_+n,v=m+o;if(c&&c.setPosition($,0),d&&d.setPosition(0,v),g&&g.setPosition($,v),l<=r&&h<=a)c&&c.$hide(),d&&d.$hide(),g&&g.$hide(),_=r,m=a;else for(;;){if(g){if(_<l&&m<h){d.$setSize($),d.setTotal(u?l+i:l-_),d.$show(),c.$setSize(0,v),c.setTotal(u?h+s:h-m),c.$show(),g.$setSize(f,p),g.$show();break}g.$hide()}d&&(r<l?(d.$setSize(r+n),d.setTotal(u?l+i:l-r),d.$show(),c&&c.$hide(),_=r):d.$hide()),c&&(a<h?(c.$setSize(0,a+o),c.setTotal(u?h+s:h-a),c.$show(),d&&d.$hide(),m=a):c.$hide());break}_-=this.$$bodyWidthRevise,m-=this.$$bodyHeightRevise,c&&c.$setPageStep(m),d&&d.$setPageStep(_),u&&((g=u.style).width=r+n+"px",g.height=a+o+"px"),(g=y(this.getBody()).style).width=_+"px",g.height=m+"px"},t.getScrollLeft=function(){var t=this._uHScrollbar;return t?t.getValue():-1},t.getScrollTop=function(){var t=this._uVScrollbar;return t?t.getValue():-1},t.init=function(){x.init.call(this),this._uVScrollbar&&this._uVScrollbar.init(),this._uHScrollbar&&this._uHScrollbar.init(),this._uCorner&&this._uCorner.init()},t.reset=function(){this._uVScrollbar&&this._uVScrollbar.setValue(0),this._uHScrollbar&&this._uHScrollbar.setValue(0)}})(),(()=>{var t=ecui,e=t.array,i=t.dom,s=t.ui,n=t.util,o=e.indexOf,r=e.remove,a=i.children,l=i.create,h=i.insertBefore,u=t.string.trim,c=n.blank,d=n.callSuper,g=t.$fastCreate,f=t.getOptions,e=t.inherits,p=t.triggerEvent,_=(i=s.Control).prototype,m=s.Item=e(i,"ui-item",function(t,e){t.style.overflow="hidden"}),n=m.prototype,$=s.Items={};n.$click=function(t){_.$click.call(this,t);var e=this.getParent();e&&p(e,"itemclick",t,[o($[e.getUID()],this)])},$.$append=function(t){if(!(t instanceof(this.Item||m))||!1===d(this,"$append"))return!1;$[this.getUID()].push(t),this.$alterItems()},$.$cache=function(t,e){d(this,"$cache");for(var i,s=0,n=$[this.getUID()];i=n[s++];)i.cache(!0,!0)},$.$dispose=function(){delete $[this.getUID()],d(this,"$dispose")},$.$initItems=function(){this.$alterItems=this.$initItems=c,$[this.getUID()]=[];for(var t,e=0,i=a(this.getBody());t=i[e++];)this.add(t);delete this.$alterItems},$.$remove=function(t){d(this,"$remove"),r($[this.getUID()],t),this.$alterItems()},$.add=function(t,e,i){var s,n=$[this.getUID()];return t instanceof m?t.setParent(this):("string"==typeof t&&(this.getBody().appendChild(s=l()),s.innerHTML=t,t=s),s=this.Item||m,t.className=u(t.className)+" "+this.getType()+"-item"+s.TYPES,(i=i||f(t)).parent=this,i.select=!1,n.push(t=g(s,t,this,i)),this.$alterItems()),t.getParent()&&(s=n[e])&&s!=t&&(h(t.getOuter(),s.getOuter()),n.splice(e,0,n.pop())),t},$.append=function(t,e){this.add(t,void 0,e)},$.getItems=function(){return $[this.getUID()].slice()},$.init=function(){d(this,"init"),this.$alterItems()},$.remove=function(t){return(t="number"==typeof t?$[this.getUID()][t]:t)&&t.setParent(),t||null},$.setItemSize=function(t,e){for(var i,s=0,n=$[this.getUID()];i=n[s++];)i.$setSize(t,e)}})(),(()=>{var n,t=ecui,e=t.array,i=t.ui,s=e.remove,o=t.util.setDefault,r=t.$connect,a=t.getKey,e=t.inherits,l=(t=i.InputControl).prototype;function h(t,e){var i;e!==t._nStatus&&(t.setClass(t.getPrimary()+["-checked","","-part"][e]),t._nStatus=e,(i=t.getInput()).defaultChecked=i.checked=!e,t._cSubject)&&u(t._cSubject)}function u(t){for(var e,i,s=0;i=t._aDependents[s++];){if(e!==n&&e!=i._nStatus){e=2;break}e=i._nStatus}e!==n&&h(t,e)}(i=(i.Checkbox=e(t,"ui-checkbox",function(t,e){o(e,"hidden",!0),o(e,"inputType","checkbox")},function(t,e){this._bDefault=this.getInput().defaultChecked,this._aDependents=[],r(this,this.setSubject,e.subject)})).prototype).$click=function(t){l.$click.call(this,t),this.setChecked(!!this._nStatus)},i.$dispose=function(){var t,e,i=this._aDependents.slice(0);for(this.setSubject(),t=0;e=i[t];t++)e.setSubject();l.$dispose.call(this)},i.$keydown=i.$keypress=i.$keyup=function(t){l["$"+t.type].call(this,t),32==a()&&("keyup"==t.type&&this.setChecked(!!this._nStatus),t.preventDefault())},i.$ready=function(){this._aDependents.length||h(this,this.getInput().checked?0:1)},i.$reset=function(t){this.getInput().checked=this._bDefault,l.$reset.call(this,t)},i.getDependents=function(){return this._aDependents.slice()},i.getSubject=function(){return this._cSubject||null},i.isChecked=function(){return!this._nStatus},i.setChecked=function(t){h(this,t?0:1);for(var e,i=0;e=this._aDependents[i++];)e.setChecked(t)},i.setDefaultValue=function(){this._bDefault=this.isChecked()},i.setSubject=function(t){var e=this._cSubject;e!=t&&(this._cSubject=t,e&&(s(e._aDependents,this),u(e)),t)&&(t._aDependents.push(this),u(t))}})(),(()=>{var t=ecui,e=t.ui,i=t.util.setDefault,s=t.getKey,n=t.inherits,o=t.query,r=(t=e.InputControl).prototype,a=e.Radio=n(t,"ui-radio",function(t,e){i(e,"hidden",!0),i(e,"inputType","radio")},function(t,e){this._bDefault=this.getInput().defaultChecked});function l(t,e){var i;void 0!==e&&((i=t.getInput()).defaultChecked=i.checked=e),t.setClass(t.getPrimary()+(t.isChecked()?"-checked":""))}(e=a.prototype).$click=function(t){r.$click.call(this,t),this.setChecked(!0)},e.$keydown=e.$keypress=e.$keyup=function(t){r["$"+t.type].call(this,t),32==t