fineui是帆软报表和BI产品线所使用的前端框架。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

2 lines
1.3 MiB

/*! time: 2020-6-4 16:31:27 */
!function(i){var n={};function r(e){if(n[e])return n[e].exports;var t=n[e]={i:e,l:!1,exports:{}};return i[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}r.m=i,r.c=n,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(i,n,function(e){return t[e]}.bind(null,n));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1075)}([,,,,,,function(e,t,i){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(o){"object"===("undefined"==typeof window?"undefined":n(window))&&(r=window)}e.exports=r},,,,,function(i,e,t){(function(e){function t(e){return e&&e.Math==Math&&e}i.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof e&&e)||Function("return this")()}).call(this,t(6))},function(e,t,i){var n=i(11),r=i(163),o=i(643),a=i(785),s=n.Symbol,l=r("wks");e.exports=function(e){return l[e]||(l[e]=a&&s[e]||(a?s:o)("Symbol."+e))}},function(e,t,i){var c=i(11),h=i(640).f,p=i(26),d=i(38),g=i(727),f=i(1003),I=i(731);e.exports=function(e,t){var i,n,r,o,a,s=e.target,l=e.global,u=e.stat;if(i=l?c:u?c[s]||g(s,{}):(c[s]||{}).prototype)for(n in t){if(o=t[n],r=e.noTargetGet?(a=h(i,n))&&a.value:i[n],!I(l?n:s+(u?".":"#")+n,e.forced)&&r!==undefined){if(typeof o==typeof r)continue;f(o,r)}(e.sham||r&&r.sham)&&p(o,"sham",!0),d(i,n,o,e)}}},,function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},,,function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,i){var n=i(18);e.exports=function(e){if(!n(e))throw TypeError(String(e)+" is not an object");return e}},,,,function(e,t,i){var n=i(15);e.exports=!n(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},,function(e,t){var i={}.hasOwnProperty;e.exports=function(e,t){return i.call(e,t)}},function(e,t,i){var n=i(23),r=i(27),o=i(162);e.exports=n?function(e,t,i){return r.f(e,t,o(1,i))}:function(e,t,i){return e[t]=i,e}},function(e,t,i){var n=i(23),r=i(780),o=i(19),a=i(725),s=Object.defineProperty;t.f=n?s:function(e,t,i){if(o(e),t=a(t,!0),o(i),r)try{return s(e,t,i)}catch(n){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},,,,,,,function(e,t,i){e.exports=i(11)},,,,function(e,t,i){var s=i(11),n=i(163),l=i(26),u=i(25),c=i(727),r=i(781),o=i(53),a=o.get,h=o.enforce,p=String(r).split("toString");n("inspectSource",function(e){return r.call(e)}),(e.exports=function(e,t,i,n){var r=!!n&&!!n.unsafe,o=!!n&&!!n.enumerable,a=!!n&&!!n.noTargetGet;"function"==typeof i&&("string"!=typeof t||u(i,"name")||l(i,"name",t),h(i).source=p.join("string"==typeof t?t:"")),e!==s?(r?!a&&e[t]&&(o=!0):delete e[t],o?e[t]=i:l(e,t,i)):o?e[t]=i:c(t,i)})(Function.prototype,"toString",function(){return"function"==typeof this&&a(this).source||r.call(this)})},,,function(e,r,o){"use strict";(function(e){var t=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function n(e,t){this._id=e,this._clearFn=t}r.setTimeout=function(){return new n(i.call(setTimeout,t,arguments),clearTimeout)},r.setInterval=function(){return new n(i.call(setInterval,t,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(e){e&&e.close()},n.prototype.unref=n.prototype.ref=function(){},n.prototype.close=function(){this._clearFn.call(t,this._id)},r.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},r.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},r._unrefActive=r.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},o(76),r.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||void 0,r.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||void 0}).call(this,o(6))},,,,,,,,,,,function(e,t){var i={}.toString;e.exports=function(e){return i.call(e).slice(8,-1)}},function(e,t,i){var n,r,o,a=i(1002),s=i(11),l=i(18),u=i(26),c=i(25),h=i(642),p=i(164),d=s.WeakMap;if(a){var g=new d,f=g.get,I=g.has,B=g.set;n=function(e,t){return B.call(g,e,t),t},r=function(e){return f.call(g,e)||{}},o=function(e){return I.call(g,e)}}else{var E=h("state");p[E]=!0,n=function(e,t){return u(e,E,t),t},r=function(e){return c(e,E)?e[E]:{}},o=function(e){return c(e,E)}}e.exports={set:n,get:r,has:o,enforce:function(e){return o(e)?r(e):n(e,{})},getterFor:function(i){return function(e){var t;if(!l(e)||(t=r(e)).type!==i)throw TypeError("Incompatible receiver, "+i+" required");return t}}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},,,,,,,function(e,t,i){"use strict";e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,i){"use strict";var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function l(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var u,c=[],h=!1,p=-1;function d(){h&&u&&(h=!1,u.length?c=u.concat(c):p=-1,c.length&&g())}function g(){if(!h){var e=l(d);h=!0;for(var t=c.length;t;){for(u=c,c=[];++p<t;)u&&u[p].run();p=-1,t=c.length}u=null,h=!1,function i(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function I(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];c.push(new f(e,t)),1!==c.length||h||l(g)},f.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=I,o.addListener=I,o.once=I,o.off=I,o.removeListener=I,o.removeAllListeners=I,o.emit=I,o.prependListener=I,o.prependOnceListener=I,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,i){var n=i(724),r=i(641);e.exports=function(e){return n(r(e))}},function(e,t){e.exports=!1},function(e,t,i){function n(e){return"function"==typeof e?e:undefined}var r=i(34),o=i(11);e.exports=function(e,t){return arguments.length<2?n(r[e])||n(o[e]):r[e]&&r[e][t]||o[e]&&o[e][t]}},function(e,t,i){function n(){}var r=i(19),o=i(1009),a=i(729),s=i(164),l=i(784),u=i(726),c=i(642)("IE_PROTO"),h="prototype",p=function(){var e,t=u("iframe"),i=a.length,n="script";for(t.style.display="none",l.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write("<script>document.F=Object</"+n+">"),e.close(),p=e.F;i--;)delete p[h][a[i]];return p()};e.exports=Object.create||function(e,t){var i;return null!==e?(n[h]=r(e),i=new n,n[h]=null,i[c]=e):i=p(),t===undefined?i:o(i,t)},s[c]=!0},function(e,t,i){var n=i(641);e.exports=function(e){return Object(n(e))}},function(e,t,i){function d(e,t){this.stopped=e,this.result=t}var g=i(19),f=i(1043),I=i(644),B=i(166),E=i(1044),_=i(1045);(e.exports=function(e,t,i,n,r){var o,a,s,l,u,c,h,p=B(t,i,n?2:1);if(r)o=e;else{if("function"!=typeof(a=E(e)))throw TypeError("Target is not iterable");if(f(a)){for(s=0,l=I(e.length);s<l;s++)if((u=n?p(g(h=e[s])[0],h[1]):p(e[s]))&&u instanceof d)return u;return new d(!1)}o=a.call(e)}for(c=o.next;!(h=c.call(o)).done;)if("object"==typeof(u=_(o,p,h.value,n))&&u&&u instanceof d)return u;return new d(!1)}).stop=function(e){return new d(!0,e)}},function(e,t,i){(function(e){_global=undefined,"undefined"!=typeof window?_global=window:void 0!==e?_global=e:"undefined"!=typeof self?_global=self:_global=this,null==_global.BI&&(_global.BI={prepares:[]}),null==_global.BI.prepares&&(_global.BI.prepares=[])}).call(this,i(6))},,,,,function(e,Vs,Ss){(function(Cs,vs){var Ns;(function(){var V,d=200,m="Expected a function",n="__lodash_hash_undefined__",_="__lodash_placeholder__",b=1,T=2,y=4,C=1,v=2,S=1,x=2,N=4,L=8,w=16,A=32,D=64,M=128,k=256,e=512,i=1/0,r=9007199254740991,t=17976931348623157e292,o=NaN,a=4294967295,s=[["ary",M],["bind",S],["bindKey",x],["curry",L],["curryRight",w],["flip",e],["partial",A],["partialRight",D],["rearg",k]],P="[object Arguments]",H="[object Array]",l="[object AsyncFunction]",R="[object Boolean]",Y="[object Date]",W="[object Error]",O="[object Function]",F="[object GeneratorFunction]",G="[object Map]",Z="[object Number]",u="[object Null]",X="[object Object]",c="[object Promise]",h="[object Proxy]",J="[object RegExp]",K="[object Set]",Q="[object String]",U="[object Symbol]",p="[object Undefined]",g="[object WeakMap]",z="[object ArrayBuffer]",j="[object DataView]",q="[object Float32Array]",$="[object Float64Array]",ee="[object Int8Array]",te="[object Int16Array]",ie="[object Int32Array]",ne="[object Uint8Array]",re="[object Uint8ClampedArray]",oe="[object Uint16Array]",ae="[object Uint32Array]",f=/[&<>"']/g,I=RegExp(f.source),B=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,E=/^\w*$/,se=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,le=/^\s+|\s+$/g,ue=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ce=/\{\n\/\* \[wrapped with (.+)\] \*/,he=/,? & /,pe=/\\(\\)?/g,de=/\w*$/,ge=/^[-+]0x[0-9a-f]+$/i,fe=/^0b[01]+$/i,Ie=/^\[object .+?Constructor\]$/,Be=/^0o[0-7]+$/i,Ee=/^(?:0|[1-9]\d*)$/,_e="\\ud800-\\udfff",me="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",be="\\ufe0e\\ufe0f",Te="["+_e+"]",ye="["+me+"]",Ce="\\ud83c[\\udffb-\\udfff]",ve="[^"+_e+"]",Ne="(?:\\ud83c[\\udde6-\\uddff]){2}",Ve="[\\ud800-\\udbff][\\udc00-\\udfff]",Se="\\u200d",xe="(?:"+ye+"|"+Ce+")"+"?",Le="["+be+"]?",we=Le+xe+("(?:"+Se+"(?:"+[ve,Ne,Ve].join("|")+")"+Le+xe+")*"),Ae="(?:"+[ve+ye+"?",ye,Ne,Ve,Te].join("|")+")",De=RegExp(Ce+"(?="+Ce+")|"+Ae+we,"g"),Me=RegExp("["+Se+_e+me+be+"]"),ke={};ke[q]=ke[$]=ke[ee]=ke[te]=ke[ie]=ke[ne]=ke[re]=ke[oe]=ke[ae]=!0,ke[P]=ke[H]=ke[z]=ke[R]=ke[j]=ke[Y]=ke[W]=ke[O]=ke[G]=ke[Z]=ke[X]=ke[J]=ke[K]=ke[Q]=ke[g]=!1;var Pe={};Pe[P]=Pe[H]=Pe[z]=Pe[j]=Pe[R]=Pe[Y]=Pe[q]=Pe[$]=Pe[ee]=Pe[te]=Pe[ie]=Pe[G]=Pe[Z]=Pe[X]=Pe[J]=Pe[K]=Pe[Q]=Pe[U]=Pe[ne]=Pe[re]=Pe[oe]=Pe[ae]=!0,Pe[W]=Pe[O]=Pe[g]=!1;var He=parseFloat,Re=parseInt,Ye="object"==typeof Cs&&Cs&&Cs.Object===Object&&Cs,We="object"==typeof self&&self&&self.Object===Object&&self,Oe=Ye||We||Function("return this")(),Fe=Vs&&!Vs.nodeType&&Vs,Ge=Fe&&"object"==typeof vs&&vs&&!vs.nodeType&&vs,Ze=Ge&&Ge.exports===Fe,Xe=Ze&&Ye.process,Je=function(){try{return Xe&&Xe.binding&&Xe.binding("util")}catch(e){}}(),Ke=Je&&Je.isDate,Qe=Je&&Je.isMap,Ue=Je&&Je.isRegExp,ze=Je&&Je.isSet,je=Je&&Je.isTypedArray;function qe(e,t,i){switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2])}return e.apply(t,i)}function $e(e,t,i,n){for(var r=-1,o=null==e?0:e.length;++r<o;){var a=e[r];t(n,a,i(a),e)}return n}function et(e,t){for(var i=-1,n=null==e?0:e.length;++i<n&&!1!==t(e[i],i,e););return e}function tt(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(!t(e[i],i,e))return!1;return!0}function it(e,t){for(var i=-1,n=null==e?0:e.length,r=0,o=[];++i<n;){var a=e[i];t(a,i,e)&&(o[r++]=a)}return o}function nt(e,t){return!!(null==e?0:e.length)&&-1<pt(e,t,0)}function rt(e,t,i){for(var n=-1,r=null==e?0:e.length;++n<r;)if(i(t,e[n]))return!0;return!1}function ot(e,t){for(var i=-1,n=null==e?0:e.length,r=Array(n);++i<n;)r[i]=t(e[i],i,e);return r}function at(e,t){for(var i=-1,n=t.length,r=e.length;++i<n;)e[r+i]=t[i];return e}function st(e,t,i,n){var r=-1,o=null==e?0:e.length;for(n&&o&&(i=e[++r]);++r<o;)i=t(i,e[r],r,e);return i}function lt(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}var ut=gt("length");function ct(e,n,t){var r;return t(e,function(e,t,i){if(n(e,t,i))return r=t,!1}),r}function ht(e,t,i,n){for(var r=e.length,o=i+(n?1:-1);n?o--:++o<r;)if(t(e[o],o,e))return o;return-1}function pt(e,t,i){return t==t?function o(e,t,i){var n=i-1,r=e.length;for(;++n<r;)if(e[n]===t)return n;return-1}(e,t,i):ht(e,dt,i)}function dt(e){return e!=e}function gt(t){return function(e){return null==e?V:e[t]}}function ft(e,n,r,o,t){return t(e,function(e,t,i){r=o?(o=!1,e):n(r,e,t,i)}),r}function It(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}function Bt(t){return function(e){return t(e)}}function Et(e,t){return e.has(t)}var _t=function Zo(t){return function(e){return null==t?V:t[e]}}({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function mt(e){return Me.test(e)}function bt(e){var i=-1,n=Array(e.size);return e.forEach(function(e,t){n[++i]=[t,e]}),n}function Tt(t,i){return function(e){return t(i(e))}}function yt(e,t){for(var i=-1,n=e.length,r=0,o=[];++i<n;){var a=e[i];a!==t&&a!==_||(e[i]=_,o[r++]=i)}return o}function Ct(e,t){return"__proto__"==t?V:e[t]}function vt(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}function Nt(e){return mt(e)?function i(e){var t=De.lastIndex=0;for(;De.test(e);)++t;return t}(e):ut(e)}function Vt(e){return mt(e)?function t(e){return e.match(De)||[]}(e):function i(e){return e.split("")}(e)}var St,xt=Array.prototype,Lt=Function.prototype,wt=Object.prototype,At=Oe["__core-js_shared__"],Dt=Lt.toString,Mt=wt.hasOwnProperty,kt=0,Pt=(St=/[^.]+$/.exec(At&&At.keys&&At.keys.IE_PROTO||""))?"Symbol(src)_1."+St:"",Ht=wt.toString,Rt=Dt.call(Object),Yt=Oe._,Wt=RegExp("^"+Dt.call(Mt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ot=Ze?Oe.Buffer:V,Ft=Oe.Symbol,Gt=Oe.Uint8Array,Zt=Ot?Ot.allocUnsafe:V,Xt=Tt(Object.getPrototypeOf,Object),Jt=Object.create,Kt=wt.propertyIsEnumerable,Qt=xt.splice,Ut=Ft?Ft.isConcatSpreadable:V,zt=Ft?Ft.iterator:V,jt=Ft?Ft.toStringTag:V,qt=function(){try{var e=rr(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),$t=Math.ceil,ei=Math.floor,ti=Object.getOwnPropertySymbols,ii=Ot?Ot.isBuffer:V,ni=Oe.isFinite,ri=Tt(Object.keys,Object),oi=Math.max,ai=Math.min,si=Date.now,li=Math.random,ui=(xt.reverse,rr(Oe,"DataView")),ci=rr(Oe,"Map"),hi=rr(Oe,"Promise"),pi=rr(Oe,"Set"),di=rr(Oe,"WeakMap"),gi=rr(Object,"create"),fi=di&&new di,Ii={},Bi=vr(ui),Ei=vr(ci),_i=vr(hi),mi=vr(pi),bi=vr(di),Ti=Ft?Ft.prototype:V,yi=Ti?Ti.valueOf:V,Ci=Ti?Ti.toString:V;function vi(e){if(lo(e)&&!eo(e)&&!(e instanceof Li)){if(e instanceof xi)return e;if(Mt.call(e,"__wrapped__"))return Nr(e)}return new xi(e)}var Ni=function(e){if(!so(e))return{};if(Jt)return Jt(e);Vi.prototype=e;var t=new Vi;return Vi.prototype=V,t};function Vi(){}function Si(){}function xi(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=V}function Li(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=a,this.__views__=[]}function wi(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function Ai(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function Di(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function Mi(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new Di;++t<i;)this.add(e[t])}function ki(e){var t=this.__data__=new Ai(e);this.size=t.size}function Pi(e,t){var i=eo(e),n=!i&&$r(e),r=!i&&!n&&no(e),o=!i&&!n&&!r&&Bo(e),a=i||n||r||o,s=a?It(e.length,String):[],l=s.length;for(var u in e)!t&&!Mt.call(e,u)||a&&("length"==u||r&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||hr(u,l))||s.push(u);return s}function Hi(e,t,i){(i===V||qr(e[t],i))&&(i!==V||t in e)||Fi(e,t,i)}function Ri(e,t,i){var n=e[t];Mt.call(e,t)&&qr(n,i)&&(i!==V||t in e)||Fi(e,t,i)}function Yi(e,t){for(var i=e.length;i--;)if(qr(e[i][0],t))return i;return-1}function Wi(e,n,r,o){return Ji(e,function(e,t,i){n(o,e,r(e),i)}),o}function Oi(e,t){return e&&Yn(t,Lo(t),e)}function Fi(e,t,i){"__proto__"==t&&qt?qt(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i}function Gi(i,n,r,e,t,o){var a,s=n&b,l=n&T,u=n&y;if(r&&(a=t?r(i,e,t,o):r(i)),a!==V)return a;if(!so(i))return i;var c=eo(i);if(c){if(a=function f(e){var t=e.length,i=new e.constructor(t);t&&"string"==typeof e[0]&&Mt.call(e,"index")&&(i.index=e.index,i.input=e.input);return i}(i),!s)return Rn(i,a)}else{var h=sr(i),p=h==O||h==F;if(no(i))return An(i,s);if(h==X||h==P||p&&!t){if(a=l||p?{}:ur(i),!s)return l?function I(e,t){return Yn(e,ar(e),t)}(i,function B(e,t){return e&&Yn(t,wo(t),e)}(a,i)):function E(e,t){return Yn(e,or(e),t)}(i,Oi(a,i))}else{if(!Pe[h])return t?i:{};a=function _(e,t,i){var n=e.constructor;switch(t){case z:return Dn(e);case R:case Y:return new n(+e);case j:return function r(e,t){var i=t?Dn(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)}(e,i);case q:case $:case ee:case te:case ie:case ne:case re:case oe:case ae:return Mn(e,i);case G:return new n;case Z:case Q:return new n(e);case J:return function o(e){var t=new e.constructor(e.source,de.exec(e));return t.lastIndex=e.lastIndex,t}(e);case K:return new n;case U:return function a(e){return yi?Object(yi.call(e)):{}}(e)}}(i,h,s)}}var d=(o=o||new ki).get(i);if(d)return d;if(o.set(i,a),go(i))return i.forEach(function(e){a.add(Gi(e,n,r,e,i,o))}),a;if(uo(i))return i.forEach(function(e,t){a.set(t,Gi(e,n,r,t,i,o))}),a;var g=c?V:(u?l?er:$n:l?wo:Lo)(i);return et(g||i,function(e,t){g&&(e=i[t=e]),Ri(a,t,Gi(e,n,r,t,i,o))}),a}function Zi(e,t,i){if("function"!=typeof e)throw new TypeError(m);return setTimeout(function(){e.apply(V,i)},t)}function Xi(e,t,i,n){var r=-1,o=nt,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;i&&(t=ot(t,Bt(i))),n?(o=rt,a=!1):t.length>=d&&(o=Et,a=!1,t=new Mi(t));e:for(;++r<s;){var c=e[r],h=null==i?c:i(c);if(c=n||0!==c?c:0,a&&h==h){for(var p=u;p--;)if(t[p]===h)continue e;l.push(c)}else o(t,h,n)||l.push(c)}return l}(vi.prototype=Si.prototype).constructor=vi,(xi.prototype=Ni(Si.prototype)).constructor=xi,(Li.prototype=Ni(Si.prototype)).constructor=Li,wi.prototype.clear=function Xo(){this.__data__=gi?gi(null):{},this.size=0},wi.prototype["delete"]=function Jo(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},wi.prototype.get=function Ko(e){var t=this.__data__;if(gi){var i=t[e];return i===n?V:i}return Mt.call(t,e)?t[e]:V},wi.prototype.has=function Qo(e){var t=this.__data__;return gi?t[e]!==V:Mt.call(t,e)},wi.prototype.set=function Uo(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=gi&&t===V?n:t,this},Ai.prototype.clear=function zo(){this.__data__=[],this.size=0},Ai.prototype["delete"]=function jo(e){var t=this.__data__,i=Yi(t,e);return!(i<0)&&(i==t.length-1?t.pop():Qt.call(t,i,1),--this.size,!0)},Ai.prototype.get=function qo(e){var t=this.__data__,i=Yi(t,e);return i<0?V:t[i][1]},Ai.prototype.has=function $o(e){return-1<Yi(this.__data__,e)},Ai.prototype.set=function ea(e,t){var i=this.__data__,n=Yi(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this},Di.prototype.clear=function ta(){this.size=0,this.__data__={hash:new wi,map:new(ci||Ai),string:new wi}},Di.prototype["delete"]=function ia(e){var t=nr(this,e)["delete"](e);return this.size-=t?1:0,t},Di.prototype.get=function na(e){return nr(this,e).get(e)},Di.prototype.has=function ra(e){return nr(this,e).has(e)},Di.prototype.set=function oa(e,t){var i=nr(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this},Mi.prototype.add=Mi.prototype.push=function aa(e){return this.__data__.set(e,n),this},Mi.prototype.has=function sa(e){return this.__data__.has(e)},ki.prototype.clear=function la(){this.__data__=new Ai,this.size=0},ki.prototype["delete"]=function ua(e){var t=this.__data__,i=t["delete"](e);return this.size=t.size,i},ki.prototype.get=function ca(e){return this.__data__.get(e)},ki.prototype.has=function ha(e){return this.__data__.has(e)},ki.prototype.set=function pa(e,t){var i=this.__data__;if(i instanceof Ai){var n=i.__data__;if(!ci||n.length<d-1)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new Di(n)}return i.set(e,t),this.size=i.size,this};var Ji=function da(o,a){return function(e,t){if(null==e)return e;if(!to(e))return o(e,t);for(var i=e.length,n=a?i:-1,r=Object(e);(a?n--:++n<i)&&!1!==t(r[n],n,r););return e}}($i);function Ki(e,n){var r=!0;return Ji(e,function(e,t,i){return r=!!n(e,t,i)}),r}function Qi(e,t,i){for(var n=-1,r=e.length;++n<r;){var o=e[n],a=t(o);if(null!=a&&(s===V?a==a&&!Io(a):i(a,s)))var s=a,l=o}return l}function Ui(e,n){var r=[];return Ji(e,function(e,t,i){n(e,t,i)&&r.push(e)}),r}function zi(e,t,i,n,r){var o=-1,a=e.length;for(i=i||cr,r=r||[];++o<a;){var s=e[o];0<t&&i(s)?1<t?zi(s,t-1,i,n,r):at(r,s):n||(r[r.length]=s)}return r}var ji=Fn(),qi=Fn(!0);function $i(e,t){return e&&ji(e,t,Lo)}function en(e,t){return e&&qi(e,t,Lo)}function tn(t,e){return it(e,function(e){return oo(t[e])})}function nn(e,t){for(var i=0,n=(t=wn(t,e)).length;null!=e&&i<n;)e=e[Cr(t[i++])];return i&&i==n?e:V}function rn(e,t,i){var n=t(e);return eo(e)?n:at(n,i(e))}function on(e){return null==e?e===V?p:u:jt&&jt in Object(e)?function a(e){var t=Mt.call(e,jt),i=e[jt];try{e[jt]=V;var n=!0}catch(o){}var r=Ht.call(e);n&&(t?e[jt]=i:delete e[jt]);return r}(e):function t(e){return Ht.call(e)}(e)}function an(e,t){return t<e}function sn(e,t){return null!=e&&Mt.call(e,t)}function ln(e,t){return null!=e&&t in Object(e)}function un(e){return lo(e)&&on(e)==P}function cn(e,t,i,n,r){return e===t||(null==e||null==t||!lo(e)&&!lo(t)?e!=e&&t!=t:function E(e,t,i,n,r,o){var a=eo(e),s=eo(t),l=a?H:sr(e),u=s?H:sr(t),c=(l=l==P?X:l)==X,h=(u=u==P?X:u)==X,p=l==u;if(p&&no(e)){if(!no(t))return!1;c=!(a=!0)}if(p&&!c)return o=o||new ki,a||Bo(e)?jn(e,t,i,n,r,o):function B(e,t,i,n,r,o,a){switch(i){case j:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case z:return!(e.byteLength!=t.byteLength||!o(new Gt(e),new Gt(t)));case R:case Y:case Z:return qr(+e,+t);case W:return e.name==t.name&&e.message==t.message;case J:case Q:return e==t+"";case G:var s=bt;case K:var l=n&C;if(s=s||vt,e.size!=t.size&&!l)return!1;var u=a.get(e);if(u)return u==t;n|=v,a.set(e,t);var c=jn(s(e),s(t),n,r,o,a);return a["delete"](e),c;case U:if(yi)return yi.call(e)==yi.call(t)}return!1}(e,t,l,i,n,r,o);if(!(i&C)){var d=c&&Mt.call(e,"__wrapped__"),g=h&&Mt.call(t,"__wrapped__");if(d||g){var f=d?e.value():e,I=g?t.value():t;return o=o||new ki,r(f,I,i,n,o)}}return p&&(o=o||new ki,function m(e,t,i,n,r,o){var a=i&C,s=$n(e),l=s.length,u=$n(t).length;if(l!=u&&!a)return!1;var c=l;for(;c--;){var h=s[c];if(!(a?h in t:Mt.call(t,h)))return!1}var p=o.get(e);if(p&&o.get(t))return p==t;var d=!0;o.set(e,t),o.set(t,e);var g=a;for(;++c<l;){h=s[c];var f=e[h],I=t[h];if(n)var B=a?n(I,f,h,t,e,o):n(f,I,h,e,t,o);if(!(B===V?f===I||r(f,I,i,n,o):B)){d=!1;break}g=g||"constructor"==h}if(d&&!g){var E=e.constructor,_=t.constructor;E!=_&&"constructor"in e&&"constructor"in t&&!("function"==typeof E&&E instanceof E&&"function"==typeof _&&_ instanceof _)&&(d=!1)}return o["delete"](e),o["delete"](t),d}(e,t,i,n,r,o))}(e,t,i,n,cn,r))}function hn(e){return!(!so(e)||function t(e){return!!Pt&&Pt in e}(e))&&(oo(e)?Wt:Ie).test(vr(e))}function pn(e){return"function"==typeof e?e:null==e?Ro:"object"==typeof e?eo(e)?function t(i,n){if(dr(i)&&fr(n))return Ir(Cr(i),n);return function(e){var t=No(e,i);return t===V&&t===n?Vo(e,i):cn(n,t,C|v)}}(e[0],e[1]):Bn(e):function n(e){return dr(e)?gt(Cr(e)):function i(t){return function(e){return nn(e,t)}}(e)}(e)}function dn(e){if(!gr(e))return ri(e);var t=[];for(var i in Object(e))Mt.call(e,i)&&"constructor"!=i&&t.push(i);return t}function gn(e){if(!so(e))return function r(e){var t=[];if(null!=e)for(var i in Object(e))t.push(i);return t}(e);var t=gr(e),i=[];for(var n in e)("constructor"!=n||!t&&Mt.call(e,n))&&i.push(n);return i}function fn(e,t){return e<t}function In(e,n){var r=-1,o=to(e)?Array(e.length):[];return Ji(e,function(e,t,i){o[++r]=n(e,t,i)}),o}function Bn(t){var i=function o(e){var t=Lo(e),i=t.length;for(;i--;){var n=t[i],r=e[n];t[i]=[n,r,fr(r)]}return t}(t);return 1==i.length&&i[0][2]?Ir(i[0][0],i[0][1]):function(e){return e===t||function d(e,t,i,n){var r=i.length,o=r,a=!n;if(null==e)return!o;for(e=Object(e);r--;){var s=i[r];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++r<o;){var l=(s=i[r])[0],u=e[l],c=s[1];if(a&&s[2]){if(u===V&&!(l in e))return!1}else{var h=new ki;if(n)var p=n(u,c,l,e,t,h);if(!(p===V?cn(c,u,C|v,n,h):p))return!1}}return!0}(e,t,i)}}function En(n,r,o,a,s){n!==r&&ji(r,function(e,t){if(so(e))s=s||new ki,function I(e,t,i,n,r,o,a){var s=Ct(e,i),l=Ct(t,i),u=a.get(l);if(u)return void Hi(e,i,u);var c=o?o(s,l,i+"",e,t,a):V,h=c===V;if(h){var p=eo(l),d=!p&&no(l),g=!p&&!d&&Bo(l);c=l,p||d||g?c=eo(s)?s:io(s)?Rn(s):d?An(l,!(h=!1)):g?Mn(l,!(h=!1)):[]:ho(l)||$r(l)?$r(c=s)?c=function f(e){return Yn(e,wo(e))}(s):(!so(s)||n&&oo(s))&&(c=ur(l)):h=!1}h&&(a.set(l,c),r(c,l,n,o,a),a["delete"](l));Hi(e,i,c)}(n,r,t,o,En,a,s);else{var i=a?a(Ct(n,t),e,t+"",n,r,s):V;i===V&&(i=e),Hi(n,t,i)}},wo)}function _n(e,n,i){var r=-1;return n=ot(n.length?n:[Ro],Bt(pn)),function o(e,t){var i=e.length;for(e.sort(t);i--;)e[i]=e[i].value;return e}(In(e,function(t,e,i){return{criteria:ot(n,function(e){return e(t)}),index:++r,value:t}}),function(e,t){return function c(e,t,i){var n=-1,r=e.criteria,o=t.criteria,a=r.length,s=i.length;for(;++n<a;){var l=kn(r[n],o[n]);if(l){if(s<=n)return l;var u=i[n];return l*("desc"==u?-1:1)}}return e.index-t.index}(e,t,i)})}function mn(e,t,i){for(var n=-1,r=t.length,o={};++n<r;){var a=t[n],s=nn(e,a);i(s,a)&&Tn(o,wn(a,e),s)}return o}function bn(e,t){return mr(Br(e,t,Ro),e+"")}function Tn(e,t,i,n){if(!so(e))return e;for(var r=-1,o=(t=wn(t,e)).length,a=o-1,s=e;null!=s&&++r<o;){var l=Cr(t[r]),u=i;if(r!=a){var c=s[l];(u=n?n(c,l,s):V)===V&&(u=so(c)?c:hr(t[r+1])?[]:{})}Ri(s,l,u),s=s[l]}return e}var yn=fi?function(e,t){return fi.set(e,t),e}:Ro,Cn=qt?function(e,t){return qt(e,"toString",{configurable:!0,enumerable:!1,value:Ho(t),writable:!0})}:Ro;function vn(e,t,i){var n=-1,r=e.length;t<0&&(t=r<-t?0:r+t),(i=r<i?r:i)<0&&(i+=r),r=i<t?0:i-t>>>0,t>>>=0;for(var o=Array(r);++n<r;)o[n]=e[n+t];return o}function Nn(e,n){var r;return Ji(e,function(e,t,i){return!(r=n(e,t,i))}),!!r}function Vn(e){if("string"==typeof e)return e;if(eo(e))return ot(e,Vn)+"";if(Io(e))return Ci?Ci.call(e):"";var t=e+"";return"0"==t&&1/e==-i?"-0":t}function Sn(e,t,i){var n=-1,r=nt,o=e.length,a=!0,s=[],l=s;if(i)a=!1,r=rt;else if(d<=o){var u=t?null:Kn(e);if(u)return vt(u);a=!1,r=Et,l=new Mi}else l=t?[]:s;e:for(;++n<o;){var c=e[n],h=t?t(c):c;if(c=i||0!==c?c:0,a&&h==h){for(var p=l.length;p--;)if(l[p]===h)continue e;t&&l.push(h),s.push(c)}else r(l,h,i)||(l!==s&&l.push(h),s.push(c))}return s}function xn(e,t){var i=e;return i instanceof Li&&(i=i.value()),st(t,function(e,t){return t.func.apply(t.thisArg,at([e],t.args))},i)}function Ln(e){return io(e)?e:[]}function wn(e,t){return eo(e)?e:dr(e,t)?[e]:yr(To(e))}function An(e,t){if(t)return e.slice();var i=e.length,n=Zt?Zt(i):new e.constructor(i);return e.copy(n),n}function Dn(e){var t=new e.constructor(e.byteLength);return new Gt(t).set(new Gt(e)),t}function Mn(e,t){var i=t?Dn(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}function kn(e,t){if(e!==t){var i=e!==V,n=null===e,r=e==e,o=Io(e),a=t!==V,s=null===t,l=t==t,u=Io(t);if(!s&&!u&&!o&&t<e||o&&a&&l&&!s&&!u||n&&a&&l||!i&&l||!r)return 1;if(!n&&!o&&!u&&e<t||u&&i&&r&&!n&&!o||s&&i&&r||!a&&r||!l)return-1}return 0}function Pn(e,t,i,n){for(var r=-1,o=e.length,a=i.length,s=-1,l=t.length,u=oi(o-a,0),c=Array(l+u),h=!n;++s<l;)c[s]=t[s];for(;++r<a;)(h||r<o)&&(c[i[r]]=e[r]);for(;u--;)c[s++]=e[r++];return c}function Hn(e,t,i,n){for(var r=-1,o=e.length,a=-1,s=i.length,l=-1,u=t.length,c=oi(o-s,0),h=Array(c+u),p=!n;++r<c;)h[r]=e[r];for(var d=r;++l<u;)h[d+l]=t[l];for(;++a<s;)(p||r<o)&&(h[d+i[a]]=e[r++]);return h}function Rn(e,t){var i=-1,n=e.length;for(t=t||Array(n);++i<n;)t[i]=e[i];return t}function Yn(e,t,i,n){var r=!i;i=i||{};for(var o=-1,a=t.length;++o<a;){var s=t[o],l=n?n(i[s],e[s],s,i,e):V;l===V&&(l=e[s]),r?Fi(i,s,l):Ri(i,s,l)}return i}function Wn(r,o){return function(e,t){var i=eo(e)?$e:Wi,n=o?o():{};return i(e,r,pn(t),n)}}function On(s){return bn(function(e,t){var i=-1,n=t.length,r=1<n?t[n-1]:V,o=2<n?t[2]:V;for(r=3<s.length&&"function"==typeof r?(n--,r):V,o&&pr(t[0],t[1],o)&&(r=n<3?V:r,n=1),e=Object(e);++i<n;){var a=t[i];a&&s(e,a,i,r)}return e})}function Fn(l){return function(e,t,i){for(var n=-1,r=Object(e),o=i(e),a=o.length;a--;){var s=o[l?a:++n];if(!1===t(r[s],s,r))break}return e}}function Gn(n){return function(){var e=arguments;switch(e.length){case 0:return new n;case 1:return new n(e[0]);case 2:return new n(e[0],e[1]);case 3:return new n(e[0],e[1],e[2]);case 4:return new n(e[0],e[1],e[2],e[3]);case 5:return new n(e[0],e[1],e[2],e[3],e[4]);case 6:return new n(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new n(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var t=Ni(n.prototype),i=n.apply(t,e);return so(i)?i:t}}function Zn(c,h,p,d,g,f,I,B,E,_){var m=h&M,b=h&S,T=h&x,y=h&(L|w),C=h&e,v=T?V:Gn(c);return function N(){for(var e=arguments.length,t=Array(e),i=e;i--;)t[i]=arguments[i];if(y)var n=ir(N),r=function l(e,t){for(var i=e.length,n=0;i--;)e[i]===t&&++n;return n}(t,n);if(d&&(t=Pn(t,d,g,y)),f&&(t=Hn(t,f,I,y)),e-=r,y&&e<_){var o=yt(t,n);return Jn(c,h,Zn,N.placeholder,p,t,o,B,E,_-e)}var a=b?p:this,s=T?a[c]:c;return e=t.length,B?t=function u(e,t){for(var i=e.length,n=ai(t.length,i),r=Rn(e);n--;){var o=t[n];e[n]=hr(o,i)?r[o]:V}return e}(t,B):C&&1<e&&t.reverse(),m&&E<e&&(t.length=E),this&&this!==Oe&&this instanceof N&&(s=v||Gn(s)),s.apply(a,t)}}function Xn(n,r){return function(e,t){return function i(e,n,r,o){return $i(e,function(e,t,i){n(o,r(e),t,i)}),o}(e,n,r(t),{})}}function Jn(e,t,i,n,r,o,a,s,l,u){var c=t&L;t|=c?A:D,(t&=~(c?D:A))&N||(t&=~(S|x));var h=[e,t,r,c?o:V,c?a:V,c?V:o,c?V:a,s,l,u],p=i.apply(V,h);return function d(e){var t=function a(e){var t=e.name+"",i=Ii[t],n=Mt.call(Ii,t)?i.length:0;for(;n--;){var r=i[n],o=r.func;if(null==o||o==e)return r.name}return t}(e),i=vi[t];if("function"!=typeof i||!(t in Li.prototype))return!1;if(e===i)return!0;var n=tr(i);return!!n&&e===n[0]}(e)&&_r(p,h),p.placeholder=n,br(p,e,t)}var Kn=pi&&1/vt(new pi([,-0]))[1]==i?function(e){return new pi(e)}:Wo;function Qn(e,t,i,n,r,o,a,s){var l=t&x;if(!l&&"function"!=typeof e)throw new TypeError(m);var u=n?n.length:0;if(u||(t&=~(A|D),n=r=V),a=a===V?a:oi(mo(a),0),s=s===V?s:mo(s),u-=r?r.length:0,t&D){var c=n,h=r;n=r=V}var p=l?V:tr(e),d=[e,t,i,n,r,c,h,o,a,s];if(p&&function f(e,t){var i=e[1],n=t[1],r=i|n,o=r<(S|x|M),a=n==M&&i==L||n==M&&i==k&&e[7].length<=t[8]||n==(M|k)&&t[7].length<=t[8]&&i==L;if(!o&&!a)return e;n&S&&(e[2]=t[2],r|=i&S?0:N);var s=t[3];if(s){var l=e[3];e[3]=l?Pn(l,s,t[4]):s,e[4]=l?yt(e[3],_):t[4]}(s=t[5])&&(l=e[5],e[5]=l?Hn(l,s,t[6]):s,e[6]=l?yt(e[5],_):t[6]);(s=t[7])&&(e[7]=s);n&M&&(e[8]=null==e[8]?t[8]:ai(e[8],t[8]));null==e[9]&&(e[9]=t[9]);return e[0]=t[0],e[1]=r,e}(d,p),e=d[0],t=d[1],i=d[2],n=d[3],r=d[4],!(s=d[9]=d[9]===V?l?0:e.length:oi(d[9]-u,0))&&t&(L|w)&&(t&=~(L|w)),t&&t!=S)g=t==L||t==w?function I(o,a,s){var l=Gn(o);return function u(){for(var e=arguments.length,t=Array(e),i=e,n=ir(u);i--;)t[i]=arguments[i];var r=e<3&&t[0]!==n&&t[e-1]!==n?[]:yt(t,n);return(e-=r.length)<s?Jn(o,a,Zn,u.placeholder,V,t,r,V,V,s-e):qe(this&&this!==Oe&&this instanceof u?l:o,this,t)}}(e,t,s):t!=A&&t!=(S|A)||r.length?Zn.apply(V,d):function B(a,e,s,l){var u=e&S,c=Gn(a);return function h(){for(var e=-1,t=arguments.length,i=-1,n=l.length,r=Array(n+t),o=this&&this!==Oe&&this instanceof h?c:a;++i<n;)r[i]=l[i];for(;t--;)r[i++]=arguments[++e];return qe(o,u?s:this,r)}}(e,t,i,n);else var g=function E(e,t,i){var n=t&S,r=Gn(e);return function o(){return(this&&this!==Oe&&this instanceof o?r:e).apply(n?i:this,arguments)}}(e,t,i);return br((p?yn:_r)(g,d),e,t)}function Un(e,t,i,n,r,o){return so(e)&&so(t)&&(o.set(t,e),En(e,t,V,Un,o),o["delete"](t)),e}function zn(e){return ho(e)?V:e}function jn(e,t,i,n,r,o){var a=i&C,s=e.length,l=t.length;if(s!=l&&!(a&&s<l))return!1;var u=o.get(e);if(u&&o.get(t))return u==t;var c=-1,h=!0,p=i&v?new Mi:V;for(o.set(e,t),o.set(t,e);++c<s;){var d=e[c],g=t[c];if(n)var f=a?n(g,d,c,t,e,o):n(d,g,c,e,t,o);if(f!==V){if(f)continue;h=!1;break}if(p){if(!lt(t,function(e,t){if(!Et(p,t)&&(d===e||r(d,e,i,n,o)))return p.push(t)})){h=!1;break}}else if(d!==g&&!r(d,g,i,n,o)){h=!1;break}}return o["delete"](e),o["delete"](t),h}function qn(e){return mr(Br(e,V,xr),e+"")}function $n(e){return rn(e,Lo,or)}function er(e){return rn(e,wo,ar)}var tr=fi?function(e){return fi.get(e)}:Wo;function ir(e){return(Mt.call(vi,"placeholder")?vi:e).placeholder}function nr(e,t){var i=e.__data__;return function n(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?i["string"==typeof t?"string":"hash"]:i.map}function rr(e,t){var i=function n(e,t){return null==e?V:e[t]}(e,t);return hn(i)?i:V}var or=ti?function(t){return null==t?[]:(t=Object(t),it(ti(t),function(e){return Kt.call(t,e)}))}:Go,ar=ti?function(e){for(var t=[];e;)at(t,or(e)),e=Xt(e);return t}:Go,sr=on;function lr(e,t,i){for(var n=-1,r=(t=wn(t,e)).length,o=!1;++n<r;){var a=Cr(t[n]);if(!(o=null!=e&&i(e,a)))break;e=e[a]}return o||++n!=r?o:!!(r=null==e?0:e.length)&&ao(r)&&hr(a,r)&&(eo(e)||$r(e))}function ur(e){return"function"!=typeof e.constructor||gr(e)?{}:Ni(Xt(e))}function cr(e){return eo(e)||$r(e)||!!(Ut&&e&&e[Ut])}function hr(e,t){var i=typeof e;return!!(t=null==t?r:t)&&("number"==i||"symbol"!=i&&Ee.test(e))&&-1<e&&e%1==0&&e<t}function pr(e,t,i){if(!so(i))return!1;var n=typeof t;return!!("number"==n?to(i)&&hr(t,i.length):"string"==n&&t in i)&&qr(i[t],e)}function dr(e,t){if(eo(e))return!1;var i=typeof e;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=e&&!Io(e))||(E.test(e)||!B.test(e)||null!=t&&e in Object(t))}function gr(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||wt)}function fr(e){return e==e&&!so(e)}function Ir(t,i){return function(e){return null!=e&&(e[t]===i&&(i!==V||t in Object(e)))}}function Br(o,a,s){return a=oi(a===V?o.length-1:a,0),function(){for(var e=arguments,t=-1,i=oi(e.length-a,0),n=Array(i);++t<i;)n[t]=e[a+t];t=-1;for(var r=Array(a+1);++t<a;)r[t]=e[t];return r[a]=s(n),qe(o,this,r)}}function Er(e,t){return t.length<2?e:nn(e,vn(t,0,-1))}(ui&&sr(new ui(new ArrayBuffer(1)))!=j||ci&&sr(new ci)!=G||hi&&sr(hi.resolve())!=c||pi&&sr(new pi)!=K||di&&sr(new di)!=g)&&(sr=function(e){var t=on(e),i=t==X?e.constructor:V,n=i?vr(i):"";if(n)switch(n){case Bi:return j;case Ei:return G;case _i:return c;case mi:return K;case bi:return g}return t});var _r=Tr(yn),mr=Tr(Cn);function br(e,t,i){var n=t+"";return mr(e,function r(e,t){var i=t.length;if(!i)return e;var n=i-1;return t[n]=(1<i?"& ":"")+t[n],t=t.join(2<i?", ":" "),e.replace(ue,"{\n/* [wrapped with "+t+"] */\n")}(n,function o(i,n){return et(s,function(e){var t="_."+e[0];n&e[1]&&!nt(i,t)&&i.push(t)}),i.sort()}(function a(e){var t=e.match(ce);return t?t[1].split(he):[]}(n),i)))}function Tr(i){var n=0,r=0;return function(){var e=si(),t=16-(e-r);if(r=e,0<t){if(800<=++n)return arguments[0]}else n=0;return i.apply(V,arguments)}}var yr=function ga(e){var t=zr(e,function(e){return 500===i.size&&i.clear(),e}),i=t.cache;return t}(function(e){var r=[];return 46===e.charCodeAt(0)&&r.push(""),e.replace(se,function(e,t,i,n){r.push(i?n.replace(pe,"$1"):t||e)}),r});function Cr(e){if("string"==typeof e||Io(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}function vr(e){if(null!=e){try{return Dt.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Nr(e){if(e instanceof Li)return e.clone();var t=new xi(e.__wrapped__,e.__chain__);return t.__actions__=Rn(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Vr=bn(function(e,t){return io(e)?Xi(e,zi(t,1,io,!0)):[]});function Sr(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var r=null==i?0:mo(i);return r<0&&(r=oi(n+r,0)),ht(e,pn(t),r)}function xr(e){return(null==e?0:e.length)?zi(e,1):[]}function Lr(e){return e&&e.length?e[0]:V}var wr=bn(function(e){var t=ot(e,Ln);return t.length&&t[0]===e[0]?function I(e,t,i){for(var n=i?rt:nt,r=e[0].length,o=e.length,a=o,s=Array(o),l=Infinity,u=[];a--;){var c=e[a];a&&t&&(c=ot(c,Bt(t))),l=ai(c.length,l),s[a]=!i&&(t||120<=r&&120<=c.length)?new Mi(a&&c):V}c=e[0];var h=-1,p=s[0];e:for(;++h<r&&u.length<l;){var d=c[h],g=t?t(d):d;if(d=i||0!==d?d:0,!(p?Et(p,g):n(u,g,i))){for(a=o;--a;){var f=s[a];if(!(f?Et(f,g):n(e[a],g,i)))continue e}p&&p.push(g),u.push(d)}}return u}(t):[]});function Ar(e){var t=null==e?0:e.length;return t?e[t-1]:V}var Dr=bn(function(e){return Sn(zi(e,1,io,!0))});function Mr(t){if(!t||!t.length)return[];var i=0;return t=it(t,function(e){if(io(e))return i=oi(e.length,i),!0}),It(i,function(e){return ot(t,gt(e))})}var kr=bn(function(e,t){return io(e)?Xi(e,t):[]}),Pr=bn(Mr);function Hr(e){var t=vi(e);return t.__chain__=!0,t}function Rr(e,t){return t(e)}qn(function(t){function e(e){return function a(e,t){for(var i=-1,n=t.length,r=Array(n),o=null==e;++i<n;)r[i]=o?V:No(e,t[i]);return r}(e,t)}var i=t.length,n=i?t[0]:0,r=this.__wrapped__;return!(1<i||this.__actions__.length)&&r instanceof Li&&hr(n)?((r=r.slice(n,+n+(i?1:0))).__actions__.push({func:Rr,args:[e],thisArg:V}),new xi(r,this.__chain__).thru(function(e){return i&&!e.length&&e.push(V),e})):this.thru(e)});var Yr=Wn(function(e,t,i){Mt.call(e,i)?++e[i]:Fi(e,i,1)});var Wr=function fa(a){return function(e,t,i){var n=Object(e);if(!to(e)){var r=pn(t);e=Lo(e),t=function(e){return r(n[e],e,n)}}var o=a(e,t,i);return-1<o?n[r?e[o]:o]:V}}(Sr);function Or(e,t){return(eo(e)?et:Ji)(e,pn(t))}var Fr=Wn(function(e,t,i){Mt.call(e,i)?e[i].push(t):Fi(e,i,[t])});var Gr=bn(function(e,t){if(null==e)return[];var i=t.length;return 1<i&&pr(e,t[0],t[1])?t=[]:2<i&&pr(t[0],t[1],t[2])&&(t=[t[0]]),_n(e,zi(t,1),[])}),Zr=function(){return Oe.Date.now()};function Xr(e,t){var i;if("function"!=typeof t)throw new TypeError(m);return e=mo(e),function(){return 0<--e&&(i=t.apply(this,arguments)),e<=1&&(t=V),i}}var Jr=bn(function(e,t,i){var n=S;if(i.length){var r=yt(i,ir(Jr));n|=A}return Qn(e,n,t,i,r)});function Kr(n,r,e){var o,a,s,l,u,c,h=0,p=!1,d=!1,t=!0;if("function"!=typeof n)throw new TypeError(m);function g(e){var t=o,i=a;return o=a=V,h=e,l=n.apply(i,t)}function f(e){var t=e-c;return c===V||r<=t||t<0||d&&s<=e-h}function I(){var e=Zr();if(f(e))return B(e);u=setTimeout(I,function i(e){var t=r-(e-c);return d?ai(t,s-(e-h)):t}(e))}function B(e){return u=V,t&&o?g(e):(o=a=V,l)}function i(){var e=Zr(),t=f(e);if(o=arguments,a=this,c=e,t){if(u===V)return function i(e){return h=e,u=setTimeout(I,r),p?g(e):l}(c);if(d)return u=setTimeout(I,r),g(c)}return u===V&&(u=setTimeout(I,r)),l}return r=bo(r)||0,so(e)&&(p=!!e.leading,s=(d="maxWait"in e)?oi(bo(e.maxWait)||0,r):s,t="trailing"in e?!!e.trailing:t),i.cancel=function E(){u!==V&&clearTimeout(u),h=0,o=c=a=u=V},i.flush=function _(){return u===V?l:B(Zr())},i}var Qr=bn(function(e,t){return Zi(e,1,t)}),Ur=bn(function(e,t,i){return Zi(e,bo(t)||0,i)});function zr(r,o){if("function"!=typeof r||null!=o&&"function"!=typeof o)throw new TypeError(m);var a=function(){var e=arguments,t=o?o.apply(this,e):e[0],i=a.cache;if(i.has(t))return i.get(t);var n=r.apply(this,e);return a.cache=i.set(t,n)||i,n};return a.cache=new(zr.Cache||Di),a}function jr(t){if("function"!=typeof t)throw new TypeError(m);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function qr(e,t){return e===t||e!=e&&t!=t}zr.Cache=Di;var $r=un(function(){return arguments}())?un:function(e){return lo(e)&&Mt.call(e,"callee")&&!Kt.call(e,"callee")},eo=Array.isArray;function to(e){return null!=e&&ao(e.length)&&!oo(e)}function io(e){return lo(e)&&to(e)}var no=ii||function Ia(){return!1},ro=Ke?Bt(Ke):function Ba(e){return lo(e)&&on(e)==Y};function oo(e){if(!so(e))return!1;var t=on(e);return t==O||t==F||t==l||t==h}function ao(e){return"number"==typeof e&&-1<e&&e%1==0&&e<=r}function so(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function lo(e){return null!=e&&"object"==typeof e}var uo=Qe?Bt(Qe):function Ea(e){return lo(e)&&sr(e)==G};function co(e){return"number"==typeof e||lo(e)&&on(e)==Z}function ho(e){if(!lo(e)||on(e)!=X)return!1;var t=Xt(e);if(null===t)return!0;var i=Mt.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&Dt.call(i)==Rt}var po=Ue?Bt(Ue):function _a(e){return lo(e)&&on(e)==J},go=ze?Bt(ze):function ma(e){return lo(e)&&sr(e)==K};function fo(e){return"string"==typeof e||!eo(e)&&lo(e)&&on(e)==Q}function Io(e){return"symbol"==typeof e||lo(e)&&on(e)==U}var Bo=je?Bt(je):function ba(e){return lo(e)&&ao(e.length)&&!!ke[on(e)]};function Eo(e){if(!e)return[];if(to(e))return fo(e)?Vt(e):Rn(e);if(zt&&e[zt])return function n(e){for(var t,i=[];!(t=e.next()).done;)i.push(t.value);return i}(e[zt]());var t=sr(e);return(t==G?bt:t==K?vt:Po)(e)}function _o(e){return e?(e=bo(e))!==i&&e!==-i?e==e?e:0:(e<0?-1:1)*t:0===e?e:0}function mo(e){var t=_o(e),i=t%1;return t==t?i?t-i:t:0}function bo(e){if("number"==typeof e)return e;if(Io(e))return o;if(so(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=so(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(le,"");var i=fe.test(e);return i||Be.test(e)?Re(e.slice(2),i?2:8):ge.test(e)?o:+e}function To(e){return null==e?"":Vn(e)}var yo=On(function(e,t){Yn(t,wo(t),e)});var Co=bn(function(e,t){e=Object(e);var i=-1,n=t.length,r=2<n?t[2]:V;for(r&&pr(t[0],t[1],r)&&(n=1);++i<n;)for(var o=t[i],a=wo(o),s=-1,l=a.length;++s<l;){var u=a[s],c=e[u];(c===V||qr(c,wt[u])&&!Mt.call(e,u))&&(e[u]=o[u])}return e}),vo=bn(function(e){return e.push(V,Un),qe(Do,V,e)});function No(e,t,i){var n=null==e?V:nn(e,t);return n===V?i:n}function Vo(e,t){return null!=e&&lr(e,t,ln)}var So=Xn(function(e,t,i){null!=t&&"function"!=typeof t.toString&&(t=Ht.call(t)),e[t]=i},Ho(Ro)),xo=Xn(function(e,t,i){null!=t&&"function"!=typeof t.toString&&(t=Ht.call(t)),Mt.call(e,t)?e[t].push(i):e[t]=[i]},pn);function Lo(e){return to(e)?Pi(e):dn(e)}function wo(e){return to(e)?Pi(e,!0):gn(e)}var Ao=On(function(e,t,i){En(e,t,i)}),Do=On(function(e,t,i,n){En(e,t,i,n)}),Mo=qn(function(t,e){var i={};if(null==t)return i;var n=!1;e=ot(e,function(e){return e=wn(e,t),n=n||1<e.length,e}),Yn(t,er(t),i),n&&(i=Gi(i,b|T|y,zn));for(var r,o,a=e.length;a--;)r=i,o=e[a],null==(r=Er(r,o=wn(o,r)))||delete r[Cr(Ar(o))];return i});var ko=qn(function(e,t){return null==e?{}:function n(i,e){return mn(i,e,function(e,t){return Vo(i,t)})}(e,t)});function Po(e){return null==e?[]:function i(t,e){return ot(e,function(e){return t[e]})}(e,Lo(e))}function Ho(e){return function(){return e}}function Ro(e){return e}function Yo(n,t,e){var i=Lo(t),r=tn(t,i);null!=e||so(t)&&(r.length||!i.length)||(e=t,t=n,n=this,r=tn(t,Lo(t)));var o=!(so(e)&&"chain"in e&&!e.chain),a=oo(n);return et(r,function(e){var i=t[e];n[e]=i,a&&(n.prototype[e]=function(){var e=this.__chain__;if(o||e){var t=n(this.__wrapped__);return(t.__actions__=Rn(this.__actions__)).push({func:i,args:arguments,thisArg:n}),t.__chain__=e,t}return i.apply(n,at([this.value()],arguments))})}),n}function Wo(){}var Oo,Fo=function Ta(n){return function(e,t,i){return i&&"number"!=typeof i&&pr(e,t,i)&&(t=i=V),e=_o(e),t===V?(t=e,e=0):t=_o(t),function s(e,t,i,n){for(var r=-1,o=oi($t((t-e)/(i||1)),0),a=Array(o);o--;)a[n?o:++r]=e,e+=i;return a}(e,t,i=i===V?e<t?1:-1:_o(i),n)}}();function Go(){return[]}vi.after=function ya(e,t){if("function"!=typeof t)throw new TypeError(m);return e=mo(e),function(){if(--e<1)return t.apply(this,arguments)}},vi.assignIn=yo,vi.before=Xr,vi.bind=Jr,vi.chain=Hr,vi.compact=function Ca(e){for(var t=-1,i=null==e?0:e.length,n=0,r=[];++t<i;){var o=e[t];o&&(r[n++]=o)}return r},vi.concat=function va(){var e=arguments.length;if(!e)return[];for(var t=Array(e-1),i=arguments[0],n=e;n--;)t[n-1]=arguments[n];return at(eo(i)?Rn(i):[i],zi(t,1))},vi.countBy=Yr,vi.create=function Na(e,t){var i=Ni(e);return null==t?i:Oi(i,t)},vi.debounce=Kr,vi.defaults=Co,vi.defaultsDeep=vo,vi.defer=Qr,vi.delay=Ur,vi.difference=Vr,vi.drop=function Va(e,t,i){var n=null==e?0:e.length;return n?vn(e,(t=i||t===V?1:mo(t))<0?0:t,n):[]},vi.filter=function Sa(e,t){return(eo(e)?it:Ui)(e,pn(t))},vi.flatten=xr,vi.flattenDeep=function xa(e){return(null==e?0:e.length)?zi(e,i):[]},vi.groupBy=Fr,vi.initial=function La(e){return(null==e?0:e.length)?vn(e,0,-1):[]},vi.intersection=wr,vi.invert=So,vi.invertBy=xo,vi.iteratee=function wa(e){return pn("function"==typeof e?e:Gi(e,b))},vi.keys=Lo,vi.map=function Aa(e,t){return(eo(e)?ot:In)(e,pn(t))},vi.matches=function Da(e){return Bn(Gi(e,b))},vi.merge=Ao,vi.mixin=Yo,vi.negate=jr,vi.omit=Mo,vi.omitBy=function Ma(e,t){return function n(e,i){if(null==e)return{};var t=ot(er(e),function(e){return[e]});return i=pn(i),mn(e,t,function(e,t){return i(e,t[0])})}(e,jr(pn(t)))},vi.once=function ka(e){return Xr(2,e)},vi.pick=ko,vi.range=Fo,vi.reject=function Pa(e,t){return(eo(e)?it:Ui)(e,jr(pn(t)))},vi.rest=function Ha(e,t){if("function"!=typeof e)throw new TypeError(m);return bn(e,t=t===V?t:mo(t))},vi.set=function Ra(e,t,i){return null==e?e:Tn(e,t,i)},vi.slice=function Ya(e,t,i){var n=null==e?0:e.length;return n?(i=i&&"number"!=typeof i&&pr(e,t,i)?(t=0,n):(t=null==t?0:mo(t),i===V?n:mo(i)),vn(e,t,i)):[]},vi.sortBy=Gr,vi.take=function Wa(e,t,i){return e&&e.length?vn(e,0,(t=i||t===V?1:mo(t))<0?0:t):[]},vi.takeRight=function Oa(e,t,i){var n=null==e?0:e.length;return n?vn(e,(t=n-(t=i||t===V?1:mo(t)))<0?0:t,n):[]},vi.tap=function Fa(e,t){return t(e),e},vi.throttle=function Ga(e,t,i){var n=!0,r=!0;if("function"!=typeof e)throw new TypeError(m);return so(i)&&(n="leading"in i?!!i.leading:n,r="trailing"in i?!!i.trailing:r),Kr(e,t,{leading:n,maxWait:t,trailing:r})},vi.thru=Rr,vi.toArray=Eo,vi.union=Dr,vi.uniq=function Za(e){return e&&e.length?Sn(e):[]},vi.uniqBy=function Xa(e,t){return e&&e.length?Sn(e,pn(t)):[]},vi.unzip=Mr,vi.values=Po,vi.without=kr,vi.zip=Pr,vi.zipObject=function Ja(e,t){return function l(e,t,i){for(var n=-1,r=e.length,o=t.length,a={};++n<r;){var s=n<o?t[n]:V;i(a,e[n],s)}return a}(e||[],t||[],Ri)},vi.extend=yo,Yo(vi,vi),vi.clamp=function Ka(e,t,i){return i===V&&(i=t,t=V),i!==V&&(i=(i=bo(i))==i?i:0),t!==V&&(t=(t=bo(t))==t?t:0),function n(e,t,i){return e==e&&(i!==V&&(e=e<=i?e:i),t!==V&&(e=t<=e?e:t)),e}(bo(e),t,i)},vi.clone=function Qa(e){return Gi(e,y)},vi.cloneDeep=function Ua(e){return Gi(e,b|y)},vi.escape=function za(e){return(e=To(e))&&I.test(e)?e.replace(f,_t):e},vi.every=function ja(e,t,i){var n=eo(e)?tt:Ki;return i&&pr(e,t,i)&&(t=V),n(e,pn(t))},vi.find=Wr,vi.findIndex=Sr,vi.findKey=function qa(e,t){return ct(e,pn(t),$i)},vi.findLastIndex=function $a(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var r=n-1;return i!==V&&(r=mo(i),r=i<0?oi(n+r,0):ai(r,n-1)),ht(e,pn(t),r,!0)},vi.findLastKey=function es(e,t){return ct(e,pn(t),en)},vi.forEach=Or,vi.get=No,vi.has=function ts(e,t){return null!=e&&lr(e,t,sn)},vi.head=Lr,vi.identity=Ro,vi.indexOf=function is(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var r=null==i?0:mo(i);return r<0&&(r=oi(n+r,0)),pt(e,t,r)},vi.isArguments=$r,vi.isArray=eo,vi.isArrayLike=to,vi.isBoolean=function ns(e){return!0===e||!1===e||lo(e)&&on(e)==R},vi.isDate=ro,vi.isEmpty=function rs(e){if(null==e)return!0;if(to(e)&&(eo(e)||"string"==typeof e||"function"==typeof e.splice||no(e)||Bo(e)||$r(e)))return!e.length;var t=sr(e);if(t==G||t==K)return!e.size;if(gr(e))return!dn(e).length;for(var i in e)if(Mt.call(e,i))return!1;return!0},vi.isEqual=function os(e,t){return cn(e,t)},vi.isFinite=function as(e){return"number"==typeof e&&ni(e)},vi.isFunction=oo,vi.isNaN=function ss(e){return co(e)&&e!=+e},vi.isNull=function ls(e){return null===e},vi.isNumber=co,vi.isObject=so,vi.isPlainObject=ho,vi.isRegExp=po,vi.isString=fo,vi.isUndefined=function us(e){return e===V},vi.last=Ar,vi.max=function cs(e){return e&&e.length?Qi(e,Ro,an):V},vi.min=function hs(e){return e&&e.length?Qi(e,Ro,fn):V},vi.noConflict=function ps(){return Oe._===this&&(Oe._=Yt),this},vi.noop=Wo,vi.random=function ds(e,t,i){if(i&&"boolean"!=typeof i&&pr(e,t,i)&&(t=i=V),i===V&&("boolean"==typeof t?(i=t,t=V):"boolean"==typeof e&&(i=e,e=V)),e===V&&t===V?(e=0,t=1):(e=_o(e),t===V?(t=e,e=0):t=_o(t)),t<e){var n=e;e=t,t=n}if(i||e%1||t%1){var r=li();return ai(e+r*(t-e+He("1e-"+((r+"").length-1))),t)}return function o(e,t){return e+ei(li()*(t-e+1))}(e,t)},vi.reduce=function gs(e,t,i){var n=eo(e)?st:ft,r=arguments.length<3;return n(e,pn(t),i,r,Ji)},vi.result=function fs(e,t,i){var n=-1,r=(t=wn(t,e)).length;for(r||(r=1,e=V);++n<r;){var o=null==e?V:e[Cr(t[n])];o===V&&(n=r,o=i),e=oo(o)?o.call(e):o}return e},vi.size=function Is(e){if(null==e)return 0;if(to(e))return fo(e)?Nt(e):e.length;var t=sr(e);return t==G||t==K?e.size:dn(e).length},vi.some=function Bs(e,t,i){var n=eo(e)?lt:Nn;return i&&pr(e,t,i)&&(t=V),n(e,pn(t))},vi.trim=function Es(e,t,i){if((e=To(e))&&(i||t===V))return e.replace(le,"");if(!e||!(t=Vn(t)))return e;var n=Vt(e),r=Vt(t);return function o(e,t,i){var n=e.length;return i=i===V?n:i,!t&&n<=i?e:vn(e,t,i)}(n,function a(e,t){for(var i=-1,n=e.length;++i<n&&-1<pt(t,e[i],0););return i}(n,r),function s(e,t){for(var i=e.length;i--&&-1<pt(t,e[i],0););return i}(n,r)+1).join("")},vi.uniqueId=function _s(e){var t=++kt;return To(e)+t},vi.each=Or,vi.first=Lr,Yo(vi,(Oo={},$i(vi,function(e,t){Mt.call(vi.prototype,t)||(Oo[t]=e)}),Oo),{chain:!1}),vi.VERSION="4.17.5",et(["drop","take"],function(i,n){Li.prototype[i]=function(e){e=e===V?1:oi(mo(e),0);var t=this.__filtered__&&!n?new Li(this):this.clone();return t.__filtered__?t.__takeCount__=ai(e,t.__takeCount__):t.__views__.push({size:ai(e,a),type:i+(t.__dir__<0?"Right":"")}),t},Li.prototype[i+"Right"]=function(e){return this.reverse()[i](e).reverse()}}),et(["filter","map","takeWhile"],function(e,t){var i=t+1,n=1==i||3==i;Li.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:getIteratee(e,3),type:i}),t.__filtered__=t.__filtered__||n,t}}),et(["head","last"],function(e,t){var i="take"+(t?"Right":"");Li.prototype[e]=function(){return this[i](1).value()[0]}}),et(["initial","tail"],function(e,t){var i="drop"+(t?"":"Right");Li.prototype[e]=function(){return this.__filtered__?new Li(this):this[i](1)}}),Li.prototype.compact=function(){return this.filter(Ro)},Li.prototype.find=function(e){return this.filter(e).head()},Li.prototype.findLast=function(e){return this.reverse().find(e)},Li.prototype.invokeMap=bn(function(t,i){return"function"==typeof t?new Li(this):this.map(function(e){return function r(e,t,i){var n=null==(e=Er(e,t=wn(t,e)))?e:e[Cr(Ar(t))];return null==n?V:qe(n,e,i)}(e,t,i)})}),Li.prototype.reject=function(e){return this.filter(jr(getIteratee(e)))},Li.prototype.slice=function(e,t){e=mo(e);var i=this;return i.__filtered__&&(0<e||t<0)?new Li(i):(e<0?i=i.takeRight(-e):e&&(i=i.drop(e)),t!==V&&(i=(t=mo(t))<0?i.dropRight(-t):i.take(t-e)),i)},Li.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Li.prototype.toArray=function(){return this.take(a)},$i(Li.prototype,function(h,e){var p=/^(?:filter|find|map|reject)|While$/.test(e),d=/^(?:head|last)$/.test(e),g=vi[d?"take"+("last"==e?"Right":""):e],f=d||/^find/.test(e);g&&(vi.prototype[e]=function(){function e(e){var t=g.apply(vi,at([e],i));return d&&a?t[0]:t}var t=this.__wrapped__,i=d?[1]:arguments,n=t instanceof Li,r=i[0],o=n||eo(t);o&&p&&"function"==typeof r&&1!=r.length&&(n=o=!1);var a=this.__chain__,s=!!this.__actions__.length,l=f&&!a,u=n&&!s;if(f||!o)return l&&u?h.apply(this,i):(c=this.thru(e),l?d?c.value()[0]:c.value():c);t=u?t:new Li(this);var c=h.apply(t,i);return c.__actions__.push({func:Rr,args:[e],thisArg:V}),new xi(c,a)})}),et(["pop","push","shift","sort","splice","unshift"],function(e){var i=xt[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);vi.prototype[e]=function(){var t=arguments;if(!r||this.__chain__)return this[n](function(e){return i.apply(eo(e)?e:[],t)});var e=this.value();return i.apply(eo(e)?e:[],t)}}),$i(Li.prototype,function(e,t){var i=vi[t];if(i){var n=i.name+"";(Ii[n]||(Ii[n]=[])).push({name:t,func:i})}}),Ii[Zn(V,x).name]=[{name:"wrapper",func:V}],Li.prototype.clone=function ms(){var e=new Li(this.__wrapped__);return e.__actions__=Rn(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Rn(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Rn(this.__views__),e},Li.prototype.reverse=function bs(){if(this.__filtered__){var e=new Li(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Li.prototype.value=function Ts(){var e=this.__wrapped__.value(),t=this.__dir__,i=eo(e),n=t<0,r=i?e.length:0,o=function b(e,t,i){var n=-1,r=i.length;for(;++n<r;){var o=i[n],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=ai(t,e+a);break;case"takeRight":e=oi(e,t-a)}}return{start:e,end:t}}(0,r,this.__views__),a=o.start,s=o.end,l=s-a,u=n?s:a-1,c=this.__iteratees__,h=c.length,p=0,d=ai(l,this.__takeCount__);if(!i||!n&&r==l&&d==l)return xn(e,this.__actions__);var g=[];e:for(;l--&&p<d;){for(var f=-1,I=e[u+=t];++f<h;){var B=c[f],E=B.iteratee,_=B.type,m=E(I);if(2==_)I=m;else if(!m){if(1==_)continue e;break e}}g[p++]=I}return g},vi.prototype.first=vi.prototype.head,zt&&(vi.prototype[zt]=function ys(){return this}),Oe._=vi,(Ns=function(){return vi}.call(Vs,Ss,Vs,vs))===V||(vs.exports=Ns)}).call(this)}).call(this,Ss(6),Ss(61)(e))},function(e,t,i){(function(e,l){function r(n,r){return function(e,t,i){return n.call(r,t,e,i)}}function t(e){return function(){return _[e].apply(_,arguments)}}function i(t){return function(){var e=Array.prototype.slice.call(arguments,0);return e[1]=_.isFunction(e[1])?r(e[1],e[2]):e[1],_[t].apply(_,e)}}var n;_global=undefined,"undefined"!=typeof window?_global=window:void 0!==e?_global=e:"undefined"!=typeof self?_global=self:_global=this,_global.BI||(_global.BI={}),_.extend(BI,{assert:function(e,t){if(this.isFunction(t)){if(t(e))return!0;throw new Error(e+" error")}if(this.isArray(t)||(t=[t]),!this.deepContains(t,e))throw new Error(e+" error");return!0},warn:function(e){console.warn(e)},UUID:function(){for(var e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],t="",i=0;i<16;i++)t+=e[parseInt(e.length*Math.random(),10)];return t},isWidget:function(e){return e instanceof BI.Widget||BI.View&&e instanceof BI.View},createWidgets:function(e,i,t){if(!BI.isArray(e))throw new Error("cannot create Widgets");return i=BI.isWidget(i)?{}:i||{},BI.map(BI.flatten(e),function(e,t){return BI.createWidget(t,BI.deepClone(i))})},createItems:function(e,i,n){return i=BI.isArray(i)?i:BI.makeArray(BI.flatten(e).length,i||{}),n=BI.isArray(n)?n:BI.makeArray(BI.flatten(e).length,n||{}),BI.map(e,function(e,t){return BI.isArray(t)?BI.createItems(t,i,n):t instanceof BI.Widget?BI.extend({},i.shift(),n.shift(),{type:null,el:t}):i[0]instanceof BI.Widget?(n.shift(),BI.extend({},t,{el:i.shift()})):t.el instanceof BI.Widget||BI.View&&t.el instanceof BI.View?(i.shift(),BI.extend({},n.shift(),{type:null},t)):t.el?BI.extend({},n.shift(),t,{el:BI.extend({},i.shift(),t.el)}):BI.extend({},n.shift(),{el:BI.extend({},i.shift(),t)})})},packageItems:function(e,i){for(var n=i.length-1;0<=n;n--)e=BI.map(e,function(e,t){return BI.extend({},i[n],{items:[BI.extend({},i[n].el,{el:t})]})});return e},formatEL:function(e){return e&&!e.type&&e.el?e:{el:e}},stripEL:function(e){return e.type&&e||e.el||e},trans2Element:function(e){return BI.map(e,function(e,t){return t.element})}}),_.each(["where","findWhere","invoke","pluck","shuffle","sample","toArray","size"],function(e){BI[e]=t(e)}),_.each(["get","set","each","map","reduce","reduceRight","find","filter","reject","every","all","some","any","max","min","sortBy","groupBy","indexBy","countBy","partition","clamp"],function(e){BI[e]=i("any"===e?"some":e)}),_.extend(BI,{count:function(e,t,i){var n;if(i)for(n=e;n<t;n++)i(n);return t-e},inverse:function(e,t,i){return BI.count(t,e,i)},firstKey:function(e){var i=n;return BI.any(e,function(e,t){return i=e,!0}),i},lastKey:function(e){var i=n;return BI.each(e,function(e,t){return i=e,!0}),i},firstObject:function(e){var i=n;return BI.any(e,function(e,t){return i=t,!0}),i},lastObject:function(e){var i=n;return BI.each(e,function(e,t){return i=t,!0}),i},concat:function(e,t){return BI.isKey(e)?BI.map([].slice.apply(arguments),function(e,t){return t}).join(""):BI.isArray(e)?_.concat.apply([],arguments):BI.isObject(e)?_.extend.apply({},arguments):void 0},backEach:function(e,t,i){t=BI.iteratee(t,i);for(var n=e.length-1;0<=n;n--)t(n,e[n],e);return!1},backAny:function(e,t,i){t=BI.iteratee(t,i);for(var n=e.length-1;0<=n;n--)if(t(n,e[n],e))return!0;return!1},backEvery:function(e,t,i){t=BI.iteratee(t,i);for(var n=e.length-1;0<=n;n--)if(!t(n,e[n],e))return!1;return!0},backFindKey:function(e,t,i){t=BI.iteratee(t,i);for(var n,r=_.keys(e),o=r.length-1;0<=o;o--)if(t(e[n=r[o]],n,e))return n},backFind:function(e,t,i){var n;if(void 0!==(n=BI.isArray(e)?BI.findLastIndex(e,t,i):BI.backFindKey(e,t,i))&&-1!==n)return e[n]},remove:function(i,n,r){var e,o=BI.isFunction(n);if(n=o||BI.isArray(n)?n:[n],BI.isArray(i))for(e=0;e<i.length;e++)(o&&!0===n.apply(r,[e,i[e]])||!o&&BI.contains(n,i[e]))&&i.splice(e--,1);else BI.each(i,function(e,t){(o&&!0===n.apply(r,[e,i[e]])||!o&&BI.contains(n,i[e]))&&delete i[e]})},removeAt:function(e,t){t=BI.isArray(t)?t:[t];var i,n=BI.isArray(e);for(i=0;i<t.length;i++)n?e[t[i]]="$deleteIndex":delete e[t[i]];n&&BI.remove(e,"$deleteIndex")},string2Array:function(e){return e.split("&-&")},array2String:function(e){return e.join("&-&")},abc2Int:function(e){for(var t=0,i=0,n=(e=e.toUpperCase()).length;i<n;++i)if((t=e.charAt(i).charCodeAt(0)-"A".charCodeAt(0)+26*t+1)>(2147483646-e.charAt(i).charCodeAt(0)+"A".charCodeAt(0))/26)return 0;return t},int2Abc:function(e){var t=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],i=e,n="";if(0===e)return"";for(;0!==i;){var r=i%26;0===r&&(r=26),n=t[r-1]+n,i=(i-r)/26}return n}}),_.each(["first","initial","last","rest","compact","flatten","without","union","intersection","difference","zip","unzip","object","indexOf","lastIndexOf","sortedIndex","range","take","takeRight","uniqBy"],function(e){BI[e]=t(e)}),_.each(["findIndex","findLastIndex"],function(e){BI[e]=i(e)}),_.extend(BI,{makeArray:function(e,t){for(var i=[],n=0;n<e;n++)BI.isNull(t)?i.push(n):i.push(BI.deepClone(t));return i},makeObject:function(e,t){for(var i={},n=0;n<e.length;n++)BI.isNull(t)?i[e[n]]=e[n]:i[e[n]]=BI.deepClone(t);return i},makeArrayByArray:function(e,t){var i=[];if(!e)return i;for(var n=0,r=e.length;n<r;n++)BI.isArray(e[n])?i.push(arguments.callee(e[n],t)):i.push(BI.deepClone(t));return i},uniq:function(e,t,i,n){return null==e?[]:(_.isBoolean(t)||(n=i,i=t,t=!1),i=i&&r(i,n),_.uniq.call(_,e,t,i,n))}}),_.each(["keys","allKeys","values","pairs","invert","create","functions","extend","extendOwn","defaults","clone","property","propertyOf","matcher","isEqual","isMatch","isEmpty","isElement","isNumber","isString","isArray","isObject","isPlainObject","isArguments","isFunction","isFinite","isBoolean","isDate","isRegExp","isError","isNaN","isUndefined","zipObject","cloneDeep"],function(e){BI[e]=t(e)}),_.each(["mapObject","findKey","pick","omit","tap"],function(e){BI[e]=i(e)}),_.extend(BI,{inherit:function(e,t,i){function n(){}"object"==typeof t&&(i=t,t=e,e=function(){return t.apply(this,arguments)});var r=t.prototype;return n.prototype=r,e.prototype=new n,e.superclass=r,_.extend(e.prototype,i,{superclass:t}),e},init:function(){for(;BI.prepares&&0<BI.prepares.length;)BI.prepares.shift()();BI.initialized=!0},has:function(i,e){return BI.isArray(e)?0!==e.length&&BI.every(e,function(e,t){return _.has(i,t)}):_.has.apply(_,arguments)},freeze:function(e){return Object.freeze&&BI.isObject(e)?Object.freeze(e):e},isKey:function(e){return BI.isNumber(e)||BI.isString(e)&&0<e.length},isCapitalEqual:function(e,t){return e=BI.isNull(e)?e:(""+e).toLowerCase(),t=BI.isNull(t)?t:(""+t).toLowerCase(),BI.isEqual(e,t)},isWidthOrHeight:function(e){return"number"==typeof e?0<=e:"string"==typeof e?/^\d{1,3}%$/.exec(e)||"auto"==e||/^\d+px$/.exec(e):void 0},isNotNull:function(e){return!BI.isNull(e)},isNull:function(e){return null==e},isEmptyArray:function(e){return BI.isArray(e)&&BI.isEmpty(e)},isNotEmptyArray:function(e){return BI.isArray(e)&&!BI.isEmpty(e)},isEmptyObject:function(e){return BI.isEqual(e,{})},isNotEmptyObject:function(e){return BI.isPlainObject(e)&&!BI.isEmptyObject(e)},isEmptyString:function(e){return BI.isString(e)&&0===e.length},isNotEmptyString:function(e){return BI.isString(e)&&!BI.isEmptyString(e)},isWindow:function(e){return null!=e&&e==e.window}}),_.extend(BI,{deepClone:_.cloneDeep,deepExtend:_.merge,isDeepMatch:function(e,t){var i=BI.keys(t),n=i.length;if(null==e)return!n;for(var r=Object(e),o=0;o<n;o++){var a=i[o];if(!(BI.isEqual(t[a],r[a])&&a in r))return!1}return!0},contains:function(e,t,i){return _.isArrayLike(e)||(e=_.values(e)),0<=_.indexOf(e,t,"number"==typeof i&&i)},deepContains:function(e,i){return BI.isObject(i)?BI.any(e,function(e,t){if(BI.isEqual(t,i))return!0}):BI.contains(e,i)},deepIndexOf:function(e,t){for(var i=0;i<e.length;i++)if(BI.isEqual(t,e[i]))return i;return-1},deepRemove:function(i,n){var e,r=!1;if(BI.isArray(i))for(e=0;e<i.length;e++)BI.isEqual(n,i[e])&&(i.splice(e--,1),r=!0);else BI.each(i,function(e,t){BI.isEqual(n,i[e])&&(delete i[e],r=!0)});return r},deepWithout:function(i,n){if(BI.isArray(i)){for(var r=[],e=0;e<i.length;e++)BI.isEqual(n,i[e])||r.push(i[e]);return r}return r={},BI.each(i,function(e,t){BI.isEqual(n,i[e])||(r[e]=t)}),r},deepUnique:function(e){var i=[];return BI.each(e,function(e,t){BI.deepContains(i,t)||i.push(t)}),i},deepDiff:function(e,t){e=e||{},t=t||{};var i=[],n=[];for(var r in e)this.has(e,r)&&(this.isEqual(e[r],t[r])||i.push(r),n.push(r));for(var r in t)this.has(t,r)&&!BI.contains(n,r)&&i.push(r);return i}}),_.each(["uniqueId","result","chain","iteratee","escape","unescape","before","after"],function(e){BI[e]=function(){return _[e].apply(_,arguments)}}),_.each(["bind","once","partial","debounce","throttle","delay","defer","wrap"],function(e){BI[e]=function(){return _[e].apply(_,arguments)}}),_.extend(BI,{nextTick:function(){var r=[],o=!1,e=void 0;function t(){o=!1;for(var e=r.slice(0),t=r.length=0;t<e.length;t++)e[t]()}if("undefined"!=typeof Promise){var i=Promise.resolve();e=function e(){i.then(t)}}else if("undefined"!=typeof MutationObserver){var n=1,a=new MutationObserver(t),s=document.createTextNode(String(n));a.observe(s,{characterData:!0}),e=function e(){n=(n+1)%2,s.data=String(n)}}else e=void 0!==l?function e(){l(t)}:function e(){setTimeout(t,0)};return function(t){var i=void 0,n=[].slice.call(arguments,1);if(r.push(function(){if(t)try{t.apply(null,n)}catch(e){console.error(e)}else i&&i.apply(null,n)}),o||(o=!0,e()),!t&&"undefined"!=typeof Promise)return new Promise(function(e,t){i=e})}}()}),_.each(["random"],function(e){BI[e]=t(e)}),_.extend(BI,{getTime:function(){return _global.performance&&_global.performance.now?_global.performance.now():_global.performance&&_global.performance.webkitNow?_global.performance.webkitNow():Date.now?Date.now():BI.getDate().getTime()},parseInt:function(e){var t=10;/^0x/g.test(e)&&(t=16);try{return parseInt(e,t)}catch(i){throw new Error(e+"parse int error")}},parseSafeInt:function(e){var t=9007199254740991;return e?this.clamp(this.parseInt(e),-t,t):0===e?e:0},parseFloat:function(e){try{return parseFloat(e)}catch(t){throw new Error(e+"parse float error")}},isNaturalNumber:function(e){return!!/^\d+$/.test(e)},isPositiveInteger:function(e){return!!/^\+?[1-9][0-9]*$/.test(e)},isNegativeInteger:function(e){return!!/^\-[1-9][0-9]*$/.test(e)},isInteger:function(e){return!!/^\-?\d+$/.test(e)},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},isFloat:function(e){return!!/^([+-]?)\d*\.\d+$/.test(e)},isOdd:function(e){return!!BI.isInteger(e)&&1==(1&e)},isEven:function(e){return!!BI.isInteger(e)&&0==(1&e)},sum:function(e,i,n){var r=0;return BI.each(e,function(e,t){r+=i?Number(i.apply(n,[e,t])):Number(t)}),r},average:function(e,t,i){return BI.sum(e,t,i)/e.length}}),_.extend(BI,{trim:function(){return _.trim.apply(_,arguments)},toUpperCase:function(e){return(e+"").toLocaleUpperCase()},toLowerCase:function(e){return(e+"").toLocaleLowerCase()},isEndWithBlank:function(e){return/(\s|\u00A0)$/.test(e)},isLiteral:function(e){return/^\s?(true|false|-?[\d\.]+|'[^']*'|"[^"]*")\s?$/.test(e)},stripQuotes:function(e){var t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)},camelize:function(e){return e.replace(/-(.)/g,function(e,t){return t.toUpperCase()})},hyphenate:function(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()},isNotEmptyString:function(e){return BI.isString(e)&&!BI.isEmpty(e)},isEmptyString:function(e){return BI.isString(e)&&BI.isEmpty(e)},encrypt:function(e,t,i){switch(e){case BI.CRYPT_TYPE.AES:default:return BI.aesEncrypt(t,i)}},decrypt:function(e,t,i){switch(e){case BI.CRYPT_TYPE.AES:default:return BI.aesDecrypt(t,i)}},escape:function(e){return e.replace(/('|\\)/g,"\\$1")},leftPad:function(e,t,i){var n=String(e);for(i=i||" ";n.length<t;)n=i+n;return n.toString()},format:function(e){var i=Array.prototype.slice.call(arguments,1);return e.replace(/\{(\d+)\}/g,function(e,t){return i[t]})}}),_.extend(BI,{isLeapYear:function(e){return e%4==0&&e%100!=0||e%400==0},checkDateVoid:function(e,t,i,n,r){var o=[];return e|=0,t|=0,i|=0,n=BI.isString(n)?n.match(/\d+/g):n,r=BI.isString(r)?r.match(/\d+/g):r,e<n[0]?o=["y"]:e>r[0]?o=["y",1]:e>=n[0]&&e<=r[0]&&(e==n[0]&&(t<n[1]?o=["m"]:t==n[1]&&i<n[2]&&(o=["d"])),e==r[0]&&(t>r[1]?o=["m",1]:t==r[1]&&i>r[2]&&(o=["d",1]))),o},checkDateLegal:function(e){var t=e.match(/\d+/g),i=0|t[0],n=0|t[1],r=0|t[2];if(t.length<=1)return!0;if(t.length<=2)return 1<=n&&n<=12;var o=BI.Date._MD.slice(0);return o[1]=BI.isLeapYear(i)?29:28,1<=n&&n<=12&&r<=o[n-1]},parseDateTime:function(e,t){var i=BI.getDate(),n=0,r=0,o=1,a=e.split(/\W+/);"%y%x"!=t.toLowerCase()&&"%y%x%d"!=t.toLowerCase()||(a[0]=e.substring(0,4),a[1]=e.substring(4,6),a[2]=e.substring(6,8));var s=t.match(/%./g),l=0,u=0,c=0,h=0,p=0;for(l=0;l<a.length;++l)switch(s[l]){case"%d":case"%e":o=parseInt(a[l],10);break;case"%X":case"%x":r=parseInt(a[l],10)-1;break;case"%Y":case"%y":(n=parseInt(a[l],10))<100&&(n+=29<n?1900:2e3);break;case"%b":case"%B":for(u=0;u<12;++u)if(BI.Date._MN[u].substr(0,a[l].length).toLowerCase()==a[l].toLowerCase()){r=u;break}break;case"%H":case"%I":case"%k":case"%l":c=parseInt(a[l],10);break;case"%P":case"%p":/pm/i.test(a[l])&&c<12?c+=12:/am/i.test(a[l])&&12<=c&&(c-=12);break;case"%M":h=parseInt(a[l],10);case"%S":p=parseInt(a[l],10)}if(isNaN(n)&&(n=i.getFullYear()),isNaN(r)&&(r=i.getMonth()),isNaN(o)&&(o=i.getDate()),isNaN(c)&&(c=i.getHours()),isNaN(h)&&(h=i.getMinutes()),isNaN(p)&&(p=i.getSeconds()),0!=n)return BI.getDate(n,r,o,c,h,p);for(r=-1,l=o=n=0;l<a.length;++l)if(-1!=a[l].search(/[a-zA-Z]+/)){var d=-1;for(u=0;u<12;++u)if(BI.Date._MN[u].substr(0,a[l].length).toLowerCase()==a[l].toLowerCase()){d=u;break}-1!=d&&(-1!=r&&(o=r+1),r=d)}else parseInt(a[l],10)<=12&&-1==r?r=a[l]-1:31<parseInt(a[l],10)&&0==n?(n=parseInt(a[l],10))<100&&(n+=29<n?1900:2e3):0==o&&(o=a[l]);return 0==n&&(n=i.getFullYear()),-1!=r&&0!=o?BI.getDate(n,r,o,c,h,p):i},getDate:function(){var e,t=arguments;switch(arguments.length){case 0:e=new Date;break;case 1:e=new Date(t[0]);break;case 2:e=new Date(t[0],t[1]);break;case 3:e=new Date(t[0],t[1],t[2]);break;case 4:e=new Date(t[0],t[1],t[2],t[3]);break;case 5:e=new Date(t[0],t[1],t[2],t[3],t[4]);break;case 6:e=new Date(t[0],t[1],t[2],t[3],t[4],t[5]);break;case 7:e=new Date(t[0],t[1],t[2],t[3],t[4],t[5],t[6]);break;default:e=new Date}if(BI.isNotNull(BI.timeZone)&&(0===arguments.length||1===arguments.length&&BI.isNumber(arguments[0]))){var i=e.getTime(),n=6e4*e.getTimezoneOffset();return new Date(i+n+BI.timeZone)}return e},getTime:function(){var e,t=arguments;switch(arguments.length){case 0:e=new Date;break;case 1:e=new Date(t[0]);break;case 2:e=new Date(t[0],t[1]);break;case 3:e=new Date(t[0],t[1],t[2]);break;case 4:e=new Date(t[0],t[1],t[2],t[3]);break;case 5:e=new Date(t[0],t[1],t[2],t[3],t[4]);break;case 6:e=new Date(t[0],t[1],t[2],t[3],t[4],t[5]);break;case 7:e=new Date(t[0],t[1],t[2],t[3],t[4],t[5],t[6]);break;default:e=new Date}return BI.isNotNull(BI.timeZone)?e.getTime()-BI.timeZone-6e4*(new Date).getTimezoneOffset():e.getTime()}})}).call(this,i(6),i(41).setImmediate)},function(e,t,i){"use strict";(function(e,B){!function(n,r){if(!n.setImmediate){var o,a=1,s={},i=!1,l=n.document,e=Object.getPrototypeOf&&Object.getPrototypeOf(n);e=e&&e.setTimeout?e:n,"[object process]"==={}.toString.call(n.process)?function t(){o=function(e){B.nextTick(function(){c(e)})}}():!function h(){if(n.postMessage&&!n.importScripts){var e=!0,t=n.onmessage;return n.onmessage=function(){e=!1},n.postMessage("","*"),n.onmessage=t,e}}()?n.MessageChannel?function p(){var t=new MessageChannel;t.port1.onmessage=function(e){c(e.data)},o=function(e){t.port2.postMessage(e)}}():l&&"onreadystatechange"in l.createElement("script")?function d(){var i=l.documentElement;o=function(e){var t=l.createElement("script");t.onreadystatechange=function(){c(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}}():function g(){o=function(e){setTimeout(c,0,e)}}():function f(){var t="setImmediate$"+Math.random()+"$",i=function i(e){e.source===n&&"string"==typeof e.data&&0===e.data.indexOf(t)&&c(+e.data.slice(t.length))};n.addEventListener?n.addEventListener("message",i,!1):n.attachEvent("onmessage",i),o=function(e){n.postMessage(t+e,"*")}}(),e.setImmediate=function I(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),i=0;i<t.length;i++)t[i]=arguments[i+1];var n={callback:e,args:t};return s[a]=n,o(a),a++},e.clearImmediate=u}function u(e){delete s[e]}function c(e){if(i)setTimeout(c,0,e);else{var t=s[e];if(t){i=!0;try{!function n(e){var t=e.callback,i=e.args;switch(i.length){case 0:t();break;case 1:t(i[0]);break;case 2:t(i[0],i[1]);break;case 3:t(i[0],i[1],i[2]);break;default:t.apply(r,i)}}(t)}finally{u(e),i=!1}}}}}("undefined"==typeof self?void 0===e?void 0:e:self)}).call(this,i(6),i(62))},function(e,t){BI.OB=function(e){this._constructor(e)},_.extend(BI.OB.prototype,{props:{},init:null,destroyed:null,_constructor:function(e){this._initProps(e),this._init(),this._initRef()},_defaultConfig:function(e){return{}},_initProps:function(e){var t=this.props;BI.isFunction(this.props)&&(t=this.props(e)),this.options=function s(e){for(var t,i,n,r=e||{},o=arguments.length,a=1;a<o;a++)if(null!=(t=arguments[a]))for(i in t)r[i],r!==(n=t[i])&&n!==undefined&&(r[i]=n);return r}(this._defaultConfig(e),t,e)},_init:function(){this._initListeners(),this.init&&this.init()},_initListeners:function(){var t=this;null!=this.options.listeners&&(_.each(this.options.listeners,function(e){(e.target?e.target:t)[e.once?"once":"on"](e.eventName,_.bind(e.action,t))}),delete this.options.listeners)},_initRef:function(){this.options.ref&&this.options.ref.call(this,this)},_purgeRef:function(){this.options.ref&&(this.options.ref.call(null),this.options.ref=null)},_getEvents:function(){return _.isArray(this.events)||(this.events=[]),this.events},on:function(e,t){e=e.toLowerCase();var i=this._getEvents()[e];_.isArray(i)||(i=[],this._getEvents()[e]=i),i.push(t)},once:function(e,t){var i=function(){t.apply(this,arguments),this.un(e,i)};this.on(e,i)},un:function(e,t){if(e=e.toLowerCase(),null==t)delete this._getEvents()[e];else{var i=this._getEvents()[e];if(_.isArray(i)){var n=[];_.each(i,function(e){e!=t&&n.push(e)}),this._getEvents()[e]=n}}},purgeListeners:function(){this.events=[]},fireEvent:function(){var e=arguments[0].toLowerCase(),t=this._getEvents()[e];if(BI.isArray(t))if(BI.isArguments(arguments[1])){for(var i=0;i<t.length;i++)if(!1===t[i].apply(this,arguments[1]))return!1}else{var n=Array.prototype.slice.call(arguments,1);for(i=0;i<t.length;i++)if(!1===t[i].apply(this,n))return!1}return!0},destroy:function(){this.destroyed&&this.destroyed(),this._purgeRef(),this.purgeListeners()}})},function(e,t){!function(){BI.CRYPT_TYPE=BI.CRYPT_TYPE||{},BI.CRYPT_TYPE.AES="aes";var c,e,t,i,h,n,r,o,a,s,l,u,p,d,g,f,I,B,E,m,b,T=T||(c=Math,t=(e={}).lib={},i=t.Base={extend:function(e){y.prototype=this;var t=new y;return e&&t.mixIn(e),t.hasOwnProperty("init")||(t.init=function(){t.$super.init.apply(this,arguments)}),(t.init.prototype=t).$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},h=t.WordArray=i.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||r).stringify(this)},concat:function(e){var t=this.words,i=e.words,n=this.sigBytes,r=e.sigBytes;if(this.clamp(),n%4)for(var o=0;o<r;o++){var a=i[o>>>2]>>>24-o%4*8&255;t[n+o>>>2]|=a<<24-(n+o)%4*8}else if(65535<i.length)for(o=0;o<r;o+=4)t[n+o>>>2]=i[o>>>2];else t.push.apply(t,i);return this.sigBytes+=r,this},clamp:function(){var e=this.words,t=this.sigBytes;e[t>>>2]&=4294967295<<32-t%4*8,e.length=c.ceil(t/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],i=0;i<e;i+=4)t.push(4294967296*c.random()|0);return new h.init(t,e)}}),n=e.enc={},r=n.Hex={stringify:function(e){for(var t=e.words,i=e.sigBytes,n=[],r=0;r<i;r++){var o=t[r>>>2]>>>24-r%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,i=[],n=0;n<t;n+=2)i[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new h.init(i,t/2)}},o=n.Latin1={stringify:function(e){for(var t=e.words,i=e.sigBytes,n=[],r=0;r<i;r++){var o=t[r>>>2]>>>24-r%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var t=e.length,i=[],n=0;n<t;n++)i[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new h.init(i,t)}},a=n.Utf8={stringify:function(e){try{return decodeURIComponent(escape(o.stringify(e)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(e){return o.parse(unescape(encodeURIComponent(e)))}},s=t.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new h.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=a.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(e){var t=this._data,i=t.words,n=t.sigBytes,r=this.blockSize,o=n/(4*r),a=(o=e?c.ceil(o):c.max((0|o)-this._minBufferSize,0))*r,s=c.min(4*a,n);if(a){for(var l=0;l<a;l+=r)this._doProcessBlock(i,l);var u=i.splice(0,a);t.sigBytes-=s}return new h.init(u,s)},clone:function(){var e=i.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),t.Hasher=s.extend({cfg:i.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){s.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(i){return function(e,t){return new i.init(t).finalize(e)}},_createHmacHelper:function(i){return function(e,t){return new l.HMAC.init(i,t).finalize(e)}}}),l=e.algo={},e);function y(){}p=(u=T).lib.WordArray,u.enc.Base64={stringify:function(e){var t=e.words,i=e.sigBytes,n=this._map;e.clamp();for(var r=[],o=0;o<i;o+=3)for(var a=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s<i;s++)r.push(n.charAt(a>>>6*(3-s)&63));var l=n.charAt(64);if(l)for(;r.length%4;)r.push(l);return r.join("")},parse:function(e){var t=e.length,i=this._map,n=i.charAt(64);if(n){var r=e.indexOf(n);-1!=r&&(t=r)}for(var o=[],a=0,s=0;s<t;s++)if(s%4){var l=i.indexOf(e.charAt(s-1))<<s%4*2,u=i.indexOf(e.charAt(s))>>>6-s%4*2;o[a>>>2]|=(l|u)<<24-a%4*8,a++}return p.create(o,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},function(c){var e=T,t=e.lib,i=t.WordArray,n=t.Hasher,r=e.algo,N=[];!function(){for(var e=0;e<64;e++)N[e]=4294967296*c.abs(c.sin(e+1))|0}();var o=r.MD5=n.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var i=0;i<16;i++){var n=t+i,r=e[n];e[n]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var o=this._hash.words,a=e[t+0],s=e[t+1],l=e[t+2],u=e[t+3],c=e[t+4],h=e[t+5],p=e[t+6],d=e[t+7],g=e[t+8],f=e[t+9],I=e[t+10],B=e[t+11],E=e[t+12],_=e[t+13],m=e[t+14],b=e[t+15],T=o[0],y=o[1],C=o[2],v=o[3];y=L(y=L(y=L(y=L(y=x(y=x(y=x(y=x(y=S(y=S(y=S(y=S(y=V(y=V(y=V(y=V(y,C=V(C,v=V(v,T=V(T,y,C,v,a,7,N[0]),y,C,s,12,N[1]),T,y,l,17,N[2]),v,T,u,22,N[3]),C=V(C,v=V(v,T=V(T,y,C,v,c,7,N[4]),y,C,h,12,N[5]),T,y,p,17,N[6]),v,T,d,22,N[7]),C=V(C,v=V(v,T=V(T,y,C,v,g,7,N[8]),y,C,f,12,N[9]),T,y,I,17,N[10]),v,T,B,22,N[11]),C=V(C,v=V(v,T=V(T,y,C,v,E,7,N[12]),y,C,_,12,N[13]),T,y,m,17,N[14]),v,T,b,22,N[15]),C=S(C,v=S(v,T=S(T,y,C,v,s,5,N[16]),y,C,p,9,N[17]),T,y,B,14,N[18]),v,T,a,20,N[19]),C=S(C,v=S(v,T=S(T,y,C,v,h,5,N[20]),y,C,I,9,N[21]),T,y,b,14,N[22]),v,T,c,20,N[23]),C=S(C,v=S(v,T=S(T,y,C,v,f,5,N[24]),y,C,m,9,N[25]),T,y,u,14,N[26]),v,T,g,20,N[27]),C=S(C,v=S(v,T=S(T,y,C,v,_,5,N[28]),y,C,l,9,N[29]),T,y,d,14,N[30]),v,T,E,20,N[31]),C=x(C,v=x(v,T=x(T,y,C,v,h,4,N[32]),y,C,g,11,N[33]),T,y,B,16,N[34]),v,T,m,23,N[35]),C=x(C,v=x(v,T=x(T,y,C,v,s,4,N[36]),y,C,c,11,N[37]),T,y,d,16,N[38]),v,T,I,23,N[39]),C=x(C,v=x(v,T=x(T,y,C,v,_,4,N[40]),y,C,a,11,N[41]),T,y,u,16,N[42]),v,T,p,23,N[43]),C=x(C,v=x(v,T=x(T,y,C,v,f,4,N[44]),y,C,E,11,N[45]),T,y,b,16,N[46]),v,T,l,23,N[47]),C=L(C,v=L(v,T=L(T,y,C,v,a,6,N[48]),y,C,d,10,N[49]),T,y,m,15,N[50]),v,T,h,21,N[51]),C=L(C,v=L(v,T=L(T,y,C,v,E,6,N[52]),y,C,u,10,N[53]),T,y,I,15,N[54]),v,T,s,21,N[55]),C=L(C,v=L(v,T=L(T,y,C,v,g,6,N[56]),y,C,b,10,N[57]),T,y,p,15,N[58]),v,T,_,21,N[59]),C=L(C,v=L(v,T=L(T,y,C,v,c,6,N[60]),y,C,B,10,N[61]),T,y,l,15,N[62]),v,T,f,21,N[63]),o[0]=o[0]+T|0,o[1]=o[1]+y|0,o[2]=o[2]+C|0,o[3]=o[3]+v|0},_doFinalize:function(){var e=this._data,t=e.words,i=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32;var r=c.floor(i/4294967296),o=i;t[15+(64+n>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),t[14+(64+n>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),e.sigBytes=4*(t.length+1),this._process();for(var a=this._hash,s=a.words,l=0;l<4;l++){var u=s[l];s[l]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return a},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e}});function V(e,t,i,n,r,o,a){var s=e+(t&i|~t&n)+r+a;return(s<<o|s>>>32-o)+t}function S(e,t,i,n,r,o,a){var s=e+(t&n|i&~n)+r+a;return(s<<o|s>>>32-o)+t}function x(e,t,i,n,r,o,a){var s=e+(t^i^n)+r+a;return(s<<o|s>>>32-o)+t}function L(e,t,i,n,r,o,a){var s=e+(i^(t|~n))+r+a;return(s<<o|s>>>32-o)+t}e.MD5=n._createHelper(o),e.HmacMD5=n._createHmacHelper(o)}(Math),g=(d=T).lib,f=g.Base,I=g.WordArray,B=d.algo,E=B.MD5,m=B.EvpKDF=f.extend({cfg:f.extend({keySize:4,hasher:E,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var i=this.cfg,n=i.hasher.create(),r=I.create(),o=r.words,a=i.keySize,s=i.iterations;o.length<a;){l&&n.update(l);var l=n.update(e).finalize(t);n.reset();for(var u=1;u<s;u++)l=n.finalize(l),n.reset();r.concat(l)}return r.sigBytes=4*a,r}}),d.EvpKDF=function(e,t,i){return m.create(i).compute(e,t)},T.lib.Cipher||function(){var e=T,t=e.lib,i=t.Base,l=t.WordArray,n=t.BufferedBlockAlgorithm,r=e.enc,o=(r.Utf8,r.Base64),a=e.algo.EvpKDF,s=t.Cipher=n.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,i){this.cfg=this.cfg.extend(i),this._xformMode=e,this._key=t,this.reset()},reset:function(){n.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(n){return{encrypt:function(e,t,i){return u(t).encrypt(n,e,t,i)},decrypt:function(e,t,i){return u(t).decrypt(n,e,t,i)}}}});function u(e){return"string"==typeof e?m:E}t.StreamCipher=s.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var c,h=e.mode={},p=t.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),d=h.CBC=((c=p.extend()).Encryptor=c.extend({processBlock:function(e,t){var i=this._cipher,n=i.blockSize;g.call(this,e,t,n),i.encryptBlock(e,t),this._prevBlock=e.slice(t,t+n)}}),c.Decryptor=c.extend({processBlock:function(e,t){var i=this._cipher,n=i.blockSize,r=e.slice(t,t+n);i.decryptBlock(e,t),g.call(this,e,t,n),this._prevBlock=r}}),c);function g(e,t,i){var n=this._iv;if(n){var r=n;this._iv=void 0}else r=this._prevBlock;for(var o=0;o<i;o++)e[t+o]^=r[o]}var f=(e.pad={}).Pkcs7={pad:function(e,t){for(var i=4*t,n=i-e.sigBytes%i,r=n<<24|n<<16|n<<8|n,o=[],a=0;a<n;a+=4)o.push(r);var s=l.create(o,n);e.concat(s)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},I=(t.BlockCipher=s.extend({cfg:s.cfg.extend({mode:d,padding:f}),reset:function(){s.reset.call(this);var e=this.cfg,t=e.iv,i=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var n=i.createEncryptor;else{n=i.createDecryptor;this._minBufferSize=1}this._mode=n.call(i,this,t&&t.words)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else{t=this._process(!0);e.unpad(t)}return t},blockSize:4}),t.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}})),B=(e.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,i=e.salt;if(i)var n=l.create([1398893684,1701076831]).concat(i).concat(t);else n=t;return n.toString(o)},parse:function(e){var t=o.parse(e),i=t.words;if(1398893684==i[0]&&1701076831==i[1]){var n=l.create(i.slice(2,4));i.splice(0,4),t.sigBytes-=16}return I.create({ciphertext:t,salt:n})}},E=t.SerializableCipher=i.extend({cfg:i.extend({format:B}),encrypt:function(e,t,i,n){n=this.cfg.extend(n);var r=e.createEncryptor(i,n),o=r.finalize(t),a=r.cfg;return I.create({ciphertext:o,key:i,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,i,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(i,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),_=(e.kdf={}).OpenSSL={execute:function(e,t,i,n){n=n||l.random(8);var r=a.create({keySize:t+i}).compute(e,n),o=l.create(r.words.slice(t),4*i);return r.sigBytes=4*t,I.create({key:r,iv:o,salt:n})}},m=t.PasswordBasedCipher=E.extend({cfg:E.cfg.extend({kdf:_}),encrypt:function(e,t,i,n){var r=(n=this.cfg.extend(n)).kdf.execute(i,e.keySize,e.ivSize);n.iv=r.iv;var o=E.encrypt.call(this,e,t,r.key,n);return o.mixIn(r),o},decrypt:function(e,t,i,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var r=n.kdf.execute(i,e.keySize,e.ivSize,t.salt);return n.iv=r.iv,E.decrypt.call(this,e,t,r.key,n)}})}(),T.mode.ECB=((b=T.lib.BlockCipherMode.extend()).Encryptor=b.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),b.Decryptor=b.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),b),function(){var e=T,t=e.lib.BlockCipher,i=e.algo,u=[],c=[],h=[],p=[],d=[],g=[],f=[],I=[],B=[],E=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var i=0,n=0;for(t=0;t<256;t++){var r=n^n<<1^n<<2^n<<3^n<<4;r=r>>>8^255&r^99,u[i]=r;var o=e[c[r]=i],a=e[o],s=e[a],l=257*e[r]^16843008*r;h[i]=l<<24|l>>>8,p[i]=l<<16|l>>>16,d[i]=l<<8|l>>>24,g[i]=l;l=16843009*s^65537*a^257*o^16843008*i;f[r]=l<<24|l>>>8,I[r]=l<<16|l>>>16,B[r]=l<<8|l>>>24,E[r]=l,i?(i=o^e[e[e[s^o]]],n^=e[e[n]]):i=n=1}}();var _=[0,1,2,4,8,16,32,64,128,27,54],n=i.AES=t.extend({_doReset:function(){for(var e=this._key,t=e.words,i=e.sigBytes/4,n=4*(1+(this._nRounds=6+i)),r=this._keySchedule=[],o=0;o<n;o++)if(o<i)r[o]=t[o];else{var a=r[o-1];o%i?6<i&&o%i==4&&(a=u[a>>>24]<<24|u[a>>>16&255]<<16|u[a>>>8&255]<<8|u[255&a]):(a=u[(a=a<<8|a>>>24)>>>24]<<24|u[a>>>16&255]<<16|u[a>>>8&255]<<8|u[255&a],a^=_[o/i|0]<<24),r[o]=r[o-i]^a}for(var s=this._invKeySchedule=[],l=0;l<n;l++){o=n-l;if(l%4)a=r[o];else a=r[o-4];s[l]=l<4||o<=4?a:f[u[a>>>24]]^I[u[a>>>16&255]]^B[u[a>>>8&255]]^E[u[255&a]]}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,h,p,d,g,u)},decryptBlock:function(e,t){var i=e[t+1];e[t+1]=e[t+3],e[t+3]=i,this._doCryptBlock(e,t,this._invKeySchedule,f,I,B,E,c);i=e[t+1];e[t+1]=e[t+3],e[t+3]=i},_doCryptBlock:function(e,t,i,n,r,o,a,s){for(var l=this._nRounds,u=e[t]^i[0],c=e[t+1]^i[1],h=e[t+2]^i[2],p=e[t+3]^i[3],d=4,g=1;g<l;g++){var f=n[u>>>24]^r[c>>>16&255]^o[h>>>8&255]^a[255&p]^i[d++],I=n[c>>>24]^r[h>>>16&255]^o[p>>>8&255]^a[255&u]^i[d++],B=n[h>>>24]^r[p>>>16&255]^o[u>>>8&255]^a[255&c]^i[d++],E=n[p>>>24]^r[u>>>16&255]^o[c>>>8&255]^a[255&h]^i[d++];u=f,c=I,h=B,p=E}f=(s[u>>>24]<<24|s[c>>>16&255]<<16|s[h>>>8&255]<<8|s[255&p])^i[d++],I=(s[c>>>24]<<24|s[h>>>16&255]<<16|s[p>>>8&255]<<8|s[255&u])^i[d++],B=(s[h>>>24]<<24|s[p>>>16&255]<<16|s[u>>>8&255]<<8|s[255&c])^i[d++],E=(s[p>>>24]<<24|s[u>>>16&255]<<16|s[c>>>8&255]<<8|s[255&h])^i[d++];e[t]=f,e[t+1]=I,e[t+2]=B,e[t+3]=E},keySize:8});e.AES=t._createHelper(n)}(),_.extend(BI,{aesEncrypt:function(e,t){return t=T.enc.Utf8.parse(t),T.AES.encrypt(e,t,{mode:T.mode.ECB,padding:T.pad.Pkcs7}).ciphertext.toString(T.enc.Base64)},aesDecrypt:function(e,t){t=T.enc.Utf8.parse(t);var i=T.AES.decrypt(e,t,{mode:T.mode.ECB,padding:T.pad.Pkcs7});return T.enc.Utf8.stringify(i)}})}()},function(e,t){function i(a){return function(e,t,i){var l,n=e[t];n&&n.target==e||((l=e[t]=function(){for(var e,t=l.before,i=arguments,n=t.length;n--;){if(!1===(e=t[n].advice.apply(this,i)))return!1;i=e||i}for(var r=l.method.apply(this,i),o=l.after,a=0,s=o.length;a<s;a++){if(e=o[a].advice.call(this,r,i),!1===r)return!1;i=e||i}return r}).before=[],l.after=[],n&&(l.method=n),l.target=e);var r=(l||n)[a],o={advice:i,_index:r.length,remove:function(){r.splice(this._index,1)}};return r.push(o),o}}BI.aspect={before:i("before"),after:i("after")},BI.aspect},function(e,t){var c;c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_.extend(BI,{encode:function(e){var t,i,n,r,o,a,s,l="",u=0;for(e=function(e){e=e.replace(/\r\n/g,"\n");for(var t="",i=0;i<e.length;i++){var n=e.charCodeAt(i);n<128?t+=String.fromCharCode(n):(127<n&&n<2048?t+=String.fromCharCode(n>>6|192):(t+=String.fromCharCode(n>>12|224),t+=String.fromCharCode(n>>6&63|128)),t+=String.fromCharCode(63&n|128))}return t}(e);u<e.length;)r=(t=e.charCodeAt(u++))>>2,o=(3&t)<<4|(i=e.charCodeAt(u++))>>4,a=(15&i)<<2|(n=e.charCodeAt(u++))>>6,s=63&n,isNaN(i)?a=s=64:isNaN(n)&&(s=64),l=l+c.charAt(r)+c.charAt(o)+c.charAt(a)+c.charAt(s);return l},decode:function(e){var t,i,n,r,o,a,s="",l=0;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");l<e.length;)t=c.indexOf(e.charAt(l++))<<2|(r=c.indexOf(e.charAt(l++)))>>4,i=(15&r)<<4|(o=c.indexOf(e.charAt(l++)))>>2,n=(3&o)<<6|(a=c.indexOf(e.charAt(l++))),s+=String.fromCharCode(t),64!=o&&(s+=String.fromCharCode(i)),64!=a&&(s+=String.fromCharCode(n));return s=function(e){for(var t="",i=0,n=0,r=0,o=0;i<e.length;)(n=e.charCodeAt(i))<128?(t+=String.fromCharCode(n),i++):191<n&&n<224?(o=e.charCodeAt(i+1),t+=String.fromCharCode((31&n)<<6|63&o),i+=2):(o=e.charCodeAt(i+1),r=e.charCodeAt(i+2),t+=String.fromCharCode((15&n)<<12|(63&o)<<6|63&r),i+=3);return t}(s)}})},function(e,t){BI.Cache={_prefix:"bi",setUsername:function(e){localStorage.setItem(BI.Cache._prefix+".username",(e+""||"").toUpperCase())},getUsername:function(){return localStorage.getItem(BI.Cache._prefix+".username")||""},_getKeyPrefix:function(){return BI.Cache.getUsername()+"."+BI.Cache._prefix+"."},_generateKey:function(e){return BI.Cache._getKeyPrefix()+(e||"")},getItem:function(e){return localStorage.getItem(BI.Cache._generateKey(e))},setItem:function(e,t){localStorage.setItem(BI.Cache._generateKey(e),t)},removeItem:function(e){localStorage.removeItem(BI.Cache._generateKey(e))},clear:function(){for(var e=localStorage.length;0<=e;e--){var t=localStorage.key(e);t&&0===t.indexOf(BI.Cache._getKeyPrefix())&&localStorage.removeItem(t)}},keys:function(){for(var e=[],t=localStorage.length;0<=t;t--){var i=localStorage.key(t);if(i){var n=BI.Cache._getKeyPrefix();0===i.indexOf(n)&&(e[e.length]=i.substring(n.length))}}return e},addCookie:function(e,t,i,n){var r=e+"="+escape(t);if(n&&0<n){var o=new Date;o.setTime(o.getTime()+3600*n*1e3),r=r+"; expires="+o.toUTCString()}i&&(r=r+"; path="+i),document.cookie=r},getCookie:function(e){var t,i=new RegExp("(^| )"+e+"=([^;]*)(;|$)");return(t=document.cookie.match(i))?unescape(t[2]):null},deleteCookie:function(e,t){var i=new Date;i.setTime(i.getTime()-1e4);var n=e+"=v; expires="+i.toUTCString();t&&(n=n+"; path="+t),document.cookie=n}}},function(e,t){BI.CellSizeAndPositionManager=function(e,t,i){this._cellSizeGetter=t,this._cellCount=e,this._estimatedCellSize=i,this._cellSizeAndPositionData={},this._lastMeasuredIndex=-1},BI.CellSizeAndPositionManager.prototype={constructor:BI.CellSizeAndPositionManager,configure:function(e,t){this._cellCount=e,this._estimatedCellSize=t},getCellCount:function(){return this._cellCount},getEstimatedCellSize:function(){return this._estimatedCellSize},getLastMeasuredIndex:function(){return this._lastMeasuredIndex},getSizeAndPositionOfCell:function(e){if(!(e<0||e>=this._cellCount)){if(e>this._lastMeasuredIndex){for(var t=this.getSizeAndPositionOfLastMeasuredCell(),i=t.offset+t.size,n=this._lastMeasuredIndex+1;n<=e;n++){var r=this._cellSizeGetter(n);null==r||isNaN(r)||(this._cellSizeAndPositionData[n]={offset:i,size:r},i+=r)}this._lastMeasuredIndex=e}return this._cellSizeAndPositionData[e]}},getSizeAndPositionOfLastMeasuredCell:function(){return 0<=this._lastMeasuredIndex?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}},getTotalSize:function(){var e=this.getSizeAndPositionOfLastMeasuredCell();return e.offset+e.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize},getUpdatedOffsetForIndex:function(e,t,i,n){var r,o=this.getSizeAndPositionOfCell(n),a=o.offset,s=a-t+o.size;switch(e){case"start":r=a;break;case"end":r=s;break;case"center":r=a-(t-o.size)/2;break;default:r=Math.max(s,Math.min(a,i))}var l=this.getTotalSize();return Math.max(0,Math.min(l-t,r))},getVisibleCellRange:function(e,t){if(0===this.getTotalSize())return{};var i=t+e,n=this._findNearestCell(t),r=this.getSizeAndPositionOfCell(n);t=r.offset+r.size;for(var o=n;t<i&&o<this._cellCount-1;)o++,t+=this.getSizeAndPositionOfCell(o).size;return{start:n,stop:o}},resetCell:function(e){this._lastMeasuredIndex=Math.min(this._lastMeasuredIndex,e-1)},_binarySearch:function(e,t,i){for(var n,r;t<=e;){if(n=t+Math.floor((e-t)/2),(r=this.getSizeAndPositionOfCell(n).offset)===i)return n;r<i?t=n+1:i<r&&(e=n-1)}if(0<t)return t-1},_exponentialSearch:function(e,t){for(var i=1;e<this._cellCount&&this.getSizeAndPositionOfCell(e).offset<t;)e+=i,i*=2;return this._binarySearch(Math.min(e,this._cellCount-1),Math.floor(e/2),t)},_findNearestCell:function(e){if(!isNaN(e)){e=Math.max(0,e);var t=this.getSizeAndPositionOfLastMeasuredCell(),i=Math.max(0,this._lastMeasuredIndex);return t.offset>=e?this._binarySearch(i,0,e):this._exponentialSearch(i,e)}}},BI.ScalingCellSizeAndPositionManager=function(e,t,i,n){this._cellSizeAndPositionManager=new BI.CellSizeAndPositionManager(e,t,i),this._maxScrollSize=n||1e7},BI.ScalingCellSizeAndPositionManager.prototype={constructor:BI.ScalingCellSizeAndPositionManager,configure:function(){this._cellSizeAndPositionManager.configure.apply(this._cellSizeAndPositionManager,arguments)},getCellCount:function(){return this._cellSizeAndPositionManager.getCellCount()},getEstimatedCellSize:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()},getLastMeasuredIndex:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()},getOffsetAdjustment:function(e,t){var i=this._cellSizeAndPositionManager.getTotalSize(),n=this.getTotalSize(),r=this._getOffsetPercentage(e,t,n);return Math.round(r*(n-i))},getSizeAndPositionOfCell:function(e){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(e)},getSizeAndPositionOfLastMeasuredCell:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()},getTotalSize:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())},getUpdatedOffsetForIndex:function(e,t,i,n){i=this._safeOffsetToOffset(t,i);var r=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex(e,t,i,n);return this._offsetToSafeOffset(t,r)},getVisibleCellRange:function(e,t){return t=this._safeOffsetToOffset(e,t),this._cellSizeAndPositionManager.getVisibleCellRange(e,t)},resetCell:function(e){this._cellSizeAndPositionManager.resetCell(e)},_getOffsetPercentage:function(e,t,i){return i<=e?0:t/(i-e)},_offsetToSafeOffset:function(e,t){var i=this._cellSizeAndPositionManager.getTotalSize(),n=this.getTotalSize();if(i===n)return t;var r=this._getOffsetPercentage(e,t,i);return Math.round(r*(n-e))},_safeOffsetToOffset:function(e,t){var i=this._cellSizeAndPositionManager.getTotalSize(),n=this.getTotalSize();if(i===n)return t;var r=this._getOffsetPercentage(e,t,n);return Math.round(r*(i-e))}}},function(e,t){var l;l={19969:"DZ",19975:"WM",19988:"QJ",20048:"YL",20056:"SC",20060:"NM",20094:"QG",20127:"QJ",20167:"QC",20193:"YG",20250:"KH",20256:"ZC",20282:"SC",20285:"QJG",20291:"TD",20314:"YD",20315:"BF",20340:"NE",20375:"TD",20389:"YJ",20391:"CZ",20415:"PB",20446:"YS",20447:"SQ",20504:"TC",20608:"KG",20854:"QJ",20857:"ZC",20911:"PF",20985:"AW",21032:"PB",21048:"XQ",21049:"SC",21089:"YS",21119:"JC",21242:"SB",21273:"SC",21305:"YP",21306:"QO",21330:"ZC",21333:"SDC",21345:"QK",21378:"CA",21397:"SC",21414:"XS",21442:"SC",21477:"JG",21480:"TD",21484:"ZS",21494:"YX",21505:"YX",21512:"HG",21523:"XH",21537:"PB",21542:"PF",21549:"KH",21571:"E",21574:"DA",21588:"TD",21589:"O",21618:"ZC",21621:"KHA",21632:"ZJ",21654:"KG",21679:"LKG",21683:"KH",21710:"A",21719:"YH",21734:"WOE",21769:"A",21780:"WN",21804:"XH",21834:"A",21899:"ZD",21903:"RN",21908:"WO",21939:"ZC",21956:"SA",21964:"YA",21970:"TD",22003:"A",22031:"JG",22040:"XS",22060:"ZC",22066:"ZC",22079:"MH",22129:"XJ",22179:"XA",22237:"NJ",22244:"TD",22280:"JQ",22300:"YH",22313:"XW",22331:"YQ",22343:"YJ",22351:"PH",22395:"DC",22412:"TD",22484:"PB",22500:"PB",22534:"ZD",22549:"DH",22561:"PB",22612:"TD",22771:"KQ",22831:"HB",22841:"JG",22855:"QJ",22865:"XQ",23013:"ML",23081:"WM",23487:"SX",23558:"QJ",23561:"YW",23586:"YW",23614:"YW",23615:"SN",23631:"PB",23646:"ZS",23663:"ZT",23673:"YG",23762:"TD",23769:"ZS",23780:"QJ",23884:"QK",24055:"XH",24113:"DC",24162:"ZC",24191:"GA",24273:"QJ",24324:"NL",24377:"TD",24378:"QJ",24439:"PF",24554:"ZS",24683:"TD",24694:"WE",24733:"LK",24925:"TN",25094:"ZG",25100:"XQ",25103:"XH",25153:"PB",25170:"PB",25179:"KG",25203:"PB",25240:"ZS",25282:"FB",25303:"NA",25324:"KG",25341:"ZY",25373:"WZ",25375:"XJ",25384:"A",25457:"A",25528:"SD",25530:"SC",25552:"TD",25774:"ZC",25874:"ZC",26044:"YW",26080:"WM",26292:"PB",26333:"PB",26355:"ZY",26366:"CZ",26397:"ZC",26399:"QJ",26415:"ZS",26451:"SB",26526:"ZC",26552:"JG",26561:"TD",26588:"JG",26597:"CZ",26629:"ZS",26638:"YL",26646:"XQ",26653:"KG",26657:"XJ",26727:"HG",26894:"ZC",26937:"ZS",26946:"ZC",26999:"KJ",27099:"KJ",27449:"YQ",27481:"XS",27542:"ZS",27663:"ZS",27748:"TS",27784:"SC",27788:"ZD",27795:"TD",27812:"O",27850:"PB",27852:"MB",27895:"SL",27898:"PL",27973:"QJ",27981:"KH",27986:"HX",27994:"XJ",28044:"YC",28065:"WG",28177:"SM",28267:"QJ",28291:"KH",28337:"ZQ",28463:"TL",28548:"DC",28601:"TD",28689:"PB",28805:"JG",28820:"QG",28846:"PB",28952:"TD",28975:"ZC",29100:"A",29325:"QJ",29575:"SL",29602:"FB",30010:"TD",30044:"CX",30058:"PF",30091:"YSP",30111:"YN",30229:"XJ",30427:"SC",30465:"SX",30631:"YQ",30655:"QJ",30684:"QJG",30707:"SD",30729:"XH",30796:"LG",30917:"PB",31074:"NM",31085:"JZ",31109:"SC",31181:"ZC",31192:"MLB",31293:"JQ",31400:"YX",31584:"YJ",31896:"ZN",31909:"ZY",31995:"XJ",32321:"PF",32327:"ZY",32418:"HG",32420:"XQ",32421:"HG",32438:"LG",32473:"GJ",32488:"TD",32521:"QJ",32527:"PB",32562:"ZSQ",32564:"JZ",32735:"ZD",32793:"PB",33071:"PF",33098:"XL",33100:"YA",33152:"PB",33261:"CX",33324:"BP",33333:"TD",33406:"YA",33426:"WM",33432:"PB",33445:"JG",33486:"ZN",33493:"TS",33507:"QJ",33540:"QJ",33544:"ZC",33564:"XQ",33617:"YT",33632:"QJ",33636:"XH",33637:"YX",33694:"WG",33705:"PF",33728:"YW",33882:"SR",34067:"WM",34074:"YW",34121:"QJ",34255:"ZC",34259:"XL",34425:"JH",34430:"XH",34485:"KH",34503:"YS",34532:"HG",34552:"XS",34558:"YE",34593:"ZL",34660:"YQ",34892:"XH",34928:"SC",34999:"QJ",35048:"PB",35059:"SC",35098:"ZC",35203:"TQ",35265:"JX",35299:"JX",35782:"SZ",35828:"YS",35830:"E",35843:"TD",35895:"YG",35977:"MH",36158:"JG",36228:"QJ",36426:"XQ",36466:"DC",36710:"CJ",36711:"ZYG",36767:"PB",36866:"SK",36951:"YW",37034:"YX",37063:"XH",37218:"ZC",37325:"ZC",38063:"PB",38079:"TD",38085:"QY",38107:"DC",38116:"TD",38123:"YD",38224:"HG",38241:"XTC",38271:"ZC",38415:"YE",38426:"KH",38461:"YD",38463:"AE",38466:"PB",38477:"XJ",38518:"YT",38551:"WK",38585:"ZC",38704:"XS",38739:"LJ",38761:"GJ",38808:"SQ",39048:"JG",39049:"XJ",39052:"HG",39076:"CZ",39271:"XT",39534:"TD",39552:"TD",39584:"PB",39647:"SB",39730:"LG",39748:"TPB",40109:"ZQ",40479:"ND",40516:"HG",40536:"HG",40583:"QJ",40765:"YQ",40784:"QJ",40840:"YK",40863:"QJG"},_.extend(BI,{makeFirstPY:function(e,t){if(t=t||{},"string"!=typeof e)return""+e;for(var i,n,r=[],o=0,a=e.length;o<a;o++){var s=e.charAt(o);r.push(40869<(n=(i=s).charCodeAt(0))||n<19968?i:l[n]?l[n]:"YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYYYNJQYXXGJHHSDSJNKKTMOMLCRXYPSNQSECCQZGGLLYJLMYZZSECYKYYHQWJSSGGYXYZYJWWKDJHYCHMYXJTLXJYQBYXZLDWRDJRWYSRLDZJPCBZJJBRCFTLECZSTZFXXZHTRQHYBDLYCZSSYMMRFMYQZPWWJJYFCRWFDFZQPYDDWYXKYJAWJFFXYPSFTZYHHYZYSWCJYXSCLCXXWZZXNBGNNXBXLZSZSBSGPYSYZDHMDZBQBZCWDZZYYTZHBTSYYBZGNTNXQYWQSKBPHHLXGYBFMJEBJHHGQTJCYSXSTKZHLYCKGLYSMZXYALMELDCCXGZYRJXSDLTYZCQKCNNJWHJTZZCQLJSTSTBNXBTYXCEQXGKWJYFLZQLYHYXSPSFXLMPBYSXXXYDJCZYLLLSJXFHJXPJBTFFYABYXBHZZBJYZLWLCZGGBTSSMDTJZXPTHYQTGLJSCQFZKJZJQNLZWLSLHDZBWJNCJZYZSQQYCQYRZCJJWYBRTWPYFTWEXCSKDZCTBZHYZZYYJXZCFFZZMJYXXSDZZOTTBZLQWFCKSZSXFYRLNYJMBDTHJXSQQCCSBXYYTSYFBXDZTGBCNSLCYZZPSAZYZZSCJCSHZQYDXLBPJLLMQXTYDZXSQJTZPXLCGLQTZWJBHCTSYJSFXYEJJTLBGXSXJMYJQQPFZASYJNTYDJXKJCDJSZCBARTDCLYJQMWNQNCLLLKBYBZZSYHQQLTWLCCXTXLLZNTYLNEWYZYXCZXXGRKRMTCNDNJTSYYSSDQDGHSDBJGHRWRQLYBGLXHLGTGXBQJDZPYJSJYJCTMRNYMGRZJCZGJMZMGXMPRYXKJNYMSGMZJYMKMFXMLDTGFBHCJHKYLPFMDXLQJJSMTQGZSJLQDLDGJYCALCMZCSDJLLNXDJFFFFJCZFMZFFPFKHKGDPSXKTACJDHHZDDCRRCFQYJKQCCWJDXHWJLYLLZGCFCQDSMLZPBJJPLSBCJGGDCKKDEZSQCCKJGCGKDJTJDLZYCXKLQSCGJCLTFPCQCZGWPJDQYZJJBYJHSJDZWGFSJGZKQCCZLLPSPKJGQJHZZLJPLGJGJJTHJJYJZCZMLZLYQBGJWMLJKXZDZNJQSYZMLJLLJKYWXMKJLHSKJGBMCLYYMKXJQLBMLLKMDXXKWYXYSLMLPSJQQJQXYXFJTJDXMXXLLCXQBSYJBGWYMBGGBCYXPJYGPEPFGDJGBHBNSQJYZJKJKHXQFGQZKFHYGKHDKLLSDJQXPQYKYBNQSXQNSZSWHBSXWHXWBZZXDMNSJBSBKBBZKLYLXGWXDRWYQZMYWSJQLCJXXJXKJEQXSCYETLZHLYYYSDZPAQYZCMTLSHTZCFYZYXYLJSDCJQAGYSLCQLYYYSHMRQQKLDXZSCSSSYDYCJYSFSJBFRSSZQSBXXPXJYSDRCKGJLGDKZJZBDKTCSYQPYHSTCLDJDHMXMCGXYZHJDDTMHLTXZXYLYMOHYJCLTYFBQQXPFBDFHHTKSQHZYYWCNXXCRWHOWGYJLEGWDQCWGFJYCSNTMYTOLBYGWQWESJPWNMLRYDZSZTXYQPZGCWXHNGPYXSHMYQJXZTDPPBFYHZHTJYFDZWKGKZBLDNTSXHQEEGZZYLZMMZYJZGXZXKHKSTXNXXWYLYAPSTHXDWHZYMPXAGKYDXBHNHXKDPJNMYHYLPMGOCSLNZHKXXLPZZLBMLSFBHHGYGYYGGBHSCYAQTYWLXTZQCEZYDQDQMMHTKLLSZHLSJZWFYHQSWSCWLQAZYNYTLSXTHAZNKZZSZZLAXXZWWCTGQQTDDYZTCCHYQZFLXPSLZYGPZSZNGLNDQTBDLXGTCTAJDKYWNSYZLJHHZZCWNYYZYWMHYCHHYXHJKZWSXHZYXLYSKQYSPSLYZWMYPPKBYGLKZHTYXAXQSYSHXASMCHKDSCRSWJPWXSGZJLWWSCHSJHSQNHCSEGNDAQTBAALZZMSSTDQJCJKTSCJAXPLGGXHHGXXZCXPDMMHLDGTYBYSJMXHMRCPXXJZCKZXSHMLQXXTTHXWZFKHCCZDYTCJYXQHLXDHYPJQXYLSYYDZOZJNYXQEZYSQYAYXWYPDGXDDXSPPYZNDLTWRHXYDXZZJHTCXMCZLHPYYYYMHZLLHNXMYLLLMDCPPXHMXDKYCYRDLTXJCHHZZXZLCCLYLNZSHZJZZLNNRLWHYQSNJHXYNTTTKYJPYCHHYEGKCTTWLGQRLGGTGTYGYHPYHYLQYQGCWYQKPYYYTTTTLHYHLLTYTTSPLKYZXGZWGPYDSSZZDQXSKCQNMJJZZBXYQMJRTFFBTKHZKBXLJJKDXJTLBWFZPPTKQTZTGPDGNTPJYFALQMKGXBDCLZFHZCLLLLADPMXDJHLCCLGYHDZFGYDDGCYYFGYDXKSSEBDHYKDKDKHNAXXYBPBYYHXZQGAFFQYJXDMLJCSQZLLPCHBSXGJYNDYBYQSPZWJLZKSDDTACTBXZDYZYPJZQSJNKKTKNJDJGYYPGTLFYQKASDNTCYHBLWDZHBBYDWJRYGKZYHEYYFJMSDTYFZJJHGCXPLXHLDWXXJKYTCYKSSSMTWCTTQZLPBSZDZWZXGZAGYKTYWXLHLSPBCLLOQMMZSSLCMBJCSZZKYDCZJGQQDSMCYTZQQLWZQZXSSFPTTFQMDDZDSHDTDWFHTDYZJYQJQKYPBDJYYXTLJHDRQXXXHAYDHRJLKLYTWHLLRLLRCXYLBWSRSZZSYMKZZHHKYHXKSMDSYDYCJPBZBSQLFCXXXNXKXWYWSDZYQOGGQMMYHCDZTTFJYYBGSTTTYBYKJDHKYXBELHTYPJQNFXFDYKZHQKZBYJTZBXHFDXKDASWTAWAJLDYJSFHBLDNNTNQJTJNCHXFJSRFWHZFMDRYJYJWZPDJKZYJYMPCYZNYNXFBYTFYFWYGDBNZZZDNYTXZEMMQBSQEHXFZMBMFLZZSRXYMJGSXWZJSPRYDJSJGXHJJGLJJYNZZJXHGXKYMLPYYYCXYTWQZSWHWLYRJLPXSLSXMFSWWKLCTNXNYNPSJSZHDZEPTXMYYWXYYSYWLXJQZQXZDCLEEELMCPJPCLWBXSQHFWWTFFJTNQJHJQDXHWLBYZNFJLALKYYJLDXHHYCSTYYWNRJYXYWTRMDRQHWQCMFJDYZMHMYYXJWMYZQZXTLMRSPWWCHAQBXYGZYPXYYRRCLMPYMGKSJSZYSRMYJSNXTPLNBAPPYPYLXYYZKYNLDZYJZCZNNLMZHHARQMPGWQTZMXXMLLHGDZXYHXKYXYCJMFFYYHJFSBSSQLXXNDYCANNMTCJCYPRRNYTYQNYYMBMSXNDLYLYSLJRLXYSXQMLLYZLZJJJKYZZCSFBZXXMSTBJGNXYZHLXNMCWSCYZYFZLXBRNNNYLBNRTGZQYSATSWRYHYJZMZDHZGZDWYBSSCSKXSYHYTXXGCQGXZZSHYXJSCRHMKKBXCZJYJYMKQHZJFNBHMQHYSNJNZYBKNQMCLGQHWLZNZSWXKHLJHYYBQLBFCDSXDLDSPFZPSKJYZWZXZDDXJSMMEGJSCSSMGCLXXKYYYLNYPWWWGYDKZJGGGZGGSYCKNJWNJPCXBJJTQTJWDSSPJXZXNZXUMELPXFSXTLLXCLJXJJLJZXCTPSWXLYDHLYQRWHSYCSQYYBYAYWJJJQFWQCQQCJQGXALDBZZYJGKGXPLTZYFXJLTPADKYQHPMATLCPDCKBMTXYBHKLENXDLEEGQDYMSAWHZMLJTWYGXLYQZLJEEYYBQQFFNLYXRDSCTGJGXYYNKLLYQKCCTLHJLQMKKZGCYYGLLLJDZGYDHZWXPYSJBZKDZGYZZHYWYFQYTYZSZYEZZLYMHJJHTSMQWYZLKYYWZCSRKQYTLTDXWCTYJKLWSQZWBDCQYNCJSRSZJLKCDCDTLZZZACQQZZDDXYPLXZBQJYLZLLLQDDZQJYJYJZYXNYYYNYJXKXDAZWYRDLJYYYRJLXLLDYXJCYWYWNQCCLDDNYYYNYCKCZHXXCCLGZQJGKWPPCQQJYSBZZXYJSQPXJPZBSBDSFNSFPZXHDWZTDWPPTFLZZBZDMYYPQJRSDZSQZSQXBDGCPZSWDWCSQZGMDHZXMWWFYBPDGPHTMJTHZSMMBGZMBZJCFZWFZBBZMQCFMBDMCJXLGPNJBBXGYHYYJGPTZGZMQBQTCGYXJXLWZKYDPDYMGCFTPFXYZTZXDZXTGKMTYBBCLBJASKYTSSQYYMSZXFJEWLXLLSZBQJJJAKLYLXLYCCTSXMCWFKKKBSXLLLLJYXTYLTJYYTDPJHNHNNKBYQNFQYYZBYYESSESSGDYHFHWTCJBSDZZTFDMXHCNJZYMQWSRYJDZJQPDQBBSTJGGFBKJBXTGQHNGWJXJGDLLTHZHHYYYYYYSXWTYYYCCBDBPYPZYCCZYJPZYWCBDLFWZCWJDXXHYHLHWZZXJTCZLCDPXUJCZZZLYXJJTXPHFXWPYWXZPTDZZBDZCYHJHMLXBQXSBYLRDTGJRRCTTTHYTCZWMXFYTWWZCWJWXJYWCSKYBZSCCTZQNHXNWXXKHKFHTSWOCCJYBCMPZZYKBNNZPBZHHZDLSYDDYTYFJPXYNGFXBYQXCBHXCPSXTYZDMKYSNXSXLHKMZXLYHDHKWHXXSSKQYHHCJYXGLHZXCSNHEKDTGZXQYPKDHEXTYKCNYMYYYPKQYYYKXZLTHJQTBYQHXBMYHSQCKWWYLLHCYYLNNEQXQWMCFBDCCMLJGGXDQKTLXKGNQCDGZJWYJJLYHHQTTTNWCHMXCXWHWSZJYDJCCDBQCDGDNYXZTHCQRXCBHZTQCBXWGQWYYBXHMBYMYQTYEXMQKYAQYRGYZSLFYKKQHYSSQYSHJGJCNXKZYCXSBXYXHYYLSTYCXQTHYSMGSCPMMGCCCCCMTZTASMGQZJHKLOSQYLSWTMXSYQKDZLJQQYPLSYCZTCQQPBBQJZCLPKHQZYYXXDTDDTSJCXFFLLCHQXMJLWCJCXTSPYCXNDTJSHJWXDQQJSKXYAMYLSJHMLALYKXCYYDMNMDQMXMCZNNCYBZKKYFLMCHCMLHXRCJJHSYLNMTJZGZGYWJXSRXCWJGJQHQZDQJDCJJZKJKGDZQGJJYJYLXZXXCDQHHHEYTMHLFSBDJSYYSHFYSTCZQLPBDRFRZTZYKYWHSZYQKWDQZRKMSYNBCRXQBJYFAZPZZEDZCJYWBCJWHYJBQSZYWRYSZPTDKZPFPBNZTKLQYHBBZPNPPTYZZYBQNYDCPJMMCYCQMCYFZZDCMNLFPBPLNGQJTBTTNJZPZBBZNJKLJQYLNBZQHKSJZNGGQSZZKYXSHPZSNBCGZKDDZQANZHJKDRTLZLSWJLJZLYWTJNDJZJHXYAYNCBGTZCSSQMNJPJYTYSWXZFKWJQTKHTZPLBHSNJZSYZBWZZZZLSYLSBJHDWWQPSLMMFBJDWAQYZTCJTBNNWZXQXCDSLQGDSDPDZHJTQQPSWLYYJZLGYXYZLCTCBJTKTYCZJTQKBSJLGMGZDMCSGPYNJZYQYYKNXRPWSZXMTNCSZZYXYBYHYZAXYWQCJTLLCKJJTJHGDXDXYQYZZBYWDLWQCGLZGJGQRQZCZSSBCRPCSKYDZNXJSQGXSSJMYDNSTZTPBDLTKZWXQWQTZEXNQCZGWEZKSSBYBRTSSSLCCGBPSZQSZLCCGLLLZXHZQTHCZMQGYZQZNMCOCSZJMMZSQPJYGQLJYJPPLDXRGZYXCCSXHSHGTZNLZWZKJCXTCFCJXLBMQBCZZWPQDNHXLJCTHYZLGYLNLSZZPCXDSCQQHJQKSXZPBAJYEMSMJTZDXLCJYRYYNWJBNGZZTMJXLTBSLYRZPYLSSCNXPHLLHYLLQQZQLXYMRSYCXZLMMCZLTZSDWTJJLLNZGGQXPFSKYGYGHBFZPDKMWGHCXMSGDXJMCJZDYCABXJDLNBCDQYGSKYDQTXDJJYXMSZQAZDZFSLQXYJSJZYLBTXXWXQQZBJZUFBBLYLWDSLJHXJYZJWTDJCZFQZQZZDZSXZZQLZCDZFJHYSPYMPQZMLPPLFFXJJNZZYLSJEYQZFPFZKSYWJJJHRDJZZXTXXGLGHYDXCSKYSWMMZCWYBAZBJKSHFHJCXMHFQHYXXYZFTSJYZFXYXPZLCHMZMBXHZZSXYFYMNCWDABAZLXKTCSHHXKXJJZJSTHYGXSXYYHHHJWXKZXSSBZZWHHHCWTZZZPJXSNXQQJGZYZYWLLCWXZFXXYXYHXMKYYSWSQMNLNAYCYSPMJKHWCQHYLAJJMZXHMMCNZHBHXCLXTJPLTXYJHDYYLTTXFSZHYXXSJBJYAYRSMXYPLCKDUYHLXRLNLLSTYZYYQYGYHHSCCSMZCTZQXKYQFPYYRPFFLKQUNTSZLLZMWWTCQQYZWTLLMLMPWMBZSSTZRBPDDTLQJJBXZCSRZQQYGWCSXFWZLXCCRSZDZMCYGGDZQSGTJSWLJMYMMZYHFBJDGYXCCPSHXNZCSBSJYJGJMPPWAFFYFNXHYZXZYLREMZGZCYZSSZDLLJCSQFNXZKPTXZGXJJGFMYYYSNBTYLBNLHPFZDCYFBMGQRRSSSZXYSGTZRNYDZZCDGPJAFJFZKNZBLCZSZPSGCYCJSZLMLRSZBZZLDLSLLYSXSQZQLYXZLSKKBRXBRBZCYCXZZZEEYFGKLZLYYHGZSGZLFJHGTGWKRAAJYZKZQTSSHJJXDCYZUYJLZYRZDQQHGJZXSSZBYKJPBFRTJXLLFQWJHYLQTYMBLPZDXTZYGBDHZZRBGXHWNJTJXLKSCFSMWLSDQYSJTXKZSCFWJLBXFTZLLJZLLQBLSQMQQCGCZFPBPHZCZJLPYYGGDTGWDCFCZQYYYQYSSCLXZSKLZZZGFFCQNWGLHQYZJJCZLQZZYJPJZZBPDCCMHJGXDQDGDLZQMFGPSYTSDYFWWDJZJYSXYYCZCYHZWPBYKXRYLYBHKJKSFXTZJMMCKHLLTNYYMSYXYZPYJQYCSYCWMTJJKQYRHLLQXPSGTLYYCLJSCPXJYZFNMLRGJJTYZBXYZMSJYJHHFZQMSYXRSZCWTLRTQZSSTKXGQKGSPTGCZNJSJCQCXHMXGGZTQYDJKZDLBZSXJLHYQGGGTHQSZPYHJHHGYYGKGGCWJZZYLCZLXQSFTGZSLLLMLJSKCTBLLZZSZMMNYTPZSXQHJCJYQXYZXZQZCPSHKZZYSXCDFGMWQRLLQXRFZTLYSTCTMJCXJJXHJNXTNRZTZFQYHQGLLGCXSZSJDJLJCYDSJTLNYXHSZXCGJZYQPYLFHDJSBPCCZHJJJQZJQDYBSSLLCMYTTMQTBHJQNNYGKYRQYQMZGCJKPDCGMYZHQLLSLLCLMHOLZGDYYFZSLJCQZLYLZQJESHNYLLJXGJXLYSYYYXNBZLJSSZCQQCJYLLZLTJYLLZLLBNYLGQCHXYYXOXCXQKYJXXXYKLXSXXYQXCYKQXQCSGYXXYQXYGYTQOHXHXPYXXXULCYEYCHZZCBWQBBWJQZSCSZSSLZYLKDESJZWMYMCYTSDSXXSCJPQQSQYLYYZYCMDJDZYWCBTJSYDJKCYDDJLBDJJSODZYSYXQQYXDHHGQQYQHDYXWGMMMAJDYBBBPPBCMUUPLJZSMTXERXJMHQNUTPJDCBSSMSSSTKJTSSMMTRCPLZSZMLQDSDMJMQPNQDXCFYNBFSDQXYXHYAYKQYDDLQYYYSSZBYDSLNTFQTZQPZMCHDHCZCWFDXTMYQSPHQYYXSRGJCWTJTZZQMGWJJTJHTQJBBHWZPXXHYQFXXQYWYYHYSCDYDHHQMNMTMWCPBSZPPZZGLMZFOLLCFWHMMSJZTTDHZZYFFYTZZGZYSKYJXQYJZQBHMBZZLYGHGFMSHPZFZSNCLPBQSNJXZSLXXFPMTYJYGBXLLDLXPZJYZJYHHZCYWHJYLSJEXFSZZYWXKZJLUYDTMLYMQJPWXYHXSKTQJEZRPXXZHHMHWQPWQLYJJQJJZSZCPHJLCHHNXJLQWZJHBMZYXBDHHYPZLHLHLGFWLCHYYTLHJXCJMSCPXSTKPNHQXSRTYXXTESYJCTLSSLSTDLLLWWYHDHRJZSFGXTSYCZYNYHTDHWJSLHTZDQDJZXXQHGYLTZPHCSQFCLNJTCLZPFSTPDYNYLGMJLLYCQHYSSHCHYLHQYQTMZYPBYWRFQYKQSYSLZDQJMPXYYSSRHZJNYWTQDFZBWWTWWRXCWHGYHXMKMYYYQMSMZHNGCEPMLQQMTCWCTMMPXJPJJHFXYYZSXZHTYBMSTSYJTTQQQYYLHYNPYQZLCYZHZWSMYLKFJXLWGXYPJYTYSYXYMZCKTTWLKSMZSYLMPWLZWXWQZSSAQSYXYRHSSNTSRAPXCPWCMGDXHXZDZYFJHGZTTSBJHGYZSZYSMYCLLLXBTYXHBBZJKSSDMALXHYCFYGMQYPJYCQXJLLLJGSLZGQLYCJCCZOTYXMTMTTLLWTGPXYMZMKLPSZZZXHKQYSXCTYJZYHXSHYXZKXLZWPSQPYHJWPJPWXQQYLXSDHMRSLZZYZWTTCYXYSZZSHBSCCSTPLWSSCJCHNLCGCHSSPHYLHFHHXJSXYLLNYLSZDHZXYLSXLWZYKCLDYAXZCMDDYSPJTQJZLNWQPSSSWCTSTSZLBLNXSMNYYMJQBQHRZWTYYDCHQLXKPZWBGQYBKFCMZWPZLLYYLSZYDWHXPSBCMLJBSCGBHXLQHYRLJXYSWXWXZSLDFHLSLYNJLZYFLYJYCDRJLFSYZFSLLCQYQFGJYHYXZLYLMSTDJCYHBZLLNWLXXYGYYHSMGDHXXHHLZZJZXCZZZCYQZFNGWPYLCPKPYYPMCLQKDGXZGGWQBDXZZKZFBXXLZXJTPJPTTBYTSZZDWSLCHZHSLTYXHQLHYXXXYYZYSWTXZKHLXZXZPYHGCHKCFSYHUTJRLXFJXPTZTWHPLYXFCRHXSHXKYXXYHZQDXQWULHYHMJTBFLKHTXCWHJFWJCFPQRYQXCYYYQYGRPYWSGSUNGWCHKZDXYFLXXHJJBYZWTSXXNCYJJYMSWZJQRMHXZWFQSYLZJZGBHYNSLBGTTCSYBYXXWXYHXYYXNSQYXMQYWRGYQLXBBZLJSYLPSYTJZYHYZAWLRORJMKSCZJXXXYXCHDYXRYXXJDTSQFXLYLTSFFYXLMTYJMJUYYYXLTZCSXQZQHZXLYYXZHDNBRXXXJCTYHLBRLMBRLLAXKYLLLJLYXXLYCRYLCJTGJCMTLZLLCYZZPZPCYAWHJJFYBDYYZSMPCKZDQYQPBPCJPDCYZMDPBCYYDYCNNPLMTMLRMFMMGWYZBSJGYGSMZQQQZTXMKQWGXLLPJGZBQCDJJJFPKJKCXBLJMSWMDTQJXLDLPPBXCWRCQFBFQJCZAHZGMYKPHYYHZYKNDKZMBPJYXPXYHLFPNYYGXJDBKXNXHJMZJXSTRSTLDXSKZYSYBZXJLXYSLBZYSLHXJPFXPQNBYLLJQKYGZMCYZZYMCCSLCLHZFWFWYXZMWSXTYNXJHPYYMCYSPMHYSMYDYSHQYZCHMJJMZCAAGCFJBBHPLYZYLXXSDJGXDHKXXTXXNBHRMLYJSLTXMRHNLXQJXYZLLYSWQGDLBJHDCGJYQYCMHWFMJYBMBYJYJWYMDPWHXQLDYGPDFXXBCGJSPCKRSSYZJMSLBZZJFLJJJLGXZGYXYXLSZQYXBEXYXHGCXBPLDYHWETTWWCJMBTXCHXYQXLLXFLYXLLJLSSFWDPZSMYJCLMWYTCZPCHQEKCQBWLCQYDPLQPPQZQFJQDJHYMMCXTXDRMJWRHXCJZYLQXDYYNHYYHRSLSRSYWWZJYMTLTLLGTQCJZYABTCKZCJYCCQLJZQXALMZYHYWLWDXZXQDLLQSHGPJFJLJHJABCQZDJGTKHSSTCYJLPSWZLXZXRWGLDLZRLZXTGSLLLLZLYXXWGDZYGBDPHZPBRLWSXQBPFDWOFMWHLYPCBJCCLDMBZPBZZLCYQXLDOMZBLZWPDWYYGDSTTHCSQSCCRSSSYSLFYBFNTYJSZDFNDPDHDZZMBBLSLCMYFFGTJJQWFTMTPJWFNLBZCMMJTGBDZLQLPYFHYYMJYLSDCHDZJWJCCTLJCLDTLJJCPDDSQDSSZYBNDBJLGGJZXSXNLYCYBJXQYCBYLZCFZPPGKCXZDZFZTJJFJSJXZBNZYJQTTYJYHTYCZHYMDJXTTMPXSPLZCDWSLSHXYPZGTFMLCJTYCBPMGDKWYCYZCDSZZYHFLYCTYGWHKJYYLSJCXGYWJCBLLCSNDDBTZBSCLYZCZZSSQDLLMQYYHFSLQLLXFTYHABXGWNYWYYPLLSDLDLLBJCYXJZMLHLJDXYYQYTDLLLBUGBFDFBBQJZZMDPJHGCLGMJJPGAEHHBWCQXAXHHHZCHXYPHJAXHLPHJPGPZJQCQZGJJZZUZDMQYYBZZPHYHYBWHAZYJHYKFGDPFQSDLZMLJXKXGALXZDAGLMDGXMWZQYXXDXXPFDMMSSYMPFMDMMKXKSYZYSHDZKXSYSMMZZZMSYDNZZCZXFPLSTMZDNMXCKJMZTYYMZMZZMSXHHDCZJEMXXKLJSTLWLSQLYJZLLZJSSDPPMHNLZJCZYHMXXHGZCJMDHXTKGRMXFWMCGMWKDTKSXQMMMFZZYDKMSCLCMPCGMHSPXQPZDSSLCXKYXTWLWJYAHZJGZQMCSNXYYMMPMLKJXMHLMLQMXCTKZMJQYSZJSYSZHSYJZJCDAJZYBSDQJZGWZQQXFKDMSDJLFWEHKZQKJPEYPZYSZCDWYJFFMZZYLTTDZZEFMZLBNPPLPLPEPSZALLTYLKCKQZKGENQLWAGYXYDPXLHSXQQWQCQXQCLHYXXMLYCCWLYMQYSKGCHLCJNSZKPYZKCQZQLJPDMDZHLASXLBYDWQLWDNBQCRYDDZTJYBKBWSZDXDTNPJDTCTQDFXQQMGNXECLTTBKPWSLCTYQLPWYZZKLPYGZCQQPLLKCCYLPQMZCZQCLJSLQZDJXLDDHPZQDLJJXZQDXYZQKZLJCYQDYJPPYPQYKJYRMPCBYMCXKLLZLLFQPYLLLMBSGLCYSSLRSYSQTMXYXZQZFDZUYSYZTFFMZZSMZQHZSSCCMLYXWTPZGXZJGZGSJSGKDDHTQGGZLLBJDZLCBCHYXYZHZFYWXYZYMSDBZZYJGTSMTFXQYXQSTDGSLNXDLRYZZLRYYLXQHTXSRTZNGZXBNQQZFMYKMZJBZYMKBPNLYZPBLMCNQYZZZSJZHJCTZKHYZZJRDYZHNPXGLFZTLKGJTCTSSYLLGZRZBBQZZKLPKLCZYSSUYXBJFPNJZZXCDWXZYJXZZDJJKGGRSRJKMSMZJLSJYWQSKYHQJSXPJZZZLSNSHRNYPZTWCHKLPSRZLZXYJQXQKYSJYCZTLQZYBBYBWZPQDWWYZCYTJCJXCKCWDKKZXSGKDZXWWYYJQYYTCYTDLLXWKCZKKLCCLZCQQDZLQLCSFQCHQHSFSMQZZLNBJJZBSJHTSZDYSJQJPDLZCDCWJKJZZLPYCGMZWDJJBSJQZSYZYHHXJPBJYDSSXDZNCGLQMBTSFSBPDZDLZNFGFJGFSMPXJQLMBLGQCYYXBQKDJJQYRFKZTJDHCZKLBSDZCFJTPLLJGXHYXZCSSZZXSTJYGKGCKGYOQXJPLZPBPGTGYJZGHZQZZLBJLSQFZGKQQJZGYCZBZQTLDXRJXBSXXPZXHYZYCLWDXJJHXMFDZPFZHQHQMQGKSLYHTYCGFRZGNQXCLPDLBZCSCZQLLJBLHBZCYPZZPPDYMZZSGYHCKCPZJGSLJLNSCDSLDLXBMSTLDDFJMKDJDHZLZXLSZQPQPGJLLYBDSZGQLBZLSLKYYHZTTNTJYQTZZPSZQZTLLJTYYLLQLLQYZQLBDZLSLYYZYMDFSZSNHLXZNCZQZPBWSKRFBSYZMTHBLGJPMCZZLSTLXSHTCSYZLZBLFEQHLXFLCJLYLJQCBZLZJHHSSTBRMHXZHJZCLXFNBGXGTQJCZTMSFZKJMSSNXLJKBHSJXNTNLZDNTLMSJXGZJYJCZXYJYJWRWWQNZTNFJSZPZSHZJFYRDJSFSZJZBJFZQZZHZLXFYSBZQLZSGYFTZDCSZXZJBQMSZKJRHYJZCKMJKHCHGTXKXQGLXPXFXTRTYLXJXHDTSJXHJZJXZWZLCQSBTXWXGXTXXHXFTSDKFJHZYJFJXRZSDLLLTQSQQZQWZXSYQTWGWBZCGZLLYZBCLMQQTZHZXZXLJFRMYZFLXYSQXXJKXRMQDZDMMYYBSQBHGZMWFWXGMXLZPYYTGZYCCDXYZXYWGSYJYZNBHPZJSQSYXSXRTFYZGRHZTXSZZTHCBFCLSYXZLZQMZLMPLMXZJXSFLBYZMYQHXJSXRXSQZZZSSLYFRCZJRCRXHHZXQYDYHXSJJHZCXZBTYNSYSXJBQLPXZQPYMLXZKYXLXCJLCYSXXZZLXDLLLJJYHZXGYJWKJRWYHCPSGNRZLFZWFZZNSXGXFLZSXZZZBFCSYJDBRJKRDHHGXJLJJTGXJXXSTJTJXLYXQFCSGSWMSBCTLQZZWLZZKXJMLTMJYHSDDBXGZHDLBMYJFRZFSGCLYJBPMLYSMSXLSZJQQHJZFXGFQFQBPXZGYYQXGZTCQWYLTLGWSGWHRLFSFGZJMGMGBGTJFSYZZGZYZAFLSSPMLPFLCWBJZCLJJMZLPJJLYMQDMYYYFBGYGYZMLYZDXQYXRQQQHSYYYQXYLJTYXFSFSLLGNQCYHYCWFHCCCFXPYLYPLLZYXXXXXKQHHXSHJZCFZSCZJXCPZWHHHHHAPYLQALPQAFYHXDYLUKMZQGGGDDESRNNZLTZGCHYPPYSQJJHCLLJTOLNJPZLJLHYMHEYDYDSQYCDDHGZUNDZCLZYZLLZNTNYZGSLHSLPJJBDGWXPCDUTJCKLKCLWKLLCASSTKZZDNQNTTLYYZSSYSSZZRYLJQKCQDHHCRXRZYDGRGCWCGZQFFFPPJFZYNAKRGYWYQPQXXFKJTSZZXSWZDDFBBXTBGTZKZNPZZPZXZPJSZBMQHKCYXYLDKLJNYPKYGHGDZJXXEAHPNZKZTZCMXCXMMJXNKSZQNMNLWBWWXJKYHCPSTMCSQTZJYXTPCTPDTNNPGLLLZSJLSPBLPLQHDTNJNLYYRSZFFJFQWDPHZDWMRZCCLODAXNSSNYZRESTYJWJYJDBCFXNMWTTBYLWSTSZGYBLJPXGLBOCLHPCBJLTMXZLJYLZXCLTPNCLCKXTPZJSWCYXSFYSZDKNTLBYJCYJLLSTGQCBXRYZXBXKLYLHZLQZLNZCXWJZLJZJNCJHXMNZZGJZZXTZJXYCYYCXXJYYXJJXSSSJSTSSTTPPGQTCSXWZDCSYFPTFBFHFBBLZJCLZZDBXGCXLQPXKFZFLSYLTUWBMQJHSZBMDDBCYSCCLDXYCDDQLYJJWMQLLCSGLJJSYFPYYCCYLTJANTJJPWYCMMGQYYSXDXQMZHSZXPFTWWZQSWQRFKJLZJQQYFBRXJHHFWJJZYQAZMYFRHCYYBYQWLPEXCCZSTYRLTTDMQLYKMBBGMYYJPRKZNPBSXYXBHYZDJDNGHPMFSGMWFZMFQMMBCMZZCJJLCNUXYQLMLRYGQZCYXZLWJGCJCGGMCJNFYZZJHYCPRRCMTZQZXHFQGTJXCCJEAQCRJYHPLQLSZDJRBCQHQDYRHYLYXJSYMHZYDWLDFRYHBPYDTSSCNWBXGLPZMLZZTQSSCPJMXXYCSJYTYCGHYCJWYRXXLFEMWJNMKLLSWTXHYYYNCMMCWJDQDJZGLLJWJRKHPZGGFLCCSCZMCBLTBHBQJXQDSPDJZZGHGLFQYWBZYZJLTSTDHQHCTCBCHFLQMPWDSHYYTQWCNZZJTLBYMBPDYYYXSQKXWYYFLXXNCWCXYPMAELYKKJMZZZBRXYYQJFLJPFHHHYTZZXSGQQMHSPGDZQWBWPJHZJDYSCQWZKTXXSQLZYYMYSDZGRXCKKUJLWPYSYSCSYZLRMLQSYLJXBCXTLWDQZPCYCYKPPPNSXFYZJJRCEMHSZMSXLXGLRWGCSTLRSXBZGBZGZTCPLUJLSLYLYMTXMTZPALZXPXJTJWTCYYZLBLXBZLQMYLXPGHDSLSSDMXMBDZZSXWHAMLCZCPJMCNHJYSNSYGCHSKQMZZQDLLKABLWJXSFMOCDXJRRLYQZKJMYBYQLYHETFJZFRFKSRYXFJTWDSXXSYSQJYSLYXWJHSNLXYYXHBHAWHHJZXWMYLJCSSLKYDZTXBZSYFDXGXZJKHSXXYBSSXDPYNZWRPTQZCZENYGCXQFJYKJBZMLJCMQQXUOXSLYXXLYLLJDZBTYMHPFSTTQQWLHOKYBLZZALZXQLHZWRRQHLSTMYPYXJJXMQSJFNBXYXYJXXYQYLTHYLQYFMLKLJTMLLHSZWKZHLJMLHLJKLJSTLQXYLMBHHLNLZXQJHXCFXXLHYHJJGBYZZKBXSCQDJQDSUJZYYHZHHMGSXCSYMXFEBCQWWRBPYYJQTYZCYQYQQZYHMWFFHGZFRJFCDPXNTQYZPDYKHJLFRZXPPXZDBBGZQSTLGDGYLCQMLCHHMFYWLZYXKJLYPQHSYWMQQGQZMLZJNSQXJQSYJYCBEHSXFSZPXZWFLLBCYYJDYTDTHWZSFJMQQYJLMQXXLLDTTKHHYBFPWTYYSQQWNQWLGWDEBZWCMYGCULKJXTMXMYJSXHYBRWFYMWFRXYQMXYSZTZZTFYKMLDHQDXWYYNLCRYJBLPSXCXYWLSPRRJWXHQYPHTYDNXHHMMYWYTZCSQMTSSCCDALWZTCPQPYJLLQZYJSWXMZZMMYLMXCLMXCZMXMZSQTZPPQQBLPGXQZHFLJJHYTJSRXWZXSCCDLXTYJDCQJXSLQYCLZXLZZXMXQRJMHRHZJBHMFLJLMLCLQNLDXZLLLPYPSYJYSXCQQDCMQJZZXHNPNXZMEKMXHYKYQLXSXTXJYYHWDCWDZHQYYBGYBCYSCFGPSJNZDYZZJZXRZRQJJYMCANYRJTLDPPYZBSTJKXXZYPFDWFGZZRPYMTNGXZQBYXNBUFNQKRJQZMJEGRZGYCLKXZDSKKNSXKCLJSPJYYZLQQJYBZSSQLLLKJXTBKTYLCCDDBLSPPFYLGYDTZJYQGGKQTTFZXBDKTYYHYBBFYTYYBCLPDYTGDHRYRNJSPTCSNYJQHKLLLZSLYDXXWBCJQSPXBPJZJCJDZFFXXBRMLAZHCSNDLBJDSZBLPRZTSWSBXBCLLXXLZDJZSJPYLYXXYFTFFFBHJJXGBYXJPMMMPSSJZJMTLYZJXSWXTYLEDQPJMYGQZJGDJLQJWJQLLSJGJGYGMSCLJJXDTYGJQJQJCJZCJGDZZSXQGSJGGCXHQXSNQLZZBXHSGZXCXYLJXYXYYDFQQJHJFXDHCTXJYRXYSQTJXYEFYYSSYYJXNCYZXFXMSYSZXYYSCHSHXZZZGZZZGFJDLTYLNPZGYJYZYYQZPBXQBDZTZCZYXXYHHSQXSHDHGQHJHGYWSZTMZMLHYXGEBTYLZKQWYTJZRCLEKYSTDBCYKQQSAYXCJXWWGSBHJYZYDHCSJKQCXSWXFLTYNYZPZCCZJQTZWJQDZZZQZLJJXLSBHPYXXPSXSHHEZTXFPTLQYZZXHYTXNCFZYYHXGNXMYWXTZSJPTHHGYMXMXQZXTSBCZYJYXXTYYZYPCQLMMSZMJZZLLZXGXZAAJZYXJMZXWDXZSXZDZXLEYJJZQBHZWZZZQTZPSXZTDSXJJJZNYAZPHXYYSRNQDTHZHYYKYJHDZXZLSWCLYBZYECWCYCRYLCXNHZYDZYDYJDFRJJHTRSQTXYXJRJHOJYNXELXSFSFJZGHPZSXZSZDZCQZBYYKLSGSJHCZSHDGQGXYZGXCHXZJWYQWGYHKSSEQZZNDZFKWYSSTCLZSTSYMCDHJXXYWEYXCZAYDMPXMDSXYBSQMJMZJMTZQLPJYQZCGQHXJHHLXXHLHDLDJQCLDWBSXFZZYYSCHTYTYYBHECXHYKGJPXHHYZJFXHWHBDZFYZBCAPNPGNYDMSXHMMMMAMYNBYJTMPXYYMCTHJBZYFCGTYHWPHFTWZZEZSBZEGPFMTSKFTYCMHFLLHGPZJXZJGZJYXZSBBQSCZZLZCCSTPGXMJSFTCCZJZDJXCYBZLFCJSYZFGSZLYBCWZZBYZDZYPSWYJZXZBDSYUXLZZBZFYGCZXBZHZFTPBGZGEJBSTGKDMFHYZZJHZLLZZGJQZLSFDJSSCBZGPDLFZFZSZYZYZSYGCXSNXXCHCZXTZZLJFZGQSQYXZJQDCCZTQCDXZJYQJQCHXZTDLGSCXZSYQJQTZWLQDQZTQCHQQJZYEZZZPBWKDJFCJPZTYPQYQTTYNLMBDKTJZPQZQZZFPZSBNJLGYJDXJDZZKZGQKXDLPZJTCJDQBXDJQJSTCKNXBXZMSLYJCQMTJQWWCJQNJNLLLHJCWQTBZQYDZCZPZZDZYDDCYZZZCCJTTJFZDPRRTZTJDCQTQZDTJNPLZBCLLCTZSXKJZQZPZLBZRBTJDCXFCZDBCCJJLTQQPLDCGZDBBZJCQDCJWYNLLZYZCCDWLLXWZLXRXNTQQCZXKQLSGDFQTDDGLRLAJJTKUYMKQLLTZYTDYYCZGJWYXDXFRSKSTQTENQMRKQZHHQKDLDAZFKYPBGGPZREBZZYKZZSPEGJXGYKQZZZSLYSYYYZWFQZYLZZLZHWCHKYPQGNPGBLPLRRJYXCCSYYHSFZFYBZYYTGZXYLXCZWXXZJZBLFFLGSKHYJZEYJHLPLLLLCZGXDRZELRHGKLZZYHZLYQSZZJZQLJZFLNBHGWLCZCFJYSPYXZLZLXGCCPZBLLCYBBBBUBBCBPCRNNZCZYRBFSRLDCGQYYQXYGMQZWTZYTYJXYFWTEHZZJYWLCCNTZYJJZDEDPZDZTSYQJHDYMBJNYJZLXTSSTPHNDJXXBYXQTZQDDTJTDYYTGWSCSZQFLSHLGLBCZPHDLYZJYCKWTYTYLBNYTSDSYCCTYSZYYEBHEXHQDTWNYGYCLXTSZYSTQMYGZAZCCSZZDSLZCLZRQXYYELJSBYMXSXZTEMBBLLYYLLYTDQYSHYMRQWKFKBFXNXSBYCHXBWJYHTQBPBSBWDZYLKGZSKYHXQZJXHXJXGNLJKZLYYCDXLFYFGHLJGJYBXQLYBXQPQGZTZPLNCYPXDJYQYDYMRBESJYYHKXXSTMXRCZZYWXYQYBMCLLYZHQYZWQXDBXBZWZMSLPDMYSKFMZKLZCYQYCZLQXFZZYDQZPZYGYJYZMZXDZFYFYTTQTZHGSPCZMLCCYTZXJCYTJMKSLPZHYSNZLLYTPZCTZZCKTXDHXXTQCYFKSMQCCYYAZHTJPCYLZLYJBJXTPNYLJYYNRXSYLMMNXJSMYBCSYSYLZYLXJJQYLDZLPQBFZZBLFNDXQKCZFYWHGQMRDSXYCYTXNQQJZYYPFZXDYZFPRXEJDGYQBXRCNFYYQPGHYJDYZXGRHTKYLNWDZNTSMPKLBTHBPYSZBZTJZSZZJTYYXZPHSSZZBZCZPTQFZMYFLYPYBBJQXZMXXDJMTSYSKKBJZXHJCKLPSMKYJZCXTMLJYXRZZQSLXXQPYZXMKYXXXJCLJPRMYYGADYSKQLSNDHYZKQXZYZTCGHZTLMLWZYBWSYCTBHJHJFCWZTXWYTKZLXQSHLYJZJXTMPLPYCGLTBZZTLZJCYJGDTCLKLPLLQPJMZPAPXYZLKKTKDZCZZBNZDYDYQZJYJGMCTXLTGXSZLMLHBGLKFWNWZHDXUHLFMKYSLGXDTWWFRJEJZTZHYDXYKSHWFZCQSHKTMQQHTZHYMJDJSKHXZJZBZZXYMPAGQMSTPXLSKLZYNWRTSQLSZBPSPSGZWYHTLKSSSWHZZLYYTNXJGMJSZSUFWNLSOZTXGXLSAMMLBWLDSZYLAKQCQCTMYCFJBSLXCLZZCLXXKSBZQCLHJPSQPLSXXCKSLNHPSFQQYTXYJZLQLDXZQJZDYYDJNZPTUZDSKJFSLJHYLZSQZLBTXYDGTQFDBYAZXDZHZJNHHQBYKNXJJQCZMLLJZKSPLDYCLBBLXKLELXJLBQYCXJXGCNLCQPLZLZYJTZLJGYZDZPLTQCSXFDMNYCXGBTJDCZNBGBQYQJWGKFHTNPYQZQGBKPBBYZMTJDYTBLSQMPSXTBNPDXKLEMYYCJYNZCTLDYKZZXDDXHQSHDGMZSJYCCTAYRZLPYLTLKXSLZCGGEXCLFXLKJRTLQJAQZNCMBYDKKCXGLCZJZXJHPTDJJMZQYKQSECQZDSHHADMLZFMMZBGNTJNNLGBYJBRBTMLBYJDZXLCJLPLDLPCQDHLXZLYCBLCXZZJADJLNZMMSSSMYBHBSQKBHRSXXJMXSDZNZPXLGBRHWGGFCXGMSKLLTSJYYCQLTSKYWYYHYWXBXQYWPYWYKQLSQPTNTKHQCWDQKTWPXXHCPTHTWUMSSYHBWCRWXHJMKMZNGWTMLKFGHKJYLSYYCXWHYECLQHKQHTTQKHFZLDXQWYZYYDESBPKYRZPJFYYZJCEQDZZDLATZBBFJLLCXDLMJSSXEGYGSJQXCWBXSSZPDYZCXDNYXPPZYDLYJCZPLTXLSXYZYRXCYYYDYLWWNZSAHJSYQYHGYWWAXTJZDAXYSRLTDPSSYYFNEJDXYZHLXLLLZQZSJNYQYQQXYJGHZGZCYJCHZLYCDSHWSHJZYJXCLLNXZJJYYXNFXMWFPYLCYLLABWDDHWDXJMCXZTZPMLQZHSFHZYNZTLLDYWLSLXHYMMYLMBWWKYXYADTXYLLDJPYBPWUXJMWMLLSAFDLLYFLBHHHBQQLTZJCQJLDJTFFKMMMBYTHYGDCQRDDWRQJXNBYSNWZDBYYTBJHPYBYTTJXAAHGQDQTMYSTQXKBTZPKJLZRBEQQSSMJJBDJOTGTBXPGBKTLHQXJJJCTHXQDWJLWRFWQGWSHCKRYSWGFTGYGBXSDWDWRFHWYTJJXXXJYZYSLPYYYPAYXHYDQKXSHXYXGSKQHYWFDDDPPLCJLQQEEWXKSYYKDYPLTJTHKJLTCYYHHJTTPLTZZCDLTHQKZXQYSTEEYWYYZYXXYYSTTJKLLPZMCYHQGXYHSRMBXPLLNQYDQHXSXXWGDQBSHYLLPJJJTHYJKYPPTHYYKTYEZYENMDSHLCRPQFDGFXZPSFTLJXXJBSWYYSKSFLXLPPLBBBLBSFXFYZBSJSSYLPBBFFFFSSCJDSTZSXZRYYSYFFSYZYZBJTBCTSBSDHRTJJBYTCXYJEYLXCBNEBJDSYXYKGSJZBXBYTFZWGENYHHTHZHHXFWGCSTBGXKLSXYWMTMBYXJSTZSCDYQRCYTWXZFHMYMCXLZNSDJTTTXRYCFYJSBSDYERXJLJXBBDEYNJGHXGCKGSCYMBLXJMSZNSKGXFBNBPTHFJAAFXYXFPXMYPQDTZCXZZPXRSYWZDLYBBKTYQPQJPZYPZJZNJPZJLZZFYSBTTSLMPTZRTDXQSJEHBZYLZDHLJSQMLHTXTJECXSLZZSPKTLZKQQYFSYGYWPCPQFHQHYTQXZKRSGTTSQCZLPTXCDYYZXSQZSLXLZMYCPCQBZYXHBSXLZDLTCDXTYLZJYYZPZYZLTXJSJXHLPMYTXCQRBLZSSFJZZTNJYTXMYJHLHPPLCYXQJQQKZZSCPZKSWALQSBLCCZJSXGWWWYGYKTJBBZTDKHXHKGTGPBKQYSLPXPJCKBMLLXDZSTBKLGGQKQLSBKKTFXRMDKBFTPZFRTBBRFERQGXYJPZSSTLBZTPSZQZSJDHLJQLZBPMSMMSXLQQNHKNBLRDDNXXDHDDJCYYGYLXGZLXSYGMQQGKHBPMXYXLYTQWLWGCPBMQXCYZYDRJBHTDJYHQSHTMJSBYPLWHLZFFNYPMHXXHPLTBQPFBJWQDBYGPNZTPFZJGSDDTQSHZEAWZZYLLTYYBWJKXXGHLFKXDJTMSZSQYNZGGSWQSPHTLSSKMCLZXYSZQZXNCJDQGZDLFNYKLJCJLLZLMZZNHYDSSHTHZZLZZBBHQZWWYCRZHLYQQJBEYFXXXWHSRXWQHWPSLMSSKZTTYGYQQWRSLALHMJTQJSMXQBJJZJXZYZKXBYQXBJXSHZTSFJLXMXZXFGHKZSZGGYLCLSARJYHSLLLMZXELGLXYDJYTLFBHBPNLYZFBBHPTGJKWETZHKJJXZXXGLLJLSTGSHJJYQLQZFKCGNNDJSSZFDBCTWWSEQFHQJBSAQTGYPQLBXBMMYWXGSLZHGLZGQYFLZBYFZJFRYSFMBYZHQGFWZSYFYJJPHZBYYZFFWODGRLMFTWLBZGYCQXCDJYGZYYYYTYTYDWEGAZYHXJLZYYHLRMGRXXZCLHNELJJTJTPWJYBJJBXJJTJTEEKHWSLJPLPSFYZPQQBDLQJJTYYQLYZKDKSQJYYQZLDQTGJQYZJSUCMRYQTHTEJMFCTYHYPKMHYZWJDQFHYYXWSHCTXRLJHQXHCCYYYJLTKTTYTMXGTCJTZAYYOCZLYLBSZYWJYTSJYHBYSHFJLYGJXXTMZYYLTXXYPZLXYJZYZYYPNHMYMDYYLBLHLSYYQQLLNJJYMSOYQBZGDLYXYLCQYXTSZEGXHZGLHWBLJHEYXTWQMAKBPQCGYSHHEGQCMWYYWLJYJHYYZLLJJYLHZYHMGSLJLJXCJJYCLYCJPCPZJZJMMYLCQLNQLJQJSXYJMLSZLJQLYCMMHCFMMFPQQMFYLQMCFFQMMMMHMZNFHHJGTTHHKHSLNCHHYQDXTMMQDCYZYXYQMYQYLTDCYYYZAZZCYMZYDLZFFFMMYCQZWZZMABTBYZTDMNZZGGDFTYPCGQYTTSSFFWFDTZQSSYSTWXJHXYTSXXYLBYQHWWKXHZXWZNNZZJZJJQJCCCHYYXBZXZCYZTLLCQXYNJYCYYCYNZZQYYYEWYCZDCJYCCHYJLBTZYYCQWMPWPYMLGKDLDLGKQQBGYCHJXY".charAt(n-19968))}return function(e,t){for(var i,n=t.ignoreMulti,r=t.splitChar,o=[""],a=0,s=0,l=e.length;s<l;s++){var u=e[s],c=u.length;if(1==c||14<a||n){var h=u.substring(0,1);for(i=0;i<o.length;i++)o[i]+=h}else{var p=o.slice(0);for(o=[],a++,i=0;i<c;i++){for(var d=p.slice(0),g=0;g<d.length;g++)d[g]+=u.charAt(i);o=o.concat(d)}}}return o.join(r||"").toLowerCase()}(r,t)}})},function(e,t){function i(e,t){return e<t}BI.Heap=function(e,t){this._items=e||[],this._size=this._items.length,this._comparator=t||i,this._heapify()},BI.Heap.prototype={constructor:BI.Heap,empty:function(){return 0===this._size},pop:function(){if(0!==this._size){var e=this._items[0],t=this._items.pop();return this._size--,0<this._size&&(this._items[0]=t,this._sinkDown(0)),e}},push:function(e){this._items[this._size++]=e,this._bubbleUp(this._size-1)},size:function(){return this._size},peek:function(){if(0!==this._size)return this._items[0]},_heapify:function(){for(var e=Math.floor((this._size+1)/2);0<=e;e--)this._sinkDown(e)},_bubbleUp:function(e){for(var t=this._items[e];0<e;){var i=Math.floor((e+1)/2)-1,n=this._items[i];if(this._comparator(n,t))return;this._items[i]=t,this._items[e]=n,e=i}},_sinkDown:function(e){for(var t=this._items[e];;){var i=2*(e+1)-1,n=2*(e+1),r=-1;if(i<this._size){var o=this._items[i];this._comparator(o,t)&&(r=i)}if(n<this._size){var a=this._items[n];this._comparator(a,t)&&(-1!==r&&!this._comparator(a,this._items[r])||(r=n))}if(-1===r)return;this._items[e]=this._items[r],this._items[r]=t,e=r}}}},function(e,t){BI.LinkHashMap=function(){this.array=[],this.map={}},BI.LinkHashMap.prototype={constructor:BI.LinkHashMap,has:function(e){return e in this.map},add:function(e,t){void 0!==e&&(e in this.map||this.array.push(e),this.map[e]=t)},remove:function(e){if(e in this.map){delete this.map[e];for(var t=0;t<this.array.length;t++)if(this.array[t]==e){this.array.splice(t,1);break}}},size:function(){return this.array.length},each:function(e,t){if(t=t||window,null!=(e=e||null)&&"function"==typeof e)for(var i=0;i<this.array.length;i++){var n=this.array[i],r=this.map[n];if(0==e.call(t,n,r,i,this.array,this.map))break}},get:function(e){return this.map[e]},toArray:function(){var i=[];return this.each(function(e,t){i.push(t)}),i}}},function(e,t){!function(){BI.LRU=function(e){this.size=0,this.limit=e,this.head=this.tail=undefined,this._keymap={}};var e=BI.LRU.prototype;e.put=function(e,t){var i;this.size===this.limit&&(i=this.shift());var n=this.get(e,!0);return n||(n={key:e},this._keymap[e]=n,this.tail?(this.tail.newer=n).older=this.tail:this.head=n,this.tail=n,this.size++),n.value=t,i},e.shift=function(){var e=this.head;return e&&(this.head=this.head.newer,this.head.older=undefined,e.newer=e.older=undefined,this._keymap[e.key]=undefined,this.size--),e},e.get=function(e,t){var i=this._keymap[e];if(i!==undefined)return i===this.tail||(i.newer&&(i===this.head&&(this.head=i.newer),i.newer.older=i.older),i.older&&(i.older.newer=i.newer),i.newer=undefined,i.older=this.tail,this.tail&&(this.tail.newer=i),this.tail=i),t?i:i.value},e.has=function(e){return null!=this._keymap[e]}}()},function(e,t){function n(e){return Math.floor(e/2)}var i;i=_global.Int32Array||function(e){for(var t=[],i=e-1;0<=i;--i)t[i]=0;return t},BI.PrefixIntervalTree=function(e){var t;for(this._size=e.length,this._half=function(e){for(var t=1;t<e;)t*=2;return t}(this._size),this._heap=new i(2*this._half),t=0;t<this._size;++t)this._heap[this._half+t]=e[t];for(t=this._half-1;0<t;--t)this._heap[t]=this._heap[2*t]+this._heap[2*t+1]},BI.PrefixIntervalTree.prototype={constructor:BI.PrefixIntervalTree,set:function(e,t){var i=this._half+e;for(this._heap[i]=t,i=n(i);0!==i;i=n(i))this._heap[i]=this._heap[2*i]+this._heap[2*i+1]},get:function(e){var t=this._half+e;return this._heap[t]},getSize:function(){return this._size},sumUntil:function(e){if(0===e)return 0;for(var t=this._half+e-1,i=this._heap[t];1!==t;t=n(t))t%2==1&&(i+=this._heap[t-1]);return i},sumTo:function(e){return this.sumUntil(e+1)},sum:function(e,t){return this.sumUntil(t)-this.sumUntil(e)},greatestLowerBound:function(e){if(e<0)return-1;var t=1;if(this._heap[t]<=e)return this._size;for(;t<this._half;){var i=this._heap[2*t];e<i?t*=2:(t=2*t+1,e-=i)}return t-this._half},greatestStrictLowerBound:function(e){if(e<=0)return-1;var t=1;if(this._heap[t]<e)return this._size;for(;t<this._half;){var i=this._heap[2*t];e<=i?t*=2:(t=2*t+1,e-=i)}return t-this._half},leastUpperBound:function(e){return this.greatestStrictLowerBound(e)+1},leastStrictUpperBound:function(e){return this.greatestLowerBound(e)+1}},BI.PrefixIntervalTree.uniform=function(e,t){for(var i=[],n=e-1;0<=n;--n)i[n]=t;return new BI.PrefixIntervalTree(i)},BI.PrefixIntervalTree.empty=function(e){return BI.PrefixIntervalTree.uniform(e,0)}},function(e,t){BI.Queue=function(e){this.capacity=e,this.array=[]},BI.Queue.prototype={constructor:BI.Queue,contains:function(e){return BI.contains(this.array,e)},indexOf:function(e){return BI.contains(this.array,e)},getElementByIndex:function(e){return this.array[e]},push:function(e){this.array.push(e),this.capacity&&this.array.length>this.capacity&&this.array.shift()},pop:function(){this.array.pop()},shift:function(){this.array.shift()},unshift:function(e){this.array.unshift(e),this.capacity&&this.array.length>this.capacity&&this.array.pop()},remove:function(e){BI.remove(this.array,e)},splice:function(){this.array.splice.apply(this.array,arguments)},slice:function(){this.array.slice.apply(this.array,arguments)},size:function(){return this.array.length},each:function(e,t){if(t=t||window,null!=(e=e||null)&&"function"==typeof e)for(var i=0;i<this.array.length&&0!=e.call(t,i,this.array[i],this.array);i++);},toArray:function(){return this.array},fromArray:function(e){var i=this;BI.each(e,function(e,t){i.push(t)})},clear:function(){this.array.length=0}}},function(e,t){!function(){function p(e,t,i,n){this.height=e,this.width=t,this.x=i,this.y=n,this._indexMap={},this._indices=[]}p.prototype={constructor:p,addCellIndex:function(e){this._indexMap[e]||(this._indexMap[e]=!0,this._indices.push(e))},getCellIndices:function(){return this._indices}};BI.SectionManager=function(e){this._sectionSize=e||100,this._cellMetadata=[],this._sections={}},BI.SectionManager.prototype={constructor:BI.SectionManager,getCellIndices:function(e,t,i,n){var r={};return BI.each(this.getSections(e,t,i,n),function(e,t){BI.each(t.getCellIndices(),function(e,t){r[t]=t})}),BI.map(BI.keys(r),function(e,t){return r[t]})},getCellMetadata:function(e){return this._cellMetadata[e]},getSections:function(e,t,i,n){for(var r=Math.floor(i/this._sectionSize),o=Math.floor((i+t-1)/this._sectionSize),a=Math.floor(n/this._sectionSize),s=Math.floor((n+e-1)/this._sectionSize),l=[],u=r;u<=o;u++)for(var c=a;c<=s;c++){var h=u+"."+c;this._sections[h]||(this._sections[h]=new p(this._sectionSize,this._sectionSize,u*this._sectionSize,c*this._sectionSize)),l.push(this._sections[h])}return l},getTotalSectionCount:function(){return BI.size(this._sections)},registerCell:function(e,i){this._cellMetadata[i]=e,BI.each(this.getSections(e.height,e.width,e.x,e.y),function(e,t){t.addCellIndex(i)})}}}()},function(e,t){BI.Tree=function(){this.root=new BI.Node(BI.UUID())},BI.Tree.prototype={constructor:BI.Tree,addNode:function(e,t,i){BI.isNull(t)?this.root.addChild(e,i):BI.isNull(e)?this.root.addChild(t,i):e.addChild(t,i)},isRoot:function(e){return e===this.root},getRoot:function(){return this.root},clear:function(){this.root.clear()},initTree:function(e){var n=this;this.clear();var r=[];for(BI.each(e,function(e,t){var i=new BI.Node(t);i.set("data",t),n.addNode(i),r.push(i)});!BI.isEmpty(r);){var o=r.shift(),t=o.get("data");BI.each(t.children,function(e,t){var i=new BI.Node(t);i.set("data",t),r.push(i),n.addNode(o,i)})}},_toJSON:function(e){var i=this,n=[];return BI.each(e.getChildren(),function(e,t){n.push(i._toJSON(t))}),BI.extend({id:e.id},BI.deepClone(e.get("data")),0<n.length?{children:n}:{})},toJSON:function(e){var i=this,n=[];return BI.each((e||this.root).getChildren(),function(e,t){n.push(i._toJSON(t))}),n},_toJSONWithNode:function(e){var i=this,n=[];return BI.each(e.getChildren(),function(e,t){n.push(i._toJSONWithNode(t))}),BI.extend({id:e.id},BI.deepClone(e.get("data")),{node:e},0<n.length?{children:n}:{})},toJSONWithNode:function(e){var i=this,n=[];return BI.each((e||this.root).getChildren(),function(e,t){n.push(i._toJSONWithNode(t))}),n},search:function(e,i,n){if(!(e instanceof BI.Node))return arguments.callee.apply(this,[this.root,e,i]);var r=this,o=null;return BI.isNull(i)?null:BI.isEqual(e[n||"id"],i)?e:(BI.any(e.getChildren(),function(e,t){if(null!==(o=r.search(t,i,n)))return!0}),o)},_traverse:function(e,t){var i=[];for(i.push(e);!BI.isEmpty(i);){var n=i.shift(),r=t&&t(n);if(!1===r)break;!0!==r&&null!=n&&(i=i.concat(n.getChildren()))}},traverse:function(e){this._traverse(this.root,e)},_recursion:function(e,r,o){var a=this;return BI.every(e.getChildren(),function(e,t){var i=BI.clone(r);i.push(t.id);var n=o&&o(t,i);return!1!==n&&(!0===n||a._recursion(t,i,o))})},recursion:function(e){this._recursion(this.root,[],e)},inOrderTraverse:function(e){this._inOrderTraverse(this.root,e)},_inOrderTraverse:function(e,t){null!=e&&(this._inOrderTraverse(e.getLeft()),t&&t(e),this._inOrderTraverse(e.getRight()))},nrInOrderTraverse:function(e){for(var t=[],i=this.root;null!=i||!BI.isEmpty(t);){for(;null!=i;)t.push(i),i=i.getLeft();i=t.pop(),e&&e(i),i=i.getRight()}},preOrderTraverse:function(e){this._preOrderTraverse(this.root,e)},_preOrderTraverse:function(e,t){null!=e&&(t&&t(e),this._preOrderTraverse(e.getLeft()),this._preOrderTraverse(e.getRight()))},nrPreOrderTraverse:function(e){for(var t=[],i=this.root;null!=i||!BI.isEmpty(t);){for(;null!=i;)e&&e(i),t.push(i),i=i.getLeft();i=(i=t.pop()).getRight()}},postOrderTraverse:function(e){this._postOrderTraverse(this.root,e)},_postOrderTraverse:function(e,t){null!=e&&(this._postOrderTraverse(e.getLeft()),this._postOrderTraverse(e.getRight()),t&&t(e))},nrPostOrderTraverse:function(e){for(var t=[],i=this.root,n=null;null!=i||!BI.isEmpty(t);){for(;null!=i;)t.push(i),i=i.getLeft();i=null==(i=BI.last(t)).getRight()||i.getRight()==n?(e&&e(i),n=i=t.pop(),null):i.getRight()}}},BI.Node=function(e){BI.isObject(e)?BI.extend(this,e):this.id=e,this.clear.apply(this,arguments)},BI.Node.prototype={constructor:BI.Node,set:function(e,t){BI.isObject(e)?BI.extend(this,e):this[e]=t},get:function(e){return this[e]},isLeaf:function(){return BI.isEmpty(this.children)},getChildren:function(){return this.children},getChildrenLength:function(){return this.children.length},getFirstChild:function(){return BI.first(this.children)},getLastChild:function(){return BI.last(this.children)},setLeft:function(e){this.left=e},getLeft:function(){return this.left},setRight:function(e){this.right=e},getRight:function(){return this.right},setParent:function(e){this.parent=e},getParent:function(){return this.parent},getChild:function(e){return this.children[e]},getChildIndex:function(i){return BI.findIndex(this.children,function(e,t){return t.get("id")===i})},removeChild:function(e){this.removeChildByIndex(this.getChildIndex(e))},removeChildByIndex:function(e){var t=this.getChild(e-1),i=this.getChild(e+1);null!=t&&t.setRight(i||null),null!=i&&i.setLeft(t||null),this.children.splice(e,1)},removeAllChilds:function(){this.children=[]},addChild:function(e,t){var i=null;i=BI.isUndefined(t)?this.children.length-1:t-1,e.setParent(this),0<=i&&(this.getChild(i)&&this.getChild(i).setRight(e),e.setLeft(this.getChild(i))),BI.isUndefined(t)?this.children.push(e):this.children.splice(t,0,e)},equals:function(e){return this===e||this.id===e.id},clear:function(){this.parent=null,this.left=null,this.right=null,this.children=[]}},BI.extend(BI.Tree,{transformToArrayFormat:function(e,t){if(!e)return[];var i=[];if(BI.isArray(e))for(var n=0,r=e.length;n<r;n++){var o=BI.clone(e[n]);o.pId=null==o.pId?t:o.pId,delete o.children,i.push(o),e[n].children&&(i=i.concat(BI.Tree.transformToArrayFormat(e[n].children,o.id)))}else{var a=BI.clone(e);a.pId=null==a.pId?t:a.pId,delete a.children,i.push(a),e.children&&(i=i.concat(BI.Tree.transformToArrayFormat(e.children,a.id)))}return i},arrayFormat:function(e,t){if(!e)return[];var i=[];if(BI.isArray(e))for(var n=0,r=e.length;n<r;n++){var o=e[n];o.pId=null==o.pId?t:o.pId,i.push(o),e[n].children&&(i=i.concat(BI.Tree.arrayFormat(e[n].children,o.id)))}else{var a=e;a.pId=null==a.pId?t:a.pId,i.push(a),e.children&&(i=i.concat(BI.Tree.arrayFormat(e.children,a.id)))}return i},transformToTreeFormat:function(e){var t,i;if(!e)return[];if(BI.isArray(e)){var n=[],r={};for(t=0,i=e.length;t<i;t++){if(BI.isNull(e[t].id))return e;r[e[t].id]=BI.clone(e[t])}for(t=0,i=e.length;t<i;t++)r[e[t].pId]&&e[t].id!==e[t].pId?(r[e[t].pId].children||(r[e[t].pId].children=[]),r[e[t].pId].children.push(r[e[t].id])):n.push(r[e[t].id]),delete r[e[t].id].pId;return n}return[e]},treeFormat:function(e){var t,i;if(!e)return[];if(BI.isArray(e)){var n=[],r={};for(t=0,i=e.length;t<i;t++){if(BI.isNull(e[t].id))return e;r[e[t].id]=e[t]}for(t=0,i=e.length;t<i;t++)r[e[t].pId]&&e[t].id!==e[t].pId?(r[e[t].pId].children||(r[e[t].pId].children=[]),r[e[t].pId].children.push(r[e[t].id])):n.push(r[e[t].id]);return n}return[e]},traversal:function(e,i){if(!BI.isNull(e)){var n=this;BI.some(e,function(e,t){if(!1===i(e,t))return!0;n.traversal(t.children,i)})}}})},function(e,t){BI.Vector=function(e,t){this.x=e,this.y=t},BI.Vector.prototype={constructor:BI.Vector,cross:function(e){return this.x*e.y-this.y*e.x},length:function(e){return Math.sqrt(this.x*e.x+this.y*e.y)}},BI.Region=function(e,t,i,n){this.x=e,this.y=t,this.w=i,this.h=n},BI.Region.prototype={constructor:BI.Region,isIntersects:function(e){if(this.isPointInside(e.x,e.y)||this.isPointInside(e.x+e.w,e.y)||this.isPointInside(e.x,e.y+e.h)||this.isPointInside(e.x+e.w,e.y+e.h))return!0;if(e.isPointInside(this.x,this.y)||e.isPointInside(this.x+this.w,this.y)||e.isPointInside(this.x,this.y+this.h)||e.isPointInside(this.x+this.w,this.y+this.h))return!0;if(null!=e.x&&null!=e.y){var t=new BI.Vector(this.w,this.h),i=new BI.Vector(e.x-this.x,e.y-this.y),n=new BI.Vector(i.x+e.w,i.y+e.h);if(t.cross(i)*t.cross(n)<0)return!0}return!1},isPointInside:function(e,t){return null!=this.x&&null!=this.y&&(e>=this.x&&e<=this.x+this.w&&t>=this.y&&t<=this.y+this.h)},getPosition:function(){var e=[];return e.push(this.x+this.w/2),e.push(this.y+this.h/2),e}}},function(module,exports,__webpack_require__){(function(global){!function(){var _global;function isEmpty(e){return""===e||null===e||e===undefined}function isInvalidDate(e){return"Invalid Date"==e||"NaN"==e}function _eFormat(e,t){return function p(e,t){var i=e<0?(e*=-1,"-"):"",n="",r=Math[0<e&&e<1?"floor":"ceil"](Math.log(e)/Math.log(10));if(!isFinite(r))return t.replace(/#/gi,"").replace(/\.e/gi,"E");0<(e/=Math.pow(10,r))&&e<1&&(e*=10,r-=1);var o=function l(e,t){if(!/e/gi.test(t))return 0;var i,n,r=t.split(/e/gi)[0].split(".")[0],o=r.length,a=0;for(i=0;i<o;i++)(0==(n=r.charAt(i))||"#"==n&&o-i<=e+1)&&a++;return a}(r,t);1<o&&(r-=o-1,e*=Math.pow(10,o-1)),r<0&&(n="-",r*=-1);var a=function u(e){if(!/e/gi.test(e))return 0;var t=e.split(/e/gi)[0].split(".");return 1<t.length?t[1].length:0}(t),s=function c(e){var t=Math.round(e);return e=(e+"").split(".")[0],t=(t+"").split(".")[0],e.length!==t.length}(e);return e*=Math.pow(10,a),e=Math.round(e),s&&(e/=10,r+="-"===n?-1:1),e=(e/=Math.pow(10,a)).toFixed(a),r=function h(e,t,i){if(t+="",!/e/gi.test(e))return t;e=e.split(/e/gi)[1];for(;t.length<e.length;)t="0"+t;for(var n=!0,r=0,o=t.length;r<o;r++)n=n&&"0"===t.charAt(r);return(i=n?"":i)+t}(t,r,n),i+e+"E"+r}(e=+e,t)}function _dealNumberPrecision(e,t){if(/[eE]/.test(e)){var i,n=0,r=0;/[%‰]$/.test(t)&&(n=/[%]$/.test(t)?2:3);for(var o=t.length;r<o;r++)"0"!=(i=t.charAt(r))&&"#"!=i||n++;return Number(e).toFixed(n)}return e}function _numberFormat(e,t){if(!/[0-9]/.test(e=e+"")||!t)return e;var i=t.indexOf(";");if(-1<i)return 0<=e?_numberFormat(e+"",t.substring(0,i)):_numberFormat(-e+"",t.substr(i+1));if(+e<0&&"-"!==t.charAt(0))return _numberFormat(-e+"","-"+t);var n=t.split("."),r=n[0]||"",o=n[1]||"",a=(e=_dealNumberPrecision(e,o)).split("."),s=a[0]||"",l=a[1]||"";if(/[%‰]$/.test(t)){var u=/[%]$/.test(t)?"00":"000";s=(s+=(l+=u).substr(0,u.length)).replace(/^0+/gi,""),l=l.substr(u.length).replace(/0+$/gi,"")}var c=_dealWithRight(l,o);c.leftPlus&&(s=parseInt(s)+1+"",s=isNaN(s)?"1":s),c=c.num;var h=_dealWithLeft(s,r);return/[0-9]/.test(h)||(h+="0"),/[0-9]/.test(c)?h+"."+c:h+c}function _dealWithRight(e,t){for(var i="",n=0,r=0,o=t.length;r<o;r++){var a=t.charAt(r),s=e.charAt(n);switch(a){case"0":isEmpty(s)&&(s="0"),i+=s,n++;break;case"#":i+=s,n++;break;default:i+=a}}var l=e.substr(n),u={};if(!isEmpty(l)&&4<l.charAt(0)){u.leftPlus=!0;var c=i.match(/^[0-9]+/);if(c){var h=c[0],p=h.length,d=parseInt(h)+1+"";d.length>p?d=d.substr(1):(d=BI.leftPad(d,p,"0"),u.leftPlus=!1),i=i.replace(/^[0-9]+/,d)}}return u.num=i,u}function _dealWithLeft(e,t){for(var i="",n=e.length-1,r=-1,o=-1,a=t.length-1;0<=a;a--){var s=t.charAt(a),l=e.charAt(n);switch(s){case"0":isEmpty(l)&&(l="0"),o=-1,i=l+i,n--;break;case"#":o=a,i=l+i,n--;break;case",":if(!isEmpty(l)){var u=t.match(/,[#0]+/);u&&(r=u[0].length-1),i=","+i}break;default:i=s+i}}if(-1<o){var c=e.substr(0,n+1);i=i.substr(0,o)+c+i.substr(o)}if(0<r){var h=i.match(/[0-9]+,/);if(h){for(var p="",d=(h=h[0]).length-1-r;0<=d;d-=r)p=h.substr(d,r)+","+p;var g=h.substr(0,d+r);isEmpty(g)||(p=g+","+p)}i=i.replace(/[0-9]+,/,p)}return i}_global="undefined"!=typeof window?window:void 0!==global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),BI.cjkEncode=function(e){if("string"!=typeof e)return e;for(var t="",i=0;i<e.length;i++){var n=e.charCodeAt(i);t+=128<=n||91===n||93===n?"["+n.toString(16)+"]":e.charAt(i)}return t},BI.cjkDecode=function(text){if(null==text)return"";if(!isNaN(text)||-1==text.indexOf("["))return text;for(var newText="",i=0;i<text.length;i++){var ch=text.charAt(i);if("["==ch){var rightIdx=text.indexOf("]",i+1);if(i+1<rightIdx){var subText=text.substring(i+1,rightIdx);0<subText.length&&(ch=String.fromCharCode(eval("0x"+subText))),i=rightIdx}}newText+=ch}return newText};var SPECIAL_TAGS={"&":"&amp;",'"':"&quot;","<":"&lt;",">":"&gt;"};BI.htmlEncode=function(e){return BI.isNull(e)?"":BI.replaceAll(e+"",'&|"|<|>',function(e){return SPECIAL_TAGS[e]?SPECIAL_TAGS[e]:"&nbsp;"})},BI.htmlDecode=function(e){return BI.isNull(e)?"":BI.replaceAll(e+"","&amp;|&quot;|&lt;|&gt;|&nbsp;",function(e){switch(e){case"&amp;":return"&";case"&quot;":return'"';case"&lt;":return"<";case"&gt;":return">";case"&nbsp;":default:return" "}})},BI.cjkEncodeDO=function(e){if(BI.isPlainObject(e)){var i={};return _.each(e,function(e,t){"string"!=typeof e&&(e=BI.jsonEncode(e)),t=BI.cjkEncode(t),i[t]=BI.cjkEncode(e)}),i}return e},BI.jsonEncode=function(e){var t,i=!!{}.hasOwnProperty,n={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};if(null==e)return"null";if(BI.isArray(e))return function(e){var t,i,n,r=["["],o=e.length;for(i=0;i<o;i+=1)switch(typeof(n=e[i])){case"undefined":case"function":case"unknown":break;default:t&&r.push(","),r.push(null===n?"null":BI.jsonEncode(n)),t=!0}return r.push("]"),r.join("")}(e);if(e instanceof Date)return BI.jsonEncode({__time__:e.getTime()});if("string"==typeof e)return/["\\\x00-\x1f]/.test(t=e)?'"'+t.replace(/([\x00-\x1f\\"])/g,function(e,t){var i=n[t];return i||(i=t.charCodeAt(),"\\u00"+Math.floor(i/16).toString(16)+(i%16).toString(16))})+'"':'"'+t+'"';if("number"==typeof e)return isFinite(e)?String(e):"null";if("boolean"==typeof e)return String(e);if(BI.isFunction(e))return String(e);var r,o,a,s=["{"];for(o in e)if(!i||e.hasOwnProperty(o))switch(typeof(a=e[o])){case"undefined":case"unknown":break;default:r&&s.push(","),s.push(BI.jsonEncode(o),":",null===a?"null":BI.jsonEncode(a)),r=!0}return s.push("}"),s.join("")},BI.jsonDecode=function(e){try{var t=BI.$?BI.$.parseJSON(e):_global.JSON.parse(e);null==t&&(t={})}catch(i){try{t=new Function("return "+e)()||{}}catch(i){}null==t&&(t=[])}if(!function n(e){return!(!e||"string"!=typeof e)&&-1!=e.indexOf("__time__")}(e))return t;return function(e){if("string"==typeof e)return e;if(e&&null!=e.__time__)return new Date(e.__time__);for(var t in e){if(e[t]==e||"object"==typeof e[t]||_.isFunction(e[t]))break;e[t]=arguments.callee(e[t])}return e}(t)},BI.getEncodeURL=function(e,i){return BI.replaceAll(e,"\\{(.*?)\\}",function(e,t){return BI.encodeURIComponent(BI.isObject(i)?i[t]:i)})},BI.encodeURIComponent=function(e){return BI.specialCharsMap=BI.specialCharsMap||{},e=e||"",e=BI.replaceAll(e+"",BI.keys(BI.specialCharsMap||[]).join("|"),function(e){switch(e){case"\\":return BI.specialCharsMap["\\\\"]||e;default:return BI.specialCharsMap[e]||e}}),_global.encodeURIComponent(e)},BI.decodeURIComponent=function(e){var i={};return BI.each(BI.specialCharsMap,function(e,t){i[t]="\\\\"===e?"\\":e}),e=e||"",e=BI.replaceAll(e+"",BI.keys(i||[]).join("|"),function(e){return i[e]||e}),_global.decodeURIComponent(e)},BI.contentFormat=function(e,t){if(isEmpty(e))return"";var i=e.toString();if(isEmpty(t))return i;if(t.match(/^T/))return i;if(t.match(/^D/)){if(e instanceof Date||(e="number"==typeof e?new Date(e):new Date(Date.parse((""+e).replace(/-|\./g,"/")))),!isInvalidDate(e)&&!BI.isNull(e)){var n=t.match(/^DT/);i=BI.date2Str(e,t.substring(n?2:1))}}else i=t.match(/E/)?_eFormat(i,t):_numberFormat(i,t);return i=i.replace(/¤/g,"¥")},BI.parseFmt=function(e){return e?(e=String(e).replace(/y{4,}/g,"%Y").replace(/y{2}/g,"%y").replace(/M{4,}/g,"%b").replace(/M{3}/g,"%B").replace(/M{2}/g,"%X").replace(/M{1}/g,"%x").replace(/a{1}/g,"%p"),e=new RegExp("d{2,}","g").test(e)?e.replace(/d{2,}/g,"%d"):e.replace(/d{1}/g,"%e"),e=new RegExp("h{2,}","g").test(e)?e.replace(/h{2,}/g,"%I"):e.replace(/h{1}/g,"%I"),e=(e=new RegExp("H{2,}","g").test(e)?e.replace(/H{2,}/g,"%H"):e.replace(/H{1}/g,"%H")).replace(/m{2,}/g,"%M").replace(/s{2,}/g,"%S")):""},BI.str2Date=function(e,t){if("string"!=typeof e||"string"!=typeof t)return null;var i=BI.parseFmt(t);return BI.parseDateTime(e,i)},BI.date2Str=function(e,t){if(!e)return"";var i=t.length,n="";if(0<i){for(var r=t.charAt(0),o=0,a=r,s=1;s<i;s++){var l=t.charAt(s);r!==l?(n+=u({"char":r,str:a,len:s-o},e),o=s,a=r=l):a+=l}n+=u({"char":r,str:a,len:i-o},e)}return n;function u(e,t){var i=e.str,n=e.len;switch(e["char"]){case"E":i=BI.Date._DN[t.getDay()];break;case"y":i=n<=3?(t.getFullYear()+"").slice(2,4):t.getFullYear();break;case"M":i=2<n?BI.Date._MN[t.getMonth()]:n<2?t.getMonth()+1:BI.leftPad(t.getMonth()+1+"",2,"0");break;case"d":i=1<n?BI.leftPad(t.getDate()+"",2,"0"):t.getDate();break;case"h":var r=t.getHours()%12;0===r&&(r=12),i=1<n?BI.leftPad(r+"",2,"0"):r;break;case"H":i=1<n?BI.leftPad(t.getHours()+"",2,"0"):t.getHours();break;case"m":i=1<n?BI.leftPad(t.getMinutes()+"",2,"0"):t.getMinutes();break;case"s":i=1<n?BI.leftPad(t.getSeconds()+"",2,"0"):t.getSeconds();break;case"a":i=t.getHours()<12?"am":"pm";break;case"z":i=BI.getTimezone(t);break;default:i=e.str}return i}},BI.object2Number=function(e){if(null==e)return 0;if("number"==typeof e)return e;var t=e+"";return-1===t.indexOf(".")?parseInt(t):parseFloat(t)},BI.object2Date=function(e){if(null==e)return new Date;if(e instanceof Date)return e;if("number"==typeof e)return new Date(e);var t=e+"";t=t.replace(/-/g,"/");var i=new Date(t);return isInvalidDate(i)?new Date:i},BI.object2Time=function(e){if(null==e)return new Date;if(e instanceof Date)return e;var t=e+"";t=t.replace(/-/g,"/");var i=new Date(t);return isInvalidDate(i)&&(-1!==t.indexOf("/")||-1===t.indexOf(":")||isInvalidDate(i=new Date("1970/01/01 "+t)))&&isInvalidDate(i=BI.parseDateTime(t,"HH:mm:ss"))?new Date:i}}()}).call(this,__webpack_require__(6))},function(e,t){_.extend(BI,{pushArray:function(e,t){for(var i=0;i<t.length;i++)e.push(t[i])},pushDistinct:function(e,t){BI.contains(e,t)||e.push(t)},pushDistinctArray:function(e,t){for(var i=0,n=t.length;i<n;i++)BI.pushDistinct(e,t[i])}})},function(e,t){BI.Date=BI.Date||{},BI.Date.SECOND=1e3,BI.Date.MINUTE=60*BI.Date.SECOND,BI.Date.HOUR=60*BI.Date.MINUTE,BI.Date.DAY=24*BI.Date.HOUR,BI.Date.WEEK=7*BI.Date.DAY,_.extend(BI,{getTimezone:function(e){return e.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/,"$1$2").replace(/[^A-Z]/g,"")},getMonthDays:function(e,t){var i=e.getFullYear();return void 0===t&&(t=e.getMonth()),0!=i%4||0==i%100&&0!=i%400||1!=t?BI.Date._MD[t]:29},getLastDateOfMonth:function(e){return BI.getDate(e.getFullYear(),e.getMonth(),BI.getMonthDays(e))},getDayOfYear:function(e){var t=BI.getDate(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0)-BI.getDate(e.getFullYear(),0,0,0,0,0);return Math.floor(t/BI.Date.DAY)},getWeekNumber:function(e){var t=BI.getDate(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0),i=t.getDay(),n=BI.StartOfWeek%7,r=(3+n)%7,o=i<n?7+i-n:i-n,a=(r=r||7)<n?7+r-n:r-n;t.setDate(t.getDate()-o+a);var s=t.valueOf();return t.setMonth(0),t.setDate(1),Math.floor((s-t.valueOf())/6048e5)+1},getQuarter:function(e){return Math.floor(e.getMonth()/3)+1},getOffsetDate:function(e,t){return BI.getDate(BI.getTime(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds())+864e5*t)},getOffsetQuarter:function(e,t){var i=BI.getDate(BI.getTime(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds())),n=i.getDate(),r=BI.getMonthDays(BI.getDate(i.getFullYear(),i.getMonth()+3*BI.parseInt(t),1));return r<n&&(n=r),i.setDate(n),i.setMonth(i.getMonth()+3*parseInt(t)),i},getQuarterStartMonth:function(e){var t=0,i=e.getMonth();return i<3&&(t=0),2<i&&i<6&&(t=3),5<i&&i<9&&(t=6),8<i&&(t=9),t},getQuarterStartDate:function(e){return BI.getDate(e.getFullYear(),BI.getQuarterStartMonth(e),1)},getQuarterEndDate:function(e){var t=BI.getQuarterStartMonth(e)+2;return BI.getDate(e.getFullYear(),t,BI.getMonthDays(e,t))},getOffsetMonth:function(e,t){var i=BI.getDate(BI.getTime(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds())),n=i.getDate(),r=BI.getMonthDays(BI.getDate(i.getFullYear(),i.getMonth()+parseInt(t),1));return r<n&&(n=r),i.setDate(n),i.setMonth(i.getMonth()+parseInt(t)),i},getWeekStartDate:function(e){var t=e.getDay(),i=BI.StartOfWeek%7;return BI.getOffsetDate(e,BI.Date._OFFSET[t<i?7+t-i:t-i])},getWeekEndDate:function(e){var t=e.getDay(),i=BI.StartOfWeek%7;return BI.getOffsetDate(e,BI.Date._OFFSET[t<i?7+t-i:t-i]+6)},print:function(e,t){for(var i=e.getMonth(),n=e.getDate(),r=e.getFullYear(),o=r+"";o.length<4;)o="0"+o;var a=BI.getWeekNumber(e),s=BI.getQuarter(e),l=e.getDay(),u={},c=e.getHours(),h=12<=c,p=h?c-12:c,d=BI.getDayOfYear(e);0==p&&(p=12);var g=e.getMinutes(),f=e.getSeconds();u["%a"]=BI.Date._SDN[l],u["%A"]=BI.Date._DN[l],u["%b"]=BI.Date._SMN[i],u["%B"]=BI.Date._MN[i],u["%C"]=1+Math.floor(r/100),u["%d"]=n<10?"0"+n:n,u["%e"]=n,u["%H"]=c<10?"0"+c:c,u["%I"]=p<10?"0"+p:p,u["%j"]=d<100?d<10?"00"+d:"0"+d:d,u["%k"]=c+"",u["%l"]=p+"",u["%X"]=i<9?"0"+(1+i):1+i,u["%x"]=i+1,u["%M"]=g<10?"0"+g:g,u["%n"]="\n",u["%p"]=h?"PM":"AM",u["%P"]=h?"pm":"am",u["%s"]=Math.floor(e.getTime()/1e3),u["%S"]=f<10?"0"+f:f,u["%t"]="\t",u["%U"]=u["%W"]=u["%V"]=a<10?"0"+a:a,u["%u"]=l+1,u["%w"]=l,u["%y"]=o.substr(2,2),u["%Y"]=o,u["%%"]="%",u["%Q"]=s;var I=/%./g;if(BI.isKhtml=BI.isKhtml||function(){return!!_global.navigator&&/Konqueror|Safari|KHTML/i.test(navigator.userAgent)},!(-1===t.indexOf("%Y")&&-1===t.indexOf("%y")||-1===t.indexOf("%W")&&-1===t.indexOf("%U")&&-1===t.indexOf("%V")))switch(a){case 1:11===i&&(u["%y"]=parseInt(u["%y"])+1,u["%Y"]=parseInt(u["%Y"])+1);break;case 53:0===i&&(u["%y"]=parseInt(u["%y"])-1,u["%Y"]=parseInt(u["%Y"])-1)}if(!BI.isKhtml())return t.replace(I,function(e){return u[e]||e});for(var B=t.match(I),E=0;E<B.length;E++){var _=u[B[E]];_&&(I=new RegExp(B[E],"g"),t=t.replace(I,_))}return t}})},function(e,t){BI.Func={},_.extend(BI.Func,{createDistinctName:function(e,i){var t=i,n=1;for(i=i||"";!BI.every(e,function(e,t){return BI.isKey(t)?t!==i:t.name!==i});)i=t+n++;return i},getGBWidth:function(e){return e=(e+="").replace(/[^\x00-\xff]/g,"xx"),Math.ceil(e.length/2)},getSearchResult:function(e,i,n){var r,o,a,s=BI.isArray(e);if(e=s?BI.flatten(e):e,n=n||"text",!BI.isKey(i))return{find:BI.deepClone(e),match:s?[]:{}};i=BI.toUpperCase(i);var l=s?[]:{},u=s?[]:{};return BI.each(e,function(e,t){BI.isNull(t)||(t=BI.deepClone(t),r=BI.stripEL(t),o=BI.find([r[n],r.text,r.value,r.name,r],function(e,t){return BI.isNotNull(t)}),BI.isNull(o)||BI.isObject(o)||(a=BI.makeFirstPY(o,{splitChar:""}),o=BI.toUpperCase(o),a=BI.toUpperCase(a),-1<o.indexOf(i)?o===i?s?l.push(t):l[e]=t:s?u.push(t):u[e]=t:-1<a.indexOf(i)&&(o===i||i.length===o.length?s?l.push(t):l[e]=t:s?u.push(t):u[e]=t)))}),{match:l,find:u}}}),_.extend(BI,{beforeFunc:function(e,t){var i=e;return function(){return!1!==t.apply(e,arguments)&&i.apply(e,arguments)}},afterFunc:function(t,i){var n=t;return function(){var e=n.apply(t,arguments);return!1!==e&&(i.apply(t,arguments),e)}}})},function(e,t){_.extend(BI,{add:function(e,t){return function l(e,t){var i,n,r,o;try{i=e.toString().split(".")[1].length}catch(s){i=0}try{n=t.toString().split(".")[1].length}catch(s){n=0}if(o=Math.abs(i-n),r=Math.pow(10,Math.max(i,n)),0<o){var a=Math.pow(10,o);t=n<i?(e=Number(e.toString().replace(".","")),Number(t.toString().replace(".",""))*a):(e=Number(e.toString().replace(".",""))*a,Number(t.toString().replace(".","")))}else e=Number(e.toString().replace(".","")),t=Number(t.toString().replace(".",""));return(e+t)/r}(t,e)},sub:function(e,t){return function a(e,t){var i,n,r;try{i=e.toString().split(".")[1].length}catch(o){i=0}try{n=t.toString().split(".")[1].length}catch(o){n=0}return r=Math.pow(10,Math.max(i,n)),((e*r-t*r)/r).toFixed(n<=i?i:n)}(e,t)},mul:function(e,t){return function a(e,t){var i=0,n=e.toString(),r=t.toString();try{i+=n.split(".")[1].length}catch(o){}try{i+=r.split(".")[1].length}catch(o){}return Number(n.replace(".",""))*Number(r.replace(".",""))/Math.pow(10,i)}(t,e)},div:function(e,t){return function a(e,t){var i=[];for(var n=2;n<arguments.length;n++)i[n-2]=arguments[n];if(0<i.length)return a.apply(void 0,[a(e,t),i[0]].concat(i.slice(1)));var r=l(e);var o=l(t);return u(r/o,Math.pow(10,s(t)-s(e)))}(e,t);function s(e){var t=e.toString().split(/[eE]/),i=(t[0].split(".")[1]||"").length-+(t[1]||0);return 0<i?i:0}function l(e){if(-1===e.toString().indexOf("e"))return Number(e.toString().replace(".",""));var t=s(e);return 0<t?e*Math.pow(10,t):e}function u(e,t){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];if(0<i.length)return u.apply(void 0,[u(e,t),i[0]].concat(i.slice(1)));var r=l(e),o=l(t),a=s(e)+s(t);return r*o/Math.pow(10,a)}}})},function(e,t){_.extend(BI,{startWith:function(e,t){return e=e||"",!(null==t||""==t||0===e.length||t.length>e.length)&&e.substr(0,t.length)==t},endWith:function(e,t){return!(null==t||""==t||0===e.length||t.length>e.length)&&e.substring(e.length-t.length)==t},getQuery:function(e,t){var i=new RegExp("(^|&)"+t+"=([^&]*)(&|$)"),n=e.substr(e.indexOf("?")+1).match(i);return n?unescape(n[2]):null},appendQuery:function(e,t){if(!t)return e;var i=e;return-1===i.indexOf("?")&&(i+="?"),!1!==BI.endWith(i,"?")||(i+="&"),_.each(t,function(e,t){"string"==typeof t&&(i+=t+"="+e+"&")}),i=i.substr(0,i.length-1)},replaceAll:function(e,t,i){return e.replace(new RegExp(t,"gm"),i)},perfectStart:function(e,t){return BI.startWith(e,t)?e:t+e},allIndexOf:function(e,t){if("string"!=typeof t)return[];for(var i=[],n=0;0<e.length;){var r=e.indexOf(t);if(-1===r)break;i.push(n+r),e=e.substring(r+t.length,e.length),n+=r+t.length}return i}})},function(e,t){var a;a={},_.extend(BI,{addI18n:function(e){BI.extend(a,e)},i18nText:function(e){var t=a[e]||BI.i18n&&BI.i18n[e]||"";t=t||e;var i=arguments.length;if(1<i){if(!(-1<t.indexOf("{R1}"))){var n=Array.prototype.slice.call(arguments),r=1;return BI.replaceAll(t,"\\{\\s*\\}",function(){return n[r++]+""})}for(var o=1;o<i;o++)e="{R"+o+"}",t=BI.replaceAll(t,e,arguments[o]+"")}return t}})},function(e,t){!function(){var i={};BI.module=function(e,t){null!=i[e]&&_global.console&&console.error("module:["+e+"] has been registed"),i[e]=t};var n={};BI.constant=function(e,t){null!=n[e]&&_global.console&&console.error("constant:["+e+"] has been registed"),n[e]=t};var r={};BI.model=function(e,t){null!=r[e]&&_global.console&&console.error("model:["+e+"] has been registed"),r[e]=t};var o={};BI.store=function(e,t){null!=o[e]&&_global.console&&console.error("store:["+e+"] has been registed"),o[e]=t};var a={};BI.service=function(e,t){null!=a[e]&&_global.console&&console.error("service:["+e+"] has been registed"),a[e]=t};var s={};BI.provider=function(e,t){null!=s[e]&&_global.console&&console.error("provider:["+e+"] has been registed"),s[e]=t};var l={};BI.config=function(i,e){if(BI.initialized)return n[i]?n[i]=e(n[i]):s[i]?(f[i]||(f[i]=new s[i]),e(f[i])):BI.Plugin.configWidget(i,e);l[i]||(l[i]=[],BI.prepares.push(function(){for(var e=l[i],t=0;t<e.length;t++)n[i]?n[i]=e[t](n[i]):s[i]?(f[i]||(f[i]=new s[i]),e[t](f[i])):BI.Plugin.configWidget(i,e[t]);l[i]=null})),l[i].push(e)};var u={},c=[];BI.action=function(t,i){return BI.isFunction(t)?(c.push(t),function(){BI.remove(c,function(e){return c.indexOf(i)===e})}):(u[t]||(u[t]=[]),u[t].push(i),function(){BI.remove(u[t],function(e){return u[t].indexOf(i)===e}),0===u[t].length&&delete u[t]})};var h={};BI.point=function(e,t,i,n){h[e]||(h[e]={}),h[e][t]||(h[e][t]={}),h[e][t][n?"after":"before"]||(h[e][t][n?"after":"before"]=[]),h[e][t][n?"after":"before"].push(i)},BI.Modules={getModule:function(e){return i[e]?i[e]:(_global.console&&console.error("module:["+e+"] does not exists"),!1)},getAllModules:function(){return i}},BI.Constants={getConstant:function(e){return n[e]}};function p(o,e){e=BI.isArray(e)?e:[e],BI.each(e,function(e,t){if(h[t])for(var i in h[t]){var n=h[t][i].before;n&&BI.aspect.before(o,i,function(n){return function(){for(var e=0,t=n.length;e<t;e++)try{n[e].apply(o,arguments)}catch(i){_global.console&&console.error(i)}}}(n));var r=h[t][i].after;r&&BI.aspect.after(o,i,function(n){return function(){for(var e=0,t=n.length;e<t;e++)try{n[e].apply(o,arguments)}catch(i){_global.console&&console.error(i)}}}(r))}})}BI.Models={getModel:function(e,t){var i=new r[e](t);return i._constructor&&i._constructor(t),i.mixins&&p(i,i.mixins),p(i,e),i}};var d={};BI.Stores={getStore:function(e,t){if(d[e])return d[e];var i=d[e]=new o[e](t);return i._constructor&&i._constructor(t),p(i,e),i}};var g={};BI.Services={getService:function(e,t){return g[e]||(g[e]=new a[e](t),p(g[e],e)),g[e]}};var f={},I={};BI.Providers={getProvider:function(e,t){return f[e]||(f[e]=new s[e]),I[e]||(I[e]=new(f[e].$get())(t)),I[e]}},BI.Actions={runAction:function(e,n,r){BI.each(u[e],function(e,t){try{t(n,r)}catch(i){_global.console&&console.error(i)}})},runGlobalAction:function(){var n=[].slice.call(arguments);BI.each(c,function(e,t){try{t.apply(null,n)}catch(i){_global.console&&console.error(i)}})}},BI.getContext=function(e,t){return n[e]?BI.Constants.getConstant(e):r[e]?BI.Models.getModel(e,t):o[e]?BI.Stores.getStore(e,t):a[e]?BI.Services.getService(e,t):s[e]?BI.Providers.getProvider(e,t):void 0}}()},function(e,t){_.extend(BI,{MAX:0x1000000000000000,MIN:-0x1000000000000000,EVENT_RESPONSE_TIME:200,zIndex_layer:1e5,zIndex_popover:1e6,zIndex_popup:1e7,zIndex_masker:1e8,zIndex_tip:1e9,emptyStr:"",emptyFn:function(){},empty:null,Key:{48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/"},KeyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},Status:{SUCCESS:1,WRONG:2,START:3,END:4,WAITING:5,READY:6,RUNNING:7,OUTOFBOUNDS:8,NULL:-1},Direction:{Top:"top",Bottom:"bottom",Left:"left",Right:"right",Custom:"custom"},Axis:{Vertical:"vertical",Horizontal:"horizontal"},Selection:{Default:-2,None:-1,Single:0,Multi:1,All:2},HorizontalAlign:{Left:"left",Right:"right",Center:"center",Stretch:"stretch"},VerticalAlign:{Middle:"middle",Top:"top",Bottom:"bottom",Stretch:"stretch"},StartOfWeek:1})},function(e,t){var i;i={},BI.BufferPool={put:function(e,t){if(BI.isNotNull(i[e]))throw new Error("Buffer Pool has the key already!");i[e]=t},get:function(e){return i[e]}}},function(e,t){var n;n={},BI.SharingPool={_Shared:n,put:function(e,t){n[e]=t},cat:function(){for(var e=Array.prototype.slice.call(arguments,0),t=n,i=0;i<e.length;i++)t=t&&t[e[i]];return t},get:function(){return BI.deepClone(this.cat.apply(this,arguments))},remove:function(e){delete n[e]}}},function(e,t){BI.Req={}},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,i){var n=i(64),r=i(1001);(e.exports=function(e,t){return r[e]||(r[e]=t!==undefined?t:{})})("versions",[]).push({version:"3.3.2",mode:n?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports={}},function(e,t,i){var n=i(27).f,r=i(25),o=i(12)("toStringTag");e.exports=function(e,t,i){e&&!r(e=i?e:e.prototype,o)&&n(e,o,{configurable:!0,value:t})}},function(e,t,i){var o=i(54);e.exports=function(n,r,e){if(o(n),r===undefined)return n;switch(e){case 0:return function(){return n.call(r)};case 1:return function(e){return n.call(r,e)};case 2:return function(e,t){return n.call(r,e,t)};case 3:return function(e,t,i){return n.call(r,e,t,i)}}return function(){return n.apply(r,arguments)}}},function(e,t){e.exports={}},function(e,t,i){"use strict";function n(e){var i,n;this.promise=new e(function(e,t){if(i!==undefined||n!==undefined)throw TypeError("Bad Promise constructor");i=e,n=t}),this.resolve=r(i),this.reject=r(n)}var r=i(54);e.exports.f=function(e){return new n(e)}},,,,,,,,,,,,,function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t){BI.Widget=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.Widget.superclass._defaultConfig.apply(this),{root:!1,tagName:"div",attributes:null,data:null,tag:null,disabled:!1,invisible:!1,invalid:!1,baseCls:"",extraCls:"",cls:"",css:null})},_constructor:function(){},beforeInit:null,beforeCreate:null,created:null,render:null,beforeMount:null,mounted:null,shouldUpdate:null,update:function(){},beforeDestroy:null,destroyed:null,_init:function(){BI.Widget.superclass._init.apply(this,arguments),this._initRoot(),this._initElementWidth(),this._initElementHeight(),this._initVisual(),this._initState(),this._initRender()},_initRender:function(){this.beforeInit?(this.__asking=!0,this.beforeInit(BI.bind(this._render,this)),!0===this.__asking&&(this.__async=!0)):this._render()},_render:function(){this.__asking=!1,this.beforeCreate&&this.beforeCreate(),this._initElement(),this._initEffects(),this.created&&this.created()},_initRoot:function(){var e=this.options;this.widgetName=e.widgetName||BI.uniqueId("widget"),this._isRoot=e.root,BI.isWidget(e.element)?(e.element instanceof BI.Widget?(this._parent=e.element,this._parent.addWidget(this.widgetName,this)):this._isRoot=!0,this.element=this.options.element.element):e.element?(this.element=BI.Widget._renderEngine.createElement(this),this._isRoot=!0):this.element=BI.Widget._renderEngine.createElement(this),this.element._isWidget=!0,(e._baseCls||e.baseCls||e.extraCls||e.cls)&&this.element.addClass((e._baseCls||"")+" "+(e.baseCls||"")+" "+(e.extraCls||"")+" "+(e.cls||"")),e.attributes&&this.element.attr(e.attributes),e.data&&this.element.data(e.data),e.css&&this.element.css(e.css),this._children={}},_initElementWidth:function(){var e=this.options;BI.isWidthOrHeight(e.width)&&this.element.css("width",e.width)},_initElementHeight:function(){var e=this.options;BI.isWidthOrHeight(e.height)&&this.element.css("height",e.height)},_initVisual:function(){this.options.invisible&&this.element.css("display","none")},_initEffects:function(){var e=this.options;(e.disabled||e.invalid)&&(this.options.disabled&&this.setEnable(!1),this.options.invalid&&this.setValid(!1))},_initState:function(){this._isMounted=!1},_initElement:function(){var i=this,e=this.render&&this.render();BI.isPlainObject(e)&&(e=[e]),BI.isArray(e)&&BI.each(e,function(e,t){BI.createWidget(t,{element:i})}),this._mount()},_setParent:function(e){this._parent=e},_mount:function(i,n,r,o){var a=this;return!!(i||!this._isMounted&&this.isVisible()&&!0!==this.__asking&&(!0===this._isRoot||this._parent&&!0===this._parent._isMounted))&&(!1!==r&&this.beforeMount&&this.beforeMount(),this._isMounted=!0,this._mountChildren&&this._mountChildren(),BI.each(this._children,function(e,t){a.isEnabled()||t._setEnable(!1),a.isValid()||t._setValid(!1),t._mount&&t._mount(!!n&&i,n,r,o)}),!1!==r&&this.mounted&&this.mounted(),this.fireEvent(BI.Events.MOUNT),o&&o(this),!0)},_mountChildren:null,isMounted:function(){return this._isMounted},setWidth:function(e){this.options.width=e,this._initElementWidth()},setHeight:function(e){this.options.height=e,this._initElementHeight()},_setEnable:function(i){!0===i?this.options.disabled=!1:!1===i&&(this.options.disabled=!0),BI.each(this._children,function(e,t){!t._manualSetEnable&&t._setEnable&&t._setEnable(i)})},_setValid:function(i){!0===i?this.options.invalid=!1:!1===i&&(this.options.invalid=!0),BI.each(this._children,function(e,t){!t._manualSetValid&&t._setValid&&t._setValid(i)})},_setVisible:function(e){!0===e?this.options.invisible=!1:!1===e&&(this.options.invisible=!0)},setEnable:function(e){this._manualSetEnable=!0,this._setEnable(e),!0===e?this.element.removeClass("base-disabled disabled"):!1===e&&this.element.addClass("base-disabled disabled")},setVisible:function(e){this._setVisible(e),!0===e?(this.element.css("display",""),this._mount()):!1===e&&this.element.css("display","none"),this.fireEvent(BI.Events.VIEW,e)},setValid:function(e){this._manualSetValid=!0,this._setValid(e),!0===e?this.element.removeClass("base-invalid invalid"):!1===e&&this.element.addClass("base-invalid invalid")},doBehavior:function(){var i=arguments;BI.each(this._children,function(e,t){t.doBehavior&&t.doBehavior.apply(t,i)})},getWidth:function(){return this.options.width},getHeight:function(){return this.options.height},isValid:function(){return!this.options.invalid},addWidget:function(e,t){var i=this;if(e instanceof BI.Widget&&(e=(t=e).getName()),BI.isKey(e)&&(e+=""),e=e||t.getName()||BI.uniqueId("widget"),this._children[e])throw new Error("name has already been existed");return t._setParent&&t._setParent(this),t.on(BI.Events.DESTROY,function(){BI.remove(i._children,this)}),this._children[e]=t},getWidgetByName:function(i){if(!BI.isKey(i)||i===this.getName())return this;i+="";var n=void 0,r={};return BI.any(this._children,function(e,t){if(e===i)return n=t,!0;r[e]=t}),n||BI.any(r,function(e,t){return n=t.getWidgetByName(e)}),n},removeWidget:function(e){BI.isWidget(e)?BI.remove(this._children,e):delete this._children[e]},hasWidget:function(e){return null!=this._children[e]},getName:function(){return this.widgetName},setTag:function(e){this.options.tag=e},getTag:function(){return this.options.tag},attr:function(e,t){var i=this;if(!BI.isPlainObject(e))return BI.isNotNull(t)?this.options[e]=t:this.options[e];BI.each(e,function(e,t){i.attr(e,t)})},css:function(e,t){return this.element.css(e,t)},getText:function(){},setText:function(e){},getValue:function(){},setValue:function(e){},isEnabled:function(){return!this.options.disabled},isVisible:function(){return!this.options.invisible},disable:function(){this.setEnable(!1)},enable:function(){this.setEnable(!0)},valid:function(){this.setValid(!0)},invalid:function(){this.setValid(!1)},invisible:function(){this.setVisible(!1)},visible:function(){this.setVisible(!0)},__d:function(){this.beforeDestroy&&this.beforeDestroy(),this.beforeDestroy=null,BI.each(this._children,function(e,t){t&&t._unMount&&t._unMount()}),this._children={},this._parent=null,this._isMounted=!1,this.destroyed&&this.destroyed(),this.destroyed=null},_unMount:function(){this.__d(),this.fireEvent(BI.Events.UNMOUNT),this.purgeListeners()},isolate:function(){this._parent&&this._parent.removeWidget(this),BI.DOM.hang([this])},empty:function(){BI.each(this._children,function(e,t){t&&t._unMount&&t._unMount()}),this._children={},this.element.empty()},_destroy:function(){this.__d(),this.element.destroy(),this.purgeListeners()},destroy:function(){this.__d(),this.element.destroy(),this.fireEvent(BI.Events.DESTROY),this._purgeRef(),this.purgeListeners()}}),BI.Widget.registerRenderEngine=function(e){BI.Widget._renderEngine=e},BI.Widget.registerRenderEngine({createElement:function(e){if(BI.isWidget(e)){var t=e.options;return t.element?BI.$(t.element):BI.$(document.createElement(t.tagName))}return BI.$(e)},createFragment:function(){return document.createDocumentFragment()}}),BI.mount=function(e,t,i,n){if(!0!==n)return t&&BI.Widget._renderEngine.createElement(t).append(e.element),e._mount(!0,!1,!1,i);e.element.data("__widgets",[e]);var r=e._mount(!0,!1,!1,function(e){BI.each(e._children,function(e,t){var i=t.element.data("__widgets");(i=i||[]).push(t),t.element.data("__widgets",i)}),i&&i.apply(this,arguments)}),o=BI.Widget._renderEngine.createElement;BI.DOM.patchProps(e.element,o(o(t).children()[0]));var a=function(e){e.beforeMount&&e.beforeMount(),e.mounted&&e.mounted(),BI.each(e._children,function(e,t){a(t)})};return a(e),r}},function(e,t){!function(){var i={};BI.shortcut=BI.component=function(e,t){null!=i[e]&&_global.console&&console.error("shortcut:["+e+"] has been registed"),i[e]=t};function o(e){var t=new i[e.type];return t._initProps(e),t._init(),t._initRef(),t}BI.createWidget=function(e,t,i){var n,r;if(BI.init(),e=e||{},t=BI.isWidget(t)?(t,{}):t||{},BI.isEmpty(e)&&BI.isEmpty(t))return BI.createWidget({type:"bi.layout"});if(BI.isWidget(e))return e;if(e.type||t.type)return n=BI.extend({},t,e),(r=BI.Plugin.getWidget(n.type,n)).listeners=(r.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(n.type,this)}}]),r.type===n.type?o(r):BI.createWidget(BI.extend({},e,{type:r.type},t));if(e.el&&(e.el.type||t.type))return n=BI.extend({},t,e.el),(r=BI.Plugin.getWidget(n.type,n)).listeners=(r.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(n.type,this)}}]),r.type===n.type?o(r):BI.createWidget(BI.extend({},e,{type:r.type},t));if(BI.isWidget(e.el))return e.el;throw new Error("无法根据item创建组件")},BI.createElement=function(){return BI.createWidget.apply(this,arguments).element}}()},function(e,t){var i,n;i=_global.cancelAnimationFrame||_global.webkitCancelAnimationFrame||_global.mozCancelAnimationFrame||_global.oCancelAnimationFrame||_global.msCancelAnimationFrame||_global.clearTimeout,n=_global.requestAnimationFrame||_global.webkitRequestAnimationFrame||_global.mozRequestAnimationFrame||_global.oRequestAnimationFrame||_global.msRequestAnimationFrame||_global.setTimeout,BI.MouseMoveTracker=function(e,t,i){this._isDragging=!1,this._animationFrameID=null,this._domNode=i,this._onMove=e,this._onMoveEnd=t,this._onMouseMove=BI.bind(this._onMouseMove,this),this._onMouseUp=BI.bind(this._onMouseUp,this),this._didMouseMove=BI.bind(this._didMouseMove,this)},BI.MouseMoveTracker.prototype={constructor:BI.MouseMoveTracker,captureMouseMoves:function(e){this._eventMoveToken||this._eventUpToken||(this._eventMoveToken=BI.EventListener.listen(this._domNode,"mousemove",this._onMouseMove),this._eventUpToken=BI.EventListener.listen(this._domNode,"mouseup",this._onMouseUp)),this._isDragging||(this._deltaX=0,this._deltaY=0,this._isDragging=!0,this._x=e.clientX,this._y=e.clientY),e.preventDefault?e.preventDefault():e.returnValue=!1},releaseMouseMoves:function(){this._eventMoveToken&&this._eventUpToken&&(this._eventMoveToken.remove(),this._eventMoveToken=null,this._eventUpToken.remove(),this._eventUpToken=null),null!==this._animationFrameID&&(i(this._animationFrameID),this._animationFrameID=null),this._isDragging&&(this._isDragging=!1,this._x=null,this._y=null)},isDragging:function(){return this._isDragging},_onMouseMove:function(e){var t=e.clientX,i=e.clientY;this._deltaX+=t-this._x,this._deltaY+=i-this._y,null===this._animationFrameID&&(this._animationFrameID=n(this._didMouseMove)),this._x=t,this._y=i,e.preventDefault?e.preventDefault():e.returnValue=!1},_didMouseMove:function(){this._animationFrameID=null,this._onMove(this._deltaX,this._deltaY),this._deltaX=0,this._deltaY=0},_onMouseUp:function(){this._animationFrameID&&this._didMouseMove(),this._onMoveEnd()}}},function(e,t){var l;l=_global.requestAnimationFrame||_global.webkitRequestAnimationFrame||_global.mozRequestAnimationFrame||_global.oRequestAnimationFrame||_global.msRequestAnimationFrame||_global.setTimeout,BI.WheelHandler=function(e,t,i,n){this._animationFrameID=null,this._deltaX=0,this._deltaY=0,this._didWheel=BI.bind(this._didWheel,this),"function"!=typeof t&&(t=t?function(){return!0}:function(){return!1}),"function"!=typeof i&&(i=i?function(){return!0}:function(){return!1}),"function"!=typeof n&&(n=n?function(){return!0}:function(){return!1}),this._handleScrollX=t,this._handleScrollY=i,this._stopPropagation=n,this._onWheelCallback=e,this.onWheel=BI.bind(this.onWheel,this)},BI.WheelHandler.prototype={constructor:BI.WheelHandler,onWheel:function(e){var t,i=function s(e){var t=0,i=0,n=0,r=0;return"detail"in e&&(i=e.detail),"wheelDelta"in e&&(i=-e.wheelDelta/120),"wheelDeltaY"in e&&(i=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=i,i=0),n=10*t,r=10*i,"deltaY"in e&&(r=e.deltaY),"deltaX"in e&&(n=e.deltaX),(n||r)&&e.deltaMode&&(1===e.deltaMode?(n*=40,r*=40):(n*=800,r*=800)),n&&!t&&(t=n<1?-1:1),r&&!i&&(i=r<1?-1:1),{spinX:t,spinY:i,pixelX:n,pixelY:r}}(e),n=this._deltaX+i.pixelX,r=this._deltaY+i.pixelY,o=this._handleScrollX(n,r),a=this._handleScrollY(r,n);(o||a)&&(this._deltaX+=o?i.pixelX:0,this._deltaY+=a?i.pixelY:0,e.preventDefault?e.preventDefault():e.returnValue=!1,0===this._deltaX&&0===this._deltaY||(this._stopPropagation()&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0),t=!0),!0===t&&null===this._animationFrameID&&(this._animationFrameID=l(this._didWheel)))},_didWheel:function(){this._animationFrameID=null,this._onWheelCallback(this._deltaX,this._deltaY),this._deltaX=0,this._deltaY=0}}},function(e,t){BI.BehaviorFactory={createBehavior:function(e,t){var i;switch(e){case"highlight":i=BI.HighlightBehavior;break;case"redmark":i=BI.RedMarkBehavior}return new i(t)}},BI.Behavior=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.Behavior.superclass._defaultConfig.apply(this,arguments),{rule:function(){return!0}})},_init:function(){BI.Behavior.superclass._init.apply(this,arguments)},doBehavior:function(){}})},function(e,t){BI.Layout=BI.inherit(BI.Widget,{props:function(){return{scrollable:null,scrollx:!1,scrolly:!1,items:[]}},render:function(){this._init4Margin(),this._init4Scroll()},_init4Margin:function(){this.options.top&&this.element.css("top",this.options.top),this.options.left&&this.element.css("left",this.options.left),this.options.bottom&&this.element.css("bottom",this.options.bottom),this.options.right&&this.element.css("right",this.options.right)},_init4Scroll:function(){switch(this.options.scrollable){case!0:this.element.css("overflow","auto");break;case!1:this.element.css("overflow","hidden")}this.options.scrollx&&this.element.css({"overflow-x":"auto","overflow-y":"hidden"}),this.options.scrolly&&this.element.css({"overflow-x":"hidden","overflow-y":"auto"})},appendFragment:function(e){this.element.append(e)},_mountChildren:function(){var i=this,n=BI.Widget._renderEngine.createFragment(),r=!1;BI.each(this._children,function(e,t){t.element!==i.element&&(n.appendChild(t.element[0]),r=!0)}),!0===r&&this.appendFragment(n)},_getChildName:function(e){return e+""},_addElement:function(e,t,i){var n,r=this;return this.hasWidget(this._getChildName(e))?n=this.getWidgetByName(this._getChildName(e)):((n=BI.createWidget(t,i)).on(BI.Events.DESTROY,function(){BI.each(r._children,function(e,t){t===n&&(BI.remove(r._children,t),r.removeItemAt(0|e))})}),this.addWidget(this._getChildName(e),n)),n},_getOptions:function(e){return e instanceof BI.Widget&&(e=e.options),(e=BI.stripEL(e))instanceof BI.Widget&&(e=e.options),e},_compare:function(e,t){var u=this;return function c(e,t,i,n){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return e===t;var r=Object.prototype.toString.call(e);switch(r){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t}var o="[object Array]"===r;if(!o){if(BI.isFunction(e)&&BI.isFunction(t))return!0;e=u._getOptions(e),t=u._getOptions(t)}i=i||[];n=n||[];var a=i.length;for(;a--;)if(i[a]===e)return n[a]===t;i.push(e);n.push(t);if(o){if((a=e.length)!==t.length)return!1;for(;a--;)if(!c(e[a],t[a],i,n))return!1}else{var s,l=_.keys(e);if(a=l.length,_.keys(t).length!==a)return!1;for(;a--;)if(s=l[a],!_.has(t,s)||!c(e[s],t[s],i,n))return!1}i.pop();n.pop();return!0}(e,t)},_getWrapper:function(){return this.element},_addItemAt:function(e,t){for(var i=this.options.items.length;e<i;i--)this._children[this._getChildName(i)]=this._children[this._getChildName(i-1)];delete this._children[this._getChildName(e)],this.options.items.splice(e,0,t)},_removeItemAt:function(e){for(var t=e;t<this.options.items.length-1;t++)this._children[this._getChildName(t)]=this._children[this._getChildName(t+1)];delete this._children[this._getChildName(this.options.items.length-1)],this.options.items.splice(e,1)},addItem:function(e){return this.addItemAt(this.options.items.length,e)},prependItem:function(e){return this.addItemAt(0,e)},addItemAt:function(e,t){if(!(e<0||e>this.options.items.length)){this._addItemAt(e,t);var i=this._addElement(e,t);return 0<e?this._children[this._getChildName(e-1)].element.after(i.element):i.element.prependTo(this._getWrapper()),i._mount(),i}},removeItemAt:function(e){e=BI.isArray(e)?e:[e];for(var t=[],i=[],n={},r=0,o=this.options.items.length;r<o;r++){var a=this._children[this._getChildName(r)];BI.contains(e,r)?a&&t.push(a):(n[this._getChildName(i.length)]=a,i.push(this.options.items[r]))}this.options.items=i,this._children=n,BI.each(t,function(e,t){t._destroy()})},shouldUpdateItem:function(e,t){if(e<0||e>this.options.items.length-1)return!1;var i=this._children[this._getChildName(e)];return i.shouldUpdate?!0===i.shouldUpdate(this._getOptions(t)):null},updateItemAt:function(e,t){if(!(e<0||e>this.options.items.length-1)){var i;if(i=this._children[this._getChildName(e)].update(this._getOptions(t)))return i;var n=this._children[this._getChildName(e)];delete this._children[this._getChildName(e)],this.options.items.splice(e,1);var r=this._addElement(e,t);this.options.items.splice(e,0,t),this._children[this._getChildName(e)]=r,0<e?this._children[this._getChildName(e-1)].element.after(r.element):r.element.prependTo(this._getWrapper()),n._destroy(),r._mount()}},addItems:function(e,n){var r=this,o=this.options,a=BI.Widget._renderEngine.createFragment(),s=[];BI.each(e,function(e,t){var i=r._addElement(o.items.length,t,n);r._children[r._getChildName(o.items.length)]=i,o.items.push(t),s.push(i),a.appendChild(i.element[0])}),this._isMounted&&(this._getWrapper().append(a),BI.each(s,function(e,t){t._mount()}))},prependItems:function(e,t){e=e||[];for(var i=BI.Widget._renderEngine.createFragment(),n=[],r=e.length-1;0<=r;r--){this._addItemAt(0,e[r]);var o=this._addElement(0,e[r],t);this._children[this._getChildName(0)]=o,this.options.items.unshift(e[r]),n.push(o),i.appendChild(o.element[0])}this._isMounted&&(this._getWrapper().prepend(i),BI.each(n,function(e,t){t._mount()}))},getValue:function(){var i,n=this,r=[];return BI.each(this.options.items,function(e){if(i=n._children[n._getChildName(e)]){var t=i.getValue();t=BI.isArray(t)?t:[t],r=r.concat(t)}}),r},setValue:function(t){var i,n=this;BI.each(this.options.items,function(e){(i=n._children[n._getChildName(e)])&&i.setValue(t)})},setText:function(t){var i,n=this;BI.each(this.options.items,function(e){(i=n._children[n._getChildName(e)])&&i.setText(t)})},patchItem:function(e,t,i){var n=this.shouldUpdateItem(i,t);if(!0===n||null===n&&!this._compare(e,t))return this.updateItemAt(i,t)},updateChildren:function(i,e){var n,s=this,t=0,r=0,o=i.length-1,a=i[0],l=i[o],u=e.length-1,c=e[0],h=e[u],p={};for(BI.each(i,function(e,t){var i=null==(t=s._getOptions(t)).key?e:t.key;BI.isKey(i)&&(p[i]=s._children[s._getChildName(e)])});t<=o&&r<=u;)if(BI.isNull(a))a=i[++t];else if(BI.isNull(l))l=i[--o];else if(g(a,c,t,r))n=this.patchItem(a,c,t)||n,p[null==a.key?this._getChildName(t):a.key]=this._children[this._getChildName(t)],a=i[++t],c=e[++r];else if(g(l,h,o,u))n=this.patchItem(l,h,o)||n,p[null==l.key?this._getChildName(o):l.key]=this._children[this._getChildName(o)],l=i[--o],h=e[--u];else if(g(a,h))n=this.patchItem(a,h,t)||n,p[null==a.key?this._getChildName(t):a.key]=this._children[this._getChildName(t)],I(a,l,!0),a=i[++t],h=e[--u];else if(g(l,c))n=this.patchItem(l,c,o)||n,p[null==l.key?this._getChildName(o):l.key]=this._children[this._getChildName(o)],I(l,a),l=i[--o],c=e[++r];else{var d=B(i,c,t,o);if(BI.isNull(d))I(f(c),a),c=e[++r];else BI.each(i,function(e,t){t&&g(t,c)&&(n=s.patchItem(d,c,e)||n,p[null==d.key?s._getChildName(e):d.key]=s._children[s._getChildName(e)],i[e]=undefined,I(d,a))}),c=e[++r]}function g(e,t,i,n){return e=s._getOptions(e),t=s._getOptions(t),BI.isKey(e.key)?e.key===t.key:0<=i?i===n:void 0}function f(e,t){var i=s._getOptions(e),n=null==i.key?s._getChildName(t):i.key;return p[n]=s._addElement(n,e)}function I(e,t,i,n){e=s._getOptions(e),t=t&&s._getOptions(t);var r=BI.isKey(e.key)?e.key:s._getChildName(n);if(t&&p[t.key]){var o,a=BI.isKey(t.key)?t.key:s._getChildName(n);0<(o=i?p[a].element.next():p[a].element).length?o.before(p[r].element):s._getWrapper().append(p[r].element)}else s._getWrapper().append(p[r].element)}function B(e,t,i,n){var r,o;for(r=i;r<=n;++r)e[r]&&g(e[r],t)&&(o=e[r]);return o}return o<t?function E(e,t,i,n){for(;i<=n;++i){I(f(t[i],i),e,!1,i)}}(BI.isNull(e[u+1])?null:e[u+1],e,r,u):u<r&&function _(e,t,i){for(;t<=i;++t){var n=e[t];if(BI.isNotNull(n)){var r=s._getOptions(n),o=null==r.key?s._getChildName(t):r.key;delete s._children[s._getChildName(o)],p[o]._destroy()}}}(i,t,o),this._children={},BI.each(e,function(e,t){var i=s._getOptions(t),n=null==i.key?s._getChildName(e):i.key;p[n]._mount(),s._children[s._getChildName(e)]=p[n]}),n},update:function(e){var t=this.options,i=e.items||[],n=this.updateChildren(t.items,i);return this.options.items=i,n},stroke:function(e){var i=this;BI.each(e,function(e,t){t&&i._addElement(e,t)})},removeWidget:function(i){var n;BI.isWidget(i)?BI.each(this._children,function(e,t){t===i&&(n=e)}):n=i,n&&this._removeItemAt(0|n)},empty:function(){BI.Layout.superclass.empty.apply(this,arguments),this.options.items=[]},destroy:function(){BI.Layout.superclass.destroy.apply(this,arguments),this.options.items=[]},populate:function(e){this.options;e=e||[],this._isMounted?this.update({items:e}):(this.options.items=e,this.stroke(e))},resize:function(){}}),BI.shortcut("bi.layout",BI.Layout)},function(e,t){var r,o,a,s,l;BI.Plugin=BI.Plugin||{},a={},s={},l={},BI.extend(BI.Plugin,{getWidget:function(e,t){var i;if(r&&r(e,t),l[e])for(var n=l[e].length-1;0<=n;n--)(i=l[e][n](t))&&(t=i);if(a[e])for(n=a[e].length-1;0<=n;n--)if(i=a[e][n](t))return i;return t},config:function(e,t){r=e,o=t},configWidget:function(e,t){l[e]||(l[e]=[]),l[e].push(t)},registerWidget:function(e,t){a[e]||(a[e]=[]),0<a[e].length&&console.log("组件已经注册过了!"),a[e].push(t)},relieveWidget:function(e){delete a[e]},getObject:function(e,t){if(o&&o(e,t),s[e])for(var i,n=0,r=s[e].length;n<r;n++)(i=s[e][n](t))&&(t=i);return i||t},registerObject:function(e,t){s[e]||(s[e]=[]),0<s[e].length&&console.log("对象已经注册过了!"),s[e].push(t)},relieveObject:function(e){delete s[e]}})},function(e,t){BI.Action=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.Action.superclass._defaultConfig.apply(this,arguments),{src:null,tar:null})},_init:function(){BI.Action.superclass._init.apply(this,arguments)},actionPerformed:function(e,t,i){},actionBack:function(e,t,i){}}),BI.ActionFactory={createAction:function(e,t){var i;switch(e){case"show":i=BI.ShowAction}return new i(t)}}},function(e,t){BI.ShowAction=BI.inherit(BI.Action,{_defaultConfig:function(){return BI.extend(BI.ShowAction.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.ShowAction.superclass._init.apply(this,arguments)},actionPerformed:function(e,t,i){(t=t||this.options.tar).setVisible(!0),i&&i()},actionBack:function(e,t,i){(e=e||this.options.tar).setVisible(!1),i&&i()}})},function(e,t){BI.HighlightBehavior=BI.inherit(BI.Behavior,{_defaultConfig:function(){return BI.extend(BI.HighlightBehavior.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.HighlightBehavior.superclass._init.apply(this,arguments)},doBehavior:function(e){var r=Array.prototype.slice.call(arguments,1),o=this.options;BI.each(e,function(e,t){if(t instanceof BI.Single){var i=o.rule(t.getValue(),t);function n(e){!0===e?t.doHighLight&&t.doHighLight.apply(t,r):t.unHighLight&&t.unHighLight.apply(t,r)}BI.isFunction(i)?i(n):n(i)}else t.doBehavior&&t.doBehavior.apply(t,r)})}})},function(e,t){BI.RedMarkBehavior=BI.inherit(BI.Behavior,{_defaultConfig:function(){return BI.extend(BI.RedMarkBehavior.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.RedMarkBehavior.superclass._init.apply(this,arguments)},doBehavior:function(e){var i=Array.prototype.slice.call(arguments,1),n=this.options;BI.each(e,function(e,t){t instanceof BI.Single?n.rule(t.getValue(),t)?t.doRedMark&&t.doRedMark.apply(t,i):t.doRedMark&&t.unRedMark.apply(t,i):t.doBehavior&&t.doBehavior.apply(t,i)})}})},function(e,t){BI.Controller=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.Controller.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.Controller.superclass._init.apply(this,arguments)},destroy:function(){}}),BI.Controller.EVENT_CHANGE="__EVENT_CHANGE__"},function(e,t){BI.BroadcastController=BI.inherit(BI.Controller,{_defaultConfig:function(){return BI.extend(BI.BroadcastController.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.BroadcastController.superclass._init.apply(this,arguments),this._broadcasts={}},on:function(e,t){var i=this;return this._broadcasts[e]||(this._broadcasts[e]=[]),this._broadcasts[e].push(t),function(){i.remove(e,t)}},send:function(e){var i=[].slice.call(arguments,1);BI.each(this._broadcasts[e],function(e,t){t.apply(null,i)})},remove:function(t,i){var n=this;return i?(BI.remove(this._broadcasts[t],function(e){return n._broadcasts[t].indexOf(i)===e}),this._broadcasts[t].remove(i),0===this._broadcasts[t].length&&delete this._broadcasts[t]):delete this._broadcasts[t],this}})},function(e,t){BI.BubblesController=BI.inherit(BI.Controller,{_defaultConfig:function(){return BI.extend(BI.BubblesController.superclass._defaultConfig.apply(this,arguments),{})},_const:{bubbleHeight:18},_init:function(){BI.BubblesController.superclass._init.apply(this,arguments);var t=this;this.bubblesManager={},this.storeBubbles={},BI.Resizers.add("bubbleController"+BI.uniqueId(),function(){BI.each(t.bubblesManager,function(e){t.remove(e)}),t.bubblesManager={},t.storeBubbles={}})},_createBubble:function(e,t,i,n){return BI.createWidget({type:"bi.bubble",text:t,level:i,height:n||18,direction:e})},_getOffsetLeft:function(e,t,i){var n=0;return"center"===i?((n=t.element.offset().left+(t.element.bounds().width-this.get(e).element.bounds().width)/2)<0&&(n=0),n):"right"===i?((n=t.element.offset().left+t.element.bounds().width-this.get(e).element.bounds().width)<0&&(n=0),n):t.element.offset().left},_getOffsetTop:function(e,t,i){var n=0;return"center"===i?((n=t.element.offset().top+(t.element.bounds().height-this.get(e).element.bounds().height)/2)<0&&(n=0),n):"right"===i?((n=t.element.offset().top+t.element.bounds().height-this.get(e).element.bounds().height)<0&&(n=0),n):t.element.offset().top},_getLeftPosition:function(e,t,i){var n=BI.DOM.getLeftPosition(t,this.get(e));return n.top=this._getOffsetTop(e,t,i),n},_getBottomPosition:function(e,t,i){var n=BI.DOM.getBottomPosition(t,this.get(e));return n.left=this._getOffsetLeft(e,t,i),n},_getTopPosition:function(e,t,i){var n=BI.DOM.getTopPosition(t,this.get(e));return n.left=this._getOffsetLeft(e,t,i),n},_getRightPosition:function(e,t,i){var n=BI.DOM.getRightPosition(t,this.get(e));return n.top=this._getOffsetTop(e,t,i),n},show:function(e,t,i,n){var r=(n=n||{}).container||i,o=n.offsetStyle||{},a=n.level||"error",s=n.adjustYOffset||0,l=n.adjustXOffset||0;this.storeBubbles[e]||(this.storeBubbles[e]={}),this.storeBubbles[e].top||(this.storeBubbles[e].top=this._createBubble("top",t,a)),BI.createWidget({type:"bi.absolute",element:r,items:[{el:this.storeBubbles[e].top}]}),this.set(e,this.storeBubbles[e].top);var u=this._getTopPosition(e,i,o);if(this.get(e).element.css({left:u.left+l,top:u.top-s}),this.get(e).invisible(),!BI.DOM.isTopSpaceEnough(i,this.get(e),s)){this.storeBubbles[e].left||(this.storeBubbles[e].left=this._createBubble("left",t,a,30)),BI.createWidget({type:"bi.absolute",element:r,items:[{el:this.storeBubbles[e].left}]}),this.set(e,this.storeBubbles[e].left);u=this._getLeftPosition(e,i,o);if(this.get(e).element.css({left:u.left-l,top:u.top-s}),this.get(e).invisible(),!BI.DOM.isLeftSpaceEnough(i,this.get(e),l)){this.storeBubbles[e].right||(this.storeBubbles[e].right=this._createBubble("right",t,a,30)),BI.createWidget({type:"bi.absolute",element:r,items:[{el:this.storeBubbles[e].right}]}),this.set(e,this.storeBubbles[e].right);u=this._getRightPosition(e,i,o);if(this.get(e).element.css({left:u.left+l,top:u.top-s}),this.get(e).invisible(),!BI.DOM.isRightSpaceEnough(i,this.get(e),l)){this.storeBubbles[e].bottom||(this.storeBubbles[e].bottom=this._createBubble("bottom",t,a)),BI.createWidget({type:"bi.absolute",element:r,items:[{el:this.storeBubbles[e].bottom}]}),this.set(e,this.storeBubbles[e].bottom);u=this._getBottomPosition(e,i,o);this.get(e).element.css({left:u.left+l,top:u.top+s}),this.get(e).invisible()}}}return this.get(e).setText(t),this.get(e).visible(),this},hide:function(e){return this.has(e)&&this.get(e).invisible(),this},add:function(e,t){return this.has(e)||this.set(e,t),this},get:function(e){return this.bubblesManager[e]},set:function(e,t){this.bubblesManager[e]=t},has:function(e){return null!=this.bubblesManager[e]},remove:function(e){return this.has(e)&&(BI.each(this.storeBubbles[e],function(e,t){t.destroy()}),delete this.storeBubbles[e],delete this.bubblesManager[e]),this}})},function(e,t){BI.LayerController=BI.inherit(BI.Controller,{_defaultConfig:function(){return BI.extend(BI.LayerController.superclass._defaultConfig.apply(this,arguments),{render:"body"})},_init:function(){BI.LayerController.superclass._init.apply(this,arguments),this.layerManager={},this.layouts={},this.zindex=BI.zIndex_layer,BI.Resizers.add("layerController"+BI.uniqueId(),BI.bind(this._resize,this))},_resize:function(){BI.each(this.layouts,function(e,t){t.element.is(":visible")&&t.element.trigger("__resize__")})},make:function(e,t,i,n){return BI.isWidget(t)?(i=i||{}).container=t:(n=i,i=t),this.create(e,null,i,n)},create:function(e,t,i,n){if(this.has(e))return this.get(e);var r=(i=i||{}).offset||{},o=t;if(BI.isWidget(t)&&(o=t.element),BI.isNotEmptyString(o)&&(o=BI.Widget._renderEngine.createElement(o)),this.has(e))return this.get(e);var a=BI.createWidget(i.render||{},BI.extend({type:"bi.layout"},i),n),s=BI.createWidget({type:"bi.absolute",invisible:!0,items:[{el:a,left:0,right:0,top:0,bottom:0}]},n);return BI.createWidget({type:"bi.absolute",element:i.container||this.options.render,items:[{el:s,left:r.left||0,right:r.right||0,top:r.top||0,bottom:r.bottom||0}]}),o&&(s.element.addClass("bi-popup-view"),s.element.css({left:o.offset().left+(r.left||0),top:o.offset().top+(r.top||0),width:r.width||o.outerWidth()-(r.left||0)-(r.right||0)||"",height:r.height||o.outerHeight()-(r.top||0)-(r.bottom||0)||""}),s.element.on("__resize__",function(){o.is(":visible")&&s.element.css({left:o.offset().left+(r.left||0),top:o.offset().top+(r.top||0),width:r.width||o.outerWidth()-(r.left||0)-(r.right||0)||"",height:r.height||o.outerHeight()-(r.top||0)-(r.bottom||0)||""})})),this.add(e,a,s),a},hide:function(e,t){return this.has(e)&&(this._getLayout(e).invisible(),this._getLayout(e).element.hide(0,t)),this},show:function(e,t){return this.has(e)&&(this._getLayout(e).visible(),this._getLayout(e).element.css("z-index",this.zindex++).show(0,t).trigger("__resize__")),this},isVisible:function(e){return this.has(e)&&this._getLayout(e).isVisible()},add:function(e,t,i){if(this.has(e))throw new Error("name is already exist");return i.setVisible(!1),this.layerManager[e]=t,(this.layouts[e]=i).element.css("z-index",this.zindex++),this},_getLayout:function(e){return this.layouts[e]},get:function(e){return this.layerManager[e]},has:function(e){return null!=this.layerManager[e]},remove:function(e){return this.has(e)&&(this.layerManager[e].destroy(),this.layouts[e].destroy(),delete this.layerManager[e],delete this.layouts[e]),this},removeAll:function(){var i=this;return BI.each(BI.keys(this.layerManager),function(e,t){i.layerManager[t].destroy(),i.layouts[t].destroy()}),this.layerManager={},this.layouts={},this}})},function(e,t){BI.MaskersController=BI.inherit(BI.LayerController,{_defaultConfig:function(){return BI.extend(BI.MaskersController.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.MaskersController.superclass._init.apply(this,arguments),this.zindex=BI.zIndex_masker}})},function(e,t){BI.PopoverController=BI.inherit(BI.Controller,{_defaultConfig:function(){return BI.extend(BI.PopoverController.superclass._defaultConfig.apply(this,arguments),{modal:!0,render:"body"})},_init:function(){BI.PopoverController.superclass._init.apply(this,arguments),this.modal=this.options.modal,this.floatManager={},this.floatLayer={},this.floatContainer={},this.floatOpened={},this.zindex=BI.zIndex_popover,this.zindexMap={}},_check:function(e){return BI.isNotNull(this.floatManager[e])},create:function(e,t,i){if(this._check(e))return this;var n=BI.createWidget(t||{},{type:"bi.popover"},i);return this.add(e,n,t,i),this},add:function(e,t,i,n){var r,o=this;return i=i||{},this._check(e)||(this.floatContainer[e]=BI.createWidget({type:"bi.absolute",cls:"bi-popup-view",items:[{el:this.floatLayer[e]=BI.createWidget({type:"bi.absolute",items:[t]},n),left:0,right:0,top:0,bottom:0}]}),this.floatManager[e]=t,r=e,t.on(BI.Popover.EVENT_CLOSE,function(){o.close(r)}),BI.createWidget({type:"bi.absolute",element:i.container||this.options.render,items:[{el:this.floatContainer[e],left:0,right:0,top:0,bottom:0}]})),this},open:function(e){if(!this._check(e))return this;if(!this.floatOpened[e]){this.floatOpened[e]=!0;var t=this.floatContainer[e];t.element.css("zIndex",this.zindex++),this.modal&&t.element.__hasZIndexMask__(this.zindexMap[e])&&t.element.__releaseZIndexMask__(this.zindexMap[e]),this.zindexMap[e]=this.zindex,this.modal&&t.element.__buildZIndexMask__(this.zindex++),this.get(e).setZindex(this.zindex++),this.floatContainer[e].visible();var i=this.get(e);i.show&&i.show();var n=BI.Widget._renderEngine.createElement(this.options.render).width(),r=BI.Widget._renderEngine.createElement(this.options.render).height(),o=(n-i.element.width())/2,a=(r-i.element.height())/2;o<0&&(o=0),a<0&&(a=0),i.element.css({left:o+"px",top:a+"px"})}return this},close:function(e){return this._check(e)&&this.floatOpened[e]&&(delete this.floatOpened[e],this.floatContainer[e].invisible(),this.modal&&this.floatContainer[e].element.__releaseZIndexMask__(this.zindexMap[e])),this},get:function(e){return this.floatManager[e]},remove:function(e){return this._check(e)&&(this.floatContainer[e].destroy(),this.modal&&this.floatContainer[e].element.__releaseZIndexMask__(this.zindexMap[e]),delete this.floatManager[e],delete this.floatLayer[e],delete this.zindexMap[e],delete this.floatContainer[e],delete this.floatOpened[e]),this},removeAll:function(){var i=this;return BI.each(this.floatContainer,function(e,t){t.destroy(),i.modal&&i.floatContainer[e].element.__releaseZIndexMask__(i.zindexMap[e])}),this.floatManager={},this.floatLayer={},this.floatContainer={},this.floatOpened={},this.zindexMap={},this}})},function(e,t){BI.ResizeController=BI.inherit(BI.Controller,{_defaultConfig:function(){return BI.extend(BI.ResizeController.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.ResizeController.superclass._init.apply(this,arguments);var t=this;this.resizerManger={};var e=BI.debounce(function(e){t._resize(e)},30);BI.Widget._renderEngine.createElement(_global).resize(e)},_resize:function(i){BI.each(this.resizerManger,function(e,t){t instanceof BI.$?t.is(":visible")&&t.trigger("__resize__"):t instanceof BI.Layout?t.resize():BI.isFunction(t)&&t(i)})},add:function(e,t){var i=this;return this.has(e)?this:(this.resizerManger[e]=t,function(){i.remove(e)})},get:function(e){return this.resizerManger[e]},has:function(e){return null!=this.resizerManger[e]},remove:function(e){return this.has(e)&&delete this.resizerManger[e],this}})},function(e,t){BI.TooltipsController=BI.inherit(BI.Controller,{_defaultConfig:function(){return BI.extend(BI.TooltipsController.superclass._defaultConfig.apply(this,arguments),{})},_const:{height:18},_init:function(){BI.TooltipsController.superclass._init.apply(this,arguments),this.tooltipsManager={},this.showingTips={}},_createTooltip:function(e,t){return BI.createWidget({type:"bi.tooltip",text:e,level:t,stopEvent:!0})},hide:function(e,t){return this.has(e)&&(delete this.showingTips[e],this.get(e).element.hide(0,t),this.get(e).invisible()),this},create:function(e,t,i,n){if(!this.has(e)){var r=this._createTooltip(t,i);this.add(e,r),BI.createWidget({type:"bi.absolute",element:n||"body",items:[{el:r}]}),r.invisible()}return this.get(e)},show:function(e,t,i,n,r,o){o=o||{};var a=this;if(BI.each(this.showingTips,function(e,t){a.hide(e)}),this.showingTips={},this.has(t)||this.create(t,i,n,o.container||"body"),!o.belowMouse){var s=r.element.offset(),l=r.element.bounds();if(0===l.height||0===l.width)return;var u=s.top+l.height+5}var c=this.get(t);c.setText(i),c.element.css({left:"0px",top:"0px"}),c.visible(),c.element.height(c.element[0].scrollHeight),this.showingTips[t]=!0;var h=(e.pageX||e.clientX)+15,p=(e.pageY||e.clientY)+15;h+c.element.outerWidth()>BI.Widget._renderEngine.createElement("body").outerWidth()&&(h-=c.element.outerWidth()+15);var d=BI.Widget._renderEngine.createElement("body").outerHeight();return p+c.element.outerHeight()>d||u+c.element.outerHeight()>d?(p-=c.element.outerHeight()+15,o.belowMouse||(p=Math.min(p,s.top-c.element.outerHeight()-5))):o.belowMouse||(p=Math.max(p,u)),c.element.css({left:h<0?0:h+"px",top:p<0?0:p+"px"}),c.element.hover(function(){a.remove(t),r.element.trigger("mouseleave.title"+r.getName())}),this},add:function(e,t){return this.has(e)||this.set(e,t),this},get:function(e){return this.tooltipsManager[e]},set:function(e,t){this.tooltipsManager[e]=t},has:function(e){return null!=this.tooltipsManager[e]},remove:function(e){return this.has(e)&&(this.tooltipsManager[e].destroy(),delete this.tooltipsManager[e]),this}})},function(e,t){_.extend(BI,{Events:{KEYDOWN:"_KEYDOWN",BACKSPACE:"_BACKSPACE",SPACE:"_SPACE",ENTER:"_ENTER",CONFIRM:"_CONFIRM",ERROR:"_ERROR",PAUSE:"_PAUSE",DESTROY:"_DESTROY",MOUNT:"_MOUNT",UNMOUNT:"_UNMOUNT",CLEAR:"_CLEAR",ADD:"_ADD",EDITING:"_EDITING",EMPTY:"_EMPTY",VIEW:"_VIEW",RESIZE:"_RESIZE",BEFOREEDIT:"_BEFOREEDIT",AFTEREDIT:"_AFTEREDIT",STARTEDIT:"_STARTEDIT",STOPEDIT:"_STOPEDIT",CHANGE:"_CHANGE",EXPAND:"_EXPAND",COLLAPSE:"_COLLAPSE",CALLBACK:"_CALLBACK",CLICK:"_CLICK",STATECHANGE:"_STATECHANGE",BEFORESTATECHANGE:"_BEFORESTATECHANGE",INIT:"_INIT",AFTERINIT:"_AFTERINIT",SCROLL:"_SCROLL",STARTLOAD:"_STARTLOAD",AFTERLOAD:"_AFTERLOAD",BS:"beforesubmit",AS:"aftersubmit",SC:"submitcomplete",SF:"submitfailure",SS:"submitsuccess",BVW:"beforeverifywrite",AVW:"afterverifywrite",AV:"afterverify",BW:"beforewrite",AW:"afterwrite",WS:"writesuccess",WF:"writefailure",BA:"beforeappend",AA:"afterappend",BD:"beforedelete",AD:"beforedelete",UC:"unloadcheck",BTOPDF:"beforetopdf",ATOPDF:"aftertopdf",BTOEXCEL:"beforetoexcel",ATOEXCEL:"aftertoexcel",BTOWORD:"beforetoword",ATOWORD:"aftertoword",BTOIMAGE:"beforetoimage",ATOIMAGE:"aftertoimage",BTOHTML:"beforetohtml",ATOHTML:"aftertohtml",BIMEXCEL:"beforeimportexcel",AIMEXCEL:"afterimportexcel",BPDFPRINT:"beforepdfprint",APDFPRINT:"afterpdfprint",BFLASHPRINT:"beforeflashprint",AFLASHPRINT:"afterflashprint",BAPPLETPRINT:"beforeappletprint",AAPPLETPRINT:"afterappletprint",BSEVERPRINT:"beforeserverprint",ASERVERPRINT:"afterserverprint",BEMAIL:"beforeemail",AEMAIL:"afteremail"}})},function(e,t){BI.prepares.push(function(){BI.Date=BI.Date||{},BI.Date._DN=[BI.i18nText("BI-Basic_Sunday"),BI.i18nText("BI-Basic_Monday"),BI.i18nText("BI-Basic_Tuesday"),BI.i18nText("BI-Basic_Wednesday"),BI.i18nText("BI-Basic_Thursday"),BI.i18nText("BI-Basic_Friday"),BI.i18nText("BI-Basic_Saturday"),BI.i18nText("BI-Basic_Sunday")],BI.Date._SDN=[BI.i18nText("BI-Basic_Simple_Sunday"),BI.i18nText("BI-Basic_Simple_Monday"),BI.i18nText("BI-Basic_Simple_Tuesday"),BI.i18nText("BI-Basic_Simple_Wednesday"),BI.i18nText("BI-Basic_Simple_Thursday"),BI.i18nText("BI-Basic_Simple_Friday"),BI.i18nText("BI-Basic_Simple_Saturday"),BI.i18nText("BI-Basic_Simple_Sunday")],BI.Date._FD=1,BI.Date._MN=[BI.i18nText("BI-Basic_January"),BI.i18nText("BI-Basic_February"),BI.i18nText("BI-Basic_March"),BI.i18nText("BI-Basic_April"),BI.i18nText("BI-Basic_May"),BI.i18nText("BI-Basic_June"),BI.i18nText("BI-Basic_July"),BI.i18nText("BI-Basic_August"),BI.i18nText("BI-Basic_September"),BI.i18nText("BI-Basic_October"),BI.i18nText("BI-Basic_November"),BI.i18nText("BI-Basic_December")],BI.Date._SMN=[0,1,2,3,4,5,6,7,8,9,10,11],BI.Date._QN=["",BI.i18nText("BI-Quarter_1"),BI.i18nText("BI-Quarter_2"),BI.i18nText("BI-Quarter_3"),BI.i18nText("BI-Quarter_4")],BI.Date._MD=[31,28,31,30,31,30,31,31,30,31,30,31],BI.Date._OFFSET=[0,-1,-2,-3,-4,-5,-6]})},function(e,t){BI.ShowListener=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.ShowListener.superclass._defaultConfig.apply(this,arguments),{eventObj:BI.createWidget(),cardLayout:null,cardNameCreator:function(e){return e},cardCreator:BI.emptyFn,afterCardCreated:BI.emptyFn,afterCardShow:BI.emptyFn})},_init:function(){BI.ShowListener.superclass._init.apply(this,arguments);var o=this,a=this.options;a.eventObj&&a.eventObj.on(BI.Controller.EVENT_CHANGE,function(e,t,i){if(e===BI.Events.CLICK){if(t=t||a.eventObj.getValue(),t=BI.isArray(t)?1<t.length?t.toString():t[0]:t,BI.isNull(t))throw new Error("value cannot be null");var n=a.cardNameCreator(t);if(!a.cardLayout.isCardExisted(n)){var r=a.cardCreator(n);a.cardLayout.addCardByName(n,r),a.afterCardCreated(n)}a.cardLayout.showCardByName(n),BI.nextTick(function(){a.afterCardShow(n),o.fireEvent(BI.ShowListener.EVENT_CHANGE,n)})}})}}),BI.ShowListener.EVENT_CHANGE="EVENT_CHANGE"},function(e,t){BI.StyleLoaderManager=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.StyleLoaderManager.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.StyleLoaderManager.superclass._init.apply(this,arguments),this.stylesManager={}},loadStyle:function(e,t){if(_global.document){var i=document,n=i.createElement("style");return i.getElementsByTagName("head")[0].appendChild(n),n.setAttribute("type","text/css"),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t)),this.stylesManager[e]=n,this}},get:function(e){return this.stylesManager[e]},has:function(e){return null!=this.stylesManager[e]},removeStyle:function(e){return this.has(e)&&(this.stylesManager[e].parentNode.removeChild(this.stylesManager[e]),delete this.stylesManager[e]),this}})},function(e,t){BI.Logic=BI.inherit(BI.OB,{createLogic:function(){return this.options||{}}}),BI.LogicFactory={Type:{Vertical:"vertical",Horizontal:"horizontal",Table:"table",HorizontalFill:"horizontal_fill"},createLogic:function(e,t){var i;switch(e){case BI.LogicFactory.Type.Vertical:i=BI.VerticalLayoutLogic;break;case BI.LogicFactory.Type.Horizontal:i=BI.HorizontalLayoutLogic;break;case BI.LogicFactory.Type.Table:i=BI.TableLayoutLogic;break;case BI.LogicFactory.Type.HorizontalFill:i=BI.HorizontalFillLayoutLogic;break;default:i=BI.Logic}return new i(t).createLogic()},createLogicTypeByDirection:function(e){switch(e){case BI.Direction.Top:case BI.Direction.Bottom:case BI.Direction.Custom:return BI.LogicFactory.Type.Vertical;case BI.Direction.Left:case BI.Direction.Right:return BI.LogicFactory.Type.Horizontal}},createLogicItemsByDirection:function(e){var t=Array.prototype.slice.call(arguments,1);switch(t=BI.map(t,function(e,t){return BI.isWidget(t)?{el:t,width:t.options.width,height:t.options.height}:t}),e){case BI.Direction.Bottom:BI.LogicFactory.Type.Vertical,t.reverse();break;case BI.Direction.Right:BI.LogicFactory.Type.Horizontal,t.reverse();break;case BI.Direction.Custom:t=t.slice(1)}return t}}},function(e,t){BI.VerticalLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.VerticalLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,items:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},createLogic:function(){var e=this.options;return{type:e.dynamic?"bi.vertical":"bi.vtape",scrollable:e.scrollable,scrolly:e.scrolly,scrollx:e.scrollx,hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap,items:e.items}},_init:function(){BI.VerticalLayoutLogic.superclass._init.apply(this,arguments)}}),BI.HorizontalLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.HorizontalLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,items:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},createLogic:function(){var e=this.options;return{type:e.dynamic?"bi.vertical_adapt":"bi.htape",scrollable:e.scrollable,scrolly:e.scrolly,scrollx:e.scrollx,hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap,items:e.items}},_init:function(){BI.HorizontalLayoutLogic.superclass._init.apply(this,arguments)}}),BI.TableLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.TableLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,columns:0,rows:0,columnSize:[],rowSize:[],hgap:0,vgap:0,items:[]})},createLogic:function(){var e=this.options;return{type:e.dynamic?"bi.table":"bi.window",scrollable:e.scrollable,scrolly:e.scrolly,scrollx:e.scrollx,columns:e.columns,rows:e.rows,columnSize:e.columnSize,rowSize:e.rowSize,hgap:e.hgap,vgap:e.vgap,items:e.items}},_init:function(){BI.TableLayoutLogic.superclass._init.apply(this,arguments)}}),BI.HorizontalFillLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.HorizontalFillLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,items:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},createLogic:function(){var e=this.options,i=[];return BI.each(e.items,function(e,t){i.push(t.width||0)}),{type:e.dynamic?"bi.horizontal_adapt":"bi.htape",columnSize:i,scrollable:e.scrollable,scrolly:e.scrolly,scrollx:e.scrollx,hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap,items:e.items}},_init:function(){BI.HorizontalFillLayoutLogic.superclass._init.apply(this,arguments)}})},function(e,t){function c(e,t){for(var i=-1;++i<r;)t+=e*o[i],o[i]=t%n,t=Math.floor(t/n)}function h(e){for(var t=r,i=0;0<=--t;)i+=o[t],o[t]=Math.floor(i/e),i=i%e*n}function p(){for(var e=r,t="";0<=--e;)if(""!==t||0===e||0!==o[e]){var i=String(o[e]);""===t?t=i:t+="0000000".slice(0,7-i.length)+i}return t}function d(e,t,i){return 0===t?i:t%2==1?d(e,t-1,i*e):d(e*e,t/2,i)}var n,r,o;Number.prototype.toFixed&&"0.000"===8e-5.toFixed(3)&&"0"!==.9.toFixed(0)&&"1.25"===1.255.toFixed(2)&&"1000000000000000128"===(0xde0b6b3a7640080).toFixed(0)||(n=1e7,r=6,o=[0,0,0,0,0,0],Number.prototype.toFixed=function(e){var t,i,n,r,o,a,s,l;if((t=(t=Number(e))!=t?0:Math.floor(t))<0||20<t)throw new RangeError("Number.toFixed called with invalid number of decimals");if((i=Number(this))!=i)return"NaN";if(i<=-1e21||1e21<i)return String(i);if(n="",i<0&&(n="-",i=-i),r="0",1e-21<i)if(a=(o=function u(e){for(var t=0;4096<=e;)t+=12,e/=4096;for(;2<=e;)t+=1,e/=2;return t}(i*d(2,69,1))-69)<0?i*d(2,-o,1):i/d(2,o,1),a*=4503599627370496,0<(o=52-o)){for(c(0,a),s=t;7<=s;)c(1e7,0),s-=7;for(c(d(10,s,1),0),s=o-1;23<=s;)h(1<<23),s-=23;h(1<<s),c(1,1),h(2),r=p()}else c(0,a),c(1<<-o,0),r=p()+"0.00000000000000000000".slice(2,2+t);return r=0<t?(l=r.length)<=t?n+"0.0000000000000000000".slice(0,t-l+2)+r:n+r.slice(0,l-t)+"."+r.slice(l-t):n+r})},function(e,t){BI.version="2.0"},function(e,t){BI.AbsoluteCenterLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.AbsoluteCenterLayout.superclass.props.apply(this,arguments),{baseCls:"bi-absolute-center-layout",hgap:0,lgap:0,rgap:0,vgap:0,tgap:0,bgap:0})},render:function(){BI.AbsoluteCenterLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.AbsoluteCenterLayout.superclass._addElement.apply(this,arguments);return n.element.css({position:"absolute",left:i.hgap+i.lgap+(t.lgap||0)+(t.hgap||0),right:i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0),top:i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0),bottom:i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0),margin:"auto"}),n},resize:function(){},populate:function(e){BI.AbsoluteCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute_center_adapt",BI.AbsoluteCenterLayout)},function(e,t){BI.AbsoluteHorizontalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.AbsoluteHorizontalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-absolute-horizontal-layout",hgap:0,lgap:0,rgap:0,vgap:0,tgap:0,bgap:0})},render:function(){BI.AbsoluteHorizontalLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.AbsoluteHorizontalLayout.superclass._addElement.apply(this,arguments);return n.element.css({position:"absolute",left:i.hgap+i.lgap+(t.lgap||0)+(t.hgap||0),right:i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0),margin:"auto"}),i.vgap+i.tgap+(t.vgap||0)+(t.tgap||0)!==0&&n.element.css("top",i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0)),i.vgap+i.bgap+(t.vgap||0)+(t.bgap||0)!==0&&n.element.css("bottom",i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)),n},resize:function(){},populate:function(e){BI.AbsoluteHorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute_horizontal_adapt",BI.AbsoluteHorizontalLayout)},function(e,t){BI.AbsoluteVerticalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.AbsoluteVerticalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-absolute-vertical-layout",hgap:0,lgap:0,rgap:0,vgap:0,tgap:0,bgap:0})},render:function(){BI.AbsoluteVerticalLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.AbsoluteVerticalLayout.superclass._addElement.apply(this,arguments);return n.element.css({position:"absolute",left:t.lgap,right:t.rgap,top:i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0),bottom:i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0),margin:"auto"}),i.hgap+i.lgap+(t.hgap||0)+(t.lgap||0)!==0&&n.element.css("left",i.hgap+i.lgap+(t.lgap||0)+(t.hgap||0)),i.hgap+i.rgap+(t.hgap||0)+(t.rgap||0)!==0&&n.element.css("right",i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)),n},resize:function(){},populate:function(e){BI.AbsoluteVerticalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute_vertical_adapt",BI.AbsoluteVerticalLayout)},function(e,t){BI.CenterAdaptLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.CenterAdaptLayout.superclass.props.apply(this,arguments),{baseCls:"bi-center-adapt-layout",horizontalAlign:BI.HorizontalAlign.Center,columnSize:[],scrollx:!1,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){var e=this.options,t=this;return BI.CenterAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.horizontal",verticalAlign:BI.VerticalAlign.Middle,horizontalAlign:e.horizontalAlign,columnSize:e.columnSize,scrollx:e.scrollx,items:e.items,ref:function(e){t.layout=e},hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap}},resize:function(){},populate:function(e){this.layout.populate.apply(this,arguments)}}),BI.shortcut("bi.center_adapt",BI.CenterAdaptLayout)},function(e,t){BI.HorizontalAdaptLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.HorizontalAdaptLayout.superclass.props.apply(this,arguments),{baseCls:"bi-horizontal-adapt-layout",verticalAlign:BI.VerticalAlign.Top,horizontalAlign:BI.HorizontalAlign.Center,columnSize:[],scrollx:!1,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){var t=this,e=this.options;return BI.HorizontalAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.horizontal",verticalAlign:BI.VerticalAlign.Top,horizontalAlign:e.horizontalAlign,columnSize:e.columnSize,items:e.items,scrollx:e.scrollx,ref:function(e){t.layout=e},hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap}},resize:function(){},populate:function(e){this.layout.populate.apply(this,arguments)}}),BI.shortcut("bi.horizontal_adapt",BI.HorizontalAdaptLayout)},function(e,t){BI.LeftRightVerticalAdaptLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.LeftRightVerticalAdaptLayout.superclass.props.apply(this,arguments),{baseCls:"bi-left-right-vertical-adapt-layout",items:{},llgap:0,lrgap:0,lhgap:0,rlgap:0,rrgap:0,rhgap:0})},render:function(){var e=this.options;BI.LeftRightVerticalAdaptLayout.superclass.render.apply(this,arguments);var t=[];return"left"in e.items&&t.push({type:"bi.left",items:[{el:{type:"bi.vertical_adapt",height:"100%",items:e.items.left,hgap:e.lhgap,lgap:e.llgap,rgap:e.lrgap}}]}),"right"in e.items&&t.push({type:"bi.right",items:[{el:{type:"bi.vertical_adapt",height:"100%",items:e.items.right,textAlign:"right",hgap:e.rhgap,lgap:e.rlgap,rgap:e.rrgap}}]}),t},resize:function(){},addItem:function(){throw new Error("cannot be added")},populate:function(e){BI.LeftRightVerticalAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.left_right_vertical_adapt",BI.LeftRightVerticalAdaptLayout),BI.LeftVerticalAdaptLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.LeftRightVerticalAdaptLayout.superclass.props.apply(this,arguments),{baseCls:"bi-left-vertical-adapt-layout",items:[],lgap:0,rgap:0,hgap:0})},render:function(){var e=this.options,t=this;return BI.LeftVerticalAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.left",ref:function(e){t.layout=e},items:[{el:{type:"bi.vertical_adapt",height:"100%",items:e.items,lgap:e.lgap,hgap:e.hgap,rgap:e.rgap}}]}},resize:function(){},addItem:function(){throw new Error("cannot be added")},populate:function(e){this.layout.populate.apply(this,arguments)}}),BI.shortcut("bi.left_vertical_adapt",BI.LeftVerticalAdaptLayout),BI.RightVerticalAdaptLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.RightVerticalAdaptLayout.superclass.props.apply(this,arguments),{baseCls:"bi-right-vertical-adapt-layout",items:[],lgap:0,rgap:0,hgap:0})},render:function(){var e=this.options,t=this;return BI.RightVerticalAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.right",ref:function(e){t.layout=e},items:[{el:{type:"bi.vertical_adapt",height:"100%",textAlign:"right",items:e.items,lgap:e.lgap,hgap:e.hgap,rgap:e.rgap}}]}},resize:function(){},addItem:function(){throw new Error("cannot be added")},populate:function(e){this.layout.populate.apply(this,arguments)}}),BI.shortcut("bi.right_vertical_adapt",BI.RightVerticalAdaptLayout)},function(e,t){BI.TableAdaptLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.TableAdaptLayout.superclass.props.apply(this,arguments),{baseCls:"bi-table-center-adapt-layout",columnSize:[],verticalAlign:BI.VerticalAlign.Top,horizontalAlign:BI.HorizontalAlign.Left,scrollx:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){var e=this.options;BI.TableAdaptLayout.superclass.render.apply(this,arguments),this.$table=BI.Widget._renderEngine.createElement("<div>").css({position:"relative",display:"table",height:e.verticalAlign===BI.VerticalAlign.Middle?"100%":"auto",width:e.horizontalAlign===BI.HorizontalAlign.Center?"100%":"auto","white-space":"nowrap"}),this.populate(this.options.items)},_addElement:function(e,t){var i,n=this.options,r=n.columnSize[e]<=1?100*n.columnSize[e]+"%":n.columnSize[e];if(this.hasWidget(this._getChildName(e)))(i=this.getWidgetByName(this._getChildName(e))).element.width(r);else{var o=BI.createWidget(t);o.element.css({position:"relative",top:"0",left:"0",margin:"0px auto"}),i=BI.createWidget({type:"bi.default",width:r,items:[o]}),this.addWidget(this._getChildName(e),i)}return i.element.css({"max-width":n.columnSize[e]<=1?r:r+"px"}),0===e&&i.element.addClass("first-element"),i.element.css({position:"relative",display:"table-cell","vertical-align":n.verticalAlign,margin:"0",padding:"0",height:"100%"}),n.vgap+n.tgap+(t.tgap||0)+(t.vgap||0)!==0&&o.element.css({"margin-top":n.vgap+n.tgap+(t.tgap||0)+(t.vgap||0)+"px"}),n.hgap+n.lgap+(t.lgap||0)+(t.hgap||0)!==0&&o.element.css({"margin-left":(0===e?n.hgap:0)+n.lgap+(t.lgap||0)+(t.hgap||0)+"px"}),n.hgap+n.rgap+(t.rgap||0)+(t.hgap||0)!==0&&o.element.css({"margin-right":n.hgap+n.rgap+(t.rgap||0)+(t.hgap||0)+"px"}),n.vgap+n.bgap+(t.bgap||0)+(t.vgap||0)!==0&&o.element.css({"margin-bottom":n.vgap+n.bgap+(t.bgap||0)+(t.vgap||0)+"px"}),i},appendFragment:function(e){this.$table.append(e),this.element.append(this.$table)},resize:function(){},populate:function(e){BI.TableAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.table_adapt",BI.TableAdaptLayout)},function(e,t){BI.VerticalAdaptLayout=BI.inherit(BI.Layout,{props:{baseCls:"bi-vertical-adapt-layout",horizontalAlign:BI.HorizontalAlign.Left,columnSize:[],scrollx:!1,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0},render:function(){var t=this,e=this.options;return BI.VerticalAdaptLayout.superclass.render.apply(this,arguments),{type:"bi.horizontal",verticalAlign:BI.VerticalAlign.Middle,horizontalAlign:e.horizontalAlign,columnSize:e.columnSize,items:e.items,scrollx:e.scrollx,ref:function(e){t.layout=e},hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap}},resize:function(){},populate:function(e){this.layout.populate.apply(this,arguments)}}),BI.shortcut("bi.vertical_adapt",BI.VerticalAdaptLayout)},function(e,t){BI.HorizontalAutoLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.HorizontalAutoLayout.superclass.props.apply(this,arguments),{baseCls:"bi-horizon-auto-layout",hgap:0,lgap:0,rgap:0,vgap:0,tgap:0,bgap:0})},render:function(){BI.HorizontalAutoLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.HorizontalAutoLayout.superclass._addElement.apply(this,arguments);return n.element.css({position:"relative",margin:"0px auto"}),i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-top":(0===e?i.vgap:0)+i.tgap+(t.tgap||0)+(t.vgap||0)+"px"}),i.hgap+i.lgap+(t.lgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-left":i.hgap+i.lgap+(t.lgap||0)+(t.hgap||0)+"px"}),i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-right":i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)+"px"}),i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-bottom":i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)+"px"}),n},resize:function(){},populate:function(e){BI.HorizontalAutoLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_auto",BI.HorizontalAutoLayout)},function(e,t){BI.FloatHorizontalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FloatHorizontalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-float-horizontal-adapt-layout",items:[],hgap:0,vgap:0,tgap:0,bgap:0,lgap:0,rgap:0})},render:function(){BI.FloatHorizontalLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){},mounted:function(){var i=this,e=this.left.element.width(),t=this.left.element.height();this.left.element.width(e).height(t).css("float","none"),BI.remove(this._children,function(e,t){t===i.container&&delete i._children[e]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[this.left]})},_addElement:function(e,t){var i=this.options;return this.left=BI.createWidget({type:"bi.vertical",items:[t],hgap:i.hgap,vgap:i.vgap,tgap:i.tgap,bgap:i.bgap,lgap:i.lgap,rgap:i.rgap}),this.container=BI.createWidget({type:"bi.left",element:this,items:[this.left]}),this.left},populate:function(e){BI.HorizontalAutoLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_float",BI.FloatHorizontalLayout)},function(e,t){BI.InlineCenterAdaptLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.InlineLayout.superclass.props.apply(this,arguments),{baseCls:"bi-inline-center-adapt-layout",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.InlineCenterAdaptLayout.superclass.render.apply(this,arguments),this.element.css({whiteSpace:"nowrap",textAlign:"center"}),this.populate(this.options.items)},_addElement:function(e,t,i){var n=this.options,r=BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this,arguments);return r.element.css({position:"relative","vertical-align":"middle"}),r.element.addClass("inline-center-adapt-item"),n.vgap+n.tgap+(t.tgap||0)+(t.vgap||0)!==0&&r.element.css({"margin-top":n.vgap+n.tgap+(t.tgap||0)+(t.vgap||0)+"px"}),n.hgap+n.lgap+(t.lgap||0)+(t.hgap||0)!==0&&r.element.css({"margin-left":(0===e?n.hgap:0)+n.lgap+(t.lgap||0)+(t.hgap||0)+"px"}),n.hgap+n.rgap+(t.rgap||0)+(t.hgap||0)!==0&&r.element.css({"margin-right":n.hgap+n.rgap+(t.rgap||0)+(t.hgap||0)+"px"}),n.vgap+n.bgap+(t.bgap||0)+(t.vgap||0)!==0&&r.element.css({"margin-bottom":n.vgap+n.bgap+(t.bgap||0)+(t.vgap||0)+"px"}),r},resize:function(){this.stroke(this.options.items)},addItem:function(e){throw new Error("不能添加元素")},stroke:function(i){var n=this;BI.each(i,function(e,t){t&&n._addElement(e,t,i.length)})},populate:function(e){BI.InlineCenterAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.inline_center_adapt",BI.InlineCenterAdaptLayout)},function(e,t){BI.InlineVerticalAdaptLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.InlineLayout.superclass.props.apply(this,arguments),{baseCls:"bi-inline-vertical-adapt-layout",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,textAlign:"left"})},render:function(){BI.InlineVerticalAdaptLayout.superclass.render.apply(this,arguments);var e=this.options;this.element.css({whiteSpace:"nowrap",textAlign:e.textAlign}),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this,arguments);return n.element.css({position:"relative","vertical-align":"middle"}),n.element.addClass("inline-vertical-adapt-item"),i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-top":i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0)+"px"}),i.hgap+i.lgap+(t.lgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-left":(0===e?i.hgap:0)+i.lgap+(t.lgap||0)+(t.hgap||0)+"px"}),i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-right":i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)+"px"}),i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-bottom":i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)+"px"}),n},resize:function(){this.stroke(this.options.items)},populate:function(e){BI.InlineVerticalAdaptLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.inline_vertical_adapt",BI.InlineVerticalAdaptLayout)},function(e,t){BI.FlexCenterLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexCenterLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-center-adapt-layout",hgap:0,vgap:0})},render:function(){BI.FlexCenterLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.FlexCenterLayout.superclass._addElement.apply(this,arguments);return n.element.css({position:"relative","flex-shrink":"0","margin-left":(0===e?i.hgap:0)+"px","margin-right":i.hgap+"px","margin-top":i.vgap+"px","margin-bottom":i.vgap+"px"}),n},resize:function(){},populate:function(e){BI.FlexCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_center_adapt",BI.FlexCenterLayout)},function(e,t){BI.FlexHorizontalCenter=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexHorizontalCenter.superclass.props.apply(this,arguments),{baseCls:"bi-flex-horizontal-center-adapt-layout",verticalAlign:BI.VerticalAlign.Top,rowSize:[],scrolly:!1,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){var t=this,e=this.options;return{type:"bi.flex_vertical",ref:function(e){t.wrapper=e},horizontalAlign:BI.HorizontalAlign.Center,verticalAlign:e.verticalAlign,rowSize:e.rowSize,scrollx:e.scrollx,scrolly:e.scrolly,scrollable:e.scrollable,hgap:e.hgap,vgap:e.vgap,tgap:e.tgap,bgap:e.bgap,items:e.items}},resize:function(){},update:function(e){return this.wrapper.update(e)},populate:function(e){this.wrapper.populate(e)}}),BI.shortcut("bi.flex_horizontal_adapt",BI.FlexHorizontalCenter),BI.shortcut("bi.flex_horizontal_center_adapt",BI.FlexHorizontalCenter)},function(e,t){BI.FlexHorizontalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexHorizontalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-horizontal-layout",verticalAlign:BI.VerticalAlign.Top,horizontalAlign:BI.HorizontalAlign.Left,columnSize:[],scrollx:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FlexHorizontalLayout.superclass.render.apply(this,arguments);var e=this.options;this.element.addClass("v-"+e.verticalAlign).addClass("h-"+e.horizontalAlign),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.FlexHorizontalLayout.superclass._addElement.apply(this,arguments);return n.element.css({position:"relative","flex-shrink":"0"}),0<i.columnSize[e]&&n.element.width(i.columnSize[e]),"fill"===i.columnSize[e]&&n.element.css("flex","1"),i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-top":i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0)+"px"}),i.hgap+i.lgap+(t.lgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-left":(0===e?i.hgap:0)+i.lgap+(t.lgap||0)+(t.hgap||0)+"px"}),i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-right":i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)+"px"}),i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-bottom":i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)+"px"}),n},resize:function(){},populate:function(e){BI.FlexHorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_horizontal",BI.FlexHorizontalLayout)},function(e,t){BI.FlexVerticalCenter=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexVerticalCenter.superclass.props.apply(this,arguments),{baseCls:"bi-flex-vertical-center-adapt-layout",horizontalAlign:BI.HorizontalAlign.Left,columnSize:[],scrollx:!1,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){var t=this,e=this.options;return{type:"bi.flex_horizontal",ref:function(e){t.wrapper=e},verticalAlign:BI.VerticalAlign.Middle,horizontalAlign:e.horizontalAlign,columnSize:e.columnSize,scrollx:e.scrollx,scrolly:e.scrolly,scrollable:e.scrollable,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,hgap:e.hgap,items:e.items}},resize:function(){},update:function(e){return this.wrapper.update(e)},populate:function(e){this.wrapper.populate(e)}}),BI.shortcut("bi.flex_vertical_adapt",BI.FlexVerticalCenter),BI.shortcut("bi.flex_vertical_center_adapt",BI.FlexVerticalCenter)},function(e,t){BI.FlexVerticalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexVerticalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-vertical-layout",horizontalAlign:BI.HorizontalAlign.Left,verticalAlign:BI.VerticalAlign.Top,rowSize:[],scrolly:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FlexVerticalLayout.superclass.render.apply(this,arguments);var e=this.options;this.element.addClass("h-"+e.horizontalAlign).addClass("v-"+e.verticalAlign),this.populate(this.options.items)},_addElement:function(e,t){var i=BI.FlexVerticalLayout.superclass._addElement.apply(this,arguments),n=this.options;return i.element.css({position:"relative","flex-shrink":"0"}),0<n.rowSize[e]&&i.element.height(n.rowSize[e]),"fill"===n.rowSize[e]&&i.element.css("flex","1"),n.vgap+n.tgap+(t.tgap||0)+(t.vgap||0)!==0&&i.element.css({"margin-top":(0===e?n.vgap:0)+n.tgap+(t.tgap||0)+(t.vgap||0)+"px"}),n.hgap+n.lgap+(t.lgap||0)+(t.hgap||0)!==0&&i.element.css({"margin-left":n.hgap+n.lgap+(t.lgap||0)+(t.hgap||0)+"px"}),n.hgap+n.rgap+(t.rgap||0)+(t.hgap||0)!==0&&i.element.css({"margin-right":n.hgap+n.rgap+(t.rgap||0)+(t.hgap||0)+"px"}),n.vgap+n.bgap+(t.bgap||0)+(t.vgap||0)!==0&&i.element.css({"margin-bottom":n.vgap+n.bgap+(t.bgap||0)+(t.vgap||0)+"px"}),i},resize:function(){},populate:function(e){BI.FlexVerticalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_vertical",BI.FlexVerticalLayout)},function(e,t){BI.FlexWrapperCenterLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexWrapperCenterLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-scrollable-center-adapt-layout clearfix",scrollable:!0})},render:function(){BI.FlexWrapperCenterLayout.superclass.render.apply(this,arguments),this.$wrapper=BI.Widget._renderEngine.createElement("<div>").addClass("flex-scrollable-center-adapt-layout-wrapper"),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.FlexWrapperCenterLayout.superclass._addElement.apply(this,arguments);return n.element.css({position:"relative","margin-left":(0===e?i.hgap:0)+"px","margin-right":i.hgap+"px","margin-top":i.vgap+"px","margin-bottom":i.vgap+"px"}),n},appendFragment:function(e){this.$wrapper.append(e),this.element.append(this.$wrapper)},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(e){BI.FlexWrapperCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_scrollable_center_adapt",BI.FlexWrapperCenterLayout)},function(e,t){BI.FlexWrapperHorizontalCenter=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexWrapperHorizontalCenter.superclass.props.apply(this,arguments),{baseCls:"bi-flex-scrollable-vertical-center-adapt-layout clearfix",verticalAlign:BI.VerticalAlign.Top,rowSize:[],scrollable:!0,scrolly:!1,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){var t=this,e=this.options;return{type:"bi.flex_scrollable_vertical",ref:function(e){t.wrapper=e},horizontalAlign:BI.HorizontalAlign.Center,verticalAlign:e.verticalAlign,rowSize:e.rowSize,scrollx:e.scrollx,scrolly:e.scrolly,scrollable:e.scrollable,hgap:e.hgap,vgap:e.vgap,tgap:e.tgap,bgap:e.bgap,items:e.items}},update:function(e){return this.wrapper.update(e)},populate:function(e){this.wrapper.populate(e)}}),BI.shortcut("bi.flex_scrollable_horizontal_adapt",BI.FlexWrapperHorizontalCenter),BI.shortcut("bi.flex_scrollable_horizontal_center_adapt",BI.FlexWrapperHorizontalCenter)},function(e,t){BI.FlexWrapperHorizontalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexWrapperHorizontalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-scrollable-horizontal-layout clearfix",verticalAlign:BI.VerticalAlign.Top,horizontalAlign:BI.HorizontalAlign.Left,columnSize:[],scrollable:null,scrollx:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FlexWrapperHorizontalLayout.superclass.render.apply(this,arguments);var e=this.options;this.$wrapper=BI.Widget._renderEngine.createElement("<div>").addClass("flex-scrollable-horizontal-layout-wrapper v-"+e.verticalAlign).addClass("h-"+e.horizontalAlign),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.FlexWrapperHorizontalLayout.superclass._addElement.apply(this,arguments);return n.element.css({position:"relative","flex-shrink":"0"}),0<i.columnSize[e]&&n.element.width(i.columnSize[e]),"fill"===i.columnSize[e]&&n.element.css("flex","1"),i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-top":i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0)+"px"}),i.hgap+i.lgap+(t.lgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-left":(0===e?i.hgap:0)+i.lgap+(t.lgap||0)+(t.hgap||0)+"px"}),i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-right":i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)+"px"}),i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-bottom":i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)+"px"}),n},appendFragment:function(e){this.$wrapper.append(e),this.element.append(this.$wrapper)},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(e){BI.FlexWrapperHorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_scrollable_horizontal",BI.FlexWrapperHorizontalLayout)},function(e,t){BI.FlexWrapperVerticalCenter=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexWrapperVerticalCenter.superclass.props.apply(this,arguments),{baseCls:"bi-flex-scrollable-vertical-center-adapt-layout clearfix",horizontalAlign:BI.HorizontalAlign.Left,columnSize:[],scrollx:!1,scrollable:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){var t=this,e=this.options;return{type:"bi.flex_scrollable_horizontal",ref:function(e){t.wrapper=e},verticalAlign:BI.VerticalAlign.Middle,horizontalAlign:e.horizontalAlign,columnSize:e.columnSize,scrollx:e.scrollx,scrolly:e.scrolly,scrollable:e.scrollable,hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,items:e.items}},update:function(e){return this.wrapper.update(e)},populate:function(e){this.wrapper.populate(e)}}),BI.shortcut("bi.flex_scrollable_vertical_adapt",BI.FlexWrapperVerticalCenter),BI.shortcut("bi.flex_scrollable_vertical_center_adapt",BI.FlexWrapperVerticalCenter)},function(e,t){BI.FlexWrapperVerticalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexWrapperVerticalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-scrollable-vertical-layout clearfix",horizontalAlign:BI.HorizontalAlign.Left,verticalAlign:BI.VerticalAlign.Top,rowSize:[],scrollable:null,scrolly:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FlexWrapperVerticalLayout.superclass.render.apply(this,arguments);var e=this.options;this.$wrapper=BI.Widget._renderEngine.createElement("<div>").addClass("flex-scrollable-vertical-layout-wrapper h-"+e.horizontalAlign).addClass("v-"+e.verticalAlign),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.FlexWrapperVerticalLayout.superclass._addElement.apply(this,arguments);return n.element.css({position:"relative","flex-shrink":"0"}),0<i.rowSize[e]&&n.element.height(i.rowSize[e]),"fill"===i.rowSize[e]&&n.element.css("flex","1"),i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-top":(0===e?i.vgap:0)+i.tgap+(t.tgap||0)+(t.vgap||0)+"px"}),i.hgap+i.lgap+(t.lgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-left":i.hgap+i.lgap+(t.lgap||0)+(t.hgap||0)+"px"}),i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-right":i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)+"px"}),i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-bottom":i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)+"px"}),n},appendFragment:function(e){this.$wrapper.append(e),this.element.append(this.$wrapper)},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(e){BI.FlexWrapperVerticalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_scrollable_vertical",BI.FlexWrapperVerticalLayout)},function(e,t){BI.AbsoluteLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.AbsoluteLayout.superclass.props.apply(this,arguments),{baseCls:"bi-absolute-layout",hgap:null,vgap:null,lgap:null,rgap:null,tgap:null,bgap:null})},render:function(){BI.AbsoluteLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.AbsoluteLayout.superclass._addElement.apply(this,arguments),r=0,o=0,a=0,s=0;return BI.isNotNull(t.left)&&(n.element.css({left:t.left}),r+=t.left),BI.isNotNull(t.right)&&(n.element.css({right:t.right}),o+=t.right),BI.isNotNull(t.top)&&(n.element.css({top:t.top}),a+=t.top),BI.isNotNull(t.bottom)&&(n.element.css({bottom:t.bottom}),s+=t.bottom),BI.isNotNull(i.hgap)&&(r+=i.hgap,n.element.css({left:r}),o+=i.hgap,n.element.css({right:o})),BI.isNotNull(i.vgap)&&(a+=i.vgap,n.element.css({top:a}),s+=i.vgap,n.element.css({bottom:s})),BI.isNotNull(i.lgap)&&(r+=i.lgap,n.element.css({left:r})),BI.isNotNull(i.rgap)&&(o+=i.rgap,n.element.css({right:o})),BI.isNotNull(i.tgap)&&(a+=i.tgap,n.element.css({top:a})),BI.isNotNull(i.bgap)&&(s+=i.bgap,n.element.css({bottom:s})),BI.isNotNull(t.width)&&n.element.css({width:t.width}),BI.isNotNull(t.height)&&n.element.css({height:t.height}),n.element.css({position:"absolute"}),n},resize:function(){this.stroke(this.options.items)},stroke:function(e){this.options.items=e||[];var i=this;BI.each(e,function(e,t){if(t){if(!BI.isWidget(t)&&!t.el)throw new Error("el must be exist");i._addElement(e,t)}})},populate:function(e){BI.AbsoluteLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute",BI.AbsoluteLayout)},function(e,t){BI.AdaptiveLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.AdaptiveLayout.superclass.props.apply(this,arguments),{baseCls:"bi-adaptive-layout",hgap:null,vgap:null,lgap:null,rgap:null,tgap:null,bgap:null})},render:function(){BI.AdaptiveLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.AdaptiveLayout.superclass._addElement.apply(this,arguments);n.element.css({position:"relative"});var r=0,o=0,a=0,s=0;return BI.isNotNull(t.left)&&n.element.css({left:t.left}),BI.isNotNull(t.right)&&n.element.css({right:t.right}),BI.isNotNull(t.top)&&n.element.css({top:t.top}),BI.isNotNull(t.bottom)&&n.element.css({bottom:t.bottom}),BI.isNotNull(i.hgap)&&(r+=i.hgap,n.element.css({"margin-left":r}),o+=i.hgap,n.element.css({"margin-right":o})),BI.isNotNull(i.vgap)&&(a+=i.vgap,n.element.css({"margin-top":a}),s+=i.vgap,n.element.css({"margin-bottom":s})),BI.isNotNull(i.lgap)&&(r+=i.lgap,n.element.css({"margin-left":r})),BI.isNotNull(i.rgap)&&(o+=i.rgap,n.element.css({"margin-right":o})),BI.isNotNull(i.tgap)&&(a+=i.tgap,n.element.css({"margin-top":a})),BI.isNotNull(i.bgap)&&(s+=i.bgap,n.element.css({"margin-bottom":s})),BI.isNotNull(t.width)&&n.element.css({width:t.width}),BI.isNotNull(t.height)&&n.element.css({height:t.height}),n},resize:function(){this.stroke(this.options.items)},populate:function(e){BI.AbsoluteLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.adaptive",BI.AdaptiveLayout)},function(e,t){BI.BorderLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.BorderLayout.superclass.props.apply(this,arguments),{baseCls:"bi-border-layout",items:{}})},render:function(){BI.BorderLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){this.stroke(this.options.items)},addItem:function(e){throw new Error("cannot be added")},stroke:function(e){var t,i=0,n=0,r=0,o=0;if("north"in e&&null!=(t=e.north)){if(t.el){if(!this.hasWidget(this.getName()+"north")){var a=BI.createWidget(t);this.addWidget(this.getName()+"north",a)}this.getWidgetByName(this.getName()+"north").element.height(t.height).css({position:"absolute",top:t.top||0,left:t.left||0,right:t.right||0,bottom:"initial"})}i=(t.height||0)+(t.top||0)+(t.bottom||0)}if("south"in e&&null!=(t=e.south)){if(t.el){if(!this.hasWidget(this.getName()+"south")){a=BI.createWidget(t);this.addWidget(this.getName()+"south",a)}this.getWidgetByName(this.getName()+"south").element.height(t.height).css({position:"absolute",bottom:t.bottom||0,left:t.left||0,right:t.right||0,top:"initial"})}n=(t.height||0)+(t.top||0)+(t.bottom||0)}if("west"in e&&null!=(t=e.west)){if(t.el){if(!this.hasWidget(this.getName()+"west")){a=BI.createWidget(t);this.addWidget(this.getName()+"west",a)}this.getWidgetByName(this.getName()+"west").element.width(t.width).css({position:"absolute",left:t.left||0,top:i,bottom:n,right:"initial"})}r=(t.width||0)+(t.left||0)+(t.right||0)}if("east"in e&&null!=(t=e.east)){if(t.el){if(!this.hasWidget(this.getName()+"east")){a=BI.createWidget(t);this.addWidget(this.getName()+"east",a)}this.getWidgetByName(this.getName()+"east").element.width(t.width).css({position:"absolute",right:t.right||0,top:i,bottom:n,left:"initial"})}o=(t.width||0)+(t.left||0)+(t.right||0)}if("center"in e&&null!=(t=e.center)){if(!this.hasWidget(this.getName()+"center")){a=BI.createWidget(t);this.addWidget(this.getName()+"center",a)}this.getWidgetByName(this.getName()+"center").element.css({position:"absolute",top:i,bottom:n,left:r,right:o})}},update:function(e){},populate:function(e){BI.BorderLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.border",BI.BorderLayout)},function(e,t){BI.CardLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.CardLayout.superclass.props.apply(this,arguments),{baseCls:"bi-card-layout",items:[]})},render:function(){BI.CardLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){},stroke:function(e){var n=this,r=this.options;this.showIndex=void 0,BI.each(e,function(e,i){if(i){if(n.hasWidget(i.cardName))var t=n.getWidgetByName(i.cardName);else(t=BI.createWidget(i)).on(BI.Events.DESTROY,function(){var e=BI.findIndex(r.items,function(e,t){return t.cardName==i.cardName});-1<e&&r.items.splice(e,1)}),n.addWidget(i.cardName,t);t.element.css({position:"absolute",top:"0",right:"0",bottom:"0",left:"0"}),t.setVisible(!1)}})},update:function(){},empty:function(){BI.CardLayout.superclass.empty.apply(this,arguments),this.options.items=[]},populate:function(e){BI.CardLayout.superclass.populate.apply(this,arguments),this._mount(),this.options.defaultShowName&&this.showCardByName(this.options.defaultShowName)},isCardExisted:function(i){return BI.some(this.options.items,function(e,t){return t.cardName==i&&t.el})},getCardByName:function(e){if(!this.isCardExisted(e))throw new Error("cardName is not exist");return this._children[e]},_deleteCardByName:function(i){delete this._children[i];var e=BI.findIndex(this.options.items,function(e,t){return t.cardName==i});-1<e&&this.options.items.splice(e,1)},deleteCardByName:function(e){if(!this.isCardExisted(e))throw new Error("cardName is not exist");var t=this._children[e];this._deleteCardByName(e),t&&t._destroy()},addCardByName:function(e,t){if(this.isCardExisted(e))throw new Error("cardName is already exist");var i=BI.createWidget(t,this);return i.element.css({position:"relative",top:"0",left:"0",width:"100%",height:"100%"}).appendTo(this.element),i.invisible(),this.addWidget(e,i),this.options.items.push({el:t,cardName:e}),i},showCardByName:function(n,r,o){var a=this,s=this.isCardExisted(n);null!=this.showIndex&&(this.lastShowIndex=this.showIndex),this.showIndex=n;var l=!1;BI.each(this.options.items,function(e,t){var i=a._children[t.cardName];i&&(n!=t.cardName?!l&&!s&&BI.Action&&r instanceof BI.Action?(r.actionBack(i),l=!0):i.invisible():BI.Action&&r instanceof BI.Action?r.actionPerformed(void 0,i,o):(i.visible(),o&&o()))})},showLastCard:function(){var i=this;this.showIndex=this.lastShowIndex,BI.each(this.options.items,function(e,t){i._children[t.cardName].setVisible(i.showIndex==e)})},setDefaultShowName:function(e){return this.options.defaultShowName=e,this},getDefaultShowName:function(){return this.options.defaultShowName},getAllCardNames:function(){return BI.map(this.options.items,function(e,t){return t.cardName})},getShowingCard:function(){if(BI.isKey(this.showIndex))return this.getWidgetByName(this.showIndex)},deleteAllCard:function(){var i=this;BI.each(this.getAllCardNames(),function(e,t){i.deleteCardByName(t)})},hideAllCard:function(){var i=this;BI.each(this.options.items,function(e,t){i._children[t.cardName].invisible()})},isAllCardHide:function(){var i=this,n=!0;return BI.some(this.options.items,function(e,t){if(i._children[t.cardName].isVisible())return n=!1}),n},removeWidget:function(i){var n;BI.isWidget(i)?BI.each(this._children,function(e,t){t===i&&(n=e)}):n=i,n&&this._deleteCardByName(n)}}),BI.shortcut("bi.card",BI.CardLayout)},function(e,t){BI.DefaultLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.DefaultLayout.superclass.props.apply(this,arguments),{hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,items:[]})},render:function(){BI.DefaultLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.DefaultLayout.superclass._addElement.apply(this,arguments);return i.vgap+i.tgap+(t.tgap||0)!==0&&n.element.css({"margin-top":i.vgap+i.tgap+(t.tgap||0)+"px"}),i.hgap+i.lgap+(t.lgap||0)!==0&&n.element.css({"margin-left":i.hgap+i.lgap+(t.lgap||0)+"px"}),i.hgap+i.rgap+(t.rgap||0)!==0&&n.element.css({"margin-right":i.hgap+i.rgap+(t.rgap||0)+"px"}),i.vgap+i.bgap+(t.bgap||0)!==0&&n.element.css({"margin-bottom":i.vgap+i.bgap+(t.bgap||0)+"px"}),n},resize:function(){},populate:function(e){BI.DefaultLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.default",BI.DefaultLayout)},function(e,t){BI.DivisionLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.DivisionLayout.superclass.props.apply(this,arguments),{baseCls:"bi-division-layout",columns:null,rows:null,items:[]})},render:function(){BI.DivisionLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){this.stroke(this.opitons.items)},addItem:function(e){throw new Error("cannot be added")},stroke:function(e){var t,i,n,r=this.options,o=r.rows||r.items.length,a=r.columns||0|(r.items[0]&&r.items[0].length),s=BI.makeArray(o),l={},u={};function c(e,t,i){0===t&&e.addClass("first-row"),0===i&&e.addClass("first-col"),e.addClass(BI.isOdd(t+1)?"odd-row":"even-row"),e.addClass(BI.isOdd(i+1)?"odd-col":"even-col"),e.addClass("center-element")}function h(e,t,i){var n="";0===t&&(n+=" first-row"),0===i&&(n+=" first-col"),BI.isOdd(t+1)?n+=" odd-row":n+=" even-row",BI.isOdd(i+1)?n+=" odd-col":n+=" even-col",e.cls=(e.cls||"")+n+" center-element"}BI.each(s,function(e){s[e]=BI.makeArray(a)}),BI.each(e,function(i,n){BI.isArray(n)?BI.each(n,function(e,t){l[i]=(l[i]||0)+n.width,u[e]=(u[e]||0)+n.height,s[i][e]=t}):(l[n.row]=(l[n.row]||0)+n.width,u[n.column]=(u[n.column]||0)+n.height,s[n.row][n.column]=n)});for(var p=0;p<o;p++)for(var d=0,g=0;g<a;g++){if(!s[p][g])throw new Error("item be required");if(this.hasWidget(this.getName()+p+"_"+g))f=this.getWidgetByName(this.getName()+p+"_"+g);else{var f=BI.createWidget(s[p][g]);this.addWidget(this.getName()+p+"_"+g,f)}var I=100*d/l[p];if(f.element.css({position:"absolute",left:I+"%"}),0<g)this.getWidgetByName(this.getName()+p+"_"+(g-1)).element.css({right:100-I+"%"});g==r.columns-1&&f.element.css({right:"0%"}),i=p,n=g,(t=f)instanceof BI.Widget?c(t.element,i,n):t.el instanceof BI.Widget?c(t.el.element,i,n):t.el?h(t.el,i,n):h(t,i,n),d+=s[p][g].width}for(g=0;g<r.columns;g++){var B=0;for(p=0;p<r.rows;p++){f=this.getWidgetByName(this.getName()+p+"_"+g);var E=100*B/u[g];if(f.element.css({top:E+"%"}),0<p)this.getWidgetByName(this.getName()+(p-1)+"_"+g).element.css({bottom:100-E+"%"});p==r.rows-1&&f.element.css({bottom:"0%"}),B+=s[p][g].height}}},update:function(){},populate:function(e){BI.DivisionLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.division",BI.DivisionLayout)},function(e,t){BI.FloatLeftLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FloatLeftLayout.superclass.props.apply(this,arguments),{baseCls:"bi-float-left-layout clearfix",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FloatLeftLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.FloatLeftLayout.superclass._addElement.apply(this,arguments);return n.element.css({position:"relative","float":"left"}),BI.isNotNull(t.left)&&n.element.css({left:t.left}),BI.isNotNull(t.right)&&n.element.css({right:t.right}),BI.isNotNull(t.top)&&n.element.css({top:t.top}),BI.isNotNull(t.bottom)&&n.element.css({bottom:t.bottom}),i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-top":i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0)+"px"}),i.hgap+i.lgap+(t.lgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-left":(0===e?i.hgap:0)+i.lgap+(t.lgap||0)+(t.hgap||0)+"px"}),i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-right":i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)+"px"}),i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-bottom":i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)+"px"}),n},resize:function(){this.stroke(this.options.items)},populate:function(e){BI.FloatLeftLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.left",BI.FloatLeftLayout),BI.FloatRightLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FloatRightLayout.superclass.props.apply(this,arguments),{baseCls:"bi-float-right-layout clearfix",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FloatRightLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.FloatRightLayout.superclass._addElement.apply(this,arguments);return n.element.css({position:"relative","float":"right"}),BI.isNotNull(t.left)&&n.element.css({left:t.left}),BI.isNotNull(t.right)&&n.element.css({right:t.right}),BI.isNotNull(t.top)&&n.element.css({top:t.top}),BI.isNotNull(t.bottom)&&n.element.css({bottom:t.bottom}),i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-top":i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0)+"px"}),i.hgap+i.lgap+(t.lgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-left":i.hgap+i.lgap+(t.lgap||0)+(t.hgap||0)+"px"}),i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-right":(0===e?i.hgap:0)+i.rgap+(t.rgap||0)+(t.hgap||0)+"px"}),i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-bottom":i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)+"px"}),n},resize:function(){this.stroke(this.options.items)},populate:function(e){BI.FloatRightLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.right",BI.FloatRightLayout)},function(e,t){BI.GridLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.GridLayout.superclass.props.apply(this,arguments),{baseCls:"bi-grid-layout",columns:null,rows:null,items:[]})},render:function(){BI.GridLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){},addItem:function(){throw new Error("cannot be added")},stroke:function(e){for(var t,i,n,r=this.options,o=r.rows||r.items.length,a=r.columns||0|(r.items[0]&&r.items[0].length),s=100/a,l=100/o,u=[],c=0;c<o;c++)u[c]=[];function h(e,t,i){0===t&&e.addClass("first-row"),0===i&&e.addClass("first-col"),e.addClass(BI.isOdd(t+1)?"odd-row":"even-row"),e.addClass(BI.isOdd(i+1)?"odd-col":"even-col"),e.addClass("center-element")}function p(e,t,i){var n="";0===t&&(n+=" first-row"),0===i&&(n+=" first-col"),BI.isOdd(t+1)?n+=" odd-row":n+=" even-row",BI.isOdd(i+1)?n+=" odd-col":n+=" even-col",e.cls=(e.cls||"")+n+" center-element"}BI.each(e,function(i,e){BI.isArray(e)?BI.each(e,function(e,t){u[i][e]=BI.createWidget(t)}):u[e.row][e.column]=BI.createWidget(e)});for(c=0;c<o;c++)for(var d=0;d<a;d++)u[c][d]||(u[c][d]=BI.createWidget({type:"bi.layout"})),t=u[c][d],i=c,n=d,t instanceof BI.Widget?h(t.element,i,n):t.el instanceof BI.Widget?h(t.el.element,i,n):t.el?p(t.el,i,n):p(t,i,n),u[c][d].element.css({position:"absolute",top:l*c+"%",left:s*d+"%",right:100-s*(d+1)+"%",bottom:100-l*(c+1)+"%"}),this.addWidget(u[c][d])},update:function(){},populate:function(e){BI.GridLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.grid",BI.GridLayout)},function(e,t){BI.HorizontalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.HorizontalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-horizontal-layout",verticalAlign:BI.VerticalAlign.Top,horizontalAlign:BI.HorizontalAlign.Left,columnSize:[],scrollx:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){var e=this.options;BI.HorizontalLayout.superclass.render.apply(this,arguments),this.$table=BI.Widget._renderEngine.createElement("<table>").attr({cellspacing:0,cellpadding:0}).css({position:"relative","white-space":"nowrap",height:e.verticalAlign===BI.VerticalAlign.Middle?"100%":"auto",width:e.horizontalAlign===BI.HorizontalAlign.Center||e.horizontalAlign===BI.HorizontalAlign.Stretch?"100%":"auto","border-spacing":"0px",border:"none","border-collapse":"separate"}),this.$tr=BI.Widget._renderEngine.createElement("<tr>"),this.$tr.appendTo(this.$table),this.populate(this.options.items)},_addElement:function(e,t){var i,n=this.options,r=n.columnSize[e]<=1?100*n.columnSize[e]+"%":n.columnSize[e];if(this.hasWidget(this._getChildName(e)))(i=this.getWidgetByName(this._getChildName(e))).element.attr("width",r);else{var o=BI.createWidget(t);o.element.css({position:"relative",margin:"0px auto"}),i=BI.createWidget({type:"bi.default",tagName:"td",attributes:{width:r},items:[o]}),this.addWidget(this._getChildName(e),i)}return i.element.css({"max-width":n.columnSize[e]<=1?r:r+"px"}),0===e&&i.element.addClass("first-element"),i.element.css({position:"relative","vertical-align":n.verticalAlign,margin:"0",padding:"0",border:"none"}),n.vgap+n.tgap+(t.tgap||0)+(t.vgap||0)!==0&&o.element.css({"margin-top":n.vgap+n.tgap+(t.tgap||0)+(t.vgap||0)+"px"}),n.hgap+n.lgap+(t.lgap||0)+(t.hgap||0)!==0&&o.element.css({"margin-left":(0===e?n.hgap:0)+n.lgap+(t.lgap||0)+(t.hgap||0)+"px"}),n.hgap+n.rgap+(t.rgap||0)+(t.hgap||0)!==0&&o.element.css({"margin-right":n.hgap+n.rgap+(t.rgap||0)+(t.hgap||0)+"px"}),n.vgap+n.bgap+(t.bgap||0)+(t.vgap||0)!==0&&o.element.css({"margin-bottom":n.vgap+n.bgap+(t.bgap||0)+(t.vgap||0)+"px"}),i},appendFragment:function(e){this.$tr.append(e),this.element.append(this.$table)},resize:function(){},_getWrapper:function(){return this.$tr},populate:function(e){BI.HorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal",BI.HorizontalLayout),BI.HorizontalCellLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.HorizontalCellLayout.superclass.props.apply(this,arguments),{baseCls:"bi-horizontal-cell-layout",scrollable:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.HorizontalCellLayout.superclass.render.apply(this,arguments),this.element.css({display:"table","vertical-align":"top"}),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.HorizontalCellLayout.superclass._addElement.apply(this,arguments);return n.element.css({position:"relative",display:"table-cell","vertical-align":"middle"}),0<i.hgap+i.lgap&&n.element.css({"margin-left":i.hgap+i.lgap+"px"}),0<i.hgap+i.rgap&&n.element.css({"margin-right":i.hgap+i.rgap+"px"}),0<i.vgap+i.tgap&&n.element.css({"margin-top":i.vgap+i.tgap+"px"}),0<i.vgap+i.bgap&&n.element.css({"margin-bottom":i.vgap+i.bgap+"px"}),n},resize:function(){},populate:function(e){BI.HorizontalCellLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.horizontal_cell",BI.HorizontalCellLayout)},function(e,t){BI.InlineLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.InlineLayout.superclass.props.apply(this,arguments),{baseCls:"bi-inline-layout",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.InlineLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.InlineLayout.superclass._addElement.apply(this,arguments);return n.element.css({position:"relative",display:"inline-block","*display":"inline","*zoom":1}),i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-top":i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0)+"px"}),i.hgap+i.lgap+(t.lgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-left":(0===e?i.hgap:0)+i.lgap+(t.lgap||0)+(t.hgap||0)+"px"}),i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-right":i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)+"px"}),i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-bottom":i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)+"px"}),n},resize:function(){this.stroke(this.options.items)},populate:function(e){BI.InlineLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.inline",BI.InlineLayout)},function(e,t){BI.LatticeLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.LatticeLayout.superclass.props.apply(this,arguments),{baseCls:"bi-lattice-layout clearfix"})},render:function(){BI.LatticeLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.LatticeLayout.superclass._addElement.apply(this,arguments);if(i.columnSize&&i.columnSize[e])var r=i.columnSize[e]/BI.sum(i.columnSize)*100+"%";else r=1/this.options.items.length*100+"%";return n.element.css({position:"relative","float":"left",width:r}),n},addItem:function(e){var t=BI.LatticeLayout.superclass.addItem.apply(this,arguments);return this.resize(),t},addItemAt:function(e){var t=BI.LatticeLayout.superclass.addItemAt.apply(this,arguments);return this.resize(),t},resize:function(){this.stroke(this.options.items)},populate:function(e){BI.LatticeLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.lattice",BI.LatticeLayout)},function(e,t){BI.TableLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.TableLayout.superclass.props.apply(this,arguments),{baseCls:"bi-table-layout",scrolly:!0,columnSize:[200,200,"fill"],rowSize:30,hgap:0,vgap:0,items:[[{el:{text:"label1"}},{el:{text:"label2"}},{el:{text:"label3"}}]]})},render:function(){BI.TableLayout.superclass.render.apply(this,arguments),this.rows=0,this.populate(this.options.items)},_addElement:function(e,t){var i,n,r=this.options,o=[],a=0,s=0;function l(e,t,i){0===t&&e.addClass("first-row"),0===i&&e.addClass("first-col"),e.addClass(BI.isOdd(t+1)?"odd-row":"even-row"),e.addClass(BI.isOdd(i+1)?"odd-col":"even-col"),e.addClass("center-element")}function u(e,t,i){var n="";0===t&&(n+=" first-row"),0===i&&(n+=" first-col"),BI.isOdd(t+1)?n+=" odd-row":n+=" even-row",BI.isOdd(i+1)?n+=" odd-col":n+=" even-col",e.cls=(e.cls||"")+n+" center-element"}function c(e,t,i){e instanceof BI.Widget?l(e.element,t,i):e.el instanceof BI.Widget?l(e.el.element,t,i):e.el?u(e.el,t,i):u(e,t,i)}for(i=0;i<t.length&&BI.isNumber(r.columnSize[i]);i++)c(t[i],this.rows,i),o.push(BI.extend({top:0,bottom:0,left:r.columnSize[i]<=1?100*a+"%":a,width:r.columnSize[i]<=1?100*r.columnSize[i]+"%":r.columnSize[i]},t[i])),a+=r.columnSize[i]+(r.columnSize[i]<1?0:r.hgap);for(n=t.length-1;i<n;n--){if(!BI.isNumber(r.columnSize[n]))throw new Error("item with fill can only be one");c(t[n],this.rows,n),o.push(BI.extend({top:0,bottom:0,right:r.columnSize[n]<=1?100*s+"%":s,width:r.columnSize[n]<=1?100*r.columnSize[n]+"%":r.columnSize[n]},t[n])),s+=r.columnSize[n]+(r.columnSize[n]<1?0:r.hgap)}0<=i&&i<t.length&&(c(t[i],this.rows,i),o.push(BI.extend({top:0,bottom:0,left:a<=1?100*a+"%":a,right:s<=1?100*s+"%":s},t[i])));var h=BI.createWidget({type:"bi.absolute",height:BI.isArray(r.rowSize)?r.rowSize[this.rows]:r.rowSize,items:o});return 0<this.rows&&this.getWidgetByName(this.getName()+(this.rows-1)).element.css({"margin-bottom":r.vgap}),h.element.css({position:"relative"}),this.addWidget(this.getName()+this.rows++,h),h},resize:function(){},addItem:function(e){if(!BI.isArray(e))throw new Error("item must be array");return BI.TableLayout.superclass.addItem.apply(this,arguments)},update:function(){},populate:function(e){BI.TableLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.table",BI.TableLayout)},function(e,t){BI.HTapeLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.HTapeLayout.superclass.props.apply(this,arguments),{baseCls:"bi-h-tape-layout",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,items:[{width:100,el:{type:"bi.button",text:"button1"}},{width:"fill",el:{type:"bi.button",text:"button2"}},{width:200,el:{type:"bi.button",text:"button3"}}]})},render:function(){BI.HTapeLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){this.stroke(this.options.items)},addItem:function(e){throw new Error("cannot be added")},stroke:function(n){var r=this,o=this.options;n=BI.compact(n),BI.each(n,function(e,t){if(r.hasWidget(r.getName()+e+""))i=r.getWidgetByName(r.getName()+e+"");else{var i=BI.createWidget(t);r.addWidget(r.getName()+e+"",i)}i.element.css({position:"absolute",top:(t.vgap||0)+(t.tgap||0)+o.vgap+o.tgap+"px",bottom:(t.bgap||0)+(t.vgap||0)+o.vgap+o.bgap+"px"})});var a={},s={};a[0]=0,s[n.length-1]=0,BI.any(n,function(e,t){var i=r.getWidgetByName(r.getName()+e+"");if(BI.isNull(a[e])&&(a[e]=a[e-1]+n[e-1].width+(n[e-1].lgap||0)+2*(n[e-1].hgap||0)+o.hgap+o.lgap+o.rgap),t.width<1&&0<=t.width?i.element.css({left:100*a[e]+"%",width:100*t.width+"%"}):i.element.css({left:a[e]+(t.lgap||0)+(t.hgap||0)+o.hgap+o.lgap+"px",width:BI.isNumber(t.width)?t.width:""}),!BI.isNumber(t.width))return!0}),BI.backAny(n,function(e,t){var i=r.getWidgetByName(r.getName()+e+"");if(BI.isNull(s[e])&&(s[e]=s[e+1]+n[e+1].width+(n[e+1].rgap||0)+2*(n[e+1].hgap||0)+o.hgap+o.lgap+o.rgap),t.width<1&&0<=t.width?i.element.css({right:100*s[e]+"%",width:100*t.width+"%"}):i.element.css({right:s[e]+(t.rgap||0)+(t.hgap||0)+o.hgap+o.rgap+"px",width:BI.isNumber(t.width)?t.width:""}),!BI.isNumber(t.width))return!0})},update:function(){var i;return BI.each(this._children,function(e,t){i=t.update()||i}),i},populate:function(e){BI.HTapeLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.htape",BI.HTapeLayout),BI.VTapeLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.VTapeLayout.superclass.props.apply(this,arguments),{baseCls:"bi-v-tape-layout",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,items:[{height:100,el:{type:"bi.button",text:"button1"}},{height:"fill",el:{type:"bi.button",text:"button2"}},{height:200,el:{type:"bi.button",text:"button3"}}]})},render:function(){BI.VTapeLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){this.stroke(this.options.items)},addItem:function(e){throw new Error("cannot be added")},stroke:function(n){var r=this,o=this.options;n=BI.compact(n),BI.each(n,function(e,t){if(r.hasWidget(r.getName()+e+""))i=r.getWidgetByName(r.getName()+e+"");else{var i=BI.createWidget(t);r.addWidget(r.getName()+e+"",i)}i.element.css({position:"absolute",left:(t.lgap||0)+(t.hgap||0)+o.hgap+o.lgap+"px",right:+(t.hgap||0)+(t.rgap||0)+o.hgap+o.rgap+"px"})});var a={},s={};a[0]=0,s[n.length-1]=0,BI.any(n,function(e,t){var i=r.getWidgetByName(r.getName()+e+"");if(BI.isNull(a[e])&&(a[e]=a[e-1]+n[e-1].height+(n[e-1].tgap||0)+2*(n[e-1].vgap||0)+o.vgap+o.tgap+o.bgap),t.height<1&&0<=t.height?i.element.css({top:100*a[e]+"%",height:100*t.height+"%"}):i.element.css({top:a[e]+(t.vgap||0)+(t.tgap||0)+o.vgap+o.tgap+"px",height:BI.isNumber(t.height)?t.height:""}),!BI.isNumber(t.height))return!0}),BI.backAny(n,function(e,t){var i=r.getWidgetByName(r.getName()+e+"");if(BI.isNull(s[e])&&(s[e]=s[e+1]+n[e+1].height+(n[e+1].bgap||0)+2*(n[e+1].vgap||0)+o.vgap+o.tgap+o.bgap),t.height<1&&0<=t.height?i.element.css({bottom:100*s[e]+"%",height:100*t.height+"%"}):i.element.css({bottom:s[e]+(t.vgap||0)+(t.bgap||0)+o.vgap+o.bgap+"px",height:BI.isNumber(t.height)?t.height:""}),!BI.isNumber(t.height))return!0})},update:function(){},populate:function(e){BI.VTapeLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.vtape",BI.VTapeLayout)},function(e,t){BI.TdLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.TdLayout.superclass.props.apply(this,arguments),{baseCls:"bi-td-layout",columnSize:[200,200,200],hgap:0,vgap:0,items:[[{el:{text:"label1"}},{el:{text:"label2"}},{el:{text:"label3"}}]]})},render:function(){BI.TdLayout.superclass.render.apply(this,arguments),this.$table=BI.Widget._renderEngine.createElement("<table>").attr({cellspacing:0,cellpadding:0}).css({position:"relative",width:"100%",height:"100%","border-spacing":"0px",border:"none","border-collapse":"separate"}),this.rows=0,this.populate(this.options.items)},_addElement:function(e,t){var i=this.options;function n(e,t,i){0===t&&e.addClass("first-row"),0===i&&e.addClass("first-col"),e.addClass(BI.isOdd(t+1)?"odd-row":"even-row"),e.addClass(BI.isOdd(i+1)?"odd-col":"even-col"),e.addClass("center-element")}function r(e,t,i){var n="";0===t&&(n+=" first-row"),0===i&&(n+=" first-col"),BI.isOdd(t+1)?n+=" odd-row":n+=" even-row",BI.isOdd(i+1)?n+=" odd-col":n+=" even-col",e.cls=(e.cls||"")+n+" center-element"}for(var o,a,s,l=BI.createWidget({type:"bi.default",tagName:"tr"}),u=0;u<t.length;u++){var c=BI.createWidget(t[u]);c.element.css({position:"relative",top:"0",left:"0",margin:"0px auto"}),t[u].lgap&&c.element.css({"margin-left":t[u].lgap+"px"}),t[u].rgap&&c.element.css({"margin-right":t[u].rgap+"px"}),t[u].tgap&&c.element.css({"margin-top":t[u].tgap+"px"}),t[u].bgap&&c.element.css({"margin-bottom":t[u].bgap+"px"}),o=c,a=this.rows++,s=u,o instanceof BI.Widget?n(o.element,a,s):o.el instanceof BI.Widget?n(o.el.element,a,s):o.el?r(o.el,a,s):r(o,a,s);var h=BI.createWidget({type:"bi.default",attributes:{width:i.columnSize[u]<=1?100*i.columnSize[u]+"%":i.columnSize[u]},tagName:"td",items:[c]});h.element.css({position:"relative","vertical-align":"middle",margin:"0",padding:"0",border:"none"}),l.addItem(h)}return this.addWidget(this.getName()+e,l),l},appendFragment:function(e){this.$table.append(e),this.element.append(this.$table)},resize:function(){},addItem:function(e){if(!BI.isArray(e))throw new Error("item must be array");return BI.TdLayout.superclass.addItem.apply(this,arguments)},update:function(){},populate:function(e){BI.TdLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.td",BI.TdLayout)},function(e,t){BI.VerticalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.VerticalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-vertical-layout",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,scrolly:!0})},render:function(){BI.VerticalLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(e,t){var i=this.options,n=BI.VerticalLayout.superclass._addElement.apply(this,arguments);return n.element.css({position:"relative"}),i.vgap+i.tgap+(t.tgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-top":(0===e?i.vgap:0)+i.tgap+(t.tgap||0)+(t.vgap||0)+"px"}),i.hgap+i.lgap+(t.lgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-left":i.hgap+i.lgap+(t.lgap||0)+(t.hgap||0)+"px"}),i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)!==0&&n.element.css({"margin-right":i.hgap+i.rgap+(t.rgap||0)+(t.hgap||0)+"px"}),i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)!==0&&n.element.css({"margin-bottom":i.vgap+i.bgap+(t.bgap||0)+(t.vgap||0)+"px"}),n},resize:function(){this.stroke(this.options.items)},populate:function(e){BI.VerticalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.vertical",BI.VerticalLayout)},function(e,t){BI.WindowLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.WindowLayout.superclass.props.apply(this,arguments),{baseCls:"bi-window-layout",columns:3,rows:2,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,columnSize:[100,"fill",200],rowSize:[100,"fill"],items:[[{el:{type:"bi.button",text:"button1"}},{el:{type:"bi.button",text:"button2"}},{el:{type:"bi.button",text:"button3"}}]]})},render:function(){BI.WindowLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){this.stroke(this.options.items)},addItem:function(e){throw new Error("cannot be added")},stroke:function(e){var t=this.options;function n(e,t,i){0===t&&e.addClass("first-row"),0===i&&e.addClass("first-col"),e.addClass(BI.isOdd(t+1)?"odd-row":"even-row"),e.addClass(BI.isOdd(i+1)?"odd-col":"even-col"),e.addClass("center-element")}function r(e,t,i){var n="";0===t&&(n+=" first-row"),0===i&&(n+=" first-col"),BI.isOdd(t+1)?n+=" odd-row":n+=" even-row",BI.isOdd(i+1)?n+=" odd-col":n+=" even-col",e.cls=(e.cls||"")+n+" center-element"}function i(e,t,i){e instanceof BI.Widget?n(e.element,t,i):e.el instanceof BI.Widget?n(e.el.element,t,i):e.el?r(e.el,t,i):r(e,t,i)}BI.isNumber(t.rowSize)&&(t.rowSize=BI.makeArray(t.items.length,1/t.items.length)),BI.isNumber(t.columnSize)&&(t.columnSize=BI.makeArray(t.items[0].length,1/t.items[0].length));for(var o=0;o<t.rows;o++)for(var a=0;a<t.columns;a++){if(!t.items[o][a])throw new Error("item be required");if(!this.hasWidget(this.getName()+o+"_"+a))(I=BI.createWidget(t.items[o][a])).element.css({position:"absolute"}),this.addWidget(this.getName()+o+"_"+a,I)}var s={},l={},u={},c={};u[s[0]=0]=0,l[t.columns-1]=0;for(o=c[t.rows-1]=0;o<t.rows;o++){for(a=0;a<t.columns;a++){var h=this.getWidgetByName(this.getName()+o+"_"+a);BI.isNull(u[o])&&(u[o]=u[o-1]+(t.rowSize[o-1]<1?t.rowSize[o-1]:t.rowSize[o-1]+t.vgap+t.bgap));var p=u[o]<=1?100*u[o]+"%":u[o]+t.vgap+t.tgap+"px",d="";BI.isNumber(t.rowSize[o])&&(d=t.rowSize[o]<=1?100*t.rowSize[o]+"%":t.rowSize[o]+"px"),h.element.css({top:p,height:d}),i(h,o,a)}if(!BI.isNumber(t.rowSize[o]))break}for(o=t.rows-1;0<=o;o--){for(a=0;a<t.columns;a++){h=this.getWidgetByName(this.getName()+o+"_"+a);BI.isNull(c[o])&&(c[o]=c[o+1]+(t.rowSize[o+1]<1?t.rowSize[o+1]:t.rowSize[o+1]+t.vgap+t.tgap));var g=c[o]<=1?100*c[o]+"%":c[o]+t.vgap+t.bgap+"px";d="";BI.isNumber(t.rowSize[o])&&(d=t.rowSize[o]<=1?100*t.rowSize[o]+"%":t.rowSize[o]+"px"),h.element.css({bottom:g,height:d}),i(h,o,a)}if(!BI.isNumber(t.rowSize[o]))break}for(a=0;a<t.columns;a++){for(o=0;o<t.rows;o++){h=this.getWidgetByName(this.getName()+o+"_"+a);BI.isNull(s[a])&&(s[a]=s[a-1]+(t.columnSize[a-1]<1?t.columnSize[a-1]:t.columnSize[a-1]+t.hgap+t.rgap));var f=s[a]<=1?100*s[a]+"%":s[a]+t.hgap+t.lgap+"px",I="";BI.isNumber(t.columnSize[a])&&(I=t.columnSize[a]<=1?100*t.columnSize[a]+"%":t.columnSize[a]+"px"),h.element.css({left:f,width:I}),i(h,o,a)}if(!BI.isNumber(t.columnSize[a]))break}for(a=t.columns-1;0<=a;a--){for(o=0;o<t.rows;o++){h=this.getWidgetByName(this.getName()+o+"_"+a);BI.isNull(l[a])&&(l[a]=l[a+1]+(t.columnSize[a+1]<1?t.columnSize[a+1]:t.columnSize[a+1]+t.hgap+t.lgap));var B=l[a]<=1?100*l[a]+"%":l[a]+t.hgap+t.rgap+"px";I="";BI.isNumber(t.columnSize[a])&&(I=t.columnSize[a]<=1?100*t.columnSize[a]+"%":t.columnSize[a]+"px"),h.element.css({right:B,width:I}),i(h,o,a)}if(!BI.isNumber(t.columnSize[a]))break}},update:function(){},populate:function(e){BI.WindowLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.window",BI.WindowLayout)},function(e,t){BI.CenterLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.CenterLayout.superclass.props.apply(this,arguments),{baseCls:"bi-center-layout",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.CenterLayout.superclass.render.apply(this,arguments);var t=this,n=this.options,r=[],i=n.items;return BI.each(i,function(e){r.push({column:e,row:0,el:BI.createWidget({type:"bi.default",cls:"center-element "+(0===e?"first-element ":"")+(e===i.length-1?"last-element":"")})})}),BI.each(i,function(e,t){if(t){var i=BI.createWidget(t);i.element.css({position:"absolute",left:n.hgap+n.lgap,right:n.hgap+n.rgap,top:n.vgap+n.tgap,bottom:n.vgap+n.bgap,width:"auto",height:"auto"}),r[e].el.addItem(i)}}),{type:"bi.grid",ref:function(e){t.wrapper=e},columns:r.length,rows:1,items:r}},resize:function(){},addItem:function(e){throw new Error("cannot be added")},update:function(e){return this.wrapper.update(e)},populate:function(e){this.wrapper.populate.apply(this.wrapper,arguments)}}),BI.shortcut("bi.center",BI.CenterLayout)},function(e,t){BI.FloatCenterLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FloatCenterLayout.superclass.props.apply(this,arguments),{baseCls:"bi-float-center-layout",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FloatCenterLayout.superclass.render.apply(this,arguments);var t=this,n=this.options,i=n.items,r=[],o=100/i.length;return BI.each(i,function(e){var t=BI.createWidget({type:"bi.default"});t.element.addClass("center-element "+(0===e?"first-element ":"")+(e===i.length-1?"last-element":"")).css({width:o+"%",height:"100%"}),r.push({el:t})}),BI.each(i,function(e,t){if(t){var i=BI.createWidget(t);i.element.css({position:"absolute",left:n.hgap+n.lgap,right:n.hgap+n.rgap,top:n.vgap+n.tgap,bottom:n.vgap+n.bgap,width:"auto",height:"auto"}),r[e].el.addItem(i)}}),{type:"bi.left",ref:function(e){t.wrapper=e},items:r}},resize:function(){},addItem:function(e){throw new Error("cannot be added")},update:function(e){return this.wrapper.update(e)},populate:function(e){this.wrapper.populate.apply(this.wrapper,arguments)}}),BI.shortcut("bi.float_center",BI.FloatCenterLayout)},function(e,t){BI.HorizontalCenterLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.HorizontalCenterLayout.superclass.props.apply(this,arguments),{baseCls:"bi-horizontal-center-layout",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.HorizontalCenterLayout.superclass.render.apply(this,arguments);var t=this,n=this.options,i=n.items,r=[];return BI.each(i,function(e){r.push({column:e,row:0,el:BI.createWidget({type:"bi.default",cls:"center-element "+(0===e?"first-element ":"")+(e===i.length-1?"last-element":"")})})}),BI.each(i,function(e,t){if(t){var i=BI.createWidget(t);i.element.css({position:"absolute",left:n.hgap+n.lgap,right:n.hgap+n.rgap,top:n.vgap+n.tgap,bottom:n.vgap+n.bgap,width:"auto"}),r[e].el.addItem(i)}}),{type:"bi.grid",ref:function(e){t.wrapper=e},columns:r.length,rows:1,items:r}},resize:function(){},addItem:function(e){throw new Error("cannot be added")},update:function(e){return this.wrapper.update(e)},populate:function(e){this.wrapper.populate.apply(this.wrapper,arguments)}}),BI.shortcut("bi.horizontal_center",BI.HorizontalCenterLayout)},function(e,t){BI.VerticalCenterLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.VerticalCenterLayout.superclass.props.apply(this,arguments),{baseCls:"bi-vertical-center-layout",hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.VerticalCenterLayout.superclass.render.apply(this,arguments);var t=this,n=this.options,i=n.items,r=[];return BI.each(i,function(e){r.push({column:0,row:e,el:BI.createWidget({type:"bi.default",cls:"center-element "+(0===e?"first-element ":"")+(e===i.length-1?"last-element":"")})})}),BI.each(i,function(e,t){if(t){var i=BI.createWidget(t);i.element.css({position:"absolute",left:n.hgap+n.lgap,right:n.hgap+n.rgap,top:n.vgap+n.tgap,bottom:n.vgap+n.bgap,height:"auto"}),r[e].el.addItem(i)}}),{type:"bi.grid",ref:function(e){t.wrapper=e},columns:1,rows:r.length,items:r}},resize:function(){},addItem:function(e){throw new Error("cannot be added")},update:function(e){return this.wrapper.update(e)},populate:function(e){this.wrapper.populate.apply(this.wrapper,arguments)}}),BI.shortcut("bi.vertical_center",BI.VerticalCenterLayout)},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t){BI.Pane=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Pane.superclass._defaultConfig.apply(this,arguments),{_baseCls:"bi-pane",tipText:BI.i18nText("BI-No_Selected_Item"),overlap:!0,onLoaded:BI.emptyFn})},_assertTip:function(){var e=this.options;this._tipText||(this._tipText=BI.createWidget({type:"bi.label",cls:"bi-tips",text:e.tipText,height:25}),BI.createWidget({type:"bi.absolute_center_adapt",element:this,items:[this._tipText]}))},loading:function(){var e=this.options,t=BI.isIE(),i=BI.createWidget({type:"bi.horizontal",cls:"bi-loading-widget"+(t?" wave-loading hack":""),height:30,width:30,hgap:5,vgap:2.5,items:t?[]:[{type:"bi.layout",cls:"animate-rect rect1",height:25,width:3},{type:"bi.layout",cls:"animate-rect rect2",height:25,width:3},{type:"bi.layout",cls:"animate-rect rect3",height:25,width:3}]});this.setTipVisible(!1),!0===e.overlap?(BI.Layers.has(this.getName())||BI.createWidget({type:"bi.absolute_center_adapt",cls:"loading-container",items:[{el:i}],element:BI.Layers.make(this.getName(),this)}),BI.Layers.show(this.getName())):BI.isNull(this._loading)&&(this._loading=i,this._loading.element.css("zIndex",1),BI.createWidget({type:"bi.absolute_center_adapt",element:this,cls:"loading-container",items:[{el:this._loading,left:0,right:0,top:0}]})),this.element.addClass("loading-status")},loaded:function(){var e=this.options;BI.Layers.remove(this.getName()),this._loading&&this._loading.destroy(),this._loading&&(this._loading=null),e.onLoaded(),this.fireEvent(BI.Pane.EVENT_LOADED),this.element.removeClass("loading-status")},check:function(){this.setTipVisible(BI.isEmpty(this.options.items))},setTipVisible:function(e){!0===e?(this._assertTip(),this._tipText.setVisible(!0)):this._tipText&&this._tipText.setVisible(!1)},populate:function(e){this.options.items=e||[],this.check()},empty:function(){}}),BI.Pane.EVENT_LOADED="EVENT_LOADED"},function(e,t){BI.Single=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.Single.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{_baseCls:(e._baseCls||"")+" bi-single",readonly:!1,title:null,warningTitle:null,tipType:null,value:null,belowMouse:!1})},_showToolTip:function(e,t){t=t||{};var i=this.options,n=this.getTipType()||(this.isEnabled()?"success":"warning"),r="success"===n?this.getTitle():this.getWarningTitle()||this.getTitle();BI.isKey(r)&&(BI.Tooltips.show(e,this.getName(),r,n,this,t),i.action&&BI.Actions.runAction(i.action,"hover",i,this),BI.Actions.runGlobalAction("hover",i,this))},_hideTooltip:function(){var e=this,t=BI.Tooltips.get(this.getName());BI.isNotNull(t)&&t.element.fadeOut(200,function(){BI.Tooltips.remove(e.getName())})},_init:function(){BI.Single.superclass._init.apply(this,arguments);var e=this.options;(BI.isKey(e.title)||BI.isKey(e.warningTitle)||BI.isFunction(e.title)||BI.isFunction(e.warningTitle))&&this.enableHover({belowMouse:e.belowMouse,container:e.container})},_clearTimeOut:function(){BI.isNotNull(this.showTimeout)&&(clearTimeout(this.showTimeout),this.showTimeout=null),BI.isNotNull(this.hideTimeout)&&(clearTimeout(this.hideTimeout),this.hideTimeout=null)},enableHover:function(t){t=t||{};var i=this;this._hoverBinded||(this.element.on("mouseenter.title"+this.getName(),function(e){i._e=e,"warning"===i.getTipType()||BI.isKey(i.getWarningTitle())&&!i.isEnabled()?i.showTimeout=BI.delay(function(){BI.isNotNull(i.showTimeout)&&i._showToolTip(i._e||e,t)},200):"success"!==i.getTipType()&&!i.isEnabled()||(i.showTimeout=BI.delay(function(){BI.isNotNull(i.showTimeout)&&i._showToolTip(i._e||e,t)},500))}),this.element.on("mousemove.title"+this.getName(),function(e){i._e=e,BI.isNotNull(i.showTimeout)&&(clearTimeout(i.showTimeout),i.showTimeout=null),BI.isNull(i.hideTimeout)&&(i.hideTimeout=BI.delay(function(){BI.isNotNull(i.hideTimeout)&&i._hideTooltip()},500)),i.showTimeout=BI.delay(function(){BI.isNotNull(i.showTimeout)&&(BI.isNotNull(i.hideTimeout)&&(clearTimeout(i.hideTimeout),i.hideTimeout=null),i.element.__isMouseInBounds__(i._e||e)&&i._showToolTip(i._e||e,t))},500)}),this.element.on("mouseleave.title"+this.getName(),function(e){i._e=null,i._clearTimeOut(),i._hideTooltip()}),this._hoverBinded=!0)},disabledHover:function(){this._clearTimeOut(),this._hideTooltip(),this.element.unbind("mouseenter.title"+this.getName()).unbind("mousemove.title"+this.getName()).unbind("mouseleave.title"+this.getName()),this._hoverBinded=!1},populate:function(e){this.items=e||[]},setTitle:function(e,t){this.options.title=e,BI.isKey(e)||BI.isFunction(e)?this.enableHover(t):this.disabledHover()},setWarningTitle:function(e,t){this.options.warningTitle=e,BI.isKey(e)||BI.isFunction(e)?this.enableHover(t):this.disabledHover()},getTipType:function(){return this.options.tipType},isReadOnly:function(){return!!this.options.readonly},getTitle:function(){var e=this.options.title;return BI.isFunction(e)?e():e},getWarningTitle:function(){var e=this.options.warningTitle;return BI.isFunction(e)?e():e},setValue:function(e){this.options.readonly||(this.options.value=e)},getValue:function(){return this.options.value},_unMount:function(){BI.Single.superclass._unMount.apply(this,arguments),BI.isNotNull(this.showTimeout)&&(clearTimeout(this.showTimeout),this.showTimeout=null),BI.Tooltips.remove(this.getName())}})},function(e,t){BI.Text=BI.inherit(BI.Single,{props:{baseCls:"bi-text",textAlign:"left",whiteSpace:"normal",lineHeight:null,handler:null,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,text:"",py:"",highLight:!1},render:function(){var e=this,t=this.options;0<t.hgap+t.lgap&&this.element.css({"padding-left":t.hgap+t.lgap+"px"}),0<t.hgap+t.rgap&&this.element.css({"padding-right":t.hgap+t.rgap+"px"}),0<t.vgap+t.tgap&&this.element.css({"padding-top":t.vgap+t.tgap+"px"}),0<t.vgap+t.bgap&&this.element.css({"padding-bottom":t.vgap+t.bgap+"px"}),BI.isNumber(t.height)&&this.element.css({lineHeight:t.height+"px"}),BI.isNumber(t.lineHeight)&&this.element.css({lineHeight:t.lineHeight+"px"}),BI.isWidthOrHeight(t.maxWidth)&&this.element.css({maxWidth:t.maxWidth}),this.element.css({textAlign:t.textAlign,whiteSpace:this._getTextWrap(),textOverflow:"nowrap"===t.whiteSpace?"ellipsis":"",overflow:"nowrap"===t.whiteSpace?"":BI.isWidthOrHeight(t.height)?"auto":""}),t.handler?(this.text=BI.createWidget({type:"bi.layout",tagName:"span"}),this.text.element.click(function(){t.handler(e.getValue())}),BI.createWidget({type:"bi.default",element:this,items:[this.text]})):this.text=this;var i=this._getShowText();BI.isKey(i)?this.setText(i):BI.isKey(t.value)&&this.setText(t.value),BI.isKey(t.keyword)&&this.doRedMark(t.keyword),t.highLight&&this.doHighLight()},_getTextWrap:function(){switch(this.options.whiteSpace){case"nowrap":return"pre";case"normal":default:return"pre-wrap"}},_getShowText:function(){var e=this.options;return BI.isFunction(e.text)?e.text():e.text},doRedMark:function(e){var t=this.options;t.keyword=e,this.text.element.__textKeywordMarked__(this._getShowText()||t.value,e,t.py)},unRedMark:function(){var e=this.options;e.keyword="",this.text.element.__textKeywordMarked__(this._getShowText()||e.value,"",e.py)},doHighLight:function(){this.text.element.addClass("bi-high-light")},unHighLight:function(){this.text.element.removeClass("bi-high-light")},setValue:function(e){BI.Text.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.setText(e)},setStyle:function(e){this.text.element.css(e)},setText:function(e){BI.Text.superclass.setText.apply(this,arguments),this.options.text=BI.isNotNull(e)?e:"",BI.isIE9Below()?this.text.element.html(BI.htmlEncode(this._getShowText())):(this.text.element[0].textContent=this._getShowText(),BI.isKey(this.options.keyword)&&this.doRedMark(this.options.keyword))}}),BI.shortcut("bi.text",BI.Text)},function(e,t){BI.BasicButton=BI.inherit(BI.Single,{_defaultConfig:function(){var e=BI.BasicButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{_baseCls:(e._baseCls||"")+" bi-basic-button"+(e.invalid?"":" cursor-pointer")+(BI.isIE()&&BI.getIEVersion()<10?" hack":""),value:"",text:"",stopEvent:!1,stopPropagation:!1,selected:!1,once:!1,forceSelected:!1,forceNotSelected:!1,disableSelected:!1,shadow:!1,isShadowShowingOnSelected:!1,trigger:null,handler:BI.emptyFn,bubble:null})},_init:function(){BI.BasicButton.superclass._init.apply(this,arguments);var e=this.options;!0===e.selected&&BI.nextTick(BI.bind(function(){this.setSelected(e.selected)},this)),BI.nextTick(BI.bind(this.bindEvent,this)),e.shadow&&this._createShadow(),e.level&&this.element.addClass("button-"+e.level)},_createShadow:function(){function t(){i.$mask||(i.$mask=BI.createWidget(BI.isObject(n.shadow)?n.shadow:{},{type:"bi.layout",cls:"bi-button-mask"}),i.$mask.invisible(),BI.createWidget({type:"bi.absolute",element:i,items:[{el:i.$mask,left:0,right:0,top:0,bottom:0}]}))}var i=this,n=this.options;this.element.mouseup(function(){i._hover||n.isShadowShowingOnSelected||(t(),i.$mask.invisible())}),this.element.on("mouseenter."+this.getName(),function(e){i.element.__isMouseInBounds__(e)&&(!i.isEnabled()||i._hover||!n.isShadowShowingOnSelected&&i.isSelected()||(t(),i.$mask.visible()))}),this.element.on("mousemove."+this.getName(),function(e){i.element.__isMouseInBounds__(e)||i.isEnabled()&&!i._hover&&(t(),i.$mask.invisible())}),this.element.on("mouseleave."+this.getName(),function(){i.isEnabled()&&!i._hover&&(t(),i.$mask.invisible())})},bindEvent:function(){var o=this,a=this.options,s=this.handle();if(s){s=s.element;var e=(a.trigger||"").split(",");BI.each(e,function(e,t){switch(t){case"mouseup":var i=!1;s.mousedown(function(){i=!0}),s.mouseup(function(e){!0===i&&u(e),i=!1,l(e)});break;case"mousedown":i=!1;var n=!1;s.mousedown(function(e){BI.Widget._renderEngine.createElement(document).bind("mouseup."+o.getName(),function(e){!BI.DOM.isExist(o)||s.__isMouseInBounds__(e)||!0!==i||n||o._trigger(),i=!1,BI.Widget._renderEngine.createElement(document).unbind("mouseup."+o.getName())}),!0!==i&&(o.isSelected()?n=!0:u(e),i=!0,l(e))}),s.mouseup(function(e){BI.DOM.isExist(o)&&!0===i&&!0===n&&u(e),n=i=!1,BI.Widget._renderEngine.createElement(document).unbind("mouseup."+o.getName())});break;case"dblclick":s.dblclick(u);break;case"lclick":var r;i=!1;s.mousedown(function(e){BI.Widget._renderEngine.createElement(document).bind("mouseup."+o.getName(),function(e){r&&clearInterval(r),r=null,i=!1,BI.Widget._renderEngine.createElement(document).unbind("mouseup."+o.getName())}),!0!==i&&(!o.isEnabled()||o.isOnce()&&o.isSelected()||(r=setInterval(function(){o.isEnabled()&&o.doClick()},180),i=!0,l(e)))});break;default:(a.stopEvent||a.stopPropagation)&&s.mousedown(function(e){l(e)}),s.click(u)}});var i=BI.debounce(this._doClick,BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1})}function l(e){a.stopEvent&&e.stopEvent(),a.stopPropagation&&e.stopPropagation()}function u(e){var t;l(e),!o.isEnabled()||o.isOnce()&&o.isSelected()||(BI.isKey(a.bubble)||BI.isFunction(a.bubble)?(BI.isNull(o.combo)&&BI.createWidget({type:"bi.absolute",element:o,items:[{el:{type:"bi.bubble_combo",trigger:"",destroyWhenHide:!0,ref:function(){o.combo=this},el:{type:"bi.layout",height:"100%"},popup:{type:"bi.text_bubble_bar_popup_view",text:n(),ref:function(){t=this},listeners:[{eventName:BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON,action:function(e){o.combo.hideView(),e&&i.apply(o,arguments)}}]},listeners:[{eventName:BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,action:function(){t.populate(n())}}]},left:0,right:0,bottom:0,top:0}]}),o.combo.isViewVisible()?o.combo.hideView():o.combo.showView()):i.apply(o,arguments))}function n(){var e=o.options.bubble;return BI.isFunction(e)?e():e}},_trigger:function(e){var t=this.options;if(this.isEnabled()&&(this.isDisableSelected()||(this.isForceSelected()?this.setSelected(!0):this.isForceNotSelected()?this.setSelected(!1):this.setSelected(!this.isSelected())),this.isValid())){t.handler.call(this,this.getValue(),this,e);var i=this.getValue();this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,i,this,e),this.fireEvent(BI.BasicButton.EVENT_CHANGE,i,this),t.action&&BI.Actions.runAction(t.action,"click",t,this),BI.Actions.runGlobalAction("click",t,this)}},_doClick:function(e){this.isValid()&&this.beforeClick(e),this._trigger(e),this.isValid()&&this.doClick(e)},beforeClick:function(){},doClick:function(){},handle:function(){return this},hover:function(){this._hover=!0,this.handle().element.addClass("hover"),this.options.shadow&&this.$mask&&this.$mask.setVisible(!0)},dishover:function(){this._hover=!1,this.handle().element.removeClass("hover"),this.options.shadow&&this.$mask&&this.$mask.setVisible(!1)},setSelected:function(e){var t=this.options;(t.selected=e)?this.handle().element.addClass("active"):this.handle().element.removeClass("active"),t.shadow&&!t.isShadowShowingOnSelected&&this.$mask&&this.$mask.setVisible(!1)},isSelected:function(){return this.options.selected},isOnce:function(){return this.options.once},isForceSelected:function(){return this.options.forceSelected},isForceNotSelected:function(){return this.options.forceNotSelected},isDisableSelected:function(){return this.options.disableSelected},setText:function(e){this.options.text=e},getText:function(){return this.options.text},_setEnable:function(e){BI.BasicButton.superclass._setEnable.apply(this,arguments),!0===e?this.element.removeClass("base-disabled disabled"):!1===e&&this.element.addClass("base-disabled disabled"),e||this.options.shadow&&this.$mask&&this.$mask.setVisible(!1)},empty:function(){BI.Widget._renderEngine.createElement(document).unbind("mouseup."+this.getName()),BI.BasicButton.superclass.empty.apply(this,arguments)},destroy:function(){BI.BasicButton.superclass.destroy.apply(this,arguments)}}),BI.BasicButton.EVENT_CHANGE="BasicButton.EVENT_CHANGE"},function(e,t){BI.NodeButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var e=BI.NodeButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{_baseCls:(e._baseCls||"")+" bi-node",open:!1})},_init:function(){BI.NodeButton.superclass._init.apply(this,arguments);var e=this;BI.nextTick(function(){e.setOpened(e.isOpened())})},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.setOpened(!this.isOpened())},isOnce:function(){return!1},isOpened:function(){return!!this.options.open},setOpened:function(e){this.options.open=!!e},triggerCollapse:function(){this.isOpened()&&(this.setOpened(!1),this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,this.getValue(),this))},triggerExpand:function(){this.isOpened()||(this.setOpened(!0),this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,this.getValue(),this))}})},function(e,t){BI.Tip=BI.inherit(BI.Single,{_defaultConfig:function(){var e=BI.Tip.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{_baseCls:(e._baseCls||"")+" bi-tip",zIndex:BI.zIndex_tip})},_init:function(){BI.Tip.superclass._init.apply(this,arguments),this.element.css({zIndex:this.options.zIndex})}})},function(e,t){BI.ButtonGroup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ButtonGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-button-group",behaviors:{},items:[],value:"",chooseType:BI.Selection.Single,layouts:[{type:"bi.center",hgap:0,vgap:0}]})},_init:function(){BI.ButtonGroup.superclass._init.apply(this,arguments);var e=this.options,i={};BI.each(e.behaviors,function(e,t){i[e]=BI.BehaviorFactory.createBehavior(e,{rule:t})}),this.behaviors=i,this.populate(e.items),(BI.isKey(e.value)||BI.isNotEmptyArray(e.value))&&this.setValue(e.value)},_createBtns:function(e){this.options;return BI.createWidgets(BI.createItems(e,{type:"bi.text_button"}))},_btnsCreator:function(e){var r=this,i=Array.prototype.slice.call(arguments),o=this.options,t=this._createBtns(e);return i[0]=t,BI.each(this.behaviors,function(e,t){t.doBehavior.apply(t,i)}),BI.each(t,function(e,n){n.on(BI.Controller.EVENT_CHANGE,function(e,t,i){if(e===BI.Events.CLICK){switch(o.chooseType){case BI.ButtonGroup.CHOOSE_TYPE_SINGLE:r.setValue(n.getValue());break;case BI.ButtonGroup.CHOOSE_TYPE_NONE:r.setValue([])}r.fireEvent(BI.Controller.EVENT_CHANGE,arguments),r.fireEvent(BI.ButtonGroup.EVENT_CHANGE,t,i)}else r.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),n.on(BI.Events.DESTROY,function(){BI.remove(r.buttons,n)})}),t},_packageBtns:function(e){for(var i=this.options,n=i.layouts.length-1;0<n;n--)e=BI.map(e,function(e,t){return BI.extend({},i.layouts[n],{items:[BI.extend({},i.layouts[n].el,{el:t})]})});return e},_packageSimpleItems:function(i){var e=this.options;return BI.map(e.items,function(e,t){return BI.stripEL(t)===t?i[e]:BI.extend({},t,{el:i[e]})})},_packageItems:function(e,t){return BI.createItems(BI.makeArrayByArray(e,{}),BI.clone(t))},_packageLayout:function(e){for(var t=this.options,i=BI.deepClone(t.layouts[0]),n=BI.formatEL(i).el;n&&n.items&&!BI.isEmpty(n.items);)n=BI.formatEL(n.items[0]).el;return n.items=e,i},_isSimpleLayout:function(){var e=this.options;return 1===e.layouts.length&&!BI.isArray(e.items[0])},doBehavior:function(){var i=Array.prototype.slice.call(arguments);i.unshift(this.buttons),BI.each(this.behaviors,function(e,t){t.doBehavior.apply(t,i)})},prependItems:function(e){this.options;var t=this._btnsCreator.apply(this,arguments);this.buttons=BI.concat(t,this.buttons),this._isSimpleLayout()&&this.layouts&&this.layouts.prependItems?this.layouts.prependItems(t):(e=this._packageItems(e,this._packageBtns(t)),this.layouts.prependItems(this._packageLayout(e).items))},addItems:function(e){this.options;var t=this._btnsCreator.apply(this,arguments);this.buttons=BI.concat(this.buttons,t),this._isSimpleLayout()&&this.layouts&&this.layouts.addItems?this.layouts.addItems(t):(e=this._packageItems(e,this._packageBtns(t)),this.layouts.addItems(this._packageLayout(e).items))},removeItemAt:function(e){BI.removeAt(this.buttons,e),this.layouts.removeItemAt(e)},removeItems:function(i){i=BI.isArray(i)?i:[i];var n=[];BI.each(this.buttons,function(e,t){BI.deepContains(i,t.getValue())&&n.push(e)}),BI.removeAt(this.buttons,n),this.layouts.removeItemAt(n)},populate:function(e){e=e||[],this.empty(),this.options.items=e,this.buttons=this._btnsCreator.apply(this,arguments),e=this._isSimpleLayout()?this._packageSimpleItems(this.buttons):this._packageItems(e,this._packageBtns(this.buttons)),this.layouts=BI.createWidget(BI.extend({element:this},this._packageLayout(e)))},setNotSelectedValue:function(i){i=BI.isArray(i)?i:[i],BI.each(this.buttons,function(e,t){BI.deepContains(i,t.getValue())?t.setSelected&&t.setSelected(!1):t.setSelected&&t.setSelected(!0)})},setEnabledValue:function(i){i=BI.isArray(i)?i:[i],BI.each(this.buttons,function(e,t){BI.deepContains(i,t.getValue())?t.setEnable(!0):t.setEnable(!1)})},setValue:function(i){i=BI.isArray(i)?i:[i],BI.each(this.buttons,function(e,t){BI.deepContains(i,t.getValue())?t.setSelected&&t.setSelected(!0):t.setSelected&&t.setSelected(!1)})},getNotSelectedValue:function(){var i=[];return BI.each(this.buttons,function(e,t){!t.isEnabled()||t.isSelected&&t.isSelected()||i.push(t.getValue())}),i},getValue:function(){var i=[];return BI.each(this.buttons,function(e,t){t.isEnabled()&&t.isSelected&&t.isSelected()&&i.push(t.getValue())}),i},getAllButtons:function(){return this.buttons},getAllLeaves:function(){return this.buttons},getSelectedButtons:function(){var i=[];return BI.each(this.buttons,function(e,t){t.isSelected&&t.isSelected()&&i.push(t)}),i},getNotSelectedButtons:function(){var i=[];return BI.each(this.buttons,function(e,t){t.isSelected&&!t.isSelected()&&i.push(t)}),i},getIndexByValue:function(i){var n=-1;return BI.any(this.buttons,function(e,t){if(t.isEnabled()&&t.getValue()===i)return n=e,!0}),n},getNodeById:function(i){var n;return BI.any(this.buttons,function(e,t){if(t.isEnabled()&&t.options.id===i)return n=t,!0}),n},getNodeByValue:function(i){var n;return BI.any(this.buttons,function(e,t){if(t.isEnabled()&&t.getValue()===i)return n=t,!0}),n},empty:function(){BI.ButtonGroup.superclass.empty.apply(this,arguments),this.options.items=[]},destroy:function(){BI.ButtonGroup.superclass.destroy.apply(this,arguments),this.options.items=[]}}),BI.extend(BI.ButtonGroup,{CHOOSE_TYPE_SINGLE:BI.Selection.Single,CHOOSE_TYPE_MULTI:BI.Selection.Multi,CHOOSE_TYPE_ALL:BI.Selection.All,CHOOSE_TYPE_NONE:BI.Selection.None,CHOOSE_TYPE_DEFAULT:BI.Selection.Default}),BI.ButtonGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.button_group",BI.ButtonGroup)},function(e,t){BI.ButtonTree=BI.inherit(BI.ButtonGroup,{_defaultConfig:function(){return BI.extend(BI.ButtonTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-button-tree"})},_init:function(){BI.ButtonTree.superclass._init.apply(this,arguments)},setNotSelectedValue:function(i){i=BI.isArray(i)?i:[i],BI.each(this.buttons,function(e,t){BI.isFunction(t.setSelected)?BI.deepContains(i,t.getValue())?t.setSelected(!1):t.setSelected(!0):t.setNotSelectedValue(i)})},setEnabledValue:function(i){i=BI.isArray(i)?i:[i],BI.each(this.buttons,function(e,t){BI.isFunction(t.setEnabledValue)?t.setEnabledValue(i):BI.deepContains(i,t.getValue())?t.setEnable(!0):t.setEnable(!1)})},setValue:function(i){i=BI.isArray(i)?i:[i],BI.each(this.buttons,function(e,t){BI.isFunction(t.setSelected)?BI.deepContains(i,t.getValue())?t.setSelected(!0):t.setSelected(!1):t.setValue(i)})},getNotSelectedValue:function(){var i=[];return BI.each(this.buttons,function(e,t){!t.isEnabled()||BI.isFunction(t.setSelected)?t.isEnabled()&&t.isSelected&&!t.isSelected()&&i.push(t.getValue()):i=BI.concat(i,t.getNotSelectedValue())}),i},getValue:function(){var i=[];return BI.each(this.buttons,function(e,t){!t.isEnabled()||BI.isFunction(t.setSelected)?t.isEnabled()&&t.isSelected&&t.isSelected()&&i.push(t.getValue()):i=BI.concat(i,t.getValue())}),i},getSelectedButtons:function(){var i=[];return BI.each(this.buttons,function(e,t){!t.isEnabled()||BI.isFunction(t.setSelected)?t.isSelected&&t.isSelected()&&i.push(t):i=i.concat(t.getSelectedButtons())}),i},getNotSelectedButtons:function(){var i=[];return BI.each(this.buttons,function(e,t){!t.isEnabled()||BI.isFunction(t.setSelected)?t.isSelected&&!t.isSelected()&&i.push(t):i=i.concat(t.getNotSelectedButtons())}),i},getAllLeaves:function(){var i=[];return BI.each(this.buttons,function(e,t){!t.isEnabled()||BI.isFunction(t.setSelected)?t.isEnabled()&&i.push(t):i=i.concat(t.getAllLeaves())}),i},getIndexByValue:function(n){var r=-1;return BI.any(this.buttons,function(e,t){var i=t.getValue();if(t.isEnabled()&&(i===n||BI.contains(i,n)))return r=e,!0}),r},getNodeById:function(i){var n;return BI.any(this.buttons,function(e,t){if(t.isEnabled()){if(t.attr("id")===i)return n=t,!0;if(BI.isFunction(t.getNodeById)&&(n=t.getNodeById(i)))return!0}}),n},getNodeByValue:function(i){var n;return BI.any(this.buttons,function(e,t){if(t.isEnabled())if(BI.isFunction(t.getNodeByValue)){if(n=t.getNodeByValue(i))return!0}else if(t.attr("value")===i)return n=t,!0}),n}}),BI.ButtonTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.button_tree",BI.ButtonTree)},function(e,t){BI.prepares.push(function(){BI.Resizers=new BI.ResizeController,BI.Layers=new BI.LayerController,BI.Maskers=new BI.MaskersController,BI.Bubbles=new BI.BubblesController,BI.Tooltips=new BI.TooltipsController,BI.Popovers=new BI.PopoverController,BI.Broadcasts=new BI.BroadcastController,BI.StyleLoaders=new BI.StyleLoaderManager})},function(e,t){BI.CollectionView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CollectionView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-collection",overflowX:!0,overflowY:!0,cellSizeAndPositionGetter:BI.emptyFn,horizontalOverscanSize:0,verticalOverscanSize:0,scrollLeft:0,scrollTop:0,items:[]})},_init:function(){BI.CollectionView.superclass._init.apply(this,arguments);var e=this,t=this.options;this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1,this._debounceRelease=BI.debounce(function(){e._scrollLock=!1},1e3/60),this.container=BI.createWidget({type:"bi.absolute"}),this.element.scroll(function(){!0!==e._scrollLock&&(t.scrollLeft=e.element.scrollLeft(),t.scrollTop=e.element.scrollTop(),e._calculateChildrenToRender(),e.fireEvent(BI.CollectionView.EVENT_SCROLL,{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}))}),BI.createWidget({type:"bi.vertical",element:this,scrollable:!0===t.overflowX&&!0===t.overflowY,scrolly:!1===t.overflowX&&!0===t.overflowY,scrollx:!0===t.overflowX&&!1===t.overflowY,items:[this.container]}),0<t.items.length&&(this._calculateSizeAndPositionData(),this._populate())},mounted:function(){var e=this.options;0===e.scrollLeft&&0===e.scrollTop||(this.element.scrollTop(e.scrollTop),this.element.scrollLeft(e.scrollLeft))},_calculateSizeAndPositionData:function(){for(var e=this.options,t=[],i=new BI.SectionManager,n=0,r=0,o=0,a=e.items.length;o<a;o++){var s=e.cellSizeAndPositionGetter(o);if(null==s.height||isNaN(s.height)||null==s.width||isNaN(s.width)||null==s.x||isNaN(s.x)||null==s.y||isNaN(s.y))throw Error();n=Math.max(n,s.y+s.height),r=Math.max(r,s.x+s.width),t[s.index=o]=s,i.registerCell(s,o)}this._cellMetadata=t,this._sectionManager=i,this._height=n,this._width=r},_cellRenderers:function(e,t,i,n){return this._lastRenderedCellIndices=this._sectionManager.getCellIndices(e,t,i,n),this._cellGroupRenderer()},_cellGroupRenderer:function(){var n=this,r=(this.options,[]);return BI.each(this._lastRenderedCellIndices,function(e,t){var i=n._sectionManager.getCellMetadata(t);r.push(i)}),r},_calculateChildrenToRender:function(){var i=this,e=this.options,t=BI.clamp(e.scrollLeft,0,this._getMaxScrollLeft()),n=BI.clamp(e.scrollTop,0,this._getMaxScrollTop()),r=Math.max(0,t-e.horizontalOverscanSize),o=Math.max(0,n-e.verticalOverscanSize),a=Math.min(this._width,t+e.width+e.horizontalOverscanSize),s=Math.min(this._height,n+e.height+e.verticalOverscanSize);if(0<a&&0<s){if(o>=this.renderRange.minY&&s<=this.renderRange.maxY&&r>=this.renderRange.minX&&a<=this.renderRange.maxX)return;for(var l=this._cellRenderers(s-o,a-r,r,o),u=[],c={},h={},p={},d={},g=0,f=l.length;g<f;g++){p[(v=l[g]).x]=v.x,p[v.x+v.width]=v.x+v.width,d[v.y]=v.y,d[v.y+v.height]=v.y+v.height}p=BI.toArray(p),d=BI.toArray(d);function I(e,t){null==e[t]&&(e[t]=Number.MAX_VALUE)}function B(e,t){null==e[t]&&(e[t]=0)}var E=BI.invert(p),_=BI.invert(d),m={},b={},T={},y={};for(g=0,f=l.length;g<f;g++){var C,v=l[g],N=this.renderedKeys[v.index]&&this.renderedKeys[v.index][1];0<=N?(v.width!==this.renderedCells[N]._width&&(this.renderedCells[N]._width=v.width,this.renderedCells[N].el.setWidth(v.width)),v.height!==this.renderedCells[N]._height&&(this.renderedCells[N]._height=v.height,this.renderedCells[N].el.setHeight(v.height)),this.renderedCells[N]._left!==v.x&&this.renderedCells[N].el.element.css("left",v.x+"px"),this.renderedCells[N]._top!==v.y&&this.renderedCells[N].el.element.css("top",v.y+"px"),u.push(C=this.renderedCells[N])):(C=BI.createWidget(BI.extend({type:"bi.label",width:v.width,height:v.height},e.items[v.index],{cls:(e.items[v.index].cls||"")+" container-cell"+(0===v.y?" first-row":"")+(0===v.x?" first-col":""),_left:v.x,_top:v.y})),u.push({el:C,left:v.x,top:v.y,_left:v.x,_top:v.y,_width:v.width,_height:v.height}));for(var V=0|_[v.y],S=0|_[v.y+v.height],x=V;x<=S;x++){var L=d[x];I(m,L),B(b,L),m[L]=Math.min(m[L],v.x),b[L]=Math.max(b[L],v.x+v.width)}var w=0|E[v.x],A=0|E[v.x+v.width];for(x=w;x<=A;x++){var D=p[x];I(T,D),B(y,D),T[D]=Math.min(T[D],v.y),y[D]=Math.max(y[D],v.y+v.height)}c[v.index]=[v.index,g],h[g]=C}var M={},k={},P=[];BI.each(c,function(e,t){i.renderedKeys[e]?M[e]=t:k[e]=t}),BI.each(this.renderedKeys,function(e,t){M[e]||k[e]||P.push(t[1])}),BI.each(P,function(e,t){i.renderedCells[t].el._destroy()});var H=[];BI.each(k,function(e,t){H.push(u[t[1]])}),this.container.addItems(H),this.container._children=h,this.container.attr("items",u),this.renderedCells=u,this.renderedKeys=c;var R=BI.min(m),Y=BI.max(b),W=BI.max(T),O=BI.min(y);this.renderRange={minX:R,minY:W,maxX:Y,maxY:O}}},_getMaxScrollLeft:function(){return Math.max(0,this._width-this.options.width+(this.options.overflowX?BI.DOM.getScrollWidth():0))},_getMaxScrollTop:function(){return Math.max(0,this._height-this.options.height+(this.options.overflowY?BI.DOM.getScrollWidth():0))},_populate:function(e){var t=this.options;if(this._reRange(),e&&e!==this.options.items&&(this.options.items=e,this._calculateSizeAndPositionData()),0<t.items.length){this.container.setWidth(this._width),this.container.setHeight(this._height),this._calculateChildrenToRender();try{this.element.scrollTop(t.scrollTop),this.element.scrollLeft(t.scrollLeft)}catch(i){}}},setScrollLeft:function(e){this.options.scrollLeft!==e&&(this._scrollLock=!0,this.options.scrollLeft=BI.clamp(e||0,0,this._getMaxScrollLeft()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollLeft(this.options.scrollLeft))},setScrollTop:function(e){this.options.scrollTop!==e&&(this._scrollLock=!0,this.options.scrollTop=BI.clamp(e||0,0,this._getMaxScrollTop()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollTop(this.options.scrollTop))},setOverflowX:function(e){var t=this;this.options.overflowX!==!!e&&(this.options.overflowX=!!e,BI.nextTick(function(){t.element.css({overflowX:e?"auto":"hidden"})}))},setOverflowY:function(e){var t=this;this.options.overflowY!==!!e&&(this.options.overflowY=!!e,BI.nextTick(function(){t.element.css({overflowY:e?"auto":"hidden"})}))},getScrollLeft:function(){return this.options.scrollLeft},getScrollTop:function(){return this.options.scrollTop},getMaxScrollLeft:function(){return this._getMaxScrollLeft()},getMaxScrollTop:function(){return this._getMaxScrollTop()},_reRange:function(){this.renderRange={}},_clearChildren:function(){this.container._children={},this.container.attr("items",[])},restore:function(){BI.each(this.renderedCells,function(e,t){t.el._destroy()}),this._clearChildren(),this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1},populate:function(e){e&&e!==this.options.items&&this.restore(),this._populate(e)}}),BI.CollectionView.EVENT_SCROLL="EVENT_SCROLL",BI.shortcut("bi.collection_view",BI.CollectionView)},function(e,t){BI.Combo=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.Combo.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-combo",trigger:"click",toggle:!0,direction:"bottom",logic:{dynamic:!0},container:null,isDefaultInit:!1,destroyWhenHide:!1,isNeedAdjustHeight:!0,isNeedAdjustWidth:!0,stopEvent:!1,stopPropagation:!1,adjustLength:0,adjustXOffset:0,adjustYOffset:0,hideChecker:BI.emptyFn,offsetStyle:"left",el:{},popup:{},comboClass:"bi-combo-popup",hoverClass:"bi-combo-hover"})},_init:function(){BI.Combo.superclass._init.apply(this,arguments);var n=this,t=this.options;this._initCombo(),this._initPullDownAction(),this.combo.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.isEnabled()&&n.isValid()&&(e===BI.Events.EXPAND&&n._popupView(),e===BI.Events.COLLAPSE&&n._hideView(),e===BI.Events.EXPAND&&(n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),n.fireEvent(BI.Combo.EVENT_EXPAND)),e===BI.Events.COLLAPSE&&(n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),n.isViewVisible()&&n.fireEvent(BI.Combo.EVENT_COLLAPSE)),e===BI.Events.CLICK&&n.fireEvent(BI.Combo.EVENT_TRIGGER_CHANGE,i))}),n.element.on("mouseenter."+n.getName(),function(e){n.isEnabled()&&n.isValid()&&n.combo.isEnabled()&&n.combo.isValid()&&n.element.addClass(t.hoverClass)}),n.element.on("mouseleave."+n.getName(),function(e){n.isEnabled()&&n.isValid()&&n.combo.isEnabled()&&n.combo.isValid()&&n.element.removeClass(t.hoverClass)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend(t.logic,{items:[{el:this.combo}]})))),t.isDefaultInit&&this._assertPopupView(),BI.Resizers.add(this.getName(),BI.bind(function(){this.isViewVisible()&&this._hideView()},this))},_toggle:function(){this._assertPopupViewRender(),this.popupView.isVisible()?this._hideView():this.isEnabled()&&this._popupView()},_initPullDownAction:function(){function n(e){o.stopEvent&&e.stopEvent(),o.stopPropagation&&e.stopPropagation()}var r=this,o=this.options,e=(this.options.trigger||"").split(","),a=!1;function s(){r.isEnabled()&&r.isValid()&&r.combo.isEnabled()&&r.combo.isValid()&&!0===o.toggle&&(r._hideView(),r.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",r.combo),r.fireEvent(BI.Combo.EVENT_COLLAPSE)),r.popupView&&r.popupView.element.off("mouseenter."+r.getName()).off("mouseleave."+r.getName()),a=!1}BI.each(e,function(e,t){switch(t){case"hover":r.element.on("mouseenter."+r.getName(),function(e){r.isEnabled()&&r.isValid()&&r.combo.isEnabled()&&r.combo.isValid()&&(r._popupView(),r.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",r.combo),r.fireEvent(BI.Combo.EVENT_EXPAND))}),r.element.on("mouseleave."+r.getName(),function(e){r.popupView&&(r.popupView.element.on("mouseenter."+r.getName(),function(e){a=!0,r.popupView.element.on("mouseleave."+r.getName(),function(e){s()}),r.popupView.element.off("mouseenter."+r.getName())}),BI.defer(function(){a||s()},50))});break;case"click":var i=BI.debounce(function(e){r.combo.element.__isMouseInBounds__(e)&&r.isEnabled()&&r.isValid()&&r.combo.isEnabled()&&r.combo.isValid()&&(o.toggle?r._toggle():r._popupView(),r.isViewVisible()?(r.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",r.combo),r.fireEvent(BI.Combo.EVENT_EXPAND)):(r.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",r.combo),r.fireEvent(BI.Combo.EVENT_COLLAPSE)))},BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1});r.element.off(t+"."+r.getName()).on(t+"."+r.getName(),function(e){i(e),n(e)});break;case"click-hover":i=BI.debounce(function(e){r.combo.element.__isMouseInBounds__(e)&&r.isEnabled()&&r.isValid()&&r.combo.isEnabled()&&r.combo.isValid()&&(r._popupView(),r.isViewVisible()&&(r.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",r.combo),r.fireEvent(BI.Combo.EVENT_EXPAND)))},BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1});r.element.off("click."+r.getName()).on("click."+r.getName(),function(e){i(e),n(e)}),r.element.on("mouseleave."+r.getName(),function(e){r.popupView&&(r.popupView.element.on("mouseenter."+r.getName(),function(e){a=!0,r.popupView.element.on("mouseleave."+r.getName(),function(e){s()}),r.popupView.element.off("mouseenter."+r.getName())}),BI.defer(function(){a||s()},50))})}})},_initCombo:function(){this.combo=BI.createWidget(this.options.el,{value:this.options.value})},_assertPopupView:function(){var n=this,e=this.options;null==this.popupView&&(this.popupView=BI.createWidget(this.options.popup,{type:"bi.popup_view",value:e.value},this),this.popupView.on(BI.Controller.EVENT_CHANGE,function(e,t,i){e===BI.Events.CLICK&&(n.combo.setValue(n.getValue()),n.fireEvent(BI.Combo.EVENT_CHANGE,t,i)),n.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popupView.setVisible(!1),BI.nextTick(function(){n.fireEvent(BI.Combo.EVENT_AFTER_INIT)}))},_assertPopupViewRender:function(){this._assertPopupView(),this._rendered||(BI.createWidget({type:"bi.vertical",scrolly:!1,element:this.options.container||this,items:[{el:this.popupView}]}),this._rendered=!0)},_hideIf:function(e){if(0<this.element.find(e.target).length||this.popupView&&0<this.popupView.element.find(e.target).length||"CodeMirror-cursor"===e.target.className||0<BI.Widget._renderEngine.createElement(e.target).closest(".CodeMirror-hints").length){var t=this.options.direction.split(",");(BI.contains(t,"innerLeft")||BI.contains(t,"innerRight"))&&(this.adjustWidth(),this.adjustHeight())}else{!1!==this.options.hideChecker.apply(this,[e])&&this._hideView()}},_hideView:function(){this.fireEvent(BI.Combo.EVENT_BEFORE_HIDEVIEW),!0===this.options.destroyWhenHide?(this.popupView&&this.popupView.destroy(),this.popupView=null,this._rendered=!1):this.popupView&&this.popupView.invisible(),this.element.removeClass(this.options.comboClass),BI.Widget._renderEngine.createElement(document).unbind("mousedown."+this.getName()).unbind("mousewheel."+this.getName()),this.fireEvent(BI.Combo.EVENT_AFTER_HIDEVIEW)},_popupView:function(e){this._assertPopupViewRender(),this.fireEvent(BI.Combo.EVENT_BEFORE_POPUPVIEW),this.popupView.visible(),this.adjustWidth(e),this.adjustHeight(e),this.element.addClass(this.options.comboClass),BI.Widget._renderEngine.createElement(document).unbind("mousedown."+this.getName()).unbind("mousewheel."+this.getName()),BI.Widget._renderEngine.createElement(document).bind("mousedown."+this.getName(),BI.bind(this._hideIf,this)).bind("mousewheel."+this.getName(),BI.bind(this._hideIf,this)),this.fireEvent(BI.Combo.EVENT_AFTER_POPUPVIEW)},adjustWidth:function(e){var t=this.options;if(this.popupView&&!0===t.isNeedAdjustWidth){this.resetListWidth("");var i=this.popupView.element.outerWidth(),n=this.element.outerWidth()||t.width;n+80<i?n+=80:n<i&&(n=i),this.resetListWidth(n<100?100:n)}},adjustHeight:function(e){var t=this.options,i={};if(this.popupView){var n=this.popupView.isVisible();this.popupView.visible();var r=BI.isNotNull(e)?{element:{offset:function(){return{left:e.pageX,top:e.pageY}},bounds:function(){return{x:e.offsetX,y:e.offsetY,width:0,height:24}},outerWidth:function(){return 0},outerHeight:function(){return 24}}}:this.combo;switch(t.direction){case"bottom":case"bottom,right":i=BI.DOM.getComboPosition(r,this.popupView,t.adjustXOffset,t.adjustYOffset||t.adjustLength,t.isNeedAdjustHeight,["bottom","top","right","left"],t.offsetStyle);break;case"top":case"top,right":i=BI.DOM.getComboPosition(r,this.popupView,t.adjustXOffset,t.adjustYOffset||t.adjustLength,t.isNeedAdjustHeight,["top","bottom","right","left"],t.offsetStyle);break;case"left":case"left,bottom":i=BI.DOM.getComboPosition(r,this.popupView,t.adjustXOffset||t.adjustLength,t.adjustYOffset,t.isNeedAdjustHeight,["left","right","bottom","top"],t.offsetStyle);break;case"right":case"right,bottom":i=BI.DOM.getComboPosition(r,this.popupView,t.adjustXOffset||t.adjustLength,t.adjustYOffset,t.isNeedAdjustHeight,["right","left","bottom","top"],t.offsetStyle);break;case"top,left":i=BI.DOM.getComboPosition(r,this.popupView,t.adjustXOffset,t.adjustYOffset||t.adjustLength,t.isNeedAdjustHeight,["top","bottom","left","right"],t.offsetStyle);break;case"bottom,left":i=BI.DOM.getComboPosition(r,this.popupView,t.adjustXOffset,t.adjustYOffset||t.adjustLength,t.isNeedAdjustHeight,["bottom","top","left","right"],t.offsetStyle);break;case"left,top":i=BI.DOM.getComboPosition(r,this.popupView,t.adjustXOffset||t.adjustLength,t.adjustYOffset,t.isNeedAdjustHeight,["left","right","top","bottom"],t.offsetStyle);break;case"right,top":i=BI.DOM.getComboPosition(r,this.popupView,t.adjustXOffset||t.adjustLength,t.adjustYOffset,t.isNeedAdjustHeight,["right","left","top","bottom"],t.offsetStyle);break;case"right,innerRight":i=BI.DOM.getComboPosition(r,this.popupView,t.adjustXOffset||t.adjustLength,t.adjustYOffset,t.isNeedAdjustHeight,["right","left","innerRight","innerLeft","bottom","top"],t.offsetStyle);break;case"right,innerLeft":i=BI.DOM.getComboPosition(r,this.popupView,t.adjustXOffset||t.adjustLength,t.adjustYOffset,t.isNeedAdjustHeight,["right","left","innerLeft","innerRight","bottom","top"],t.offsetStyle);break;case"innerRight":i=BI.DOM.getComboPosition(r,this.popupView,t.adjustXOffset||t.adjustLength,t.adjustYOffset,t.isNeedAdjustHeight,["innerRight","innerLeft","right","left","bottom","top"],t.offsetStyle);break;case"innerLeft":i=BI.DOM.getComboPosition(r,this.popupView,t.adjustXOffset||t.adjustLength,t.adjustYOffset,t.isNeedAdjustHeight,["innerLeft","innerRight","left","right","bottom","top"],t.offsetStyle);break;case"top,custom":case"custom,top":i=BI.DOM.getTopAdaptPosition(r,this.popupView,t.adjustYOffset||t.adjustLength,t.isNeedAdjustHeight);break;case"custom,bottom":case"bottom,custom":i=BI.DOM.getBottomAdaptPosition(r,this.popupView,t.adjustYOffset||t.adjustLength,t.isNeedAdjustHeight);break;case"left,custom":case"custom,left":delete(i=BI.DOM.getLeftAdaptPosition(r,this.popupView,t.adjustXOffset||t.adjustLength)).top,delete i.adaptHeight;break;case"custom,right":case"right,custom":delete(i=BI.DOM.getRightAdaptPosition(r,this.popupView,t.adjustXOffset||t.adjustLength)).top,delete i.adaptHeight}"adaptHeight"in i&&this.resetListHeight(i.adaptHeight),"left"in i&&this.popupView.element.css({left:i.left}),"top"in i&&this.popupView.element.css({top:i.top}),this.position=i,this.popupView.setVisible(n)}},resetListHeight:function(e){this._assertPopupView(),this.popupView.resetHeight&&this.popupView.resetHeight(e)},resetListWidth:function(e){this._assertPopupView(),this.popupView.resetWidth&&this.popupView.resetWidth(e)},populate:function(e){this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),this.combo.populate.apply(this.combo,arguments)},_setEnable:function(e){BI.Combo.superclass._setEnable.apply(this,arguments),!0===e?this.element.removeClass("base-disabled disabled"):!1===e&&this.element.addClass("base-disabled disabled"),e||this.element.removeClass(this.options.hoverClass),!e&&this.isViewVisible()&&this._hideView()},setValue:function(e){this.combo.setValue(e),BI.isNull(this.popupView)?this.options.popup.value=e:this.popupView.setValue(e)},getValue:function(){return BI.isNull(this.popupView)?this.options.popup.value:this.popupView.getValue()},isViewVisible:function(){return this.isEnabled()&&this.combo.isEnabled()&&!!this.popupView&&this.popupView.isVisible()},showView:function(e){this.isEnabled()&&this.combo.isEnabled()&&!this.isViewVisible()&&this._popupView(e)},hideView:function(){this._hideView()},getView:function(){return this.popupView},getPopupPosition:function(){return this.position},toggle:function(){this._toggle()},destroyed:function(){BI.Widget._renderEngine.createElement(document).unbind("mousedown."+this.getName()).unbind("mousewheel."+this.getName()).unbind("mouseenter."+this.getName()).unbind("mousemove."+this.getName()).unbind("mouseleave."+this.getName()),BI.Resizers.remove(this.getName()),this.popupView&&this.popupView._destroy()}}),BI.Combo.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.Combo.EVENT_CHANGE="EVENT_CHANGE",BI.Combo.EVENT_EXPAND="EVENT_EXPAND",BI.Combo.EVENT_COLLAPSE="EVENT_COLLAPSE",BI.Combo.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.Combo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.Combo.EVENT_AFTER_POPUPVIEW="EVENT_AFTER_POPUPVIEW",BI.Combo.EVENT_BEFORE_HIDEVIEW="EVENT_BEFORE_HIDEVIEW",BI.Combo.EVENT_AFTER_HIDEVIEW="EVENT_AFTER_HIDEVIEW",BI.shortcut("bi.combo",BI.Combo)},function(e,t){BI.Expander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Expander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-expander",trigger:"click",toggle:!0,isDefaultInit:!1,el:{},popup:{},expanderClass:"bi-expander-popup",hoverClass:"bi-expander-hover"})},_init:function(){BI.Expander.superclass._init.apply(this,arguments);var n=this,e=this.options;this._expanded=!!e.el.open,this._initExpander(),this._initPullDownAction(),this.expander.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.isEnabled()&&n.isValid()&&(e===BI.Events.EXPAND&&n._popupView(),e===BI.Events.COLLAPSE&&n._hideView(),e===BI.Events.EXPAND&&(n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),n.fireEvent(BI.Expander.EVENT_EXPAND)),e===BI.Events.COLLAPSE&&(n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),n.isViewVisible()&&n.fireEvent(BI.Expander.EVENT_COLLAPSE)),e===BI.Events.CLICK&&n.fireEvent(BI.Expander.EVENT_TRIGGER_CHANGE,t,i))}),this.element.hover(function(){n.isEnabled()&&n.isValid()&&n.expander.isEnabled()&&n.expander.isValid()&&n.element.addClass(e.hoverClass)},function(){n.isEnabled()&&n.isValid()&&n.expander.isEnabled()&&n.expander.isValid()&&n.element.removeClass(e.hoverClass)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.expander}]}),e.isDefaultInit&&this._assertPopupView(),!0===this.expander.isOpened()&&this._popupView()},_toggle:function(){this._assertPopupViewRender(),this.popupView.isVisible()?this._hideView():this.isEnabled()&&this._popupView()},_initPullDownAction:function(){var i=this,n=this.options,e=this.options.trigger.split(",");BI.each(e,function(e,t){switch(t){case"hover":i.element[t](function(e){i.isEnabled()&&i.isValid()&&i.expander.isEnabled()&&i.expander.isValid()&&(i._popupView(),i.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",i.expander),i.fireEvent(BI.Expander.EVENT_EXPAND))},function(){i.isEnabled()&&i.isValid()&&i.expander.isEnabled()&&i.expander.isValid()&&n.toggle&&(i._hideView(),i.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",i.expander),i.fireEvent(BI.Expander.EVENT_COLLAPSE))});break;case"click":t&&i.element.off(t+"."+i.getName()).on(t+"."+i.getName(),BI.debounce(function(e){i.expander.element.__isMouseInBounds__(e)&&i.isEnabled()&&i.isValid()&&i.expander.isEnabled()&&i.expander.isValid()&&(n.toggle?i._toggle():i._popupView(),i.isExpanded()?(i.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",i.expander),i.fireEvent(BI.Expander.EVENT_EXPAND)):(i.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",i.expander),i.fireEvent(BI.Expander.EVENT_COLLAPSE)))},BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1}))}})},_initExpander:function(){this.expander=BI.createWidget(this.options.el)},_assertPopupView:function(){var n=this,e=this.options;null==this.popupView&&(this.popupView=BI.createWidget(this.options.popup,{type:"bi.button_group",cls:"expander-popup",layouts:[{type:"bi.vertical",hgap:0,vgap:0}],value:e.value},this),this.popupView.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&n.fireEvent(BI.Expander.EVENT_CHANGE,t,i)}),this.popupView.setVisible(this.isExpanded()),BI.nextTick(function(){n.fireEvent(BI.Expander.EVENT_AFTER_INIT)}))},_assertPopupViewRender:function(){this._assertPopupView(),this._rendered||(BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.popupView}]}),this._rendered=!0)},_hideView:function(){this.fireEvent(BI.Expander.EVENT_BEFORE_HIDEVIEW),this._expanded=!1,this.expander.setOpened(!1),this.popupView&&this.popupView.invisible(),this.element.removeClass(this.options.expanderClass),this.fireEvent(BI.Expander.EVENT_AFTER_HIDEVIEW)},_popupView:function(){this._assertPopupViewRender(),this.fireEvent(BI.Expander.EVENT_BEFORE_POPUPVIEW),this._expanded=!0,this.expander.setOpened(!0),this.popupView.visible(),this.element.addClass(this.options.expanderClass),this.fireEvent(BI.Expander.EVENT_AFTER_POPUPVIEW)},populate:function(e){this.popupView&&this.popupView.populate.apply(this.popupView,arguments),this.expander.populate.apply(this.expander,arguments)},_setEnable:function(e){BI.Expander.superclass._setEnable.apply(this,arguments),e||this.element.removeClass(this.options.hoverClass),!e&&this.isViewVisible()&&this._hideView()},setValue:function(e){this.expander.setValue(e),BI.isNull(this.popupView)?this.options.popup.value=e:this.popupView.setValue(e)},getValue:function(){return BI.isNull(this.popupView)?this.options.popup.value:this.popupView.getValue()},isViewVisible:function(){return this.isEnabled()&&this.expander.isEnabled()&&!!this.popupView&&this.popupView.isVisible()},isExpanded:function(){return this._expanded},showView:function(){this.isEnabled()&&this.expander.isEnabled()&&this._popupView()},hideView:function(){this._hideView()},getView:function(){return this.popupView},getAllLeaves:function(){return this.popupView&&this.popupView.getAllLeaves()},getNodeById:function(e){return this.expander.options.id===e?this.expander:this.popupView&&this.popupView.getNodeById(e)},getNodeByValue:function(e){return this.expander.getValue()===e?this.expander:this.popupView&&this.popupView.getNodeByValue(e)},destroy:function(){BI.Expander.superclass.destroy.apply(this,arguments)}}),BI.Expander.EVENT_EXPAND="EVENT_EXPAND",BI.Expander.EVENT_COLLAPSE="EVENT_COLLAPSE",BI.Expander.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.Expander.EVENT_CHANGE="EVENT_CHANGE",BI.Expander.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.Expander.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.Expander.EVENT_AFTER_POPUPVIEW="EVENT_AFTER_POPUPVIEW",BI.Expander.EVENT_BEFORE_HIDEVIEW="EVENT_BEFORE_HIDEVIEW",BI.Expander.EVENT_AFTER_HIDEVIEW="EVENT_AFTER_HIDEVIEW",BI.shortcut("bi.expander",BI.Expander)},function(e,t){BI.ComboGroup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ComboGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-combo-group bi-list-item",trigger:"click,hover",direction:"right",adjustLength:0,isDefaultInit:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.text_button",text:"",value:""},children:[],popup:{el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}}})},_init:function(){BI.ComboGroup.superclass._init.apply(this,arguments),this._populate(this.options.el)},_populate:function(e){var n=this,r=this.options,t=r.children;if(BI.isEmpty(t))throw new Error("ComboGroup构造错误");BI.each(t,function(e,t){var i=BI.formatEL(t).el.children;t=BI.formatEL(t).el,BI.isEmpty(i)||(t.el=BI.clone(t),t.children=i,t.type="bi.combo_group",t.action=r.action,t.height=r.height,t.direction=r.direction,t.isDefaultInit=r.isDefaultInit,t.isNeedAdjustHeight=r.isNeedAdjustHeight,t.isNeedAdjustWidth=r.isNeedAdjustWidth,t.adjustLength=r.adjustLength,t.popup=r.popup)}),this.combo=BI.createWidget({type:"bi.combo",element:this,container:r.container,height:r.height,trigger:r.trigger,direction:r.direction,isDefaultInit:r.isDefaultInit,isNeedAdjustWidth:r.isNeedAdjustWidth,isNeedAdjustHeight:r.isNeedAdjustHeight,adjustLength:r.adjustLength,el:e,popup:BI.extend({},r.popup,{el:BI.extend({items:t},r.popup.el)})}),this.combo.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&n.fireEvent(BI.ComboGroup.EVENT_CHANGE,i)})},getValue:function(){return this.combo.getValue()},setValue:function(e){this.combo.setValue(e)}}),BI.ComboGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.combo_group",BI.ComboGroup)},function(e,t){BI.VirtualGroup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.VirtualGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-virtual-group",items:[],layouts:[{type:"bi.center",hgap:0,vgap:0}]})},render:function(){var e=this.options;this.populate(e.items),BI.isKey(e.value)&&this.setValue(e.value)},_packageBtns:function(e){for(var n=this.options,r=this.buttonMap={},o=n.layouts.length-1;0<o;o--)e=BI.map(e,function(e,t){var i=BI.stripEL(t);return BI.extend({},n.layouts[o],{items:[BI.extend({},n.layouts[o].el,{el:BI.extend({ref:function(e){BI.isKey(r[i.value])&&(r[i.value]=e)}},i)})]})});return e},_packageLayout:function(e){for(var t=this.options,i=BI.deepClone(t.layouts[0]),n=BI.formatEL(i).el;n&&n.items&&!BI.isEmpty(n.items);)n=BI.formatEL(n.items[0]).el;return n.items=e,i},addItems:function(e){this.layouts.addItems(e)},prependItems:function(e){this.layouts.prependItems(e)},setValue:function(i){i=BI.isArray(i)?i:[i],BI.each(this.buttonMap,function(e,t){t&&(i.deepContains(e)?t.setSelected&&t.setSelected(!0):t.setSelected&&t.setSelected(!1))})},getNotSelectedValue:function(){var i=[];return BI.each(this.buttonMap,function(e,t){t&&(!t.isEnabled()||t.isSelected&&t.isSelected()||i.push(t.getValue()))}),i},getValue:function(){var i=[];return BI.each(this.buttonMap,function(e,t){t&&t.isEnabled()&&t.isSelected&&t.isSelected()&&i.push(t.getValue())}),i},populate:function(e){e=e||[],this.options.items=e,e=this._packageBtns(e),this.layouts?this.layouts.populate(e):this.layouts=BI.createWidget(BI.extend({element:this},this._packageLayout(e)))}}),BI.VirtualGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.virtual_group",BI.VirtualGroup)},function(e,t){BI.Loader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Loader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-loader",direction:"top",isDefaultInit:!0,logic:{dynamic:!0,scrolly:!0},el:{type:"bi.button_group"},items:[],itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn,count:!1,prev:!1,next:{},hasPrev:BI.emptyFn,hasNext:BI.emptyFn})},_prevLoad:function(){var e=this,t=this.options;this.prev.setLoading(),t.itemsCreator.apply(this,[{times:--this.times},function(){e.prev.setLoaded(),e.prependItems.apply(e,arguments)}])},_nextLoad:function(){var e=this,t=this.options;this.next.setLoading(),t.itemsCreator.apply(this,[{times:++this.times},function(){e.next.setLoaded(),e.addItems.apply(e,arguments)}])},_init:function(){BI.Loader.superclass._init.apply(this,arguments);var n=this,e=this.options;!1===e.itemsCreator&&(e.prev=!1,e.next=!1),!1!==e.prev&&(this.prev=BI.createWidget(BI.extend({type:"bi.loading_bar"},e.prev)),this.prev.on(BI.Controller.EVENT_CHANGE,function(e){e===BI.Events.CLICK&&n._prevLoad()})),this.button_group=BI.createWidget(e.el,{type:"bi.button_group",chooseType:0,items:e.items,behaviors:{},layouts:[{type:"bi.vertical"}],value:e.value}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&n.fireEvent(BI.Loader.EVENT_CHANGE,i)}),!1!==e.next&&(this.next=BI.createWidget(BI.extend({type:"bi.loading_bar"},e.next)),this.next.on(BI.Controller.EVENT_CHANGE,function(e){e===BI.Events.CLICK&&n._nextLoad()})),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(e.direction),BI.extend({scrolly:!0},e.logic,{items:BI.LogicFactory.createLogicItemsByDirection(e.direction,this.prev,this.button_group,this.next)})))),e.isDefaultInit&&BI.isEmpty(e.items)&&BI.nextTick(BI.bind(function(){e.isDefaultInit&&BI.isEmpty(e.items)&&this._populate()},this)),BI.isNotEmptyArray(e.items)&&this._populate(e.items)},hasPrev:function(){var e=this.options;return BI.isNumber(e.count)?this.count<e.count:!!e.hasPrev.apply(this,[{times:this.times,count:this.count}])},hasNext:function(){var e=this.options;return BI.isNumber(e.count)?this.count<e.count:!!e.hasNext.apply(this,[{times:this.times,count:this.count}])},prependItems:function(e){this.count+=e.length,!1!==this.next&&(this.hasPrev()?(this.options.items=this.options.items.concat(e),this.prev.setLoaded()):this.prev.setEnd()),this.button_group.prependItems.apply(this.button_group,arguments)},addItems:function(e){this.count+=e.length,BI.isObject(this.next)&&(this.hasNext()?(this.options.items=this.options.items.concat(e),this.next.setLoaded()):this.next.setEnd()),this.button_group.addItems.apply(this.button_group,arguments)},_populate:function(e){var t=this,i=this.options;return 0===arguments.length&&BI.isFunction(i.itemsCreator)?(i.itemsCreator.apply(this,[{times:1},function(){if(0===arguments.length)throw new Error("arguments can not be null!!!");t.populate.apply(t,arguments),i.onLoaded()}]),!1):(this.options.items=e,this.times=1,this.count=0,this.count+=e.length,BI.isObject(this.next)&&(this.hasNext()?this.next.setLoaded():this.next.invisible()),BI.isObject(this.prev)&&(this.hasPrev()?this.prev.setLoaded():this.prev.invisible()),!0)},populate:function(){this._populate.apply(this,arguments)&&this.button_group.populate.apply(this.button_group,arguments)},setNotSelectedValue:function(){this.button_group.setNotSelectedValue.apply(this.button_group,arguments)},getNotSelectedValue:function(){return this.button_group.getNotSelectedValue()},setValue:function(){this.button_group.setValue.apply(this.button_group,arguments)},getValue:function(){return this.button_group.getValue.apply(this.button_group,arguments)},getAllButtons:function(){return this.button_group.getAllButtons()},getAllLeaves:function(){return this.button_group.getAllLeaves()},getSelectedButtons:function(){return this.button_group.getSelectedButtons()},getNotSelectedButtons:function(){return this.button_group.getNotSelectedButtons()},getIndexByValue:function(e){return this.button_group.getIndexByValue(e)},getNodeById:function(e){return this.button_group.getNodeById(e)},getNodeByValue:function(e){return this.button_group.getNodeByValue(e)},empty:function(){this.button_group.empty(),BI.each([this.prev,this.next],function(e,t){t&&t.setVisible(!1)})},destroy:function(){BI.Loader.superclass.destroy.apply(this,arguments)}}),BI.Loader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.loader",BI.Loader)},function(e,t){BI.Navigation=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Navigation.superclass._defaultConfig.apply(this,arguments),{direction:"bottom",logic:{dynamic:!1},single:!1,showIndex:!1,tab:!1,cardCreator:function(e){return BI.createWidget()},afterCardCreated:BI.emptyFn,afterCardShow:BI.emptyFn})},render:function(){var i=this,n=this.options;this.tab=BI.createWidget(this.options.tab,{type:"bi.button_group"}),this.cardMap={},this.showIndex=0,this.layout=BI.createWidget({type:"bi.card"}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(n.direction),BI.extend({},n.logic,{items:BI.LogicFactory.createLogicItemsByDirection(n.direction,this.tab,this.layout)})))),new BI.ShowListener({eventObj:this.tab,cardLayout:this.layout,cardNameCreator:function(e){return i.showIndex+e},cardCreator:function(e){var t=n.cardCreator(e);return i.cardMap[e]=t},afterCardCreated:BI.bind(this.afterCardCreated,this),afterCardShow:BI.bind(this.afterCardShow,this)})},mounted:function(){var e=this.options;!1!==e.showIndex&&this.setSelect(e.showIndex)},_deleteOtherCards:function(i){var n=this;!0===this.options.single&&BI.each(this.cardMap,function(e,t){e!==i+""&&(n.layout.deleteCardByName(e),delete n.cardMap[e])})},afterCardCreated:function(e){var n=this;this.cardMap[e].on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&n.fireEvent(BI.Navigation.EVENT_CHANGE,i)}),this.options.afterCardCreated.apply(this,arguments)},afterCardShow:function(e){this.showIndex=e,this._deleteOtherCards(e),this.options.afterCardShow.apply(this,arguments)},populate:function(){var e=this.layout.getShowingCard();if(e)return e.populate.apply(e,arguments)},_assertCard:function(e){if(!this.layout.isCardExisted(e)){var t=this.options.cardCreator(e);this.cardMap[e]=t,this.layout.addCardByName(e,t),this.afterCardCreated(e)}},setSelect:function(e){this._assertCard(e),this.layout.showCardByName(e),this._deleteOtherCards(e),this.showIndex!==e&&(this.showIndex=e,BI.nextTick(BI.bind(this.afterCardShow,this,e)))},getSelect:function(){return this.showIndex},getSelectedCard:function(){if(BI.isKey(this.showIndex))return this.cardMap[this.showIndex]},setValue:function(e){var t=this.layout.getShowingCard();t&&t.setValue(e)},getValue:function(){var e=this.layout.getShowingCard();if(e)return e.getValue()},empty:function(){this.layout.deleteAllCard(),this.cardMap={}},destroy:function(){BI.Navigation.superclass.destroy.apply(this,arguments)}}),BI.Navigation.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.navigation",BI.Navigation)},function(e,t){BI.Searcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Searcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-searcher",lgap:0,rgap:0,tgap:0,bgap:0,vgap:0,hgap:0,isDefaultInit:!1,isAutoSearch:!0,isAutoSync:!0,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,allowSearchBlank:!0,onSearch:function(e,t){t([])},el:{type:"bi.search_editor"},popup:{type:"bi.searcher_view"},adapter:null,masker:{offset:{}}})},_init:function(){BI.Searcher.superclass._init.apply(this,arguments);var t=this,e=this.options;this.editor=BI.createWidget(e.el,{type:"bi.search_editor"}),BI.createWidget({type:"bi.vertical",element:this,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap,vgap:e.vgap,hgap:e.hgap,items:[this.editor]}),e.isDefaultInit&&this._assertPopupView();var i=BI.debounce(BI.bind(this._search,this),BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1});this.editor.on(BI.Controller.EVENT_CHANGE,function(e){switch(e){case BI.Events.STARTEDIT:t._startSearch();break;case BI.Events.EMPTY:t._stopSearch();break;case BI.Events.CHANGE:i();break;case BI.Events.PAUSE:t._pauseSearch()}})},_assertPopupView:function(){var r=this,o=this.options;(o.masker&&!BI.Maskers.has(this.getName())||!1===o.masker&&!this.popupView)&&(this.popupView=BI.createWidget(o.popup,{type:"bi.searcher_view",chooseType:o.chooseType}),this.popupView.on(BI.Controller.EVENT_CHANGE,function(e,t,i){if(r.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK){if(o.isAutoSync){var n=o.adapter&&o.adapter.getValue();if(i.isSelected())switch(o.chooseType){case BI.ButtonGroup.CHOOSE_TYPE_SINGLE:o.adapter&&o.adapter.setValue([i.getValue()]);break;case BI.ButtonGroup.CHOOSE_TYPE_MULTI:n.push(i.getValue()),o.adapter&&o.adapter.setValue(n)}else o.adapter&&o.adapter.setValue(BI.deepWithout(n,i.getValue()))}r.fireEvent(BI.Searcher.EVENT_CHANGE,t,i)}}),BI.nextTick(function(){r.fireEvent(BI.Searcher.EVENT_AFTER_INIT)})),o.masker&&!BI.Maskers.has(this.getName())&&BI.Maskers.create(this.getName(),o.adapter,BI.extend({container:this,render:this.popupView},o.masker),this)},_startSearch:function(){this._assertPopupView(),this._stop=!1,this._isSearching=!0,this.fireEvent(BI.Searcher.EVENT_START),this.popupView.startSearch&&this.popupView.startSearch(),BI.nextTick(function(e){BI.Maskers.show(e)},this.getName())},_pauseSearch:function(){this.options,this.getName();this._stop=!0,BI.nextTick(function(e){BI.Maskers.hide(e)},this.getName()),!0===this._isSearching&&(this.popupView&&this.popupView.pauseSearch&&this.popupView.pauseSearch(),this.fireEvent(BI.Searcher.EVENT_PAUSE)),this._isSearching=!1},_stopSearch:function(){this.options;var e=this.getName();this._stop=!0,BI.Maskers.hide(e),!0===this._isSearching&&(this.popupView&&this.popupView.stopSearch&&this.popupView.stopSearch(),this.fireEvent(BI.Searcher.EVENT_STOP)),this._isSearching=!1},_search:function(){var n=this,r=this.options,o=r.allowSearchBlank?this.editor.getValue():this._getLastSearchKeyword();if(""!==o&&!this._stop){if(r.isAutoSearch){var e=r.adapter&&(r.adapter.getItems&&r.adapter.getItems()||r.adapter.attr("items"))||[],t=BI.Func.getSearchResult(e,o),i=t.match,a=t.find;return this.popupView.populate(a,i,o),r.isAutoSync&&r.adapter&&r.adapter.getValue&&this.popupView.setValue(r.adapter.getValue()),void n.fireEvent(BI.Searcher.EVENT_SEARCHING)}this.popupView.loading&&this.popupView.loading(),r.onSearch({times:1,keyword:o,selectedValues:r.adapter&&r.adapter.getValue()},function(e,t){if(!n._stop){var i=[].slice.call(arguments);0<i.length&&i.push(o),BI.Maskers.show(n.getName()),n.popupView.populate.apply(n.popupView,i),r.isAutoSync&&r.adapter&&r.adapter.getValue&&n.popupView.setValue(r.adapter.getValue()),n.popupView.loaded&&n.popupView.loaded(),n.fireEvent(BI.Searcher.EVENT_SEARCHING)}})}},_getLastSearchKeyword:function(){if(this.isValid()){var e=this.editor.getValue().match(/[\S]+/g);return BI.isNull(e)?"":e[e.length-1]}},setAdapter:function(e){this.options.adapter=e,BI.Maskers.remove(this.getName())},doSearch:function(){this.isSearching()&&this._search()},stopSearch:function(){this._stopSearch();try{this.editor.blur()}catch(e){if(!this.editor.blur)throw new Error("editor没有实现blur方法")}finally{this.editor.setValue("")}},isSearching:function(){return this._isSearching},isViewVisible:function(){return this.editor.isEnabled()&&BI.Maskers.isVisible(this.getName())},getView:function(){return this.popupView},hasMatched:function(){return this._assertPopupView(),this.popupView.hasMatched()},adjustHeight:function(){BI.Maskers.has(this.getName())&&BI.Maskers.get(this.getName()).isVisible()&&BI.Maskers.show(this.getName())},adjustView:function(){this.isViewVisible()&&BI.Maskers.show(this.getName())},setValue:function(e){BI.isNull(this.popupView)?this.options.popup.value=e:this.popupView.setValue(e)},getKeyword:function(){return this._getLastSearchKeyword()},getKeywords:function(){return this.editor.getKeywords()},getValue:function(){var e=this.options;return e.isAutoSync&&e.adapter&&e.adapter.getValue?e.adapter.getValue():this.isSearching()?this.popupView.getValue():e.adapter&&e.adapter.getValue?e.adapter.getValue():BI.isNull(this.popupView)?e.popup.value:this.popupView.getValue()},populate:function(e,t,i){var n=this.options;this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),n.isAutoSync&&n.adapter&&n.adapter.getValue&&this.popupView.setValue(n.adapter.getValue())},empty:function(){this.popupView&&this.popupView.empty()},destroyed:function(){BI.Maskers.remove(this.getName())}}),BI.Searcher.EVENT_CHANGE="EVENT_CHANGE",BI.Searcher.EVENT_START="EVENT_START",BI.Searcher.EVENT_STOP="EVENT_STOP",BI.Searcher.EVENT_PAUSE="EVENT_PAUSE",BI.Searcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.Searcher.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.shortcut("bi.searcher",BI.Searcher)},function(e,t){BI.Switcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Switcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-switcher",direction:BI.Direction.Top,trigger:"click",toggle:!0,el:{},popup:{},adapter:null,masker:{},switcherClass:"bi-switcher-popup",hoverClass:"bi-switcher-hover"})},_init:function(){BI.Switcher.superclass._init.apply(this,arguments);var n=this,e=this.options;this._initSwitcher(),this._initPullDownAction(),this.switcher.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.isEnabled()&&n.isValid()&&(e===BI.Events.EXPAND&&n._popupView(),e===BI.Events.COLLAPSE&&n._hideView(),e===BI.Events.EXPAND&&(n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),n.fireEvent(BI.Switcher.EVENT_EXPAND)),e===BI.Events.COLLAPSE&&(n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),n.isViewVisible()&&n.fireEvent(BI.Switcher.EVENT_COLLAPSE)),e===BI.Events.CLICK&&n.fireEvent(BI.Switcher.EVENT_TRIGGER_CHANGE,t,i))}),this.element.hover(function(){n.isEnabled()&&n.switcher.isEnabled()&&n.element.addClass(e.hoverClass)},function(){n.isEnabled()&&n.switcher.isEnabled()&&n.element.removeClass(e.hoverClass)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.switcher}]}),e.isDefaultInit&&this._assertPopupView()},_toggle:function(){this._assertPopupView(),this.isExpanded()?this._hideView():this.isEnabled()&&this._popupView()},_initPullDownAction:function(){var i=this,n=this.options,e=this.options.trigger.split(",");BI.each(e,function(e,t){switch(t){case"hover":i.element[t](function(e){i.isEnabled()&&i.switcher.isEnabled()&&(i._popupView(),i.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",i.switcher),i.fireEvent(BI.Switcher.EVENT_EXPAND))},function(){i.isEnabled()&&i.switcher.isEnabled()&&n.toggle&&(i._hideView(),i.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",i.switcher),i.fireEvent(BI.Switcher.EVENT_COLLAPSE))});break;default:t&&i.element.off(t+"."+i.getName()).on(t+"."+i.getName(),BI.debounce(function(e){i.switcher.element.__isMouseInBounds__(e)&&i.isEnabled()&&i.switcher.isEnabled()&&(n.toggle?i._toggle():i._popupView(),i.isExpanded()?(i.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",i.switcher),i.fireEvent(BI.Switcher.EVENT_EXPAND)):(i.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",i.switcher),i.fireEvent(BI.Switcher.EVENT_COLLAPSE)))},BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1}))}})},_initSwitcher:function(){this.switcher=BI.createWidget(this.options.el,{value:this.options.value})},_assertPopupView:function(){var n=this,e=this.options;this._created||(this.popupView=BI.createWidget(e.popup,{type:"bi.button_group",element:e.adapter&&BI.Maskers.create(this.getName(),e.adapter,BI.extend({container:this},e.masker)),cls:"switcher-popup",layouts:[{type:"bi.vertical",hgap:0,vgap:0}],value:e.value},this),this.popupView.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&n.fireEvent(BI.Switcher.EVENT_CHANGE,t,i)}),e.direction===BI.Direction.Custom||e.adapter||BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.popupView}]}),this._created=!0,BI.nextTick(function(){n.fireEvent(BI.Switcher.EVENT_AFTER_INIT)}))},_hideView:function(){this.fireEvent(BI.Switcher.EVENT_BEFORE_HIDEVIEW);var e=this,t=this.options;t.adapter?BI.Maskers.hide(e.getName()):e.popupView&&e.popupView.setVisible(!1),BI.nextTick(function(){t.adapter?BI.Maskers.hide(e.getName()):e.popupView&&e.popupView.setVisible(!1),e.element.removeClass(t.switcherClass),e.fireEvent(BI.Switcher.EVENT_AFTER_HIDEVIEW)})},_popupView:function(){var t=this,i=this.options;this._assertPopupView(),this.fireEvent(BI.Switcher.EVENT_BEFORE_POPUPVIEW),i.adapter?BI.Maskers.show(this.getName()):t.popupView.setVisible(!0),BI.nextTick(function(e){i.adapter?BI.Maskers.show(e):t.popupView.setVisible(!0),t.element.addClass(i.switcherClass),t.fireEvent(BI.Switcher.EVENT_AFTER_POPUPVIEW)},this.getName())},populate:function(e){this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),this.switcher.populate.apply(this.switcher,arguments)},_setEnable:function(e){BI.Switcher.superclass._setEnable.apply(this,arguments),!e&&this.isViewVisible()&&this._hideView()},setValue:function(e){this.switcher.setValue(e),BI.isNull(this.popupView)?this.options.popup.value=e:this.popupView.setValue(e)},getValue:function(){return BI.isNull(this.popupView)?this.options.popup.value:this.popupView.getValue()},setAdapter:function(e){this.options.adapter=e,BI.Maskers.remove(this.getName())},isViewVisible:function(){return this.isEnabled()&&this.switcher.isEnabled()&&(this.options.adapter?BI.Maskers.isVisible(this.getName()):this.popupView&&this.popupView.isVisible())},isExpanded:function(){return this.isViewVisible()},showView:function(){this.isEnabled()&&this.switcher.isEnabled()&&this._popupView()},hideView:function(){this._hideView()},getView:function(){return this.popupView},adjustView:function(){this.isViewVisible()&&BI.Maskers.show(this.getName())},getAllLeaves:function(){return this.popupView&&this.popupView.getAllLeaves()},getNodeById:function(e){return this.switcher.attr("id")===e?this.switcher:this.popupView&&this.popupView.getNodeById(e)},getNodeByValue:function(e){return this.switcher.getValue()===e?this.switcher:this.popupView&&this.popupView.getNodeByValue(e)},empty:function(){this.popupView&&this.popupView.empty()}}),BI.Switcher.EVENT_EXPAND="EVENT_EXPAND",BI.Switcher.EVENT_COLLAPSE="EVENT_COLLAPSE",BI.Switcher.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.Switcher.EVENT_CHANGE="EVENT_CHANGE",BI.Switcher.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.Switcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.Switcher.EVENT_AFTER_POPUPVIEW="EVENT_AFTER_POPUPVIEW",BI.Switcher.EVENT_BEFORE_HIDEVIEW="EVENT_BEFORE_HIDEVIEW",BI.Switcher.EVENT_AFTER_HIDEVIEW="EVENT_AFTER_HIDEVIEW",BI.shortcut("bi.switcher",BI.Switcher)},function(e,t){BI.Tab=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Tab.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tab",direction:"top",single:!1,logic:{dynamic:!1},showIndex:!1,tab:!1,cardCreator:function(e){return BI.createWidget()}})},render:function(){var n=this,i=this.options;BI.isObject(i.tab)&&(this.tab=BI.createWidget(this.options.tab,{type:"bi.button_group"}),this.tab.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})),this.cardMap={},this.layout=BI.createWidget({type:"bi.card"}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(i.direction),BI.extend({},i.logic,{items:BI.LogicFactory.createLogicItemsByDirection(i.direction,this.tab,this.layout)})))),new BI.ShowListener({eventObj:this.tab,cardLayout:this.layout,cardCreator:function(e){var t=i.cardCreator.apply(n,arguments);return n.cardMap[e]=t},afterCardShow:function(e){n._deleteOtherCards(e),n.curr=e}}).on(BI.ShowListener.EVENT_CHANGE,function(e){n.fireEvent(BI.Tab.EVENT_CHANGE,e,n)})},_deleteOtherCards:function(i){var n=this;!0===this.options.single&&BI.each(this.cardMap,function(e,t){e!==i+""&&(n.layout.deleteCardByName(e),delete n.cardMap[e])})},_assertCard:function(e){if(!this.layout.isCardExisted(e)){var t=this.options.cardCreator(e);this.cardMap[e]=t,this.layout.addCardByName(e,t)}},mounted:function(){var e=this.options;!1!==e.showIndex&&this.setSelect(e.showIndex)},setSelect:function(e){this.tab&&this.tab.setValue(e),this._assertCard(e),this.layout.showCardByName(e),this._deleteOtherCards(e),this.curr!==e&&(this.curr=e)},removeTab:function(i){var n=this;this.options;BI.any(this.cardMap,function(e,t){if(BI.isEqual(e,i+""))return n.layout.deleteCardByName(e),delete n.cardMap[e],!0})},getSelect:function(){return this.curr},getSelectedTab:function(){return this.layout.getShowingCard()},getTab:function(e){return this._assertCard(e),this.layout.getCardByName(e)},setValue:function(e){var t=this.layout.getShowingCard();t&&t.setValue(e)},getValue:function(){var e=this.layout.getShowingCard();if(e)return e.getValue()},populate:function(){var e=this.layout.getShowingCard();if(e)return e.populate&&e.populate.apply(e,arguments)},empty:function(){this.layout.deleteAllCard(),this.cardMap={}},destroy:function(){this.cardMap={},BI.Tab.superclass.destroy.apply(this,arguments)}}),BI.Tab.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.tab",BI.Tab)},function(e,t){BI.EL=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.EL.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-el",el:{},layout:{}})},_init:function(){BI.EL.superclass._init.apply(this,arguments);var e=this,t=this.options;this.ele=BI.createWidget(t.el),BI.createWidget(t.layout,{type:"bi.adaptive",element:this,items:[this.ele]}),this.ele.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(e){this.ele.setValue(e)},getValue:function(){return this.ele.getValue()},populate:function(){this.ele.populate.apply(this,arguments)}}),BI.shortcut("bi.el",BI.EL)},function(e,t){var s,l,u,c;BI.Msg=(u=[],c=[],{alert:function(e,t,i){this._show(!1,e,t,i)},confirm:function(e,t,i){this._show(!0,e,t,i)},prompt:function(e,t,i,n,r){},toast:function(e,t,i){t=t||{},i=i||BI.Widget._renderEngine.createElement("body");var n=t.level||"normal",r=!!BI.isNull(t.autoClose)||t.autoClose,o=BI.isFunction(t.callback)?t.callback:BI.emptyFn,a=BI.createWidget({type:"bi.toast",cls:"bi-message-animate bi-message-leave",level:n,autoClose:r,text:e,listeners:[{eventName:BI.Toast.EVENT_DESTORY,action:function(){BI.remove(c,a.element);var i=10;BI.each(c,function(e,t){t.css({top:i}),i+=t.outerHeight()+10}),o()}}]}),s=10;BI.each(c,function(e,t){s+=t.outerHeight()+10}),BI.createWidget({type:"bi.absolute",element:i,items:[{el:a,left:"50%",top:s}]}),c.push(a.element),a.element.css({"margin-left":-1*a.element.outerWidth()/2}),a.element.removeClass("bi-message-leave").addClass("bi-message-enter"),r&&BI.delay(function(){a.element.removeClass("bi-message-enter").addClass("bi-message-leave"),a.destroy()},5e3)},_show:function(e,t,i,n){function r(){u[u.length-1].destroy(),u.pop(),0===u.length&&(s.remove(),s=null)}BI.isNull(s)&&(s=BI.Widget._renderEngine.createElement('<div class="bi-z-index-mask">').css({position:"absolute",zIndex:BI.zIndex_tip-2,top:0,left:0,right:0,bottom:0,opacity:.5}).appendTo("body")),l=BI.Widget._renderEngine.createElement('<div class="bi-message-depend">').css({position:"absolute",zIndex:BI.zIndex_tip-1,top:0,left:0,right:0,bottom:0}).appendTo("body");var o=[];!0===e&&o.push({el:{type:"bi.button",text:BI.i18nText("BI-Basic_Cancel"),level:"ignore",handler:function(){r(),BI.isFunction(n)&&n.apply(null,[!1])}}}),o.push({el:{type:"bi.button",text:BI.i18nText("BI-Basic_OK"),handler:function(){r(),BI.isFunction(n)&&n.apply(null,[!0])}}});var a={element:l,type:"bi.center_adapt",items:[{type:"bi.border",cls:"bi-card",items:{north:{el:{type:"bi.border",cls:"bi-message-title bi-background",items:{center:{el:{type:"bi.label",cls:"bi-font-bold",text:t||BI.i18nText("BI-Basic_Prompt"),textAlign:"left",hgap:20,height:40}},east:{el:{type:"bi.icon_button",cls:"bi-message-close close-font",handler:function(){r(),BI.isFunction(n)&&n.apply(null,[!1])}},width:60}}},height:40},center:{el:{type:"bi.label",vgap:10,hgap:20,whiteSpace:"normal",text:i}},south:{el:{type:"bi.absolute",items:[{el:{type:"bi.right_vertical_adapt",lgap:10,items:o},top:0,left:20,right:20,bottom:0}]},height:44}},width:450,height:200}]};u[u.length]=BI.createWidget(a)}})},function(e,t){BI.GridView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.GridView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-grid-view",overflowX:!0,overflowY:!0,overscanColumnCount:0,overscanRowCount:0,rowHeightGetter:BI.emptyFn,columnWidthGetter:BI.emptyFn,scrollLeft:0,scrollTop:0,items:[]})},_init:function(){BI.GridView.superclass._init.apply(this,arguments);var e=this,t=this.options;this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1,this._debounceRelease=BI.debounce(function(){e._scrollLock=!1},1e3/60),this.container=BI.createWidget({type:"bi.absolute"}),this.element.scroll(function(){!0!==e._scrollLock&&(t.scrollLeft=e.element.scrollLeft(),t.scrollTop=e.element.scrollTop(),e._calculateChildrenToRender(),e.fireEvent(BI.GridView.EVENT_SCROLL,{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}))}),BI.createWidget({type:"bi.vertical",element:this,scrollable:!0===t.overflowX&&!0===t.overflowY,scrolly:!1===t.overflowX&&!0===t.overflowY,scrollx:!0===t.overflowX&&!1===t.overflowY,items:[this.container]}),0<t.items.length&&this._populate()},mounted:function(){var e=this.options;0===e.scrollLeft&&0===e.scrollTop||(this.element.scrollTop(e.scrollTop),this.element.scrollLeft(e.scrollLeft))},_getOverscanIndices:function(e,t,i,n){return{overscanStartIndex:Math.max(0,i-t),overscanStopIndex:Math.min(e-1,n+t)}},_calculateChildrenToRender:function(){var i=this,e=this.options,t=e.width,n=e.height,r=BI.clamp(e.scrollLeft,0,this._getMaxScrollLeft()),o=BI.clamp(e.scrollTop,0,this._getMaxScrollTop()),a=e.overscanColumnCount,s=e.overscanRowCount;if(0<n&&0<t){var l=this._columnSizeAndPositionManager.getVisibleCellRange(t,r),u=this._rowSizeAndPositionManager.getVisibleCellRange(n,o);if(BI.isEmpty(l)||BI.isEmpty(u))return;var c=this._columnSizeAndPositionManager.getOffsetAdjustment(t,r),h=this._rowSizeAndPositionManager.getOffsetAdjustment(n,o);this._renderedColumnStartIndex=l.start,this._renderedColumnStopIndex=l.stop,this._renderedRowStartIndex=u.start,this._renderedRowStopIndex=u.stop;var p=this._getOverscanIndices(this.columnCount,a,this._renderedColumnStartIndex,this._renderedColumnStopIndex),d=this._getOverscanIndices(this.rowCount,s,this._renderedRowStartIndex,this._renderedRowStopIndex),g=p.overscanStartIndex,f=p.overscanStopIndex,I=d.overscanStartIndex,B=d.overscanStopIndex,E=this._rowSizeAndPositionManager.getSizeAndPositionOfCell(I),_=this._columnSizeAndPositionManager.getSizeAndPositionOfCell(g),m=this._rowSizeAndPositionManager.getSizeAndPositionOfCell(B),b=this._columnSizeAndPositionManager.getSizeAndPositionOfCell(f),T=E.offset+h,y=_.offset+c,C=m.offset+h+m.size,v=b.offset+c+b.size;if(T>=this.renderRange.minY&&C<=this.renderRange.maxY&&y>=this.renderRange.minX&&v<=this.renderRange.maxX)return;for(var N=[],V={},S={},x=this._getMaxScrollLeft(),L=this._getMaxScrollTop(),w=0,A=0,D=0,M=I;M<=B;M++)for(var k=this._rowSizeAndPositionManager.getSizeAndPositionOfCell(M),P=g;P<=f;P++){var H,R=M+"-"+P,Y=this._columnSizeAndPositionManager.getSizeAndPositionOfCell(P),W=this.renderedKeys[R]&&this.renderedKeys[R][2];0<=W?(Y.size!==this.renderedCells[W]._width&&(this.renderedCells[W]._width=Y.size,this.renderedCells[W].el.setWidth(Y.size)),k.size!==this.renderedCells[W]._height&&(this.renderedCells[W]._height=k.size,this.renderedCells[W].el.setHeight(k.size)),this.renderedCells[W]._left!==Y.offset+c&&this.renderedCells[W].el.element.css("left",Y.offset+c+"px"),this.renderedCells[W]._top!==k.offset+h&&this.renderedCells[W].el.element.css("top",k.offset+h+"px"),N.push(H=this.renderedCells[W])):(H=BI.createWidget(BI.extend({type:"bi.label",width:Y.size,height:k.size},e.items[M][P],{cls:(e.items[M][P].cls||"")+" grid-cell"+(0===M?" first-row":"")+(0===P?" first-col":""),_rowIndex:M,_columnIndex:P,_left:Y.offset+c,_top:k.offset+h}),this),N.push({el:H,left:Y.offset+c,top:k.offset+h,_left:Y.offset+c,_top:k.offset+h,_width:Y.size,_height:k.size})),x=Math.min(x,Y.offset+c),w=Math.max(w,Y.offset+c+Y.size),L=Math.min(L,k.offset+h),A=Math.max(A,k.offset+h+k.size),V[R]=[M,P,D],S[D]=H,D++}var O={},F={},G=[];BI.each(V,function(e,t){i.renderedKeys[e]?O[e]=t:F[e]=t}),BI.each(this.renderedKeys,function(e,t){O[e]||F[e]||G.push(t[2])}),BI.each(G,function(e,t){i.renderedCells[t].el._destroy()});var Z=[];BI.each(F,function(e,t){Z.push(N[t[2]])}),this.container.addItems(Z,this),this.container._children=S,this.container.attr("items",N),this.renderedCells=N,this.renderedKeys=V,this.renderRange={minX:x,minY:L,maxX:w,maxY:A}}},_getRealMaxScrollLeft:function(){var t=this.options,i=0;return BI.count(0,this.columnCount,function(e){i+=t.columnWidthGetter(e)}),Math.max(0,i-this.options.width+(this.options.overflowX?BI.DOM.getScrollWidth():0))},_getMaxScrollLeft:function(){return Math.max(0,this._columnSizeAndPositionManager.getTotalSize()-this.options.width+(this.options.overflowX?BI.DOM.getScrollWidth():0))},_getMaxScrollTop:function(){return Math.max(0,this._rowSizeAndPositionManager.getTotalSize()-this.options.height+(this.options.overflowY?BI.DOM.getScrollWidth():0))},_populate:function(e){var t=this.options;this._reRange(),this.columnCount=0,this.rowCount=0,e&&e!==this.options.items&&(this.options.items=e),BI.isNumber(t.columnCount)?this.columnCount=t.columnCount:0<t.items.length&&(this.columnCount=t.items[0].length),BI.isNumber(t.rowCount)?this.rowCount=t.rowCount:this.rowCount=t.items.length,this.container.setWidth(this.columnCount*t.estimatedColumnSize),this.container.setHeight(this.rowCount*t.estimatedRowSize),this._columnSizeAndPositionManager=new BI.ScalingCellSizeAndPositionManager(this.columnCount,t.columnWidthGetter,t.estimatedColumnSize),this._rowSizeAndPositionManager=new BI.ScalingCellSizeAndPositionManager(this.rowCount,t.rowHeightGetter,t.estimatedRowSize),this._calculateChildrenToRender();try{this.element.scrollTop(t.scrollTop),this.element.scrollLeft(t.scrollLeft)}catch(i){}},setScrollLeft:function(e){this.options.scrollLeft!==e&&(this._scrollLock=!0,this.options.scrollLeft=BI.clamp(e||0,0,this._getRealMaxScrollLeft()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollLeft(this.options.scrollLeft))},setScrollTop:function(e){this.options.scrollTop!==e&&(this._scrollLock=!0,this.options.scrollTop=BI.clamp(e||0,0,this._getMaxScrollTop()),this._debounceRelease(),this._calculateChildrenToRender(),this.element.scrollTop(this.options.scrollTop))},setColumnCount:function(e){this.options.columnCount=e},setRowCount:function(e){this.options.rowCount=e},setOverflowX:function(e){var t=this;this.options.overflowX!==!!e&&(this.options.overflowX=!!e,BI.nextTick(function(){t.element.css({overflowX:e?"auto":"hidden"})}))},setOverflowY:function(e){var t=this;this.options.overflowY!==!!e&&(this.options.overflowY=!!e,BI.nextTick(function(){t.element.css({overflowY:e?"auto":"hidden"})}))},getScrollLeft:function(){return this.options.scrollLeft},getScrollTop:function(){return this.options.scrollTop},getMaxScrollLeft:function(){return this._getMaxScrollLeft()},getMaxScrollTop:function(){return this._getMaxScrollTop()},setEstimatedColumnSize:function(e){this.options.estimatedColumnSize=e},setEstimatedRowSize:function(e){this.options.estimatedRowSize=e},_reRange:function(){this.renderRange={}},_clearChildren:function(){this.container._children={},this.container.attr("items",[])},restore:function(){BI.each(this.renderedCells,function(e,t){t.el._destroy()}),this._clearChildren(),this.renderedCells=[],this.renderedKeys=[],this.renderRange={},this._scrollLock=!1},populate:function(e){e&&e!==this.options.items&&this.restore(),this._populate(e)}}),BI.GridView.EVENT_SCROLL="EVENT_SCROLL",BI.shortcut("bi.grid_view",BI.GridView)},function(e,t){BI.Popover=BI.inherit(BI.Widget,{_constant:{SIZE:{SMALL:"small",NORMAL:"normal",BIG:"big"},HEADER_HEIGHT:40},_defaultConfig:function(){return BI.extend(BI.Popover.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-popover bi-card bi-border-radius",size:"normal",logic:{dynamic:!1},header:null,body:null,footer:null,closable:!0})},render:function(){var r=this,e=this.options;this.startX=0,this.startY=0,this.tracker=new BI.MouseMoveTracker(function(e,t){r._calculateSize();var i=BI.Widget._renderEngine.createElement("body").width(),n=BI.Widget._renderEngine.createElement("body").height();r.startX+=e,r.startY+=t,r.element.css({left:BI.clamp(r.startX,0,i-r.element.width())+"px",top:BI.clamp(r.startY,0,n-r.element.height())+"px"}),BI.Resizers._resize()},function(){r.tracker.releaseMouseMoves()},_global);var t=[{el:{type:"bi.htape",cls:"bi-message-title bi-header-background",ref:function(e){r.dragger=e},items:[{type:"bi.absolute",items:[{el:BI.isPlainObject(e.header)?BI.createWidget(e.header,{extraCls:"bi-font-bold"}):{type:"bi.label",cls:"bi-font-bold",height:this._constant.HEADER_HEIGHT,text:e.header,title:e.header,textAlign:"left"},left:20,top:0,right:0,bottom:0}]},{el:e.closable?{type:"bi.icon_button",cls:"bi-message-close close-font",height:this._constant.HEADER_HEIGHT,handler:function(){r.close()}}:{type:"bi.layout"},width:56}],height:this._constant.HEADER_HEIGHT},height:this._constant.HEADER_HEIGHT},{el:e.logic.dynamic?{type:"bi.vertical",scrolly:!1,cls:"popover-body",ref:function(){r.body=this},hgap:20,tgap:10,items:[{el:BI.createWidget(e.body)}]}:{type:"bi.absolute",items:[{el:BI.createWidget(e.body),left:20,top:10,right:20,bottom:0}]}}];e.footer&&t.push({el:{type:"bi.absolute",items:[{el:BI.createWidget(e.footer),left:20,top:0,right:20,bottom:0}],height:44},height:44});var i=this._calculateSize();return BI.extend({type:e.logic.dynamic?"bi.vertical":"bi.vtape",items:t,width:i.width},e.logic.dynamic?{type:"bi.vertical",scrolly:!1}:{type:"bi.vtape",height:i.height})},mounted:function(){var i=this,e=this.options;if(this.dragger.element.mousedown(function(e){var t=i.element.offset();i.startX=t.left,i.startY=t.top,i.tracker.captureMouseMoves(e)}),e.logic.dynamic){var t=this._calculateSize(),n=this.element.height(),r=BI.clamp(n,t.height,600)-(e.footer?84:44);this.body.element.height(r)}},_calculateSize:function(){var e=this.options,t={};if(BI.isNotNull(e.size))switch(e.size){case this._constant.SIZE.SMALL:t.width=450,t.height=200;break;case this._constant.SIZE.BIG:t.width=900,t.height=500;break;default:t.width=550,t.height=500}return{width:e.width||t.width,height:e.height||t.height}},hide:function(){},open:function(){this.show(),this.fireEvent(BI.Popover.EVENT_OPEN,arguments)},close:function(){this.hide(),this.fireEvent(BI.Popover.EVENT_CLOSE,arguments)},setZindex:function(e){this.element.css({"z-index":e})},destroyed:function(){}}),BI.shortcut("bi.popover",BI.Popover),BI.BarPopover=BI.inherit(BI.Popover,{_defaultConfig:function(){return BI.extend(BI.BarPopover.superclass._defaultConfig.apply(this,arguments),{btns:[BI.i18nText("BI-Basic_Sure"),BI.i18nText("BI-Basic_Cancel")]})},beforeCreate:function(){var t=this,e=this.options;e.footer||(e.footer={type:"bi.right_vertical_adapt",lgap:10,items:[{type:"bi.button",text:this.options.btns[1],value:1,level:"ignore",handler:function(e){t.fireEvent(BI.Popover.EVENT_CANCEL,e),t.close(e)}},{type:"bi.button",text:this.options.btns[0],warningTitle:e.warningTitle,value:0,handler:function(e){t.fireEvent(BI.Popover.EVENT_CONFIRM,e),t.close(e)}}]})}}),BI.shortcut("bi.bar_popover",BI.BarPopover),BI.Popover.EVENT_CLOSE="EVENT_CLOSE",BI.Popover.EVENT_OPEN="EVENT_OPEN",BI.Popover.EVENT_CANCEL="EVENT_CANCEL",BI.Popover.EVENT_CONFIRM="EVENT_CONFIRM"},function(e,t){BI.PopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PopupView.superclass._defaultConfig.apply(this,arguments),{_baseCls:"bi-popup-view",maxWidth:"auto",minWidth:100,minHeight:24,lgap:0,rgap:0,tgap:0,bgap:0,vgap:0,hgap:0,innerVGap:0,direction:BI.Direction.Top,stopEvent:!1,stopPropagation:!1,logic:{dynamic:!0},tool:!1,tabs:[],buttons:[],el:{type:"bi.button_group",items:[],chooseType:0,behaviors:{},layouts:[{type:"bi.vertical"}]}})},_init:function(){BI.PopupView.superclass._init.apply(this,arguments);function e(e){e.stopPropagation()}function t(e){return e.stopEvent(),!1}var i=this,n=this.options;this.element.css({"z-index":BI.zIndex_popup,"min-width":n.minWidth+"px","max-width":n.maxWidth+"px"}).bind({click:e}),this.element.bind("mousewheel",e),n.stopPropagation&&this.element.bind({mousedown:e,mouseup:e,mouseover:e}),n.stopEvent&&this.element.bind({mousedown:t,mouseup:t,mouseover:t}),this.tool=this._createTool(),this.tab=this._createTab(),this.view=this._createView(),this.toolbar=this._createToolBar(),this.view.on(BI.Controller.EVENT_CHANGE,function(e){i.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&i.fireEvent(BI.PopupView.EVENT_CHANGE)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(n.direction),BI.extend({},n.logic,{scrolly:!1,lgap:n.lgap,rgap:n.rgap,tgap:n.tgap,bgap:n.bgap,vgap:n.vgap,hgap:n.hgap,items:BI.LogicFactory.createLogicItemsByDirection(n.direction,BI.extend({cls:"list-view-outer bi-card list-view-shadow"},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(n.direction),BI.extend({},n.logic,{items:BI.LogicFactory.createLogicItemsByDirection(n.direction,this.tool,this.tab,this.view,this.toolbar)}))))}))))},_createView:function(){var e=this.options;return this.button_group=BI.createWidget(e.el,{type:"bi.button_group",value:e.value}),this.button_group.element.css({"min-height":e.minHeight+"px","padding-top":e.innerVGap+"px","padding-bottom":e.innerVGap+"px"}),this.button_group},_createTool:function(){var e=this.options;if(!1!==e.tool)return BI.createWidget(e.tool)},_createTab:function(){var e=this.options;if(0!==e.tabs.length)return BI.createWidget({type:"bi.center",cls:"list-view-tab",height:25,items:e.tabs,value:e.value})},_createToolBar:function(){var e=this.options;if(0!==e.buttons.length)return BI.createWidget({type:"bi.center",cls:"list-view-toolbar bi-high-light bi-split-top",height:24,items:BI.createItems(e.buttons,{once:!1,shadow:!0,isShadowShowingOnSelected:!0})})},getView:function(){return this.view},populate:function(e){this.view.populate.apply(this.view,arguments)},resetWidth:function(e){this.options.width=e,this.element.width(e)},resetHeight:function(e){var t=e-(this.toolbar?this.toolbar.attr("height")||24:0)-(this.tab?this.tab.attr("height")||24:0)-(this.tool&&this.tool.attr("height")||24)*(this.tool&&this.tool.isVisible()?1:0)-2*this.options.innerVGap;this.view.resetHeight?this.view.resetHeight(t):this.view.element.css({"max-height":t+"px"})},setValue:function(e){this.tab&&this.tab.setValue(e),this.view.setValue(e)},getValue:function(){return this.view.getValue()}}),BI.PopupView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.popup_view",BI.PopupView)},function(e,t){BI.SearcherView=BI.inherit(BI.Pane,{_defaultConfig:function(){var e=BI.SearcherView.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-searcher-view bi-card",tipText:BI.i18nText("BI-No_Select"),chooseType:BI.Selection.Single,matcher:{type:"bi.button_group",behaviors:{redmark:function(){return!0}},items:[],layouts:[{type:"bi.vertical"}]},searcher:{type:"bi.button_group",behaviors:{redmark:function(){return!0}},items:[],layouts:[{type:"bi.vertical"}]}})},_init:function(){BI.SearcherView.superclass._init.apply(this,arguments);var n=this,e=this.options;this.matcher=BI.createWidget(e.matcher,{type:"bi.button_group",chooseType:e.chooseType,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}],value:e.value}),this.matcher.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&n.fireEvent(BI.SearcherView.EVENT_CHANGE,t,i)}),this.spliter=BI.createWidget({type:"bi.vertical",height:1,hgap:10,items:[{type:"bi.layout",height:1,cls:"searcher-view-spliter bi-background"}]}),this.searcher=BI.createWidget(e.searcher,{type:"bi.button_group",chooseType:e.chooseType,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}],value:e.value}),this.searcher.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&n.fireEvent(BI.SearcherView.EVENT_CHANGE,t,i)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.matcher,this.spliter,this.searcher]})},startSearch:function(){},stopSearch:function(){},setValue:function(e){this.matcher.setValue(e),this.searcher.setValue(e)},getValue:function(){return this.matcher.getValue().concat(this.searcher.getValue())},populate:function(e,t,i){e=e||[],t=t||[],this.setTipVisible(e.length+t.length===0),this.spliter.setVisible(BI.isNotEmptyArray(t)&&BI.isNotEmptyArray(e)),this.matcher.populate(t,i),this.searcher.populate(e,i)},empty:function(){this.searcher.empty(),this.matcher.empty()},hasMatched:function(){return 0<this.matcher.getAllButtons().length}}),BI.SearcherView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.searcher_view",BI.SearcherView)},function(e,t){BI.ListView=BI.inherit(BI.Widget,{props:function(){return{baseCls:"bi-list-view",overscanHeight:100,blockSize:10,scrollTop:0,el:{},items:[]}},init:function(){this.renderedIndex=-1,this.cache={}},render:function(){var e=this,t=this.options;return{type:"bi.vertical",items:[BI.extend({type:"bi.vertical",scrolly:!1,ref:function(){e.container=this}},t.el)],element:this}},mounted:function(){var i=this,t=this.options;this._populate(),this.element.scroll(function(e){t.scrollTop=i.element.scrollTop(),i._calculateBlocksToRender()});var n=this.element.width(),r=this.element.height();BI.ResizeDetector.addResizeListener(this,function(){var e=i.element.width(),t=i.element.height();e===n&&t===r||(n=e,r=t,i._calculateBlocksToRender())})},_renderMoreIf:function(){function e(){return i.container.element.height()}for(var t,i=this,n=this.options,r=this.element.height(),o=n.scrollTop+r+n.overscanHeight,a=this.cache[this.renderedIndex]&&this.cache[this.renderedIndex].index+n.blockSize||0,s=this.renderedIndex+1;(t=e())<o&&a<n.items.length;){var l=n.items.slice(a,a+n.blockSize);this.container.addItems(l,this);var u=e()-t;this.cache[s]={index:a,scrollTop:t,height:u},this.renderedIndex=s,s++,a+=n.blockSize}},_calculateBlocksToRender:function(){this.options;this._renderMoreIf()},_populate:function(e){var t=this.options;e&&this.options.items!==e&&(this.options.items=e),this._calculateBlocksToRender(),this.element.scrollTop(t.scrollTop)},restore:function(){this.renderedIndex=-1,this.container.empty(),this.cache={}},populate:function(e){e&&this.options.items!==e&&this.restore(),this._populate(e)},destroyed:function(){this.restore()}}),BI.shortcut("bi.list_view",BI.ListView)},function(e,t){BI.VirtualList=BI.inherit(BI.Widget,{props:function(){return{baseCls:"bi-virtual-list",overscanHeight:100,blockSize:10,scrollTop:0,items:[]}},init:function(){this.renderedIndex=-1,this.cache={}},render:function(){var e=this;this.options;return{type:"bi.vertical",items:[{type:"bi.layout",ref:function(){e.topBlank=this}},{type:"bi.vertical",scrolly:!1,ref:function(){e.container=this}},{type:"bi.layout",ref:function(){e.bottomBlank=this}}],element:this}},mounted:function(){var t=this,i=this.options;this._populate(),this.element.scroll(function(e){i.scrollTop=t.element.scrollTop(),t._calculateBlocksToRender()}),BI.ResizeDetector.addResizeListener(this,function(){t._calculateBlocksToRender()})},_renderMoreIf:function(){function e(){return i.container.element.height()+i.topBlank.element.height()+i.bottomBlank.element.height()}for(var t,i=this,n=this.options,r=this.element.height(),o=n.scrollTop+r+n.overscanHeight,a=this.cache[this.renderedIndex]&&this.cache[this.renderedIndex].index+n.blockSize||0,s=this.renderedIndex+1;(t=e())<o&&a<n.items.length;){var l=n.items.slice(a,a+n.blockSize);this.container.addItems(l,this);var u=e()-t;this.cache[s]={index:a,scrollTop:t,height:u},this.tree.set(s,u),this.renderedIndex=s,s++,a+=n.blockSize}},_calculateBlocksToRender:function(){var e=this.options;this._renderMoreIf();for(var t=this.element.height(),i=e.scrollTop-e.overscanHeight,n=e.scrollTop+t+e.overscanHeight,r=this.tree.greatestLowerBound(i),o=this.tree.leastUpperBound(n),a=[],s=0;s<r;s++){var l=this.cache[s].index;if(!this.cache[s].destroyed){for(var u=l;u<l+e.blockSize&&u<e.items.length;u++)a.push(this.container._children[u]),this.container._children[u]=null;this.cache[s].destroyed=!0}}for(s=o+1;s<=this.renderedIndex;s++){l=this.cache[s].index;if(!this.cache[s].destroyed){for(u=l;u<l+e.blockSize&&u<e.items.length;u++)a.push(this.container._children[u]),this.container._children[u]=null;this.cache[s].destroyed=!0}}var c=BI.Widget._renderEngine.createFragment(),h=BI.Widget._renderEngine.createFragment(),p=c;for(s=r<0?0:r;s<=o&&s<=this.renderedIndex;s++){l=this.cache[s].index;if(this.cache[s].destroyed||(p=h),!0===this.cache[s].destroyed){for(u=l;u<l+e.blockSize&&u<e.items.length;u++){var d=this.container._addElement(u,BI.extend({root:!0},BI.stripEL(e.items[u])),this);p.appendChild(d.element[0])}this.cache[s].destroyed=!1}}this.container.element.prepend(c),this.container.element.append(h),this.topBlank.setHeight(this.cache[r<0?0:r].scrollTop);var g=this.cache[Math.min(o,this.renderedIndex)];this.bottomBlank.setHeight(this.tree.sumTo(this.renderedIndex)-g.scrollTop-g.height),BI.each(a,function(e,t){t&&t._destroy()})},_populate:function(e){var t=this.options;e&&this.options.items!==e&&(this.options.items=e),this.tree=BI.PrefixIntervalTree.empty(Math.ceil(t.items.length/t.blockSize)),this._calculateBlocksToRender(),this.element.scrollTop(t.scrollTop)},_clearChildren:function(){BI.each(this.container._children,function(e,t){t&&t._destroy()}),this.container._children={},this.container.attr("items",[])},restore:function(){this.renderedIndex=-1,this._clearChildren(),this.cache={},this.options.scrollTop=0,this.topBlank.setHeight(0),this.bottomBlank.setHeight(0)},populate:function(e){e&&this.options.items!==e&&this.restore(),this._populate(e)},destroyed:function(){this.restore()}}),BI.shortcut("bi.virtual_list",BI.VirtualList)},function(e,t){BI.Pager=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Pager.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-pager",behaviors:{},layouts:[{type:"bi.horizontal",hgap:10,vgap:0}],dynamicShow:!0,dynamicShowFirstLast:!1,dynamicShowPrevNext:!1,pages:!1,curr:function(){return 1},groups:0,jump:BI.emptyFn,first:!1,last:!1,prev:"上一页",next:"下一页",firstPage:1,lastPage:function(){return 1},hasPrev:BI.emptyFn,hasNext:BI.emptyFn})},_init:function(){BI.Pager.superclass._init.apply(this,arguments);this.currPage=BI.result(this.options,"curr"),this._populate()},_populate:function(){var r=this,o=this.options,e=[],t={};this.empty();var i,a=BI.result(o,"pages"),n=BI.result(this,"currPage"),s=BI.result(o,"groups"),l=BI.result(o,"first"),u=BI.result(o,"last"),c=BI.result(o,"prev"),h=BI.result(o,"next");!1===a?(s=0,u=l=!1):a<s&&(s=a),t.index=Math.ceil((n+(1<s&&s!==a?1:0))/(0===s?1:s)),(!o.dynamicShow&&!o.dynamicShowPrevNext||1<n)&&!1!==c&&(BI.isKey(c)?e.push({text:c,value:"prev",disabled:!1===a?!1===o.hasPrev(n):!(1<n&&!1!==c)}):e.push(BI.extend({disabled:!1===a?!1===o.hasPrev(n):!(1<n&&!1!==c)},c))),(!o.dynamicShow&&!o.dynamicShowFirstLast||1<t.index&&0!==s)&&l&&(e.push({text:l,value:"first",disabled:!(1<t.index&&0!==s)}),1<t.index&&0!==s&&e.push({type:"bi.label",cls:"page-ellipsis",text:"…"})),t.poor=Math.floor((s-1)/2),t.start=1<t.index?n-t.poor:1,t.end=1<t.index?(i=n+(s-t.poor-1),a<i?a:i):s,t.end-t.start<s-1&&(t.start=t.end-s+1);var p=t.start,d=t.end;for(l&&u&&1<t.index&&0!==s&&s<a&&t.end<a&&0!==s&&(p++,d--);p<=d;p++)p===n?e.push({text:p,value:p,selected:!0}):e.push({text:p,value:p});(!o.dynamicShow&&!o.dynamicShowFirstLast||s<a&&t.end<a&&0!==s)&&u&&(s<a&&t.end<a&&0!==s&&e.push({type:"bi.label",cls:"page-ellipsis",text:"…"}),e.push({text:u,value:"last",disabled:!(s<a&&t.end<a&&0!==s)})),t.flow=!c&&0===s,(!o.dynamicShow&&!o.dynamicShowPrevNext&&h||n!==a&&h||t.flow)&&e.push(BI.isKey(h)?!1===a?{text:h,value:"next",disabled:!1===o.hasNext(n)}:t.flow&&n===a?{text:h,value:"next",disabled:!0}:{text:h,value:"next",disabled:!(n!==a&&h||t.flow)}:BI.extend({disabled:!1===a?!1===o.hasNext(n):!(n!==a&&h||t.flow)},h)),this.button_group=BI.createWidget({type:"bi.button_group",element:this,items:BI.createItems(e,{cls:"bi-list-item-select bi-border-radius",height:23,hgap:10}),behaviors:o.behaviors,layouts:o.layouts}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(e,t,i){if(e===BI.Events.CLICK){var n=r.button_group.getValue()[0];switch(n){case"first":r.currPage=1;break;case"last":r.currPage=a;break;case"prev":r.currPage--;break;case"next":r.currPage++;break;default:r.currPage=n}o.jump.apply(r,[{pages:a,curr:r.currPage}]),r._populate(),r.fireEvent(BI.Pager.EVENT_CHANGE,i)}r.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.fireEvent(BI.Pager.EVENT_AFTER_POPULATE)},getCurrentPage:function(){return this.currPage},setAllPages:function(e){this.options.pages=e},hasPrev:function(e){e=e||1;var t=this.options;return!1===this.options.pages?t.hasPrev(e):1<e},hasNext:function(e){e=e||1;var t=this.options,i=this.options.pages;return!1===i?t.hasNext(e):e<i},setValue:function(e){var t=this.options;if(e=(e=e||0)<1?1:e,!1===t.pages){var i=BI.result(t,"lastPage"),n=1;this.currPage=i<e?i:e<(n=BI.result(t,"firstPage"))?n:e}else e=e>t.pages?t.pages:e,this.currPage=e;this._populate()},getValue:function(){var e=this.button_group.getValue()[0];switch(e){case"prev":return-1;case"next":return 1;case"first":return BI.MIN;case"last":return BI.MAX;default:return e}},attr:function(e,t){BI.Pager.superclass.attr.apply(this,arguments),"curr"===e&&(this.currPage=BI.result(this.options,"curr"))},populate:function(){this._populate()}}),BI.Pager.EVENT_CHANGE="EVENT_CHANGE",BI.Pager.EVENT_AFTER_POPULATE="EVENT_AFTER_POPULATE",BI.shortcut("bi.pager",BI.Pager)},function(e,t){BI.A=BI.inherit(BI.Text,{_defaultConfig:function(){var e=BI.A.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-a display-block",href:"",target:"_blank",el:null,tagName:"a"})},_init:function(){var e=this.options;BI.A.superclass._init.apply(this,arguments),this.element.attr({href:e.href,target:e.target}),e.el&&BI.createWidget(e.el,{element:this})}}),BI.shortcut("bi.a",BI.A)},function(e,t){BI.LoadingBar=BI.inherit(BI.Single,{_defaultConfig:function(){var e=BI.LoadingBar.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-loading-bar bi-tips",height:30,handler:BI.emptyFn})},_init:function(){BI.LoadingBar.superclass._init.apply(this,arguments);var t=this;this.loaded=BI.createWidget({type:"bi.text_button",cls:"loading-text bi-list-item-simple",text:BI.i18nText("BI-Load_More"),width:120,handler:this.options.handler}),this.loaded.on(BI.Controller.EVENT_CHANGE,function(e){t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.loading=BI.createWidget({type:"bi.layout",width:this.options.height,height:this.options.height,cls:"loading-background cursor-default"});var e=BI.createWidget({type:"bi.center_adapt",items:[this.loaded]}),i=BI.createWidget({type:"bi.center_adapt",items:[this.loading]});this.cardLayout=BI.createWidget({type:"bi.card",element:this,items:[{el:e,cardName:"loaded"},{el:i,cardName:"loading"}]}),this.invisible()},_reset:function(){this.visible(),this.loaded.setText(BI.i18nText("BI-Load_More")),this.loaded.enable()},setLoaded:function(){this._reset(),this.cardLayout.showCardByName("loaded")},setEnd:function(){this.setLoaded(),this.loaded.setText(BI.i18nText("BI-No_More_Data")),this.loaded.disable()},setLoading:function(){this._reset(),this.cardLayout.showCardByName("loading")}}),BI.shortcut("bi.loading_bar",BI.LoadingBar)},function(e,t){BI.IconButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var e=BI.IconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{_baseCls:(e._baseCls||"")+" bi-icon-button horizon-center",iconWidth:null,iconHeight:null})},_init:function(){BI.IconButton.superclass._init.apply(this,arguments);var e=this.options;this.element.css({textAlign:"center"}),this.icon=BI.createWidget({type:"bi.icon",width:e.iconWidth,height:e.iconHeight}),BI.isNumber(e.height)&&0<e.height&&BI.isNull(e.iconWidth)&&BI.isNull(e.iconHeight)?(this.element.css("lineHeight",e.height+"px"),BI.createWidget({type:"bi.default",element:this,items:[this.icon]})):(this.element.css("lineHeight","1"),BI.createWidget({element:this,type:"bi.center_adapt",items:[this.icon]}))},doClick:function(){BI.IconButton.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.IconButton.EVENT_CHANGE,this)}}),BI.IconButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_button",BI.IconButton)},function(e,t){BI.ImageButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var e=BI.ImageButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-image-button",src:"",iconWidth:"100%",iconHeight:"100%"})},_init:function(){BI.ImageButton.superclass._init.apply(this,arguments);var e=this.options;this.image=BI.createWidget({type:"bi.img",width:e.iconWidth,height:e.iconHeight,src:e.src}),BI.isNumber(e.iconWidth)||BI.isNumber(e.iconHeight)?BI.createWidget({type:"bi.center_adapt",element:this,items:[this.image]}):BI.createWidget({type:"bi.adaptive",element:this,items:[this.image],scrollable:!1})},setWidth:function(e){BI.ImageButton.superclass.setWidth.apply(this,arguments),this.options.width=e},setHeight:function(e){BI.ImageButton.superclass.setHeight.apply(this,arguments),this.options.height=e},setImageWidth:function(e){this.image.setWidth(e)},setImageHeight:function(e){this.image.setHeight(e)},getImageWidth:function(){return this.image.element.width()},getImageHeight:function(){return this.image.element.height()},setSrc:function(e){this.options.src=e,this.image.setSrc(e)},getSrc:function(){return this.image.getSrc()},doClick:function(){BI.ImageButton.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.ImageButton.EVENT_CHANGE,this)}}),BI.ImageButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.image_button",BI.ImageButton)},function(e,t){BI.Button=BI.inherit(BI.BasicButton,{_const:{iconWidth:18},_defaultConfig:function(e){var t=BI.Button.superclass._defaultConfig.apply(this,arguments);return BI.extend(t,{baseCls:(t.baseCls||"")+" bi-button"+(BI.isIE()&&BI.isIE9Below()?" hack":""),minWidth:!0===e.block||!0===e.clear?0:80,height:24,shadow:!0!==e.clear,isShadowShowingOnSelected:!0,readonly:!0,iconCls:"",level:"common",block:!1,clear:!1,ghost:!1,textAlign:"center",whiteSpace:"nowrap",textWidth:null,textHeight:null,hgap:e.clear?0:10,vgap:0,tgap:0,bgap:0,lgap:0,rgap:0})},_init:function(){BI.Button.superclass._init.apply(this,arguments);var e=this.options;!BI.isNumber(e.height)||e.clear||e.block?e.clear||e.block?this.element.css({lineHeight:e.height+"px"}):this.element.css({lineHeight:e.height-2+"px"}):this.element.css({height:e.height+"px",lineHeight:e.height-2+"px"}),BI.isKey(e.iconCls)?(this.icon=BI.createWidget({type:"bi.icon_label",cls:e.iconCls,width:this._const.iconWidth,height:e.height-2,iconWidth:e.iconWidth,iconHeight:e.iconHeight}),this.text=BI.createWidget({type:"bi.label",text:e.text,textWidth:BI.isNotNull(e.textWidth)?e.textWidth-this._const.iconWidth:null,textHeight:e.textHeight,value:e.value,height:e.height-2}),BI.createWidget({type:"bi.center_adapt",element:this,hgap:e.hgap,vgap:e.vgap,items:[{type:"bi.horizontal",items:[this.icon,this.text]}]})):this.text=BI.createWidget({type:"bi.label",textAlign:e.textAlign,whiteSpace:e.whiteSpace,textWidth:e.textWidth,textHeight:e.textHeight,hgap:e.hgap,vgap:e.vgap,tgap:e.tgap,bgap:e.bgap,lgap:e.lgap,rgap:e.rgap,element:this,text:e.text,value:e.value}),!0===e.block&&this.element.addClass("block"),!0===e.clear&&this.element.addClass("clear"),!0===e.ghost&&this.element.addClass("ghost"),0<e.minWidth&&this.element.css({"min-width":e.minWidth+"px"})},doClick:function(){BI.Button.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.Button.EVENT_CHANGE,this)},setText:function(e){BI.Button.superclass.setText.apply(this,arguments),this.text.setText(e)},setValue:function(e){BI.Button.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.text.setValue(e)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},destroy:function(){BI.Button.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.button",BI.Button),BI.Button.EVENT_CHANGE="EVENT_CHANGE"},function(e,t){BI.TextButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var e=BI.TextButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-text-button",textAlign:"center",whiteSpace:"nowrap",textWidth:null,textHeight:null,hgap:0,lgap:0,rgap:0,vgap:0,text:"",py:""})},_init:function(){BI.TextButton.superclass._init.apply(this,arguments);var e=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:e.textAlign,whiteSpace:e.whiteSpace,textWidth:e.textWidth,textHeight:e.textHeight,width:e.width,height:e.height,hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,text:e.text,value:e.value,py:e.py,keyword:e.keyword})},doClick:function(){BI.TextButton.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.TextButton.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},setText:function(e){BI.TextButton.superclass.setText.apply(this,arguments),e=BI.isArray(e)?e.join(","):e,this.text.setText(e)},setStyle:function(e){this.text.setStyle(e)},setValue:function(e){BI.TextButton.superclass.setValue.apply(this,arguments),this.isReadOnly()||(e=BI.isArray(e)?e.join(","):e,this.text.setValue(e))}}),BI.TextButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_button",BI.TextButton)},function(e,t){BI.BlankIconIconTextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var e=BI.BlankIconIconTextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-blank-icon-text-item",logic:{dynamic:!1},iconCls1:"close-ha-font",iconCls2:"close-ha-font",blankWidth:0,iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.BlankIconIconTextItem.superclass._init.apply(this,arguments);var e=this.options,t=(this._const,BI.createWidget({type:"bi.layout",width:e.blankWidth,height:e.height}));this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:e.textHgap,vgap:e.textVgap,lgap:e.textLgap,rgap:e.textRgap,text:e.text,value:e.value,keyword:e.keyword,height:e.height}),this.icon1=BI.createWidget({type:"bi.icon_button",cls:e.iconCls1,forceNotSelected:!0,width:e.height,height:e.height}),this.icon2=BI.createWidget({type:"bi.icon_button",cls:e.iconCls2,forceNotSelected:!0,width:e.height,height:e.height}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(e.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",t,this.icon1,this.icon2,this.text)}))))},doClick:function(){BI.BlankIconIconTextItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.BlankIconIconTextItem.EVENT_CHANGE,this.getValue(),this)},setSelected:function(e){BI.BlankIconIconTextItem.superclass.setSelected.apply(this,arguments),this.icon1.setSelected(e),this.icon2.setSelected(e)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)}}),BI.BlankIconIconTextItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.blank_icon_icon_text_item",BI.BlankIconIconTextItem)},function(e,t){BI.BlankIconTextIconItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var e=BI.BlankIconTextIconItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-blank-icon-text-icon-item",logic:{dynamic:!1},iconCls1:"close-ha-font",iconCls2:"close-ha-font",blankWidth:0,iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.BlankIconTextIconItem.superclass._init.apply(this,arguments);var e=this.options;this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:e.textHgap,vgap:e.textVgap,lgap:e.textLgap,rgap:e.textRgap,text:e.text,value:e.value,keyword:e.keyword,height:e.height});var t=BI.createWidget({type:"bi.icon_label",cls:e.iconCls1,width:e.height,height:e.height,iconWidth:e.iconWidth,iconHeight:e.iconHeight});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.icon_label",cls:e.iconCls2,width:e.height,height:e.height,iconWidth:e.iconWidth,iconHeight:e.iconHeight},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(e.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.layout",width:e.blankWidth},t,this.text,{type:"bi.layout",width:e.height})}))))},doClick:function(){BI.BlankIconTextIconItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.BlankIconTextIconItem.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()}}),BI.BlankIconTextIconItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.blank_icon_text_icon_item",BI.BlankIconTextIconItem)},function(e,t){BI.BlankIconTextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var e=BI.BlankIconTextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-blank-icon-text-item",logic:{dynamic:!1},cls:"close-ha-font",blankWidth:0,iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.BlankIconTextItem.superclass._init.apply(this,arguments);var e=this.options,t=(this._const,BI.createWidget({type:"bi.layout",width:e.blankWidth}));this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:e.textHgap,vgap:e.textVgap,lgap:e.textLgap,rgap:e.textRgap,text:e.text,value:e.value,keyword:e.keyword,height:e.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:e.height,height:e.height,iconWidth:e.iconWidth,iconHeight:e.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(e.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",t,this.icon,this.text)}))))},doClick:function(){BI.BlankIconTextItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.BlankIconTextItem.EVENT_CHANGE,this.getValue(),this)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)}}),BI.BlankIconTextItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.blank_icon_text_item",BI.BlankIconTextItem)},function(e,t){BI.IconTextIconItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var e=BI.IconTextIconItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-icon-text-icon-item",logic:{dynamic:!1},iconCls1:"close-ha-font",iconCls2:"close-ha-font",iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.IconTextIconItem.superclass._init.apply(this,arguments);var e=this.options;this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:e.textHgap,vgap:e.textVgap,lgap:e.textLgap,rgap:e.textRgap,text:e.text,value:e.value,keyword:e.keyword,height:e.height});var t=BI.createWidget({type:"bi.icon_label",cls:e.iconCls1,width:e.leftIconWrapperWidth,height:e.height,iconWidth:e.iconWidth,iconHeight:e.iconHeight}),i=BI.createWidget({type:"bi.layout",width:e.height});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.icon_label",cls:e.iconCls2,width:e.rightIconWrapperWidth,height:e.height,iconWidth:e.iconWidth,iconHeight:e.iconHeight},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(e.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",t,this.text,i)}))))},doClick:function(){BI.IconTextIconItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.IconTextIconItem.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()}}),BI.IconTextIconItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_icon_item",BI.IconTextIconItem)},function(e,t){BI.IconTextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var e=BI.IconTextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-icon-text-item",direction:BI.Direction.Left,logic:{dynamic:!1},iconWrapperWidth:null,iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.IconTextItem.superclass._init.apply(this,arguments);var e=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:e.textHgap,vgap:e.textVgap,lgap:e.textLgap,rgap:e.textRgap,text:e.text,value:e.value,keyword:e.keyword,height:e.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:e.iconWrapperWidth||e.height,height:e.height,iconWidth:e.iconWidth,iconHeight:e.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(e.direction),BI.extend(e.logic,{items:BI.LogicFactory.createLogicItemsByDirection(e.direction,this.icon,this.text)}))))},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()},doClick:function(){BI.IconTextItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.IconTextItem.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)}}),BI.IconTextItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_item",BI.IconTextItem)},function(e,t){BI.TextIconItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var e=BI.TextIconItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-text-icon-item",logic:{dynamic:!1},cls:"close-ha-font",iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.TextIconItem.superclass._init.apply(this,arguments);var e=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:e.textHgap,vgap:e.textVgap,lgap:e.textLgap,rgap:e.textRgap,text:e.text,value:e.value,keyword:e.keyword,height:e.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:e.height,height:e.height,iconWidth:e.iconWidth,iconHeight:e.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(e.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.text,this.icon)}))))},doClick:function(){BI.TextIconItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.TextIconItem.EVENT_CHANGE,this.getValue(),this)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)}}),BI.TextIconItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_icon_item",BI.TextIconItem)},function(e,t){BI.TextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var e=BI.TextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-text-item",textAlign:"left",whiteSpace:"nowrap",textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.TextItem.superclass._init.apply(this,arguments);var e=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:e.textAlign,whiteSpace:e.whiteSpace,textHeight:"nowrap"==e.whiteSpace?e.height:e.textHeight,height:e.height,hgap:e.textHgap,vgap:e.textVgap,lgap:e.textLgap,rgap:e.textRgap,text:e.text,value:e.value,keyword:e.keyword,py:e.py})},doClick:function(){BI.TextItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.TextItem.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()}}),BI.TextItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_item",BI.TextItem)},function(e,t){BI.IconTextIconNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.IconTextIconNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-icon-text-icon-node",logic:{dynamic:!1},iconCls1:"close-ha-font",iconCls2:"close-ha-font",iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.IconTextIconNode.superclass._init.apply(this,arguments);var e=this.options;this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:e.textHgap,vgap:e.textVgap,lgap:e.textLgap,rgap:e.textRgap,text:e.text,value:e.value,keyword:e.keyword,height:e.height});var t=BI.createWidget({type:"bi.icon_label",cls:e.iconCls1,width:e.height,height:e.height,iconWidth:e.iconWidth,iconHeight:e.iconHeight}),i=BI.createWidget({type:"bi.layout",width:e.height,height:e.height});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.icon_label",cls:e.iconCls2,width:e.height,iconWidth:e.iconWidth,iconHeight:e.iconHeight},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(e.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",t,this.text,i)}))))},doClick:function(){BI.IconTextIconNode.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.IconTextIconNode.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()}}),BI.IconTextIconNode.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_icon_node",BI.IconTextIconNode)},function(e,t){BI.IconTextNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.IconTextNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-icon-text-node",logic:{dynamic:!1},cls:"close-ha-font",iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.IconTextNode.superclass._init.apply(this,arguments);var e=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:e.textHgap,vgap:e.textVgap,lgap:e.textLgap,rgap:e.textRgap,text:e.text,value:e.value,keyword:e.keyword,height:e.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:e.height,height:e.height,iconWidth:e.iconWidth,iconHeight:e.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(e.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.icon,this.text)}))))},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()},doClick:function(){BI.IconTextNode.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.IconTextNode.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)}}),BI.IconTextNode.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_node",BI.IconTextNode)},function(e,t){BI.TextIconNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.TextIconNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-text-icon-node",logic:{dynamic:!1},cls:"close-ha-font",iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.TextIconNode.superclass._init.apply(this,arguments);var e=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:e.textHgap,vgap:e.textVgap,lgap:e.textLgap,rgap:e.textRgap,text:e.text,value:e.value,keyword:e.keyword,height:e.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:e.height,height:e.height,iconWidth:e.iconWidth,iconHeight:e.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(e.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.text,this.icon)}))))},doClick:function(){BI.TextIconNode.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.TextIconNode.EVENT_CHANGE,this.getValue(),this)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)}}),BI.TextIconNode.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_icon_node",BI.TextIconNode)},function(e,t){BI.TextNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.TextNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-text-node",textAlign:"left",whiteSpace:"nowrap",textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.TextNode.superclass._init.apply(this,arguments);var e=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:e.textAlign,whiteSpace:e.whiteSpace,textHeight:"nowrap"==e.whiteSpace?e.height:e.textHeight,height:e.height,hgap:e.textHgap,vgap:e.textVgap,lgap:e.textLgap,rgap:e.textRgap,text:e.text,value:e.value,keyword:e.keyword,py:e.py})},doClick:function(){BI.TextNode.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.TextNode.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()}}),BI.TextNode.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_node",BI.TextNode)},function(e,t){BI.Editor=BI.inherit(BI.Single,{_defaultConfig:function(){var e=BI.Editor.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:"bi-editor bi-focus-shadow",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,tipType:"warning",inputType:"text",validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!1,watermark:"",errorText:""})},_init:function(){BI.Editor.superclass._init.apply(this,arguments);var t=this,e=this.options;this.editor=this.addWidget(BI.createWidget({type:"bi.input",element:"<input type='"+e.inputType+"'/>",root:!0,value:e.value,watermark:e.watermark,validationChecker:e.validationChecker,quitChecker:e.quitChecker,allowBlank:e.allowBlank})),this.editor.element.css({width:"100%",height:"100%",border:"none",outline:"none",padding:"0",margin:"0"}),BI.isKey(this.options.watermark)&&this._assertWaterMark();var i=[];this.watermark&&i.push({el:this.watermark,left:3,right:3,top:0,bottom:0}),i.push({el:this.editor,left:0,right:0,top:0,bottom:0});var n=[{el:{type:"bi.absolute",ref:function(e){t.contentWrapper=e},items:i},left:e.hgap+e.lgap,right:e.hgap+e.rgap,top:e.vgap+e.tgap,bottom:e.vgap+e.bgap}];BI.createWidget({type:"bi.absolute",element:this,items:n}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Input.EVENT_FOCUS,function(){t._checkError(),t.element.addClass("bi-editor-focus"),t.fireEvent(BI.Editor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Input.EVENT_BLUR,function(){t._setErrorVisible(!1),t.element.removeClass("bi-editor-focus"),t.fireEvent(BI.Editor.EVENT_BLUR,arguments)}),this.editor.on(BI.Input.EVENT_CLICK,function(){t.fireEvent(BI.Editor.EVENT_CLICK,arguments)}),this.editor.on(BI.Input.EVENT_CHANGE,function(){t.fireEvent(BI.Editor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Input.EVENT_KEY_DOWN,function(e){t.fireEvent(BI.Editor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Input.EVENT_QUICK_DOWN,function(e){e.keyCode!==BI.KeyCode.TAB&&t.watermark&&t.watermark.invisible()}),this.editor.on(BI.Input.EVENT_VALID,function(){t._checkWaterMark(),t._setErrorVisible(!1),t.fireEvent(BI.Editor.EVENT_VALID,arguments)}),this.editor.on(BI.Input.EVENT_ERROR,function(){t._checkWaterMark(),t.fireEvent(BI.Editor.EVENT_ERROR,arguments),t._setErrorVisible(t.isEditing())}),this.editor.on(BI.Input.EVENT_RESTRICT,function(){t._checkWaterMark();var e=t._setErrorVisible(!0);e&&e.element.fadeOut(100,function(){e.element.fadeIn(100)}),t.fireEvent(BI.Editor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Input.EVENT_EMPTY,function(){t._checkWaterMark(),t.fireEvent(BI.Editor.EVENT_EMPTY,arguments)}),this.editor.on(BI.Input.EVENT_ENTER,function(){t.fireEvent(BI.Editor.EVENT_ENTER,arguments)}),this.editor.on(BI.Input.EVENT_SPACE,function(){t.fireEvent(BI.Editor.EVENT_SPACE,arguments)}),this.editor.on(BI.Input.EVENT_BACKSPACE,function(){t.fireEvent(BI.Editor.EVENT_BACKSPACE,arguments)}),this.editor.on(BI.Input.EVENT_REMOVE,function(){t.fireEvent(BI.Editor.EVENT_REMOVE,arguments)}),this.editor.on(BI.Input.EVENT_START,function(){t.fireEvent(BI.Editor.EVENT_START,arguments)}),this.editor.on(BI.Input.EVENT_PAUSE,function(){t.fireEvent(BI.Editor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Input.EVENT_STOP,function(){t.fireEvent(BI.Editor.EVENT_STOP,arguments)}),this.editor.on(BI.Input.EVENT_CONFIRM,function(){t.fireEvent(BI.Editor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Input.EVENT_CHANGE_CONFIRM,function(){t.fireEvent(BI.Editor.EVENT_CHANGE_CONFIRM,arguments)}),this.element.click(function(e){return e.stopPropagation(),!1}),(BI.isKey(this.options.value)||BI.isEmptyString(this.options.value))&&this._checkError(),this._checkWaterMark()},_checkToolTip:function(){var e=this.options.errorText;BI.isFunction(e)&&(e=e(this.editor.getValue())),BI.isKey(e)&&(!this.isEnabled()||this.isValid()||BI.Bubbles.has(this.getName())&&BI.Bubbles.get(this.getName()).isVisible()?this.setTitle(""):this.setTitle(e))},_assertWaterMark:function(){var t=this,e=this.options;BI.isNull(this.watermark)&&(this.watermark=BI.createWidget({type:"bi.label",cls:"bi-water-mark",text:this.options.watermark,height:e.height-2*(e.vgap+e.tgap),whiteSpace:"nowrap",textAlign:"left"}),this.watermark.element.bind({mousedown:function(e){t.isEnabled()?t.editor.isEditing()||t.editor.focus():t.editor.isEditing()&&t.editor.blur(),e.stopEvent()}}),this.watermark.element.bind("click",function(e){t.isEnabled()?t.editor.isEditing()||t.editor.focus():t.editor.isEditing()&&t.editor.blur(),e.stopEvent()}))},_checkError:function(){this._setErrorVisible(this.isEnabled()&&!this.isValid()),this._checkToolTip()},_checkWaterMark:function(){var e=this.options;!this.disabledWaterMark&&""===this.editor.getValue()&&BI.isKey(e.watermark)?this.watermark&&this.watermark.visible():this.watermark&&this.watermark.invisible()},setErrorText:function(e){this.options.errorText=e},getErrorText:function(){return this.options.errorText},setWaterMark:function(e){this.options.watermark=e,BI.isNull(this.watermark)&&(this._assertWaterMark(),BI.createWidget({type:"bi.absolute",element:this.contentWrapper,items:[{el:this.watermark,left:3,right:3,top:0,bottom:0}]})),BI.isKey(e)&&this.watermark.setText(e)},_setErrorVisible:function(e){var t=this.options.errorText;if(BI.isFunction(t)&&(t=t(BI.trim(this.editor.getValue()))),!this.disabledError&&BI.isKey(t))return BI.Bubbles[e?"show":"hide"](this.getName(),t,this,{adjustYOffset:2}),this._checkToolTip(),BI.Bubbles.get(this.getName())},disableError:function(){this.disabledError=!0,this._checkError()},enableError:function(){this.disabledError=!1,this._checkError()},disableWaterMark:function(){this.disabledWaterMark=!0,this._checkWaterMark()},enableWaterMark:function(){this.disabledWaterMark=!1,this._checkWaterMark()},focus:function(){this.element.addClass("text-editor-focus"),this.editor.focus()},blur:function(){this.element.removeClass("text-editor-focus"),this.editor.blur()},selectAll:function(){this.editor.selectAll()},onKeyDown:function(e){this.editor.onKeyDown(e)},setValue:function(e){BI.Editor.superclass.setValue.apply(this,arguments),this.editor.setValue(e),this._checkError(),this._checkWaterMark()},getLastValidValue:function(){return this.editor.getLastValidValue()},getLastChangedValue:function(){return this.editor.getLastChangedValue()},getValue:function(){return this.isValid()?BI.trim(this.editor.getValue()):BI.trim(this.editor.getLastValidValue())},isEditing:function(){return this.editor.isEditing()},isValid:function(){return this.editor.isValid()},destroyed:function(){BI.Bubbles.remove(this.getName())}}),BI.Editor.EVENT_CHANGE="EVENT_CHANGE",BI.Editor.EVENT_FOCUS="EVENT_FOCUS",BI.Editor.EVENT_BLUR="EVENT_BLUR",BI.Editor.EVENT_CLICK="EVENT_CLICK",BI.Editor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.Editor.EVENT_SPACE="EVENT_SPACE",BI.Editor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.Editor.EVENT_START="EVENT_START",BI.Editor.EVENT_PAUSE="EVENT_PAUSE",BI.Editor.EVENT_STOP="EVENT_STOP",BI.Editor.EVENT_CONFIRM="EVENT_CONFIRM",BI.Editor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.Editor.EVENT_VALID="EVENT_VALID",BI.Editor.EVENT_ERROR="EVENT_ERROR",BI.Editor.EVENT_ENTER="EVENT_ENTER",BI.Editor.EVENT_RESTRICT="EVENT_RESTRICT",BI.Editor.EVENT_REMOVE="EVENT_REMOVE",BI.Editor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.editor",BI.Editor)},function(e,t){BI.MultifileEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.MultifileEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-multifile-editor",multiple:!1,maxSize:-1,accept:"",url:""})},_init:function(){var e=this,t=this.options;BI.MultifileEditor.superclass._init.apply(this,arguments),this.file=BI.createWidget({type:"bi.file",cls:"multifile-editor",width:"100%",height:"100%",name:t.name,url:t.url,multiple:t.multiple,accept:t.accept,maxSize:t.maxSize,title:t.title}),this.file.on(BI.File.EVENT_CHANGE,function(){e.fireEvent(BI.MultifileEditor.EVENT_CHANGE,arguments)}),this.file.on(BI.File.EVENT_UPLOADSTART,function(){e.fireEvent(BI.MultifileEditor.EVENT_UPLOADSTART,arguments)}),this.file.on(BI.File.EVENT_ERROR,function(){e.fireEvent(BI.MultifileEditor.EVENT_ERROR,arguments)}),this.file.on(BI.File.EVENT_PROGRESS,function(){e.fireEvent(BI.MultifileEditor.EVENT_PROGRESS,arguments)}),this.file.on(BI.File.EVENT_UPLOADED,function(){e.fireEvent(BI.MultifileEditor.EVENT_UPLOADED,arguments)}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.adaptive",scrollable:!1,items:[this.file]},top:0,right:0,left:0,bottom:0}]})},select:function(){this.file.select()},getValue:function(){return this.file.getValue()},upload:function(){this.file.upload()},reset:function(){this.file.reset()}}),BI.MultifileEditor.EVENT_CHANGE="EVENT_CHANGE",BI.MultifileEditor.EVENT_UPLOADSTART="EVENT_UPLOADSTART",BI.MultifileEditor.EVENT_ERROR="EVENT_ERROR",BI.MultifileEditor.EVENT_PROGRESS="EVENT_PROGRESS",BI.MultifileEditor.EVENT_UPLOADED="EVENT_UPLOADED",BI.shortcut("bi.multifile_editor",BI.MultifileEditor)},function(e,t){BI.TextAreaEditor=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.TextAreaEditor.superclass._defaultConfig.apply(),{baseCls:"bi-textarea-editor",value:""})},render:function(){var e=this.options,t=this;this.content=BI.createWidget({type:"bi.layout",tagName:"textarea",width:"100%",height:"100%",cls:"bi-textarea textarea-editor-content display-block"}),this.content.element.css({resize:"none"}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.adaptive",items:[this.content]},left:4,right:4,top:4,bottom:4}]}),this.content.element.on("input propertychange",function(e){t._checkWaterMark(),t.fireEvent(BI.TextAreaEditor.EVENT_CHANGE)}),this.content.element.focus(function(){t.isValid()&&(t._focus(),t.fireEvent(BI.TextAreaEditor.EVENT_FOCUS)),BI.Widget._renderEngine.createElement(document).bind("mousedown."+t.getName(),function(e){BI.DOM.isExist(t)&&!t.element.__isMouseInBounds__(e)&&(BI.Widget._renderEngine.createElement(document).unbind("mousedown."+t.getName()),t.content.element.blur())})}),this.content.element.blur(function(){t.isValid()&&(t._blur(),t.fireEvent(BI.TextAreaEditor.EVENT_BLUR)),BI.Widget._renderEngine.createElement(document).unbind("mousedown."+t.getName())}),BI.isKey(e.value)&&this.setValue(e.value),BI.isNotNull(e.style)&&this.setStyle(e.style),this._checkWaterMark()},_checkWaterMark:function(){var e=this,t=this.options,i=this.getValue();BI.isNotEmptyString(i)?(this.watermark&&this.watermark.destroy(),this.watermark=null):BI.isNotEmptyString(t.watermark)&&(this.watermark?(this.watermark.setText(t.watermark),this.watermark.setValid(!t.invalid),this.watermark.setEnable(!t.disabled)):(this.watermark=BI.createWidget({type:"bi.text_button",cls:"bi-water-mark cursor-default textarea-watermark",textAlign:"left",whiteSpace:"normal",text:t.watermark,invalid:t.invalid,disabled:t.disabled,hgap:4,vgap:4}),this.watermark.on(BI.TextButton.EVENT_CHANGE,function(){e.focus()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.watermark,left:0,top:0,right:0}]})))},_focus:function(){this.content.element.addClass("textarea-editor-focus"),this._checkWaterMark()},_blur:function(){this.content.element.removeClass("textarea-editor-focus"),this._checkWaterMark()},focus:function(){this._focus(),this.content.element.focus()},blur:function(){this._blur(),this.content.element.blur()},getValue:function(){return this.content.element.val()},setValue:function(e){this.content.element.val(e),this._checkWaterMark()},setStyle:function(e){this.style=e,this.element.css(e),this.content.element.css(BI.extend({},e,{color:e.color||BI.DOM.getContrastColor(BI.DOM.isRGBColor(e.backgroundColor)?BI.DOM.rgb2hex(e.backgroundColor):e.backgroundColor)}))},getStyle:function(){return this.style},_setValid:function(e){BI.TextAreaEditor.superclass._setValid.apply(this,arguments)},_setEnable:function(e){BI.TextAreaEditor.superclass._setEnable.apply(this,[e]),this.content&&(this.content.element[0].disabled=!e)}}),BI.TextAreaEditor.EVENT_CHANGE="EVENT_CHANGE",BI.TextAreaEditor.EVENT_BLUR="EVENT_BLUR",BI.TextAreaEditor.EVENT_FOCUS="EVENT_FOCUS",BI.shortcut("bi.textarea_editor",BI.TextAreaEditor)},function(e,t){BI.Html=BI.inherit(BI.Single,{props:{baseCls:"bi-html",textAlign:"left",whiteSpace:"normal",lineHeight:null,handler:null,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,text:"",highLight:!1},render:function(){var e=this,t=this.options;0<t.hgap+t.lgap&&this.element.css({"padding-left":t.hgap+t.lgap+"px"}),0<t.hgap+t.rgap&&this.element.css({"padding-right":t.hgap+t.rgap+"px"}),0<t.vgap+t.tgap&&this.element.css({"padding-top":t.vgap+t.tgap+"px"}),0<t.vgap+t.bgap&&this.element.css({"padding-bottom":t.vgap+t.bgap+"px"}),BI.isNumber(t.height)&&this.element.css({lineHeight:t.height+"px"}),BI.isNumber(t.lineHeight)&&this.element.css({lineHeight:t.lineHeight+"px"}),BI.isWidthOrHeight(t.maxWidth)&&this.element.css({maxWidth:t.maxWidth}),this.element.css({textAlign:t.textAlign,whiteSpace:t.whiteSpace,textOverflow:"nowrap"===t.whiteSpace?"ellipsis":"",overflow:"nowrap"===t.whiteSpace?"":"auto"}),t.handler?(this.text=BI.createWidget({type:"bi.layout",tagName:"span"}),this.text.element.click(function(){t.handler(e.getValue())}),BI.createWidget({type:"bi.default",element:this,items:[this.text]})):this.text=this,BI.isKey(t.text)?this.setText(t.text):BI.isKey(t.value)&&this.setText(t.value),t.highLight&&this.doHighLight()},doHighLight:function(){this.text.element.addClass("bi-high-light")},unHighLight:function(){this.text.element.removeClass("bi-high-light")},setValue:function(e){BI.Html.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.setText(e)},setStyle:function(e){this.text.element.css(e)},setText:function(e){BI.Html.superclass.setText.apply(this,arguments),this.options.text=e,this.text.element.html(e)}}),BI.shortcut("bi.html",BI.Html)},function(e,t){BI.Icon=BI.inherit(BI.Single,{_defaultConfig:function(){var e=BI.Icon.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{tagName:"i",baseCls:(e.baseCls||"")+" x-icon b-font horizon-center display-block"})},_init:function(){BI.Icon.superclass._init.apply(this,arguments),BI.isIE9Below&&BI.isIE9Below()&&this.element.addClass("hack")}}),BI.shortcut("bi.icon",BI.Icon)},function(e,t){BI.Iframe=BI.inherit(BI.Single,{_defaultConfig:function(){var e=BI.Iframe.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{tagName:"iframe",baseCls:(e.baseCls||"")+" bi-iframe",src:"",name:"",attributes:{},width:"100%",height:"100%"})},_init:function(){var e=this.options;e.attributes.frameborder="0",e.attributes.src=e.src,e.attributes.name=e.name,BI.Iframe.superclass._init.apply(this,arguments)},setSrc:function(e){this.options.src=e,this.element.attr("src",e)},getSrc:function(){return this.options.src},setName:function(e){this.options.name=e,this.element.attr("name",e)},getName:function(){return this.options.name}}),BI.shortcut("bi.iframe",BI.Iframe)},function(e,t){BI.Img=BI.inherit(BI.Single,{_defaultConfig:function(){var e=BI.Img.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{tagName:"img",baseCls:(e.baseCls||"")+" bi-img display-block",src:"",attributes:{},width:"100%",height:"100%"})},_init:function(){var e=this.options;e.attributes.src=e.src,BI.Img.superclass._init.apply(this,arguments)},setSrc:function(e){this.options.src=e,this.element.attr("src",e)},getSrc:function(){return this.options.src}}),BI.shortcut("bi.img",BI.Img)},function(e,t){BI.ImageCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){var e=BI.ImageCheckbox.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-image-checkbox check-box-icon",selected:!1,handler:BI.emptyFn,width:16,height:16,iconWidth:16,iconHeight:16})}}),BI.ImageCheckbox.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.image_checkbox",BI.ImageCheckbox)},function(e,t){BI.Checkbox=BI.inherit(BI.BasicButton,{props:{baseCls:"bi-checkbox",selected:!1,handler:BI.emptyFn,width:16,height:16,iconWidth:16,iconHeight:16},render:function(){var t=this,e=this.options;return{type:"bi.center_adapt",items:[{type:"bi.default",ref:function(e){t.checkbox=e},cls:"checkbox-content",width:e.iconWidth-2,height:e.iconHeight-2}]}},_setEnable:function(e){BI.Checkbox.superclass._setEnable.apply(this,arguments),!0===e?this.checkbox.element.removeClass("base-disabled disabled"):this.checkbox.element.addClass("base-disabled disabled")},doClick:function(){BI.Checkbox.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.Checkbox.EVENT_CHANGE)},setSelected:function(e){BI.Checkbox.superclass.setSelected.apply(this,arguments),e?this.checkbox.element.addClass("bi-high-light-background"):this.checkbox.element.removeClass("bi-high-light-background")}}),BI.Checkbox.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.checkbox",BI.Checkbox)},function(e,t){BI.Input=BI.inherit(BI.Single,{_defaultConfig:function(){var e=BI.Input.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-input display-block overflow-dot",tagName:"input",validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!1})},_init:function(){BI.Input.superclass._init.apply(this,arguments);var i=this,t=!1,n=null,r=!1,o=BI.debounce(function(e){i.onKeyDown(e,t),i._keydown_=!1},300),a=BI.debounce(BI.bind(this._click,this),BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1});this._focusDebounce=BI.debounce(BI.bind(this._focus,this),BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1}),this._blurDebounce=BI.debounce(BI.bind(this._blur,this),BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1}),this.element.keydown(function(e){r=!1,t=e.ctrlKey||e.metaKey,n=e.keyCode,i.fireEvent(BI.Input.EVENT_QUICK_DOWN,arguments)}).keyup(function(e){n=null,r&&e.keyCode===BI.KeyCode.ENTER||(i._keydown_=!0,o(e.keyCode))}).on("input propertychange",function(e){var t=e.originalEvent;!BI.isNull(t.propertyName)&&"value"!==t.propertyName||(r=!0,i._keydown_=!0,o(n),n=null)}).click(function(e){e.stopPropagation(),a()}).mousedown(function(e){i.element.val(i.element.val())}).focus(function(e){i._focusDebounce()}).focusout(function(e){i._blurDebounce()}),(BI.isKey(this.options.value)||BI.isEmptyString(this.options.value))&&this.setValue(this.options.value)},_focus:function(){this.element.addClass("bi-input-focus"),this._checkValidationOnValueChange(),this._isEditing=!0,""==this.getValue()&&(this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EMPTY,this.getValue(),this),this.fireEvent(BI.Input.EVENT_EMPTY)),this.fireEvent(BI.Input.EVENT_FOCUS)},_blur:function(){var t=this;function e(){if(t.isValid()||!1===t.options.quitChecker.apply(t,[BI.trim(t.getValue())])||(t.element.val(t._lastValidValue?t._lastValidValue:""),t._checkValidationOnValueChange(),t._defaultState()),t.element.removeClass("bi-input-focus"),t._isEditing=!1,t._start=!1,t.isValid()){var e=t._lastValidValue;t._lastValidValue=t.getValue(),t.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CONFIRM,t.getValue(),t),t.fireEvent(BI.Input.EVENT_CONFIRM),t._lastValidValue!==e&&t.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM)}t.fireEvent(BI.Input.EVENT_BLUR)}!0===t._keydown_?BI.delay(e,300):e()},_click:function(){!0!==this._isEditing&&(this.selectAll(),this.fireEvent(BI.Input.EVENT_CLICK))},onClick:function(){this._click()},onKeyDown:function(e,t){this.isValid()&&BI.trim(this._lastChangedValue)===BI.trim(this.getValue())||this._checkValidationOnValueChange(),this.isValid()&&""!==BI.trim(this.getValue())&&((BI.trim(this.getValue())===this._lastValue||this._start&&null!=this._lastValue&&""!==this._lastValue)&&(!0!==this._pause||/(\s|\u00A0)$/.test(this.getValue()))||(this._start=!0,this._pause=!1,this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STARTEDIT,this.getValue(),this),this.fireEvent(BI.Input.EVENT_START))),e==BI.KeyCode.ENTER&&(this.isValid()||!1!==this.options.quitChecker.apply(this,[BI.trim(this.getValue())])?(this.blur(),this.fireEvent(BI.Input.EVENT_ENTER)):this.fireEvent(BI.Input.EVENT_RESTRICT)),e==BI.KeyCode.SPACE&&this.fireEvent(BI.Input.EVENT_SPACE),e==BI.KeyCode.BACKSPACE&&""==this._lastValue&&this.fireEvent(BI.Input.EVENT_REMOVE),e!=BI.KeyCode.BACKSPACE&&e!=BI.KeyCode.DELETE||this.fireEvent(BI.Input.EVENT_BACKSPACE),this.fireEvent(BI.Input.EVENT_KEY_DOWN,arguments);var i=this._lastValue;BI.trim(this.getValue())!==BI.trim(this._lastValue||"")&&this._valueChange(),BI.isEndWithBlank(this.getValue())?(this._pause=!0,this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.PAUSE,"",this),this.fireEvent(BI.Input.EVENT_PAUSE),this._defaultState()):e!==BI.KeyCode.BACKSPACE&&e!==BI.KeyCode.DELETE||""!==BI.trim(this.getValue())||null===i||""===BI.trim(i)||(this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT,this.getValue(),this),this.fireEvent(BI.Input.EVENT_STOP))},_defaultState:function(){""==this.getValue()&&(this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EMPTY,this.getValue(),this),this.fireEvent(BI.Input.EVENT_EMPTY)),this._lastValue=this.getValue(),this._lastSubmitValue=null},_valueChange:function(){this.isValid()&&BI.trim(this.getValue())!==this._lastSubmitValue&&(this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CHANGE,this.getValue(),this),this.fireEvent(BI.Input.EVENT_CHANGE),this._lastSubmitValue=BI.trim(this.getValue())),""==this.getValue()&&(this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EMPTY,this.getValue(),this),this.fireEvent(BI.Input.EVENT_EMPTY)),this._lastValue=this.getValue()},_checkValidationOnValueChange:function(){var e=this.options,t=this.getValue();this.setValid(!0===e.allowBlank&&""==BI.trim(t)||BI.isNotEmptyString(BI.trim(t))&&!1!==e.validationChecker.apply(this,[BI.trim(t)]))},focus:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能focus");!0==!this._isEditing&&(this.element.focus(),this.selectAll())},blur:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能blur");!0===this._isEditing&&(this.element.blur(),this._blurDebounce())},selectAll:function(){if(!this.element.is(":visible"))throw new Error("input输入框在不可见下不能select");this.element.select(),this._isEditing=!0},setValue:function(e){this.element.val(e),BI.nextTick(BI.bind(function(){this._checkValidationOnValueChange(),this._defaultState(),this.isValid()&&(this._lastValidValue=this._lastSubmitValue=this.getValue())},this))},getValue:function(){return this.element.val()||""},isEditing:function(){return this._isEditing},getLastValidValue:function(){return this._lastValidValue},getLastChangedValue:function(){return this._lastChangedValue},_setValid:function(){BI.Input.superclass._setValid.apply(this,arguments),this.isValid()?(this._lastChangedValue=this.getValue(),this.element.removeClass("bi-input-error"),this.fireEvent(BI.Input.EVENT_VALID,BI.trim(this.getValue()),this)):(this._lastChangedValue===this.getValue()&&(this._lastChangedValue=null),this.element.addClass("bi-input-error"),this.fireEvent(BI.Input.EVENT_ERROR,BI.trim(this.getValue()),this))},_setEnable:function(e){BI.Input.superclass._setEnable.apply(this,[e]),this.element[0].disabled=!e}}),BI.Input.EVENT_CHANGE="EVENT_CHANGE",BI.Input.EVENT_FOCUS="EVENT_FOCUS",BI.Input.EVENT_CLICK="EVENT_CLICK",BI.Input.EVENT_BLUR="EVENT_BLUR",BI.Input.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.Input.EVENT_QUICK_DOWN="EVENT_QUICK_DOWN",BI.Input.EVENT_SPACE="EVENT_SPACE",BI.Input.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.Input.EVENT_START="EVENT_START",BI.Input.EVENT_PAUSE="EVENT_PAUSE",BI.Input.EVENT_STOP="EVENT_STOP",BI.Input.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.Input.EVENT_CONFIRM="EVENT_CONFIRM",BI.Input.EVENT_REMOVE="EVENT_REMOVE",BI.Input.EVENT_EMPTY="EVENT_EMPTY",BI.Input.EVENT_VALID="EVENT_VALID",BI.Input.EVENT_ERROR="EVENT_ERROR",BI.Input.EVENT_ENTER="EVENT_ENTER",BI.Input.EVENT_RESTRICT="EVENT_RESTRICT",BI.shortcut("bi.input",BI.Input)},function(e,t){BI.ImageRadio=BI.inherit(BI.IconButton,{_defaultConfig:function(){var e=BI.ImageRadio.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-radio radio-icon",selected:!1,handler:BI.emptyFn,width:16,height:16,iconWidth:16,iconHeight:16})},_init:function(){BI.ImageRadio.superclass._init.apply(this,arguments)},doClick:function(){BI.ImageRadio.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.ImageRadio.EVENT_CHANGE)}}),BI.ImageRadio.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.image_radio",BI.ImageRadio)},function(e,t){BI.Radio=BI.inherit(BI.BasicButton,{props:{baseCls:"bi-radio",selected:!1,handler:BI.emptyFn,width:16,height:16,iconWidth:14,iconHeight:14},render:function(){var t=this,e=this.options;return{type:"bi.center_adapt",element:this.element,items:[{type:"bi.layout",cls:"radio-content",ref:function(e){t.radio=e},width:e.iconWidth,height:e.iconHeight}]}},_setEnable:function(e){BI.Radio.superclass._setEnable.apply(this,arguments),!0===e?this.radio.element.removeClass("base-disabled disabled"):this.radio.element.addClass("base-disabled disabled")},doClick:function(){BI.Radio.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.Radio.EVENT_CHANGE)},setSelected:function(e){BI.Radio.superclass.setSelected.apply(this,arguments),e?this.radio.element.addClass("bi-high-light-background"):this.radio.element.removeClass("bi-high-light-background")}}),BI.Radio.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.radio",BI.Radio)},function(e,t){BI.AbstractLabel=BI.inherit(BI.Single,{_defaultConfig:function(e){var t=BI.AbstractLabel.superclass._defaultConfig.apply(this,arguments);return BI.extend(t,{textAlign:"center",whiteSpace:"nowrap",textWidth:null,textHeight:null,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,text:"",highLight:!1})},_createJson:function(){var e=this.options;return{type:"bi.text",textAlign:e.textAlign,whiteSpace:e.whiteSpace,lineHeight:e.textHeight,text:e.text,value:e.value,py:e.py,keyword:e.keyword,highLight:e.highLight}},_init:function(){BI.AbstractLabel.superclass._init.apply(this,arguments),"center"===this.options.textAlign?this._createCenterEl():this._createNotCenterEl()},_createCenterEl:function(){var e=this.options,t=this._createJson();return t.textAlign="left",BI.isNumber(e.width)&&0<e.width?BI.isNumber(e.textWidth)&&0<e.textWidth?(t.maxWidth=e.textWidth,BI.isNumber(e.height)&&0<e.height?void BI.createWidget({type:"bi.center_adapt",height:e.height,scrollable:"normal"===e.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(t)}]}):void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===e.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(t)}]})):"normal"==e.whiteSpace?(BI.extend(t,{hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap}),this.text=BI.createWidget(t),void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===e.whiteSpace,element:this,items:[this.text]})):BI.isNumber(e.height)&&0<e.height?(this.element.css({"line-height":e.height+"px"}),t.textAlign=e.textAlign,void(this.text=BI.createWidget(BI.extend(t,{element:this,hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap})))):(BI.extend(t,{hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap,maxWidth:"100%"}),this.text=BI.createWidget(t),void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===e.whiteSpace,element:this,items:[this.text]})):BI.isNumber(e.textWidth)&&0<e.textWidth?(t.maxWidth=e.textWidth,void BI.createWidget({type:"bi.center_adapt",scrollable:"normal"===e.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(t)}]})):"normal"==e.whiteSpace?(BI.extend(t,{hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap}),this.text=BI.createWidget(t),void BI.createWidget({type:"bi.center_adapt",scrollable:!0,element:this,items:[this.text]})):BI.isNumber(e.height)&&0<e.height?(this.element.css({"line-height":e.height+"px"}),t.textAlign=e.textAlign,void(this.text=BI.createWidget(BI.extend(t,{element:this,hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap})))):(BI.extend(t,{hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap}),this.text=BI.createWidget(BI.extend(t,{maxWidth:"100%"})),void BI.createWidget({type:"bi.center_adapt",element:this,items:[this.text]}))},_createNotCenterEl:function(){var e=this.options,t="right"===e.textAlign?"bi.right_vertical_adapt":"bi.vertical_adapt",i=this._createJson();return BI.isNumber(e.width)&&0<e.width?BI.isNumber(e.textWidth)&&0<e.textWidth?(i.width=e.textWidth,BI.isNumber(e.height)&&0<e.height?void BI.createWidget({type:t,height:e.height,scrollable:"normal"===e.whiteSpace,element:this,items:[{el:this.text=BI.createWidget(i)}]}):void BI.createWidget({type:t,scrollable:"normal"===e.whiteSpace,hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap,element:this,items:[{el:this.text=BI.createWidget(i)}]})):BI.isNumber(e.height)&&0<e.height?(this.text=BI.createWidget(BI.extend(i,{element:this,hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap})),void("normal"!==e.whiteSpace&&this.element.css({"line-height":e.height-2*e.vgap+"px"}))):(i.width=e.width-2*e.hgap-e.lgap-e.rgap,void BI.createWidget({type:t,scrollable:"normal"===e.whiteSpace,hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap,element:this,items:[{el:this.text=BI.createWidget(i)}]})):BI.isNumber(e.textWidth)&&0<e.textWidth?(i.width=e.textWidth,void BI.createWidget({type:t,scrollable:"normal"===e.whiteSpace,hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap,element:this,items:[{el:this.text=BI.createWidget(i)}]})):BI.isNumber(e.height)&&0<e.height?("normal"!==e.whiteSpace&&this.element.css({"line-height":e.height-2*e.vgap+"px"}),void(this.text=BI.createWidget(BI.extend(i,{element:this,hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap})))):(BI.extend(i,{hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap}),this.text=BI.createWidget(BI.extend(i,{maxWidth:"100%"})),void BI.createWidget({type:t,element:this,scrollable:"normal"===e.whiteSpace,items:[this.text]}))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},setText:function(e){this.options.text=e,this.text.setText(e)},getText:function(){return this.options.text},setStyle:function(e){this.text.setStyle(e)},setValue:function(e){BI.AbstractLabel.superclass.setValue.apply(this,arguments),this.isReadOnly()||this.text.setValue(e)},populate:function(){BI.AbstractLabel.superclass.populate.apply(this,arguments)}})},function(e,t){BI.HtmlLabel=BI.inherit(BI.AbstractLabel,{props:{baseCls:"bi-html-label"},_createJson:function(){var e=this.options;return{type:"bi.html",textAlign:e.textAlign,whiteSpace:e.whiteSpace,lineHeight:e.textHeight,text:e.text,value:e.value}}}),BI.shortcut("bi.html_label",BI.HtmlLabel)},function(e,t){BI.IconLabel=BI.inherit(BI.Single,{props:{baseCls:"bi-icon-label horizon-center",iconWidth:null,iconHeight:null},_init:function(){BI.IconLabel.superclass._init.apply(this,arguments);var e=this.options;this.element.css({textAlign:"center"}),this.icon=BI.createWidget({type:"bi.icon",width:e.iconWidth,height:e.iconHeight}),BI.isNumber(e.height)&&0<e.height&&BI.isNull(e.iconWidth)&&BI.isNull(e.iconHeight)?(this.element.css("lineHeight",e.height+"px"),BI.createWidget({type:"bi.default",element:this,items:[this.icon]})):(this.element.css("lineHeight","1"),BI.createWidget({element:this,type:"bi.center_adapt",items:[this.icon]}))}}),BI.shortcut("bi.icon_label",BI.IconLabel)},function(e,t){BI.Label=BI.inherit(BI.AbstractLabel,{props:{baseCls:"bi-label",py:"",keyword:""},_createJson:function(){var e=this.options;return{type:"bi.text",textAlign:e.textAlign,whiteSpace:e.whiteSpace,lineHeight:e.textHeight,text:e.text,value:e.value,py:e.py,keyword:e.keyword,highLight:e.highLight}},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)}}),BI.shortcut("bi.label",BI.Label)},function(e,t){BI.Link=BI.inherit(BI.Label,{_defaultConfig:function(){var e=BI.Link.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-link display-block",tagName:"a",href:"",target:"_blank"})},_createJson:function(){var e=this.options;return{type:"bi.a",textAlign:e.textAlign,whiteSpace:e.whiteSpace,lineHeight:e.textHeight,text:e.text,keyword:e.keyword,value:e.value,py:e.py,href:e.href,target:e.target}},_init:function(){BI.Link.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.link",BI.Link)},function(e,t){BI.Bubble=BI.inherit(BI.Tip,{_defaultConfig:function(){return BI.extend(BI.Bubble.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-bubble",direction:"top",text:"",level:"error",height:18})},_init:function(){BI.Bubble.superclass._init.apply(this,arguments);function e(e){return e.stopPropagation(),e.stopEvent(),!1}this.element.bind({click:e,mousedown:e,mouseup:e,mouseover:e,mouseenter:e,mouseleave:e,mousemove:e}),BI.createWidget({type:"bi.left",element:this,items:[this["_"+this.options.direction]()]})},_createBubbleText:function(){var e=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"bubble-text bubble-"+e.level,text:e.text,hgap:5,height:18})},_top:function(){return BI.createWidget({type:"bi.vertical",items:[{el:this._createBubbleText(),height:18},{el:{type:"bi.layout"},height:3}]})},_bottom:function(){return BI.createWidget({type:"bi.vertical",items:[{el:{type:"bi.layout"},height:3},{el:this._createBubbleText(),height:18}]})},_left:function(){return BI.createWidget({type:"bi.right",items:[{el:{type:"bi.layout",width:3,height:18}},{el:this._createBubbleText()}]})},_right:function(){return BI.createWidget({type:"bi.left",items:[{el:{type:"bi.layout",width:3,height:18}},{el:this._createBubbleText()}]})},setText:function(e){this.text.setText(e)}}),BI.shortcut("bi.bubble",BI.Bubble)},function(e,t){BI.Toast=BI.inherit(BI.Tip,{_const:{minWidth:200,hgap:10},_defaultConfig:function(){return BI.extend(BI.Toast.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-toast",text:"",level:"success"})},_init:function(){BI.Toast.superclass._init.apply(this,arguments);var e=this,t=this.options;this.element.css({minWidth:this._const.minWidth+"px"}),this.element.addClass("toast-"+t.level);function i(e){return e.stopPropagation(),e.stopEvent(),!1}this.element.bind({click:i,mousedown:i,mouseup:i,mouseover:i,mouseenter:i,mouseleave:i,mousemove:i});var n="close-font";switch(t.level){case"success":n="toast-success-font";break;case"error":n="toast-error-font";break;case"warning":n="toast-warning-font";break;case"normal":default:n="toast-message-font"}var r=[{type:"bi.icon_label",cls:n+" toast-icon",width:36},{el:{type:"bi.label",whiteSpace:"normal",text:t.text,textHeight:16,textAlign:"left"},rgap:t.autoClose?this._const.hgap:0}],o=[36,""];!1===t.autoClose&&(r.push({type:"bi.icon_button",cls:"close-font toast-icon",handler:function(){e.destroy()},width:36}),o.push(36)),this.text=BI.createWidget({type:"bi.horizontal_adapt",element:this,items:r,vgap:7,columnSize:o})},setText:function(e){this.text.setText(e)},beforeDestroy:function(){this.fireEvent(BI.Toast.EVENT_DESTORY)}}),BI.Toast.EVENT_DESTORY="EVENT_DESTORY",BI.shortcut("bi.toast",BI.Toast)},function(e,t){BI.Tooltip=BI.inherit(BI.Tip,{_const:{hgap:5,vgap:3},_defaultConfig:function(){return BI.extend(BI.Tooltip.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-tooltip",text:"",level:"success",stopEvent:!1,stopPropagation:!1})},_init:function(){BI.Tooltip.superclass._init.apply(this,arguments);var t=this.options;this.element.addClass("tooltip-"+t.level);function e(e){t.stopPropagation&&e.stopPropagation(),t.stopEvent&&e.stopEvent()}this.element.bind({click:e,mousedown:e,mouseup:e,mouseover:e,mouseenter:e,mouseleave:e,mousemove:e});var i=(t.text+"").split("\n");1<i.length?BI.createWidget({type:"bi.vertical",element:this,hgap:this._const.hgap,items:BI.map(i,function(e,t){return{type:"bi.label",textAlign:"left",whiteSpace:"normal",text:t,textHeight:18}})}):this.text=BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",text:t.text,textHeight:18,hgap:this._const.hgap})},setWidth:function(e){this.element.width(e-2*this._const.hgap)},setText:function(e){this.text&&this.text.setText(e)},setLevel:function(e){this.element.removeClass("tooltip-success").removeClass("tooltip-warning"),this.element.addClass("tooltip-"+e)}}),BI.shortcut("bi.tooltip",BI.Tooltip)},function(e,t){BI.Trigger=BI.inherit(BI.Single,{_defaultConfig:function(){var e=BI.Trigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{_baseCls:(e._baseCls||"")+" bi-trigger cursor-pointer",height:24})},_init:function(){BI.Trigger.superclass._init.apply(this,arguments)},setKey:function(){},getKey:function(){}})},function(e,t){BI.CustomTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CustomTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-custom-tree",expander:{el:{},popup:{type:"bi.custom_tree"}},items:[],itemsCreator:BI.emptyFn,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}})},_init:function(){BI.CustomTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(e){var r=this,o=this.options;e=BI.Tree.transformToTreeFormat(e);var a=[];return BI.each(e,function(e,i){if(BI.isNotEmptyArray(i.children)||!0===i.isParent){var t=BI.extend({type:"bi.expander",el:{value:i.value},popup:{type:"bi.custom_tree"}},BI.deepClone(o.expander),{id:i.id,pId:i.pId}),n=BI.stripEL(i);BI.isWidget(n)?t.el=n:(delete(n=BI.clone(n)).children,BI.extend(t.el,n)),t.popup.expander=BI.deepClone(o.expander),t.items=t.popup.items=i.children,t.itemsCreator=t.popup.itemsCreator=function(e){if(BI.isNotNull(e.node))return o.itemsCreator.apply(r,arguments);var t=Array.prototype.slice.call(arguments,0);return t[0].node=i,o.itemsCreator.apply(r,t)},BI.isNull(t.popup.el)&&(t.popup.el=BI.deepClone(o.el)),a.push(t)}else a.push(i)}),a},initTree:function(e){var n=this,t=this.options;this.tree=BI.createWidget(t.el,{element:this,items:this._formatItems(e),itemsCreator:function(e,i){t.itemsCreator.apply(this,[e,function(e){var t=Array.prototype.slice.call(arguments,0);t[0]=n._formatItems(e),i.apply(null,t)}])},value:t.value}),this.tree.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&n.fireEvent(BI.CustomTree.EVENT_CHANGE,t,i)})},stroke:function(e){this.populate.apply(this,arguments)},populate:function(e){var t=Array.prototype.slice.call(arguments,0);0<arguments.length&&(t[0]=this._formatItems(e)),this.tree.populate.apply(this.tree,t)},setValue:function(e){this.tree&&this.tree.setValue(e)},getValue:function(){return this.tree?this.tree.getValue():[]},getAllButtons:function(){return this.tree?this.tree.getAllButtons():[]},getAllLeaves:function(){return this.tree?this.tree.getAllLeaves():[]},getNodeById:function(e){return this.tree&&this.tree.getNodeById(e)},getNodeByValue:function(e){return this.tree&&this.tree.getNodeByValue(e)},empty:function(){this.tree.empty()}}),BI.CustomTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.custom_tree",BI.CustomTree)},function(e,t){BI.IconChangeButton=BI.inherit(BI.Single,{_defaultConfig:function(){var e=BI.IconChangeButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:"bi-icon-change-button",iconCls:"",iconWidth:null,iconHeight:null,stopEvent:!1,stopPropagation:!1,selected:!1,once:!1,forceSelected:!1,forceNotSelected:!1,disableSelected:!1,shadow:!1,isShadowShowingOnSelected:!1,trigger:null,handler:BI.emptyFn})},_init:function(){BI.IconChangeButton.superclass._init.apply(this,arguments);var e=this,t=this.options;this.button=BI.createWidget({type:"bi.icon_button",element:this,cls:t.iconCls,height:t.height,iconWidth:t.iconWidth,iconHeight:t.iconHeight,stopEvent:t.stopEvent,stopPropagation:t.stopPropagation,selected:t.selected,once:t.once,forceSelected:t.forceSelected,forceNotSelected:t.forceNotSelected,disableSelected:t.disableSelected,shadow:t.shadow,isShadowShowingOnSelected:t.isShadowShowingOnSelected,trigger:t.trigger,handler:t.handler}),this.button.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button.on(BI.IconButton.EVENT_CHANGE,function(){e.fireEvent(BI.IconChangeButton.EVENT_CHANGE,arguments)})},isSelected:function(){return this.button.isSelected()},setSelected:function(e){this.button.setSelected(e)},setIcon:function(e){var t=this.options;t.iconCls!==e&&(this.element.removeClass(t.iconCls).addClass(e),t.iconCls=e)}}),BI.IconChangeButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_change_button",BI.IconChangeButton)},function(e,t){BI.TriggerIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var e=BI.TriggerIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-trigger-icon-button",extraCls:"pull-down-font"})}}),BI.TriggerIconButton.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.trigger_icon_button",BI.TriggerIconButton)},function(e,t){BI.HalfIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var e=BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{extraCls:"bi-half-icon-button check-half-select-icon",height:16,width:16,iconWidth:16,iconHeight:16,selected:!1})}}),BI.HalfIconButton.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.half_icon_button",BI.HalfIconButton)},function(e,t){BI.HalfButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var e=BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{extraCls:"bi-half-button bi-high-light-border",height:14,width:14,selected:!1})},_init:function(){BI.HalfButton.superclass._init.apply(this,arguments),BI.createWidget({type:"bi.center_adapt",element:this.element,items:[{type:"bi.layout",cls:"bi-high-light-background",width:8,height:8}]})},doClick:function(){BI.HalfButton.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.HalfButton.EVENT_CHANGE)}}),BI.HalfButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.half_button",BI.HalfButton)},function(e,t){BI.MultiSelectItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiSelectItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multi-select-item",height:24,logic:{dynamic:!1},iconWrapperWidth:26})},_init:function(){BI.MultiSelectItem.superclass._init.apply(this,arguments);var t=this,e=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,rgap:e.rgap,text:e.text,keyword:e.keyword,value:e.value,py:e.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(e){e===BI.Events.CLICK&&t.setSelected(t.isSelected())}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(e.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.center_adapt",items:[this.checkbox],width:e.iconWrapperWidth},this.text)}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.MultiSelectItem.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected()),this.isValid()&&this.fireEvent(BI.MultiSelectItem.EVENT_CHANGE,this.getValue(),this)},setSelected:function(e){BI.MultiSelectItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(e)}}),BI.MultiSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_item",BI.MultiSelectItem)},function(e,t){BI.SingleSelectIconTextItem=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectIconTextItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-single-select-icon-text-item bi-list-item-active",iconCls:"",height:24})},_init:function(){BI.SingleSelectIconTextItem.superclass._init.apply(this,arguments);var e=this,t=this.options;this.text=BI.createWidget({type:"bi.icon_text_item",element:this,cls:t.iconCls,once:t.once,iconWrapperWidth:t.iconWrapperWidth,selected:t.selected,height:t.height,iconHeight:t.iconHeight,iconWidth:t.iconWidth,text:t.text,keyword:t.keyword,value:t.value,py:t.py}),this.text.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},isSelected:function(){return this.text.isSelected()},setSelected:function(e){this.text.setSelected(e)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.SingleSelectIconTextItem.superclass.doClick.apply(this,arguments)}}),BI.shortcut("bi.single_select_icon_text_item",BI.SingleSelectIconTextItem)},function(e,t){BI.SingleSelectItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.SingleSelectItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-single-select-item bi-list-item-active",hgap:10,height:24,textAlign:"left"})},_init:function(){BI.SingleSelectItem.superclass._init.apply(this,arguments);var e=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:e.textAlign,whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,text:e.text,keyword:e.keyword,value:e.value,title:e.title||e.text,warningTitle:e.warningTitle,py:e.py})},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.SingleSelectItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.SingleSelectItem.EVENT_CHANGE,this.isSelected(),this)},setSelected:function(e){BI.SingleSelectItem.superclass.setSelected.apply(this,arguments)}}),BI.SingleSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_item",BI.SingleSelectItem)},function(e,t){BI.SingleSelectRadioItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.SingleSelectRadioItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-single-select-radio-item",logic:{dynamic:!1},hgap:10,height:24})},_init:function(){BI.SingleSelectRadioItem.superclass._init.apply(this,arguments);var e=this.options;this.radio=BI.createWidget({type:"bi.radio",once:e.once}),this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,text:e.text,keyword:e.keyword,value:e.value,py:e.py}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(e.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.center_adapt",items:[this.radio],width:16},this.text)}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.SingleSelectRadioItem.superclass.doClick.apply(this,arguments),this.radio.setSelected(this.isSelected()),this.isValid()&&this.fireEvent(BI.SingleSelectRadioItem.EVENT_CHANGE,this.isSelected(),this)},setSelected:function(e){BI.SingleSelectRadioItem.superclass.setSelected.apply(this,arguments),this.radio.setSelected(e)}}),BI.SingleSelectRadioItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_radio_item",BI.SingleSelectRadioItem)},function(e,t){BI.ArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.ArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-arrow-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24,iconWrapperWidth:16})},_init:function(){var t=this,e=this.options;BI.ArrowNode.superclass._init.apply(this,arguments),this.checkbox=BI.createWidget({type:"bi.arrow_group_node_checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,text:e.text,value:e.value,py:e.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(e){e===BI.Events.CLICK&&t.setSelected(t.isSelected()),t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var i=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),n=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:e.iconWrapperWidth,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(i,BI.extend(e.logic,{items:n}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.ArrowNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isOpened())},setText:function(e){BI.ArrowNode.superclass.setText.apply(this,arguments),this.text.setText(e)},setOpened:function(e){BI.ArrowNode.superclass.setOpened.apply(this,arguments),this.checkbox.setSelected(e)}}),BI.shortcut("bi.arrow_group_node",BI.ArrowNode)},function(e,t){BI.FirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.FirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-first-plus-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24})},_init:function(){BI.FirstPlusGroupNode.superclass._init.apply(this,arguments);var t=this,e=this.options;this.checkbox=BI.createWidget({type:"bi.first_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,text:e.text,value:e.value,py:e.py,keyword:e.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(e){e===BI.Events.CLICK&&(this.isSelected()?t.triggerExpand():t.triggerCollapse())});var i=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),n=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(i,BI.extend(e.logic,{items:n}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.FirstPlusGroupNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setOpened:function(e){BI.FirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(e)}}),BI.shortcut("bi.first_plus_group_node",BI.FirstPlusGroupNode)},function(e,t){BI.IconArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.IconArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-icon-arrow-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24,iconHeight:12,iconWidth:12,iconCls:"",iconWrapperWidth:16})},_init:function(){BI.IconArrowNode.superclass._init.apply(this,arguments);var t=this,e=this.options;this.checkbox=BI.createWidget({type:"bi.arrow_group_node_checkbox",width:24,stopPropagation:!0});var i=BI.createWidget({type:"bi.icon_label",width:24,cls:e.iconCls,iconWidth:e.iconWidth,iconHeight:e.iconHeight});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,text:e.text,value:e.value,py:e.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(e){e===BI.Events.CLICK&&(this.isSelected()?t.triggerExpand():t.triggerCollapse())});var n=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),r=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:e.iconWrapperWidth,el:this.checkbox},{width:16,el:i},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(n,BI.extend(e.logic,{items:r,rgap:5}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.IconArrowNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setOpened:function(e){BI.IconArrowNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(e)}}),BI.shortcut("bi.icon_arrow_node",BI.IconArrowNode)},function(e,t){BI.LastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.LastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-last-plus-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24})},_init:function(){BI.LastPlusGroupNode.superclass._init.apply(this,arguments);var t=this,e=this.options;this.checkbox=BI.createWidget({type:"bi.last_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,text:e.text,value:e.value,py:e.py,keyword:e.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(e){e===BI.Events.CLICK&&(this.isSelected()?t.triggerExpand():t.triggerCollapse())});var i=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),n=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(i,BI.extend(e.logic,{items:n}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.LastPlusGroupNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setOpened:function(e){BI.LastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(e)}}),BI.shortcut("bi.last_plus_group_node",BI.LastPlusGroupNode)},function(e,t){BI.MidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.MidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-mid-plus-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24})},_init:function(){BI.MidPlusGroupNode.superclass._init.apply(this,arguments);var t=this,e=this.options;this.checkbox=BI.createWidget({type:"bi.mid_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,text:e.text,value:e.value,py:e.py,keyword:e.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(e){e===BI.Events.CLICK&&(this.isSelected()?t.triggerExpand():t.triggerCollapse())});var i=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),n=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(i,BI.extend(e.logic,{items:n}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.MidPlusGroupNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setOpened:function(e){BI.MidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(e)}}),BI.shortcut("bi.mid_plus_group_node",BI.MidPlusGroupNode)},function(e,t){BI.MultiLayerIconArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.MultiLayerIconArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{extraCls:"bi-multilayer-icon-arrow-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:24,iconHeight:16,iconWidth:16,iconCls:""})},_init:function(){BI.MultiLayerIconArrowNode.superclass._init.apply(this,arguments);var t=this,e=this.options;this.node=BI.createWidget({type:"bi.icon_arrow_node",iconCls:e.iconCls,cls:"bi-list-item-none",id:e.id,pId:e.pId,open:e.open,height:e.height,iconHeight:e.iconHeight,iconWidth:e.iconWidth,hgap:e.hgap,text:e.text,value:e.value,py:e.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(e){t.setSelected(t.isSelected()),t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var i=[];BI.count(0,e.layer,function(){i.push({type:"bi.layout",width:15,height:e.height})}),i.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(e.layer,15),items:[i]})},isOnce:function(){return!0},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(e){BI.MultiLayerIconArrowNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(e)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(e){BI.MultiLayerIconArrowNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(e)}}),BI.shortcut("bi.multilayer_icon_arrow_node",BI.MultiLayerIconArrowNode)},function(e,t){BI.PlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.PlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-plus-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24})},_init:function(){BI.PlusGroupNode.superclass._init.apply(this,arguments);var t=this,e=this.options;this.checkbox=BI.createWidget({type:"bi.tree_node_checkbox"}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,text:e.text,value:e.value,keyword:e.keyword,py:e.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(e){e===BI.Events.CLICK&&t.setSelected(t.isSelected()),t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var i=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),n=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(i,BI.extend(e.logic,{items:n}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.PlusGroupNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setOpened:function(e){BI.PlusGroupNode.superclass.setOpened.apply(this,arguments),this.checkbox&&this.checkbox.setSelected(e)}}),BI.shortcut("bi.plus_group_node",BI.PlusGroupNode)},function(e,t){BI.Switch=BI.inherit(BI.BasicButton,{props:{extraCls:"bi-switch",height:22,width:44,logic:{dynamic:!1}},render:function(){var e=this;return{type:"bi.absolute",ref:function(){e.layout=this},items:[{el:{type:"bi.text_button",cls:"circle-button bi-card"},width:18,height:18,top:2,left:this.options.selected?24:2}]}},setSelected:function(e){BI.Switch.superclass.setSelected.apply(this,arguments),this.layout.attr("items")[0].left=e?24:2,this.layout.resize()},doClick:function(){BI.Switch.superclass.doClick.apply(this,arguments),this.fireEvent(BI.Switch.EVENT_CHANGE)}}),BI.Switch.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.switch",BI.Switch)},function(e,t){BI.FirstTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.FirstTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-first-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",layer:0,height:24})},_init:function(){BI.FirstTreeLeafItem.superclass._init.apply(this,arguments);var e=this.options;this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,text:e.text,value:e.value,py:e.py,keyword:e.keyword});var t=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),i=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===e.layer?"":{width:12,el:{type:"bi.layout",cls:e.pNode&&e.pNode.isLastNode?"":"base-line-conn-background",width:12,height:e.height}},{width:24,el:{type:"bi.layout",cls:"first-line-conn-background",width:24,height:e.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(t,BI.extend(e.logic,{items:i}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId}}),BI.shortcut("bi.first_tree_leaf_item",BI.FirstTreeLeafItem)},function(e,t){BI.IconTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.IconTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-icon-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},height:24,iconWidth:16,iconHeight:16,iconCls:""})},_init:function(){BI.IconTreeLeafItem.superclass._init.apply(this,arguments);var e=this.options,t=BI.createWidget({type:"bi.center_adapt",width:24,cls:e.iconCls,items:[{type:"bi.icon",width:e.iconWidth,height:e.iconHeight}]});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,text:e.text,value:e.value,py:e.py});var i=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),n=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:16,el:t},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(i,BI.extend(e.logic,{items:n,hgap:5}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId}}),BI.shortcut("bi.icon_tree_leaf_item",BI.IconTreeLeafItem)},function(e,t){BI.LastTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.LastTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-last-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",layer:0,height:24})},_init:function(){BI.LastTreeLeafItem.superclass._init.apply(this,arguments);var e=this.options;this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,text:e.text,value:e.value,py:e.py,keyword:e.keyword});var t=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),i=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===e.layer?"":{width:12,el:{type:"bi.layout",cls:e.pNode&&e.pNode.isLastNode?"":"base-line-conn-background",width:12,height:e.height}},{width:24,el:{type:"bi.layout",cls:"last-line-conn-background",width:24,height:e.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(t,BI.extend(e.logic,{items:i}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId}}),BI.shortcut("bi.last_tree_leaf_item",BI.LastTreeLeafItem)},function(e,t){BI.MidTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MidTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-mid-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",layer:0,height:24})},_init:function(){BI.MidTreeLeafItem.superclass._init.apply(this,arguments);var e=this.options;this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,text:e.text,value:e.value,py:e.py,keyword:e.keyword});var t=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),i=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,0===e.layer?"":{width:12,el:{type:"bi.layout",cls:e.pNode&&e.pNode.isLastNode?"":"base-line-conn-background",width:12,height:e.height}},{width:24,el:{type:"bi.layout",cls:"mid-line-conn-background",width:24,height:e.height}},{el:this.text});BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(t,BI.extend(e.logic,{items:i}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId}}),BI.shortcut("bi.mid_tree_leaf_item",BI.MidTreeLeafItem)},function(e,t){BI.MultiLayerIconTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerIconTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-icon-tree-leaf-item bi-list-item-active",layer:0,height:24,iconCls:"",iconHeight:16,iconWidth:16})},_init:function(){BI.MultiLayerIconTreeLeafItem.superclass._init.apply(this,arguments);var t=this,e=this.options;this.item=BI.createWidget({type:"bi.icon_tree_leaf_item",cls:"bi-list-item-none",iconCls:e.iconCls,id:e.id,pId:e.pId,isFront:!0,height:e.height,hgap:e.hgap,text:e.text,value:e.value,py:e.py,iconWidth:e.iconWidth,iconHeight:e.iconHeight}),this.item.on(BI.Controller.EVENT_CHANGE,function(e){e!==BI.Events.CLICK&&t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var i=[];BI.count(0,e.layer,function(){i.push({type:"bi.layout",width:15,height:e.height})}),i.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(e.layer,15),items:[i]})},doRedMark:function(){this.item.doRedMark.apply(this.item,arguments)},unRedMark:function(){this.item.unRedMark.apply(this.item,arguments)},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerIconTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(e){BI.MultiLayerIconTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(e)},getValue:function(){return this.options.value}}),BI.shortcut("bi.multilayer_icon_tree_leaf_item",BI.MultiLayerIconTreeLeafItem)},function(e,t){BI.TreeTextLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.TreeTextLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-tree-text-leaf-item bi-list-item-active",id:"",pId:"",height:24,hgap:0,lgap:0,rgap:0})},_init:function(){BI.TreeTextLeafItem.superclass._init.apply(this,arguments);var e=this.options;this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,lgap:e.lgap,rgap:e.hgap,text:e.text,value:e.value,py:e.py}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.text}]})},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId}}),BI.shortcut("bi.tree_text_leaf_item",BI.TreeTextLeafItem)},function(e,t){BI.CalendarDateItem=BI.inherit(BI.BasicButton,{render:function(){var e=this,t=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"normal",text:t.text,value:t.value,ref:function(){e.text=this}},left:t.lgap,right:t.rgap,top:0,bottom:0}]}},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},setSelected:function(e){BI.CalendarDateItem.superclass.setSelected.apply(this,arguments),this.text.setSelected(e)},getValue:function(){return this.text.getValue()}}),BI.shortcut("bi.calendar_date_item",BI.CalendarDateItem)},function(e,t){BI.Calendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.Calendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:"bi-calendar",logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:2015,month:8,day:25})},_dateCreator:function(e,t,i){var n=this.options,o={},r=BI.getDate(),a=n.min.match(/\d+/g),s=n.max.match(/\d+/g);e<(0|a[0])&&(e=0|a[0]),e>(0|s[0])&&(e=0|s[0]),r.setFullYear(e,t,i),o.ymd=[r.getFullYear(),r.getMonth(),r.getDate()];var l=BI.Date._MD.slice(0);l[1]=BI.isLeapYear(o.ymd[0])?29:28,r.setFullYear(o.ymd[0],o.ymd[1],1),o.FDay=r.getDay();var u=(7-BI.StartOfWeek+o.FDay)%7;o.PDay=l[0===t?11:t-1]-u+1,o.NDay=1;var c=[];return BI.each(BI.range(42),function(e){var t,i={},n=o.ymd[0],r=o.ymd[1]+1;e<u?(i.lastMonth=!0,t=e+o.PDay,1===r&&(n-=1),r=1===r?12:r-1):u<=e&&e<u+l[o.ymd[1]]?(t=e-u+1)===o.ymd[2]&&(i.currentDay=!0):(i.nextMonth=!0,t=o.NDay++,12===r&&(n+=1),r=12===r?1:r+1),BI.checkDateVoid(n,r,t,a,s)[0]&&(i.disabled=!0),i.text=t,c.push(i)}),c},_init:function(){BI.Calendar.superclass._init.apply(this,arguments);var e=this,t=this.options,i=BI.map(this._getWeekLabel(),function(e,t){return{type:"bi.label",height:24,text:t}}),n=BI.createWidget({type:"bi.button_group",height:44,items:i,layouts:[{type:"bi.center",hgap:5,vgap:10}]});this.days=BI.createWidget({type:"bi.button_group",items:BI.createItems(this._getItems(),{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({},t.logic,{columns:7,rows:6,columnSize:[1/7,1/7,1/7,1/7,1/7,1/7,1/7],rowSize:24,vgap:10}))]}),this.days.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend({},t.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",n,this.days)}))))},_getWeekLabel:function(){return BI.map(BI.range(0,7),function(e,t){return BI.Date._SDN[(t+BI.StartOfWeek)%7]})},isFrontDate:function(){var e=this.options,t=(this._const,e.year),i=e.month,n=BI.getDate(),r=n.getDay();t|=0,n.setFullYear(t,i,1);var o=BI.getOffsetDate(n,-1*(r+1));return!!BI.checkDateVoid(o.getFullYear(),o.getMonth(),o.getDate(),e.min,e.max)[0]},isFinalDate:function(){var e=this.options,t=(this._const,e.year),i=e.month,n=BI.getDate(),r=n.getDay();t|=0,n.setFullYear(t,i,1);var o=BI.getOffsetDate(n,42-r);return!!BI.checkDateVoid(o.getFullYear(),o.getMonth(),o.getDate(),e.min,e.max)[0]},_getItems:function(){var n=this.options,e=this._dateCreator(n.year,n.month-1,n.day),t=[];return t.push(e.slice(0,7)),t.push(e.slice(7,14)),t.push(e.slice(14,21)),t.push(e.slice(21,28)),t.push(e.slice(28,35)),t.push(e.slice(35,42)),BI.map(t,function(e,t){return BI.map(t,function(e,t){var i=t.lastMonth?n.month-1:t.nextMonth?n.month+1:n.month;return BI.extend(t,{type:"bi.calendar_date_item",textAlign:"center",whiteSpace:"normal",once:!1,forceSelected:!0,height:24,value:n.year+"-"+i+"-"+t.text,disabled:t.lastMonth||t.nextMonth||t.disabled,lgap:5,rgap:5})})})},_populate:function(){this.days.populate(this._getItems())},setMinDate:function(e){var t=this.options;BI.isNotEmptyString(t.min)&&(t.min=e,this._populate())},setMaxDate:function(e){var t=this.options;BI.isNotEmptyString(t.max)&&(t.max=e,this._populate())},setValue:function(e){this.days.setValue([e.year+"-"+e.month+"-"+e.day])},getValue:function(){var e=this.days.getValue()[0].match(/\d+/g);return{year:0|e[0],month:0|e[1],day:0|e[2]}}}),BI.extend(BI.Calendar,{getPageByDateJSON:function(e){var t=BI.getDate().getFullYear(),i=BI.getDate().getMonth(),n=12*(e.year-t);return n+=e.month-1-i},getDateJSONByPage:function(e){var t=e;t+=BI.getDate().getMonth();var i=BI.parseInt(t/12);t<0&&t%12!=0&&i--;var n=0<=t?t%12:(12+t%12)%12;return{year:BI.getDate().getFullYear()+i,month:1+n}}}),BI.shortcut("bi.calendar",BI.Calendar)},function(e,t){BI.YearCalendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.YearCalendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:"bi-year-calendar",behaviors:{},logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:null})},_yearCreator:function(e){var t=this.options;e|=0;var i=BI.YearCalendar.getStartYear(e),n=[],r=BI.parseDateTime(t.min,"%Y-%X-%d"),o=BI.parseDateTime(t.max,"%Y-%X-%d");return BI.each(BI.range(BI.YearCalendar.INTERVAL),function(e){var t={};BI.checkDateVoid(i+e,1,1,BI.print(BI.getDate(r.getFullYear(),0,1),"%Y-%X-%d"),BI.print(BI.getDate(o.getFullYear(),0,1),"%Y-%X-%d"))[0]&&(t.disabled=!0),t.text=i+e,n.push(t)}),n},_init:function(){BI.YearCalendar.superclass._init.apply(this,arguments);var e=this,t=this.options;this.currentYear=BI.getDate().getFullYear(),this.years=BI.createWidget({type:"bi.button_group",behaviors:t.behaviors,items:BI.createItems(this._getItems(),{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({},t.logic,{columns:2,rows:6,columnSize:[.5,.5],rowSize:24})),{type:"bi.center_adapt",vgap:1}]}),this.years.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend({},t.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this.years)}))))},isFrontYear:function(){var e=this.options,t=e.year;return t|=0,!!BI.checkDateVoid(BI.YearCalendar.getStartYear(t)-1,1,1,e.min,e.max)[0]},isFinalYear:function(){var e=this.options,t=(this._const,e.year);return t|=0,!!BI.checkDateVoid(BI.YearCalendar.getEndYear(t)+1,1,1,e.min,e.max)[0]},_getItems:function(){var e=this.options,i=this._yearCreator(e.year||this.currentYear),t=i.length,n=BI.makeArray(t,""),r=[0,6,1,7,2,8,3,9,4,10,5,11];BI.each(i,function(e,t){n[e]=i[r[e]]});var o=[];return o.push(n.slice(0,2)),o.push(n.slice(2,4)),o.push(n.slice(4,6)),o.push(n.slice(6,8)),o.push(n.slice(8,10)),o.push(n.slice(10,12)),BI.map(o,function(e,t){return BI.map(t,function(e,t){return BI.extend(t,{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"normal",once:!1,forceSelected:!0,height:24,width:45,value:t.text,disabled:t.disabled})})})},_populate:function(){this.years.populate(this._getItems())},setMinDate:function(e){var t=this.options;BI.isNotEmptyString(t.min)&&(t.min=e,this._populate())},setMaxDate:function(e){var t=this.options;BI.isNotEmptyString(this.options.max)&&(t.max=e,this._populate())},setValue:function(e){this.years.setValue([e])},getValue:function(){return this.years.getValue()[0]}}),BI.extend(BI.YearCalendar,{INTERVAL:12,getStartYear:function(e){return e-((e-BI.getDate().getFullYear()+3)%BI.YearCalendar.INTERVAL+12)%BI.YearCalendar.INTERVAL},getEndYear:function(e){return BI.YearCalendar.getStartYear(e)+BI.YearCalendar.INTERVAL-1},getPageByYear:function(e){var t=BI.getDate().getFullYear();return((e=BI.YearCalendar.getStartYear(e))-t+3)/BI.YearCalendar.INTERVAL}}),BI.shortcut("bi.year_calendar",BI.YearCalendar)},function(e,t){BI.ArrowTreeGroupNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.ArrowTreeGroupNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-arrow-group-node-checkbox"})},setSelected:function(e){BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this,arguments),e?this.element.removeClass("expander-right-font").addClass("expander-down-font"):this.element.removeClass("expander-down-font").addClass("expander-right-font")}}),BI.shortcut("bi.arrow_group_node_checkbox",BI.ArrowTreeGroupNodeCheckbox)},function(e,t){BI.CheckingMarkNode=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.CheckingMarkNode.superclass._defaultConfig.apply(this,arguments),{extraCls:"check-mark-font"})},_init:function(){BI.CheckingMarkNode.superclass._init.apply(this,arguments),this.setSelected(this.options.selected)},setSelected:function(e){BI.CheckingMarkNode.superclass.setSelected.apply(this,arguments),!0===e?this.element.addClass("check-mark-font"):this.element.removeClass("check-mark-font")}}),BI.shortcut("bi.checking_mark_node",BI.CheckingMarkNode)},function(e,t){BI.FirstTreeNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.FirstTreeNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"tree-collapse-icon-type2",iconWidth:24,iconHeight:24})},setSelected:function(e){BI.FirstTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),!0===e?this.element.addClass("tree-expand-icon-type2"):this.element.removeClass("tree-expand-icon-type2")}}),BI.shortcut("bi.first_tree_node_checkbox",BI.FirstTreeNodeCheckbox)},function(e,t){BI.LastTreeNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.LastTreeNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"tree-collapse-icon-type4",iconWidth:24,iconHeight:24})},setSelected:function(e){BI.LastTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),!0===e?this.element.addClass("tree-expand-icon-type4"):this.element.removeClass("tree-expand-icon-type4")}}),BI.shortcut("bi.last_tree_node_checkbox",BI.LastTreeNodeCheckbox)},function(e,t){BI.MidTreeNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.MidTreeNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"tree-collapse-icon-type3",iconWidth:24,iconHeight:24})},setSelected:function(e){BI.MidTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),!0===e?this.element.addClass("tree-expand-icon-type3"):this.element.removeClass("tree-expand-icon-type3")}}),BI.shortcut("bi.mid_tree_node_checkbox",BI.MidTreeNodeCheckbox)},function(e,t){BI.TreeNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.TreeNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"tree-collapse-icon-type1",iconWidth:24,iconHeight:24})},setSelected:function(e){BI.TreeNodeCheckbox.superclass.setSelected.apply(this,arguments),e?this.element.addClass("tree-expand-icon-type1"):this.element.removeClass("tree-expand-icon-type1")}}),BI.shortcut("bi.tree_node_checkbox",BI.TreeNodeCheckbox)},function(e,t){BI.BubbleCombo=BI.inherit(BI.Widget,{_const:{TRIANGLE_LENGTH:6},_defaultConfig:function(){return BI.extend(BI.BubbleCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-bubble-combo",trigger:"click",toggle:!0,direction:"bottom,left",isDefaultInit:!1,destroyWhenHide:!1,isNeedAdjustHeight:!0,isNeedAdjustWidth:!0,stopPropagation:!1,adjustLength:0,hideChecker:BI.emptyFn,offsetStyle:"left",el:{},popup:{}})},_init:function(){BI.BubbleCombo.superclass._init.apply(this,arguments);var e=this,t=this.options;this.combo=BI.createWidget({type:"bi.combo",element:this,trigger:t.trigger,toggle:t.toggle,container:t.container,direction:t.direction,isDefaultInit:t.isDefaultInit,destroyWhenHide:t.destroyWhenHide,isNeedAdjustHeight:t.isNeedAdjustHeight,isNeedAdjustWidth:t.isNeedAdjustWidth,adjustLength:this._getAdjustLength(),stopPropagation:t.stopPropagation,adjustXOffset:0,adjustYOffset:0,hideChecker:t.hideChecker,offsetStyle:t.offsetStyle,el:t.el,popup:BI.extend({type:"bi.bubble_popup_view"},t.popup)}),this.combo.on(BI.Combo.EVENT_TRIGGER_CHANGE,function(){e.fireEvent(BI.BubbleCombo.EVENT_TRIGGER_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){e.fireEvent(BI.BubbleCombo.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_EXPAND,function(){e.fireEvent(BI.BubbleCombo.EVENT_EXPAND,arguments)}),this.combo.on(BI.Combo.EVENT_COLLAPSE,function(){e.fireEvent(BI.BubbleCombo.EVENT_COLLAPSE,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_INIT,function(){e.fireEvent(BI.BubbleCombo.EVENT_AFTER_INIT,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){e.fireEvent(BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){e._showTriangle(),e.fireEvent(BI.BubbleCombo.EVENT_AFTER_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){e._hideTriangle(),e.fireEvent(BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){e.fireEvent(BI.BubbleCombo.EVENT_AFTER_HIDEVIEW,arguments)})},_getAdjustLength:function(){return this._const.TRIANGLE_LENGTH+this.options.adjustLength},_createTriangle:function(e){var t={},i={},n=this.options.adjustLength,r=this.element.offset(),o=r.left,a=r.left+this.element.outerWidth(),s=r.top,l=r.top+this.element.outerHeight();switch(e){case"left":t={top:s,height:this.element.outerHeight(),left:o-n-this._const.TRIANGLE_LENGTH},i={width:this._const.TRIANGLE_LENGTH};break;case"right":t={top:s,height:this.element.outerHeight(),left:a+n},i={width:this._const.TRIANGLE_LENGTH};break;case"top":t={left:o,width:this.element.outerWidth(),top:s-n-this._const.TRIANGLE_LENGTH},i={height:this._const.TRIANGLE_LENGTH};break;case"bottom":t={left:o,width:this.element.outerWidth(),top:l+n},i={height:this._const.TRIANGLE_LENGTH}}this.triangle&&this.triangle.destroy(),this.triangle=BI.createWidget(i,{type:"bi.center_adapt",cls:"button-combo-triangle-wrapper",items:[{type:"bi.layout",cls:"bubble-combo-triangle-"+e}]}),t.el=this.triangle,BI.createWidget({type:"bi.absolute",element:this,items:[t]})},_createLeftTriangle:function(){this._createTriangle("left")},_createRightTriangle:function(){this._createTriangle("right")},_createTopTriangle:function(){this._createTriangle("top")},_createBottomTriangle:function(){this._createTriangle("bottom")},_showTriangle:function(){switch(this.combo.getPopupPosition().dir){case"left,top":case"left,bottom":this._createLeftTriangle();break;case"right,top":case"right,bottom":this._createRightTriangle();break;case"top,left":case"top,right":this._createTopTriangle();break;case"bottom,left":case"bottom,right":this._createBottomTriangle()}},_hideTriangle:function(){this.triangle&&this.triangle.destroy(),this.triangle=null},hideView:function(){this._hideTriangle(),this.combo&&this.combo.hideView()},showView:function(){this.combo&&this.combo.showView()},isViewVisible:function(){return this.combo.isViewVisible()}}),BI.BubbleCombo.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.BubbleCombo.EVENT_CHANGE="EVENT_CHANGE",BI.BubbleCombo.EVENT_EXPAND="EVENT_EXPAND",BI.BubbleCombo.EVENT_COLLAPSE="EVENT_COLLAPSE",BI.BubbleCombo.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.BubbleCombo.EVENT_AFTER_POPUPVIEW="EVENT_AFTER_POPUPVIEW",BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW="EVENT_BEFORE_HIDEVIEW",BI.BubbleCombo.EVENT_AFTER_HIDEVIEW="EVENT_AFTER_HIDEVIEW",BI.shortcut("bi.bubble_combo",BI.BubbleCombo)},function(e,t){BI.BubblePopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var e=BI.BubblePopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:e.baseCls+" bi-bubble-popup-view",minWidth:220,maxWidth:300,minHeight:90})},_init:function(){BI.BubblePopupView.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.bubble_popup_view",BI.BubblePopupView),BI.BubblePopupBarView=BI.inherit(BI.BubblePopupView,{_defaultConfig:function(){return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-bubble-bar-popup-view",buttons:[{value:!1,text:BI.i18nText("BI-Basic_Cancel"),ghost:!0},{text:BI.i18nText(BI.i18nText("BI-Basic_Sure")),value:!0}]})},_init:function(){BI.BubblePopupBarView.superclass._init.apply(this,arguments)},_createToolBar:function(){var e=this.options,i=this,n=[];return BI.each(e.buttons,function(e,t){BI.isWidget(t)?n.push(t):n.push(BI.extend({type:"bi.button",height:24,handler:function(e){i.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON,e)}},t))}),BI.createWidget({type:"bi.center",height:44,rgap:15,items:[{type:"bi.right_vertical_adapt",lgap:10,items:n}]})},_createView:function(){var e=this.options,t=BI.createWidget({type:"bi.button_group",items:[e.el],layouts:[{type:"bi.vertical",cls:"bar-popup-container",hgap:15,tgap:10}]});return t.element.css("min-height",e.minHeight-44),t}}),BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.bubble_bar_popup_view",BI.BubblePopupBarView),BI.TextBubblePopupBarView=BI.inherit(BI.Widget,{props:function(){return{baseCls:"bi-text-bubble-bar-popup-view",text:"",buttons:[{level:"ignore",value:!1,stopPropagation:!0,text:BI.i18nText("BI-Basic_Cancel")},{value:!0,stopPropagation:!0,text:BI.i18nText("BI-Basic_Sure")}]}},render:function(){var i=this,e=this.options,t=BI.map(e.buttons,function(e,t){return BI.isWidget(t)?t:BI.extend({type:"bi.button",height:24,handler:function(e){i.fireEvent(BI.TextBubblePopupBarView.EVENT_CHANGE,e)}},t)});return{type:"bi.bubble_bar_popup_view",minWidth:e.minWidth,maxWidth:e.maxWidth,minHeight:e.minHeight,ref:function(){i.popup=this},el:{type:"bi.label",text:e.text,whiteSpace:"normal",textAlign:"left",ref:function(){i.text=this}},buttons:t}},populate:function(e){this.text.setText(e||this.options.text)}}),BI.TextBubblePopupBarView.EVENT_CHANGE="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.text_bubble_bar_popup_view",BI.TextBubblePopupBarView)},function(e,t){BI.EditorIconCheckCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.EditorIconCheckCombo.superclass._defaultConfig.apply(this,arguments),{baseClass:"bi-check-editor-combo",width:100,height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:""})},_init:function(){BI.EditorIconCheckCombo.superclass._init.apply(this,arguments);var e=this,t=this.options;this.trigger=BI.createWidget({type:"bi.editor_trigger",items:t.items,height:t.height,validationChecker:t.validationChecker,quitChecker:t.quitChecker,allowBlank:t.allowBlank,watermark:t.watermark,errorText:t.errorText,value:t.value}),this.trigger.on(BI.EditorTrigger.EVENT_CHANGE,function(){e.popup.setValue(this.getValue()),e.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE,arguments)}),this.trigger.on(BI.EditorTrigger.EVENT_FOCUS,function(){e.fireEvent(BI.EditorIconCheckCombo.EVENT_FOCUS,arguments)}),this.trigger.on(BI.EditorTrigger.EVENT_EMPTY,function(){e.fireEvent(BI.EditorIconCheckCombo.EVENT_EMPTY,arguments)}),this.trigger.on(BI.EditorTrigger.EVENT_VALID,function(){e.fireEvent(BI.EditorIconCheckCombo.EVENT_VALID,arguments)}),this.trigger.on(BI.EditorTrigger.EVENT_ERROR,function(){e.fireEvent(BI.EditorIconCheckCombo.EVENT_ERROR,arguments)}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:t.chooseType,items:t.items,value:t.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){e.setValue(e.popup.getValue()),e.editorIconCheckCombo.hideView(),e.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editorIconCheckCombo=BI.createWidget({type:"bi.combo",container:t.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(e){this.editorIconCheckCombo.setValue(e)},getValue:function(){return this.trigger.getValue()},populate:function(e){this.options.items=e,this.editorIconCheckCombo.populate(e)}}),BI.EditorIconCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.EditorIconCheckCombo.EVENT_FOCUS="EVENT_FOCUS",BI.EditorIconCheckCombo.EVENT_EMPTY="EVENT_EMPTY",BI.EditorIconCheckCombo.EVENT_VALID="EVENT_VALID",BI.EditorIconCheckCombo.EVENT_ERROR="EVENT_ERROR",BI.shortcut("bi.editor_icon_check_combo",BI.EditorIconCheckCombo)},function(e,t){BI.IconCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.IconCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-icon-combo",width:24,height:24,el:{},popup:{},minWidth:100,maxWidth:"auto",maxHeight:300,direction:"bottom",adjustLength:3,adjustXOffset:0,adjustYOffset:0,offsetStyle:"left",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.IconCombo.superclass._init.apply(this,arguments);var e=this,t=this.options;this.trigger=BI.createWidget(t.el,{type:"bi.icon_combo_trigger",iconCls:t.iconCls,title:t.title,items:t.items,width:t.width,height:t.height,iconWidth:t.iconWidth,iconHeight:t.iconHeight,value:t.value}),this.popup=BI.createWidget(t.popup,{type:"bi.icon_combo_popup",chooseType:t.chooseType,items:t.items,value:t.value}),this.popup.on(BI.IconComboPopup.EVENT_CHANGE,function(){e.setValue(e.popup.getValue()),e.iconCombo.hideView(),e.fireEvent(BI.IconCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.iconCombo=BI.createWidget({type:"bi.combo",element:this,direction:t.direction,trigger:t.trigger,container:t.container,adjustLength:t.adjustLength,adjustXOffset:t.adjustXOffset,adjustYOffset:t.adjustYOffset,offsetStyle:t.offsetStyle,el:this.trigger,popup:{el:this.popup,maxWidth:t.maxWidth,maxHeight:t.maxHeight,minWidth:t.minWidth}})},showView:function(){this.iconCombo.showView()},hideView:function(){this.iconCombo.hideView()},setValue:function(e){this.trigger.setValue(e),this.popup.setValue(e)},getValue:function(){var e=this.popup.getValue();return BI.isNull(e)?[]:BI.isArray(e)?e:[e]},populate:function(e){this.options.items=e,this.iconCombo.populate(e)}}),BI.IconCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo",BI.IconCombo)},function(e,t){BI.IconComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.IconComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi.icon-combo-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.IconComboPopup.superclass._init.apply(this,arguments);var e=this.options,n=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(e.items,{type:"bi.single_select_icon_text_item",height:24}),chooseType:e.chooseType,layouts:[{type:"bi.vertical"}],value:e.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&n.fireEvent(BI.IconComboPopup.EVENT_CHANGE,t,i)}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(e){BI.IconComboPopup.superclass.populate.apply(this,arguments),e=BI.createItems(e,{type:"bi.single_select_icon_text_item",height:24}),this.popup.populate(e)},getValue:function(){return this.popup.getValue()},setValue:function(e){this.popup.setValue(e)}}),BI.IconComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_popup",BI.IconComboPopup)},function(e,t){BI.IconComboTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.IconComboTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-icon-combo-trigger",el:{},items:[],iconCls:"",width:24,height:24,isShowDown:!0,value:""})},_init:function(){BI.IconComboTrigger.superclass._init.apply(this,arguments);var e=this.options,t="";BI.isKey(e.value)&&(t=this._digest(e.value,e.items)),this.button=BI.createWidget(e.el,{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon",iconCls:t,disableSelected:!0,width:e.isShowDown?e.width-12:e.width,height:e.height,iconWidth:e.iconWidth,iconHeight:e.iconHeight,selected:BI.isNotEmptyString(t)}),this.down=BI.createWidget({type:"bi.icon_button",disableSelected:!0,cls:"icon-combo-down-icon trigger-triangle-font font-size-12",width:12,height:8,selected:BI.isNotEmptyString(t)}),this.down.setVisible(e.isShowDown),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.button,left:0,right:0,top:0,bottom:0},{el:this.down,right:3,bottom:0}]})},_digest:function(i,e){var n="";return i=BI.isArray(i)?i[0]:i,BI.any(e,function(e,t){if(i===t.value)return n=t.iconCls,!0}),n},populate:function(e){var t=this.options;this.options.items=e||[],this.button.setIcon(t.iconCls),this.button.setSelected(!1),this.down.setSelected(!1)},setValue:function(e){BI.IconComboTrigger.superclass.setValue.apply(this,arguments);var t=this.options,i=this._digest(e,this.options.items);e=BI.isArray(e)?e[0]:e,BI.isNotEmptyString(i)?(this.button.setIcon(i),this.button.setSelected(!0),this.down.setSelected(!0)):(this.button.setIcon(t.iconCls),this.button.setSelected(!1),this.down.setSelected(!1))}}),BI.IconComboTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo_trigger",BI.IconComboTrigger)},function(e,t){BI.IconTextValueCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.IconTextValueCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-icon-text-value-combo",height:24,iconHeight:null,iconWidth:null,value:"",attributes:{tabIndex:0}})},_init:function(){BI.IconTextValueCombo.superclass._init.apply(this,arguments);var e=this,t=this.options;this.trigger=BI.createWidget({type:"bi.select_icon_text_trigger",cls:"icon-text-value-trigger",items:t.items,height:t.height,text:t.text,iconCls:t.iconCls,value:t.value,iconHeight:t.iconHeight,iconWidth:t.iconWidth,iconWrapperWidth:t.iconWrapperWidth,title:t.title,warningTitle:t.warningTitle}),this.popup=BI.createWidget({type:"bi.icon_text_value_combo_popup",items:t.items,value:t.value,iconHeight:t.iconHeight,iconWidth:t.iconWidth,iconWrapperWidth:t.iconWrapperWidth}),this.popup.on(BI.IconTextValueComboPopup.EVENT_CHANGE,function(){e.setValue(e.popup.getValue()),e.textIconCombo.hideView(),e.fireEvent(BI.IconTextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",element:this,container:t.container,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240,minHeight:25}}),BI.isKey(t.value)&&this.setValue(t.value)},_checkError:function(i){if(BI.isNotNull(i)){i=BI.isArray(i)?i:[i];var e=BI.find(this.options.items,function(e,t){return BI.contains(i,t.value)});BI.isNull(e)?(this.trigger.options.tipType="warning",this.element.removeClass("combo-error").addClass("combo-error")):(this.trigger.options.tipType="success",this.element.removeClass("combo-error"))}},setValue:function(e){this.trigger.setValue(e),this.popup.setValue(e),this._checkError(e)},getValue:function(){var e=this.popup.getValue();return BI.isNull(e)?[]:BI.isArray(e)?e:[e]},populate:function(e){this.options.items=e,this.textIconCombo.populate(e)}}),BI.IconTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_value_combo",BI.IconTextValueCombo)},function(e,t){BI.IconTextValueComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.IconTextValueComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-icon-text-icon-popup",behaviors:{redmark:function(){return!0}}})},_init:function(){BI.IconTextValueComboPopup.superclass._init.apply(this,arguments);var e=this.options,n=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(e.items,{type:"bi.single_select_icon_text_item",height:24,iconHeight:e.iconHeight,iconWidth:e.iconWidth,iconWrapperWidth:e.iconWrapperWidth}),chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,layouts:[{type:"bi.vertical"}],behaviors:e.behaviors,value:e.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&n.fireEvent(BI.IconTextValueComboPopup.EVENT_CHANGE,t,i)}),this.check(),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(e,t){BI.IconTextValueComboPopup.superclass.populate.apply(this,arguments);var i=this.options;e=BI.createItems(e,{type:"bi.single_select_icon_text_item",height:24,iconWrapperWidth:i.iconWrapperWidth,iconHeight:i.iconHeight,iconWidth:i.iconWidth}),this.popup.populate(e,t)},getValue:function(){return this.popup.getValue()},setValue:function(e){this.popup.setValue(e)}}),BI.IconTextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_value_combo_popup",BI.IconTextValueComboPopup)},function(e,t){BI.SearchTextValueCombo=BI.inherit(BI.Widget,{props:{baseCls:"bi-search-text-value-combo",height:24,text:"",items:[],tipType:"",warningTitle:"",attributes:{tabIndex:0}},render:function(){var t=this,e=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.combo",container:e.container,adjustLength:2,toggle:!1,ref:function(){t.combo=this},el:{type:"bi.search_text_value_trigger",cls:"search-text-value-trigger",ref:function(){t.trigger=this},items:e.items,height:e.height-2,text:e.text,value:e.value,tipType:e.tipType,warningTitle:e.warningTitle,title:e.title,listeners:[{eventName:BI.SearchTextValueTrigger.EVENT_CHANGE,action:function(){t.setValue(this.getValue()),t.combo.hideView(),t.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE)}}]},popup:{el:{type:"bi.text_value_combo_popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,value:e.value,items:e.items,ref:function(){t.popup=this,t.trigger.getSearcher().setAdapter(t.popup)},listeners:[{eventName:BI.TextValueComboPopup.EVENT_CHANGE,action:function(){t.setValue(this.getValue()),t.combo.hideView(),t.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE)}}]},value:e.value,maxHeight:252,minHeight:25},listeners:[{eventName:BI.Combo.EVENT_AFTER_HIDEVIEW,action:function(){t.trigger.stopEditing()}},{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){t.fireEvent(BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW)}}],hideChecker:function(e){return 0===t.triggerBtn.element.find(e.target).length}},left:0,right:0,bottom:0,top:0},{el:{type:"bi.trigger_icon_button",cls:"trigger-icon-button",ref:function(){t.triggerBtn=this},width:e.height,height:e.height,handler:function(){t.combo.isViewVisible()?t.combo.hideView():t.combo.showView()}},right:0,bottom:0,top:0}]}},mounted:function(){var e=this.options;BI.isKey(e.value)&&this._checkError(e.value)},_checkError:function(i){if(BI.isNotNull(i)){i=BI.isArray(i)?i:[i];var e=BI.find(this.options.items,function(e,t){return BI.contains(i,t.value)});BI.isNull(e)?(this.element.removeClass("combo-error").addClass("combo-error"),this.trigger.attr("tipType","warning")):(this.element.removeClass("combo-error"),this.trigger.attr("tipType","success"))}},populate:function(e){this.options.items=e,this.combo.populate(e)},setValue:function(e){this.combo.setValue(e),this._checkError(e)},getValue:function(){var e=this.combo.getValue();return BI.isNull(e)?[]:BI.isArray(e)?e:[e]}}),BI.SearchTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.search_text_value_combo",BI.SearchTextValueCombo)},function(e,t){BI.SearchTextValueComboPopup=BI.inherit(BI.Pane,{props:{baseCls:"bi-search-text-value-popup"},render:function(){var n=this,e=this.options;return{type:"bi.vertical",vgap:5,items:[{type:"bi.button_group",ref:function(){n.popup=this},items:BI.createItems(e.items,{type:"bi.single_select_item",textAlign:e.textAlign,height:24}),chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,layouts:[{type:"bi.vertical"}],behaviors:{redmark:function(){return!0}},value:e.value,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&n.fireEvent(BI.SearchTextValueComboPopup.EVENT_CHANGE,t,i)}}]}]}},mounted:function(){this.check()},populate:function(e,t,i){var n=BI.concat(e,t);BI.SearchTextValueComboPopup.superclass.populate.apply(this,n),n=BI.createItems(n,{type:"bi.single_select_item",height:24}),this.popup.populate(n,i)},getValue:function(){return this.popup.getValue()},setValue:function(e){this.popup.setValue(e)}}),BI.SearchTextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.search_text_value_combo_popup",BI.SearchTextValueComboPopup)},function(e,t){BI.SearchTextValueTrigger=BI.inherit(BI.Trigger,{props:{extraCls:"bi-search-text-value-trigger bi-border",height:24},render:function(){var e=this,o=this.options;return{type:"bi.htape",items:[{el:{type:"bi.searcher",ref:function(){e.searcher=this},isAutoSearch:!1,el:{type:"bi.state_editor",ref:function(){e.editor=this},defaultText:o.text,text:this._digest(o.value,o.items),value:o.value,height:o.height,tipText:""},popup:{type:"bi.search_text_value_combo_popup",cls:"bi-card",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE},onSearch:function(e,t){var i=e.keyword,n=BI.Func.getSearchResult(o.items,i),r=n.match;t(n.find,r)},listeners:[{eventName:BI.Searcher.EVENT_CHANGE,action:function(){e.fireEvent(BI.SearchTextValueTrigger.EVENT_CHANGE)}}]}},{el:{type:"bi.layout",width:24},width:24}]}},_setState:function(e){this.editor.setState(e)},_digest:function(i,e){var t=this.options;i=BI.isArray(i)?i:[i];var n=[],r=BI.Tree.transformToArrayFormat(e);return BI.each(r,function(e,t){BI.deepContains(i,t.value)&&!BI.contains(n,t.text||t.value)&&n.push(t.text||t.value)}),0<n.length?n.join(","):BI.isFunction(t.text)?t.text():t.text},stopEditing:function(){this.searcher.stopSearch()},getSearcher:function(){return this.searcher},populate:function(e){this.options.items=e},setValue:function(e){this._setState(this._digest(e,this.options.items))},getValue:function(){return this.searcher.getValue()}}),BI.SearchTextValueTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SearchTextValueTrigger.EVENT_STOP="EVENT_STOP",BI.SearchTextValueTrigger.EVENT_START="EVENT_START",BI.SearchTextValueTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.search_text_value_trigger",BI.SearchTextValueTrigger)},function(e,t){BI.TextValueCheckCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TextValueCheckCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-value-check-combo",width:100,height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,value:"",attributes:{tabIndex:0}})},_init:function(){BI.TextValueCheckCombo.superclass._init.apply(this,arguments);var e=this,t=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",cls:"text-value-trigger",items:t.items,height:t.height,text:t.text,value:t.value}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:t.chooseType,items:t.items,value:t.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){e.setValue(e.popup.getValue()),e.textIconCheckCombo.hideView(),e.fireEvent(BI.TextValueCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCheckCombo=BI.createWidget({type:"bi.combo",container:t.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}}),BI.isKey(t.value)&&this.setValue(t.value)},setTitle:function(e){this.trigger.setTitle(e)},setValue:function(e){this.trigger.setValue(e),this.popup.setValue(e)},setWarningTitle:function(e){this.trigger.setWarningTitle(e)},getValue:function(){var e=this.popup.getValue();return BI.isNull(e)?[]:BI.isArray(e)?e:[e]},populate:function(e){this.options.items=e,this.textIconCheckCombo.populate(e)}}),BI.TextValueCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo",BI.TextValueCheckCombo)},function(e,t){BI.TextValueCheckComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.TextValueCheckComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-icon-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.TextValueCheckComboPopup.superclass._init.apply(this,arguments);var e=this.options,n=this;this.popup=BI.createWidget({type:"bi.button_group",items:this._formatItems(e.items),chooseType:e.chooseType,layouts:[{type:"bi.vertical"}],value:e.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&n.fireEvent(BI.TextValueCheckComboPopup.EVENT_CHANGE,t,i)}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},_formatItems:function(e){return BI.map(e,function(e,t){return BI.extend({type:"bi.single_select_item",cls:"bi-list-item",height:24},t)})},populate:function(e){BI.TextValueCheckComboPopup.superclass.populate.apply(this,arguments),this.popup.populate(this._formatItems(e))},getValue:function(){return this.popup.getValue()},setValue:function(e){this.popup.setValue(e)}}),BI.TextValueCheckComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_check_combo_popup",BI.TextValueCheckComboPopup)},function(e,t){BI.TextValueCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TextValueCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-value-combo",height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,text:"",value:"",attributes:{tabIndex:0}})},_init:function(){BI.TextValueCombo.superclass._init.apply(this,arguments);var e=this,t=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",cls:"text-value-trigger",items:t.items,height:t.height,text:t.text,value:t.value,warningTitle:t.warningTitle}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:t.chooseType,value:t.value,items:t.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){e.setValue(e.popup.getValue()),e.textIconCombo.hideView(),e.fireEvent(BI.TextValueCombo.EVENT_CHANGE,arguments)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.textIconCombo=BI.createWidget({type:"bi.combo",container:t.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240,minHeight:25}}),BI.isKey(t.value)&&this._checkError(t.value)},_checkError:function(i){if(BI.isNotNull(i)){i=BI.isArray(i)?i:[i];var e=BI.find(this.options.items,function(e,t){return BI.contains(i,t.value)});BI.isNull(e)?(this.trigger.setTipType("warning"),this.element.removeClass("combo-error").addClass("combo-error")):(this.trigger.setTipType("success"),this.element.removeClass("combo-error"))}},setValue:function(e){this.trigger.setValue(e),this.popup.setValue(e),this._checkError(e)},getValue:function(){var e=this.popup.getValue();return BI.isNull(e)?[]:BI.isArray(e)?e:[e]},populate:function(e){this.options.items=e,this.textIconCombo.populate(e)}}),BI.TextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo",BI.TextValueCombo)},function(e,t){BI.SmallTextValueCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:20,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,el:{},text:""})},_init:function(){BI.SmallTextValueCombo.superclass._init.apply(this,arguments);var e=this,t=this.options;this.trigger=BI.createWidget(t.el,{type:"bi.small_select_text_trigger",items:t.items,height:t.height,text:t.text}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:t.chooseType,items:t.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){e.setValue(e.popup.getValue()),e.SmallTextValueCombo.hideView(),e.fireEvent(BI.SmallTextValueCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextValueCombo=BI.createWidget({type:"bi.combo",element:this,container:t.container,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240,minHeight:25}})},setValue:function(e){this.trigger.setValue(e),this.popup.setValue(e)},getValue:function(){return this.popup.getValue()},populate:function(e){this.options.items=e,this.SmallTextValueCombo.populate(e)}}),BI.SmallTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_combo",BI.SmallTextValueCombo)},function(e,t){BI.TextValueComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.TextValueComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-icon-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.TextValueComboPopup.superclass._init.apply(this,arguments);var e=this.options,n=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(e.items,{type:"bi.single_select_item",textAlign:e.textAlign,height:24}),chooseType:e.chooseType,layouts:[{type:"bi.vertical"}],value:e.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&n.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE,t,i)}),this.check(),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(e){BI.TextValueComboPopup.superclass.populate.apply(this,arguments),e=BI.createItems(e,{type:"bi.single_select_item",height:24}),this.popup.populate(e)},getValue:function(){return this.popup.getValue()},setValue:function(e){this.popup.setValue(e)}}),BI.TextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo_popup",BI.TextValueComboPopup)},function(e,t){BI.ClearEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.ClearEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:"bi-clear-editor",height:24,errorText:"",watermark:"",validationChecker:BI.emptyFn,quitChecker:BI.emptyFn})},_init:function(){BI.ClearEditor.superclass._init.apply(this,arguments);var t=this,e=this.options;this.editor=BI.createWidget({type:"bi.editor",height:e.height,watermark:e.watermark,allowBlank:!0,errorText:e.errorText,validationChecker:e.validationChecker,quitChecker:e.quitChecker,value:e.value}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"search-close-h-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){t.setValue(""),t.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),t.fireEvent(BI.ClearEditor.EVENT_CLEAR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:this.clear,width:24}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){t.fireEvent(BI.ClearEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){t.fireEvent(BI.ClearEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){t.fireEvent(BI.ClearEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){t._checkClear(),t.fireEvent(BI.ClearEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(e){t.fireEvent(BI.ClearEditor.EVENT_KEY_DOWN,e)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){t.fireEvent(BI.ClearEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){t.fireEvent(BI.ClearEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){t.fireEvent(BI.ClearEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){t.fireEvent(BI.ClearEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){t.fireEvent(BI.ClearEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){t.fireEvent(BI.ClearEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){t._checkClear(),t.fireEvent(BI.ClearEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){t.fireEvent(BI.ClearEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){t.fireEvent(BI.ClearEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){t.fireEvent(BI.ClearEditor.EVENT_CHANGE_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){t.fireEvent(BI.ClearEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){t.fireEvent(BI.ClearEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){t.fireEvent(BI.ClearEditor.EVENT_STOP)}),BI.isKey(e.value)?this.clear.visible():this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},setWaterMark:function(e){this.options.watermark=e,this.editor.setWaterMark(e)},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid())return this.editor.getValue()},setValue:function(e){this.editor.setValue(e),BI.isKey(e)&&this.clear.visible()},isValid:function(){return this.editor.isValid()}}),BI.ClearEditor.EVENT_CHANGE="EVENT_CHANGE",BI.ClearEditor.EVENT_FOCUS="EVENT_FOCUS",BI.ClearEditor.EVENT_BLUR="EVENT_BLUR",BI.ClearEditor.EVENT_CLICK="EVENT_CLICK",BI.ClearEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.ClearEditor.EVENT_SPACE="EVENT_SPACE",BI.ClearEditor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.ClearEditor.EVENT_CLEAR="EVENT_CLEAR",BI.ClearEditor.EVENT_START="EVENT_START",BI.ClearEditor.EVENT_PAUSE="EVENT_PAUSE",BI.ClearEditor.EVENT_STOP="EVENT_STOP",BI.ClearEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.ClearEditor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.ClearEditor.EVENT_VALID="EVENT_VALID",BI.ClearEditor.EVENT_ERROR="EVENT_ERROR",BI.ClearEditor.EVENT_ENTER="EVENT_ENTER",BI.ClearEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.ClearEditor.EVENT_REMOVE="EVENT_REMOVE",BI.ClearEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.clear_editor",BI.ClearEditor)},function(e,t){BI.ShelterEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.ShelterEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-shelter-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",height:24,textAlign:"left"})},_init:function(){BI.ShelterEditor.superclass._init.apply(this,arguments);var t=this,e=this.options;this.editor=BI.createWidget({type:"bi.editor",height:e.height,hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap,value:e.value,validationChecker:e.validationChecker,quitChecker:e.quitChecker,allowBlank:e.allowBlank,watermark:e.watermark,errorText:e.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"shelter-editor-text",title:e.title,warningTitle:e.warningTitle,tipType:e.tipType,textAlign:e.textAlign,height:e.height,hgap:e.hgap}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.text.on(BI.Controller.EVENT_CHANGE,function(){(arguments[2]=t).fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){t.fireEvent(BI.ShelterEditor.EVENT_CLICK_LABEL)}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){t.fireEvent(BI.ShelterEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){t.fireEvent(BI.ShelterEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){t.fireEvent(BI.ShelterEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){t.fireEvent(BI.ShelterEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(e){t.fireEvent(BI.ShelterEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){t.fireEvent(BI.ShelterEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){t._showHint(),t._checkText(),t.fireEvent(BI.ShelterEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){t._showHint(),t._checkText(),t.fireEvent(BI.ShelterEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){t.fireEvent(BI.ShelterEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){t.fireEvent(BI.ShelterEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){t.fireEvent(BI.ShelterEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){t.fireEvent(BI.ShelterEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){t._checkText(),t.fireEvent(BI.ShelterEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){t.fireEvent(BI.ShelterEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){t.fireEvent(BI.ShelterEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){t.fireEvent(BI.ShelterEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),t._checkText()},_checkText:function(){var e=this.options;""===this.editor.getValue()?(this.text.setValue(e.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark")),BI.isKey(e.keyword)&&this.text.doRedMark(e.keyword)},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setWaterMark:function(e){this.options.watermark=e,this.editor.setWaterMark(e)},setTitle:function(e){this.text.setTitle(e)},setWarningTitle:function(e){this.text.setWarningTitle(e)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint(),this._checkText()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},isValid:function(){return this.editor.isValid()},setErrorText:function(e){this.editor.setErrorText(e)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},getLastChangedValue:function(){return this.editor.getLastChangedValue()},setTextStyle:function(e){this.text.setStyle(e)},setValue:function(e){this.options;this.editor.setValue(e),this._checkText()},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(e){this._showHint(),this.text.setValue(e)}}),BI.ShelterEditor.EVENT_CHANGE="EVENT_CHANGE",BI.ShelterEditor.EVENT_FOCUS="EVENT_FOCUS",BI.ShelterEditor.EVENT_BLUR="EVENT_BLUR",BI.ShelterEditor.EVENT_CLICK="EVENT_CLICK",BI.ShelterEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.ShelterEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.ShelterEditor.EVENT_START="EVENT_START",BI.ShelterEditor.EVENT_PAUSE="EVENT_PAUSE",BI.ShelterEditor.EVENT_STOP="EVENT_STOP",BI.ShelterEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.ShelterEditor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.ShelterEditor.EVENT_VALID="EVENT_VALID",BI.ShelterEditor.EVENT_ERROR="EVENT_ERROR",BI.ShelterEditor.EVENT_ENTER="EVENT_ENTER",BI.ShelterEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.ShelterEditor.EVENT_SPACE="EVENT_SPACE",BI.ShelterEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.shelter_editor",BI.ShelterEditor)},function(e,t){BI.SignEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.SignEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-sign-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",height:24})},_init:function(){BI.SignEditor.superclass._init.apply(this,arguments);var t=this,e=this.options;this.editor=BI.createWidget({type:"bi.editor",height:e.height,hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap,value:e.value,validationChecker:e.validationChecker,quitChecker:e.quitChecker,allowBlank:e.allowBlank,watermark:e.watermark,errorText:e.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:e.title,warningTitle:e.warningTitle,tipType:e.tipType,textAlign:"left",height:e.height,hgap:e.hgap,handler:function(){t._showInput(),t.editor.focus(),t.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){t.fireEvent(BI.SignEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){t.fireEvent(BI.SignEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){t.fireEvent(BI.SignEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){t.fireEvent(BI.SignEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){t.fireEvent(BI.SignEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(e){t.fireEvent(BI.SignEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){t.fireEvent(BI.SignEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){t._showHint(),t._checkText(),t.fireEvent(BI.SignEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){t._showHint(),t._checkText(),t.fireEvent(BI.SignEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){t.fireEvent(BI.SignEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){t.fireEvent(BI.SignEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){t.fireEvent(BI.SignEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){t.fireEvent(BI.SignEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){t._checkText(),t.fireEvent(BI.SignEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){t.fireEvent(BI.SignEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){t.fireEvent(BI.SignEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){t.fireEvent(BI.SignEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),t._checkText()},_checkText:function(){var e=this.options;BI.nextTick(BI.bind(function(){""===this.editor.getValue()?(this.text.setValue(e.watermark||""),this.text.element.addClass("bi-water-mark")):(this.text.setValue(this.editor.getValue()),this.text.element.removeClass("bi-water-mark"),BI.isKey(e.keyword)&&this.text.doRedMark(e.keyword))},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(e){this.text.setTitle(e)},setWarningTitle:function(e){this.text.setWarningTitle(e)},setWaterMark:function(e){this.options.watermark=e,this.editor.setWaterMark(e)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint(),this._checkText()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},isValid:function(){return this.editor.isValid()},setErrorText:function(e){this.editor.setErrorText(e)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},getLastChangedValue:function(){return this.editor.getLastChangedValue()},setValue:function(e){this.editor.setValue(e),this._checkText()},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(e){this._showHint(),this.text.setValue(e)}}),BI.SignEditor.EVENT_CHANGE="EVENT_CHANGE",BI.SignEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SignEditor.EVENT_BLUR="EVENT_BLUR",BI.SignEditor.EVENT_CLICK="EVENT_CLICK",BI.SignEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.SignEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.SignEditor.EVENT_START="EVENT_START",BI.SignEditor.EVENT_PAUSE="EVENT_PAUSE",BI.SignEditor.EVENT_STOP="EVENT_STOP",BI.SignEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SignEditor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.SignEditor.EVENT_VALID="EVENT_VALID",BI.SignEditor.EVENT_ERROR="EVENT_ERROR",BI.SignEditor.EVENT_ENTER="EVENT_ENTER",BI.SignEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.SignEditor.EVENT_SPACE="EVENT_SPACE",BI.SignEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.sign_editor",BI.SignEditor)},function(e,t){BI.StateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.StateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-state-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",height:24,defaultText:"",text:BI.i18nText("BI-Basic_Unrestricted")})},_init:function(){BI.StateEditor.superclass._init.apply(this,arguments);var t=this,e=this.options;this.editor=BI.createWidget({type:"bi.editor",height:e.height,hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap,value:e.value,validationChecker:e.validationChecker,quitChecker:e.quitChecker,allowBlank:e.allowBlank,watermark:e.watermark,errorText:e.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"bi-water-mark tip-text-style",textAlign:"left",height:e.height,text:e.text,hgap:e.hgap,handler:function(){t._showInput(),t.editor.focus(),t.editor.setValue("")},title:BI.isNotNull(e.tipText)?e.tipText:function(){var e="";return BI.isString(t.stateValue)&&(e=t.stateValue),BI.isArray(t.stateValue)&&1===t.stateValue.length&&(e=t.stateValue[0]),e},warningTitle:e.warningTitle,tipType:e.tipType}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){t.fireEvent(BI.StateEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){t.fireEvent(BI.StateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){t.fireEvent(BI.StateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){t.fireEvent(BI.StateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){t.fireEvent(BI.StateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(e){t.fireEvent(BI.StateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){t.fireEvent(BI.StateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){t._showHint(),t.fireEvent(BI.StateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){t._showHint(),t.fireEvent(BI.StateEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){t.fireEvent(BI.StateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){t.fireEvent(BI.StateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){t.fireEvent(BI.StateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){t.fireEvent(BI.StateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){t.fireEvent(BI.StateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){t.fireEvent(BI.StateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){t.fireEvent(BI.StateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){t.fireEvent(BI.StateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),BI.isNotNull(e.text)&&this.setState(e.text)},setWaterMark:function(e){this.options.watermark=e,this.editor.setWaterMark(e)},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},focus:function(){!1===this.options.disabled&&(this._showInput(),this.editor.focus())},blur:function(){this.editor.blur(),this._showHint()},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},_setText:function(e){this.text.setText(e),this.text.setTitle(e)},isValid:function(){return this.editor.isValid()},setErrorText:function(e){this.editor.setErrorText(e)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},getLastChangedValue:function(){return this.editor.getLastChangedValue()},setValue:function(e){this.editor.setValue(e)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(e){var t=this.options;if(BI.StateEditor.superclass.setValue.apply(this,arguments),this.stateValue=e,!BI.isNumber(e))return BI.isString(e)?(this._setText(e),void(BI.isKey(t.defaultText)&&t.defaultText===e?this.text.element.addClass("bi-water-mark"):this.text.element.removeClass("bi-water-mark"))):void(BI.isArray(e)&&(BI.isEmpty(e)?(this._setText(BI.isKey(t.defaultText)?t.defaultText:t.text),BI.isKey(t.defaultText)?this.text.element.addClass("bi-water-mark"):this.text.element.removeClass("bi-water-mark")):(1===e.length?this._setText(e[0]):this._setText(BI.i18nText("BI-Select_Part")),this.text.element.removeClass("bi-water-mark"))));e===BI.Selection.All?(this._setText(BI.i18nText("BI-Select_All")),this.text.element.removeClass("bi-water-mark")):e===BI.Selection.Multi?(this._setText(BI.i18nText("BI-Select_Part")),this.text.element.removeClass("bi-water-mark")):(this._setText(BI.isKey(t.defaultText)?t.defaultText:t.text),BI.isKey(t.defaultText)?this.text.element.addClass("bi-water-mark"):this.text.element.removeClass("bi-water-mark"))},setTipType:function(e){this.text.options.tipType=e},getText:function(){return this.text.getText()}}),BI.StateEditor.EVENT_CHANGE="EVENT_CHANGE",BI.StateEditor.EVENT_FOCUS="EVENT_FOCUS",BI.StateEditor.EVENT_BLUR="EVENT_BLUR",BI.StateEditor.EVENT_CLICK="EVENT_CLICK",BI.StateEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.StateEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.StateEditor.EVENT_START="EVENT_START",BI.StateEditor.EVENT_PAUSE="EVENT_PAUSE",BI.StateEditor.EVENT_STOP="EVENT_STOP",BI.StateEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.StateEditor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.StateEditor.EVENT_VALID="EVENT_VALID",BI.StateEditor.EVENT_ERROR="EVENT_ERROR",BI.StateEditor.EVENT_ENTER="EVENT_ENTER",BI.StateEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.StateEditor.EVENT_SPACE="EVENT_SPACE",BI.StateEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.state_editor",BI.StateEditor)},function(e,t){BI.SimpleStateEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.SimpleStateEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-simple-state-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,mouseOut:!1,allowBlank:!0,watermark:"",errorText:"",height:24,text:BI.i18nText("BI-Basic_Unrestricted")})},_init:function(){BI.SimpleStateEditor.superclass._init.apply(this,arguments);var t=this,e=this.options;this.editor=BI.createWidget({type:"bi.editor",height:e.height,hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap,value:e.value,validationChecker:e.validationChecker,quitChecker:e.quitChecker,allowBlank:e.allowBlank,watermark:e.watermark,errorText:e.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"bi-water-mark",textAlign:"left",text:e.text,height:e.height,hgap:e.hgap,handler:function(){t._showInput(),t.editor.focus(),t.editor.setValue("")}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){t.fireEvent(BI.SimpleStateEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){t.fireEvent(BI.SimpleStateEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){t.fireEvent(BI.SimpleStateEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){t.fireEvent(BI.SimpleStateEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){t.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(e){t.fireEvent(BI.SimpleStateEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){t.fireEvent(BI.SimpleStateEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){t._showHint(),t.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){t._showHint(),t.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){t.fireEvent(BI.SimpleStateEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){t.fireEvent(BI.SimpleStateEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){t.fireEvent(BI.SimpleStateEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){t.fireEvent(BI.SimpleStateEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){t.fireEvent(BI.SimpleStateEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){t.fireEvent(BI.SimpleStateEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){t.fireEvent(BI.SimpleStateEditor.EVENT_RESTRICT,arguments)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){t.fireEvent(BI.SimpleStateEditor.EVENT_EMPTY,arguments)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),BI.isNotNull(e.text)&&this.setState(e.text)},setWaterMark:function(e){this.options.watermark=e,this.editor.setWaterMark(e)},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint()},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},_setText:function(e){this.text.setText(e),this.text.setTitle(e)},isValid:function(){return this.editor.isValid()},setErrorText:function(e){this.editor.setErrorText(e)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},getLastChangedValue:function(){return this.editor.getLastChangedValue()},setValue:function(e){this.editor.setValue(e)},getValue:function(){return this.editor.getValue()},getState:function(){return this.editor.getValue().match(/[^\s]+/g)},setState:function(e){var t=this.options;BI.SimpleStateEditor.superclass.setValue.apply(this,arguments),BI.isNumber(e)?e===BI.Selection.All?(this._setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("bi-water-mark")):e===BI.Selection.Multi?(this._setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("bi-water-mark")):(this._setText(t.text),this.text.element.addClass("bi-water-mark")):BI.isArray(e)&&1!==e.length?BI.isEmpty(e)?(this._setText(t.text),this.text.element.addClass("bi-water-mark")):(this._setText(BI.i18nText("BI-Already_Selected")),this.text.element.removeClass("bi-water-mark")):(this._setText(e),this.text.element.removeClass("bi-water-mark"))},getText:function(){return this.text.getText()}}),BI.SimpleStateEditor.EVENT_CHANGE="EVENT_CHANGE",BI.SimpleStateEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SimpleStateEditor.EVENT_BLUR="EVENT_BLUR",BI.SimpleStateEditor.EVENT_CLICK="EVENT_CLICK",BI.SimpleStateEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.SimpleStateEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.SimpleStateEditor.EVENT_START="EVENT_START",BI.SimpleStateEditor.EVENT_PAUSE="EVENT_PAUSE",BI.SimpleStateEditor.EVENT_STOP="EVENT_STOP",BI.SimpleStateEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.SimpleStateEditor.EVENT_VALID="EVENT_VALID",BI.SimpleStateEditor.EVENT_ERROR="EVENT_ERROR",BI.SimpleStateEditor.EVENT_ENTER="EVENT_ENTER",BI.SimpleStateEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.SimpleStateEditor.EVENT_SPACE="EVENT_SPACE",BI.SimpleStateEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.simple_state_editor",BI.SimpleStateEditor)},function(e,t){BI.MultiPopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var e=BI.MultiPopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{_baseCls:(e._baseCls||"")+" bi-multi-list-view",buttons:[BI.i18nText("BI-Basic_Sure")]})},_init:function(){BI.MultiPopupView.superclass._init.apply(this,arguments)},_createToolBar:function(){var e=this.options,i=this;if(0!==e.buttons.length){var n=[];return BI.each(e.buttons,function(e,t){n.push({text:t,value:e})}),this.buttongroup=BI.createWidget({type:"bi.button_group",cls:"list-view-toolbar bi-high-light bi-split-top",height:24,items:BI.createItems(n,{type:"bi.text_button",once:!1,shadow:!0,isShadowShowingOnSelected:!0}),layouts:[{type:"bi.center",hgap:0,vgap:0}]}),this.buttongroup.on(BI.ButtonGroup.EVENT_CHANGE,function(e,t){i.fireEvent(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,e,t)}),this.buttongroup}}}),BI.MultiPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.multi_popup_view",BI.MultiPopupView)},function(e,t){BI.PopupPanel=BI.inherit(BI.MultiPopupView,{_defaultConfig:function(){var e=BI.PopupPanel.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-popup-panel",title:""})},_init:function(){BI.PopupPanel.superclass._init.apply(this,arguments)},_createTool:function(){var e=this,t=this.options,i=BI.createWidget({type:"bi.icon_button",cls:"close-h-font",width:25,height:25});return i.on(BI.IconButton.EVENT_CHANGE,function(){e.setVisible(!1),e.fireEvent(BI.PopupPanel.EVENT_CLOSE)}),BI.createWidget({type:"bi.htape",cls:"popup-panel-title bi-header-background",height:25,items:[{el:{type:"bi.label",textAlign:"left",text:t.title,height:25,lgap:10}},{el:i,width:25}]})}}),BI.PopupPanel.EVENT_CHANGE="EVENT_CHANGE",BI.PopupPanel.EVENT_CLOSE="EVENT_CLOSE",BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.popup_panel",BI.PopupPanel)},function(e,t){BI.ListPane=BI.inherit(BI.Pane,{_defaultConfig:function(){var e=BI.ListPane.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-list-pane",logic:{dynamic:!0},lgap:0,rgap:0,tgap:0,bgap:0,vgap:0,hgap:0,items:[],itemsCreator:BI.emptyFn,hasNext:BI.emptyFn,onLoaded:BI.emptyFn,el:{type:"bi.button_group"}})},_init:function(){BI.ListPane.superclass._init.apply(this,arguments);var n=this,i=this.options;this.button_group=BI.createWidget(i.el,{type:"bi.button_group",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{},items:i.items,itemsCreator:function(e,t){1===e.times&&(n.empty(),BI.nextTick(function(){n.loading()})),i.itemsCreator(e,function(){t.apply(n,arguments),1===e.times&&BI.nextTick(function(){n.loaded(),n.check()})})},hasNext:i.hasNext,layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&n.fireEvent(BI.ListPane.EVENT_CHANGE,t,i)}),this.check(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top),BI.extend({scrolly:!0,lgap:i.lgap,rgap:i.rgap,tgap:i.tgap,bgap:i.bgap,vgap:i.vgap,hgap:i.hgap},i.logic,{items:BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Top,this.button_group)}))))},hasPrev:function(){return this.button_group.hasPrev&&this.button_group.hasPrev()},hasNext:function(){return this.button_group.hasNext&&this.button_group.hasNext()},prependItems:function(e){this.options.items=e.concat(this.options.items),this.button_group.prependItems.apply(this.button_group,arguments),this.check()},addItems:function(e){this.options.items=this.options.items.concat(e),this.button_group.addItems.apply(this.button_group,arguments),this.check()},removeItemAt:function(e){e=e||[],BI.removeAt(this.options.items,e),this.button_group.removeItemAt.apply(this.button_group,arguments),this.check()},populate:function(e){var t=this;this.options;0===arguments.length&&BI.isFunction(this.button_group.attr("itemsCreator"))?this.button_group.attr("itemsCreator").apply(this,[{times:1},function(){if(0===arguments.length)throw new Error("参数不能为空");t.populate.apply(t,arguments)}]):(BI.ListPane.superclass.populate.apply(this,arguments),this.button_group.populate.apply(this.button_group,arguments))},empty:function(){this.button_group.empty()},setNotSelectedValue:function(){this.button_group.setNotSelectedValue.apply(this.button_group,arguments)},getNotSelectedValue:function(){return this.button_group.getNotSelectedValue()},setValue:function(){this.button_group.setValue.apply(this.button_group,arguments)},getValue:function(){return this.button_group.getValue.apply(this.button_group,arguments)},getAllButtons:function(){return this.button_group.getAllButtons()},getAllLeaves:function(){return this.button_group.getAllLeaves()},getSelectedButtons:function(){return this.button_group.getSelectedButtons()},getNotSelectedButtons:function(){return this.button_group.getNotSelectedButtons()},getIndexByValue:function(e){return this.button_group.getIndexByValue(e)},getNodeById:function(e){return this.button_group.getNodeById(e)},getNodeByValue:function(e){return this.button_group.getNodeByValue(e)}}),BI.ListPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_pane",BI.ListPane)},function(e,t){BI.Panel=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Panel.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-panel bi-border",title:"",titleButtons:[],el:{},logic:{dynamic:!1}})},_init:function(){BI.Panel.superclass._init.apply(this,arguments);var e=this.options;BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend(e.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this._createTitle(),this.options.el)}))))},_createTitle:function(){var i=this,e=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"panel-title-text",text:e.title,height:30}),this.button_group=BI.createWidget({type:"bi.button_group",items:e.titleButtons,layouts:[{type:"bi.center_adapt",lgap:10}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){i.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(e,t){i.fireEvent(BI.Panel.EVENT_CHANGE,e,t)}),{el:{type:"bi.left_right_vertical_adapt",cls:"panel-title bi-header-background bi-border-bottom",height:29,items:{left:[this.text],right:[this.button_group]},lhgap:10,rhgap:10},height:29}},setTitle:function(e){this.text.setValue(e)}}),BI.Panel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.panel",BI.Panel)},function(e,t){BI.LinearSegmentButton=BI.inherit(BI.BasicButton,{props:{extraCls:"bi-line-segment-button bi-list-item-effect",once:!0,readonly:!0,hgap:10,height:25},render:function(){var e=this,t=this.options;return[{type:"bi.label",text:t.text,height:t.height,value:t.value,hgap:t.hgap,ref:function(){e.text=this}},{type:"bi.absolute",items:[{el:{type:"bi.layout",cls:"line-segment-button-line",height:2,ref:function(){e.line=this}},left:0,right:0,bottom:0}]}]},setSelected:function(e){BI.LinearSegmentButton.superclass.setSelected.apply(this,arguments),e?this.line.element.addClass("bi-high-light-background"):this.line.element.removeClass("bi-high-light-background")},setText:function(e){this.text.setText(e)}}),BI.shortcut("bi.linear_segment_button",BI.LinearSegmentButton)},function(e,t){BI.LinearSegment=BI.inherit(BI.Widget,{props:{baseCls:"bi-linear-segment bi-split-bottom",items:[],layouts:[{type:"bi.center"}],height:29},render:function(){var e=this,t=this.options;return{type:"bi.button_group",items:BI.createItems(t.items,{type:"bi.linear_segment_button",height:t.height-1}),layouts:t.layouts,listeners:[{eventName:"__EVENT_CHANGE__",action:function(){e.fireEvent("__EVENT_CHANGE__",arguments)}},{eventName:"EVENT_CHANGE",action:function(){e.fireEvent("EVENT_CHANGE")}}],ref:function(){e.buttonGroup=this}}},setValue:function(e){this.buttonGroup.setValue(e)},setEnabledValue:function(e){this.buttonGroup.setEnabledValue(e)},getValue:function(){return this.buttonGroup.getValue()}}),BI.shortcut("bi.linear_segment",BI.LinearSegment)},function(e,t){BI.SelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-list",direction:BI.Direction.Top,logic:{dynamic:!0},items:[],itemsCreator:BI.emptyFn,hasNext:BI.emptyFn,onLoaded:BI.emptyFn,toolbar:{type:"bi.multi_select_bar",iconWrapperWidth:36},el:{type:"bi.list_pane"}})},_init:function(){BI.SelectList.superclass._init.apply(this,arguments);var n=this,e=this.options;this.toolbar=BI.createWidget(e.toolbar),this.allSelected=!1,this.toolbar.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.allSelected=this.isSelected(),e===BI.Events.CLICK&&(n.setAllSelected(n.allSelected),n.fireEvent(BI.SelectList.EVENT_CHANGE,t,i)),n.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.list=BI.createWidget(e.el,{type:"bi.list_pane",items:e.items,itemsCreator:function(t,i){1===t.times&&n.toolbar.setVisible(!1),e.itemsCreator(t,function(e){i.apply(n,arguments),1===t.times&&(n.toolbar.setVisible(e&&0<e.length),n.toolbar.setEnable(n.isEnabled()&&e&&0<e.length)),n._checkAllSelected()})},onLoaded:e.onLoaded,hasNext:e.hasNext}),this.list.on(BI.Controller.EVENT_CHANGE,function(e,t,i){e===BI.Events.CLICK&&(n._checkAllSelected(),n.fireEvent(BI.SelectList.EVENT_CHANGE,t,i)),n.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(e.direction),BI.extend({scrolly:!0},e.logic,{items:BI.LogicFactory.createLogicItemsByDirection(e.direction,this.toolbar,this.list)})))),e.items.length<=0&&(this.toolbar.setVisible(!1),this.toolbar.setEnable(!1)),BI.isNotNull(e.value)&&this.setValue(e.value)},_checkAllSelected:function(){var e=this.list.getValue().length,t=this.getAllLeaves().length-e,i=this.list.hasNext(),n=this.toolbar.isSelected(),r=0<e&&(0<t||!n&&i);r=r||0<t&&i&&n,this.toolbar.setHalfSelected(r),r||this.toolbar.setSelected(0<e&&t<=0&&(!i||n))},setAllSelected:function(i){BI.each(this.getAllButtons(),function(e,t){(t.setSelected||t.setAllSelected).apply(t,[i])}),this.allSelected=!!i,this.toolbar.setSelected(i),this.toolbar.setHalfSelected(!1)},setToolBarVisible:function(e){this.toolbar.setVisible(e)},isAllSelected:function(){return this.allSelected},hasPrev:function(){return this.list.hasPrev()},hasNext:function(){return this.list.hasNext()},prependItems:function(e){this.list.prependItems.apply(this.list,arguments)},addItems:function(e){this.list.addItems.apply(this.list,arguments)},setValue:function(e){var t=e.type===BI.ButtonGroup.CHOOSE_TYPE_ALL;this.setAllSelected(t),this.list[t?"setNotSelectedValue":"setValue"](e.value),this._checkAllSelected()},getValue:function(){return!1===this.isAllSelected()?{type:BI.ButtonGroup.CHOOSE_TYPE_MULTI,value:this.list.getValue(),assist:this.list.getNotSelectedValue()}:{type:BI.ButtonGroup.CHOOSE_TYPE_ALL,value:this.list.getNotSelectedValue(),assist:this.list.getValue()}},empty:function(){this.list.empty()},populate:function(e){this.toolbar.setVisible(!BI.isEmptyArray(e)),this.toolbar.setEnable(this.isEnabled()&&!BI.isEmptyArray(e)),this.list.populate.apply(this.list,arguments),this._checkAllSelected()},_setEnable:function(e){BI.SelectList.superclass._setEnable.apply(this,arguments),this.toolbar.setEnable(e)},resetHeight:function(e){var t=(this.toolbar.element.outerHeight()||25)*(this.toolbar.isVisible()?1:0);this.list.resetHeight?this.list.resetHeight(e-t):this.list.element.css({"max-height":e-t+"px"})},setNotSelectedValue:function(){this.list.setNotSelectedValue.apply(this.list,arguments),this._checkAllSelected()},getNotSelectedValue:function(){return this.list.getNotSelectedValue()},getAllButtons:function(){return this.list.getAllButtons()},getAllLeaves:function(){return this.list.getAllLeaves()},getSelectedButtons:function(){return this.list.getSelectedButtons()},getNotSelectedButtons:function(){return this.list.getNotSelectedButtons()},getIndexByValue:function(e){return this.list.getIndexByValue(e)},getNodeById:function(e){return this.list.getNodeById(e)},getNodeByValue:function(e){return this.list.getNodeByValue(e)}}),BI.SelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_list",BI.SelectList)},function(e,t){BI.LazyLoader=BI.inherit(BI.Widget,{_const:{PAGE:100},_defaultConfig:function(){return BI.extend(BI.LazyLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-lazy-loader",el:{},items:[]})},_init:function(){var i=this,e=this.options;BI.LazyLoader.superclass._init.apply(this,arguments);var t=e.items.length;this.loader=BI.createWidget({type:"bi.loader",element:this,el:e.el,itemsCreator:function(e,t){t(i._getNextItems(e))},hasNext:function(e){return e.count<t}}),this.loader.on(BI.Loader.EVENT_CHANGE,function(e){i.fireEvent(BI.LazyLoader.EVENT_CHANGE,e)})},_getNextItems:function(e){var t=this.options,i=t.items.length-this._const.PAGE*(e.times-1),n=BI.takeRight(t.items,i);return BI.take(n,this._const.PAGE)},populate:function(e){this.loader.populate(e)},addItems:function(e){this.loader.addItems(e)},empty:function(){this.loader.empty()},setNotSelectedValue:function(){this.loader.setNotSelectedValue.apply(this.loader,arguments)},getNotSelectedValue:function(){return this.loader.getNotSelectedValue()},setValue:function(){this.loader.setValue.apply(this.loader,arguments)},getValue:function(){return this.loader.getValue.apply(this.loader,arguments)},getAllButtons:function(){return this.loader.getAllButtons()},getAllLeaves:function(){return this.loader.getAllLeaves()},getSelectedButtons:function(){return this.loader.getSelectedButtons()},getNotSelectedButtons:function(){return this.loader.getNotSelectedButtons()},getIndexByValue:function(e){return this.loader.getIndexByValue(e)},getNodeById:function(e){return this.loader.getNodeById(e)},getNodeByValue:function(e){return this.loader.getNodeByValue(e)}}),BI.LazyLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.lazy_loader",BI.LazyLoader)},function(e,t){BI.ListLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ListLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-list-loader",isDefaultInit:!0,el:{type:"bi.button_group"},items:[],itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn,count:!1,next:{},hasNext:BI.emptyFn})},_nextLoad:function(){var e=this,t=this.options;this.next.setLoading(),t.itemsCreator.apply(this,[{times:++this.times},function(){e.next.setLoaded(),e.addItems.apply(e,arguments)}])},_init:function(){BI.ListLoader.superclass._init.apply(this,arguments);var n=this,e=this.options;!1===e.itemsCreator&&(e.next=!1),this.button_group=BI.createWidget(e.el,{type:"bi.button_group",element:this,chooseType:0,items:e.items,behaviors:{},layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&n.fireEvent(BI.ListLoader.EVENT_CHANGE,i)}),!1!==e.next&&(this.next=BI.createWidget(BI.extend({type:"bi.loading_bar"},e.next)),this.next.on(BI.Controller.EVENT_CHANGE,function(e){e===BI.Events.CLICK&&n._nextLoad()})),BI.createWidget({type:"bi.vertical",element:this,items:[this.next]}),e.isDefaultInit&&BI.isEmpty(e.items)&&BI.nextTick(BI.bind(function(){this.populate()},this)),BI.isNotEmptyArray(e.items)&&this.populate(e.items)},hasNext:function(){var e=this.options;return BI.isNumber(e.count)?this.count<e.count:!!e.hasNext.apply(this,[{times:this.times,count:this.count}])},addItems:function(e){this.count+=e.length,BI.isObject(this.next)&&(this.options.items=this.options.items.concat(e),this.hasNext()?this.next.setLoaded():this.next.setEnd()),this.button_group.addItems.apply(this.button_group,arguments),this.next.element.appendTo(this.element)},populate:function(e){var t=this,i=this.options;0===arguments.length&&BI.isFunction(i.itemsCreator)?i.itemsCreator.apply(this,[{times:1},function(){if(0===arguments.length)throw new Error("参数不能为空");t.populate.apply(t,arguments),i.onLoaded()}]):(this.options.items=e,this.times=1,this.count=0,this.count+=e.length,BI.isObject(this.next)&&(this.hasNext()?this.next.setLoaded():this.next.invisible()),BI.DOM.hang([this.next]),this.button_group.populate.apply(this.button_group,arguments),this.next.element.appendTo(this.element))},empty:function(){BI.DOM.hang([this.next]),this.button_group.empty(),this.next.element.appendTo(this.element),BI.each([this.next],function(e,t){t&&t.setVisible(!1)})},setNotSelectedValue:function(){this.button_group.setNotSelectedValue.apply(this.button_group,arguments)},getNotSelectedValue:function(){return this.button_group.getNotSelectedValue()},setValue:function(){this.button_group.setValue.apply(this.button_group,arguments)},getValue:function(){return this.button_group.getValue.apply(this.button_group,arguments)},getAllButtons:function(){return this.button_group.getAllButtons()},getAllLeaves:function(){return this.button_group.getAllLeaves()},getSelectedButtons:function(){return this.button_group.getSelectedButtons()},getNotSelectedButtons:function(){return this.button_group.getNotSelectedButtons()},getIndexByValue:function(e){return this.button_group.getIndexByValue(e)},getNodeById:function(e){return this.button_group.getNodeById(e)},getNodeByValue:function(e){return this.button_group.getNodeByValue(e)}}),BI.ListLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_loader",BI.ListLoader)},function(e,t){BI.SortList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SortList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sort-list",isDefaultInit:!0,el:{type:"bi.button_group"},items:[],itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn,count:!1,next:{},hasNext:BI.emptyFn})},_init:function(){BI.SortList.superclass._init.apply(this,arguments);var n=this,i=this.options;this.loader=BI.createWidget({type:"bi.list_loader",element:this,isDefaultInit:i.isDefaultInit,el:i.el,items:this._formatItems(i.items),itemsCreator:function(e,t){i.itemsCreator(e,function(e){t(n._formatItems(e))})},onLoaded:i.onLoaded,count:i.count,next:i.next,hasNext:i.hasNext}),this.loader.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&n.fireEvent(BI.SortList.EVENT_CHANGE,t,i)}),this.loader.element.sortable({containment:i.containment||this.element,connectWith:i.connectWith||".bi-sort-list",items:".sort-item",cursor:i.cursor||"drag",tolerance:i.tolerance||"intersect",placeholder:{element:function(e){var t=BI.createWidget({type:"bi.layout",cls:"bi-sortable-holder",height:e.outerHeight()});return t.element.css({"margin-left":e.css("margin-left"),"margin-right":e.css("margin-right"),"margin-top":e.css("margin-top"),"margin-bottom":e.css("margin-bottom"),margin:e.css("margin")}),t.element},update:function(){}},start:function(e,t){},stop:function(e,t){n.fireEvent(BI.SortList.EVENT_CHANGE)},over:function(e,t){}})},_formatItems:function(e){return BI.each(e,function(e,t){(t=BI.stripEL(t)).cls=t.cls?t.cls+" sort-item":"sort-item",t.attributes={sorted:t.value}}),e},hasNext:function(){return this.loader.hasNext()},addItems:function(e){this.loader.addItems(e)},populate:function(e){e=e&&this._formatItems(e),this.loader.populate.apply(this.loader,arguments)},empty:function(){this.loader.empty()},setNotSelectedValue:function(){this.loader.setNotSelectedValue.apply(this.loader,arguments)},getNotSelectedValue:function(){return this.loader.getNotSelectedValue()},setValue:function(){this.loader.setValue.apply(this.loader,arguments)},getValue:function(){return this.loader.getValue()},getAllButtons:function(){return this.loader.getAllButtons()},getAllLeaves:function(){return this.loader.getAllLeaves()},getSelectedButtons:function(){return this.loader.getSelectedButtons()},getNotSelectedButtons:function(){return this.loader.getNotSelectedButtons()},getIndexByValue:function(e){return this.loader.getIndexByValue(e)},getNodeById:function(e){return this.loader.getNodeById(e)},getNodeByValue:function(e){return this.loader.getNodeByValue(e)},getSortedValues:function(){return this.loader.element.sortable("toArray",{attribute:"sorted"})}}),BI.SortList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.sort_list",BI.SortList)},function(e,t){BI.LoadingPane=BI.inherit(BI.Pane,{_mount:function(){BI.Pane.superclass._mount.apply(this,arguments)&&this.beforeInit&&(this.__asking=!0,this.loading(),this.beforeInit(BI.bind(this.__loaded,this)))},_initRender:function(){this.beforeInit?this.__async=!0:this._render()},__loaded:function(){this.__asking=!1,this.loaded(),this._render()}})},function(e,t){BI.AllCountPager=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.AllCountPager.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-all-count-pager",pagerDirection:"vertical",height:24,pages:1,curr:1,count:1})},_init:function(){BI.AllCountPager.superclass._init.apply(this,arguments);var t=this,e=this.options,i=this._getPagerIconCls();this.editor=BI.createWidget({type:"bi.small_text_editor",cls:"pager-editor bi-border-radius",validationChecker:function(e){return 0===t.rowCount.getValue()&&"0"===e||BI.isPositiveInteger(e)},hgap:4,vgap:0,value:e.curr,errorText:BI.i18nText("BI-Please_Input_Positive_Integer"),width:40,height:24,invisible:e.pages<=1}),this.pager=BI.createWidget({type:"bi.pager",width:58,layouts:[{type:"bi.horizontal",lgap:5}],dynamicShow:!1,pages:e.pages,curr:e.curr,groups:0,first:!1,last:!1,prev:{type:"bi.icon_button",value:"prev",title:BI.i18nText("BI-Previous_Page"),warningTitle:BI.i18nText("BI-Current_Is_First_Page"),height:22,width:22,cls:"bi-border bi-border-radius all-pager-prev bi-list-item-select2 "+i.preCls},next:{type:"bi.icon_button",value:"next",title:BI.i18nText("BI-Next_Page"),warningTitle:BI.i18nText("BI-Current_Is_Last_Page"),height:22,width:22,cls:"bi-border bi-border-radius all-pager-next bi-list-item-select2 "+i.nextCls},hasPrev:e.hasPrev,hasNext:e.hasNext,firstPage:e.firstPage,lastPage:e.lastPage,invisible:e.pages<=1}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){t.pager.setValue(BI.parseInt(t.editor.getValue())),t.fireEvent(BI.AllCountPager.EVENT_CHANGE)}),this.pager.on(BI.Pager.EVENT_CHANGE,function(){t.fireEvent(BI.AllCountPager.EVENT_CHANGE)}),this.pager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){t.editor.setValue(t.pager.getCurrentPage())}),this.allPages=BI.createWidget({type:"bi.label",title:e.pages,text:"/"+e.pages,lgap:5,invisible:e.pages<=1}),this.rowCount=BI.createWidget({type:"bi.label",cls:"row-count",height:e.height,hgap:5,text:e.count,title:e.count});var n=BI.createWidget({type:"bi.left",height:e.height,scrollable:!1,items:[{type:"bi.label",height:e.height,text:BI.i18nText("BI-Basic_Total"),width:15},this.rowCount,{type:"bi.label",height:e.height,text:BI.i18nText("BI-Tiao_Data"),width:50,textAlign:"left"}]});BI.createWidget({type:"bi.left_right_vertical_adapt",element:this,items:{left:[n],right:[this.editor,this.allPages,this.pager]}})},alwaysShowPager:!0,_getPagerIconCls:function(){switch(this.options.pagerDirection){case"horizontal":return{preCls:"row-pre-page-h-font ",nextCls:"row-next-page-h-font "};case"vertical":default:return{preCls:"column-pre-page-h-font ",nextCls:"column-next-page-h-font "}}},setAllPages:function(e){this.allPages.setText("/"+e),this.allPages.setTitle(e),this.options.pages=e,this.pager.setAllPages(e),this.editor.setEnable(1<=e),this.setPagerVisible(1<e)},setValue:function(e){this.pager.setValue(e)},setVPage:function(e){this.pager.setValue(e)},setCount:function(e){this.rowCount.setText(e),this.rowCount.setTitle(e)},getCurrentPage:function(){return this.pager.getCurrentPage()},hasPrev:function(){return this.pager.hasPrev()},hasNext:function(){return this.pager.hasNext()},setPagerVisible:function(e){this.editor.setVisible(e),this.allPages.setVisible(e),this.pager.setVisible(e)},populate:function(){this.pager.populate(),this.setPagerVisible(1<this.options.pages)}}),BI.AllCountPager.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.all_count_pager",BI.AllCountPager)},function(e,t){BI.DirectionPager=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DirectionPager.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-direction-pager",height:24,horizontal:{pages:!1,curr:1,hasPrev:BI.emptyFn,hasNext:BI.emptyFn,firstPage:1,lastPage:BI.emptyFn},vertical:{pages:!1,curr:1,hasPrev:BI.emptyFn,hasNext:BI.emptyFn,firstPage:1,lastPage:BI.emptyFn}})},_init:function(){BI.DirectionPager.superclass._init.apply(this,arguments);var e=this.options;e.vertical,e.horizontal;this._createVPager(),this._createHPager(),this.layout=BI.createWidget({type:"bi.absolute",scrollable:!1,element:this,items:[{el:this.vpager,top:0,right:86},{el:this.vlabel,top:0,right:110},{el:this.hpager,top:0,right:0},{el:this.hlabel,top:0,right:24}]})},_createVPager:function(){var e=this,t=this.options.vertical;this.vlabel=BI.createWidget({type:"bi.label",width:24,height:24,value:t.curr,title:t.curr,invisible:!0}),this.vpager=BI.createWidget({type:"bi.pager",width:72,layouts:[{type:"bi.horizontal",scrollx:!1,rgap:24}],invisible:!0,dynamicShow:!1,pages:t.pages,curr:t.curr,groups:0,first:!1,last:!1,prev:{type:"bi.icon_button",value:"prev",title:BI.i18nText("BI-Up_Page"),warningTitle:BI.i18nText("BI-Current_Is_First_Page"),height:22,width:22,cls:"bi-border bi-border-radius direction-pager-prev column-pre-page-h-font bi-list-item-select2"},next:{type:"bi.icon_button",value:"next",title:BI.i18nText("BI-Down_Page"),warningTitle:BI.i18nText("BI-Current_Is_Last_Page"),height:22,width:22,cls:"bi-border bi-border-radius direction-pager-next column-next-page-h-font bi-list-item-select2"},hasPrev:t.hasPrev,hasNext:t.hasNext,firstPage:t.firstPage,lastPage:t.lastPage}),this.vpager.on(BI.Pager.EVENT_CHANGE,function(){e.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.vpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){e.vlabel.setValue(this.getCurrentPage()),e.vlabel.setTitle(this.getCurrentPage())})},_createHPager:function(){var e=this,t=this.options.horizontal;this.hlabel=BI.createWidget({type:"bi.label",width:24,height:24,value:t.curr,title:t.curr,invisible:!0}),this.hpager=BI.createWidget({type:"bi.pager",width:72,layouts:[{type:"bi.horizontal",scrollx:!1,rgap:24}],invisible:!0,dynamicShow:!1,pages:t.pages,curr:t.curr,groups:0,first:!1,last:!1,prev:{type:"bi.icon_button",value:"prev",title:BI.i18nText("BI-Left_Page"),warningTitle:BI.i18nText("BI-Current_Is_First_Page"),height:22,width:22,cls:"bi-border bi-border-radius direction-pager-prev row-pre-page-h-font bi-list-item-select2"},next:{type:"bi.icon_button",value:"next",title:BI.i18nText("BI-Right_Page"),warningTitle:BI.i18nText("BI-Current_Is_Last_Page"),height:22,width:22,cls:"bi-border bi-border-radius direction-pager-next row-next-page-h-font bi-list-item-select2"},hasPrev:t.hasPrev,hasNext:t.hasNext,firstPage:t.firstPage,lastPage:t.lastPage}),this.hpager.on(BI.Pager.EVENT_CHANGE,function(){e.fireEvent(BI.DirectionPager.EVENT_CHANGE)}),this.hpager.on(BI.Pager.EVENT_AFTER_POPULATE,function(){e.hlabel.setValue(this.getCurrentPage()),e.hlabel.setTitle(this.getCurrentPage())})},getVPage:function(){return this.vpager.getCurrentPage()},getHPage:function(){return this.hpager.getCurrentPage()},setVPage:function(e){this.vpager.setValue(e),this.vlabel.setValue(e),this.vlabel.setTitle(e)},setHPage:function(e){this.hpager.setValue(e),this.hlabel.setValue(e),this.hlabel.setTitle(e)},hasVNext:function(){return this.vpager.hasNext()},hasHNext:function(){return this.hpager.hasNext()},hasVPrev:function(){return this.vpager.hasPrev()},hasHPrev:function(){return this.hpager.hasPrev()},setHPagerVisible:function(e){this.hpager.setVisible(e),this.hlabel.setVisible(e)},setVPagerVisible:function(e){this.vpager.setVisible(e),this.vlabel.setVisible(e)},populate:function(){this.vpager.populate(),this.hpager.populate();var e=!1,t=!1;this.hasHNext()||this.hasHPrev()?(this.setHPagerVisible(!0),t=!0):this.setHPagerVisible(!1),this.hasVNext()||this.hasVPrev()?(this.setVPagerVisible(!0),e=!0):this.setVPagerVisible(!1),this.setVisible(t||e);var i=[86,110,0,24],n=this.layout.attr("items");!0===e&&!0===t?(n[0].right=i[0],n[1].right=i[1],n[2].right=i[2],n[3].right=i[3]):!0===e?(n[0].right=i[2],n[1].right=i[3]):!0===t&&(n[2].right=i[2],n[3].right=i[3]),this.layout.attr("items",n),this.layout.resize()},clear:function(){this.vpager.attr("curr",1),this.hpager.attr("curr",1)}}),BI.DirectionPager.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.direction_pager",BI.DirectionPager)},function(e,t){BI.DetailPager=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DetailPager.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-detail-pager",behaviors:{},layouts:[{type:"bi.horizontal",hgap:10,vgap:0}],dynamicShow:!0,dynamicShowFirstLast:!1,dynamicShowPrevNext:!1,pages:!1,curr:function(){return 1},groups:0,jump:BI.emptyFn,first:!1,last:!1,prev:"上一页",next:"下一页",firstPage:1,lastPage:function(){return 1},hasPrev:BI.emptyFn,hasNext:BI.emptyFn})},_init:function(){BI.DetailPager.superclass._init.apply(this,arguments);var e=this;this.currPage=BI.result(this.options,"curr"),this._lock=!1,this._debouce=BI.debounce(function(){e._lock=!1},300),this._populate()},_populate:function(){var r=this,o=this.options,e=[],t={};this.empty();var i,a=BI.result(o,"pages"),n=BI.result(this,"currPage"),s=BI.result(o,"groups"),l=BI.result(o,"first"),u=BI.result(o,"last"),c=BI.result(o,"prev"),h=BI.result(o,"next");!1===a?(s=0,u=l=!1):a<s&&(s=a),t.index=Math.ceil((n+(1<s&&s!==a?1:0))/(0===s?1:s)),(!o.dynamicShow&&!o.dynamicShowPrevNext||1<n)&&!1!==c&&(BI.isKey(c)?e.push({text:c,value:"prev",disabled:!1===a?!1===o.hasPrev(n):!(1<n&&!1!==c)}):e.push(BI.extend({disabled:!1===a?!1===o.hasPrev(n):!(1<n&&!1!==c)},c))),(!o.dynamicShow&&!o.dynamicShowFirstLast||1<t.index&&0!==s)&&l&&(e.push({text:l,value:"first",disabled:!(1<t.index&&0!==s)}),1<t.index&&0!==s&&e.push({type:"bi.label",cls:"page-ellipsis",text:"…"})),t.poor=Math.floor((s-1)/2),t.start=1<t.index?n-t.poor:1,t.end=1<t.index?(i=n+(s-t.poor-1),a<i?a:i):s,t.end-t.start<s-1&&(t.start=t.end-s+1);var p=t.start,d=t.end;for(l&&u&&1<t.index&&0!==s&&s<a&&t.end<a&&0!==s&&(p++,d--);p<=d;p++)p===n?e.push({text:p,value:p,selected:!0}):e.push({text:p,value:p});(!o.dynamicShow&&!o.dynamicShowFirstLast||s<a&&t.end<a&&0!==s)&&u&&(s<a&&t.end<a&&0!==s&&e.push({type:"bi.label",cls:"page-ellipsis",text:"…"}),e.push({text:u,value:"last",disabled:!(s<a&&t.end<a&&0!==s)})),t.flow=!c&&0===s,(!o.dynamicShow&&!o.dynamicShowPrevNext&&h||n!==a&&h||t.flow)&&e.push(BI.isKey(h)?!1===a?{text:h,value:"next",disabled:!1===o.hasNext(n)}:t.flow&&n===a?{text:h,value:"next",disabled:!0}:{text:h,value:"next",disabled:!(n!==a&&h||t.flow)}:BI.extend({disabled:!1===a?!1===o.hasNext(n):!(n!==a&&h||t.flow)},h)),this.button_group=BI.createWidget({type:"bi.button_group",element:this,items:BI.createItems(e,{cls:"page-item bi-border bi-list-item-active",height:23,hgap:10}),behaviors:o.behaviors,layouts:o.layouts}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(e,t,i){if(!0!==r._lock){if(r._lock=!0,r._debouce(),e===BI.Events.CLICK){var n=r.button_group.getValue()[0];switch(n){case"first":r.currPage=1;break;case"last":r.currPage=a;break;case"prev":r.currPage--;break;case"next":r.currPage++;break;default:r.currPage=n}o.jump.apply(r,[{pages:a,curr:r.currPage}]),r._populate(),r.fireEvent(BI.DetailPager.EVENT_CHANGE,i)}r.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}),this.fireEvent(BI.DetailPager.EVENT_AFTER_POPULATE)},getCurrentPage:function(){return this.currPage},setAllPages:function(e){this.options.pages=e},hasPrev:function(e){e=e||1;var t=this.options;return!1===this.options.pages?t.hasPrev(e):1<e},hasNext:function(e){e=e||1;var t=this.options,i=this.options.pages;return!1===i?t.hasNext(e):e<i},setValue:function(e){var t=this.options;if(e=(e=e||0)<1?1:e,!1===t.pages){var i=BI.result(t,"lastPage"),n=1;this.currPage=i<e?i:e<(n=BI.result(t,"firstPage"))?n:e}else e=e>t.pages?t.pages:e,this.currPage=e;this._populate()},getValue:function(){var e=this.button_group.getValue()[0];switch(e){case"prev":return-1;case"next":return 1;case"first":return BI.MIN;case"last":return BI.MAX;default:return e}},attr:function(e,t){BI.DetailPager.superclass.attr.apply(this,arguments),"curr"===e&&(this.currPage=BI.result(this.options,"curr"))},populate:function(){this._populate()}}),BI.DetailPager.EVENT_CHANGE="EVENT_CHANGE",BI.DetailPager.EVENT_AFTER_POPULATE="EVENT_AFTER_POPULATE",BI.shortcut("bi.detail_pager",BI.DetailPager)},function(e,t){BI.SegmentButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var e=BI.SegmentButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-segment-button bi-list-item-select",shadow:!0,readonly:!0,hgap:5})},_init:function(){BI.SegmentButton.superclass._init.apply(this,arguments);var e=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textHeight:e.height,whiteSpace:e.whiteSpace,text:e.text,value:e.value,hgap:e.hgap})},setSelected:function(){BI.SegmentButton.superclass.setSelected.apply(this,arguments)},setText:function(e){BI.SegmentButton.superclass.setText.apply(this,arguments),this.text.setText(e)},destroy:function(){BI.SegmentButton.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.segment_button",BI.SegmentButton)},function(e,t){BI.Segment=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Segment.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-segment",items:[],height:24})},_init:function(){BI.Segment.superclass._init.apply(this,arguments);var i=this,e=this.options;this.buttonGroup=BI.createWidget({element:this,type:"bi.button_group",value:e.value,items:BI.createItems(e.items,{type:"bi.segment_button",height:e.height-2,whiteSpace:e.whiteSpace}),layout:[{type:"bi.center"}]}),this.buttonGroup.on(BI.Controller.EVENT_CHANGE,function(){i.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.buttonGroup.on(BI.ButtonGroup.EVENT_CHANGE,function(e,t){i.fireEvent(BI.Segment.EVENT_CHANGE,e,t)})},_setEnable:function(e){BI.Segment.superclass._setEnable.apply(this,arguments),!0===e?this.element.removeClass("base-disabled disabled"):!1===e&&this.element.addClass("base-disabled disabled")},setValue:function(e){this.buttonGroup.setValue(e)},setEnabledValue:function(e){this.buttonGroup.setEnabledValue(e)},getValue:function(){return this.buttonGroup.getValue()}}),BI.Segment.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.segment",BI.Segment)},function(e,t){BI.MultiSelectBar=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiSelectBar.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multi-select-bar",height:25,text:BI.i18nText("BI-Select_All"),isAllCheckedBySelectedValue:BI.emptyFn,disableSelected:!0,isHalfCheckedBySelectedValue:function(e){return 0<e.length},halfSelected:!1,iconWrapperWidth:26})},_init:function(){BI.MultiSelectBar.superclass._init.apply(this,arguments);var e=this,t=this.options,i=!0===t.selected,n=!t.selected&&t.halfSelected;this.checkbox=BI.createWidget({type:"bi.checkbox",stopPropagation:!0,handler:function(){e.setSelected(e.isSelected())},selected:i,invisible:n}),this.half=BI.createWidget({type:"bi.half_icon_button",stopPropagation:!0,handler:function(){e.setSelected(!0)},invisible:i||!n}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,e.isSelected(),e)}),this.checkbox.on(BI.Checkbox.EVENT_CHANGE,function(){e.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,e.isSelected(),e)}),this.half.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,e.isSelected(),e)}),this.half.on(BI.HalfIconButton.EVENT_CHANGE,function(){e.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,e.isSelected(),e)}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:t.height,height:t.height,hgap:t.hgap,text:t.text,keyword:t.keyword,value:t.value,py:t.py}),BI.createWidget({type:"bi.htape",element:this,items:[{width:t.iconWrapperWidth,el:{type:"bi.center_adapt",items:[this.checkbox,this.half]}},{el:this.text}]})},_setSelected:function(e){this.checkbox.setSelected(!!e)},beforeClick:function(){var e=this.isHalfSelected(),t=this.isSelected();!0===e?this.setSelected(!0):this.setSelected(!t)},setSelected:function(e){this.checkbox.setSelected(e),this.setHalfSelected(!1)},setHalfSelected:function(e){this.halfSelected=!!e,!0===e?(this.checkbox.setSelected(!1),this.half.visible(),this.checkbox.invisible()):(this.half.invisible(),this.checkbox.visible())},isHalfSelected:function(){return!this.isSelected()&&!!this.halfSelected},isSelected:function(){return this.checkbox.isSelected()},setValue:function(e){BI.MultiSelectBar.superclass.setValue.apply(this,arguments);var t=this.options.isAllCheckedBySelectedValue.apply(this,arguments);this._setSelected(t),t||this.setHalfSelected(this.options.isHalfCheckedBySelectedValue.apply(this,arguments))},doClick:function(){BI.MultiSelectBar.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,this.isSelected(),this)}}),BI.MultiSelectBar.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_bar",BI.MultiSelectBar)},function(e,t){BI.LevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.LevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-level-tree",el:{chooseType:0},expander:{},items:[],value:""})},_init:function(){BI.LevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(n,r,o){var a=this;return BI.each(n,function(e,t){var i={layer:r};BI.isKey(t.id)||(t.id=BI.UUID()),i.pNode=o,!0===t.isParent||!0===t.parent||BI.isNotEmptyArray(t.children)?(i.type="bi.mid_plus_group_node",e===n.length-1&&(i.type="bi.last_plus_group_node",i.isLastNode=!0),0!==e||o||(i.type="bi.first_plus_group_node"),0===e&&e===n.length-1&&(i.type="bi.plus_group_node"),BI.defaults(t,i),a._formatItems(t.children,r+1,t)):(i.type="bi.mid_tree_leaf_item",0!==e||o||(i.type="bi.first_tree_leaf_item"),e===n.length-1&&(i.type="bi.last_tree_leaf_item"),BI.defaults(t,i))}),n},_assertId:function(e){BI.each(e,function(e,t){BI.isKey(t.id)||(t.id=BI.UUID())})},initTree:function(e){var n=this,t=this.options;this.empty(),this._assertId(e),this.tree=BI.createWidget({type:"bi.custom_tree",element:this,expander:BI.extend({el:{},popup:{type:"bi.custom_tree"}},t.expander),items:this._formatItems(BI.Tree.transformToTreeFormat(e),0),value:t.value,el:BI.extend({type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},t.el)}),this.tree.on(BI.Controller.EVENT_CHANGE,function(e,t,i){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&n.fireEvent(BI.LevelTree.EVENT_CHANGE,t,i)})},stroke:function(e){this.tree.stroke.apply(this.tree,arguments)},populate:function(e,t){e=this._formatItems(BI.Tree.transformToTreeFormat(e),0),this.tree.populate(e,t)},setValue:function(e){this.tree.setValue(e)},getValue:function(){return this.tree.getValue()},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(e){return this.tree.getNodeById(e)},getNodeByValue:function(e){return this.tree.getNodeByValue(e)}}),BI.LevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.level_tree",BI.LevelTree)},function(e,t){BI.EditorTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var e=BI.EditorTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-editor-trigger bi-border",height:24,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!1,watermark:"",errorText:""})},_init:function(){this.options.height-=2,BI.EditorTrigger.superclass._init.apply(this,arguments);var e=this,t=this.options;this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:t.height,value:t.value,validationChecker:t.validationChecker,quitChecker:t.quitChecker,allowBlank:t.allowBlank,watermark:t.watermark,errorText:t.errorText,title:function(){return e.getValue()}}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){e.fireEvent(BI.EditorTrigger.EVENT_CHANGE,arguments)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){e.fireEvent(BI.EditorTrigger.EVENT_FOCUS,arguments)}),this.editor.on(BI.SignEditor.EVENT_EMPTY,function(){e.fireEvent(BI.EditorTrigger.EVENT_EMPTY,arguments)}),this.editor.on(BI.SignEditor.EVENT_VALID,function(){e.fireEvent(BI.EditorTrigger.EVENT_VALID,arguments)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){e.fireEvent(BI.EditorTrigger.EVENT_ERROR,arguments)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.trigger_icon_button",width:t.triggerWidth||t.height},width:t.triggerWidth||t.height}]})},getValue:function(){return this.editor.getValue()},setValue:function(e){this.editor.setValue(e)},setText:function(e){this.editor.setState(e)}}),BI.EditorTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.EditorTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.EditorTrigger.EVENT_EMPTY="EVENT_EMPTY",BI.EditorTrigger.EVENT_VALID="EVENT_VALID",BI.EditorTrigger.EVENT_ERROR="EVENT_ERROR",BI.shortcut("bi.editor_trigger",BI.EditorTrigger)},function(e,t){BI.IconTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.IconTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-icon-trigger",extraCls:"pull-down-font",el:{},height:24})},_init:function(){var e=this.options;BI.IconTrigger.superclass._init.apply(this,arguments),this.iconButton=BI.createWidget(e.el,{type:"bi.trigger_icon_button",element:this,width:e.width,height:e.height,extraCls:e.extraCls})}}),BI.shortcut("bi.icon_trigger",BI.IconTrigger)},function(e,t){BI.IconTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var e=BI.IconTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-text-trigger",height:24,iconHeight:null,iconWidth:null,textCls:""})},_init:function(){BI.IconTextTrigger.superclass._init.apply(this,arguments);var t=this,e=this.options;this._const;this.text=BI.createWidget({type:"bi.label",cls:"select-text-label"+(BI.isKey(e.textCls)?" "+e.textCls:""),textAlign:"left",height:e.height,text:e.text}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:e.triggerWidth||e.height}),BI.createWidget({element:this,type:"bi.htape",ref:function(e){t.wrapper=e},items:[{el:{type:"bi.icon_change_button",cls:"icon-combo-trigger-icon",iconCls:e.iconCls,ref:function(e){t.icon=e},iconHeight:e.iconHeight,iconWidth:e.iconWidth,disableSelected:!0},width:BI.isEmptyString(e.iconCls)?0:e.iconWrapperWidth||e.height},{el:this.text,lgap:BI.isEmptyString(e.iconCls)?5:0},{el:this.trigerButton,width:e.triggerWidth||e.height}]})},setValue:function(e){this.text.setValue(e)},setIcon:function(e){var t=this.options;this.icon.setIcon(e);var i=this.wrapper.attr("items")[0],n=this.wrapper.attr("items")[1];BI.isNull(e)||BI.isEmptyString(e)?0!==i.width&&(i.width=0,n.lgap=5,this.wrapper.resize()):i.width!==(t.iconWrapperWidth||t.height)&&(i.width=t.iconWrapperWidth||t.height,n.lgap=0,this.wrapper.resize())},setTextCls:function(e){var t=this.options,i=t.textCls;t.textCls=e,this.text.element.removeClass(i).addClass(e)},setText:function(e){this.text.setText(e)}}),BI.shortcut("bi.icon_text_trigger",BI.IconTextTrigger)},function(e,t){BI.SelectIconTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SelectIconTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-text-trigger bi-border",height:24,iconHeight:null,iconWidth:null,iconCls:""})},_init:function(){this.options.height-=2,BI.SelectIconTextTrigger.superclass._init.apply(this,arguments);var e=this.options,t=this._digist(e.value,e.items);this.trigger=BI.createWidget({type:"bi.icon_text_trigger",element:this,text:t.text,textCls:t.textCls,iconCls:t.iconCls,height:e.height,iconHeight:e.iconHeight,iconWidth:e.iconWidth,iconWrapperWidth:e.iconWrapperWidth})},_digist:function(i,e){var n,t=this.options;i=BI.isArray(i)?i:[i];var r=BI.Tree.transformToArrayFormat(e);return BI.any(r,function(e,t){if(BI.deepContains(i,t.value))return n={text:t.text||t.value,iconCls:t.iconCls},!0}),BI.isNotNull(n)?{text:n.text,textCls:"",iconCls:n.iconCls}:{text:BI.isFunction(t.text)?t.text():t.text,textCls:"bi-water-mark",iconCls:t.iconCls}},setValue:function(e){var t=this._digist(e,this.options.items);this.trigger.setText(t.text),this.trigger.setIcon(t.iconCls),this.trigger.setTextCls(t.textCls)},populate:function(e){this.options.items=e}}),BI.shortcut("bi.select_icon_text_trigger",BI.SelectIconTextTrigger)},function(e,t){BI.TextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var e=BI.TextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-text-trigger",height:24,textCls:""})},_init:function(){BI.TextTrigger.superclass._init.apply(this,arguments);var e=this,t=this.options,i=this._const;this.text=BI.createWidget({type:"bi.label",cls:"select-text-label"+(BI.isKey(t.textCls)?" "+t.textCls:""),textAlign:"left",height:t.height,text:t.text,title:function(){return e.text.getText()},tipType:t.tipType,warningTitle:t.warningTitle,hgap:i.hgap,readonly:t.readonly}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:t.triggerWidth||t.height}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:t.triggerWidth||t.height}]})},setTextCls:function(e){var t=this.options,i=t.textCls;t.textCls=e,this.text.element.removeClass(i).addClass(e)},setText:function(e){this.text.setText(e)},setTipType:function(e){this.text.options.tipType=e}}),BI.shortcut("bi.text_trigger",BI.TextTrigger)},function(e,t){BI.SelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-text-trigger bi-border bi-focus-shadow",height:24})},_init:function(){this.options.height-=2,BI.SelectTextTrigger.superclass._init.apply(this,arguments);var e=this.options,t=this._digest(e.value,e.items);this.trigger=BI.createWidget({type:"bi.text_trigger",element:this,height:e.height,readonly:e.readonly,text:t.text,textCls:t.textCls,tipType:e.tipType,warningTitle:e.warningTitle})},_digest:function(i,e){var t=this.options;i=BI.isArray(i)?i:[i];var n=[],r=BI.Tree.transformToArrayFormat(e);return BI.each(r,function(e,t){BI.deepContains(i,t.value)&&!BI.contains(n,t.text||t.value)&&n.push(t.text||t.value)}),0<n.length?{textCls:"",text:n.join(",")}:{textCls:"bi-water-mark",text:BI.isFunction(t.text)?t.text():t.text}},setValue:function(e){var t=this._digest(e,this.options.items);this.trigger.setTextCls(t.textCls),this.trigger.setText(t.text)},setTipType:function(e){this.trigger.setTipType(e)},populate:function(e){this.options.items=e}}),BI.shortcut("bi.select_text_trigger",BI.SelectTextTrigger)},function(e,t){BI.SmallSelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SmallSelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-small-select-text-trigger bi-border",height:20})},_init:function(){this.options.height-=2,BI.SmallSelectTextTrigger.superclass._init.apply(this,arguments);var e=this.options,t=this._digest(e.value,e.items);this.trigger=BI.createWidget({type:"bi.small_text_trigger",element:this,height:e.height-2,text:t.text,cls:t.cls})},_digest:function(i,e){var t=this.options;i=BI.isArray(i)?i:[i];var n=[],r=BI.Tree.transformToArrayFormat(e);return BI.each(r,function(e,t){BI.deepContains(i,t.value)&&!BI.contains(n,t.text||t.value)&&n.push(t.text||t.value)}),0<n.length?{cls:"",text:n.join(",")}:{cls:"bi-water-mark",text:t.text}},setValue:function(e){var t=this._digest(e,this.options.items);this.trigger.element.removeClass("bi-water-mark").addClass(t.cls),this.trigger.setText(t.text)},populate:function(e){this.options.items=e}}),BI.shortcut("bi.small_select_text_trigger",BI.SmallSelectTextTrigger)},function(e,t){BI.SmallTextTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var e=BI.SmallTextTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-text-trigger",height:20})},_init:function(){BI.SmallTextTrigger.superclass._init.apply(this,arguments);var e=this.options,t=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:e.height,text:e.text,hgap:t.hgap}),this.trigerButton=BI.createWidget({type:"bi.trigger_icon_button",width:e.triggerWidth||e.height}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.text},{el:this.trigerButton,width:e.triggerWidth||e.height}]})},setValue:function(e){this.text.setValue(e)},setText:function(e){this.text.setText(e)}}),BI.shortcut("bi.small_text_trigger",BI.SmallTextTrigger)},function(e,t){BI.MonthDateCombo=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.MonthDateCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-combo",height:24,container:null})},_init:function(){BI.MonthDateCombo.superclass._init.apply(this,arguments);var e=this,t=this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.month_popup",behaviors:t.behaviors}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){e.setValue(e.popup.getValue())}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",container:t.container,element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:this.popup}}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){e.combo.hideView(),e.fireEvent(BI.MonthDateCombo.EVENT_CHANGE)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){e.doBehavior()})},setValue:function(e){this.trigger.setValue(e),this.popup.setValue(e)},getValue:function(){return this.popup.getValue()}}),BI.MonthDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_date_combo",BI.MonthDateCombo)},function(e,t){BI.YearDateCombo=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.YearDateCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-combo",min:"1900-01-01",max:"2099-12-31",behaviors:{},height:24,container:null})},_init:function(){BI.YearDateCombo.superclass._init.apply(this,arguments);var e=this,t=this.options;this.trigger=BI.createWidget({type:"bi.date_triangle_trigger"}),this.popup=BI.createWidget({type:"bi.year_popup",behaviors:t.behaviors,min:t.min,max:t.max}),this.popup.on(BI.YearPopup.EVENT_CHANGE,function(){e.setValue(e.popup.getValue()),e.combo.hideView(),e.fireEvent(BI.YearDateCombo.EVENT_CHANGE)}),this.combo=BI.createWidget({type:"bi.combo",offsetStyle:"center",element:this,container:t.container,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:100,stopPropagation:!1,el:this.popup}}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){e.fireEvent(BI.YearDateCombo.EVENT_CHANGE)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){e.doBehavior()})},setMinDate:function(e){this.popup.setMinDate(e)},setMaxDate:function(e){this.popup.setMaxDate(e)},setValue:function(e){this.trigger.setValue(e),this.popup.setValue(e)},getValue:function(){return this.popup.getValue()}}),BI.YearDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_date_combo",BI.YearDateCombo)},function(e,t){BI.DatePicker=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.DatePicker.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:"bi-date-picker",height:40,min:"1900-01-01",max:"2099-12-31"})},_init:function(){BI.DatePicker.superclass._init.apply(this,arguments);var e=this,t=this.options;this._year=BI.getDate().getFullYear(),this._month=BI.getDate().getMonth()+1,this.left=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:24,height:24}),this.left.on(BI.IconButton.EVENT_CHANGE,function(){1===e._month?e.setValue({year:e.year.getValue()-1,month:12}):e.setValue({year:e.year.getValue(),month:e.month.getValue()-1}),e.fireEvent(BI.DatePicker.EVENT_CHANGE),e._checkLeftValid(),e._checkRightValid()}),this.right=BI.createWidget({type:"bi.icon_button",cls:"next-page-h-font",width:24,height:24}),this.right.on(BI.IconButton.EVENT_CHANGE,function(){12===e._month?e.setValue({year:e.year.getValue()+1,month:1}):e.setValue({year:e.year.getValue(),month:e.month.getValue()+1}),e.fireEvent(BI.DatePicker.EVENT_CHANGE),e._checkLeftValid(),e._checkRightValid()}),this.year=BI.createWidget({type:"bi.year_date_combo",behaviors:t.behaviors,min:t.min,max:t.max}),this.year.on(BI.YearDateCombo.EVENT_CHANGE,function(){e.setValue({year:e.year.getValue(),month:e.month.getValue()}),e.fireEvent(BI.DatePicker.EVENT_CHANGE)}),this.month=BI.createWidget({type:"bi.month_date_combo",behaviors:t.behaviors}),this.month.on(BI.MonthDateCombo.EVENT_CHANGE,function(){e.setValue({year:e.year.getValue(),month:e.month.getValue()}),e.fireEvent(BI.DatePicker.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:{type:"bi.center_adapt",items:[this.left]},width:24},{type:"bi.center_adapt",items:[{el:{type:"bi.horizontal",width:120,rgap:10,items:[{el:this.year,lgap:10},this.month]}}]},{el:{type:"bi.center_adapt",items:[this.right]},width:24}]}),this.setValue({year:this._year,month:this._month})},_checkLeftValid:function(){var e=this.options,t=!(1===this._month&&this._year===BI.parseDateTime(e.min,"%Y-%X-%d").getFullYear());return this.left.setEnable(t),t},_checkRightValid:function(){var e=this.options,t=!(12===this._month&&this._year===BI.parseDateTime(e.max,"%Y-%X-%d").getFullYear());return this.right.setEnable(t),t},setMinDate:function(e){this.year.setMinDate(e)},setMaxDate:function(e){this.year.setMaxDate(e)},setValue:function(e){this._year=BI.parseInt(e.year),this._month=BI.parseInt(e.month),this.year.setValue(e.year),this.month.setValue(e.month),this._checkLeftValid(),this._checkRightValid()},getValue:function(){return{year:this.year.getValue(),month:this.month.getValue()}}}),BI.DatePicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.date_picker",BI.DatePicker)},function(e,t){BI.YearPicker=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.YearPicker.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:"bi-year-picker",behaviors:{},height:40,min:"1900-01-01",max:"2099-12-31"})},_init:function(){BI.YearPicker.superclass._init.apply(this,arguments);var e=this,t=this.options;this._year=BI.getDate().getFullYear(),this.left=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:25,height:25}),this.left.on(BI.IconButton.EVENT_CHANGE,function(){e.setValue(e.year.getValue()-1),e.fireEvent(BI.YearPicker.EVENT_CHANGE),e._checkLeftValid(),e._checkRightValid()}),this.right=BI.createWidget({type:"bi.icon_button",cls:"next-page-h-font",width:25,height:25}),this.right.on(BI.IconButton.EVENT_CHANGE,function(){e.setValue(e.year.getValue()+1),e.fireEvent(BI.YearPicker.EVENT_CHANGE),e._checkLeftValid(),e._checkRightValid()}),this.year=BI.createWidget({type:"bi.year_date_combo",min:t.min,behaviors:t.behaviors,max:t.max,width:50}),this.year.on(BI.YearDateCombo.EVENT_CHANGE,function(){e.setValue(e.year.getValue()),e.fireEvent(BI.YearPicker.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:{type:"bi.center_adapt",items:[this.left]},width:25},{type:"bi.center_adapt",items:[{el:this.year}]},{el:{type:"bi.center_adapt",items:[this.right]},width:25}]}),this.setValue({year:this._year})},_checkLeftValid:function(){var e=this.options,t=!(this._year===BI.parseDateTime(e.min,"%Y-%X-%d").getFullYear());return this.left.setEnable(t),t},_checkRightValid:function(){var e=this.options,t=!(this._year===BI.parseDateTime(e.max,"%Y-%X-%d").getFullYear());return this.right.setEnable(t),t},setMinDate:function(e){this.options.min=e,this.year.setMinDate(e),this._checkLeftValid(),this._checkRightValid()},setMaxDate:function(e){this.options.max=e,this.year.setMaxDate(e),this._checkLeftValid(),this._checkRightValid()},setValue:function(e){this._year=e,this.year.setValue(e),this._checkLeftValid(),this._checkRightValid()},getValue:function(){return this.year.getValue()}}),BI.YearPicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_picker",BI.YearPicker)},function(e,t){BI.DateCalendarPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.DateCalendarPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:"bi-date-calendar-popup",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_createNav:function(e){var t=BI.Calendar.getDateJSONByPage(e);return BI.createWidget({type:"bi.calendar",logic:{dynamic:!0},min:this.options.min,max:this.options.max,year:t.year,month:t.month,day:1})},_init:function(){BI.DateCalendarPopup.superclass._init.apply(this,arguments);var e=this,t=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this._day=this.today.getDate(),this.selectedTime=t.selectedTime||{year:this._year,month:this._month,day:this._day},this.datePicker=BI.createWidget({type:"bi.date_picker",behaviors:t.behaviors,min:t.min,max:t.max}),this.calendar=BI.createWidget({direction:"top",logic:{dynamic:!0},type:"bi.navigation",tab:this.datePicker,cardCreator:BI.bind(this._createNav,this),afterCardCreated:function(){},afterCardShow:function(){this.setValue(e.selectedTime)}}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){e.selectedTime=e.datePicker.getValue(),e.selectedTime.day=1,e.calendar.setSelect(BI.Calendar.getPageByDateJSON(e.selectedTime))}),this.calendar.on(BI.Navigation.EVENT_CHANGE,function(){e.selectedTime=e.calendar.getValue(),e.setValue(e.selectedTime),e.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.calendar,left:5,right:5},{el:{type:"bi.layout",cls:"bi-split-top"},height:1,top:40,left:0,right:0}]})},_checkMin:function(){var e=this.calendar.getSelectedCard();BI.isNotNull(e)&&e.setMinDate(this.options.min)},_checkMax:function(){var e=this.calendar.getSelectedCard();BI.isNotNull(e)&&e.setMaxDate(this.options.max)},setMinDate:function(e){BI.isNotEmptyString(this.options.min)&&(this.options.min=e,this.datePicker.setMinDate(e),this._checkMin())},setMaxDate:function(e){BI.isNotEmptyString(this.options.max)&&(this.options.max=e,this.datePicker.setMaxDate(e),this._checkMax())},setValue:function(e){this.datePicker.setValue(e),this.calendar.setSelect(BI.Calendar.getPageByDateJSON(e)),this.calendar.setValue(e),this.selectedTime=e},getValue:function(){return this.selectedTime}}),BI.DateCalendarPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.date_calendar_popup",BI.DateCalendarPopup)},function(e,t){BI.MonthPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MonthPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-popup",behaviors:{}})},_init:function(){BI.MonthPopup.superclass._init.apply(this,arguments);var t=this,e=this.options,i=[1,7,2,8,3,9,4,10,5,11,6,12],n=[];n.push(i.slice(0,2)),n.push(i.slice(2,4)),n.push(i.slice(4,6)),n.push(i.slice(6,8)),n.push(i.slice(8,10)),n.push(i.slice(10,12)),n=BI.map(n,function(e,t){return BI.map(t,function(e,t){return{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:23,width:38,value:t,text:t}})}),this.month=BI.createWidget({type:"bi.button_group",element:this,behaviors:e.behaviors,items:BI.createItems(n,{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({dynamic:!0},{columns:2,rows:6,columnSize:[.5,.5],rowSize:25})),{type:"bi.center_adapt",vgap:1,hgap:2}],value:e.value}),this.month.on(BI.Controller.EVENT_CHANGE,function(e){t.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&t.fireEvent(BI.MonthPopup.EVENT_CHANGE)})},getValue:function(){return this.month.getValue()[0]},setValue:function(e){e=BI.parseInt(e),this.month.setValue([e])}}),BI.MonthPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_popup",BI.MonthPopup)},function(e,t){BI.YearPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31"})},_createYearCalendar:function(e){var t=this.options,i=this._year,n=BI.createWidget({type:"bi.year_calendar",behaviors:t.behaviors,min:t.min,max:t.max,logic:{dynamic:!0},year:i+12*e});return n.setValue(this._year),n},_init:function(){BI.YearPopup.superclass._init.apply(this,arguments);var t=this,e=this.options;this.selectedYear=this._year=BI.getDate().getFullYear(),this.backBtn=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:24,height:24,value:-1}),this.preBtn=BI.createWidget({type:"bi.icon_button",cls:"next-page-h-font",width:24,height:24,value:1}),this.navigation=BI.createWidget({type:"bi.navigation",element:this,single:!0,logic:{dynamic:!0},tab:{cls:"year-popup-navigation bi-high-light bi-split-top",height:24,items:[this.backBtn,this.preBtn]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(t.selectedYear);var e=this.getSelectedCard();e&&t.backBtn.setEnable(!e.isFrontYear()),e&&t.preBtn.setEnable(!e.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){t.selectedYear=this.getValue(),t.fireEvent(BI.Controller.EVENT_CHANGE,arguments),t.fireEvent(BI.YearPopup.EVENT_CHANGE,t.selectedYear)}),BI.isKey(e.value)&&this.setValue(e.value)},_checkMin:function(){var e=this.navigation.getSelectedCard();BI.isNotNull(e)&&(e.setMinDate(this.options.min),this.backBtn.setEnable(!e.isFrontYear()),this.preBtn.setEnable(!e.isFinalYear()))},_checkMax:function(){var e=this.navigation.getSelectedCard();BI.isNotNull(e)&&(e.setMaxDate(this.options.max),this.backBtn.setEnable(!e.isFrontYear()),this.preBtn.setEnable(!e.isFinalYear()))},setMinDate:function(e){BI.isNotEmptyString(this.options.min)&&(this.options.min=e,this._checkMin())},setMaxDate:function(e){BI.isNotEmptyString(this.options.max)&&(this.options.max=e,this._checkMax())},getValue:function(){return this.selectedYear},setValue:function(e){var t=this.options;e=BI.parseInt(e);var i=BI.parseDateTime(t.min,"%Y-%X-%d"),n=BI.parseDateTime(t.max,"%Y-%X-%d");BI.checkDateVoid(e,1,1,BI.print(BI.getDate(i.getFullYear(),0,1),"%Y-%X-%d"),BI.print(BI.getDate(n.getFullYear(),0,1),"%Y-%X-%d"))[0]?(e=BI.getDate().getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(e)),this.navigation.setValue("")):(this.selectedYear=e,this.navigation.setSelect(BI.YearCalendar.getPageByYear(e)),this.navigation.setValue(e))}}),BI.YearPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_popup",BI.YearPopup)},function(e,t){BI.DateTriangleTrigger=BI.inherit(BI.Trigger,{_const:{height:24,iconWidth:12,iconHeight:12},_defaultConfig:function(){return BI.extend(BI.DateTriangleTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-triangle-trigger pull-down-ha-font cursor-pointer",height:24})},_init:function(){BI.DateTriangleTrigger.superclass._init.apply(this,arguments);var e=this.options,t=this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"right",text:e.text,value:e.value,height:t.height}),BI.createWidget({type:"bi.vertical_adapt",element:this,items:[{el:this.text,rgap:5},{type:"bi.icon_label",width:16}]})},setValue:function(e){this.text.setValue(e)},getValue:function(){return this.text.getValue()},setText:function(e){this.text.setText(e)},getText:function(){return this.item.getText()},getKey:function(){}}),BI.shortcut("bi.date_triangle_trigger",BI.DateTriangleTrigger)},function(e,t){BI.StaticDatePaneCard=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.StaticDatePaneCard.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:"bi-date-pane",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_init:function(){BI.StaticDatePaneCard.superclass._init.apply(this,arguments);var n=this,e=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this.selectedTime=e.selectedTime||{year:this._year,month:this._month},this.datePicker=BI.createWidget({type:"bi.date_picker",behaviors:e.behaviors,min:e.min,max:e.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){var e=n.datePicker.getValue(),t=BI.getMonthDays(BI.getDate(e.year,e.month-1,1)),i=n.selectedTime.day||0;t<i&&(i=t),n.selectedTime={year:e.year,month:e.month},0!==i&&(n.selectedTime.day=i),n.calendar.setSelect(BI.Calendar.getPageByDateJSON(n.selectedTime)),n.calendar.setValue(n.selectedTime),0!==i&&n.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)}),this.calendar=BI.createWidget({direction:"custom",type:"bi.navigation",tab:this.datePicker,cardCreator:BI.bind(this._createNav,this)}),this.calendar.on(BI.Navigation.EVENT_CHANGE,function(){n.selectedTime=n.calendar.getValue(),n.calendar.empty(),n.setValue(n.selectedTime),n.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)}),this.setValue(e.selectedTime),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.datePicker,height:40},this.calendar],hgap:10}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.layout",cls:"bi-split-top"},height:1,top:40,left:0,right:0}]})},_createNav:function(e){var t=BI.Calendar.getDateJSONByPage(e);return BI.createWidget({type:"bi.calendar",logic:{dynamic:!1},min:this.options.min,max:this.options.max,year:t.year,month:t.month,day:this.selectedTime.day})},_getNewCurrentDate:function(){var e=BI.getDate();return{year:e.getFullYear(),month:e.getMonth()+1}},_setCalenderValue:function(e){this.calendar.setSelect(BI.Calendar.getPageByDateJSON(e)),this.calendar.setValue(e),this.selectedTime=e},_setDatePicker:function(e){BI.isNull(e)||BI.isNull(e.year)||BI.isNull(e.month)?this.datePicker.setValue(this._getNewCurrentDate()):this.datePicker.setValue(e)},_setCalendar:function(e){BI.isNull(e)||BI.isNull(e.day)?(this.calendar.empty(),this._setCalenderValue(this._getNewCurrentDate())):this._setCalenderValue(e)},setValue:function(e){this._setDatePicker(e),this._setCalendar(e)},getValue:function(){return this.selectedTime}}),BI.shortcut("bi.static_date_pane_card",BI.StaticDatePaneCard)},function(e,t){BI.DynamicDatePane=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-pane"},render:function(){var i=this,t=this.options;return{type:"bi.vtape",items:[{el:{type:"bi.linear_segment",cls:"bi-split-bottom",height:30,items:BI.createItems([{text:BI.i18nText("BI-Multi_Date_YMD"),value:BI.DynamicDatePane.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicDatePane.Dynamic}],{textAlign:"center"}),listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(){var e=this.getValue()[0];switch(i.dateTab.setSelect(e),e){case BI.DynamicDatePane.Static:var t=BI.DynamicDateHelper.getCalculation(i.dynamicPane.getValue());i.ymd.setValue({year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()});break;case BI.DynamicDatePane.Dynamic:i.dynamicPane.setValue({year:0})}i.fireEvent("EVENT_CHANGE")}}],ref:function(){i.switcher=this}},height:30},{type:"bi.tab",ref:function(){i.dateTab=this},showIndex:BI.DynamicDatePane.Static,cardCreator:function(e){switch(e){case BI.DynamicDatePane.Static:return{type:"bi.static_date_pane_card",behaviors:t.behaviors,listeners:[{eventName:"EVENT_CHANGE",action:function(){i.fireEvent("EVENT_CHANGE")}}],ref:function(){i.ymd=this}};case BI.DynamicDatePane.Dynamic:default:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){i._checkValue(i.getValue())&&i.fireEvent("EVENT_CHANGE")}}],ref:function(){i.dynamicPane=this}}}}}]}},mounted:function(){this.setValue(this.options.value)},_checkValueValid:function(e){return BI.isNull(e)||BI.isEmptyObject(e)||BI.isEmptyString(e)},_checkValue:function(e){switch(e.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(e.value);case BI.DynamicDateCombo.Static:default:return!0}},setValue:function(e){var t=(e=e||{}).type||BI.DynamicDateCombo.Static,i=e.value||e;switch(this.switcher.setValue(t),this.dateTab.setSelect(t),t){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(i);break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(i)){var n=BI.getDate();this.ymd.setValue({year:n.getFullYear(),month:n.getMonth()+1})}else this.ymd.setValue(i)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.shortcut("bi.dynamic_date_pane",BI.DynamicDatePane),BI.extend(BI.DynamicDatePane,{Static:1,Dynamic:2})},function(e,t){BI.DateTimeCombo=BI.inherit(BI.Single,{constants:{popupHeight:290,popupWidth:270,comboAdjustHeight:1,border:1},_defaultConfig:function(){return BI.extend(BI.DateTimeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-combo bi-border bi-border-radius",width:200,height:24,minDate:"1900-01-01",maxDate:"2099-12-31"})},_init:function(){BI.DateTimeCombo.superclass._init.apply(this,arguments);var e=this,t=this.options,i=BI.getDate();this.storeValue=BI.isNotNull(t.value)?t.value:{year:i.getFullYear(),month:i.getMonth()+1,day:i.getDate(),hour:i.getHours(),minute:i.getMinutes(),second:i.getSeconds()},this.trigger=BI.createWidget({type:"bi.date_time_trigger",min:t.minDate,max:t.maxDate,value:t.value}),this.popup=BI.createWidget({type:"bi.date_time_popup",behaviors:t.behaviors,min:t.minDate,max:t.maxDate,value:t.value}),e.setValue(this.storeValue),this.popup.on(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE,function(){e.setValue(e.storeValue),e.hidePopupView(),e.fireEvent(BI.DateTimeCombo.EVENT_CANCEL)}),this.popup.on(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE,function(){e.storeValue=e.popup.getValue(),e.setValue(e.storeValue),e.hidePopupView(),e.fireEvent(BI.DateTimeCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",container:t.container,toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,adjustLength:this.constants.comboAdjustHeight,popup:{el:this.popup,width:this.constants.popupWidth,stopPropagation:!1},hideChecker:function(e){return 0===n.element.find(e.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){e.popup.setValue(e.storeValue),e.fireEvent(BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW)});var n=BI.createWidget({type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:24,height:24});n.on(BI.IconButton.EVENT_CHANGE,function(){e.combo.isViewVisible()||e.combo.showView()}),BI.createWidget({type:"bi.htape",element:this,items:[{type:"bi.absolute",items:[{el:this.combo,top:0,left:0,right:0,bottom:0},{el:n,top:0,right:0}]}]})},setValue:function(e){this.storeValue=e,this.popup.setValue(e),this.trigger.setValue(e)},getValue:function(){return this.storeValue},hidePopupView:function(){this.combo.hideView()}}),BI.DateTimeCombo.EVENT_CANCEL="EVENT_CANCEL",BI.DateTimeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DateTimeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.date_time_combo",BI.DateTimeCombo)},function(e,t){BI.DateTimePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DateTimePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-popup",width:268,height:374})},_init:function(){BI.DateTimePopup.superclass._init.apply(this,arguments);var t=this,e=this.options;this.cancelButton=BI.createWidget({type:"bi.text_button",cls:"multidate-popup-button bi-border-top bi-border-right",shadow:!0,text:BI.i18nText("BI-Basic_Cancel")}),this.cancelButton.on(BI.TextButton.EVENT_CHANGE,function(){t.fireEvent(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE)}),this.okButton=BI.createWidget({type:"bi.text_button",cls:"multidate-popup-button bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_OK")}),this.okButton.on(BI.TextButton.EVENT_CHANGE,function(){t.fireEvent(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE)}),this.dateCombo=BI.createWidget({type:"bi.date_calendar_popup",behaviors:e.behaviors,min:t.options.min,max:t.options.max}),t.dateCombo.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){t.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}),this.dateButton=BI.createWidget({type:"bi.grid",items:[[this.cancelButton,this.okButton]]}),BI.createWidget({element:this,type:"bi.vtape",items:[{el:this.dateCombo},{el:{type:"bi.center_adapt",cls:"bi-split-top",items:[{type:"bi.dynamic_date_time_select",ref:function(e){t.timeSelect=e}}]},height:50},{el:this.dateButton,height:30}]}),this.setValue(e.value)},setValue:function(e){var t,i=e;BI.isNull(i)?(t=BI.getDate(),this.dateCombo.setValue({year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}),this.timeSelect.setValue({hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds()})):(this.dateCombo.setValue({year:i.year,month:i.month,day:i.day}),this.timeSelect.setValue({hour:i.hour,minute:i.minute,second:i.second}))},getValue:function(){return BI.extend({year:this.dateCombo.getValue().year,month:this.dateCombo.getValue().month,day:this.dateCombo.getValue().day},this.timeSelect.getValue())}}),BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE="BUTTON_CANCEL_EVENT_CHANGE",BI.DateTimePopup.CALENDAR_EVENT_CHANGE="CALENDAR_EVENT_CHANGE",BI.shortcut("bi.date_time_popup",BI.DateTimePopup)},function(e,t){BI.DateTimeTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){return BI.extend(BI.DateTimeTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-date-time-trigger",min:"1900-01-01",max:"2099-12-31",height:24,width:200})},_init:function(){BI.DateTimeTrigger.superclass._init.apply(this,arguments);var e=this.options,t=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:e.height,width:e.width,hgap:t.hgap}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.text},{el:BI.createWidget(),width:e.height}]}),this.setValue(e.value)},_printTime:function(e){return e<10?"0"+e:e},setValue:function(e){var t,i=e;if(BI.isNull(i))i=BI.getDate(),t=BI.print(i,"%Y-%X-%d %H:%M:%S");else{var n=BI.getDate(i.year,i.month-1,i.day,i.hour,i.minute,i.second);t=BI.print(n,"%Y-%X-%d %H:%M:%S")}this.text.setText(t),this.text.setTitle(t)}}),BI.shortcut("bi.date_time_trigger",BI.DateTimeTrigger)},function(e,t){BI.StaticDateTimePaneCard=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.StaticDateTimePaneCard.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:"bi-date-time-pane",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_init:function(){BI.StaticDateTimePaneCard.superclass._init.apply(this,arguments);var n=this,e=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this.selectedTime=e.selectedTime||{year:this._year,month:this._month},this.datePicker=BI.createWidget({type:"bi.date_picker",behaviors:e.behaviors,min:e.min,max:e.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){var e=n.datePicker.getValue(),t=BI.getMonthDays(BI.getDate(e.year,e.month-1,1)),i=n.selectedTime.day||0;t<i&&(i=t),n.selectedTime=BI.extend(n.selectedTime,{year:e.year,month:e.month}),0!==i&&(n.selectedTime.day=i),n.calendar.setSelect(BI.Calendar.getPageByDateJSON(n.selectedTime)),n.calendar.setValue(n.selectedTime),0!==i&&n.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)}),this.calendar=BI.createWidget({direction:"custom",type:"bi.navigation",tab:this.datePicker,cardCreator:BI.bind(this._createNav,this)}),this.calendar.on(BI.Navigation.EVENT_CHANGE,function(){n.selectedTime=BI.extend(n.calendar.getValue(),n.timeSelect.getValue()),n.calendar.empty(),n.setValue(n.selectedTime),n.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)}),BI.createWidget({type:"bi.vtape",element:this,hgap:10,items:[{el:this.datePicker,height:40},this.calendar,{el:{type:"bi.dynamic_date_time_select",cls:"bi-split-top",ref:function(){n.timeSelect=this},listeners:[{eventName:BI.DynamicDateTimeSelect.EVENT_CONFIRM,action:function(){n.selectedTime=BI.extend(n.calendar.getValue(),n.timeSelect.getValue()),n.fireEvent("EVENT_CHANGE")}}]},height:40}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.layout",cls:"bi-split-top"},height:1,top:40,left:0,right:0}]}),this.setValue(e.selectedTime)},_createNav:function(e){var t=BI.Calendar.getDateJSONByPage(e);return BI.createWidget({type:"bi.calendar",logic:{dynamic:!1},min:this.options.min,max:this.options.max,year:t.year,month:t.month,day:this.selectedTime.day})},_getNewCurrentDate:function(){var e=BI.getDate();return{year:e.getFullYear(),month:e.getMonth()+1}},_setCalenderValue:function(e){this.calendar.setSelect(BI.Calendar.getPageByDateJSON(e)),this.calendar.setValue(e),this.selectedTime=BI.extend({},this.timeSelect.getValue(),e)},_setDatePicker:function(e){BI.isNull(e)||BI.isNull(e.year)||BI.isNull(e.month)?this.datePicker.setValue(this._getNewCurrentDate()):this.datePicker.setValue(e)},_setCalendar:function(e){BI.isNull(e)||BI.isNull(e.day)?(this.calendar.empty(),this._setCalenderValue(this._getNewCurrentDate())):this._setCalenderValue(e)},setValue:function(e){e=e||{},this._setDatePicker(e),this._setCalendar(e),this.timeSelect.setValue({hour:e.hour,minute:e.minute,second:e.second})},getValue:function(){return this.selectedTime}}),BI.shortcut("bi.static_date_time_pane_card",BI.StaticDateTimePaneCard)},function(e,t){BI.DynamicDateTimePane=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-pane"},render:function(){var i=this,t=this.options;return{type:"bi.vtape",items:[{el:{type:"bi.linear_segment",cls:"bi-split-bottom",height:30,items:BI.createItems([{text:BI.i18nText("BI-Multi_Date_YMD"),value:BI.DynamicDateTimePane.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicDateTimePane.Dynamic}],{textAlign:"center"}),listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(){var e=this.getValue()[0];switch(i.dateTab.setSelect(e),e){case BI.DynamicDateTimePane.Static:var t=BI.DynamicDateHelper.getCalculation(i.dynamicPane.getValue());i.ymd.setValue({year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()});break;case BI.DynamicDateTimePane.Dynamic:i.dynamicPane.setValue({year:0})}}}],ref:function(){i.switcher=this}},height:30},{type:"bi.tab",ref:function(){i.dateTab=this},showIndex:BI.DynamicDateTimePane.Static,cardCreator:function(e){switch(e){case BI.DynamicDateTimePane.Static:return{type:"bi.static_date_time_pane_card",behaviors:t.behaviors,listeners:[{eventName:"EVENT_CHANGE",action:function(){i.fireEvent("EVENT_CHANGE")}}],ref:function(){i.ymd=this}};case BI.DynamicDateTimePane.Dynamic:default:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){i._checkValue(i.getValue())&&i.fireEvent("EVENT_CHANGE")}}],ref:function(){i.dynamicPane=this}}}}}]}},mounted:function(){this.setValue(this.options.value)},_checkValueValid:function(e){return BI.isNull(e)||BI.isEmptyObject(e)||BI.isEmptyString(e)},_checkValue:function(e){switch(e.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(e.value);case BI.DynamicDateCombo.Static:default:return!0}},setValue:function(e){var t=(e=e||{}).type||BI.DynamicDateTimePane.Static,i=e.value||e;switch(this.switcher.setValue(t),this.dateTab.setSelect(t),t){case BI.DynamicDateTimePane.Dynamic:this.dynamicPane.setValue(i);break;case BI.DynamicDateTimePane.Static:default:if(this._checkValueValid(i)){var n=BI.getDate();this.ymd.setValue({year:n.getFullYear(),month:n.getMonth()+1})}else this.ymd.setValue(i)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.shortcut("bi.dynamic_date_time_pane",BI.DynamicDateTimePane),BI.extend(BI.DynamicDateTimePane,{Static:1,Dynamic:2})},function(e,t){BI.DownListCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-combo",height:24,items:[],adjustLength:0,direction:"bottom",trigger:"click",container:null,stopPropagation:!1,el:{}})},_init:function(){BI.DownListCombo.superclass._init.apply(this,arguments);var i=this,e=this.options;this.popupview=BI.createWidget({type:"bi.down_list_popup",items:e.items,chooseType:e.chooseType,value:e.value}),this.popupview.on(BI.DownListPopup.EVENT_CHANGE,function(e){i.fireEvent(BI.DownListCombo.EVENT_CHANGE,e),i.downlistcombo.hideView()}),this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,function(e,t){i.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,e,t),i.downlistcombo.hideView()}),this.downlistcombo=BI.createWidget({element:this,type:"bi.combo",trigger:e.trigger,isNeedAdjustWidth:!1,container:e.container,adjustLength:e.adjustLength,direction:e.direction,stopPropagation:e.stopPropagation,el:BI.createWidget(e.el,{type:"bi.icon_trigger",extraCls:e.iconCls,width:e.width,height:e.height}),popup:{el:this.popupview,stopPropagation:e.stopPropagation,maxHeight:1e3,minWidth:140}}),this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){i.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW)})},hideView:function(){this.downlistcombo.hideView()},showView:function(e){this.downlistcombo.showView(e)},populate:function(e){this.popupview.populate(e)},setValue:function(e){this.popupview.setValue(e)},getValue:function(){return this.popupview.getValue()}}),BI.DownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DownListCombo.EVENT_SON_VALUE_CHANGE="EVENT_SON_VALUE_CHANGE",BI.DownListCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.down_list_combo",BI.DownListCombo)},function(e,t){BI.DownListGroup=BI.inherit(BI.Widget,{constants:{iconCls:"check-mark-ha-font"},_defaultConfig:function(){return BI.extend(BI.DownListGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-group",items:[{el:{}}]})},_init:function(){BI.DownListGroup.superclass._init.apply(this,arguments);var e=this.options,t=this;this.downlistgroup=BI.createWidget({element:this,type:"bi.button_tree",items:e.items,chooseType:0,layouts:[{type:"bi.vertical",hgap:0,vgap:0}],value:e.value}),this.downlistgroup.on(BI.Controller.EVENT_CHANGE,function(e){t.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&t.fireEvent(BI.DownListGroup.EVENT_CHANGE,arguments)})},getValue:function(){return this.downlistgroup.getValue()},setValue:function(e){this.downlistgroup.setValue(e)}}),BI.DownListGroup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group",BI.DownListGroup)},function(e,t){BI.DownListItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var e=BI.DownListItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:"bi-down-list-item bi-list-item-active",cls:"",height:24,logic:{dynamic:!0},selected:!1,iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.DownListItem.superclass._init.apply(this,arguments);var e=this.options;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:e.textHgap,vgap:e.textVgap,lgap:e.textLgap,rgap:e.textRgap,text:e.text,value:e.value,keyword:e.keyword,height:e.height}),this.icon=BI.createWidget({type:"bi.center_adapt",width:36,height:e.height,items:[{el:{type:"bi.icon",width:e.iconWidth,height:e.iconHeight}}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),BI.extend(e.logic,{items:BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,this.icon,this.text)}))))},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()},doClick:function(){BI.DownListItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.DownListItem.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)}}),BI.DownListItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_item",BI.DownListItem)},function(e,t){BI.DownListGroupItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var e=BI.DownListGroupItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-down-list-group-item",logic:{dynamic:!1},iconCls1:"dot-e-font",iconCls2:"pull-right-e-font"})},_init:function(){BI.DownListGroupItem.superclass._init.apply(this,arguments);var e=this.options,t=this;this.text=BI.createWidget({type:"bi.label",cls:"list-group-item-text",textAlign:"left",text:e.text,value:e.value,height:e.height}),this.icon1=BI.createWidget({type:"bi.icon_button",cls:e.iconCls1,width:36,disableSelected:!0,selected:this._digest(e.value)}),this.icon2=BI.createWidget({type:"bi.icon_button",cls:e.iconCls2,width:24,forceNotSelected:!0});var i=BI.createWidget({type:"bi.layout",width:24});BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.icon2,top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(e.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.icon1,this.text,i)})))),this.element.hover(function(){t.isEnabled()&&t.hover()},function(){t.isEnabled()&&t.dishover()})},_digest:function(e){var i=this.options;return e=BI.isArray(e)?e:[e],BI.any(e,function(e,t){return BI.contains(i.childValues,t)})},hover:function(){BI.DownListGroupItem.superclass.hover.apply(this,arguments),this.icon1.element.addClass("hover"),this.icon2.element.addClass("hover")},dishover:function(){BI.DownListGroupItem.superclass.dishover.apply(this,arguments),this.icon1.element.removeClass("hover"),this.icon2.element.removeClass("hover")},doClick:function(){BI.DownListGroupItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.DownListGroupItem.EVENT_CHANGE,this.getValue())},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},setValue:function(e){this.icon1.setSelected(this._digest(e))}}),BI.DownListGroupItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.down_list_group_item",BI.DownListGroupItem)},function(e,t){BI.DownListPopup=BI.inherit(BI.Pane,{constants:{nextIcon:"pull-right-e-font",height:24,iconHeight:12,iconWidth:12,hgap:0,vgap:0,border:1},_defaultConfig:function(){var e=BI.DownListPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:"bi-down-list-popup",items:[],chooseType:BI.Selection.Multi})},_init:function(){BI.DownListPopup.superclass._init.apply(this,arguments),this.singleValues=[],this.childValueMap={},this.fatherValueMap={},this.items=BI.deepClone(this.options.items);var o=this,e=this.options,t=this._createChildren(this.items);this.popup=BI.createWidget({type:"bi.button_tree",items:BI.createItems(t,{},{adjustLength:-2}),layouts:[{type:"bi.vertical",hgap:this.constants.hgap,vgap:this.constants.vgap}],value:this._digest(e.value),chooseType:e.chooseType}),this.popup.on(BI.ButtonTree.EVENT_CHANGE,function(e,t){var i=e;if(BI.isNotNull(o.childValueMap[e])?(i=o.childValueMap[e],o.fireEvent(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,i,o.fatherValueMap[e])):o.fireEvent(BI.DownListPopup.EVENT_CHANGE,i,t),!BI.contains(o.singleValues,i)){var n=o.getValue(),r=[];BI.each(n,function(e,t){t.value!=i&&r.push(t)}),o.setValue(r)}}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup],vgap:5})},_createChildren:function(r){var o=this,a=[];return BI.each(r,function(e,t){var i={type:"bi.down_list_group",items:[]};if(BI.each(t,function(e,r){BI.isNotEmptyArray(r.children)&&!BI.isEmpty(r.el)?(r.type="bi.combo_group",r.isDefaultInit=!0,r.cls="down-list-group",r.trigger="hover",r.isNeedAdjustWidth=!1,r.el.title=r.el.title||r.el.text,r.el.type="bi.down_list_group_item",r.el.logic={dynamic:!0},r.el.height=o.constants.height,r.el.iconCls2=o.constants.nextIcon,r.popup={lgap:1,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},innerVGap:5,maxHeight:378},r.el.childValues=[],BI.each(r.children,function(e,t){var i=BI.deepClone(r.el.value),n=BI.deepClone(t.value);o.singleValues.push(t.value),t.type="bi.down_list_item",t.extraCls=" child-down-list-item",t.title=t.title||t.text,t.textRgap=10,t.isNeedAdjustWidth=!1,t.logic={dynamic:!0},t.father=i,o.fatherValueMap[o._createChildValue(i,n)]=i,o.childValueMap[o._createChildValue(i,n)]=n,t.value=o._createChildValue(i,n),r.el.childValues.push(t.value)})):(r.type="bi.down_list_item",r.title=r.title||r.text,r.textRgap=10,r.isNeedAdjustWidth=!1,r.logic={dynamic:!0});var t={};t.el=r,i.items.push(t)}),o._isGroup(i.items)&&BI.each(i.items,function(e,t){o.singleValues.push(t.el.value)}),a.push(i),o._needSpliter(e,r.length)){var n=BI.createWidget({type:"bi.vertical",items:[{el:{type:"bi.layout",cls:"bi-down-list-spliter bi-split-top cursor-pointer",height:0}}],cls:"bi-down-list-spliter-container cursor-pointer",vgap:5,lgap:10,rgap:0});a.push(n)}}),a},_isGroup:function(e){return 1<e.length},_needSpliter:function(e,t){return e<t-1},_createChildValue:function(e,t){return e+"_"+t},_digest:function(e){var n=this,r=[];return BI.each(e,function(e,t){var i;i=BI.isNotNull(t.childValue)?n._createChildValue(t.value,t.childValue):t.value,r.push(i)}),r},_checkValues:function(o){var a=[];return BI.each(this.items,function(n,e){BI.each(e,function(e,t){if(BI.isNotNull(t.children)){var i=function r(e,t){var n="";return BI.some(e,function(e,i){return BI.some(t,function(e,t){if(i===t)return n=i,!0})}),n}(BI.map(t.children,"value"),o[n]);BI.isNotEmptyString(i)&&a.push(i)}else t.value===o[n][0]&&a.push(o[n][0])})}),a},populate:function(e){BI.DownListPopup.superclass.populate.apply(this,arguments),this.items=BI.deepClone(e),this.childValueMap={},this.fatherValueMap={},this.singleValues=[];var t=this._createChildren(this.items),i=BI.createItems(t,{},{adjustLength:-2});this.popup.populate(i)},setValue:function(e){this.popup.setValue(this._digest(e))},_getValue:function(){var i=[];return BI.each(this.popup.getAllButtons(),function(e,t){e%2==0&&i.push(t.getValue())}),i},getValue:function(){var r=this,o=[],e=this._checkValues(this._getValue());return BI.each(e,function(e,t){var i={};if(BI.isNotNull(r.childValueMap[t])){var n=r.fatherValueMap[t];i.childValue=r.childValueMap[t],i.value=n}else i.value=t;o.push(i)}),o}}),BI.DownListPopup.EVENT_CHANGE="EVENT_CHANGE",BI.DownListPopup.EVENT_SON_VALUE_CHANGE="EVENT_SON_VALUE_CHANGE",BI.shortcut("bi.down_list_popup",BI.DownListPopup)},function(e,t){BI.DynamicDateHelper={},BI.extend(BI.DynamicDateHelper,{getCalculation:function(e){var t=BI.getDate();return this.getCalculationByDate(t,e)},getCalculationByDate:function(e,t){if(BI.isNotNull(t.year)&&(e=BI.getDate(e.getFullYear()+BI.parseInt(t.year),e.getMonth(),e.getDate())),BI.isNotNull(t.quarter)&&(e=BI.getOffsetQuarter(e,BI.parseInt(t.quarter))),BI.isNotNull(t.month)&&(e=BI.getOffsetMonth(e,BI.parseInt(t.month))),BI.isNotNull(t.week)&&(e=BI.getOffsetDate(e,7*BI.parseInt(t.week))),BI.isNotNull(t.day)&&(e=BI.getOffsetDate(e,BI.parseInt(t.day))),BI.isNotNull(t.workDay))if(BI.isNotNull(BI.holidays))for(var i=Math.abs(t.workDay),n=0;n<i;n++)e=BI.getOffsetDate(e,t.workDay<0?-1:1),BI.isNotNull(BI.holidays[BI.print(e,"%Y-%X-%d")])&&n--;else e=BI.getOffsetDate(e,BI.parseInt(t.workDay));return BI.isNotNull(t.position)&&t.position!==BI.DynamicDateCard.OFFSET.CURRENT&&(e=this.getBeginDate(e,t)),BI.getDate(e.getFullYear(),e.getMonth(),e.getDate())},getBeginDate:function(e,t){return BI.isNotNull(t.day)?t.position===BI.DynamicDateCard.OFFSET.BEGIN?BI.getDate(e.getFullYear(),e.getMonth(),1):BI.getDate(e.getFullYear(),e.getMonth(),BI.getLastDateOfMonth(e).getDate()):BI.isNotNull(t.week)?t.position===BI.DynamicDateCard.OFFSET.BEGIN?BI.getWeekStartDate(e):BI.getWeekEndDate(e):BI.isNotNull(t.month)?t.position===BI.DynamicDateCard.OFFSET.BEGIN?BI.getDate(e.getFullYear(),e.getMonth(),1):BI.getDate(e.getFullYear(),e.getMonth(),BI.getLastDateOfMonth(e).getDate()):BI.isNotNull(t.quarter)?t.position===BI.DynamicDateCard.OFFSET.BEGIN?BI.getQuarterStartDate(e):BI.getQuarterEndDate(e):BI.isNotNull(t.year)?t.position===BI.DynamicDateCard.OFFSET.BEGIN?BI.getDate(e.getFullYear(),0,1):BI.getDate(e.getFullYear(),11,31):e}})},function(e,t){BI.DynamicDateCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-card"},render:function(){var e=this;return this.position=BI.DynamicDateCard.OFFSET.CURRENT,{type:"bi.vertical",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),textAlign:"left",height:12,lgap:10},tgap:10,bgap:5},{type:"bi.button_group",ref:function(){e.checkgroup=this},chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,lgap:4,value:[BI.DynamicDateCard.TYPE.YEAR],items:BI.createItems([{text:BI.i18nText("BI-Basic_Year"),value:BI.DynamicDateCard.TYPE.YEAR},{text:BI.i18nText("BI-Basic_Single_Quarter"),value:BI.DynamicDateCard.TYPE.QUARTER},{text:BI.i18nText("BI-Basic_Month"),value:BI.DynamicDateCard.TYPE.MONTH},{text:BI.i18nText("BI-Basic_Week"),value:BI.DynamicDateCard.TYPE.WEEK},{text:BI.i18nText("BI-Basic_Day"),value:BI.DynamicDateCard.TYPE.DAY}],{type:"bi.multi_select_item",logic:{dynamic:!0}}),layouts:[{type:"bi.left",rgap:4}],listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(){0!==e.checkgroup.getValue().length&&e.workDayBox.setSelected(!1);var n={};BI.each(e.resultPane.getAllButtons(),function(e,t){var i=t.getValue();BI.isNotNull(i.dateType)&&(n[i.dateType]={value:i.value,offset:i.offset})}),e.resultPane.populate(e._getParamJson(BI.map(e.checkgroup.getValue(),function(e,t){var i={dateType:t};return BI.has(n,t)&&(i.value=n[t].value,i.offset=n[t].offset),i}))),e.position=BI.DynamicDateCard.OFFSET.CURRENT,e.fireEvent("EVENT_CHANGE")}}]},{type:"bi.vertical_adapt",lgap:2,items:[{el:{type:"bi.multi_select_item",ref:function(){e.workDayBox=this},logic:{dynamic:!0},text:BI.i18nText("BI-Basic_Work_Day"),value:BI.DynamicDateCard.TYPE.WORK_DAY,listeners:[{eventName:BI.MultiSelectItem.EVENT_CHANGE,action:function(){this.isSelected()&&e.checkgroup.setValue(),e.resultPane.populate(this.isSelected()?e._getParamJson([{dateType:BI.DynamicDateCard.TYPE.WORK_DAY}]):[]),e.position=BI.DynamicDateCard.OFFSET.CURRENT,e.fireEvent("EVENT_CHANGE")}}]}}],ref:function(){e.workDay=this}},{type:"bi.button_group",items:this._getParamJson([{dateType:BI.DynamicDateCard.TYPE.YEAR}]),ref:function(){e.resultPane=this},layouts:[{type:"bi.vertical",bgap:10,hgap:10}]}]}},_getParamJson:function(e,t){var i=this,n=BI.map(e,function(e,t){return{el:{type:"bi.dynamic_date_param_item",dateType:t.dateType,value:t.value,offset:t.offset,listeners:[{eventName:"EVENT_CHANGE",action:function(){i.fireEvent("EVENT_CHANGE")}}]},tgap:0===e?5:0}});if(1===e.length&&e[0].dateType===BI.DynamicDateCard.TYPE.DAY){var r=this._getText(BI.DynamicDateCard.TYPE.MONTH);r[0].text=BI.i18nText("BI-Basic_Empty"),n.push({type:"bi.text_value_combo",height:24,items:r,container:null,value:t||BI.DynamicDateCard.OFFSET.CURRENT,listeners:[{eventName:"EVENT_CHANGE",action:function(){i.position=this.getValue()[0],i.fireEvent("EVENT_CHANGE")}}]})}else 0!==e.length&&BI.last(e).dateType!==BI.DynamicDateCard.TYPE.DAY&&BI.last(e).dateType!==BI.DynamicDateCard.TYPE.WORK_DAY&&n.push({type:"bi.text_value_combo",height:24,container:null,items:this._getText(BI.last(e).dateType),value:t||BI.DynamicDateCard.OFFSET.CURRENT,listeners:[{eventName:"EVENT_CHANGE",action:function(){i.position=this.getValue()[0],i.fireEvent("EVENT_CHANGE")}}]});return n},_getText:function(e){switch(e){case BI.DynamicDateCard.TYPE.YEAR:return[{text:BI.i18nText("BI-Basic_Current_Day"),value:BI.DynamicDateCard.OFFSET.CURRENT},{text:BI.i18nText("BI-Basic_Year_Begin"),value:BI.DynamicDateCard.OFFSET.BEGIN},{text:BI.i18nText("BI-Basic_Year_End"),value:BI.DynamicDateCard.OFFSET.END}];case BI.DynamicDateCard.TYPE.QUARTER:return[{text:BI.i18nText("BI-Basic_Current_Day"),value:BI.DynamicDateCard.OFFSET.CURRENT},{text:BI.i18nText("BI-Basic_Quarter_Begin"),value:BI.DynamicDateCard.OFFSET.BEGIN},{text:BI.i18nText("BI-Basic_Quarter_End"),value:BI.DynamicDateCard.OFFSET.END}];case BI.DynamicDateCard.TYPE.MONTH:return[{text:BI.i18nText("BI-Basic_Current_Day"),value:BI.DynamicDateCard.OFFSET.CURRENT},{text:BI.i18nText("BI-Basic_Month_Begin"),value:BI.DynamicDateCard.OFFSET.BEGIN},{text:BI.i18nText("BI-Basic_Month_End"),value:BI.DynamicDateCard.OFFSET.END}];case BI.DynamicDateCard.TYPE.WEEK:default:return[{text:BI.i18nText("BI-Basic_Current_Day"),value:BI.DynamicDateCard.OFFSET.CURRENT},{text:BI.i18nText("BI-Basic_Week_Begin"),value:BI.DynamicDateCard.OFFSET.BEGIN},{text:BI.i18nText("BI-Basic_Week_End"),value:BI.DynamicDateCard.OFFSET.END}]}},_createValue:function(e,t){return{dateType:e,value:Math.abs(t),offset:0<t?1:0}},setValue:function(e){e=e||{},this.position=e.position||BI.DynamicDateCard.OFFSET.CURRENT;var t=[],i=[];BI.isNotNull(e.year)&&(t.push(BI.DynamicDateCard.TYPE.YEAR),i.push(this._createValue(BI.DynamicDateCard.TYPE.YEAR,e.year))),BI.isNotNull(e.quarter)&&(t.push(BI.DynamicDateCard.TYPE.QUARTER),i.push(this._createValue(BI.DynamicDateCard.TYPE.QUARTER,e.quarter))),BI.isNotNull(e.month)&&(t.push(BI.DynamicDateCard.TYPE.MONTH),i.push(this._createValue(BI.DynamicDateCard.TYPE.MONTH,e.month))),BI.isNotNull(e.week)&&(t.push(BI.DynamicDateCard.TYPE.WEEK),i.push(this._createValue(BI.DynamicDateCard.TYPE.WEEK,e.week))),BI.isNotNull(e.day)&&(t.push(BI.DynamicDateCard.TYPE.DAY),i.push(this._createValue(BI.DynamicDateCard.TYPE.DAY,e.day))),BI.isNotNull(e.workDay)&&(t.push(BI.DynamicDateCard.TYPE.WORK_DAY),i.push(this._createValue(BI.DynamicDateCard.TYPE.WORK_DAY,e.workDay))),this.checkgroup.setValue(t),this.workDayBox.setSelected(BI.isNotNull(e.workDay)),this.resultPane.populate(this._getParamJson(i,e.position))},getValue:function(){var n=this,r={},e=this.checkgroup.getValue(),t=this.resultPane.getAllButtons();if(0!==e.length&&BI.each(t,function(e,t){var i=t.getValue();switch(i.dateType){case BI.DynamicDateCard.TYPE.YEAR:r.year=0===i.offset?-i.value:i.value;break;case BI.DynamicDateCard.TYPE.QUARTER:r.quarter=0===i.offset?-i.value:i.value;break;case BI.DynamicDateCard.TYPE.MONTH:r.month=0===i.offset?-i.value:i.value;break;case BI.DynamicDateCard.TYPE.WEEK:r.week=0===i.offset?-i.value:i.value;break;case BI.DynamicDateCard.TYPE.DAY:r.day=0===i.offset?-i.value:i.value}BI.isNull(i.dateType)&&(r.position=n.position||BI.DynamicDateCard.OFFSET.CURRENT)}),this.workDayBox.isSelected()){var i=t[0].getValue();r.workDay=0===i.offset?-i.value:i.value}return r}}),BI.shortcut("bi.dynamic_date_card",BI.DynamicDateCard),BI.extend(BI.DynamicDateCard,{TYPE:{YEAR:1,QUARTER:2,MONTH:3,WEEK:4,DAY:5,WORK_DAY:6},OFFSET:{CURRENT:1,BEGIN:2,END:3}})},function(e,t){BI.DynamicDateCombo=BI.inherit(BI.Single,{constants:{popupHeight:259,popupWidth:270,comboAdjustHeight:1,border:1},props:{baseCls:"bi-dynamic-date-combo bi-border bi-focus-shadow bi-border-radius",height:22,minDate:"1900-01-01",maxDate:"2099-12-31",format:"",allowEdit:!0},render:function(){var i=this,e=this.options;this.storeTriggerValue="";var t=BI.getDate();return this.storeValue=e.value,{type:"bi.htape",items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:e.height,height:e.height,ref:function(){i.changeIcon=this}},width:e.height},{type:"bi.absolute",items:[{el:{type:"bi.combo",container:e.container,ref:function(){i.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,destroyWhenHide:!0,el:{type:"bi.dynamic_date_trigger",min:e.minDate,max:e.maxDate,format:e.format,allowEdit:e.allowEdit,watermark:e.watermark,height:e.height,value:e.value,ref:function(){i.trigger=this},listeners:[{eventName:BI.DynamicDateTrigger.EVENT_KEY_DOWN,action:function(){i.combo.isViewVisible()&&i.combo.hideView(),i.fireEvent(BI.DynamicDateCombo.EVENT_KEY_DOWN,arguments)}},{eventName:BI.DynamicDateTrigger.EVENT_STOP,action:function(){i.combo.isViewVisible()||i.combo.showView()}},{eventName:BI.DynamicDateTrigger.EVENT_FOCUS,action:function(){i.storeTriggerValue=i.trigger.getKey(),i.combo.isViewVisible()||i.combo.showView(),i.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS)}},{eventName:BI.DynamicDateTrigger.EVENT_BLUR,action:function(){i.fireEvent(BI.DynamicDateCombo.EVENT_BLUR)}},{eventName:BI.DynamicDateTrigger.EVENT_ERROR,action:function(){i.storeValue={type:BI.DynamicDateCombo.Static,value:{year:t.getFullYear(),month:t.getMonth()+1}},i.fireEvent(BI.DynamicDateCombo.EVENT_ERROR)}},{eventName:BI.DynamicDateTrigger.EVENT_VALID,action:function(){i.fireEvent(BI.DynamicDateCombo.EVENT_VALID)}},{eventName:BI.DynamicDateTrigger.EVENT_CHANGE,action:function(){i.fireEvent(BI.DynamicDateCombo.EVENT_CHANGE)}},{eventName:BI.DynamicDateTrigger.EVENT_CONFIRM,action:function(){if(!i.combo.isViewVisible()){var e=i.storeTriggerValue,t=i.trigger.getKey();BI.isNotEmptyString(t)&&!BI.isEqual(t,e)?(i.storeValue=i.trigger.getValue(),i.setValue(i.trigger.getValue())):BI.isEmptyString(t)&&(i.storeValue=null,i.trigger.setValue()),i._checkDynamicValue(i.storeValue),i.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:{type:"bi.dynamic_date_popup",behaviors:e.behaviors,min:e.minDate,max:e.maxDate,ref:function(){i.popup=this},listeners:[{eventName:BI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){i.setValue(),i.combo.hideView(),i.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var e=BI.getDate();i.setValue({type:BI.DynamicDateCombo.Static,value:{year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()}}),i.combo.hideView(),i.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE,action:function(){var e=i.popup.getValue();i._checkValue(e)&&i.setValue(e),i.combo.hideView(),i.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.EVENT_CHANGE,action:function(){i.setValue(i.popup.getValue()),i.combo.hideView(),i.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}]},stopPropagation:!1},hideChecker:function(e){return 0===i.triggerBtn.element.find(e.target).length},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){i.popup.setValue(i.storeValue),i.popup.setMinDate(e.minDate),i.popup.setMaxDate(e.maxDate),i.fireEvent(BI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW)}}]},top:0,left:0,right:0,bottom:0},{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:e.height,height:e.height,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){i.combo.isViewVisible()||i.combo.showView()}}],ref:function(){i.triggerBtn=this}},top:0,right:0}]}],ref:function(e){i.comboWrapper=e}}},mounted:function(){this._checkDynamicValue(this.storeValue)},_checkDynamicValue:function(e){var t=this.options,i=null;switch(BI.isNotNull(e)&&(i=e.type),i){case BI.DynamicDateCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=t.height,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},_checkValue:function(e){switch(e.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(e.value);case BI.DynamicDateCombo.Static:default:return!0}},_defaultState:function(){},setMinDate:function(e){this.options.minDate=e,this.trigger.setMinDate(e),this.popup&&this.popup.setMinDate(e)},setMaxDate:function(e){this.options.maxDate=e,this.trigger.setMaxDate(e),this.popup&&this.popup.setMaxDate(e)},setValue:function(e){this.storeValue=e,this.trigger.setValue(e),this._checkDynamicValue(e)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()},hidePopupView:function(){this.combo.hideView()}}),BI.DynamicDateCombo.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.DynamicDateCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicDateCombo.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicDateCombo.EVENT_BLUR="EVENT_BLUR",BI.DynamicDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DynamicDateCombo.EVENT_VALID="EVENT_VALID",BI.DynamicDateCombo.EVENT_ERROR="EVENT_ERROR",BI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_date_combo",BI.DynamicDateCombo),BI.extend(BI.DynamicDateCombo,{Static:1,Dynamic:2})},function(e,t){BI.DynamicDateParamItem=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-param-item",dateType:BI.DynamicDateCard.TYPE.YEAR,value:0,offset:0,height:24},render:function(){var e=this,t=this.options;return{type:"bi.htape",items:[{el:{type:"bi.sign_editor",cls:"bi-border",height:22,validationChecker:function(e){return BI.isNaturalNumber(e)},value:t.value,ref:function(){e.editor=this},errorText:function(e){return BI.isEmptyString(e)?BI.i18nText("BI-Basic_Please_Input_Content"):BI.i18nText("BI-Please_Input_Natural_Number")},allowBlank:!1,listeners:[{eventName:BI.SignEditor.EVENT_CONFIRM,action:function(){e.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE)}}]},width:60},{el:{type:"bi.label",height:24,text:this._getText()},width:t.dateType===BI.DynamicDateCard.TYPE.WORK_DAY?60:20},{type:"bi.text_value_combo",height:24,items:[{text:BI.i18nText("BI-Basic_Front"),value:0},{text:BI.i18nText("BI-Basic_Behind"),value:1}],ref:function(){e.offsetCombo=this},container:null,value:t.offset,listeners:[{eventName:BI.TextValueCombo.EVENT_CHANGE,action:function(){e.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE)}}]}]}},_getText:function(){var e="";switch(this.options.dateType){case BI.DynamicDateCard.TYPE.YEAR:e=BI.i18nText("BI-Basic_Year");break;case BI.DynamicDateCard.TYPE.QUARTER:e=BI.i18nText("BI-Basic_Single_Quarter");break;case BI.DynamicDateCard.TYPE.MONTH:e=BI.i18nText("BI-Basic_Month");break;case BI.DynamicDateCard.TYPE.WEEK:e=BI.i18nText("BI-Basic_Week");break;case BI.DynamicDateCard.TYPE.DAY:e=BI.i18nText("BI-Basic_Day");break;case BI.DynamicDateCard.TYPE.WORK_DAY:default:e=BI.i18nText("BI-Basic_Work_Day")}return e},setValue:function(e){(e=e||{}).value=e.value||0,e.offset=e.offset||0,this.editor.setValue(e.value),this.offsetCombo.setValue(e.offset)},getValue:function(){return{dateType:this.options.dateType,value:this.editor.getValue(),offset:this.offsetCombo.getValue()[0]}}}),BI.DynamicDateParamItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_date_param_item",BI.DynamicDateParamItem)},function(e,t){BI.DynamicDatePopup=BI.inherit(BI.Widget,{constants:{tabHeight:30,buttonHeight:24},props:{baseCls:"bi-dynamic-date-popup",width:248,height:344},_init:function(){BI.DynamicDatePopup.superclass._init.apply(this,arguments);var e=this,t=this.options,i=this.constants;this.storeValue={type:BI.DynamicDateCombo.Static},BI.createWidget({element:this,type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",cls:"bi-high-light bi-split-top",shadow:!0,text:BI.i18nText("BI-Basic_Clear"),textHeight:i.buttonHeight-1,listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){e.fireEvent(BI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-split-left bi-split-right bi-high-light bi-split-top",shadow:!0,textHeight:i.buttonHeight-1,text:BI.i18nText("BI-Multi_Date_Today"),ref:function(){e.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){e.fireEvent(BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-high-light bi-split-top",textHeight:i.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){e.fireEvent(BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}),this.setValue(t.value)},_getTabJson:function(){var t=this,i=this.options;return{type:"bi.tab",ref:function(){t.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-split-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Multi_Date_YMD"),value:BI.DynamicDateCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicDateCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(e){switch(e){case BI.DynamicDateCombo.Dynamic:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){t._setInnerValue(t.year,e)}}],ref:function(){t.dynamicPane=this}};case BI.DynamicDateCombo.Static:default:return{type:"bi.date_calendar_popup",behaviors:i.behaviors,min:t.options.min,max:t.options.max,listeners:[{eventName:BI.DateCalendarPopup.EVENT_CHANGE,action:function(){t.fireEvent(BI.DynamicDatePopup.EVENT_CHANGE)}}],ref:function(){t.ymd=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){switch(t.dateTab.getSelect()){case BI.DynamicDateCombo.Static:var e=BI.DynamicDateHelper.getCalculation(t.dynamicPane.getValue());t.ymd.setValue({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()}),t._setInnerValue();break;case BI.DynamicDateCombo.Dynamic:default:t.storeValue&&t.storeValue.type===BI.DynamicDateCombo.Dynamic?t.dynamicPane.setValue(t.storeValue.value):t.dynamicPane.setValue({year:0}),t._setInnerValue()}}}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var e=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());e=BI.print(e,"%Y-%X-%d"),this.textButton.setValue(e),this.textButton.setEnable(!1)}},_checkValueValid:function(e){return BI.isNull(e)||BI.isEmptyObject(e)||BI.isEmptyString(e)},setMinDate:function(e){this.options.min!==e&&(this.options.min=e,this.ymd.setMinDate(e))},setMaxDate:function(e){this.options.max!==e&&(this.options.max=e,this.ymd.setMaxDate(e))},setValue:function(e){this.storeValue=e;var t,i;switch(t=(e=e||{}).type||BI.DynamicDateCombo.Static,i=e.value||e,this.dateTab.setSelect(t),t){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(i),this._setInnerValue();break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(i)){var n=BI.getDate();this.ymd.setValue({year:n.getFullYear(),month:n.getMonth()+1,day:n.getDate()}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.ymd.setValue(i),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"));this.textButton.setEnable(!0)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.DynamicDatePopup.EVENT_CHANGE="EVENT_CHANGE",BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.shortcut("bi.dynamic_date_popup",BI.DynamicDatePopup)},function(e,t){BI.DynamicDateTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,yearLength:4,yearMonthLength:6,yearFullMonthLength:7,compareFormat:"%Y-%X-%d"},props:{extraCls:"bi-date-trigger",min:"1900-01-01",max:"2099-12-31",height:24,format:"",allowEdit:!0,watermark:""},_init:function(){BI.DynamicDateTrigger.superclass._init.apply(this,arguments);var n=this,r=this.options,e=this._const;this.storeTriggerValue="",this.editor=BI.createWidget({type:"bi.sign_editor",height:r.height,validationChecker:function(e){var t=n._getStandardDateStr(e),i=t.match(/\d+/g);return BI.isKey(r.format)||n._autoAppend(e,i),n._dateCheck(t)&&BI.checkDateLegal(t)&&n._checkVoid({year:0|i[0],month:0|i[1],day:0|i[2]})},quitChecker:function(){return!1},hgap:e.hgap,vgap:e.vgap,allowBlank:!0,watermark:BI.isKey(r.watermark)?r.watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){var e="";return BI.isKey(r.format)||(e=n.editor.isEditing()?BI.i18nText("BI-Date_Trigger_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")),e},title:BI.bind(this._getTitle,this)}),this.editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){n.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){n.storeTriggerValue=n.getKey(),n.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_BLUR,function(){n.fireEvent(BI.DynamicDateTrigger.EVENT_BLUR)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){n.fireEvent(BI.DynamicDateTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_VALID,function(){n.fireEvent(BI.DynamicDateTrigger.EVENT_VALID)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){n.fireEvent(BI.DynamicDateTrigger.EVENT_ERROR)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var e=n.editor.getValue();if(BI.isNotNull(e)&&n.editor.setState(e),BI.isNotEmptyString(e)&&!BI.isEqual(n.storeTriggerValue,n.getKey())){var t=n._getStandardDateStr(e).match(/\d+/g);n.storeValue={type:BI.DynamicDateCombo.Static,value:{year:0|t[0],month:0|t[1],day:0|t[2]}}}n.fireEvent(BI.DynamicDateTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){n.editor.isValid()&&n.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){n.fireEvent(BI.DynamicDateTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){n.fireEvent(BI.DynamicDateTrigger.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.editor},{el:BI.createWidget(),width:24}]}),r.allowEdit||BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.text",title:BI.bind(this._getTitle,this)},left:0,right:24,top:0,bottom:0}]}),this.setValue(r.value)},_getTitle:function(){var e=this.storeValue||{},t=e.type||BI.DynamicDateCombo.Static,i=e.value;switch(t){case BI.DynamicDateCombo.Dynamic:var n=this._getText(i),r=BI.getDate();r=BI.DynamicDateHelper.getCalculation(i);var o=BI.print(r,this._getFormatString());return BI.isEmptyString(n)?o:n+":"+o;case BI.DynamicDateCombo.Static:default:return BI.isNull(i)||BI.isNull(i.day)?"":BI.print(BI.getDate(i.year,i.month-1,i.day),this._getFormatString())}},_getStandardDateStr:function(e){var t=this._const,i=[0,1,2],n=this._getFormatString().match(/%./g);BI.each(n,function(e,t){switch(t){case"%Y":case"%y":i[0]=e;break;case"%X":case"%x":i[1]=e;break;case"%d":case"%e":default:i[2]=e}});var r=BI.parseDateTime(e,this._getFormatString());BI.print(r,this._getFormatString())===e&&(e=BI.print(r,t.compareFormat),i=[0,1,2]);var o=e.match(/\d+/g),a=[];return BI.each(o,function(e){a[e]=o[i[e]]}),a.length===i.length&&2===a[0].length?BI.print(BI.parseDateTime(a.join("-"),t.compareFormat),t.compareFormat):a.join("-")},_getFormatString:function(){return this.options.format||this._const.compareFormat},_dateCheck:function(e){return BI.print(BI.parseDateTime(e,"%Y-%x-%d"),"%Y-%x-%d")===e||BI.print(BI.parseDateTime(e,"%Y-%X-%d"),"%Y-%X-%d")===e||BI.print(BI.parseDateTime(e,"%Y-%x-%e"),"%Y-%x-%e")===e||BI.print(BI.parseDateTime(e,"%Y-%X-%e"),"%Y-%X-%e")===e},_checkVoid:function(e){return!BI.checkDateVoid(e.year,e.month,e.day,this.options.min,this.options.max)[0]},_autoAppend:function(e,t){if(BI.isNotNull(t)&&BI.checkDateLegal(e))switch(e.length){case this._const.yearLength:this._yearCheck(e)&&this.editor.setValue(e+"-");break;case this._const.yearMonthLength:case this._const.yearFullMonthLength:var i=e.split("-")[1];(BI.isNotNull(i)&&2===i.length||this._monthCheck(e))&&this.editor.setValue(e+"-")}},_yearCheck:function(e){var t=BI.print(BI.parseDateTime(e,this._getFormatString()),this._const.compareFormat);return BI.print(BI.parseDateTime(e,"%Y"),"%Y")===e&&t>=this.options.min&&t<=this.options.max},_monthCheck:function(e){var t=BI.parseDateTime(e,this._getFormatString()),i=BI.print(t,this._const.compareFormat);return 0<=t.getMonth()&&(BI.print(BI.parseDateTime(e,"%Y-%X"),"%Y-%X")===e||BI.print(BI.parseDateTime(e,"%Y-%x"),"%Y-%x")===e)&&i>=this.options.min&&i<=this.options.max},_setInnerValue:function(e){var t=BI.print(e,this._getFormatString());this.editor.setState(t),this.editor.setValue(t)},_getText:function(e){var t="",i="";return BI.isNotNull(e.year)&&(0!==BI.parseInt(e.year)&&(t+=Math.abs(e.year)+BI.i18nText("BI-Basic_Year")+(e.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),i=n(BI.i18nText("BI-Basic_Year"),e.position)),BI.isNotNull(e.quarter)&&(0!==BI.parseInt(e.quarter)&&(t+=Math.abs(e.quarter)+BI.i18nText("BI-Basic_Single_Quarter")+(e.quarter<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),i=n(BI.i18nText("BI-Basic_Single_Quarter"),e.position)),BI.isNotNull(e.month)&&(0!==BI.parseInt(e.month)&&(t+=Math.abs(e.month)+BI.i18nText("BI-Basic_Month")+(e.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),i=n(BI.i18nText("BI-Basic_Month"),e.position)),BI.isNotNull(e.week)&&(0!==BI.parseInt(e.week)&&(t+=Math.abs(e.week)+BI.i18nText("BI-Basic_Week")+(e.week<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),i=n(BI.i18nText("BI-Basic_Week"),e.position)),BI.isNotNull(e.day)&&(0!==BI.parseInt(e.day)&&(t+=Math.abs(e.day)+BI.i18nText("BI-Basic_Day")+(e.day<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),i=1===BI.size(e)?n(BI.i18nText("BI-Basic_Month"),e.position):""),BI.isNotNull(e.workDay)&&0!==BI.parseInt(e.workDay)&&(t+=Math.abs(e.workDay)+BI.i18nText("BI-Basic_Work_Day")+(e.workDay<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),t+i;function n(e,t){switch(t){case BI.DynamicDateCard.OFFSET.BEGIN:return e+BI.i18nText("BI-Basic_Begin_Start");case BI.DynamicDateCard.OFFSET.END:return e+BI.i18nText("BI-Basic_End_Stop");case BI.DynamicDateCard.OFFSET.CURRENT:default:return BI.i18nText("BI-Basic_Current_Day")}}},setValue:function(e){var t,i,n=BI.getDate();switch(this.storeValue=e,BI.isNotNull(e)&&(t=e.type||BI.DynamicDateCombo.Static,i=e.value||e),t){case BI.DynamicDateCombo.Dynamic:var r=this._getText(i);n=BI.DynamicDateHelper.getCalculation(i),this._setInnerValue(n,r);break;case BI.DynamicDateCombo.Static:default:if(BI.isNull(i)||BI.isNull(i.day))this.editor.setState(""),this.editor.setValue("");else{var o=BI.print(BI.getDate(i.year,i.month-1,i.day),this._getFormatString());this.editor.setState(o),this.editor.setValue(o)}}},setMinDate:function(e){BI.isNotEmptyString(this.options.min)&&(this.options.min=e)},setMaxDate:function(e){BI.isNotEmptyString(this.options.max)&&(this.options.max=e)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.storeValue}}),BI.DynamicDateTrigger.EVENT_BLUR="EVENT_BLUR",BI.DynamicDateTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicDateTrigger.EVENT_START="EVENT_START",BI.DynamicDateTrigger.EVENT_STOP="EVENT_STOP",BI.DynamicDateTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicDateTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.DynamicDateTrigger.EVENT_VALID="EVENT_VALID",BI.DynamicDateTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicDateTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.DynamicDateTrigger.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.shortcut("bi.dynamic_date_trigger",BI.DynamicDateTrigger)},function(e,t){BI.DynamicDateTimeCombo=BI.inherit(BI.Single,{constants:{popupHeight:259,popupWidth:270,comboAdjustHeight:1,border:1},props:{baseCls:"bi-dynamic-date-combo bi-border bi-focus-shadow bi-border-radius",height:22,minDate:"1900-01-01",maxDate:"2099-12-31",format:"",allowEdit:!0},render:function(){var i=this,e=this.options;this.storeTriggerValue="";var t=BI.getDate();return this.storeValue=e.value,{type:"bi.htape",items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:e.height,height:e.height,ref:function(){i.changeIcon=this}},width:e.height},{type:"bi.absolute",items:[{el:{type:"bi.combo",destroyWhenHide:!0,container:e.container,ref:function(){i.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_time_trigger",min:e.minDate,max:e.maxDate,allowEdit:e.allowEdit,watermark:e.watermark,format:e.format,height:e.height,value:e.value,ref:function(){i.trigger=this},listeners:[{eventName:BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN,action:function(){i.combo.isViewVisible()&&i.combo.hideView(),i.fireEvent(BI.DynamicDateTimeCombo.EVENT_KEY_DOWN,arguments)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_STOP,action:function(){i.combo.isViewVisible()||i.combo.showView()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_TRIGGER_CLICK,action:function(){i.combo.toggle()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_FOCUS,action:function(){i.storeTriggerValue=i.trigger.getKey(),i.combo.isViewVisible()||i.combo.showView(),i.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_BLUR,action:function(){i.fireEvent(BI.DynamicDateTimeCombo.EVENT_BLUR)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_ERROR,action:function(){i.storeValue={type:BI.DynamicDateTimeCombo.Static,value:{year:t.getFullYear(),month:t.getMonth()+1}},i.fireEvent(BI.DynamicDateTimeCombo.EVENT_ERROR)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_VALID,action:function(){i.fireEvent(BI.DynamicDateTimeCombo.EVENT_VALID)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_CHANGE,action:function(){i.fireEvent(BI.DynamicDateTimeCombo.EVENT_CHANGE)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_CONFIRM,action:function(){if(!i.combo.isViewVisible()){var e=i.storeTriggerValue,t=i.trigger.getKey();BI.isNotEmptyString(t)&&!BI.isEqual(t,e)?(i.storeValue=i.trigger.getValue(),i.setValue(i.trigger.getValue())):BI.isEmptyString(t)&&(i.storeValue=null,i.trigger.setValue()),i._checkDynamicValue(i.storeValue),i.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:{type:"bi.dynamic_date_time_popup",behaviors:e.behaviors,min:e.minDate,max:e.maxDate,ref:function(){i.popup=this},listeners:[{eventName:BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){i.setValue(),i.combo.hideView(),i.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var e=BI.getDate();i.setValue({type:BI.DynamicDateTimeCombo.Static,value:{year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:0,minute:0,second:0}}),i.combo.hideView(),i.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE,action:function(){var e=i.popup.getValue();i._checkValue(e)&&i.setValue(e),i.combo.hideView(),i.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.EVENT_CHANGE,action:function(){i.setValue(i.popup.getValue()),i.combo.hideView(),i.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}}]},stopPropagation:!1},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){i.popup.setValue(i.storeValue),i.popup.setMinDate(e.minDate),i.popup.setMaxDate(e.maxDate),i.fireEvent(BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW)}}],hideChecker:function(e){return 0===i.triggerBtn.element.find(e.target).length}},top:0,left:0,right:0,bottom:0},{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:e.height,height:e.height,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){i.combo.isViewVisible()||i.combo.showView()}}],ref:function(){i.triggerBtn=this}},top:0,right:0}]}],ref:function(e){i.comboWrapper=e}}},mounted:function(){this._checkDynamicValue(this.storeValue)},_checkDynamicValue:function(e){var t=this.options,i=null;switch(BI.isNotNull(e)&&(i=e.type),i){case BI.DynamicDateTimeCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=t.height,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},_checkValue:function(e){switch(e.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(e.value);case BI.DynamicDateCombo.Static:default:return!0}},setMinDate:function(e){this.options.minDate=e,this.trigger.setMinDate(e),this.popup&&this.popup.setMinDate(e)},setMaxDate:function(e){this.options.maxDate=e,this.trigger.setMaxDate(e),this.popup&&this.popup.setMaxDate(e)},setValue:function(e){this.storeValue=e,this.trigger.setValue(e),this._checkDynamicValue(e)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()},hidePopupView:function(){this.combo.hideView()},isValid:function(){return this.trigger.isValid()}}),BI.DynamicDateTimeCombo.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.DynamicDateTimeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicDateTimeCombo.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicDateTimeCombo.EVENT_BLUR="EVENT_BLUR",BI.DynamicDateTimeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DynamicDateTimeCombo.EVENT_VALID="EVENT_VALID",BI.DynamicDateTimeCombo.EVENT_ERROR="EVENT_ERROR",BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_date_time_combo",BI.DynamicDateTimeCombo),BI.extend(BI.DynamicDateTimeCombo,{Static:1,Dynamic:2})},function(e,t){BI.DynamicDateTimePopup=BI.inherit(BI.Widget,{constants:{tabHeight:30,buttonHeight:24},props:{baseCls:"bi-dynamic-date-time-popup",width:248,height:385},_init:function(){BI.DynamicDateTimePopup.superclass._init.apply(this,arguments);var e=this,t=this.options,i=this.constants;this.storeValue={type:BI.DynamicDateCombo.Static},BI.createWidget({element:this,type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",cls:"bi-high-light bi-split-top",textHeight:i.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){e.fireEvent(BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-split-left bi-split-right bi-high-light bi-split-top",textHeight:i.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Multi_Date_Today"),ref:function(){e.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){e.fireEvent(BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-high-light bi-split-top",textHeight:i.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){e.fireEvent(BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}),this.setValue(t.value)},_getTabJson:function(){var t=this,i=this.options;return{type:"bi.tab",ref:function(){t.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-split-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Multi_Date_YMD"),value:BI.DynamicDateCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicDateCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(e){switch(e){case BI.DynamicDateCombo.Dynamic:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){t._setInnerValue(t.year,e)}}],ref:function(){t.dynamicPane=this}};case BI.DynamicDateCombo.Static:default:return{type:"bi.vtape",items:[{type:"bi.date_calendar_popup",behaviors:i.behaviors,min:t.options.min,max:t.options.max,ref:function(){t.ymd=this}},{el:{type:"bi.dynamic_date_time_select",cls:"bi-split-top",ref:function(){t.timeSelect=this}},height:40}]}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){switch(t.dateTab.getSelect()){case BI.DynamicDateCombo.Static:var e=BI.DynamicDateHelper.getCalculation(t.dynamicPane.getValue());t.ymd.setValue({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()}),t.timeSelect.setValue(),t._setInnerValue();break;case BI.DynamicDateCombo.Dynamic:default:t.storeValue&&t.storeValue.type===BI.DynamicDateCombo.Dynamic?t.dynamicPane.setValue(t.storeValue.value):t.dynamicPane.setValue({year:0}),t._setInnerValue()}}}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var e=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());e=BI.print(e,"%Y-%X-%d"),this.textButton.setValue(e),this.textButton.setEnable(!1)}},_checkValueValid:function(e){return BI.isNull(e)||BI.isEmptyObject(e)||BI.isEmptyString(e)},setMinDate:function(e){this.options.min!==e&&(this.options.min=e,this.ymd.setMinDate(e))},setMaxDate:function(e){this.options.max!==e&&(this.options.max=e,this.ymd.setMaxDate(e))},setValue:function(e){this.storeValue=e;var t,i;switch(t=(e=e||{}).type||BI.DynamicDateCombo.Static,i=e.value||e,this.dateTab.setSelect(t),t){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(i),this._setInnerValue();break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(i)){var n=BI.getDate();this.ymd.setValue({year:n.getFullYear(),month:n.getMonth()+1,day:n.getDate()}),this.timeSelect.setValue(),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.ymd.setValue(i),this.timeSelect.setValue({hour:i.hour,minute:i.minute,second:i.second}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"));this.textButton.setEnable(!0)}},getValue:function(){var e=this.dateTab.getSelect();return{type:e,value:e===BI.DynamicDateTimeCombo.Static?BI.extend(this.ymd.getValue(),this.timeSelect.getValue()):this.dynamicPane.getValue()}}}),BI.DynamicDateTimePopup.EVENT_CHANGE="EVENT_CHANGE",BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.shortcut("bi.dynamic_date_time_popup",BI.DynamicDateTimePopup)},function(e,t){BI.DynamicDateTimeSelect=BI.inherit(BI.Widget,{props:{baseCls:"bi-date-time-select"},render:function(){var t=this;return{type:"bi.center_adapt",items:[{type:"bi.vertical_adapt",items:[{el:{type:"bi.number_editor",ref:function(){t.hour=this},validationChecker:function(e){return BI.isNaturalNumber(e)&&BI.parseInt(e)<24},errorText:function(e){return BI.isNumeric(e)?BI.i18nText("BI-Basic_Input_From_To_Number",'"00-23"'):BI.i18nText("BI-Numerical_Interval_Input_Data")},listeners:[{eventName:BI.SignEditor.EVENT_CONFIRM,action:function(){var e=this.getValue();t._checkHour(e),this.setValue(t._formatValueToDoubleDigit(e)),t.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}},{eventName:BI.SignEditor.EVENT_CHANGE,action:function(){var e=t._autoSwitch(this.getValue(),BI.DynamicDateTimeSelect.HOUR);this.setValue(e)}}],width:60,height:24}},{type:"bi.label",text:":",width:20},{type:"bi.number_editor",ref:function(){t.minute=this},validationChecker:function(e){return BI.isNaturalNumber(e)&&BI.parseInt(e)<60},errorText:function(e){return BI.isNumeric(e)?BI.i18nText("BI-Basic_Input_From_To_Number",'"00-59"'):BI.i18nText("BI-Numerical_Interval_Input_Data")},listeners:[{eventName:BI.SignEditor.EVENT_CONFIRM,action:function(){var e=this.getValue();t._checkMinute(e),this.setValue(t._formatValueToDoubleDigit(e),BI.DynamicDateTimeSelect.MINUTE),t.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}},{eventName:BI.SignEditor.EVENT_CHANGE,action:function(){var e=t._autoSwitch(this.getValue(),BI.DynamicDateTimeSelect.MINUTE);this.setValue(e)}}],width:60,height:24},{type:"bi.label",text:":",width:20},{type:"bi.number_editor",ref:function(){t.second=this},validationChecker:function(e){return BI.isNaturalNumber(e)&&BI.parseInt(e)<60},errorText:function(e){return BI.isNumeric(e)?BI.i18nText("BI-Basic_Input_From_To_Number",'"00-59"'):BI.i18nText("BI-Numerical_Interval_Input_Data")},listeners:[{eventName:BI.SignEditor.EVENT_CONFIRM,action:function(){var e=this.getValue();t._checkSecond(e),this.setValue(t._formatValueToDoubleDigit(e)),t.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}}],width:60,height:24}]}]}},_checkBorder:function(e){e=e||{},this._checkHour(e.hour),this._checkMinute(e.minute),this._checkSecond(e.second)},_checkHour:function(e){this.hour.setDownEnable(0<BI.parseInt(e)),this.hour.setUpEnable(BI.parseInt(e)<23)},_checkMinute:function(e){this.minute.setDownEnable(0<BI.parseInt(e)),this.minute.setUpEnable(BI.parseInt(e)<59)},_checkSecond:function(e){this.second.setDownEnable(0<BI.parseInt(e)),this.second.setUpEnable(BI.parseInt(e)<59)},_autoSwitch:function(e,t){var i=0,n=e+"";switch(t){case BI.DynamicDateTimeSelect.HOUR:i=2;break;case BI.DynamicDateTimeSelect.MINUTE:i=5}if(1===n.length&&BI.parseInt(n)>i&&(n="0"+n),2===n.length)switch(t){case BI.DynamicDateTimeSelect.HOUR:this.hour.isEditing()&&this.minute.focus();break;case BI.DynamicDateTimeSelect.MINUTE:this.minute.isEditing()&&this.second.focus();break;case BI.DynamicDateTimeSelect.SECOND:}return n},_formatValueToDoubleDigit:function(e){(BI.isNull(e)||BI.isEmptyString(e))&&(e=0);var t=BI.parseInt(e);return t<10&&(t="0"+t),t},_assertValue:function(e){return(e=e||{}).hour=this._formatValueToDoubleDigit(e.hour)||"00",e.minute=this._formatValueToDoubleDigit(e.minute)||"00",e.second=this._formatValueToDoubleDigit(e.second)||"00",e},getValue:function(){return{hour:BI.parseInt(this.hour.getValue()),minute:BI.parseInt(this.minute.getValue()),second:BI.parseInt(this.second.getValue())}},setValue:function(e){e=this._assertValue(e),this.hour.setValue(e.hour),this.minute.setValue(e.minute),this.second.setValue(e.second),this._checkBorder(e)}}),BI.DynamicDateTimeSelect.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.dynamic_date_time_select",BI.DynamicDateTimeSelect),BI.extend(BI.DynamicDateTimeSelect,{HOUR:1,MINUTE:2,SECOND:3})},function(e,t){BI.DynamicDateTimeTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,yearLength:4,yearMonthLength:6,yearFullMonthLength:7,compareFormat:"%Y-%X-%d %H:%M:%S"},props:{extraCls:"bi-date-time-trigger",min:"1900-01-01",max:"2099-12-31",height:24,format:"",allowEdit:!0,watermark:""},_init:function(){BI.DynamicDateTimeTrigger.superclass._init.apply(this,arguments);var n=this,r=this.options,e=this._const;this.storeTriggerValue="",this.editor=BI.createWidget({type:"bi.sign_editor",height:r.height,validationChecker:function(e){var t=n._getStandardDateStr(e),i=t.match(/\d+/g);return BI.isKey(r.format)||n._autoAppend(e,i),n._dateCheck(t)&&BI.checkDateLegal(t)&&n._checkVoid({year:0|i[0],month:0|i[1],day:0|i[2]})},quitChecker:function(){return!1},hgap:e.hgap,vgap:e.vgap,allowBlank:!0,watermark:BI.isKey(r.watermark)?r.watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){var e="";return BI.isKey(r.format)||(e=n.editor.isEditing()?BI.i18nText("BI-Basic_Date_Time_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")),e},title:BI.bind(this._getTitle,this)}),this.editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){n.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){n.storeTriggerValue=n.getKey(),n.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_BLUR,function(){n.fireEvent(BI.DynamicDateTimeTrigger.EVENT_BLUR)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){n.fireEvent(BI.DynamicDateTimeTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_VALID,function(){n.fireEvent(BI.DynamicDateTimeTrigger.EVENT_VALID)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){n.fireEvent(BI.DynamicDateTimeTrigger.EVENT_ERROR)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var e=n.editor.getValue();if(BI.isNotNull(e)&&n.editor.setState(e),BI.isNotEmptyString(e)&&!BI.isEqual(n.storeTriggerValue,n.getKey())){var t=n._getStandardDateStr(e).match(/\d+/g);n.storeValue={type:BI.DynamicDateCombo.Static,value:{year:0|t[0],month:0|t[1],day:0|t[2],hour:0|t[3],minute:0|t[4],second:0|t[5]}}}n.fireEvent(BI.DynamicDateTimeTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_START,function(){n.fireEvent(BI.DynamicDateTimeTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){n.fireEvent(BI.DynamicDateTimeTrigger.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.editor},{el:BI.createWidget(),width:24}]}),r.allowEdit||BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.text",title:BI.bind(this._getTitle,this)},left:0,right:24,top:0,bottom:0}]}),this.setValue(r.value)},_getTitle:function(){var e=this.storeValue||{},t=e.type||BI.DynamicDateCombo.Static,i=e.value;switch(t){case BI.DynamicDateCombo.Dynamic:var n=this._getText(i),r=BI.DynamicDateHelper.getCalculation(i),o=BI.print(r,this._getFormatString());return BI.isEmptyString(n)?o:n+":"+o;case BI.DynamicDateCombo.Static:default:return BI.isNull(i)||BI.isNull(i.day)?"":BI.print(BI.getDate(i.year,i.month-1,i.day,i.hour||0,i.minute||0,i.second||0),this._getFormatString())}},_getStandardDateStr:function(e){var t=this._const,i=[],n=!1,r=this._getFormatString().match(/%./g);BI.each(r,function(e,t){switch(t){case"%Y":case"%y":i[0]=e;break;case"%X":case"%x":i[1]=e;break;case"%d":case"%e":i[2]=e;break;case"%S":n=!0}});var o=BI.parseDateTime(e,this._getFormatString());BI.print(o,this._getFormatString())===e&&(e=BI.print(o,t.compareFormat),i=[0,1,2]);var a=e.match(/\d+/g)||[],s=[];BI.each(a.slice(0,3),function(e){s[e]=a[i[e]]});var l=a.slice(3);BI.each(l,function(e,t){BI.isNumeric(t)&&1===t.length&&(l[e]="0"+t)}),2!==l.length||n||l.push("00");var u=l.join(":"),c=s.slice(0,3).join("-");return BI.isNotEmptyString(u)&&(c+=" "+u),c},_getFormatString:function(){return this.options.format||this._const.compareFormat},_dateCheck:function(e){return BI.print(BI.parseDateTime(e,"%Y-%x-%d %H:%M:%S"),"%Y-%x-%d %H:%M:%S")===e||BI.print(BI.parseDateTime(e,"%Y-%X-%d %H:%M:%S"),"%Y-%X-%d %H:%M:%S")===e||BI.print(BI.parseDateTime(e,"%Y-%x-%e %H:%M:%S"),"%Y-%x-%e %H:%M:%S")===e||BI.print(BI.parseDateTime(e,"%Y-%X-%e %H:%M:%S"),"%Y-%X-%e %H:%M:%S")===e||BI.print(BI.parseDateTime(e,"%Y-%x-%d"),"%Y-%x-%d")===e||BI.print(BI.parseDateTime(e,"%Y-%X-%d"),"%Y-%X-%d")===e||BI.print(BI.parseDateTime(e,"%Y-%x-%e"),"%Y-%x-%e")===e||BI.print(BI.parseDateTime(e,"%Y-%X-%e"),"%Y-%X-%e")===e},_checkVoid:function(e){return!BI.checkDateVoid(e.year,e.month,e.day,this.options.min,this.options.max)[0]},_autoAppend:function(e,t){if(BI.isNotNull(t)&&BI.checkDateLegal(e))switch(e.length){case this._const.yearLength:this._yearCheck(e)&&this.editor.setValue(e+"-");break;case this._const.yearMonthLength:case this._const.yearFullMonthLength:var i=e.split("-")[1];(BI.isNotNull(i)&&2===i.length||this._monthCheck(e))&&this.editor.setValue(e+"-")}},_yearCheck:function(e){var t=BI.print(BI.parseDateTime(e,"%Y-%X-%d"),"%Y-%X-%d");return BI.print(BI.parseDateTime(e,"%Y"),"%Y")===e&&t>=this.options.min&&t<=this.options.max},_monthCheck:function(e){var t=BI.parseDateTime(e,"%Y-%X-%d"),i=BI.print(t,"%Y-%X-%d");return 0<t.getMonth()&&(BI.print(BI.parseDateTime(e,"%Y-%X"),"%Y-%X")===e||BI.print(BI.parseDateTime(e,"%Y-%x"),"%Y-%x")===e)&&i>=this.options.min&&i<=this.options.max},_setInnerValue:function(e){var t=BI.print(e,this._getFormatString());this.editor.setState(t),this.editor.setValue(t)},_getText:function(e){var t="",i="";return BI.isNotNull(e.year)&&(0!==BI.parseInt(e.year)&&(t+=Math.abs(e.year)+BI.i18nText("BI-Basic_Year")+(e.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),i=n(BI.i18nText("BI-Basic_Year"),e.position)),BI.isNotNull(e.quarter)&&(0!==BI.parseInt(e.quarter)&&(t+=Math.abs(e.quarter)+BI.i18nText("BI-Basic_Single_Quarter")+(e.quarter<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),i=n(BI.i18nText("BI-Basic_Single_Quarter"),e.position)),BI.isNotNull(e.month)&&(0!==BI.parseInt(e.month)&&(t+=Math.abs(e.month)+BI.i18nText("BI-Basic_Month")+(e.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),i=n(BI.i18nText("BI-Basic_Month"),e.position)),BI.isNotNull(e.week)&&(0!==BI.parseInt(e.week)&&(t+=Math.abs(e.week)+BI.i18nText("BI-Basic_Week")+(e.week<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),i=n(BI.i18nText("BI-Basic_Week"),e.position)),BI.isNotNull(e.day)&&(0!==BI.parseInt(e.day)&&(t+=Math.abs(e.day)+BI.i18nText("BI-Basic_Day")+(e.day<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),i=1===BI.size(e)?n(BI.i18nText("BI-Basic_Month"),e.position):""),BI.isNotNull(e.workDay)&&0!==BI.parseInt(e.workDay)&&(t+=Math.abs(e.workDay)+BI.i18nText("BI-Basic_Work_Day")+(e.workDay<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),t+i;function n(e,t){switch(t){case BI.DynamicDateCard.OFFSET.BEGIN:return e+BI.i18nText("BI-Basic_Begin_Start");case BI.DynamicDateCard.OFFSET.END:return e+BI.i18nText("BI-Basic_End_Stop");case BI.DynamicDateCard.OFFSET.CURRENT:default:return BI.i18nText("BI-Basic_Current_Day")}}},setMinDate:function(e){BI.isNotEmptyString(this.options.min)&&(this.options.min=e)},setMaxDate:function(e){BI.isNotEmptyString(this.options.max)&&(this.options.max=e)},setValue:function(e){var t,i,n=BI.getDate();switch(this.storeValue=e,BI.isNotNull(e)&&(t=e.type||BI.DynamicDateCombo.Static,i=e.value||e),t){case BI.DynamicDateCombo.Dynamic:var r=this._getText(i);n=BI.DynamicDateHelper.getCalculation(i),this._setInnerValue(n,r);break;case BI.DynamicDateCombo.Static:default:if(BI.isNull(i)||BI.isNull(i.day))this.editor.setState(""),this.editor.setValue("");else{var o=BI.print(BI.getDate(i.year,i.month-1,i.day,i.hour||0,i.minute||0,i.second||0),this._getFormatString());this.editor.setState(o),this.editor.setValue(o)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.storeValue},isValid:function(){return this.editor.isValid()}}),BI.DynamicDateTimeTrigger.EVENT_BLUR="EVENT_BLUR",BI.DynamicDateTimeTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicDateTimeTrigger.EVENT_START="EVENT_START",BI.DynamicDateTimeTrigger.EVENT_STOP="EVENT_STOP",BI.DynamicDateTimeTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicDateTimeTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.DynamicDateTimeTrigger.EVENT_VALID="EVENT_VALID",BI.DynamicDateTimeTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicDateTimeTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.shortcut("bi.dynamic_date_time_trigger",BI.DynamicDateTimeTrigger)},function(e,t){BI.SearchEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.SearchEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:"bi-search-editor bi-border bi-focus-shadow",height:24,errorText:"",watermark:BI.i18nText("BI-Basic_Search"),validationChecker:BI.emptyFn,quitChecker:BI.emptyFn})},_init:function(){this.options.height-=2,BI.SearchEditor.superclass._init.apply(this,arguments);var t=this,e=this.options;this.editor=BI.createWidget({type:"bi.editor",height:e.height,watermark:e.watermark,allowBlank:!0,hgap:1,errorText:e.errorText,validationChecker:e.validationChecker,quitChecker:e.quitChecker,value:e.value}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"close-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){t.setValue(""),t.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),t.fireEvent(BI.SearchEditor.EVENT_CHANGE),t.fireEvent(BI.SearchEditor.EVENT_CLEAR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:{type:"bi.icon_label",cls:"search-font"},width:24},{el:t.editor},{el:this.clear,width:24}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){t.fireEvent(BI.SearchEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){t.fireEvent(BI.SearchEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){t.fireEvent(BI.SearchEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){t._checkClear(),t.fireEvent(BI.SearchEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(e){t.fireEvent(BI.SearchEditor.EVENT_KEY_DOWN,e)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){t.fireEvent(BI.SearchEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){t.fireEvent(BI.SearchEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){t.fireEvent(BI.SearchEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){t.fireEvent(BI.SearchEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){t.fireEvent(BI.SearchEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){t.fireEvent(BI.SearchEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){t._checkClear(),t.fireEvent(BI.SearchEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){t.fireEvent(BI.SearchEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){t.fireEvent(BI.SearchEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){t.fireEvent(BI.SearchEditor.EVENT_CHANGE_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){t.fireEvent(BI.SearchEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){t.fireEvent(BI.SearchEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){t.fireEvent(BI.SearchEditor.EVENT_STOP)}),this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},setWaterMark:function(e){this.options.watermark=e,this.editor.setWaterMark(e)},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid())return this.editor.getValue()},getKeywords:function(){var e=this.editor.getLastChangedValue(),t=e.match(/[\S]+/g);return BI.isEndWithBlank(e)?t.concat([" "]):t},getLastValidValue:function(){return this.editor.getLastValidValue()},getLastChangedValue:function(){return this.editor.getLastChangedValue()},setValue:function(e){this.editor.setValue(e),BI.isKey(e)&&this.clear.visible()},isEditing:function(){return this.editor.isEditing()},isValid:function(){return this.editor.isValid()}}),BI.SearchEditor.EVENT_CHANGE="EVENT_CHANGE",BI.SearchEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SearchEditor.EVENT_BLUR="EVENT_BLUR",BI.SearchEditor.EVENT_CLICK="EVENT_CLICK",BI.SearchEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.SearchEditor.EVENT_SPACE="EVENT_SPACE",BI.SearchEditor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.SearchEditor.EVENT_CLEAR="EVENT_CLEAR",BI.SearchEditor.EVENT_START="EVENT_START",BI.SearchEditor.EVENT_PAUSE="EVENT_PAUSE",BI.SearchEditor.EVENT_STOP="EVENT_STOP",BI.SearchEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SearchEditor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.SearchEditor.EVENT_VALID="EVENT_VALID",BI.SearchEditor.EVENT_ERROR="EVENT_ERROR",BI.SearchEditor.EVENT_ENTER="EVENT_ENTER",BI.SearchEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.SearchEditor.EVENT_REMOVE="EVENT_REMOVE",BI.SearchEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.search_editor",BI.SearchEditor)},function(e,t){BI.SmallSearchEditor=BI.inherit(BI.SearchEditor,{_defaultConfig:function(){var e=BI.SmallSearchEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-small-search-editor",height:20})},_init:function(){BI.SmallSearchEditor.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.small_search_editor",BI.SmallSearchEditor)},function(e,t){BI.TextEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.TextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{extraCls:"bi-text-editor bi-border bi-focus-shadow",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!1,watermark:"",errorText:"",height:24})},_init:function(){BI.TextEditor.superclass._init.apply(this,arguments);var t=this,e=this.options;BI.isNumber(e.height)&&this.element.css({height:e.height-2}),BI.isNumber(e.width)&&this.element.css({width:e.width-2}),this.editor=BI.createWidget({type:"bi.editor",height:e.height-2,hgap:e.hgap,vgap:e.vgap,lgap:e.lgap,rgap:e.rgap,tgap:e.tgap,bgap:e.bgap,value:e.value,title:e.title,tipType:e.tipType,validationChecker:e.validationChecker,quitChecker:e.quitChecker,allowBlank:e.allowBlank,watermark:e.watermark,errorText:e.errorText}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){t.fireEvent(BI.TextEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){t.fireEvent(BI.TextEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){t.fireEvent(BI.TextEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){t.fireEvent(BI.TextEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(e){t.fireEvent(BI.TextEditor.EVENT_KEY_DOWN)}),this.editor.on(BI.Editor.EVENT_SPACE,function(e){t.fireEvent(BI.TextEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(e){t.fireEvent(BI.TextEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){t.fireEvent(BI.TextEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){t.fireEvent(BI.TextEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){t.fireEvent(BI.TextEditor.EVENT_CHANGE_CONFIRM)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(e){t.fireEvent(BI.TextEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_START,function(){t.fireEvent(BI.TextEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){t.fireEvent(BI.TextEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){t.fireEvent(BI.TextEditor.EVENT_STOP)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){t.fireEvent(BI.TextEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){t.fireEvent(BI.TextEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){t.fireEvent(BI.TextEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){t.fireEvent(BI.TextEditor.EVENT_EMPTY)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]})},setWaterMark:function(e){this.options.watermark=e,this.editor.setWaterMark(e)},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setErrorText:function(e){this.editor.setErrorText(e)},getErrorText:function(){return this.editor.getErrorText()},isValid:function(){return this.editor.isValid()},setValue:function(e){this.editor.setValue(e)},getValue:function(){return this.editor.getValue()}}),BI.TextEditor.EVENT_CHANGE="EVENT_CHANGE",BI.TextEditor.EVENT_FOCUS="EVENT_FOCUS",BI.TextEditor.EVENT_BLUR="EVENT_BLUR",BI.TextEditor.EVENT_CLICK="EVENT_CLICK",BI.TextEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.TextEditor.EVENT_SPACE="EVENT_SPACE",BI.TextEditor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.TextEditor.EVENT_START="EVENT_START",BI.TextEditor.EVENT_PAUSE="EVENT_PAUSE",BI.TextEditor.EVENT_STOP="EVENT_STOP",BI.TextEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.TextEditor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.TextEditor.EVENT_VALID="EVENT_VALID",BI.TextEditor.EVENT_ERROR="EVENT_ERROR",BI.TextEditor.EVENT_ENTER="EVENT_ENTER",BI.TextEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.TextEditor.EVENT_REMOVE="EVENT_REMOVE",BI.TextEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.text_editor",BI.TextEditor)},function(e,t){BI.SmallTextEditor=BI.inherit(BI.TextEditor,{_defaultConfig:function(){var e=BI.SmallTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-small-text-editor",height:20})},_init:function(){BI.SmallTextEditor.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.small_text_editor",BI.SmallTextEditor)},function(e,t){BI.IntervalSlider=BI.inherit(BI.Single,{_constant:{EDITOR_WIDTH:58,EDITOR_R_GAP:60,EDITOR_HEIGHT:30,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},props:{baseCls:"bi-interval-slider bi-slider-track",digit:!1,unit:""},render:function(){var r=this,e=this._constant;return this.enable=!1,this.valueOne="",this.valueTwo="",this.calculation=new BI.AccurateCalculationModel,this.grayTrack=BI.createWidget({type:"bi.layout",cls:"gray-track",height:6}),this.blueTrack=BI.createWidget({type:"bi.layout",cls:"blue-track bi-high-light-background",height:6}),this.track=this._createTrackWrapper(),this.labelOne=BI.createWidget({type:"bi.sign_text_editor",cls:"slider-editor-button",text:this.options.unit,allowBlank:!1,width:e.EDITOR_WIDTH,validationChecker:function(e){return r._checkValidation(e)}}),this.labelOne.element.hover(function(){r.labelOne.element.removeClass("bi-border").addClass("bi-border")},function(){r.labelOne.element.removeClass("bi-border")}),this.labelOne.on(BI.Editor.EVENT_CONFIRM,function(){var e=r.valueOne,t=BI.parseFloat(this.getValue());r.valueOne=t;var i=r._getPercentByValue(t),n=BI.parseFloat(i.toFixed(1));r._setSliderOnePosition(n),r._setBlueTrack(),r._checkLabelPosition(e,r.valueTwo,r.valueOne,r.valueTwo),r.fireEvent(BI.IntervalSlider.EVENT_CHANGE)}),this.labelTwo=BI.createWidget({type:"bi.sign_text_editor",cls:"slider-editor-button",text:this.options.unit,allowBlank:!1,width:e.EDITOR_WIDTH,validationChecker:function(e){return r._checkValidation(e)}}),this.labelTwo.element.hover(function(){r.labelTwo.element.removeClass("bi-border").addClass("bi-border")},function(){r.labelTwo.element.removeClass("bi-border")}),this.labelTwo.on(BI.Editor.EVENT_CONFIRM,function(){var e=r.valueTwo,t=BI.parseFloat(this.getValue());r.valueTwo=t;var i=r._getPercentByValue(t),n=BI.parseFloat(i.toFixed(1));r._setSliderTwoPosition(n),r._setBlueTrack(),r._checkLabelPosition(r.valueOne,e,r.valueOne,r.valueTwo),r.fireEvent(BI.IntervalSlider.EVENT_CHANGE)}),this.sliderOne=BI.createWidget({type:"bi.single_slider_button"}),this.sliderTwo=BI.createWidget({type:"bi.single_slider_button"}),this._draggable(this.sliderOne,!0),this._draggable(this.sliderTwo,!1),this._setVisible(!1),{type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.track,width:"100%",height:e.TRACK_HEIGHT}]}],hgap:7,height:e.TRACK_HEIGHT},top:23,left:0,width:"100%"},this._createLabelWrapper(),this._createSliderWrapper()]}},_rePosBySizeAfterMove:function(e,t){var i=this.options,n=100*e/this._getGrayTrackLength(),r=BI.parseFloat(n.toFixed(1)),o=this._getValueByPercent(r);o=this._assertValue(o),o=!1===i.digit?o:o.toFixed(i.digit);var a=this.valueOne,s=this.valueTwo;t?(this._setSliderOnePosition(r),this.labelOne.setValue(o),this.valueOne=o,this._checkLabelPosition(a,s,o,this.valueTwo)):(this._setSliderTwoPosition(r),this.labelTwo.setValue(o),this.valueTwo=o,this._checkLabelPosition(a,s,this.valueOne,o)),this._setBlueTrack()},_rePosBySizeAfterStop:function(e,t){var i=100*e/this._getGrayTrackLength(),n=BI.parseFloat(i.toFixed(1));t?this._setSliderOnePosition(n):this._setSliderTwoPosition(n)},_draggable:function(t,i){var n=this,r=(this.options,!1),o=0,a=0,s=0,l=new BI.MouseMoveTracker(function(e){l.isDragging()&&(r=!0,o=u(s+(a+=e)),t.element.addClass("dragging"),n._rePosBySizeAfterMove(o,i))},function(){!0===r&&(o=u(o),n._rePosBySizeAfterStop(o,i),a=o=0,s=o,r=!1),t.element.removeClass("dragging"),l.releaseMouseMoves(),n.fireEvent(BI.IntervalSlider.EVENT_CHANGE)},window);function u(e){return BI.clamp(e,0,n._getGrayTrackLength())}t.element.on("mousedown",function(e){t.isEnabled()&&(u(s=this.offsetLeft),l.captureMouseMoves(e))})},_createLabelWrapper:function(){var e=this._constant;return{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.labelOne,top:0,left:"0%"}]},{type:"bi.absolute",items:[{el:this.labelTwo,top:0,left:"100%"}]}],rgap:e.EDITOR_R_GAP,height:e.SLIDER_HEIGHT},top:0,left:0,width:"100%"}},_createSliderWrapper:function(){var e=this._constant;return{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.sliderOne,top:0,left:"0%"}]},{type:"bi.absolute",items:[{el:this.sliderTwo,top:0,left:"100%"}]}],hgap:e.SLIDER_WIDTH_HALF,height:e.SLIDER_HEIGHT},top:20,left:0,width:"100%"}},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(e){var t=this.options,i=!1,n=(e+"").split(".")[1];return BI.isEmptyString(n)||BI.isNumeric(e)&&!(BI.isNull(e)||e<this.min||e>this.max)&&(i=!(!1!==t.digit&&!BI.isInteger(e))||(n=n||"").length===t.digit),i},_checkOverlap:function(){var e=this.labelOne.element[0].offsetLeft,t=this.labelTwo.element[0].offsetLeft;e<=t?t-e<90?this.labelTwo.element.css({top:40}):this.labelTwo.element.css({top:0}):e-t<90?this.labelTwo.element.css({top:40}):this.labelTwo.element.css({top:0})},_checkLabelPosition:function(e,t,i,n,r){if(e=BI.parseFloat(e),t=BI.parseFloat(t),i=BI.parseFloat(i),n=BI.parseFloat(n),e<=t&&n<i||t<=e&&i<n){var o=BI.parseFloat(this.sliderOne.element[0].style.left)<BI.parseFloat(this.sliderTwo.element[0].style.left);this._resetLabelPosition(!o)}},_resetLabelPosition:function(e){this.labelOne.element.css({left:e?"100%":"0%"}),this.labelTwo.element.css({left:e?"0%":"100%"})},_setSliderOnePosition:function(e){this.sliderOne.element.css({left:e+"%"})},_setSliderTwoPosition:function(e){this.sliderTwo.element.css({left:e+"%"})},_setBlueTrackLeft:function(e){this.blueTrack.element.css({left:e+"%"})},_setBlueTrackWidth:function(e){this.blueTrack.element.css({width:e+"%"})},_setBlueTrack:function(){var e=this._getPercentByValue(this.labelOne.getValue()),t=this._getPercentByValue(this.labelTwo.getValue());e<=t?(this._setBlueTrackLeft(e),this._setBlueTrackWidth(t-e)):(this._setBlueTrackLeft(t),this._setBlueTrackWidth(e-t))},_setAllPosition:function(e,t){this._setSliderOnePosition(e),this._setSliderTwoPosition(t),this._setBlueTrack()},_setVisible:function(e){this.sliderOne.setVisible(e),this.sliderTwo.setVisible(e),this.labelOne.setVisible(e),this.labelTwo.setVisible(e)},_setErrorText:function(){var e=BI.i18nText("BI-Basic_Please_Enter_Number_Between",this.min,this.max);this.labelOne.setErrorText(e),this.labelTwo.setErrorText(e)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(e){if(0===e)return this.min;if(100===e)return this.max;var t=this.calculation.accurateSubtraction(this.max,this.min),i=this.calculation.accurateMultiplication(t,e),n=this.calculation.accurateDivisionTenExponent(i,2);if(this.precision<0){var r=BI.parseFloat(this.calculation.accurateAddition(n,this.min)),o=Math.round(this.calculation.accurateDivisionTenExponent(r,-this.precision));return this.calculation.accurateMultiplication(o,Math.pow(10,-this.precision))}return BI.parseFloat(this.calculation.accurateAddition(n,this.min).toFixed(this.precision))},_getPercentByValue:function(e){return 100*(e-this.min)/(this.max-this.min)},_setDraggableEnable:function(e){this.sliderOne.setEnable(e),this.sliderTwo.setEnable(e)},_getPrecision:function(){var e=this.calculation.accurateSubtraction(this.max,this.min).toPrecision(4),t=[];return-1<e.indexOf("e")?(t=e.split("e"),BI.size(t[0].split(".")[1])-BI.parseInt(t[1].substring(1))):1<(t=e.split(".")).length?t[1].length:0},_assertValue:function(e){return e<=this.min?this.min:e>=this.max?this.max:e},_setEnable:function(e){BI.IntervalSlider.superclass._setEnable.apply(this,[e]),e?this.blueTrack.element.removeClass("disabled-blue-track").addClass("blue-track"):this.blueTrack.element.removeClass("blue-track").addClass("disabled-blue-track")},getValue:function(){return this.valueOne<=this.valueTwo?{min:this.valueOne,max:this.valueTwo}:{min:this.valueTwo,max:this.valueOne}},setMinAndMax:function(e){var t=BI.parseFloat(e.min),i=BI.parseFloat(e.max);!isNaN(t)&&!isNaN(i)&&t<=i&&(this.min=t,this.max=i,this.valueOne=t,this.valueTwo=i,this.precision=this._getPrecision(),this._setDraggableEnable(!0)),i===t&&this._setDraggableEnable(!1)},setValue:function(e){var t=this.options,i=BI.parseFloat(e.min),n=BI.parseFloat(e.max);i=!1===t.digit?i:BI.parseFloat(i.toFixed(t.digit)),n=!1===t.digit?n:BI.parseFloat(n.toFixed(t.digit)),isNaN(i)||isNaN(n)||(this._checkValidation(i)&&(this.valueOne=this.valueOne<=this.valueTwo?i:n),this._checkValidation(n)&&(this.valueTwo=this.valueOne<=this.valueTwo?n:i),i<this.min&&(this.valueOne=this.min),n>this.max&&(this.valueTwo=this.max))},reset:function(){this._setVisible(!1),this.enable=!1,this.valueOne="",this.valueTwo="",this.min=NaN,this.max=NaN,this._setBlueTrackWidth(0)},populate:function(){var e=this.options;isNaN(this.min)||isNaN(this.max)||(this.enable=!0,this._setVisible(!0),this._setErrorText(),(BI.isNumeric(this.valueOne)||BI.isNotEmptyString(this.valueOne))&&(BI.isNumeric(this.valueTwo)||BI.isNotEmptyString(this.valueTwo))?(this.labelOne.setValue(!1===e.digit?this.valueOne:BI.parseFloat(this.valueOne).toFixed(e.digit)),this.labelTwo.setValue(!1===e.digit?this.valueTwo:BI.parseFloat(this.valueTwo).toFixed(e.digit)),this._setAllPosition(this._getPercentByValue(this.valueOne),this._getPercentByValue(this.valueTwo))):(this.labelOne.setValue(this.min),this.labelTwo.setValue(this.max),this._setAllPosition(0,100)),this._resetLabelPosition(this.valueOne>this.valueTwo))}}),BI.IntervalSlider.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.interval_slider",BI.IntervalSlider)},function(e,t){BI.AccurateCalculationModel=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.AccurateCalculationModel.superclass._defaultConfig.apply(this,arguments),{baseCls:""})},_init:function(){BI.AccurateCalculationModel.superclass._init.apply(this,arguments)},_getMagnitude:function(e){for(var t="1",i=0;i<e;i++)t+="0";return BI.parseInt(t)},_formatDecimal:function(e,t){if(e.numDecimalLength!==t.numDecimalLength){var i=e.numDecimalLength-t.numDecimalLength;if(0<i)var n=t;else{n=e;i=0-i}for(var r=0;r<i;r++)"0"===n.numDecimal&&0===r||(n.numDecimal+="0")}},_stringNumberFactory:function(e){var t=e.toString().split("."),i=t[0];if(1===t.length)var n="0",r=0;else n=t[1],r=t[1].length;return{numInteger:i,numDecimal:n,numDecimalLength:r}},_accurateSubtraction:function(e,t){var i=this._stringNumberFactory(e),n=this._stringNumberFactory(t),r=BI.parseInt(i.numInteger)-BI.parseInt(n.numInteger);this._formatDecimal(i,n);var o=function u(e,t){if(e.numDecimal.length>=t.numDecimal.length)return e.numDecimal.length;return t.numDecimal.length}(i,n);if(BI.parseInt(i.numDecimal)>=BI.parseInt(n.numDecimal))var a=l((BI.parseInt(i.numDecimal)-BI.parseInt(n.numDecimal)).toString(),o);else{r--;a=l((this._getMagnitude(o)+BI.parseInt(i.numDecimal)-BI.parseInt(n.numDecimal)).toString(),o)}var s=r+"."+a;return BI.parseFloat(s);function l(e,t){for(var i=t-e.length,n=0;n<i;n++)e="0"+e;return e}},_accurateAddition:function(e,t){var i=this._stringNumberFactory(e),n=this._stringNumberFactory(t),r=BI.parseInt(i.numInteger)+BI.parseInt(n.numInteger);this._formatDecimal(i,n);var o=(BI.parseInt(i.numDecimal)+BI.parseInt(n.numDecimal)).toString();"0"!==o&&(o=o.length<=i.numDecimal.length?function s(e,t){for(var i=t-e.length,n=0;n<i;n++)e="0"+e;return e}(o,i.numDecimal.length):(r++,o.slice(1)));var a=r+"."+o;return BI.parseFloat(a)},_accurateMultiplication:function(e,t){var i=this._stringNumberFactory(e),n=this._stringNumberFactory(t),r=BI.parseInt(i.numInteger)*BI.parseInt(n.numInteger),o=this._accurateDivisionTenExponent(BI.parseInt(i.numDecimal)*BI.parseInt(n.numInteger),i.numDecimalLength),a=this._accurateDivisionTenExponent(BI.parseInt(i.numInteger)*BI.parseInt(n.numDecimal),n.numDecimalLength),s=this._accurateDivisionTenExponent(BI.parseInt(i.numDecimal)*BI.parseInt(n.numDecimal),i.numDecimalLength+n.numDecimalLength);return this._accurateAddition(this._accurateAddition(this._accurateAddition(r,o),a),s)},_accurateDivisionTenExponent:function(e,t){var i=this._stringNumberFactory(e);if(i.numInteger.length>t)var n=i.numInteger.slice(0,i.numInteger.length-t),r=i.numInteger.slice(-t);else n="0",r=function a(e,t){for(var i=t-e.length,n=0;n<i;n++)e="0"+e;return e}(i.numInteger,t);var o=n+"."+r+i.numDecimal;return BI.parseFloat(o)},accurateSubtraction:function(e,t){return 0<=e&&0<=t?t<=e?this._accurateSubtraction(e,t):-this._accurateSubtraction(t,e):0<=e&&t<0?this._accurateAddition(e,-t):e<0&&0<=t?-this._accurateAddition(-e,t):e<0&&t<0?t<=e?this._accurateSubtraction(-t,-e):this._accurateSubtraction(-e,-t):void 0},accurateAddition:function(e,t){return 0<=e&&0<=t?this._accurateAddition(e,t):0<=e&&t<0?this.accurateSubtraction(e,-t):e<0&&0<=t?this.accurateSubtraction(t,-e):e<0&&t<0?-this._accurateAddition(-e,-t):void 0},accurateMultiplication:function(e,t){return 0<=e&&0<=t?this._accurateMultiplication(e,t):0<=e&&t<0?-this._accurateMultiplication(e,-t):e<0&&0<=t?-this._accurateMultiplication(-e,t):e<0&&t<0?this._accurateMultiplication(-e,-t):void 0},accurateDivisionTenExponent:function(e,t){return 0<=e?this._accurateDivisionTenExponent(e,t):-this._accurateDivisionTenExponent(-e,t)}})},function(e,t){BI.DownListCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-down-list-combo",height:24,items:[],adjustLength:0,direction:"bottom",trigger:"click",container:null,stopPropagation:!1,el:{}})},_init:function(){BI.DownListCombo.superclass._init.apply(this,arguments);var i=this,e=this.options;this.popupview=BI.createWidget({type:"bi.multi_layer_down_list_popup",items:e.items,chooseType:e.chooseType,value:e.value}),this.popupview.on(BI.DownListPopup.EVENT_CHANGE,function(e){i.fireEvent(BI.DownListCombo.EVENT_CHANGE,e),i.downlistcombo.hideView()}),this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,function(e,t){i.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,e,t),i.downlistcombo.hideView()}),this.downlistcombo=BI.createWidget({element:this,type:"bi.combo",trigger:e.trigger,isNeedAdjustWidth:!1,container:e.container,adjustLength:e.adjustLength,direction:e.direction,stopPropagation:e.stopPropagation,el:BI.createWidget(e.el,{type:"bi.icon_trigger",extraCls:e.iconCls?e.iconCls:"pull-down-font",width:e.width,height:e.height}),popup:{el:this.popupview,stopPropagation:e.stopPropagation,maxHeight:1e3}}),this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){i.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW)})},hideView:function(){this.downlistcombo.hideView()},showView:function(e){this.downlistcombo.showView(e)},populate:function(e){this.popupview.populate(e)},setValue:function(e){this.popupview.setValue(e)},getValue:function(){return this.popupview.getValue()}}),BI.DownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DownListCombo.EVENT_SON_VALUE_CHANGE="EVENT_SON_VALUE_CHANGE",BI.DownListCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_layer_down_list_combo",BI.DownListCombo)},function(e,t){BI.MultiLayerDownListPopup=BI.inherit(BI.Pane,{constants:{nextIcon:"pull-right-e-font",height:25,iconHeight:12,iconWidth:12,hgap:0,vgap:0,border:1},_defaultConfig:function(){var e=BI.MultiLayerDownListPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:"bi-down-list-popup",items:[],chooseType:BI.Selection.Multi})},_init:function(){BI.MultiLayerDownListPopup.superclass._init.apply(this,arguments),this.singleValues=[],this.childValueMap={},this.fatherValueMap={};var s=this,e=this.options,t=this._createPopupItems(e.items);this.popup=BI.createWidget({type:"bi.button_tree",items:BI.createItems(t,{},{adjustLength:-2}),layouts:[{type:"bi.vertical",hgap:this.constants.hgap,vgap:this.constants.vgap}],value:this._digest(e.value),chooseType:e.chooseType}),this.popup.on(BI.ButtonTree.EVENT_CHANGE,function(e,t){var i=e;if(BI.isNotNull(s.childValueMap[e])){i=s.childValueMap[e];var n=s.fatherValueMap[e],r=(n+"").split("_");s.fireEvent(BI.MultiLayerDownListPopup.EVENT_SON_VALUE_CHANGE,i,1<r.length?r:n)}else s.fireEvent(BI.MultiLayerDownListPopup.EVENT_CHANGE,i,t);if(!BI.contains(s.singleValues,i)){var o=s.getValue(),a=[];BI.each(o,function(e,t){t.value!=i&&a.push(t)}),s.setValue(a)}}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup],vgap:5})},_createPopupItems:function(r){var o=this,a=[];return BI.each(r,function(e,t){var i={type:"bi.down_list_group",items:[]};if(BI.each(t,function(e,r){BI.isNotEmptyArray(r.children)&&!BI.isEmpty(r.el)?(r.type="bi.combo_group",r.cls="down-list-group",r.trigger="hover",r.isNeedAdjustWidth=!1,r.el.title=r.el.title||r.el.text,r.el.type="bi.down_list_group_item",r.el.logic={dynamic:!0},r.el.height=o.constants.height,r.el.iconCls2=o.constants.nextIcon,r.popup={lgap:1,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]},innerVGap:5},r.el.childValues=[],BI.each(r.children,function(e,t){t=t.el?BI.extend(t.el,{children:t.children}):t;var i=BI.deepClone(r.el.value),n=BI.deepClone(t.value);o.singleValues.push(t.value),t.type="bi.down_list_item",t.extraCls=" child-down-list-item",t.title=t.title||t.text,t.textRgap=10,t.isNeedAdjustWidth=!1,t.logic={dynamic:!0},t.father=i,o.fatherValueMap[o._createChildValue(i,n)]=i,o.childValueMap[o._createChildValue(i,n)]=n,t.value=o._createChildValue(i,n),r.el.childValues.push(t.value),BI.isNotEmptyArray(t.children)&&(t.type="bi.down_list_group_item",o._createChildren(t),t.height=o.constants.height,t.iconCls2=o.constants.nextIcon,r.el.childValues=BI.concat(r.el.childValues,t.childValues))})):(r.type="bi.down_list_item",r.title=r.title||r.text,r.textRgap=10,r.isNeedAdjustWidth=!1,r.logic={dynamic:!0});var t={};t.el=r,i.items.push(t)}),o._isGroup(i.items)&&BI.each(i.items,function(e,t){o.singleValues.push(t.el.value)}),a.push(i),o._needSpliter(e,r.length)){var n=BI.createWidget({type:"bi.vertical",items:[{el:{type:"bi.layout",cls:"bi-down-list-spliter bi-border-top cursor-pointer",height:0}}],cls:"bi-down-list-spliter-container cursor-pointer",vgap:5,lgap:10});a.push(n)}}),a},_createChildren:function(r){var o=this;r.childValues=[],BI.each(r.children,function(e,t){var i=BI.deepClone(r.value),n=BI.deepClone(t.value);t.type="bi.down_list_item",t.title=t.title||t.text,t.textRgap=10,t.isNeedAdjustWidth=!1,t.logic={dynamic:!0},t.father=i,o.fatherValueMap[o._createChildValue(i,n)]=i,o.childValueMap[o._createChildValue(i,n)]=n,t.value=o._createChildValue(i,n),r.childValues.push(t.value)})},_isGroup:function(e){return 1<e.length},_needSpliter:function(e,t){return e<t-1},_createChildValue:function(e,t){var i=e;return BI.isArray(e)&&(i=e.join("_")),i+"_"+t},_digest:function(e){var n=this,r=[];return BI.each(e,function(e,t){var i;i=BI.isNotNull(t.childValue)?n._createChildValue(t.value,t.childValue):t.value,r.push(i)}),r},_checkValues:function(a){var e=this.options,s=[];return BI.each(e.items,function(o,e){BI.each(e,function(e,t){if(BI.isNotNull(t.children)){var i=function r(e,t){var n="";return BI.some(e,function(e,i){return BI.some(t,function(e,t){if(i===t)return n=i,!0})}),n}(function n(e){var i=[];BI.isNotNull(e.children)?BI.each(e.children,function(e,t){i=BI.concat(i,n(t))}):i.push(e.value);return i}(t),a[o]);BI.isNotEmptyString(i)&&s.push(i)}else t.value===a[o][0]&&s.push(a[o][0])})}),s},populate:function(e){BI.MultiLayerDownListPopup.superclass.populate.apply(this,arguments);this.childValueMap={},this.fatherValueMap={},this.singleValues=[];var t=this._createPopupItems(e),i=BI.createItems(t,{},{adjustLength:-2});this.popup.populate(i)},setValue:function(e){this.popup.setValue(this._digest(e))},_getValue:function(){var i=[];return BI.each(this.popup.getAllButtons(),function(e,t){e%2==0&&i.push(t.getValue())}),i},getValue:function(){var o=this,a=[],e=this._checkValues(this._getValue());return BI.each(e,function(e,t){var i={};if(BI.isNotNull(o.childValueMap[t])){var n=o.fatherValueMap[t];i.childValue=o.childValueMap[t];var r=(n+"").split("_");i.value=1<r.length?r:n}else i.value=t;a.push(i)}),a}}),BI.MultiLayerDownListPopup.EVENT_CHANGE="EVENT_CHANGE",BI.MultiLayerDownListPopup.EVENT_SON_VALUE_CHANGE="EVENT_SON_VALUE_CHANGE",BI.shortcut("bi.multi_layer_down_list_popup",BI.MultiLayerDownListPopup)},function(e,t){BI.MultiLayerSelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-select-tree-combo",isDefaultInit:!1,height:24,text:"",itemsCreator:BI.emptyFn,items:[],value:"",attributes:{tabIndex:0},allowEdit:!1,allowSearchValue:!1,allowInsertValue:!1})},render:function(){var t=this,e=this.options,i=e.itemsCreator===BI.emptyFn?this._getSyncConfig():this._getAsyncConfig();return e.allowEdit||e.itemsCreator!==BI.emptyFn?{type:"bi.absolute",items:[{el:i,left:0,right:0,top:0,bottom:0},{el:{type:"bi.trigger_icon_button",cls:"trigger-icon-button",ref:function(e){t.triggerBtn=e},width:e.height,height:e.height,handler:function(){t.combo.isViewVisible()?t.combo.hideView():t.combo.showView()}},right:0,bottom:0,top:0}]}:i},_getBaseConfig:function(){var t=this,e=this.options;return{type:"bi.combo",container:e.container,destroyWhenHide:e.destroyWhenHide,adjustLength:2,ref:function(e){t.combo=e},popup:{el:{type:"bi.multilayer_select_tree_popup",isDefaultInit:e.isDefaultInit,itemsCreator:e.itemsCreator,items:e.items,ref:function(e){t.trigger&&t.trigger.getSearcher().setAdapter(e)},listeners:[{eventName:BI.MultiLayerSelectTreePopup.EVENT_CHANGE,action:function(){t.setValue(this.getValue()),t.combo.hideView(),t.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_CHANGE)}}],onLoaded:function(){BI.nextTick(function(){t.combo.adjustWidth(),t.combo.adjustHeight()})}},value:e.value,maxHeight:400,minHeight:240},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){t.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_BEFORE_POPUPVIEW)}}]}},_getSearchConfig:function(){var t=this,i=this.options;return{el:{type:"bi.multilayer_select_tree_trigger",container:i.container,allowInsertValue:i.allowInsertValue,allowSearchValue:i.allowSearchValue,allowEdit:i.allowEdit,cls:"multilayer-select-tree-trigger",ref:function(e){t.trigger=e},items:i.items,itemsCreator:i.itemsCreator,valueFormatter:i.valueFormatter,watermark:i.watermark,height:i.height-2,text:i.text,value:i.value,tipType:i.tipType,warningTitle:i.warningTitle,title:i.title,listeners:[{eventName:BI.MultiLayerSelectTreeTrigger.EVENT_CHANGE,action:function(){t.setValue(this.getValue()),t.combo.hideView(),t.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_CHANGE)}},{eventName:BI.MultiLayerSelectTreeTrigger.EVENT_FOCUS,action:function(){t.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_FOCUS)}},{eventName:BI.MultiLayerSelectTreeTrigger.EVENT_BLUR,action:function(){t.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_BLUR)}},{eventName:BI.MultiLayerSelectTreeTrigger.EVENT_SEARCHING,action:function(){t.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_SEARCHING)}},{eventName:BI.MultiLayerSelectTreeTrigger.EVENT_ADD_ITEM,action:function(){var e=t.trigger.getSearcher().getKeyword();t.combo.setValue([e]),t.combo.hideView()}}]},toggle:!i.allowEdit,hideChecker:function(e){return!(i.container&&t.trigger.getSearcher().isSearching()&&0<t.trigger.getSearcher().getView().element.find(e.target).length)&&0===t.triggerBtn.element.find(e.target).length},listeners:[{eventName:BI.Combo.EVENT_AFTER_HIDEVIEW,action:function(){t.trigger.stopEditing()}},{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){t.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_BEFORE_POPUPVIEW)}}]}},_getSyncConfig:function(){var e=this.options,t=this._getBaseConfig();return BI.extend(t,e.allowEdit?this._getSearchConfig():{el:{type:"bi.single_tree_trigger",text:e.text,height:e.height,items:e.items,value:e.value}})},_getAsyncConfig:function(){var e=this._getBaseConfig();return BI.extend(e,this._getSearchConfig())},setValue:function(e){e=BI.isArray(e)?e:[e],this.combo.setValue(e)},getValue:function(){return this.combo.getValue()},populate:function(e){this.combo.populate(e)}}),BI.MultiLayerSelectTreeCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiLayerSelectTreeCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiLayerSelectTreeCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiLayerSelectTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.MultiLayerSelectTreeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multilayer_select_tree_combo",BI.MultiLayerSelectTreeCombo)},function(e,t){BI.MultiLayerSelectTreeInsertSearchPane=BI.inherit(BI.Widget,{props:function(){return{baseCls:"bi-multilayer-select-tree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[],value:""}},render:function(){var i=this,n=this.options;return this.tree=BI.createWidget({type:"bi.multilayer_select_level_tree",isDefaultInit:n.isDefaultInit,items:n.items,itemsCreator:n.itemsCreator===BI.emptyFn?BI.emptyFn:function(e,t){n.itemsCreator(e,function(e){t(e),i.setKeyword(n.keywordGetter())})},keywordGetter:n.keywordGetter,value:n.value,scrollable:null,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(){i.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}},{eventName:BI.MultiLayerSelectLevelTree.EVENT_CHANGE,action:function(){i.fireEvent(BI.MultiLayerSelectTreeInsertSearchPane.EVENT_CHANGE)}}]}),{type:"bi.vertical",scrolly:!1,scrollable:!0,vgap:5,items:[{type:"bi.text_button",invisible:!0,text:BI.i18nText("BI-Basic_Click_To_Add_Text",""),height:24,cls:"bi-high-light",hgap:5,ref:function(e){i.addNotMatchTip=e},handler:function(){i.fireEvent(BI.MultiLayerSelectTreeInsertSearchPane.EVENT_ADD_ITEM,n.keywordGetter())}},this.tree]}},setKeyword:function(e){var t=BI.isEmptyArray(this.tree.getAllLeaves());this.addNotMatchTip.setVisible(t),t&&this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",e))},getValue:function(){return this.tree.getValue()},setValue:function(e){e=BI.isArray(e)?e:[e],this.tree.setValue(e)},populate:function(e){this.tree.populate(e)}}),BI.MultiLayerSelectTreeInsertSearchPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.MultiLayerSelectTreeInsertSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_insert_search_pane",BI.MultiLayerSelectTreeInsertSearchPane)},function(e,t){BI.MultiLayerSelectLevelTree=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-select-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,value:"",scrollable:!0})},_init:function(){var e=this.options;BI.MultiLayerSelectLevelTree.superclass._init.apply(this,arguments),this.storeValue=e.value,this.initTree(this.options.items),this.check()},_formatItems:function(n,r,o){var a=this,s=this.options.keywordGetter();return BI.each(n,function(e,t){var i={};t.layer=r,BI.isKey(t.id)||(t.id=BI.UUID()),t.keyword=t.keyword||s,i.pNode=o,!0===t.isParent||!0===t.parent||BI.isNotEmptyArray(t.children)?(i.type="bi.multilayer_select_tree_mid_plus_group_node",e===n.length-1&&(i.type="bi.multilayer_select_tree_last_plus_group_node",i.isLastNode=!0),0!==e||o||(i.type="bi.multilayer_select_tree_first_plus_group_node"),0!==e||e!==n.length-1||o||(i.type="bi.multilayer_select_tree_plus_group_node"),BI.defaults(t,i),a._formatItems(t.children,r+1,t)):(i.type="bi.multilayer_single_tree_mid_tree_leaf_item",0!==e||o||(i.type="bi.multilayer_single_tree_first_tree_leaf_item"),e===n.length-1&&(i.type="bi.multilayer_single_tree_last_tree_leaf_item"),BI.defaults(t,i))}),n},_assertId:function(e){BI.each(e,function(e,t){t.id=t.id||BI.UUID()})},initTree:function(e){var n=this,r=this.options,o=!1;this.empty(),this._assertId(e),this.tree=BI.createWidget({type:"bi.custom_tree",cls:"tree-view display-table",expander:{type:"bi.select_tree_expander",isDefaultInit:r.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(e),0),itemsCreator:function(t,i){1!==t.times||t.node||BI.nextTick(function(){n.loading()}),r.itemsCreator(t,function(e){o=e.hasNext,1!==t.times||t.node||n._populate(e.items),i(n._formatItems(BI.Tree.transformToTreeFormat(e.items),t.node?t.node.layer+1:0,t.node)),n.setValue(n.storeValue),1!==t.times||t.node||BI.nextTick(function(){n.loaded()})})},value:r.value,el:{type:"bi.loader",isDefaultInit:r.itemsCreator!==BI.emptyFn,el:{type:"bi.button_tree",chooseType:r.chooseType,behaviors:r.behaviors,layouts:[{type:"bi.vertical"}]},hasNext:function(){return o}}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(e,t){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&(n.setValue(t),n.fireEvent(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,arguments))}),BI.createWidget({type:"bi.adaptive",element:this,scrollable:r.scrollable,items:[this.tree]})},_populate:function(){BI.MultiLayerSelectLevelTree.superclass.populate.apply(this,arguments)},populate:function(e){this._populate(e),BI.isNull(e)?this.tree.populate():this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(e),0))},setValue:function(e){this.options.chooseType===BI.Selection.None||(this.storeValue=e,this.tree.setValue(e))},getValue:function(){return BI.isArray(this.storeValue)?this.storeValue:BI.isNull(this.storeValue)?[]:[this.storeValue]},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(e){return this.tree.getNodeById(e)},getNodeByValue:function(e){return this.tree.getNodeByValue(e)}}),BI.MultiLayerSelectLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_level_tree",BI.MultiLayerSelectLevelTree)},function(e,t){BI.MultiLayerSelectTreePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-select-tree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[],value:"",onLoaded:BI.emptyFn,minHeight:240})},_init:function(){BI.MultiLayerSelectTreePopup.superclass._init.apply(this,arguments);var e=this,t=this.options;this.tree=BI.createWidget({type:"bi.multilayer_select_level_tree",isDefaultInit:t.isDefaultInit,items:t.items,itemsCreator:t.itemsCreator,keywordGetter:t.keywordGetter,value:t.value,scrollable:null,onLoaded:function(){e.tree.check(),t.onLoaded()}}),BI.createWidget({type:"bi.vertical",scrolly:!1,scrollable:!0,element:this,vgap:5,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,function(){e.fireEvent(BI.MultiLayerSelectTreePopup.EVENT_CHANGE)}),this.tree.css("min-height",t.minHeight-10)},getValue:function(){return this.tree.getValue()},setValue:function(e){e=BI.isArray(e)?e:[e],this.tree.setValue(e)},populate:function(e){this.tree.populate(e)}}),BI.MultiLayerSelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_popup",BI.MultiLayerSelectTreePopup)},function(e,t){BI.MultiLayerSelectTreeTrigger=BI.inherit(BI.Trigger,{props:function(){return{extraCls:"bi-multi-layer-select-tree-trigger bi-border bi-focus-shadow bi-border-radius",height:24,valueFormatter:function(e){return e},itemsCreator:BI.emptyFn,watermark:BI.i18nText("BI-Basic_Search"),allowSearchValue:!1,title:BI.bind(this._getShowText,this)}},render:function(){var n=this,r=this.options;r.itemsCreator===BI.emptyFn&&this._initData();var e={type:"bi.htape",items:[{el:{type:"bi.searcher",ref:function(){n.searcher=this},masker:BI.isNotNull(r.container)?{offset:{},container:r.container}:{offset:{}},isAutoSearch:!1,el:{type:"bi.state_editor",ref:function(){n.editor=this},defaultText:r.text,text:this._digest(r.value),value:r.value,height:r.height,tipText:"",watermark:r.watermark,listeners:[{eventName:BI.StateEditor.EVENT_FOCUS,action:function(){n.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_FOCUS)}},{eventName:BI.StateEditor.EVENT_BLUR,action:function(){n.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_BLUR)}},{eventName:BI.StateEditor.EVENT_CHANGE,action:function(){n.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_SEARCHING)}}]},popup:{type:r.allowInsertValue?"bi.multilayer_select_tree_insert_search_pane":"bi.multilayer_select_tree_popup",itemsCreator:r.itemsCreator===BI.emptyFn?BI.emptyFn:function(e,t){e.keyword=n.editor.getValue(),r.itemsCreator(e,t)},keywordGetter:function(){return n.editor.getValue()},cls:"bi-card",listeners:[{eventName:BI.MultiLayerSelectTreeInsertSearchPane.EVENT_ADD_ITEM,action:function(){n.options.text=n.getSearcher().getKeyword(),n.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_ADD_ITEM)}}],ref:function(e){n.popup=e}},onSearch:function(e,t){var i=e.keyword;r.itemsCreator===BI.emptyFn?(t(n._getSearchItems(i)),r.allowInsertValue&&n.popup.setKeyword(i)):t()},listeners:[{eventName:BI.Searcher.EVENT_CHANGE,action:function(){n.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_CHANGE)}}]}},{el:{type:"bi.layout",width:24},width:24}]};return r.allowEdit?e:{type:"bi.absolute",items:[{el:e,left:0,right:0,top:0,bottom:0},{el:{type:"bi.layout"},left:0,right:24,top:0,bottom:0}]}},_initData:function(){var e=this.options;this.tree=new BI.Tree,this.nodes=BI.Tree.treeFormat(BI.deepClone(e.items)),this.tree.initTree(this.nodes)},_getSearchItems:function(i){var n=this,r=this.options,o=[];return this.tree.traverse(function(e){var t=BI.Func.getSearchResult(n.tree.isRoot(e)?[]:BI.concat([e.text],r.allowSearchValue?[e.value]:[]),i);if(0<t.find.length||0<t.match.length)return o.push(e),!0}),this._fillTreeStructure4Search(o,"id")},_createJson:function(e,t){return{id:e.id,pId:e.pId,text:e.text,value:e.value,isParent:BI.isNotEmptyArray(e.children),open:t}},_getChildren:function(e){var n=this;e.children=e.children||[];var r=[];return BI.each(e.children,function(e,t){var i=n._getChildren(t);r=r.concat(i)}),e.children.concat(r)},_fillTreeStructure4Search:function(e){var i=this,n=[],r=[];for(BI.each(e,function(e,t){r.push({pId:t.pId}),n.push(t),n=n.concat(i._getChildren(t))});BI.isNotEmptyArray(r);){var t=r.pop(),o=this.tree.search(this.tree.getRoot(),t.pId,"id");null!=o&&(o.open=!0,r.push({pId:o.pId}),n.push(o))}return BI.uniqBy(BI.map(n,function(e,t){return i._createJson(t,t.open)}),"id")},_digest:function(i){var e=this.options;if(e.itemsCreator!==BI.emptyFn)return e.valueFormatter(i);var t=BI.find(e.items,function(e,t){return t.value===i});return BI.isNotNull(t)?t.text:e.text},_getShowText:function(){return this.editor.getText()},stopEditing:function(){this.searcher.stopSearch()},getSearcher:function(){return this.searcher},populate:function(e){this.options.items=e,this._initData(e)},setValue:function(e){this.editor.setState(this._digest(e[0]))},getValue:function(){return this.searcher.getValue()}}),BI.MultiLayerSelectTreeTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.MultiLayerSelectTreeTrigger.EVENT_BLUR="EVENT_BLUR",BI.MultiLayerSelectTreeTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiLayerSelectTreeTrigger.EVENT_STOP="EVENT_STOP",BI.MultiLayerSelectTreeTrigger.EVENT_START="EVENT_START",BI.MultiLayerSelectTreeTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiLayerSelectTreeTrigger.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.multilayer_select_tree_trigger",BI.MultiLayerSelectTreeTrigger)},function(e,t){BI.MultiLayerSelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{extraCls:"bi-multilayer-select-tree-first-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var t=this,i=this.options;this.node=BI.createWidget({type:"bi.select_tree_first_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:i.id,pId:i.pId,keyword:i.keyword,open:i.open,height:i.height,hgap:i.hgap,text:i.text,value:i.value,py:i.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(e){t.setSelected(t.isSelected()),t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var n=[],e=i.pNode;e;)e.isLastNode&&n.push(e.layer),e=e.pNode;var r=[];BI.count(0,i.layer,function(e){r.push({type:"bi.layout",cls:BI.contains(n,e)?"":"base-line-conn-background",width:12,height:i.height})}),r.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(i.layer,12),items:[r]})},isOnce:function(){return!0},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(e){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(e)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(e){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(e)}}),BI.shortcut("bi.multilayer_select_tree_first_plus_group_node",BI.MultiLayerSelectTreeFirstPlusGroupNode)},function(e,t){BI.MultiLayerSelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{extraCls:"bi-multilayer-select-tree-last-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var t=this,i=this.options;this.node=BI.createWidget({type:"bi.select_tree_last_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:i.id,pId:i.pId,keyword:i.keyword,open:i.open,height:i.height,hgap:i.hgap,text:i.text,value:i.value,py:i.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(e){t.setSelected(t.isSelected()),t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var n=[],e=i.pNode;e;)e.isLastNode&&n.push(e.layer),e=e.pNode;var r=[];BI.count(0,i.layer,function(e){r.push({type:"bi.layout",cls:BI.contains(n,e)?"":"base-line-conn-background",width:12,height:i.height})}),r.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(i.layer,12),items:[r]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(e){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(e)},doClick:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(e){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(e)}}),BI.shortcut("bi.multilayer_select_tree_last_plus_group_node",BI.MultiLayerSelectTreeLastPlusGroupNode)},function(e,t){BI.MultiLayerSelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{extraCls:"bi-multilayer-select-tree-mid-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var t=this,i=this.options;this.node=BI.createWidget({type:"bi.select_tree_mid_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:i.id,pId:i.pId,keyword:i.keyword,open:i.open,height:i.height,hgap:i.hgap,text:i.text,value:i.value,py:i.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(e){t.setSelected(t.isSelected()),t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var n=[],e=i.pNode;e;)e.isLastNode&&n.push(e.layer),e=e.pNode;var r=[];BI.count(0,i.layer,function(e){r.push({type:"bi.layout",cls:BI.contains(n,e)?"":"base-line-conn-background",width:12,height:i.height})}),r.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(i.layer,12),items:[r]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(e){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(e)},doClick:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(e){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(e)}}),BI.shortcut("bi.multilayer_select_tree_mid_plus_group_node",BI.MultiLayerSelectTreeMidPlusGroupNode)},function(e,t){BI.MultiLayerSelectTreePlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.MultiLayerSelectTreePlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{extraCls:"bi-multilayer-select-tree-first-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.MultiLayerSelectTreePlusGroupNode.superclass._init.apply(this,arguments);var t=this,i=this.options;this.node=BI.createWidget({type:"bi.select_tree_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:i.id,pId:i.pId,keyword:i.keyword,open:i.open,height:i.height,hgap:i.hgap,text:i.text,value:i.value,py:i.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(e){t.setSelected(t.isSelected()),t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var n=[],e=i.pNode;e;)e.isLastNode&&n.push(e.layer),e=e.pNode;var r=[];BI.count(0,i.layer,function(e){r.push({type:"bi.layout",cls:BI.contains(n,e)?"":"base-line-conn-background",width:12,height:i.height})}),r.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(i.layer,12),items:[r]})},isOnce:function(){return!0},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(e){BI.MultiLayerSelectTreePlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(e)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(e){BI.MultiLayerSelectTreePlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(e)}}),BI.shortcut("bi.multilayer_select_tree_plus_group_node",BI.MultiLayerSelectTreePlusGroupNode)},function(e,t){BI.MultiLayerSingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-single-tree-combo",isDefaultInit:!1,height:24,text:"",itemsCreator:BI.emptyFn,items:[],value:"",attributes:{tabIndex:0},allowEdit:!1,allowSearchValue:!1,allowInsertValue:!1})},render:function(){var t=this,e=this.options,i=e.itemsCreator===BI.emptyFn?this._getSyncConfig():this._getAsyncConfig();return e.allowEdit||e.itemsCreator!==BI.emptyFn?{type:"bi.absolute",items:[{el:i,left:0,right:0,top:0,bottom:0},{el:{type:"bi.trigger_icon_button",cls:"trigger-icon-button",ref:function(e){t.triggerBtn=e},width:e.height,height:e.height,handler:function(){t.combo.isViewVisible()?t.combo.hideView():t.combo.showView()}},right:0,bottom:0,top:0}]}:i},_getBaseConfig:function(){var t=this,e=this.options;return{type:"bi.combo",container:e.container,destroyWhenHide:e.destroyWhenHide,adjustLength:2,ref:function(e){t.combo=e},popup:{el:{type:"bi.multilayer_single_tree_popup",isDefaultInit:e.isDefaultInit,itemsCreator:e.itemsCreator,items:e.items,ref:function(e){t.trigger&&t.trigger.getSearcher().setAdapter(e)},listeners:[{eventName:BI.MultiLayerSingleTreePopup.EVENT_CHANGE,action:function(){t.setValue(this.getValue()),t.combo.hideView(),t.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_CHANGE)}}],onLoaded:function(){BI.nextTick(function(){t.combo.adjustWidth(),t.combo.adjustHeight()})}},value:e.value,maxHeight:400,minHeight:240},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){t.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_BEFORE_POPUPVIEW)}}]}},_getSearchConfig:function(){var t=this,i=this.options;return{el:{type:"bi.multilayer_single_tree_trigger",container:i.container,allowInsertValue:i.allowInsertValue,allowSearchValue:i.allowSearchValue,allowEdit:i.allowEdit,cls:"multilayer-single-tree-trigger",ref:function(e){t.trigger=e},watermark:i.watermark,items:i.items,itemsCreator:i.itemsCreator,valueFormatter:i.valueFormatter,height:i.height-2,text:i.text,value:i.value,tipType:i.tipType,warningTitle:i.warningTitle,title:i.title,listeners:[{eventName:BI.MultiLayerSingleTreeTrigger.EVENT_CHANGE,action:function(){t.setValue(this.getValue()),t.combo.hideView(),t.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_CHANGE)}},{eventName:BI.MultiLayerSingleTreeTrigger.EVENT_FOCUS,action:function(){t.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_FOCUS)}},{eventName:BI.MultiLayerSingleTreeTrigger.EVENT_BLUR,action:function(){t.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_BLUR)}},{eventName:BI.MultiLayerSingleTreeTrigger.EVENT_SEARCHING,action:function(){t.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_SEARCHING)}},{eventName:BI.MultiLayerSingleTreeTrigger.EVENT_ADD_ITEM,action:function(){var e=t.trigger.getSearcher().getKeyword();t.combo.setValue([e]),t.combo.hideView()}}]},toggle:!i.allowEdit,hideChecker:function(e){return!(i.container&&t.trigger.getSearcher().isSearching()&&0<t.trigger.getSearcher().getView().element.find(e.target).length)&&0===t.triggerBtn.element.find(e.target).length},listeners:[{eventName:BI.Combo.EVENT_AFTER_HIDEVIEW,action:function(){t.trigger.stopEditing()}},{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){t.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_BEFORE_POPUPVIEW)}}]}},_getSyncConfig:function(){var e=this.options,t=this._getBaseConfig();return BI.extend(t,e.allowEdit?this._getSearchConfig():{el:{type:"bi.single_tree_trigger",text:e.text,height:e.height,items:e.items,value:e.value}})},_getAsyncConfig:function(){var e=this._getBaseConfig();return BI.extend(e,this._getSearchConfig())},setValue:function(e){e=BI.isArray(e)?e:[e],this.combo.setValue(e)},getValue:function(){return this.combo.getValue()},populate:function(e){this.combo.populate(e)}}),BI.MultiLayerSingleTreeCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiLayerSingleTreeCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiLayerSingleTreeCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiLayerSingleTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.MultiLayerSingleTreeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multilayer_single_tree_combo",BI.MultiLayerSingleTreeCombo)},function(e,t){BI.MultiLayerSingleTreeInsertSearchPane=BI.inherit(BI.Widget,{props:function(){return{baseCls:"bi-multilayer-single-tree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[],value:""}},render:function(){var i=this,n=this.options;return this.tree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:n.isDefaultInit,items:n.items,itemsCreator:n.itemsCreator===BI.emptyFn?BI.emptyFn:function(e,t){n.itemsCreator(e,function(e){t(e),i.setKeyword(n.keywordGetter())})},keywordGetter:n.keywordGetter,value:n.value,scrollable:null,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(){i.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}},{eventName:BI.MultiLayerSelectLevelTree.EVENT_CHANGE,action:function(){i.fireEvent(BI.MultiLayerSingleTreeInsertSearchPane.EVENT_CHANGE)}}]}),{type:"bi.vertical",scrolly:!1,scrollable:!0,vgap:5,items:[{type:"bi.text_button",invisible:!0,text:BI.i18nText("BI-Basic_Click_To_Add_Text",""),height:24,cls:"bi-high-light",hgap:5,ref:function(e){i.addNotMatchTip=e},handler:function(){i.fireEvent(BI.MultiLayerSingleTreeInsertSearchPane.EVENT_ADD_ITEM,n.keywordGetter())}},this.tree]}},setKeyword:function(e){var t=BI.isEmptyArray(this.tree.getAllLeaves());this.addNotMatchTip.setVisible(t),t&&this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",e))},getValue:function(){return this.tree.getValue()},setValue:function(e){e=BI.isArray(e)?e:[e],this.tree.setValue(e)},populate:function(e){this.tree.populate(e)}}),BI.MultiLayerSingleTreeInsertSearchPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.MultiLayerSingleTreeInsertSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_insert_search_pane",BI.MultiLayerSingleTreeInsertSearchPane)},function(e,t){BI.MultiLayerSingleLevelTree=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-single-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,chooseType:BI.Selection.Single,scrollable:!0})},_init:function(){var e=this.options;BI.MultiLayerSingleLevelTree.superclass._init.apply(this,arguments),this.storeValue=e.value,this.initTree(this.options.items),this.check()},_formatItems:function(n,r,o){var a=this,s=this.options.keywordGetter();return BI.each(n,function(e,t){var i={};t.layer=r,BI.isKey(t.id)||(t.id=BI.UUID()),t.keyword=t.keyword||s,i.pNode=o,!0===t.isParent||!0===t.parent||BI.isNotEmptyArray(t.children)?(i.type="bi.multilayer_single_tree_mid_plus_group_node",e===n.length-1&&(i.type="bi.multilayer_single_tree_last_plus_group_node",i.isLastNode=!0),0!==e||o||(i.type="bi.multilayer_single_tree_first_plus_group_node"),0!==e||e!==n.length-1||o||(i.type="bi.multilayer_single_tree_plus_group_node"),BI.defaults(t,i),a._formatItems(t.children,r+1,t)):(i.type="bi.multilayer_single_tree_mid_tree_leaf_item",0!==e||o||(i.type="bi.multilayer_single_tree_first_tree_leaf_item"),e===n.length-1&&(i.type="bi.multilayer_single_tree_last_tree_leaf_item"),BI.defaults(t,i))}),n},_assertId:function(e){BI.each(e,function(e,t){t.id=t.id||BI.UUID()})},initTree:function(e){var n=this,r=this.options,o=!1;this.empty(),this._assertId(e),this.tree=BI.createWidget({type:"bi.custom_tree",cls:"tree-view display-table",expander:{isDefaultInit:r.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(e),0),value:r.value,itemsCreator:function(t,i){1!==t.times||t.node||BI.nextTick(function(){n.loading()}),r.itemsCreator(t,function(e){o=e.hasNext,1!==t.times||t.node||n._populate(e.items),i(n._formatItems(BI.Tree.transformToTreeFormat(e.items),t.node?t.node.layer+1:0,t.node)),n.setValue(n.storeValue),1!==t.times||t.node||BI.nextTick(function(){n.loaded()})})},el:{type:"bi.loader",isDefaultInit:r.itemsCreator!==BI.emptyFn,el:{type:"bi.button_tree",chooseType:r.chooseType,behaviors:r.behaviors,layouts:[{type:"bi.vertical"}]},hasNext:function(){return o}}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(e,t){n.fireEvent(BI.Controller.EVENT_CHANGE,arguments),e===BI.Events.CLICK&&(n.setValue(t),n.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,t))}),BI.createWidget({type:"bi.adaptive",element:this,scrollable:r.scrollable,items:[this.tree]})},_populate:function(){BI.MultiLayerSelectLevelTree.superclass.populate.apply(this,arguments)},populate:function(e){this._populate(e),BI.isNull(e)?this.tree.populate():this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(e),0))},setValue:function(e){this.options.chooseType===BI.Selection.None||(this.storeValue=e,this.tree.setValue(e))},getValue:function(){return BI.isArray(this.storeValue)?this.storeValue:BI.isNull(this.storeValue)?[]:[this.storeValue]},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(e){return this.tree.getNodeById(e)},getNodeByValue:function(e){return this.tree.getNodeByValue(e)}}),BI.MultiLayerSingleLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_level_tree",BI.MultiLayerSingleLevelTree)},function(e,t){BI.MultiLayerSingleTreePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-singletree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[],onLoaded:BI.emptyFn,minHeight:240})},_init:function(){BI.MultiLayerSingleTreePopup.superclass._init.apply(this,arguments);var e=this,t=this.options;this.tree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:t.isDefaultInit,items:t.items,itemsCreator:t.itemsCreator,keywordGetter:t.keywordGetter,value:t.value,scrollable:null,onLoaded:function(){e.tree.check(),t.onLoaded()}}),BI.createWidget({type:"bi.vertical",scrolly:!1,scrollable:!0,element:this,vgap:5,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,function(){e.fireEvent(BI.MultiLayerSingleTreePopup.EVENT_CHANGE)}),this.tree.css("min-height",t.minHeight-10)},getValue:function(){return this.tree.getValue()},setValue:function(e){e=BI.isArray(e)?e:[e],this.tree.setValue(e)},populate:function(e){this.tree.populate(e)}}),BI.MultiLayerSingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_popup",BI.MultiLayerSingleTreePopup)},function(e,t){BI.MultiLayerSingleTreeTrigger=BI.inherit(BI.Trigger,{props:function(){return{extraCls:"bi-multi-layer-single-tree-trigger bi-border bi-focus-shadow bi-border-radius",height:24,valueFormatter:function(e){return e},itemsCreator:BI.emptyFn,watermark:BI.i18nText("BI-Basic_Search"),allowSearchValue:!1,title:BI.bind(this._getShowText,this)}},render:function(){var n=this,r=this.options;r.itemsCreator===BI.emptyFn&&this._initData();var e={type:"bi.htape",items:[{el:{type:"bi.searcher",ref:function(){n.searcher=this},masker:BI.isNotNull(r.container)?{offset:{},container:r.container}:{offset:{}},isAutoSearch:!1,el:{type:"bi.state_editor",ref:function(){n.editor=this},defaultText:r.text,text:this._digest(r.value),value:r.value,height:r.height,tipText:"",watermark:r.watermark,listeners:[{eventName:BI.StateEditor.EVENT_FOCUS,action:function(){n.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_FOCUS)}},{eventName:BI.StateEditor.EVENT_BLUR,action:function(){n.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_BLUR)}},{eventName:BI.StateEditor.EVENT_CHANGE,action:function(){n.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_SEARCHING)}}]},popup:{type:r.allowInsertValue?"bi.multilayer_single_tree_insert_search_pane":"bi.multilayer_single_tree_popup",itemsCreator:r.itemsCreator===BI.emptyFn?BI.emptyFn:function(e,t){e.keyword=n.editor.getValue(),r.itemsCreator(e,t)},keywordGetter:function(){return n.editor.getValue()},cls:"bi-card",listeners:[{eventName:BI.MultiLayerSingleTreeInsertSearchPane.EVENT_ADD_ITEM,action:function(){n.options.text=n.getSearcher().getKeyword(),n.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_ADD_ITEM)}}],ref:function(e){n.popup=e}},onSearch:function(e,t){var i=e.keyword;r.itemsCreator===BI.emptyFn?(t(n._getSearchItems(i)),r.allowInsertValue&&n.popup.setKeyword(i)):t()},listeners:[{eventName:BI.Searcher.EVENT_CHANGE,action:function(){n.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_CHANGE)}}]}},{el:{type:"bi.layout",width:24},width:24}]};return r.allowEdit?e:{type:"bi.absolute",items:[{el:e,left:0,right:0,top:0,bottom:0},{el:{type:"bi.layout"},left:0,right:24,top:0,bottom:0}]}},_initData:function(){var e=this.options;this.tree=new BI.Tree,this.nodes=BI.Tree.treeFormat(BI.deepClone(e.items)),this.tree.initTree(this.nodes)},_getSearchItems:function(i){var n=this,r=this.options,o=[];return this.tree.traverse(function(e){var t=BI.Func.getSearchResult(n.tree.isRoot(e)?[]:BI.concat([e.text],r.allowSearchValue?[e.value]:[]),i);if(0<t.find.length||0<t.match.length)return o.push(e),!0}),this._fillTreeStructure4Search(o,"id")},_createJson:function(e,t){return{id:e.id,pId:e.pId,text:e.text,value:e.value,isParent:BI.isNotEmptyArray(e.children),open:t}},_getChildren:function(e){var n=this;e.children=e.children||[];var r=[];return BI.each(e.children,function(e,t){var i=n._getChildren(t);r=r.concat(i)}),e.children.concat(r)},_fillTreeStructure4Search:function(e){var i=this,n=[],r=[];for(BI.each(e,function(e,t){r.push({pId:t.pId}),n.push(t),n=n.concat(i._getChildren(t))});BI.isNotEmptyArray(r);){var t=r.pop(),o=this.tree.search(this.tree.getRoot(),t.pId,"id");null!=o&&(o.open=!0,r.push({pId:o.pId}),n.push(o))}return BI.uniqBy(BI.map(n,function(e,t){return i._createJson(t,t.open)}),"id")},_digest:function(i){var e=this.options;if(e.itemsCreator!==BI.emptyFn)return e.valueFormatter(i);var t=BI.find(e.items,function(e,t){return t.value===i});return BI.isNotNull(t)?t.text:e.text},_getShowText:function(){return this.editor.getText()},stopEditing:function(){this.searcher.stopSearch()},getSearcher:function(){return this.searcher},populate:function(e){this.options.items=e,this._initData()},setValue:function(e){this.editor.setState(this._digest(e[0]))},getValue:function(){return this.searcher.getValue()}}),BI.MultiLayerSingleTreeTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.MultiLayerSingleTreeTrigger.EVENT_BLUR="EVENT_BLUR",BI.MultiLayerSingleTreeTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiLayerSingleTreeTrigger.EVENT_STOP="EVENT_STOP",BI.MultiLayerSingleTreeTrigger.EVENT_START="EVENT_START",BI.MultiLayerSingleTreeTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiLayerSingleTreeTrigger.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.multilayer_single_tree_trigger",BI.MultiLayerSingleTreeTrigger)},function(e,t){BI.MultiLayerSingleTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{extraCls:"bi-multilayer-single-tree-first-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:24})},_init:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var t=this.options;this.node=this._createNode();for(var i=[],e=t.pNode;e;)e.isLastNode&&i.push(e.layer),e=e.pNode;var n=[];BI.count(0,t.layer,function(e){n.push({type:"bi.layout",cls:BI.contains(i,e)?"":"base-line-conn-background",width:12,height:t.height})}),n.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(t.layer,12),items:[n]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(e){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(e)},_createNode:function(){var t=this,e=this.options;return BI.createWidget({type:"bi.first_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:e.id,pId:e.pId,open:e.open,isLastNode:e.isLastNode,height:e.height,hgap:e.hgap,text:e.text,value:e.value,py:e.py,keyword:e.keyword,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(e){e!==BI.Events.CLICK&&t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]})}}),BI.shortcut("bi.multilayer_single_tree_first_plus_group_node",BI.MultiLayerSingleTreeFirstPlusGroupNode)},function(e,t){BI.MultiLayerSingleTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{extraCls:"bi-multilayer-single-tree-last-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:24})},_init:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var t=this.options;this.node=this._createNode();for(var i=[],e=t.pNode;e;)e.isLastNode&&i.push(e.layer),e=e.pNode;var n=[];BI.count(0,t.layer,function(e){n.push({type:"bi.layout",cls:BI.contains(i,e)?"":"base-line-conn-background",width:12,height:t.height})}),n.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(t.layer,12),items:[n]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(e){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(e)},_createNode:function(){var t=this,e=this.options;return BI.createWidget({type:"bi.last_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:e.id,pId:e.pId,open:e.open,height:e.height,hgap:e.hgap,text:e.text,value:e.value,py:e.py,keyword:e.keyword,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(e){e!==BI.Events.CLICK&&t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]})}}),BI.shortcut("bi.multilayer_single_tree_last_plus_group_node",BI.MultiLayerSingleTreeLastPlusGroupNode)},function(e,t){BI.MultiLayerSingleTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{extraCls:"bi-multilayer-single-tree-mid-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:24})},_init:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var t=this.options;this.node=this._createNode();for(var i=[],e=t.pNode;e;)e.isLastNode&&i.push(e.layer),e=e.pNode;var n=[];BI.count(0,t.layer,function(e){n.push({type:"bi.layout",cls:BI.contains(i,e)?"":"base-line-conn-background",width:12,height:t.height})}),n.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(t.layer,12),items:[n]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(e){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(e)},_createNode:function(){var t=this,e=this.options;return BI.createWidget({type:"bi.mid_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:e.id,pId:e.pId,open:e.open,height:e.height,hgap:e.hgap,text:e.text,value:e.value,py:e.py,keyword:e.keyword,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(e){e!==BI.Events.CLICK&&t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]})}}),BI.shortcut("bi.multilayer_single_tree_mid_plus_group_node",BI.MultiLayerSingleTreeMidPlusGroupNode)},function(e,t){BI.MultiLayerSingleTreePlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.MultiLayerSingleTreePlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{extraCls:"bi-multilayer-single-tree-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:24})},_init:function(){BI.MultiLayerSingleTreePlusGroupNode.superclass._init.apply(this,arguments);var t=this.options;this.node=this._createNode();for(var i=[],e=t.pNode;e;)e.isLastNode&&i.push(e.layer),e=e.pNode;var n=[];BI.count(0,t.layer,function(e){n.push({type:"bi.layout",cls:BI.contains(i,e)?"":"base-line-conn-background",width:12,height:t.height})}),n.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(t.layer,12),items:[n]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreePlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(e){BI.MultiLayerSingleTreePlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(e)},_createNode:function(){var t=this,e=this.options;return BI.createWidget({type:"bi.plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:e.id,pId:e.pId,open:e.open,isLastNode:e.isLastNode,height:e.height,hgap:e.hgap,text:e.text,value:e.value,py:e.py,keyword:e.keyword,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(e){e!==BI.Events.CLICK&&t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]})}}),BI.shortcut("bi.multilayer_single_tree_plus_group_node",BI.MultiLayerSingleTreePlusGroupNode)},function(e,t){BI.MultiLayerSingleTreeFirstTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-first-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:24})},_init:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._init.apply(this,arguments);var t=this,i=this.options;this.item=BI.createWidget({type:"bi.first_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:i.id,pId:i.pId,height:i.height,hgap:i.hgap,text:i.text,value:i.value,py:i.py,keyword:i.keyword}),this.item.on(BI.Controller.EVENT_CHANGE,function(e){e!==BI.Events.CLICK&&t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var n=[],e=i.pNode;e;)e.isLastNode&&n.push(e.layer),e=e.pNode;var r=[];BI.count(0,i.layer,function(e){r.push({type:"bi.layout",cls:BI.contains(n,e)?"":"base-line-conn-background",width:12,height:i.height})}),r.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(i.layer,12),items:[r]})},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(e){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(e)}}),BI.shortcut("bi.multilayer_single_tree_first_tree_leaf_item",BI.MultiLayerSingleTreeFirstTreeLeafItem)},function(e,t){BI.MultiLayerSingleTreeLastTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-last-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:24})},_init:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._init.apply(this,arguments);var t=this,i=this.options;this.item=BI.createWidget({type:"bi.last_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:i.id,pId:i.pId,height:i.height,hgap:i.hgap,text:i.text,value:i.value,py:i.py,keyword:i.keyword}),this.item.on(BI.Controller.EVENT_CHANGE,function(e){e!==BI.Events.CLICK&&t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var n=[],e=i.pNode;e;)e.isLastNode&&n.push(e.layer),e=e.pNode;var r=[];BI.count(0,i.layer,function(e){r.push({type:"bi.layout",cls:BI.contains(n,e)?"":"base-line-conn-background",width:12,height:i.height})}),r.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(i.layer,12),items:[r]})},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(e){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(e)}}),BI.shortcut("bi.multilayer_single_tree_last_tree_leaf_item",BI.MultiLayerSingleTreeLastTreeLeafItem)},function(e,t){BI.MultiLayerSingleTreeMidTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-mid-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:24})},_init:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._init.apply(this,arguments);var t=this,i=this.options;this.item=BI.createWidget({type:"bi.mid_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:i.id,pId:i.pId,height:i.height,hgap:i.hgap,text:i.text,value:i.value,py:i.py,keyword:i.keyword}),this.item.on(BI.Controller.EVENT_CHANGE,function(e){e!==BI.Events.CLICK&&t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var n=[],e=i.pNode;e;)e.isLastNode&&n.push(e.layer),e=e.pNode;var r=[];BI.count(0,i.layer,function(e){r.push({type:"bi.layout",cls:BI.contains(n,e)?"":"base-line-conn-background",width:12,height:i.height})}),r.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(i.layer,12),items:[r]})},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(e){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(e)}}),BI.shortcut("bi.multilayer_single_tree_mid_tree_leaf_item",BI.MultiLayerSingleTreeMidTreeLeafItem)},function(e,t){BI.MultiSelectCheckPane=BI.inherit(BI.Widget,{constants:{height:12,lgap:10,tgap:10,bgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-pane bi-background",items:[],itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,onClickContinueSelect:BI.emptyFn})},_init:function(){BI.MultiSelectCheckPane.superclass._init.apply(this,arguments);var i=this,n=this.options;this.storeValue=n.value||{},this.display=BI.createWidget({type:"bi.display_selected_list",items:n.items,itemsCreator:function(e,t){e=BI.extend(e||{},{selectedValues:i.storeValue.value}),i.storeValue.type!==BI.Selection.Multi?n.itemsCreator(e,t):t({items:BI.map(i.storeValue.value,function(e,t){var i=n.valueFormatter(t)||t;return{text:i,value:t,title:i}})})}}),this.continueSelect=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-select-check-selected bi-high-light"}),this.continueSelect.on(BI.TextButton.EVENT_CHANGE,function(){n.onClickContinueSelect()}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:{type:"bi.vertical_adapt",cls:"multi-select-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap},{el:this.continueSelect,lgap:this.constants.lgap}]},tgap:this.constants.tgap},{height:"fill",el:this.display,tgap:this.constants.bgap}]})},setValue:function(e){this.storeValue=e||{}},empty:function(){this.display.empty()},populate:function(){this.display.populate.apply(this.display,arguments)}}),BI.shortcut("bi.multi_select_check_pane",BI.MultiSelectCheckPane)},function(e,t){BI.DisplaySelectedList=BI.inherit(BI.Pane,{constants:{height:24,lgap:10},_defaultConfig:function(){return BI.extend(BI.DisplaySelectedList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-display-list",itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.DisplaySelectedList.superclass._init.apply(this,arguments);var i=this,n=this.options;this.hasNext=!1,this.button_group=BI.createWidget({type:"bi.list_pane",element:this,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},items:this._createItems(n.items),chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical",lgap:10}]},itemsCreator:function(e,t){n.itemsCreator(e,function(e){i.hasNext=!!e.hasNext,t(i._createItems(e.items))})},hasNext:function(){return i.hasNext}})},_createItems:function(e){return BI.createItems(e,{type:"bi.icon_text_item",cls:"cursor-default check-font icon-size-12 display-list-item bi-tips",once:!0,invalid:!0,selected:!0,height:this.constants.height,logic:{dynamic:!0}})},empty:function(){this.button_group.empty()},populate:function(e){0===arguments.length?this.button_group.populate():this.button_group.populate(this._createItems(e))}}),BI.shortcut("bi.display_selected_list",BI.DisplaySelectedList)},function(e,t){BI.MultiSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,attributes:{tabIndex:0},allowEdit:!0})},_init:function(){BI.MultiSelectCombo.superclass._init.apply(this,arguments);function i(){BI.isKey(n._startValue)&&(n.storeValue.type===BI.Selection.All?(BI.remove(n.storeValue.value,n._startValue),n.storeValue.assist=n.storeValue.assist||[],n.storeValue.assist.pushDistinct(n._startValue)):(BI.pushDistinct(n.storeValue.value,n._startValue),BI.remove(n.storeValue.assist,n._startValue))),n.trigger.getSearcher().setState(n.storeValue),n.numberCounter.setButtonChecked(n.storeValue)}var n=this,e=this.options;this.storeValue=e.value||{},this._assertValue(this.storeValue),this.requesting=!1,this.trigger=BI.createWidget({type:"bi.multi_select_trigger",allowEdit:e.allowEdit,height:e.height,text:e.text,masker:{offset:{left:0,top:0,right:0,bottom:25}},valueFormatter:e.valueFormatter,itemsCreator:BI.bind(this._itemsCreator4Trigger,this),value:this.storeValue}),this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS,function(){n.fireEvent(BI.MultiSelectCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR,function(){n.fireEvent(BI.MultiSelectCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){n._setStartValue(""),this.getSearcher().setValue(n.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){n._setStartValue(""),n.fireEvent(BI.MultiSelectCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var e=this.getSearcher().getKeyword();n._join({type:BI.Selection.Multi,value:[e]},function(){n.combo.setValue(n.storeValue),n._setStartValue(e),i(),n.populate(),n._setStartValue("")})}}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(e){var t=BI.last(e);0<(e=BI.initial(e||[])).length&&n._joinKeywords(e,function(){BI.isEndWithBlank(t)?(n.combo.setValue(n.storeValue),i(),n.combo.populate(),n._setStartValue("")):(n.combo.setValue(n.storeValue),i())}),n.fireEvent(BI.MultiSelectCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(e,t){t instanceof BI.MultiSelectBar?n._joinAll(this.getValue(),function(){i()}):n._join(this.getValue(),function(){i()}),n.fireEvent(BI.MultiSelectCombo.EVENT_CLICK_ITEM)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){n.numberCounter.updateSelectedValue(n.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){n.combo.isViewVisible()||n.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!e.allowEdit,container:e.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_select_popup_view",ref:function(){n.popup=this,n.trigger.setAdapter(this),n.numberCounter.setAdapter(this)},listeners:[{eventName:BI.MultiSelectPopupView.EVENT_CHANGE,action:function(){n.storeValue=this.getValue(),n._adjust(function(){i()}),n.fireEvent(BI.MultiSelectCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){n._defaultState()}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,action:function(){n.setValue(),n._defaultState()}}],itemsCreator:e.itemsCreator,valueFormatter:e.valueFormatter,onLoaded:function(){BI.nextTick(function(){n.combo.adjustWidth(),n.combo.adjustHeight(),n.numberCounter.adjustView(),n.trigger.getSearcher().adjustView()})}},value:e.value,hideChecker:function(e){return 0===t.element.find(e.target).length&&0===n.numberCounter.element.find(e.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(n.storeValue),BI.nextTick(function(){n._populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){n._stopEditing(),!0===n.requesting?n.wants2Quit=!0:n.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM)});var t=BI.createWidget({type:"bi.trigger_icon_button",width:e.height,height:e.height,cls:"multi-select-trigger-icon-button"});t.on(BI.TriggerIconButton.EVENT_CHANGE,function(){n.numberCounter.hideView(),n.combo.isViewVisible()?n.combo.hideView():n.combo.showView()}),this.numberCounter=BI.createWidget({type:"bi.multi_select_check_selected_switcher",masker:{offset:{left:0,top:0,right:0,bottom:25}},valueFormatter:e.valueFormatter,itemsCreator:BI.bind(this._itemsCreator4Trigger,this),value:this.storeValue}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){n.combo.isViewVisible()||n.combo.showView()}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){this.updateSelectedValue(n.storeValue)}),this.numberCounter.on(BI.Events.VIEW,function(e){BI.nextTick(function(){n.trigger.refreshPlaceHolderWidth(!0===e?n.numberCounter.element.outerWidth()+8:0)})}),this.trigger.element.click(function(e){0<n.trigger.element.find(e.target).length&&n.numberCounter.hideView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:t,right:0,top:0,bottom:0},{el:{type:"bi.vertical_adapt",items:[this.numberCounter]},right:e.height,top:0,height:e.height}]})},_itemsCreator4Trigger:function(t,i){var n=this;this.options.itemsCreator(t,function(e){1===t.times&&BI.isNotNull(t.keywords)&&n.trigger.setValue(BI.deepClone(n.getValue())),i.apply(n,arguments)})},_stopEditing:function(){this.trigger.stopEditing(),this.numberCounter.hideView()},_defaultState:function(){this._stopEditing(),this.combo.hideView()},_assertValue:function(e){(e=e||{}).type||(e.type=BI.Selection.Multi),e.value||(e.value=[])},_makeMap:function(e){return BI.makeObject(e||[])},_joinKeywords:function(n,r){var o=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:n},function(e){!function t(e){var i=o._makeMap(e);BI.each(n,function(e,t){BI.isNotNull(i[t])&&(o.storeValue.type===BI.Selection.Multi?BI.pushDistinct(o.storeValue.value,t):BI.remove(o.storeValue.value,t))}),o._adjust(r)}(BI.map(e.items,"value"))})},_joinAll:function(t,l){var u=this,e=this.options;this._assertValue(t),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(e){var i=BI.map(e.items,"value");if(u.storeValue.type===t.type){var n=!1,r=u._makeMap(u.storeValue.value);return BI.each(i,function(e,t){BI.isNotNull(r[t])&&(n=!0,u.storeValue.assist&&u.storeValue.assist.push(r[t]),delete r[t])}),n&&(u.storeValue.value=BI.values(r)),void u._adjust(l)}var o=u._makeMap(u.storeValue.value),a=u._makeMap(t.value),s=[];BI.each(i,function(e,t){BI.isNotNull(o[i[e]])&&(u.storeValue.assist&&u.storeValue.assist.push(o[i[e]]),delete o[i[e]]),BI.isNull(a[i[e]])&&(BI.remove(u.storeValue.assist,t),s.push(t))}),u.storeValue.value=s.concat(BI.values(o)),u._adjust(l)})},_adjust:function(e){var t=this;this.options;!function i(){!0===t.wants2Quit&&(t.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM),t.wants2Quit=!1);t.requesting=!1}(),e()},_join:function(e,t){var i=this;this.options;if(this._assertValue(e),this._assertValue(this.storeValue),this.storeValue.type===e.type){var n=this._makeMap(this.storeValue.value);BI.each(e.value,function(e,t){n[t]||(i.storeValue.value.push(t),BI.remove(i.storeValue.assist,t),n[t]=t)});var r=!1;return BI.each(e.assist,function(e,t){BI.isNotNull(n[t])&&(r=!0,i.storeValue.assist&&i.storeValue.assist.push(n[t]),delete n[t])}),r&&(this.storeValue.value=BI.values(n)),void i._adjust(t)}this._joinAll(e,t)},_setStartValue:function(e){this._startValue=e,this.popup.setStartValue(e)},_populate:function(){this.combo.populate.apply(this.combo,arguments)},setValue:function(e){this.storeValue=e||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue),this.numberCounter.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._populate.apply(this,arguments),this.numberCounter.populateSwitcher.apply(this.numberCounter,arguments)}}),BI.extend(BI.MultiSelectCombo,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiSelectCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectCombo.EVENT_STOP="EVENT_STOP",BI.MultiSelectCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_combo",BI.MultiSelectCombo)},function(e,t){BI.MultiSelectNoBarCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectNoBarCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-combo-no-bar",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,attributes:{tabIndex:0}})},_init:function(){BI.MultiSelectNoBarCombo.superclass._init.apply(this,arguments);function i(){BI.isKey(n._startValue)&&(n.storeValue.type===BI.Selection.All?(BI.remove(n.storeValue.value,n._startValue),n.storeValue.assist=n.storeValue.assist||[],n.storeValue.assist.pushDistinct(n._startValue)):(BI.pushDistinct(n.storeValue.value,n._startValue),BI.remove(n.storeValue.assist,n._startValue))),n.trigger.getSearcher().setState(n.storeValue),n.numberCounter.setButtonChecked(n.storeValue)}var n=this,e=this.options;this.storeValue={type:BI.Selection.Multi,value:e.value||[]},this.requesting=!1,this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:e.height,text:e.text,masker:{offset:{left:0,top:0,right:0,bottom:25}},valueFormatter:e.valueFormatter,itemsCreator:BI.bind(this._itemsCreator4Trigger,this),value:{type:BI.Selection.Multi,value:e.value}}),this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS,function(){n.fireEvent(BI.MultiSelectNoBarCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR,function(){n.fireEvent(BI.MultiSelectNoBarCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){n._setStartValue(""),this.getSearcher().setValue(n.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){n._setStartValue(""),n.fireEvent(BI.MultiSelectNoBarCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(e){var t=BI.last(e);0<(e=BI.initial(e||[])).length&&n._joinKeywords(e,function(){BI.isEndWithBlank(t)?(n.combo.setValue(n.storeValue),i(),n.combo.populate(),n._setStartValue("")):(n.combo.setValue(n.storeValue),i())})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(e,t){t instanceof BI.MultiSelectBar?n._joinAll(this.getValue(),function(){i()}):n._join(this.getValue(),function(){i()}),n.fireEvent(BI.MultiSelectNoBarCombo.EVENT_CLICK_ITEM)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){n.numberCounter.updateSelectedValue(n.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){n.combo.isViewVisible()||n.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,container:e.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_select_no_bar_popup_view",ref:function(){n.popup=this,n.trigger.setAdapter(this),n.numberCounter.setAdapter(this)},listeners:[{eventName:BI.MultiSelectPopupView.EVENT_CHANGE,action:function(){n.storeValue=this.getValue(),n._adjust(function(){i()}),n.fireEvent(BI.MultiSelectNoBarCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){n._defaultState()}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,action:function(){n.setValue(),n._defaultState()}}],itemsCreator:e.itemsCreator,valueFormatter:e.valueFormatter,onLoaded:function(){BI.nextTick(function(){n.combo.adjustWidth(),n.combo.adjustHeight(),n.numberCounter.adjustView(),n.trigger.getSearcher().adjustView()})}},value:{type:BI.Selection.Multi,value:e.value},hideChecker:function(e){return 0===t.element.find(e.target).length&&0===n.numberCounter.element.find(e.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(n.storeValue),BI.nextTick(function(){n._populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){n._stopEditing(),!0===n.requesting?n.wants2Quit=!0:n.fireEvent(BI.MultiSelectNoBarCombo.EVENT_CONFIRM)});var t=BI.createWidget({type:"bi.trigger_icon_button",width:e.height,height:e.height,cls:"multi-select-trigger-icon-button"});t.on(BI.TriggerIconButton.EVENT_CHANGE,function(){n.numberCounter.hideView(),n.combo.isViewVisible()?n.combo.hideView():n.combo.showView()}),this.numberCounter=BI.createWidget({type:"bi.multi_select_check_selected_switcher",masker:{offset:{left:0,top:0,right:0,bottom:25}},valueFormatter:e.valueFormatter,itemsCreator:BI.bind(this._itemsCreator4Trigger,this),value:{type:BI.Selection.Multi,value:e.value}}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){n.combo.isViewVisible()||n.combo.showView()}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){this.updateSelectedValue(n.storeValue)}),this.numberCounter.on(BI.Events.VIEW,function(e){BI.nextTick(function(){n.trigger.refreshPlaceHolderWidth(!0===e?n.numberCounter.element.outerWidth()+8:0)})}),this.trigger.element.click(function(e){0<n.trigger.element.find(e.target).length&&n.numberCounter.hideView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:t,right:0,top:0,bottom:0},{el:{type:"bi.vertical_adapt",items:[this.numberCounter]},right:e.height,top:0,height:e.height}]})},_itemsCreator4Trigger:function(t,i){var n=this;this.options.itemsCreator(t,function(e){1===t.times&&BI.isNotNull(t.keywords)&&n.trigger.setValue(BI.deepClone(n.storeValue)),i.apply(n,arguments)})},_stopEditing:function(){this.trigger.stopEditing(),this.numberCounter.hideView()},_defaultState:function(){this._stopEditing(),this.combo.hideView()},_assertValue:function(e){(e=e||{}).type||(e.type=BI.Selection.Multi),e.value||(e.value=[])},_makeMap:function(e){return BI.makeObject(e||[])},_joinKeywords:function(n,r){var o=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectNoBarCombo.REQ_GET_ALL_DATA,keywords:n},function(e){!function t(e){var i=o._makeMap(e);BI.each(n,function(e,t){BI.isNotNull(i[t])&&(o.storeValue.type===BI.Selection.Multi?BI.pushDistinct(o.storeValue.value,t):BI.remove(o.storeValue.value,t))}),o._adjust(r)}(BI.map(e.items,"value"))})},_joinAll:function(t,l){var u=this,e=this.options;this._assertValue(t),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectNoBarCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(e){var i=BI.map(e.items,"value");if(u.storeValue.type===t.type){var n=!1,r=u._makeMap(u.storeValue.value);return BI.each(i,function(e,t){BI.isNotNull(r[t])&&(n=!0,u.storeValue.assist&&u.storeValue.assist.push(r[t]),delete r[t])}),n&&(u.storeValue.value=BI.values(r)),void u._adjust(l)}var o=u._makeMap(u.storeValue.value),a=u._makeMap(t.value),s=[];BI.each(i,function(e,t){BI.isNotNull(o[i[e]])&&(u.storeValue.assist&&u.storeValue.assist.push(o[i[e]]),delete o[i[e]]),BI.isNull(a[i[e]])&&(BI.remove(u.storeValue.assist,t),s.push(t))}),u.storeValue.value=s.concat(BI.values(o)),u._adjust(l)})},_adjust:function(e){var t=this;this.options;!function i(){!0===t.wants2Quit&&(t.fireEvent(BI.MultiSelectNoBarCombo.EVENT_CONFIRM),t.wants2Quit=!1);t.requesting=!1}(),e()},_join:function(e,t){var i=this;this.options;if(this._assertValue(e),this._assertValue(this.storeValue),this.storeValue.type===e.type){var n=this._makeMap(this.storeValue.value);BI.each(e.value,function(e,t){n[t]||(i.storeValue.value.push(t),BI.remove(i.storeValue.assist,t),n[t]=t)});var r=!1;return BI.each(e.assist,function(e,t){BI.isNotNull(n[t])&&(r=!0,i.storeValue.assist&&i.storeValue.assist.push(n[t]),delete n[t])}),r&&(this.storeValue.value=BI.values(n)),void i._adjust(t)}this._joinAll(e,t)},_setStartValue:function(e){this._startValue=e,this.popup.setStartValue(e)},_populate:function(){this.combo.populate.apply(this.combo,arguments)},setValue:function(e){this.storeValue={type:BI.Selection.Multi,value:e||[]},this.combo.setValue(this.storeValue),this.numberCounter.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue.value)},populate:function(){this._populate.apply(this,arguments),this.numberCounter.populateSwitcher.apply(this.numberCounter,arguments)}}),BI.extend(BI.MultiSelectNoBarCombo,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectNoBarCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiSelectNoBarCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectNoBarCombo.EVENT_STOP="EVENT_STOP",BI.MultiSelectNoBarCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectNoBarCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiSelectNoBarCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_no_bar_combo",BI.MultiSelectNoBarCombo)},function(e,t){BI.MultiSelectInsertCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,attributes:{tabIndex:0},allowEdit:!0})},_init:function(){BI.MultiSelectInsertCombo.superclass._init.apply(this,arguments);function i(){BI.isKey(n._startValue)&&(n.storeValue.type===BI.Selection.All?(BI.remove(n.storeValue.value,n._startValue),n.storeValue.assist=n.storeValue.assist||[],n.storeValue.assist.pushDistinct(n._startValue)):(BI.pushDistinct(n.storeValue.value,n._startValue),BI.remove(n.storeValue.assist,n._startValue))),n.trigger.getSearcher().setState(n.storeValue),n.numberCounter.setButtonChecked(n.storeValue)}var n=this,e=this.options;this.storeValue=e.value||{},this.requesting=!1,this.trigger=BI.createWidget({type:"bi.multi_select_insert_trigger",allowEdit:e.allowEdit,height:e.height,text:e.text,watermark:e.watermark,masker:{offset:{left:0,top:0,right:0,bottom:25}},valueFormatter:e.valueFormatter,itemsCreator:BI.bind(this._itemsCreator4Trigger,this),value:e.value}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_FOCUS,function(){n.fireEvent(BI.MultiSelectInsertCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BLUR,function(){n.fireEvent(BI.MultiSelectInsertCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_START,function(){n._setStartValue(""),this.getSearcher().setValue(n.storeValue)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_STOP,function(){n._setStartValue(""),n.fireEvent(BI.MultiSelectInsertCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_PAUSE,function(){this.getSearcher().hasMatched()&&n._addItem(i)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM,function(){if(!this.getSearcher().hasMatched()){n._addItem(i);var e=this.getSearcher().getKeyword();n._stopEditing(),n.fireEvent(BI.MultiSelectInsertCombo.EVENT_ADD_ITEM,e)}}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_SEARCHING,function(e){var t=BI.last(e);0<(e=BI.initial(e||[])).length&&n._joinKeywords(e,function(){BI.isEndWithBlank(t)?(n.combo.setValue(n.storeValue),i(),n.combo.populate(),n._setStartValue("")):(n.combo.setValue(n.storeValue),i())}),n.fireEvent(BI.MultiSelectInsertCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_CHANGE,function(e,t){t instanceof BI.MultiSelectBar?n._joinAll(this.getValue(),function(){i()}):n._join(this.getValue(),function(){i()}),n.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){n.numberCounter.updateSelectedValue(n.storeValue)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK,function(){n.combo.isViewVisible()||n.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!e.allowEdit,el:this.trigger,adjustLength:1,container:e.container,popup:{type:"bi.multi_select_popup_view",ref:function(){n.popup=this,n.trigger.setAdapter(this),n.numberCounter.setAdapter(this)},listeners:[{eventName:BI.MultiSelectPopupView.EVENT_CHANGE,action:function(){n.storeValue=this.getValue(),n._adjust(function(){i()}),n.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){n._defaultState()}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,action:function(){n.setValue(),n._defaultState()}}],itemsCreator:e.itemsCreator,valueFormatter:e.valueFormatter,onLoaded:function(){BI.nextTick(function(){n.combo.adjustWidth(),n.combo.adjustHeight(),n.numberCounter.adjustView(),n.trigger.getSearcher().adjustView()})}},value:e.value,hideChecker:function(e){return 0===t.element.find(e.target).length&&0===n.numberCounter.element.find(e.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(n.storeValue),BI.nextTick(function(){n._populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){n._stopEditing(),!0===n.requesting?n.wants2Quit=!0:n.fireEvent(BI.MultiSelectInsertCombo.EVENT_CONFIRM)});var t=BI.createWidget({type:"bi.trigger_icon_button",width:e.height,height:e.height,cls:"multi-select-trigger-icon-button"});t.on(BI.TriggerIconButton.EVENT_CHANGE,function(){n.numberCounter.hideView(),n.combo.isViewVisible()?n.combo.hideView():n.combo.showView()}),this.numberCounter=BI.createWidget({type:"bi.multi_select_check_selected_switcher",masker:{offset:{left:0,top:0,right:0,bottom:25}},valueFormatter:e.valueFormatter,itemsCreator:BI.bind(this._itemsCreator4Trigger,this),value:e.value}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){n.combo.isViewVisible()||n.combo.showView()}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){this.updateSelectedValue(n.storeValue)}),this.numberCounter.on(BI.Events.VIEW,function(e){BI.nextTick(function(){n.trigger.refreshPlaceHolderWidth(!0===e?n.numberCounter.element.outerWidth()+8:0)})}),this.trigger.element.click(function(e){0<n.trigger.element.find(e.target).length&&n.numberCounter.hideView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:t,right:0,top:0,bottom:0},{el:{type:"bi.vertical_adapt",items:[this.numberCounter]},right:e.height,top:0,height:e.height}]})},_itemsCreator4Trigger:function(t,i){var n=this;this.options.itemsCreator(t,function(e){1===t.times&&BI.isNotNull(t.keywords)&&n.trigger.setValue(BI.deepClone(n.getValue())),i.apply(n,arguments)})},_addItem:function(e){var t=this,i=this.trigger.getSearcher().getKeyword();this._join({type:BI.Selection.Multi,value:[i]},function(){t.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(t.storeValue.value,i),t.combo.setValue(t.storeValue),t._setStartValue(i),e(),t.populate(),t._setStartValue("")})},_stopEditing:function(){this.trigger.stopEditing(),this.numberCounter.hideView()},_defaultState:function(){this._stopEditing(),this.combo.hideView()},_assertValue:function(e){(e=e||{}).type||(e.type=BI.Selection.Multi),e.value||(e.value=[])},_makeMap:function(e){return BI.makeObject(e||[])},_joinKeywords:function(n,r){var o=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,keywords:n},function(e){!function t(e){var i=o._makeMap(e);BI.each(n,function(e,t){BI.isNotNull(i[t])&&(o.storeValue.type===BI.Selection.Multi?BI.pushDistinct(o.storeValue.value,t):BI.remove(o.storeValue.value,t))}),o._adjust(r)}(BI.map(e.items,"value"))})},_joinAll:function(t,l){var u=this,e=this.options;this._assertValue(t),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(e){var i=BI.map(e.items,"value");if(u.storeValue.type===t.type){var n=!1,r=u._makeMap(u.storeValue.value);return BI.each(i,function(e,t){BI.isNotNull(r[t])&&(n=!0,u.storeValue.assist&&u.storeValue.assist.push(r[t]),delete r[t])}),n&&(u.storeValue.value=BI.values(r)),void u._adjust(l)}var o=u._makeMap(u.storeValue.value),a=u._makeMap(t.value),s=[];BI.each(i,function(e,t){BI.isNotNull(o[i[e]])&&(u.storeValue.assist&&u.storeValue.assist.push(o[i[e]]),delete o[i[e]]),BI.isNull(a[i[e]])&&(BI.remove(u.storeValue.assist,t),s.push(t))}),u.storeValue.value=s.concat(BI.values(o)),u._adjust(l)})},_adjust:function(e){var t=this;this.options;!function i(){!0===t.wants2Quit&&(t.fireEvent(BI.MultiSelectInsertCombo.EVENT_CONFIRM),t.wants2Quit=!1);t.requesting=!1}(),e()},_join:function(e,t){var i=this;this.options;if(this._assertValue(e),this._assertValue(this.storeValue),this.storeValue.type===e.type){var n=this._makeMap(this.storeValue.value);BI.each(e.value,function(e,t){n[t]||(i.storeValue.value.push(t),BI.remove(i.storeValue.assist,t),n[t]=t)});var r=!1;return BI.each(e.assist,function(e,t){BI.isNotNull(n[t])&&(r=!0,i.storeValue.assist&&i.storeValue.assist.push(n[t]),delete n[t])}),r&&(this.storeValue.value=BI.values(n)),void i._adjust(t)}this._joinAll(e,t)},_setStartValue:function(e){this._startValue=e,this.popup.setStartValue(e)},_populate:function(){this.combo.populate.apply(this.combo,arguments)},setValue:function(e){this.storeValue=e||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue),this.numberCounter.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._populate.apply(this,arguments),this.numberCounter.populateSwitcher.apply(this.numberCounter,arguments)}}),BI.extend(BI.MultiSelectInsertCombo,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectInsertCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiSelectInsertCombo.EVENT_STOP="EVENT_STOP",BI.MultiSelectInsertCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiSelectInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.MultiSelectInsertCombo.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.multi_select_insert_combo",BI.MultiSelectInsertCombo)},function(e,t){BI.MultiSelectInsertNoBarCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertNoBarCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-combo-no-bar",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,attributes:{tabIndex:0}})},_init:function(){BI.MultiSelectInsertNoBarCombo.superclass._init.apply(this,arguments);function i(){BI.isKey(n._startValue)&&(n.storeValue.type===BI.Selection.All?(BI.remove(n.storeValue.value,n._startValue),n.storeValue.assist=n.storeValue.assist||[],n.storeValue.assist.pushDistinct(n._startValue)):(BI.pushDistinct(n.storeValue.value,n._startValue),BI.remove(n.storeValue.assist,n._startValue))),n.trigger.getSearcher().setState(n.storeValue),n.numberCounter.setButtonChecked(n.storeValue)}var n=this,e=this.options;this.storeValue={type:BI.Selection.Multi,value:e.value||[]},this.requesting=!1,this.trigger=BI.createWidget({type:"bi.multi_select_insert_trigger",height:e.height,text:e.text,masker:{offset:{left:0,top:0,right:0,bottom:25}},valueFormatter:e.valueFormatter,itemsCreator:BI.bind(this._itemsCreator4Trigger,this),value:{type:BI.Selection.Multi,value:e.value}}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_START,function(){n._setStartValue(""),this.getSearcher().setValue(n.storeValue)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_STOP,function(){n._setStartValue("")}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_PAUSE,function(){this.getSearcher().hasMatched()&&n._addItem(i)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM,function(){if(!this.getSearcher().hasMatched()){n._addItem(i);var e=this.getSearcher().getKeyword();n._stopEditing(),n.fireEvent(BI.MultiSelectInsertNoBarCombo.EVENT_ADD_ITEM,e)}}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_SEARCHING,function(e){var t=BI.last(e);0<(e=BI.initial(e||[])).length&&n._joinKeywords(e,function(){BI.isEndWithBlank(t)?(n.combo.setValue(n.storeValue),i(),n.combo.populate(),n._setStartValue("")):(n.combo.setValue(n.storeValue),i())})}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_CHANGE,function(e,t){t instanceof BI.MultiSelectBar?n._joinAll(this.getValue(),function(){i()}):n._join(this.getValue(),function(){i()})}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){n.numberCounter.updateSelectedValue(n.storeValue)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK,function(){n.combo.isViewVisible()||n.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,container:e.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_select_no_bar_popup_view",ref:function(){n.popup=this,n.trigger.setAdapter(this),n.numberCounter.setAdapter(this)},listeners:[{eventName:BI.MultiSelectPopupView.EVENT_CHANGE,action:function(){n.storeValue=this.getValue(),n._adjust(function(){i()})}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){n._defaultState()}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,action:function(){n.setValue(),n._defaultState()}}],itemsCreator:e.itemsCreator,valueFormatter:e.valueFormatter,onLoaded:function(){BI.nextTick(function(){n.combo.adjustWidth(),n.combo.adjustHeight(),n.numberCounter.adjustView(),n.trigger.getSearcher().adjustView()})}},value:{type:BI.Selection.Multi,value:e.value},hideChecker:function(e){return 0===t.element.find(e.target).length&&0===n.numberCounter.element.find(e.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(n.storeValue),BI.nextTick(function(){n._populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){n._stopEditing(),!0===n.requesting?n.wants2Quit=!0:n.fireEvent(BI.MultiSelectInsertNoBarCombo.EVENT_CONFIRM)});var t=BI.createWidget({type:"bi.trigger_icon_button",width:e.height,height:e.height,cls:"multi-select-trigger-icon-button"});t.on(BI.TriggerIconButton.EVENT_CHANGE,function(){n.numberCounter.hideView(),n.combo.isViewVisible()?n.combo.hideView():n.combo.showView()}),this.numberCounter=BI.createWidget({type:"bi.multi_select_check_selected_switcher",masker:{offset:{left:0,top:0,right:0,bottom:25}},valueFormatter:e.valueFormatter,itemsCreator:BI.bind(this._itemsCreator4Trigger,this),value:{type:BI.Selection.Multi,value:e.value}}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){n.combo.isViewVisible()||n.combo.showView()}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){this.updateSelectedValue(n.storeValue)}),this.numberCounter.on(BI.Events.VIEW,function(e){BI.nextTick(function(){n.trigger.refreshPlaceHolderWidth(!0===e?n.numberCounter.element.outerWidth()+8:0)})}),this.trigger.element.click(function(e){0<n.trigger.element.find(e.target).length&&n.numberCounter.hideView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:t,right:0,top:0,bottom:0},{el:{type:"bi.vertical_adapt",items:[this.numberCounter]},right:e.height,top:0,height:e.height}]})},_itemsCreator4Trigger:function(t,i){var n=this;this.options.itemsCreator(t,function(e){1===t.times&&BI.isNotNull(t.keywords)&&n.trigger.setValue(BI.deepClone(n.storeValue)),i.apply(n,arguments)})},_addItem:function(e){var t=this,i=this.trigger.getSearcher().getKeyword();this._join({type:BI.Selection.Multi,value:[i]},function(){t.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(t.storeValue.value,i),t.combo.setValue(t.storeValue),t._setStartValue(i),e(),t.populate(),t._setStartValue("")})},_stopEditing:function(){this.trigger.stopEditing(),this.numberCounter.hideView()},_defaultState:function(){this._stopEditing(),this.combo.hideView()},_assertValue:function(e){(e=e||{}).type||(e.type=BI.Selection.Multi),e.value||(e.value=[])},_makeMap:function(e){return BI.makeObject(e||[])},_joinKeywords:function(n,r){var o=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA,keywords:n},function(e){!function t(e){var i=o._makeMap(e);BI.each(n,function(e,t){BI.isNotNull(i[t])&&(o.storeValue.type===BI.Selection.Multi?BI.pushDistinct(o.storeValue.value,t):BI.remove(o.storeValue.value,t))}),o._adjust(r)}(BI.map(e.items,"value"))})},_joinAll:function(t,l){var u=this,e=this.options;this._assertValue(t),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(e){var i=BI.map(e.items,"value");if(u.storeValue.type===t.type){var n=!1,r=u._makeMap(u.storeValue.value);return BI.each(i,function(e,t){BI.isNotNull(r[t])&&(n=!0,u.storeValue.assist&&u.storeValue.assist.push(r[t]),delete r[t])}),n&&(u.storeValue.value=BI.values(r)),void u._adjust(l)}var o=u._makeMap(u.storeValue.value),a=u._makeMap(t.value),s=[];BI.each(i,function(e,t){BI.isNotNull(o[i[e]])&&(u.storeValue.assist&&u.storeValue.assist.push(o[i[e]]),delete o[i[e]]),BI.isNull(a[i[e]])&&(BI.remove(u.storeValue.assist,t),s.push(t))}),u.storeValue.value=s.concat(BI.values(o)),u._adjust(l)})},_adjust:function(e){var t=this;this.options;!function i(){!0===t.wants2Quit&&(t.fireEvent(BI.MultiSelectInsertNoBarCombo.EVENT_CONFIRM),t.wants2Quit=!1);t.requesting=!1}(),e()},_join:function(e,t){var i=this;this.options;if(this._assertValue(e),this._assertValue(this.storeValue),this.storeValue.type===e.type){var n=this._makeMap(this.storeValue.value);BI.each(e.value,function(e,t){n[t]||(i.storeValue.value.push(t),BI.remove(i.storeValue.assist,t),n[t]=t)});var r=!1;return BI.each(e.assist,function(e,t){BI.isNotNull(n[t])&&(r=!0,i.storeValue.assist&&i.storeValue.assist.push(n[t]),delete n[t])}),r&&(this.storeValue.value=BI.values(n)),void i._adjust(t)}this._joinAll(e,t)},_setStartValue:function(e){this._startValue=e,this.popup.setStartValue(e)},_populate:function(){this.combo.populate.apply(this.combo,arguments)},setValue:function(e){this.storeValue={type:BI.Selection.Multi,value:e||[]},this.combo.setValue(this.storeValue),this.numberCounter.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue.value)},populate:function(){this._populate.apply(this,arguments),this.numberCounter.populateSwitcher.apply(this.numberCounter,arguments)}}),BI.extend(BI.MultiSelectInsertNoBarCombo,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertNoBarCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.MultiSelectInsertNoBarCombo.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.multi_select_insert_no_bar_combo",BI.MultiSelectInsertNoBarCombo)},function(e,t){BI.MultiSelectInsertTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border bi-border-radius",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{},allowEdit:!0})},_init:function(){BI.MultiSelectInsertTrigger.superclass._init.apply(this,arguments);var e=this,t=this.options;t.height&&this.setHeight(t.height-2),this.searcher=BI.createWidget(t.searcher,{type:"bi.multi_select_insert_searcher",height:t.height,text:t.text,itemsCreator:t.itemsCreator,valueFormatter:t.valueFormatter,watermark:t.watermark,popup:{},adapter:t.adapter,masker:t.masker,value:t.value}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_START,function(){e.fireEvent(BI.MultiSelectInsertTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_ADD_ITEM,function(){e.fireEvent(BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_PAUSE,function(){e.fireEvent(BI.MultiSelectInsertTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_SEARCHING,function(){e.fireEvent(BI.MultiSelectInsertTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_STOP,function(){e.fireEvent(BI.MultiSelectInsertTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_CHANGE,function(){e.fireEvent(BI.MultiSelectInsertTrigger.EVENT_CHANGE,arguments)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_BLUR,function(){e.fireEvent(BI.MultiSelectInsertTrigger.EVENT_BLUR)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_FOCUS,function(){e.fireEvent(BI.MultiSelectInsertTrigger.EVENT_FOCUS)}),this.wrapNumberCounter=BI.createWidget({type:"bi.layout"}),this.wrapper=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:this.wrapNumberCounter,width:0},{el:BI.createWidget(),width:24}]}),t.allowEdit||BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.text",title:function(){return e.searcher.getState()}},left:0,right:24,top:0,bottom:0}]})},refreshPlaceHolderWidth:function(e){this.wrapper.attr("items")[1].width=e,this.wrapper.resize()},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch()},setAdapter:function(e){this.searcher.setAdapter(e)},setValue:function(e){this.searcher.setValue(e)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.MultiSelectInsertTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.MultiSelectInsertTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectInsertTrigger.EVENT_START="EVENT_START",BI.MultiSelectInsertTrigger.EVENT_STOP="EVENT_STOP",BI.MultiSelectInsertTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectInsertTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.MultiSelectInsertTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectInsertTrigger.EVENT_BLUR="EVENT_BLUR",BI.shortcut("bi.multi_select_insert_trigger",BI.MultiSelectInsertTrigger)},function(e,t){BI.MultiSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectLoader.superclass._init.apply(this,arguments);var s=this,l=this.options,u=!1;this.storeValue=l.value||{},this._assertValue(this.storeValue),this.button_group=BI.createWidget({type:"bi.select_list",logic:l.logic,toolbar:{type:"bi.multi_select_bar",cls:"bi-list-item-active",iconWrapperWidth:36},el:BI.extend({onLoaded:l.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},l.el),itemsCreator:function(r,o){var a=s._startValue;s.storeValue&&(r=BI.extend(r||{},{selectedValues:BI.isKey(a)&&s.storeValue.type===BI.Selection.Multi?s.storeValue.value.concat(a):s.storeValue.value})),l.itemsCreator(r,function(e){u=e.hasNext;var t=[];if(1===r.times&&s.storeValue){var i=BI.map(s.storeValue.value,function(e,t){var i=l.valueFormatter(t)||t;return{text:i,value:t,title:i,selected:s.storeValue.type===BI.Selection.Multi}});if(BI.isKey(s._startValue)&&!BI.contains(s.storeValue.value,s._startValue)){var n=l.valueFormatter(a)||a;i.unshift({text:n,value:a,title:n,selected:!0})}t=s._createItems(i)}o(t.concat(s._createItems(e.items)),e.keyword||""),1===r.times&&s.storeValue&&(BI.isKey(a)&&(s.storeValue.type===BI.Selection.All?BI.remove(s.storeValue.value,a):BI.pushDistinct(s.storeValue.value,a)),s.setValue(s.storeValue)),1===r.times&&s._scrollToTop()})},hasNext:function(){return u},value:this.storeValue}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top),BI.extend({scrolly:!0,vgap:5},l.logic,{items:BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Top,this.button_group)})))),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){s.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){s.fireEvent(BI.MultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(e){return BI.createItems(e,{type:"bi.multi_select_item",logic:this.options.logic,cls:"bi-list-item-active",height:24,selected:this.isAllSelected(),iconWrapperWidth:36})},_scrollToTop:function(){var e=this;BI.delay(function(){e.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(e){(e=e||{}).type||(e.type=BI.Selection.Multi),e.value||(e.value=[])},setStartValue:function(e){this._startValue=e},setValue:function(e){this.storeValue=e||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(e){e=this._createItems(e),this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(e){this.button_group.resetHeight(e-10)},resetWidth:function(e){this.button_group.resetWidth(e)}}),BI.MultiSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_loader",BI.MultiSelectLoader)},function(e,t){BI.MultiSelectNoBarLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectNoBarLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectNoBarLoader.superclass._init.apply(this,arguments);var s=this,l=this.options,u=!1;this.storeValue=l.value||{},this._assertValue(this.storeValue),this.button_group=BI.createWidget(BI.extend({type:"bi.list_pane",onLoaded:l.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}},itemsCreator:function(r,o){var a=s._startValue;s.storeValue&&(r=BI.extend(r||{},{selectedValues:BI.isKey(a)&&s.storeValue.type===BI.Selection.Multi?s.storeValue.value.concat(a):s.storeValue.value})),l.itemsCreator(r,function(e){u=e.hasNext;var t=[];if(1===r.times&&s.storeValue){var i=BI.map(s.storeValue.value,function(e,t){var i=l.valueFormatter(t)||t;return{text:i,value:t,title:i,selected:s.storeValue.type===BI.Selection.Multi}});if(BI.isKey(s._startValue)&&!BI.contains(s.storeValue.value,s._startValue)){var n=l.valueFormatter(a)||a;i.unshift({text:n,value:a,title:n,selected:!0})}t=s._createItems(i)}o(t.concat(s._createItems(e.items)),e.keyword||""),1===r.times&&s.storeValue&&(BI.isKey(a)&&(s.storeValue.type===BI.Selection.All?BI.remove(s.storeValue.value,a):BI.pushDistinct(s.storeValue.value,a)),s.setValue(s.storeValue)),1===r.times&&s._scrollToTop()})},hasNext:function(){return u},value:this.storeValue},l.el)),BI.createWidget({type:"bi.vertical",element:this,items:[this.button_group],vgap:5}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){s.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){s.fireEvent(BI.MultiSelectNoBarLoader.EVENT_CHANGE,arguments)})},_createItems:function(e){return BI.createItems(e,{type:"bi.multi_select_item",cls:"bi-list-item-active",logic:this.options.logic,height:24,iconWrapperWidth:36})},_scrollToTop:function(){var e=this;BI.delay(function(){e.button_group.element.scrollTop(0)},30)},_assertValue:function(e){(e=e||{}).type||(e.type=BI.Selection.Multi),e.value||(e.value=[])},setStartValue:function(e){this._startValue=e},setValue:function(e){this.storeValue=e||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue.value)},getValue:function(){return{type:BI.Selection.Multi,value:this.button_group.getValue()}},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(e){e=this._createItems(e),this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(e){this.button_group.element.css({"max-height":e+"px"})},resetWidth:function(){}}),BI.MultiSelectNoBarLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_no_bar_loader",BI.MultiSelectNoBarLoader)},function(e,t){BI.MultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectPopupView.superclass._init.apply(this,arguments);var t=this,e=this.options;this.loader=BI.createWidget({type:"bi.multi_select_loader",itemsCreator:e.itemsCreator,valueFormatter:e.valueFormatter,onLoaded:e.onLoaded,value:e.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:e.maxWidth,minWidth:e.minWidth,maxHeight:e.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:e.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){t.fireEvent(BI.MultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(e){switch(e){case 0:t.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:t.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(e){this.loader.setStartValue(e)},setValue:function(e){this.popupView.setValue(e)},getValue:function(){return this.popupView.getValue()},populate:function(e){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(e){this.popupView.resetHeight(e)},resetWidth:function(e){this.popupView.resetWidth(e)}}),BI.MultiSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_popup_view",BI.MultiSelectPopupView)},function(e,t){BI.MultiSelectNoBarPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectNoBarPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectNoBarPopupView.superclass._init.apply(this,arguments);var t=this,e=this.options;this.loader=BI.createWidget({type:"bi.multi_select_no_bar_loader",itemsCreator:e.itemsCreator,valueFormatter:e.valueFormatter,onLoaded:e.onLoaded,value:e.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:e.maxWidth,minWidth:e.minWidth,maxHeight:e.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:e.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){t.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(e){switch(e){case 0:t.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CLICK_CLEAR);break;case 1:t.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CLICK_CONFIRM)}})},setStartValue:function(e){this.loader.setStartValue(e)},setValue:function(e){this.popupView.setValue(e)},getValue:function(){return this.popupView.getValue()},populate:function(e){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(e){this.popupView.resetHeight(e)},resetWidth:function(e){this.popupView.resetWidth(e)}}),BI.MultiSelectNoBarPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectNoBarPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectNoBarPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_no_bar_popup_view",BI.MultiSelectNoBarPopupView)},function(e,t){BI.MultiSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.MultiSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border bi-border-radius",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{},allowEdit:!0})},_init:function(){BI.MultiSelectTrigger.superclass._init.apply(this,arguments);var e=this,t=this.options;t.height&&this.setHeight(t.height-2),this.searcher=BI.createWidget(t.searcher,{type:"bi.multi_select_searcher",height:t.height,text:t.text,itemsCreator:t.itemsCreator,valueFormatter:t.valueFormatter,watermark:t.watermark,popup:{},adapter:t.adapter,masker:t.masker,value:t.value}),this.searcher.on(BI.MultiSelectSearcher.EVENT_START,function(){e.fireEvent(BI.MultiSelectTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_PAUSE,function(){e.fireEvent(BI.MultiSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_SEARCHING,function(){e.fireEvent(BI.MultiSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_STOP,function(){e.fireEvent(BI.MultiSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE,function(){e.fireEvent(BI.MultiSelectTrigger.EVENT_CHANGE,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_BLUR,function(){e.fireEvent(BI.MultiSelectTrigger.EVENT_BLUR)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_FOCUS,function(){e.fireEvent(BI.MultiSelectTrigger.EVENT_FOCUS)}),this.wrapNumberCounter=BI.createWidget({type:"bi.layout"}),this.wrapper=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:this.wrapNumberCounter,width:0},{el:BI.createWidget(),width:24}]}),t.allowEdit||BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.text",title:function(){return e.searcher.getState()}},left:0,right:24,top:0,bottom:0}]})},refreshPlaceHolderWidth:function(e){this.wrapper.attr("items")[1].width=e,this.wrapper.resize()},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch()},setAdapter:function(e){this.searcher.setAdapter(e)},setValue:function(e){this.searcher.setValue(e)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.MultiSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.MultiSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectTrigger.EVENT_START="EVENT_START",BI.MultiSelectTrigger.EVENT_STOP="EVENT_STOP",BI.MultiSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.MultiSelectTrigger.EVENT_BLUR="EVENT_BLUR",BI.MultiSelectTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.shortcut("bi.multi_select_trigger",BI.MultiSelectTrigger)},function(e,t){BI.MultiSelectSearchInsertPane=BI.inherit(BI.Widget,{constants:{height:24,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchInsertPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchInsertPane.superclass._init.apply(this,arguments);var i=this,n=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.addNotMatchTip=BI.createWidget({type:"bi.text_button",invisible:!0,text:BI.i18nText("BI-Basic_Click_To_Add_Text",""),height:this.constants.height,cls:"bi-high-light",hgap:5,handler:function(){i.fireEvent(BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,n.keywordGetter())}}),this.loader=BI.createWidget({type:"bi.multi_select_search_loader",keywordGetter:n.keywordGetter,valueFormatter:n.valueFormatter,itemsCreator:function(e,t){n.itemsCreator.apply(i,[e,function(e){t(e),i.setKeyword(n.keywordGetter())}])},value:n.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){i.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{type:"bi.vertical",items:[this.tooltipClick,this.addNotMatchTip],height:this.constants.height},{el:this.loader}]})},setKeyword:function(i){var e=BI.some(this.loader.getAllButtons(),function(e,t){return i===t.getValue()}),t=0<this.loader.getAllButtons().length&&e;this.tooltipClick.setVisible(t),this.addNotMatchTip.setVisible(!t),t||this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",i))},isAllSelected:function(){return this.loader.isAllSelected()},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(e){this.loader.setValue(e)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(e){this.loader.populate.apply(this.loader,arguments)}}),BI.MultiSelectSearchInsertPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.multi_select_search_insert_pane",BI.MultiSelectSearchInsertPane)},function(e,t){BI.MultiSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,s=this.options,l=!1;this.storeValue=BI.deepClone(s.value),this.button_group=BI.createWidget({type:"bi.select_list",toolbar:{type:"bi.multi_select_bar",cls:"bi-list-item-active",iconWrapperWidth:36},element:this,logic:{dynamic:!1},value:s.value,el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(r,o){a.storeValue&&(r=BI.extend(r||{},{selectedValues:a.storeValue.value})),s.itemsCreator(r,function(e){var t=e.keyword=s.keywordGetter();l=e.hasNext;var i=[];if(1===r.times&&a.storeValue){var n=a._filterValues(a.storeValue);i=a._createItems(n)}o(i.concat(a._createItems(e.items)),t),1===r.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return l}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(e){return BI.createItems(e,{type:"bi.multi_select_item",logic:{dynamic:!1},height:24,selected:this.isAllSelected(),cls:"bi-list-item-active",iconWrapperWidth:36})},isAllSelected:function(){return this.button_group.isAllSelected()},_filterValues:function(i){var n=this.options,e=n.keywordGetter(),t=BI.deepClone(i.value)||[],r=BI.map(t,function(e,t){return{text:n.valueFormatter(t)||t,value:t}});if(BI.isKey(e)){var o=BI.Func.getSearchResult(r,e);t=o.match.concat(o.find)}return BI.map(t,function(e,t){return{text:t.text,title:t.text,value:t.value,selected:i.type===BI.Selection.All}})},setValue:function(e){this.storeValue=BI.deepClone(e),this.button_group.setValue(e)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(e){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(e){this.button_group.resetHeight(e)},resetWidth:function(e){this.button_group.resetWidth(e)}}),BI.MultiSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_loader",BI.MultiSelectSearchLoader)},function(e,t){BI.MultiSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:24,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchPane.superclass._init.apply(this,arguments);var i=this,n=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.multi_select_search_loader",keywordGetter:n.keywordGetter,valueFormatter:n.valueFormatter,itemsCreator:function(e,t){n.itemsCreator.apply(i,[e,function(e){t(e),i.setKeyword(n.keywordGetter())}])},value:n.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){i.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(e){var t,i=0<this.loader.getAllButtons().length&&(t=this.loader.getAllButtons()[0])&&e===t.getValue();i!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(i),this.resizer.attr("items")[0].height=i?this.constants.height:0,this.resizer.resize())},isAllSelected:function(){return this.loader.isAllSelected()},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(e){this.loader.setValue(e)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(e){this.loader.populate.apply(this.loader,arguments)}}),BI.MultiSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_pane",BI.MultiSelectSearchPane)},function(e,t){BI.MultiSelectCheckSelectedButton=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-button",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectCheckSelectedButton.superclass._init.apply(this,arguments);var e=this,t=this.options;this.numberCounter=BI.createWidget({type:"bi.text_button",element:this,hgap:4,text:"0",textAlign:"center",textHeight:16,cls:"bi-high-light-background count-tip"}),this.numberCounter.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.numberCounter.on(BI.TextButton.EVENT_CHANGE,function(){e.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),this.numberCounter.element.hover(function(){e.numberCounter.setTag(e.numberCounter.getText()),e.numberCounter.setText(BI.i18nText("BI-Check_Selected"))},function(){e.numberCounter.setText(e.numberCounter.getTag())}),this.setVisible(!1),BI.isNotNull(t.value)&&this.setValue(t.value)},_populate:function(i){var n=this,e=this.options;i.type!==BI.Selection.All?BI.nextTick(function(){n.numberCounter.setText(i.value.length),n.setVisible(0<i.value.length)}):e.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(e){var t=e.count-i.value.length;BI.nextTick(function(){n.numberCounter.setText(t),n.setVisible(0<t)})})},_assertValue:function(e){return(e=e||{}).type||(e.type=BI.Selection.Multi),e.value||(e.value=[]),e},setValue:function(e){e=this._assertValue(e),this.options.value=e,this._populate(e)},populate:function(){this._populate(this._assertValue(this.options.value))},getValue:function(){}}),BI.MultiSelectCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_check_selected_button",BI.MultiSelectCheckSelectedButton)},function(e,t){BI.MultiSelectEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-editor",el:{},watermark:BI.i18nText("BI-Basic_Search")})},_init:function(){BI.MultiSelectEditor.superclass._init.apply(this,arguments);var e=this,t=this.options;this.editor=BI.createWidget(t.el,{type:"bi.state_editor",element:this,height:t.height,watermark:t.watermark,allowBlank:!0,value:t.value,defaultText:t.text,text:t.text,tipType:t.tipType,warningTitle:t.warningTitle}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){e.fireEvent(BI.MultiSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_FOCUS,function(){e.fireEvent(BI.MultiSelectEditor.EVENT_FOCUS)}),this.editor.on(BI.StateEditor.EVENT_BLUR,function(){e.fireEvent(BI.MultiSelectEditor.EVENT_BLUR)})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(e){this.editor.setState(e)},setValue:function(e){this.editor.setValue(e)},setTipType:function(e){this.editor.setTipType(e)},getValue:function(){var e=this.editor.getState();return BI.isArray(e)&&0<e.length?e[e.length-1]:""},getState:function(){return this.editor.getText()},getKeywords:function(){var e=this.editor.getLastChangedValue(),t=e.match(/[\S]+/g);return BI.isEndWithBlank(e)?t.concat([" "]):t},populate:function(e){}}),BI.MultiSelectEditor.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectEditor.EVENT_BLUR="EVENT_BLUR",BI.MultiSelectEditor.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_select_editor",BI.MultiSelectEditor)},function(e,t){BI.MultiSelectInsertSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{},text:BI.i18nText("BI-Basic_Please_Select")})},_init:function(){BI.MultiSelectInsertSearcher.superclass._init.apply(this,arguments);var n=this,r=this.options;this.editor=BI.createWidget(r.el,{type:"bi.multi_select_editor",watermark:r.watermark,height:r.height,text:r.text,listeners:[{eventName:BI.MultiSelectEditor.EVENT_FOCUS,action:function(){n.fireEvent(BI.MultiSelectInsertSearcher.EVENT_FOCUS)}},{eventName:BI.MultiSelectEditor.EVENT_BLUR,action:function(){n.fireEvent(BI.MultiSelectInsertSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",allowSearchBlank:!1,element:this,height:r.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(e,t){t()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_insert_pane",valueFormatter:r.valueFormatter,keywordGetter:function(){return n.editor.getValue()},itemsCreator:function(e,t){var i=n.editor.getValue();e.keywords=[i],this.setKeyword(i),r.itemsCreator(e,t)},value:r.value,listeners:[{eventName:BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){n.fireEvent(BI.MultiSelectInsertSearcher.EVENT_ADD_ITEM)}}]},r.popup),adapter:r.adapter,masker:r.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){n.fireEvent(BI.MultiSelectInsertSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),n.fireEvent(BI.MultiSelectInsertSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){n.fireEvent(BI.MultiSelectInsertSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){n.fireEvent(BI.MultiSelectInsertSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var e=this.getKeywords();n.fireEvent(BI.MultiSelectInsertSearcher.EVENT_SEARCHING,e)}),BI.isNotNull(r.value)&&this.setState(r.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(e){this.searcher.setAdapter(e)},setState:function(e){var i=this.options;if((e=e||{}).value||(e.value=[]),e.type===BI.Selection.All)if(0===e.value.length)this.editor.setState(BI.Selection.All);else if(BI.size(e.assist)<=20){var n="";BI.each(e.assist,function(e,t){n+=0===e?""+(i.valueFormatter(t+"")||t):","+(i.valueFormatter(t+"")||t)}),this.editor.setState(n)}else this.editor.setState(BI.Selection.Multi);else if(0===e.value.length)this.editor.setState(BI.Selection.None);else if(BI.size(e.value)<=20){n="";BI.each(e.value,function(e,t){n+=0===e?""+(i.valueFormatter(t+"")||t):","+(i.valueFormatter(t+"")||t)}),this.editor.setState(n)}else this.editor.setState(BI.Selection.Multi)},getState:function(){return this.editor.getState()},setValue:function(e){this.setState(e),this.searcher.setValue(e)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(e){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiSelectInsertSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiSelectInsertSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectInsertSearcher.EVENT_START="EVENT_START",BI.MultiSelectInsertSearcher.EVENT_STOP="EVENT_STOP",BI.MultiSelectInsertSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectInsertSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectInsertSearcher.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.MultiSelectInsertSearcher.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectInsertSearcher.EVENT_BLUR="EVENT_BLUR",BI.shortcut("bi.multi_select_insert_searcher",BI.MultiSelectInsertSearcher)},function(e,t){BI.MultiSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{},text:BI.i18nText("BI-Basic_Please_Select")})},_init:function(){BI.MultiSelectSearcher.superclass._init.apply(this,arguments);var n=this,r=this.options;this.editor=BI.createWidget(r.el,{type:"bi.multi_select_editor",height:r.height,text:r.text,watermark:r.watermark,listeners:[{eventName:BI.MultiSelectEditor.EVENT_FOCUS,action:function(){n.fireEvent(BI.MultiSelectSearcher.EVENT_FOCUS)}},{eventName:BI.MultiSelectEditor.EVENT_BLUR,action:function(){n.fireEvent(BI.MultiSelectSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",allowSearchBlank:!1,element:this,height:r.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(e,t){t()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_pane",valueFormatter:r.valueFormatter,keywordGetter:function(){return n.editor.getValue()},itemsCreator:function(e,t){var i=n.editor.getValue();e.keywords=[i],this.setKeyword(i),r.itemsCreator(e,t)},value:r.value},r.popup),adapter:r.adapter,masker:r.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){n.fireEvent(BI.MultiSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),n.fireEvent(BI.MultiSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){n.fireEvent(BI.MultiSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){n.fireEvent(BI.MultiSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var e=this.getKeywords();n.fireEvent(BI.MultiSelectSearcher.EVENT_SEARCHING,e)}),BI.isNotNull(r.value)&&this.setState(r.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(e){this.searcher.setAdapter(e)},setState:function(e){var i=this.options;if((e=e||{}).value||(e.value=[]),e.type===BI.Selection.All)if(0===e.value.length)this.editor.setState(BI.Selection.All);else if(BI.size(e.assist)<=20){var n="";BI.each(e.assist,function(e,t){n+=0===e?""+(i.valueFormatter(t+"")||t):","+(i.valueFormatter(t+"")||t)}),this.editor.setState(n)}else this.editor.setState(BI.Selection.Multi);else if(0===e.value.length)this.editor.setState(BI.Selection.None);else if(BI.size(e.value)<=20){n="";BI.each(e.value,function(e,t){n+=0===e?""+(i.valueFormatter(t+"")||t):","+(i.valueFormatter(t+"")||t)}),this.editor.setState(n)}else this.editor.setState(BI.Selection.Multi)},getState:function(){return this.editor.getState()},setValue:function(e){this.setState(e),this.searcher.setValue(e)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(e){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectSearcher.EVENT_START="EVENT_START",BI.MultiSelectSearcher.EVENT_STOP="EVENT_STOP",BI.MultiSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectSearcher.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectSearcher.EVENT_BLUR="EVENT_BLUR",BI.shortcut("bi.multi_select_searcher",BI.MultiSelectSearcher)},function(e,t){BI.MultiSelectCheckSelectedSwitcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedSwitcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-switcher",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,el:{},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectCheckSelectedSwitcher.superclass._init.apply(this,arguments);var t=this,e=this.options;this.button=BI.createWidget(e.el,{type:"bi.multi_select_check_selected_button",itemsCreator:e.itemsCreator,value:e.value}),this.button.on(BI.Events.VIEW,function(){t.fireEvent(BI.Events.VIEW,arguments)}),this.switcher=BI.createWidget({type:"bi.switcher",toggle:!1,element:this,el:this.button,popup:BI.extend({type:"bi.multi_select_check_pane",valueFormatter:e.valueFormatter,itemsCreator:e.itemsCreator,onClickContinueSelect:function(){t.switcher.hideView()},ref:function(e){t.checkPane=e},value:e.value},e.popup),adapter:e.adapter,masker:e.masker}),this.switcher.on(BI.Switcher.EVENT_TRIGGER_CHANGE,function(){t.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE)}),this.switcher.on(BI.Switcher.EVENT_BEFORE_POPUPVIEW,function(){t.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW)}),this.switcher.on(BI.Switcher.EVENT_AFTER_POPUPVIEW,function(){var e=this;BI.nextTick(function(){e.populate()})})},adjustView:function(){this.switcher.adjustView()},hideView:function(){this.switcher.empty(),this.switcher.hideView()},setAdapter:function(e){this.switcher.setAdapter(e)},setValue:function(e){this.switcher.setValue(e)},updateSelectedValue:function(e){this.checkPane.setValue(e)},setButtonChecked:function(e){this.button.setValue(e)},getValue:function(){},populate:function(e){this.switcher.populate.apply(this.switcher,arguments)},populateSwitcher:function(){this.button.populate.apply(this.button,arguments)}}),BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_select_check_selected_switcher",BI.MultiSelectCheckSelectedSwitcher)},function(e,t){BI.MultiSelectInsertList=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectInsertList.superclass._init.apply(this,arguments);var n=this,r=this.options;this.storeValue=r.value||{};function i(){BI.isKey(n._startValue)&&(n.storeValue.type===BI.Selection.All?BI.remove(n.storeValue.value,n._startValue):BI.pushDistinct(n.storeValue.value,n._startValue))}this.adapter=BI.createWidget({type:"bi.multi_select_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:r.itemsCreator,valueFormatter:r.valueFormatter,logic:{dynamic:!0},el:{},value:r.value}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){n.storeValue=this.getValue(),i(),n.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_insert_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:r.valueFormatter,keywordGetter:function(){return n.trigger.getKeyword()},itemsCreator:function(e,t){var i=n.trigger.getKeyword();BI.isNotEmptyString(i)&&(e.keywords=[i],this.setKeyword(e.keywords[0]),r.itemsCreator(e,t))},listeners:[{eventName:BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){var e=n.trigger.getKeyword();n.trigger.hasMatched()||(n.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(n.storeValue.value,e),n._showAdapter(),n.adapter.setValue(n.storeValue),n.adapter.populate(),n.storeValue.type===BI.Selection.Multi&&n.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE))}}]}),this.searcherPane.setVisible(!1),this.trigger=BI.createWidget({type:"bi.searcher",allowSearchBlank:!1,isAutoSearch:!1,isAutoSync:!1,onSearch:function(e,t){t()},adapter:this.adapter,popup:this.searcherPane,height:200,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){n._showSearcherPane(),n._setStartValue(""),this.setValue(BI.deepClone(n.storeValue))}},{eventName:BI.Searcher.EVENT_STOP,action:function(){n._showAdapter(),n._setStartValue(""),n.adapter.setValue(n.storeValue),n.adapter.populate()}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){var e=this.getKeyword();this.hasMatched()&&n._join({type:BI.Selection.Multi,value:[e]},function(){n.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(n.storeValue.value,e),n._showAdapter(),n.adapter.setValue(n.storeValue),n._setStartValue(e),i(),n.adapter.populate(),n._setStartValue(""),n.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)}),n._showAdapter()}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var e=this.getKeywords(),t=BI.last(e);0<(e=BI.initial(e||[])).length&&n._joinKeywords(e,function(){BI.isEndWithBlank(t)?(n.adapter.setValue(n.storeValue),i(),n.adapter.populate(),n._setStartValue("")):(n.adapter.setValue(n.storeValue),i()),n.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(e,t){t instanceof BI.MultiSelectBar?n._joinAll(this.getValue(),function(){i(),n.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)}):n._join(this.getValue(),function(){i(),n.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)})}}],value:r.value}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:24},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:30,bottom:0,left:0,right:0}]})},_showAdapter:function(){this.adapter.setVisible(!0),this.searcherPane.setVisible(!1)},_showSearcherPane:function(){this.searcherPane.setVisible(!0),this.adapter.setVisible(!1)},_defaultState:function(){this.trigger.stopEditing()},_assertValue:function(e){(e=e||{}).type||(e.type=BI.Selection.Multi),e.value||(e.value=[])},_makeMap:function(e){return BI.makeObject(e||[])},_joinKeywords:function(n,r){var o=this,e=this.options;this._assertValue(this.storeValue),e.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA,keywords:n},function(e){!function t(e){var i=o._makeMap(e);BI.each(n,function(e,t){BI.isNotNull(i[t])&&(o.storeValue.type===BI.Selection.Multi?BI.pushDistinct(o.storeValue.value,t):BI.remove(o.storeValue.value,t))}),r()}(BI.map(e.items,"value"))})},_joinAll:function(t,l){var u=this,e=this.options;this._assertValue(t),e.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA,keywords:[u.trigger.getKeyword()]},function(e){var i=BI.map(e.items,"value");if(u.storeValue.type===t.type){var n=!1,r=u._makeMap(u.storeValue.value);return BI.each(i,function(e,t){BI.isNotNull(r[t])&&(n=!0,delete r[t])}),n&&(u.storeValue.value=BI.values(r)),void l()}var o=u._makeMap(u.storeValue.value),a=u._makeMap(t.value),s=[];BI.each(i,function(e,t){BI.isNotNull(o[i[e]])&&delete o[i[e]],BI.isNull(a[i[e]])&&s.push(t)}),u.storeValue.value=s.concat(BI.values(o)),l()})},_join:function(e,t){var i=this;this.options;if(this._assertValue(e),this._assertValue(this.storeValue),this.storeValue.type===e.type){var n=this._makeMap(this.storeValue.value);BI.each(e.value,function(e,t){n[t]||(i.storeValue.value.push(t),n[t]=t)});var r=!1;return BI.each(e.assist,function(e,t){BI.isNotNull(n[t])&&(r=!0,delete n[t])}),r&&(this.storeValue.value=BI.values(n)),void t()}this._joinAll(e,t)},_setStartValue:function(e){this._startValue=e,this.adapter.setStartValue(e)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(e){this.storeValue=e||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectInsertList,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_insert_list",BI.MultiSelectInsertList)},function(e,t){BI.MultiSelectInsertNoBarList=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertNoBarList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectInsertNoBarList.superclass._init.apply(this,arguments);var n=this,r=this.options;this.storeValue={type:BI.Selection.Multi,value:r.value||[]};function i(){BI.isKey(n._startValue)&&(n.storeValue.type===BI.Selection.All?BI.remove(n.storeValue.value,n._startValue):BI.pushDistinct(n.storeValue.value,n._startValue))}this.adapter=BI.createWidget({type:"bi.multi_select_no_bar_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:r.itemsCreator,valueFormatter:r.valueFormatter,logic:{dynamic:!1},el:{},value:{type:BI.Selection.Multi,value:r.value||[]}}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){n.storeValue=this.getValue(),i(),n.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_insert_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:r.valueFormatter,keywordGetter:function(){return n.trigger.getKeyword()},itemsCreator:function(e,t){var i=n.trigger.getKeyword();BI.isNotEmptyString(i)&&(e.keywords=[i],this.setKeyword(e.keywords[0]),r.itemsCreator(e,t))},listeners:[{eventName:BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){var e=n.trigger.getKeyword();n.trigger.hasMatched()||(n.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(n.storeValue.value,e),n._showAdapter(),n.adapter.setValue(n.storeValue),n.adapter.populate(),n.storeValue.type===BI.Selection.Multi&&n.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE))}}]}),this.searcherPane.setVisible(!1),this.trigger=BI.createWidget({type:"bi.searcher",allowSearchBlank:!1,isAutoSearch:!1,isAutoSync:!1,onSearch:function(e,t){t()},adapter:this.adapter,popup:this.searcherPane,height:200,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){n._showSearcherPane(),n._setStartValue(""),this.setValue(BI.deepClone(n.storeValue))}},{eventName:BI.Searcher.EVENT_STOP,action:function(){n._showAdapter(),n._setStartValue(""),n.adapter.setValue(n.storeValue),n.adapter.populate()}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){var e=this.getKeyword();this.hasMatched()&&n._join({type:BI.Selection.Multi,value:[e]},function(){n.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(n.storeValue.value,e),n._showAdapter(),n.adapter.setValue(n.storeValue),n._setStartValue(e),i(),n.adapter.populate(),n._setStartValue(""),n.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE)})}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var e=this.getKeywords(),t=BI.last(e);0<(e=BI.initial(e||[])).length&&n._joinKeywords(e,function(){BI.isEndWithBlank(t)?(n.adapter.setValue(n.storeValue),i(),n.adapter.populate(),n._setStartValue("")):(n.adapter.setValue(n.storeValue),i()),n.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE)})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(e,t){t instanceof BI.MultiSelectBar?n._joinAll(this.getValue(),function(){i(),n.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE)}):n._join(this.getValue(),function(){i(),n.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE)})}}],value:{type:BI.Selection.Multi,value:r.value||[]}}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:24},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:30,bottom:0,left:0,right:0}]})},_showAdapter:function(){this.adapter.setVisible(!0),this.searcherPane.setVisible(!1)},_showSearcherPane:function(){this.searcherPane.setVisible(!0),this.adapter.setVisible(!1)},_defaultState:function(){this.trigger.stopEditing()},_assertValue:function(e){(e=e||{}).type||(e.type=BI.Selection.Multi),e.value||(e.value=[])},_makeMap:function(e){return BI.makeObject(e||[])},_joinKeywords:function(n,r){var o=this,e=this.options;this._assertValue(this.storeValue),e.itemsCreator({type:BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,keywords:n},function(e){!function t(e){var i=o._makeMap(e);BI.each(n,function(e,t){BI.isNotNull(i[t])&&(o.storeValue.type===BI.Selection.Multi?BI.pushDistinct(o.storeValue.value,t):BI.remove(o.storeValue.value,t))}),r()}(BI.map(e.items,"value"))})},_joinAll:function(t,l){var u=this,e=this.options;this._assertValue(t),e.itemsCreator({type:BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,keywords:[u.trigger.getKeyword()]},function(e){var i=BI.map(e.items,"value");if(u.storeValue.type===t.type){var n=!1,r=u._makeMap(u.storeValue.value);return BI.each(i,function(e,t){BI.isNotNull(r[t])&&(n=!0,delete r[t])}),n&&(u.storeValue.value=BI.values(r)),void l()}var o=u._makeMap(u.storeValue.value),a=u._makeMap(t.value),s=[];BI.each(i,function(e,t){BI.isNotNull(o[i[e]])&&delete o[i[e]],BI.isNull(a[i[e]])&&s.push(t)}),u.storeValue.value=s.concat(BI.values(o)),l()})},_join:function(e,t){var i=this;this.options;if(this._assertValue(e),this._assertValue(this.storeValue),this.storeValue.type===e.type){var n=this._makeMap(this.storeValue.value);BI.each(e.value,function(e,t){n[t]||(i.storeValue.value.push(t),n[t]=t)});var r=!1;return BI.each(e.assist,function(e,t){BI.isNotNull(n[t])&&(r=!0,delete n[t])}),r&&(this.storeValue.value=BI.values(n)),void t()}this._joinAll(e,t)},_setStartValue:function(e){this._startValue=e,this.adapter.setStartValue(e)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(e){this.storeValue={type:BI.Selection.Multi,value:e||[]},this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue.value)},populate:function(){this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectInsertNoBarList,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertNoBarList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_insert_no_bar_list",BI.MultiSelectInsertNoBarList)},function(e,t){BI.MultiSelectList=BI.inherit(BI.Widget,{_constant:{EDITOR_HEIGHT:24},_defaultConfig:function(){return BI.extend(BI.MultiSelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectList.superclass._init.apply(this,arguments);var n=this,r=this.options;this.storeValue={};function i(){BI.isKey(n._startValue)&&(n.storeValue.type===BI.Selection.All?BI.remove(n.storeValue.value,n._startValue):BI.pushDistinct(n.storeValue.value,n._startValue))}this.adapter=BI.createWidget({type:"bi.multi_select_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:r.itemsCreator,valueFormatter:r.valueFormatter,logic:{dynamic:!1},el:{}}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){n.storeValue=this.getValue(),n._adjust(function(){i(),n.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:r.valueFormatter,keywordGetter:function(){return n.trigger.getKeyword()},itemsCreator:function(e,t){var i=n.trigger.getKeyword();BI.isNotEmptyString(i)&&(e.keywords=[i],this.setKeyword(e.keywords[0]),r.itemsCreator(e,t))}}),this.searcherPane.setVisible(!1),this.trigger=BI.createWidget({type:"bi.searcher",allowSearchBlank:!1,isAutoSearch:!1,isAutoSync:!1,onSearch:function(e,t){t()},adapter:this.adapter,popup:this.searcherPane,height:200,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){n._showSearcherPane(),n._setStartValue(""),this.setValue(BI.deepClone(n.storeValue))}},{eventName:BI.Searcher.EVENT_STOP,action:function(){n._showAdapter(),n._setStartValue(""),n.adapter.setValue(n.storeValue),n.adapter.populate()}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){var e=this.getKeyword();this.hasMatched()&&n._join({type:BI.Selection.Multi,value:[e]},function(){n._showAdapter(),n.adapter.setValue(n.storeValue),n._setStartValue(e),i(),n.adapter.populate(),n._setStartValue(""),n.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var e=this.getKeyword(),t=BI.last(e);0<(e=BI.initial(e||[])).length&&n._joinKeywords(e,function(){BI.isEndWithBlank(t)?(n.adapter.setValue(n.storeValue),i(),n.adapter.populate(),n._setStartValue("")):(n.adapter.setValue(n.storeValue),i()),n.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(e,t){t instanceof BI.MultiSelectBar?n._joinAll(this.getValue(),function(){i(),n.fireEvent(BI.MultiSelectList.EVENT_CHANGE)}):n._join(this.getValue(),function(){i(),n.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:this._constant.EDITOR_HEIGHT},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:this._constant.EDITOR_HEIGHT,bottom:0,left:0,right:0}]})},_showAdapter:function(){this.adapter.setVisible(!0),this.searcherPane.setVisible(!1)},_showSearcherPane:function(){this.searcherPane.setVisible(!0),this.adapter.setVisible(!1)},_defaultState:function(){this.trigger.stopEditing()},_assertValue:function(e){(e=e||{}).type||(e.type=BI.Selection.Multi),e.value||(e.value=[])},_makeMap:function(e){return BI.makeObject(e||[])},_joinKeywords:function(n,r){var o=this,e=this.options;this._assertValue(this.storeValue),e.itemsCreator({type:BI.MultiSelectList.REQ_GET_ALL_DATA,keywords:n},function(e){!function t(e){var i=o._makeMap(e);BI.each(n,function(e,t){BI.isNotNull(i[t])&&(o.storeValue.type===BI.Selection.Multi?BI.pushDistinct(o.storeValue.value,t):BI.remove(o.storeValue.value,t))}),o._adjust(r)}(BI.map(e.items,"value"))})},_joinAll:function(t,l){var u=this,e=this.options;this._assertValue(t),e.itemsCreator({type:BI.MultiSelectList.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(e){var i=BI.map(e.items,"value");if(u.storeValue.type===t.type){var n=!1,r=u._makeMap(u.storeValue.value);return BI.each(i,function(e,t){BI.isNotNull(r[t])&&(n=!0,delete r[t])}),n&&(u.storeValue.value=BI.values(r)),void u._adjust(l)}var o=u._makeMap(u.storeValue.value),a=u._makeMap(t.value),s=[];BI.each(i,function(e,t){BI.isNotNull(o[i[e]])&&delete o[i[e]],BI.isNull(a[i[e]])&&s.push(t)}),u.storeValue.value=s.concat(BI.values(o)),u._adjust(l)})},_adjust:function(t){var i=this,e=this.options;function n(){i.storeValue.type===BI.Selection.All&&i.storeValue.value.length>=i._count?i.storeValue={type:BI.Selection.Multi,value:[]}:i.storeValue.type===BI.Selection.Multi&&i.storeValue.value.length>=i._count&&(i.storeValue={type:BI.Selection.All,value:[]})}this._count?(n(),t()):e.itemsCreator({type:BI.MultiSelectList.REQ_GET_DATA_LENGTH},function(e){i._count=e.count,n(),t()})},_join:function(e,t){var i=this;this.options;if(this._assertValue(e),this._assertValue(this.storeValue),this.storeValue.type===e.type){var n=this._makeMap(this.storeValue.value);BI.each(e.value,function(e,t){n[t]||(i.storeValue.value.push(t),n[t]=t)});var r=!1;return BI.each(e.assist,function(e,t){BI.isNotNull(n[t])&&(r=!0,delete n[t])}),r&&(this.storeValue.value=BI.values(n)),void i._adjust(t)}this._joinAll(e,t)},_setStartValue:function(e){this._startValue=e,this.adapter.setStartValue(e)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(e){this.storeValue=e||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectList,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_list",BI.MultiSelectList)},function(e,t){BI.MultiSelectTree=BI.inherit(BI.Single,{_constant:{EDITOR_HEIGHT:24},_defaultConfig:function(){return BI.extend(BI.MultiSelectTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTree.superclass._init.apply(this,arguments);var i=this,n=this.options;this.storeValue={value:{}},this.adapter=BI.createWidget({type:"bi.multi_select_tree_popup",itemsCreator:n.itemsCreator}),this.adapter.on(BI.MultiSelectTreePopup.EVENT_CHANGE,function(){i.searcher.isSearching()?i.storeValue={value:i.searcherPane.getValue()}:i.storeValue={value:i.adapter.getValue()},i.setSelectedValue(i.storeValue.value),i.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_tree_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",keywordGetter:function(){return i.searcher.getKeyword()},itemsCreator:function(e,t){e.keyword=i.searcher.getKeyword(),n.itemsCreator(e,t)}}),this.searcherPane.setVisible(!1),this.searcher=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(e,t){t({keyword:i.searcher.getKeyword()})},adapter:this.adapter,popup:this.searcherPane,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){i._showSearcherPane()}},{eventName:BI.Searcher.EVENT_STOP,action:function(){i._showAdapter(),BI.nextTick(function(){i.adapter.populate()})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(){i.searcher.isSearching()?i.storeValue={value:i.searcherPane.getValue()}:i.storeValue={value:i.adapter.getValue()},i.setSelectedValue(i.storeValue.value),i.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){i._showAdapter(),BI.nextTick(function(){i.adapter.populate()})}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.searcher,height:this._constant.EDITOR_HEIGHT},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:this._constant.EDITOR_HEIGHT,bottom:0,left:0,right:0}]})},_showAdapter:function(){this.adapter.setVisible(!0),this.searcherPane.setVisible(!1)},_showSearcherPane:function(){this.searcherPane.setVisible(!0),this.adapter.setVisible(!1)},resize:function(){},setSelectedValue:function(e){this.storeValue.value=e||{},this.adapter.setSelectedValue(e),this.searcherPane.setSelectedValue(e),this.searcher.setValue({value:e||{}})},setValue:function(e){this.adapter.setValue(e)},stopSearch:function(){this.searcher.stopSearch()},updateValue:function(e){this.adapter.updateValue(e)},getValue:function(){return this.storeValue.value},populate:function(){this.searcher.populate.apply(this.searcher,arguments),this.adapter.populate.apply(this.adapter,arguments)}}),BI.MultiSelectTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_tree",BI.MultiSelectTree)},function(e,t){BI.MultiSelectTreePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree-popup bi-border-left bi-border-right bi-border-bottom",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTreePopup.superclass._init.apply(this,arguments);var e=this,t=this.options;this.popup=BI.createWidget({type:"bi.async_tree",element:this,itemsCreator:t.itemsCreator}),this.popup.on(BI.TreeView.EVENT_AFTERINIT,function(){e.fireEvent(BI.MultiSelectTreePopup.EVENT_AFTER_INIT)}),this.popup.on(BI.TreeView.EVENT_CHANGE,function(){e.fireEvent(BI.MultiSelectTreePopup.EVENT_CHANGE)})},hasChecked:function(){return this.popup.hasChecked()},getValue:function(){return this.popup.getValue()},setValue:function(e){e=e||{},this.popup.setValue(e)},setSelectedValue:function(e){e=e||{},this.popup.setSelectedValue(e)},updateValue:function(e){this.popup.updateValue(e),this.popup.refresh()},populate:function(e){this.popup.stroke(e)}}),BI.MultiSelectTreePopup.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.MultiSelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_tree_popup",BI.MultiSelectTreePopup)},function(e,t){BI.MultiTreeCheckPane=BI.inherit(BI.Pane,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-pane bi-background",onClickContinueSelect:BI.emptyFn,el:{type:"bi.display_tree"}})},_init:function(){BI.MultiTreeCheckPane.superclass._init.apply(this,arguments);var e=this,i=this.options;this.selectedValues={};var t=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-tree-check-selected"});t.on(BI.TextButton.EVENT_CHANGE,function(){i.onClickContinueSelect(),BI.nextTick(function(){e.empty()})});var n=BI.createWidget({type:"bi.left",cls:"multi-tree-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:t,lgap:this.constants.lgap,tgap:this.constants.tgap}]});this.display=BI.createWidget(i.el,{type:"bi.display_tree",cls:"bi-multi-tree-display",itemsCreator:function(e,t){e.type=BI.TreeView.REQ_TYPE_GET_SELECTED_DATA,i.itemsCreator(e,t)},value:(i.value||{}).value}),this.display.on(BI.Events.AFTERINIT,function(){e.fireEvent(BI.Events.AFTERINIT)}),this.display.on(BI.TreeView.EVENT_INIT,function(){n.setVisible(!1)}),this.display.on(BI.TreeView.EVENT_AFTERINIT,function(){n.setVisible(!0)}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:n},{height:"fill",el:this.display}]})},empty:function(){this.display.empty()},populate:function(e){this.display.stroke(e)},setValue:function(e){e=e||{},this.display.setSelectedValue(e.value)},getValue:function(){}}),BI.MultiTreeCheckPane.EVENT_CONTINUE_CLICK="EVENT_CONTINUE_CLICK",BI.shortcut("bi.multi_tree_check_pane",BI.MultiTreeCheckPane)},function(e,t){BI.MultiTreeCombo=BI.inherit(BI.Single,{constants:{offset:{top:0,left:0,right:0,bottom:25}},_defaultConfig:function(){return BI.extend(BI.MultiTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,allowEdit:!0})},_init:function(){BI.MultiTreeCombo.superclass._init.apply(this,arguments);var i=this,e=this.options,t=!1,n=!1;this.storeValue={value:e.value||{}},this.trigger=BI.createWidget({type:"bi.multi_select_trigger",allowEdit:e.allowEdit,height:e.height,valueFormatter:e.valueFormatter,text:e.text,watermark:e.watermark,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_tree_searcher",itemsCreator:e.itemsCreator},value:{value:e.value||{}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!e.allowEdit,container:e.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){i.popup=this,i.trigger.setAdapter(this),i.numberCounter.setAdapter(this)},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){i.numberCounter.adjustView(),(t=!0)===n&&l()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){r=!0;var e={type:BI.Selection.Multi,value:this.hasChecked()?this.getValue():{}};i.trigger.getSearcher().setState(e),i.numberCounter.setButtonChecked(e),i.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM,i.combo.getValue())}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){i.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){o=!0,i.setValue(),i._defaultState()}}],itemsCreator:e.itemsCreator,onLoaded:function(){BI.nextTick(function(){i.numberCounter.adjustView(),i.trigger.getSearcher().adjustView()})}},value:{value:e.value||{}},hideChecker:function(e){return 0===u.element.find(e.target).length&&0===i.numberCounter.element.find(e.target).length}});var r=!1,o=!1,a=function(){return i.trigger.getSearcher().isSearching()},s=function(){return i.combo.isViewVisible()};function l(){a()?i.storeValue={value:i.trigger.getValue()}:s()&&(i.storeValue={value:i.combo.getValue()}),i.trigger.setValue(i.storeValue),i.numberCounter.setValue(i.storeValue)}this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS,function(){i.fireEvent(BI.MultiTreeCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR,function(){i.fireEvent(BI.MultiTreeCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){i.storeValue={value:i.combo.getValue()},this.setValue(i.storeValue),i.numberCounter.setValue(i.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){i.storeValue={value:this.getValue()},i.combo.setValue(i.storeValue),i.numberCounter.setValue(i.storeValue),BI.nextTick(function(){s()&&i.combo.populate()}),i.fireEvent(BI.MultiTreeCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(){i.fireEvent(BI.MultiTreeCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){i.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){i.combo.isViewVisible()||i.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var e=this.getSearcher().hasChecked(),t={type:BI.Selection.Multi,value:e?{1:1}:{}};this.getSearcher().setState(e?BI.Selection.Multi:BI.Selection.None),i.numberCounter.setButtonChecked(t),i.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM,i.combo.getValue())}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a()||(!0===r&&(i.storeValue={value:i.combo.getValue()},r=!1),i.combo.setValue(i.storeValue),i.numberCounter.setValue(i.storeValue),i.populate(),i.fireEvent(BI.MultiTreeCombo.EVENT_BEFORE_POPUPVIEW))}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){a()?(i._stopEditing(),i.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)):s()&&(i._stopEditing(),i.storeValue={value:i.combo.getValue()},!0===o&&(i.storeValue={value:{}}),i.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)),r=o=!1});var u=BI.createWidget({type:"bi.trigger_icon_button",width:e.height,height:e.height,cls:"multi-select-trigger-icon-button"});u.on(BI.TriggerIconButton.EVENT_CHANGE,function(){i.numberCounter.hideView(),i.combo.isViewVisible()?i.combo.hideView():i.combo.showView()}),this.numberCounter=BI.createWidget({type:"bi.multi_select_check_selected_switcher",el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane"},masker:{offset:this.constants.offset},itemsCreator:e.itemsCreator,valueFormatter:e.valueFormatter,value:{value:e.value||{}}}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){i.combo.isViewVisible()||i.combo.showView()}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){!1===n&&(n=!0),!0===t&&(n=null,l())}),this.numberCounter.on(BI.Events.VIEW,function(e){BI.nextTick(function(){i.trigger.refreshPlaceHolderWidth(!0===e?i.numberCounter.element.outerWidth()+8:0)})}),this.trigger.element.click(function(e){0<i.trigger.element.find(e.target).length&&i.numberCounter.hideView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:u,right:0,top:0,bottom:0},{el:{type:"bi.vertical_adapt",items:[this.numberCounter]},right:e.height,top:0,height:e.height}]})},_stopEditing:function(){this.trigger.stopEditing(),this.numberCounter.hideView()},_defaultState:function(){this._stopEditing(),this.combo.hideView()},setValue:function(e){this.storeValue.value=e||{},this.combo.setValue({value:e||{}}),this.numberCounter.setValue({value:e||{}})},getValue:function(){return BI.deepClone(this.storeValue.value)},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiTreeCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiTreeCombo.EVENT_STOP="EVENT_STOP",BI.MultiTreeCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiTreeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.MultiTreeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_tree_combo",BI.MultiTreeCombo)},function(e,t){BI.MultiTreeInsertCombo=BI.inherit(BI.Single,{constants:{offset:{top:0,left:0,right:0,bottom:25}},_defaultConfig:function(){return BI.extend(BI.MultiTreeInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-insert-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,allowEdit:!0})},_init:function(){BI.MultiTreeInsertCombo.superclass._init.apply(this,arguments);var i=this,e=this.options,t=!1,n=!1;this.storeValue={value:e.value||{}},this.trigger=BI.createWidget({type:"bi.multi_select_trigger",allowEdit:e.allowEdit,height:e.height,valueFormatter:e.valueFormatter,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_tree_searcher",text:e.text,watermark:e.watermark,itemsCreator:e.itemsCreator,popup:{type:"bi.multi_tree_search_insert_pane",listeners:[{eventName:BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM,action:function(){i.storeValue.value[i.trigger.getSearcher().getKeyword()]={},i._assertShowValue(),i.combo.setValue(i.storeValue),i.numberCounter.setValue(i.storeValue),i._stopEditing()}}]}},value:{value:e.value||{}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!e.allowEdit,container:e.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){i.popup=this,i.trigger.setAdapter(this),i.numberCounter.setAdapter(this)},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){i.numberCounter.adjustView(),(t=!0)===n&&l()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){r=!0;var e={type:BI.Selection.Multi,value:this.hasChecked()?this.getValue():{}};i.trigger.getSearcher().setState(e),i.numberCounter.setButtonChecked(e),i.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM,i.combo.getValue())}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){i.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){o=!0,i.setValue(),i._defaultState()}}],itemsCreator:e.itemsCreator,onLoaded:function(){BI.nextTick(function(){i.numberCounter.adjustView(),i.trigger.getSearcher().adjustView()})}},value:{value:e.value||{}},hideChecker:function(e){return 0===u.element.find(e.target).length&&0===i.numberCounter.element.find(e.target).length}});var r=!1,o=!1,a=function(){return i.trigger.getSearcher().isSearching()},s=function(){return i.combo.isViewVisible()};function l(){a()?i.storeValue={value:i.trigger.getValue()}:s()&&(i.storeValue={value:i.combo.getValue()}),i.trigger.setValue(i.storeValue),i.numberCounter.setValue(i.storeValue)}this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS,function(){i.fireEvent(BI.MultiTreeInsertCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR,function(){i.fireEvent(BI.MultiTreeInsertCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){i.storeValue={value:i.combo.getValue()},this.setValue(i.storeValue),i.numberCounter.setValue(i.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){i.storeValue={value:this.getValue()},i.combo.setValue(i.storeValue),i.numberCounter.setValue(i.storeValue),BI.nextTick(function(){s()&&i.combo.populate()}),i.fireEvent(BI.MultiTreeInsertCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(){i.fireEvent(BI.MultiTreeInsertCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){i.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var e=this.getSearcher().hasChecked(),t={type:BI.Selection.Multi,value:e?{1:1}:{}};this.getSearcher().setState(e?BI.Selection.Multi:BI.Selection.None),i.numberCounter.setButtonChecked(t),i.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM,i.combo.getValue())}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a()||(!0===r&&(i.storeValue={value:i.combo.getValue()},r=!1),i.combo.setValue(i.storeValue),i.numberCounter.setValue(i.storeValue),i.populate(),i.fireEvent(BI.MultiTreeInsertCombo.EVENT_BEFORE_POPUPVIEW))}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){a()?(i._stopEditing(),i.fireEvent(BI.MultiTreeInsertCombo.EVENT_CONFIRM)):s()&&(i._stopEditing(),i.storeValue={value:i.combo.getValue()},!0===o&&(i.storeValue={value:{}}),i.fireEvent(BI.MultiTreeInsertCombo.EVENT_CONFIRM)),r=o=!1});var u=BI.createWidget({type:"bi.trigger_icon_button",width:e.height,height:e.height,cls:"multi-select-trigger-icon-button"});u.on(BI.TriggerIconButton.EVENT_CHANGE,function(){i.numberCounter.hideView(),i.combo.isViewVisible()?i.combo.hideView():i.combo.showView()}),this.numberCounter=BI.createWidget({type:"bi.multi_select_check_selected_switcher",el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane"},itemsCreator:e.itemsCreator,masker:{offset:this.constants.offset},valueFormatter:e.valueFormatter,value:e.value}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){i.combo.isViewVisible()||i.combo.showView()}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){!1===n&&(n=!0),!0===t&&(n=null,l())}),this.numberCounter.on(BI.Events.VIEW,function(e){BI.nextTick(function(){i.trigger.refreshPlaceHolderWidth(!0===e?i.numberCounter.element.outerWidth()+8:0)})}),this.trigger.element.click(function(e){0<i.trigger.element.find(e.target).length&&i.numberCounter.hideView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:u,right:0,top:0,bottom:0},{el:{type:"bi.vertical_adapt",items:[this.numberCounter]},right:e.height,top:0,height:e.height}]})},_assertShowValue:function(){this.trigger.getSearcher().setState(this.storeValue),this.numberCounter.setButtonChecked(this.storeValue)},_stopEditing:function(){this.trigger.stopEditing(),this.numberCounter.hideView()},_defaultState:function(){this._stopEditing(),this.combo.hideView()},setValue:function(e){this.storeValue.value=e||{},this.combo.setValue({value:e||{}}),this.numberCounter.setValue({value:e||{}})},getValue:function(){return BI.deepClone(this.storeValue.value)},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeInsertCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiTreeInsertCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiTreeInsertCombo.EVENT_STOP="EVENT_STOP",BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiTreeInsertCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.MultiTreeInsertCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_tree_insert_combo",BI.MultiTreeInsertCombo)},function(e,t){BI.MultiTreeListCombo=BI.inherit(BI.Single,{constants:{offset:{top:0,left:0,right:0,bottom:25}},_defaultConfig:function(){return BI.extend(BI.MultiTreeListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-list-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,allowEdit:!0,allowInsertValue:!0})},_init:function(){BI.MultiTreeListCombo.superclass._init.apply(this,arguments);var i=this,e=this.options,t=!1,n=!1;this.storeValue={value:e.value||[]},this.trigger=BI.createWidget({type:"bi.multi_select_trigger",allowEdit:e.allowEdit,text:e.text,watermark:e.watermark,height:e.height,valueFormatter:e.valueFormatter,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_list_tree_searcher",itemsCreator:e.itemsCreator,popup:{type:e.allowInsertValue?"bi.multi_tree_search_insert_pane":"bi.multi_tree_search_pane",el:{type:"bi.list_part_tree"},listeners:[{eventName:BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM,action:function(){i.storeValue.value.unshift([i.trigger.getSearcher().getKeyword()]),i._assertShowValue(),i.combo.setValue(i.storeValue),i.numberCounter.setValue(i.storeValue),i._stopEditing()}}]}},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",el:{type:"bi.list_display_tree"},itemsCreator:e.itemsCreator}},value:{value:e.value||{}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!e.allowEdit,container:e.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){i.popup=this,i.trigger.setAdapter(this),i.numberCounter.setAdapter(this)},el:{type:"bi.list_async_tree"},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){i.numberCounter.adjustView(),(t=!0)===n&&l()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){r=!0;var e={type:BI.Selection.Multi,value:this.hasChecked()?this.getValue():[]};i.trigger.getSearcher().setState(e),i.numberCounter.setButtonChecked(e),i.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM,i.combo.getValue())}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){i.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){o=!0,i.setValue(),i._defaultState()}}],itemsCreator:e.itemsCreator,onLoaded:function(){BI.nextTick(function(){i.numberCounter.adjustView(),i.trigger.getSearcher().adjustView()})}},value:{value:e.value||{}},hideChecker:function(e){return 0===u.element.find(e.target).length&&0===i.numberCounter.element.find(e.target).length}});var r=!1,o=!1,a=function(){return i.trigger.getSearcher().isSearching()},s=function(){return i.combo.isViewVisible()};function l(){a()?i.storeValue={value:i.trigger.getValue()}:s()&&(i.storeValue={value:i.combo.getValue()}),i.trigger.setValue(i.storeValue),i.numberCounter.setValue(i.storeValue)}this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS,function(){i.fireEvent(BI.MultiTreeListCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR,function(){i.fireEvent(BI.MultiTreeListCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){i.storeValue={value:i.combo.getValue()},this.setValue(i.storeValue),i.numberCounter.setValue(i.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){i.storeValue={value:this.getValue()},i.combo.setValue(i.storeValue),i.numberCounter.setValue(i.storeValue),BI.nextTick(function(){s()&&i.combo.populate()}),i.fireEvent(BI.MultiTreeListCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(){i.fireEvent(BI.MultiTreeListCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){i.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var e=this.getSearcher().hasChecked(),t={type:BI.Selection.Multi,value:e?{1:1}:{}};this.getSearcher().setState(e?BI.Selection.Multi:BI.Selection.None),i.numberCounter.setButtonChecked(t),i.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM,i.combo.getValue())}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a()||(!0===r&&(i.storeValue={value:i.combo.getValue()},r=!1),i.combo.setValue(i.storeValue),i.numberCounter.setValue(i.storeValue),i.populate(),i.fireEvent(BI.MultiTreeListCombo.EVENT_BEFORE_POPUPVIEW))}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){a()?(i.trigger.stopEditing(),i.fireEvent(BI.MultiTreeListCombo.EVENT_CONFIRM)):s()&&(i._stopEditing(),i.storeValue={value:i.combo.getValue()},!0===o&&(i.storeValue={value:[]}),i.fireEvent(BI.MultiTreeListCombo.EVENT_CONFIRM)),r=o=!1});var u=BI.createWidget({type:"bi.trigger_icon_button",width:e.height,height:e.height,cls:"multi-select-trigger-icon-button"});u.on(BI.TriggerIconButton.EVENT_CHANGE,function(){i.numberCounter.hideView(),i.combo.isViewVisible()?i.combo.hideView():i.combo.showView()}),this.numberCounter=BI.createWidget({type:"bi.multi_select_check_selected_switcher",el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane"},itemsCreator:e.itemsCreator,masker:{offset:{left:0,top:0,right:0,bottom:25}},valueFormatter:e.valueFormatter,value:e.value}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){i.combo.isViewVisible()||i.combo.showView()}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){!1===n&&(n=!0),!0===t&&(n=null,l())}),this.numberCounter.on(BI.Events.VIEW,function(e){BI.nextTick(function(){i.trigger.refreshPlaceHolderWidth(!0===e?i.numberCounter.element.outerWidth()+8:0)})}),this.trigger.element.click(function(e){0<i.trigger.element.find(e.target).length&&i.numberCounter.hideView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:u,right:0,top:0,bottom:0},{el:{type:"bi.vertical_adapt",items:[this.numberCounter]},right:e.height,top:0,height:e.height}]})},_assertShowValue:function(){this.trigger.getSearcher().setState(this.storeValue),this.numberCounter.setButtonChecked(this.storeValue)},_stopEditing:function(){this.trigger.stopEditing(),this.numberCounter.hideView()},_defaultState:function(){this._stopEditing(),this.combo.hideView()},setValue:function(e){this.storeValue.value=e||[],this.combo.setValue({value:e||[]}),this.numberCounter.setValue({value:e||[]})},getValue:function(){return BI.deepClone(this.storeValue.value)},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeListCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiTreeListCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiTreeListCombo.EVENT_STOP="EVENT_STOP",BI.MultiTreeListCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiTreeListCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeListCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.MultiTreeListCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_tree_list_combo",BI.MultiTreeListCombo)},function(e,t){BI.MultiTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-popup",maxWidth:"auto",minWidth:140,maxHeight:400,onLoaded:BI.emptyFn,el:{type:"bi.async_tree"}})},_init:function(){BI.MultiTreePopup.superclass._init.apply(this,arguments);var t=this,e=this.options,i=e.value;this.selectedValues={},this.tree=BI.createWidget(e.el,{type:"bi.async_tree",height:400,cls:"popup-view-tree",itemsCreator:e.itemsCreator,onLoaded:e.onLoaded,value:i.value||{}}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",element:this,stopPropagation:!1,maxWidth:e.maxWidth,minWidth:e.minWidth,maxHeight:e.maxHeight,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.tree}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(e){switch(e){case 0:t.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CLEAR);break;case 1:t.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CONFIRM)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){t.fireEvent(BI.MultiTreePopup.EVENT_CHANGE)}),this.tree.on(BI.TreeView.EVENT_AFTERINIT,function(){t.fireEvent(BI.MultiTreePopup.EVENT_AFTERINIT)})},getValue:function(){return this.tree.getValue()},setValue:function(e){e=e||{},this.tree.setSelectedValue(e.value)},populate:function(e){this.tree.stroke(e)},hasChecked:function(){return this.tree.hasChecked()},resetHeight:function(e){this.popupView.resetHeight(e)},resetWidth:function(e){this.popupView.resetWidth(e)}}),BI.MultiTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreePopup.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreePopup.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreePopup.EVENT_AFTERINIT="EVENT_AFTERINIT",BI.shortcut("bi.multi_tree_popup_view",BI.MultiTreePopup)},function(e,t){BI.MultiTreeCheckSelectedButton=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-selected-button",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiTreeCheckSelectedButton.superclass._init.apply(this,arguments);var e=this;this.indicator=BI.createWidget({type:"bi.icon_button",cls:"check-font trigger-check-selected icon-size-12",width:15,height:15,stopPropagation:!0}),this.checkSelected=BI.createWidget({type:"bi.text_button",cls:"trigger-check-selected",invisible:!0,hgap:4,text:BI.i18nText("BI-Check_Selected"),textAlign:"center",textHeight:15}),this.checkSelected.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.checkSelected.on(BI.TextButton.EVENT_CHANGE,function(){e.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.horizontal",element:this,items:[this.indicator,this.checkSelected]}),this.element.hover(function(){e.indicator.setVisible(!1),e.checkSelected.setVisible(!0)},function(){e.indicator.setVisible(!0),e.checkSelected.setVisible(!1)}),this.setVisible(!1)},setValue:function(e){e=e||{};var t=0<BI.size(e.value);this.setVisible(t)}}),BI.MultiTreeCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_tree_check_selected_button",BI.MultiTreeCheckSelectedButton)},function(e,t){BI.MultiTreeSearchInsertPane=BI.inherit(BI.Widget,{constants:{height:24},props:{baseCls:"bi-multi-tree-search-insert-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,el:{type:"bi.part_tree"}},render:function(){var i=this,n=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.text_button",invisible:!0,ref:function(e){i.addTip=e},text:BI.i18nText("BI-Basic_Click_To_Add_Text",""),height:this.constants.height,cls:"bi-high-light",handler:function(){i.fireEvent(BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM,n.keywordGetter())}},top:5,left:0,right:0},{el:BI.extend({type:"bi.part_tree",tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(e,t){e.keyword=n.keywordGetter(),n.itemsCreator(e,function(e){t(e),i.setKeyword(n.keywordGetter(),e.items)})},ref:function(e){i.partTree=e},value:n.value,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(){i.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}},{eventName:BI.TreeView.EVENT_CHANGE,action:function(){i.fireEvent(BI.MultiTreeSearchInsertPane.EVENT_CHANGE)}}]},n.el),left:0,top:0,bottom:0,right:0}]}},setKeyword:function(e,t){var i=BI.isEmptyArray(t);this.addTip.setVisible(i),this.partTree.setVisible(!i),i&&this.addTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",e))},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(e){this.setSelectedValue(e.value)},setSelectedValue:function(e){e=e||{},this.partTree.setSelectedValue(e)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(e){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchInsertPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchInsertPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchInsertPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.multi_tree_search_insert_pane",BI.MultiTreeSearchInsertPane)},function(e,t){BI.MultiTreeSearchPane=BI.inherit(BI.Pane,{props:{baseCls:"bi-multi-tree-search-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn},render:function(){var t=this,i=this.options;return BI.extend({type:"bi.part_tree",element:this,tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(e,t){e.keyword=i.keywordGetter(),i.itemsCreator(e,t)},value:i.value,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(){t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}},{eventName:BI.TreeView.EVENT_CHANGE,action:function(){t.fireEvent(BI.MultiTreeSearchPane.EVENT_CHANGE)}}],ref:function(e){t.partTree=e}},i.el)},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(e){this.setSelectedValue(e.value)},setSelectedValue:function(e){e=e||{},this.partTree.setSelectedValue(e)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(e){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_tree_search_pane",BI.MultiTreeSearchPane)},function(e,t){BI.MultiListTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiListTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,valueFormatter:function(e){return e},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiListTreeSearcher.superclass._init.apply(this,arguments);var i=this,n=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:n.height,text:n.text,watermark:n.watermark,el:{type:"bi.simple_state_editor",height:n.height}}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(e,t){t({keyword:i.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return i.editor.getValue()},itemsCreator:function(e,t){e.keyword=i.editor.getValue(),n.itemsCreator(e,t)},value:n.value},n.popup),adapter:n.adapter,masker:n.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){i.fireEvent(BI.MultiListTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),i.fireEvent(BI.MultiListTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){i.fireEvent(BI.MultiListTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){i.fireEvent(BI.MultiListTreeSearcher.EVENT_CHANGE,arguments)}),BI.isNotNull(n.value)&&this.setState(n.value)},adjustView:function(){this.searcher.adjustView()},setAdapter:function(e){this.searcher.setAdapter(e)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(e){var n=this.options;(e=e||{}).value||(e.value=[]);var r=0;if(BI.isNumber(e))this.editor.setState(e);else if(0===BI.size(e.value))this.editor.setState(BI.Selection.None);else{var o="";BI.each(e.value,function(e,t){var i=BI.last(t);o+=(n.valueFormatter(i+"")||i)+"; ",r++}),20<r?this.editor.setState(BI.Selection.Multi):this.editor.setState(o)}},getState:function(){return this.editor.getState()},setValue:function(e){this.setState(e),this.searcher.setValue(e)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(e){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiListTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiListTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiListTreeSearcher.EVENT_START="EVENT_START",BI.MultiListTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiListTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_list_tree_searcher",BI.MultiListTreeSearcher)},function(e,t){BI.MultiTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,valueFormatter:function(e){return e},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiTreeSearcher.superclass._init.apply(this,arguments);var i=this,n=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",watermark:n.watermark,height:n.height,el:{type:"bi.simple_state_editor",text:n.text,height:n.height},listeners:[{eventName:BI.MultiSelectEditor.EVENT_FOCUS,action:function(){i.fireEvent(BI.MultiSelectSearcher.EVENT_FOCUS)}},{eventName:BI.MultiSelectEditor.EVENT_BLUR,action:function(){i.fireEvent(BI.MultiSelectSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(e,t){t({keyword:i.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return i.editor.getValue()},itemsCreator:function(e,t){e.keyword=i.editor.getValue(),n.itemsCreator(e,t)},value:n.value},n.popup),adapter:n.adapter,masker:n.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){i.fireEvent(BI.MultiTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){i.fireEvent(BI.MultiTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){i.fireEvent(BI.MultiTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){i.fireEvent(BI.MultiTreeSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var e=this.getKeywords();i.fireEvent(BI.MultiTreeSearcher.EVENT_SEARCHING,e)}),BI.isNotNull(n.value)&&this.setState(n.value)},adjustView:function(){this.searcher.adjustView()},setAdapter:function(e){this.searcher.setAdapter(e)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(e){var s=this.options;(e=e||{}).value||(e.value={});var l=0;if(BI.isNumber(e))this.editor.setState(e);else if(0===BI.size(e.value))this.editor.setState(BI.Selection.None);else{var n="";BI.each(e.value,function(e,t){var i=function a(e){var n="";var r=0,o=BI.size(e);BI.each(e,function(e,t){r++;var i=a(t);n+=(s.valueFormatter(e+"")||e)+(""===i?"":":"+i)+(r===o?"":","),""===i&&l++});return n}(t);n+=(s.valueFormatter(e+"")||e)+(""===i?"":":"+i)+"; ",""===i&&l++}),20<l?this.editor.setState(BI.Selection.Multi):this.editor.setState(n)}},getState:function(){return this.editor.getState()},setValue:function(e){this.setState(e),this.searcher.setValue(e)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(e){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiTreeSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearcher.EVENT_START="EVENT_START",BI.MultiTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_tree_searcher",BI.MultiTreeSearcher)},function(e,t){BI.NumberEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-number-editor bi-border bi-focus-shadow",validationChecker:function(){return!0},valueFormatter:function(e){return e},value:0,allowBlank:!1,errorText:"",step:1})},_init:function(){BI.NumberEditor.superclass._init.apply(this,arguments);var e=this,t=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",height:t.height-2,allowBlank:t.allowBlank,value:t.valueFormatter(t.value),validationChecker:t.validationChecker,errorText:t.errorText}),this.editor.on(BI.TextEditor.EVENT_CHANGE,function(){e.fireEvent(BI.NumberEditor.EVENT_CHANGE)}),this.editor.on(BI.TextEditor.EVENT_ERROR,function(){t.value=BI.parseFloat(this.getLastValidValue())}),this.editor.on(BI.TextEditor.EVENT_VALID,function(){t.value=BI.parseFloat(this.getValue())}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){e.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",forceNotSelected:!0,trigger:"lclick,",cls:"add-up-font top-button bi-border-left bi-list-item-active2 icon-size-12"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){e._finetuning(t.step),e.fireEvent(BI.NumberEditor.EVENT_CHANGE),e.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",forceNotSelected:!0,cls:"minus-down-font bottom-button bi-border-left bi-list-item-active2 icon-size-12"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){e._finetuning(-t.step),e.fireEvent(BI.NumberEditor.EVENT_CHANGE),e.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),BI.createWidget({type:"bi.htape",height:t.height-2,element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:23}]})},focus:function(){this.editor.focus()},isEditing:function(){return this.editor.isEditing()},_finetuning:function(e){var t=BI.parseFloat(this.getValue());this.setValue(BI.add(t,e))},setUpEnable:function(e){this.topBtn.setEnable(!!e)},setDownEnable:function(e){this.bottomBtn.setEnable(!!e)},getLastValidValue:function(){return this.editor.getLastValidValue()},getLastChangedValue:function(){return this.editor.getLastChangedValue()},getValue:function(){return this.options.value},setValue:function(e){var t=this.options;t.value=e,this.editor.setValue(t.valueFormatter(e))}}),BI.NumberEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberEditor.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.number_editor",BI.NumberEditor)},function(e,t){BI.NumberInterval=BI.inherit(BI.Single,{constants:{typeError:"typeBubble",numberError:"numberBubble",signalError:"signalBubble",editorWidth:114,columns:5,width:24,rows:1,numberErrorCls:"number-error",border:1,less:0,less_equal:1,numTip:"",adjustYOffset:2},_defaultConfig:function(){var e=BI.NumberInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{extraCls:"bi-number-interval"+(BI.isIE()&&BI.getIEVersion()<10?" hack":""),height:24,validation:"valid",closeMin:!0,allowBlank:!0,watermark:BI.i18nText("BI-Basic_Unrestricted")})},_init:function(){var t=this,i=this.constants,e=this.options;BI.NumberInterval.superclass._init.apply(this,arguments),this.smallEditor=BI.createWidget({type:"bi.number_interval_single_editor",height:e.height-2,watermark:e.watermark,allowBlank:e.allowBlank,value:e.min,level:"warning",tipType:"success",title:function(){return t.smallEditor&&t.smallEditor.getValue()},quitChecker:function(){return!1},validationChecker:function(e){return!!BI.isNumeric(e)||(t.smallEditorBubbleType=i.typeError,!1)},cls:"number-interval-small-editor bi-border"}),this.smallTip=BI.createWidget({type:"bi.label",text:e.numTip,height:e.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.smallEditor.element,items:[{el:this.smallTip,top:0,right:5}]}),this.bigEditor=BI.createWidget({type:"bi.number_interval_single_editor",height:e.height-2,watermark:e.watermark,allowBlank:e.allowBlank,value:e.max,title:function(){return t.bigEditor&&t.bigEditor.getValue()},quitChecker:function(){return!1},validationChecker:function(e){return!!BI.isNumeric(e)||(t.bigEditorBubbleType=i.typeError,!1)},cls:"number-interval-big-editor bi-border"}),this.bigTip=BI.createWidget({type:"bi.label",text:e.numTip,height:e.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.bigEditor.element,items:[{el:this.bigTip,top:0,right:5}]}),this.smallCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-small-combo bi-border-top bi-border-bottom bi-border-right",height:e.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),!0===e.closeMin?this.smallCombo.setValue(1):this.smallCombo.setValue(0),this.bigCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-big-combo bi-border-top bi-border-bottom bi-border-left",height:e.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),!0===e.closeMax?this.bigCombo.setValue(1):this.bigCombo.setValue(0),this.label=BI.createWidget({type:"bi.label",text:BI.i18nText("BI-Basic_Value"),textHeight:e.height-2*i.border,width:i.width-2*i.border,height:e.height-2*i.border,level:"warning",tipType:"warning"}),this.left=BI.createWidget({type:"bi.htape",items:[{el:t.smallEditor},{el:t.smallCombo,width:i.width-i.border}]}),this.right=BI.createWidget({type:"bi.htape",items:[{el:t.bigCombo,width:i.width-i.border},{el:t.bigEditor,lgap:1}]}),BI.createWidget({element:t,type:"bi.center",hgap:15,height:e.height,items:[{type:"bi.absolute",items:[{el:t.left,left:-15,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:t.right,left:0,right:-15,top:0,bottom:0}]}]}),BI.createWidget({element:t,type:"bi.horizontal_auto",items:[t.label]}),t._setValidEvent(t.bigEditor,i.bigEditor),t._setValidEvent(t.smallEditor,i.smallEditor),t._setErrorEvent(t.bigEditor,i.bigEditor),t._setErrorEvent(t.smallEditor,i.smallEditor),t._setBlurEvent(t.bigEditor),t._setBlurEvent(t.smallEditor),t._setFocusEvent(t.bigEditor),t._setFocusEvent(t.smallEditor),t._setComboValueChangedEvent(t.bigCombo),t._setComboValueChangedEvent(t.smallCombo),t._setEditorValueChangedEvent(t.bigEditor),t._setEditorValueChangedEvent(t.smallEditor),t._checkValidation()},_checkValidation:function(){var e=this,t=this.constants,i=this.options;if(e._setTitle(""),BI.Bubbles.hide(t.typeError),BI.Bubbles.hide(t.numberError),BI.Bubbles.hide(t.signalError),!e.smallEditor.isValid()||!e.bigEditor.isValid())return e.element.removeClass("number-error"),i.validation="invalid",t.typeError;if(BI.isEmptyString(e.smallEditor.getValue())||BI.isEmptyString(e.bigEditor.getValue()))return e.element.removeClass("number-error"),i.validation="valid","";var n=parseFloat(e.smallEditor.getValue()),r=parseFloat(e.bigEditor.getValue()),o=e.bigCombo.getValue(),a=e.smallCombo.getValue();return o[0]===t.less_equal&&a[0]===t.less_equal?r<n?(e.element.addClass("number-error"),i.validation="invalid",t.numberError):(e.element.removeClass("number-error"),i.validation="valid",""):r<n?(e.element.addClass("number-error"),i.validation="invalid",t.numberError):n===r?(e.element.addClass("number-error"),i.validation="invalid",t.signalError):(e.element.removeClass("number-error"),i.validation="valid","")},_setTitle:function(e){this.label.setTitle(e)},_setFocusEvent:function(e){var t=this,i=this.constants;e.on(BI.NumberIntervalSingleEidtor.EVENT_FOCUS,function(){switch(t._setTitle(""),t._checkValidation()){case i.typeError:BI.Bubbles.show(i.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),t,{offsetStyle:"left",adjustYOffset:i.adjustYOffset});break;case i.numberError:BI.Bubbles.show(i.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),t,{offsetStyle:"left",adjustYOffset:i.adjustYOffset});break;case i.signalError:BI.Bubbles.show(i.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),t,{offsetStyle:"left",adjustYOffset:i.adjustYOffset});break;default:return}})},_setBlurEvent:function(e){var t=this.constants,i=this;e.on(BI.NumberIntervalSingleEidtor.EVENT_BLUR,function(){switch(BI.Bubbles.hide(t.typeError),BI.Bubbles.hide(t.numberError),BI.Bubbles.hide(t.signalError),i._checkValidation()){case t.typeError:i._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));break;case t.numberError:i._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));break;case t.signalError:i._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));break;default:i._setTitle("")}})},_setErrorEvent:function(e){var t=this.constants,i=this;e.on(BI.NumberIntervalSingleEidtor.EVENT_ERROR,function(){i._checkValidation(),BI.Bubbles.show(t.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),i,{offsetStyle:"left",adjustYOffset:t.adjustYOffset}),i.fireEvent(BI.NumberInterval.EVENT_ERROR)})},_setValidEvent:function(e){var t=this,i=this.constants;e.on(BI.NumberIntervalSingleEidtor.EVENT_VALID,function(){switch(t._checkValidation()){case i.numberError:BI.Bubbles.show(i.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),t,{offsetStyle:"left",adjustYOffset:i.adjustYOffset}),t.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case i.signalError:BI.Bubbles.show(i.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),t,{offsetStyle:"left",adjustYOffset:i.adjustYOffset}),t.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:t.fireEvent(BI.NumberInterval.EVENT_VALID)}})},_setEditorValueChangedEvent:function(e){var t=this,i=this.constants;e.on(BI.NumberIntervalSingleEidtor.EVENT_CHANGE,function(){switch(t._checkValidation()){case i.typeError:BI.Bubbles.show(i.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),t,{offsetStyle:"left",adjustYOffset:i.adjustYOffset});break;case i.numberError:BI.Bubbles.show(i.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),t,{offsetStyle:"left",adjustYOffset:i.adjustYOffset});break;case i.signalError:BI.Bubbles.show(i.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),t,{offsetStyle:"left",adjustYOffset:i.adjustYOffset})}t.fireEvent(BI.NumberInterval.EVENT_CHANGE)}),e.on(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM,function(){t.fireEvent(BI.NumberInterval.EVENT_CONFIRM)})},_setComboValueChangedEvent:function(e){var t=this,i=this.constants;e.on(BI.IconCombo.EVENT_CHANGE,function(){switch(t._checkValidation()){case i.typeError:t._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data")),t.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case i.numberError:t._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value")),t.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case i.signalError:t._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value")),t.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:t.fireEvent(BI.NumberInterval.EVENT_CHANGE),t.fireEvent(BI.NumberInterval.EVENT_CONFIRM),t.fireEvent(BI.NumberInterval.EVENT_VALID)}})},isStateValid:function(){return"valid"===this.options.validation},setMinEnable:function(e){this.smallEditor.setEnable(e)},setCloseMinEnable:function(e){this.smallCombo.setEnable(e)},setMaxEnable:function(e){this.bigEditor.setEnable(e)},setCloseMaxEnable:function(e){this.bigCombo.setEnable(e)},showNumTip:function(){this.smallTip.setVisible(!0),this.bigTip.setVisible(!0)},hideNumTip:function(){this.smallTip.setVisible(!1),this.bigTip.setVisible(!1)},setNumTip:function(e){this.smallTip.setText(e),this.bigTip.setText(e)},getNumTip:function(){return this.smallTip.getText()},setValue:function(e){e=e||{};var t;(BI.isNumeric(e.min)||BI.isEmptyString(e.min))&&this.smallEditor.setValue(e.min),BI.isNotNull(e.min)||this.smallEditor.setValue(""),(BI.isNumeric(e.max)||BI.isEmptyString(e.max))&&this.bigEditor.setValue(e.max),BI.isNotNull(e.max)||this.bigEditor.setValue(""),BI.isNull(e.closeMin)||(t=!0===e.closeMin?1:0,this.smallCombo.setValue(t)),BI.isNull(e.closeMax)||(t=!0===e.closeMax?1:0,this.bigCombo.setValue(t)),this._checkValidation()},getValue:function(){var e={},t=this.smallCombo.getValue(),i=this.bigCombo.getValue();return e.min=this.smallEditor.getValue(),e.max=this.bigEditor.getValue(),0===t[0]?e.closeMin=!1:e.closeMin=!0,0===i[0]?e.closeMax=!1:e.closeMax=!0,e},destroyed:function(){var e=this.constants;BI.Bubbles.remove(e.typeError),BI.Bubbles.remove(e.numberError),BI.Bubbles.remove(e.signalError)}}),BI.NumberInterval.EVENT_CHANGE="EVENT_CHANGE",BI.NumberInterval.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberInterval.EVENT_VALID="EVENT_VALID",BI.NumberInterval.EVENT_ERROR="EVENT_ERROR",BI.shortcut("bi.number_interval",BI.NumberInterval)},function(e,t){BI.NumberIntervalSingleEidtor=BI.inherit(BI.Single,{props:{baseCls:"bi-number-interval-single-editor",tipType:"success",title:""},render:function(){var t=this,e=this.options;return{type:"bi.vertical",items:[{type:"bi.editor",ref:function(e){t.editor=e},height:e.height-2,watermark:e.watermark,allowBlank:e.allowBlank,value:e.value,quitChecker:e.quitChecker,validationChecker:e.validationChecker,listeners:[{eventName:BI.Editor.EVENT_ERROR,action:function(){t.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_ERROR,arguments)}},{eventName:BI.Editor.EVENT_FOCUS,action:function(){t.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_FOCUS,arguments)}},{eventName:BI.Editor.EVENT_BLUR,action:function(){t.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_BLUR,arguments)}},{eventName:BI.Editor.EVENT_VALID,action:function(){t.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_VALID,arguments)}},{eventName:BI.Editor.EVENT_CHANGE,action:function(){t.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE,arguments)}},{eventName:BI.Editor.EVENT_CONFIRM,action:function(){t.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM,arguments)}},{eventName:BI.Editor.EVENT_CHANGE_CONFIRM,action:function(){t.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM,arguments)}}]}]}},isValid:function(){return this.editor.isValid()},getValue:function(){return this.editor.getValue()},setValue:function(e){return this.editor.setValue(e)}}),BI.NumberIntervalSingleEidtor.EVENT_FOCUS="EVENT_FOCUS",BI.NumberIntervalSingleEidtor.EVENT_BLUR="EVENT_BLUR",BI.NumberIntervalSingleEidtor.EVENT_ERROR="EVENT_ERROR",BI.NumberIntervalSingleEidtor.EVENT_VALID="EVENT_VALID",BI.NumberIntervalSingleEidtor.EVENT_CHANGE="EVENT_CHANGE",BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.NumberIntervalSingleEidtor.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.number_interval_single_editor",BI.NumberIntervalSingleEidtor)},function(e,t){BI.SearchMultiTextValueCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SearchMultiTextValueCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-combo bi-search-multi-text-value-combo",height:24,items:[]})},_init:function(){BI.SearchMultiTextValueCombo.superclass._init.apply(this,arguments);function i(){BI.isKey(n._startValue)&&(n.storeValue.type===BI.Selection.All?BI.remove(n.storeValue.value,n._startValue):BI.pushDistinct(n.storeValue.value,n._startValue)),n._updateAllValue(),n._checkError(),n.trigger.getSearcher().setState(n.storeValue),n.trigger.getCounter().setButtonChecked(n.storeValue)}var n=this,e=this.options;this.storeValue=BI.deepClone(e.value||{}),this._updateAllValue(),this._assertValue(this.storeValue),this._checkError(),this.requesting=!1,this.trigger=BI.createWidget({type:"bi.search_multi_select_trigger",text:e.text,height:e.height,masker:{offset:{left:0,top:0,right:0,bottom:25}},allValueGetter:function(){return n.allValue},valueFormatter:e.valueFormatter,itemsCreator:function(t,i){n._itemsCreator(t,function(e){1===t.times&&BI.isNotNull(t.keywords)&&n.trigger.setValue(BI.deepClone(n.getValue())),i.apply(n,arguments)})},value:this.storeValue,warningTitle:e.warningTitle}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){n._setStartValue(""),this.getSearcher().setValue(n.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){n._setStartValue("")}),this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var e=this.getSearcher().getKeyword();n._join({type:BI.Selection.Multi,value:[e]},function(){n.combo.setValue(n.storeValue),n._setStartValue(e),i(),n._populate(),n._setStartValue("")})}}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(e){var t=BI.last(e);0<(e=BI.initial(e||[])).length&&n._joinKeywords(e,function(){BI.isEndWithBlank(t)?(n.combo.setValue(n.storeValue),i(),n.combo.populate(),n._setStartValue("")):(n.combo.setValue(n.storeValue),i())})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(e,t){t instanceof BI.MultiSelectBar?n._joinAll(this.getValue(),function(){i()}):n._join(this.getValue(),function(){i()})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){this.getCounter().setValue(n.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){n.combo.isViewVisible()||n.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,container:e.container,el:this.trigger,adjustLength:1,popup:{type:"bi.search_multi_select_popup_view",ref:function(){n.popup=this,n.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiSelectPopupView.EVENT_CHANGE,action:function(){n.storeValue=this.getValue(),n._adjust(function(){i()})}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){n._defaultState()}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,action:function(){n.setValue(),n._defaultState()}}],itemsCreator:BI.bind(n._itemsCreator,this),valueFormatter:e.valueFormatter,onLoaded:function(){BI.nextTick(function(){n.combo.adjustWidth(),n.combo.adjustHeight(),n.trigger.getCounter().adjustView(),n.trigger.getSearcher().adjustView()})}},value:e.value,hideChecker:function(e){return 0===t.element.find(e.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(n.storeValue),BI.nextTick(function(){n._populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){n.trigger.stopEditing(),!0===n.requesting?n.wants2Quit=!0:(i(),n.fireEvent(BI.SearchMultiTextValueCombo.EVENT_CONFIRM))});var t=BI.createWidget({type:"bi.trigger_icon_button",width:e.height,height:e.height,cls:"multi-select-trigger-icon-button"});t.on(BI.TriggerIconButton.EVENT_CHANGE,function(){n.trigger.getCounter().hideView(),n.combo.isViewVisible()?n.combo.hideView():n.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:t,right:0,top:0,bottom:0}]}),this._checkError()},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(e){var i=this.options;(e=e||{}).type||(e.type=BI.Selection.Multi),e.value||(e.value=[]),BI.remove(e.value,function(e,t){return!BI.contains(BI.map(i.items,"value"),t)})},_makeMap:function(e){return BI.makeObject(e||[])},_joinKeywords:function(n,r){var o=this;this.options;this._assertValue(this.storeValue),this.requesting=!0,this._itemsCreator({type:BI.SearchMultiTextValueCombo.REQ_GET_ALL_DATA,keywords:n},function(e){!function t(e){var i=o._makeMap(e);BI.each(n,function(e,t){BI.isNotNull(i[t])&&(o.storeValue.type===BI.Selection.Multi?BI.pushDistinct(o.storeValue.value,t):BI.remove(o.storeValue.value,t))}),o._adjust(r)}(BI.map(e.items,"value"))})},_joinAll:function(t,l){var u=this;this.options;this._assertValue(t),this.requesting=!0,this._itemsCreator({type:BI.SearchMultiTextValueCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(e){var i=BI.map(e.items,"value");if(u.storeValue.type===t.type){var n=!1,r=u._makeMap(u.storeValue.value);return BI.each(i,function(e,t){BI.isNotNull(r[t])&&(n=!0,u.storeValue.assist&&u.storeValue.assist.push(r[t]),delete r[t])}),n&&(u.storeValue.value=BI.values(r)),void u._adjust(l)}var o=u._makeMap(u.storeValue.value),a=u._makeMap(t.value),s=[];BI.each(i,function(e,t){BI.isNotNull(o[i[e]])&&(u.storeValue.assist&&u.storeValue.assist.push(o[i[e]]),delete o[i[e]]),BI.isNull(a[i[e]])&&(BI.remove(u.storeValue.assist,t),s.push(t))}),u.storeValue.value=s.concat(BI.values(o)),u._adjust(l)})},_adjust:function(t){var i=this;this.options;function n(){i.storeValue.type===BI.Selection.All&&i.storeValue.value.length>=i._count?i.storeValue={type:BI.Selection.Multi,value:[]}:i.storeValue.type===BI.Selection.Multi&&i.storeValue.value.length>=i._count&&(i.storeValue={type:BI.Selection.All,value:[]}),i._updateAllValue(),i._checkError(),!0===i.wants2Quit&&(i.fireEvent(BI.SearchMultiTextValueCombo.EVENT_CONFIRM),i.wants2Quit=!1),i.requesting=!1}this._count?(n(),t()):this._itemsCreator({type:BI.SearchMultiTextValueCombo.REQ_GET_DATA_LENGTH},function(e){i._count=e.count,n(),t()})},_join:function(e,t){var i=this;this.options;if(this._assertValue(e),this._assertValue(this.storeValue),this.storeValue.type===e.type){var n=this._makeMap(this.storeValue.value);BI.each(e.value,function(e,t){n[t]||(i.storeValue.value.push(t),BI.remove(i.storeValue.assist,t),n[t]=t)});var r=!1;return BI.each(e.assist,function(e,t){BI.isNotNull(n[t])&&(r=!0,i.storeValue.assist&&i.storeValue.assist.push(n[t]),delete n[t])}),r&&(this.storeValue.value=BI.values(n)),void i._adjust(t)}this._joinAll(e,t)},_setStartValue:function(e){this._startValue=e,this.popup.setStartValue(e)},_getItemsByTimes:function(e,t){for(var i=[],n=100*(t-1);e[n]&&n<100*t;n++)i.push(e[n]);return i},_hasNextByTimes:function(e,t){return 100*t<e.length},_itemsCreator:function(e,t){var n=this.options.items,i=(e.keywords||[]).slice();if(e.keyword&&i.push(e.keyword),BI.each(i,function(e,t){var i=BI.Func.getSearchResult(n,t);n=i.match.concat(i.find)}),e.selectedValues){var r=BI.makeObject(e.selectedValues,!0);n=BI.filter(n,function(e,t){return!r[t.value]})}e.type!=BI.MultiSelectCombo.REQ_GET_ALL_DATA?e.type!=BI.MultiSelectCombo.REQ_GET_DATA_LENGTH?t({items:this._getItemsByTimes(n,e.times),hasNext:this._hasNextByTimes(n,e.times)}):t({count:n.length}):t({items:n})},_checkError:function(){var i=this.storeValue.value||[];if(BI.isNotEmptyArray(i)){i=BI.isArray(i)?i:[i];var e=BI.find(this.allValue,function(e,t){return!BI.contains(i,t)});BI.isNull(e)?(BI.isNotNull(this.trigger)&&this.trigger.setTipType("success"),this.element.removeClass("combo-error")):(BI.isNotNull(this.trigger)&&this.trigger.setTipType("warning"),this.element.addClass("combo-error"))}else i.length===this.allValue.length?(BI.isNotNull(this.trigger)&&this.trigger.setTipType("success"),this.element.removeClass("combo-error")):(BI.isNotNull(this.trigger)&&this.trigger.setTipType("warning"),this.element.addClass("combo-error"))},_updateAllValue:function(){this.storeValue=this.storeValue||{},this.allValue=BI.deepClone(this.storeValue.value||[])},setValue:function(e){this.storeValue=BI.deepClone(e||{}),this._updateAllValue(),this._assertValue(this.storeValue),this.combo.setValue(this.storeValue),this._checkError()},getValue:function(){return BI.deepClone(this.storeValue)},_populate:function(){this._count=null,this.combo.populate()},populate:function(e){this.options.items=e,this._populate()}}),BI.extend(BI.SearchMultiTextValueCombo,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.SearchMultiTextValueCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.search_multi_text_value_combo",BI.SearchMultiTextValueCombo)},function(e,t){BI.SearchMultiSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.SearchMultiSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.SearchMultiSelectTrigger.superclass._init.apply(this,arguments);var t=this,e=this.options;e.height&&this.setHeight(e.height-2),this.searcher=BI.createWidget(e.searcher,{type:"bi.search_multi_select_searcher",height:e.height,itemsCreator:e.itemsCreator,valueFormatter:e.valueFormatter,allValueGetter:e.allValueGetter,popup:{},adapter:e.adapter,masker:e.masker,value:e.value,text:e.text,tipType:e.tipType,warningTitle:e.warningTitle}),this.searcher.on(BI.MultiSelectSearcher.EVENT_START,function(){t.fireEvent(BI.SearchMultiSelectTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_PAUSE,function(){t.fireEvent(BI.SearchMultiSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_SEARCHING,function(){t.fireEvent(BI.SearchMultiSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_STOP,function(){t.fireEvent(BI.SearchMultiSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE,function(){t.fireEvent(BI.SearchMultiSelectTrigger.EVENT_CHANGE,arguments)}),this.numberCounter=BI.createWidget(e.switcher,{type:"bi.multi_select_check_selected_switcher",valueFormatter:e.valueFormatter,itemsCreator:e.itemsCreator,adapter:e.adapter,masker:e.masker,value:e.value}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){t.fireEvent(BI.SearchMultiSelectTrigger.EVENT_COUNTER_CLICK)}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){t.fireEvent(BI.SearchMultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW)});var i=BI.createWidget({type:"bi.right_vertical_adapt",hgap:4,items:[{el:this.numberCounter}]}),n=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:i,width:0},{el:BI.createWidget(),width:24}]});this.numberCounter.on(BI.Events.VIEW,function(e){BI.nextTick(function(){n.attr("items")[1].width=!0===e?t.numberCounter.element.outerWidth()+8:0,n.resize()})}),this.element.click(function(e){0<t.element.find(e.target).length&&t.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(e){this.searcher.setAdapter(e),this.numberCounter.setAdapter(e)},setValue:function(e){this.searcher.setValue(e),this.numberCounter.setValue(e)},setTipType:function(e){this.searcher.setTipType(e)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.SearchMultiSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.SearchMultiSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.SearchMultiSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.SearchMultiSelectTrigger.EVENT_START="EVENT_START",BI.SearchMultiSelectTrigger.EVENT_STOP="EVENT_STOP",BI.SearchMultiSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.SearchMultiSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SearchMultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.search_multi_select_trigger",BI.SearchMultiSelectTrigger)},function(e,t){BI.SearchMultiSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SearchMultiSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SearchMultiSelectLoader.superclass._init.apply(this,arguments);var s=this,l=this.options,u=!1;this.storeValue=l.value||{},this._assertValue(this.storeValue),this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:l.logic,el:BI.extend({onLoaded:l.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},l.el),itemsCreator:function(r,o){var a=s._startValue;s.storeValue&&(r=BI.extend(r||{},{selectedValues:BI.isKey(a)&&s.storeValue.type===BI.Selection.Multi?s.storeValue.value.concat(a):s.storeValue.value})),l.itemsCreator(r,function(e){u=e.hasNext;var t=[];if(1===r.times&&s.storeValue){var i=BI.map(s.storeValue.value,function(e,t){var i=l.valueFormatter(t)||t;return{text:i,value:t,title:i,selected:s.storeValue.type===BI.Selection.Multi}});if(BI.isKey(s._startValue)&&!BI.contains(s.storeValue.value,s._startValue)){var n=l.valueFormatter(a)||a;i.unshift({text:n,value:a,title:n,selected:!0})}t=s._createItems(i)}o(t.concat(s._createItems(e.items)),e.keyword||""),1===r.times&&s.storeValue&&(BI.isKey(a)&&(s.storeValue.type===BI.Selection.All?BI.remove(s.storeValue.value,a):BI.pushDistinct(s.storeValue.value,a)),s.setValue(s.storeValue)),1===r.times&&s._scrollToTop()})},hasNext:function(){return u},value:this.storeValue}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){s.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){s.fireEvent(BI.SearchMultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(e){return BI.createItems(e,{type:"bi.multi_select_item",logic:this.options.logic,cls:"bi-list-item-active",height:24,selected:this.isAllSelected(),iconWrapperWidth:36})},_scrollToTop:function(){var e=this;BI.delay(function(){e.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(e){(e=e||{}).type||(e.type=BI.Selection.Multi),e.value||(e.value=[])},setStartValue:function(e){this._startValue=e},setValue:function(e){this.storeValue=e||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(e){e=this._createItems(e),this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(e){this.button_group.resetHeight(e)},resetWidth:function(e){this.button_group.resetWidth(e)}}),BI.SearchMultiSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.search_multi_select_loader",BI.SearchMultiSelectLoader)},function(e,t){BI.SearchMultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SearchMultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SearchMultiSelectPopupView.superclass._init.apply(this,arguments);var t=this,e=this.options;this.loader=BI.createWidget({type:"bi.search_multi_select_loader",itemsCreator:e.itemsCreator,valueFormatter:e.valueFormatter,onLoaded:e.onLoaded,value:e.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:e.maxWidth,minWidth:e.minWidth,maxHeight:e.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:e.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){t.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(e){switch(e){case 0:t.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:t.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(e){this.loader.setStartValue(e)},setValue:function(e){this.popupView.setValue(e)},getValue:function(){return this.popupView.getValue()},populate:function(e){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(e){this.popupView.resetHeight(e)},resetWidth:function(e){this.popupView.resetWidth(e)}}),BI.SearchMultiSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.SearchMultiSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.SearchMultiSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.search_multi_select_popup_view",BI.SearchMultiSelectPopupView)},function(e,t){BI.SearchMultiSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SearchMultiSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.SearchMultiSelectSearcher.superclass._init.apply(this,arguments);var n=this,r=this.options;this.editor=BI.createWidget(r.el,{type:"bi.multi_select_editor",height:r.height,text:r.text,tipType:r.tipType,warningTitle:r.warningTitle}),this.searcher=BI.createWidget({type:"bi.searcher",allowSearchBlank:!1,element:this,height:r.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(e,t){t()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_pane",valueFormatter:r.valueFormatter,keywordGetter:function(){return n.editor.getValue()},itemsCreator:function(e,t){var i=n.editor.getValue();e.keywords=[i],this.setKeyword(i),r.itemsCreator(e,t)},value:r.value},r.popup),adapter:r.adapter,masker:r.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){n.fireEvent(BI.SearchMultiSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),n.fireEvent(BI.SearchMultiSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){n.fireEvent(BI.SearchMultiSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){n.fireEvent(BI.SearchMultiSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var e=this.getKeywords();n.fireEvent(BI.SearchMultiSelectSearcher.EVENT_SEARCHING,e)}),BI.isNotNull(r.value)&&this.setState(r.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(e){this.searcher.setAdapter(e)},setState:function(e){var i=this.options,t={};if(t.type=e.type,t.value=i.allValueGetter()||[],t.assist=e.assist,t.type===BI.Selection.All)if(0===t.value.length)this.editor.setState(BI.Selection.All);else if(BI.size(t.assist)<=20){var n="";BI.each(t.assist,function(e,t){n+=0===e?""+(i.valueFormatter(t+"")||t):","+(i.valueFormatter(t+"")||t)}),this.editor.setState(n)}else this.editor.setState(BI.Selection.Multi);else if(0===t.value.length)this.editor.setState(BI.Selection.None);else if(BI.size(t.value)<=20){n="";BI.each(t.value,function(e,t){n+=0===e?""+(i.valueFormatter(t+"")||t):","+(i.valueFormatter(t+"")||t)}),this.editor.setState(n)}else this.editor.setState(BI.Selection.Multi)},setTipType:function(e){this.editor.setTipType(e)},setValue:function(e){this.setState(e),this.searcher.setValue(e)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(e){this.searcher.populate.apply(this.searcher,arguments)}}),BI.SearchMultiSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.SearchMultiSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.SearchMultiSelectSearcher.EVENT_START="EVENT_START",BI.SearchMultiSelectSearcher.EVENT_STOP="EVENT_STOP",BI.SearchMultiSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.SearchMultiSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.search_multi_select_searcher",BI.SearchMultiSelectSearcher)},function(e,t){BI.SelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.SelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-select-tree-first-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var t=this,e=this.options;this.checkbox=BI.createWidget({type:"bi.first_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,text:e.text,value:e.value,keyword:e.keyword,py:e.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(e){e===BI.Events.CLICK&&(this.isSelected()?t.triggerExpand():t.triggerCollapse())});var i=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),n=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(i,BI.extend(e.logic,{items:n}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(e){BI.SelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(e)}}),BI.shortcut("bi.select_tree_first_plus_group_node",BI.SelectTreeFirstPlusGroupNode)},function(e,t){BI.SelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.SelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-select-tree-last-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var t=this,e=this.options;this.checkbox=BI.createWidget({type:"bi.last_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,text:e.text,value:e.value,keyword:e.keyword,py:e.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(e){e===BI.Events.CLICK&&(this.isSelected()?t.triggerExpand():t.triggerCollapse())});var i=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),n=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(i,BI.extend(e.logic,{items:n}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(e){BI.SelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(e)}}),BI.shortcut("bi.select_tree_last_plus_group_node",BI.SelectTreeLastPlusGroupNode)},function(e,t){BI.SelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.SelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-select-tree-mid-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var t=this,e=this.options;this.checkbox=BI.createWidget({type:"bi.mid_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,text:e.text,value:e.value,keyword:e.keyword,py:e.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(e){e===BI.Events.CLICK&&(this.isSelected()?t.triggerExpand():t.triggerCollapse())});var i=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),n=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(i,BI.extend(e.logic,{items:n}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(e){BI.SelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(e)}}),BI.shortcut("bi.select_tree_mid_plus_group_node",BI.SelectTreeMidPlusGroupNode)},function(e,t){BI.SelectTreePlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var e=BI.SelectTreePlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-select-tree-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreePlusGroupNode.superclass._init.apply(this,arguments);var t=this,e=this.options;this.checkbox=BI.createWidget({type:"bi.tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,text:e.text,value:e.value,keyword:e.keyword,py:e.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(e){e===BI.Events.CLICK&&(this.isSelected()?t.triggerExpand():t.triggerCollapse())});var i=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),n=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(i,BI.extend(e.logic,{items:n}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(e){BI.SelectTreePlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(e)}}),BI.shortcut("bi.select_tree_plus_group_node",BI.SelectTreePlusGroupNode)},function(e,t){BI.SelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-combo",height:24,text:"",items:[],value:"",attributes:{tabIndex:0}})},_init:function(){BI.SelectTreeCombo.superclass._init.apply(this,arguments);var e=this,t=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:t.text,height:t.height,items:t.items,value:t.value}),this.popup=BI.createWidget({type:"bi.select_level_tree",items:t.items,value:t.value}),this.combo=BI.createWidget({type:"bi.combo",container:t.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){e.setValue(e.popup.getValue()),e.combo.hideView()})},setValue:function(e){e=BI.isArray(e)?e:[e],this.trigger.setValue(e),this.popup.setValue(e)},getValue:function(){return this.popup.getValue()},populate:function(e){this.combo.populate(e)}}),BI.shortcut("bi.select_tree_combo",BI.SelectTreeCombo)},function(e,t){BI.SelectTreeExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-expander",trigger:"",toggle:!0,direction:"bottom",isDefaultInit:!0,el:{},popup:{}})},_init:function(){BI.SelectTreeExpander.superclass._init.apply(this,arguments);var t=this,e=this.options;this.trigger=BI.createWidget(e.el),this.trigger.on(BI.Controller.EVENT_CHANGE,function(e){e===BI.Events.CLICK&&this.isSelected()&&t.expander.setValue([]),t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.expander=BI.createWidget({type:"bi.expander",element:this,trigger:e.trigger,toggle:e.toggle,direction:e.direction,isDefaultInit:e.isDefaultInit,el:this.trigger,popup:e.popup}),this.expander.on(BI.Controller.EVENT_CHANGE,function(e){e===BI.Events.CLICK&&t.trigger.setSelected(!1),t.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},getAllLeaves:function(){return this.expander.getAllLeaves()},setValue:function(e){BI.contains(e,this.trigger.getValue())?(this.trigger.setSelected(!0),this.expander.setValue([])):(this.trigger.setSelected(!1),this.expander.setValue(e))},getValue:function(){return this.trigger.isSelected()?[this.trigger.getValue()]:this.expander.getValue()},populate:function(e){this.expander.populate(e)}}),BI.shortcut("bi.select_tree_expander",BI.SelectTreeExpander)},function(e,t){BI.SelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-level-tree",tipText:BI.i18nText("BI-No_Selected_Item"),items:[],value:""})},_formatItems:function(n,r,o){var a=this;return BI.each(n,function(e,t){var i={layer:r};t.id=t.id||BI.UUID(),i.pNode=o,!0===t.isParent||!0===t.parent||BI.isNotEmptyArray(t.children)?(i.type="bi.select_tree_mid_plus_group_node",e===n.length-1&&(i.type="bi.select_tree_last_plus_group_node",i.isLastNode=!0),0!==e||o||(i.type="bi.select_tree_first_plus_group_node"),0===e&&e===n.length-1&&(i.type="bi.select_tree_plus_group_node"),BI.defaults(t,i),a._formatItems(t.children,r+1,t)):(i.type="bi.mid_tree_leaf_item",0!==e||o||(i.type="bi.first_tree_leaf_item"),e===n.length-1&&(i.type="bi.last_tree_leaf_item"),BI.defaults(t,i))}),n},_init:function(){BI.SelectTreePopup.superclass._init.apply(this,arguments);var e=this,t=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{type:"bi.select_tree_expander",isDefaultInit:!0},items:this._formatItems(BI.Tree.transformToTreeFormat(t.items),0),value:t.value,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){e.fireEvent(BI.SelectTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(e){e=BI.isArray(e)?e:[e],this.tree.setValue(e)},populate:function(e){BI.SelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(e)))}}),BI.SelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_level_tree",BI.SelectTreePopup)},function(e,t){BI.SingleSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-loader",allowNoSelect:!1,itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,s=this.options,l=!1;this.button_group=BI.createWidget({type:"bi.single_select_list",allowNoSelect:s.allowNoSelect,element:this,logic:{dynamic:!1},value:s.value,el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(r,o){a.storeValue&&(r=BI.extend(r||{},{selectedValues:[a.storeValue]})),s.itemsCreator(r,function(e){var t=e.keyword=s.keywordGetter();l=e.hasNext;var i=[];if(1===r.times&&BI.isNotNull(a.storeValue)){var n=a._filterValues(a.storeValue);i=a._createItems(n)}o(i.concat(a._createItems(e.items)),t||""),1===r.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return l}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(e){return BI.createItems(e,{type:this.options.allowNoSelect?"bi.single_select_item":"bi.single_select_combo_item",cls:"bi-list-item-active",logic:{dynamic:!1},height:25,selected:!1})},_filterValues:function(e){var i=this.options,t=i.keywordGetter(),n=e||[],r=BI.map(BI.isArray(n)?n:[n],function(e,t){return{text:i.valueFormatter(t)||t,value:t}});if(BI.isKey(t)){var o=BI.Func.getSearchResult(r,t);n=o.match.concat(o.find)}return BI.map(n,function(e,t){return{text:t.text,title:t.text,value:t.value,selected:!1}})},setValue:function(e){this.storeValue=e,this.button_group.setValue(e)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(e){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(e){this.button_group.resetHeight(e)},resetWidth:function(e){this.button_group.resetWidth(e)}}),BI.SingleSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_loader",BI.SingleSelectSearchLoader)},function(e,t){BI.SingleSelectSearchInsertPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchInsertPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-pane bi-card",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchInsertPane.superclass._init.apply(this,arguments);var i=this,n=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"single-select-toolbar",height:this.constants.height}),this.addNotMatchTip=BI.createWidget({type:"bi.text_button",invisible:!0,text:BI.i18nText("BI-Basic_Click_To_Add_Text",""),height:this.constants.height,cls:"bi-high-light",hgap:5,handler:function(){i.fireEvent(BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM,n.keywordGetter())}}),this.loader=BI.createWidget({type:"bi.single_select_search_loader",allowNoSelect:n.allowNoSelect,keywordGetter:n.keywordGetter,valueFormatter:n.valueFormatter,itemsCreator:function(e,t){n.itemsCreator.apply(i,[e,function(e){t(e),i.setKeyword(n.keywordGetter())}])},value:n.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){i.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{type:"bi.vertical",items:[this.tooltipClick,this.addNotMatchTip],height:this.constants.height},{el:this.loader}]})},setKeyword:function(i){var e=BI.some(this.loader.getAllButtons(),function(e,t){return i===t.getValue()}),t=0<this.loader.getAllButtons().length&&e;this.tooltipClick.setVisible(t),this.addNotMatchTip.setVisible(!t),t||this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",i))},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(e){this.loader.setValue(e)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(e){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchInsertPane.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.single_select_search_insert_pane",BI.SingleSelectSearchInsertPane)},function(e,t){BI.SingleSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-pane bi-card",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchPane.superclass._init.apply(this,arguments);var i=this,n=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"single-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.single_select_search_loader",allowNoSelect:n.allowNoSelect,keywordGetter:n.keywordGetter,valueFormatter:n.valueFormatter,itemsCreator:function(e,t){n.itemsCreator.apply(i,[e,function(e){t(e),i.setKeyword(n.keywordGetter())}])},value:n.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){i.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(e){var t,i=0<this.loader.getAllButtons().length&&(t=this.loader.getAllButtons()[0])&&e===t.getValue();i!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(i),this.resizer.attr("items")[0].height=i?this.constants.height:0,this.resizer.resize())},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(e){this.loader.setValue(e)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(e){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_pane",BI.SingleSelectSearchPane)},function(e,t){BI.SingleSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-combo",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,attributes:{tabIndex:0},allowEdit:!0})},_init:function(){BI.SingleSelectCombo.superclass._init.apply(this,arguments);function i(){BI.isKey(n._startValue)&&(n.storeValue=n._startValue),n.trigger.getSearcher().setState(n.storeValue)}var n=this,e=this.options;this.storeValue=e.value,this.requesting=!1,this.trigger=BI.createWidget({type:"bi.single_select_trigger",height:e.height,allowNoSelect:e.allowNoSelect,allowEdit:e.allowEdit,valueFormatter:e.valueFormatter,itemsCreator:function(t,i){e.itemsCreator(t,function(e){1===t.times&&BI.isNotNull(t.keywords)&&n.trigger.setValue(n.getValue()),i.apply(n,arguments)})},text:e.text,value:this.storeValue}),this.trigger.on(BI.SingleSelectTrigger.EVENT_FOCUS,function(){n.fireEvent(BI.SingleSelectCombo.EVENT_FOCUS)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_BLUR,function(){n.fireEvent(BI.SingleSelectCombo.EVENT_BLUR)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_START,function(){n._setStartValue(),this.getSearcher().setValue(n.storeValue)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP,function(){n._setStartValue(),n.fireEvent(BI.SingleSelectCombo.EVENT_STOP)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var e=this.getSearcher().getKeyword();n.combo.setValue(n.storeValue),n._setStartValue(e),i(),n.populate(),n._setStartValue()}}),this.trigger.on(BI.SingleSelectTrigger.EVENT_SEARCHING,function(e){var t=BI.last(e);0<(e=BI.initial(e||[])).length&&n._joinKeywords(e,function(){BI.isEndWithBlank(t)?(n.combo.setValue(n.storeValue),i(),n.combo.populate(),n._setStartValue()):(n.combo.setValue(n.storeValue),i())}),n.fireEvent(BI.SingleSelectCombo.EVENT_SEARCHING)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE,function(e,t){n.storeValue=this.getValue(),i(),n._defaultState()}),this.trigger.on(BI.SingleSelectTrigger.EVENT_COUNTER_CLICK,function(){n.combo.isViewVisible()||n.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",container:e.container,toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.single_select_popup_view",allowNoSelect:e.allowNoSelect,ref:function(){n.popup=this,n.trigger.setAdapter(this)},listeners:[{eventName:BI.SingleSelectPopupView.EVENT_CHANGE,action:function(){n.storeValue=this.getValue(),n._adjust(function(){i(),n._defaultState()}),n.fireEvent(BI.SingleSelectCombo.EVENT_CLICK_ITEM)}}],itemsCreator:e.itemsCreator,valueFormatter:e.valueFormatter,onLoaded:function(){BI.nextTick(function(){n.combo.adjustWidth(),n.combo.adjustHeight(),n.trigger.getSearcher().adjustView()})}},hideChecker:function(e){return 0===t.element.find(e.target).length},value:e.value}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(n.storeValue),BI.nextTick(function(){n.populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){n.trigger.stopEditing(),!0===n.requesting?n.wants2Quit=!0:n.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM)});var t=BI.createWidget({type:"bi.trigger_icon_button",width:e.height,height:e.height,cls:"single-select-trigger-icon-button"});t.on(BI.TriggerIconButton.EVENT_CHANGE,function(){n.combo.isViewVisible()?n.combo.hideView():n.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:t,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(e){},_makeMap:function(e){return BI.makeObject(e||[])},_joinKeywords:function(n,r){var o=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:n},function(e){!function t(e){var i=o._makeMap(e);BI.each(n,function(e,t){BI.isNotNull(i[t])&&BI.remove(o.storeValue.value,t)}),o._adjust(r)}(BI.map(e.items,"value"))})},_adjust:function(t){var i=this,e=this.options;function n(){!0===i.wants2Quit&&(i.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM),i.wants2Quit=!1),i.requesting=!1}this._count?(n(),t()):e.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_DATA_LENGTH},function(e){i._count=e.count,n(),t()})},_setStartValue:function(e){this._startValue=e,this.popup.setStartValue(e)},setValue:function(e){this.storeValue=e,this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return this.storeValue},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.SingleSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectCombo.EVENT_BLUR="EVENT_BLUR",BI.SingleSelectCombo.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectCombo.EVENT_STOP="EVENT_STOP",BI.SingleSelectCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.SingleSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.single_select_combo",BI.SingleSelectCombo)},function(e,t){BI.SingleSelectInsertCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-combo",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,attributes:{tabIndex:0},allowEdit:!0})},_init:function(){BI.SingleSelectInsertCombo.superclass._init.apply(this,arguments);function i(){BI.isKey(n._startValue)&&(n.storeValue=n._startValue),n.trigger.getSearcher().setState(n.storeValue)}var n=this,e=this.options;this.storeValue=e.value,this.requesting=!1,this.trigger=BI.createWidget({type:"bi.single_select_trigger",height:e.height,allowNoSelect:e.allowNoSelect,allowEdit:e.allowEdit,valueFormatter:e.valueFormatter,itemsCreator:function(t,i){e.itemsCreator(t,function(e){1===t.times&&BI.isNotNull(t.keywords)&&n.trigger.setValue(n.getValue()),i.apply(n,arguments)})},text:e.text,value:this.storeValue,searcher:{popup:{type:"bi.single_select_search_insert_pane",listeners:[{eventName:BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){n.trigger.getSearcher().hasMatched()||(n.storeValue=n.trigger.getSearcher().getKeyword(),i(),n._defaultState())}}]}}}),this.trigger.on(BI.SingleSelectTrigger.EVENT_FOCUS,function(){n.fireEvent(BI.SingleSelectInsertCombo.EVENT_FOCUS)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_BLUR,function(){n.fireEvent(BI.SingleSelectInsertCombo.EVENT_BLUR)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_START,function(){n._setStartValue(),this.getSearcher().setValue(n.storeValue)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP,function(){n._setStartValue(),n.fireEvent(BI.SingleSelectInsertCombo.EVENT_STOP)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var e=this.getSearcher().getKeyword();n.storeValue=e,n.combo.setValue(n.storeValue),n._setStartValue(e),i(),n.populate(),n._setStartValue()}}),this.trigger.on(BI.SingleSelectTrigger.EVENT_SEARCHING,function(e){var t=BI.last(e);0<(e=BI.initial(e||[])).length&&n._joinKeywords(e,function(){BI.isEndWithBlank(t)?(n.combo.setValue(n.storeValue),i(),n.combo.populate(),n._setStartValue()):(n.combo.setValue(n.storeValue),i())}),n.fireEvent(BI.SingleSelectInsertCombo.EVENT_SEARCHING)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE,function(e,t){n.storeValue=this.getValue(),i(),n._defaultState()}),this.trigger.on(BI.SingleSelectTrigger.EVENT_COUNTER_CLICK,function(){n.combo.isViewVisible()||n.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",container:e.container,toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.single_select_popup_view",allowNoSelect:e.allowNoSelect,ref:function(){n.popup=this,n.trigger.setAdapter(this)},listeners:[{eventName:BI.SingleSelectPopupView.EVENT_CHANGE,action:function(){n.storeValue=this.getValue(),n._adjust(function(){i(),n._defaultState()}),n.fireEvent(BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM)}}],itemsCreator:e.itemsCreator,valueFormatter:e.valueFormatter,onLoaded:function(){BI.nextTick(function(){n.combo.adjustWidth(),n.combo.adjustHeight(),n.trigger.getSearcher().adjustView()})}},hideChecker:function(e){return 0===t.element.find(e.target).length},value:e.value}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(n.storeValue),BI.nextTick(function(){n.populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){n.trigger.stopEditing(),!0===n.requesting?n.wants2Quit=!0:n.fireEvent(BI.SingleSelectInsertCombo.EVENT_CONFIRM)});var t=BI.createWidget({type:"bi.trigger_icon_button",width:e.height,height:e.height,cls:"single-select-trigger-icon-button"});t.on(BI.TriggerIconButton.EVENT_CHANGE,function(){n.combo.isViewVisible()?n.combo.hideView():n.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:t,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(e){},_makeMap:function(e){return BI.makeObject(e||[])},_joinKeywords:function(n,r){var o=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.SingleSelectInsertCombo.REQ_GET_ALL_DATA,keywords:n},function(e){!function t(e){var i=o._makeMap(e);BI.each(n,function(e,t){BI.isNotNull(i[t])&&BI.remove(o.storeValue.value,t)}),o._adjust(r)}(BI.map(e.items,"value"))})},_adjust:function(e){var t=this;this.options;!function i(){!0===t.wants2Quit&&(t.fireEvent(BI.SingleSelectInsertCombo.EVENT_CONFIRM),t.wants2Quit=!1);t.requesting=!1}(),e()},_setStartValue:function(e){this._startValue=e,this.popup.setStartValue(e)},setValue:function(e){this.storeValue=e,this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return this.storeValue},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.SingleSelectInsertCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectInsertCombo.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectInsertCombo.EVENT_BLUR="EVENT_BLUR",BI.SingleSelectInsertCombo.EVENT_STOP="EVENT_STOP",BI.SingleSelectInsertCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.SingleSelectInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.single_select_insert_combo",BI.SingleSelectInsertCombo)},function(e,t){BI.SingleSelectComboItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-single-select-radio-item",logic:{dynamic:!1},height:24})},_init:function(){BI.SingleSelectComboItem.superclass._init.apply(this,arguments);var e=this.options;this.radio=BI.createWidget({type:"bi.radio"}),this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",whiteSpace:"nowrap",textHeight:e.height,height:e.height,hgap:e.hgap,text:e.text,keyword:e.keyword,value:e.value,py:e.py}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(e.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.center_adapt",items:[this.radio],width:26},this.text)}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.SingleSelectComboItem.superclass.doClick.apply(this,arguments),this.radio.setSelected(this.isSelected()),this.isValid()&&this.fireEvent(BI.SingleSelectComboItem.EVENT_CHANGE,this.isSelected(),this)},setSelected:function(e){BI.SingleSelectComboItem.superclass.setSelected.apply(this,arguments),this.radio.setSelected(e)}}),BI.SingleSelectComboItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_combo_item",BI.SingleSelectComboItem)},function(e,t){BI.SingleSelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-list",direction:BI.Direction.Top,logic:{dynamic:!0},items:[],itemsCreator:BI.emptyFn,hasNext:BI.emptyFn,onLoaded:BI.emptyFn,el:{type:"bi.list_pane"},allowNoSelect:!1})},_init:function(){BI.SingleSelectList.superclass._init.apply(this,arguments);var n=this,e=this.options;this.list=BI.createWidget(e.el,{type:"bi.list_pane",items:e.items,itemsCreator:function(t,i){1===t.times&&n.toolbar&&n.toolbar.setVisible(!1),e.itemsCreator(t,function(e){i.apply(n,arguments),1===t.times&&(n.toolbar&&n.toolbar.setVisible(e&&0<e.length),n.toolbar&&n.toolbar.setEnable(e&&0<e.length))})},onLoaded:e.onLoaded,hasNext:e.hasNext,value:e.value}),this.list.on(BI.Controller.EVENT_CHANGE,function(e,t,i){e===BI.Events.CLICK&&n.fireEvent(BI.SingleSelectList.EVENT_CHANGE,t,i),n.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(e.direction),BI.extend({scrolly:!0},e.logic,{items:e.allowNoSelect?BI.LogicFactory.createLogicItemsByDirection(e.direction,{type:"bi.single_select_item",cls:"bi-list-item-active",height:24,forceNotSelected:!0,text:BI.i18nText("BI-Basic_No_Select"),ref:function(e){n.toolbar=e},listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(e){e===BI.Events.CLICK&&(n.list.setValue(),n.fireEvent(BI.SingleSelectList.EVENT_CHANGE)),n.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]},this.list):BI.LogicFactory.createLogicItemsByDirection(e.direction,this.list)}))))},hasPrev:function(){return this.list.hasPrev()},hasNext:function(){return this.list.hasNext()},prependItems:function(e){this.list.prependItems.apply(this.list,arguments)},addItems:function(e){this.list.addItems.apply(this.list,arguments)},setValue:function(e){this.list.setValue([e])},getValue:function(){return this.list.getValue()[0]},empty:function(){this.list.empty()},populate:function(e){this.list.populate.apply(this.list,arguments)},resetHeight:function(e){this.list.resetHeight?this.list.resetHeight(e):this.list.element.css({"max-height":e+"px"})},setNotSelectedValue:function(){this.list.setNotSelectedValue.apply(this.list,arguments)},getNotSelectedValue:function(){return this.list.getNotSelectedValue()},getAllButtons:function(){return this.list.getAllButtons()},getAllLeaves:function(){return this.list.getAllLeaves()},getSelectedButtons:function(){return this.list.getSelectedButtons()},getNotSelectedButtons:function(){return this.list.getNotSelectedButtons()},getIndexByValue:function(e){return this.list.getIndexByValue(e)},getNodeById:function(e){return this.list.getNodeById(e)},getNodeByValue:function(e){return this.list.getNodeByValue(e)}}),BI.SingleSelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_list",BI.SingleSelectList)},function(e,t){BI.SingleSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-loader",logic:{dynamic:!0},el:{height:400},allowNoSelect:!1,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectLoader.superclass._init.apply(this,arguments);var a=this,s=this.options,l=!1;this.storeValue=s.value,this.button_group=BI.createWidget({type:"bi.single_select_list",allowNoSelect:s.allowNoSelect,logic:s.logic,el:BI.extend({onLoaded:s.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},s.el),itemsCreator:function(n,r){var o=a._startValue;BI.isNotNull(a.storeValue)&&(n=BI.extend(n||{},{selectedValues:[a.storeValue]})),s.itemsCreator(n,function(e){l=e.hasNext;var t=[];if(1===n.times&&BI.isNotNull(a.storeValue)){var i=BI.map([a.storeValue],function(e,t){var i=s.valueFormatter(t)||t;return{text:i,value:t,title:i,selected:!0}});t=a._createItems(i)}r(t.concat(a._createItems(e.items)),e.keyword||""),1===n.times&&a.storeValue&&(BI.isKey(o)&&(a.storeValue=o),a.setValue(a.storeValue)),1===n.times&&a._scrollToTop()})},hasNext:function(){return l},value:this.storeValue}),BI.createWidget({type:"bi.vertical",element:this,items:[this.button_group],vgap:5}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(e){return BI.createItems(e,{type:this.options.allowNoSelect?"bi.single_select_item":"bi.single_select_combo_item",logic:this.options.logic,cls:"bi-list-item-active",height:24,selected:!1})},_scrollToTop:function(){var e=this;BI.delay(function(){e.button_group.element.scrollTop(0)},30)},_assertValue:function(e){},setStartValue:function(e){this._startValue=e},setValue:function(e){this.storeValue=e,this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(e){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(e){this.button_group.resetHeight(e)},resetWidth:function(e){this.button_group.resetWidth(e)}}),BI.SingleSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_loader",BI.SingleSelectLoader)},function(e,t){BI.SingleSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-popup-view",allowNoSelect:!1,maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectPopupView.superclass._init.apply(this,arguments);var e=this,t=this.options;this.loader=BI.createWidget({type:"bi.single_select_loader",allowNoSelect:t.allowNoSelect,itemsCreator:t.itemsCreator,valueFormatter:t.valueFormatter,onLoaded:t.onLoaded,value:t.value}),this.popupView=BI.createWidget({type:"bi.popup_view",stopPropagation:!1,maxWidth:t.maxWidth,minWidth:t.minWidth,maxHeight:t.maxHeight,element:this,el:this.loader,value:t.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){e.fireEvent(BI.SingleSelectPopupView.EVENT_CHANGE)})},setStartValue:function(e){this.loader.setStartValue(e)},setValue:function(e){this.popupView.setValue(e)},getValue:function(){return this.popupView.getValue()},populate:function(e){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(e){this.popupView.resetHeight(e)},resetWidth:function(e){this.popupView.resetWidth(e)}}),BI.SingleSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_popup_view",BI.SingleSelectPopupView)},function(e,t){BI.SingleSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-trigger bi-border bi-border-radius",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{},allowEdit:!0})},_init:function(){BI.SingleSelectTrigger.superclass._init.apply(this,arguments);var e=this,t=this.options;t.height&&this.setHeight(t.height-2),this.searcher=BI.createWidget(t.searcher,{type:"bi.single_select_searcher",allowNoSelect:t.allowNoSelect,text:t.text,height:t.height,itemsCreator:t.itemsCreator,valueFormatter:t.valueFormatter,popup:{},adapter:t.adapter,masker:t.masker,value:t.value}),this.searcher.on(BI.SingleSelectSearcher.EVENT_START,function(){e.fireEvent(BI.SingleSelectTrigger.EVENT_START)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_PAUSE,function(){e.fireEvent(BI.SingleSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_SEARCHING,function(){e.fireEvent(BI.SingleSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_STOP,function(){e.fireEvent(BI.SingleSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_CHANGE,function(){e.fireEvent(BI.SingleSelectTrigger.EVENT_CHANGE,arguments)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_FOCUS,function(){e.fireEvent(BI.SingleSelectTrigger.EVENT_FOCUS)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_BLUR,function(){e.fireEvent(BI.SingleSelectTrigger.EVENT_BLUR,arguments)});BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:BI.createWidget(),width:24}]});t.allowEdit||BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.text",title:function(){return e.searcher.getState()}},left:0,right:24,top:0,bottom:0}]})},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch()},setAdapter:function(e){this.searcher.setAdapter(e)},setValue:function(e){this.searcher.setValue(e)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.SingleSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.SingleSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.SingleSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectTrigger.EVENT_START="EVENT_START",BI.SingleSelectTrigger.EVENT_STOP="EVENT_STOP",BI.SingleSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.SingleSelectTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectTrigger.EVENT_BLUR="EVENT_BLUR",BI.shortcut("bi.single_select_trigger",BI.SingleSelectTrigger)},function(e,t){BI.SingleSelectInsertList=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectInsertList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-list",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.SingleSelectInsertList.superclass._init.apply(this,arguments);var i=this,n=this.options;this.storeValue=n.value;function r(){BI.isKey(i._startValue)&&(i.storeValue=i._startValue)}this.adapter=BI.createWidget({type:"bi.single_select_loader",allowNoSelect:n.allowNoSelect,cls:"popup-single-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:n.itemsCreator,valueFormatter:n.valueFormatter,logic:{dynamic:!0},el:{},value:n.value}),this.adapter.on(BI.SingleSelectLoader.EVENT_CHANGE,function(){i.storeValue=this.getValue(),r(),i.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.single_select_search_pane",allowNoSelect:n.allowNoSelect,cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:n.valueFormatter,keywordGetter:function(){return i.trigger.getKeyword()},itemsCreator:function(e,t){e.keywords=[i.trigger.getKeyword()],this.setKeyword(e.keywords[0]),n.itemsCreator(e,t)}}),this.searcherPane.setVisible(!1),this.trigger=BI.createWidget({type:"bi.searcher",allowSearchBlank:!1,isAutoSearch:!1,isAutoSync:!1,onSearch:function(e,t){t()},adapter:this.adapter,popup:this.searcherPane,height:200,masker:!1,value:n.value,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){i._showSearcherPane(),i._setStartValue(),this.setValue(BI.deepClone(i.storeValue))}},{eventName:BI.Searcher.EVENT_STOP,action:function(){i._showAdapter(),i._setStartValue(),i.adapter.setValue(i.storeValue),i.adapter.populate()}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){var e=this.getKeyword();i.storeValue=e,i._showAdapter(),i.adapter.setValue(i.storeValue),i._setStartValue(e),r(),i.adapter.populate(),i._setStartValue(),i.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE)}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var e=this.getKeyword(),t=BI.last(e);0<(e=BI.initial(e||[])).length&&i._joinKeywords(e,function(){BI.isEndWithBlank(t)?(i.adapter.setValue(i.storeValue),r(),i.adapter.populate(),i._setStartValue()):(i.adapter.setValue(i.storeValue),r())})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(){i.storeValue=this.getValue(),i.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE)}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:24},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:24,bottom:0,left:0,right:0}]})},_showAdapter:function(){this.adapter.setVisible(!0),this.searcherPane.setVisible(!1)},_showSearcherPane:function(){this.searcherPane.setVisible(!0),this.adapter.setVisible(!1)},_defaultState:function(){this.trigger.stopEditing()},_assertValue:function(){},_makeMap:function(e){return BI.makeObject(e||[])},_joinKeywords:function(t,n){var r=this,e=this.options;function i(e){var i=r._makeMap(e);BI.each(t,function(e,t){BI.isNotNull(i[t])&&(r.storeValue.type===BI.Selection.Single?BI.pushDistinct(r.storeValue.value,t):BI.remove(r.storeValue.value,t))}),n()}this._assertValue(this.storeValue),this._allData?i(this._allData):e.itemsCreator({type:BI.SingleSelectInsertList.REQ_GET_ALL_DATA},function(e){r._allData=BI.map(e.items,"value"),i(r._allData)})},_setStartValue:function(e){this._startValue=e,this.adapter.setStartValue(e)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(e){this.storeValue=e,this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.SingleSelectInsertList,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectInsertList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_insert_list",BI.SingleSelectInsertList)},function(e,t){BI.SingleSelectEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-editor",el:{},text:BI.i18nText("BI-Basic_Please_Select")})},_init:function(){BI.SingleSelectEditor.superclass._init.apply(this,arguments);var e=this,t=this.options;this.editor=BI.createWidget(t.el,{type:"bi.state_editor",element:this,height:t.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0,value:t.value,defaultText:t.text,text:t.text}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){e.fireEvent(BI.SingleSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_FOCUS,function(){e.fireEvent(BI.SingleSelectEditor.EVENT_FOCUS)}),this.editor.on(BI.StateEditor.EVENT_BLUR,function(){e.fireEvent(BI.SingleSelectEditor.EVENT_BLUR)})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(e){this.editor.setState(e)},setValue:function(e){this.editor.setValue(e)},getValue:function(){var e=this.editor.getState();return BI.isArray(e)&&0<e.length?e[e.length-1]:""},getKeywords:function(){var e=this.editor.getLastChangedValue(),t=e.match(/[\S]+/g);return BI.isEndWithBlank(e)?t.concat([" "]):t},populate:function(e){}}),BI.SingleSelectEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectEditor.EVENT_BLUR="EVENT_BLUR",BI.SingleSelectEditor.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.single_select_editor",BI.SingleSelectEditor)},function(e,t){BI.SingleSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{},allowNoSelect:!1})},_init:function(){BI.SingleSelectSearcher.superclass._init.apply(this,arguments);var n=this,r=this.options;this.editor=BI.createWidget(r.el,{type:"bi.single_select_editor",height:r.height,text:r.text,listeners:[{eventName:BI.SingleSelectEditor.EVENT_FOCUS,action:function(){n.fireEvent(BI.SingleSelectSearcher.EVENT_FOCUS)}},{eventName:BI.SingleSelectEditor.EVENT_BLUR,action:function(){n.fireEvent(BI.SingleSelectSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",allowSearchBlank:!1,element:this,height:r.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(e,t){t()},el:this.editor,popup:BI.extend({type:"bi.single_select_search_pane",allowNoSelect:r.allowNoSelect,valueFormatter:r.valueFormatter,keywordGetter:function(){return n.editor.getValue()},itemsCreator:function(e,t){var i=n.editor.getValue();e.keywords=[i],this.setKeyword(i),r.itemsCreator(e,t)},value:r.value},r.popup),adapter:r.adapter,masker:r.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){n.fireEvent(BI.SingleSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),n.fireEvent(BI.SingleSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){n.fireEvent(BI.SingleSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){n.fireEvent(BI.SingleSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var e=this.getKeywords();n.fireEvent(BI.SingleSelectSearcher.EVENT_SEARCHING,e)}),BI.isNotNull(r.value)&&this.setState(r.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(e){this.searcher.setAdapter(e)},setState:function(e){var t=this.options;BI.isNull(e)?this.editor.setState(BI.Selection.None):this.editor.setState(t.valueFormatter(e+"")||e+"")},setValue:function(e){this.setState(e),this.searcher.setValue(e)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(e){this.searcher.populate.apply(this.searcher,arguments)}}),BI.SingleSelectSearcher.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectSearcher.EVENT_BLUR="EVENT_BLUR",BI.SingleSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.SingleSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectSearcher.EVENT_START="EVENT_START",BI.SingleSelectSearcher.EVENT_STOP="EVENT_STOP",BI.SingleSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.single_select_searcher",BI.SingleSelectSearcher)},function(e,t){BI.SignTextEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.SignTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-sign-initial-editor",validationChecker:BI.emptyFn,text:"",height:24})},_init:function(){BI.SignTextEditor.superclass._init.apply(this,arguments);var e=this,t=this.options;this.editor=BI.createWidget({type:"bi.editor",height:t.height,hgap:4,vgap:2,value:t.value,validationChecker:t.validationChecker,allowBlank:!1}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:function(){return e.getValue()},textAlign:t.textAlign,height:t.height,hgap:4,handler:function(){e._showInput(),e.editor.focus(),e.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){e.fireEvent(BI.SignTextEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){e._showHint(),e._checkText(),e.fireEvent(BI.SignTextEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){e._showHint(),e._checkText(),e.fireEvent(BI.SignTextEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){e._checkText()}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),e._checkText()},_checkText:function(){var t=this.options;BI.nextTick(BI.bind(function(){if(""===this.editor.getValue())this.text.setValue(t.watermark||""),this.text.element.addClass("bi-water-mark");else{var e=this.editor.getValue();e=BI.isEmpty(e)||e==t.text?t.text:e+t.text,this.text.setValue(e),this.text.element.removeClass("bi-water-mark")}},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(e){this.text.setTitle(e)},setWarningTitle:function(e){this.text.setWarningTitle(e)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint(),this._checkText()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},isValid:function(){return this.editor.isValid()},setErrorText:function(e){this.editor.setErrorText(e)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},getLastChangedValue:function(){return this.editor.getLastChangedValue()},setValue:function(e){this.editor.setValue(e),this._checkText()},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(e){var t=this.options;this._showHint(),e=BI.isEmpty(e)||e==t.text?t.text:e+t.text,this.text.setValue(e)}}),BI.SignTextEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SignTextEditor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.SignTextEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.shortcut("bi.sign_text_editor",BI.SignTextEditor)},function(e,t){BI.SliderIconButton=BI.inherit(BI.Widget,{props:{baseCls:"bi-single-slider-button"},constants:{LARGE_SIZE:16,NORMAL_SIZE:12,LARGE_OFFSET:4,NORMAL_OFFSET:6},render:function(){var e=this;return{type:"bi.absolute",ref:function(){e.wrapper=this},items:[{el:{type:"bi.text_button",cls:"slider-button bi-high-light-border",ref:function(){e.slider=this}}}]}}}),BI.shortcut("bi.single_slider_button",BI.SliderIconButton)},function(e,t){BI.SingleSlider=BI.inherit(BI.Single,{_constant:{EDITOR_WIDTH:90,EDITOR_HEIGHT:30,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24,TRACK_GAP_HALF:7,TRACK_GAP:14},props:{baseCls:"bi-single-slider bi-slider-track",digit:!1,unit:""},render:function(){var a=this,s=this.options,l=this._constant;this.enable=!1,this.value="",this.grayTrack=BI.createWidget({type:"bi.layout",cls:"gray-track",height:6}),this.blueTrack=BI.createWidget({type:"bi.layout",cls:"blue-track bi-high-light-background",height:6}),this.track=this._createTrackWrapper(),this.slider=BI.createWidget({type:"bi.single_slider_button"}),this._draggable(this.slider);var u=BI.createWidget({type:"bi.vertical",items:[{type:"bi.absolute",items:[this.slider]}],hgap:l.SLIDER_WIDTH_HALF,height:l.SLIDER_HEIGHT});return u.element.click(function(e){if(a.enable&&a.isEnabled()&&u.element[0]===e.originalEvent.target){var t=e.clientX-a.element.offset().left-l.SLIDER_WIDTH_HALF,i=a.track.element[0].scrollWidth-l.TRACK_GAP,n=0;t<0&&(n=0),0<t&&t<i&&(n=100*t/a._getGrayTrackLength()),i<=t&&(n=100);var r=BI.parseFloat(n.toFixed(1));a._setAllPosition(r);var o=a._getValueByPercent(r);o=!1===s.digit?o:o.toFixed(s.digit),a.label.setValue(o),a.value=o,a.fireEvent(BI.SingleSlider.EVENT_CHANGE)}}),this.label=BI.createWidget({type:"bi.sign_text_editor",cls:"slider-editor-button",text:s.unit,width:l.EDITOR_WIDTH-2,allowBlank:!1,textAlign:"center",validationChecker:function(e){return a._checkValidation(e)}}),this.label.element.hover(function(){a.label.element.removeClass("bi-border").addClass("bi-border")},function(){a.label.element.removeClass("bi-border")}),this.label.on(BI.SignEditor.EVENT_CONFIRM,function(){var e=BI.parseFloat(this.getValue()),t=a._getPercentByValue(e),i=BI.parseFloat(t.toFixed(1));a._setAllPosition(i),this.setValue(e),a.value=e,a.fireEvent(BI.SingleSlider.EVENT_CHANGE)}),this._setVisible(!1),{type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.track,width:"100%",height:l.TRACK_HEIGHT}]}],hgap:l.TRACK_GAP_HALF,height:l.TRACK_HEIGHT},top:23,left:0,width:"100%"},{el:u,top:20,left:0,width:"100%"},{el:{type:"bi.vertical",items:[{type:"bi.horizontal_auto",items:[this.label]}],height:l.EDITOR_HEIGHT},top:0,left:0,width:"100%"}]}},_draggable:function(r){var o=this,a=this.options,s=!1,l=0,u=0,c=0,h=new BI.MouseMoveTracker(function(e){if(h.isDragging()){s=!0,l=p(c+(u+=e)),r.element.addClass("dragging");var t=100*l/o._getGrayTrackLength(),i=BI.parseFloat(t.toFixed(1));o._setBlueTrack(i),o._setLabelPosition(i),o._setSliderPosition(i);var n=o._getValueByPercent(i);n=!1===a.digit?n:n.toFixed(a.digit),o.label.setValue(n),o.value=n}},function(){if(!0===s){var e=100*(l=p(l))/o._getGrayTrackLength(),t=BI.parseFloat(e.toFixed(1));o._setSliderPosition(t),u=l=0,c=l,s=!1}r.element.removeClass("dragging"),h.releaseMouseMoves(),o.fireEvent(BI.SingleSlider.EVENT_CHANGE)},window);function p(e){return BI.clamp(e,0,o._getGrayTrackLength())}r.element.on("mousedown",function(e){r.isEnabled()&&(p(c=this.offsetLeft),h.captureMouseMoves(e))})},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(e){var t=this.options,i=!1;BI.isNumeric(e)&&!(BI.isNull(e)||e<this.min||e>this.max)&&(i=!1===t.digit||((e+"").split(".")[1]||"").length===t.digit);return i},_setBlueTrack:function(e){this.blueTrack.element.css({width:e+"%"})},_setLabelPosition:function(e){},_setSliderPosition:function(e){this.slider.element.css({left:e+"%"})},_setAllPosition:function(e){this._setSliderPosition(e),this._setLabelPosition(e),this._setBlueTrack(e)},_setVisible:function(e){this.slider.setVisible(e),this.label.setVisible(e)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(e){var t=BI.parseInt(10*e);return(this.max-this.min)*t/1e3+this.min},_getPercentByValue:function(e){return 100*(e-this.min)/(this.max-this.min)},getValue:function(){return this.value},setValue:function(e){var t=this.options;e=BI.parseFloat(e),e=!1===t.digit?e:e.toFixed(t.digit),isNaN(e)||(this._checkValidation(e)&&(this.value=e),e>this.max&&(this.value=this.max),e<this.min&&(this.value=this.min))},_setEnable:function(e){BI.SingleSlider.superclass._setEnable.apply(this,[e]),e?this.blueTrack.element.removeClass("disabled-blue-track").addClass("blue-track"):this.blueTrack.element.removeClass("blue-track").addClass("disabled-blue-track")},setMinAndMax:function(e){var t=BI.parseFloat(e.min),i=BI.parseFloat(e.max);!isNaN(t)&&!isNaN(i)&&t<i&&(this.min=t,this.max=i)},reset:function(){this._setVisible(!1),this.enable=!1,this.value="",this.min=0,this.max=0,this._setBlueTrack(0)},populate:function(){isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,this.label.setErrorText(BI.i18nText("BI-Basic_Please_Enter_Number_Between",this.min,this.max)),BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?(this.label.setValue(this.value),this._setAllPosition(this._getPercentByValue(this.value))):(this.label.setValue(this.max),this._setAllPosition(100)))}}),BI.SingleSlider.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_slider",BI.SingleSlider)},function(e,t){BI.SingleSliderLabel=BI.inherit(BI.Single,{_constant:{EDITOR_WIDTH:90,EDITOR_HEIGHT:20,HEIGHT:20,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24,TRACK_GAP_HALF:7,TRACK_GAP:14},_defaultConfig:function(){return BI.extend(BI.SingleSliderLabel.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-slider-label bi-slider-track",digit:!1,unit:""})},_init:function(){BI.SingleSliderLabel.superclass._init.apply(this,arguments);var a=this,s=this.options,l=this._constant;this.enable=!1,this.value="",this.grayTrack=BI.createWidget({type:"bi.layout",cls:"gray-track",height:6}),this.blueTrack=BI.createWidget({type:"bi.layout",cls:"blue-track bi-high-light-background",height:6}),this.track=this._createTrackWrapper(),this.slider=BI.createWidget({type:"bi.single_slider_button"}),this._draggable(this.slider);var u=BI.createWidget({type:"bi.vertical",items:[{type:"bi.absolute",items:[this.slider]}],hgap:l.SLIDER_WIDTH_HALF,height:l.SLIDER_HEIGHT});u.element.click(function(e){if(a.enable&&a.isEnabled()&&u.element[0]===e.originalEvent.target){var t=e.clientX-a.element.offset().left-l.SLIDER_WIDTH_HALF,i=a.track.element[0].scrollWidth-l.TRACK_GAP,n=0;t<0&&(n=0),0<t&&t<i&&(n=100*t/a._getGrayTrackLength()),i<=t&&(n=100);var r=BI.parseFloat(n.toFixed(1));a._setAllPosition(r);var o=a._getValueByPercent(r);o=!1===s.digit?o:o.toFixed(s.digit),a.label.setText(o+s.unit),a.value=o,a.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)}}),this.label=BI.createWidget({type:"bi.label",height:l.HEIGHT,width:l.EDITOR_WIDTH-2}),this._setVisible(!1),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.track,width:"100%",height:l.TRACK_HEIGHT}]}],hgap:l.TRACK_GAP_HALF,height:l.TRACK_HEIGHT},top:13,left:0,width:"100%"},{el:u,top:10,left:0,width:"100%"},{el:{type:"bi.vertical",items:[{type:"bi.horizontal_auto",items:[this.label]}],height:l.EDITOR_HEIGHT},top:0,left:0,width:"100%"}]})},_draggable:function(r){var o=this,a=this.options,s=!1,l=0,u=0,c=0,h=new BI.MouseMoveTracker(function(e){if(h.isDragging()){s=!0,l=p(c+(u+=e)),r.element.addClass("dragging");var t=100*l/o._getGrayTrackLength(),i=BI.parseFloat(t.toFixed(1));o._setBlueTrack(i),o._setLabelPosition(i),o._setSliderPosition(i);var n=o._getValueByPercent(i);n=!1===a.digit?n:n.toFixed(a.digit),o.label.setValue(n+a.unit),o.value=n,o.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)}},function(){if(!0===s){var e=100*(l=p(l))/o._getGrayTrackLength(),t=BI.parseFloat(e.toFixed(1));o._setSliderPosition(t),u=l=0,c=l,s=!1}r.element.removeClass("dragging"),h.releaseMouseMoves(),o.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)},window);function p(e){return BI.clamp(e,0,o._getGrayTrackLength())}r.element.on("mousedown",function(e){r.isEnabled()&&(p(c=this.offsetLeft),h.captureMouseMoves(e))})},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(e){return BI.isNumeric(e)&&!(BI.isNull(e)||e<this.min||e>this.max)},_setBlueTrack:function(e){this.blueTrack.element.css({width:e+"%"})},_setLabelPosition:function(e){},_setSliderPosition:function(e){this.slider.element.css({left:e+"%"})},_setAllPosition:function(e){this._setSliderPosition(e),this._setLabelPosition(e),this._setBlueTrack(e)},_setVisible:function(e){this.slider.setVisible(e),this.label.setVisible(e)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(e){var t=BI.parseInt(10*e);return(this.max-this.min)*t/1e3+this.min},_getPercentByValue:function(e){return 100*(e-this.min)/(this.max-this.min)},_setEnable:function(e){BI.SingleSliderLabel.superclass._setEnable.apply(this,[e]),e?this.blueTrack.element.removeClass("disabled-blue-track").addClass("blue-track"):this.blueTrack.element.removeClass("blue-track").addClass("disabled-blue-track")},getValue:function(){return this.value},setValue:function(e){var t=this.options;e=BI.parseFloat(e),e=!1===t.digit?e:e.toFixed(t.digit),isNaN(e)||(this._checkValidation(e)&&(this.value=e),e>this.max&&(this.value=this.max),e<this.min&&(this.value=this.min))},setMinAndMax:function(e){var t=BI.parseFloat(e.min),i=BI.parseFloat(e.max);!isNaN(t)&&!isNaN(i)&&t<i&&(this.min=t,this.max=i)},reset:function(){this._setVisible(!1),this.enable=!1,this.value="",this.min=0,this.max=0,this._setBlueTrack(0)},populate:function(){var e=this.options;isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?(this.label.setValue(this.value+e.unit),this._setAllPosition(this._getPercentByValue(this.value))):(this.label.setValue(this.max+e.unit),this._setAllPosition(100)))}}),BI.SingleSliderLabel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_slider_label",BI.SingleSliderLabel)},function(e,t){BI.SingleSliderNormal=BI.inherit(BI.Single,{_constant:{HEIGHT:28,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24,TRACK_GAP_HALF:7,TRACK_GAP:14},props:{baseCls:"bi-single-slider-normal bi-slider-track",minMax:{min:0,max:100}},render:function(){var a=this,s=this._constant,e=this._createTrack();this.slider=BI.createWidget({type:"bi.single_slider_button"}),this._draggable(this.slider);var l=BI.createWidget({type:"bi.vertical",items:[{type:"bi.absolute",items:[this.slider]}],hgap:s.SLIDER_WIDTH_HALF,height:s.SLIDER_HEIGHT});return l.element.click(function(e){if(a.enable&&a.isEnabled()&&l.element[0]===e.originalEvent.target){var t=e.clientX-a.element.offset().left-s.SLIDER_WIDTH_HALF,i=a.track.element[0].scrollWidth-s.TRACK_GAP,n=0;t<0&&(n=0),0<t&&t<i&&(n=100*t/a._getGrayTrackLength()),i<=t&&(n=100);var r=BI.parseFloat(n.toFixed(1));a._setAllPosition(r);var o=a._getValueByPercent(r);a.value=o,a.fireEvent(BI.SingleSlider.EVENT_CHANGE)}}),{type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:e,width:"100%",height:s.TRACK_HEIGHT}]}],hgap:s.TRACK_GAP_HALF,height:s.TRACK_HEIGHT},top:3,left:0,width:"100%"},{el:l,top:0,left:0,width:"100%"}]}},_draggable:function(r){var o=this,a=this.options,s=!1,l=0,u=0,c=0,h=new BI.MouseMoveTracker(function(e){if(h.isDragging()){s=!0,l=p(c+(u+=e)),r.element.addClass("dragging");var t=100*l/o._getGrayTrackLength(),i=BI.parseFloat(t.toFixed(1));o._setBlueTrack(i),o._setSliderPosition(i);var n=o._getValueByPercent(i);n=!1===a.digit?n:n.toFixed(a.digit),o.value=n,o.fireEvent(BI.SingleSliderNormal.EVENT_DRAG,n)}},function(){if(!0===s){var e=100*(l=p(l))/o._getGrayTrackLength(),t=BI.parseFloat(e.toFixed(1));o._setSliderPosition(t),u=l=0,c=l,s=!1}r.element.removeClass("dragging"),h.releaseMouseMoves(),o.fireEvent(BI.SingleSlider.EVENT_CHANGE)},window);function p(e){return BI.clamp(e,0,o._getGrayTrackLength())}r.element.on("mousedown",function(e){r.isEnabled()&&(p(c=this.offsetLeft),h.captureMouseMoves(e))})},_createTrack:function(){var t=this;this._constant;return this.grayTrack=BI.createWidget({type:"bi.layout",cls:"gray-track",height:6}),this.blueTrack=BI.createWidget({type:"bi.layout",cls:"blue-track bi-high-light-background",height:6}),this.options.color&&this.blueTrack.element.css({"background-color":this.options.color}),{type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}],ref:function(e){t.track=e}}},_checkValidation:function(e){return!(BI.isNull(e)||e<this.min||e>this.max)},_setBlueTrack:function(e){this.blueTrack.element.css({width:e+"%"})},_setSliderPosition:function(e){this.slider.element.css({left:e+"%"})},_setAllPosition:function(e){this._setSliderPosition(e),this._setBlueTrack(e)},_setVisible:function(e){this.slider.setVisible(e)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(e){var t=BI.parseInt(10*e);return(this.max-this.min)*t/1e3+this.min},_getPercentByValue:function(e){return 100*(e-this.min)/(this.max-this.min)},_setEnable:function(e){BI.SingleSliderNormal.superclass._setEnable.apply(this,[e]),e?this.blueTrack.element.removeClass("disabled-blue-track").addClass("blue-track"):this.blueTrack.element.removeClass("blue-track").addClass("disabled-blue-track")},getValue:function(){return this.value},setValue:function(e){var t=BI.parseFloat(e);isNaN(t)||(this._checkValidation(t)&&(this.value=t),t>this.max&&(this.value=this.max),t<this.min&&(this.value=this.min))},setMinAndMax:function(e){var t=BI.parseFloat(e.min),i=BI.parseFloat(e.max);!isNaN(t)&&!isNaN(i)&&t<i&&(this.min=t,this.max=i)},reset:function(){this._setVisible(!1),this.enable=!1,this.value="",this.min=0,this.max=0,this._setBlueTrack(0)},populate:function(){isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?this._setAllPosition(this._getPercentByValue(this.value)):this._setAllPosition(100))}}),BI.SingleSliderNormal.EVENT_DRAG="EVENT_DRAG",BI.shortcut("bi.single_slider_normal",BI.SingleSliderNormal)},function(e,t){BI.SingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-combo",trigger:{},height:24,text:"",items:[],value:"",attributes:{tabIndex:0}})},_init:function(){BI.SingleTreeCombo.superclass._init.apply(this,arguments);var e=this,t=this.options;this.trigger=BI.createWidget(BI.extend({type:"bi.single_tree_trigger",text:t.text,height:t.height,items:t.items,value:t.value},t.trigger)),this.popup=BI.createWidget({type:"bi.single_level_tree",items:t.items,value:t.value}),this.combo=BI.createWidget({type:"bi.combo",container:t.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){e.fireEvent(BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){e.setValue(e.popup.getValue()),e.combo.hideView(),e.fireEvent(BI.SingleTreeCombo.EVENT_CHANGE)})},populate:function(e){this.combo.populate(e)},setValue:function(e){e=BI.isArray(e)?e:[e],this.trigger.setValue(e),this.popup.setValue(e)},getValue:function(){return this.popup.getValue()}}),BI.SingleTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.single_tree_combo",BI.SingleTreeCombo)},function(e,t){BI.SingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-level-tree",tipText:BI.i18nText("BI-No_Selected_Item"),items:[],value:""})},_init:function(){BI.SingleTreePopup.superclass._init.apply(this,arguments);var e=this,t=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{isDefaultInit:!0},items:t.items,value:t.value,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){e.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){e.fireEvent(BI.SingleTreePopup.EVENT_CHANGE)}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(e){e=BI.isArray(e)?e:[e],this.tree.setValue(e)},populate:function(e){BI.SingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(e)}}),BI.SingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_level_tree",BI.SingleTreePopup)},function(e,t){BI.SingleTreeTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SingleTreeTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-trigger",height:24,text:"",items:[],value:""})},_init:function(){BI.SingleTreeTrigger.superclass._init.apply(this,arguments);var e=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,text:e.text,items:e.items,height:e.height,value:e.value})},_checkTitle:function(){var i=this,n=this.getValue();BI.any(this.options.items,function(e,t){if(BI.contains(n,t.value))return i.trigger.setTitle(t.text||t.value),!0})},setValue:function(e){e=BI.isArray(e)?e:[e],this.options.value=e,this.trigger.setValue(e),this._checkTitle()},getValue:function(){return this.options.value||[]},populate:function(e){BI.SingleTreeTrigger.superclass.populate.apply(this,arguments),this.trigger.populate(e)}}),BI.shortcut("bi.single_tree_trigger",BI.SingleTreeTrigger)},function(e,t){BI.TextValueDownListCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TextValueDownListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-value-down-list-combo",height:24,attributes:{tabIndex:0}})},_init:function(){BI.TextValueDownListCombo.superclass._init.apply(this,arguments);var e,t=this,i=this.options;this._createValueMap(),BI.isNotNull(i.value)&&(e=this._digest(i.value)),this.trigger=BI.createWidget({type:"bi.down_list_select_text_trigger",cls:"text-value-down-list-trigger",height:i.height,items:i.items,text:i.text,value:e}),this.combo=BI.createWidget({type:"bi.down_list_combo",element:this,chooseType:BI.Selection.Single,adjustLength:2,height:i.height,el:this.trigger,value:BI.isNull(e)?[]:[e],items:BI.deepClone(i.items)}),this.combo.on(BI.DownListCombo.EVENT_CHANGE,function(){var e=t.combo.getValue()[0].value;e!==t.value&&(t.setValue(e),t.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE))}),this.combo.on(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,function(){var e=t.combo.getValue()[0].childValue;e!==t.value&&(t.setValue(e),t.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE))})},_createValueMap:function(){var n=this;this.valueMap={},BI.each(BI.flatten(this.options.items),function(e,i){BI.has(i,"el")?BI.each(i.children,function(e,t){n.valueMap[t.value]={value:i.el.value,childValue:t.value}}):n.valueMap[i.value]={value:i.value}})},_digest:function(e){return this.value=e,this.valueMap[e]},setValue:function(e){e=this._digest(e),this.combo.setValue([e]),this.trigger.setValue(e)},getValue:function(){var e=this.combo.getValue()[0];return[e.childValue||e.value]},populate:function(e){this.options.items=BI.flatten(e),this.combo.populate(e),this._createValueMap()}}),BI.TextValueDownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_down_list_combo",BI.TextValueDownListCombo)},function(e,t){BI.DownListSelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.DownListSelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-select-text-trigger",height:24,text:""})},_init:function(){BI.DownListSelectTextTrigger.superclass._init.apply(this,arguments);var e=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,height:e.height,items:this._formatItemArray(e.items),text:e.text,value:BI.isNull(e.value)?"":e.value.childValue||e.value.value})},_formatItemArray:function(){var e=BI.flatten(BI.deepClone(this.options.items)),t=[];return BI.each(e,function(e,i){BI.has(i,"el")?(BI.each(i.children,function(e,t){t.text=i.el.text+"("+t.text+")"}),t=BI.concat(t,i.children)):t.push(i)}),t},setValue:function(e){this.trigger.setValue(e.childValue||e.value)},populate:function(e){this.trigger.populate(this._formatItemArray(e))}}),BI.shortcut("bi.down_list_select_text_trigger",BI.DownListSelectTextTrigger)},function(e,t){BI.TimePopup=BI.inherit(BI.Widget,{props:{baseCls:"bi-date-time-popup",height:68},render:function(){var t=this;return{type:"bi.vtape",items:[{el:{type:"bi.center_adapt",cls:"bi-split-top",items:[{type:"bi.dynamic_date_time_select",value:this.options.value,ref:function(e){t.timeSelect=e}}]},hgap:10,height:44},{el:{type:"bi.grid",items:[[{type:"bi.text_button",cls:"bi-high-light bi-split-top",shadow:!0,text:BI.i18nText("BI-Basic_Clears"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){t.fireEvent(BI.TimePopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-split-left bi-split-right bi-high-light bi-split-top",shadow:!0,text:BI.i18nText("BI-Basic_Now"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){t.fireEvent(BI.TimePopup.BUTTON_NOW_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-high-light bi-split-top",shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){t.fireEvent(BI.TimePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},setValue:function(e){this._checkValueValid(e)?this.timeSelect.setValue():this.timeSelect.setValue({hour:e.hour,minute:e.minute,second:e.second})},getValue:function(){return this.timeSelect.getValue()},_checkValueValid:function(e){return BI.isNull(e)||BI.isEmptyObject(e)||BI.isEmptyString(e)}}),BI.TimePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.TimePopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.TimePopup.BUTTON_NOW_EVENT_CHANGE="BUTTON_NOW_EVENT_CHANGE",BI.TimePopup.CALENDAR_EVENT_CHANGE="CALENDAR_EVENT_CHANGE",BI.shortcut("bi.time_popup",BI.TimePopup)},function(e,t){BI.TimeCombo=BI.inherit(BI.Single,{constants:{popupHeight:80,popupWidth:240,comboAdjustHeight:1,border:1},props:{baseCls:"bi-time-combo bi-border bi-border-radius bi-focus-shadow",width:78,height:22,format:"",allowEdit:!1},render:function(){var i=this,e=this.options;this.storeTriggerValue="",this.storeValue=e.value;var t={type:"bi.time_popup",value:e.value,listeners:[{eventName:BI.TimePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){i.setValue(),i.hidePopupView(),i.fireEvent(BI.TimeCombo.EVENT_CONFIRM)}},{eventName:BI.TimePopup.BUTTON_OK_EVENT_CHANGE,action:function(){i.setValue(i.popup.getValue()),i.hidePopupView(),i.fireEvent(BI.TimeCombo.EVENT_CONFIRM)}},{eventName:BI.TimePopup.BUTTON_NOW_EVENT_CHANGE,action:function(){i._setNowTime()}}],ref:function(e){i.popup=e}};return{type:"bi.htape",items:[{type:"bi.absolute",items:[{el:{type:"bi.combo",container:e.container,toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.time_trigger",height:e.height,allowEdit:e.allowEdit,watermark:e.watermark,format:e.format,value:e.value,ref:function(e){i.trigger=e},listeners:[{eventName:"EVENT_KEY_DOWN",action:function(){i.combo.isViewVisible()&&i.combo.hideView(),i.fireEvent(BI.TimeCombo.EVENT_KEY_DOWN,arguments)}},{eventName:"EVENT_STOP",action:function(){i.combo.isViewVisible()||i.combo.showView()}},{eventName:"EVENT_FOCUS",action:function(){i.storeTriggerValue=i.trigger.getKey(),i.combo.isViewVisible()||i.combo.showView(),i.fireEvent("EVENT_FOCUS")}},{eventName:"EVENT_BLUR",action:function(){i.fireEvent("EVENT_BLUR")}},{eventName:"EVENT_ERROR",action:function(){var e=BI.getDate();i.storeValue={hour:e.getHours(),minute:e.getMinutes(),second:e.getSeconds()},i.fireEvent("EVENT_ERROR")}},{eventName:"EVENT_VALID",action:function(){i.fireEvent("EVENT_VALID")}},{eventName:"EVENT_CHANGE",action:function(){i.fireEvent("EVENT_CHANGE")}},{eventName:"EVENT_CONFIRM",action:function(){if(!i.combo.isViewVisible()){var e=i.storeTriggerValue,t=i.trigger.getKey();BI.isNotEmptyString(t)&&!BI.isEqual(t,e)?(i.storeValue=i.trigger.getValue(),i.setValue(i.trigger.getValue())):BI.isEmptyString(t)&&(i.storeValue=null,i.trigger.setValue()),i.fireEvent("EVENT_CONFIRM")}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:t,width:this.constants.popupWidth,stopPropagation:!1},hideChecker:function(e){return 0===i.triggerBtn.element.find(e.target).length},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){i.popup.setValue(i.storeValue),i.fireEvent(BI.TimeCombo.EVENT_BEFORE_POPUPVIEW)}}],ref:function(e){i.combo=e}},top:0,left:0,right:22,bottom:0},{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button time-font icon-size-16",width:22,height:22,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){i.combo.isViewVisible()||i.combo.showView()}}],ref:function(e){i.triggerBtn=e}},top:0,right:0}]}]}},setValue:function(e){this.storeValue=e,this.trigger.setValue(e)},getValue:function(){return this.storeValue},hidePopupView:function(){this.combo.hideView()},_setNowTime:function(){var e=BI.getDate(),t={hour:e.getHours(),minute:e.getMinutes(),second:e.getSeconds()};this.setValue(t),this.hidePopupView(),this.fireEvent(BI.TimeCombo.EVENT_CONFIRM)}}),BI.TimeCombo.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.TimeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.TimeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.TimeCombo.EVENT_VALID="EVENT_VALID",BI.TimeCombo.EVENT_ERROR="EVENT_ERROR",BI.TimeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.time_combo",BI.TimeCombo)},function(e,t){BI.TimeTrigger=BI.inherit(BI.Trigger,{_const:{COMPARE_FORMAT:"%H:%M:%S",COMPLETE_COMPARE_FORMAT:"%Y-%M-%d %H:%M:%S %P",FORMAT_ARRAY:["%H:%M:%S","%I:%M:%S","%l:%M:%S","%k:%M:%S","%l:%M:%S %p","%l:%M:%S %P","%H:%M:%S %p","%H:%M:%S %P","%l:%M","%k:%M","%I:%M","%H:%M","%M:%S"],DEFAULT_DATE_STRING:"2000-01-01",DEFAULT_HOUR:"00"},props:{extraCls:"bi-time-trigger",value:{},format:"",allowEdit:!1},render:function(){var i=this,e=this.options;return this.storeTriggerValue="",this.storeValue=e.value,{type:"bi.absolute",items:[{el:{type:"bi.sign_editor",height:e.height,validationChecker:function(e){return i._dateCheck(e)},quitChecker:function(){return!1},ref:function(e){i.editor=e},value:this._formatValue(e.value),hgap:4,allowBlank:!0,watermark:BI.isKey(e.watermark)?e.watermark:BI.i18nText("BI-Basic_Unrestricted"),title:BI.bind(this._getTitle,this),listeners:[{eventName:"EVENT_KEY_DOWN",action:function(){i.fireEvent("EVENT_KEY_DOWN",arguments)}},{eventName:"EVENT_FOCUS",action:function(){i.storeTriggerValue=i.getKey(),i.fireEvent("EVENT_FOCUS")}},{eventName:"EVENT_BLUR",action:function(){i.fireEvent("EVENT_BLUR")}},{eventName:"EVENT_STOP",action:function(){i.fireEvent("EVENT_STOP")}},{eventName:"EVENT_VALID",action:function(){i.fireEvent("EVENT_VALID")}},{eventName:"EVENT_ERROR",action:function(){i.fireEvent("EVENT_ERROR")}},{eventName:"EVENT_CONFIRM",action:function(){var e=i.editor.getValue();if(BI.isNotNull(e)&&i.editor.setState(e),BI.isNotEmptyString(e)&&!BI.isEqual(i.storeTriggerValue,i.getKey())){var t=e.match(/\d+/g);i.storeValue={hour:0|t[0],minute:0|t[1],second:0|t[2]}}i.fireEvent("EVENT_CONFIRM")}},{eventName:"EVENT_START",action:function(){i.fireEvent("EVENT_START")}},{eventName:"EVENT_CHANGE",action:function(){i.fireEvent("EVENT_CHANGE")}}]},left:0,right:0,top:0,bottom:0},{el:{type:"bi.text",invisible:e.allowEdit,cls:"show-text",title:BI.bind(this._getTitle,this),hgap:4},left:0,right:0,top:0,bottom:0}]}},_dateCheck:function(i){var n=this._const,r=this;return BI.any(n.FORMAT_ARRAY,function(e,t){return BI.print(BI.parseDateTime(n.DEFAULT_DATE_STRING+" "+r._getCompleteHMS(i,t),n.COMPLETE_COMPARE_FORMAT),t)===i})},_getCompleteHMS:function(e,t){var i=this._const;switch(t){case"%M:%S":e=i.DEFAULT_HOUR+":"+e}return e},_getTitle:function(){var e=this.storeValue||{},t=BI.getDate();return BI.print(BI.getDate(t.getFullYear(),0,1,e.hour,e.minute,e.second),this._getFormatString())},_getFormatString:function(){return this.options.format||this._const.COMPARE_FORMAT},_formatValue:function(e){var t=BI.getDate();return BI.isNotEmptyObject(e)?BI.print(BI.getDate(t.getFullYear(),t.getMonth(),t.getDay(),e.hour,e.minute,e.second),this._getFormatString()):""},getKey:function(){return this.editor.getValue()},setValue:function(e){this.storeValue=e,this.editor.setValue(this._formatValue(e))},getValue:function(){return this.storeValue}}),BI.shortcut("bi.time_trigger",BI.TimeTrigger)},function(e,t){BI.DateInterval=BI.inherit(BI.Single,{constants:{height:24,width:24,lgap:15,offset:0,timeErrorCls:"time-error"},_defaultConfig:function(){var e=BI.DateInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{extraCls:"bi-date-interval",minDate:"1900-01-01",maxDate:"2099-12-31"})},_init:function(){var e=this.options;BI.DateInterval.superclass._init.apply(this,arguments),e.value=e.value||{},this.left=this._createCombo(e.value.start),this.right=this._createCombo(e.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:this,type:"bi.center",height:this.constants.height,items:[{type:"bi.absolute",items:[{el:this.left,left:this.constants.offset,right:this.constants.width/2,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:this.right,left:this.constants.width/2,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[this.label]})},_createCombo:function(e){var i=this,t=this.options,n=BI.createWidget({type:"bi.dynamic_date_combo",behaviors:t.behaviors,value:e});return n.on(BI.DynamicDateCombo.EVENT_ERROR,function(){i._clearTitle(),BI.Bubbles.hide("error"),i.element.removeClass(i.constants.timeErrorCls),i.fireEvent(BI.DateInterval.EVENT_ERROR)}),n.on(BI.DynamicDateCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var e=i.left.getKey(),t=i.right.getKey();i._check(e,t)&&i._compare(e,t)?(i._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),i.element.addClass(i.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),i,{offsetStyle:"center"}),i.fireEvent(BI.DateInterval.EVENT_ERROR)):(i._clearTitle(),i.element.removeClass(i.constants.timeErrorCls))}),n.on(BI.DynamicDateCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var e=i.left.getKey(),t=i.right.getKey();i._check(e,t)&&i._compare(e,t)?(i._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),i.element.addClass(i.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),i,{offsetStyle:"center"}),i.fireEvent(BI.DateInterval.EVENT_ERROR)):(i._clearTitle(),i.element.removeClass(i.constants.timeErrorCls))}),n.on(BI.DynamicDateCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var e=i.left.getKey(),t=i.right.getKey();i._check(e,t)&&i._compare(e,t)?(i._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),i.element.addClass(i.constants.timeErrorCls),i.fireEvent(BI.DateInterval.EVENT_ERROR)):(i._clearTitle(),i.element.removeClass(i.constants.timeErrorCls),i.fireEvent(BI.DateInterval.EVENT_CHANGE))}),n},_dateCheck:function(e){return BI.print(BI.parseDateTime(e,"%Y-%x-%d"),"%Y-%x-%d")===e||BI.print(BI.parseDateTime(e,"%Y-%X-%d"),"%Y-%X-%d")===e||BI.print(BI.parseDateTime(e,"%Y-%x-%e"),"%Y-%x-%e")===e||BI.print(BI.parseDateTime(e,"%Y-%X-%e"),"%Y-%X-%e")===e},_checkVoid:function(e){var t=this.options;return!BI.checkDateVoid(e.year,e.month,e.day,t.minDate,t.maxDate)[0]},_check:function(e,t){var i=e.match(/\d+/g),n=t.match(/\d+/g);return this._dateCheck(e)&&BI.checkDateLegal(e)&&this._checkVoid({year:i[0],month:i[1],day:i[2]})&&this._dateCheck(t)&&BI.checkDateLegal(t)&&this._checkVoid({year:n[0],month:n[1],day:n[2]})},_compare:function(e,t){return e=BI.print(BI.parseDateTime(e,"%Y-%X-%d"),"%Y-%X-%d"),t=BI.print(BI.parseDateTime(t,"%Y-%X-%d"),"%Y-%X-%d"),BI.isNotNull(e)&&BI.isNotNull(t)&&t<e},_setTitle:function(e){this.left.setTitle(e),this.right.setTitle(e),this.label.setTitle(e)},_clearTitle:function(){this.left.setTitle(""),this.right.setTitle(""),this.label.setTitle("")},setValue:function(e){e=e||{},this.left.setValue(e.start),this.right.setValue(e.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.DateInterval.EVENT_VALID="EVENT_VALID",BI.DateInterval.EVENT_ERROR="EVENT_ERROR",BI.DateInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.date_interval",BI.DateInterval)},function(e,t){BI.TimeInterval=BI.inherit(BI.Single,{constants:{height:24,width:24,lgap:15,offset:0,timeErrorCls:"time-error"},_defaultConfig:function(){var e=BI.TimeInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{extraCls:"bi-time-interval",minDate:"1900-01-01",maxDate:"2099-12-31"})},_init:function(){var e=this.options;BI.TimeInterval.superclass._init.apply(this,arguments),e.value=e.value||{},this.left=this._createCombo(e.value.start),this.right=this._createCombo(e.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:this,type:"bi.center",height:this.constants.height,items:[{type:"bi.absolute",items:[{el:this.left,left:this.constants.offset,right:this.constants.width/2,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:this.right,left:this.constants.width/2,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[this.label]})},_createCombo:function(e){var i=this,t=this.options,n=BI.createWidget({type:"bi.dynamic_date_time_combo",behaviors:t.behaviors,value:e});return n.on(BI.DynamicDateTimeCombo.EVENT_ERROR,function(){i._clearTitle(),BI.Bubbles.hide("error"),i.element.removeClass(i.constants.timeErrorCls),i.fireEvent(BI.TimeInterval.EVENT_ERROR)}),n.on(BI.DynamicDateTimeCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var e=i.left.getKey(),t=i.right.getKey();i.left.isValid()&&i.right.isValid()&&i._check(e,t)&&i._compare(e,t)?(i._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),i.element.addClass(i.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),i,{offsetStyle:"center"}),i.fireEvent(BI.TimeInterval.EVENT_ERROR)):(i._clearTitle(),i.element.removeClass(i.constants.timeErrorCls))}),n.on(BI.DynamicDateTimeCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var e=i.left.getKey(),t=i.right.getKey();i.left.isValid()&&i.right.isValid()&&i._check(e,t)&&i._compare(e,t)?(i._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),i.element.addClass(i.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),i,{offsetStyle:"center"}),i.fireEvent(BI.TimeInterval.EVENT_ERROR)):(i._clearTitle(),i.element.removeClass(i.constants.timeErrorCls))}),n.on(BI.DynamicDateTimeCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var e=i.left.getKey(),t=i.right.getKey();i.left.isValid()&&i.right.isValid()&&i._check(e,t)&&i._compare(e,t)?(i._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),i.element.addClass(i.constants.timeErrorCls),i.fireEvent(BI.TimeInterval.EVENT_ERROR)):(i._clearTitle(),i.element.removeClass(i.constants.timeErrorCls),i.fireEvent(BI.TimeInterval.EVENT_CHANGE))}),n},_dateCheck:function(e){return BI.print(BI.parseDateTime(e,"%Y-%x-%d %H:%M:%S"),"%Y-%x-%d %H:%M:%S")===e||BI.print(BI.parseDateTime(e,"%Y-%X-%d %H:%M:%S"),"%Y-%X-%d %H:%M:%S")===e||BI.print(BI.parseDateTime(e,"%Y-%x-%e %H:%M:%S"),"%Y-%x-%e %H:%M:%S")===e||BI.print(BI.parseDateTime(e,"%Y-%X-%e %H:%M:%S"),"%Y-%X-%e %H:%M:%S")===e},_checkVoid:function(e){var t=this.options;return!BI.checkDateVoid(e.year,e.month,e.day,t.minDate,t.maxDate)[0]},_check:function(e,t){var i=e.match(/\d+/g),n=t.match(/\d+/g);return this._dateCheck(e)&&BI.checkDateLegal(e)&&this._checkVoid({year:i[0],month:i[1],day:i[2]})&&this._dateCheck(t)&&BI.checkDateLegal(t)&&this._checkVoid({year:n[0],month:n[1],day:n[2]})},_compare:function(e,t){return e=BI.print(BI.parseDateTime(e,"%Y-%X-%d %H:%M:%S"),"%Y-%X-%d %H:%M:%S"),t=BI.print(BI.parseDateTime(t,"%Y-%X-%d %H:%M:%S"),"%Y-%X-%d %H:%M:%S"),BI.isNotNull(e)&&BI.isNotNull(t)&&t<e},_setTitle:function(e){this.left.setTitle(e),this.right.setTitle(e),this.label.setTitle(e)},_clearTitle:function(){this.left.setTitle(""),this.right.setTitle(""),this.label.setTitle("")},setValue:function(e){e=e||{},this.left.setValue(e.start),this.right.setValue(e.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.TimeInterval.EVENT_VALID="EVENT_VALID",BI.TimeInterval.EVENT_ERROR="EVENT_ERROR",BI.TimeInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.time_interval",BI.TimeInterval)},function(e,t){BI.TimePeriods=BI.inherit(BI.Single,{constants:{height:24,width:24,lgap:15,offset:0},props:{extraCls:"bi-time-interval",value:{}},render:function(){var t=this,e=this.options;return{type:"bi.absolute",height:this.constants.height,items:[{el:{type:"bi.horizontal_auto",items:[{type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-",ref:function(e){t.label=e}}]},top:0,left:0,right:0,bottom:0},{el:{type:"bi.center",height:this.constants.height,items:[{type:"bi.absolute",items:[{el:BI.extend({ref:function(e){t.left=e}},this._createCombo(e.value.start)),left:this.constants.offset,right:this.constants.width/2,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:BI.extend({ref:function(e){t.right=e}},this._createCombo(e.value.end)),left:this.constants.width/2,right:this.constants.offset,top:0,bottom:0}]}]},top:0,left:0,right:0,bottom:0}]}},_createCombo:function(e){var t=this;return{type:"bi.time_combo",value:e,listeners:[{eventName:BI.TimeCombo.EVENT_BEFORE_POPUPVIEW,action:function(){t.left.hidePopupView(),t.right.hidePopupView()}},{eventName:BI.TimeCombo.EVENT_CHANGE,action:function(){t.fireEvent(BI.TimePeriods.EVENT_CHANGE)}},{eventName:BI.TimeCombo.EVENT_CONFIRM,action:function(){t.fireEvent(BI.TimePeriods.EVENT_CONFIRM)}}]}},setValue:function(e){e=e||{},this.left.setValue(e.start),this.right.setValue(e.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.TimePeriods.EVENT_CONFIRM="EVENT_CONFIRM",BI.TimePeriods.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.time_periods",BI.TimePeriods)},function(e,t){BI.DynamicYearCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-card"},render:function(){var e=this;return{type:"bi.vertical",items:[{type:"bi.label",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),textAlign:"left",height:24},{type:"bi.dynamic_date_param_item",ref:function(){e.item=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){e.fireEvent("EVENT_CHANGE")}}]}],vgap:10,hgap:10}},_createValue:function(e,t){return{dateType:e,value:Math.abs(t),offset:0<t?1:0}},setValue:function(e){e=e||{year:0},this.item.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR,e.year))},getValue:function(){var e=this.item.getValue();return{year:0===e.offset?-e.value:e.value}}}),BI.DynamicYearCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_card",BI.DynamicYearCard)},function(e,t){BI.StaticYearCard=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.StaticYearCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-card",behaviors:{},min:"1900-01-01",max:"2099-12-31"})},_createYearCalendar:function(e){var t=this.options,i=this._year,n=BI.createWidget({type:"bi.year_calendar",behaviors:t.behaviors,min:t.min,max:t.max,logic:{dynamic:!0},year:i+12*e});return n.setValue(this._year),n},_init:function(){BI.StaticYearCard.superclass._init.apply(this,arguments);var t=this,e=this.options;this.selectedYear=this._year=BI.getDate().getFullYear(),this.backBtn=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:25,height:25,value:-1,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){t.navigation.setSelect(t.navigation.getSelect()-1),t._checkLeftValid(),t._checkRightValid()}}]}),this.preBtn=BI.createWidget({type:"bi.icon_button",cls:"next-page-h-font",width:25,height:25,value:1,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){t.navigation.setSelect(t.navigation.getSelect()+1),t._checkLeftValid(),t._checkRightValid()}}]}),this.navigation=BI.createWidget({type:"bi.navigation",direction:"top",element:this,single:!0,logic:{dynamic:!0},tab:{type:"bi.htape",cls:"bi-split-top bi-split-bottom",height:30,items:[{el:{type:"bi.center_adapt",items:[t.backBtn]},width:25},{type:"bi.layout"},{el:{type:"bi.center_adapt",items:[t.preBtn]},width:25}]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(t.selectedYear);var e=this.getSelectedCard();t.backBtn.setEnable(!e.isFrontYear()),t.preBtn.setEnable(!e.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){t.selectedYear=this.getValue(),t.fireEvent(BI.Controller.EVENT_CHANGE,arguments),t.fireEvent(BI.StaticYearCard.EVENT_CHANGE,t.selectedYear)}),BI.isKey(e.value)&&this.setValue(e.value)},_checkLeftValid:function(){this.options;return this.backBtn.setEnable(!0),!0},_checkRightValid:function(){this.options;return this.preBtn.setEnable(!0),!0},getValue:function(){return{year:this.selectedYear}},setValue:function(e){var t=this.options,i=(e=e||{}).year;BI.checkDateVoid(i,1,1,t.min,t.max)[0]?(i=BI.getDate().getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(i)),this.navigation.setValue("")):(this.selectedYear=BI.parseInt(i),this.navigation.setSelect(BI.YearCalendar.getPageByYear(i)),this.navigation.setValue(this.selectedYear)),this._checkLeftValid(),this._checkRightValid()}}),BI.StaticYearCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.static_year_card",BI.StaticYearCard)},function(e,t){BI.DynamicYearCombo=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-combo bi-border bi-focus-shadow",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:22},_init:function(){BI.DynamicYearCombo.superclass._init.apply(this,arguments);var t=this,e=this.options;this.storeValue=e.value,this.trigger=BI.createWidget({type:"bi.dynamic_year_trigger",min:e.min,max:e.max,height:e.height,value:e.value||""}),this.trigger.on(BI.DynamicYearTrigger.EVENT_KEY_DOWN,function(){t.combo.isViewVisible()&&t.combo.hideView()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_FOCUS,function(){t.storeTriggerValue=this.getKey()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_START,function(){t.combo.isViewVisible()&&t.combo.hideView()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_STOP,function(){t.combo.showView()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_ERROR,function(){t.combo.isViewVisible()&&t.combo.hideView()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_CONFIRM,function(){t.combo.isViewVisible()||(this.getKey()&&this.getKey()!==t.storeTriggerValue?(t.storeValue=t.trigger.getValue(),t.setValue(t.storeValue)):this.getKey()||(t.storeValue=null,t.setValue()),t._checkDynamicValue(t.storeValue),t.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM))}),this.combo=BI.createWidget({type:"bi.combo",container:e.container,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.dynamic_year_popup",ref:function(){t.popup=this},listeners:[{eventName:BI.DynamicYearPopup.EVENT_CHANGE,action:function(){t.setValue(t.popup.getValue()),t.combo.hideView(),t.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){t.setValue(),t.combo.hideView(),t.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var e=BI.getDate();t.setValue({type:BI.DynamicYearCombo.Static,value:{year:e.getFullYear()}}),t.combo.hideView(),t.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE,action:function(){t.setValue(t.popup.getValue()),t.combo.hideView(),t.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}],behaviors:e.behaviors,min:e.min,max:e.max},value:e.value||""}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){t.popup.setValue(t.storeValue),t.fireEvent(BI.DynamicYearCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.htape",element:this,ref:function(){t.comboWrapper=this},items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24,ref:function(){t.changeIcon=this}},width:24},this.combo]}),this._checkDynamicValue(e.value)},_checkDynamicValue:function(e){var t=null;switch(BI.isNotNull(e)&&(t=e.type),t){case BI.DynamicYearCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},setValue:function(e){this.storeValue=e,this.trigger.setValue(e),this._checkDynamicValue(e)},getValue:function(){return this.storeValue}}),BI.DynamicYearCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_year_combo",BI.DynamicYearCombo),BI.extend(BI.DynamicYearCombo,{Static:1,Dynamic:2})},function(e,t){BI.DynamicYearPopup=BI.inherit(BI.Widget,{constants:{tabHeight:30,buttonHeight:24},props:{baseCls:"bi-year-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31",width:180,height:240},render:function(){var e=this,t=(this.options,this.constants);return this.storeValue={type:BI.DynamicYearCombo.Static},{type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",cls:"bi-split-top bi-high-light",textHeight:t.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){e.fireEvent(BI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",textHeight:t.buttonHeight-1,cls:"bi-split-left bi-split-right bi-high-light bi-split-top",shadow:!0,text:BI.i18nText("BI-Basic_Current_Year"),ref:function(){e.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){e.fireEvent(BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-split-top bi-high-light",textHeight:t.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){e.fireEvent(BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Basic_Current_Year")),this.textButton.setEnable(!0);else{var e=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());e=BI.print(e,"%Y"),this.textButton.setValue(e),this.textButton.setEnable(!1)}},_getTabJson:function(){var t=this,i=this.options;return{type:"bi.tab",ref:function(){t.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-split-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Basic_Year_Fen"),value:BI.DynamicYearCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicYearCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(e){switch(e){case BI.DynamicYearCombo.Dynamic:return{type:"bi.dynamic_year_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){t._setInnerValue(t.year,e)}}],ref:function(){t.dynamicPane=this}};case BI.DynamicYearCombo.Static:default:return{type:"bi.static_year_card",behaviors:i.behaviors,min:t.options.min,max:t.options.max,listeners:[{eventName:BI.StaticYearCard.EVENT_CHANGE,action:function(){t.fireEvent(BI.DynamicYearPopup.EVENT_CHANGE)}}],ref:function(){t.year=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){switch(t.dateTab.getSelect()){case BI.DynamicYearCombo.Static:var e=BI.DynamicDateHelper.getCalculation(t.dynamicPane.getValue());t.year.setValue({year:e.getFullYear()}),t._setInnerValue();break;case BI.DynamicYearCombo.Dynamic:default:t.storeValue&&t.storeValue.type===BI.DynamicYearCombo.Dynamic?t.dynamicPane.setValue(t.storeValue.value):t.dynamicPane.setValue({year:0}),t._setInnerValue()}}}]}},setValue:function(e){this.storeValue=e;var t,i;switch(t=(e=e||{}).type||BI.DynamicDateCombo.Static,i=e.value||e,this.dateTab.setSelect(t),t){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(i),this._setInnerValue();break;case BI.DynamicDateCombo.Static:default:this.year.setValue(i),this.textButton.setValue(BI.i18nText("BI-Basic_Current_Year")),this.textButton.setEnable(!0)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicYearPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_popup",BI.DynamicYearPopup)},function(e,t){BI.DynamicYearTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2},_defaultConfig:function(){return BI.extend(BI.DynamicYearTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-year-trigger",min:"1900-01-01",max:"2099-12-31",height:24})},beforeInit:function(e){this.options.title=BI.bind(this._titleCreator,this),e()},_init:function(){BI.DynamicYearTrigger.superclass._init.apply(this,arguments);var t=this,i=this.options,e=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:i.height,validationChecker:function(e){return""===e||BI.isPositiveInteger(e)&&!BI.checkDateVoid(e,1,1,i.min,i.max)[0]},quitChecker:function(e){return!1},hgap:e.hgap,vgap:e.vgap,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,errorText:function(){return BI.i18nText("BI-Year_Trigger_Invalid_Text")}}),this.editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){t.fireEvent(BI.DynamicYearTrigger.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){t.fireEvent(BI.DynamicYearTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){t.fireEvent(BI.DynamicYearTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var e=t.editor.getValue();BI.isNotNull(e)&&t.editor.setValue(e),BI.isNotEmptyString(e)&&(t.storeValue={type:BI.DynamicDateCombo.Static,value:{year:e}}),t.fireEvent(BI.DynamicYearTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){t.editor.isValid()&&t.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){t.fireEvent(BI.DynamicYearTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){t.fireEvent(BI.DynamicYearTrigger.EVENT_ERROR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-year-text",text:BI.i18nText("BI-Multi_Date_Year"),width:i.height},width:i.height},{el:{type:"bi.trigger_icon_button",width:i.height},width:i.height}]}),this.setValue(i.value)},_getText:function(e){var t="";return BI.isNotNull(e.year)&&0!==BI.parseInt(e.year)&&(t+=Math.abs(e.year)+BI.i18nText("BI-Basic_Year")+(e.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),t},_setInnerValue:function(e,t){var i=BI.print(e,"%Y");this.editor.setState(i),this.editor.setValue(i)},_titleCreator:function(){var e=this.storeValue||{},t=e.type||BI.DynamicDateCombo.Static,i=e.value;if(!this.editor.isValid())return"";switch(t){case BI.DynamicDateCombo.Dynamic:var n=this._getText(i),r=BI.getDate();r=BI.DynamicDateHelper.getCalculation(i);var o=BI.print(r,"%Y");return BI.isEmptyString(n)?o:n+":"+o;case BI.DynamicDateCombo.Static:default:return(i=i||{}).year}},setValue:function(e){var t,i,n=BI.getDate();switch(this.storeValue=e,BI.isNotNull(e)&&(t=e.type||BI.DynamicDateCombo.Static,i=e.value||e),t){case BI.DynamicDateCombo.Dynamic:var r=this._getText(i);n=BI.DynamicDateHelper.getCalculation(i),this._setInnerValue(n,r);break;case BI.DynamicDateCombo.Static:default:i=i||{},this.editor.setState(i.year),this.editor.setValue(i.year)}},getValue:function(){return this.storeValue},getKey:function(){return 0|this.editor.getValue()}}),BI.DynamicYearTrigger.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.DynamicYearTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearTrigger.EVENT_START="EVENT_START",BI.DynamicYearTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearTrigger.EVENT_STOP="EVENT_STOP",BI.shortcut("bi.dynamic_year_trigger",BI.DynamicYearTrigger)},function(e,t){BI.DynamicYearMonthCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-month-card"},render:function(){var e=this;return{type:"bi.vertical",items:[{type:"bi.label",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),textAlign:"left",height:24},{type:"bi.dynamic_date_param_item",ref:function(){e.year=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){e.fireEvent("EVENT_CHANGE")}}]},{type:"bi.dynamic_date_param_item",dateType:BI.DynamicDateCard.TYPE.MONTH,ref:function(){e.month=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){e.fireEvent("EVENT_CHANGE")}}]}],vgap:10,hgap:10}},_createValue:function(e,t){return{dateType:e,value:Math.abs(t),offset:0<t?1:0}},setValue:function(e){e=e||{year:0,month:0},this.year.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR,e.year)),this.month.setValue(this._createValue(BI.DynamicDateCard.TYPE.MONTH,e.month))},getValue:function(){var e=this.year.getValue(),t=this.month.getValue();return{year:0===e.offset?-e.value:e.value,month:0===t.offset?-t.value:t.value}}}),BI.DynamicYearMonthCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_month_card",BI.DynamicYearMonthCard)},function(e,t){BI.StaticYearMonthCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-static-year-month-card",behaviors:{}},_createMonths:function(){var n=this,e=[1,7,2,8,3,9,4,10,5,11,6,12],t=[];return t.push(e.slice(0,2)),t.push(e.slice(2,4)),t.push(e.slice(4,6)),t.push(e.slice(6,8)),t.push(e.slice(8,10)),t.push(e.slice(10,12)),BI.map(t,function(i,e){return BI.map(e,function(t,e){return{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:23,width:38,value:e,text:e,ref:function(e){n.monthMap[0===t?i:i+6]=e}}})})},render:function(){var t=this,e=this.options;return this.monthMap={},{type:"bi.vertical",items:[{type:"bi.year_picker",min:e.min,max:e.max,ref:function(){t.yearPicker=this},behaviors:e.behaviors,height:30,listeners:[{eventName:BI.YearPicker.EVENT_CHANGE,action:function(){var e=this.getValue();t._checkMonthStatus(e),t.setValue({year:e,month:t.selectedMonth})}}]},{type:"bi.button_group",cls:"bi-split-top",behaviors:e.behaviors,ref:function(){t.month=this},items:this._createMonths(),layouts:[BI.LogicFactory.createLogic("table",BI.extend({dynamic:!0},{columns:2,rows:6,columnSize:[.5,.5],rowSize:25})),{type:"bi.center_adapt",vgap:1,hgap:2}],value:e.value,listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(){t.selectedYear=t.yearPicker.getValue(),t.selectedMonth=this.getValue()[0],t.fireEvent(BI.StaticYearMonthCard.EVENT_CHANGE)}}]}]}},mounted:function(){this._checkMonthStatus(this.selectedYear)},_checkMonthStatus:function(e){var t=this.options,i=BI.parseDateTime(t.min,"%Y-%X-%d"),n=BI.parseDateTime(t.max,"%Y-%X-%d"),r=i.getFullYear(),o=n.getFullYear(),a=0,s=11;r===e&&(a=i.getMonth()),o===e&&(s=n.getMonth());var l=e<r||o<e;BI.each(this.monthMap,function(e,t){var i=e<a||s<e;t.setEnable(!l&&!i)})},setMinDate:function(e){this.options.min!==e&&(this.options.min=e,this.yearPicker.setMinDate(e),this._checkMonthStatus(this.selectedYear))},setMaxDate:function(e){this.options.max!==e&&(this.options.max=e,this.yearPicker.setMaxDate(e),this._checkMonthStatus(this.selectedYear))},getValue:function(){return{year:this.selectedYear,month:this.selectedMonth}},setValue:function(e){var t=this.options,i={};if(i.year=e.year||0,i.month=e.month||0,0===i.year||0===i.month||BI.checkDateVoid(i.year,i.month,1,t.min,t.max)[0]){var n=i.year||BI.getDate().getFullYear();this.selectedYear=n,this.selectedMonth="",this.yearPicker.setValue(n),this.month.setValue()}else this.selectedYear=BI.parseInt(i.year),this.selectedMonth=BI.parseInt(i.month),this.yearPicker.setValue(this.selectedYear),this.month.setValue(this.selectedMonth)}}),BI.StaticYearMonthCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.static_year_month_card",BI.StaticYearMonthCard)},function(e,t){BI.DynamicYearMonthCombo=BI.inherit(BI.Single,{props:{baseCls:"bi-year-month-combo bi-border bi-focus-shadow",behaviors:{},minDate:"1900-01-01",maxDate:"2099-12-31",height:22},_init:function(){BI.DynamicYearMonthCombo.superclass._init.apply(this,arguments);var i=this,e=this.options;this.storeValue=e.value,this.storeTriggerValue="",this.trigger=BI.createWidget({type:"bi.dynamic_year_month_trigger",min:e.minDate,max:e.maxDate,height:e.height,value:e.value||""}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_KEY_DOWN,function(){i.combo.isViewVisible()&&i.combo.hideView()}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_START,function(){i.combo.isViewVisible()&&i.combo.hideView()}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_STOP,function(){i.combo.showView()}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_ERROR,function(){i.combo.isViewVisible()&&i.combo.hideView(),i.fireEvent(BI.DynamicYearMonthCombo.EVENT_ERROR)}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_VALID,function(){i.fireEvent(BI.DynamicYearMonthCombo.EVENT_VALID)}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_CONFIRM,function(){var e=i.storeTriggerValue,t=i.trigger.getKey();BI.isNotEmptyString(t)&&!BI.isEqual(t,e)&&(i.storeValue=i.trigger.getValue(),i.setValue(i.trigger.getValue())),i._checkDynamicValue(i.storeValue),i.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM)}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_FOCUS,function(){i.storeTriggerValue=i.trigger.getKey(),i.fireEvent(BI.DynamicYearMonthCombo.EVENT_FOCUS)}),this.combo=BI.createWidget({type:"bi.combo",container:e.container,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:100,stopPropagation:!1,el:{type:"bi.dynamic_year_month_popup",ref:function(){i.popup=this},listeners:[{eventName:BI.DynamicYearMonthPopup.EVENT_CHANGE,action:function(){i.setValue(i.popup.getValue()),i.combo.hideView(),i.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){i.setValue(),i.combo.hideView(),i.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var e=BI.getDate();i.setValue({type:BI.DynamicYearMonthCombo.Static,value:{year:e.getFullYear(),month:e.getMonth()+1}}),i.combo.hideView(),i.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE,action:function(){i.setValue(i.popup.getValue()),i.combo.hideView(),i.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}],behaviors:e.behaviors,min:e.minDate,max:e.maxDate},value:e.value||""}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){i.popup.setValue(i.storeValue),i.fireEvent(BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.htape",element:this,ref:function(){i.comboWrapper=this},items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24,ref:function(){i.changeIcon=this}},width:24},this.combo]}),this._checkDynamicValue(e.value)},_checkDynamicValue:function(e){var t=null;switch(BI.isNotNull(e)&&(t=e.type),t){case BI.DynamicYearMonthCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},hideView:function(){this.combo.hideView()},setValue:function(e){this.storeValue=e,this.trigger.setValue(e),this._checkDynamicValue(e)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()},isValid:function(){return this.trigger.isValid()}}),BI.DynamicYearMonthCombo.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearMonthCombo.EVENT_VALID="EVENT_VALID",BI.DynamicYearMonthCombo.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearMonthCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_year_month_combo",BI.DynamicYearMonthCombo),BI.extend(BI.DynamicYearMonthCombo,{Static:1,Dynamic:2})},function(e,t){BI.DynamicYearMonthPopup=BI.inherit(BI.Widget,{constants:{tabHeight:30,buttonHeight:24},props:{baseCls:"bi-year-month-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31",width:180,height:240},render:function(){var e=this,t=(this.options,this.constants);return this.storeValue={type:BI.DynamicYearMonthCombo.Static},{type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",cls:"bi-split-top bi-high-light",textHeight:t.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){e.fireEvent(BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-split-left bi-split-right bi-high-light bi-split-top",textHeight:t.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_Current_Month"),ref:function(){e.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){e.fireEvent(BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-split-top bi-high-light",textHeight:t.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){e.fireEvent(BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Basic_Current_Month")),this.textButton.setEnable(!0);else{var e=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());e=BI.print(e,"%Y-%x"),this.textButton.setValue(e),this.textButton.setEnable(!1)}},_getTabJson:function(){var t=this,i=this.options;return{type:"bi.tab",ref:function(){t.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-split-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Basic_Year_Month"),value:BI.DynamicYearCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicYearCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(e){switch(e){case BI.DynamicYearCombo.Dynamic:return{type:"bi.dynamic_year_month_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){t._setInnerValue(t.year,e)}}],ref:function(){t.dynamicPane=this}};case BI.DynamicYearCombo.Static:default:return{type:"bi.static_year_month_card",behaviors:i.behaviors,min:t.options.min,max:t.options.max,listeners:[{eventName:BI.StaticYearMonthCard.EVENT_CHANGE,action:function(){t.fireEvent(BI.DynamicYearMonthPopup.EVENT_CHANGE)}}],ref:function(){t.year=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){switch(t.dateTab.getSelect()){case BI.DynamicYearCombo.Static:var e=BI.DynamicDateHelper.getCalculation(t.dynamicPane.getValue());t.year.setValue({year:e.getFullYear(),month:e.getMonth()+1}),t._setInnerValue();break;case BI.DynamicYearCombo.Dynamic:default:t.storeValue&&t.storeValue.type===BI.DynamicYearCombo.Dynamic?t.dynamicPane.setValue(t.storeValue.value):t.dynamicPane.setValue({year:0}),t._setInnerValue()}}}]}},setMinDate:function(e){this.options.min!==e&&(this.options.min=e,this.year.setMinDate(e))},setMaxDate:function(e){this.options.max!==e&&(this.options.max=e,this.year.setMaxDate(e))},setValue:function(e){this.storeValue=e;var t,i;switch(t=(e=e||{}).type||BI.DynamicDateCombo.Static,i=e.value||e,this.dateTab.setSelect(t),t){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(i),this._setInnerValue();break;case BI.DynamicDateCombo.Static:default:this.year.setValue(i),this.textButton.setValue(BI.i18nText("BI-Basic_Current_Month")),this.textButton.setEnable(!0)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicYearMonthPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_month_popup",BI.DynamicYearMonthPopup)},function(e,t){BI.DynamicYearMonthTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2},props:{extraCls:"bi-year-month-trigger",min:"1900-01-01",max:"2099-12-31",height:22},beforeInit:function(e){this.options.title=BI.bind(this._titleCreator,this),e()},_init:function(){BI.DynamicYearMonthTrigger.superclass._init.apply(this,arguments);var e=this.options;this.yearEditor=this._createEditor(!0),this.monthEditor=this._createEditor(!1),BI.createWidget({element:this,type:"bi.htape",items:[{type:"bi.center",items:[{type:"bi.htape",items:[this.yearEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Year"),width:e.height},width:e.height}]},{type:"bi.htape",items:[this.monthEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Month"),width:e.height},width:e.height}]}]},{el:{type:"bi.trigger_icon_button",width:e.height},width:e.height}]}),this.setValue(e.value)},_createEditor:function(t){var i=this,n=this.options,e=this._const,r=BI.parseDateTime(n.min,"%Y-%X-%d"),o=BI.createWidget({type:"bi.sign_editor",height:n.height,validationChecker:function(e){return t?""===e||BI.isPositiveInteger(e)&&!BI.checkDateVoid(e,e===r.getFullYear()?r.getMonth()+1:1,1,n.min,n.max)[0]:""===e||BI.isPositiveInteger(e)&&1<=e&&e<=12&&!BI.checkDateVoid(BI.getDate().getFullYear(),e,1,n.min,n.max)[0]},quitChecker:function(){return!1},watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(e){return BI.i18nText("BI-Year_Trigger_Invalid_Text")},hgap:e.hgap,vgap:e.vgap,allowBlank:!0});return o.on(BI.SignEditor.EVENT_KEY_DOWN,function(){i.fireEvent(BI.DynamicYearMonthTrigger.EVENT_KEY_DOWN)}),o.on(BI.SignEditor.EVENT_FOCUS,function(){i.fireEvent(BI.DynamicYearMonthTrigger.EVENT_FOCUS)}),o.on(BI.SignEditor.EVENT_STOP,function(){i.fireEvent(BI.DynamicYearMonthTrigger.EVENT_STOP)}),o.on(BI.SignEditor.EVENT_CONFIRM,function(){i._doEditorConfirm(o),i.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM)}),o.on(BI.SignEditor.EVENT_SPACE,function(){o.isValid()&&o.blur()}),o.on(BI.SignEditor.EVENT_START,function(){i.fireEvent(BI.DynamicYearMonthTrigger.EVENT_START)}),o.on(BI.SignEditor.EVENT_ERROR,function(){i.fireEvent(BI.DynamicYearMonthTrigger.EVENT_ERROR)}),o.on(BI.SignEditor.EVENT_VALID,function(){var e=i.yearEditor.getValue(),t=i.monthEditor.getValue();BI.isNotEmptyString(e)&&BI.isNotEmptyString(t)&&BI.isPositiveInteger(e)&&1<=t&&t<=12&&!BI.checkDateVoid(e,t,1,n.min,n.max)[0]&&i.fireEvent(BI.DynamicYearMonthTrigger.EVENT_VALID)}),o.on(BI.SignEditor.EVENT_CHANGE,function(){t&&i._autoSwitch(o)}),o},_titleCreator:function(){var e=this.storeValue||{},t=e.type||BI.DynamicDateCombo.Static,i=e.value;if(!this.monthEditor.isValid()||!this.yearEditor.isValid())return"";switch(t){case BI.DynamicDateCombo.Dynamic:var n=this._getText(i),r=BI.getDate();r=BI.DynamicDateHelper.getCalculation(i);var o=BI.print(r,"%Y-%x");return BI.isEmptyString(n)?o:n+":"+o;case BI.DynamicDateCombo.Static:default:return i=i||{},this._getStaticTitle(i)}},_doEditorConfirm:function(e){var t=e.getValue();BI.isNotNull(t)&&e.setValue(t);var i=this.monthEditor.getValue();this.storeValue={type:BI.DynamicDateCombo.Static,value:{year:this.yearEditor.getValue(),month:BI.isEmptyString(this.monthEditor.getValue())?"":i}}},_yearCheck:function(e){var t=BI.print(BI.parseDateTime(e,"%Y-%X-%d"),"%Y-%X-%d");return BI.print(BI.parseDateTime(e,"%Y"),"%Y")===e&&t>=this.options.min&&t<=this.options.max},_autoSwitch:function(e){var t=e.getValue();BI.isNotEmptyString(t)&&BI.checkDateLegal(t)&&4===t.length&&this._yearCheck(t)&&(this._doEditorConfirm(e),this.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM),this.monthEditor.focus())},_getText:function(e){var t="";return BI.isNotNull(e.year)&&0!==BI.parseInt(e.year)&&(t+=Math.abs(e.year)+BI.i18nText("BI-Basic_Year")+(e.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),BI.isNotNull(e.month)&&0!==BI.parseInt(e.month)&&(t+=Math.abs(e.month)+BI.i18nText("BI-Basic_Month")+(e.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),t},_setInnerValue:function(e,t){this.yearEditor.setValue(e.getFullYear()),this.monthEditor.setValue(e.getMonth()+1)},_getStaticTitle:function(e){switch(e=e||{},!(BI.isNull(e.year)||BI.isEmptyString(e.year))<<1|!(BI.isNull(e.month)||BI.isEmptyString(e.month))){case 0:return"";case 1:return e.month;case 2:return e.year;case 3:default:return e.year+"-"+e.month}},setValue:function(e){var t,i,n=BI.getDate();switch(this.storeValue=e,BI.isNotNull(e)&&(t=e.type||BI.DynamicDateCombo.Static,i=e.value||e),t){case BI.DynamicDateCombo.Dynamic:var r=this._getText(i);n=BI.DynamicDateHelper.getCalculation(i),this._setInnerValue(n,r);break;case BI.DynamicDateCombo.Static:default:i=i||{};var o=BI.isNull(i.month)?null:i.month;this.yearEditor.setValue(i.year),this.monthEditor.setValue(o)}},getValue:function(){return this.storeValue},getKey:function(){return this.yearEditor.getValue()+"-"+this.monthEditor.getValue()},isValid:function(){return this.yearEditor.isValid()&&this.monthEditor.isValid()}}),BI.DynamicYearMonthTrigger.EVENT_VALID="EVENT_VALID",BI.DynamicYearMonthTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearMonthTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearMonthTrigger.EVENT_START="EVENT_START",BI.DynamicYearMonthTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearMonthTrigger.EVENT_STOP="EVENT_STOP",BI.DynamicYearMonthTrigger.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.shortcut("bi.dynamic_year_month_trigger",BI.DynamicYearMonthTrigger)},function(e,t){BI.YearMonthInterval=BI.inherit(BI.Single,{constants:{height:24,width:25,lgap:15,offset:-15,timeErrorCls:"time-error"},props:{extraCls:"bi-year-month-interval",minDate:"1900-01-01",maxDate:"2099-12-31"},_init:function(){var e=this.options;BI.YearMonthInterval.superclass._init.apply(this,arguments),e.value=e.value||{},this.left=this._createCombo(e.value.start),this.right=this._createCombo(e.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:this,type:"bi.center",hgap:15,height:this.constants.height,items:[{type:"bi.absolute",items:[{el:this.left,left:this.constants.offset,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:this.right,left:0,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[this.label]})},_createCombo:function(e){var i=this,t=this.options,n=BI.createWidget({type:"bi.dynamic_year_month_combo",behaviors:t.behaviors,value:e,listeners:[{eventName:BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW,action:function(){i.fireEvent(BI.YearMonthInterval.EVENT_BEFORE_POPUPVIEW)}}]});return n.on(BI.DynamicYearMonthCombo.EVENT_ERROR,function(){i._clearTitle(),BI.Bubbles.hide("error"),i.element.removeClass(i.constants.timeErrorCls),i.fireEvent(BI.YearMonthInterval.EVENT_ERROR)}),n.on(BI.DynamicYearMonthCombo.EVENT_VALID,function(){i._checkValid()}),n.on(BI.DynamicYearMonthCombo.EVENT_FOCUS,function(){i._checkValid()}),n.on(BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW,function(){i.left.hideView(),i.right.hideView()}),n.on(BI.DynamicYearMonthCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var e=i.left.getKey(),t=i.right.getKey();i.left.isValid()&&i.right.isValid()&&i._check(e,t)&&i._compare(e,t)?(i._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),i.element.addClass(i.constants.timeErrorCls),i.fireEvent(BI.YearMonthInterval.EVENT_ERROR)):(i._clearTitle(),i.element.removeClass(i.constants.timeErrorCls),i.fireEvent(BI.YearMonthInterval.EVENT_CHANGE))}),n},_dateCheck:function(e){return BI.print(BI.parseDateTime(e,"%Y-%x"),"%Y-%x")===e||BI.print(BI.parseDateTime(e,"%Y-%X"),"%Y-%X")===e},_checkVoid:function(e){var t=this.options;return!BI.checkDateVoid(e.year,e.month,1,t.minDate,t.maxDate)[0]},_check:function(e,t){var i=e.match(/\d+/g),n=t.match(/\d+/g),r="";BI.isNotNull(i)&&(r=(i[0]||"")+"-"+(i[1]||1));var o="";return BI.isNotNull(n)&&(o=(n[0]||"")+"-"+(n[1]||1)),this._dateCheck(r)&&BI.checkDateLegal(r)&&this._checkVoid({year:i[0],month:i[1]||1,day:1})&&this._dateCheck(o)&&BI.checkDateLegal(o)&&this._checkVoid({year:n[0],month:n[1]||1,day:1})},_compare:function(e,t){return e=BI.print(BI.parseDateTime(e,"%Y-%X"),"%Y-%X"),t=BI.print(BI.parseDateTime(t,"%Y-%X"),"%Y-%X"),BI.isNotNull(e)&&BI.isNotNull(t)&&t<e},_setTitle:function(e){this.setTitle(e)},_clearTitle:function(){this.setTitle("")},_checkValid:function(){var e=this;BI.Bubbles.hide("error");var t=e.left.getKey(),i=e.right.getKey();e.left.isValid()&&e.right.isValid()&&e._check(t,i)&&e._compare(t,i)?(e._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),e.element.addClass(e.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),e,{offsetStyle:"center"}),e.fireEvent(BI.YearMonthInterval.EVENT_ERROR)):(e._clearTitle(),e.element.removeClass(e.constants.timeErrorCls))},setValue:function(e){e=e||{},this.left.setValue(e.start),this.right.setValue(e.end),this._checkValid()},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.YearMonthInterval.EVENT_VALID="EVENT_VALID",BI.YearMonthInterval.EVENT_ERROR="EVENT_ERROR",BI.YearMonthInterval.EVENT_CHANGE="EVENT_CHANGE",BI.YearMonthInterval.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.year_month_interval",BI.YearMonthInterval)},function(e,t){BI.DynamicYearQuarterCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-month-card"},render:function(){var e=this;return{type:"bi.vertical",items:[{type:"bi.label",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),textAlign:"left",height:24},{type:"bi.dynamic_date_param_item",ref:function(){e.year=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){e.fireEvent("EVENT_CHANGE")}}]},{type:"bi.dynamic_date_param_item",dateType:BI.DynamicDateCard.TYPE.QUARTER,ref:function(){e.quarter=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){e.fireEvent("EVENT_CHANGE")}}]}],vgap:10,hgap:10}},_createValue:function(e,t){return{dateType:e,value:Math.abs(t),offset:0<t?1:0}},setValue:function(e){e=e||{year:0,month:0},this.year.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR,e.year)),this.quarter.setValue(this._createValue(BI.DynamicDateCard.TYPE.QUARTER,e.quarter))},getValue:function(){var e=this.year.getValue(),t=this.quarter.getValue();return{year:0===e.offset?-e.value:e.value,quarter:0===t.offset?-t.value:t.value}}}),BI.DynamicYearQuarterCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_quarter_card",BI.DynamicYearQuarterCard)},function(e,t){BI.StaticYearQuarterCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-static-year-quarter-card",behaviors:{}},_createQuarter:function(){var e=[{text:BI.Date._QN[1],value:1},{text:BI.Date._QN[2],value:2},{text:BI.Date._QN[3],value:3},{text:BI.Date._QN[4],value:4}];return BI.map(e,function(e,t){return BI.extend(t,{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:24})})},render:function(){var t=this,e=this.options;return{type:"bi.vertical",items:[{type:"bi.year_picker",ref:function(){t.yearPicker=this},behaviors:e.behaviors,height:30,listeners:[{eventName:BI.YearPicker.EVENT_CHANGE,action:function(){var e=this.getValue();t.setValue({year:e,quarter:t.selectedQuarter})}}]},{type:"bi.button_group",behaviors:e.behaviors,ref:function(){t.quarter=this},items:this._createQuarter(),layouts:[{type:"bi.vertical",vgap:10}],value:e.value,listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(){t.selectedYear=t.yearPicker.getValue(),t.selectedQuarter=this.getValue()[0],t.fireEvent(BI.StaticYearQuarterCard.EVENT_CHANGE)}}]}]}},getValue:function(){return{year:this.selectedYear,quarter:this.selectedQuarter}},setValue:function(e){var t=this.options,i={};if(i.year=e.year||0,i.quarter=e.quarter||0,0===i.quarter||0===i.year||BI.checkDateVoid(i.year,i.quarter,1,t.min,t.max)[0]){var n=i.year||BI.getDate().getFullYear();this.selectedYear=n,this.selectedQuarter="",this.yearPicker.setValue(n),this.quarter.setValue()}else this.selectedYear=BI.parseInt(i.year),this.selectedQuarter=BI.parseInt(i.quarter),this.yearPicker.setValue(this.selectedYear),this.quarter.setValue(this.selectedQuarter)}}),BI.StaticYearQuarterCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.static_year_quarter_card",BI.StaticYearQuarterCard)},function(e,t){BI.DynamicYearQuarterCombo=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-quarter-combo bi-border bi-focus-shadow",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:22},_init:function(){BI.DynamicYearQuarterCombo.superclass._init.apply(this,arguments);var i=this,e=this.options;this.storeValue=e.value,i.storeTriggerValue="",this.trigger=BI.createWidget({type:"bi.dynamic_year_quarter_trigger",min:e.min,max:e.max,height:e.height,value:e.value||""}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_KEY_DOWN,function(){i.combo.isViewVisible()&&i.combo.hideView()}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_START,function(){i.combo.isViewVisible()&&i.combo.hideView()}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_STOP,function(){i.combo.showView()}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_ERROR,function(){i.combo.isViewVisible()&&i.combo.hideView()}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM,function(){var e=i.storeTriggerValue,t=i.trigger.getKey();BI.isNotEmptyString(t)&&!BI.isEqual(t,e)&&(i.storeValue=i.trigger.getValue(),i.setValue(i.trigger.getValue())),i._checkDynamicValue(i.storeValue),i.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM)}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_FOCUS,function(){i.storeTriggerValue=i.trigger.getKey()}),this.combo=BI.createWidget({type:"bi.combo",container:e.container,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.dynamic_year_quarter_popup",ref:function(){i.popup=this},listeners:[{eventName:BI.DynamicYearQuarterPopup.EVENT_CHANGE,action:function(){i.setValue(i.popup.getValue()),i.combo.hideView(),i.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){i.setValue(),i.combo.hideView(),i.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var e=BI.getDate();i.setValue({type:BI.DynamicYearMonthCombo.Static,value:{year:e.getFullYear(),quarter:BI.getQuarter(e)}}),i.combo.hideView(),i.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE,action:function(){i.setValue(i.popup.getValue()),i.combo.hideView(),i.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}],behaviors:e.behaviors,min:e.min,max:e.max},value:e.value||""}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){i.popup.setValue(i.storeValue),i.fireEvent(BI.DynamicYearQuarterCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.htape",element:this,ref:function(){i.comboWrapper=this},items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24,ref:function(){i.changeIcon=this}},width:24},this.combo]}),this._checkDynamicValue(e.value)},_checkDynamicValue:function(e){var t=null;switch(BI.isNotNull(e)&&(t=e.type),t){case BI.DynamicYearQuarterCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},setValue:function(e){this.storeValue=e,this.trigger.setValue(e),this._checkDynamicValue(e)},getValue:function(){return this.storeValue}}),BI.DynamicYearQuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearQuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_year_quarter_combo",BI.DynamicYearQuarterCombo),BI.extend(BI.DynamicYearQuarterCombo,{Static:1,Dynamic:2})},function(e,t){BI.DynamicYearQuarterPopup=BI.inherit(BI.Widget,{constants:{tabHeight:30,buttonHeight:24},props:{baseCls:"bi-year-quarter-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31",width:180,height:240},render:function(){var e=this,t=(this.options,this.constants);return this.storeValue={type:BI.DynamicYearQuarterCombo.Static},{type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",cls:"bi-split-top bi-high-light",shadow:!0,textHeight:t.buttonHeight-1,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){e.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-split-left bi-split-right bi-high-light bi-split-top",textHeight:t.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_Current_Quarter"),ref:function(){e.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){e.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-split-top bi-high-light",shadow:!0,textHeight:t.buttonHeight-1,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){e.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicYearQuarterCombo.Static)this.textButton.setValue(BI.i18nText("BI-Basic_Current_Quarter")),this.textButton.setEnable(!0);else{var e=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());e=BI.print(e,"%Y-%Q"),this.textButton.setValue(e),this.textButton.setEnable(!1)}},_getTabJson:function(){var t=this,i=this.options;return{type:"bi.tab",ref:function(){t.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-split-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Basic_Year_Quarter"),value:BI.DynamicYearQuarterCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicYearQuarterCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(e){switch(e){case BI.DynamicYearQuarterCombo.Dynamic:return{type:"bi.dynamic_year_quarter_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){t._setInnerValue(t.year,e)}}],ref:function(){t.dynamicPane=this}};case BI.DynamicYearQuarterCombo.Static:default:return{type:"bi.static_year_quarter_card",behaviors:i.behaviors,min:t.options.min,max:t.options.max,listeners:[{eventName:BI.DynamicYearCard.EVENT_CHANGE,action:function(){t.fireEvent(BI.DynamicYearQuarterPopup.EVENT_CHANGE)}}],ref:function(){t.year=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){switch(t.dateTab.getSelect()){case BI.DynamicYearQuarterCombo.Static:var e=BI.DynamicDateHelper.getCalculation(t.dynamicPane.getValue());t.year.setValue({year:e.getFullYear(),quarter:BI.getQuarter(e)}),t._setInnerValue();break;case BI.DynamicYearQuarterCombo.Dynamic:default:t.storeValue&&t.storeValue.type===BI.DynamicYearQuarterCombo.Dynamic?t.dynamicPane.setValue(t.storeValue.value):t.dynamicPane.setValue({year:0}),t._setInnerValue()}}}]}},setValue:function(e){this.storeValue=e;var t,i;switch(t=(e=e||{}).type||BI.DynamicDateCombo.Static,i=e.value||e,this.dateTab.setSelect(t),t){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(i),this._setInnerValue();break;case BI.DynamicDateCombo.Static:default:this.year.setValue(i),this.textButton.setValue(BI.i18nText("BI-Basic_Current_Quarter")),this.textButton.setEnable(!0)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicYearQuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_quarter_popup",BI.DynamicYearQuarterPopup)},function(e,t){BI.DynamicYearQuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2},props:{extraCls:"bi-year-quarter-trigger",min:"1900-01-01",max:"2099-12-31",height:22},_init:function(){BI.DynamicYearQuarterTrigger.superclass._init.apply(this,arguments);var e=this.options;this.yearEditor=this._createEditor(!0),this.quarterEditor=this._createEditor(!1),BI.createWidget({element:this,type:"bi.htape",items:[{type:"bi.center",items:[{type:"bi.htape",items:[this.yearEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Year"),width:e.height},width:e.height}]},{type:"bi.htape",items:[this.quarterEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Quarter"),width:24},width:24}]}]},{el:{type:"bi.trigger_icon_button",width:e.height},width:e.height}]}),this.setValue(e.value)},_createEditor:function(t){var e=this,i=this.options,n=this._const,r=BI.createWidget({type:"bi.sign_editor",height:i.height,validationChecker:function(e){return t?""===e||BI.isPositiveInteger(e)&&!BI.checkDateVoid(e,1,1,i.min,i.max)[0]:""===e||BI.isPositiveInteger(e)&&1<=e&&e<=4&&!BI.checkDateVoid(BI.getDate().getFullYear(),e,1,i.min,i.max)[0]},quitChecker:function(){return!1},errorText:function(e){return BI.i18nText("BI-Year_Trigger_Invalid_Text")},watermark:BI.i18nText("BI-Basic_Unrestricted"),hgap:n.hgap,vgap:n.vgap,title:"",allowBlank:!0});return r.on(BI.SignEditor.EVENT_KEY_DOWN,function(){e.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_KEY_DOWN)}),r.on(BI.SignEditor.EVENT_FOCUS,function(){e.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_FOCUS)}),r.on(BI.SignEditor.EVENT_STOP,function(){e.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_STOP)}),r.on(BI.SignEditor.EVENT_CONFIRM,function(){e._doEditorConfirm(r),e.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM)}),r.on(BI.SignEditor.EVENT_SPACE,function(){r.isValid()&&r.blur()}),r.on(BI.SignEditor.EVENT_START,function(){e.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_START)}),r.on(BI.SignEditor.EVENT_ERROR,function(){e.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_ERROR)}),r.on(BI.SignEditor.EVENT_CHANGE,function(){t&&e._autoSwitch(r)}),r},_doEditorConfirm:function(e){var t=e.getValue();BI.isNotNull(t)&&e.setValue(t);var i=this.quarterEditor.getValue();this.storeValue={type:BI.DynamicYearQuarterCombo.Static,value:{year:this.yearEditor.getValue(),quarter:BI.isEmptyString(this.quarterEditor.getValue())?"":i}},this.setTitle(this._getStaticTitle(this.storeValue.value))},_yearCheck:function(e){var t=BI.print(BI.parseDateTime(e,"%Y-%X-%d"),"%Y-%X-%d");return BI.print(BI.parseDateTime(e,"%Y"),"%Y")===e&&t>=this.options.min&&t<=this.options.max},_autoSwitch:function(e){var t=e.getValue();BI.isNotEmptyString(t)&&BI.checkDateLegal(t)&&4===t.length&&this._yearCheck(t)&&(this._doEditorConfirm(e),this.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM),this.quarterEditor.focus())},_getStaticTitle:function(e){switch(e=e||{},!(BI.isNull(e.year)||BI.isEmptyString(e.year))<<1|!(BI.isNull(e.quarter)||BI.isEmptyString(e.quarter))){case 0:return"";case 1:return e.quarter;case 2:return e.year;case 3:default:return e.year+"-"+e.quarter}},_getText:function(e){var t="";return BI.isNotNull(e.year)&&0!==BI.parseInt(e.year)&&(t+=Math.abs(e.year)+BI.i18nText("BI-Basic_Year")+(e.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),BI.isNotNull(e.quarter)&&0!==BI.parseInt(e.quarter)&&(t+=Math.abs(e.quarter)+BI.i18nText("BI-Basic_Single_Quarter")+(e.quarter<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),t},_setInnerValue:function(e,t){var i=BI.print(e,"%Y-%Q");this.yearEditor.setValue(e.getFullYear()),this.quarterEditor.setValue(BI.getQuarter(e)),this.setTitle(BI.isEmptyString(t)?i:t+":"+i)},setValue:function(e){var t,i,n=BI.getDate();switch(this.storeValue=e,BI.isNotNull(e)&&(t=e.type||BI.DynamicYearQuarterCombo.Static,i=e.value||e),t){case BI.DynamicYearQuarterCombo.Dynamic:var r=this._getText(i);n=BI.DynamicDateHelper.getCalculation(i),this._setInnerValue(n,r);break;case BI.DynamicYearQuarterCombo.Static:default:i=i||{};var o=BI.isNull(i.quarter)?null:i.quarter;this.yearEditor.setValue(i.year),this.yearEditor.setTitle(i.year),this.quarterEditor.setValue(o),this.quarterEditor.setTitle(o),this.setTitle(this._getStaticTitle(i))}},getValue:function(){return this.storeValue},getKey:function(){return this.yearEditor.getValue()+"-"+this.quarterEditor.getValue()}}),BI.DynamicYearQuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearQuarterTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearQuarterTrigger.EVENT_START="EVENT_START",BI.DynamicYearQuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearQuarterTrigger.EVENT_STOP="EVENT_STOP",BI.DynamicYearQuarterTrigger.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.shortcut("bi.dynamic_year_quarter_trigger",BI.DynamicYearQuarterTrigger)},function(e,t){BI.AbstractAllValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractAllValueChooser.superclass._defaultConfig.apply(this,arguments),{width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_valueFormatter:function(i){var n=i;return BI.isNotNull(this.items)&&BI.some(this.items,function(e,t){if(t.value===i||t.value+""===i)return n=t.text,!0}),n},_itemsCreator:function(t,o){var i=this,e=this.options;function n(n){var e=(t.keywords||[]).slice();t.keyword&&e.push(t.keyword);var r=n;if(BI.isNotEmptyArray(e)&&(r=[],BI.each(e,function(e,t){var i=BI.Func.getSearchResult(n,t);r=r.concat(i.match).concat(i.find)}),r=BI.uniq(r)),t.selectedValues){var i=BI.makeObject(t.selectedValues,!0);r=BI.filter(r,function(e,t){return!i[t.value]})}t.type!==BI.MultiSelectCombo.REQ_GET_ALL_DATA?t.type!==BI.MultiSelectCombo.REQ_GET_DATA_LENGTH?o({items:r,hasNext:!1}):o({count:r.length}):o({items:r})}e.cache&&this.items?n(this.items):e.itemsCreator({},function(e){n(i.items=e)})}})},function(e,t){BI.AllValueChooserCombo=BI.inherit(BI.AbstractAllValueChooser,{_defaultConfig:function(){return BI.extend(BI.AllValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-all-value-chooser-combo",width:200,height:24,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.AllValueChooserCombo.superclass._init.apply(this,arguments);var e=this,t=this.options;BI.isNotNull(t.items)&&(this.items=t.items),this.combo=BI.createWidget({type:"bi.multi_select_combo",text:t.text,element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:t.width,height:t.height,value:{type:BI.Selection.Multi,value:t.value||[]}}),this.combo.on(BI.MultiSelectCombo.EVENT_CONFIRM,function(){e.fireEvent(BI.AllValueChooserCombo.EVENT_CONFIRM)})},setValue:function(e){this.combo.setValue({type:BI.Selection.Multi,value:e||[]})},getValue:function(){var e=this.combo.getValue()||{};return e.type===BI.Selection.All?e.assist:e.value||[]},populate:function(e){this.items=e,this.combo.populate.apply(this,arguments)}}),BI.AllValueChooserCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.all_value_chooser_combo",BI.AllValueChooserCombo)},function(e,t){BI.AllValueChooserPane=BI.inherit(BI.AbstractAllValueChooser,{_defaultConfig:function(){return BI.extend(BI.AllValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-all-value-chooser-pane",width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.AllValueChooserPane.superclass._init.apply(this,arguments);var e=this,t=this.options;BI.isNotNull(t.items)&&(this.items=t.items),this.list=BI.createWidget({type:"bi.multi_select_list",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:t.width,height:t.height}),this.list.on(BI.MultiSelectList.EVENT_CHANGE,function(){e.fireEvent(BI.AllValueChooserPane.EVENT_CHANGE)})},setValue:function(e){this.list.setValue({type:BI.Selection.Multi,value:e||[]})},getValue:function(){var e=this.list.getValue()||{};return e.type===BI.Selection.All?e.assist:e.value||[]},populate:function(e){this.items=e,this.list.populate.apply(this.list,arguments)}}),BI.AllValueChooserPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.all_value_chooser_pane",BI.AllValueChooserPane)},function(e,t){BI.AllValueMultiTextValueCombo=BI.inherit(BI.Widget,{props:{baseCls:"bi-all-value-multi-text-value-combo",width:200,height:24,items:[]},render:function(){var e=this,t=this.options,i=this._digestValue(t.value);return{type:"bi.search_multi_text_value_combo",text:t.text,height:t.height,items:t.items,value:i,numOfPage:100,valueFormatter:t.valueFormatter,warningTitle:t.warningTitle,listeners:[{eventName:BI.SearchMultiTextValueCombo.EVENT_CONFIRM,action:function(){e.fireEvent(BI.AllValueMultiTextValueCombo.EVENT_CONFIRM)}}],ref:function(){e.combo=this}}},setValue:function(e){var t=this._digestValue(e);this.combo.setValue(t)},getValue:function(){var i=this.combo.getValue()||{};if(i.value=i.value||[],i.type!==BI.Selection.All)return i.value||[];var n=[];return BI.each(this.options.items,function(e,t){BI.contains(i.value,t.value)||n.push(t.value)}),n},populate:function(e){this.options.items=e,this.combo.populate.apply(this,arguments)},_digestValue:function(e){return{type:BI.Selection.Multi,value:e||[]}}}),BI.AllValueMultiTextValueCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.all_value_multi_text_value_combo",BI.AllValueMultiTextValueCombo)},function(e,t){BI.AbstractTreeValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractTreeValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn,open:!1})},_valueFormatter:function(i){var n=i;return BI.isNotNull(this.items)&&BI.some(this.items,function(e,t){if(t.value===i||t.value+""===i)return n=t.text,!0}),n},_initData:function(e){this.items=e;var t=BI.Tree.treeFormat(e);this.tree=new BI.Tree,this.tree.initTree(t)},_itemsCreator:function(e,t){var i=this,n=this.options;function r(){switch(e.type){case BI.TreeView.REQ_TYPE_INIT_DATA:i._reqInitTreeNode(e,t);break;case BI.TreeView.REQ_TYPE_ADJUST_DATA:i._reqAdjustTreeNode(e,t);break;case BI.TreeView.REQ_TYPE_SELECT_DATA:i._reqSelectedTreeNode(e,t);break;case BI.TreeView.REQ_TYPE_GET_SELECTED_DATA:i._reqDisplayTreeNode(e,t);break;default:i._reqTreeNode(e,t)}}this.items?r():n.itemsCreator({},function(e){i._initData(e),r()})},_reqDisplayTreeNode:function(e,t){var a=this,n=[],i=e.selectedValues;function s(e,t){return null==e?0:BI.isEmpty(e)?a._getChildCount(t):BI.size(e)}function l(e,t,i){n.push({id:e.id,pId:t,text:e.text+(0<i?"("+BI.i18nText("BI-Basic_Altogether")+i+BI.i18nText("BI-Basic_Count")+")":""),value:e.value,open:!0})}null==i||BI.isEmpty(i)?t({}):(function u(r,o,n){if(null==n||BI.isEmpty(n))return void BI.each(o.getChildren(),function(e,t){var i=BI.clone(r);i.push(t.value);var n=a._getChildCount(i);l(t,o.id,n),u(i,t,{})});BI.each(n,function(e){var t=a._getTreeNode(r,e);if(BI.isNull(t))l({id:BI.UUID(),text:e,value:e},BI.UUID(),0);else{var i=BI.clone(r);i.push(t.value),l(t,t.parent&&t.parent.id,s(n[e],i)),u(i,t,n[e])}})}([],this.tree.getRoot(),i),t({items:n}))},_reqSelectedTreeNode:function(e,t){var p=this,i=BI.deepClone(e.selectedValues),s=e.notSelectedValue||{},l=e.keyword||"",u=e.parentValues||[];function c(a,s,l){var u=a,c=[],h=[];BI.some(s,function(i,e){var t=u[e];if(null==t){if(0===i)return!0;if(!BI.isEmpty(u))return!0;var n=s.slice(0,i),r=p._getChildren(n);if(h.push(n),c.push(r.length),i===s.length-1&&1===r.length&&r[0].value===l)for(var o=c.length-1;0<=o&&1===c[o];o--)p._deleteNode(a,h[o]);else BI.each(r,function(e,t){if(i===s.length-1&&t.value===l)return!0;u[t.value]={}});u=u[e]}else u=t})}function h(e,t,n,i){var r=BI.clone(e);if(r.push(t),p._isMatch(e,t,l))return i&&i.push(r),!0;var o=p._getChildren(r),a=[],s=!1;return BI.each(o,function(e,t){h(r,t.value,n,i)?s=!0:a.push(t.value)}),!0===s&&BI.each(a,function(e,t){var i=BI.clone(r);i.push(t),n.push(i)}),s}function d(e){for(var t=0,i=e.length;t<i;t++)if(p._isMatch(e.slice(0,t),e[t],l))return!0;return!1}null==i||BI.isEmpty(i)?t({}):(function g(i){var e=u.concat(s);if(function o(e,t){for(var i=e,n=0;n<t.length;n++){var r=t[n];if(null==(i=i[r]))return!1}return!0}(i,e))if(d(e))p._deleteNode(i,e);else{var t=[];(r=h(u,s,[],t))&&BI.isNotEmptyArray(t)&&BI.each(t,function(e,t){p._getNode(i,t)?p._deleteNode(i,t):c(i,t,BI.last(t))})}if(function a(e,t){for(var i=e,n=0;n<t.length;n++){var r=t[n];if(!BI.has(i,r))return!1;if(i=i[r],BI.isEmpty(i))return!0}return!1}(i,e)){var n=[],r=!1;d(e)?r=!0:(r=h(u,s,n),e=u),!0===r&&(c(i,e,s),0<n.length&&BI.each(n,function(e,t){p._buildTree(i,t)}))}}(i),t(i))},_reqAdjustTreeNode:function(e,t){var n=this,a=[],i=e.selectedValues;if(null==i||BI.isEmpty(i))t({});else{BI.each(i,function(e,t){a.push([e])}),function s(i,r){if(null==i||BI.isEmpty(i))return!0;var o=!0;BI.each(i,function(e,t){var n=BI.clone(r);n.push(e),s(i[e],n)||(BI.each(i[e],function(e,t){var i=BI.clone(n);i.push(e),a.push(i)}),o=!1)});return o&&(e=i,t=r,BI.isEmpty(e)||n._getChildCount(t)===BI.size(e));var e,t}(i,[]);var r={};BI.each(a,function(e,t){n._buildTree(r,t)}),t(r)}},_reqInitTreeNode:function(l,e){var p=this,u=[],d=l.keyword||"",c=l.selectedValues,h=l.lastSearchValue||"",t=function E(){var e=p._getChildren([]),t=e.length;if(""!==h){for(var i=0,n=t;i<n;i++)if(e[i].value===h){t=i+1;break}}else t=0;var r=[],o=t;for(n=e.length;o<n;o++){if(r.length<p._const.perPage)var a=g(1,[],e[o].value,!1,u);else if(r.length===p._const.perPage)a=g(1,[],e[o].value,!1,[]);if(!0===a[0]&&r.push(e[o].value),r.length>p._const.perPage)break}if(1===l.times){var s=p._getAddedValueNode([],c);u=BI.concat(BI.filter(s,function(e,t){var i=BI.Func.getSearchResult([t.text||t.value],d);return 0<i.find.length||0<i.match.length}),u)}return r}();function g(n,e,t,i,r){if(p._isMatch(e,t,d))return f(e,t,!1,l=i||I(e,t),!i&&function c(e,i){var t=B(e);return null!=t?BI.any(t,function(e,t){if(e===i&&null!=t&&!BI.isEmpty(t))return!0}):null}(e,t),!0,r),[!0,l];var o=BI.clone(e);o.push(t);var a=p._getChildren(o),s=!1,l=!1,u=i||function h(e,i){var t=B(e);return null!=t?BI.any(t,function(e,t){if(e===i&&null!=t&&BI.isEmpty(t))return!0}):null}(e,t);return BI.each(a,function(e,t){var i=g(n+1,o,t.value,u,r);!0===i[1]&&(l=!0),!0===i[0]&&(s=!0)}),!0===s&&f(e,t,!0,l=u||I(e,t)&&l,!1,!1,r),[s,l]}function f(e,t,i,n,r,o,a){var s=p._getTreeNode(e,t);a.push({id:s.id,pId:s.pId,text:s.text,value:s.value,title:s.title,isParent:0<s.getChildrenLength(),open:i,checked:n,halfCheck:r,flag:o})}function I(e,t){var i=B(e);return null!=i&&BI.any(i,function(e){if(e===t)return!0})}function B(e){var i=c;return null==i?null:(BI.every(e,function(e,t){return null!=(i=i[t])}),i)}BI.nextTick(function(){e({hasNext:t.length>p._const.perPage,items:u,lastSearchValue:BI.last(t)})})},_reqTreeNode:function(e,t){var i,c=this,n=this.options,a=[],r=e.times,o=e.checkState||{},s=e.parentValues||[],l=e.selectedValues||{};i=g(s,l);for(var u=this._getChildren(s),h=(r-1)*this._const.perPage;u[h]&&h<r*this._const.perPage;h++){var p=f(u[h].value,s,i,o);a.push({id:u[h].id,pId:u[h].pId,value:u[h].value,text:u[h].text,times:1,isParent:0<u[h].getChildrenLength(),checked:p[0],halfCheck:p[1],open:n.open})}if(n.open){var d=[];BI.each(u,function(e,t){d=BI.concat(d,c._getAllChildren(s.concat([t.value])))}),BI.each(d,function(e,i){var t=g(i.parentValues,l),n={},r=BI.find(a,function(e,t){return t.id===i.pId});r&&(n.checked=!r.halfCheck&&r.checked,n.half=r.halfCheck);var o=f(i.value,i.parentValues,t,n);a.push({id:i.id,pId:i.pId,value:i.value,text:i.text,times:1,isParent:0<i.getChildrenLength(),checked:o[0],halfCheck:o[1],open:c.options.open})})}function g(e,i){var n={};return BI.each(e,function(e,t){i=i[t]||{}}),BI.each(i,function(e,t){if(BI.isNull(t))n[e]=[0,0];else if(BI.isEmpty(t))n[e]=[2,0];else{var i={};BI.each(t,function(e,t){(BI.isNull(t)||BI.isEmpty(t))&&(i[e]=!0)}),n[e]=[1,BI.size(i)]}}),n}function f(e,t,i,n){var r=n.checked,o=n.half,a=!1,s=!1;if(BI.has(i,e))if(1===i[e][0]){var l=BI.clone(t);l.push(e);var u=c._getChildCount(l);0<u&&u!==i[e][1]&&(s=!0)}else 2===i[e][0]&&(a=!0);return[(r||s||a)&&(a||r)&&!o||BI.has(i,e),s]}0===s.length&&1===r&&(a=BI.concat(c._getAddedValueNode(s,l),a)),BI.nextTick(function(){t({items:a,hasNext:u.length>r*c._const.perPage})})},_getAddedValueNode:function(e,t){var i=this._getChildren(e);return BI.map(BI.difference(BI.keys(t),BI.map(i,"value")),function(e,t){return{id:BI.UUID(),pId:0<i.length?i[0].pId:BI.UUID(),value:t,text:t,times:1,isParent:!1,checked:!0,halfCheck:!1}})},_getNode:function(e,t){for(var i=e,n=0,r=t.length;n<r;n++){if(null==i)return null;i=i[t[n]]}return i},_deleteNode:function(e,t){var i=t[t.length-1],n=t.slice(0,t.length-1),r=this._getNode(e,n);if(null!=r&&r[i])for(delete r[i];0<n.length&&BI.isEmpty(r);)i=n[n.length-1],n=n.slice(0,n.length-1),null!=(r=this._getNode(e,n))&&delete r[i]},_buildTree:function(e,t){var i=e;BI.each(t,function(e,t){BI.has(i,t)||(i[t]={}),i=i[t]})},_isMatch:function(e,t,i){var n=this.options,r=this._getTreeNode(e,t);if(!r)return!1;var o=BI.Func.getSearchResult([r.text||r.value],i);if(n.allowSearchValue&&r.value){var a=BI.Func.getSearchResult([r.value],i);return 0<a.find.length||0<a.match.length||0<o.find.length||0<o.match.length}return 0<o.find.length||0<o.match.length},_getTreeNode:function(t,i){var n,r=this,o=0;return this.tree.traverse(function(e){if(!r.tree.isRoot(e)){if(o>t.length)return!1;if(o===t.length&&e.value===i)return n=e,!1;if(e.value!==t[o])return!0;o++}}),n},_getChildren:function(e){if(0<e.length)var t=BI.last(e),i=this._getTreeNode(e.slice(0,e.length-1),t);else i=this.tree.getRoot();return i.getChildren()},_getAllChildren:function(i){var e=this._getChildren(i),t=[].concat(e);BI.each(t,function(e,t){t.parentValues=i});for(var n=BI.map(e,function(e,t){return{parentValues:i,value:t.value}});BI.isNotEmptyArray(n);){var r=n.shift(),o=r.parentValues.concat(r.value),a=this._getChildren(o);BI.each(a,function(e,t){t.parentValues=o}),n=n.concat(a),t=t.concat(a)}return t},_getChildCount:function(e){return this._getChildren(e).length}})},function(e,t){BI.AbstractListTreeValueChooser=BI.inherit(BI.AbstractTreeValueChooser,{_reqDisplayTreeNode:function(e,t){var o=this,a={},i=e.selectedValues;function s(e,t){a[e.id]={id:e.id,pId:t,text:e.text,value:e.value,open:!0,isLeaf:e.isLeaf}}null==i||BI.isEmpty(i)?t({}):(function n(e,t,i){BI.each(i,function(e,r){BI.each(r,function(e,t){var i=t,n=o._getTreeNode(r.slice(0,e),i);BI.isNull(n)?s({id:BI.UUID(),text:i,value:i,isLeaf:!0},BI.UUID()):(BI.has(a,n.id)||s(n,n.parent&&n.parent.id),!0!==a[n.id].isLeaf&&(a[n.id].isLeaf=e===r.length-1))})})}(0,this.tree.getRoot(),i),t({items:BI.values(a)}))},_reqInitTreeNode:function(l,e){var u=this,c=[],h=l.keyword||"",p=l.selectedValues,d=l.lastSearchValue||"",t=function B(){var e=u._getChildren([]),t=e.length;if(""!==d){for(var i=0,n=t;i<n;i++)if(e[i].value===d){t=i+1;break}}else t=0;var r=[],o=t;for(n=e.length;o<n;o++){if(r.length<u._const.perPage)var a=g(1,[],e[o].value,c);else if(r.length===u._const.perPage)a=g(1,[],e[o].value,[]);if(!0===a[0]&&r.push(e[o].value),r.length>u._const.perPage)break}if(1===l.times){var s=u._getAddedValueNode([],p);c=BI.concat(BI.filter(s,function(e,t){var i=BI.Func.getSearchResult([t.text||t.value],h);return 0<i.find.length||0<i.match.length}),c)}return r}();function g(n,e,t,r){if(u._isMatch(e,t,h))return f(e,t,!1,s=I(e,t),!0,r),[!0,s];var o=BI.clone(e);o.push(t);var i=u._getChildren(o),a=!1,s=!1;return BI.each(i,function(e,t){var i=g(n+1,o,t.value,r);!0===i[1]&&(s=!0),!0===i[0]&&(a=!0)}),!0===a&&f(e,t,!0,s=I(e,t),!1,r),[a,s]}function f(e,t,i,n,r,o){var a=u._getTreeNode(e,t);o.push({id:a.id,pId:a.pId,text:a.text,value:a.value,title:a.title,isParent:0<a.getChildrenLength(),open:i,checked:n,halfCheck:!1,flag:r})}function I(i,n){return BI.any(p,function(e,t){return BI.isEqual(i,t.slice(0,i.length))&&BI.last(t)===n})}BI.nextTick(function(){e({hasNext:t.length>u._const.perPage,items:c,lastSearchValue:BI.last(t)})})},_reqTreeNode:function(e,t){for(var i=this,r=this.options,o=[],n=e.times,a=e.parentValues||[],s=e.selectedValues||[],l=d(a,s),u=this._getChildren(a),c=(n-1)*this._const.perPage;u[c]&&c<n*this._const.perPage;c++){var h=BI.has(l,u[c].value);o.push({id:u[c].id,pId:u[c].pId,value:u[c].value,text:u[c].text,times:1,isParent:0<u[c].getChildrenLength(),checked:h,halfCheck:!1,open:r.open})}if(r.open){var p=[];BI.each(u,function(e,t){p=BI.concat(p,i._getAllChildren(a.concat([t.value])))}),BI.each(p,function(e,t){var i=d(t.parentValues,s),n=BI.has(i,t.value);o.push({id:t.id,pId:t.pId,value:t.value,text:t.text,times:1,isParent:0<t.getChildrenLength(),checked:n,halfCheck:!1,open:r.open})})}function d(i,e){var n={};return BI.each(e,function(e,t){BI.isEqual(i,t.slice(0,i.length))&&(n[BI.last(t)]=[2,0])}),n}0===a.length&&1===n&&(o=BI.concat(i._getAddedValueNode(a,s),o)),BI.nextTick(function(){t({items:o,hasNext:u.length>n*i._const.perPage})})},_getAddedValueNode:function(e,t){var i=this._getChildren(e),n=BI.flatten(BI.filter(t,function(e,t){return 1===t.length}));return BI.map(BI.difference(n,BI.map(i,"value")),function(e,t){return{id:BI.UUID(),pId:0<i.length?i[0].pId:BI.UUID(),value:t,text:t,times:1,isParent:!1,checked:!0,halfCheck:!1}})}})},function(e,t){BI.ListTreeValueChooserInsertCombo=BI.inherit(BI.AbstractListTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.ListTreeValueChooserInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-list-tree-value-chooser-insert-combo",width:200,height:24,items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.ListTreeValueChooserInsertCombo.superclass._init.apply(this,arguments);var t=this,e=this.options;BI.isNotNull(e.items)&&this._initData(e.items),this.combo=BI.createWidget({type:"bi.multi_tree_list_combo",element:this,text:e.text,value:e.value,watermark:e.watermark,allowInsertValue:e.allowInsertValue,allowEdit:e.allowEdit,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:e.width,height:e.height,listeners:[{eventName:BI.MultiTreeListCombo.EVENT_FOCUS,action:function(){t.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_FOCUS)}},{eventName:BI.MultiTreeListCombo.EVENT_BLUR,action:function(){t.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_BLUR)}},{eventName:BI.MultiTreeListCombo.EVENT_STOP,action:function(){t.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_STOP)}},{eventName:BI.MultiTreeListCombo.EVENT_CLICK_ITEM,action:function(e){t.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_CLICK_ITEM,e)}},{eventName:BI.MultiTreeListCombo.EVENT_SEARCHING,action:function(){t.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_SEARCHING)}},{eventName:BI.MultiTreeListCombo.EVENT_CONFIRM,action:function(){t.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_CONFIRM)}},{eventName:BI.MultiTreeCombo.EVENT_BEFORE_POPUPVIEW,action:function(){t.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_BEFORE_POPUPVIEW)}}]})},setValue:function(e){this.combo.setValue(e)},getValue:function(){return this.combo.getValue()},populate:function(e){this._initData(e),this.combo.populate.apply(this.combo,arguments)}}),BI.ListTreeValueChooserInsertCombo.EVENT_FOCUS="EVENT_FOCUS",BI.ListTreeValueChooserInsertCombo.EVENT_BLUR="EVENT_BLUR",BI.ListTreeValueChooserInsertCombo.EVENT_STOP="EVENT_STOP",BI.ListTreeValueChooserInsertCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.ListTreeValueChooserInsertCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.ListTreeValueChooserInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.ListTreeValueChooserInsertCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.list_tree_value_chooser_insert_combo",BI.ListTreeValueChooserInsertCombo)},function(e,t){BI.TreeValueChooserInsertCombo=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-insert-combo",width:200,height:24,items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserInsertCombo.superclass._init.apply(this,arguments);var t=this,e=this.options;BI.isNotNull(e.items)&&this._initData(e.items),this.combo=BI.createWidget({type:"bi.multi_tree_insert_combo",allowEdit:e.allowEdit,text:e.text,value:e.value,watermark:e.watermark,element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:e.width,height:e.height,listeners:[{eventName:BI.MultiTreeInsertCombo.EVENT_FOCUS,action:function(){t.fireEvent(BI.TreeValueChooserCombo.EVENT_FOCUS)}},{eventName:BI.MultiTreeInsertCombo.EVENT_BLUR,action:function(){t.fireEvent(BI.TreeValueChooserCombo.EVENT_BLUR)}},{eventName:BI.MultiTreeInsertCombo.EVENT_STOP,action:function(){t.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_STOP)}},{eventName:BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM,action:function(e){t.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_CLICK_ITEM,e)}},{eventName:BI.MultiTreeInsertCombo.EVENT_SEARCHING,action:function(){t.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_SEARCHING)}},{eventName:BI.MultiTreeInsertCombo.EVENT_CONFIRM,action:function(){t.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_CONFIRM)}},{eventName:BI.MultiTreeCombo.EVENT_BEFORE_POPUPVIEW,action:function(){t.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_BEFORE_POPUPVIEW)}}]})},setValue:function(e){this.combo.setValue(e)},getValue:function(){return this.combo.getValue()},populate:function(e){this._initData(e),this.combo.populate.apply(this.combo,arguments)}}),BI.TreeValueChooserInsertCombo.EVENT_FOCUS="EVENT_FOCUS",BI.TreeValueChooserInsertCombo.EVENT_BLUR="EVENT_BLUR",BI.TreeValueChooserInsertCombo.EVENT_STOP="EVENT_STOP",BI.TreeValueChooserInsertCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.TreeValueChooserInsertCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.TreeValueChooserInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.TreeValueChooserInsertCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.tree_value_chooser_insert_combo",BI.TreeValueChooserInsertCombo)},function(e,t){BI.TreeValueChooserCombo=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-combo",width:200,height:24,items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserCombo.superclass._init.apply(this,arguments);var t=this,e=this.options;BI.isNotNull(e.items)&&this._initData(e.items),this.combo=BI.createWidget({type:"bi.multi_tree_combo",text:e.text,allowEdit:e.allowEdit,value:e.value,watermark:e.watermark,element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:e.width,height:e.height,listeners:[{eventName:BI.MultiTreeCombo.EVENT_FOCUS,action:function(){t.fireEvent(BI.TreeValueChooserCombo.EVENT_FOCUS)}},{eventName:BI.MultiTreeCombo.EVENT_BLUR,action:function(){t.fireEvent(BI.TreeValueChooserCombo.EVENT_BLUR)}},{eventName:BI.MultiTreeCombo.EVENT_STOP,action:function(){t.fireEvent(BI.TreeValueChooserCombo.EVENT_STOP)}},{eventName:BI.MultiTreeCombo.EVENT_CLICK_ITEM,action:function(e){t.fireEvent(BI.TreeValueChooserCombo.EVENT_CLICK_ITEM,e)}},{eventName:BI.MultiTreeCombo.EVENT_SEARCHING,action:function(){t.fireEvent(BI.TreeValueChooserCombo.EVENT_SEARCHING)}},{eventName:BI.MultiTreeCombo.EVENT_CONFIRM,action:function(){t.fireEvent(BI.TreeValueChooserCombo.EVENT_CONFIRM)}},{eventName:BI.MultiTreeCombo.EVENT_BEFORE_POPUPVIEW,action:function(){t.fireEvent(BI.TreeValueChooserCombo.EVENT_BEFORE_POPUPVIEW)}}]})},setValue:function(e){this.combo.setValue(e)},getValue:function(){return this.combo.getValue()},populate:function(e){this._initData(e),this.combo.populate.apply(this.combo,arguments)}}),BI.TreeValueChooserCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.TreeValueChooserCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.TreeValueChooserCombo.EVENT_FOCUS="EVENT_FOCUS",BI.TreeValueChooserCombo.EVENT_BLUR="EVENT_BLUR",BI.TreeValueChooserCombo.EVENT_STOP="EVENT_STOP",BI.TreeValueChooserCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.TreeValueChooserCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.tree_value_chooser_combo",BI.TreeValueChooserCombo)},function(e,t){BI.TreeValueChooserPane=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-pane",items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserPane.superclass._init.apply(this,arguments);var e=this,t=this.options;this.pane=BI.createWidget({type:"bi.multi_select_tree",element:this,itemsCreator:BI.bind(this._itemsCreator,this)}),this.pane.on(BI.MultiSelectTree.EVENT_CHANGE,function(){e.fireEvent(BI.TreeValueChooserPane.EVENT_CHANGE)}),BI.isNotNull(t.items)&&(this._initData(t.items),this.populate())},setSelectedValue:function(e){this.pane.setSelectedValue(e)},setValue:function(e){this.pane.setValue(e)},getValue:function(){return this.pane.getValue()},populate:function(){this.pane.populate.apply(this.pane,arguments)}}),BI.TreeValueChooserPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.tree_value_chooser_pane",BI.TreeValueChooserPane)},function(e,t){BI.AbstractValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn,cache:!0})},_valueFormatter:function(i){var n=i;return BI.isNotNull(this.items)&&BI.some(this.items,function(e,t){if(t.value===i||t.value+""===i)return n=t.text,!0}),n},_getItemsByTimes:function(e,t){for(var i=[],n=(t-1)*this._const.perPage;e[n]&&n<t*this._const.perPage;n++)i.push(e[n]);return i},_hasNextByTimes:function(e,t){return t*this._const.perPage<e.length},_itemsCreator:function(t,o){var a=this,e=this.options;function i(n){var e=(t.keywords||[]).slice(),r=n;if(BI.isNotEmptyArray(e)&&(r=[],BI.each(e,function(e,t){var i=BI.Func.getSearchResult(n,t);r=r.concat(i.match).concat(i.find)}),r=BI.uniq(r)),t.selectedValues){var i=BI.makeObject(t.selectedValues,!0);r=BI.filter(r,function(e,t){return!i[t.value]})}t.type!==BI.MultiSelectCombo.REQ_GET_ALL_DATA?t.type!==BI.MultiSelectCombo.REQ_GET_DATA_LENGTH?o({items:a._getItemsByTimes(r,t.times),hasNext:a._hasNextByTimes(r,t.times)}):o({count:r.length}):o({items:r})}e.cache&&this.items?i(this.items):e.itemsCreator({},function(e){i(a.items=e)})}})},function(e,t){BI.ValueChooserInsertCombo=BI.inherit(BI.AbstractValueChooser,{_defaultConfig:function(){return BI.extend(BI.ValueChooserInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-value-chooser-insert-combo",width:200,height:24,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.ValueChooserInsertCombo.superclass._init.apply(this,arguments);var e=this,t=this.options;BI.isNotNull(t.items)&&(this.items=t.items),this.combo=BI.createWidget({type:"bi.multi_select_insert_combo",element:this,allowEdit:t.allowEdit,text:t.text,value:t.value,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:t.width,height:t.height,listeners:[{eventName:BI.MultiSelectCombo.EVENT_FOCUS,action:function(){e.fireEvent(BI.ValueChooserInsertCombo.EVENT_FOCUS)}},{eventName:BI.MultiSelectCombo.EVENT_BLUR,action:function(){e.fireEvent(BI.ValueChooserInsertCombo.EVENT_BLUR)}},{eventName:BI.MultiSelectCombo.EVENT_STOP,action:function(){e.fireEvent(BI.ValueChooserInsertCombo.EVENT_STOP)}},{eventName:BI.MultiSelectCombo.EVENT_CLICK_ITEM,action:function(){e.fireEvent(BI.ValueChooserInsertCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiSelectCombo.EVENT_SEARCHING,action:function(){e.fireEvent(BI.ValueChooserInsertCombo.EVENT_SEARCHING)}},{eventName:BI.MultiSelectCombo.EVENT_CONFIRM,action:function(){e.fireEvent(BI.ValueChooserInsertCombo.EVENT_CONFIRM)}}]})},setValue:function(e){this.combo.setValue(e)},getValue:function(){var e=this.combo.getValue()||{};return{type:e.type,value:e.value}},populate:function(e){this.items=e,this.combo.populate.apply(this,arguments)}}),BI.ValueChooserInsertCombo.EVENT_BLUR="EVENT_BLUR",BI.ValueChooserInsertCombo.EVENT_FOCUS="EVENT_FOCUS",BI.ValueChooserInsertCombo.EVENT_STOP="EVENT_STOP",BI.ValueChooserInsertCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.ValueChooserInsertCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.ValueChooserInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.value_chooser_insert_combo",BI.ValueChooserInsertCombo)},function(e,t){BI.ValueChooserCombo=BI.inherit(BI.AbstractValueChooser,{_defaultConfig:function(){return BI.extend(BI.ValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-value-chooser-combo",width:200,height:24,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.ValueChooserCombo.superclass._init.apply(this,arguments);var e=this,t=this.options;BI.isNotNull(t.items)&&(this.items=t.items),this.combo=BI.createWidget({type:"bi.multi_select_combo",element:this,allowEdit:t.allowEdit,text:t.text,value:t.value,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:t.width,height:t.height,listeners:[{eventName:BI.MultiSelectCombo.EVENT_FOCUS,action:function(){e.fireEvent(BI.ValueChooserCombo.EVENT_FOCUS)}},{eventName:BI.MultiSelectCombo.EVENT_BLUR,action:function(){e.fireEvent(BI.ValueChooserCombo.EVENT_BLUR)}},{eventName:BI.MultiSelectCombo.EVENT_STOP,action:function(){e.fireEvent(BI.ValueChooserCombo.EVENT_STOP)}},{eventName:BI.MultiSelectCombo.EVENT_CLICK_ITEM,action:function(){e.fireEvent(BI.ValueChooserCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiSelectCombo.EVENT_SEARCHING,action:function(){e.fireEvent(BI.ValueChooserCombo.EVENT_SEARCHING)}},{eventName:BI.MultiSelectCombo.EVENT_CONFIRM,action:function(){e.fireEvent(BI.ValueChooserCombo.EVENT_CONFIRM)}}]})},setValue:function(e){this.combo.setValue(e)},getValue:function(){var e=this.combo.getValue()||{};return{type:e.type,value:e.value}},populate:function(e){this.items=e,this.combo.populate.apply(this,arguments)}}),BI.ValueChooserCombo.EVENT_BLUR="EVENT_BLUR",BI.ValueChooserCombo.EVENT_FOCUS="EVENT_FOCUS",BI.ValueChooserCombo.EVENT_STOP="EVENT_STOP",BI.ValueChooserCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.ValueChooserCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.ValueChooserCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.value_chooser_combo",BI.ValueChooserCombo)},function(e,t){BI.ValueChooserPane=BI.inherit(BI.AbstractValueChooser,{_defaultConfig:function(){return BI.extend(BI.ValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-value-chooser-pane",items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.ValueChooserPane.superclass._init.apply(this,arguments);var e=this,t=this.options;this.list=BI.createWidget({type:"bi.multi_select_list",element:this,value:t.value,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this)}),this.list.on(BI.MultiSelectList.EVENT_CHANGE,function(){e.fireEvent(BI.ValueChooserPane.EVENT_CHANGE)}),BI.isNotNull(t.items)&&(this.items=t.items,this.list.populate())},setValue:function(e){this.list.setValue(e)},getValue:function(){var e=this.list.getValue()||{};return{type:e.type,value:e.value}},populate:function(e){e&&(this.items=e),this.list.populate.apply(this.list,arguments)}}),BI.ValueChooserPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.value_chooser_pane",BI.ValueChooserPane)},function(e,t,i){"use strict";var n=function r(e){return e&&e.__esModule?e:{"default":e}}(i(638));BI.extend(BI,n["default"])},function(e,t,i){"use strict";function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var n={Decorators:function s(e){if(e&&e.__esModule)return e;var t=a();if(t&&t.has(e))return t.get(e);var i={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var o=n?Object.getOwnPropertyDescriptor(e,r):null;o&&(o.get||o.set)?Object.defineProperty(i,r,o):i[r]=e[r]}}i["default"]=e,t&&t.set(e,i);return i}(i(639))};t["default"]=n},function(e,t,i){"use strict";function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function s(e,t){e.prototype=Object.create(t.prototype),function a(e,t){for(var i=Object.getOwnPropertyNames(t),n=0;n<i.length;n++){var r=i[n],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&e[r]===undefined&&Object.defineProperty(e,r,o)}return e}(e.prototype.constructor=e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.shortcut=function r(){return function(e){BI.shortcut(e.xtype,e)}},t.model=function l(){return function(e){BI.model(e.xtype,e)}},t.store=function u(i){var n=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};return function(e){return function(e){function t(){return e.apply(this,arguments)||this}return s(t,e),t.prototype._store=function(){var e=n.props?n.props.apply(this):undefined;return BI.Models.getModel(i.xtype,e)},t}(e)}},t.Model=void 0;var n=function(r){function e(){for(var e,t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];return a(o(e=r.call.apply(r,[this].concat(i))||this),"model",void 0),a(o(e),"store",void 0),a(o(e),"context",void 0),a(o(e),"actions",void 0),a(o(e),"childContext",void 0),a(o(e),"TYPE",void 0),a(o(e),"computed",void 0),e}return s(e,r),e.prototype.state=function(){return{}},e}(Fix.Model);t.Model=n},function(e,t,i){var n=i(23),r=i(723),o=i(162),a=i(63),s=i(725),l=i(25),u=i(780),c=Object.getOwnPropertyDescriptor;t.f=n?c:function(e,t){if(e=a(e),t=s(t,!0),u)try{return c(e,t)}catch(i){}if(l(e,t))return o(!r.f.call(e,t),e[t])}},function(e,t){e.exports=function(e){if(e==undefined)throw TypeError("Can't call method on "+e);return e}},function(e,t,i){var n=i(163),r=i(643),o=n("keys");e.exports=function(e){return o[e]||(o[e]=r(e))}},function(e,t){var i=0,n=Math.random();e.exports=function(e){return"Symbol("+String(e===undefined?"":e)+")_"+(++i+n).toString(36)}},function(e,t,i){var n=i(645),r=Math.min;e.exports=function(e){return 0<e?r(n(e),9007199254740991):0}},function(e,t){var i=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(0<e?n:i)(e)}},function(e,t,i){var n=i(25),r=i(67),o=i(642),a=i(789),s=o("IE_PROTO"),l=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){return e=r(e),n(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?l:null}},function(e,t,i){var n=i(11),r=i(166),o=Function.call;e.exports=function(e,t,i){return r(o,n[e].prototype[t],i)}},function(e,t){e.exports=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}}},function(e,t){Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){var i;if(null==this)throw new TypeError('"this" is null or not defined');var n=Object(this),r=n.length>>>0;if(0==r)return-1;var o=0|t;if(r<=o)return-1;for(i=Math.max(0<=o?o:r-Math.abs(o),0);i<r;){if(i in n&&n[i]===e)return i;i++}return-1}),Array.prototype.lastIndexOf||(Array.prototype.lastIndexOf=function(e){"use strict";if(null==this)throw new TypeError;var t,i,n=Object(this),r=n.length>>>0;if(0==r)return-1;for(t=r-1,1<arguments.length&&((t=Number(arguments[1]))!=t?t=0:0!=t&&t!=1/0&&t!=-1/0&&(t=(0<t||-1)*Math.floor(Math.abs(t)))),i=0<=t?Math.min(t,r-1):r-Math.abs(t);0<=i;i--)if(i in n&&n[i]===e)return i;return-1})},function(e,t){var i;_global.console=_global.console||((i={}).log=i.warn=i.debug=i.info=i.error=i.time=i.dir=i.profile=i.clear=i.exception=i.trace=i.assert=function(){},i)},function(e,t){_global.localStorage||(_global.localStorage={items:{},setItem:function(e,t){BI.Cache.addCookie(e,t)},getItem:function(e){return BI.Cache.getCookie(e)},removeItem:function(e){BI.Cache.deleteCookie(e)},key:function(){},clear:function(){this.items={}}})},function(e,t){Object.keys||(Object.keys=function(e){if(e!==Object(e))throw new TypeError("Object.keys called on a non-object");var t,i,n={__ob__:t,$accessors:t,$vbthis:t,$vbsetter:t},r=[];for(i in e)i in n||Object.prototype.hasOwnProperty.call(e,i)&&r.push(i);return r}),Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),Date.now||(Date.now=function(){return(new Date).valueOf()})},function(e,t){"undefined"!=typeof Set&&Set.toString().match(/native code/)||(Set=function(){this.set={}},Set.prototype.has=function(e){return this.set[e]!==undefined},Set.prototype.add=function(e){this.set[e]=1},Set.prototype.clear=function(){this.set={}})},function(e,t){!function(){var e=window.navigator.userAgent.toLowerCase();if(/msie/.test(e)){var a=Array.prototype.sort;Array.prototype.sort=function(e){if(e&&"function"==typeof e){if(this.length<2)return this;for(var t,i=0,n=i+1,r=this.length,o=0;i<r;i++)for(n=i+1;n<r;n++)!0===0<("number"==typeof(o=e.call(this,this[i],this[n]))?o:o?1:0)&&(t=this[i],this[i]=this[n],this[n]=t);return this}return a.call(this)}}}()},,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,i){},function(e,t,i){},function(e,t){BI.prepares.push(function(){function r(){return null==e&&(e=!(!BI.isSupportCss3||!BI.isSupportCss3("flex"))),e}var e;BI.Plugin.registerWidget("bi.horizontal",function(e){var t=BI.isIE(),i=r(),n=t&&BI.getIEVersion()<8;return e.verticalAlign===BI.VerticalAlign.Middle&&e.horizontalAlign===BI.HorizontalAlign.Center?n?e:BI.extend(e,{type:"bi.table_adapt"}):e.verticalAlign===BI.VerticalAlign.Middle&&e.horizontalAlign===BI.HorizontalAlign.Left?n?e:BI.extend(e,{type:"bi.table_adapt"}):e.verticalAlign===BI.VerticalAlign.Top&&e.horizontalAlign===BI.HorizontalAlign.Center?n?e:BI.extend(e,{type:"bi.table_adapt"}):t?e:i?BI.extend(e,{type:"bi.flex_horizontal"}):BI.extend(e,{type:"bi.table_adapt"})}),BI.Plugin.registerWidget("bi.center_adapt",function(e){var t=BI.isIE(),i=r(),n=e.items&&e.items.length<=1;return!t&&i&&n?!0===e.scrollable||!0===e.scrollx||!0===e.scrolly?BI.extend(e,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(e,{type:"bi.flex_center_adapt"}):n?BI.extend(e,{type:"bi.inline_center_adapt"}):e}),BI.Plugin.registerWidget("bi.vertical_adapt",function(e){var t=BI.isIE(),i=r();return!t&&i?!0===e.scrollable||!0===e.scrollx||!0===e.scrolly?BI.extend({},e,{type:"bi.flex_scrollable_vertical_center_adapt"}):BI.extend(e,{type:"bi.flex_vertical_center_adapt"}):BI.extend(e,{type:"bi.inline_vertical_adapt"})}),BI.Plugin.registerWidget("bi.horizontal_adapt",function(e){return e.items&&e.items.length<=1?BI.extend(e,{type:"bi.horizontal_auto"}):e}),BI.Plugin.registerWidget("bi.float_center_adapt",function(e){return!BI.isIE()&&r()?!0===e.scrollable||!0===e.scrollx||!0===e.scrolly?BI.extend({},e,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(e,{type:"bi.flex_center_adapt"}):BI.extend(e,{type:"bi.inline_center_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal",function(e){if(!0===e.scrollable||!0===e.scrolly)return BI.extend({},e,{type:"bi.flex_scrollable_horizontal"})}),BI.Plugin.registerWidget("bi.flex_vertical",function(e){if(!0===e.scrollable||!0===e.scrollx)return BI.extend({},e,{type:"bi.flex_scrollable_vertical"})}),BI.Plugin.registerWidget("bi.flex_horizontal_adapt",function(e){if(!0===e.scrollable||!0===e.scrollx)return BI.extend({},e,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_adapt",function(e){if(!0===e.scrollable||!0===e.scrolly)return BI.extend({},e,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal_center_adapt",function(e){if(!0===e.scrollable||!0===e.scrollx)return BI.extend({},e,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_center_adapt",function(e){if(!0===e.scrollable||!0===e.scrolly)return BI.extend({},e,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_center_adapt",function(e){if(!0===e.scrollable||!0===e.scrolly||!0===e.scrollx)return BI.extend({},e,{type:"bi.flex_scrollable_center_adapt"})}),BI.Plugin.registerWidget("bi.radio",function(e){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(e,{type:"bi.image_radio"}):e}),BI.Plugin.registerWidget("bi.checkbox",function(e){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(e,{type:"bi.image_checkbox"}):e}),BI.Plugin.registerWidget("bi.half_icon_button",function(e){return BI.isIE()&&BI.getIEVersion()<9?e:BI.extend(e,{type:"bi.half_button"})})})},function(e,t){!function(){var t,i,n=_global.document&&_global.document.attachEvent,r=!1;if(_global.document&&!n){var e=(i=_global.requestAnimationFrame||_global.mozRequestAnimationFrame||_global.webkitRequestAnimationFrame||function(e){return _global.setTimeout(e,20)},function(e){return i(e)}),o=(t=_global.cancelAnimationFrame||_global.mozCancelAnimationFrame||_global.webkitCancelAnimationFrame||_global.clearTimeout,function(e){return t(e)}),a=function(e){var t=e.__resizeTriggers__,i=t.firstElementChild,n=t.lastElementChild,r=i.firstElementChild;n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight,r.style.width=i.offsetWidth+1+"px",r.style.height=i.offsetHeight+1+"px",i.scrollLeft=i.scrollWidth,i.scrollTop=i.scrollHeight},s=function(t){var i=this;a(this),this.__resizeRAF__&&o(this.__resizeRAF__),this.__resizeRAF__=e(function(){!function(e){return e.offsetWidth!==e.__resizeLast__.width||e.offsetHeight!==e.__resizeLast__.height}(i)||(i.__resizeLast__.width=i.offsetWidth,i.__resizeLast__.height=i.offsetHeight,i.__resizeListeners__.forEach(function(e){e.call(i,t)}))})},l=!1,u="",c="animationstart",h="Webkit Moz O ms".split(" "),p="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),d="",g=document.createElement("fakeelement");if(g.style.animationName!==undefined&&(l=!0),!1===l)for(var f=0;f<h.length;f++)if(g.style[h[f]+"AnimationName"]!==undefined){(d=h[f])+"Animation",u="-"+d.toLowerCase()+"-",c=p[f],l=!0;break}var I="resizeanim",B="@"+u+"keyframes "+I+" { from { opacity: 0; } to { opacity: 0; } } ",E=u+"animation: 1ms "+I+"; "}function _(t,e){n?(t.attachEvent("onresize",e),BI.nextTick(e)):(t.__resizeTriggers__||("static"===getComputedStyle(t).position&&(t.style.position="relative"),function(){if(!r){var e=(B||"")+".resize-triggers { "+(E||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',t=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e)),t.appendChild(i),r=!0}}(),t.__resizeLast__={},t.__resizeListeners__=[],(t.__resizeTriggers__=document.createElement("div")).className="resize-triggers",t.__resizeTriggers__.innerHTML='<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>',t.appendChild(t.__resizeTriggers__),a(t),t.addEventListener("scroll",s,!0),c&&t.__resizeTriggers__.addEventListener(c,function(e){e.animationName===I&&a(t)})),t.__resizeListeners__.push(e))}function m(e,t){n?e.detachEvent("onresize",t):(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),e.__resizeListeners__.length||(e.removeEventListener("scroll",s),e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)))}BI.ResizeDetector={addResizeListener:function(e,t){return _(e.element[0],t),function(){m(e.element[0],t)}},removeResizeListener:function(e,t){m(e.element[0],t)}}}()},function(e,t){BI.DOM={},BI.extend(BI.DOM,{ready:function(e){BI.Widget._renderEngine.createElement(document).ready(e)}}),BI.extend(BI.DOM,{patchProps:function(e,n){var t=BI.jQuery._data(e[0]).events;BI.each(t,function(i,e){BI.each(e,function(e,t){n.on(i+(t.namespace?"."+t.namespace:""),t)})});var i=e.children(),r=n.children();if(i.length!==r.length)throw new Error("不匹配");BI.each(i,function(e,t){BI.DOM.patchProps(BI.jQuery(t),BI.jQuery(r[e]))}),BI.each(e.data("__widgets"),function(e,t){t.element=n})},hang:function(e){if(!BI.isEmpty(e)){var i=BI.Widget._renderEngine.createFragment();return BI.each(e,function(e,t){t instanceof BI.Widget&&(t=t.element),t instanceof BI.$&&t[0]&&i.appendChild(t[0])}),i}},isExist:function(e){return 0<BI.Widget._renderEngine.createElement("body").find(e.element).length},preloadImages:function(e,t){var i=0,n=[];function r(){++i>=e.length&&t()}BI.each(e,function(e,t){n[e]=new Image,n[e].src=t,n[e].onload=function(){r()},n[e].onerror=function(){r()}})},getTextSizeWidth:function(e,t){var i=BI.Widget._renderEngine.createElement("<span></span>").addClass("text-width-span").appendTo("body");null==t&&(t=12),t+="px",i.css("font-size",t).text(e);var n=i.width();return i.remove(),n},getTextSizeHeight:function(e,t){var i=BI.Widget._renderEngine.createElement("<span></span>").addClass("text-width-span").appendTo("body");null==t&&(t=12),t+="px",i.css("font-size",t).text(e);var n=i.height();return i.remove(),n},getScrollWidth:function(){if(BI.isNull(this._scrollWidth)||0===this._scrollWidth){var e=BI.Widget._renderEngine.createElement("<div>").width(50).height(50).css({position:"absolute",top:"-9999px",overflow:"scroll"}).appendTo("body");this._scrollWidth=e[0].offsetWidth-e[0].clientWidth,e.destroy()}return this._scrollWidth},getImage:function(e,t,i){var n=document.createElement("canvas");BI.Widget._renderEngine.createElement("body").append(n);var r=n.getContext("2d");r.font="12px Georgia";var o=r.measureText(e).width+4;n.width=2*o,n.height=32,r.font="24px Georgia",r.fillStyle=t||"#3685f2",r.textBaseline="middle",r.fillText(e,4,18),BI.Widget._renderEngine.createElement(n).destroy();var a=i||"rgba(54, 133, 242, 0.1)";return{width:o,height:16,src:n.toDataURL("image/png"),style:"background-color: "+a+";vertical-align: middle; margin: 0 1px; width:"+o+"px;height: 16px; max-width:"+o+"px;max-height: 16px; min-width:"+o+"px;min-height: 16px",param:e}}}),BI.extend(BI.DOM,{isColor:function(e){return e&&(this.isRGBColor(e)||this.isHexColor(e))},isRGBColor:function(e){return!!e&&"rgb"===e.substr(0,3)},isHexColor:function(e){return!!e&&"#"===e[0]&&7===e.length},isDarkColor:function(e){if(!e||!this.isHexColor(e))return!1;var t=this.rgb2json(this.hex2rgb(e));return Math.round(.299*t.r+.587*t.g+.114*t.b)<192},getContrastColor:function(e){return e&&this.isColor(e)?this.isDarkColor(e)?"#ffffff":"#1a1a1a":""},rgb2hex:function(e){if(!e||"rgb"!=e.substr(0,3))return"";var t=e.match(/\d+(\.\d+)?/g),i=BI.parseInt(t[0]),n=BI.parseInt(t[1]),r=BI.parseInt(t[2]);return"#"+this.int2hex(i)+this.int2hex(n)+this.int2hex(r)},rgb2json:function(e){if(!e)return{};if(!this.isRGBColor(e))return{};var t=e.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(t[0]),g:BI.parseInt(t[1]),b:BI.parseInt(t[2])}},rgba2json:function(e){if(!e)return{};var t=e.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(t[0]),g:BI.parseInt(t[1]),b:BI.parseInt(t[2]),a:BI.parseFloat(t[3])}},json2rgb:function(e){return BI.isKey(e.r)&&BI.isKey(e.g)&&BI.isKey(e.b)?"rgb("+e.r+","+e.g+","+e.b+")":""},json2rgba:function(e){return BI.isKey(e.r)&&BI.isKey(e.g)&&BI.isKey(e.b)?"rgba("+e.r+","+e.g+","+e.b+","+e.a+")":""},int2hex:function(e){var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return t[e>>>4]+""+t[15&e]},hex2rgb:function(e){if(!e)return"";if(!this.isHexColor(e))return e;var t,i="rgb(";return 7===e.length?t=[BI.parseInt("0x"+e.substring(1,3)),BI.parseInt("0x"+e.substring(3,5)),BI.parseInt("0x"+e.substring(5,7))]:4===e.length&&(t=[BI.parseInt("0x"+e.substring(1,2)),BI.parseInt("0x"+e.substring(2,3)),BI.parseInt("0x"+e.substring(3,4))]),i+=t[0]+",",i+=t[1]+",",i+=t[2]+")"},rgba2rgb:function(e,t){if(BI.isNull(t)&&(t=1),"rgba"!=e.substr(0,4))return"";var i=e.match(/\d+(\.\d+)?/g);if(i.length<4)return"";var n=BI.parseFloat(i[0]),r=BI.parseFloat(i[1]),o=BI.parseFloat(i[2]),a=BI.parseFloat(i[3]);return"rgb("+Math.floor(t*(1-a)*255+n*a)+","+Math.floor(t*(1-a)*255+r*a)+","+Math.floor(t*(1-a)*255+o*a)+")"}}),BI.extend(BI.DOM,{getLeftPosition:function(e,t,i){return{left:e.element.offset().left-t.element.outerWidth()-(i||0)}},getInnerLeftPosition:function(e,t,i){return{left:e.element.offset().left+(i||0)}},getRightPosition:function(e,t,i){var n=e.element;return{left:n.offset().left+n.outerWidth()+(i||0)}},getInnerRightPosition:function(e,t,i){var n=e.element,r=t.element.bounds();return{left:n.offset().left+n.outerWidth()-r.width-(i||0)}},getTopPosition:function(e,t,i){return{top:e.element.offset().top-t.element.outerHeight()-(i||0)}},getBottomPosition:function(e,t,i){var n=e.element;return{top:n.offset().top+n.outerHeight()+(i||0)}},isLeftSpaceEnough:function(e,t,i){return 0<=BI.DOM.getLeftPosition(e,t,i).left},isInnerLeftSpaceEnough:function(e,t,i){var n=t.element.bounds(),r=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getInnerLeftPosition(e,t,i).left+n.width<=r.width},isRightSpaceEnough:function(e,t,i){var n=t.element.bounds(),r=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getRightPosition(e,t,i).left+n.width<=r.width},isInnerRightSpaceEnough:function(e,t,i){return 0<=BI.DOM.getInnerRightPosition(e,t,i).left},isTopSpaceEnough:function(e,t,i){return 0<=BI.DOM.getTopPosition(e,t,i).top},isBottomSpaceEnough:function(e,t,i){var n=t.element.bounds(),r=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getBottomPosition(e,t,i).top+n.height<=r.height},isRightSpaceLarger:function(e){return BI.Widget._renderEngine.createElement("body").bounds().width-e.element.offset().left-e.element.bounds().width>=e.element.offset().left},isBottomSpaceLarger:function(e){return BI.Widget._renderEngine.createElement("body").bounds().height-e.element.offset().top-e.element.bounds().height>=e.element.offset().top},getLeftAlignPosition:function(e,t,i){var n=t.element.bounds(),r=BI.Widget._renderEngine.createElement("body").bounds(),o=e.element.offset().left+i;return o+n.width>r.width&&(o=r.width-n.width),o<0&&(o=0),{left:o}},getLeftAdaptPosition:function(e,t,i){return BI.DOM.isLeftSpaceEnough(e,t,i)?BI.DOM.getLeftPosition(e,t,i):{left:0}},getRightAlignPosition:function(e,t,i){var n=e.element.bounds(),r=t.element.bounds(),o=e.element.offset().left+n.width-r.width-i;return o<0&&(o=0),{left:o}},getRightAdaptPosition:function(e,t,i){return BI.DOM.isRightSpaceEnough(e,t,i)?BI.DOM.getRightPosition(e,t,i):{left:BI.Widget._renderEngine.createElement("body").bounds().width-t.element.bounds().width}},getTopAlignPosition:function(e,t,i,n){var r,o,a=e.element.offset(),s=e.element.bounds(),l=t.element.bounds(),u=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(e,t,-1*s.height+i)?r=a.top+i:n?(r=a.top+i,o=u.height-r):(r=u.height-l.height)<i&&(o=u.height-i),r<i&&(r=i),o?{top:r,adaptHeight:o}:{top:r}},getTopAdaptPosition:function(e,t,i,n){var r=t.element.bounds(),o=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isTopSpaceEnough(e,t,i)?BI.DOM.getTopPosition(e,t,i):n?{top:0,adaptHeight:e.element.offset().top-i}:r.height+i>o.height?{top:0,adaptHeight:o.height-i}:{top:0}},getBottomAlignPosition:function(e,t,i,n){var r,o,a=e.element.offset(),s=e.element.bounds(),l=t.element.bounds(),u=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isTopSpaceEnough(e,t,-1*s.height+i)?r=a.top+s.height-l.height-i:n?(r=0,o=a.top+s.height-i):(r=0,l.height+i>u.height&&(o=u.height-i)),r<0&&(r=0),o?{top:r,adaptHeight:o}:{top:r}},getBottomAdaptPosition:function(e,t,i,n){var r=e.element.offset(),o=e.element.bounds(),a=t.element.bounds(),s=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(e,t,i)?BI.DOM.getBottomPosition(e,t,i):n?{top:r.top+o.height+i,adaptHeight:s.height-r.top-o.height-i}:a.height+i>s.height?{top:i,adaptHeight:s.height-i}:{top:s.height-a.height-i}},getCenterAdaptPosition:function(e,t){var i,n=e.element.offset(),r=e.element.bounds(),o=t.element.bounds(),a=BI.Widget._renderEngine.createElement("body").bounds();return(i=n.left+r.width/2+o.width/2>a.width?a.width-o.width:n.left+r.width/2-o.width/2)<0&&(i=0),{left:i}},getMiddleAdaptPosition:function(e,t){var i,n=e.element.offset(),r=e.element.bounds(),o=t.element.bounds(),a=BI.Widget._renderEngine.createElement("body").bounds();return(i=n.top+r.height/2+o.height/2>a.height?a.height-o.height:n.top+r.height/2-o.height/2)<0&&(i=0),{top:i}},getComboPositionByDirections:function(e,t,i,n,r,o){var a,s;i=i||0,n=n||0;var l,u,c,h=[],p=[],d=[],g=!1,f=!1,I=!1,B=o[0];for(a=0;a<o.length;a++)switch(s=o[a]){case"left":case"right":h.push(s);break;case"top":case"bottom":p.push(s);break;case"innerLeft":case"innerRight":d.push(s)}for(a=0;a<o.length;a++)switch(s=o[a]){case"left":if(!g){var E=f?n:i,_=f?0:n;if(BI.DOM.isLeftSpaceEnough(e,t,E))return l=BI.DOM.getLeftPosition(e,t,E).left,"bottom"===p[0]?(c=BI.DOM.getTopAlignPosition(e,t,_,r)).dir="left,bottom":(c=BI.DOM.getBottomAlignPosition(e,t,_,r)).dir="left,top",f&&(c.change="left"),c.left=l,c}I=!0;break;case"right":if(!g&&(E=f?n:i,_=f?i:n,BI.DOM.isRightSpaceEnough(e,t,E)))return l=BI.DOM.getRightPosition(e,t,E).left,"bottom"===p[0]?(c=BI.DOM.getTopAlignPosition(e,t,_,r)).dir="right,bottom":(c=BI.DOM.getBottomAlignPosition(e,t,_,r)).dir="right,top",f&&(c.change="right"),c.left=l,c;I=!0;break;case"top":if(E=I?n:i,_=I?i:n,BI.DOM.isTopSpaceEnough(e,t,_))return u=BI.DOM.getTopPosition(e,t,_).top,"right"===h[0]?(c=BI.DOM.getLeftAlignPosition(e,t,E,r)).dir="top,right":(c=BI.DOM.getRightAlignPosition(e,t,E)).dir="top,left",I&&(c.change="top"),c.top=u,c;r&&(g=!0),f=!0;break;case"bottom":if(E=I?n:i,_=I?i:n,BI.DOM.isBottomSpaceEnough(e,t,_))return u=BI.DOM.getBottomPosition(e,t,_).top,"right"===h[0]?(c=BI.DOM.getLeftAlignPosition(e,t,E,r)).dir="bottom,right":(c=BI.DOM.getRightAlignPosition(e,t,E)).dir="bottom,left",I&&(c.change="bottom"),c.top=u,c;r&&(g=!0),f=!0;break;case"innerLeft":if(!g&&(E=f?n:i,_=f?0:n,BI.DOM.isInnerLeftSpaceEnough(e,t,E)))return l=BI.DOM.getInnerLeftPosition(e,t,E).left,"bottom"===p[0]?(c=BI.DOM.getTopAlignPosition(e,t,_,r)).dir="innerLeft,bottom":(c=BI.DOM.getBottomAlignPosition(e,t,_,r)).dir="innerLeft,top",f&&(c.change="innerLeft"),c.left=l,c;I=!0;break;case"innerRight":if(!g&&(E=f?n:i,_=f?i:n,BI.DOM.isInnerRightSpaceEnough(e,t,E)))return l=BI.DOM.getInnerRightPosition(e,t,E).left,"bottom"===p[0]?(c=BI.DOM.getTopAlignPosition(e,t,_,r)).dir="innerRight,bottom":(c=BI.DOM.getBottomAlignPosition(e,t,_,r)).dir="innerRight,top",f&&(c.change="innerRight"),c.left=l,c}switch(o[0]){case"left":case"right":return B=BI.DOM.isRightSpaceLarger(e)?(l=BI.DOM.getRightAdaptPosition(e,t,i).left,"right"):(l=BI.DOM.getLeftAdaptPosition(e,t,i).left,"left"),"bottom"===p[0]?((c=BI.DOM.getTopAlignPosition(e,t,n,r)).left=l,c.dir=B+",bottom"):((c=BI.DOM.getBottomAlignPosition(e,t,n,r)).left=l,c.dir=B+",top"),c;default:return B=BI.DOM.isBottomSpaceLarger(e)?(c=BI.DOM.getBottomAdaptPosition(e,t,n,r),"bottom"):(c=BI.DOM.getTopAdaptPosition(e,t,n,r),"top"),"right"===h[0]?(l=BI.DOM.getLeftAlignPosition(e,t,i,r).left,c.left=l,c.dir=B+",right"):(l=BI.DOM.getRightAlignPosition(e,t,i).left,c.left=l,c.dir=B+",left"),c}},getComboPosition:function(e,t,i,n,r,o,a){i=i||0,n=n||0;var s=BI.Widget._renderEngine.createElement("body").bounds().height-n,l=Math.min(t.attr("maxHeight")||s,s);t.resetHeight&&t.resetHeight(l);var u=BI.DOM.getComboPositionByDirections(e,t,i,n,r,o||["bottom","top","right","left"]);switch(a){case"center":if(u.change){var c=BI.DOM.getMiddleAdaptPosition(e,t);u.top=c.top}else c=BI.DOM.getCenterAdaptPosition(e,t),u.left=c.left;break;case"middle":u.change?(c=BI.DOM.getCenterAdaptPosition(e,t),u.left=c.left):(c=BI.DOM.getMiddleAdaptPosition(e,t),u.top=c.top)}return!0===r&&t.resetHeight&&t.resetHeight(Math.min(s-u.top,l)),u}})},function(e,t){BI.EventListener={listen:function(e,t,i){return e.addEventListener?(e.addEventListener(t,i,!1),{remove:function(){e.removeEventListener(t,i,!1)}}):e.attachEvent?(e.attachEvent("on"+t,i),{remove:function(){e.detachEvent("on"+t,i)}}):void 0},capture:function(e,t,i){return e.addEventListener?(e.addEventListener(t,i,!0),{remove:function(){e.removeEventListener(t,i,!0)}}):{remove:BI.emptyFn}},registerDefault:function(){}}},function(e,t){_.extend(BI,{isIE:function(){return!!_global.navigator&&(null==this.__isIE&&(this.__isIE=/(msie|trident)/i.test(navigator.userAgent.toLowerCase())),this.__isIE)},getIEVersion:function(){if(!_global.navigator)return 0;if(null!=this.__IEVersion)return this.__IEVersion;var e=0,t=navigator.userAgent.toLowerCase(),i=t.match(/(?:msie\s([\w.]+))/),n=t.match(/(?:trident.*rv:([\w.]+))/);return e=i&&n&&i[1]&&n[1]?Math.max(1*i[1],1*n[1]):i&&i[1]?1*i[1]:n&&n[1]?1*n[1]:0,this.__IEVersion=e},isIE9Below:function(){return!!BI.isIE()&&this.getIEVersion()<9},isEdge:function(){return!!_global.navigator&&/edge/i.test(navigator.userAgent.toLowerCase())},isChrome:function(){return!!_global.navigator&&/chrome/i.test(navigator.userAgent.toLowerCase())},isFireFox:function(){return!!_global.navigator&&/firefox/i.test(navigator.userAgent.toLowerCase())},isOpera:function(){return!!_global.navigator&&/opera/i.test(navigator.userAgent.toLowerCase())},isSafari:function(){return!!_global.navigator&&(/safari/i.test(navigator.userAgent.toLowerCase())&&!/chrome/i.test(navigator.userAgent.toLowerCase()))},isKhtml:function(){return!!_global.navigator&&/Konqueror|Safari|KHTML/i.test(navigator.userAgent)},isMac:function(){return!!_global.navigator&&/macintosh|mac os x/i.test(navigator.userAgent)},isWindows:function(){return!!_global.navigator&&/windows|win32/i.test(navigator.userAgent)},isSupportCss3:function(e){if(!_global.document)return!1;function t(e){return BI.isString(e)?e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()}):""}var i,n,r=["webkit","Moz","ms","o"],o=[],a=document.documentElement.style;for(i=0;i<r.length;i++)o.push(t(r[i]+"-"+e));for(o.push(t(e)),i=0,n=o.length;i<n;i++)if(o[i]in a)return!0;return!1}})},function(zt,jt,qt){var $t;!function(f,v){function t(e,t){return t.toUpperCase()}function r(e){!I.addEventListener&&"load"!==e.type&&"complete"!==I.readyState||(A(),Ie.ready())}var o,i,B=typeof v,I=f.document,e=f.location,n=f.jQuery,a=f.$,s={},h=[],l="1.12.4",E=h.concat,u=h.push,p=h.slice,c=h.indexOf,d=s.toString,_=s.hasOwnProperty,g=l.trim,Ie=function(e,t){return new Ie.fn.init(e,t,i)},m=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,N=/\S+/g,b=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,T=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,y=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,C=/^[\],:{}\s]*$/,V=/(?:^|:|,)(?:\s*\[)+/g,S=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,x=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,L=/^-ms-/,w=/-([\da-z])/gi,A=function(){I.addEventListener?(I.removeEventListener("DOMContentLoaded",r,!1),f.removeEventListener("load",r,!1)):(I.detachEvent("onreadystatechange",r),f.detachEvent("onload",r))};function D(e){var t=e.length,i=Ie.type(e);return!Ie.isWindow(e)&&(!(1!==e.nodeType||!t)||("array"===i||"function"!==i&&(0===t||"number"==typeof t&&0<t&&t-1 in e)))}Ie.fn=Ie.prototype={jquery:l,constructor:Ie,init:function(e,t,i){var n,r;if(!e)return this;if("string"!=typeof e)return e.nodeType?(this.context=this[0]=e,this.length=1,this):Ie.isFunction(e)?i.ready(e):(e.selector!==v&&(this.selector=e.selector,this.context=e.context),Ie.makeArray(e,this));if(!(n="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&3<=e.length?[null,e,null]:T.exec(e))||!n[1]&&t)return!t||t.jquery?(t||i).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof Ie?t[0]:t,Ie.merge(this,Ie.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:I,!0)),y.test(n[1])&&Ie.isPlainObject(t))for(n in t)Ie.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}if((r=I.getElementById(n[2]))&&r.parentNode){if(r.id!==n[2])return i.find(e);this.length=1,this[0]=r}return this.context=I,this.selector=e,this},selector:"",length:0,size:function(){return this.length},toArray:function(){return p.call(this)},get:function(e){return null==e?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e){var t=Ie.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return Ie.each(this,e,t)},ready:function(e){return Ie.ready.promise().done(e),this},slice:function(){return this.pushStack(p.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,i=+e+(e<0?t:0);return this.pushStack(0<=i&&i<t?[this[i]]:[])},map:function(i){return this.pushStack(Ie.map(this,function(e,t){return i.call(e,t,e)}))},end:function(){return this.prevObject||this.constructor(null)},push:u,sort:[].sort,splice:[].splice},Ie.fn.init.prototype=Ie.fn,Ie.extend=Ie.fn.extend=function(){var e,t,i,n,r,o,a=arguments[0]||{},s=1,l=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[1]||{},s=2),"object"==typeof a||Ie.isFunction(a)||(a={}),l===s&&(a=this,--s);s<l;s++)if(null!=(r=arguments[s]))for(n in r)e=a[n],a!==(i=r[n])&&(u&&i&&(Ie.isPlainObject(i)||(t=Ie.isArray(i)))?(o=t?(t=!1,e&&Ie.isArray(e)?e:[]):e&&Ie.isPlainObject(e)?e:{},a[n]=Ie.extend(u,o,i)):i!==v&&(a[n]=i));return a},Ie.extend({noConflict:function(e){return f.$===Ie&&(f.$=a),e&&f.jQuery===Ie&&(f.jQuery=n),Ie},isReady:!1,readyWait:1,holdReady:function(e){e?Ie.readyWait++:Ie.ready(!0)},ready:function(e){if(!0===e?!--Ie.readyWait:!Ie.isReady){if(!I.body)return setTimeout(Ie.ready);(Ie.isReady=!0)!==e&&0<--Ie.readyWait||(o.resolveWith(I,[Ie]),Ie.fn.trigger&&Ie(I).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===Ie.type(e)},isArray:Array.isArray||function(e){return"array"===Ie.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?String(e):"object"==typeof e||"function"==typeof e?s[d.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==Ie.type(e)||e.nodeType||Ie.isWindow(e))return!1;try{if(e.constructor&&!_.call(e,"constructor")&&!_.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(i){return!1}var t;for(t in e);return t===v||_.call(e,t)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,i){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(i=t,t=!1),t=t||I;var n=y.exec(e),r=!i&&[];return n?[t.createElement(n[1])]:(n=Ie.buildFragment([e],t,r),r&&Ie(r).remove(),Ie.merge([],n.childNodes))},parseJSON:function(e){return f.JSON&&f.JSON.parse?f.JSON.parse(e):null===e?e:"string"==typeof e&&(e=Ie.trim(e))&&C.test(e.replace(S,"@").replace(x,"]").replace(V,""))?new Function("return "+e)():void Ie.error("Invalid JSON: "+e)},parseXML:function(e){var t;if(!e||"string"!=typeof e)return null;try{f.DOMParser?t=(new DOMParser).parseFromString(e,"text/xml"):((t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e))}catch(i){t=v}return t&&t.documentElement&&!t.getElementsByTagName("parsererror").length||Ie.error("Invalid XML: "+e),t},noop:function(){},globalEval:function(e){e&&Ie.trim(e)&&(f.execScript||function(e){f.eval.call(f,e)})(e)},camelCase:function(e){return e.replace(L,"ms-").replace(w,t)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,i){var n=0,r=e.length,o=D(e);if(i){if(o)for(;n<r&&!1!==t.apply(e[n],i);n++);else for(n in e)if(!1===t.apply(e[n],i))break}else if(o)for(;n<r&&!1!==t.call(e[n],n,e[n]);n++);else for(n in e)if(!1===t.call(e[n],n,e[n]))break;return e},trim:g&&!g.call("\ufeff ")?function(e){return null==e?"":g.call(e)}:function(e){return null==e?"":(e+"").replace(b,"")},makeArray:function(e,t){var i=t||[];return null!=e&&(D(Object(e))?Ie.merge(i,"string"==typeof e?[e]:e):u.call(i,e)),i},inArray:function(e,t,i){var n;if(t){if(c)return c.call(t,e,i);for(n=t.length,i=i?i<0?Math.max(0,n+i):i:0;i<n;i++)if(i in t&&t[i]===e)return i}return-1},merge:function(e,t){var i=t.length,n=e.length,r=0;if("number"==typeof i)for(;r<i;r++)e[n++]=t[r];else for(;t[r]!==v;)e[n++]=t[r++];return e.length=n,e},grep:function(e,t,i){var n=[],r=0,o=e.length;for(i=!!i;r<o;r++)i!==!!t(e[r],r)&&n.push(e[r]);return n},map:function(e,t,i){var n,r=0,o=e.length,a=[];if(D(e))for(;r<o;r++)null!=(n=t(e[r],r,i))&&(a[a.length]=n);else for(r in e)null!=(n=t(e[r],r,i))&&(a[a.length]=n);return E.apply([],a)},guid:1,proxy:function(e,t){var i,n,r;return"string"==typeof t&&(r=e[t],t=e,e=r),Ie.isFunction(e)?(i=p.call(arguments,2),(n=function(){return e.apply(t||this,i.concat(p.call(arguments)))}).guid=e.guid=e.guid||Ie.guid++,n):v},access:function(e,t,i,n,r,o,a){var s=0,l=e.length,u=null==i;if("object"===Ie.type(i))for(s in r=!0,i)Ie.access(e,t,s,i[s],!0,o,a);else if(n!==v&&(r=!0,Ie.isFunction(n)||(a=!0),u&&(t=a?(t.call(e,n),null):(u=t,function(e,t,i){return u.call(Ie(e),i)})),t))for(;s<l;s++)t(e[s],i,a?n:n.call(e[s],s,t(e[s],i)));return r?e:u?t.call(e):l?t(e[0],i):o},now:function(){return(new Date).getTime()}}),Ie.ready.promise=function(e){if(!o)if(o=Ie.Deferred(),"complete"===I.readyState)setTimeout(Ie.ready);else if(I.addEventListener)I.addEventListener("DOMContentLoaded",r,!1),f.addEventListener("load",r,!1);else{I.attachEvent("onreadystatechange",r),f.attachEvent("onload",r);var t=!1;try{t=null==f.frameElement&&I.documentElement}catch(i){}t&&t.doScroll&&!function n(){if(!Ie.isReady){try{t.doScroll("left")}catch(i){return setTimeout(n,50)}A(),Ie.ready()}}()}return o.promise(e)},Ie.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){s["[object "+t+"]"]=t.toLowerCase()}),i=Ie(I);var M={};Ie.Callbacks=function(r){r="string"==typeof r?M[r]||function p(e){var i=M[e]={};return Ie.each(e.match(N)||[],function(e,t){i[t]=!0}),i}(r):Ie.extend({},r);var o,t,i,a,n,s,l=[],u=!r.once&&[],c=function(e){for(t=r.memory&&e,i=!0,n=s||0,s=0,a=l.length,o=!0;l&&n<a;n++)if(!1===l[n].apply(e[0],e[1])&&r.stopOnFalse){t=!1;break}o=!1,l&&(u?u.length&&c(u.shift()):t?l=[]:h.disable())},h={add:function(){if(l){var e=l.length;!function n(e){Ie.each(e,function(e,t){var i=Ie.type(t);"function"===i?r.unique&&h.has(t)||l.push(t):t&&t.length&&"string"!==i&&n(t)})}(arguments),o?a=l.length:t&&(s=e,c(t))}return this},remove:function(){return l&&Ie.each(arguments,function(e,t){for(var i;-1<(i=Ie.inArray(t,l,i));)l.splice(i,1),o&&(i<=a&&a--,i<=n&&n--)}),this},has:function(e){return e?-1<Ie.inArray(e,l):!(!l||!l.length)},empty:function(){return l=[],this},disable:function(){return l=u=t=v,this},disabled:function(){return!l},lock:function(){return u=v,t||h.disable(),this},locked:function(){return!u},fireWith:function(e,t){return t=[e,(t=t||[]).slice?t.slice():t],!l||i&&!u||(o?u.push(t):c(t)),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!i}};return h},Ie.extend({Deferred:function(e){var a=[["resolve","done",Ie.Callbacks("once memory"),"resolved"],["reject","fail",Ie.Callbacks("once memory"),"rejected"],["notify","progress",Ie.Callbacks("memory")]],r="pending",s={state:function(){return r},always:function(){return l.done(arguments).fail(arguments),this},then:function(){var o=arguments;return Ie.Deferred(function(r){Ie.each(a,function(e,t){var i=t[0],n=Ie.isFunction(o[e])&&o[e];l[t[1]](function(){var e=n&&n.apply(this,arguments);e&&Ie.isFunction(e.promise)?e.promise().done(r.resolve).fail(r.reject).progress(r.notify):r[i+"With"](this===s?r.promise():this,n?[e]:arguments)})}),o=null}).promise()},promise:function(e){return null!=e?Ie.extend(e,s):s}},l={};return s.pipe=s.then,Ie.each(a,function(e,t){var i=t[2],n=t[3];s[t[1]]=i.add,n&&i.add(function(){r=n},a[1^e][2].disable,a[2][2].lock),l[t[0]]=function(){return l[t[0]+"With"](this===l?s:this,arguments),this},l[t[0]+"With"]=i.fireWith}),s.promise(l),e&&e.call(l,l),l},when:function(e){function t(t,i,n){return function(e){i[t]=this,n[t]=1<arguments.length?p.call(arguments):e,n===r?u.notifyWith(i,n):--l||u.resolveWith(i,n)}}var r,i,n,o=0,a=p.call(arguments),s=a.length,l=1!==s||e&&Ie.isFunction(e.promise)?s:0,u=1===l?e:Ie.Deferred();if(1<s)for(r=new Array(s),i=new Array(s),n=new Array(s);o<s;o++)a[o]&&Ie.isFunction(a[o].promise)?a[o].promise().done(t(o,n,a)).fail(u.reject).progress(t(o,i,r)):--l;return l||u.resolveWith(n,a),u.promise()}}),Ie.support=function(){var o,e,t,i,n,r,a,s,l,u,c=I.createElement("div");if(c.setAttribute("className","t"),c.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",e=c.getElementsByTagName("*"),t=c.getElementsByTagName("a")[0],!e||!t||!e.length)return{};a=(n=I.createElement("select")).appendChild(I.createElement("option")),i=c.getElementsByTagName("input")[0],t.style.cssText="top:1px;float:left;opacity:.5",o={getSetAttribute:"t"!==c.className,leadingWhitespace:3===c.firstChild.nodeType,tbody:!c.getElementsByTagName("tbody").length,htmlSerialize:!!c.getElementsByTagName("link").length,style:/top/.test(t.getAttribute("style")),hrefNormalized:"/a"===t.getAttribute("href"),opacity:/^0.5/.test(t.style.opacity),cssFloat:!!t.style.cssFloat,checkOn:!!i.value,optSelected:a.selected,enctype:!!I.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==I.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===I.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},i.checked=!0,o.noCloneChecked=i.cloneNode(!0).checked,n.disabled=!0,o.optDisabled=!a.disabled;try{delete c.test}catch(h){o.deleteExpando=!1}for(u in(i=I.createElement("input")).setAttribute("value",""),o.input=""===i.getAttribute("value"),i.value="t",i.setAttribute("type","radio"),o.radioValue="t"===i.value,i.setAttribute("checked","t"),i.setAttribute("name","t"),(r=I.createDocumentFragment()).appendChild(i),o.appendChecked=i.checked,o.checkClone=r.cloneNode(!0).cloneNode(!0).lastChild.checked,c.attachEvent&&(c.attachEvent("onclick",function(){o.noCloneEvent=!1}),c.cloneNode(!0).click()),{submit:!0,change:!0,focusin:!0})c.setAttribute(s="on"+u,"t"),o[u+"Bubbles"]=s in f||!1===c.attributes[s].expando;return c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",o.clearCloneStyle="content-box"===c.style.backgroundClip,Ie(function(){var e,t,i,n="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",r=I.getElementsByTagName("body")[0];r&&((e=I.createElement("div")).style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",r.appendChild(e).appendChild(c),c.innerHTML="<table><tr><td></td><td>t</td></tr></table>",(i=c.getElementsByTagName("td"))[0].style.cssText="padding:0;margin:0;border:0;display:none",l=0===i[0].offsetHeight,i[0].style.display="",i[1].style.display="none",o.reliableHiddenOffsets=l&&0===i[0].offsetHeight,c.innerHTML="",c.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",o.boxSizing=4===c.offsetWidth,o.doesNotIncludeMarginInBodyOffset=1!==r.offsetTop,f.getComputedStyle&&(o.pixelPosition="1%"!==(f.getComputedStyle(c,null)||{}).top,o.boxSizingReliable="4px"===(f.getComputedStyle(c,null)||{width:"4px"}).width,(t=c.appendChild(I.createElement("div"))).style.cssText=c.style.cssText=n,t.style.marginRight=t.style.width="0",c.style.width="1px",o.reliableMarginRight=!parseFloat((f.getComputedStyle(t,null)||{}).marginRight)),typeof c.style.zoom!==B&&(c.innerHTML="",c.style.cssText=n+"width:1px;padding:1px;display:inline;zoom:1",o.inlineBlockNeedsLayout=3===c.offsetWidth,c.style.display="block",c.innerHTML="<div></div>",c.firstChild.style.width="5px",o.shrinkWrapBlocks=3!==c.offsetWidth,o.inlineBlockNeedsLayout&&(r.style.zoom=1)),r.removeChild(e),e=c=i=t=null)}),e=n=r=a=t=i=null,o}();var k=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function H(e,t,i,n){if(Ie.acceptData(e)){var r,o,a=Ie.expando,s="string"==typeof t,l=e.nodeType,u=l?Ie.cache:e,c=l?e[a]:e[a]&&a;if(c&&u[c]&&(n||u[c].data)||!s||i!==v)return c||(l?e[a]=c=h.pop()||Ie.guid++:c=a),u[c]||(u[c]={},l||(u[c].toJSON=Ie.noop)),"object"!=typeof t&&"function"!=typeof t||(n?u[c]=Ie.extend(u[c],t):u[c].data=Ie.extend(u[c].data,t)),r=u[c],n||(r.data||(r.data={}),r=r.data),i!==v&&(r[Ie.camelCase(t)]=i),s?null==(o=r[t])&&(o=r[Ie.camelCase(t)]):o=r,o}}function R(e,t,i){if(Ie.acceptData(e)){var n,r,o,a=e.nodeType,s=a?Ie.cache:e,l=a?e[Ie.expando]:Ie.expando;if(s[l]){if(t&&(o=i?s[l]:s[l].data)){for((n=0,r=(t=Ie.isArray(t)?t.concat(Ie.map(t,Ie.camelCase)):t in o?[t]:(t=Ie.camelCase(t))in o?[t]:t.split(" ")).length);n<r;n++)delete o[t[n]];if(!(i?W:Ie.isEmptyObject)(o))return}(i||(delete s[l].data,W(s[l])))&&(a?Ie.cleanData([e],!0):Ie.support.deleteExpando||s!=s.window?delete s[l]:s[l]=null)}}}function Y(e,t,i){if(i===v&&1===e.nodeType){var n="data-"+t.replace(P,"-$1").toLowerCase();if("string"==typeof(i=e.getAttribute(n))){try{i="true"===i||"false"!==i&&("null"===i?null:+i+""===i?+i:k.test(i)?Ie.parseJSON(i):i)}catch(r){}Ie.data(e,t,i)}else i=v}return i}function W(e){var t;for(t in e)if(("data"!==t||!Ie.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}Ie.extend({cache:{},expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return!!(e=e.nodeType?Ie.cache[e[Ie.expando]]:e[Ie.expando])&&!W(e)},data:function(e,t,i){return H(e,t,i)},removeData:function(e,t){return R(e,t)},_data:function(e,t,i){return H(e,t,i,!0)},_removeData:function(e,t){return R(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&Ie.noData[e.nodeName.toLowerCase()];return!t||!0!==t&&e.getAttribute("classid")===t}}),Ie.fn.extend({data:function(t,e){var i,n,r=this[0],o=0,a=null;if(t!==v)return"object"==typeof t?this.each(function(){Ie.data(this,t)}):Ie.access(this,function(e){if(e===v)return r?Y(r,t,Ie.data(r,t)):null;this.each(function(){Ie.data(this,t,e)})},null,e,1<arguments.length,null,!0);if(this.length&&(a=Ie.data(r),1===r.nodeType&&!Ie._data(r,"parsedAttrs"))){for(i=r.attributes;o<i.length;o++)(n=i[o].name).indexOf("data-")||(n=Ie.camelCase(n.slice(5)),Y(r,n,a[n]));Ie._data(r,"parsedAttrs",!0)}return a},removeData:function(e){return this.each(function(){Ie.removeData(this,e)})}}),Ie.extend({queue:function(e,t,i){var n;if(e)return t=(t||"fx")+"queue",n=Ie._data(e,t),i&&(!n||Ie.isArray(i)?n=Ie._data(e,t,Ie.makeArray(i)):n.push(i)),n||[]},dequeue:function(e,t){t=t||"fx";var i=Ie.queue(e,t),n=i.length,r=i.shift(),o=Ie._queueHooks(e,t);"inprogress"===r&&(r=i.shift(),n--),(o.cur=r)&&("fx"===t&&i.unshift("inprogress"),delete o.stop,r.call(e,function(){Ie.dequeue(e,t)},o)),!n&&o&&o.empty.fire()},_queueHooks:function(e,t){var i=t+"queueHooks";return Ie._data(e,i)||Ie._data(e,i,{empty:Ie.Callbacks("once memory").add(function(){Ie._removeData(e,t+"queue"),Ie._removeData(e,i)})})}}),Ie.fn.extend({queue:function(t,i){var e=2;return"string"!=typeof t&&(i=t,t="fx",e--),arguments.length<e?Ie.queue(this[0],t):i===v?this:this.each(function(){var e=Ie.queue(this,t,i);Ie._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&Ie.dequeue(this,t)})},dequeue:function(e){return this.each(function(){Ie.dequeue(this,e)})},delay:function(n,e){return n=Ie.fx&&Ie.fx.speeds[n]||n,e=e||"fx",this.queue(e,function(e,t){var i=setTimeout(e,n);t.stop=function(){clearTimeout(i)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){function i(){--r||o.resolveWith(a,[a])}var n,r=1,o=Ie.Deferred(),a=this,s=this.length;for("string"!=typeof e&&(t=e,e=v),e=e||"fx";s--;)(n=Ie._data(a[s],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(i));return i(),o.promise(t)}});var O,F,G=/[\t\r\n]/g,Z=/\r/g,X=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,K=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,Q=/^(?:checked|selected)$/i,U=Ie.support.getSetAttribute,z=Ie.support.input;Ie.fn.extend({attr:function(e,t){return Ie.access(this,Ie.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){Ie.removeAttr(this,e)})},prop:function(e,t){return Ie.access(this,Ie.prop,e,t,1<arguments.length)},removeProp:function(t){return t=Ie.propFix[t]||t,this.each(function(){try{this[t]=v,delete this[t]}catch(e){}})},addClass:function(t){var e,i,n,r,o,a=0,s=this.length,l="string"==typeof t&&t;if(Ie.isFunction(t))return this.each(function(e){Ie(this).addClass(t.call(this,e,this.className))});if(l)for(e=(t||"").match(N)||[];a<s;a++)if(n=1===(i=this[a]).nodeType&&(i.className?(" "+i.className+" ").replace(G," "):" ")){for(o=0;r=e[o++];)n.indexOf(" "+r+" ")<0&&(n+=r+" ");i.className=Ie.trim(n)}return this},removeClass:function(t){var e,i,n,r,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof t&&t;if(Ie.isFunction(t))return this.each(function(e){Ie(this).removeClass(t.call(this,e,this.className))});if(l)for(e=(t||"").match(N)||[];a<s;a++)if(n=1===(i=this[a]).nodeType&&(i.className?(" "+i.className+" ").replace(G," "):"")){for(o=0;r=e[o++];)for(;0<=n.indexOf(" "+r+" ");)n=n.replace(" "+r+" "," ");i.className=t?Ie.trim(n):""}return this},toggleClass:function(o,a){var s=typeof o,l="boolean"==typeof a;return Ie.isFunction(o)?this.each(function(e){Ie(this).toggleClass(o.call(this,e,this.className,a),a)}):this.each(function(){if("string"==s)for(var e,t=0,i=Ie(this),n=a,r=o.match(N)||[];e=r[t++];)n=l?n:!i.hasClass(e),i[n?"addClass":"removeClass"](e);else s!==B&&"boolean"!=s||(this.className&&Ie._data(this,"__className__",this.className),this.className=this.className||!1===o?"":Ie._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",i=0,n=this.length;i<n;i++)if(1===this[i].nodeType&&0<=(" "+this[i].className+" ").replace(G," ").indexOf(t))return!0;return!1},val:function(n){var e,r,o,t=this[0];return arguments.length?(o=Ie.isFunction(n),this.each(function(e){var t,i=Ie(this);1===this.nodeType&&(null==(t=o?n.call(this,e,i.val()):n)?t="":"number"==typeof t?t+="":Ie.isArray(t)&&(t=Ie.map(t,function(e){return null==e?"":e+""})),(r=Ie.valHooks[this.type]||Ie.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&r.set(this,t,"value")!==v||(this.value=t))})):t?(r=Ie.valHooks[t.type]||Ie.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&(e=r.get(t,"value"))!==v?e:"string"==typeof(e=t.value)?e.replace(Z,""):null==e?"":e:void 0}}),Ie.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){for(var t,i,n=e.options,r=e.selectedIndex,o="select-one"===e.type||r<0,a=o?null:[],s=o?r+1:n.length,l=r<0?s:o?r:0;l<s;l++)if(((i=n[l]).selected||l===r)&&(Ie.support.optDisabled?!i.disabled:null===i.getAttribute("disabled"))&&(!i.parentNode.disabled||!Ie.nodeName(i.parentNode,"optgroup"))){if(t=Ie(i).val(),o)return t;a.push(t)}return a},set:function(e,t){var i=Ie.makeArray(t);return Ie(e).find("option").each(function(){this.selected=0<=Ie.inArray(Ie(this).val(),i)}),i.length||(e.selectedIndex=-1),i}}},attr:function(e,t,i){var n,r,o,a=e.nodeType;if(e&&3!==a&&8!==a&&2!==a)return typeof e.getAttribute===B?Ie.prop(e,t,i):((r=1!==a||!Ie.isXMLDoc(e))&&(t=t.toLowerCase(),n=Ie.attrHooks[t]||(K.test(t)?F:O)),i===v?n&&r&&"get"in n&&null!==(o=n.get(e,t))?o:(typeof e.getAttribute!==B&&(o=e.getAttribute(t)),null==o?v:o):null!==i?n&&r&&"set"in n&&(o=n.set(e,i,t))!==v?o:(e.setAttribute(t,i+""),i):void Ie.removeAttr(e,t))},removeAttr:function(e,t){var i,n,r=0,o=t&&t.match(N);if(o&&1===e.nodeType)for(;i=o[r++];)n=Ie.propFix[i]||i,K.test(i)?!U&&Q.test(i)?e[Ie.camelCase("default-"+i)]=e[n]=!1:e[n]=!1:Ie.attr(e,i,""),e.removeAttribute(U?i:n)},attrHooks:{type:{set:function(e,t){if(!Ie.support.radioValue&&"radio"===t&&Ie.nodeName(e,"input")){var i=e.value;return e.setAttribute("type",t),i&&(e.value=i),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,t,i){var n,r,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return(1!==o||!Ie.isXMLDoc(e))&&(t=Ie.propFix[t]||t,r=Ie.propHooks[t]),i!==v?r&&"set"in r&&(n=r.set(e,i,t))!==v?n:e[t]=i:r&&"get"in r&&null!==(n=r.get(e,t))?n:e[t]},propHooks:{tabIndex:{get:function(e){var t=e.getAttributeNode("tabindex");return t&&t.specified?parseInt(t.value,10):X.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:v}}}}),F={get:function(e,t){var i=Ie.prop(e,t),n="boolean"==typeof i&&e.getAttribute(t),r="boolean"==typeof i?z&&U?null!=n:Q.test(t)?e[Ie.camelCase("default-"+t)]:!!n:e.getAttributeNode(t);return r&&!1!==r.value?t.toLowerCase():v},set:function(e,t,i){return!1===t?Ie.removeAttr(e,i):z&&U||!Q.test(i)?e.setAttribute(!U&&Ie.propFix[i]||i,i):e[Ie.camelCase("default-"+i)]=e[i]=!0,i}},z&&U||(Ie.attrHooks.value={get:function(e,t){var i=e.getAttributeNode(t);return Ie.nodeName(e,"input")?e.defaultValue:i&&i.specified?i.value:v},set:function(e,t,i){if(!Ie.nodeName(e,"input"))return O&&O.set(e,t,i);e.defaultValue=t}}),U||(O=Ie.valHooks.button={get:function(e,t){var i=e.getAttributeNode(t);return i&&("id"===t||"name"===t||"coords"===t?""!==i.value:i.specified)?i.value:v},set:function(e,t,i){var n=e.getAttributeNode(i);return n||e.setAttributeNode(n=e.ownerDocument.createAttribute(i)),n.value=t+="","value"===i||t===e.getAttribute(i)?t:v}},Ie.attrHooks.contenteditable={get:O.get,set:function(e,t,i){O.set(e,""!==t&&t,i)}},Ie.each(["width","height"],function(e,i){Ie.attrHooks[i]=Ie.extend(Ie.attrHooks[i],{set:function(e,t){if(""===t)return e.setAttribute(i,"auto"),t}})})),Ie.support.hrefNormalized||(Ie.each(["href","src","width","height"],function(e,i){Ie.attrHooks[i]=Ie.extend(Ie.attrHooks[i],{get:function(e){var t=e.getAttribute(i,2);return null==t?v:t}})}),Ie.each(["href","src"],function(e,t){Ie.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),Ie.support.style||(Ie.attrHooks.style={get:function(e){return e.style.cssText||v},set:function(e,t){return e.style.cssText=t+""}}),Ie.support.optSelected||(Ie.propHooks.selected=Ie.extend(Ie.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),Ie.support.enctype||(Ie.propFix.enctype="encoding"),Ie.support.checkOn||Ie.each(["radio","checkbox"],function(){Ie.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),Ie.each(["radio","checkbox"],function(){Ie.valHooks[this]=Ie.extend(Ie.valHooks[this],{set:function(e,t){if(Ie.isArray(t))return e.checked=0<=Ie.inArray(Ie(e).val(),t)}})});var j=/^(?:input|select|textarea)$/i,q=/^key/,$=/^(?:mouse|contextmenu)|click/,ee=/^(?:focusinfocus|focusoutblur)$/,te=/^([^.]*)(?:\.(.+)|)$/;function ie(){return!0}function ne(){return!1}Ie.event={global:{},add:function(e,t,i,n,r){var o,a,s,l,u,c,h,p,d,g,f,I=Ie._data(e);if(I){for(i.handler&&(i=(l=i).handler,r=l.selector),i.guid||(i.guid=Ie.guid++),(a=I.events)||(a=I.events={}),(c=I.handle)||((c=I.handle=function(e){return typeof Ie===B||e&&Ie.event.triggered===e.type?v:Ie.event.dispatch.apply(c.elem,arguments)}).elem=e),s=(t=(t||"").match(N)||[""]).length;s--;)d=f=(o=te.exec(t[s])||[])[1],g=(o[2]||"").split(".").sort(),u=Ie.event.special[d]||{},d=(r?u.delegateType:u.bindType)||d,u=Ie.event.special[d]||{},h=Ie.extend({type:d,origType:f,data:n,handler:i,guid:i.guid,selector:r,needsContext:r&&Ie.expr.match.needsContext.test(r),namespace:g.join(".")},l),(p=a[d])||((p=a[d]=[]).delegateCount=0,u.setup&&!1!==u.setup.call(e,n,g,c)||(e.addEventListener?e.addEventListener(d,c,!1):e.attachEvent&&e.attachEvent("on"+d,c))),u.add&&(u.add.call(e,h),h.handler.guid||(h.handler.guid=i.guid)),r?p.splice(p.delegateCount++,0,h):p.push(h),Ie.event.global[d]=!0;e=null}},remove:function(e,t,i,n,r){var o,a,s,l,u,c,h,p,d,g,f,I=Ie.hasData(e)&&Ie._data(e);if(I&&(c=I.events)){for(u=(t=(t||"").match(N)||[""]).length;u--;)if(d=f=(s=te.exec(t[u])||[])[1],g=(s[2]||"").split(".").sort(),d){for(h=Ie.event.special[d]||{},p=c[d=(n?h.delegateType:h.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=p.length;o--;)a=p[o],!r&&f!==a.origType||i&&i.guid!==a.guid||s&&!s.test(a.namespace)||n&&n!==a.selector&&("**"!==n||!a.selector)||(p.splice(o,1),a.selector&&p.delegateCount--,h.remove&&h.remove.call(e,a));l&&!p.length&&(h.teardown&&!1!==h.teardown.call(e,g,I.handle)||Ie.removeEvent(e,d,I.handle),delete c[d])}else for(d in c)Ie.event.remove(e,d+t[u],i,n,!0);Ie.isEmptyObject(c)&&(delete I.handle,Ie._removeData(e,"events"))}},trigger:function(e,t,i,n){var r,o,a,s,l,u,c,h=[i||I],p=_.call(e,"type")?e.type:e,d=_.call(e,"namespace")?e.namespace.split("."):[];if(a=u=i=i||I,3!==i.nodeType&&8!==i.nodeType&&!ee.test(p+Ie.event.triggered)&&(0<=p.indexOf(".")&&(p=(d=p.split(".")).shift(),d.sort()),o=p.indexOf(":")<0&&"on"+p,(e=e[Ie.expando]?e:new Ie.Event(p,"object"==typeof e&&e)).isTrigger=!0,e.namespace=d.join("."),e.namespace_re=e.namespace?new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=v,e.target||(e.target=i),t=null==t?[e]:Ie.makeArray(t,[e]),l=Ie.event.special[p]||{},n||!l.trigger||!1!==l.trigger.apply(i,t))){if(!n&&!l.noBubble&&!Ie.isWindow(i)){for(s=l.delegateType||p,ee.test(s+p)||(a=a.parentNode);a;a=a.parentNode)h.push(a),u=a;u===(i.ownerDocument||I)&&h.push(u.defaultView||u.parentWindow||f)}for(c=0;(a=h[c++])&&!e.isPropagationStopped();)e.type=1<c?s:l.bindType||p,(r=(Ie._data(a,"events")||{})[e.type]&&Ie._data(a,"handle"))&&r.apply(a,t),(r=o&&a[o])&&Ie.acceptData(a)&&r.apply&&!1===r.apply(a,t)&&e.preventDefault();if(e.type=p,!n&&!e.isDefaultPrevented()&&(!l._default||!1===l._default.apply(i.ownerDocument,t))&&("click"!==p||!Ie.nodeName(i,"a"))&&Ie.acceptData(i)&&o&&i[p]&&!Ie.isWindow(i)){(u=i[o])&&(i[o]=null),Ie.event.triggered=p;try{i[p]()}catch(g){}Ie.event.triggered=v,u&&(i[o]=u)}return e.result}},dispatch:function(e){e=Ie.event.fix(e);var t,i,n,r,o,a,s=p.call(arguments),l=(Ie._data(this,"events")||{})[e.type]||[],u=Ie.event.special[e.type]||{};if((s[0]=e).delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,e)){for(a=Ie.event.handlers.call(this,e,l),t=0;(r=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=r.elem,o=0;(n=r.handlers[o++])&&!e.isImmediatePropagationStopped();)if(!e.namespace_re||e.namespace_re.test(n.namespace)){e.handleObj=n,e.data=n.data;var c=(Ie.event.special[n.origType]||{}).handle||n.handler;c.apply&&(i=c.apply(r.elem,s)),i!==v&&!1===(e.result=i)&&(e.preventDefault(),e.stopPropagation())}return u.postDispatch&&u.postDispatch.call(this,e),e.result}},handlers:function(e,t){var i,n,r,o,a=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(!0!==l.disabled||"click"!==e.type)){for(r=[],o=0;o<s;o++)r[i=(n=t[o]).selector+" "]===v&&(r[i]=n.needsContext?0<=Ie(i,this).index(l):Ie.find(i,this,null,[l]).length),r[i]&&r.push(n);r.length&&a.push({elem:l,handlers:r})}return s<t.length&&a.push({elem:this,handlers:t.slice(s)}),a},fix:function(e){if(e[Ie.expando])return e;var t,i,n,r=e.type,o=e,a=this.fixHooks[r];for(a||(this.fixHooks[r]=a=$.test(r)?this.mouseHooks:q.test(r)?this.keyHooks:{}),n=a.props?this.props.concat(a.props):this.props,e=new Ie.Event(o),t=n.length;t--;)e[i=n[t]]=o[i];return e.target||(e.target=o.srcElement||I),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,a.filter?a.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var i,n,r,o=t.button,a=t.fromElement;return null==e.pageX&&null!=t.clientX&&(r=(n=e.target.ownerDocument||I).documentElement,i=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?t.toElement:a),e.which||o===v||(e.which=1&o?1:2&o?3:4&o?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){if(Ie.nodeName(this,"input")&&"checkbox"===this.type&&this.click)return this.click(),!1}},focus:{trigger:function(){if(this!==I.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){if(this===I.activeElement&&this.blur)return this.blur(),!1},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==v&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,i,n){var r=Ie.extend(new Ie.Event,i,{type:e,isSimulated:!0,originalEvent:{}});n?Ie.event.trigger(r,null,t):Ie.event.dispatch.call(t,r),r.isDefaultPrevented()&&i.preventDefault()}},Ie.removeEvent=I.removeEventListener?function(e,t,i){e.removeEventListener&&e.removeEventListener(t,i,!1)}:function(e,t,i){var n="on"+t;e.detachEvent&&(typeof e[n]===B&&(e[n]=null),e.detachEvent(n,i))},Ie.Event=function(e,t){if(!(this instanceof Ie.Event))return new Ie.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||!1===e.returnValue||e.getPreventDefault&&e.getPreventDefault()?ie:ne):this.type=e,t&&Ie.extend(this,t),this.timeStamp=e&&e.timeStamp||Ie.now(),this[Ie.expando]=!0},Ie.Event.prototype={isDefaultPrevented:ne,isPropagationStopped:ne,isImmediatePropagationStopped:ne,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=ie,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=ie,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ie,this.stopPropagation()}},Ie.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,r){Ie.event.special[e]={delegateType:r,bindType:r,handle:function(e){var t,i=e.relatedTarget,n=e.handleObj;return i&&(i===this||Ie.contains(this,i))||(e.type=n.origType,t=n.handler.apply(this,arguments),e.type=r),t}}}),Ie.support.submitBubbles||(Ie.event.special.submit={setup:function(){if(Ie.nodeName(this,"form"))return!1;Ie.event.add(this,"click._submit keypress._submit",function(e){var t=e.target,i=Ie.nodeName(t,"input")||Ie.nodeName(t,"button")?t.form:v;i&&!Ie._data(i,"submitBubbles")&&(Ie.event.add(i,"submit._submit",function(e){e._submit_bubble=!0}),Ie._data(i,"submitBubbles",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&Ie.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){if(Ie.nodeName(this,"form"))return!1;Ie.event.remove(this,"._submit")}}),Ie.support.changeBubbles||(Ie.event.special.change={setup:function(){if(j.test(this.nodeName))return"checkbox"!==this.type&&"radio"!==this.type||(Ie.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),Ie.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),Ie.event.simulate("change",this,e,!0)})),!1;Ie.event.add(this,"beforeactivate._change",function(e){var t=e.target;j.test(t.nodeName)&&!Ie._data(t,"changeBubbles")&&(Ie.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||Ie.event.simulate("change",this.parentNode,e,!0)}),Ie._data(t,"changeBubbles",!0))})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type)return e.handleObj.handler.apply(this,arguments)},teardown:function(){return Ie.event.remove(this,"._change"),!j.test(this.nodeName)}}),Ie.support.focusinBubbles||Ie.each({focus:"focusin",blur:"focusout"},function(e,t){function i(e){Ie.event.simulate(t,e.target,Ie.event.fix(e),!0)}var n=0;Ie.event.special[t]={setup:function(){0==n++&&I.addEventListener(e,i,!0)},teardown:function(){0==--n&&I.removeEventListener(e,i,!0)}}}),Ie.fn.extend({on:function(e,t,i,n,r){var o,a;if("object"==typeof e){for(o in"string"!=typeof t&&(i=i||t,t=v),e)this.on(o,t,i,e[o],r);return this}if(null==i&&null==n?(n=t,i=t=v):null==n&&("string"==typeof t?(n=i,i=v):(n=i,i=t,t=v)),!1===n)n=ne;else if(!n)return this;return 1===r&&(a=n,(n=function(e){return Ie().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=Ie.guid++)),this.each(function(){Ie.event.add(this,e,n,i,t)})},one:function(e,t,i,n){return this.on(e,t,i,n,1)},off:function(e,t,i){var n,r;if(e&&e.preventDefault&&e.handleObj)return n=e.handleObj,Ie(e.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if("object"!=typeof e)return!1!==t&&"function"!=typeof t||(i=t,t=v),!1===i&&(i=ne),this.each(function(){Ie.event.remove(this,e,i,t)});for(r in e)this.off(r,t,e[r]);return this},bind:function(e,t,i){return this.on(e,null,t,i)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,i,n){return this.on(t,e,i,n)},undelegate:function(e,t,i){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",i)},trigger:function(e,t){return this.each(function(){Ie.event.trigger(e,t,this)})},triggerHandler:function(e,t){var i=this[0];if(i)return Ie.event.trigger(e,t,i,!0)}}),function(i){var e,b,T,o,t,I,u,y,B,C,n,E,_,r,a,m,s,v="sizzle"+-new Date,N=i.document,V={},S=0,h=0,l=$(),c=$(),p=$(),d="undefined",g=[],x=g.pop,L=g.push,w=g.slice,A=g.indexOf||function(e){for(var t=0,i=this.length;t<i;t++)if(this[t]===e)return t;return-1},f="[\\x20\\t\\r\\n\\f]",D="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=D.replace("w","w#"),k="\\["+f+"*("+D+")"+f+"*(?:([*^$|!~]?=)"+f+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+f+"*\\]",P=":("+D+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+k.replace(3,8)+")*)|.*)\\)|)",H=new RegExp("^"+f+"+|((?:^|[^\\\\])(?:\\\\.)*)"+f+"+$","g"),R=new RegExp("^"+f+"*,"+f+"*"),Y=new RegExp("^"+f+"*([\\x20\\t\\r\\n\\f>+~])"+f+"*"),W=new RegExp(P),O=new RegExp("^"+M+"$"),F={ID:new RegExp("^#("+D+")"),CLASS:new RegExp("^\\.("+D+")"),NAME:new RegExp("^\\[name=['\"]?("+D+")['\"]?\\]"),TAG:new RegExp("^("+D.replace("w","w*")+")"),ATTR:new RegExp("^"+k),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+f+"*(even|odd|(([+-]|)(\\d*)n|)"+f+"*(?:([+-]|)"+f+"*(\\d+)|))"+f+"*\\)|)","i"),needsContext:new RegExp("^"+f+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+f+"*((?:-\\d)?\\d*)"+f+"*\\)|)(?=[^-]|$)","i")},G=/[\x20\t\r\n\f]*[+~]/,Z=/^[^{]+\{\s*\[native code/,X=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,J=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,Q=/'|\\/g,U=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,z=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,j=function(e,t){var i="0x"+t-65536;return i!=i?t:i<0?String.fromCharCode(65536+i):String.fromCharCode(i>>10|55296,1023&i|56320)};try{w.call(N.documentElement.childNodes,0)[0].nodeType}catch(fe){w=function(e){for(var t,i=[];t=this[e++];)i.push(t);return i}}function q(e){return Z.test(e+"")}function $(){var i,n=[];return i=function(e,t){return n.push(e+=" ")>T.cacheLength&&delete i[n.shift()],i[e]=t}}function ee(e){return e[v]=!0,e}function te(e){var t=C.createElement("div");try{return e(t)}catch(fe){return!1}finally{t=null}}function ie(e,t,i,n){var r,o,a,s,l,u,c,h,p,d;if((t?t.ownerDocument||t:N)!==C&&B(t),i=i||[],!e||"string"!=typeof e)return i;if(1!==(s=(t=t||C).nodeType)&&9!==s)return[];if(!E&&!n){if(r=X.exec(e))if(a=r[1]){if(9===s){if(!(o=t.getElementById(a))||!o.parentNode)return i;if(o.id===a)return i.push(o),i}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&m(t,o)&&o.id===a)return i.push(o),i}else{if(r[2])return L.apply(i,w.call(t.getElementsByTagName(e),0)),i;if((a=r[3])&&V.getByClassName&&t.getElementsByClassName)return L.apply(i,w.call(t.getElementsByClassName(a),0)),i}if(V.qsa&&!_.test(e)){if(c=!0,h=v,p=t,d=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(u=se(e),(c=t.getAttribute("id"))?h=c.replace(Q,"\\$&"):t.setAttribute("id",h),h="[id='"+h+"'] ",l=u.length;l--;)u[l]=h+le(u[l]);p=G.test(e)&&t.parentNode||t,d=u.join(",")}if(d)try{return L.apply(i,w.call(p.querySelectorAll(d),0)),i}catch(g){}finally{c||t.removeAttribute("id")}}}return function f(e,t,i,n){var r,o,a,s,l,u=se(e);if(!n&&1===u.length){if(2<(o=u[0]=u[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&!E&&T.relative[o[1].type]){if(!(t=T.find.ID(a.matches[0].replace(z,j),t)[0]))return i;e=e.slice(o.shift().value.length)}for(r=F.needsContext.test(e)?0:o.length;r--&&(a=o[r],!T.relative[s=a.type]);)if((l=T.find[s])&&(n=l(a.matches[0].replace(z,j),G.test(o[0].type)&&t.parentNode||t))){if(o.splice(r,1),!(e=n.length&&le(o)))return L.apply(i,w.call(n,0)),i;break}}return I(e,u)(n,t,E,i,G.test(e)),i}(e.replace(H,"$1"),t,i,n)}function ne(e,t){var i=t&&e,n=i&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(n)return n;if(i)for(;i=i.nextSibling;)if(i===t)return-1;return e?1:-1}function re(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function oe(i){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===i}}function ae(a){return ee(function(o){return o=+o,ee(function(e,t){for(var i,n=a([],e.length,o),r=n.length;r--;)e[i=n[r]]&&(e[i]=!(t[i]=e[i]))})})}for(e in t=ie.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},B=ie.setDocument=function(e){var l=e?e.ownerDocument||e:N;return l!==C&&9===l.nodeType&&l.documentElement&&(n=(C=l).documentElement,E=t(l),V.tagNameNoComments=te(function(e){return e.appendChild(l.createComment("")),!e.getElementsByTagName("*").length}),V.attributes=te(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!=t&&"string"!=t}),V.getByClassName=te(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!(!e.getElementsByClassName||!e.getElementsByClassName("e").length)&&(e.lastChild.className="e",2===e.getElementsByClassName("e").length)}),V.getByName=te(function(e){e.id=v+0,e.innerHTML="<a name='"+v+"'></a><div name='"+v+"'></div>",n.insertBefore(e,n.firstChild);var t=l.getElementsByName&&l.getElementsByName(v).length===2+l.getElementsByName(v+0).length;return V.getIdNotName=!l.getElementById(v),n.removeChild(e),t}),T.attrHandle=te(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!=d&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},V.getIdNotName?(T.find.ID=function(e,t){if(typeof t.getElementById!=d&&!E){var i=t.getElementById(e);return i&&i.parentNode?[i]:[]}},T.filter.ID=function(e){var t=e.replace(z,j);return function(e){return e.getAttribute("id")===t}}):(T.find.ID=function(e,t){if(typeof t.getElementById!=d&&!E){var i=t.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!=d&&i.getAttributeNode("id").value===e?[i]:void 0:[]}},T.filter.ID=function(e){var i=e.replace(z,j);return function(e){var t=typeof e.getAttributeNode!=d&&e.getAttributeNode("id");return t&&t.value===i}}),T.find.TAG=V.tagNameNoComments?function(e,t){if(typeof t.getElementsByTagName!=d)return t.getElementsByTagName(e)}:function(e,t){var i,n=[],r=0,o=t.getElementsByTagName(e);if("*"!==e)return o;for(;i=o[r++];)1===i.nodeType&&n.push(i);return n},T.find.NAME=V.getByName&&function(e,t){if(typeof t.getElementsByName!=d)return t.getElementsByName(name)},T.find.CLASS=V.getByClassName&&function(e,t){if(typeof t.getElementsByClassName!=d&&!E)return t.getElementsByClassName(e)},r=[],_=[":focus"],(V.qsa=q(l.querySelectorAll))&&(te(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||_.push("\\["+f+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||_.push(":checked")}),te(function(e){e.innerHTML="<input type='hidden' i=''/>",e.querySelectorAll("[i^='']").length&&_.push("[*^$]="+f+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||_.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),_.push(",.*:")})),(V.matchesSelector=q(a=n.matchesSelector||n.mozMatchesSelector||n.webkitMatchesSelector||n.oMatchesSelector||n.msMatchesSelector))&&te(function(e){V.disconnectedMatch=a.call(e,"div"),a.call(e,"[s!='']:x"),r.push("!=",P)}),_=new RegExp(_.join("|")),r=new RegExp(r.join("|")),m=q(n.contains)||n.compareDocumentPosition?function(e,t){var i=9===e.nodeType?e.documentElement:e,n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},s=n.compareDocumentPosition?function(e,t){var i;return e===t?(u=!0,0):(i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&i||e.parentNode&&11===e.parentNode.nodeType?e===l||m(N,e)?-1:t===l||m(N,t)?1:0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var i,n=0,r=e.parentNode,o=t.parentNode,a=[e],s=[t];if(e===t)return u=!0,0;if(!r||!o)return e===l?-1:t===l?1:r?-1:o?1:0;if(r===o)return ne(e,t);for(i=e;i=i.parentNode;)a.unshift(i);for(i=t;i=i.parentNode;)s.unshift(i);for(;a[n]===s[n];)n++;return n?ne(a[n],s[n]):a[n]===N?-1:s[n]===N?1:0},u=!1,[0,0].sort(s),V.detectDuplicates=u),C},ie.matches=function(e,t){return ie(e,null,null,t)},ie.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&B(e),t=t.replace(U,"='$1']"),V.matchesSelector&&!E&&(!r||!r.test(t))&&!_.test(t))try{var i=a.call(e,t);if(i||V.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(fe){}return 0<ie(t,C,null,[e]).length},ie.contains=function(e,t){return(e.ownerDocument||e)!==C&&B(e),m(e,t)},ie.attr=function(e,t){var i;return(e.ownerDocument||e)!==C&&B(e),E||(t=t.toLowerCase()),(i=T.attrHandle[t])?i(e):E||V.attributes?e.getAttribute(t):((i=e.getAttributeNode(t))||e.getAttribute(t))&&!0===e[t]?t:i&&i.specified?i.value:null},ie.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ie.uniqueSort=function(e){var t,i=[],n=1,r=0;if(u=!V.detectDuplicates,e.sort(s),u){for(;t=e[n];n++)t===e[n-1]&&(r=i.push(n));for(;r--;)e.splice(i[r],1)}return e},o=ie.getText=function(e){var t,i="",n=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)i+=o(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[n];n++)i+=o(t);return i},T=ie.selectors={cacheLength:50,createPseudo:ee,match:F,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(z,j),e[3]=(e[4]||e[5]||"").replace(z,j),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ie.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ie.error(e[0]),e},PSEUDO:function(e){var t,i=!e[5]&&e[2];return F.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:i&&W.test(i)&&(t=se(i,!0))&&(t=i.indexOf(")",i.length-t)-i.length)&&(e[0]=e[0].slice(0,t),e[2]=i.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(t){return"*"===t?function(){return!0}:(t=t.replace(z,j).toLowerCase(),function(e){return e.nodeName&&e.nodeName.toLowerCase()===t})},CLASS:function(e){var t=l[e+" "];return t||(t=new RegExp("(^|"+f+")"+e+"("+f+"|$)"))&&l(e,function(e){return t.test(e.className||typeof e.getAttribute!=d&&e.getAttribute("class")||"")})},ATTR:function(i,n,r){return function(e){var t=ie.attr(e,i);return null==t?"!="===n:!n||(t+="","="===n?t===r:"!="===n?t!==r:"^="===n?r&&0===t.indexOf(r):"*="===n?r&&-1<t.indexOf(r):"$="===n?r&&t.slice(-r.length)===r:"~="===n?-1<(" "+t+" ").indexOf(r):"|="===n&&(t===r||t.slice(0,r.length+1)===r+"-"))}},CHILD:function(d,e,t,g,f){var I="nth"!==d.slice(0,3),B="last"!==d.slice(-4),E="of-type"===e;return 1===g&&0===f?function(e){return!!e.parentNode}:function(e,t,i){var n,r,o,a,s,l,u=I!=B?"nextSibling":"previousSibling",c=e.parentNode,h=E&&e.nodeName.toLowerCase(),p=!i&&!E;if(c){if(I){for(;u;){for(o=e;o=o[u];)if(E?o.nodeName.toLowerCase()===h:1===o.nodeType)return!1;l=u="only"===d&&!l&&"nextSibling"}return!0}if(l=[B?c.firstChild:c.lastChild],B&&p){for(s=(n=(r=c[v]||(c[v]={}))[d]||[])[0]===S&&n[1],a=n[0]===S&&n[2],o=s&&c.childNodes[s];o=++s&&o&&o[u]||(a=s=0)||l.pop();)if(1===o.nodeType&&++a&&o===e){r[d]=[S,s,a];break}}else if(p&&(n=(e[v]||(e[v]={}))[d])&&n[0]===S)a=n[1];else for(;(o=++s&&o&&o[u]||(a=s=0)||l.pop())&&((E?o.nodeName.toLowerCase()!==h:1!==o.nodeType)||!++a||(p&&((o[v]||(o[v]={}))[d]=[S,a]),o!==e)););return(a-=f)===g||a%g==0&&0<=a/g}}},PSEUDO:function(e,o){var t,a=T.pseudos[e]||T.setFilters[e.toLowerCase()]||ie.error("unsupported pseudo: "+e);return a[v]?a(o):1<a.length?(t=[e,e,"",o],T.setFilters.hasOwnProperty(e.toLowerCase())?ee(function(e,t){for(var i,n=a(e,o),r=n.length;r--;)e[i=A.call(e,n[r])]=!(t[i]=n[r])}):function(e){return a(e,0,t)}):a}},pseudos:{not:ee(function(e){var n=[],r=[],s=I(e.replace(H,"$1"));return s[v]?ee(function(e,t,i,n){for(var r,o=s(e,null,n,[]),a=e.length;a--;)(r=o[a])&&(e[a]=!(t[a]=r))}):function(e,t,i){return n[0]=e,s(n,null,i,r),!r.pop()}}),has:ee(function(t){return function(e){return 0<ie(t,e).length}}),contains:ee(function(t){return function(e){return-1<(e.textContent||e.innerText||o(e)).indexOf(t)}}),lang:ee(function(i){return O.test(i||"")||ie.error("unsupported lang: "+i),i=i.replace(z,j).toLowerCase(),function(e){var t;do{if(t=E?e.getAttribute("xml:lang")||e.getAttribute("lang"):e.lang)return(t=t.toLowerCase())===i||0===t.indexOf(i+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=i.location&&i.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===n},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if("@"<e.nodeName||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!T.pseudos.empty(e)},header:function(e){return K.test(e.nodeName)},input:function(e){return J.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ae(function(){return[0]}),last:ae(function(e,t){return[t-1]}),eq:ae(function(e,t,i){return[i<0?i+t:i]}),even:ae(function(e,t){for(var i=0;i<t;i+=2)e.push(i);return e}),odd:ae(function(e,t){for(var i=1;i<t;i+=2)e.push(i);return e}),lt:ae(function(e,t,i){for(var n=i<0?i+t:i;0<=--n;)e.push(n);return e}),gt:ae(function(e,t,i){for(var n=i<0?i+t:i;++n<t;)e.push(n);return e})}},{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})T.pseudos[e]=re(e);for(e in{submit:!0,reset:!0})T.pseudos[e]=oe(e);function se(e,t){var i,n,r,o,a,s,l,u=c[e+" "];if(u)return t?0:u.slice(0);for(a=e,s=[],l=T.preFilter;a;){for(o in i&&!(n=R.exec(a))||(n&&(a=a.slice(n[0].length)||a),s.push(r=[])),i=!1,(n=Y.exec(a))&&(i=n.shift(),r.push({value:i,type:n[0].replace(H," ")}),a=a.slice(i.length)),T.filter)!(n=F[o].exec(a))||l[o]&&!(n=l[o](n))||(i=n.shift(),r.push({value:i,type:o,matches:n}),a=a.slice(i.length));if(!i)break}return t?a.length:a?ie.error(e):c(e,s).slice(0)}function le(e){for(var t=0,i=e.length,n="";t<i;t++)n+=e[t].value;return n}function ue(s,e,t){var l=e.dir,u=t&&"parentNode"===l,c=h++;return e.first?function(e,t,i){for(;e=e[l];)if(1===e.nodeType||u)return s(e,t,i)}:function(e,t,i){var n,r,o,a=S+" "+c;if(i){for(;e=e[l];)if((1===e.nodeType||u)&&s(e,t,i))return!0}else for(;e=e[l];)if(1===e.nodeType||u)if((r=(o=e[v]||(e[v]={}))[l])&&r[0]===a){if(!0===(n=r[1])||n===b)return!0===n}else if((r=o[l]=[a])[1]=s(e,t,i)||b,!0===r[1])return!0}}function ce(r){return 1<r.length?function(e,t,i){for(var n=r.length;n--;)if(!r[n](e,t,i))return!1;return!0}:r[0]}function he(e,t,i,n,r){for(var o,a=[],s=0,l=e.length,u=null!=t;s<l;s++)(o=e[s])&&(i&&!i(o,n,r)||(a.push(o),u&&t.push(s)));return a}function pe(g,f,I,B,E,e){return B&&!B[v]&&(B=pe(B)),E&&!E[v]&&(E=pe(E,e)),ee(function(e,t,i,n){var r,o,a,s=[],l=[],u=t.length,c=e||function d(e,t,i){for(var n=0,r=t.length;n<r;n++)ie(e,t[n],i);return i}(f||"*",i.nodeType?[i]:i,[]),h=!g||!e&&f?c:he(c,s,g,i,n),p=I?E||(e?g:u||B)?[]:t:h;if(I&&I(h,p,i,n),B)for(r=he(p,l),B(r,[],i,n),o=r.length;o--;)(a=r[o])&&(p[l[o]]=!(h[l[o]]=a));if(e){if(E||g){if(E){for(r=[],o=p.length;o--;)(a=p[o])&&r.push(h[o]=a);E(null,p=[],r,n)}for(o=p.length;o--;)(a=p[o])&&-1<(r=E?A.call(e,a):s[o])&&(e[r]=!(t[r]=a))}}else p=he(p===t?p.splice(u,p.length):p),E?E(null,t,p,n):L.apply(t,p)})}function de(e){for(var n,t,i,r=e.length,o=T.relative[e[0].type],a=o||T.relative[" "],s=o?1:0,l=ue(function(e){return e===n},a,!0),u=ue(function(e){return-1<A.call(n,e)},a,!0),c=[function(e,t,i){return!o&&(i||t!==y)||((n=t).nodeType?l(e,t,i):u(e,t,i))}];s<r;s++)if(t=T.relative[e[s].type])c=[ue(ce(c),t)];else{if((t=T.filter[e[s].type].apply(null,e[s].matches))[v]){for(i=++s;i<r&&!T.relative[e[i].type];i++);return pe(1<s&&ce(c),1<s&&le(e.slice(0,s-1)).replace(H,"$1"),t,s<i&&de(e.slice(s,i)),i<r&&de(e=e.slice(i)),i<r&&le(e))}c.push(t)}return ce(c)}function ge(){}I=ie.compile=function(e,t){var i,n=[],r=[],o=p[e+" "];if(!o){for(i=(t=t||se(e)).length;i--;)(o=de(t[i]))[v]?n.push(o):r.push(o);o=p(e,function a(I,B){function e(e,t,i,n,r){var o,a,s,l=[],u=0,c="0",h=e&&[],p=null!=r,d=y,g=e||m&&T.find.TAG("*",r&&t.parentNode||t),f=S+=null==d?1:Math.random()||.1;for(p&&(y=t!==C&&t,b=E);null!=(o=g[c]);c++){if(m&&o){for(a=0;s=I[a++];)if(s(o,t,i)){n.push(o);break}p&&(S=f,b=++E)}_&&((o=!s&&o)&&u--,e&&h.push(o))}if(u+=c,_&&c!==u){for(a=0;s=B[a++];)s(h,l,t,i);if(e){if(0<u)for(;c--;)h[c]||l[c]||(l[c]=x.call(n));l=he(l)}L.apply(n,l),p&&!e&&0<l.length&&1<u+B.length&&ie.uniqueSort(n)}return p&&(S=f,y=d),h}var E=0,_=0<B.length,m=0<I.length;return _?ee(e):e}(r,n))}return o},T.pseudos.nth=T.pseudos.eq,T.filters=ge.prototype=T.pseudos,T.setFilters=new ge,B(),ie.attr=Ie.attr,Ie.find=ie,Ie.expr=ie.selectors,Ie.expr[":"]=Ie.expr.pseudos,Ie.unique=ie.uniqueSort,Ie.text=ie.getText,Ie.isXMLDoc=ie.isXML,Ie.contains=ie.contains}(f);var re=/Until$/,oe=/^(?:parents|prev(?:Until|All))/,ae=/^.[^:#\[\.,]*$/,se=Ie.expr.match.needsContext,le={children:!0,contents:!0,next:!0,prev:!0};function ue(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function ce(e,i,n){if(i=i||0,Ie.isFunction(i))return Ie.grep(e,function(e,t){return!!i.call(e,t,e)===n});if(i.nodeType)return Ie.grep(e,function(e){return e===i===n});if("string"==typeof i){var t=Ie.grep(e,function(e){return 1===e.nodeType});if(ae.test(i))return Ie.filter(i,t,!n);i=Ie.filter(i,t)}return Ie.grep(e,function(e){return 0<=Ie.inArray(e,i)===n})}function he(e){var t=pe.split("|"),i=e.createDocumentFragment();if(i.createElement)for(;t.length;)i.createElement(t.pop());return i}Ie.fn.extend({find:function(e){var t,i,n,r=this.length;if("string"!=typeof e)return(n=this).pushStack(Ie(e).filter(function(){for(t=0;t<r;t++)if(Ie.contains(n[t],this))return!0}));for(i=[],t=0;t<r;t++)Ie.find(e,this[t],i);return(i=this.pushStack(1<r?Ie.unique(i):i)).selector=(this.selector?this.selector+" ":"")+e,i},has:function(e){var t,i=Ie(e,this),n=i.length;return this.filter(function(){for(t=0;t<n;t++)if(Ie.contains(this,i[t]))return!0})},not:function(e){return this.pushStack(ce(this,e,!1))},filter:function(e){return this.pushStack(ce(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?se.test(e)?0<=Ie(e,this.context).index(this[0]):0<Ie.filter(e,this).length:0<this.filter(e).length)},closest:function(e,t){for(var i,n=0,r=this.length,o=[],a=se.test(e)||"string"!=typeof e?Ie(e,t||this.context):0;n<r;n++)for(i=this[n];i&&i.ownerDocument&&i!==t&&11!==i.nodeType;){if(a?-1<a.index(i):Ie.find.matchesSelector(i,e)){o.push(i);break}i=i.parentNode}return this.pushStack(1<o.length?Ie.unique(o):o)},index:function(e){return e?"string"==typeof e?Ie.inArray(this[0],Ie(e)):Ie.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var i="string"==typeof e?Ie(e,t):Ie.makeArray(e&&e.nodeType?[e]:e),n=Ie.merge(this.get(),i);return this.pushStack(Ie.unique(n))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),Ie.fn.andSelf=Ie.fn.addBack,Ie.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Ie.dir(e,"parentNode")},parentsUntil:function(e,t,i){return Ie.dir(e,"parentNode",i)},next:function(e){return ue(e,"nextSibling")},prev:function(e){return ue(e,"previousSibling")},nextAll:function(e){return Ie.dir(e,"nextSibling")},prevAll:function(e){return Ie.dir(e,"previousSibling")},nextUntil:function(e,t,i){return Ie.dir(e,"nextSibling",i)},prevUntil:function(e,t,i){return Ie.dir(e,"previousSibling",i)},siblings:function(e){return Ie.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return Ie.sibling(e.firstChild)},contents:function(e){return Ie.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:Ie.merge([],e.childNodes)}},function(n,r){Ie.fn[n]=function(e,t){var i=Ie.map(this,r,e);return re.test(n)||(t=e),t&&"string"==typeof t&&(i=Ie.filter(t,i)),i=1<this.length&&!le[n]?Ie.unique(i):i,1<this.length&&oe.test(n)&&(i=i.reverse()),this.pushStack(i)}}),Ie.extend({filter:function(e,t,i){return i&&(e=":not("+e+")"),1===t.length?Ie.find.matchesSelector(t[0],e)?[t[0]]:[]:Ie.find.matches(e,t)},dir:function(e,t,i){for(var n=[],r=e[t];r&&9!==r.nodeType&&(i===v||1!==r.nodeType||!Ie(r).is(i));)1===r.nodeType&&n.push(r),r=r[t];return n},sibling:function(e,t){for(var i=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&i.push(e);return i}});var pe="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",de=/ jQuery\d+="(?:null|\d+)"/g,ge=new RegExp("<(?:"+pe+")[\\s/>]","i"),fe=/^\s+/,Be=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Ee=/<([\w:]+)/,_e=/<tbody/i,me=/<|&#?\w+;/,be=/<(?:script|style|link)/i,Te=/^(?:checkbox|radio)$/i,ye=/checked\s*(?:[^=]|=\s*.checked.)/i,Ce=/^$|\/(?:java|ecma)script/i,ve=/^true\/(.*)/,Ne=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Ve={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:Ie.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},Se=he(I).appendChild(I.createElement("div"));function xe(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function Le(e){var t=ve.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function we(e,t){for(var i,n=0;null!=(i=e[n]);n++)Ie._data(i,"globalEval",!t||Ie._data(t[n],"globalEval"))}function Ae(e,t){if(1===t.nodeType&&Ie.hasData(e)){var i,n,r,o=Ie._data(e),a=Ie._data(t,o),s=o.events;if(s)for(i in delete a.handle,a.events={},s)for(n=0,r=s[i].length;n<r;n++)Ie.event.add(t,i,s[i][n]);a.data&&(a.data=Ie.extend({},a.data))}}function De(e,t){var i,n,r;if(1===t.nodeType){if(i=t.nodeName.toLowerCase(),!Ie.support.noCloneEvent&&t[Ie.expando]){for(n in(r=Ie._data(t)).events)Ie.removeEvent(t,n,r.handle);t.removeAttribute(Ie.expando)}"script"===i&&t.text!==e.text?(xe(t).text=e.text,Le(t)):"object"===i?(t.parentNode&&(t.outerHTML=e.outerHTML),Ie.support.html5Clone&&e.innerHTML&&!Ie.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===i&&Te.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===i?t.defaultSelected=t.selected=e.defaultSelected:"input"!==i&&"textarea"!==i||(t.defaultValue=e.defaultValue)}}function Me(e,t){var i,n,r=0,o=typeof e.getElementsByTagName!==B?e.getElementsByTagName(t||"*"):typeof e.querySelectorAll!==B?e.querySelectorAll(t||"*"):v;if(!o)for(o=[],i=e.childNodes||e;null!=(n=i[r]);r++)!t||Ie.nodeName(n,t)?o.push(n):Ie.merge(o,Me(n,t));return t===v||t&&Ie.nodeName(e,t)?Ie.merge([e],o):o}function ke(e){Te.test(e.type)&&(e.defaultChecked=e.checked)}Ve.optgroup=Ve.option,Ve.tbody=Ve.tfoot=Ve.colgroup=Ve.caption=Ve.thead,Ve.th=Ve.td,Ie.fn.extend({text:function(e){return Ie.access(this,function(e){return e===v?Ie.text(this):this.empty().append((this[0]&&this[0].ownerDocument||I).createTextNode(e))},null,e,arguments.length)},wrapAll:function(t){if(Ie.isFunction(t))return this.each(function(e){Ie(this).wrapAll(t.call(this,e))});if(this[0]){var e=Ie(t,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(i){return Ie.isFunction(i)?this.each(function(e){Ie(this).wrapInner(i.call(this,e))}):this.each(function(){var e=Ie(this),t=e.contents();t.length?t.wrapAll(i):e.append(i)})},wrap:function(t){var i=Ie.isFunction(t);return this.each(function(e){Ie(this).wrapAll(i?t.call(this,e):t)})},unwrap:function(){return this.parent().each(function(){Ie.nodeName(this,"body")||Ie(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var i,n=0;null!=(i=this[n]);n++)(!e||0<Ie.filter(e,[i]).length)&&(t||1!==i.nodeType||Ie.cleanData(Me(i)),i.parentNode&&(t&&Ie.contains(i.ownerDocument,i)&&we(Me(i,"script")),i.parentNode.removeChild(i)));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&Ie.cleanData(Me(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&Ie.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return Ie.clone(this,e,t)})},html:function(e){return Ie.access(this,function(e){var t=this[0]||{},i=0,n=this.length;if(e===v)return 1===t.nodeType?t.innerHTML.replace(de,""):v;if("string"==typeof e&&!be.test(e)&&(Ie.support.htmlSerialize||!ge.test(e))&&(Ie.support.leadingWhitespace||!fe.test(e))&&!Ve[(Ee.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(Be,"<$1></$2>");try{for(;i<n;i++)1===(t=this[i]||{}).nodeType&&(Ie.cleanData(Me(t,!1)),t.innerHTML=e);t=0}catch(r){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){return Ie.isFunction(e)||"string"==typeof e||(e=Ie(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,i=this.parentNode;i&&(Ie(this).remove(),i.insertBefore(e,t))})},detach:function(e){return this.remove(e,!0)},domManip:function(i,n,r){i=E.apply([],i);var e,t,o,a,s,l,u,c,h=0,p=this.length,d=this,g=p-1,f=i[0],I=Ie.isFunction(f);if(I||!(p<=1||"string"!=typeof f||Ie.support.checkClone)&&ye.test(f))return this.each(function(e){var t=d.eq(e);I&&(i[0]=f.call(this,e,n?t.html():v)),t.domManip(i,n,r)});if(p&&(e=(l=Ie.buildFragment(i,this[0].ownerDocument,!1,this)).firstChild,1===l.childNodes.length&&(l=e),e)){for(n=n&&Ie.nodeName(e,"tr"),o=(a=Ie.map(Me(l,"script"),xe)).length;h<p;h++)t=l,h!==g&&(t=Ie.clone(t,!0,!0),o&&Ie.merge(a,Me(t,"script"))),r.call(n&&Ie.nodeName(this[h],"table")?(u=this[h],c="tbody",u.getElementsByTagName(c)[0]||u.appendChild(u.ownerDocument.createElement(c))):this[h],t,h);if(o)for(s=a[a.length-1].ownerDocument,Ie.map(a,Le),h=0;h<o;h++)t=a[h],Ce.test(t.type||"")&&!Ie._data(t,"globalEval")&&Ie.contains(s,t)&&(t.src?Ie.ajax({url:t.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):Ie.globalEval((t.text||t.textContent||t.innerHTML||"").replace(Ne,"")));l=e=null}return this}}),Ie.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){Ie.fn[e]=function(e){for(var t,i=0,n=[],r=Ie(e),o=r.length-1;i<=o;i++)t=i===o?this:this.clone(!0),Ie(r[i])[a](t),u.apply(n,t.get());return this.pushStack(n)}}),Ie.extend({clone:function(e,t,i){var n,r,o,a,s,l=Ie.contains(e.ownerDocument,e);if(Ie.support.html5Clone||Ie.isXMLDoc(e)||!ge.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Se.innerHTML=e.outerHTML,Se.removeChild(o=Se.firstChild)),!(Ie.support.noCloneEvent&&Ie.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||Ie.isXMLDoc(e)))for(n=Me(o),s=Me(e),a=0;null!=(r=s[a]);++a)n[a]&&De(r,n[a]);if(t)if(i)for(s=s||Me(e),n=n||Me(o),a=0;null!=(r=s[a]);a++)Ae(r,n[a]);else Ae(e,o);return 0<(n=Me(o,"script")).length&&we(n,!l&&Me(e,"script")),n=s=r=null,o},buildFragment:function(e,t,i,n){for(var r,o,a,s,l,u,c,h=e.length,p=he(t),d=[],g=0;g<h;g++)if((o=e[g])||0===o)if("object"===Ie.type(o))Ie.merge(d,o.nodeType?[o]:o);else if(me.test(o)){for(s=s||p.appendChild(t.createElement("div")),l=(Ee.exec(o)||["",""])[1].toLowerCase(),c=Ve[l]||Ve._default,s.innerHTML=c[1]+o.replace(Be,"<$1></$2>")+c[2],r=c[0];r--;)s=s.lastChild;if(!Ie.support.leadingWhitespace&&fe.test(o)&&d.push(t.createTextNode(fe.exec(o)[0])),!Ie.support.tbody)for(r=(o="table"!==l||_e.test(o)?"<table>"!==c[1]||_e.test(o)?0:s:s.firstChild)&&o.childNodes.length;r--;)Ie.nodeName(u=o.childNodes[r],"tbody")&&!u.childNodes.length&&o.removeChild(u);for(Ie.merge(d,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=p.lastChild}else d.push(t.createTextNode(o));for(s&&p.removeChild(s),Ie.support.appendChecked||Ie.grep(Me(d,"input"),ke),g=0;o=d[g++];)if((!n||-1===Ie.inArray(o,n))&&(a=Ie.contains(o.ownerDocument,o),s=Me(p.appendChild(o),"script"),a&&we(s),i))for(r=0;o=s[r++];)Ce.test(o.type||"")&&i.push(o);return s=null,p},cleanData:function(e,t){for(var i,n,r,o,a=0,s=Ie.expando,l=Ie.cache,u=Ie.support.deleteExpando,c=Ie.event.special;null!=(i=e[a]);a++)if((t||Ie.acceptData(i))&&(o=(r=i[s])&&l[r])){if(o.events)for(n in o.events)c[n]?Ie.event.remove(i,n):Ie.removeEvent(i,n,o.handle);l[r]&&(delete l[r],u?delete i[s]:typeof i.removeAttribute!==B?i.removeAttribute(s):i[s]=null,h.push(r))}}});var Pe,He,Re,Ye=/alpha\([^)]*\)/i,We=/opacity\s*=\s*([^)]*)/,Oe=/^(top|right|bottom|left)$/,Fe=/^(none|table(?!-c[ea]).+)/,Ge=/^margin/,Ze=new RegExp("^("+m+")(.*)$","i"),Xe=new RegExp("^("+m+")(?!px)[a-z%]+$","i"),Je=new RegExp("^([+-])=("+m+")","i"),Ke={BODY:"block"},Qe={position:"absolute",visibility:"hidden",display:"block"},Ue={letterSpacing:0,fontWeight:400},ze=["Top","Right","Bottom","Left"],je=["Webkit","O","Moz","ms"];function qe(e,t){if(t in e)return t;for(var i=t.charAt(0).toUpperCase()+t.slice(1),n=t,r=je.length;r--;)if((t=je[r]+i)in e)return t;return n}function $e(e,t){return e=t||e,"none"===Ie.css(e,"display")||!Ie.contains(e.ownerDocument,e)}function et(e,t){for(var i,n,r,o=[],a=0,s=e.length;a<s;a++)(n=e[a]).style&&(o[a]=Ie._data(n,"olddisplay"),i=n.style.display,t?(o[a]||"none"!==i||(n.style.display=""),""===n.style.display&&$e(n)&&(o[a]=Ie._data(n,"olddisplay",rt(n.nodeName)))):o[a]||(r=$e(n),(i&&"none"!==i||!r)&&Ie._data(n,"olddisplay",r?i:Ie.css(n,"display"))));for(a=0;a<s;a++)(n=e[a]).style&&(t&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=t?o[a]||"":"none"));return e}function tt(e,t,i){var n=Ze.exec(t);return n?Math.max(0,n[1]-(i||0))+(n[2]||"px"):t}function it(e,t,i,n,r){for(var o=i===(n?"border":"content")?4:"width"===t?1:0,a=0;o<4;o+=2)"margin"===i&&(a+=Ie.css(e,i+ze[o],!0,r)),n?("content"===i&&(a-=Ie.css(e,"padding"+ze[o],!0,r)),"margin"!==i&&(a-=Ie.css(e,"border"+ze[o]+"Width",!0,r))):(a+=Ie.css(e,"padding"+ze[o],!0,r),"padding"!==i&&(a+=Ie.css(e,"border"+ze[o]+"Width",!0,r)));return a}function nt(e,t,i){var n=!0,r="width"===t?e.offsetWidth:e.offsetHeight,o=He(e),a=Ie.support.boxSizing&&"border-box"===Ie.css(e,"boxSizing",!1,o);if(r<=0||null==r){if(((r=Re(e,t,o))<0||null==r)&&(r=e.style[t]),Xe.test(r))return r;n=a&&(Ie.support.boxSizingReliable||r===e.style[t]),r=parseFloat(r)||0}return r+it(e,t,i||(a?"border":"content"),n,o)+"px"}function rt(e){var t=I,i=Ke[e];return i||("none"!==(i=ot(e,t))&&i||((t=((Pe=(Pe||Ie("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement))[0].contentWindow||Pe[0].contentDocument).document).write("<!doctype html><html><body>"),t.close(),i=ot(e,t),Pe.detach()),Ke[e]=i),i}function ot(e,t){var i=Ie(t.createElement(e)).appendTo(t.body),n=Ie.css(i[0],"display");return i.remove(),n}Ie.fn.extend({css:function(e,t){return Ie.access(this,function(e,t,i){var n,r,o={},a=0;if(Ie.isArray(t)){for(r=He(e),n=t.length;a<n;a++)o[t[a]]=Ie.css(e,t[a],!1,r);return o}return i!==v?Ie.style(e,t,i):Ie.css(e,t)},e,t,1<arguments.length)},show:function(){return et(this,!0)},hide:function(){return et(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:$e(this))?Ie(this).show():Ie(this).hide()})}}),Ie.extend({cssHooks:{opacity:{get:function(e,t){if(t){var i=Re(e,"opacity");return""===i?"1":i}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":Ie.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,i,n){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,o,a,s=Ie.camelCase(t),l=e.style;if(t=Ie.cssProps[s]||(Ie.cssProps[s]=qe(l,s)),a=Ie.cssHooks[t]||Ie.cssHooks[s],i===v)return a&&"get"in a&&(r=a.get(e,!1,n))!==v?r:l[t];if(!("string"===(o=typeof i)&&(r=Je.exec(i))&&(i=(r[1]+1)*r[2]+parseFloat(Ie.css(e,t)),o="number"),null==i||"number"===o&&isNaN(i)||("number"!==o||Ie.cssNumber[s]||(i+="px"),Ie.support.clearCloneStyle||""!==i||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&(i=a.set(e,i,n))===v)))try{l[t]=i}catch(u){}}},css:function(e,t,i,n){var r,o,a,s=Ie.camelCase(t);return t=Ie.cssProps[s]||(Ie.cssProps[s]=qe(e.style,s)),(a=Ie.cssHooks[t]||Ie.cssHooks[s])&&"get"in a&&(o=a.get(e,!0,i)),o===v&&(o=Re(e,t,n)),"normal"===o&&t in Ue&&(o=Ue[t]),""===i||i?(r=parseFloat(o),!0===i||Ie.isNumeric(r)?r||0:o):o},swap:function(e,t,i,n){var r,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];for(o in r=i.apply(e,n||[]),t)e.style[o]=a[o];return r}}),f.getComputedStyle?(He=function(e){return f.getComputedStyle(e,null)},Re=function(e,t,i){var n,r,o,a=i||He(e),s=a?a.getPropertyValue(t)||a[t]:v,l=e.style;return a&&(""!==s||Ie.contains(e.ownerDocument,e)||(s=Ie.style(e,t)),Xe.test(s)&&Ge.test(t)&&(n=l.width,r=l.minWidth,o=l.maxWidth,l.minWidth=l.maxWidth=l.width=s,s=a.width,l.width=n,l.minWidth=r,l.maxWidth=o)),s}):I.documentElement.currentStyle&&(He=function(e){return e.currentStyle},Re=function(e,t,i){var n,r,o,a=i||He(e),s=a?a[t]:v,l=e.style;return null==s&&l&&l[t]&&(s=l[t]),Xe.test(s)&&!Oe.test(t)&&(n=l.left,(o=(r=e.runtimeStyle)&&r.left)&&(r.left=e.currentStyle.left),l.left="fontSize"===t?"1em":s,s=l.pixelLeft+"px",l.left=n,o&&(r.left=o)),""===s?"auto":s}),Ie.each(["height","width"],function(e,r){Ie.cssHooks[r]={get:function(e,t,i){if(t)return 0===e.offsetWidth&&Fe.test(Ie.css(e,"display"))?Ie.swap(e,Qe,function(){return nt(e,r,i)}):nt(e,r,i)},set:function(e,t,i){var n=i&&He(e);return tt(0,t,i?it(e,r,i,Ie.support.boxSizing&&"border-box"===Ie.css(e,"boxSizing",!1,n),n):0)}}}),Ie.support.opacity||(Ie.cssHooks.opacity={get:function(e,t){return We.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var i=e.style,n=e.currentStyle,r=Ie.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=n&&n.filter||i.filter||"";((i.zoom=1)<=t||""===t)&&""===Ie.trim(o.replace(Ye,""))&&i.removeAttribute&&(i.removeAttribute("filter"),""===t||n&&!n.filter)||(i.filter=Ye.test(o)?o.replace(Ye,r):o+" "+r)}}),Ie(function(){Ie.support.reliableMarginRight||(Ie.cssHooks.marginRight={get:function(e,t){if(t)return Ie.swap(e,{display:"inline-block"},Re,[e,"marginRight"])}}),!Ie.support.pixelPosition&&Ie.fn.position&&Ie.each(["top","left"],function(e,i){Ie.cssHooks[i]={get:function(e,t){if(t)return t=Re(e,i),Xe.test(t)?Ie(e).position()[i]+"px":t}}})}),Ie.expr&&Ie.expr.filters&&(Ie.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0||!Ie.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||Ie.css(e,"display"))},Ie.expr.filters.visible=function(e){return!Ie.expr.filters.hidden(e)}),Ie.each({margin:"",padding:"",border:"Width"},function(r,o){Ie.cssHooks[r+o]={expand:function(e){for(var t=0,i={},n="string"==typeof e?e.split(" "):[e];t<4;t++)i[r+ze[t]+o]=n[t]||n[t-2]||n[0];return i}},Ge.test(r)||(Ie.cssHooks[r+o].set=tt)});var at=/%20/g,st=/\[\]$/,lt=/\r?\n/g,ut=/^(?:submit|button|image|reset|file)$/i,ct=/^(?:input|select|textarea|keygen)/i;function ht(i,e,n,r){var t;if(Ie.isArray(e))Ie.each(e,function(e,t){n||st.test(i)?r(i,t):ht(i+"["+("object"==typeof t?e:"")+"]",t,n,r)});else if(n||"object"!==Ie.type(e))r(i,e);else for(t in e)ht(i+"["+t+"]",e[t],n,r)}Ie.fn.extend({serialize:function(){return Ie.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=Ie.prop(this,"elements");return e?Ie.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!Ie(this).is(":disabled")&&ct.test(this.nodeName)&&!ut.test(e)&&(this.checked||!Te.test(e))}).map(function(e,t){var i=Ie(this).val();return null==i?null:Ie.isArray(i)?Ie.map(i,function(e){return{name:t.name,value:e.replace(lt,"\r\n")}}):{name:t.name,value:i.replace(lt,"\r\n")}}).get()}}),Ie.param=function(e,t){function i(e,t){t=Ie.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)}var n,r=[];if(t===v&&(t=Ie.ajaxSettings&&Ie.ajaxSettings.traditional),Ie.isArray(e)||e.jquery&&!Ie.isPlainObject(e))Ie.each(e,function(){i(this.name,this.value)});else for(n in e)ht(n,e[n],t,i);return r.join("&").replace(at,"+")},Ie.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,i){Ie.fn[i]=function(e,t){return 0<arguments.length?this.on(i,null,e,t):this.trigger(i)}}),Ie.fn.hover=function(e,t){return this.mouseenter(e).mouseleave(t||e)};var pt,dt,gt=Ie.now(),ft=/\?/,It=/#.*$/,Bt=/([?&])_=[^&]*/,Et=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,_t=/^(?:GET|HEAD)$/,mt=/^\/\//,bt=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Tt=Ie.fn.load,yt={},Ct={},vt="*/".concat("*");try{dt=e.href}catch(Qt){(dt=I.createElement("a")).href="",dt=dt.href}function Nt(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var i,n=0,r=e.toLowerCase().match(N)||[];if(Ie.isFunction(t))for(;i=r[n++];)"+"===i[0]?(i=i.slice(1)||"*",(o[i]=o[i]||[]).unshift(t)):(o[i]=o[i]||[]).push(t)}}function Vt(t,r,o,a){var s={},l=t===Ct;function u(e){var n;return s[e]=!0,Ie.each(t[e]||[],function(e,t){var i=t(r,o,a);return"string"!=typeof i||l||s[i]?l?!(n=i):void 0:(r.dataTypes.unshift(i),u(i),!1)}),n}return u(r.dataTypes[0])||!s["*"]&&u("*")}function St(e,t){var i,n,r=Ie.ajaxSettings.flatOptions||{};for(n in t)t[n]!==v&&((r[n]?e:i=i||{})[n]=t[n]);return i&&Ie.extend(!0,e,i),e}pt=bt.exec(dt.toLowerCase())||[],Ie.fn.load=function(e,t,i){if("string"!=typeof e&&Tt)return Tt.apply(this,arguments);var n,r,o,a=this,s=e.indexOf(" ");return 0<=s&&(n=e.slice(s,e.length),e=e.slice(0,s)),Ie.isFunction(t)?(i=t,t=v):t&&"object"==typeof t&&(o="POST"),0<a.length&&Ie.ajax({url:e,type:o,dataType:"html",data:t}).done(function(e){r=arguments,a.html(n?Ie("<div>").append(Ie.parseHTML(e)).find(n):e)}).complete(i&&function(e,t){a.each(i,r||[e.responseText,t,e])}),this},Ie.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){Ie.fn[t]=function(e){return this.on(t,e)}}),Ie.each(["get","post"],function(e,r){Ie[r]=function(e,t,i,n){return Ie.isFunction(t)&&(n=n||i,i=t,t=v),Ie.ajax({url:e,type:r,dataType:n,data:t,success:i})}}),Ie.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:dt,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(pt[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":vt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":f.String,"text html":!0,"text json":Ie.parseJSON,"text xml":Ie.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?St(St(e,Ie.ajaxSettings),t):St(Ie.ajaxSettings,e)},ajaxPrefilter:Nt(yt),ajaxTransport:Nt(Ct),ajax:function(e,t){"object"==typeof e&&(t=e,e=v),t=t||{};var i,n,p,d,g,f,I,r,B=Ie.ajaxSetup({},t),E=B.context||B,_=B.context&&(E.nodeType||E.jquery)?Ie(E):Ie.event,m=Ie.Deferred(),b=Ie.Callbacks("once memory"),T=B.statusCode||{},o={},a={},y=0,s="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===y){if(!r)for(r={};t=Et.exec(d);)r[t[1].toLowerCase()]=t[2];t=r[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===y?d:null},setRequestHeader:function(e,t){var i=e.toLowerCase();return y||(e=a[i]=a[i]||e,o[e]=t),this},overrideMimeType:function(e){return y||(B.mimeType=e),this},statusCode:function(e){var t;if(e)if(y<2)for(t in e)T[t]=[T[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||s;return I&&I.abort(t),l(0,t),this}};if(m.promise(C).complete=b.add,C.success=C.done,C.error=C.fail,B.url=((e||B.url||dt)+"").replace(It,"").replace(mt,pt[1]+"//"),B.type=t.method||t.type||B.method||B.type,B.dataTypes=Ie.trim(B.dataType||"*").toLowerCase().match(N)||[""],null==B.crossDomain&&(i=bt.exec(B.url.toLowerCase()),B.crossDomain=!(!i||i[1]===pt[1]&&i[2]===pt[2]&&(i[3]||("http:"===i[1]?80:443))==(pt[3]||("http:"===pt[1]?80:443)))),B.data&&B.processData&&"string"!=typeof B.data&&(B.data=Ie.param(B.data,B.traditional)),Vt(yt,B,t,C),2===y)return C;for(n in(f=B.global)&&0==Ie.active++&&Ie.event.trigger("ajaxStart"),B.type=B.type.toUpperCase(),B.hasContent=!_t.test(B.type),p=B.url,B.hasContent||(B.data&&(p=B.url+=(ft.test(p)?"&":"?")+B.data,delete B.data),!1===B.cache&&(B.url=Bt.test(p)?p.replace(Bt,"$1_="+gt++):p+(ft.test(p)?"&":"?")+"_="+gt++)),B.ifModified&&(Ie.lastModified[p]&&C.setRequestHeader("If-Modified-Since",Ie.lastModified[p]),Ie.etag[p]&&C.setRequestHeader("If-None-Match",Ie.etag[p])),(B.data&&B.hasContent&&!1!==B.contentType||t.contentType)&&C.setRequestHeader("Content-Type",B.contentType),C.setRequestHeader("Accept",B.dataTypes[0]&&B.accepts[B.dataTypes[0]]?B.accepts[B.dataTypes[0]]+("*"!==B.dataTypes[0]?", "+vt+"; q=0.01":""):B.accepts["*"]),B.headers)C.setRequestHeader(n,B.headers[n]);if(B.beforeSend&&(!1===B.beforeSend.call(E,C,B)||2===y))return C.abort();for(n in s="abort",{success:1,error:1,complete:1})C[n](B[n]);if(I=Vt(Ct,B,t,C)){C.readyState=1,f&&_.trigger("ajaxSend",[C,B]),B.async&&0<B.timeout&&(g=setTimeout(function(){C.abort("timeout")},B.timeout));try{y=1,I.send(o,l)}catch(Qt){if(!(y<2))throw Qt;l(-1,Qt)}}else l(-1,"No Transport");function l(e,t,i,n){var r,o,a,s,l,u=t;2!==y&&(y=2,g&&clearTimeout(g),I=v,d=n||"",C.readyState=0<e?4:0,i&&(s=function c(e,t,i){var n,r,o,a,s=e.contents,l=e.dataTypes,u=e.responseFields;for(a in u)a in i&&(t[u[a]]=i[a]);for(;"*"===l[0];)l.shift(),r===v&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(a in s)if(s[a]&&s[a].test(r)){l.unshift(a);break}if(l[0]in i)o=l[0];else{for(a in i){if(!l[0]||e.converters[a+" "+l[0]]){o=a;break}n=n||a}o=o||n}if(o)return o!==l[0]&&l.unshift(o),i[o]}(B,C,i)),200<=e&&e<300||304===e?(B.ifModified&&((l=C.getResponseHeader("Last-Modified"))&&(Ie.lastModified[p]=l),(l=C.getResponseHeader("etag"))&&(Ie.etag[p]=l)),204===e?(r=!0,u="nocontent"):304===e?(r=!0,u="notmodified"):(u=(r=function h(e,t){var i,n,r,o,a={},s=0,l=e.dataTypes.slice(),u=l[0];e.dataFilter&&(t=e.dataFilter(t,e.dataType));if(l[1])for(r in e.converters)a[r.toLowerCase()]=e.converters[r];for(;n=l[++s];)if("*"!==n){if("*"!==u&&u!==n){if(!(r=a[u+" "+n]||a["* "+n]))for(i in a)if((o=i.split(" "))[1]===n&&(r=a[u+" "+o[0]]||a["* "+o[0]])){!0===r?r=a[i]:!0!==a[i]&&(n=o[0],l.splice(s--,0,n));break}if(!0!==r)if(r&&e["throws"])t=r(t);else try{t=r(t)}catch(Qt){return{state:"parsererror",error:r?Qt:"No conversion from "+u+" to "+n}}}u=n}return{state:"success",data:t}}(B,s)).state,o=r.data,r=!(a=r.error))):(a=u,!e&&u||(u="error",e<0&&(e=0))),C.status=e,C.statusText=(t||u)+"",r?m.resolveWith(E,[o,u,C]):m.rejectWith(E,[C,u,a]),C.statusCode(T),T=v,f&&_.trigger(r?"ajaxSuccess":"ajaxError",[C,B,r?o:a]),b.fireWith(E,[C,u]),f&&(_.trigger("ajaxComplete",[C,B]),--Ie.active||Ie.event.trigger("ajaxStop")))}return C},getScript:function(e,t){return Ie.get(e,v,t,"script")},getJSON:function(e,t,i){return Ie.get(e,t,i,"json")}}),Ie.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return Ie.globalEval(e),e}}}),Ie.ajaxPrefilter("script",function(e){e.cache===v&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),Ie.ajaxTransport("script",function(t){if(t.crossDomain){var n,r=I.head||Ie("head")[0]||I.documentElement;return{send:function(e,i){(n=I.createElement("script")).async=!0,t.scriptCharset&&(n.charset=t.scriptCharset),n.src=t.url,n.onload=n.onreadystatechange=function(e,t){!t&&n.readyState&&!/loaded|complete/.test(n.readyState)||(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(v,!0)}}}});var xt=[],Lt=/(=)\?(?=&|$)|\?\?/;Ie.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=xt.pop()||Ie.expando+"_"+gt++;return this[e]=!0,e}}),Ie.ajaxPrefilter("json jsonp",function(e,t,i){var n,r,o,a=!1!==e.jsonp&&(Lt.test(e.url)?"url":"string"==typeof e.data&&!(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Lt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return n=e.jsonpCallback=Ie.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Lt,"$1"+n):!1!==e.jsonp&&(e.url+=(ft.test(e.url)?"&":"?")+e.jsonp+"="+n),e.converters["script json"]=function(){return o||Ie.error(n+" was not called"),o[0]},e.dataTypes[0]="json",r=f[n],f[n]=function(){o=arguments},i.always(function(){f[n]=r,e[n]&&(e.jsonpCallback=t.jsonpCallback,xt.push(n)),o&&Ie.isFunction(r)&&r(o[0]),o=r=v}),"script"});var wt,At,Dt=0,Mt=f.ActiveXObject&&function(){var e;for(e in wt)wt[e](v,!0)};function kt(){try{return new f.XMLHttpRequest}catch(Qt){}}Ie.ajaxSettings.xhr=f.ActiveXObject?function(){return!this.isLocal&&kt()||function e(){try{return new f.ActiveXObject("Microsoft.XMLHTTP")}catch(Qt){}}()}:kt,At=Ie.ajaxSettings.xhr(),Ie.support.cors=!!At&&"withCredentials"in At,(At=Ie.support.ajax=!!At)&&Ie.ajaxTransport(function(c){var h;if(!c.crossDomain||Ie.support.cors)return{send:function(e,s){var l,t,u=c.xhr();if(c.username?u.open(c.type,c.url,c.async,c.username,c.password):u.open(c.type,c.url,c.async),c.xhrFields)for(t in c.xhrFields)u[t]=c.xhrFields[t];c.mimeType&&u.overrideMimeType&&u.overrideMimeType(c.mimeType),c.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");try{for(t in e)u.setRequestHeader(t,e[t])}catch(i){}u.send(c.hasContent&&c.data||null),h=function(e,t){var i,n,r,o;try{if(h&&(t||4===u.readyState))if(h=v,l&&(u.onreadystatechange=Ie.noop,Mt&&delete wt[l]),t)4!==u.readyState&&u.abort();else{o={},i=u.status,n=u.getAllResponseHeaders(),"string"==typeof u.responseText&&(o.text=u.responseText);try{r=u.statusText}catch(Qt){r=""}i||!c.isLocal||c.crossDomain?1223===i&&(i=204):i=o.text?200:404}}catch(a){t||s(-1,a)}o&&s(i,r,o,n)},c.async?4===u.readyState?setTimeout(h):(l=++Dt,Mt&&(wt||(wt={},Ie(f).unload(Mt)),wt[l]=h),u.onreadystatechange=h):h()},abort:function(){h&&h(v,!0)}}});var Pt,Ht,Rt=/^(?:toggle|show|hide)$/,Yt=new RegExp("^(?:([+-])=|)("+m+")([a-z%]*)$","i"),Wt=/queueHooks$/,Ot=[function Ut(t,e,i){var n,r,o,a,s,l,u,c,h,p=this,d=t.style,g={},f=[],I=t.nodeType&&$e(t);i.queue||(null==(c=Ie._queueHooks(t,"fx")).unqueued&&(c.unqueued=0,h=c.empty.fire,c.empty.fire=function(){c.unqueued||h()}),c.unqueued++,p.always(function(){p.always(function(){c.unqueued--,Ie.queue(t,"fx").length||c.empty.fire()})}));1===t.nodeType&&("height"in e||"width"in e)&&(i.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===Ie.css(t,"display")&&"none"===Ie.css(t,"float")&&(Ie.support.inlineBlockNeedsLayout&&"inline"!==rt(t.nodeName)?d.zoom=1:d.display="inline-block"));i.overflow&&(d.overflow="hidden",Ie.support.shrinkWrapBlocks||p.always(function(){d.overflow=i.overflow[0],d.overflowX=i.overflow[1],d.overflowY=i.overflow[2]}));for(r in e)if(a=e[r],Rt.exec(a)){if(delete e[r],l=l||"toggle"===a,a===(I?"hide":"show"))continue;f.push(r)}if(o=f.length){"hidden"in(s=Ie._data(t,"fxshow")||Ie._data(t,"fxshow",{}))&&(I=s.hidden),l&&(s.hidden=!I),I?Ie(t).show():p.done(function(){Ie(t).hide()}),p.done(function(){var e;for(e in Ie._removeData(t,"fxshow"),g)Ie.style(t,e,g[e])});for(r=0;r<o;r++)n=f[r],u=p.createTween(n,I?s[n]:0),g[n]=s[n]||Ie.style(t,n),n in s||(s[n]=u.start,I&&(u.end=u.start,u.start="width"===n||"height"===n?1:0))}}],Ft={"*":[function(e,t){var i,n,r=this.createTween(e,t),o=Yt.exec(t),a=r.cur(),s=+a||0,l=1,u=20;if(o){if(i=+o[2],"px"!==(n=o[3]||(Ie.cssNumber[e]?"":"px"))&&s)for(s=Ie.css(r.elem,e,!0)||i||1;s/=l=l||".5",Ie.style(r.elem,e,s+n),l!==(l=r.cur()/a)&&1!==l&&--u;);r.unit=n,r.start=s,r.end=o[1]?s+(o[1]+1)*i:i}return r}]};function Gt(){return setTimeout(function(){Pt=v}),Pt=Ie.now()}function Zt(o,e,t){var i,a,n=0,r=Ot.length,s=Ie.Deferred().always(function(){delete l.elem}),l=function(){if(a)return!1;for(var e=Pt||Gt(),t=Math.max(0,u.startTime+u.duration-e),i=1-(t/u.duration||0),n=0,r=u.tweens.length;n<r;n++)u.tweens[n].run(i);return s.notifyWith(o,[u,i,t]),i<1&&r?t:(s.resolveWith(o,[u]),!1)},u=s.promise({elem:o,props:Ie.extend({},e),opts:Ie.extend(!0,{specialEasing:{}},t),originalProperties:e,originalOptions:t,startTime:Pt||Gt(),duration:t.duration,tweens:[],createTween:function(e,t){var i=Ie.Tween(o,u.opts,e,t,u.opts.specialEasing[e]||u.opts.easing);return u.tweens.push(i),i},stop:function(e){var t=0,i=e?u.tweens.length:0;if(a)return this;for(a=!0;t<i;t++)u.tweens[t].run(1);return e?s.resolveWith(o,[u,e]):s.rejectWith(o,[u,e]),this}}),c=u.props;for(!function h(e,t){var i,n,r,o,a;for(r in e)if(n=Ie.camelCase(r),o=t[n],i=e[r],Ie.isArray(i)&&(o=i[1],i=e[r]=i[0]),r!==n&&(e[n]=i,delete e[r]),(a=Ie.cssHooks[n])&&"expand"in a)for(r in i=a.expand(i),delete e[n],i)r in e||(e[r]=i[r],t[r]=o);else t[n]=o}(c,u.opts.specialEasing);n<r;n++)if(i=Ot[n].call(u,o,c,u.opts))return i;return function p(o,e){Ie.each(e,function(e,t){for(var i=(Ft[e]||[]).concat(Ft["*"]),n=0,r=i.length;n<r;n++)if(i[n].call(o,e,t))return})}(u,c),Ie.isFunction(u.opts.start)&&u.opts.start.call(o,u),Ie.fx.timer(Ie.extend(l,{elem:o,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function Xt(e,t,i,n,r){return new Xt.prototype.init(e,t,i,n,r)}function Jt(e,t){var i,n={height:e},r=0;for(t=t?1:0;r<4;r+=2-t)n["margin"+(i=ze[r])]=n["padding"+i]=e;return t&&(n.opacity=n.width=e),n}function Kt(e){return Ie.isWindow(e)?e:9===e.nodeType&&(e.defaultView||e.parentWindow)}Ie.Animation=Ie.extend(Zt,{tweener:function(e,t){for(var i,n=0,r=(e=Ie.isFunction(e)?(t=e,["*"]):e.split(" ")).length;n<r;n++)i=e[n],Ft[i]=Ft[i]||[],Ft[i].unshift(t)},prefilter:function(e,t){t?Ot.unshift(e):Ot.push(e)}}),((Ie.Tween=Xt).prototype={constructor:Xt,init:function(e,t,i,n,r,o){this.elem=e,this.prop=i,this.easing=r||"swing",this.options=t,this.start=this.now=this.cur(),this.end=n,this.unit=o||(Ie.cssNumber[i]?"":"px")},cur:function(){var e=Xt.propHooks[this.prop];return e&&e.get?e.get(this):Xt.propHooks._default.get(this)},run:function(e){var t,i=Xt.propHooks[this.prop];return this.options.duration?this.pos=t=Ie.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):Xt.propHooks._default.set(this),this}}).init.prototype=Xt.prototype,(Xt.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=Ie.css(e.elem,e.prop,""))&&"auto"!==t?t:0:e.elem[e.prop]},set:function(e){Ie.fx.step[e.prop]?Ie.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[Ie.cssProps[e.prop]]||Ie.cssHooks[e.prop])?Ie.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}}).scrollTop=Xt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},Ie.each(["toggle","show","hide"],function(e,n){var r=Ie.fn[n];Ie.fn[n]=function(e,t,i){return null==e||"boolean"==typeof e?r.apply(this,arguments):this.animate(Jt(n,!0),e,t,i)}}),Ie.fn.extend({fadeTo:function(e,t,i,n){return this.filter($e).css("opacity",0).show().end().animate({opacity:t},e,i,n)},animate:function(t,e,i,n){var r=Ie.isEmptyObject(t),o=Ie.speed(e,i,n),a=function(){var e=Zt(this,Ie.extend({},t),o);a.finish=function(){e.stop(!0)},(r||Ie._data(this,"finish"))&&e.stop(!0)};return a.finish=a,r||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(r,e,o){function a(e){var t=e.stop;delete e.stop,t(o)}return"string"!=typeof r&&(o=e,e=r,r=v),e&&!1!==r&&this.queue(r||"fx",[]),this.each(function(){var e=!0,t=null!=r&&r+"queueHooks",i=Ie.timers,n=Ie._data(this);if(t)n[t]&&n[t].stop&&a(n[t]);else for(t in n)n[t]&&n[t].stop&&Wt.test(t)&&a(n[t]);for(t=i.length;t--;)i[t].elem!==this||null!=r&&i[t].queue!==r||(i[t].anim.stop(o),e=!1,i.splice(t,1));!e&&o||Ie.dequeue(this,r)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=Ie._data(this),i=t[a+"queue"],n=t[a+"queueHooks"],r=Ie.timers,o=i?i.length:0;for(t.finish=!0,Ie.queue(this,a,[]),n&&n.cur&&n.cur.finish&&n.cur.finish.call(this),e=r.length;e--;)r[e].elem===this&&r[e].queue===a&&(r[e].anim.stop(!0),r.splice(e,1));for(e=0;e<o;e++)i[e]&&i[e].finish&&i[e].finish.call(this);delete t.finish})}}),Ie.each({slideDown:Jt("show"),slideUp:Jt("hide"),slideToggle:Jt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,n){Ie.fn[e]=function(e,t,i){return this.animate(n,e,t,i)}}),Ie.speed=function(e,t,i){var n=e&&"object"==typeof e?Ie.extend({},e):{complete:i||!i&&t||Ie.isFunction(e)&&e,duration:e,easing:i&&t||t&&!Ie.isFunction(t)&&t};return n.duration=Ie.fx.off?0:"number"==typeof n.duration?n.duration:n.duration in Ie.fx.speeds?Ie.fx.speeds[n.duration]:Ie.fx.speeds._default,null!=n.queue&&!0!==n.queue||(n.queue="fx"),n.old=n.complete,n.complete=function(){Ie.isFunction(n.old)&&n.old.call(this),n.queue&&Ie.dequeue(this,n.queue)},n},Ie.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},Ie.timers=[],Ie.fx=Xt.prototype.init,Ie.fx.tick=function(){var e,t=Ie.timers,i=0;for(Pt=Ie.now();i<t.length;i++)(e=t[i])()||t[i]!==e||t.splice(i--,1);t.length||Ie.fx.stop(),Pt=v},Ie.fx.timer=function(e){e()&&Ie.timers.push(e)&&Ie.fx.start()},Ie.fx.interval=13,Ie.fx.start=function(){Ht=Ht||setInterval(Ie.fx.tick,Ie.fx.interval)},Ie.fx.stop=function(){clearInterval(Ht),Ht=null},Ie.fx.speeds={slow:600,fast:200,_default:400},Ie.fx.step={},Ie.expr&&Ie.expr.filters&&(Ie.expr.filters.animated=function(t){return Ie.grep(Ie.timers,function(e){return t===e.elem}).length}),Ie.fn.offset=function(t){if(arguments.length)return t===v?this:this.each(function(e){Ie.offset.setOffset(this,t,e)});var e,i,n={top:0,left:0},r=this[0],o=r&&r.ownerDocument;return o?(e=o.documentElement,Ie.contains(e,r)?(typeof r.getBoundingClientRect!==B&&(n=r.getBoundingClientRect()),i=Kt(o),{top:n.top+(i.pageYOffset||e.scrollTop)-(e.clientTop||0),left:n.left+(i.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}):n):void 0},Ie.offset={setOffset:function(e,t,i){var n=Ie.css(e,"position");"static"===n&&(e.style.position="relative");var r,o,a=Ie(e),s=a.offset(),l=Ie.css(e,"top"),u=Ie.css(e,"left"),c={},h={};o=("absolute"===n||"fixed"===n)&&-1<Ie.inArray("auto",[l,u])?(r=(h=a.position()).top,h.left):(r=parseFloat(l)||0,parseFloat(u)||0),Ie.isFunction(t)&&(t=t.call(e,i,s)),null!=t.top&&(c.top=t.top-s.top+r),null!=t.left&&(c.left=t.left-s.left+o),"using"in t?t.using.call(e,c):a.css(c)}},Ie.fn.extend({position:function(){if(this[0]){var e,t,i={top:0,left:0},n=this[0];return"fixed"===Ie.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),Ie.nodeName(e[0],"html")||(i=e.offset()),i.top+=Ie.css(e[0],"borderTopWidth",!0),i.left+=Ie.css(e[0],"borderLeftWidth",!0)),{top:t.top-i.top-Ie.css(n,"marginTop",!0),left:t.left-i.left-Ie.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||I.documentElement;e&&!Ie.nodeName(e,"html")&&"static"===Ie.css(e,"position");)e=e.offsetParent;return e||I.documentElement})}}),Ie.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,r){var o=/Y/.test(r);Ie.fn[t]=function(e){return Ie.access(this,function(e,t,i){var n=Kt(e);if(i===v)return n?r in n?n[r]:n.document.documentElement[t]:e[t];n?n.scrollTo(o?Ie(n).scrollLeft():i,o?i:Ie(n).scrollTop()):e[t]=i},t,e,arguments.length,null)}}),Ie.each({Height:"height",Width:"width"},function(o,a){Ie.each({padding:"inner"+o,content:a,"":"outer"+o},function(n,e){Ie.fn[e]=function(e,t){var i=arguments.length&&(n||"boolean"!=typeof e),r=n||(!0===e||!0===t?"margin":"border");return Ie.access(this,function(e,t,i){var n;return Ie.isWindow(e)?e.document.documentElement["client"+o]:9===e.nodeType?(n=e.documentElement,Math.max(e.body["scroll"+o],n["scroll"+o],e.body["offset"+o],n["offset"+o],n["client"+o])):i===v?Ie.css(e,t,r):Ie.style(e,t,i,r)},a,i?e:v,i,null)}})}),BI.jQuery=BI.$=Ie,f.$=f.$||Ie,f.jQuery=f.jQuery||Ie,qt(691).jQuery&&(($t=function(){return Ie}.apply(jt,[]))===v||(zt.exports=$t))}(window)},function(t,e){(function(e){t.exports=e}).call(this,{})},function(e,t){BI.$.extend(BI.$.Event.prototype,{stopEvent:function(){this.stopPropagation(),this.preventDefault()}})},function(e,t){var i;BI.jQuery&&((i=BI.jQuery).fn.insets||(i.fn.insets=function(){var e=this.padding(),t=this.border();return{top:e.top,bottom:e.bottom+t.bottom+t.top,left:e.left,right:e.right+t.right+t.left}}),i.fn.bounds||(i.fn.bounds=function(e){var t={hasIgnoredBounds:!0};return e?(isNaN(e.x)||(t.left=e.x),isNaN(e.y)||(t.top=e.y),null!=e.width&&(t.width=e.width-(this.outerWidth(!0)-this.width()),t.width=0<=t.width?t.width:e.width),null!=e.height&&(t.height=e.height-(this.outerHeight(!0)-this.height()),t.height=0<=t.height?t.height:e.height),this.css(t),this):{x:(t=this.position()).left,y:t.top,width:this.outerWidth(),height:this.outerHeight()}}),BI.extend(BI.jQuery.fn,{destroy:function(){this.remove(),!0===BI.isIE()&&(this[0].outerHTML="")},__textKeywordMarked__:function(e,i,t){if(!BI.isKey(i)||100<(e+"").length)return this.html(BI.htmlEncode(e));i+="",i=BI.toUpperCase(i);var n=(e||"")+"";for(t=(t||BI.makeFirstPY(e,{splitChar:""}))+"",t=BI.toUpperCase(t),this.empty();0<t.length&&0<n.length;){var r=BI.toUpperCase(n).indexOf(i),o=t.indexOf(i);if(0<=o&&(o=(o-Math.floor(o/(n.length+1)))%n.length),0<=r&&(r<o||-1===o))this.append(BI.htmlEncode(n.substr(0,r))),this.append(BI.$("<span>").addClass("bi-keyword-red-mark").html(BI.htmlEncode(n.substr(r,i.length)))),n=n.substr(r+i.length),BI.isNotEmptyString(t)&&(t=BI.map(t.split(""),function(e,t){return t.slice(r+i.length)}).join(""));else{if(!(0<=o)){this.append(BI.htmlEncode(n));break}this.append(BI.htmlEncode(n.substr(0,o))),this.append(BI.$("<span>").addClass("bi-keyword-red-mark").html(BI.htmlEncode(n.substr(o,i.length)))),BI.isNotEmptyString(t)&&(t=BI.map(t.split(""),function(e,t){return t.slice(o+i.length)}).join("")),n=n.substr(o+i.length)}}return this},getDomHeight:function(e){var t=BI.$(this).clone();t.appendTo(BI.$(e||"body"));var i=t.height();return t.remove(),i},hasVerticalScroll:function(){return 0<this.height()&&this[0].clientWidth<this[0].offsetWidth},hasHorizonScroll:function(){return 0<this.width()&&this[0].clientHeight<this[0].offsetHeight},getStyle:function(e){var t=this[0],i=void 0;if(_global.getComputedStyle&&(i=_global.getComputedStyle(t,null)))return i.getPropertyValue(BI.hyphenate(e));if(document.defaultView&&document.defaultView.getComputedStyle){if(i=document.defaultView.getComputedStyle(t,null))return i.getPropertyValue(BI.hyphenate(e));if("display"===e)return"none"}return t.currentStyle?"float"===e?t.currentStyle.cssFloat||t.currentStyle.styleFloat:t.currentStyle[BI.camelize(e)]:t.style&&t.style[BI.camelize(e)]},__isMouseInBounds__:function(e){var t=this.get(0).getBoundingClientRect?this.get(0).getBoundingClientRect():this.offset(),i=t.width||this.outerWidth(),n=t.height||this.outerHeight();return!(e.pageX<Math.floor(t.left)||e.pageX>t.left+i||e.pageY<Math.floor(t.top)||e.pageY>t.top+n)},__hasZIndexMask__:function(e){return e&&null!=this.zIndexMask[e]},__buildZIndexMask__:function(e,t){this.zIndexMask=this.zIndexMask||{},this.indexMask=this.indexMask||[];var i=BI.createWidget({type:"bi.center_adapt",cls:"bi-z-index-mask",items:t});return i.element.css({"z-index":e}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:i,left:0,right:0,top:0,bottom:0}]}),this.indexMask.push(i),e&&(this.zIndexMask[e]=i),i.element},__releaseZIndexMask__:function(e){if(e&&this.zIndexMask[e])return BI.remove(this.indexMask,this.zIndexMask[e]),void this.zIndexMask[e].destroy();this.indexMask=this.indexMask||[];var t=this.indexMask.pop();t&&t.destroy()}}))},function(e,t){var o;_.extend(BI,{$import:(o={},function(i,e,t){if(function r(i,n){var e=BI.$("head script, body script");BI.$.each(e,function(e,t){-1!=t.src.indexOf(i)&&(o[i]=!0)});var t=BI.$("head link");BI.$.each(t,function(e,t){-1!=t.href.indexOf(i)&&n&&(o[i]=!1,BI.$(t).remove())})}(i,t),!0!==o[i])if("css"===e){var n=document.createElement("link");n.rel="stylesheet",n.type="text/css",n.href=i,document.getElementsByTagName("head")[0].appendChild(n),o[i]=!0}else BI.$.ajax({url:i,dataType:"script",async:!1,cache:!0,complete:function(e,t){"success"==t&&(o[i]=!0)}})})})},function(e,t){!function(c){var h,p,e=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],t="onwheel"in document||9<=document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],d=Array.prototype.slice;if(c.event.fixHooks)for(var i=e.length;i;)c.event.fixHooks[e[--i]]=c.event.mouseHooks;var g=c.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var e=t.length;e;)this.addEventListener(t[--e],n,!1);else this.onmousewheel=n},teardown:function(){if(this.removeEventListener)for(var e=t.length;e;)this.removeEventListener(t[--e],n,!1);else this.onmousewheel=null},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function n(e){var t=e||_global.event,i=d.call(arguments,1),n=0,r=0,o=0,a=0,s=0,l=0;if((e=c.event.fix(t)).type="mousewheel","detail"in t&&(o=-1*t.detail),"wheelDelta"in t&&(o=t.wheelDelta),"wheelDeltaY"in t&&(o=t.wheelDeltaY),"wheelDeltaX"in t&&(r=-1*t.wheelDeltaX),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(r=-1*o,o=0),n=0===o?r:o,"deltaY"in t&&(o=-1*t.deltaY,n=o),"deltaX"in t&&(r=t.deltaX,0===o&&(n=-1*r)),0!==o||0!==r){if(1===t.deltaMode){n*=40,o*=40,r*=40}else if(2===t.deltaMode){n*=800,o*=800,r*=800}if(a=Math.max(Math.abs(o),Math.abs(r)),(!p||a<p)&&I(t,p=a)&&(p/=40),I(t,a)&&(n/=40,r/=40,o/=40),n=Math[1<=n?"floor":"ceil"](n/p),r=Math[1<=r?"floor":"ceil"](r/p),o=Math[1<=o?"floor":"ceil"](o/p),g.settings.normalizeOffset&&this.getBoundingClientRect){var u=this.getBoundingClientRect();s=e.clientX-u.left,l=e.clientY-u.top}return e.deltaX=r,e.deltaY=o,e.deltaFactor=p,e.offsetX=s,e.offsetY=l,e.deltaMode=0,i.unshift(e,n,r,o),h&&clearTimeout(h),h=setTimeout(f,200),(c.event.dispatch||c.event.handle).apply(this,i)}}function f(){p=null}function I(e,t){return g.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}c.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}(BI.jQuery)},function(e,t){BI.TreeView=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.TreeView.superclass._defaultConfig.apply(this,arguments),{_baseCls:"bi-tree",paras:{selectedValues:{}},itemsCreator:BI.emptyFn})},_init:function(){BI.TreeView.superclass._init.apply(this,arguments);var e=this.options;this._stop=!1,this._createTree(),this.tip=BI.createWidget({type:"bi.loading_bar",invisible:!0,handler:BI.bind(this._loadMore,this)}),BI.createWidget({type:"bi.vertical",scrollable:!0,scrolly:!1,element:this,items:[this.tip]}),BI.isNotNull(e.value)&&this.setSelectedValue(e.value),BI.isIE9Below&&BI.isIE9Below()&&this.element.addClass("hack")},_createTree:function(){this.id="bi-tree"+BI.UUID(),this.nodes&&this.nodes.destroy(),this.tree&&this.tree.destroy(),this.tree=BI.createWidget({type:"bi.layout",element:"<ul id='"+this.id+"' class='ztree'></ul>"}),BI.createWidget({type:"bi.default",element:this.element,items:[this.tree]})},_selectTreeNode:function(e,t){this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,t,this),this.fireEvent(BI.TreeView.EVENT_CHANGE,t,this)},_configSetting:function(){var e=this.options.paras,a=this,t={async:{enable:!0,url:function n(e,t){var i=a._getParentValues(t);return t.times=t.times||1,"&id="+t.id+"&times="+t.times+++"&parentValues= "+_global.encodeURIComponent(BI.jsonEncode(i))+"&checkState="+_global.encodeURIComponent(BI.jsonEncode(t.getCheckStatus()))},autoParam:["id","name"],otherParam:BI.cjkEncodeDO(e)},check:{enable:!0},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0,dblClickExpand:!1},callback:{beforeExpand:function i(e,t){if(t.isAjaxing)return BI.Msg.toast("Please Wait。","warning"),!1;t.children||(t.times=1,l(t,"refresh"));return!0},onAsyncSuccess:function u(e,t,i,n){if(i.halfCheck=!1,!n||0===n.length||/^<html>[\s,\S]*<\/html>$/gi.test(n)||a._stop)return;var r=a.nodes,o=i.count||0;i.children.length>o?(i.count=i.children.length,BI.delay(function(){l(i)},s)):(r.updateNode(i),r.selectNode(i.children[0]))},onAsyncError:function c(e,t,i,n,r,o){a.nodes;BI.Msg.toast("Error!","warning")},beforeCheck:function o(e,t){if(!(t.halfCheck=!1)===t.checked){!function r(e){BI.each(e,function(e,t){!0===t.halfCheck&&(t.halfCheck=!1,r(t.children))})}(t.children);var i=a.nodes.getSelectedNodes();BI.$.each(i,function(e,t){t.halfCheck=!1})}var n=t.getCheckStatus();!0===n.half&&!0===n.checked&&(t.checked=!1)},onCheck:function r(e,t,i){a._selectTreeNode(t,i)},onExpand:function h(e,t,i){i.halfCheck=!1},onCollapse:function p(e,t,i){},onClick:function d(e,t,i){var n=i.checked,r=i.getCheckStatus();!0===r.half&&!0===r.checked&&(n=!1);a.nodes.checkNode(i,!n,!0,!0)}}},s=100;function l(e,t){var i=a.nodes;"refresh"==t&&i.updateNode(e),i.reAsyncChildNodes(e,t,!0)}return t},_getParentValues:function(e){if(!e.getParentNode())return[];var t=e.getParentNode(),i=this._getParentValues(t);return i=i.concat([this._getNodeValue(t)])},_getNodeValue:function(e){return null==e.value?BI.replaceAll(e.text.replace(/<[^>]+>/g,""),"&nbsp;"," "):e.value},_getHalfSelectedValues:function(i,e){var n=this,t=e.getCheckStatus();if(!1!==t.checked||!1!==t.half)if(BI.isNotEmptyArray(e.children)&&!0===t.half){var r=e.children;BI.each(r,function(e,t){n._getHalfSelectedValues(i,t)})}else{var o=e.parentValues||n._getParentValues(e),a=o.concat(this._getNodeValue(e));if(BI.isNotEmptyArray(e.children)||!1===t.half)this._buildTree(i,a);else{var s=BI.deepClone(this.options.paras.selectedValues),l=this._getTree(s,a);this._addTreeNode(i,o,this._getNodeValue(e),l)}}},_getTree:function(e,t){var i=e;return BI.any(t,function(e,t){if(null==i[t])return!0;i=i[t]}),i},_addTreeNode:function(e,t,i,n){var r=e;BI.each(t,function(e,t){null==r[t]&&(r[t]={}),r=r[t]}),r[i]=n},_buildTree:function(e,t){var i=e;BI.each(t,function(e,t){null==i[t]&&(i[t]={}),i=i[t]})},_getSelectedValues:function(){var r=this,o={};return function t(e){BI.each(e,function(e,t){var i=t.getCheckStatus();if(!0===i.checked||!0===i.half)if(!0===i.half)r._getHalfSelectedValues(o,t);else{var n=(t.parentValues||r._getParentValues(t)).concat([r._getNodeValue(t)]);r._buildTree(o,n)}})}(this.nodes.getNodes()),o},_dealWidthNodes:function(e){var i=this.options,t=BI.Tree.arrayFormat(e);return BI.each(t,function(e,t){t.title=t.title||t.text||t.value,t.isParent=t.isParent||t.parent,BI.isKey(i.paras.keyword)?t.text=BI.$("<div>").__textKeywordMarked__(t.text,i.paras.keyword,t.py).html():t.text=BI.htmlEncode(t.text+"")}),e},_loadMore:function(){var n=this,e=this.options;this.tip.setLoading();var t=BI.extend({},e.paras,{times:++this.times});e.itemsCreator(t,function(e){if(!0!==n._stop){var t=!!e.hasNext,i=e.items||[];t?n.tip.setLoaded():n.tip.setEnd(),0<i.length&&n.nodes.addNodes(null,n._dealWidthNodes(i))}})},_initTree:function(n){var r=this,e=this.options;r.fireEvent(BI.Events.INIT),this.times=1;var o=this.tree;o.empty(),this.loading(),this.tip.setVisible(!1);var a=BI.extend({},e.paras,{times:1});e.itemsCreator(a,function(e){if(!0!==r._stop){var t=!!e.hasNext,i=e.items||[];0<i.length&&function(e){!0!==r._stop&&(r.nodes=BI.$.fn.zTree.init(o.element,n,e))}(r._dealWidthNodes(i)),r.setTipVisible(i.length<=0),r.loaded(),t?r.tip.setLoaded():r.tip.invisible(),1===a.times&&r.fireEvent(BI.Events.AFTERINIT)}})},initTree:function(e,t){t=t||{async:{enable:!1},check:{enable:!1},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0},callback:{}};this.nodes=BI.$.fn.zTree.init(this.tree.element,t,e)},start:function(){this._stop=!1},stop:function(){this._stop=!0},stroke:function(e){delete this.options.keyword,BI.extend(this.options.paras,e);var t=this._configSetting();this._createTree(),this.start(),this._initTree(t)},populate:function(){this.stroke.apply(this,arguments)},hasChecked:function(){return 0<this.nodes.getCheckedNodes(!0).length},checkAll:function(e){this.nodes&&(BI.each(this.nodes.getNodes(),function(e,t){t.halfCheck=!1,function i(e){BI.each(e,function(e,t){t.halfCheck=!1,i(t.children)})}(t.children)}),this.nodes.checkAllNodes(e))},expandAll:function(e){this.nodes&&this.nodes.expandAll(e)},setValue:function(e,t){this.checkAll(!1),this.updateValue(e,t),this.refresh()},setSelectedValue:function(e){this.options.paras.selectedValues=BI.deepClone(e||{})},updateValue:function(e,n){if(this.nodes){n=n||"value";var r=this.nodes;BI.each(e,function(e,i){var t=r.getNodesByParam(n,e,null);BI.each(t,function(e,t){BI.extend(t,{checked:!0},i),r.updateNode(t)})})}},refresh:function(){this.nodes&&this.nodes.refresh()},getValue:function(){return this.nodes?this._getSelectedValues():null},destroyed:function(){this.stop(),this.nodes&&this.nodes.destroy()}}),BI.extend(BI.TreeView,{REQ_TYPE_INIT_DATA:1,REQ_TYPE_ADJUST_DATA:2,REQ_TYPE_SELECT_DATA:3,REQ_TYPE_GET_SELECTED_DATA:4}),BI.TreeView.EVENT_CHANGE="EVENT_CHANGE",BI.TreeView.EVENT_INIT=BI.Events.INIT,BI.TreeView.EVENT_AFTERINIT=BI.Events.AFTERINIT,BI.shortcut("bi.tree_view",BI.TreeView)},function(e,t){BI.AsyncTree=BI.inherit(BI.TreeView,{_defaultConfig:function(){return BI.extend(BI.AsyncTree.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.AsyncTree.superclass._init.apply(this,arguments);var t=this;this.service=new BI.TreeRenderPageService({subNodeListGetter:function(e){return BI.$("#"+t.id+" #"+e+"_ul")}})},_configSetting:function(){var e=this.options.paras,n=this;return{async:{enable:!1,otherParam:BI.cjkEncodeDO(e)},check:{enable:!0},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0,dblClickExpand:!1},callback:{beforeCheck:function o(e,t){if(!(t.halfCheck=!1)===t.checked){!function r(e){BI.each(e,function(e,t){t.halfCheck=!1,r(t.children)})}(t.children);var i=BI.$.fn.zTree.getZTreeObj(e).getSelectedNodes();BI.each(i,function(e,t){t.halfCheck=!1})}var n=t.getCheckStatus();!0===n.half&&!0===n.checked&&(t.checked=!1)},onCheck:function r(e,t,i){n._selectTreeNode(t,i)},beforeExpand:function i(e,t){n._beforeExpandNode(e,t)},onExpand:function a(e,t,i){i.halfCheck=!1},onCollapse:function s(e,t,i){i.halfCheck=!1},onClick:function l(e,t,i){var n=BI.$.fn.zTree.getZTreeObj(t),r=i.checked,o=i.getCheckStatus();!0===o.half&&!0===o.checked&&(r=!1);n.checkNode(i,!r,!0,!0)}}}},_selectTreeNode:function(e,t){this.options;var i=BI.deepClone(t.parentValues||this._getParentValues(t)),n=this._getNodeValue(t);if(!0===t.checked)this._addTreeNode(this.options.paras.selectedValues,i,n,{});else{var r=t,o=this._getTree(this.options.paras.selectedValues,i);for(BI.isNotNull(o[n])&&delete o[n];null!=r&&BI.isEmpty(o);)i=i.slice(0,i.length-1),null!=(r=r.getParentNode())&&delete(o=this._getTree(this.options.paras.selectedValues,i))[n=this._getNodeValue(r)];this.options.paras.selectedValues=this._getJoinValue()}BI.AsyncTree.superclass._selectTreeNode.apply(this,arguments)},_beforeExpandNode:function(e,n){var r=this,o=this.options,a=function(e){var t=e.items||[];0<t.length&&!function i(e,t){r.nodes.addNodes(n,e),t?r.service.pushNodeList(n.tId,s):r.service.removeNodeList(n.tId)}(r._dealWidthNodes(t),!!e.hasNext)};function s(e){e=e||{};var t=n.parentValues||r._getParentValues(n),i=BI.extend({},o.paras,{id:n.id,times:e.times,parentValues:t.concat(r._getNodeValue(n)),checkState:n.getCheckStatus()},e);o.itemsCreator(i,a)}var t=n.getCheckStatus();n.children||setTimeout(function(){s({times:1,checkState:t})},17)},_join:function(e,t){var o=this,a={};function s(i,n,r){BI.each(n,function(e,t){BI.isNull(r[e])?o._addTreeNode(a,i,e,t):BI.isEmpty(r[e])?o._addTreeNode(a,i,e,t):s(i.concat([e]),n[e],r[e])})}return s([],e,t),s([],t,e),a},hasChecked:function(){return!BI.isEmpty(this.options.paras.selectedValues)||BI.AsyncTree.superclass.hasChecked.apply(this,arguments)},_getJoinValue:function(){if(!this.nodes)return{};var e=this._getSelectedValues();return BI.isEmpty(e)?BI.deepClone(this.options.paras.selectedValues):BI.isEmpty(this.options.paras.selectedValues)?e:this._join(e,this.options.paras.selectedValues)},getValue:function(){return this._getJoinValue()},stroke:function(e){delete this.options.keyword,this.service.clear(),BI.extend(this.options.paras,e);var t=this._configSetting();this._initTree(t)}}),BI.shortcut("bi.async_tree",BI.AsyncTree)},function(e,t){BI.PartTree=BI.inherit(BI.AsyncTree,{_defaultConfig:function(){return BI.extend(BI.PartTree.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.PartTree.superclass._init.apply(this,arguments)},_loadMore:function(){var n=this,r=this.options,e=BI.extend({},r.paras,{type:BI.TreeView.REQ_TYPE_INIT_DATA,times:++this.times});this.tip.setLoading(),r.itemsCreator(e,function(e){var t=!!e.hasNext,i=e.items||[];r.paras.lastSearchValue=e.lastSearchValue,!0!==n._stop&&(t?n.tip.setLoaded():n.tip.setEnd(),0<i.length&&n.nodes.addNodes(null,n._dealWidthNodes(i)))})},_selectTreeNode:function(e,t){var i=this,n=this.options,r=BI.deepClone(t.parentValues||i._getParentValues(t)),o=this._getNodeValue(t);if(!0===t.checked)this.options.paras.selectedValues=this._getUnionValue(),n.itemsCreator(BI.extend({},n.paras,{type:BI.TreeView.REQ_TYPE_ADJUST_DATA,curSelectedValue:o,parentValues:r}),function(e){i.options.paras.selectedValues=e,BI.AsyncTree.superclass._selectTreeNode.apply(i,arguments)});else{for(var a=this.options.paras.selectedValues,s=r.concat(o),l=0,u=s.length;l<u;l++){if(null==(a=a[s[l]]))return;if(BI.isEmpty(a))break}n.itemsCreator(BI.extend({},n.paras,{type:BI.TreeView.REQ_TYPE_SELECT_DATA,notSelectedValue:o,parentValues:r}),function(e){i.options.paras.selectedValues=e,BI.AsyncTree.superclass._selectTreeNode.apply(i,arguments)})}},_getSelectedValues:function(){var o=this,a={};return function s(e){BI.each(e,function(e,t){var i=t.getCheckStatus();if(!1===i.checked)return!0;var n=t.parentValues||o._getParentValues(t),r=n.concat([o._getNodeValue(t)]);if(o._buildTree(a,r),BI.isNotEmptyArray(t.children))return s(t.children),!0;!0===i.half&&o._getHalfSelectedValues(a,t)})}(this.nodes.getNodes()),a},_initTree:function(r,o){var a=this,s=this.options;this.times=1;var l=this.tree;l.empty(),a.tip.setVisible(!1),this.loading();function e(e){if(!0!==a._stop&&o==s.paras.keyword){var t=!!e.hasNext,i=e.items||[];s.paras.lastSearchValue=e.lastSearchValue,function n(e){if(!0===a._stop)return;a.nodes=BI.$.fn.zTree.init(l.element,r,e)}(0<i.length?a._dealWidthNodes(i):[]),a.setTipVisible(i.length<=0),a.loaded(),t?a.tip.setLoaded():a.tip.invisible(),a.fireEvent(BI.Events.AFTERINIT)}}var t=BI.extend({},s.paras,{type:BI.TreeView.REQ_TYPE_INIT_DATA,times:this.times});BI.delay(function(){s.itemsCreator(t,e)},100)},getValue:function(){return BI.deepClone(this.options.paras.selectedValues||{})},_getUnionValue:function(){if(!this.nodes)return{};var e=this._getSelectedValues();return BI.isEmpty(e)?BI.deepClone(this.options.paras.selectedValues):BI.isEmpty(this.options.paras.selectedValues)?e:this._union(e,this.options.paras.selectedValues)},_union:function(e,t){var o=this,a={};function s(i,n,r){BI.each(n,function(e,t){BI.isNull(r[e])?o._addTreeNode(a,i,e,t):BI.isEmpty(r[e])?o._addTreeNode(a,i,e,{}):s(i.concat([e]),n[e],r[e])})}return s([],e,t),s([],t,e),a},stroke:function(e){var t=this.options;delete t.paras.keyword,BI.extend(t.paras,e),delete t.paras.lastSearchValue;var i=this._configSetting();this._initTree(i,t.paras.keyword)}}),BI.shortcut("bi.part_tree",BI.PartTree)},function(e,t){BI.ListTreeView=BI.inherit(BI.TreeView,{_constants:{SPLIT:"<|>"},_defaultConfig:function(){return BI.extend(BI.ListTreeView.superclass._defaultConfig.apply(this,arguments),{value:{}})},_init:function(){BI.ListTreeView.superclass._init.apply(this,arguments);var e=this.options;BI.isNotNull(e.value)&&this.setSelectedValue(e.value)},_configSetting:function(){this.options.paras;var o=this;return{async:{enable:!1},check:{enable:!0,chkboxType:{Y:"",N:""}},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0,dblClickExpand:!1},callback:{onCheck:function n(e,t,i){o._selectTreeNode(t,i)},onClick:function a(e,t,i){var n=BI.$.fn.zTree.getZTreeObj(t),r=i.checked;o._checkValue(i,!r),n.checkNode(i,!r,!0,!0)}}}},_selectTreeNode:function(e,t){this._checkValue(t,t.checked),BI.ListTreeView.superclass._selectTreeNode.apply(this,arguments)},_transArrayToMap:function(e){var n=this,r={};return BI.each(e,function(e,t){var i=t.join(n._constants.SPLIT);r[i]=!0}),r},_transMapToArray:function(e){var i=this,n=[];return BI.each(e,function(e){var t=e.split(i._constants.SPLIT);n.push(t)}),n},_checkValue:function(e,t){var i=BI.concat(this._getParentValues(e),this._getNodeValue(e)).join(this._constants.SPLIT);t?this.storeValue[i]=!0:delete this.storeValue[i]},setSelectedValue:function(e){this.options.paras.selectedValues=e||[],this.storeValue=this._transArrayToMap(e)},getValue:function(){return this._transMapToArray(this.storeValue)}}),BI.shortcut("bi.list_tree_view",BI.ListTreeView)},function(e,t){BI.ListAsyncTree=BI.inherit(BI.ListTreeView,{_defaultConfig:function(){return BI.extend(BI.ListAsyncTree.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.ListAsyncTree.superclass._init.apply(this,arguments)},_configSetting:function(){var e=this.options.paras,o=this;return{async:{enable:!1,otherParam:BI.cjkEncodeDO(e)},check:{enable:!0,chkboxType:{Y:"",N:""}},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0,dblClickExpand:!1},callback:{onCheck:function n(e,t,i){o._selectTreeNode(t,i)},beforeExpand:function i(e,t){o._beforeExpandNode(e,t)},beforeCheck:function r(e,t){t.half=!1},onClick:function a(e,t,i){var n=BI.$.fn.zTree.getZTreeObj(t),r=i.checked;o._checkValue(i,!r),n.checkNode(i,!r,!0,!0)}}}},_beforeExpandNode:function(e,n){var r=this,o=this.options,t=n.parentValues||r._getParentValues(n),a=BI.extend({},o.paras,{id:n.id,times:1,parentValues:t.concat(this._getNodeValue(n))}),s=function(e){var t=e.items||[];0<t.length&&!function i(e,t){r.nodes.addNodes(n,e),!0===t&&BI.delay(function(){l++,a.times=l,o.itemsCreator(a,s)},100)}(r._dealWidthNodes(t),!!e.hasNext)},l=1;n.children||setTimeout(function(){o.itemsCreator(a,s)},17)},hasChecked:function(){return!BI.isEmpty(this.options.paras.selectedValues)||BI.ListAsyncTree.superclass.hasChecked.apply(this,arguments)},stroke:function(e){delete this.options.keyword,BI.extend(this.options.paras,e);var t=this._configSetting();this._initTree(t)}}),BI.shortcut("bi.list_async_tree",BI.ListAsyncTree)},function(e,t){BI.ListPartTree=BI.inherit(BI.ListAsyncTree,{_defaultConfig:function(){return BI.extend(BI.ListPartTree.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.ListPartTree.superclass._init.apply(this,arguments)},_loadMore:function(){var n=this,r=this.options,e=BI.extend({},r.paras,{type:BI.TreeView.REQ_TYPE_INIT_DATA,times:++this.times});this.tip.setLoading(),r.itemsCreator(e,function(e){var t=!!e.hasNext,i=e.items||[];r.paras.lastSearchValue=e.lastSearchValue,!0!==n._stop&&(t?n.tip.setLoaded():n.tip.setEnd(),0<i.length&&n.nodes.addNodes(null,n._dealWidthNodes(i)))})},_initTree:function(r,o){var a=this,s=this.options;this.times=1;var l=this.tree;l.empty(),a.tip.setVisible(!1),this.loading();function e(e){if(!0!==a._stop&&o==s.paras.keyword){var t=!!e.hasNext,i=e.items||[];s.paras.lastSearchValue=e.lastSearchValue,function n(e){if(!0===a._stop)return;a.nodes=BI.$.fn.zTree.init(l.element,r,e)}(0<i.length?a._dealWidthNodes(i):[]),a.setTipVisible(i.length<=0),a.loaded(),t?a.tip.setLoaded():a.tip.invisible(),a.fireEvent(BI.Events.AFTERINIT)}}var t=BI.extend({},s.paras,{type:BI.TreeView.REQ_TYPE_INIT_DATA,times:this.times});BI.delay(function(){s.itemsCreator(t,e)},100)},stroke:function(e){var t=this.options;delete t.paras.keyword,BI.extend(t.paras,e),delete t.paras.lastSearchValue;var i=this._configSetting();this._initTree(i,t.paras.keyword)}}),BI.shortcut("bi.list_part_tree",BI.ListPartTree)},function(module,exports){!function(document){var F=(yhd=function(e){return this[e]},function(e){var t=e.files||[e];return t.item||(t.item=yhd),t}),yhd,event={add:document.addEventListener?function(e,t,i){return e.addEventListener(t,i,!1),this}:function(e,t,i){return e.attachEvent("on"+t,i),this},del:document.removeEventListener?function(e,t,i){return e.removeEventListener(t,i,!1),this}:function(e,t,i){return e.detachEvent("on"+t,i),this},stop:function(e){return e?(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,e.preventDefault?e.preventDefault():e.returnValue=!1):self.event&&(event.returnValue=!(event.cancelBubble=!0)),!1}},sendFile=function(toString){var multipart=function(e,t,i){return"--".concat(e,CRLF,'Content-Disposition: form-data; name="',t,'"; filename="',_global.encodeURIComponent(i.fileName),'"',CRLF,"Content-Type: application/octet-stream",CRLF,CRLF,i.getAsBinary(),CRLF,"--",e,"--",CRLF)},isFunction=function(e){return"[object Function]"===toString.call(e)},split="onabort.onerror.onloadstart.onprogress".split("."),length=split.length,CRLF="\r\n",xhr=this.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),sendFile;return sendFile=xhr.upload||xhr.sendAsBinary?function(i,e,t,n){if(!(-1<e&&e<i.file.fileSize)){for(var r=new XMLHttpRequest,o=r.upload||{addEventListener:function(e,t){this["on"+e]=t}},a=0;a<length;a++)o.addEventListener(split[a].substring(2),function(t){return function(e){isFunction(i[t])&&i[t](e,r)}}(split[a]),!1);if(o.addEventListener("load",function(e){!1===i.onreadystatechange?isFunction(i.onload)&&i.onload(e,r):setTimeout(function(){4===r.readyState?isFunction(i.onload)&&i.onload(e,r):setTimeout(arguments.callee,15)},15)},!1),r.open("post",i.url+"&filename="+_global.encodeURIComponent(i.file.fileName),!0),r.upload)r.onreadystatechange=function(){switch(r.readyState){case 4:var e=BI.jsonDecode(r.responseText);-1!=i.file.type.indexOf("image")&&(e.attach_type="image"),e.filename=i.file.fileName,1==i.maxlength?i.attach_array[0]=e:i.attach_array.push(e)}},isFunction(o.onloadstart)&&o.onloadstart();else{var s={loaded:0,total:i.file.fileSize||i.file.size,simulation:!0};s.interval=setInterval(function(){s.loaded+=256,s.total<=s.loaded&&(s.loaded=s.total),o.onprogress(s)},100),r.onabort=function(){o.onabort({})},r.onerror=function(){o.onerror({})},r.onreadystatechange=function(){switch(r.readyState){case 2:case 3:s.total<=s.loaded&&(s.loaded=s.total),o.onprogress(s);break;case 4:if(clearInterval(s.interval),s.interval=0,s.loaded=s.total,o.onprogress(s),199<r.status&&r.status<400){o.onload({});var e=BI.jsonDecode(r.responseText);e.filename=i.file.fileName,-1!=i.file.type.indexOf("image")&&(e.attach_type="image"),i.attach_array.push(e)}else o.onerror({})}},o.onloadstart(s)}var l="AjaxUploadBoundary"+(new Date).getTime();if(r.setRequestHeader("Content-Type","multipart/form-data; boundary="+l),i.file.getAsBinary)r[r.sendAsBinary?"sendAsBinary":"send"](multipart(l,i.name,i.file));else{r.setRequestHeader("Content-Type","multipart/form-data");var u=new FormData;u.append("FileData",i.file),r.send(u)}return i}isFunction(i.onerror)&&i.onerror()}:function(handler,maxSize,width,height){var url=handler.url.concat(-1===handler.url.indexOf("?")?"?":"&","AjaxUploadFrame=true"),rpe={loaded:1,total:100,simulation:!0,interval:setInterval(function(){rpe.loaded<rpe.total&&++rpe.loaded,isFunction(handler.onprogress)&&handler.onprogress(rpe,{})},100)},onload=function(){iframe.onreadystatechange=iframe.onload=iframe.onerror=null,form.parentNode.removeChild(form),form=null,clearInterval(rpe.interval);try{var e=(iframe.contentWindow.document||iframe.contentWindow.contentDocument).body.innerHTML,t=BI.jsonDecode(e);-1!=handler.file.type.indexOf("image")&&(t.attach_type="image");try{t.filename=_global.decodeURIComponent(handler.file.fileName)}catch(i){t.filename=handler.file.fileName}1==handler.maxlength?handler.attach_array[0]=t:handler.attach_array.push(t)}catch(i){isFunction(handler.onerror)&&handler.onerror(rpe,event||_global.event)}isFunction(handler.onload)&&handler.onload(rpe,{responseText:e})},target=["AjaxUpload",(new Date).getTime(),String(Math.random()).substring(2)].join("_");try{var form=document.createElement('<form enctype="multipart/form-data"></form>'),iframe=handler.iframe||(handler.iframe=document.createElement('<iframe id="'+target+'" name="'+target+'" src="'+url+'"></iframe>'))}catch(e){var form=document.createElement("form"),iframe=handler.iframe||(handler.iframe=document.createElement("iframe"));form.setAttribute("enctype","multipart/form-data"),iframe.setAttribute("name",iframe.id=target),iframe.setAttribute("src",url)}with(iframe.style.position="absolute",iframe.style.left=iframe.style.top="-10000px",iframe.onload=onload,iframe.onerror=function(e){isFunction(handler.onerror)&&handler.onerror(rpe,e||_global.event)},iframe.onreadystatechange=function(){/loaded|complete/i.test(iframe.readyState)?onload():isFunction(handler.onloadprogress)&&(rpe.loaded<rpe.total&&++rpe.loaded,handler.onloadprogress(rpe,{readyState:{loading:2,interactive:3,loaded:4,complete:4}[iframe.readyState]||1}))},form.setAttribute("action",handler.url+"&filename="+_global.encodeURIComponent(handler.file.fileName)),form.setAttribute("target",iframe.id),form.setAttribute("method","post"),form.appendChild(handler.file),form.style.display="none",isFunction(handler.onloadstart)&&handler.onloadstart(rpe,{}),document.body||document.documentElement)appendChild(iframe),appendChild(form),form.submit();return handler},xhr=null,sendFile}(Object.prototype.toString),sendFiles=function(n,r,o,a){var s=n.files.length,l=n.onload,u=n.onloadstart;for(n.current=0,n.total=0,n.sent=0;n.current<s;)n.total+=n.files[n.current].fileSize||n.files[n.current].size,n.current++;return n.current=0,s&&-1!==n.files[0].fileSize?(n.file=n.files[n.current],sendFile(n,r,o,a).onload=function(e,t){n.onloadstart=null,n.sent+=n.files[n.current].fileSize||n.files[n.current].size,++n.current<s?(n.file=n.files[n.current],sendFile(n,r,o,a).onload=arguments.callee):l&&(n.onloadstart=u,n.onload=l,n.onload(e,t))}):s&&(n.total=100*s,n.file=n.files[n.current],sendFile(n,r,o,a).onload=function(e,t){var i=arguments.callee;n.onloadstart=null,n.sent+=100,++n.current<s?(/\b(chrome|safari)\b/i.test(navigator.userAgent)&&(n.iframe.parentNode.removeChild(n.iframe),n.iframe=null),setTimeout(function(){n.file=n.files[n.current],sendFile(n,r,o,a).onload=i},15)):l&&setTimeout(function(){n.iframe.parentNode.removeChild(n.iframe),n.iframe=null,n.onloadstart=u,n.onload=l,n.onload(e,t)},15)}),n};BI.File=BI.inherit(BI.Widget,{_defaultConfig:function(){var e=BI.File.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-file display-block",tagName:"input",attributes:{type:"file"},name:"",url:"",multiple:!0,accept:"",maxSize:-1})},_init:function(){var e=this.options;BI.File.superclass._init.apply(this,arguments),!0===e.multiple&&this.element.attr("multiple","multiple"),this.element.attr("name",e.name||this.getName()),this.element.attr("title",e.title||"")},created:function(){var n=this,e=this.options,r=this.wrap=this._wrap(this.element[0],e.maxSize);r.onloadstart=function(e,t){n.fireEvent(BI.File.EVENT_UPLOADSTART,arguments)},r.onprogress=function(e,t){-1!==this.file.fileSize&&e.simulation,n.fireEvent(BI.File.EVENT_PROGRESS,{file:this.file,total:e.total,loaded:e.loaded,simulation:e.simulation})},r.onerror=function(){n.fireEvent(BI.File.EVENT_ERROR)},r.onload=function(e,t){var i=this;setTimeout(function(){if(i.clean(),i.hide(),t.status<200||399<t.status)return BI.Msg.toast(BI.i18nText("BI-Upload_File_Error"),{level:"error"}),void n.fireEvent(BI.File.EVENT_ERROR);BI.some(r.attach_array,function(e,t){if(t.errorCode)return BI.Msg.toast(t.errorMsg,{level:"error"}),n.fireEvent(BI.File.EVENT_ERROR,t),!0})||n.fireEvent(BI.File.EVENT_UPLOADED)},1e3)},r.url=e.url,r.fileType=e.accept,r.attach_array=[],r.attach_names=[],r.attachNum=0},_events:function(l){var u=this;return event.add(l.dom.input,"change",function(){event.del(l.dom.input,"change",arguments.callee);for(var e=l.dom.input.cloneNode(!0),t=0,i=F(l.dom.input);t<i.length;t++){var n=i.item(t),r=n.value||n.name,o=n.fileName||(n.fileName=r.split("\\").pop()),a=-1!==o.indexOf(".")?o.split(".").pop().toLowerCase():"unknown",s=n.fileSize||n.size;l.fileType&&-1===l.fileType.indexOf("*."+a)?(BI.Msg.toast(BI.i18nText("BI-Upload_File_Type_Error"),{level:"error"}),u.fireEvent(BI.File.EVENT_ERROR,{errorType:0,file:n})):-1!==l.maxSize&&s&&l.maxSize<s?(BI.Msg.toast(BI.i18nText("BI-Upload_File_Size_Error"),{level:"error"}),u.fireEvent(BI.File.EVENT_ERROR,{errorType:1,file:n})):l.files.unshift(n)}0<l.files.length&&u.fireEvent(BI.File.EVENT_CHANGE,{files:l.files}),e.value="",l.dom.input.parentNode.replaceChild(e,l.dom.input),l.dom.input=e,event.add(l.dom.input,"change",arguments.callee)}),l},_wrap:function(){var e=this.options,t=this.element[0];return!0===e.multiple&&this.element.attr("multiple","multiple"),t.value="",this._events({dom:{input:t,disabled:!1},name:t.name,maxSize:e.maxSize?e.maxSize>>0:-1,files:[],clean:function(){this.files=[]},upload:function(e){if(e)for(var t in e)this[t]=e[t];return sendFiles(this,this.maxSize),this},hide:function(){this.dom.disabled&&(this.dom.disabled=!1,this.dom.input.removeAttribute("disabled"))},show:function(e,t,i,n){this.dom.disabled||(this.dom.disabled=!0,this.dom.input.setAttribute("disabled","disabled"))}})},select:function(){this.wrap&&BI.Widget._renderEngine.createElement(this.wrap.dom.input).click()},upload:function(e){this.wrap&&this.wrap.upload(e)},getValue:function(){return this.wrap?this.wrap.attach_array:[]},reset:function(){this.wrap&&(this.wrap.attach_array=[],this.wrap.attach_names=[],this.wrap.attachNum=0)},_setEnable:function(e){BI.File.superclass._setEnable.apply(this,arguments),!0===e?this.element.attr("disabled","disabled"):this.element.removeAttr("disabled")}}),BI.File.EVENT_CHANGE="EVENT_CHANGE",BI.File.EVENT_UPLOADSTART="EVENT_UPLOADSTART",BI.File.EVENT_ERROR="EVENT_ERROR",BI.File.EVENT_PROGRESS="EVENT_PROGRESS",BI.File.EVENT_UPLOADED="EVENT_UPLOADED",BI.shortcut("bi.file",BI.File)}(_global.document||{})},function(module,exports){!function($){var settings={},roots={},caches={},_consts={className:{BUTTON:"button",LEVEL:"level",ICO_LOADING:"ico_loading",SWITCH:"switch"},event:{NODECREATED:"ztree_nodeCreated",CLICK:"ztree_click",EXPAND:"ztree_expand",COLLAPSE:"ztree_collapse",ASYNC_SUCCESS:"ztree_async_success",ASYNC_ERROR:"ztree_async_error",REMOVE:"ztree_remove",SELECTED:"ztree_selected",UNSELECTED:"ztree_unselected"},id:{A:"_a",ICON:"_ico",SPAN:"_span",SWITCH:"_switch",UL:"_ul"},line:{ROOT:"root",ROOTS:"roots",CENTER:"center",BOTTOM:"bottom",NOLINE:"noline",LINE:"line"},folder:{OPEN:"open",CLOSE:"close",DOCU:"docu"},node:{CURSELECTED:"curSelectedNode"}},_setting={treeId:"",treeObj:null,view:{addDiyDom:null,autoCancelSelected:!0,dblClickExpand:!0,expandSpeed:"fast",fontCss:{},nameIsHTML:!1,selectedMulti:!0,showIcon:!0,showLine:!0,showTitle:!0,txtSelectedEnable:!1},data:{key:{children:"children",name:"name",title:"",url:"url"},simpleData:{enable:!1,idKey:"id",pIdKey:"pId",rootPId:null},keep:{parent:!1,leaf:!1}},async:{enable:!1,contentType:"application/x-www-form-urlencoded",type:"post",dataType:"text",url:"",autoParam:[],otherParam:[],dataFilter:null},callback:{beforeAsync:null,beforeClick:null,beforeDblClick:null,beforeRightClick:null,beforeMouseDown:null,beforeMouseUp:null,beforeExpand:null,beforeCollapse:null,beforeRemove:null,onAsyncError:null,onAsyncSuccess:null,onNodeCreated:null,onClick:null,onDblClick:null,onRightClick:null,onMouseDown:null,onMouseUp:null,onExpand:null,onCollapse:null,onRemove:null}},_initRoot=function(e){var t=data.getRoot(e);t||(t={},data.setRoot(e,t)),t[e.data.key.children]=[],t.expandTriggerFlag=!1,t.curSelectedList=[],t.noSelection=!0,t.createdNodes=[],t.zId=0,t._ver=(new Date).getTime()},_initCache=function(e){var t=data.getCache(e);t||(t={},data.setCache(e,t)),t.nodes=[],t.doms=[]},_bindEvent=function(a){var e=a.treeObj,t=consts.event;e.bind(t.NODECREATED,function(e,t,i){tools.apply(a.callback.onNodeCreated,[e,t,i])}),e.bind(t.CLICK,function(e,t,i,n,r){tools.apply(a.callback.onClick,[t,i,n,r])}),e.bind(t.EXPAND,function(e,t,i){tools.apply(a.callback.onExpand,[e,t,i])}),e.bind(t.COLLAPSE,function(e,t,i){tools.apply(a.callback.onCollapse,[e,t,i])}),e.bind(t.ASYNC_SUCCESS,function(e,t,i,n){tools.apply(a.callback.onAsyncSuccess,[e,t,i,n])}),e.bind(t.ASYNC_ERROR,function(e,t,i,n,r,o){tools.apply(a.callback.onAsyncError,[e,t,i,n,r,o])}),e.bind(t.REMOVE,function(e,t,i){tools.apply(a.callback.onRemove,[e,t,i])}),e.bind(t.SELECTED,function(e,t,i,n){tools.apply(a.callback.onSelected,[t,i,n])}),e.bind(t.UNSELECTED,function(e,t,i,n){tools.apply(a.callback.onUnSelected,[t,i,n])})},_unbindEvent=function(e){var t=e.treeObj,i=consts.event;t.unbind(i.NODECREATED).unbind(i.CLICK).unbind(i.EXPAND).unbind(i.COLLAPSE).unbind(i.ASYNC_SUCCESS).unbind(i.ASYNC_ERROR).unbind(i.REMOVE).unbind(i.SELECTED).unbind(i.UNSELECTED)},_eventProxy=function(e){var t=e.target,i=data.getSetting(e.data.treeId),n="",r=null,o="",a="",s=null,l=null,u=null;if(tools.eqs(e.type,"mousedown")?a="mousedown":tools.eqs(e.type,"mouseup")?a="mouseup":tools.eqs(e.type,"contextmenu")?a="contextmenu":tools.eqs(e.type,"click")?tools.eqs(t.tagName,"span")&&null!==t.getAttribute("treeNode"+consts.id.SWITCH)?(n=tools.getNodeMainDom(t).id,o="switchNode"):(u=tools.getMDom(i,t,[{tagName:"a",attrName:"treeNode"+consts.id.A}]))&&(n=tools.getNodeMainDom(u).id,o="clickNode"):tools.eqs(e.type,"dblclick")&&(a="dblclick",(u=tools.getMDom(i,t,[{tagName:"a",attrName:"treeNode"+consts.id.A}]))&&(n=tools.getNodeMainDom(u).id,o="switchNode")),0<a.length&&0==n.length&&(u=tools.getMDom(i,t,[{tagName:"a",attrName:"treeNode"+consts.id.A}]))&&(n=tools.getNodeMainDom(u).id),0<n.length)switch(r=data.getNodeCache(i,n),o){case"switchNode":r.isParent&&(tools.eqs(e.type,"click")||tools.eqs(e.type,"dblclick")&&tools.apply(i.view.dblClickExpand,[i.treeId,r],i.view.dblClickExpand))?s=handler.onSwitchNode:o="";break;case"clickNode":s=handler.onClickNode}switch(a){case"mousedown":l=handler.onZTreeMousedown;break;case"mouseup":l=handler.onZTreeMouseup;break;case"dblclick":l=handler.onZTreeDblclick;break;case"contextmenu":l=handler.onZTreeContextmenu}return{stop:!1,node:r,nodeEventType:o,nodeEventCallback:s,treeEventType:a,treeEventCallback:l}},_initNode=function(e,t,i,n,r,o,a){if(i){var s=data.getRoot(e),l=e.data.key.children;i.level=t,i.tId=e.treeId+"_"+ ++s.zId,i.parentTId=n?n.tId:null,i.open="string"==typeof i.open?tools.eqs(i.open,"true"):!!i.open,i[l]&&0<i[l].length?(i.isParent=!0,i.zAsync=!0):(i.isParent="string"==typeof i.isParent?tools.eqs(i.isParent,"true"):!!i.isParent,i.open=!(!i.isParent||e.async.enable)&&i.open,i.zAsync=!i.isParent),i.isFirstNode=r,i.isLastNode=o,i.getParentNode=function(){return data.getNodeCache(e,i.parentTId)},i.getPreNode=function(){return data.getPreNode(e,i)},i.getNextNode=function(){return data.getNextNode(e,i)},i.isAjaxing=!1,data.fixPIdKeyValue(e,i)}},_init={bind:[_bindEvent],unbind:[_unbindEvent],caches:[_initCache],nodes:[_initNode],proxys:[_eventProxy],roots:[_initRoot],beforeA:[],afterA:[],innerBeforeA:[],innerAfterA:[],zTreeTools:[]},data={addNodeCache:function(e,t){data.getCache(e).nodes[data.getNodeCacheId(t.tId)]=t},getNodeCacheId:function(e){return e.substring(e.lastIndexOf("_")+1)},addAfterA:function(e){_init.afterA.push(e)},addBeforeA:function(e){_init.beforeA.push(e)},addInnerAfterA:function(e){_init.innerAfterA.push(e)},addInnerBeforeA:function(e){_init.innerBeforeA.push(e)},addInitBind:function(e){_init.bind.push(e)},addInitUnBind:function(e){_init.unbind.push(e)},addInitCache:function(e){_init.caches.push(e)},addInitNode:function(e){_init.nodes.push(e)},addInitProxy:function(e,t){t?_init.proxys.splice(0,0,e):_init.proxys.push(e)},addInitRoot:function(e){_init.roots.push(e)},addNodesData:function(e,t,i){var n=e.data.key.children;t[n]||(t[n]=[]),0<t[n].length&&(t[n][t[n].length-1].isLastNode=!1,view.setNodeLineIcos(e,t[n][t[n].length-1])),t.isParent=!0,t[n]=t[n].concat(i)},addSelectedNode:function(e,t){var i=data.getRoot(e);data.isSelectedNode(e,t)||i.curSelectedList.push(t)},addCreatedNode:function(e,t){(e.callback.onNodeCreated||e.view.addDiyDom)&&data.getRoot(e).createdNodes.push(t)},addZTreeTools:function(e){_init.zTreeTools.push(e)},exSetting:function(e){$.extend(!0,_setting,e)},fixPIdKeyValue:function(e,t){e.data.simpleData.enable&&(t[e.data.simpleData.pIdKey]=t.parentTId?t.getParentNode()[e.data.simpleData.idKey]:e.data.simpleData.rootPId)},getAfterA:function(e,t,i){for(var n=0,r=_init.afterA.length;n<r;n++)_init.afterA[n].apply(this,arguments)},getBeforeA:function(e,t,i){for(var n=0,r=_init.beforeA.length;n<r;n++)_init.beforeA[n].apply(this,arguments)},getInnerAfterA:function(e,t,i){for(var n=0,r=_init.innerAfterA.length;n<r;n++)_init.innerAfterA[n].apply(this,arguments)},getInnerBeforeA:function(e,t,i){for(var n=0,r=_init.innerBeforeA.length;n<r;n++)_init.innerBeforeA[n].apply(this,arguments)},getCache:function(e){return caches[e.treeId]},getNextNode:function(e,t){if(!t)return null;for(var i=e.data.key.children,n=t.parentTId?t.getParentNode():data.getRoot(e),r=0,o=n[i].length-1;r<=o;r++)if(n[i][r]===t)return r==o?null:n[i][r+1];return null},getNodeByParam:function(e,t,i,n){if(!t||!i)return null;for(var r=e.data.key.children,o=0,a=t.length;o<a;o++){if(t[o][i]==n)return t[o];var s=data.getNodeByParam(e,t[o][r],i,n);if(s)return s}return null},getNodeCache:function(e,t){if(!t)return null;var i=caches[e.treeId].nodes[data.getNodeCacheId(t)];return i||null},getNodeName:function(e,t){return""+t[e.data.key.name]},getNodeTitle:function(e,t){return""+t[""===e.data.key.title?e.data.key.name:e.data.key.title]},getNodes:function(e){return data.getRoot(e)[e.data.key.children]},getNodesByParam:function(e,t,i,n){if(!t||!i)return[];for(var r=e.data.key.children,o=[],a=0,s=t.length;a<s;a++)t[a][i]==n&&o.push(t[a]),o=o.concat(data.getNodesByParam(e,t[a][r],i,n));return o},getNodesByParamFuzzy:function(e,t,i,n){if(!t||!i)return[];var r=e.data.key.children,o=[];n=n.toLowerCase();for(var a=0,s=t.length;a<s;a++)"string"==typeof t[a][i]&&-1<t[a][i].toLowerCase().indexOf(n)&&o.push(t[a]),o=o.concat(data.getNodesByParamFuzzy(e,t[a][r],i,n));return o},getNodesByFilter:function(e,t,i,n,r){if(!t)return n?null:[];for(var o=e.data.key.children,a=n?null:[],s=0,l=t.length;s<l;s++){if(tools.apply(i,[t[s],r],!1)){if(n)return t[s];a.push(t[s])}var u=data.getNodesByFilter(e,t[s][o],i,n,r);if(n&&u)return u;a=n?u:a.concat(u)}return a},getPreNode:function(e,t){if(!t)return null;for(var i=e.data.key.children,n=t.parentTId?t.getParentNode():data.getRoot(e),r=0,o=n[i].length;r<o;r++)if(n[i][r]===t)return 0==r?null:n[i][r-1];return null},getRoot:function(e){return e?roots[e.treeId]:null},getRoots:function(){return roots},getSetting:function(e){return settings[e]},getSettings:function(){return settings},getZTreeTools:function(e){var t=this.getRoot(this.getSetting(e));return t?t.treeTools:null},initCache:function(e){for(var t=0,i=_init.caches.length;t<i;t++)_init.caches[t].apply(this,arguments)},initNode:function(e,t,i,n,r,o){for(var a=0,s=_init.nodes.length;a<s;a++)_init.nodes[a].apply(this,arguments)},initRoot:function(e){for(var t=0,i=_init.roots.length;t<i;t++)_init.roots[t].apply(this,arguments)},isSelectedNode:function(e,t){for(var i=data.getRoot(e),n=0,r=i.curSelectedList.length;n<r;n++)if(t===i.curSelectedList[n])return!0;return!1},removeNodeCache:function(e,t){var i=e.data.key.children;if(t[i])for(var n=0,r=t[i].length;n<r;n++)arguments.callee(e,t[i][n]);data.getCache(e).nodes[data.getNodeCacheId(t.tId)]=null},removeSelectedNode:function(e,t){for(var i=data.getRoot(e),n=0,r=i.curSelectedList.length;n<r;n++)t!==i.curSelectedList[n]&&data.getNodeCache(e,i.curSelectedList[n].tId)||(i.curSelectedList.splice(n,1),n--,r--)},setCache:function(e,t){caches[e.treeId]=t},setRoot:function(e,t){roots[e.treeId]=t},setZTreeTools:function(e,t){for(var i=0,n=_init.zTreeTools.length;i<n;i++)_init.zTreeTools[i].apply(this,arguments)},transformToArrayFormat:function(e,t){if(!t)return[];var i=e.data.key.children,n=[];if(tools.isArray(t))for(var r=0,o=t.length;r<o;r++)n.push(t[r]),t[r][i]&&(n=n.concat(data.transformToArrayFormat(e,t[r][i])));else n.push(t),t[i]&&(n=n.concat(data.transformToArrayFormat(e,t[i])));return n},transformTozTreeFormat:function(e,t){var i,n,r=e.data.simpleData.idKey,o=e.data.simpleData.pIdKey,a=e.data.key.children;if(!r||""==r||!t)return[];if(tools.isArray(t)){var s=[],l={};for(i=0,n=t.length;i<n;i++)l[t[i][r]]=t[i];for(i=0,n=t.length;i<n;i++)l[t[i][o]]&&t[i][r]!=t[i][o]?(l[t[i][o]][a]||(l[t[i][o]][a]=[]),l[t[i][o]][a].push(t[i])):s.push(t[i]);return s}return[t]}},event={bindEvent:function(e){for(var t=0,i=_init.bind.length;t<i;t++)_init.bind[t].apply(this,arguments)},unbindEvent:function(e){for(var t=0,i=_init.unbind.length;t<i;t++)_init.unbind[t].apply(this,arguments)},bindTree:function(e){var t={treeId:e.treeId},i=e.treeObj;e.view.txtSelectedEnable||i.bind("selectstart",function(e){var t=e.originalEvent.srcElement.nodeName.toLowerCase();return"input"===t||"textarea"===t}).css({"-moz-user-select":"-moz-none"}),i.bind("click",t,event.proxy),i.bind("dblclick",t,event.proxy),i.bind("mouseover",t,event.proxy),i.bind("mouseout",t,event.proxy),i.bind("mousedown",t,event.proxy),i.bind("mouseup",t,event.proxy),i.bind("contextmenu",t,event.proxy)},unbindTree:function(e){e.treeObj.unbind("click",event.proxy).unbind("dblclick",event.proxy).unbind("mouseover",event.proxy).unbind("mouseout",event.proxy).unbind("mousedown",event.proxy).unbind("mouseup",event.proxy).unbind("contextmenu",event.proxy)},doProxy:function(e){for(var t=[],i=0,n=_init.proxys.length;i<n;i++){var r=_init.proxys[i].apply(this,arguments);if(t.push(r),r.stop)break}return t},proxy:function(e){var t=data.getSetting(e.data.treeId);if(!tools.uCanDo(t,e))return!0;for(var i=event.doProxy(e),n=!0,r=0,o=i.length;r<o;r++){var a=i[r];a.nodeEventCallback&&(!0,n=a.nodeEventCallback.apply(a,[e,a.node])&&n),a.treeEventCallback&&(!0,n=a.treeEventCallback.apply(a,[e,a.node])&&n)}return n}},handler={onSwitchNode:function(e,t){var i=data.getSetting(e.data.treeId);if(t.open){if(0==tools.apply(i.callback.beforeCollapse,[i.treeId,t],!0))return!0;data.getRoot(i).expandTriggerFlag=!0,view.switchNode(i,t)}else{if(0==tools.apply(i.callback.beforeExpand,[i.treeId,t],!0))return!0;data.getRoot(i).expandTriggerFlag=!0,view.switchNode(i,t)}return!0},onClickNode:function(e,t){var i=data.getSetting(e.data.treeId),n=i.view.autoCancelSelected&&(e.ctrlKey||e.metaKey)&&data.isSelectedNode(i,t)?0:i.view.autoCancelSelected&&(e.ctrlKey||e.metaKey)&&i.view.selectedMulti?2:1;return 0==tools.apply(i.callback.beforeClick,[i.treeId,t,n],!0)||(0==n?view.cancelPreSelectedNode(i,t):view.selectNode(i,t,2==n),i.treeObj.trigger(consts.event.CLICK,[e,i.treeId,t,n])),!0},onZTreeMousedown:function(e,t){var i=data.getSetting(e.data.treeId);return tools.apply(i.callback.beforeMouseDown,[i.treeId,t],!0)&&tools.apply(i.callback.onMouseDown,[e,i.treeId,t]),!0},onZTreeMouseup:function(e,t){var i=data.getSetting(e.data.treeId);return tools.apply(i.callback.beforeMouseUp,[i.treeId,t],!0)&&tools.apply(i.callback.onMouseUp,[e,i.treeId,t]),!0},onZTreeDblclick:function(e,t){var i=data.getSetting(e.data.treeId);return tools.apply(i.callback.beforeDblClick,[i.treeId,t],!0)&&tools.apply(i.callback.onDblClick,[e,i.treeId,t]),!0},onZTreeContextmenu:function(e,t){var i=data.getSetting(e.data.treeId);return tools.apply(i.callback.beforeRightClick,[i.treeId,t],!0)&&tools.apply(i.callback.onRightClick,[e,i.treeId,t]),"function"!=typeof i.callback.onRightClick}},tools={apply:function(e,t,i){return"function"==typeof e?e.apply(zt,t||[]):i},canAsync:function(e,t){var i=e.data.key.children;return e.async.enable&&t&&t.isParent&&!(t.zAsync||t[i]&&0<t[i].length)},clone:function(e){if(null===e)return null;var t=tools.isArray(e)?[]:{};for(var i in e)t[i]=e[i]instanceof Date?new Date(e[i].getTime()):"object"==typeof e[i]?arguments.callee(e[i]):e[i];return t},eqs:function(e,t){return e.toLowerCase()===t.toLowerCase()},isArray:function(e){return"[object Array]"===Object.prototype.toString.apply(e)},$:function(e,t,i){return t&&"string"!=typeof t&&(i=t,t=""),"string"==typeof e?$(e,i?i.treeObj.get(0).ownerDocument:null):$("#"+e.tId+t,i?i.treeObj:null)},getMDom:function(e,t,i){if(!t)return null;for(;t&&t.id!==e.treeId;){for(var n=0,r=i.length;t.tagName&&n<r;n++)if(tools.eqs(t.tagName,i[n].tagName)&&null!==t.getAttribute(i[n].attrName))return t;t=t.parentNode}return null},getNodeMainDom:function(e){return $(e).parent("li").get(0)||$(e).parentsUntil("li").parent().get(0)},isChildOrSelf:function(e,t){return 0<$(e).closest("#"+t).length},uCanDo:function(e,t){return!0}},view={addNodes:function(e,t,i,n){if(!e.data.keep.leaf||!t||t.isParent)if(tools.isArray(i)||(i=[i]),e.data.simpleData.enable&&(i=data.transformTozTreeFormat(e,i)),t){var r=$$(t,consts.id.SWITCH,e),o=$$(t,consts.id.ICON,e),a=$$(t,consts.id.UL,e);t.open||(view.replaceSwitchClass(t,r,consts.folder.CLOSE),view.replaceIcoClass(t,o,consts.folder.CLOSE),t.open=!1,a.css({display:"none"})),data.addNodesData(e,t,i),view.createNodes(e,t.level+1,i,t),n||view.expandCollapseParentNode(e,t,!0)}else data.addNodesData(e,data.getRoot(e),i),view.createNodes(e,0,i,null)},appendNodes:function(e,t,i,n,r,o){if(!i)return[];for(var a=[],s=e.data.key.children,l=0,u=i.length;l<u;l++){var c=i[l];if(r){var h=(n||data.getRoot(e))[s].length==i.length&&0==l,p=l==i.length-1;data.initNode(e,t,c,n,h,p,o),data.addNodeCache(e,c)}var d=[];c[s]&&0<c[s].length&&(d=view.appendNodes(e,t+1,c[s],c,r,o&&c.open)),o&&(view.makeDOMNodeMainBefore(a,e,c),view.makeDOMNodeLine(a,e,c),data.getBeforeA(e,c,a),view.makeDOMNodeNameBefore(a,e,c),data.getInnerBeforeA(e,c,a),view.makeDOMNodeIcon(a,e,c),data.getInnerAfterA(e,c,a),view.makeDOMNodeNameAfter(a,e,c),data.getAfterA(e,c,a),c.isParent&&c.open&&view.makeUlHtml(e,c,a,d.join("")),view.makeDOMNodeMainAfter(a,e,c),data.addCreatedNode(e,c))}return a},appendParentULDom:function(e,t){var i=[],n=$$(t,e);!n.get(0)&&t.parentTId&&(view.appendParentULDom(e,t.getParentNode()),n=$$(t,e));var r=$$(t,consts.id.UL,e);r.get(0)&&r.remove();var o=e.data.key.children,a=view.appendNodes(e,t.level+1,t[o],t,!1,!0);view.makeUlHtml(e,t,i,a.join("")),n.append(i.join(""))},asyncNode:function(setting,node,isSilent,callback){var i,l;if(node&&!node.isParent)return tools.apply(callback),!1;if(node&&node.isAjaxing)return!1;if(0==tools.apply(setting.callback.beforeAsync,[setting.treeId,node],!0))return tools.apply(callback),!1;if(node){node.isAjaxing=!0;var icoObj=$$(node,consts.id.ICON,setting);icoObj.attr({style:"","class":consts.className.BUTTON+" "+consts.className.ICO_LOADING})}var tmpParam={};for(i=0,l=setting.async.autoParam.length;node&&i<l;i++){var pKey=setting.async.autoParam[i].split("="),spKey=pKey;1<pKey.length&&(spKey=pKey[1],pKey=pKey[0]),tmpParam[spKey]=node[pKey]}if(tools.isArray(setting.async.otherParam))for(i=0,l=setting.async.otherParam.length;i<l;i+=2)tmpParam[setting.async.otherParam[i]]=setting.async.otherParam[i+1];else for(var p in setting.async.otherParam)tmpParam[p]=setting.async.otherParam[p];var _tmpV=data.getRoot(setting)._ver;return $.ajax({contentType:setting.async.contentType,cache:!1,type:setting.async.type,url:tools.apply(setting.async.url,[setting.treeId,node],setting.async.url),data:tmpParam,dataType:setting.async.dataType,success:function(msg){if(_tmpV==data.getRoot(setting)._ver){var newNodes=[];try{newNodes=msg&&0!=msg.length?"string"==typeof msg?eval("("+msg+")"):msg:[]}catch(err){newNodes=msg}node&&(node.isAjaxing=null,node.zAsync=!0),view.setNodeLineIcos(setting,node),newNodes&&""!==newNodes?(newNodes=tools.apply(setting.async.dataFilter,[setting.treeId,node,newNodes],newNodes),view.addNodes(setting,node,newNodes?tools.clone(newNodes):[],!!isSilent)):view.addNodes(setting,node,[],!!isSilent),setting.treeObj.trigger(consts.event.ASYNC_SUCCESS,[setting.treeId,node,msg]),tools.apply(callback)}},error:function(e,t,i){_tmpV==data.getRoot(setting)._ver&&(node&&(node.isAjaxing=null),view.setNodeLineIcos(setting,node),setting.treeObj.trigger(consts.event.ASYNC_ERROR,[setting.treeId,node,e,t,i]))}}),!0},cancelPreSelectedNode:function(e,t,i){var n,r,o=data.getRoot(e).curSelectedList;for(n=o.length-1;0<=n;n--)if(t===(r=o[n])||!t&&(!i||i!==r)){if($$(r,consts.id.A,e).removeClass(consts.node.CURSELECTED),t){data.removeSelectedNode(e,t),e.treeObj.trigger(consts.event.UNSELECTED,[event,e.treeId,r]);break}o.splice(n,1),e.treeObj.trigger(consts.event.UNSELECTED,[event,e.treeId,r])}},createNodeCallback:function(e){if(e.callback.onNodeCreated||e.view.addDiyDom)for(var t=data.getRoot(e);0<t.createdNodes.length;){var i=t.createdNodes.shift();tools.apply(e.view.addDiyDom,[e.treeId,i]),e.callback.onNodeCreated&&e.treeObj.trigger(consts.event.NODECREATED,[e.treeId,i])}},createNodes:function(e,t,i,n){if(i&&0!=i.length){var r=data.getRoot(e),o=e.data.key.children,a=!n||n.open||!!$$(n[o][0],e).get(0);r.createdNodes=[];var s=view.appendNodes(e,t,i,n,!0,a);if(n){var l=$$(n,consts.id.UL,e);l.get(0)&&l.append(s.join(""))}else e.treeObj.append(s.join(""));view.createNodeCallback(e)}},destroy:function(e){e&&(data.initCache(e),data.initRoot(e),event.unbindTree(e),event.unbindEvent(e),e.treeObj.empty(),delete settings[e.treeId])},expandCollapseNode:function(e,t,i,n,r){var o=data.getRoot(e),a=e.data.key.children;if(t){if(o.expandTriggerFlag){var s=r;r=function(){s&&s(),t.open?e.treeObj.trigger(consts.event.EXPAND,[e.treeId,t]):e.treeObj.trigger(consts.event.COLLAPSE,[e.treeId,t])},o.expandTriggerFlag=!1}if(!t.open&&t.isParent&&(!$$(t,consts.id.UL,e).get(0)||t[a]&&0<t[a].length&&!$$(t[a][0],e).get(0))&&(view.appendParentULDom(e,t),view.createNodeCallback(e)),t.open!=i){var l=$$(t,consts.id.UL,e),u=$$(t,consts.id.SWITCH,e),c=$$(t,consts.id.ICON,e);t.isParent?(t.open=!t.open,t.iconOpen&&t.iconClose&&c.attr("style",view.makeNodeIcoStyle(e,t)),t.open?(view.replaceSwitchClass(t,u,consts.folder.OPEN),view.replaceIcoClass(t,c,consts.folder.OPEN),0==n||""==e.view.expandSpeed?(l.show(),tools.apply(r,[])):t[a]&&0<t[a].length?l.slideDown(e.view.expandSpeed,r):(l.show(),tools.apply(r,[]))):(view.replaceSwitchClass(t,u,consts.folder.CLOSE),view.replaceIcoClass(t,c,consts.folder.CLOSE),0!=n&&""!=e.view.expandSpeed&&t[a]&&0<t[a].length?l.slideUp(e.view.expandSpeed,r):(l.hide(),tools.apply(r,[])))):tools.apply(r,[])}else tools.apply(r,[])}else tools.apply(r,[])},expandCollapseParentNode:function(e,t,i,n,r){t&&(t.parentTId?(view.expandCollapseNode(e,t,i,n),t.parentTId&&view.expandCollapseParentNode(e,t.getParentNode(),i,n,r)):view.expandCollapseNode(e,t,i,n,r))},expandCollapseSonNode:function(e,t,i,n,r){var o=data.getRoot(e),a=e.data.key.children,s=t?t[a]:o[a],l=!t&&n,u=data.getRoot(e).expandTriggerFlag;if(data.getRoot(e).expandTriggerFlag=!1,s)for(var c=0,h=s.length;c<h;c++)s[c]&&view.expandCollapseSonNode(e,s[c],i,l);data.getRoot(e).expandTriggerFlag=u,view.expandCollapseNode(e,t,i,n,r)},isSelectedNode:function(e,t){if(!t)return!1;var i,n=data.getRoot(e).curSelectedList;for(i=n.length-1;0<=i;i--)if(t===n[i])return!0;return!1},makeDOMNodeIcon:function(e,t,i){var n=data.getNodeName(t,i),r=t.view.nameIsHTML?n:n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");e.push("<span id='",i.tId,consts.id.ICON,"' title='' treeNode",consts.id.ICON," class='",view.makeNodeIcoClass(t,i),"' style='",view.makeNodeIcoStyle(t,i),"'></span><span id='",i.tId,consts.id.SPAN,"'>",r,"</span>")},makeDOMNodeLine:function(e,t,i){e.push("<span id='",i.tId,consts.id.SWITCH,"' title='' class='",view.makeNodeLineClass(t,i),"' treeNode",consts.id.SWITCH,"></span>")},makeDOMNodeMainAfter:function(e,t,i){e.push("</li>")},makeDOMNodeMainBefore:function(e,t,i){e.push("<li id='",i.tId,"' class='",consts.className.LEVEL,i.level,"' tabindex='0' hidefocus='true' treenode>")},makeDOMNodeNameAfter:function(e,t,i){e.push("</a>")},makeDOMNodeNameBefore:function(e,t,i){var n=data.getNodeTitle(t,i),r=view.makeNodeUrl(t,i),o=view.makeNodeFontCss(t,i),a=[];for(var s in o)a.push(s,":",o[s],";");e.push("<a id='",i.tId,consts.id.A,"' class='",consts.className.LEVEL,i.level,"' treeNode",consts.id.A,' onclick="',i.click||"",'" ',null!=r&&0<r.length?"href='"+r+"'":""," target='",view.makeNodeTarget(i),"' style='",a.join(""),"'"),tools.apply(t.view.showTitle,[t.treeId,i],t.view.showTitle)&&n&&e.push("title='",n.replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),"'"),e.push(">")},makeNodeFontCss:function(e,t){var i=tools.apply(e.view.fontCss,[e.treeId,t],e.view.fontCss);return i&&"function"!=typeof i?i:{}},makeNodeIcoClass:function(e,t){var i=["ico"];return t.isAjaxing||(i[0]=(t.iconSkin?t.iconSkin+"_":"")+i[0],t.isParent?i.push(t.open?consts.folder.OPEN:consts.folder.CLOSE):i.push(consts.folder.DOCU)),consts.className.BUTTON+" "+i.join("_")},makeNodeIcoStyle:function(e,t){var i=[];if(!t.isAjaxing){var n=t.isParent&&t.iconOpen&&t.iconClose?t.open?t.iconOpen:t.iconClose:t.icon;n&&i.push("background:url(",n,") 0 0 no-repeat;"),0!=e.view.showIcon&&tools.apply(e.view.showIcon,[e.treeId,t],!0)||i.push("width:0px;height:0px;")}return i.join("")},makeNodeLineClass:function(e,t){var i=[];return e.view.showLine?0==t.level&&t.isFirstNode&&t.isLastNode?i.push(consts.line.ROOT):0==t.level&&t.isFirstNode?i.push(consts.line.ROOTS):t.isLastNode?i.push(consts.line.BOTTOM):i.push(consts.line.CENTER):i.push(consts.line.NOLINE),t.isParent?i.push(t.open?consts.folder.OPEN:consts.folder.CLOSE):i.push(consts.folder.DOCU),view.makeNodeLineClassEx(t)+i.join("_")},makeNodeLineClassEx:function(e){return consts.className.BUTTON+" "+consts.className.LEVEL+e.level+" "+consts.className.SWITCH+" "},makeNodeTarget:function(e){return e.target||"_blank"},makeNodeUrl:function(e,t){var i=e.data.key.url;return t[i]?t[i]:null},makeUlHtml:function(e,t,i,n){i.push("<ul id='",t.tId,consts.id.UL,"' class='",consts.className.LEVEL,t.level," ",view.makeUlLineClass(e,t),"' style='display:",t.open?"block":"none","'>"),i.push(n),i.push("</ul>")},makeUlLineClass:function(e,t){return e.view.showLine&&!t.isLastNode?consts.line.LINE:""},removeChildNodes:function(e,t){if(t){var i=e.data.key.children,n=t[i];if(n){for(var r=0,o=n.length;r<o;r++)data.removeNodeCache(e,n[r]);if(data.removeSelectedNode(e),delete t[i],e.data.keep.parent)$$(t,consts.id.UL,e).empty();else{t.isParent=!1,t.open=!1;var a=$$(t,consts.id.SWITCH,e),s=$$(t,consts.id.ICON,e);view.replaceSwitchClass(t,a,consts.folder.DOCU),view.replaceIcoClass(t,s,consts.folder.DOCU),$$(t,consts.id.UL,e).remove()}}}},setFirstNode:function(e,t){var i=e.data.key.children;0<t[i].length&&(t[i][0].isFirstNode=!0)},setLastNode:function(e,t){var i=e.data.key.children,n=t[i].length;0<n&&(t[i][n-1].isLastNode=!0)},removeNode:function(e,t){var i=data.getRoot(e),n=e.data.key.children,r=t.parentTId?t.getParentNode():i;if(t.isFirstNode=!1,t.isLastNode=!1,t.getPreNode=function(){return null},t.getNextNode=function(){return null},data.getNodeCache(e,t.tId)){$$(t,e).remove(),data.removeNodeCache(e,t),data.removeSelectedNode(e,t);for(var o=0,a=r[n].length;o<a;o++)if(r[n][o].tId==t.tId){r[n].splice(o,1);break}view.setFirstNode(e,r),view.setLastNode(e,r);var s,l,u,c=r[n].length;if(e.data.keep.parent||0!=c){if(e.view.showLine&&0<c){var h=r[n][c-1];if(s=$$(h,consts.id.UL,e),l=$$(h,consts.id.SWITCH,e),u=$$(h,consts.id.ICON,e),r==i)if(1==r[n].length)view.replaceSwitchClass(h,l,consts.line.ROOT);else{var p=$$(r[n][0],consts.id.SWITCH,e);view.replaceSwitchClass(r[n][0],p,consts.line.ROOTS),view.replaceSwitchClass(h,l,consts.line.BOTTOM)}else view.replaceSwitchClass(h,l,consts.line.BOTTOM);s.removeClass(consts.line.LINE)}}else r.isParent=!1,r.open=!1,s=$$(r,consts.id.UL,e),l=$$(r,consts.id.SWITCH,e),u=$$(r,consts.id.ICON,e),view.replaceSwitchClass(r,l,consts.folder.DOCU),view.replaceIcoClass(r,u,consts.folder.DOCU),s.css("display","none")}},replaceIcoClass:function(e,t,i){if(t&&!e.isAjaxing){var n=t.attr("class");if(n!=undefined){var r=n.split("_");switch(i){case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:r[r.length-1]=i}t.attr("class",r.join("_"))}}},replaceSwitchClass:function(e,t,i){if(t){var n=t.attr("class");if(n!=undefined){var r=n.split("_");switch(i){case consts.line.ROOT:case consts.line.ROOTS:case consts.line.CENTER:case consts.line.BOTTOM:case consts.line.NOLINE:r[0]=view.makeNodeLineClassEx(e)+i;break;case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:r[1]=i}t.attr("class",r.join("_")),i!==consts.folder.DOCU?t.removeAttr("disabled"):t.attr("disabled","disabled")}}},selectNode:function(e,t,i){i||view.cancelPreSelectedNode(e,null,t),$$(t,consts.id.A,e).addClass(consts.node.CURSELECTED),data.addSelectedNode(e,t),e.treeObj.trigger(consts.event.SELECTED,[event,e.treeId,t])},setNodeFontCss:function(e,t){var i=$$(t,consts.id.A,e),n=view.makeNodeFontCss(e,t);n&&i.css(n)},setNodeLineIcos:function(e,t){if(t){var i=$$(t,consts.id.SWITCH,e),n=$$(t,consts.id.UL,e),r=$$(t,consts.id.ICON,e),o=view.makeUlLineClass(e,t);0==o.length?n.removeClass(consts.line.LINE):n.addClass(o),i.attr("class",view.makeNodeLineClass(e,t)),t.isParent?i.removeAttr("disabled"):i.attr("disabled","disabled"),r.removeAttr("style"),r.attr("style",view.makeNodeIcoStyle(e,t)),r.attr("class",view.makeNodeIcoClass(e,t))}},setNodeName:function(e,t){var i=data.getNodeTitle(e,t),n=$$(t,consts.id.SPAN,e);n.empty(),e.view.nameIsHTML?n.html(data.getNodeName(e,t)):n.text(data.getNodeName(e,t)),tools.apply(e.view.showTitle,[e.treeId,t],e.view.showTitle)&&$$(t,consts.id.A,e).attr("title",i||"")},setNodeTarget:function(e,t){$$(t,consts.id.A,e).attr("target",view.makeNodeTarget(t))},setNodeUrl:function(e,t){var i=$$(t,consts.id.A,e),n=view.makeNodeUrl(e,t);null==n||0==n.length?i.removeAttr("href"):i.attr("href",n)},switchNode:function(e,t){if(t.open||!tools.canAsync(e,t))view.expandCollapseNode(e,t,!t.open);else if(e.async.enable){if(!view.asyncNode(e,t))return void view.expandCollapseNode(e,t,!t.open)}else t&&view.expandCollapseNode(e,t,!t.open)}};$.fn.zTree={consts:_consts,_z:{tools:tools,view:view,event:event,data:data},getZTreeObj:function(e){var t=data.getZTreeTools(e);return t||null},destroy:function(e){if(e&&0<e.length)view.destroy(data.getSetting(e));else for(var t in settings)view.destroy(settings[t])},init:function(e,t,i){var s=tools.clone(_setting);$.extend(!0,s,t),s.treeId=e.attr("id"),s.treeObj=e,s.treeObj.empty(),settings[s.treeId]=s,"undefined"==typeof document.body.style.maxHeight&&(s.view.expandSpeed=""),data.initRoot(s);var n=data.getRoot(s),r=s.data.key.children;i=i?tools.clone(tools.isArray(i)?i:[i]):[],s.data.simpleData.enable?n[r]=data.transformTozTreeFormat(s,i):n[r]=i,data.initCache(s),event.unbindTree(s),event.bindTree(s),event.unbindEvent(s),event.bindEvent(s);var o={setting:s,addNodes:function(e,t,i){if(!t)return null;if((e=e||null)&&!e.isParent&&s.data.keep.leaf)return null;var n=tools.clone(tools.isArray(t)?t:[t]);function r(){view.addNodes(s,e,n,1==i)}return tools.canAsync(s,e)?view.asyncNode(s,e,i,r):r(),n},cancelSelectedNode:function(e){view.cancelPreSelectedNode(s,e)},destroy:function(){view.destroy(s)},expandAll:function(e){return e=!!e,view.expandCollapseSonNode(s,null,e,!0),e},expandNode:function(t,e,i,n,r){if(!t||!t.isParent)return null;if(!0!==e&&!1!==e&&(e=!t.open),(r=!!r)&&e&&0==tools.apply(s.callback.beforeExpand,[s.treeId,t],!0))return null;if(r&&!e&&0==tools.apply(s.callback.beforeCollapse,[s.treeId,t],!0))return null;if(e&&t.parentTId&&view.expandCollapseParentNode(s,t.getParentNode(),e,!1),e===t.open&&!i)return null;if(data.getRoot(s).expandTriggerFlag=r,!tools.canAsync(s,t)&&i)view.expandCollapseSonNode(s,t,e,!0,function(){if(!1!==n)try{$$(t,s).focus().blur()}catch(e){}});else if(t.open=!e,view.switchNode(this.setting,t),!1!==n)try{$$(t,s).focus().blur()}catch(o){}return e},getNodes:function(){return data.getNodes(s)},getNodeByParam:function(e,t,i){return e?data.getNodeByParam(s,i?i[s.data.key.children]:data.getNodes(s),e,t):null},getNodeByTId:function(e){return data.getNodeCache(s,e)},getNodesByParam:function(e,t,i){return e?data.getNodesByParam(s,i?i[s.data.key.children]:data.getNodes(s),e,t):null},getNodesByParamFuzzy:function(e,t,i){return e?data.getNodesByParamFuzzy(s,i?i[s.data.key.children]:data.getNodes(s),e,t):null},getNodesByFilter:function(e,t,i,n){return t=!!t,e&&"function"==typeof e?data.getNodesByFilter(s,i?i[s.data.key.children]:data.getNodes(s),e,t,n):t?null:[]},getNodeIndex:function(e){if(!e)return null;for(var t=s.data.key.children,i=e.parentTId?e.getParentNode():data.getRoot(s),n=0,r=i[t].length;n<r;n++)if(i[t][n]==e)return n;return-1},getSelectedNodes:function(){for(var e=[],t=data.getRoot(s).curSelectedList,i=0,n=t.length;i<n;i++)e.push(t[i]);return e},isSelectedNode:function(e){return data.isSelectedNode(s,e)},reAsyncChildNodes:function(e,t,i){if(this.setting.async.enable){var n=!e;if(n&&(e=data.getRoot(s)),"refresh"==t){for(var r=this.setting.data.key.children,o=0,a=e[r]?e[r].length:0;o<a;o++)data.removeNodeCache(s,e[r][o]);if(data.removeSelectedNode(s),e[r]=[],n)this.setting.treeObj.empty();else $$(e,consts.id.UL,s).empty()}view.asyncNode(this.setting,n?null:e,!!i)}},refresh:function(){this.setting.treeObj.empty();var e=data.getRoot(s),t=e[s.data.key.children];data.initRoot(s),e[s.data.key.children]=t,data.initCache(s),view.createNodes(s,0,e[s.data.key.children])},removeChildNodes:function(e){if(!e)return null;var t=e[s.data.key.children];return view.removeChildNodes(s,e),t||null},removeNode:function(e,t){e&&((t=!!t)&&0==tools.apply(s.callback.beforeRemove,[s.treeId,e],!0)||(view.removeNode(s,e),t&&this.setting.treeObj.trigger(consts.event.REMOVE,[s.treeId,e])))},selectNode:function(t,e){if(t&&tools.uCanDo(s)){if(e=s.view.selectedMulti&&e,t.parentTId)view.expandCollapseParentNode(s,t.getParentNode(),!0,!1,function(){try{$$(t,s).focus().blur()}catch(e){}});else try{$$(t,s).focus().blur()}catch(i){}view.selectNode(s,t,e)}},transformTozTreeNodes:function(e){return data.transformTozTreeFormat(s,e)},transformToArray:function(e){return data.transformToArrayFormat(s,e)},updateNode:function(e,t){e&&$$(e,s).get(0)&&tools.uCanDo(s)&&(view.setNodeName(s,e),view.setNodeTarget(s,e),view.setNodeUrl(s,e),view.setNodeLineIcos(s,e),view.setNodeFontCss(s,e))}};return n.treeTools=o,data.setZTreeTools(s,o),n[r]&&0<n[r].length?view.createNodes(s,0,n[r]):s.async.enable&&s.async.url&&""!==s.async.url&&view.asyncNode(s),o}};var zt=$.fn.zTree,$$=tools.$,consts=zt.consts}(BI.jQuery)},function(e,t){!function(e){var t={event:{CHECK:"ztree_check"},id:{CHECK:"_check"},checkbox:{STYLE:"checkbox",DEFAULT:"chk",DISABLED:"disable",FALSE:"false",TRUE:"true",FULL:"full",PART:"part",FOCUS:"focus"},radio:{STYLE:"radio",TYPE_ALL:"all",TYPE_LEVEL:"level"}},i={check:{enable:!1,autoCheckTrigger:!1,chkStyle:t.checkbox.STYLE,nocheckInherit:!1,chkDisabledInherit:!1,radioType:t.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}},s={onCheckNode:function(e,t){if(!0===t.chkDisabled)return!1;var i=d.getSetting(e.data.treeId),n=i.data.key.checked;if(0==l.apply(i.callback.beforeCheck,[i.treeId,t],!0))return!0;t[n]=!t[n],p.checkNodeRelation(i,t);var r=g(t,h.id.CHECK,i);return p.setChkClass(i,r,t),p.repairParentChkClassWithSelf(i,t),i.treeObj.trigger(h.event.CHECK,[e,i.treeId,t]),!0},onMouseoverCheck:function(e,t){if(!0===t.chkDisabled)return!1;var i=d.getSetting(e.data.treeId),n=g(t,h.id.CHECK,i);return t.check_Focus=!0,p.setChkClass(i,n,t),!0},onMouseoutCheck:function(e,t){if(!0===t.chkDisabled)return!1;var i=d.getSetting(e.data.treeId),n=g(t,h.id.CHECK,i);return t.check_Focus=!1,p.setChkClass(i,n,t),!0}},n={tools:{},view:{checkNodeRelation:function(e,t){var i,n,r,o=e.data.key.children,a=e.data.key.checked,s=h.radio;if(e.check.chkStyle==s.STYLE){var l=d.getRadioCheckedList(e);if(t[a])if(e.check.radioType==s.TYPE_ALL){for(n=l.length-1;0<=n;n--)(i=l[n])[a]&&i!=t&&(i[a]=!1,l.splice(n,1),p.setChkClass(e,g(i,h.id.CHECK,e),i),i.parentTId!=t.parentTId&&p.repairParentChkClassWithSelf(e,i));l.push(t)}else{var u=t.parentTId?t.getParentNode():d.getRoot(e);for(n=0,r=u[o].length;n<r;n++)(i=u[o][n])[a]&&i!=t&&(i[a]=!1,p.setChkClass(e,g(i,h.id.CHECK,e),i))}else if(e.check.radioType==s.TYPE_ALL)for(n=0,r=l.length;n<r;n++)if(t==l[n]){l.splice(n,1);break}}else t[a]&&(!t[o]||0==t[o].length||-1<e.check.chkboxType.Y.indexOf("s"))&&p.setSonNodeCheckBox(e,t,!0),t[a]||t[o]&&0!=t[o].length&&!(-1<e.check.chkboxType.N.indexOf("s"))||p.setSonNodeCheckBox(e,t,!1),t[a]&&-1<e.check.chkboxType.Y.indexOf("p")&&p.setParentNodeCheckBox(e,t,!0),!t[a]&&-1<e.check.chkboxType.N.indexOf("p")&&p.setParentNodeCheckBox(e,t,!1)},makeChkClass:function(e,t){var i=e.data.key.checked,n=h.checkbox,r=h.radio,o=e.check.chkboxType,a=""===o.Y&&""===o.N;!(fullStyle="")===t.chkDisabled?fullStyle=n.DISABLED:t.halfCheck?fullStyle=n.PART:e.check.chkStyle==r.STYLE?fullStyle=t.check_Child_State<1?n.FULL:n.PART:fullStyle=t[i]?2===t.check_Child_State||-1===t.check_Child_State||a?n.FULL:n.PART:t.check_Child_State<1||a?n.FULL:n.PART;var s=e.check.chkStyle+"_"+(t[i]?n.TRUE:n.FALSE)+"_"+fullStyle;return s=t.check_Focus&&!0!==t.chkDisabled?s+"_"+n.FOCUS:s,h.className.BUTTON+" "+n.DEFAULT+" "+s},repairAllChk:function(e,t){if(e.check.enable&&e.check.chkStyle===h.checkbox.STYLE)for(var i=e.data.key.checked,n=e.data.key.children,r=d.getRoot(e),o=0,a=r[n].length;o<a;o++){var s=r[n][o];!0!==s.nocheck&&!0!==s.chkDisabled&&(s[i]=t),p.setSonNodeCheckBox(e,s,t)}},repairChkClass:function(e,t){if(t&&(d.makeChkFlag(e,t),!0!==t.nocheck)){var i=g(t,h.id.CHECK,e);p.setChkClass(e,i,t)}},repairParentChkClass:function(e,t){if(t&&t.parentTId){var i=t.getParentNode();p.repairChkClass(e,i),p.repairParentChkClass(e,i)}},repairParentChkClassWithSelf:function(e,t){if(t){var i=e.data.key.children;t[i]&&0<t[i].length?p.repairParentChkClass(e,t[i][0]):p.repairParentChkClass(e,t)}},repairSonChkDisabled:function(e,t,i,n){if(t){var r=e.data.key.children;if(t.chkDisabled!=i&&(t.chkDisabled=i),p.repairChkClass(e,t),t[r]&&n)for(var o=0,a=t[r].length;o<a;o++){var s=t[r][o];p.repairSonChkDisabled(e,s,i,n)}}},repairParentChkDisabled:function(e,t,i,n){t&&(t.chkDisabled!=i&&n&&(t.chkDisabled=i),p.repairChkClass(e,t),p.repairParentChkDisabled(e,t.getParentNode(),i,n))},setChkClass:function(e,t,i){t&&(!0===i.nocheck?t.hide():t.show(),t.attr("class",p.makeChkClass(e,i)))},setParentNodeCheckBox:function(e,t,i,n){var r=e.data.key.children,o=e.data.key.checked,a=g(t,h.id.CHECK,e);if(n=n||t,d.makeChkFlag(e,t),!0!==t.nocheck&&!0!==t.chkDisabled&&(t[o]=i,p.setChkClass(e,a,t),e.check.autoCheckTrigger&&t!=n&&e.treeObj.trigger(h.event.CHECK,[null,e.treeId,t])),t.parentTId){var s=!0;if(!i)for(var l=t.getParentNode()[r],u=0,c=l.length;u<c;u++)if(!0!==l[u].nocheck&&!0!==l[u].chkDisabled&&l[u][o]||(!0===l[u].nocheck||!0===l[u].chkDisabled)&&0<l[u].check_Child_State){s=!1;break}s&&p.setParentNodeCheckBox(e,t.getParentNode(),i,n)}},setSonNodeCheckBox:function(e,t,i,n){if(t){var r=e.data.key.children,o=e.data.key.checked,a=g(t,h.id.CHECK,e);n=n||t;var s=!1;if(t[r])for(var l=0,u=t[r].length;l<u&&!0!==t.chkDisabled;l++){var c=t[r][l];p.setSonNodeCheckBox(e,c,i,n),!0===c.chkDisabled&&(s=!0)}t!=d.getRoot(e)&&!0!==t.chkDisabled&&(s&&!0!==t.nocheck&&d.makeChkFlag(e,t),!0!==t.nocheck&&!0!==t.chkDisabled?(t[o]=i,s||(t.check_Child_State=t[r]&&0<t[r].length?i?2:0:-1)):t.check_Child_State=-1,p.setChkClass(e,a,t),e.check.autoCheckTrigger&&t!=n&&!0!==t.nocheck&&!0!==t.chkDisabled&&e.treeObj.trigger(h.event.CHECK,[null,e.treeId,t]))}}},event:{},data:{getRadioCheckedList:function(e){for(var t=d.getRoot(e).radioCheckedList,i=0,n=t.length;i<n;i++)d.getNodeCache(e,t[i].tId)||(t.splice(i,1),i--,n--);return t},getCheckStatus:function(e,t){if(!e.check.enable||t.nocheck||t.chkDisabled)return null;var i=e.data.key.checked;return{checked:t[i],half:t.halfCheck?t.halfCheck:e.check.chkStyle==h.radio.STYLE?2===t.check_Child_State:t[i]?-1<t.check_Child_State&&t.check_Child_State<2:0<t.check_Child_State}},getTreeCheckedNodes:function(e,t,i,n){if(!t)return[];var r=e.data.key.children,o=e.data.key.checked,a=i&&e.check.chkStyle==h.radio.STYLE&&e.check.radioType==h.radio.TYPE_ALL;n=n||[];for(var s=0,l=t.length;s<l&&(!0===t[s].nocheck||!0===t[s].chkDisabled||t[s][o]!=i||(n.push(t[s]),!a))&&(d.getTreeCheckedNodes(e,t[s][r],i,n),!(a&&0<n.length));s++);return n},getTreeChangeCheckedNodes:function(e,t,i){if(!t)return[];var n=e.data.key.children,r=e.data.key.checked;i=i||[];for(var o=0,a=t.length;o<a;o++)!0!==t[o].nocheck&&!0!==t[o].chkDisabled&&t[o][r]!=t[o].checkedOld&&i.push(t[o]),d.getTreeChangeCheckedNodes(e,t[o][n],i);return i},makeChkFlag:function(e,t){if(t){var i=e.data.key.children,n=e.data.key.checked,r=-1;if(t[i])for(var o=0,a=t[i].length;o<a;o++){var s=t[i][o],l=-1;if(e.check.chkStyle==h.radio.STYLE){if(2==(l=!0===s.nocheck||!0===s.chkDisabled?s.check_Child_State:!0===s.halfCheck?2:s[n]?2:0<s.check_Child_State?2:0)){r=2;break}0==l&&(r=0)}else if(e.check.chkStyle==h.checkbox.STYLE){if(1===(l=!0===s.nocheck||!0===s.chkDisabled?s.check_Child_State:!0===s.halfCheck?1:s[n]?-1===s.check_Child_State||2===s.check_Child_State?2:1:0<s.check_Child_State?1:0)){r=1;break}if(2===l&&-1<r&&0<o&&l!==r){r=1;break}if(2===r&&-1<l&&l<2){r=1;break}-1<l&&(r=l)}}t.check_Child_State=r}}}};e.extend(!0,e.fn.zTree.consts,t),e.extend(!0,e.fn.zTree._z,n);var r=e.fn.zTree,l=r._z.tools,h=r.consts,p=r._z.view,d=r._z.data,g=(r._z.event,l.$);d.exSetting(i),d.addInitBind(function(r){var e=r.treeObj,t=h.event;e.bind(t.CHECK,function(e,t,i,n){e.srcEvent=t,l.apply(r.callback.onCheck,[e,i,n])})}),d.addInitUnBind(function(e){var t=e.treeObj,i=h.event;t.unbind(i.CHECK)}),d.addInitCache(function(e){}),d.addInitNode(function(e,t,i,n,r,o,a){if(i){var s=e.data.key.checked;if("string"==typeof i[s]&&(i[s]=l.eqs(i[s],"true")),i[s]=!!i[s],i.checkedOld=i[s],"string"==typeof i.nocheck&&(i.nocheck=l.eqs(i.nocheck,"true")),i.nocheck=!!i.nocheck||e.check.nocheckInherit&&n&&!!n.nocheck,"string"==typeof i.chkDisabled&&(i.chkDisabled=l.eqs(i.chkDisabled,"true")),i.chkDisabled=!!i.chkDisabled||e.check.chkDisabledInherit&&n&&!!n.chkDisabled,"string"==typeof i.halfCheck&&(i.halfCheck=l.eqs(i.halfCheck,"true")),i.halfCheck=!!i.halfCheck,i.check_Child_State=-1,i.check_Focus=!1,i.getCheckStatus=function(){return d.getCheckStatus(e,i)},e.check.chkStyle==h.radio.STYLE&&e.check.radioType==h.radio.TYPE_ALL&&i[s])d.getRoot(e).radioCheckedList.push(i)}}),d.addInitProxy(function(e){var t=e.target,i=d.getSetting(e.data.treeId),n="",r=null,o="",a=null;if(l.eqs(e.type,"mouseover")?i.check.enable&&l.eqs(t.tagName,"span")&&null!==t.getAttribute("treeNode"+h.id.CHECK)&&(n=l.getNodeMainDom(t).id,o="mouseoverCheck"):l.eqs(e.type,"mouseout")?i.check.enable&&l.eqs(t.tagName,"span")&&null!==t.getAttribute("treeNode"+h.id.CHECK)&&(n=l.getNodeMainDom(t).id,o="mouseoutCheck"):l.eqs(e.type,"click")&&i.check.enable&&l.eqs(t.tagName,"span")&&null!==t.getAttribute("treeNode"+h.id.CHECK)&&(n=l.getNodeMainDom(t).id,o="checkNode"),0<n.length)switch(r=d.getNodeCache(i,n),o){case"checkNode":a=s.onCheckNode;break;case"mouseoverCheck":a=s.onMouseoverCheck;break;case"mouseoutCheck":a=s.onMouseoutCheck}return{stop:"checkNode"===o,node:r,nodeEventType:o,nodeEventCallback:a,treeEventType:"",treeEventCallback:null}},!0),d.addInitRoot(function(e){d.getRoot(e).radioCheckedList=[]}),d.addBeforeA(function(e,t,i){e.data.key.checked;e.check.enable&&(d.makeChkFlag(e,t),i.push("<span ID='",t.tId,h.id.CHECK,"' class='",p.makeChkClass(e,t),"' treeNode",h.id.CHECK,!0===t.nocheck?" style='display:none;'":"","></span>"))}),d.addZTreeTools(function(e,n){n.checkNode=function(e,t,i,n){var r=this.setting.data.key.checked;if(!0!==e.chkDisabled&&(!0!==t&&!1!==t&&(t=!e[r]),n=!!n,(e[r]!==t||i)&&(!n||0!=l.apply(this.setting.callback.beforeCheck,[this.setting.treeId,e],!0))&&l.uCanDo(this.setting)&&this.setting.check.enable&&!0!==e.nocheck)){e[r]=t;var o=g(e,h.id.CHECK,this.setting);!i&&this.setting.check.chkStyle!==h.radio.STYLE||p.checkNodeRelation(this.setting,e),p.setChkClass(this.setting,o,e),p.repairParentChkClassWithSelf(this.setting,e),n&&this.setting.treeObj.trigger(h.event.CHECK,[null,this.setting.treeId,e])}},n.checkAllNodes=function(e){p.repairAllChk(this.setting,!!e)},n.getCheckedNodes=function(e){var t=this.setting.data.key.children;return e=!1!==e,d.getTreeCheckedNodes(this.setting,d.getRoot(this.setting)[t],e)},n.getChangeCheckedNodes=function(){var e=this.setting.data.key.children;return d.getTreeChangeCheckedNodes(this.setting,d.getRoot(this.setting)[e])},n.setChkDisabled=function(e,t,i,n){t=!!t,i=!!i,n=!!n,p.repairSonChkDisabled(this.setting,e,t,n),p.repairParentChkDisabled(this.setting,e.getParentNode(),t,i)};var r=n.updateNode;n.updateNode=function(e,t){if((r&&r.apply(n,arguments),e&&this.setting.check.enable)&&(g(e,this.setting).get(0)&&l.uCanDo(this.setting))){var i=g(e,h.id.CHECK,this.setting);1!=t&&this.setting.check.chkStyle!==h.radio.STYLE||p.checkNodeRelation(this.setting,e),p.setChkClass(this.setting,i,e),p.repairParentChkClassWithSelf(this.setting,e)}}});var o=p.createNodes;p.createNodes=function(e,t,i,n){o&&o.apply(p,arguments),i&&p.repairParentChkClassWithSelf(e,n)};var a=p.removeNode;p.removeNode=function(e,t){var i=t.getParentNode();a&&a.apply(p,arguments),t&&i&&(p.repairChkClass(e,i),p.repairParentChkClass(e,i))};var u=p.appendNodes;p.appendNodes=function(e,t,i,n,r,o){var a="";return u&&(a=u.apply(p,arguments)),n&&d.makeChkFlag(e,n),a}}(BI.jQuery)},function(e,t){BI.TreeRenderScrollService=BI.inherit(BI.OB,{_init:function(){this.nodeLists={},this.id=this.options.id,this.hasBinded=!1,this.container=this.options.container},_getNodeListBounds:function(e){var t=this.options.subNodeListGetter(e)[0];return{top:t.offsetTop,left:t.offsetLeft,width:t.offsetWidth,height:t.offsetHeight}},_getTreeContainerBounds:function(){var e=this.container[0];return BI.isNotNull(e)?{top:e.offsetTop+e.scrollTop,left:e.offsetLeft+e.scrollLeft,width:e.offsetWidth,height:e.offsetHeight}:{}},_canNodePopulate:function(e){if(this.nodeLists[e].locked)return!1;var t=this._getNodeListBounds(e),i=this._getTreeContainerBounds(e);return t.top+t.height<i.top+i.height},_isNodeInVisible:function(e){var t=this.options.subNodeListGetter(e);return 0===t.length||"none"===t.css("display")},pushNodeList:function(e,t){var i=this;BI.has(this.nodeLists,e)?this.nodeLists[e].locked=!1:this.nodeLists[e]={populate:BI.debounce(t,0),options:{times:1},locked:!1},this.hasBinded||(this.hasBinded=!0,this.container&&this.container.on("scroll",BI.debounce(function(){i.refreshAllNodes()},30)))},refreshAllNodes:function(){var t=this;BI.each(this.nodeLists,function(e){t._isNodeInVisible(e)||t.refreshNodes(e)})},refreshNodes:function(e){if(this._canNodePopulate(e)){var t=this.nodeLists[e];t.options.times++,t.locked=!0,t.populate({times:t.options.times})}},removeNodeList:function(e){delete this.nodeLists[e],0===BI.size(this.nodeLists)&&this.clear()},clear:function(){var t=this;BI.each(this.nodeLists,function(e){t.removeNodeList(e)}),this.nodeLists={},this.container.off("scroll"),this.hasBinded=!1}})},function(e,t){BI.TreeRenderPageService=BI.inherit(BI.OB,{_init:function(){this.nodeLists={}},_getLoadingBar:function(e){var t=this,i=BI.createWidget({type:"bi.loading_bar",height:25,handler:function(){t.refreshNodes(e)}});return i.setLoaded(),i},pushNodeList:function(e,t){var i=this.options,n=this._getLoadingBar(e);BI.has(this.nodeLists,e)?(this.nodeLists[e].loadWidget.destroy(),this.nodeLists[e].loadWidget=n):this.nodeLists[e]={populate:BI.debounce(t,0),options:{times:1},loadWidget:n},BI.createWidget({type:"bi.vertical",element:i.subNodeListGetter(e),items:[n]})},refreshNodes:function(e){var t=this.nodeLists[e];t.options.times++,t.loadWidget.setLoading(),t.populate({times:t.options.times})},removeNodeList:function(e){this.nodeLists[e]&&this.nodeLists[e].loadWidget.destroy(),this.nodeLists[e]&&(this.nodeLists[e].loadWidget=null),delete this.nodeLists[e],0===BI.size(this.nodeLists)&&this.clear()},clear:function(){var t=this;BI.each(this.nodeLists,function(e){t.removeNodeList(e)}),this.nodeLists={}}})},function(e,t){BI.CustomColorChooser=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CustomColorChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-custom-color-chooser",width:227,height:245})},_init:function(){BI.CustomColorChooser.superclass._init.apply(this,arguments);var e=this,t=this.options;this.editor=BI.createWidget(t.editor,{type:"bi.simple_color_picker_editor"}),this.editor.on(BI.ColorPickerEditor.EVENT_CHANGE,function(){e.setValue(this.getValue())}),this.farbtastic=BI.createWidget({type:"bi.farbtastic"}),this.farbtastic.on(BI.Farbtastic.EVENT_CHANGE,function(){e.setValue(this.getValue())}),BI.createWidget({type:"bi.vtape",element:this,items:[{type:"bi.absolute",items:[{el:this.editor,left:0,top:0,right:0}],height:30},{type:"bi.absolute",items:[{el:this.farbtastic,left:15,right:15,top:7}],height:215}]})},setValue:function(e){this.editor.setValue(e),this.farbtastic.setValue(e)},getValue:function(){return this.editor.getValue()}}),BI.CustomColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.custom_color_chooser",BI.CustomColorChooser)},function(e,t){BI.ColorChooser=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ColorChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-color-chooser",value:"",height:24})},_init:function(){BI.ColorChooser.superclass._init.apply(this,arguments);var t=this,e=this.options;this.combo=BI.createWidget({type:"bi.combo",element:this,container:e.container,adjustLength:1,isNeedAdjustWidth:!1,isNeedAdjustHeight:!1,el:BI.extend({type:e.width<=24?"bi.color_chooser_trigger":"bi.long_color_chooser_trigger",ref:function(e){t.trigger=e},width:e.width-2,height:e.height-2},e.el),popup:{el:BI.extend({type:"bi.color_chooser_popup",ref:function(e){t.colorPicker=e},listeners:[{eventName:BI.ColorChooserPopup.EVENT_VALUE_CHANGE,action:function(){i(),t._isRGBColor(t.colorPicker.getValue())||t.combo.hideView()}},{eventName:BI.ColorChooserPopup.EVENT_CHANGE,action:function(){i(),t.combo.hideView()}}]},e.popup),value:e.value,width:230},value:e.value});var i=function(){var e=t.colorPicker.getValue();t.trigger.setValue(e)};this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){t.fireEvent(BI.ColorChooser.EVENT_CHANGE,arguments)})},_isRGBColor:function(e){return BI.isNotEmptyString(e)&&"transparent"!==e},isViewVisible:function(){return this.combo.isViewVisible()},hideView:function(){this.combo.hideView()},showView:function(){this.combo.showView()},setValue:function(e){this.combo.setValue(e)},getValue:function(){return this.combo.getValue()}}),BI.ColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_chooser",BI.ColorChooser)},function(e,t){BI.ColorChooserPopup=BI.inherit(BI.Widget,{props:{baseCls:"bi-color-chooser-popup",width:230,height:145,simple:!1},render:function(){var t=this,e=this.options;this.colorEditor=BI.createWidget(e.editor,{type:e.simple?"bi.simple_color_picker_editor":"bi.color_picker_editor",value:e.value,cls:"bi-header-background bi-border-bottom",height:30}),this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE,function(){t.setValue(this.getValue()),t._dealStoreColors(),t.fireEvent(BI.ColorChooserPopup.EVENT_VALUE_CHANGE,arguments)}),this.storeColors=BI.createWidget({type:"bi.color_picker",cls:"bi-border-bottom bi-border-right",items:[this._digestStoreColors(this._getStoreColors())],width:210,height:24,value:e.value}),this.storeColors.on(BI.ColorPicker.EVENT_CHANGE,function(){t.setValue(this.getValue()[0]),t._dealStoreColors(),t.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}),this.colorPicker=BI.createWidget({type:"bi.color_picker",width:210,height:50,value:e.value}),this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE,function(){t.setValue(this.getValue()[0]),t._dealStoreColors(),t.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}),this.customColorChooser=BI.createWidget({type:"bi.custom_color_chooser",editor:e.editor});var i=BI.createWidget({type:"bi.popup_panel",buttons:[BI.i18nText("BI-Basic_Cancel"),BI.i18nText("BI-Basic_Save")],title:BI.i18nText("BI-Custom_Color"),el:this.customColorChooser,stopPropagation:!1,bgap:-1,rgap:1,lgap:1,minWidth:227});return this.more=BI.createWidget({type:"bi.combo",cls:"bi-border-top",container:null,direction:"right,top",isNeedAdjustHeight:!1,el:{type:"bi.text_item",cls:"color-chooser-popup-more bi-list-item",textAlign:"center",height:24,textLgap:10,text:BI.i18nText("BI-Basic_More")+"..."},popup:i}),this.more.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){t.customColorChooser.setValue(t.getValue())}),i.on(BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON,function(e){switch(e){case 0:t.more.hideView();break;case 1:t.setValue(t.customColorChooser.getValue()),t._dealStoreColors(),t.more.hideView(),t.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}}),{type:"bi.absolute",items:[{el:{type:"bi.vtape",items:[this.colorEditor,{el:{type:"bi.absolute",items:[{el:this.storeColors,left:10,right:10,top:5}]},height:29},{el:{type:"bi.absolute",items:[{el:this.colorPicker,left:10,right:10,top:5,bottom:5}]},height:60},{el:this.more,height:24}]},left:0,right:0,top:0,bottom:0},{el:{type:"bi.layout",cls:"disable-mask",invisible:!e.disabled,ref:function(){t.mask=this}},left:0,right:0,top:0,bottom:0}]}},mounted:function(){var e=this.options;BI.isNotNull(e.value)&&this.setValue(e.value)},_setEnable:function(e){BI.ColorChooserPopup.superclass._setEnable.apply(this,arguments),this.mask.setVisible(!e)},_dealStoreColors:function(){var e=this.getValue(),t=this._getStoreColors(),i=new BI.Queue(8);i.fromArray(t),i.remove(e),i.unshift(e);var n=i.toArray();BI.Cache.setItem("colors",BI.array2String(n)),this.setStoreColors(n)},_digestStoreColors:function(e){var t=BI.map(e,function(e,t){return{value:t}});return BI.count(e.length,8,function(e){t.push({value:"",disabled:!0})}),t},_getStoreColors:function(){var i=this,n=this.options,e=BI.string2Array(BI.Cache.getItem("colors")||"");return BI.filter(e,function(e,t){return!n.simple||i._isRGBColor(t)})},_isRGBColor:function(e){return BI.isNotEmptyString(e)&&"transparent"!==e},setStoreColors:function(e){BI.isArray(e)&&this.storeColors.populate([this._digestStoreColors(e)])},setValue:function(e){this.colorEditor.setValue(e),this.colorPicker.setValue(e),this.storeColors.setValue(e)},getValue:function(){return this.colorEditor.getValue()}}),BI.ColorChooserPopup.EVENT_VALUE_CHANGE="EVENT_VALUE_CHANGE",BI.ColorChooserPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_chooser_popup",BI.ColorChooserPopup)},function(e,t){BI.SimpleColorChooserPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SimpleColorChooserPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-color-chooser-popup"})},_init:function(){BI.SimpleColorChooserPopup.superclass._init.apply(this,arguments);var e=this,t=this.options;this.popup=BI.createWidget({type:"bi.color_chooser_popup",value:t.value,element:this,simple:!0}),this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE,function(){e.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE,arguments)}),this.popup.on(BI.ColorChooserPopup.EVENT_VALUE_CHANGE,function(){e.fireEvent(BI.SimpleColorChooserPopup.EVENT_VALUE_CHANGE,arguments)})},setStoreColors:function(e){this.popup.setStoreColors(e)},setValue:function(e){this.popup.setValue(e)},getValue:function(){return this.popup.getValue()}}),BI.SimpleColorChooserPopup.EVENT_VALUE_CHANGE="EVENT_VALUE_CHANGE",BI.SimpleColorChooserPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_color_chooser_popup",BI.SimpleColorChooserPopup)},function(e,t){BI.SimpleColorChooser=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SimpleColorChooser.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-simple-color-chooser",value:"#ffffff"})},_init:function(){BI.SimpleColorChooser.superclass._init.apply(this,arguments);var e=this,t=this.options;this.combo=BI.createWidget({type:"bi.color_chooser",element:this,container:t.container,value:t.value,width:t.width,height:t.height,popup:{type:"bi.simple_color_chooser_popup"}}),this.combo.on(BI.ColorChooser.EVENT_CHANGE,function(){e.fireEvent(BI.SimpleColorChooser.EVENT_CHANGE,arguments)})},isViewVisible:function(){return this.combo.isViewVisible()},hideView:function(){this.combo.hideView()},showView:function(){this.combo.showView()},setValue:function(e){this.combo.setValue(e)},getValue:function(){return this.combo.getValue()}}),BI.SimpleColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_color_chooser",BI.SimpleColorChooser)},function(e,t){BI.ColorChooserTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){var e=BI.ColorChooserTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-color-chooser-trigger bi-border",height:22})},_init:function(){BI.ColorChooserTrigger.superclass._init.apply(this,arguments),this.colorContainer=BI.createWidget({type:"bi.layout",cls:"color-chooser-trigger-content"+(BI.isIE9Below&&BI.isIE9Below()?" hack":"")});var e=BI.createWidget({type:"bi.icon_button",disableSelected:!0,cls:"icon-combo-down-icon trigger-triangle-font icon-size-12",width:12,height:8});BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.colorContainer,left:3,right:3,top:3,bottom:3},{el:e,right:-1,bottom:1}]}),BI.isNotNull(this.options.value)&&this.setValue(this.options.value)},setValue:function(e){BI.ColorChooserTrigger.superclass.setValue.apply(this,arguments),""===e?this.colorContainer.element.css("background-color","").removeClass("trans-color-background").addClass("auto-color-background"):"transparent"===e?this.colorContainer.element.css("background-color","").removeClass("auto-color-background").addClass("trans-color-background"):this.colorContainer.element.css({"background-color":e}).removeClass("auto-color-background").removeClass("trans-color-background")}}),BI.ColorChooserTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_chooser_trigger",BI.ColorChooserTrigger)},function(e,t){BI.LongColorChooserTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){var e=BI.LongColorChooserTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-color-chooser-trigger bi-border",height:22})},_init:function(){BI.LongColorChooserTrigger.superclass._init.apply(this,arguments);var t=this;this.options;this.colorContainer=BI.createWidget({type:"bi.htape",cls:"color-chooser-trigger-content",items:[{type:"bi.icon_change_button",ref:function(e){t.changeIcon=e},disableSelected:!0,iconCls:"auto-color-icon",width:24,iconWidth:16,iconHeight:16},{el:{type:"bi.label",ref:function(e){t.label=e},textAlign:"left",hgap:5,height:18,text:BI.i18nText("BI-Basic_Auto")}}]});var e=BI.createWidget({type:"bi.icon_button",disableSelected:!0,cls:"icon-combo-down-icon trigger-triangle-font icon-size-12",width:12,height:8});BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.colorContainer,left:3,right:3,top:3,bottom:3},{el:e,right:3,bottom:3}]}),this.options.value&&this.setValue(this.options.value)},setValue:function(e){BI.LongColorChooserTrigger.superclass.setValue.apply(this,arguments),""===e?(this.colorContainer.element.css("background-color",""),this.changeIcon.setVisible(!0),this.label.setVisible(!0),this.changeIcon.setIcon("auto-color-icon"),this.label.setText(BI.i18nText("BI-Basic_Auto"))):"transparent"===e?(this.colorContainer.element.css("background-color",""),this.changeIcon.setVisible(!0),this.label.setVisible(!0),this.changeIcon.setIcon("trans-color-icon"),this.label.setText(BI.i18nText("BI-Transparent_Color"))):(this.colorContainer.element.css({"background-color":e}),this.changeIcon.setVisible(!1),this.label.setVisible(!1))}}),BI.LongColorChooserTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.long_color_chooser_trigger",BI.LongColorChooserTrigger)},function(e,t){BI.ColorPickerButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var e=BI.ColorPickerButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(e,{baseCls:(e.baseCls||"")+" bi-color-picker-button bi-background bi-border-top bi-border-left"})},_init:function(){BI.ColorPickerButton.superclass._init.apply(this,arguments);var e=this,t=this.options;if(t.value){this.element.css("background-color",t.value);var i=this.getName();this.element.hover(function(){e._createMask(),e.isEnabled()&&BI.Maskers.show(i)},function(){e.isSelected()||BI.Maskers.hide(i)})}},_createMask:function(){var e=this.options,t=this.getName();this.isEnabled()&&!BI.Maskers.has(t)&&BI.Maskers.make(t,this,{offset:{left:-1,top:-1,right:-1,bottom:-1}}).element.addClass("color-picker-button-mask").css("background-color",e.value)},setSelected:function(e){BI.ColorPickerButton.superclass.setSelected.apply(this,arguments),e&&this._createMask(),BI.Maskers[e?"show":"hide"](this.getName())}}),BI.ColorPickerButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_picker_button",BI.ColorPickerButton)},function(e,t){BI.ColorPicker=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ColorPicker.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-color-picker",items:null})},_items:[[{value:"#ffffff"},{value:"#f2f2f2"},{value:"#e5e5e5"},{value:"#d9d9d9"},{value:"#cccccc"},{value:"#bfbfbf"},{value:"#b2b2b2"},{value:"#a6a6a6"},{value:"#999999"},{value:"#8c8c8c"},{value:"#808080"},{value:"#737373"},{value:"#666666"},{value:"#4d4d4d"},{value:"#333333"},{value:"#000000"}],[{value:"#d8b5a6"},{value:"#ff9e9a"},{value:"#ffc17d"},{value:"#f5e56b"},{value:"#d8e698"},{value:"#e0ebaf"},{value:"#c3d825"},{value:"#bbe2e7"},{value:"#85d3cd"},{value:"#bde1e6"},{value:"#a0d8ef"},{value:"#89c3eb"},{value:"#bbc8e6"},{value:"#bbbcde"},{value:"#d6b4cc"},{value:"#fbc0d3"}],[{value:"#bb9581"},{value:"#f37d79"},{value:"#fba74f"},{value:"#ffdb4f"},{value:"#c7dc68"},{value:"#b0ca71"},{value:"#99ab4e"},{value:"#84b9cb"},{value:"#00a3af"},{value:"#2ca9e1"},{value:"#0095d9"},{value:"#4c6cb3"},{value:"#8491c3"},{value:"#a59aca"},{value:"#cc7eb1"},{value:"#e89bb4"}],[{value:"#9d775f"},{value:"#dd4b4b"},{value:"#ef8b07"},{value:"#fcc800"},{value:"#aacf53"},{value:"#82ae46"},{value:"#69821b"},{value:"#59b9c6"},{value:"#2a83a2"},{value:"#007bbb"},{value:"#19448e"},{value:"#274a78"},{value:"#4a488e"},{value:"#7058a3"},{value:"#884898"},{value:"#d47596"}]],_init:function(){BI.ColorPicker.superclass._init.apply(this,arguments);var e=this,t=this.options;this.colors=BI.createWidget({type:"bi.button_group",element:this,items:BI.createItems(t.items||this._items,{type:"bi.color_picker_button",once:!1}),layouts:[{type:"bi.grid"}],value:t.value}),this.colors.on(BI.ButtonGroup.EVENT_CHANGE,function(){e.fireEvent(BI.ColorPicker.EVENT_CHANGE,arguments)})},populate:function(e){var t=[].slice.call(arguments);t[0]=BI.createItems(e,{type:"bi.color_picker_button",once:!1}),this.colors.populate.apply(this.colors,t)},setValue:function(e){this.colors.setValue(e)},getValue:function(){return this.colors.getValue()}}),BI.ColorPicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_picker",BI.ColorPicker)},function(e,t){BI.ColorPickerEditor=BI.inherit(BI.Widget,{constants:{REB_WIDTH:32},_defaultConfig:function(){return BI.extend(BI.ColorPickerEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-color-picker-editor",height:30})},_init:function(){BI.ColorPickerEditor.superclass._init.apply(this,arguments);var i=this,e=(this.options,this.constants);this.storeValue={},this.colorShow=BI.createWidget({type:"bi.layout",cls:"color-picker-editor-display bi-card bi-border",height:16,width:16});function n(e){return BI.isNumeric(e)&&0<=(0|e)&&(0|e)<=255}var t=BI.createWidgets(BI.createItems([{text:"R"},{text:"G"},{text:"B"}],{type:"bi.label",cls:"color-picker-editor-label",width:20,height:20})),r=BI.createWidgets([{},{},{}],{type:"bi.small_text_editor",cls:"color-picker-editor-input",validationChecker:n,errorText:BI.i18nText("BI-Color_Picker_Error_Text"),allowBlank:!0,value:255,width:e.REB_WIDTH,height:20});BI.each(r,function(e,t){t.on(BI.TextEditor.EVENT_CHANGE,function(){i._checkEditors(),n(i.storeValue.r)&&n(i.storeValue.g)&&n(i.storeValue.b)&&(i.colorShow.element.css("background-color",i.getValue()),i.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE))})}),this.R=r[0],this.G=r[1],this.B=r[2],this.none=BI.createWidget({type:"bi.icon_button",cls:"auto-color-icon",width:16,height:16,iconWidth:16,iconHeight:16,title:BI.i18nText("BI-Basic_Auto")}),this.none.on(BI.IconButton.EVENT_CHANGE,function(){this.isSelected()?(i.lastColor=i.getValue(),i.setValue("")):i.setValue(i.lastColor||"#ffffff"),(i.R.isValid()&&i.G.isValid()&&i.B.isValid()||i._isEmptyRGB())&&(i.colorShow.element.css("background-color",i.getValue()),i.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE))}),this.transparent=BI.createWidget({type:"bi.icon_button",cls:"trans-color-icon",width:16,height:16,iconWidth:16,iconHeight:16,title:BI.i18nText("BI-Transparent_Color")}),this.transparent.on(BI.IconButton.EVENT_CHANGE,function(){this.isSelected()?(i.lastColor=i.getValue(),i.setValue("transparent")):("transparent"===i.lastColor&&(i.lastColor=""),i.setValue(i.lastColor||"#ffffff")),(i.R.isValid()&&i.G.isValid()&&i.B.isValid()||i._isEmptyRGB())&&(i.colorShow.element.css("background-color",i.getValue()),i.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE))}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical_adapt",items:[{el:this.colorShow,width:16},{el:t[0],width:20},{el:this.R,width:e.REB_WIDTH},{el:t[1],width:20},{el:this.G,width:e.REB_WIDTH},{el:t[2],width:20},{el:this.B,width:e.REB_WIDTH},{el:this.transparent,width:16,lgap:5},{el:this.none,width:16,lgap:5}]},left:10,right:10,top:0,bottom:0}]})},_checkEditors:function(){BI.isEmptyString(this.R.getValue())&&this.R.setValue(0),BI.isEmptyString(this.G.getValue())&&this.G.setValue(0),BI.isEmptyString(this.B.getValue())&&this.B.setValue(0),this.storeValue={r:this.R.getValue()||0,g:this.G.getValue()||0,b:this.B.getValue()||0}},_isEmptyRGB:function(){return BI.isEmptyString(this.storeValue.r)&&BI.isEmptyString(this.storeValue.g)&&BI.isEmptyString(this.storeValue.b)},_showPreColor:function(e){""===e?this.colorShow.element.css("background-color","").removeClass("trans-color-background").addClass("auto-color-normal-background"):"transparent"===e?this.colorShow.element.css("background-color","").removeClass("auto-color-normal-background").addClass("trans-color-background"):this.colorShow.element.css({"background-color":e}).removeClass("auto-color-normal-background").removeClass("trans-color-background")},_setEnable:function(e){BI.ColorPickerEditor.superclass._setEnable.apply(this,arguments),!0===e?this.element.removeClass("base-disabled disabled"):!1===e&&this.element.addClass("base-disabled disabled")},setValue:function(e){if("transparent"===e)return this.transparent.setSelected(!0),this.none.setSelected(!1),this._showPreColor("transparent"),this.R.setValue(""),this.G.setValue(""),this.B.setValue(""),void(this.storeValue={r:"",g:"",b:""});e?this.none.setSelected(!1):(e="",this.none.setSelected(!0)),this.transparent.setSelected(!1),this._showPreColor(e);var t=BI.DOM.rgb2json(BI.DOM.hex2rgb(e));this.storeValue={r:BI.isNull(t.r)?"":t.r,g:BI.isNull(t.r)?"":t.g,b:BI.isNull(t.r)?"":t.b},this.R.setValue(this.storeValue.r),this.G.setValue(this.storeValue.g),this.B.setValue(this.storeValue.b)},getValue:function(){return this._isEmptyRGB()&&this.transparent.isSelected()?"transparent":BI.DOM.rgb2hex(BI.DOM.json2rgb({r:this.storeValue.r,g:this.storeValue.g,b:this.storeValue.b}))}}),BI.ColorPickerEditor.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_picker_editor",BI.ColorPickerEditor)},function(e,t){BI.SimpleColorPickerEditor=BI.inherit(BI.Widget,{constants:{REB_WIDTH:32},_defaultConfig:function(){return BI.extend(BI.SimpleColorPickerEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-color-picker-editor",height:30})},_init:function(){BI.SimpleColorPickerEditor.superclass._init.apply(this,arguments);var i=this,e=(this.options,this.constants);this.colorShow=BI.createWidget({type:"bi.layout",cls:"color-picker-editor-display bi-card bi-border",height:16,width:16});var t=BI.createWidgets(BI.createItems([{text:"R"},{text:"G"},{text:"B"}],{type:"bi.label",cls:"color-picker-editor-label",width:20,height:20})),n=BI.createWidgets([{},{},{}],{type:"bi.small_text_editor",cls:"color-picker-editor-input",validationChecker:function(e){return BI.isNumeric(e)&&0<=(0|e)&&(0|e)<=255},errorText:BI.i18nText("BI-Color_Picker_Error_Text"),allowBlank:!0,value:255,width:e.REB_WIDTH,height:20});BI.each(n,function(e,t){t.on(BI.TextEditor.EVENT_CHANGE,function(){i._checkEditors(),i.R.isValid()&&i.G.isValid()&&i.B.isValid()&&(i.colorShow.element.css("background-color",i.getValue()),i.fireEvent(BI.SimpleColorPickerEditor.EVENT_CHANGE))})}),this.R=n[0],this.G=n[1],this.B=n[2],BI.createWidget({type:"bi.vertical_adapt",element:this,items:[{el:this.colorShow,width:16,lgap:20,rgap:15},{el:t[0],width:20},{el:this.R,width:e.REB_WIDTH},{el:t[1],width:20},{el:this.G,width:e.REB_WIDTH},{el:t[2],width:20},{el:this.B,width:e.REB_WIDTH}]})},_checkEditors:function(){BI.isEmptyString(this.R.getValue())&&this.R.setValue(0),BI.isEmptyString(this.G.getValue())&&this.G.setValue(0),BI.isEmptyString(this.B.getValue())&&this.B.setValue(0)},setValue:function(e){this.colorShow.element.css({"background-color":e});var t=BI.DOM.rgb2json(BI.DOM.hex2rgb(e));this.R.setValue(BI.isNull(t.r)?"":t.r),this.G.setValue(BI.isNull(t.g)?"":t.g),this.B.setValue(BI.isNull(t.b)?"":t.b)},getValue:function(){return BI.DOM.rgb2hex(BI.DOM.json2rgb({r:this.R.getValue(),g:this.G.getValue(),b:this.B.getValue()}))}}),BI.SimpleColorPickerEditor.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_color_picker_editor",BI.SimpleColorPickerEditor)},function(e,t){BI.Farbtastic=BI.inherit(BI.BasicButton,{constants:{RADIUS:84,SQUARE:100,WIDTH:194},props:{baseCls:"bi-farbtastic",width:195,height:195,stopPropagation:!0,value:"#000000"},render:function(){var t=this;return{type:"bi.absolute",items:[{el:{type:"bi.layout",cls:"",ref:function(e){t.colorWrapper=e}},top:47,left:47,width:101,height:101},{el:{type:"bi.layout",cls:"wheel",ref:function(e){t.wheel=e}},left:0,right:0,top:0,bottom:0},{el:{type:"bi.layout",cls:"overlay",ref:function(e){t.overlay=e}},top:47,left:47,width:101,height:101},{el:{type:"bi.layout",cls:"marker",ref:function(e){t.hMarker=e},scrollable:!1,width:17,height:17}},{el:{type:"bi.layout",cls:"marker",ref:function(e){t.slMarker=e},scrollable:!1,width:17,height:17}}]}},mounted:function(){var e=this.options;BI.isKey(e.value)&&this.setValue(e.value)},_unpack:function(e){return 7===e.length?[parseInt("0x"+e.substring(1,3))/255,parseInt("0x"+e.substring(3,5))/255,parseInt("0x"+e.substring(5,7))/255]:4===e.length?[parseInt("0x"+e.substring(1,2))/15,parseInt("0x"+e.substring(2,3))/15,parseInt("0x"+e.substring(3,4))/15]:void 0},_pack:function(e){var t=Math.round(255*e[0]),i=Math.round(255*e[1]),n=Math.round(255*e[2]);return"#"+(t<16?"0":"")+t.toString(16)+(i<16?"0":"")+i.toString(16)+(n<16?"0":"")+n.toString(16)},_setColor:function(e){var t=this._unpack(e);this.value!==e&&t&&(this.value=e,this.rgb=t,this.hsl=this._RGBToHSL(this.rgb),this._updateDisplay())},_setHSL:function(e){return this.hsl=e,this.rgb=this._HSLToRGB(e),this.value=this._pack(this.rgb),this._updateDisplay(),this},_HSLToRGB:function(e){var t,i,n=e[0],r=e[1],o=e[2];return t=2*o-(i=o<=.5?o*(r+1):o+r-o*r),[this._hueToRGB(t,i,n+.33333),this._hueToRGB(t,i,n),this._hueToRGB(t,i,n-.33333)]},_hueToRGB:function(e,t,i){return 6*(i=i<0?i+1:1<i?i-1:i)<1?e+(t-e)*i*6:2*i<1?t:3*i<2?e+(t-e)*(.66666-i)*6:e},_RGBToHSL:function(e){var t,i,n,r,o,a,s=e[0],l=e[1],u=e[2];return t=Math.min(s,Math.min(l,u)),n=(i=Math.max(s,Math.max(l,u)))-t,(o=0)<(a=(t+i)/2)&&a<1&&(o=n/(a<.5?2*a:2-2*a)),(r=0)<n&&(i==s&&i!=l&&(r+=(l-u)/n),i==l&&i!=u&&(r+=2+(u-s)/n),i==u&&i!=s&&(r+=4+(s-l)/n),r/=6),[r,o,a]},_updateDisplay:function(){var e=6.28*this.hsl[0];this.hMarker.element.css({left:Math.round(Math.sin(e)*this.constants.RADIUS+this.constants.WIDTH/2)+"px",top:Math.round(-Math.cos(e)*this.constants.RADIUS+this.constants.WIDTH/2)+"px"}),this.slMarker.element.css({left:Math.round(this.constants.SQUARE*(.5-this.hsl[1])+this.constants.WIDTH/2)+"px",top:Math.round(this.constants.SQUARE*(.5-this.hsl[2])+this.constants.WIDTH/2)+"px"}),this.colorWrapper.element.css("backgroundColor",this._pack(this._HSLToRGB([this.hsl[0],1,.5]))),this.fireEvent(BI.Farbtastic.EVENT_CHANGE,this.getValue(),this)},_absolutePosition:function(e){var t={x:e.offsetLeft,y:e.offsetTop};if(e.offsetParent){var i=this._absolutePosition(e.offsetParent);t.x+=i.x,t.y+=i.y}return t},_widgetCoords:function(e){var t,i,n=e.target||e.srcElement,r=this.wheel.element[0];if("undefined"!=typeof e.offsetX){for(var o={x:e.offsetX,y:e.offsetY},a=n;a;)a.mouseX=o.x,a.mouseY=o.y,o.x+=a.offsetLeft,o.y+=a.offsetTop,a=a.offsetParent;a=r;for(var s={x:0,y:0};a;){if("undefined"!=typeof a.mouseX){t=a.mouseX-s.x,i=a.mouseY-s.y;break}s.x+=a.offsetLeft,s.y+=a.offsetTop,a=a.offsetParent}for(a=n;a;)a.mouseX=undefined,a.mouseY=undefined,a=a.offsetParent}else{o=this._absolutePosition(r);t=(e.pageX||0)-o.x,i=(e.pageY||0)-o.y}return{x:t-this.constants.WIDTH/2,y:i-this.constants.WIDTH/2}},_doMouseMove:function(e){var t=this._widgetCoords(e);if(this.circleDrag){var i=Math.atan2(t.x,-t.y)/6.28;i<0&&(i+=1),this._setHSL([i,this.hsl[1],this.hsl[2]])}else{var n=Math.max(0,Math.min(1,-t.x/this.constants.SQUARE+.5)),r=Math.max(0,Math.min(1,-t.y/this.constants.SQUARE+.5));this._setHSL([this.hsl[0],n,r])}},doClick:function(e){var t=this._widgetCoords(e);return this.circleDrag=2*Math.max(Math.abs(t.x),Math.abs(t.y))>this.constants.SQUARE,this._doMouseMove(e),!1},setValue:function(e){this._setColor(e)},getValue:function(){return this.value}}),BI.Farbtastic.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.farbtastic",BI.Farbtastic)},function(e,t){BI.DisplayTree=BI.inherit(BI.TreeView,{_defaultConfig:function(){return BI.extend(BI.DisplayTree.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-display-tree"})},_init:function(){BI.DisplayTree.superclass._init.apply(this,arguments)},_configSetting:function(){return{view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,nameIsHTML:!0,showTitle:!1},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:function i(e,t){return!1}}}},_dealWidthNodes:function(e){e=BI.DisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(e,function(e,t){t.isParent=t.isParent||t.parent,null==t.text&&0<t.count&&(t.text=t.value+"("+BI.i18nText("BI-Basic_Altogether")+t.count+BI.i18nText("BI-Basic_Count")+")")}),e},initTree:function(e,t){t=t||this._configSetting();this.nodes=BI.$.fn.zTree.init(this.tree.element,t,e)},destroy:function(){BI.DisplayTree.superclass.destroy.apply(this,arguments)}}),BI.DisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.display_tree",BI.DisplayTree)},function(e,t){BI.ListDisplayTree=BI.inherit(BI.ListTreeView,{_defaultConfig:function(){return BI.extend(BI.ListDisplayTree.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-list-display-tree"})},_init:function(){BI.ListDisplayTree.superclass._init.apply(this,arguments)},_configSetting:function(){return{view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,nameIsHTML:!0,showTitle:!1,fontCss:function i(e,t){return t.isLeaf?{}:{color:"#999999"}}},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:function n(e,t){return!1}}}},_dealWidthNodes:function(e){e=BI.ListDisplayTree.superclass._dealWidthNodes.apply(this,arguments);this.options;return BI.each(e,function(e,t){t.isParent=t.isParent||t.parent,null==t.text&&0<t.count&&(t.text=t.value+"("+BI.i18nText("BI-Basic_Altogether")+t.count+BI.i18nText("BI-Basic_Count")+")")}),e},initTree:function(e,t){t=t||this._configSetting();this.nodes=BI.$.fn.zTree.init(this.tree.element,t,e)},destroy:function(){BI.ListDisplayTree.superclass.destroy.apply(this,arguments)}}),BI.ListDisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_display_tree",BI.ListDisplayTree)},function(e,t){BI.SimpleTreeView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SimpleTreeView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-simple-tree",itemsCreator:BI.emptyFn,items:null})},_init:function(){BI.SimpleTreeView.superclass._init.apply(this,arguments);var n=this,r=this.options;this.structure=new BI.Tree,this.tree=BI.createWidget({type:"bi.tree_view",element:this,itemsCreator:function(e,t){function i(e){t({items:e}),n.structure.initTree(BI.Tree.transformToTreeFormat(e))}BI.isNotNull(r.items)?i(r.items):r.itemsCreator(e,i)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){n.fireEvent(BI.SimpleTreeView.EVENT_CHANGE,arguments)}),BI.isNotEmptyArray(r.items)&&this.populate(),BI.isNotNull(r.value)&&this.setValue(r.value)},populate:function(e,t){e&&(this.options.items=e),this.tree.stroke({keyword:t})},_digest:function(e){e=e||[];var r=this,o={},a=[];return BI.each(e,function(e,t){var i=r.structure.search(t,"value");if(i){var n=i;for((n=n.getParent())&&(o[n.value]||(o[n.value]=0),o[n.value]++);n&&n.getChildrenLength()<=o[n.value];)a.push(n.value),(n=n.getParent())&&(o[n.value]||(o[n.value]=0),o[n.value]++)}}),BI.makeObject(e.concat(a))},setValue:function(e){this.tree.setValue(this._digest(e))},_getValue:function(){var i=[],e=this.tree.getValue(),n=function(e){BI.each(e,function(e,t){BI.isEmpty(t)?i.push(e):n(t)})};return n(e),i},empty:function(){this.tree.empty()},getValue:function(){var n=this,r=[],e=this._getValue();return BI.each(e,function(e,t){var i=n.structure.search(t,"value");i&&n.structure._traverse(i,function(e){e.isLeaf()&&r.push(e.value)})}),r}}),BI.SimpleTreeView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_tree",BI.SimpleTreeView)},function(e,t){!function(){var e={on:function(e,t,i){return h(this,"on",e,[t,i])&&t&&(this._events||(this._events={}),(this._events[e]||(this._events[e]=[])).push({callback:t,context:i,ctx:i||this})),this},once:function(e,t,i){if(!h(this,"once",e,[t,i])||!t)return this;var n=this,r=_.once(function(){n.off(e,r),t.apply(this,arguments)});return r._callback=t,this.on(e,r,i)},off:function(e,t,i){if(!this._events||!h(this,"off",e,[t,i]))return this;if(!e&&!t&&!i)return this._events=void 0,this;for(var n=e?[e]:_.keys(this._events),r=0,o=n.length;r<o;r++){e=n[r];var a=this._events[e];if(a)if(t||i){for(var s=[],l=0,u=a.length;l<u;l++){var c=a[l];(t&&t!==c.callback&&t!==c.callback._callback||i&&i!==c.context)&&s.push(c)}s.length?this._events[e]=s:delete this._events[e]}else delete this._events[e]}return this},un:function(){this.off.apply(this,arguments)},trigger:function(e){if(!this._events)return this;var t=slice.call(arguments,1);if(!h(this,"trigger",e,t))return this;var i=this._events[e],n=this._events.all;return i&&r(i,t),n&&r(n,arguments),this},fireEvent:function(){this.trigger.apply(this,arguments)},listenTo:function(e,t,i){var n=this._listeningTo||(this._listeningTo={});return i||"object"!=typeof t||(i=this),(n[e._listenId||(e._listenId=_.uniqueId("l"))]=e).on(t,i,this),this},listenToOnce:function(e,t,i){if("object"==typeof t){for(var n in t)this.listenToOnce(e,n,t[n]);return this}if(l.test(t)){for(var r=t.split(l),o=0,a=r.length;o<a;o++)this.listenToOnce(e,r[o],i);return this}if(!i)return this;var s=_.once(function(){this.stopListening(e,t,s),i.apply(this,arguments)});return s._callback=i,this.listenTo(e,t,s)},stopListening:function(e,t,i){var n=this._listeningTo;if(!n)return this;var r=!t&&!i;for(var o in i||"object"!=typeof t||(i=this),e&&((n={})[e._listenId]=e),n)(e=n[o]).off(t,i,this),(r||_.isEmpty(e._events))&&delete this._listeningTo[o];return this}},l=/\s+/,h=function(e,t,i,n){if(!i)return!0;if("object"==typeof i){for(var r in i)e[t].apply(e,[r,i[r]].concat(n));return!1}if(l.test(i)){for(var o=i.split(l),a=0,s=o.length;a<s;a++)e[t].apply(e,[o[a]].concat(n));return!1}return!0},r=function(e,t){var i,n=-1,r=e.length,o=t[0],a=t[1],s=t[2];switch(t.length){case 0:for(;++n<r;)(i=e[n]).callback.call(i.ctx);return;case 1:for(;++n<r;)(i=e[n]).callback.call(i.ctx,o);return;case 2:for(;++n<r;)(i=e[n]).callback.call(i.ctx,o,a);return;case 3:for(;++n<r;)(i=e[n]).callback.call(i.ctx,o,a,s);return;default:for(;++n<r;)(i=e[n]).callback.apply(i.ctx,t);return}},t=BI.Router=function(e){(e=e||{}).routes&&(this.routes=e.routes),this._bindRoutes(),this._init.apply(this,arguments)},i=/\((.*?)\)/g,n=/(\(\?)?:\w+/g,o=/\*\w+/g,a=/[\-{}\[\]+?.,\\\^$|#\s]/g;_.extend(t.prototype,e,{_init:function(){},route:function(i,n,r){_.isRegExp(i)||(i=this._routeToRegExp(i)),_.isFunction(n)&&(r=n,n=""),r=r||this[n];var o=this;return BI.history.route(i,function(e){var t=o._extractParameters(i,e);!1!==o.execute(r,t,n)&&(o.trigger.apply(o,["route:"+n].concat(t)),o.trigger("route",n,t),BI.history.trigger("route",o,n,t))}),this},execute:function(e,t,i){e&&e.apply(this,t)},navigate:function(e,t){return BI.history.navigate(e,t),this},_bindRoutes:function(){if(this.routes){this.routes=_.result(this,"routes");for(var e,t=_.keys(this.routes);null!=(e=t.pop());)this.route(e,this.routes[e])}},_routeToRegExp:function(e){return e=e.replace(a,"\\$&").replace(i,"(?:$1)?").replace(n,function(e,t){return t?e:"([^/?]+)"}).replace(o,"([^?]*?)"),new RegExp("^"+e+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(e,t){var i=e.exec(t).slice(1);return _.map(i,function(e,t){return t===i.length-1?e||null:e?decodeURIComponent(e):null})}});function s(){this.handlers=[],this.checkUrl=_.bind(this.checkUrl,this),"undefined"!=typeof window&&(this.location=_global.location,this.history=_global.history)}var u=/^[#\/]|\s+$/g,c=/^\/+|\/+$/g,p=/#.*$/;s.started=!1,_.extend(s.prototype,e,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root&&!this.getSearch()},getSearch:function(){var e=this.location.href.replace(/#.*/,"").match(/\?.+/);return e?e[0]:""},getHash:function(e){var t=(e||this).location.href.match(/#(.*)$/);return t?t[1]:""},getPath:function(){var e=decodeURI(this.location.pathname+this.getSearch()),t=this.root.slice(0,-1);return e.indexOf(t)||(e=e.slice(t.length)),"/"===e.charAt(0)?e.slice(1):e},getFragment:function(e){return null==e&&(e=this._hasPushState||!this._wantsHashChange?this.getPath():this.getHash()),e.replace(u,"")},start:function(e){if(s.started)throw new Error("BI.history has already been started");if(s.started=!0,this.options=_.extend({root:"/"},this.options,e),this.root=this.options.root,this._wantsHashChange=!1!==this.options.hashChange,this._hasHashChange="onhashchange"in window,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState),this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(c,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var t=this.root.slice(0,-1)||"/";return this.location.replace(t+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&(!this._wantsPushState||!this._hasPushState)){var i=document.createElement("iframe");i.src="javascript:0",i.style.display="none",i.tabIndex=-1;var n=document.body;this.iframe=n.insertBefore(i,n.firstChild).contentWindow,this.iframe.document.open().close(),this.iframe.location.hash="#"+this.fragment}var r=_global.addEventListener||function(e,t){return attachEvent("on"+e,t)};if(this._hasPushState?r("popstate",this.checkUrl,!1):this._wantsHashChange&&this._hasHashChange&&!this.iframe?r("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var e=_global.removeEventListener||function(e,t){return detachEvent("on"+e,t)};this._hasPushState?e("popstate",this.checkUrl,!1):this._wantsHashChange&&this._hasHashChange&&!this.iframe&&e("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe.frameElement),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),s.started=!1},route:function(e,t){this.handlers.unshift({route:e,callback:t})},checkUrl:function(e){var t=this.getFragment();try{t=decodeURIComponent(t)}catch(e){}if(t===this.fragment&&this.iframe&&(t=this.getHash(this.iframe)),t===this.fragment)return!1;this.iframe&&this.navigate(t),this.loadUrl()},loadUrl:function(t){return t=this.fragment=this.getFragment(t),_.some(this.handlers,function(e){if(e.route.test(t))return e.callback(t),!0})},navigate:function(e,t){if(!s.started)return!1;t&&!0!==t||(t={trigger:!!t}),e=this.getFragment(e||"");var i=this.root;""!==e&&"?"!==e.charAt(0)||(i=i.slice(0,-1)||"/");var n=i+e;if(e=decodeURI(e.replace(p,"")),this.fragment!==e){if(this.fragment=e,this._hasPushState)this.history[t.replace?"replaceState":"pushState"]({},document.title,n);else{if(!this._wantsHashChange)return this.location.assign(n);this._updateHash(this.location,e,t.replace),this.iframe&&e!==this.getHash(this.iframe)&&(t.replace||this.iframe.document.open().close(),this._updateHash(this.iframe.location,e,t.replace))}return t.trigger?this.loadUrl(e):void 0}},_updateHash:function(e,t,i){if(i){var n=e.href.replace(/(javascript:|#).*$/,"");e.replace(n+"#"+t)}else e.hash="#"+t}}),BI.history=new s}()},function(e,t,i){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);t.f=o?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},function(e,t,i){var n=i(15),r=i(52),o="".split;e.exports=n(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return"String"==r(e)?o.call(e,""):Object(e)}:Object},function(e,t,i){var r=i(18);e.exports=function(e,t){if(!r(e))return e;var i,n;if(t&&"function"==typeof(i=e.toString)&&!r(n=i.call(e)))return n;if("function"==typeof(i=e.valueOf)&&!r(n=i.call(e)))return n;if(!t&&"function"==typeof(i=e.toString)&&!r(n=i.call(e)))return n;throw TypeError("Can't convert object to primitive value")}},function(e,t,i){var n=i(11),r=i(18),o=n.document,a=r(o)&&r(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},function(e,t,i){var n=i(11),r=i(26);e.exports=function(e,t){try{r(n,e,t)}catch(i){n[e]=t}return t}},function(e,t,i){var n=i(782),r=i(729).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,r)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,i){function n(e,t){var i=s[a(e)];return i==u||i!=l&&("function"==typeof t?r(t):!!t)}var r=i(15),o=/#|\.prototype\./,a=n.normalize=function(e){return String(e).replace(o,".").toLowerCase()},s=n.data={},l=n.NATIVE="N",u=n.POLYFILL="P";e.exports=n},function(e,t,i){var n=i(782),r=i(729);e.exports=Object.keys||function(e){return n(e,r)}},function(e,t,i){"use strict";function B(){return this}var E=i(13),_=i(1037),m=i(646),b=i(734),T=i(165),y=i(26),C=i(38),n=i(12),v=i(64),N=i(167),r=i(795),V=r.IteratorPrototype,S=r.BUGGY_SAFARI_ITERATORS,x=n("iterator"),L="values";e.exports=function(e,t,i,n,r,o,a){_(i,t,n);function s(e){if(e===r&&f)return f;if(!S&&e in d)return d[e];switch(e){case"keys":case L:case"entries":return function(){return new i(this,e)}}return function(){return new i(this)}}var l,u,c,h=t+" Iterator",p=!1,d=e.prototype,g=d[x]||d["@@iterator"]||r&&d[r],f=!S&&g||s(r),I="Array"==t&&d.entries||g;if(I&&(l=m(I.call(new e)),V!==Object.prototype&&l.next&&(v||m(l)===V||(b?b(l,V):"function"!=typeof l[x]&&y(l,x,B)),T(l,h,!0,!0),v&&(N[h]=B))),r==L&&g&&g.name!==L&&(p=!0,f=function(){return g.call(this)}),v&&!a||d[x]===f||y(d,x,f),N[t]=f,r)if(u={values:s(L),keys:o?f:s("keys"),entries:s("entries")},a)for(c in u)!S&&!p&&c in d||C(d,c,u[c]);else E({target:t,proto:!0,forced:S||p},u);return u}},function(e,t,i){var r=i(19),o=i(1038);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var i,n=!1,e={};try{(i=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(e,[]),n=e instanceof Array}catch(t){}return function(e,t){return r(e),o(t),n?i.call(e,t):e.__proto__=t,e}}():undefined)},function(e,t){e.exports=function(e,t,i){if(!(e instanceof t))throw TypeError("Incorrect "+(i?i+" ":"")+"invocation");return e}},function(e,t,i){var n=i(65);e.exports=n("navigator","userAgent")||""},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},function(e,t,i){},,function(e,t){BI.i18n={"BI-Multi_Date_Quarter_End":"季度末","BI-Multi_Date_Month_Begin":"月初","BI-Multi_Date_YMD":"年月日","BI-Custom_Color":"自定义颜色","BI-Numerical_Interval_Input_Data":"请输入数值","BI-Please_Input_Natural_Number":"请输入非负整数","BI-No_More_Data":"无更多数据","BI-Basic_Altogether":"共","BI-Basic_Sunday":"星期日","BI-Widget_Background_Colour":"组件背景","BI-Color_Picker_Error_Text":"请输入0~255的正整数","BI-Multi_Date_Month":"月","BI-No_Selected_Item":"没有可选项","BI-Multi_Date_Year_Begin":"年初","BI-Quarter_1":"第1季度","BI-Quarter_2":"第2季度","BI-Quarter_3":"第3季度","BI-Quarter_4":"第4季度","BI-Multi_Date_Year_Next":"年后","BI-Multi_Date_Month_Prev":"个月前","BI-Month_Trigger_Error_Text":"请输入1~12的正整数","BI-Less_And_Equal":"小于等于","BI-Year_Trigger_Invalid_Text":"请输入有效时间","BI-Multi_Date_Week_Next":"周后","BI-Font_Size":"字号","BI-Basic_Total":"共","BI-Already_Selected":"已选择","BI-Formula_Insert":"插入","BI-Select_All":"全选","BI-Basic_Tuesday":"星期二","BI-Multi_Date_Month_End":"月末","BI-Load_More":"点击加载更多数据","BI-Basic_September":"九月","BI-Current_Is_Last_Page":"当前已是最后一页","BI-Basic_Auto":"自动","BI-Basic_Count":"个","BI-Basic_Value":"值","BI-Basic_Unrestricted":"无限制","BI-Quarter_Trigger_Error_Text":"请输入1~4的正整数","BI-Basic_More":"更多","BI-Basic_Wednesday":"星期三","BI-Basic_Bold":"加粗","BI-Basic_Simple_Saturday":"六","BI-Multi_Date_Month_Next":"个月后","BI-Basic_March":"三月","BI-Current_Is_First_Page":"当前已是第一页","BI-Basic_Thursday":"星期四","BI-Basic_Prompt":"提示","BI-Multi_Date_Today":"今天","BI-Multi_Date_Quarter_Prev":"个季度前","BI-Row_Header":"行表头","BI-Date_Trigger_Error_Text":"日期格式示例:2015-3-11","BI-Basic_Cancel":"取消","BI-Basic_January":"一月","BI-Basic_June":"六月","BI-Basic_July":"七月","BI-Basic_April":"四月","BI-Multi_Date_Quarter_Begin":"季度初","BI-Multi_Date_Week":"周","BI-Click_Blank_To_Select":'点击"空格键"选中完全匹配项',"BI-Basic_August":"八月","BI-Word_Align_Left":"文字居左","BI-Basic_November":"十一月","BI-Font_Colour":"字体颜色","BI-Multi_Date_Day_Prev":"天前","BI-Select_Part":"部分选择","BI-Multi_Date_Day_Next":"天后","BI-Less_Than":"小于","BI-Basic_February":"二月","BI-Multi_Date_Year":"年","BI-Number_Index":"序号","BI-Multi_Date_Week_Prev":"周前","BI-Next_Page":"下一页","BI-Right_Page":"向右翻页","BI-Numerical_Interval_Signal_Value":"前后值相等,请将操作符改为“≤”","BI-Basic_December":"十二月","BI-Basic_Saturday":"星期六","BI-Basic_Simple_Wednesday":"三","BI-Multi_Date_Quarter_Next":"个季度后","BI-Basic_October":"十月","BI-Basic_Simple_Friday":"五","BI-Basic_Save":"保存","BI-Numerical_Interval_Number_Value":"请保证前面的数值小于/等于后面的数值","BI-Previous_Page":"上一页","BI-No_Select":"搜索结果为空","BI-Basic_Clears":"清空","BI-Created_By_Me":"我创建的","BI-Basic_Simple_Tuesday":"二","BI-Word_Align_Right":"文字居右","BI-Summary_Values":"汇总","BI-Basic_Clear":"清除","BI-Upload_File_Size_Error":"文件大小不支持","BI-Up_Page":"向上翻页","BI-Basic_Simple_Sunday":"日","BI-Multi_Date_Relative_Current_Time":"相对当前时间","BI-Selected_Data":"已选数据:","BI-Multi_Date_Quarter":"季度","BI-Check_Selected":"查看已选","BI-Basic_Search":"搜索","BI-Basic_May":"五月","BI-Continue_Select":"继续选择","BI-Please_Input_Positive_Integer":"请输入正整数","BI-Upload_File_Type_Error":"文件类型不支持","BI-Upload_File_Error":"文件上传失败","BI-Basic_Friday":"星期五","BI-Down_Page":"向下翻页","BI-Basic_Monday":"星期一","BI-Left_Page":"向左翻页","BI-Transparent_Color":"透明","BI-Basic_Simple_Monday":"一","BI-Multi_Date_Year_End":"年末","BI-Time_Interval_Error_Text":"请保证开始时间早于/等于结束时间","BI-Basic_Time":"时间","BI-Basic_OK":"确定","BI-Basic_Sure":"确定","BI-Basic_Simple_Thursday":"四","BI-Multi_Date_Year_Prev":"年前","BI-Tiao_Data":"条数据","BI-Basic_Italic":"斜体","BI-Basic_Dynamic_Title":"动态时间","BI-Basic_Year":"年","BI-Basic_Single_Quarter":"季","BI-Basic_Month":"月","BI-Basic_Week":"周","BI-Basic_Day":"天","BI-Basic_Work_Day":"工作日","BI-Basic_Front":"前","BI-Basic_Behind":"后","BI-Basic_Empty":"空","BI-Basic_Month_End":"月末","BI-Basic_Month_Begin":"月初","BI-Basic_Year_End":"年末","BI-Basic_Year_Begin":"年初","BI-Basic_Quarter_End":"季末","BI-Basic_Quarter_Begin":"季初","BI-Basic_Week_End":"周末","BI-Basic_Week_Begin":"周初","BI-Basic_Current_Day":"当天","BI-Basic_Begin_Start":"初","BI-Basic_End_Stop":"末","BI-Basic_Current_Year":"今年","BI-Basic_Year_Fen":"年份","BI-Basic_Current_Month":"本月","BI-Basic_Current_Quarter":"本季度","BI-Basic_Year_Month":"年月","BI-Basic_Year_Quarter":"年季度","BI-Basic_Input_Can_Not_Null":"输入框不能为空","BI-Basic_Date_Time_Error_Text":"日期格式示例:2015-3-11 00:00:00","BI-Basic_Input_From_To_Number":"请输入{R1}的数值","BI-Basic_Or":"或","BI-Basic_And":"且","BI-Conf_Add_Formula":"添加公式","BI-Conf_Add_Condition":"添加条件","BI-Conf_Formula_And":"且公式条件","BI-Conf_Formula_Or":"或公式条件","BI-Conf_Condition_And":"且条件","BI-Conf_Condition_Or":"或条件","BI-Microsoft_YaHei":"微软雅黑","BI-Apple_Light":"苹方-light","BI-Font_Family":"字体","BI-Basic_Please_Input_Content":"请输入内容","BI-Word_Align_Center":"文字居中","BI-Basic_Please_Enter_Number_Between":"请输入{R1}-{R2}的值","BI-More_Than":"大于","BI-More_And_Equal":"大于等于","BI-Please_Enter_SQL":"请输入SQL","BI-Basic_Click_To_Add_Text":'+点击新增"{R1}"',"BI-Basic_Please_Select":"请选择","BI-Basic_Font_Color":"文字颜色","BI-Basic_Background_Color":"背景色","BI-Basic_Underline":"下划线","BI-Basic_Param_Month":"{R1}月","BI-Basic_Param_Day":"{R1}日","BI-Basic_Param_Quarter":"{R1}季度","BI-Basic_Param_Week_Count":"第{R1}周","BI-Basic_Param_Hour":"{R1}时","BI-Basic_Param_Minute":"{R1}分","BI-Basic_Param_Second":"{R1}秒","BI-Basic_Param_Year":"{R1}年","BI-Basic_Date_Day":"日","BI-Basic_Hour_Sin":"时","BI-Basic_Seconds":"秒","BI-Basic_Minute":"分","BI-Basic_Wan":"万","BI-Basic_Million":"百万","BI-Basic_Billion":"亿","BI-Basic_Quarter":"季度","BI-Basic_No_Select":"不选","BI-Basic_Now":"此刻"}},,function(e,t,i){var n=i(23),r=i(15),o=i(726);e.exports=!n&&!r(function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a})},function(e,t,i){var n=i(163);e.exports=n("native-function-to-string",Function.toString)},function(e,t,i){var a=i(25),s=i(63),l=i(783).indexOf,u=i(164);e.exports=function(e,t){var i,n=s(e),r=0,o=[];for(i in n)!a(u,i)&&a(n,i)&&o.push(i);for(;t.length>r;)a(n,i=t[r++])&&(~l(o,i)||o.push(i));return o}},function(e,t,i){function n(s){return function(e,t,i){var n,r=l(e),o=u(r.length),a=c(i,o);if(s&&t!=t){for(;a<o;)if((n=r[a++])!=n)return!0}else for(;a<o;a++)if((s||a in r)&&r[a]===t)return s||a||0;return!s&&-1}}var l=i(63),u=i(644),c=i(1005);e.exports={includes:n(!0),indexOf:n(!1)}},function(e,t,i){var n=i(65);e.exports=n("document","documentElement")},function(e,t,i){var n=i(15);e.exports=!!Object.getOwnPropertySymbols&&!n(function(){return!String(Symbol())})},function(e,t,i){var n=i(52);e.exports=Array.isArray||function(e){return"Array"==n(e)}},function(e,t,i){t.f=i(12)},function(e,t,i){function n(d){var g=1==d,f=2==d,I=3==d,B=4==d,E=6==d,_=5==d||E;return function(e,t,i,n){for(var r,o,a=T(e),s=b(a),l=m(t,i,3),u=y(s.length),c=0,h=n||C,p=g?h(e,u):f?h(e,0):undefined;c<u;c++)if((_||c in s)&&(o=l(r=s[c],c,a),d))if(g)p[c]=o;else if(o)switch(d){case 3:return!0;case 5:return r;case 6:return c;case 2:v.call(p,r)}else if(B)return!1;return E?-1:I||B?B:p}}var m=i(166),b=i(724),T=i(67),y=i(644),C=i(1019),v=[].push;e.exports={forEach:n(0),map:n(1),filter:n(2),some:n(3),every:n(4),find:n(5),findIndex:n(6)}},function(e,t,i){var n=i(15);e.exports=!n(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},function(e,t,i){"use strict";var n=i(15);e.exports=function(e,t){var i=[][e];return!i||!n(function(){i.call(null,t||function(){throw 1},1)})}},function(e,t,i){var n=i(38),r=i(1036),o=Object.prototype;r!==o.toString&&n(o,"toString",r,{unsafe:!0})},function(e,t,i){var r=i(52),o=i(12)("toStringTag"),a="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,i,n;return e===undefined?"Undefined":null===e?"Null":"string"==typeof(i=function(e,t){try{return e[t]}catch(i){}}(t=Object(e),o))?i:a?r(t):"Object"==(n=r(t))&&"function"==typeof t.callee?"Arguments":n}},function(e,t,i){"use strict";var r=i(794).charAt,n=i(53),o=i(733),a="String Iterator",s=n.set,l=n.getterFor(a);o(String,"String",function(e){s(this,{type:a,string:String(e),index:0})},function(){var e,t=l(this),i=t.string,n=t.index;return n>=i.length?{value:undefined,done:!0}:(e=r(i,n),t.index+=e.length,{value:e,done:!1})})},function(e,t,i){function n(s){return function(e,t){var i,n,r=String(u(e)),o=l(t),a=r.length;return o<0||a<=o?s?"":undefined:(i=r.charCodeAt(o))<55296||56319<i||o+1===a||(n=r.charCodeAt(o+1))<56320||57343<n?s?r.charAt(o):i:s?r.slice(o,o+2):n-56320+(i-55296<<10)+65536}}var l=i(645),u=i(641);e.exports={codeAt:n(!1),charAt:n(!0)}},function(e,t,i){"use strict";var n,r,o,a=i(646),s=i(26),l=i(25),u=i(12),c=i(64),h=u("iterator"),p=!1;[].keys&&("next"in(o=[].keys())?(r=a(a(o)))!==Object.prototype&&(n=r):p=!0),n==undefined&&(n={}),c||l(n,h)||s(n,h,function(){return this}),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:p}},function(e,t,i){var n=i(11),r=i(1039),o=i(1040),a=i(26),s=i(12),l=s("iterator"),u=s("toStringTag"),c=o.values;for(var h in r){var p=n[h],d=p&&p.prototype;if(d){if(d[l]!==c)try{a(d,l,c)}catch(f){d[l]=c}if(d[u]||a(d,u,h),r[h])for(var g in o)if(d[g]!==o[g])try{a(d,g,o[g])}catch(f){d[g]=o[g]}}}},function(e,t,i){var n=i(11);e.exports=n.Promise},function(e,t,i){var r=i(38);e.exports=function(e,t,i){for(var n in t)r(e,n,t[n],i);return e}},function(e,t,i){"use strict";var n=i(65),r=i(27),o=i(12),a=i(23),s=o("species");e.exports=function(e){var t=n(e),i=r.f;a&&t&&!t[s]&&i(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,i){var r=i(12)("iterator"),o=!1;try{var n=0,a={next:function(){return{done:!!n++}},"return":function(){o=!0}};a[r]=function(){return this},Array.from(a,function(){throw 2})}catch(s){}e.exports=function(e,t){if(!t&&!o)return!1;var i=!1;try{var n={};n[r]=function(){return{next:function(){return{done:i=!0}}}},e(n)}catch(s){}return i}},function(e,t,i){var r=i(19),o=i(54),a=i(12)("species");e.exports=function(e,t){var i,n=r(e).constructor;return n===undefined||(i=r(n)[a])==undefined?t:o(i)}},function(e,t,i){function n(e){if(C.hasOwnProperty(e)){var t=C[e];delete C[e],t()}}function r(e){return function(){n(e)}}function o(e){n(e.data)}function a(e){c.postMessage(e+"",B.protocol+"//"+B.host)}var s,l,u,c=i(11),h=i(15),p=i(52),d=i(166),g=i(784),f=i(726),I=i(736),B=c.location,E=c.setImmediate,_=c.clearImmediate,m=c.process,b=c.MessageChannel,T=c.Dispatch,y=0,C={},v="onreadystatechange";E&&_||(E=function(e){for(var t=[],i=1;i<arguments.length;)t.push(arguments[i++]);return C[++y]=function(){("function"==typeof e?e:Function(e)).apply(undefined,t)},s(y),y},_=function(e){delete C[e]},"process"==p(m)?s=function(e){m.nextTick(r(e))}:T&&T.now?s=function(e){T.now(r(e))}:b&&!/(iphone|ipod|ipad).*applewebkit/i.test(I)?(u=(l=new b).port2,l.port1.onmessage=o,s=d(u.postMessage,u,1)):!c.addEventListener||"function"!=typeof postMessage||c.importScripts||h(a)?s=v in f("script")?function(e){g.appendChild(f("script"))[v]=function(){g.removeChild(this),n(e)}}:function(e){setTimeout(r(e),0)}:(s=a,c.addEventListener("message",o,!1))),e.exports={set:E,clear:_}},function(e,t,i){var n=i(19),r=i(18),o=i(168);e.exports=function(e,t){if(n(e),r(t)&&t.constructor===e)return t;var i=o.f(e);return(0,i.resolve)(t),i.promise}},function(e,t,i){"use strict";var n=i(13),u=i(54),r=i(168),o=i(648),c=i(68);n({target:"Promise",stat:!0},{allSettled:function(e){var s=this,t=r.f(s),l=t.resolve,i=t.reject,n=o(function(){var n=u(s.resolve),r=[],o=0,a=1;c(e,function(e){var t=o++,i=!1;r.push(undefined),a++,n.call(s,e).then(function(e){i||(i=!0,r[t]={status:"fulfilled",value:e},--a||l(r))},function(e){i||(i=!0,r[t]={status:"rejected",reason:e},--a||l(r))})}),--a||l(r)});return n.error&&i(n.value),t.promise}})},function(e,t,i){"use strict";var n,r,o=i(1057),a=RegExp.prototype.exec,s=String.prototype.replace,l=a,u=(n=/a/,r=/b*/g,a.call(n,"a"),a.call(r,"a"),0!==n.lastIndex||0!==r.lastIndex),c=/()??/.exec("")[1]!==undefined;(u||c)&&(l=function(e){var t,i,n,r;return c&&(i=new RegExp("^"+this.source+"$(?!\\s)",o.call(this))),u&&(t=this.lastIndex),n=a.call(this,e),u&&n&&(this.lastIndex=this.global?n.index+n[0].length:t),c&&n&&1<n.length&&s.call(n[0],i,function(){for(r=1;r<arguments.length-2;r++)arguments[r]===undefined&&(n[r]=undefined)}),n}),e.exports=l},function(e,t,i){function n(e){s(e,c,{value:{objectID:"O"+ ++h,weakData:{}}})}var r=i(164),o=i(18),a=i(25),s=i(27).f,l=i(643),u=i(1063),c=l("meta"),h=0,p=Object.isExtensible||function(){return!0},d=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,c)){if(!p(e))return"F";if(!t)return"E";n(e)}return e[c].objectID},getWeakData:function(e,t){if(!a(e,c)){if(!p(e))return!0;if(!t)return!1;n(e)}return e[c].weakData},onFreeze:function(e){return u&&d.REQUIRED&&p(e)&&!a(e,c)&&n(e),e}};r[c]=!0},function(e,t){e.exports=_},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){},function(e,t,i){e.exports=i(999)},function(e,t,i){i(1e3);var n=i(34).Object,r=e.exports=function r(e,t,i){return n.defineProperty(e,t,i)};n.defineProperty.sham&&(r.sham=!0)},function(e,t,i){var n=i(13),r=i(23);n({target:"Object",stat:!0,forced:!r,sham:!r},{defineProperty:i(27).f})},function(e,t,i){var n=i(11),r=i(727),o="__core-js_shared__",a=n[o]||r(o,{});e.exports=a},function(e,t,i){var n=i(11),r=i(781),o=n.WeakMap;e.exports="function"==typeof o&&/native code/.test(r.call(o))},function(e,t,i){var s=i(25),l=i(1004),u=i(640),c=i(27);e.exports=function(e,t){for(var i=l(t),n=c.f,r=u.f,o=0;o<i.length;o++){var a=i[o];s(e,a)||n(e,a,r(t,a))}}},function(e,t,i){var n=i(65),r=i(728),o=i(730),a=i(19);e.exports=n("Reflect","ownKeys")||function(e){var t=r.f(a(e)),i=o.f;return i?t.concat(i(e)):t}},function(e,t,i){var n=i(645),r=Math.max,o=Math.min;e.exports=function(e,t){var i=n(e);return i<0?r(i+t,0):o(i,t)}},function(e,t,i){e.exports=i(1007)},function(e,t,i){i(1008);var n=i(34).Object;e.exports=function(e,t){return n.create(e,t)}},function(e,t,i){i(13)({target:"Object",stat:!0,sham:!i(23)},{create:i(66)})},function(e,t,i){var n=i(23),a=i(27),s=i(19),l=i(732);e.exports=n?Object.defineProperties:function(e,t){s(e);for(var i,n=l(t),r=n.length,o=0;o<r;)a.f(e,i=n[o++],t[i]);return e}},function(e,t,i){e.exports=i(1011)},function(e,t,i){i(1012);var n=i(34);e.exports=n.Object.assign},function(e,t,i){var n=i(13),r=i(1013);n({target:"Object",stat:!0,forced:Object.assign!==r},{assign:r})},function(e,t,i){"use strict";var p=i(23),n=i(15),d=i(732),g=i(730),f=i(723),I=i(67),B=i(724),r=Object.assign;e.exports=!r||n(function(){var e={},t={},i=Symbol(),n="abcdefghijklmnopqrst";return e[i]=7,n.split("").forEach(function(e){t[e]=e}),7!=r({},e)[i]||d(r({},t)).join("")!=n})?function(e,t){for(var i=I(e),n=arguments.length,r=1,o=g.f,a=f.f;r<n;)for(var s,l=B(arguments[r++]),u=o?d(l).concat(o(l)):d(l),c=u.length,h=0;h<c;)s=u[h++],p&&!a.call(l,s)||(i[s]=l[s]);return i}:r},function(e,t,i){e.exports=i(1015)},function(e,t,i){i(1016);var n=i(34);e.exports=n.Object.getOwnPropertySymbols},function(e,t,i){"use strict";function n(e,t){var i=te[e]=b(Q[G]);return X(i,{type:F,tag:e,description:t}),c||(i.description=t),i}function r(t,e){I(t);var i=E(e),n=T(i).concat(pe(i));return W(n,function(e){c&&!he.call(i,e)||ce(t,e,i[e])}),t}function o(e,t){var i=E(e),n=_(t,!0);if(i!==K||!d(te,n)||d(ie,n)){var r=j(i,n);return!r||!d(te,n)||d(i,O)&&i[O][n]||(r.enumerable=!0),r}}function a(e){var t=$(E(e)),i=[];return W(t,function(e){d(te,e)||d(D,e)||i.push(e)}),i}var s=i(13),l=i(11),u=i(64),c=i(23),h=i(785),p=i(15),d=i(25),g=i(786),f=i(18),I=i(19),B=i(67),E=i(63),_=i(725),m=i(162),b=i(66),T=i(732),y=i(728),C=i(1017),v=i(730),N=i(640),V=i(27),S=i(723),x=i(26),L=i(38),w=i(163),A=i(642),D=i(164),M=i(643),k=i(12),P=i(787),H=i(1018),R=i(165),Y=i(53),W=i(788).forEach,O=A("hidden"),F="Symbol",G="prototype",Z=k("toPrimitive"),X=Y.set,J=Y.getterFor(F),K=Object[G],Q=l.Symbol,U=l.JSON,z=U&&U.stringify,j=N.f,q=V.f,$=C.f,ee=S.f,te=w("symbols"),ie=w("op-symbols"),ne=w("string-to-symbol-registry"),re=w("symbol-to-string-registry"),oe=w("wks"),ae=l.QObject,se=!ae||!ae[G]||!ae[G].findChild,le=c&&p(function(){return 7!=b(q({},"a",{get:function(){return q(this,"a",{value:7}).a}})).a})?function(e,t,i){var n=j(K,t);n&&delete K[t],q(e,t,i),n&&e!==K&&q(K,t,n)}:q,ue=h&&"symbol"==typeof Q.iterator?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof Q},ce=function(e,t,i){e===K&&ce(ie,t,i),I(e);var n=_(t,!0);return I(i),d(te,n)?(i.enumerable?(d(e,O)&&e[O][n]&&(e[O][n]=!1),i=b(i,{enumerable:m(0,!1)})):(d(e,O)||q(e,O,m(1,{})),e[O][n]=!0),le(e,n,i)):q(e,n,i)},he=function(e){var t=_(e,!0),i=ee.call(this,t);return!(this===K&&d(te,t)&&!d(ie,t))&&(!(i||!d(this,t)||!d(te,t)||d(this,O)&&this[O][t])||i)},pe=function(e){var t=e===K,i=$(t?ie:E(e)),n=[];return W(i,function(e){!d(te,e)||t&&!d(K,e)||n.push(te[e])}),n};h||(L((Q=function(){if(this instanceof Q)throw TypeError("Symbol is not a constructor");var e=arguments.length&&arguments[0]!==undefined?String(arguments[0]):undefined,t=M(e),i=function(e){this===K&&i.call(ie,e),d(this,O)&&d(this[O],t)&&(this[O][t]=!1),le(this,t,m(1,e))};return c&&se&&le(K,t,{configurable:!0,set:i}),n(t,e)})[G],"toString",function(){return J(this).tag}),S.f=he,V.f=ce,N.f=o,y.f=C.f=a,v.f=pe,c&&(q(Q[G],"description",{configurable:!0,get:function(){return J(this).description}}),u||L(K,"propertyIsEnumerable",he,{unsafe:!0})),P.f=function(e){return n(k(e),e)}),s({global:!0,wrap:!0,forced:!h,sham:!h},{Symbol:Q}),W(T(oe),function(e){H(e)}),s({target:F,stat:!0,forced:!h},{"for":function(e){var t=String(e);if(d(ne,t))return ne[t];var i=Q(t);return ne[t]=i,re[i]=t,i},keyFor:function(e){if(!ue(e))throw TypeError(e+" is not a symbol");if(d(re,e))return re[e]},useSetter:function(){se=!0},useSimple:function(){se=!1}}),s({target:"Object",stat:!0,forced:!h,sham:!c},{create:function(e,t){return t===undefined?b(e):r(b(e),t)},defineProperty:ce,defineProperties:r,getOwnPropertyDescriptor:o}),s({target:"Object",stat:!0,forced:!h},{getOwnPropertyNames:a,getOwnPropertySymbols:pe}),s({target:"Object",stat:!0,forced:p(function(){v.f(1)})},{getOwnPropertySymbols:function(e){return v.f(B(e))}}),U&&s({target:"JSON",stat:!0,forced:!h||p(function(){var e=Q();return"[null]"!=z([e])||"{}"!=z({a:e})||"{}"!=z(Object(e))})},{stringify:function(e){for(var t,i,n=[e],r=1;r<arguments.length;)n.push(arguments[r++]);if(i=t=n[1],(f(t)||e!==undefined)&&!ue(e))return g(t)||(t=function(e,t){if("function"==typeof i&&(t=i.call(this,e,t)),!ue(t))return t}),n[1]=t,z.apply(U,n)}}),Q[G][Z]||x(Q[G],Z,Q[G].valueOf),R(Q,F),D[O]=!0},function(e,t,i){var n=i(63),r=i(728).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?function(e){try{return r(e)}catch(t){return a.slice()}}(e):r(n(e))}},function(e,t,i){var n=i(34),r=i(25),o=i(787),a=i(27).f;e.exports=function(e){var t=n.Symbol||(n.Symbol={});r(t,e)||a(t,e,{value:o.f(e)})}},function(e,t,i){var n=i(18),r=i(786),o=i(12)("species");e.exports=function(e,t){var i;return r(e)&&("function"!=typeof(i=e.constructor)||i!==Array&&!r(i.prototype)?n(i)&&null===(i=i[o])&&(i=undefined):i=undefined),new(i===undefined?Array:i)(0===t?0:t)}},function(e,t,i){e.exports=i(1021)},function(e,t,i){i(1022);var n=i(34);e.exports=n.Object.getPrototypeOf},function(e,t,i){var n=i(13),r=i(15),o=i(67),a=i(646),s=i(789);n({target:"Object",stat:!0,forced:r(function(){a(1)}),sham:!s},{getPrototypeOf:function(e){return a(o(e))}})},function(e,t,i){e.exports=i(1024)},function(e,t,i){i(1025);var n=i(647);e.exports=n("Array","forEach")},function(e,t,i){"use strict";var n=i(13),r=i(1026);n({target:"Array",proto:!0,forced:[].forEach!=r},{forEach:r})},function(e,t,i){"use strict";var n=i(788).forEach,r=i(790);e.exports=r("forEach")?function(e){return n(this,e,1<arguments.length?arguments[1]:undefined)}:[].forEach},function(e,t,i){e.exports=i(1028)},function(e,t,i){i(1029);var n=i(647);e.exports=n("Array","indexOf")},function(e,t,i){"use strict";var n=i(13),r=i(783).indexOf,o=i(790),a=[].indexOf,s=!!a&&1/[1].indexOf(1,-0)<0,l=o("indexOf");n({target:"Array",proto:!0,forced:s||l},{indexOf:function(e){return s?a.apply(this,arguments)||0:r(this,e,1<arguments.length?arguments[1]:undefined)}})},function(e,t,i){e.exports=i(1031)},function(e,t,i){i(1032);var n=i(647);e.exports=n("Function","bind")},function(e,t,i){i(13)({target:"Function",proto:!0},{bind:i(1033)})},function(e,t,i){"use strict";var o=i(54),a=i(18),s=[].slice,l={};e.exports=Function.bind||function(t){var i=o(this),n=s.call(arguments,1),r=function(){var e=n.concat(s.call(arguments));return this instanceof r?function(e,t,i){if(!(t in l)){for(var n=[],r=0;r<t;r++)n[r]="a["+r+"]";l[t]=Function("C,a","return new C("+n.join(",")+")")}return l[t](e,i)}(i,e.length,e):i.apply(t,e)};return a(i.prototype)&&(r.prototype=i.prototype),r}},function(e,t,i){e.exports=i(1035),i(1049),i(1050),i(1051),i(1052)},function(e,t,i){i(791),i(793),i(796),i(1042),i(804),i(1048);var n=i(34);e.exports=n.Promise},function(e,t,i){"use strict";var n=i(792),r={};r[i(12)("toStringTag")]="z",e.exports="[object z]"!==String(r)?function(){return"[object "+n(this)+"]"}:r.toString},function(e,t,i){"use strict";function r(){return this}var o=i(795).IteratorPrototype,a=i(66),s=i(162),l=i(165),u=i(167);e.exports=function(e,t,i){var n=t+" Iterator";return e.prototype=a(o,{next:s(1,i)}),l(e,n,!1,!0),u[n]=r,e}},function(e,t,i){var n=i(18);e.exports=function(e){if(!n(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,i){"use strict";var n=i(63),r=i(1041),o=i(167),a=i(53),s=i(733),l="Array Iterator",u=a.set,c=a.getterFor(l);e.exports=s(Array,"Array",function(e,t){u(this,{type:l,target:n(e),index:0,kind:t})},function(){var e=c(this),t=e.target,i=e.kind,n=e.index++;return!t||n>=t.length?(e.target=undefined,{value:undefined,done:!0}):"keys"==i?{value:n,done:!1}:"values"==i?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(e,t,i){var n=i(12),r=i(66),o=i(26),a=n("unscopables"),s=Array.prototype;s[a]==undefined&&o(s,a,r(null)),e.exports=function(e){s[a][e]=!0}},function(e,t,i){"use strict";function I(e){var t;return!(!b(e)||"function"!=typeof(t=e.then))&&t}function a(p,d,g){if(!d.notified){d.notified=!0;var f=d.reactions;x(function(){for(var e=d.value,t=1==d.state,i=0;f.length>i;){var n,r,o,a=f[i++],s=t?a.ok:a.fail,l=a.resolve,u=a.reject,c=a.domain;try{s?(t||(2===d.rejection&&re(p,d),d.rejection=1),!0===s?n=e:(c&&c.enter(),n=s(e),c&&(c.exit(),o=!0)),n===a.promise?u(G("Promise-chain cycle")):(r=I(n))?r.call(n,l,u):l(n)):u(e)}catch(h){c&&!o&&c.exit(),u(h)}}d.reactions=[],d.notified=!1,g&&!d.rejection&&ie(p,d)})}}function r(e,t,i){var n,r;q?((n=Z.createEvent("Event")).promise=t,n.reason=i,n.initEvent(e,!1,!0),d.dispatchEvent(n)):n={promise:t,reason:i},(r=d["on"+e])?r(n):e===$&&w("Unhandled promise rejection",i)}function s(t,i,n,r){return function(e){t(i,n,e,r)}}function l(e,t,i,n){t.done||(t.done=!0,n&&(t=n),t.value=i,t.state=2,a(e,t,!0))}var n,o,u,c,h=i(13),p=i(64),d=i(11),g=i(34),f=i(797),B=i(38),E=i(798),_=i(165),m=i(799),b=i(18),T=i(54),y=i(735),C=i(52),v=i(68),N=i(800),V=i(801),S=i(802).set,x=i(1046),L=i(803),w=i(1047),A=i(168),D=i(648),M=i(736),k=i(53),P=i(731),H=i(12)("species"),R="Promise",Y=k.get,W=k.set,O=k.getterFor(R),F=f,G=d.TypeError,Z=d.document,X=d.process,J=d.fetch,K=X&&X.versions,Q=K&&K.v8||"",U=A.f,z=U,j="process"==C(X),q=!!(Z&&Z.createEvent&&d.dispatchEvent),$="unhandledrejection",ee=P(R,function(){function t(){}var e=F.resolve(1),i=(e.constructor={})[H]=function(e){e(t,t)};return!((j||"function"==typeof PromiseRejectionEvent)&&(!p||e["finally"])&&e.then(t)instanceof i&&0!==Q.indexOf("6.6")&&-1===M.indexOf("Chrome/66"))}),te=ee||!N(function(e){F.all(e)["catch"](function(){})}),ie=function(i,n){S.call(d,function(){var e,t=n.value;if(ne(n)&&(e=D(function(){j?X.emit("unhandledRejection",t,i):r($,i,t)}),n.rejection=j||ne(n)?2:1,e.error))throw e.value})},ne=function(e){return 1!==e.rejection&&!e.parent},re=function(e,t){S.call(d,function(){j?X.emit("rejectionHandled",e):r("rejectionhandled",e,t.value)})},oe=function(i,n,r,e){if(!n.done){n.done=!0,e&&(n=e);try{if(i===r)throw G("Promise can't be resolved itself");var o=I(r);o?x(function(){var e={done:!1};try{o.call(r,s(oe,i,e,n),s(l,i,e,n))}catch(t){l(i,e,t,n)}}):(n.value=r,n.state=1,a(i,n,!1))}catch(t){l(i,{done:!1},t,n)}}};ee&&(F=function(e){y(this,F,R),T(e),n.call(this);var t=Y(this);try{e(s(oe,this,t),s(l,this,t))}catch(i){l(this,t,i)}},(n=function(e){W(this,{type:R,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:undefined})}).prototype=E(F.prototype,{then:function(e,t){var i=O(this),n=U(V(this,F));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=j?X.domain:undefined,i.parent=!0,i.reactions.push(n),0!=i.state&&a(this,i,!1),n.promise},"catch":function(e){return this.then(undefined,e)}}),o=function(){var e=new n,t=Y(e);this.promise=e,this.resolve=s(oe,e,t),this.reject=s(l,e,t)},A.f=U=function(e){return e===F||e===u?new o(e):z(e)},p||"function"!=typeof f||(c=f.prototype.then,B(f.prototype,"then",function(e,t){var i=this;return new F(function(e,t){c.call(i,e,t)}).then(e,t)},{unsafe:!0}),"function"==typeof J&&h({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return L(F,J.apply(d,arguments))}}))),h({global:!0,wrap:!0,forced:ee},{Promise:F}),_(F,R,!1,!0),m(R),u=g[R],h({target:R,stat:!0,forced:ee},{reject:function(e){var t=U(this);return t.reject.call(undefined,e),t.promise}}),h({target:R,stat:!0,forced:p||ee},{resolve:function(e){return L(p&&this===u?F:this,e)}}),h({target:R,stat:!0,forced:te},{all:function(e){var s=this,t=U(s),l=t.resolve,u=t.reject,i=D(function(){var n=T(s.resolve),r=[],o=0,a=1;v(e,function(e){var t=o++,i=!1;r.push(undefined),a++,n.call(s,e).then(function(e){i||(i=!0,r[t]=e,--a||l(r))},u)}),--a||l(r)});return i.error&&u(i.value),t.promise},race:function(e){var i=this,n=U(i),r=n.reject,t=D(function(){var t=T(i.resolve);v(e,function(e){t.call(i,e).then(n.resolve,r)})});return t.error&&r(t.value),n.promise}})},function(e,t,i){var n=i(12),r=i(167),o=n("iterator"),a=Array.prototype;e.exports=function(e){return e!==undefined&&(r.Array===e||a[o]===e)}},function(e,t,i){var n=i(792),r=i(167),o=i(12)("iterator");e.exports=function(e){if(e!=undefined)return e[o]||e["@@iterator"]||r[n(e)]}},function(e,t,i){var a=i(19);e.exports=function(e,t,i,n){try{return n?t(a(i)[0],i[1]):t(i)}catch(o){var r=e["return"];throw r!==undefined&&a(r.call(e)),o}}},function(e,t,i){var n,r,o,a,s,l,u,c,h=i(11),p=i(640).f,d=i(52),g=i(802).set,f=i(736),I=h.MutationObserver||h.WebKitMutationObserver,B=h.process,E=h.Promise,_="process"==d(B),m=p(h,"queueMicrotask"),b=m&&m.value;b||(n=function(){var e,t;for(_&&(e=B.domain)&&e.exit();r;){t=r.fn,r=r.next;try{t()}catch(i){throw r?a():o=undefined,i}}o=undefined,e&&e.enter()},a=_?function(){B.nextTick(n)}:I&&!/(iphone|ipod|ipad).*applewebkit/i.test(f)?(s=!0,l=document.createTextNode(""),new I(n).observe(l,{characterData:!0}),function(){l.data=s=!s}):E&&E.resolve?(u=E.resolve(undefined),c=u.then,function(){c.call(u,n)}):function(){g.call(h,n)}),e.exports=b||function(e){var t={fn:e,next:undefined};o&&(o.next=t),r||(r=t,a()),o=t}},function(e,t,i){var n=i(11);e.exports=function(e,t){var i=n.console;i&&i.error&&(1===arguments.length?i.error(e):i.error(e,t))}},function(e,t,i){"use strict";var n=i(13),r=i(64),o=i(797),a=i(65),s=i(801),l=i(803),u=i(38);n({target:"Promise",proto:!0,real:!0},{"finally":function(t){var i=s(this,a("Promise")),e="function"==typeof t;return this.then(e?function(e){return l(i,t()).then(function(){return e})}:t,e?function(e){return l(i,t()).then(function(){throw e})}:t)}}),r||"function"!=typeof o||o.prototype["finally"]||u(o.prototype,"finally",a("Promise").prototype["finally"])},function(e,t,i){"use strict";var n=i(13),r=i(23),o=i(646),a=i(734),s=i(66),l=i(27),u=i(162),c=i(68),h=i(26),p=i(19),d=i(53),g=d.set,f=d.getterFor("AggregateError"),I=function(e,t){var i=this;if(!(i instanceof I))return new I(e,t);a&&(i=a(new Error(t),o(i)));var n=[];return c(e,n.push,n),r?g(i,{errors:n,type:"AggregateError"}):i.errors=n,t!==undefined&&h(i,"message",String(t)),i};I.prototype=s(Error.prototype,{constructor:u(5,I),message:u(5,""),name:u(5,"AggregateError"),toString:u(5,function(){var e=p(this).name;e=e===undefined?"AggregateError":String(e);var t=this.message;return e+": "+(t=t===undefined?"":String(t))})}),r&&l.f(I.prototype,"errors",{get:function(){return f(this).errors},configurable:!0}),n({global:!0},{AggregateError:I})},function(e,t,i){i(804)},function(e,t,i){"use strict";var n=i(13),r=i(168),o=i(648);n({target:"Promise",stat:!0},{"try":function(e){var t=r.f(this),i=o(e);return(i.error?t.reject:t.resolve)(i.value),t.promise}})},function(e,t,i){"use strict";var n=i(13),h=i(54),p=i(65),r=i(168),o=i(648),d=i(68),g="No one promise resolved";n({target:"Promise",stat:!0},{any:function(e){var l=this,t=r.f(l),u=t.resolve,c=t.reject,i=o(function(){var n=h(l.resolve),r=[],o=0,a=1,s=!1;d(e,function(e){var t=o++,i=!1;r.push(undefined),a++,n.call(l,e).then(function(e){i||s||(s=!0,u(e))},function(e){i||s||(i=!0,r[t]=e,--a||c(new(p("AggregateError"))(r,g)))})}),--a||c(new(p("AggregateError"))(r,g))});return i.error&&c(i.value),t.promise}})},function(e,t,i){e.exports=i(1054)},function(e,t,i){i(1055);var n=i(647);e.exports=n("String","replace")},function(e,t,i){"use strict";var n=i(1056),C=i(19),p=i(67),v=i(644),N=i(645),o=i(641),V=i(1058),S=i(1059),x=Math.max,L=Math.min,d=Math.floor,g=/\$([$&'`]|\d\d?|<[^>]*>)/g,f=/\$([$&'`]|\d\d?)/g;n("replace",2,function(r,b,T){return[function(e,t){var i=o(this),n=e==undefined?undefined:e[r];return n!==undefined?n.call(e,i,t):b.call(String(i),e,t)},function(e,t){var i=T(b,e,this,t);if(i.done)return i.value;var n=C(e),r=String(this),o="function"==typeof t;o||(t=String(t));var a=n.global;if(a){var s=n.unicode;n.lastIndex=0}for(var l=[];;){var u=S(n,r);if(null===u)break;if(l.push(u),!a)break;""===String(u[0])&&(n.lastIndex=V(r,v(n.lastIndex),s))}for(var c,h="",p=0,d=0;d<l.length;d++){u=l[d];for(var g=String(u[0]),f=x(L(N(u.index),r.length),0),I=[],B=1;B<u.length;B++)I.push((c=u[B])===undefined?c:String(c));var E=u.groups;if(o){var _=[g].concat(I,f,r);E!==undefined&&_.push(E);var m=String(t.apply(undefined,_))}else m=y(g,r,f,I,E,t);p<=f&&(h+=r.slice(p,f)+m,p=f+g.length)}return h+r.slice(p)}];function y(o,a,s,l,u,e){var c=s+o.length,h=l.length,t=f;return u!==undefined&&(u=p(u),t=g),b.call(e,t,function(e,t){var i;switch(t.charAt(0)){case"$":return"$";case"&":return o;case"`":return a.slice(0,s);case"'":return a.slice(c);case"<":i=u[t.slice(1,-1)];break;default:var n=+t;if(0==n)return e;if(h<n){var r=d(n/10);return 0===r?e:r<=h?l[r-1]===undefined?t.charAt(1):l[r-1]+t.charAt(1):e}i=l[n-1]}return i===undefined?"":i})}})},function(e,t,i){"use strict";var h=i(26),p=i(38),d=i(15),g=i(12),f=i(805),I=g("species"),B=!d(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}),E=!d(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var i="ab".split(e);return 2!==i.length||"a"!==i[0]||"b"!==i[1]});e.exports=function(i,e,t,n){var r=g(i),o=!d(function(){var e={};return e[r]=function(){return 7},7!=""[i](e)}),a=o&&!d(function(){var e=!1,t=/a/;return t.exec=function(){return e=!0,null},"split"===i&&(t.constructor={},t.constructor[I]=function(){return t}),t[r](""),!e});if(!o||!a||"replace"===i&&!B||"split"===i&&!E){var s=/./[r],l=t(r,""[i],function(e,t,i,n,r){return t.exec===f?o&&!r?{done:!0,value:s.call(t,i,n)}:{done:!0,value:e.call(i,t,n)}:{done:!1}}),u=l[0],c=l[1];p(String.prototype,i,u),p(RegExp.prototype,r,2==e?function(e,t){return c.call(e,this,t)}:function(e){return c.call(e,this)}),n&&h(RegExp.prototype[r],"sham",!0)}}},function(e,t,i){"use strict";var n=i(19);e.exports=function(){var e=n(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,i){"use strict";var n=i(794).charAt;e.exports=function(e,t,i){return t+(i?n(e,t).length:1)}},function(e,t,i){var r=i(52),o=i(805);e.exports=function(e,t){var i=e.exec;if("function"==typeof i){var n=i.call(e,t);if("object"!=typeof n)throw TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return o.call(e,t)}},function(e,t,i){i(1061),i(791),i(793),i(796);var n=i(34);e.exports=n.Map},function(e,t,i){"use strict";var n=i(1062),r=i(1065);e.exports=n("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}},r,!0)},function(e,t,i){"use strict";var I=i(13),B=i(11),E=i(731),_=i(38),m=i(806),b=i(68),T=i(735),y=i(18),C=i(15),v=i(800),N=i(165),V=i(1064);e.exports=function(n,e,t,r,o){function i(e){var i=s[e];_(s,e,"add"==e?function(e){return i.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(o&&!y(e))&&i.call(this,0===e?0:e)}:"get"==e?function(e){return o&&!y(e)?undefined:i.call(this,0===e?0:e)}:"has"==e?function(e){return!(o&&!y(e))&&i.call(this,0===e?0:e)}:function(e,t){return i.call(this,0===e?0:e,t),this})}var a=B[n],s=a&&a.prototype,l=a,u=r?"set":"add",c={};if(E(n,"function"!=typeof a||!(o||s.forEach&&!C(function(){(new a).entries().next()}))))l=t.getConstructor(e,n,r,u),m.REQUIRED=!0;else if(E(n,!0)){var h=new l,p=h[u](o?{}:-0,1)!=h,d=C(function(){h.has(1)}),g=v(function(e){new a(e)}),f=!o&&C(function(){for(var e=new a,t=5;t--;)e[u](t,t);return!e.has(-0)});g||(((l=e(function(e,t){T(e,l,n);var i=V(new a,e,l);return t!=undefined&&b(t,i[u],i,r),i})).prototype=s).constructor=l),(d||f)&&(i("delete"),i("has"),r&&i("get")),(f||p)&&i(u),o&&s.clear&&delete s.clear}return c[n]=l,I({global:!0,forced:l!=a},c),N(l,n),o||t.setStrong(l,n,r),l}},function(e,t,i){var n=i(15);e.exports=!n(function(){return Object.isExtensible(Object.preventExtensions({}))})},function(e,t,i){var o=i(18),a=i(734);e.exports=function(e,t,i){var n,r;return a&&"function"==typeof(n=t.constructor)&&n!==i&&o(r=n.prototype)&&r!==i.prototype&&a(e,r),e}},function(e,t,i){"use strict";var u=i(27).f,c=i(66),h=i(798),p=i(166),d=i(735),g=i(68),a=i(733),s=i(799),f=i(23),I=i(806).fastKey,n=i(53),B=n.set,E=n.getterFor;e.exports={getConstructor:function(e,i,n,r){function o(e,t,i){var n,r,o=s(e),a=l(e,t);return a?a.value=i:(o.last=a={index:r=I(t,!0),key:t,value:i,previous:n=o.last,next:undefined,removed:!1},o.first||(o.first=a),n&&(n.next=a),f?o.size++:e.size++,"F"!==r&&(o.index[r]=a)),e}var a=e(function(e,t){d(e,a,i),B(e,{type:i,index:c(null),first:undefined,last:undefined,size:0}),f||(e.size=0),t!=undefined&&g(t,e[r],e,n)}),s=E(i),l=function(e,t){var i,n=s(e),r=I(t);if("F"!==r)return n.index[r];for(i=n.first;i;i=i.next)if(i.key==t)return i};return h(a.prototype,{clear:function(){for(var e=s(this),t=e.index,i=e.first;i;)i.removed=!0,i.previous&&(i.previous=i.previous.next=undefined),delete t[i.index],i=i.next;e.first=e.last=undefined,f?e.size=0:this.size=0},"delete":function(e){var t=s(this),i=l(this,e);if(i){var n=i.next,r=i.previous;delete t.index[i.index],i.removed=!0,r&&(r.next=n),n&&(n.previous=r),t.first==i&&(t.first=n),t.last==i&&(t.last=r),f?t.size--:this.size--}return!!i},forEach:function(e){for(var t,i=s(this),n=p(e,1<arguments.length?arguments[1]:undefined,3);t=t?t.next:i.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!l(this,e)}}),h(a.prototype,n?{get:function(e){var t=l(this,e);return t&&t.value},set:function(e,t){return o(this,0===e?0:e,t)}}:{add:function(e){return o(this,e=0===e?0:e,e)}}),f&&u(a.prototype,"size",{get:function(){return s(this).size}}),a},setStrong:function(e,t,i){var n=t+" Iterator",r=E(t),o=E(n);a(e,t,function(e,t){B(this,{type:n,target:e,state:r(e),kind:t,last:undefined})},function(){for(var e=o(this),t=e.kind,i=e.last;i&&i.removed;)i=i.previous;return e.target&&(e.last=i=i?i.next:e.state.first)?"keys"==t?{value:i.key,done:!1}:"values"==t?{value:i.value,done:!1}:{value:[i.key,i.value],done:!1}:(e.target=undefined,{value:undefined,done:!0})},i?"entries":"values",!i,!0),s(t)}}},function(e,t,i){"use strict";var n=function s(e){if(e&&e.__esModule)return e;var t=a();if(t&&t.has(e))return t.get(e);var i={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var o=n?Object.getOwnPropertyDescriptor(e,r):null;o&&(o.get||o.set)?Object.defineProperty(i,r,o):i[r]=e[r]}}i["default"]=e,t&&t.set(e,i);return i}(i(1067));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}_global.Fix=n},function(e,t,i){(function(Z){function X(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}!function(e,t,g){"use strict";g="default"in g?g["default"]:g;var i=void 0,f={$accessors:i,$vbthis:i,$vbsetter:i,$vm:i},p=["$accessors","$vbthis","$vbsetter","$vm"],n=[];function d(e,t,i){}function s(e){return"function"==typeof e&&/native code/.test(e.toString())}g.each(["slice","splice"],function(e){n[e]=Array.prototype[e]}),Array.prototype.splice=function(){this.__ref__=I();for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return n.splice.apply(this,t)};var r=/\d\.\d{4}/;function I(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:"bi";return String(Math.random()+Math.random()).replace(r,e)}!function Y(){return"undefined"!=typeof navigator&&/(msie|trident)/i.test(navigator.userAgent.toLowerCase())}()||function W(){var e=0;if("undefined"==typeof navigator)return!1;var t=navigator.userAgent.toLowerCase(),i=t.match(/(?:msie\s([\w.]+))/),n=t.match(/(?:trident.*rv:([\w.]+))/);e=i&&n&&i[1]&&n[1]?Math.max(1*i[1],1*n[1]):i&&i[1]?1*i[1]:n&&n[1]?1*n[1]:0;return e}();var o=Object.prototype.toString;function B(e){return"[object Object]"===o.call(e)}var a=/[^\w.$]/;function l(e){var t=void 0;if(g.isArray(e)){t=[];for(var i=0,n=e.length;i<n;i++)t[i]=l(e[i])}else if(e&&B(e))for(var r in t={},e)-1===p.indexOf(r)&&(t[r]=l(e[r]));else t=e;return t}function u(e){if(null===e)return null;if(Array.isArray(e)){var t=[].concat(e);return e.__ref__!==undefined&&(t.__ref__=e.__ref__),t}return l(e)}var E=function(){var r=[],o=!1,e=void 0;function t(){o=!1;for(var e=r.slice(0),t=r.length=0;t<e.length;t++)e[t]()}if(void 0!==Z&&s(Z))e=function e(){Z(t)};else if("undefined"==typeof MessageChannel||!s(MessageChannel)&&"[object MessageChannelConstructor]"!==MessageChannel.toString())if("undefined"!=typeof Promise&&s(Promise)){var i=Promise.resolve();e=function e(){i.then(t)}}else e=function e(){setTimeout(t,0)};else{var n=new MessageChannel,a=n.port2;n.port1.onmessage=t,e=function e(){a.postMessage(1)}}return function(t,i){var n=void 0;if(r.push(function(){if(t)try{t.call(i)}catch(e){console.error(e)}else n&&n(i)}),o||(o=!0,e()),!t&&"undefined"!=typeof Promise)return new Promise(function(e,t){n=e})}}();function c(e,t,i){"object"==typeof t&&(i=t,t=e,e=function(){return t.apply(this,arguments)});var n=function n(){},r=t.prototype;return n.prototype=r,e.prototype=new n,e.superclass=r,g.extend(e.prototype,i,{superclass:t}),e}"undefined"!=typeof Symbol&&Symbol.prototype,Object.prototype.toString,function $6d(t,i,n,r){t instanceof g&&t._wrapped,i instanceof g&&i._wrapped;var o=Z6d.call(t);if(o!==Z6d.call(i))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+t==""+i;case"[object Number]":return+t!=+t?+i!=+i:0==+t?1/+t==1/i:+t==+i;case"[object Date]":case"[object Boolean]":return+t==+i;case"[object Symbol]":return X6d.valueOf.call(t)===X6d.valueOf.call(i)}var a="[object Array]"===o;if(!a){if("object"!=typeof t||"object"!=typeof i)return!1;var s=t.constructor,l=i.constructor;if(s!==l&&!(g.isFunction(s)&&s instanceof s&&g.isFunction(l)&&l instanceof l)&&"constructor"in t&&"constructor"in i)return!1}[];for(var u=(n||[]).length;u--;)if(n[u]===t)return r[u]===i;if(n.push(t),r.push(i),a){if(t.length!==i.length)return!1;for(;u--;)if(!_6d(t[u],i[u],n,r))return!1}else{var c=g.keys(t),h=void 0;if(c.length,g.keys(i).length!==u)return!1;for(;u--;){if(c[u],-1!==p.indexOf(h))return!0;if(-1===Object.keys(i).indexOf(h)||!_6d(t[h],i[h],n,r))return!1}}return n.pop(),r.pop(),!0},function _6d(t,i,n,r){if(t===i)return 0!==t||1/t==1/i;if(null==t||null==i)return!1;if(t!=t)return i!=i;var o=typeof t;return("function"==o||"object"==o||"object"==typeof i)&&("function"==o||$6d(t,i,n,r))};function m(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var i=void 0,n=void 0,r=void 0,o=void 0;if(Array.isArray(e)){if((i=e.length)!==t.length)return!1;for(n=i;0!=n--;)if(!m(e[n],t[n]))return!1;return!0}if(e.constructor===RegExp)return!0;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(o=Object.keys(e),(i=o.length)!==Object.keys(t).length)return!1;for(n=i;0!=n--;)if(!Object.prototype.hasOwnProperty.call(t,o[n]))return!1;for(n=i;0!=n--;)if(r=o[n],-1===p.indexOf(r)&&!m(e[r],t[r]))return!1;return!0}return"function"==typeof e||e!=e&&t!=t}var h={};var b=void 0,T={"||":b,"&&":b,"(":b,")":b};function y(o,e,a){var s=3<arguments.length&&arguments[3]!==undefined?arguments[3]:{},l=o;!l.$watch&&l.$vm&&(l=l.$vm),B(a)&&(a=(s=a).handler),"string"==typeof a&&(a=l[a]),(s=s||{}).user=!0;var u=void 0;if(g.isFunction(e)||!(u=e.match(/[a-zA-Z0-9_.*]+|[|][|]|[&][&]|[(]|[)]/g))||1===u.length&&!/\*/.test(e))return l.$watch(e,a,s),[];var c=u.slice(),h=!1,p=!1,d=function d(e,t,i,n){!0!==h&&(c[e]=!0,function r(e){for(var t="",i=0,n=e.length;i<n;i++)g.isBoolean(e[i])||g.has(T,e[i])?t+=e[i]:t+="false";return new Function("return "+t)()}(c)&&(h=!0,a.call(o,t,i,n)),s&&s.sync?(p=h=!1,c=u.slice()):p||(p=!0,E(function(){p=h=!1,c=u.slice()})))};return g.each(u,function(e,n){if(!g.has(T,e))if(/^[1-9a-zA-Z.]+(\*\*$|\*$)/.test(e)||"**"===e){var t=/\*\*$/.test(e);e=t?e.replace(".**",""):e.replace(".*","");var i=t?e:function(){var i={};return g.each(l.model,function(e,t){t in f||(i[t]=e)}),i};l.$watch(i,function(e,t,i){d(n,e,t,g.extend({index:n},i))},g.extend(s,{deep:t}))}else{if(/\*\*$|\*$/.test(e))throw new Error("not support");if(/\*/.test(e)){var o=e.split("."),a=function a(){for(var t={root:l.model},r=function r(e,i){var n={};"*"===o[i]?g.each(t,function(e,i){g.each(e,function(e,t){i+t in f||(n[i+t]=e)})}):g.each(t,function(e,t){t+o[i]in f||(n[t+o[i]]=e[o[i]])}),t=n},e=0,i=o.length;e<i;e++)r(i,e);return t};l.$watch(a,function(e,t,i){d(n,e,t,g.extend({index:n},i))},s)}else l.$watch(e,function(e,t,i){d(n,e,t,g.extend({index:n},i))},s)}}),[]}var C={},v={},N=function N(){},V=function(){function a(e){var t=e.get,i=e.last,n=e.listener,r=e.sync,o=(e.deep,e.id);return X(this,a),this.id=o,this.get=t,this.last=u(i),this.listener=n||N,this.sync=r||!1,{id:this.id,get:this.get,last:this.last,listener:this.listener}}return a.prototype.getInstance=function(){return this},a}();function S(e,i,t){var n=3<arguments.length&&arguments[3]!==undefined?arguments[3]:{};B(t)&&(t=(n=t).handler),"string"==typeof t&&(t=e[t]);var r=g.isFunction(i)?g.bind(i,e):g.bind(function(){return function t(e){if(a.test(e))return;var i=e.split(".");return function(e){for(var t=0;t<i.length;t++){if(!e)return;e=e[i[t]]}return e}}("model."+i)(e)},e);return new V({get:r,listener:g.bind(t,e),last:r(),sync:n.sync,deep:n.deep,id:n.id})}function x(t,i){return function(){var e=t.apply(i,[].concat(Array.prototype.slice.call(arguments)));return i.$digest(),e}}function L(r){var e=1<arguments.length&&arguments[1]!==undefined?arguments[1]:[];g.each(e.reverse(),function(e){var t=function n(e){return h[e]}(e);for(var i in t)"function"==typeof t[i]&&(g.has(r,i)||(r[i]=x(t[i],r)))})}function w(o,e){var n=o._contextWatchers={};g.each(e,function(t){var i=function r(n){var e=o._parent;for(;e;){if(e.childContext&&-1<e.childContext.indexOf(n))return e.$watch(n,function(e,t,i){o._contextWatchers[n]&&(o.model[n]=e,o._contextWatchers[n].last=u(e),o.$digest())},{id:o._modelHashId+"-"+n}),{p:e,value:e.model[n]};e=e._parent}}(t);i&&(o.model[t]=i.p?i.p.model[t]:undefined,n[t]=new V({id:i.p._modelHashId+"-"+t,get:function(){return o.model[t]},last:o.model[t],listener:g.bind(function(e){i.p.model[t]=e,i.p.$digest()},i.p)}))})}function A(r){var o=!1;return g.each(r._stateWatchers,function(e,t){var i=e.get(),n=e.last;m(i,n)||(r.model[t]=i,o=!0,e.last=u(i))}),o}function D(o){var a=!1,s=[],l=[];return g.each(o._computedOrder,function(e){var t=o._computedWatchers[e];try{var i=t.get(),n=t.last;m(i,n)?l.push(e):(o.model[e]=i,a=!0,s.push(e),t.last=u(i))}catch(r){a=!0,s.push(e)}}),o._computedOrder=[].concat(l,s),a}function M(o){var a=!1;return g.each(o._contextWatchers,function(e,t){var i=e.get(),n=e.last;if(!m(i,n)){var r={id:e.id,cb:g.bind(e.listener,o,i,n,o)};o.contextListeners.push(r),o.model[t]=i,a=!0,e.last=u(i)}}),a}function k(e){for(var t=!0,i=!0,n=!0,r=10;t&&0<r;r--)t=A(e);for(var o=10;i&&0<o;o--)i=M(e);for(var a=10;n&&0<a;a--)n=D(e)}var P=function(){var r={};return function(e,t){var i=e.id,n=e.cb;i&&r[i]||(E(function(){n(),r[i]=!1},t),r[i]=!0)}}();var H=function(){function h(){X(this,h)}return h.prototype._constructor=function(e){this.alive=!0,this.options=e||{},this.model={$vm:this},this._modelHashId=I("model"),this.syncListeners=[],this.asyncListeners=[],this.contextListeners=[],this._parent=h.target;var t=g.isFunction(this.state)?this.state():this.state,i=this.computed,n=this.context,r=(this.childContext,this.watch),o=this.actions,a=this.mixins;n&&w(this,n),L(this,a),this.init(),function s(i,n){var r=i._stateWatchers={};for(var e in n)i.model[e]=n[e];var o=function o(e){var t=n[e];r[e]=new V({id:i._modelHashId+"-"+e,get:function(){return i.model[e]},last:t,listener:i.options.defaultCallback||N})};for(var t in n)o(t)}(this,t),function l(e,t){var i=e._computedWatchers={},n=e._computedOrder=[];for(var r in t){var o=t[r],a=e;n.push(r),i[r]=new V({id:e._modelHashId+"-"+r,get:g.bind(o,a),last:undefined,listener:N})}}(this,i),k(this),function u(e,t){for(var i in e._watchers||(e._watchers=[]),t){var n=t[i];if(g.isArray(n))for(var r=0;r<n.length;r++)y(e,i,n[r]);else y(e,i,n)}}(this,r),function c(e,t){for(var i in t)e[i]=null==t[i]?d:x(t[i],e)}(this,o),this.created&&this.created(),C[this._modelHashId]=this},h.prototype._init=function(){},h.prototype.init=function(){this._init()},h.prototype.destroy=function(){this.alive=!1,C[this._modelHashId]=null,this._watchers&&(this._watchers=[]),this._computedWatchers&&(this._computedWatchers=[]),this._stateWatchers&&(this._stateWatchers=[]),this._contextWatchers&&(this._contextWatchers=[]),this.destroyed&&this.destroyed()},h.prototype.$watch=function(e,t,i){var n=S(this,e,t,i);this._watchers.push(n)},h.prototype.$digest=function(){k(this),function i(r){var o=[].concat(r.syncListeners||[]),a=[].concat(r.asyncListeners||[]),e=[].concat(r.contextListeners||[]);r.asyncListeners=[],r.syncListeners=[];var t=[].concat(r._watchers);g.each(t,function(e){if(e){var t=e.get(),i=e.last;if(!m(t,i)){var n={id:e.id,cb:g.bind(e.listener,r,t,i,r)};!0===e.sync?o.push(n):a.push(n),e.last=u(t)}}}),g.each(o,function(e){e.cb()}),0===e.length&&0===a.length||E(function(){g.each(BI.uniqBy(e.reverse(),"id").reverse(),function(e){e.cb()}),g.each(a,function(e){e.cb()})})}(this),this.options.define||function e(){g.each(v,function(e){e&&e.$digest&&e.$digest()})}()},h.prototype.getModelID=function(){return this._modelHashId},h}();function R(){return C}e.version="2.0",e.$$skipArray=f,e.mixin=function O(e,t){h[e]=_.cloneDeep(t)},e.toJSON=l,e.nextListener=P,e.Model=H,e.getAllModelInstances=R,e.refreshAll=function F(){g.each(R(),function(e){e&&e.$digest&&e.$digest()})},e.define=function G(e){var t=new(c(H,{state:function(){return e}}));return t._constructor({define:!0}),(v[t.getModelID()]=t).model},e.inherit=c,e.watch=y,e.__esModule=!0}(t,i(807),i(807))}).call(this,i(41).setImmediate)},function(e,t){!function(){function a(e,t,i,n){return BI.isPlainObject(i)&&(i=(n=i).handler),n=n||{},Fix.watch(e.model,t,_.bind(i,e),BI.extend(n,{store:e.store}))}var n=null,t=[];function r(e){n&&t.push(n),Fix.Model.target=n=e}function s(){Fix.Model.target=n=t.pop()}var o=null,i=[];function l(e){o&&i.push(o),Fix.Model.context=o=e}function u(){Fix.Model.context=o=i.pop()}var c=Fix.watch;Fix.watch=function(e,t,i,n){return BI.isPlainObject(i)&&(i=(n=i).handler),"string"==typeof i&&(i=e[i]),c.call(this,e,t,function(){n&&n.store&&r(n.store);var e=i.apply(this,arguments);return n&&n.store&&s(),e},n)};var h=BI.createWidget;function p(){var e=!1;if(_global.Fix&&this._store){var t=function i(e){if(null!=n)return n;for(var t=e=e||o;t&&!(t instanceof Fix.Model||t.store||t.__cacheStore);)t=t._parent||t.options&&t.options.element;return t?t instanceof Fix.Model?e.__cacheStore=t:(e.__cacheStore=t.store||t.__cacheStore,t.__cacheStore||t.store):void 0}(this.options.context||this.options.element);t&&(r(t),e=!0),this.store=this._store(),this.store&&(this.store._widget=this),e&&s(),e=!1,r(this.store),this.store instanceof Fix.Model?this.model=this.store.model:this.model=this.store,e=!0}return e}BI.createWidget=function(e,t,i){var n=!1;BI.isWidget(t)?(l(t),n=!0):null!=i&&(l(i),n=!0);var r=h.apply(this,arguments);return n&&u(),r},_.each(["populate","addItems","prependItems"],function(e){var t=BI.Loader.prototype[e];BI.Loader.prototype[e]=function(){l(this);var e=t.apply(this,arguments);return u(),e}}),BI.Widget.prototype._initRender=function(){this.beforeInit?(this.__asking=!0,this.beforeInit(BI.bind(function(){this.model&&this.model.$vm&&this.model.$vm.$digest(),this._render()},this)),!0===this.__asking&&(this.__async=!0)):this._render()};var d=BI.Widget.prototype._init;BI.Widget.prototype._init=function(){var e=p.call(this);d.apply(this,arguments),e&&s()};var g=BI.Widget.prototype._render;BI.Widget.prototype._render=function(){var e=!1;_global.Fix&&this._store&&(e=!0,r(this.store),function o(e,t){for(var i in e._watchers||(e._watchers=[]),t){var n=t[i];if(BI.isArray(n))for(var r=0;r<n.length;r++)e._watchers.push(a(e,i,n[r]));else e._watchers.push(a(e,i,n))}}(this,this.watch)),g.apply(this,arguments),e&&s()};var e=BI.Widget.prototype.__d;BI.Widget.prototype.__d=function(){e.apply(this,arguments),this.store&&BI.isFunction(this.store.destroy)&&this.store.destroy(),BI.each(this._watchers,function(e,t){t=BI.isArray(t)?t:[t],BI.each(t,function(e,t){t()})}),this._watchers&&(this._watchers=[]),this.store&&(this.store._parent&&(this.store._parent=null),this.store._widget&&(this.store._widget=null),this.store=null),delete this.__cacheStore},_.each(["_mount"],function(e){var i=BI.Widget.prototype[e];i&&(BI.Widget.prototype[e]=function(){this.store&&r(this.store);try{var e=i.apply(this,arguments)}catch(t){console.error(t)}return this.store&&s(),e})});function f(){BI.nextTick(function(){Fix&&Fix.refreshAll&&Fix.refreshAll()})}if($(document).ajaxComplete(f),BI.history){var I=BI.history.navigate;BI.history.navigate=function(){I.apply(this,arguments),BI.defer(function(){f()},200)};var B=window.history.back;window.history.back=function(){B.apply(this,arguments),BI.defer(function(){f()},200)}}if(BI.Router){var E=BI.Router.prototype.execute;BI.Router.prototype.execute=function(){E.apply(this,arguments),f()}}_.each(["each","map","reduce","reduceRight","find","filter","reject","every","all","some","any","max","min","sortBy","groupBy","indexBy","countBy","partition","keys","allKeys","values","pairs","invert","mapObject","findKey","pick","omit","tap"],function(e){var n=BI[e];BI[e]=function(e,i,t){return"function"==typeof i?n(e,function(e,t){if(!(e in Fix.$$skipArray))return i.apply(this,arguments)},t):n.apply(this,arguments)}}),BI.isEmpty=function(e){return BI.isPlainObject(e)&&e.__ob__?0===BI.keys(e).length:_.isEmpty(e)},BI.keys=function(e){for(var t=_.keys(e),i=[],n=0;n<t.length;n++)t[n]in Fix.$$skipArray||i.push(t[n]);return i},BI.values=function(e){for(var t=BI.keys(obj),i=t.length,n=[],r=0;r<i;r++)n[r]=obj[t[r]];return n},BI.extend=function(){var e=Array.prototype.slice.call(arguments);if(e.length<1)return{};for(var i=e[0],t=1;t<e.length;)BI.each(e[t],function(e,t){i[e]=t}),t++;return i},BI.size=function(e){return BI.isPlainObject(e)&&e.__ob__?BI.keys(e).length:_.size(e)},BI.isEmptyObject=function(e){return 0===BI.size(e)},BI.deepClone=function(e){return Fix.toJSON(e)},Fix.set=function(e,t,i){try{e&&(e[t]=i)}catch(n){}finally{return _.cloneDeep(e)}},Fix.del=function(e,t){try{delete e[t]}catch(i){}finally{return _.cloneDeep(e)}},BI.watch=Fix.watch}()},,,,,,,function(e,t,i){i(69),i(649),i(650),i(651),i(652),i(653),i(654),i(998),i(1006),i(1010),i(1014),i(1020),i(1023),i(1027),i(1030),i(1034),i(1053),i(1060),i(683),i(684),i(181),i(182),i(183),i(184),i(185),i(186),i(187),i(188),i(189),i(190),i(191),i(192),i(193),i(194),i(195),i(196),i(197),i(74),i(75),i(77),i(198),i(199),i(78),i(79),i(80),i(81),i(82),i(83),i(200),i(201),i(84),i(85),i(86),i(87),i(88),i(89),i(90),i(91),i(202),i(203),i(204),i(205),i(206),i(92),i(207),i(208),i(209),i(210),i(211),i(212),i(213),i(214),i(215),i(216),i(217),i(93),i(218),i(94),i(95),i(96),i(97),i(98),i(99),i(219),i(220),i(221),i(222),i(685),i(686),i(687),i(688),i(689),i(690),i(692),i(693),i(694),i(223),i(100),i(224),i(225),i(226),i(227),i(228),i(229),i(230),i(231),i(232),i(233),i(234),i(235),i(236),i(237),i(238),i(239),i(240),i(241),i(242),i(243),i(244),i(245),i(246),i(247),i(248),i(249),i(250),i(251),i(252),i(253),i(254),i(255),i(256),i(257),i(258),i(259),i(260),i(261),i(262),i(263),i(264),i(265),i(266),i(101),i(102),i(103),i(1066),i(267),i(268),i(269),i(270),i(271),i(272),i(273),i(274),i(275),i(276),i(277),i(278),i(279),i(280),i(281),i(282),i(283),i(284),i(285),i(286),i(287),i(288),i(289),i(290),i(291),i(292),i(293),i(294),i(295),i(296),i(297),i(298),i(299),i(300),i(301),i(302),i(303),i(304),i(305),i(306),i(307),i(308),i(309),i(310),i(311),i(312),i(313),i(314),i(315),i(316),i(317),i(318),i(319),i(320),i(321),i(322),i(323),i(695),i(324),i(325),i(326),i(327),i(328),i(329),i(330),i(331),i(696),i(697),i(698),i(699),i(700),i(701),i(332),i(333),i(334),i(335),i(336),i(337),i(338),i(339),i(340),i(341),i(342),i(343),i(344),i(345),i(346),i(347),i(348),i(349),i(350),i(351),i(352),i(353),i(354),i(355),i(356),i(357),i(358),i(359),i(360),i(361),i(362),i(363),i(364),i(365),i(366),i(367),i(368),i(369),i(370),i(371),i(372),i(373),i(374),i(375),i(376),i(377),i(702),i(378),i(379),i(380),i(381),i(382),i(383),i(384),i(385),i(386),i(387),i(388),i(389),i(390),i(703),i(704),i(705),i(706),i(391),i(392),i(393),i(394),i(395),i(396),i(397),i(398),i(399),i(400),i(401),i(402),i(403),i(404),i(405),i(406),i(407),i(408),i(409),i(410),i(411),i(412),i(413),i(414),i(415),i(416),i(417),i(418),i(419),i(420),i(421),i(707),i(708),i(709),i(710),i(711),i(712),i(713),i(714),i(715),i(716),i(717),i(718),i(422),i(423),i(424),i(425),i(426),i(427),i(428),i(429),i(430),i(431),i(432),i(433),i(434),i(435),i(436),i(437),i(438),i(439),i(440),i(441),i(442),i(443),i(444),i(445),i(446),i(447),i(448),i(449),i(450),i(451),i(452),i(453),i(454),i(455),i(456),i(457),i(458),i(459),i(460),i(719),i(720),i(721),i(461),i(462),i(463),i(464),i(465),i(466),i(467),i(468),i(104),i(105),i(106),i(107),i(108),i(109),i(110),i(111),i(112),i(113),i(114),i(115),i(116),i(117),i(118),i(119),i(120),i(121),i(122),i(123),i(124),i(125),i(126),i(127),i(128),i(129),i(130),i(131),i(132),i(133),i(134),i(135),i(136),i(137),i(138),i(139),i(140),i(141),i(142),i(143),i(144),i(145),i(146),i(147),i(148),i(149),i(150),i(151),i(152),i(153),i(154),i(155),i(156),i(157),i(158),i(159),i(160),i(161),i(469),i(470),i(471),i(472),i(473),i(474),i(475),i(476),i(477),i(478),i(479),i(480),i(481),i(482),i(483),i(484),i(485),i(486),i(487),i(488),i(489),i(490),i(491),i(492),i(493),i(494),i(495),i(496),i(497),i(498),i(499),i(500),i(501),i(502),i(503),i(504),i(505),i(506),i(507),i(508),i(509),i(510),i(511),i(512),i(513),i(514),i(515),i(516),i(517),i(518),i(519),i(520),i(521),i(522),i(523),i(524),i(525),i(526),i(527),i(528),i(529),i(530),i(531),i(532),i(533),i(534),i(535),i(536),i(537),i(538),i(539),i(540),i(541),i(542),i(543),i(544),i(545),i(546),i(547),i(548),i(549),i(550),i(551),i(552),i(553),i(554),i(555),i(556),i(557),i(558),i(559),i(560),i(561),i(562),i(563),i(564),i(565),i(566),i(567),i(568),i(569),i(570),i(571),i(572),i(573),i(574),i(575),i(576),i(577),i(578),i(579),i(580),i(581),i(582),i(583),i(584),i(585),i(586),i(587),i(588),i(589),i(590),i(591),i(592),i(593),i(594),i(595),i(596),i(597),i(598),i(599),i(600),i(601),i(602),i(603),i(604),i(605),i(606),i(607),i(608),i(609),i(610),i(611),i(612),i(613),i(614),i(615),i(616),i(617),i(618),i(619),i(620),i(621),i(622),i(623),i(624),i(625),i(626),i(627),i(628),i(629),i(630),i(631),i(632),i(633),i(634),i(635),i(636),i(771),i(772),i(773),i(774),i(775),i(776),i(1068),i(722),i(997),i(778),e.exports=i(637)}]);