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.

57 lines
1.6 MiB

/*! fineui 2020-03-16 11:22:04 */
5 years ago
function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}!function(r){function i(t){if(e[t])return e[t].exports;var n=e[t]={i:t,l:!1,exports:{}};return r[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}var e={};i.m=r,i.c=e,i.d=function(t,n,r){i.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(n,t){if(1&t&&(n=i(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var e in n)i.d(r,e,function(t){return n[t]}.bind(null,e));return r},i.n=function(t){var n=t&&t.__esModule?function(){return t["default"]}:function(){return t};return i.d(n,"a",n),n},i.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},i.p="",i(i.s=121)}([function(t,n,r){var d=r(1),y=r(7),g=r(14),m=r(11),b=r(17),w="prototype",S=function S(t,n,r){var e,i,o,u,c=t&S.F,f=t&S.G,a=t&S.S,s=t&S.P,l=t&S.B,h=f?d:a?d[n]||(d[n]={}):(d[n]||{})[w],p=f?y:y[n]||(y[n]={}),v=p[w]||(p[w]={});for(e in f&&(r=n),r)o=((i=!c&&h&&void 0!==h[e])?h:r)[e],u=l&&i?b(o,d):s&&"function"==typeof o?b(Function.call,o):o,h&&m(h,e,o,t&S.U),p[e]!=o&&g(p,e,u),s&&v[e]!=o&&(v[e]=o)};d.core=y,S.F=1,S.G=2,S.S=4,S.P=8,S.B=16,S.W=32,S.U=64,S.R=128,t.exports=S},function(t,n){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(t,n){t.exports=function(t){try{return!!t()}catch(n){return!0}}},function(t,n,r){var e=r(4);t.exports=function(t){if(!e(t))throw TypeError(t+" is not an object!");return t}},function(t,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){return"object"===r(t)?null!==t:"function"==typeof t}},function(t,n,r){var e=r(48)("wks"),i=r(29),o=r(1).Symbol,u="function"==typeof o;(t.exports=function(t){return e[t]||(e[t]=u&&o[t]||(u?o:i)("Symbol."+t))}).store=e},function(t,n,r){var e=r(19),i=Math.min;t.exports=function(t){return 0<t?i(e(t),9007199254740991):0}},function(t,n){var r=t.exports={version:"2.6.11"};"number"==typeof __e&&(__e=r)},function(t,n,r){t.exports=!r(2)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n,r){var i=r(3),o=r(88),u=r(26),c=Object.defineProperty;n.f=r(8)?Object.defineProperty:function(t,n,r){if(i(t),n=u(n,!0),i(r),o)try{return c(t,n,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[n]=r.value),t}},function(t,n,r){var e=r(24);t.exports=function(t){return Object(e(t))}},function(t,n,r){var o=r(1),u=r(14),c=r(13),f=r(29)("src"),e=r(126),i="toString",a=(""+e).split(i);r(7).inspectSource=function(t){return e.call(t)},(t.exports=function(t,n,r,e){var i="function"==typeof r;i&&(c(r,"name")||u(r,"name",n)),t[n]!==r&&(i&&(c(r,f)||u(r,f,t[n]?""+t[n]:a.join(String(n)))),t===o?t[n]=r:e?t[n]?t[n]=r:u(t,n,r):(delete t[n],u(t,n,r)))})(Function.prototype,i,function(){return"function"==typeof this&&this[f]||e.call(this)})},function(t,n,r){var e=r(0),i=r(2),u=r(24),c=/"/g,f=function f(t,n,r,e){var i=String(u(t)),o="<"+n;return""!==r&&(o+=" "+r+'="'+String(e).replace(c,"&quot;")+'"'),o+">"+i+"</"+n+">"};t.exports=function(n,t){var r={};r[n]=t(f),e(e.P+e.F*i(function(){var t=""[n]('"');return t!==t.toLowerCase()||3<t.split('"').length}),"String",r)}},function(t,n){var r={}.hasOwnProperty;t.exports=function(t,n){return r.call(t,n)}},function(t,n,r){var e=r(9),i=r(28);t.exports=r(8)?function(t,n,r){return e.f(t,n,i(1,r))}:function(t,n,r){return t[n]=r,t}},function(t,n,r){var e=r(44),i=r(24);t.exports=function(t){return e(i(t))}},function(t,
return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=r(15),o=r(34).f,u={}.toString,c="object"==("undefined"==typeof window?"undefined":e(window))&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],f=function f(t){try{return o(t)}catch(n){return c.slice()}};t.exports.f=function(t){return c&&"[object Window]"==u.call(t)?f(t):o(i(t))}},function(t,n,r){"use strict";var h=r(8),p=r(31),v=r(50),d=r(45),y=r(10),g=r(44),i=Object.assign;t.exports=!i||r(2)(function(){var t={},n={},r=Symbol(),e="abcdefghijklmnopqrst";return t[r]=7,e.split("").forEach(function(t){n[t]=t}),7!=i({},t)[r]||Object.keys(i({},n)).join("")!=e})?function(t,n){for(var r=y(t),e=arguments.length,i=1,o=v.f,u=d.f;i<e;)for(var c,f=g(arguments[i++]),a=o?p(f).concat(o(f)):p(f),s=a.length,l=0;l<s;)c=a[l++],h&&!u.call(f,c)||(r[c]=f[c]);return r}:i},function(t,n){t.exports=Object.is||function(t,n){return t===n?0!==t||1/t==1/n:t!=t&&n!=n}},function(t,n,r){"use strict";var o=r(18),u=r(4),c=r(96),f=[].slice,a={},s=function s(t,n,r){if(!(n in a)){for(var e=[],i=0;i<n;i++)e[i]="a["+i+"]";a[n]=Function("F,a","return new F("+e.join(",")+")")}return a[n](t,r)};t.exports=Function.bind||function(n){var r=o(this),e=f.call(arguments,1),i=function i(){var t=e.concat(f.call(arguments));return this instanceof i?s(r,t.length,t):c(r,t,n)};return u(r.prototype)&&(i.prototype=r.prototype),i}},function(t,n){t.exports=function(t,n,r){var e=void 0===r;switch(n.length){case 0:return e?t():t.call(r);case 1:return e?t(n[0]):t.call(r,n[0]);case 2:return e?t(n[0],n[1]):t.call(r,n[0],n[1]);case 3:return e?t(n[0],n[1],n[2]):t.call(r,n[0],n[1],n[2]);case 4:return e?t(n[0],n[1],n[2],n[3]):t.call(r,n[0],n[1],n[2],n[3])}return t.apply(r,n)}},function(t,n,r){var e=r(1).parseInt,i=r(39).trim,o=r(66),u=/^[-+]?0[xX]/;t.exports=8!==e(o+"08")||22!==e(o+"0x16")?function(t,n){var r=i(String(t),3);return e(r,n>>>0||(u.test(r)?16:10))}:e},function(t,n,r){var e=r(1).parseFloat,i=r(39).trim;t.exports=1/e(r(66)+"-0")!=-(1/0)?function(t){var n=i(String(t),3),r=e(n);return 0===r&&"-"==n.charAt(0)?-0:r}:e},function(t,n,r){var e=r(23);t.exports=function(t,n){if("number"!=typeof t&&"Number"!=e(t))throw TypeError(n);return+t}},function(t,n,r){var e=r(4),i=Math.floor;t.exports=function(t){return!e(t)&&isFinite(t)&&i(t)===t}},function(t,n){t.exports=Math.log1p||function(t){return-1e-8<(t=+t)&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,n,r){"use strict";var e=r(33),i=r(28),o=r(38),u={};r(14)(u,r(5)("iterator"),function(){return this}),t.exports=function(t,n,r){t.prototype=e(u,{next:i(1,r)}),o(t,n+" Iterator")}},function(t,n,r){var u=r(3);t.exports=function(t,n,r,e){try{return e?n(u(r)[0],r[1]):n(r)}catch(o){var i=t["return"];throw void 0!==i&&u(i.call(t)),o}}},function(t,n,r){var e=r(216);t.exports=function(t,n){return new(e(t))(n)}},function(t,n,r){var s=r(18),l=r(10),h=r(44),p=r(6);t.exports=function(t,n,r,e,i){s(n);var o=l(t),u=h(o),c=p(o.length),f=i?c-1:0,a=i?-1:1;if(r<2)for(;;){if(f in u){e=u[f],f+=a;break}if(f+=a,i?f<0:c<=f)throw TypeError("Reduce of empty array with no initial value")}for(;i?0<=f:f<c;f+=a)f in u&&(e=n(e,u[f],f,o));return e}},function(t,n,r){"use strict";var a=r(10),s=r(32),l=r(6);t.exports=[].copyWithin||function(t,n){var r=a(this),e=l(r.length),i=s(t,e),o=s(n,e),u=2<arguments.length?arguments[2]:void 0,c=Math.min((void 0===u?e:s(u,e))-o,e-i),f=1;for(o<i&&i<o+c&&(f=-1,o+=c-1,i+=c-1);0<c--;)o in r?r[i]=r[o]:delete r[i],i+=f,o+=f;return r}},function(t,n){t.exports=function(t,n){return{value:n,done:!!t}}},function(t,n,r){"use strict";var e=r(81);r(0)({target:"RegExp",proto:!0,forced:e!==/./.exec},{exec:e})},function(t,n,r){r(8)&&"g"!=/./g.flags&&r(9).f(RegExp.prototype,"flags",{configurable:!0,get:r(53)})},function(t,n,e){"use strict";var r,i,o,u,c=e(30),f=e(1),a=e(17),s=e(46),l=e(0),h=e(4),p=e(18),v=e(42),d=e(56),y=e(47),g=e(83).set,m=e(236)(),b=e(111),w=e(237),S=e(57),x=e(112),_="Promise",E=f.TypeError,O=f.process,P=O&&O.versions,F=P&&P.v8||"",M=f[_],j="process"==s(O),A=function A(){},I=i=b.f
reduceRight:function(t){return i(this,t,arguments.length,arguments[1],!0)}})},function(t,n,r){"use strict";var e=r(0),i=r(49)(!1),o=[].indexOf,u=!!o&&1/[1].indexOf(1,-0)<0;e(e.P+e.F*(u||!r(16)(o)),"Array",{indexOf:function(t){return u?o.apply(this,arguments)||0:i(this,t,arguments[1])}})},function(t,n,r){"use strict";var e=r(0),i=r(15),o=r(19),u=r(6),c=[].lastIndexOf,f=!!c&&1/[1].lastIndexOf(1,-0)<0;e(e.P+e.F*(f||!r(16)(c)),"Array",{lastIndexOf:function(t){if(f)return c.apply(this,arguments)||0;var n=i(this),r=u(n.length),e=r-1;for(1<arguments.length&&(e=Math.min(e,o(arguments[1]))),e<0&&(e=r+e);0<=e;e--)if(e in n&&n[e]===t)return e||0;return-1}})},function(t,n,r){var e=r(0);e(e.P,"Array",{copyWithin:r(106)}),r(36)("copyWithin")},function(t,n,r){var e=r(0);e(e.P,"Array",{fill:r(79)}),r(36)("fill")},function(t,n,r){"use strict";var e=r(0),i=r(22)(5),o="find",u=!0;o in[]&&Array(1)[o](function(){u=!1}),e(e.P+e.F*u,"Array",{find:function(t){return i(this,t,1<arguments.length?arguments[1]:void 0)}}),r(36)(o)},function(t,n,r){"use strict";var e=r(0),i=r(22)(6),o="findIndex",u=!0;o in[]&&Array(1)[o](function(){u=!1}),e(e.P+e.F*u,"Array",{findIndex:function(t){return i(this,t,1<arguments.length?arguments[1]:void 0)}}),r(36)(o)},function(t,n,r){r(41)("Array")},function(t,n,r){var e=r(1),o=r(67),i=r(9).f,u=r(34).f,c=r(74),f=r(53),a=e.RegExp,s=a,l=a.prototype,h=/a/g,p=/a/g,v=new a(h)!==h;if(r(8)&&(!v||r(2)(function(){return p[r(5)("match")]=!1,a(h)!=h||a(p)==p||"/a/i"!=a(h,"i")}))){a=function(t,n){var r=this instanceof a,e=c(t),i=void 0===n;return!r&&e&&t.constructor===a&&i?t:o(v?new s(e&&!i?t.source:t,n):s((e=t instanceof a)?t.source:t,e&&i?f.call(t):n),r?this:l,a)};for(var d=(function d(n){n in a||i(a,n,{configurable:!0,get:function(){return s[n]},set:function(t){s[n]=t}})}),y=u(s),g=0;y.length>g;)d(y[g++]);(l.constructor=a).prototype=l,r(11)(e,"RegExp",a)}r(41)("RegExp")},function(t,n,r){"use strict";r(109);var e=r(3),i=r(53),o=r(8),u="toString",c=/./[u],f=function f(t){r(11)(RegExp.prototype,u,t,!0)};r(2)(function(){return"/a/b"!=c.call({source:"a",flags:"b"})})?f(function(){var t=e(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)}):c.name!=u&&f(function(){return c.call(this)})},function(t,n,r){"use strict";var l=r(3),h=r(6),p=r(82),v=r(54);r(55)("match",1,function(e,i,a,s){return[function(t){var n=e(this),r=void 0==t?void 0:t[i];return void 0!==r?r.call(t,n):new RegExp(t)[i](String(n))},function(t){var n=s(a,t,this);if(n.done)return n.value;var r=l(t),e=String(this);if(!r.global)return v(r,e);for(var i,o=r.unicode,u=[],c=r.lastIndex=0;null!==(i=v(r,e));){var f=String(i[0]);""===(u[c]=f)&&(r.lastIndex=p(e,h(r.lastIndex),o)),c++}return 0===c?null:u}]})},function(t,n,r){"use strict";var _=r(3),e=r(10),E=r(6),O=r(19),P=r(82),F=r(54),M=Math.max,j=Math.min,h=Math.floor,p=/\$([$&`']|\d\d?|<[^>]*>)/g,v=/\$([$&`']|\d\d?)/g,A=function A(t){return void 0===t?t:String(t)};r(55)("replace",2,function(i,o,w,S){function x(o,u,c,f,a,t){var s=c+o.length,l=f.length,n=v;return void 0!==a&&(a=e(a),n=p),w.call(t,n,function(t,n){var r;switch(n.charAt(0)){case"$":return"$";case"&":return o;case"`":return u.slice(0,c);case"'":return u.slice(s);case"<":r=a[n.slice(1,-1)];break;default:var e=+n;if(0==e)return t;if(l<e){var i=h(e/10);return 0===i?t:i<=l?void 0===f[i-1]?n.charAt(1):f[i-1]+n.charAt(1):t}r=f[e-1]}return void 0===r?"":r})}return[function(t,n){var r=i(this),e=void 0==t?void 0:t[o];return void 0!==e?e.call(t,r,n):w.call(String(r),t,n)},function(t,n){var r=S(w,t,this,n);if(r.done)return r.value;var e=_(t),i=String(this),o="function"==typeof n;o||(n=String(n));var u=e.global;if(u){var c=e.unicode;e.lastIndex=0}for(var f=[];;){var a=F(e,i);if(null===a)break;if(f.push(a),!u)break;""===String(a[0])&&(e.lastIndex=P(i,E(e.lastIndex),c))}for(var s="",l=0,h=0;h<f.length;h++){a=f[h];for(var p=String(a[0]),v=M(j(O(a.index),i.length),0),d=[],y=1;y<a.length;y++)d.push(A(a[y]));var g=a.groups;if(o){var m=[p].concat(d,v,i);void 0!==g&&m.push(g);var b=String(n.apply(void 0,m))}else b=x(p,i,v,d,g,n);l<=v&&(s+=i.
return r._settledAt(S,n,t)},function(t){return r._settledAt(x,n,t)})},R),k=(C.prototype["catch"]=function(t){return this.then(null,t)},C.prototype["finally"]=function(n){var r=this.constructor;return s(n)?this.then(function(t){return r.resolve(n()).then(function(){return t})},function(t){return r.resolve(n()).then(function(){throw t})}):this.then(n,n)},C);return k.prototype.then=y,k.all=function V(t){return new L(this,t).promise},k.race=function B(i){var o=this;return new o(e(i)?function(t,n){for(var r=i.length,e=0;e<r;e++)o.resolve(i[e]).then(t,n)}:function(t,n){return n(new TypeError("You must pass an array to race."))})},k.resolve=g,k.reject=function z(t){var n=new this(b);return M(n,t),n},k._setScheduler=function Y(t){o=t},k._setAsap=function q(t){u=t},k._asap=u,k.polyfill=function K(){var t=void 0;if(void 0!==J)t=J;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=k},k.Promise=k},"object"===X(i)&&void 0!==e?e.exports=r():void 0===(n="function"==typeof(t=r)?t.call(i,o,i,e):t)||(e.exports=n)}).call(this,o(311),o(312))},function(t,n){function o(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function c(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(n){try{return r.call(null,t,0)}catch(n){return r.call(this,t,0)}}}function h(){s&&f&&(s=!1,f.length?a=f.concat(a):l=-1,a.length&&p())}function p(){if(!s){var t=c(h);s=!0;for(var n=a.length;n;){for(f=a,a=[];++l<n;)f&&f[l].run();l=-1,n=a.length}f=null,s=!1,function r(t){if(e===clearTimeout)return clearTimeout(t);if((e===u||!e)&&clearTimeout)return e=clearTimeout,clearTimeout(t);try{return e(t)}catch(n){try{return e.call(null,t)}catch(n){return e.call(this,t)}}}(t)}}function v(t,n){this.fun=t,this.array=n}function d(){}var r,e,i=t.exports={};!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{e="function"==typeof clearTimeout?clearTimeout:u}catch(t){e=u}}();var f,a=[],s=!1,l=-1;i.nextTick=function(t){var n=new Array(arguments.length-1);if(1<arguments.length)for(var r=1;r<arguments.length;r++)n[r-1]=arguments[r];a.push(new v(t,n)),1!==a.length||s||c(p)},v.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=d,i.addListener=d,i.once=d,i.off=d,i.removeListener=d,i.removeAllListeners=d,i.emit=d,i.prependListener=d,i.prependOnceListener=d,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(i){"object"===("undefined"==typeof window?"undefined":r(window))&&(e=window)}t.exports=e}]);var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,null==_global.BI&&(_global.BI={prepares:[]}),null==_global.BI.prepares&&(_global.BI.prepares=[]),Array.prototype.indexOf||(Array.prototype.indexOf=function(searchElement,fromIndex){var k;if(null==this)throw new TypeError('"this" is null or not defined');var o=Object(this),len=o.length>>>0;if(0===len)return-1;var n=0|fromIndex;if(n>=len)return-1;for(k=Math.max(n>=0?n:len-Math.abs(n),0);k<len;){if(k in o&&o[k]===searchElement)return k;k++}return-1}),Array.prototype.lastIndexOf||(Array.prototype.lastIndexOf=function(searchElement){"use strict";if(void 0===this
if(index!=lastIndex){var objValue=nested[key];newValue=customizer?customizer(objValue,key,nested):undefined,newValue===undefined&&(newValue=isObject(objValue)?objValue:isIndex(path[index+1])?[]:{})}assignValue(nested,key,newValue),nested=nested[key]}return object}function baseSlice(array,start,end){var index=-1,length=array.length;start<0&&(start=-start>length?0:length+start),end=end>length?length:end,end<0&&(end+=length),length=start>end?0:end-start>>>0,start>>>=0;for(var result=Array(length);++index<length;)result[index]=array[index+start];return result}function baseSome(collection,predicate){var result;return baseEach(collection,function(value,index,collection){return result=predicate(value,index,collection),!result}),!!result}function baseToString(value){if("string"==typeof value)return value;if(isArray(value))return arrayMap(value,baseToString)+"";if(isSymbol(value))return symbolToString?symbolToString.call(value):"";var result=value+"";return"0"==result&&1/value==-INFINITY?"-0":result}function baseUniq(array,iteratee,comparator){var index=-1,includes=arrayIncludes,length=array.length,isCommon=!0,result=[],seen=result;if(comparator)isCommon=!1,includes=arrayIncludesWith;else if(length>=LARGE_ARRAY_SIZE){var set=iteratee?null:createSet(array);if(set)return setToArray(set);isCommon=!1,includes=cacheHas,seen=new SetCache}else seen=iteratee?[]:result;outer:for(;++index<length;){var value=array[index],computed=iteratee?iteratee(value):value;if(value=comparator||0!==value?value:0,isCommon&&computed===computed){for(var seenIndex=seen.length;seenIndex--;)if(seen[seenIndex]===computed)continue outer;iteratee&&seen.push(computed),result.push(value)}else includes(seen,computed,comparator)||(seen!==result&&seen.push(computed),result.push(value))}return result}function baseUnset(object,path){return path=castPath(path,object),object=parent(object,path),null==object||delete object[toKey(last(path))]}function baseWrapperValue(value,actions){var result=value;return result instanceof LazyWrapper&&(result=result.value()),arrayReduce(actions,function(result,action){return action.func.apply(action.thisArg,arrayPush([result],action.args))},result)}function baseZipObject(props,values,assignFunc){for(var index=-1,length=props.length,valsLength=values.length,result={};++index<length;){var value=index<valsLength?values[index]:undefined;assignFunc(result,props[index],value)}return result}function castArrayLikeObject(value){return isArrayLikeObject(value)?value:[]}function castPath(value,object){return isArray(value)?value:isKey(value,object)?[value]:stringToPath(toString(value))}function castSlice(array,start,end){var length=array.length;return end=end===undefined?length:end,!start&&end>=length?array:baseSlice(array,start,end)}function cloneBuffer(buffer,isDeep){if(isDeep)return buffer.slice();var length=buffer.length,result=allocUnsafe?allocUnsafe(length):new buffer.constructor(length);return buffer.copy(result),result}function cloneArrayBuffer(arrayBuffer){var result=new arrayBuffer.constructor(arrayBuffer.byteLength);return new Uint8Array(result).set(new Uint8Array(arrayBuffer)),result}function cloneDataView(dataView,isDeep){var buffer=isDeep?cloneArrayBuffer(dataView.buffer):dataView.buffer;return new dataView.constructor(buffer,dataView.byteOffset,dataView.byteLength)}function cloneRegExp(regexp){var result=new regexp.constructor(regexp.source,reFlags.exec(regexp));return result.lastIndex=regexp.lastIndex,result}function cloneSymbol(symbol){return symbolValueOf?Object(symbolValueOf.call(symbol)):{}}function cloneTypedArray(typedArray,isDeep){var buffer=isDeep?cloneArrayBuffer(typedArray.buffer):typedArray.buffer;return new typedArray.constructor(buffer,typedArray.byteOffset,typedArray.length)}function compareAscending(value,other){if(value!==other){var valIsDefined=value!==undefined,valIsNull=null===value,valIsReflexive=value===value,valIsSymbol=isSymbol(value),othIsDefined=other!==undefined,othIsNull=null===other,othIsReflexive=other===other,othIsSymbol=isSymbol(other);if(!othIsNull&&!othIsSymbol&&!valIsSymbol&&value>other||valIsSymbol
if(null==collection)return 0;if(isArrayLike(collection))return isString(collection)?stringSize(collection):collection.length;var tag=getTag(collection);return tag==mapTag||tag==setTag?collection.size:baseKeys(collection).length}function some(collection,predicate,guard){var func=isArray(collection)?arraySome:baseSome;return guard&&isIterateeCall(collection,predicate,guard)&&(predicate=undefined),func(collection,baseIteratee(predicate,3))}function before(n,func){var result;if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return n=toInteger(n),function(){return--n>0&&(result=func.apply(this,arguments)),n<=1&&(func=undefined),result}}function debounce(func,wait,options){function invokeFunc(time){var args=lastArgs,thisArg=lastThis;return lastArgs=lastThis=undefined,lastInvokeTime=time,result=func.apply(thisArg,args)}function leadingEdge(time){return lastInvokeTime=time,timerId=setTimeout(timerExpired,wait),leading?invokeFunc(time):result}function remainingWait(time){var timeSinceLastCall=time-lastCallTime,timeSinceLastInvoke=time-lastInvokeTime,timeWaiting=wait-timeSinceLastCall;return maxing?nativeMin(timeWaiting,maxWait-timeSinceLastInvoke):timeWaiting}function shouldInvoke(time){var timeSinceLastCall=time-lastCallTime,timeSinceLastInvoke=time-lastInvokeTime;return lastCallTime===undefined||timeSinceLastCall>=wait||timeSinceLastCall<0||maxing&&timeSinceLastInvoke>=maxWait}function timerExpired(){var time=now();return shouldInvoke(time)?trailingEdge(time):void(timerId=setTimeout(timerExpired,remainingWait(time)))}function trailingEdge(time){return timerId=undefined,trailing&&lastArgs?invokeFunc(time):(lastArgs=lastThis=undefined,result)}function cancel(){timerId!==undefined&&clearTimeout(timerId),lastInvokeTime=0,lastArgs=lastCallTime=lastThis=timerId=undefined}function flush(){return timerId===undefined?result:trailingEdge(now())}function debounced(){var time=now(),isInvoking=shouldInvoke(time);if(lastArgs=arguments,lastThis=this,lastCallTime=time,isInvoking){if(timerId===undefined)return leadingEdge(lastCallTime);if(maxing)return timerId=setTimeout(timerExpired,wait),invokeFunc(lastCallTime)}return timerId===undefined&&(timerId=setTimeout(timerExpired,wait)),result}var lastArgs,lastThis,maxWait,result,timerId,lastCallTime,lastInvokeTime=0,leading=!1,maxing=!1,trailing=!0;if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return wait=toNumber(wait)||0,isObject(options)&&(leading=!!options.leading,maxing="maxWait"in options,maxWait=maxing?nativeMax(toNumber(options.maxWait)||0,wait):maxWait,trailing="trailing"in options?!!options.trailing:trailing),debounced.cancel=cancel,debounced.flush=flush,debounced}function memoize(func,resolver){if("function"!=typeof func||null!=resolver&&"function"!=typeof resolver)throw new TypeError(FUNC_ERROR_TEXT);var memoized=function(){var args=arguments,key=resolver?resolver.apply(this,args):args[0],cache=memoized.cache;if(cache.has(key))return cache.get(key);var result=func.apply(this,args);return memoized.cache=cache.set(key,result)||cache,result};return memoized.cache=new(memoize.Cache||MapCache),memoized}function negate(predicate){if("function"!=typeof predicate)throw new TypeError(FUNC_ERROR_TEXT);return function(){var args=arguments;switch(args.length){case 0:return!predicate.call(this);case 1:return!predicate.call(this,args[0]);case 2:return!predicate.call(this,args[0],args[1]);case 3:return!predicate.call(this,args[0],args[1],args[2])}return!predicate.apply(this,args)}}function once(func){return before(2,func)}function rest(func,start){if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return start=start===undefined?start:toInteger(start),baseRest(func,start)}function throttle(func,wait,options){var leading=!0,trailing=!0;if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return isObject(options)&&(leading="leading"in options?!!options.leading:leading,trailing="trailing"in options?!!options.trailing:trailing),debounce(func,wait,{leading:leading,maxWait:wait,trailing:trailing})}function clone(value){return baseClone(value,CLONE_SYMBO
start=toInteger(start);var result=this;return result.__filtered__&&(start>0||end<0)?new LazyWrapper(result):(start<0?result=result.takeRight(-start):start&&(result=result.drop(start)),end!==undefined&&(end=toInteger(end),result=end<0?result.dropRight(-end):result.take(end-start)),result)},LazyWrapper.prototype.takeRightWhile=function(predicate){return this.reverse().takeWhile(predicate).reverse()},LazyWrapper.prototype.toArray=function(){return this.take(MAX_ARRAY_LENGTH)},baseForOwn(LazyWrapper.prototype,function(func,methodName){var checkIteratee=/^(?:filter|find|map|reject)|While$/.test(methodName),isTaker=/^(?:head|last)$/.test(methodName),lodashFunc=lodash[isTaker?"take"+("last"==methodName?"Right":""):methodName],retUnwrapped=isTaker||/^find/.test(methodName);lodashFunc&&(lodash.prototype[methodName]=function(){var value=this.__wrapped__,args=isTaker?[1]:arguments,isLazy=value instanceof LazyWrapper,iteratee=args[0],useLazy=isLazy||isArray(value),interceptor=function(value){var result=lodashFunc.apply(lodash,arrayPush([value],args));return isTaker&&chainAll?result[0]:result};useLazy&&checkIteratee&&"function"==typeof iteratee&&1!=iteratee.length&&(isLazy=useLazy=!1);var chainAll=this.__chain__,isHybrid=!!this.__actions__.length,isUnwrapped=retUnwrapped&&!chainAll,onlyLazy=isLazy&&!isHybrid;if(!retUnwrapped&&useLazy){value=onlyLazy?value:new LazyWrapper(this);var result=func.apply(value,args);return result.__actions__.push({func:thru,args:[interceptor],thisArg:undefined}),new LodashWrapper(result,chainAll)}return isUnwrapped&&onlyLazy?func.apply(this,args):(result=this.thru(interceptor),isUnwrapped?isTaker?result.value()[0]:result.value():result)})}),arrayEach(["pop","push","shift","sort","splice","unshift"],function(methodName){var func=arrayProto[methodName],chainName=/^(?:push|sort|unshift)$/.test(methodName)?"tap":"thru",retUnwrapped=/^(?:pop|shift)$/.test(methodName);lodash.prototype[methodName]=function(){var args=arguments;if(retUnwrapped&&!this.__chain__){var value=this.value();return func.apply(isArray(value)?value:[],args)}return this[chainName](function(value){return func.apply(isArray(value)?value:[],args)})}}),baseForOwn(LazyWrapper.prototype,function(func,methodName){var lodashFunc=lodash[methodName];if(lodashFunc){var key=lodashFunc.name+"",names=realNames[key]||(realNames[key]=[]);names.push({name:methodName,func:lodashFunc})}}),realNames[createHybrid(undefined,WRAP_BIND_KEY_FLAG).name]=[{name:"wrapper",func:undefined}],LazyWrapper.prototype.clone=lazyClone,LazyWrapper.prototype.reverse=lazyReverse,LazyWrapper.prototype.value=lazyValue,lodash.prototype.first=lodash.prototype.head,symIterator&&(lodash.prototype[symIterator]=wrapperToIterator),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(root._=lodash,define(function(){return lodash})):freeModule?((freeModule.exports=lodash)._=lodash,freeExports._=lodash):root._=lodash}.call(this);var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),!function(undefined){var traverse=function(func,context){return function(value,key,obj){return func.call(context,key,value,obj)}},_apply=function(name){return function(){return _[name].apply(_,arguments)}},_applyFunc=function(name){return function(){var args=Array.prototype.slice.call(arguments,0);return args[1]=_.isFunction(args[1])?traverse(args[1],args[2]):args[1],_[name].apply(_,args)}};_.extend(BI,{assert:function(v,is){if(this.isFunction(is)){if(is(v))return!0;throw new Error(v+" error")}if(this.isArray(is)||(is=[is]),!this.deepContains(is,v))throw new Error(v+" error")},warn:function(message){console.warn(message)},UUID:function(){for(var f=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],str="",i=0;i<16;i++){var r=parseInt(f.length*Math.random(),10);str+=f[r]}return str},isWidget:function(widget){return widget instanceof BI.Widget||BI.View&&widget instanceof BI.View},createWidgets:function(items,options,context){if(!BI.isArray(items))throw new Error("cannot create Widgets");retur
}),predicate&&predicate.apply(this,arguments)}),c=BI.Widget._renderEngine.createElement;BI.DOM.patchProps(widget.element,c(c(container).children()[0]));var triggerLifeHook=function(w){w.beforeMount&&w.beforeMount(),w.mounted&&w.mounted(),BI.each(w._children,function(i,child){triggerLifeHook(child)})};return triggerLifeHook(widget),res}return container&&BI.Widget._renderEngine.createElement(container).append(widget.element),widget._mount(!0,!1,!1,predicate)}}(),function(){var kv={};BI.shortcut=BI.component=function(xtype,cls){null!=kv[xtype]&&_global.console&&console.error("shortcut:["+xtype+"] has been registed"),kv[xtype]=cls};var createWidget=function(config){var cls=kv[config.type],widget=new cls;return widget._initProps(config),widget._init(),widget._initRef(),widget};BI.createWidget=function(item,options,context){BI.init();var el,w;if(item||(item={}),BI.isWidget(options)?(context=options,options={}):options||(options={}),BI.isEmpty(item)&&BI.isEmpty(options))return BI.createWidget({type:"bi.layout"});if(BI.isWidget(item))return item;if(item.type||options.type)return el=BI.extend({},options,item),w=BI.Plugin.getWidget(el.type,el),w.listeners=(w.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(el.type,this)}}]),w.type===el.type?createWidget(w):BI.createWidget(BI.extend({},item,{type:w.type},options));if(item.el&&(item.el.type||options.type))return el=BI.extend({},options,item.el),w=BI.Plugin.getWidget(el.type,el),w.listeners=(w.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(el.type,this)}}]),w.type===el.type?createWidget(w):BI.createWidget(BI.extend({},item,{type:w.type},options));if(BI.isWidget(item.el))return item.el;throw new Error("无法根据item创建组件")},BI.createElement=function(){var widget=BI.createWidget.apply(this,arguments);return widget.element}}(),!function(){BI.CRYPT_TYPE=BI.CRYPT_TYPE||{},BI.CRYPT_TYPE.AES="aes";var CryptoJS=CryptoJS||function(Math,undefined){var C={},C_lib=C.lib={},Base=C_lib.Base=function(){function F(){}return{extend:function(overrides){F.prototype=this;var subtype=new F;return overrides&&subtype.mixIn(overrides),subtype.hasOwnProperty("init")||(subtype.init=function(){subtype.$super.init.apply(this,arguments)}),subtype.init.prototype=subtype,subtype.$super=this,subtype},create:function(){var instance=this.extend();return instance.init.apply(instance,arguments),instance},init:function(){},mixIn:function(properties){for(var propertyName in properties)properties.hasOwnProperty(propertyName)&&(this[propertyName]=properties[propertyName]);properties.hasOwnProperty("toString")&&(this.toString=properties.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),WordArray=C_lib.WordArray=Base.extend({init:function(words,sigBytes){words=this.words=words||[],sigBytes!=undefined?this.sigBytes=sigBytes:this.sigBytes=4*words.length},toString:function(encoder){return(encoder||Hex).stringify(this)},concat:function(wordArray){var thisWords=this.words,thatWords=wordArray.words,thisSigBytes=this.sigBytes,thatSigBytes=wordArray.sigBytes;if(this.clamp(),thisSigBytes%4)for(var i=0;i<thatSigBytes;i++){var thatByte=thatWords[i>>>2]>>>24-i%4*8&255;thisWords[thisSigBytes+i>>>2]|=thatByte<<24-(thisSigBytes+i)%4*8}else if(thatWords.length>65535)for(var i=0;i<thatSigBytes;i+=4)thisWords[thisSigBytes+i>>>2]=thatWords[i>>>2];else thisWords.push.apply(thisWords,thatWords);return this.sigBytes+=thatSigBytes,this},clamp:function(){var words=this.words,sigBytes=this.sigBytes;words[sigBytes>>>2]&=4294967295<<32-sigBytes%4*8,words.length=Math.ceil(sigBytes/4)},clone:function(){var clone=Base.clone.call(this);return clone.words=this.words.slice(0),clone},random:function(nBytes){for(var words=[],i=0;i<nBytes;i+=4)words.push(4294967296*Math.random()|0);return new WordArray.init(words,nBytes)}}),C_enc=C.enc={},Hex=C_enc.Hex={stringify:function(wordArray){for(var words=wordArray.words,sigBytes=wordArray.sigBytes,hexChars=[],i=0;i<sigBytes;i++){var bite=words[i>>>2]>>>24-i%4*8&255;hexChars.push((bite>>>4).toString(16)),he
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(containerSize,offset){var totalSize=this._cellSizeAndPositionManager.getTotalSize(),safeTotalSize=this.getTotalSize(),offsetPercentage=this._getOffsetPercentage(containerSize,offset,safeTotalSize);return Math.round(offsetPercentage*(safeTotalSize-totalSize))},getSizeAndPositionOfCell:function(index){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(index)},getSizeAndPositionOfLastMeasuredCell:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()},getTotalSize:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())},getUpdatedOffsetForIndex:function(align,containerSize,currentOffset,targetIndex){currentOffset=this._safeOffsetToOffset(containerSize,currentOffset);var offset=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex(align,containerSize,currentOffset,targetIndex);return this._offsetToSafeOffset(containerSize,offset)},getVisibleCellRange:function(containerSize,offset){return offset=this._safeOffsetToOffset(containerSize,offset),this._cellSizeAndPositionManager.getVisibleCellRange(containerSize,offset)},resetCell:function(index){this._cellSizeAndPositionManager.resetCell(index)},_getOffsetPercentage:function(containerSize,offset,totalSize){return totalSize<=containerSize?0:offset/(totalSize-containerSize)},_offsetToSafeOffset:function(containerSize,offset){var totalSize=this._cellSizeAndPositionManager.getTotalSize(),safeTotalSize=this.getTotalSize();if(totalSize===safeTotalSize)return offset;var offsetPercentage=this._getOffsetPercentage(containerSize,offset,totalSize);return Math.round(offsetPercentage*(safeTotalSize-containerSize))},_safeOffsetToOffset:function(containerSize,offset){var totalSize=this._cellSizeAndPositionManager.getTotalSize(),safeTotalSize=this.getTotalSize();if(totalSize===safeTotalSize)return offset;var offsetPercentage=this._getOffsetPercentage(containerSize,offset,safeTotalSize);return Math.round(offsetPercentage*(totalSize-containerSize))}},!function(){var _ChineseFirstPY="YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYYYNJQYXXGJHHSDSJNKKTMOMLCRXYPSNQSECCQZGGLLYJLMYZZSECYKYYHQWJSSGGYXYZYJWWKDJHYCHMYXJTLXJYQBYXZLDWRDJRWYSRLDZJPCBZJJBRCFTLECZSTZFXXZHTRQHYBDLYCZSSYMMRFMYQZPWWJJYFCRWFDFZQPYDDWYXKYJAWJFFXYPSFTZYHHYZYSWCJYXSCLCXXWZZXNBGNNXBXLZSZSBSGPYSYZDHMDZBQBZCWDZZYYTZHBTSYYBZGNTNXQYWQSKBPHHLXGYBFMJEBJHHGQTJCYSXSTKZHLYCKGLYSMZXYALMELDCCXGZYRJXSDLTYZCQKCNNJWHJTZZCQLJSTSTBNXBTYXCEQXGKWJYFLZQLYHYXSPSFXLMPBYSXXXYDJCZYLLLSJXFHJXPJBTFFYABYXBHZZBJYZLWLCZGGBTSSMDTJZXPTHYQTGLJSCQFZKJZJQNLZWLSLHDZBWJNCJZYZSQQYCQYRZCJJWYBRTWPYFTWEXCSKDZCTBZHYZZYYJXZCFFZZMJYXXSDZZOTTBZLQWFCKSZSXFYRLNYJMBDTHJXSQQCCSBXYYTSYFBXDZTGBCNSLCYZZPSAZYZZSCJCSHZQYDXLBPJLLMQXTYDZXSQJTZPXLCGLQTZWJBHCTSYJSFXYEJJTLBGXSXJMYJQQPFZASYJNTYDJXKJCDJSZCBARTDCLYJQMWNQNCLLLKBYBZZSYHQQLTWLCCXTXLLZNTYLNEWYZYXCZXXGRKRMTCNDNJTSYYSSDQDGHSDBJGHRWRQLYBGLXHLGTGXBQJDZPYJSJYJCTMRNYMGRZJCZGJMZMGXMPRYXKJNYMSGMZJYMKMFXMLDTGFBHCJHKYLPFMDXLQJJSMTQGZSJLQDLDGJYCALCMZCSDJLLNXDJFFFFJCZFMZFFPFKHKGDPSXKTACJDHHZDDCRRCFQYJKQCCWJDXHWJLYLLZGCFCQDSMLZPBJJPLSBCJGGDCKKDEZSQCCKJGCGKDJTJDLZYCXKLQSCGJCLTFPCQCZGWPJDQYZJJBYJHSJDZWGFSJGZKQCCZLLPSPKJGQJHZZLJPLGJGJJTHJJYJZCZMLZLYQBGJWMLJKXZDZNJQSYZMLJLLJKYWXMKJLHSKJGBMCLYYMKXJQLBMLLKMDXXKWYXYSLMLPSJQQJQXYXFJTJDXMXXLLCXQBSYJBGWYMBGGBCYXPJYGPEPFGDJGBHBNSQJYZJKJKHXQFGQZKFHYGKHDKLLSDJQXPQYKYBNQSXQNSZSWHBSXWHXWBZZXDMNSJBSBKBBZKLYLXGWXDRWYQZMYWSJQLCJXXJXKJEQXSCYETLZHLYYYSDZPAQYZCMTLSHTZCFYZYXYLJSDCJQAGYSLCQLYYYSHMRQQKLDXZSCSSSYDYCJYSFSJBFRSSZQSBXXPXJYSDRCKGJLGDKZJZBDKTCSYQPYHSTCLDJDHMXMCGXYZHJDDTMHLTXZXYLYMOHYJCLTYFBQQXPFBDFHHTKSQHZYYWCNXXCRWHOWGYJLEGWDQCWGFJYCSNTMYTOLBYGWQWESJPWNMLRYDZSZTXY
this._onWheelCallback=onWheel,this.onWheel=BI.bind(this.onWheel,this)},BI.WheelHandler.prototype={constructor:BI.WheelHandler,onWheel:function(event){var normalizedEvent=normalizeWheel(event),deltaX=this._deltaX+normalizedEvent.pixelX,deltaY=this._deltaY+normalizedEvent.pixelY,handleScrollX=this._handleScrollX(deltaX,deltaY),handleScrollY=this._handleScrollY(deltaY,deltaX);if(handleScrollX||handleScrollY){this._deltaX+=handleScrollX?normalizedEvent.pixelX:0,this._deltaY+=handleScrollY?normalizedEvent.pixelY:0,event.preventDefault?event.preventDefault():event.returnValue=!1;var changed;0===this._deltaX&&0===this._deltaY||(this._stopPropagation()&&(event.stopPropagation?event.stopPropagation():event.cancelBubble=!0),changed=!0),changed===!0&&null===this._animationFrameID&&(this._animationFrameID=requestAnimationFrame(this._didWheel))}},_didWheel:function(){this._animationFrameID=null,this._onWheelCallback(this._deltaX,this._deltaY),this._deltaX=0,this._deltaY=0}}}(),function(){function defaultComparator(a,b){return a<b}BI.Heap=function(items,comparator){this._items=items||[],this._size=this._items.length,this._comparator=comparator||defaultComparator,this._heapify()},BI.Heap.prototype={constructor:BI.Heap,empty:function(){return 0===this._size},pop:function(){if(0!==this._size){var elt=this._items[0],lastElt=this._items.pop();return this._size--,this._size>0&&(this._items[0]=lastElt,this._sinkDown(0)),elt}},push:function(item){this._items[this._size++]=item,this._bubbleUp(this._size-1)},size:function(){return this._size},peek:function(){if(0!==this._size)return this._items[0]},_heapify:function(){for(var index=Math.floor((this._size+1)/2);index>=0;index--)this._sinkDown(index)},_bubbleUp:function(index){for(var elt=this._items[index];index>0;){var parentIndex=Math.floor((index+1)/2)-1,parentElt=this._items[parentIndex];if(this._comparator(parentElt,elt))return;this._items[parentIndex]=elt,this._items[index]=parentElt,index=parentIndex}},_sinkDown:function(index){for(var elt=this._items[index];;){var leftChildIndex=2*(index+1)-1,rightChildIndex=2*(index+1),swapIndex=-1;if(leftChildIndex<this._size){var leftChild=this._items[leftChildIndex];this._comparator(leftChild,elt)&&(swapIndex=leftChildIndex)}if(rightChildIndex<this._size){var rightChild=this._items[rightChildIndex];this._comparator(rightChild,elt)&&(swapIndex===-1||this._comparator(rightChild,this._items[swapIndex]))&&(swapIndex=rightChildIndex)}if(swapIndex===-1)return;this._items[index]=this._items[swapIndex],this._items[swapIndex]=elt,index=swapIndex}}}}(),!function(){BI.LinkHashMap=function(){this.array=[],this.map={}},BI.LinkHashMap.prototype={constructor:BI.LinkHashMap,has:function(key){return key in this.map},add:function(key,value){"undefined"!=typeof key&&(key in this.map?this.map[key]=value:(this.array.push(key),this.map[key]=value))},remove:function(key){if(key in this.map){delete this.map[key];for(var i=0;i<this.array.length;i++)if(this.array[i]==key){this.array.splice(i,1);break}}},size:function(){return this.array.length},each:function(fn,scope){var scope=scope||window,fn=fn||null;if(null!=fn&&"function"==typeof fn)for(var i=0;i<this.array.length;i++){var key=this.array[i],value=this.map[key],re=fn.call(scope,key,value,i,this.array,this.map);if(0==re)break}},get:function(key){return this.map[key]},toArray:function(){var array=[];return this.each(function(key,value){array.push(value)}),array}}}(),!function(){BI.LRU=function(limit){this.size=0,this.limit=limit,this.head=this.tail=void 0,this._keymap={}};var p=BI.LRU.prototype;p.put=function(key,value){var removed;this.size===this.limit&&(removed=this.shift());var entry=this.get(key,!0);return entry||(entry={key:key},this._keymap[key]=entry,this.tail?(this.tail.newer=entry,entry.older=this.tail):this.head=entry,this.tail=entry,this.size++),entry.value=value,removed},p.shift=function(){var entry=this.head;return entry&&(this.head=this.head.newer,this.head.older=void 0,entry.newer=entry.older=void 0,this._keymap[entry.key]=void 0,this.size--),entry},p.get=function(key,returnEntry){var entry=this._keymap[key
return res||object},registerObject:function(type,fn){_ObjectPlugin[type]||(_ObjectPlugin[type]=[]),_ObjectPlugin[type].length>0&&console.log("对象已经注册过了!"),_ObjectPlugin[type].push(fn)},relieveObject:function(type){delete _ObjectPlugin[type]}})}(),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(src,tar,callback){},actionBack:function(tar,src,callback){}}),BI.ActionFactory={createAction:function(key,options){var action;switch(key){case"show":action=BI.ShowAction}return new action(options)}},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(src,tar,callback){tar=tar||this.options.tar,tar.setVisible(!0),callback&&callback()},actionBack:function(tar,src,callback){tar=tar||this.options.tar,tar.setVisible(!1),callback&&callback()}}),function(){function isEmpty(value){var result=""===value||null===value||void 0===value;return result}function isInvalidDate(date){return"Invalid Date"==date||"NaN"==date}function _eFormat(text,fmt){function eFormat(num,format){var neg=num<0?(num*=-1,"-"):"",magnitudeNeg="",funcName=num>0&&num<1?"floor":"ceil",magnitude=Math[funcName](Math.log(num)/Math.log(10));if(!isFinite(magnitude))return format.replace(/#/gi,"").replace(/\.e/gi,"E");num/=Math.pow(10,magnitude),num>0&&num<1&&(num*=10,magnitude-=1);var integerLen=getInteger(magnitude,format);integerLen>1&&(magnitude-=integerLen-1,num*=Math.pow(10,integerLen-1)),magnitude<0&&(magnitudeNeg="-",magnitude*=-1);var precision=getPrecision(format),isValueCarry=isValueCarried(num);return num*=Math.pow(10,precision),num=Math.round(num),isValueCarry&&(num/=10,magnitude+="-"===magnitudeNeg?-1:1),num/=Math.pow(10,precision),num=num.toFixed(precision),magnitude=formatExponential(format,magnitude,magnitudeNeg),neg+num+"E"+magnitude}function formatExponential(format,num,magnitudeNeg){if(num+="",!/e/gi.test(format))return num;for(format=format.split(/e/gi)[1];num.length<format.length;)num="0"+num;for(var isAllZero=!0,i=0,len=num.length;i<len;i++)isAllZero&&(isAllZero="0"===num.charAt(i));return magnitudeNeg=isAllZero?"":magnitudeNeg,magnitudeNeg+num}function getPrecision(format){if(!/e/gi.test(format))return 0;var arr=format.split(/e/gi)[0].split(".");return arr.length>1?arr[1].length:0}function getInteger(magnitude,format){if(!/e/gi.test(format))return 0;var formatLeft=format.split(/e/gi)[0].split(".")[0],i,f,len=formatLeft.length,valueLeftLen=0;for(i=0;i<len;i++)f=formatLeft.charAt(i),(0==f||"#"==f&&len-i<=magnitude+1)&&valueLeftLen++;return valueLeftLen}function isValueCarried(num){var roundNum=Math.round(num);return num=(num+"").split(".")[0],roundNum=(roundNum+"").split(".")[0],num.length!==roundNum.length}return text=+text,eFormat(text,fmt)}function _dealNumberPrecision(text,fright){if(/[eE]/.test(text)){var precision=0,i=0,ch;/[%‰]$/.test(fright)&&(precision=/[%]$/.test(fright)?2:3);for(var len=fright.length;i<len;i++)"0"!=(ch=fright.charAt(i))&&"#"!=ch||precision++;return Number(text).toFixed(precision)}return text}function _numberFormat(text,format){var text=text+"";if(!/[0-9]/.test(text)||!format)return text;var numMod=format.indexOf(";");if(numMod>-1)return text>=0?_numberFormat(text+"",format.substring(0,numMod)):_numberFormat(-text+"",format.substr(numMod+1));if(+text<0&&"-"!==format.charAt(0))return _numberFormat(-text+"","-"+format);var fp=format.split("."),fleft=fp[0]||"",fright=fp[1]||"";text=_dealNumberPrecision(text,fright);var tp=text.split("."),tleft=tp[0]||"",tright=tp[1]||"";if(/[%‰]$/.test(format)){var paddingZero=/[%]$/.test(format)?"00":"000";tright+=paddingZero,tleft+=tright.substr(0,paddingZero.length),tleft=tleft.replace(/^0+/gi,""),tright=tright.substr(paddingZero.length).replace(/0+$/gi,"")}var right=_dealWithRight(tright,fright);rig
}}),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]}),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(date){return date.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/,"$1$2").replace(/[^A-Z]/g,"")},getMonthDays:function(date,month){var year=date.getFullYear();return"undefined"==typeof month&&(month=date.getMonth()),0!=year%4||0==year%100&&0!=year%400||1!=month?BI.Date._MD[month]:29},getLastDateOfMonth:function(date){return BI.getDate(date.getFullYear(),date.getMonth(),BI.getMonthDays(date))},getDayOfYear:function(date){var now=BI.getDate(date.getFullYear(),date.getMonth(),date.getDate(),0,0,0),then=BI.getDate(date.getFullYear(),0,0,0,0,0),time=now-then;return Math.floor(time/BI.Date.DAY)},getWeekNumber:function(date){var d=BI.getDate(date.getFullYear(),date.getMonth(),date.getDate(),0,0,0),week=d.getDay(),startOfWeek=BI.StartOfWeek%7,middleDay=(startOfWeek+3)%7;middleDay=middleDay||7;var offsetWeekStartCount=week<startOfWeek?7+week-startOfWeek:week-startOfWeek,offsetWeekMiddleCount=middleDay<startOfWeek?7+middleDay-startOfWeek:middleDay-startOfWeek;d.setDate(d.getDate()-offsetWeekStartCount+offsetWeekMiddleCount);var ms=d.valueOf();return d.setMonth(0),d.setDate(1),Math.floor((ms-d.valueOf())/6048e5)+1},getQuarter:function(date){return Math.floor(date.getMonth()/3)+1},getOffsetDate:function(date,offset){return BI.getDate(BI.getTime(date.getFullYear(),date.getMonth(),date.getDate(),date.getHours(),date.getMinutes(),date.getSeconds())+864e5*offset)},getOffsetQuarter:function(date,n){var dt=BI.getDate(BI.getTime(date.getFullYear(),date.getMonth(),date.getDate(),date.getHours(),date.getMinutes(),date.getSeconds())),day=dt.getDate(),monthDay=BI.getMonthDays(BI.getDate(dt.getFullYear(),dt.getMonth()+3*BI.parseInt(n),1));return day>monthDay&&(day=monthDay),dt.setDate(day),dt.setMonth(dt.getMonth()+3*parseInt(n)),dt},getQuarterStartMonth:function(date){var quarterStartMonth=0,nowMonth=date.getMonth();return nowMonth<3&&(quarterStartMonth=0),2<nowMonth&&nowMonth<6&&(quarterStartMonth=3),5<nowMonth&&nowMonth<9&&(quarterStartMonth=6),nowMonth>8&&(quarterStartMonth=9),quarterStartMonth},getQuarterStartDate:function(date){return BI.getDate(date.getFullYear(),BI.getQuarterStartMonth(date),1)},getQuarterEndDate:function(date){var quarterEndMonth=BI.getQuarterStartMonth(date)+2;return BI.getDate(date.getFullYear(),quarterEndMonth,BI.getMonthDays(date,quarterEndMonth))},getOffsetMonth:function(date,n){var dt=BI.getDate(BI.getTime(date.getFullYear(),date.getMonth(),date.getDate(),date.getHours(),date.getMinutes(),date.getSeconds())),day=dt.getDate(),monthDay=BI.getMonthDays(BI.getDate(dt.getFullYear(),dt.getMonth()+parseInt(n),1))
null==fontSize&&(fontSize=12),fontSize+="px",span.css("font-size",fontSize).text(text);var width=span.width();return span.remove(),width},getTextSizeHeight:function(text,fontSize){var span=BI.Widget._renderEngine.createElement("<span></span>").addClass("text-width-span").appendTo("body");null==fontSize&&(fontSize=12),fontSize+="px",span.css("font-size",fontSize).text(text);var height=span.height();return span.remove(),height},getScrollWidth:function(){if(BI.isNull(this._scrollWidth)||0===this._scrollWidth){var ul=BI.Widget._renderEngine.createElement("<div>").width(50).height(50).css({position:"absolute",top:"-9999px",overflow:"scroll"}).appendTo("body");this._scrollWidth=ul[0].offsetWidth-ul[0].clientWidth,ul.destroy()}return this._scrollWidth},getImage:function(param,fillStyle,backgroundColor){var canvas=document.createElement("canvas"),ratio=2;BI.Widget._renderEngine.createElement("body").append(canvas);var ctx=canvas.getContext("2d");ctx.font="12px Georgia";var w=ctx.measureText(param).width+4;canvas.width=w*ratio,canvas.height=16*ratio,ctx.font=12*ratio+"px Georgia",ctx.fillStyle=fillStyle||"#3685f2",ctx.textBaseline="middle",ctx.fillText(param,2*ratio,9*ratio),BI.Widget._renderEngine.createElement(canvas).destroy();var backColor=backgroundColor||"rgba(54, 133, 242, 0.1)";return{width:w,height:16,src:canvas.toDataURL("image/png"),style:"background-color: "+backColor+";vertical-align: middle; margin: 0 1px; width:"+w+"px;height: 16px; max-width:"+w+"px;max-height: 16px; min-width:"+w+"px;min-height: 16px",param:param}}}),BI.extend(BI.DOM,{isColor:function(color){return color&&(this.isRGBColor(color)||this.isHexColor(color))},isRGBColor:function(color){return!!color&&"rgb"===color.substr(0,3)},isHexColor:function(color){return!!color&&("#"===color[0]&&7===color.length)},isDarkColor:function(hex){if(!hex||!this.isHexColor(hex))return!1;var rgb=this.rgb2json(this.hex2rgb(hex)),grayLevel=Math.round(.299*rgb.r+.587*rgb.g+.114*rgb.b);return grayLevel<192},getContrastColor:function(color){return color&&this.isColor(color)?this.isDarkColor(color)?"#ffffff":"#1a1a1a":""},rgb2hex:function(rgbColour){if(!rgbColour||"rgb"!=rgbColour.substr(0,3))return"";var rgbValues=rgbColour.match(/\d+(\.\d+)?/g),red=BI.parseInt(rgbValues[0]),green=BI.parseInt(rgbValues[1]),blue=BI.parseInt(rgbValues[2]),hexColour="#"+this.int2hex(red)+this.int2hex(green)+this.int2hex(blue);return hexColour},rgb2json:function(rgbColour){if(!rgbColour)return{};if(!this.isRGBColor(rgbColour))return{};var rgbValues=rgbColour.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(rgbValues[0]),g:BI.parseInt(rgbValues[1]),b:BI.parseInt(rgbValues[2])}},rgba2json:function(rgbColour){if(!rgbColour)return{};var rgbValues=rgbColour.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(rgbValues[0]),g:BI.parseInt(rgbValues[1]),b:BI.parseInt(rgbValues[2]),a:BI.parseFloat(rgbValues[3])}},json2rgb:function(rgb){return BI.isKey(rgb.r)&&BI.isKey(rgb.g)&&BI.isKey(rgb.b)?"rgb("+rgb.r+","+rgb.g+","+rgb.b+")":""},json2rgba:function(rgba){return BI.isKey(rgba.r)&&BI.isKey(rgba.g)&&BI.isKey(rgba.b)?"rgba("+rgba.r+","+rgba.g+","+rgba.b+","+rgba.a+")":""},int2hex:function(strNum){var hexdig=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return hexdig[strNum>>>4]+""+hexdig[15&strNum]},hex2rgb:function(color){if(!color)return"";if(!this.isHexColor(color))return color;var tempValue="rgb(",colorArray;return 7===color.length?colorArray=[BI.parseInt("0x"+color.substring(1,3)),BI.parseInt("0x"+color.substring(3,5)),BI.parseInt("0x"+color.substring(5,7))]:4===color.length&&(colorArray=[BI.parseInt("0x"+color.substring(1,2)),BI.parseInt("0x"+color.substring(2,3)),BI.parseInt("0x"+color.substring(3,4))]),tempValue+=colorArray[0]+",",tempValue+=colorArray[1]+",",tempValue+=colorArray[2]+")"},rgba2rgb:function(rgbColor,bgColor){if(BI.isNull(bgColor)&&(bgColor=1),"rgba"!=rgbColor.substr(0,4))return"";var rgbValues=rgbColor.match(/\d+(\.\d+)?/g);if(rgbValues.length<4)return"";var R=BI.parseFloat(rgbValues[0]),G=BI.parseFloat(rgbValues[1]),B=BI.parseFloat(rgbValues[2]),A=BI.parseFloat(rgbValues[3]);re
for(var collection=(tweeners[prop]||[]).concat(tweeners["*"]),index=0,length=collection.length;index<length;index++)if(collection[index].call(animation,prop,value))return})}function Animation(elem,properties,options){var result,stopped,index=0,length=animationPrefilters.length,deferred=jQuery.Deferred().always(function(){delete tick.elem}),tick=function(){if(stopped)return!1;for(var currentTime=fxNow||createFxNow(),remaining=Math.max(0,animation.startTime+animation.duration-currentTime),temp=remaining/animation.duration||0,percent=1-temp,index=0,length=animation.tweens.length;index<length;index++)animation.tweens[index].run(percent);return deferred.notifyWith(elem,[animation,percent,remaining]),percent<1&&length?remaining:(deferred.resolveWith(elem,[animation]),!1)},animation=deferred.promise({elem:elem,props:jQuery.extend({},properties),opts:jQuery.extend(!0,{specialEasing:{}},options),originalProperties:properties,originalOptions:options,startTime:fxNow||createFxNow(),duration:options.duration,tweens:[],createTween:function(prop,end){var tween=jQuery.Tween(elem,animation.opts,prop,end,animation.opts.specialEasing[prop]||animation.opts.easing);return animation.tweens.push(tween),tween},stop:function(gotoEnd){var index=0,length=gotoEnd?animation.tweens.length:0;if(stopped)return this;for(stopped=!0;index<length;index++)animation.tweens[index].run(1);return gotoEnd?deferred.resolveWith(elem,[animation,gotoEnd]):deferred.rejectWith(elem,[animation,gotoEnd]),this}}),props=animation.props;for(propFilter(props,animation.opts.specialEasing);index<length;index++)if(result=animationPrefilters[index].call(animation,elem,props,animation.opts))return result;return createTweens(animation,props),jQuery.isFunction(animation.opts.start)&&animation.opts.start.call(elem,animation),jQuery.fx.timer(jQuery.extend(tick,{elem:elem,anim:animation,queue:animation.opts.queue})),animation.progress(animation.opts.progress).done(animation.opts.done,animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always)}function propFilter(props,specialEasing){var value,name,index,easing,hooks;for(index in props)if(name=jQuery.camelCase(index),easing=specialEasing[name],value=props[index],jQuery.isArray(value)&&(easing=value[1],value=props[index]=value[0]),index!==name&&(props[name]=value,delete props[index]),hooks=jQuery.cssHooks[name],hooks&&"expand"in hooks){value=hooks.expand(value),delete props[name];for(index in value)index in props||(props[index]=value[index],specialEasing[index]=easing)}else specialEasing[name]=easing}function defaultPrefilter(elem,props,opts){var prop,index,length,value,dataShow,toggle,tween,hooks,oldfire,anim=this,style=elem.style,orig={},handled=[],hidden=elem.nodeType&&isHidden(elem);opts.queue||(hooks=jQuery._queueHooks(elem,"fx"),null==hooks.unqueued&&(hooks.unqueued=0,oldfire=hooks.empty.fire,hooks.empty.fire=function(){hooks.unqueued||oldfire()}),hooks.unqueued++,anim.always(function(){anim.always(function(){hooks.unqueued--,jQuery.queue(elem,"fx").length||hooks.empty.fire()})})),1===elem.nodeType&&("height"in props||"width"in props)&&(opts.overflow=[style.overflow,style.overflowX,style.overflowY],"inline"===jQuery.css(elem,"display")&&"none"===jQuery.css(elem,"float")&&(jQuery.support.inlineBlockNeedsLayout&&"inline"!==css_defaultDisplay(elem.nodeName)?style.zoom=1:style.display="inline-block")),opts.overflow&&(style.overflow="hidden",jQuery.support.shrinkWrapBlocks||anim.always(function(){style.overflow=opts.overflow[0],style.overflowX=opts.overflow[1],style.overflowY=opts.overflow[2]}));for(index in props)if(value=props[index],rfxtypes.exec(value)){if(delete props[index],toggle=toggle||"toggle"===value,value===(hidden?"hide":"show"))continue;handled.push(index)}if(length=handled.length){dataShow=jQuery._data(elem,"fxshow")||jQuery._data(elem,"fxshow",{}),"hidden"in dataShow&&(hidden=dataShow.hidden),toggle&&(dataShow.hidden=!hidden),hidden?jQuery(elem).show():anim.done(function(){jQuery(elem).hide()}),anim.done(function(){var prop;jQuery._removeData(elem,"fxshow");for(prop in orig)jQuery.style(elem,prop,
}),values.length||(elem.selectedIndex=-1),values}}},attr:function(elem,name,value){var hooks,notxml,ret,nType=elem.nodeType;if(elem&&3!==nType&&8!==nType&&2!==nType)return typeof elem.getAttribute===core_strundefined?jQuery.prop(elem,name,value):(notxml=1!==nType||!jQuery.isXMLDoc(elem),notxml&&(name=name.toLowerCase(),hooks=jQuery.attrHooks[name]||(rboolean.test(name)?boolHook:nodeHook)),value===undefined?hooks&&notxml&&"get"in hooks&&null!==(ret=hooks.get(elem,name))?ret:(typeof elem.getAttribute!==core_strundefined&&(ret=elem.getAttribute(name)),null==ret?undefined:ret):null!==value?hooks&&notxml&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined?ret:(elem.setAttribute(name,value+""),value):void jQuery.removeAttr(elem,name))},removeAttr:function(elem,value){var name,propName,i=0,attrNames=value&&value.match(core_rnotwhite);if(attrNames&&1===elem.nodeType)for(;name=attrNames[i++];)propName=jQuery.propFix[name]||name,rboolean.test(name)?!getSetAttribute&&ruseDefault.test(name)?elem[jQuery.camelCase("default-"+name)]=elem[propName]=!1:elem[propName]=!1:jQuery.attr(elem,name,""),elem.removeAttribute(getSetAttribute?name:propName)},attrHooks:{type:{set:function(elem,value){if(!jQuery.support.radioValue&&"radio"===value&&jQuery.nodeName(elem,"input")){var val=elem.value;return elem.setAttribute("type",value),val&&(elem.value=val),value}}}},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(elem,name,value){var ret,hooks,notxml,nType=elem.nodeType;if(elem&&3!==nType&&8!==nType&&2!==nType)return notxml=1!==nType||!jQuery.isXMLDoc(elem),notxml&&(name=jQuery.propFix[name]||name,hooks=jQuery.propHooks[name]),value!==undefined?hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined?ret:elem[name]=value:hooks&&"get"in hooks&&null!==(ret=hooks.get(elem,name))?ret:elem[name]},propHooks:{tabIndex:{get:function(elem){var attributeNode=elem.getAttributeNode("tabindex");return attributeNode&&attributeNode.specified?parseInt(attributeNode.value,10):rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href?0:undefined}}}}),boolHook={get:function(elem,name){var prop=jQuery.prop(elem,name),attr="boolean"==typeof prop&&elem.getAttribute(name),detail="boolean"==typeof prop?getSetInput&&getSetAttribute?null!=attr:ruseDefault.test(name)?elem[jQuery.camelCase("default-"+name)]:!!attr:elem.getAttributeNode(name);return detail&&detail.value!==!1?name.toLowerCase():undefined},set:function(elem,value,name){return value===!1?jQuery.removeAttr(elem,name):getSetInput&&getSetAttribute||!ruseDefault.test(name)?elem.setAttribute(!getSetAttribute&&jQuery.propFix[name]||name,name):elem[jQuery.camelCase("default-"+name)]=elem[name]=!0,name}},getSetInput&&getSetAttribute||(jQuery.attrHooks.value={get:function(elem,name){var ret=elem.getAttributeNode(name);return jQuery.nodeName(elem,"input")?elem.defaultValue:ret&&ret.specified?ret.value:undefined},set:function(elem,value,name){return jQuery.nodeName(elem,"input")?void(elem.defaultValue=value):nodeHook&&nodeHook.set(elem,value,name)}}),getSetAttribute||(nodeHook=jQuery.valHooks.button={get:function(elem,name){var ret=elem.getAttributeNode(name);return ret&&("id"===name||"name"===name||"coords"===name?""!==ret.value:ret.specified)?ret.value:undefined},set:function(elem,value,name){var ret=elem.getAttributeNode(name);return ret||elem.setAttributeNode(ret=elem.ownerDocument.createAttribute(name)),ret.value=value+="","value"===name||value===elem.getAttribute(name)?value:undefined}},jQuery.attrHooks.contenteditable={get:nodeHook.get,set:function(elem,value,name){nodeHook.set(elem,""!==value&&value,name)}},jQuery.each(["width","height"],function(i,name){jQuery.attrHooks[name]=jQuery.extend(jQuery.attrHooks[name],{set:function(elem,value){if(""===value)return elem.setAttribute(name,"auto"),value}})})),jQuery.support.hrefNormalized||(jQuery.each(["h
ID:new RegExp("^#("+characterEncoding+")"),CLASS:new RegExp("^\\.("+characterEncoding+")"),NAME:new RegExp("^\\[name=['\"]?("+characterEncoding+")['\"]?\\]"),TAG:new RegExp("^("+characterEncoding.replace("w","w*")+")"),ATTR:new RegExp("^"+attributes),PSEUDO:new RegExp("^"+pseudos),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"),needsContext:new RegExp("^"+whitespace+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+whitespace+"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")},rsibling=/[\x20\t\r\n\f]*[+~]/,rnative=/^[^{]+\{\s*\[native code/,rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,rinputs=/^(?:input|select|textarea|button)$/i,rheader=/^h\d$/i,rescape=/'|\\/g,rattributeQuotes=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,runescape=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,funescape=function(_,escaped){var high="0x"+escaped-65536;return high!==high?escaped:high<0?String.fromCharCode(high+65536):String.fromCharCode(high>>10|55296,1023&high|56320)};try{slice.call(preferredDoc.documentElement.childNodes,0)[0].nodeType}catch(e){slice=function(i){for(var elem,results=[];elem=this[i++];)results.push(elem);return results}}isXML=Sizzle.isXML=function(elem){var documentElement=elem&&(elem.ownerDocument||elem).documentElement;return!!documentElement&&"HTML"!==documentElement.nodeName},setDocument=Sizzle.setDocument=function(node){var doc=node?node.ownerDocument||node:preferredDoc;return doc!==document&&9===doc.nodeType&&doc.documentElement?(document=doc,docElem=doc.documentElement,documentIsXML=isXML(doc),support.tagNameNoComments=assert(function(div){return div.appendChild(doc.createComment("")),!div.getElementsByTagName("*").length}),support.attributes=assert(function(div){div.innerHTML="<select></select>";var type=typeof div.lastChild.getAttribute("multiple");return"boolean"!==type&&"string"!==type}),support.getByClassName=assert(function(div){return div.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!(!div.getElementsByClassName||!div.getElementsByClassName("e").length)&&(div.lastChild.className="e",2===div.getElementsByClassName("e").length)}),support.getByName=assert(function(div){div.id=expando+0,div.innerHTML="<a name='"+expando+"'></a><div name='"+expando+"'></div>",docElem.insertBefore(div,docElem.firstChild);var pass=doc.getElementsByName&&doc.getElementsByName(expando).length===2+doc.getElementsByName(expando+0).length;return support.getIdNotName=!doc.getElementById(expando),docElem.removeChild(div),pass}),Expr.attrHandle=assert(function(div){return div.innerHTML="<a href='#'></a>",div.firstChild&&typeof div.firstChild.getAttribute!==strundefined&&"#"===div.firstChild.getAttribute("href")})?{}:{href:function(elem){return elem.getAttribute("href",2)},type:function(elem){return elem.getAttribute("type")}},support.getIdNotName?(Expr.find.ID=function(id,context){if(typeof context.getElementById!==strundefined&&!documentIsXML){var m=context.getElementById(id);return m&&m.parentNode?[m]:[]}},Expr.filter.ID=function(id){var attrId=id.replace(runescape,funescape);return function(elem){return elem.getAttribute("id")===attrId}}):(Expr.find.ID=function(id,context){if(typeof context.getElementById!==strundefined&&!documentIsXML){var m=context.getElementById(id);return m?m.id===id||typeof m.getAttributeNode!==strundefined&&m.getAttributeNode("id").value===id?[m]:undefined:[]}},Expr.filter.ID=function(id){var attrId=id.replace(runescape,funescape);return function(elem){var node=typeof elem.getAttributeNode!==strundefined&&elem.getAttributeNode("id");return node&&node.value===attrId}}),Expr.find.TAG=support.tagNameNoComments?function(tag,context){if(typeof context.getElementsByTagName!==strundefined)return context.getElementsByTagName(tag)}:function(tag,context){var elem,tmp=[],i=0,results=context.getElementsByTagName(tag);if("*"===tag){for(;elem=results[i++];)1===elem.nodeType&&tmp.push(elem);return tmp}return results},Expr.find.NAME=support.getByName&&function(tag
},style:function(elem,name,value,extra){if(elem&&3!==elem.nodeType&&8!==elem.nodeType&&elem.style){var ret,type,hooks,origName=jQuery.camelCase(name),style=elem.style;if(name=jQuery.cssProps[origName]||(jQuery.cssProps[origName]=vendorPropName(style,origName)),hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName],value===undefined)return hooks&&"get"in hooks&&(ret=hooks.get(elem,!1,extra))!==undefined?ret:style[name];if(type=typeof value,"string"===type&&(ret=rrelNum.exec(value))&&(value=(ret[1]+1)*ret[2]+parseFloat(jQuery.css(elem,name)),type="number"),!(null==value||"number"===type&&isNaN(value)||("number"!==type||jQuery.cssNumber[origName]||(value+="px"),jQuery.support.clearCloneStyle||""!==value||0!==name.indexOf("background")||(style[name]="inherit"),hooks&&"set"in hooks&&(value=hooks.set(elem,value,extra))===undefined)))try{style[name]=value}catch(e){}}},css:function(elem,name,extra,styles){var num,val,hooks,origName=jQuery.camelCase(name);return name=jQuery.cssProps[origName]||(jQuery.cssProps[origName]=vendorPropName(elem.style,origName)),hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName],hooks&&"get"in hooks&&(val=hooks.get(elem,!0,extra)),val===undefined&&(val=curCSS(elem,name,styles)),"normal"===val&&name in cssNormalTransform&&(val=cssNormalTransform[name]),""===extra||extra?(num=parseFloat(val),extra===!0||jQuery.isNumeric(num)?num||0:val):val},swap:function(elem,options,callback,args){var ret,name,old={};for(name in options)old[name]=elem.style[name],elem.style[name]=options[name];ret=callback.apply(elem,args||[]);for(name in options)elem.style[name]=old[name];return ret}}),window.getComputedStyle?(getStyles=function(elem){return window.getComputedStyle(elem,null)},curCSS=function(elem,name,_computed){var width,minWidth,maxWidth,computed=_computed||getStyles(elem),ret=computed?computed.getPropertyValue(name)||computed[name]:undefined,style=elem.style;return computed&&(""!==ret||jQuery.contains(elem.ownerDocument,elem)||(ret=jQuery.style(elem,name)),rnumnonpx.test(ret)&&rmargin.test(name)&&(width=style.width,minWidth=style.minWidth,maxWidth=style.maxWidth,style.minWidth=style.maxWidth=style.width=ret,ret=computed.width,style.width=width,style.minWidth=minWidth,style.maxWidth=maxWidth)),ret}):document.documentElement.currentStyle&&(getStyles=function(elem){return elem.currentStyle},curCSS=function(elem,name,_computed){var left,rs,rsLeft,computed=_computed||getStyles(elem),ret=computed?computed[name]:undefined,style=elem.style;return null==ret&&style&&style[name]&&(ret=style[name]),rnumnonpx.test(ret)&&!rposition.test(name)&&(left=style.left,rs=elem.runtimeStyle,rsLeft=rs&&rs.left,rsLeft&&(rs.left=elem.currentStyle.left),style.left="fontSize"===name?"1em":ret,ret=style.pixelLeft+"px",style.left=left,rsLeft&&(rs.left=rsLeft)),""===ret?"auto":ret}),jQuery.each(["height","width"],function(i,name){jQuery.cssHooks[name]={get:function(elem,computed,extra){if(computed)return 0===elem.offsetWidth&&rdisplayswap.test(jQuery.css(elem,"display"))?jQuery.swap(elem,cssShow,function(){return getWidthOrHeight(elem,name,extra)}):getWidthOrHeight(elem,name,extra)},set:function(elem,value,extra){var styles=extra&&getStyles(elem);return setPositiveNumber(elem,value,extra?augmentWidthOrHeight(elem,name,extra,jQuery.support.boxSizing&&"border-box"===jQuery.css(elem,"boxSizing",!1,styles),styles):0)}}}),jQuery.support.opacity||(jQuery.cssHooks.opacity={get:function(elem,computed){return ropacity.test((computed&&elem.currentStyle?elem.currentStyle.filter:elem.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":computed?"1":""},set:function(elem,value){var style=elem.style,currentStyle=elem.currentStyle,opacity=jQuery.isNumeric(value)?"alpha(opacity="+100*value+")":"",filter=currentStyle&&currentStyle.filter||style.filter||"";style.zoom=1,(value>=1||""===value)&&""===jQuery.trim(filter.replace(ralpha,""))&&style.removeAttribute&&(style.removeAttribute("filter"),""===value||currentStyle&&!currentStyle.filter)||(style.filter=ralpha.test(filter)?filter.replace(ralpha,opacity):filter+" "+opacity)}}),jQuery(function(){jQuery.support.reli
return this.height()>0&&this[0].clientWidth<this[0].offsetWidth},hasHorizonScroll:function(){return this.width()>0&&this[0].clientHeight<this[0].offsetHeight},getStyle:function(name){var node=this[0],computedStyle=void 0;if(_global.getComputedStyle&&(computedStyle=_global.getComputedStyle(node,null)))return computedStyle.getPropertyValue(BI.hyphenate(name));if(document.defaultView&&document.defaultView.getComputedStyle){if(computedStyle=document.defaultView.getComputedStyle(node,null))return computedStyle.getPropertyValue(BI.hyphenate(name));if("display"===name)return"none"}return node.currentStyle?"float"===name?node.currentStyle.cssFloat||node.currentStyle.styleFloat:node.currentStyle[BI.camelize(name)]:node.style&&node.style[BI.camelize(name)]},__isMouseInBounds__:function(e){var offset2Body=this.get(0).getBoundingClientRect?this.get(0).getBoundingClientRect():this.offset(),width=offset2Body.width||this.outerWidth(),height=offset2Body.height||this.outerHeight();return!(e.pageX<Math.floor(offset2Body.left)||e.pageX>offset2Body.left+width||e.pageY<Math.floor(offset2Body.top)||e.pageY>offset2Body.top+height)},__hasZIndexMask__:function(zindex){return zindex&&null!=this.zIndexMask[zindex]},__buildZIndexMask__:function(zindex,domArray){this.zIndexMask=this.zIndexMask||{},this.indexMask=this.indexMask||[];var mask=BI.createWidget({type:"bi.center_adapt",cls:"bi-z-index-mask",items:domArray});return mask.element.css({"z-index":zindex}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:mask,left:0,right:0,top:0,bottom:0}]}),this.indexMask.push(mask),zindex&&(this.zIndexMask[zindex]=mask),mask.element},__releaseZIndexMask__:function(zindex){if(zindex&&this.zIndexMask[zindex])return BI.remove(this.indexMask,this.zIndexMask[zindex]),void this.zIndexMask[zindex].destroy();this.indexMask=this.indexMask||[];var indexMask=this.indexMask.pop();indexMask&&indexMask.destroy()}})),_.extend(BI,{$import:function(){function loadReady(src,must){var $scripts=BI.$("head script, body script");BI.$.each($scripts,function(i,item){item.src.indexOf(src)!=-1&&(_LOADED[src]=!0)});var $links=BI.$("head link");BI.$.each($links,function(i,item){item.href.indexOf(src)!=-1&&must&&(_LOADED[src]=!1,BI.$(item).remove())})}var _LOADED={};return function(src,ext,must){if(loadReady(src,must),_LOADED[src]!==!0)if("css"===ext){var link=document.createElement("link");link.rel="stylesheet",link.type="text/css",link.href=src;var head=document.getElementsByTagName("head")[0];head.appendChild(link),_LOADED[src]=!0}else BI.$.ajax({url:src,dataType:"script",async:!1,cache:!0,complete:function(res,status){"success"==status&&(_LOADED[src]=!0)}})}}()}),Number.prototype.toFixed&&"0.000"===8e-5.toFixed(3)&&"0"!==.9.toFixed(0)&&"1.25"===1.255.toFixed(2)&&"1000000000000000128"===(0xde0b6b3a7640080).toFixed(0)||!function(){function multiply(n,c){for(var i=-1;++i<size;)c+=n*data[i],data[i]=c%base,c=Math.floor(c/base)}function divide(n){for(var i=size,c=0;--i>=0;)c+=data[i],data[i]=Math.floor(c/n),c=c%n*base}function toString(){for(var i=size,s="";--i>=0;)if(""!==s||0===i||0!==data[i]){var t=String(data[i]);""===s?s=t:s+="0000000".slice(0,7-t.length)+t}return s}function pow(x,n,acc){return 0===n?acc:n%2===1?pow(x,n-1,acc*x):pow(x*x,n/2,acc)}function log(x){for(var n=0;x>=4096;)n+=12,x/=4096;for(;x>=2;)n+=1,x/=2;return n}var base,size,data,i;base=1e7,size=6,data=[0,0,0,0,0,0],Number.prototype.toFixed=function(fractionDigits){var f,x,s,m,e,z,j,k;if(f=Number(fractionDigits),f=f!==f?0:Math.floor(f),f<0||f>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(x=Number(this),x!==x)return"NaN";if(x<=-1e21||x>1e21)return String(x);if(s="",x<0&&(s="-",x=-x),m="0",x>1e-21)if(e=log(x*pow(2,69,1))-69,z=e<0?x*pow(2,-e,1):x/pow(2,e,1),z*=4503599627370496,e=52-e,e>0){for(multiply(0,z),j=f;j>=7;)multiply(1e7,0),j-=7;for(multiply(pow(10,j,1),0),j=e-1;j>=23;)divide(1<<23),j-=23;divide(1<<j),multiply(1,1),divide(2),m=toString()}else multiply(0,z),multiply(1<<-e,0),m=toString()+"0.00000000000000000000".slice(2,2+f);return f>0?(k=m.length,m=k<=f?s+"0.00000000
var o=this.options;this.$wrapper=BI.Widget._renderEngine.createElement("<div>").addClass("flex-scrollable-vertical-layout-wrapper h-"+o.horizontalAlign).addClass("v-"+o.verticalAlign),this.populate(this.options.items)},_addElement:function(i,item){var o=this.options,w=BI.FlexWrapperVerticalLayout.superclass._addElement.apply(this,arguments);return w.element.css({position:"relative","flex-shrink":"0"}),o.rowSize[i]>0&&w.element.height(o.rowSize[i]),"fill"===o.rowSize[i]&&w.element.css("flex","1"),o.vgap+o.tgap+(item.tgap||0)+(item.vgap||0)!==0&&w.element.css({"margin-top":(0===i?o.vgap:0)+o.tgap+(item.tgap||0)+(item.vgap||0)+"px"}),o.hgap+o.lgap+(item.lgap||0)+(item.hgap||0)!==0&&w.element.css({"margin-left":o.hgap+o.lgap+(item.lgap||0)+(item.hgap||0)+"px"}),o.hgap+o.rgap+(item.rgap||0)+(item.hgap||0)!==0&&w.element.css({"margin-right":o.hgap+o.rgap+(item.rgap||0)+(item.hgap||0)+"px"}),o.vgap+o.bgap+(item.bgap||0)+(item.vgap||0)!==0&&w.element.css({"margin-bottom":o.vgap+o.bgap+(item.bgap||0)+(item.vgap||0)+"px"}),w},appendFragment:function(frag){this.$wrapper.append(frag),this.element.append(this.$wrapper)},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(items){BI.FlexWrapperVerticalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_scrollable_vertical",BI.FlexWrapperVerticalLayout),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(i,item){var o=this.options,w=BI.AbsoluteLayout.superclass._addElement.apply(this,arguments),left=0,right=0,top=0,bottom=0;return BI.isNotNull(item.left)&&(w.element.css({left:item.left}),left+=item.left),BI.isNotNull(item.right)&&(w.element.css({right:item.right}),right+=item.right),BI.isNotNull(item.top)&&(w.element.css({top:item.top}),top+=item.top),BI.isNotNull(item.bottom)&&(w.element.css({bottom:item.bottom}),bottom+=item.bottom),BI.isNotNull(o.hgap)&&(left+=o.hgap,w.element.css({left:left}),right+=o.hgap,w.element.css({right:right})),BI.isNotNull(o.vgap)&&(top+=o.vgap,w.element.css({top:top}),bottom+=o.vgap,w.element.css({bottom:bottom})),BI.isNotNull(o.lgap)&&(left+=o.lgap,w.element.css({left:left})),BI.isNotNull(o.rgap)&&(right+=o.rgap,w.element.css({right:right})),BI.isNotNull(o.tgap)&&(top+=o.tgap,w.element.css({top:top})),BI.isNotNull(o.bgap)&&(bottom+=o.bgap,w.element.css({bottom:bottom})),BI.isNotNull(item.width)&&w.element.css({width:item.width}),BI.isNotNull(item.height)&&w.element.css({height:item.height}),w.element.css({position:"absolute"}),w},resize:function(){this.stroke(this.options.items)},stroke:function(items){this.options.items=items||[];var self=this;BI.each(items,function(i,item){if(item){if(!BI.isWidget(item)&&!item.el)throw new Error("el must be exist");self._addElement(i,item)}})},populate:function(items){BI.AbsoluteLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.absolute",BI.AbsoluteLayout),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(i,item){var o=this.options,w=BI.AdaptiveLayout.superclass._addElement.apply(this,arguments);w.element.css({position:"relative"});var left=0,right=0,top=0,bottom=0;return BI.isNotNull(item.left)&&w.element.css({left:item.left}),BI.isNotNull(item.right)&&w.element.css({right:item.right}),BI.isNotNull(item.top)&&w.element.css({top:item.top}),BI.isNotNull(item.bottom)&&w.element.css({bottom:item.bottom}),BI.isNotNull(o.hgap)&&(left+=o.hgap,w.element.css({"margin-left":left}),right+=o.hgap,w.element.css({"margin-right":right})),
item.height<1&&item.height>=0?w.element.css({bottom:100*bottom[i]+"%",height:100*item.height+"%"}):w.element.css({bottom:bottom[i]+(item.vgap||0)+(item.bgap||0)+o.vgap+o.bgap+"px",height:BI.isNumber(item.height)?item.height:""}),!BI.isNumber(item.height))return!0})},update:function(){},populate:function(items){BI.VTapeLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.vtape",BI.VTapeLayout),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(idx,arr){function firstElement(item,row,col){0===row&&item.addClass("first-row"),0===col&&item.addClass("first-col"),item.addClass(BI.isOdd(row+1)?"odd-row":"even-row"),item.addClass(BI.isOdd(col+1)?"odd-col":"even-col"),item.addClass("center-element")}function firstObject(item,row,col){var cls="";0===row&&(cls+=" first-row"),0===col&&(cls+=" first-col"),cls+=BI.isOdd(row+1)?" odd-row":" even-row",cls+=BI.isOdd(col+1)?" odd-col":" even-col",item.cls=(item.cls||"")+cls+" center-element"}function first(item,row,col){item instanceof BI.Widget?firstElement(item.element,row,col):item.el instanceof BI.Widget?firstElement(item.el.element,row,col):item.el?firstObject(item.el,row,col):firstObject(item,row,col)}for(var o=this.options,tr=BI.createWidget({type:"bi.default",tagName:"tr"}),i=0;i<arr.length;i++){var w=BI.createWidget(arr[i]);w.element.css({position:"relative",top:"0",left:"0",margin:"0px auto"}),arr[i].lgap&&w.element.css({"margin-left":arr[i].lgap+"px"}),arr[i].rgap&&w.element.css({"margin-right":arr[i].rgap+"px"}),arr[i].tgap&&w.element.css({"margin-top":arr[i].tgap+"px"}),arr[i].bgap&&w.element.css({"margin-bottom":arr[i].bgap+"px"}),first(w,this.rows++,i);var td=BI.createWidget({type:"bi.default",attributes:{width:o.columnSize[i]<=1?100*o.columnSize[i]+"%":o.columnSize[i]},tagName:"td",items:[w]});td.element.css({position:"relative","vertical-align":"middle",margin:"0",padding:"0",border:"none"}),tr.addItem(td)}return this.addWidget(this.getName()+idx,tr),tr},appendFragment:function(frag){this.$table.append(frag),this.element.append(this.$table)},resize:function(){},addItem:function(arr){if(!BI.isArray(arr))throw new Error("item must be array");return BI.TdLayout.superclass.addItem.apply(this,arguments)},update:function(){},populate:function(items){BI.TdLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.td",BI.TdLayout),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(i,item){var o=this.options,w=BI.VerticalLayout.superclass._addElement.apply(this,arguments);return w.element.css({position:"relative"}),o.vgap+o.tgap+(item.tgap||0)+(item.vgap||0)!==0&&w.element.css({"margin-top":(0===i?o.vgap:0)+o.tgap+(item.tgap||0)+(item.vgap||0)+"px"}),o.hgap+o.lgap+(item.lgap||0)+(item.hgap||0)!==0&&w.element.css({"margin-left":o.hgap+o.lgap+(item.lgap||0)+(item.hgap||0)+"px"}),o.hgap+o.rgap+(item.rgap||0)+(item.hgap||0)!==0&&w.element.css({"margin-right":o.hgap+o.rgap+(item.rgap||0)+(item.hgap||0)+"px"}),o.vgap+o.bgap+(item.bgap||0)+(item.vgap||0)!==0&&w.element.css({"margin-bottom":o.vgap+o.bgap+(item.bgap||0)+(item.vgap||0)+"px"}),w},resize:function(){this.stroke(this.options.items)},populate:function(items){BI.VerticalLayout.superclass.populate.apply(this,arguments),this._mount()}})
pushTarget(this);var value=void 0,vm=this.vm;try{value=this.getter.call(vm,vm)}catch(e){}finally{this.deep&&traverse(value),popTarget(),this.cleanupDeps()}return value},Watcher.prototype.addDep=function addDep(dep){var id=dep.id;this.newDepIds.has(id)||(this.newDepIds.add(id),this.newDeps.push(dep),this.depIds.has(id)||dep.addSub(this))},Watcher.prototype.cleanupDeps=function cleanupDeps(){for(var i=this.deps.length;i--;){var dep=this.deps[i];this.newDepIds.has(dep.id)||dep.removeSub(this)}var tmp=this.depIds;this.depIds=this.newDepIds,this.newDepIds=tmp,this.newDepIds.clear(),tmp=this.deps,this.deps=this.newDeps,this.newDeps=tmp,this.newDeps.length=0},Watcher.prototype.update=function update(options){this.lazy?this.dirty=!0:this.sync?this.run(options):queueWatcher(this,options)},Watcher.prototype.run=function run(options){if(this.active){var value=this.get();if(value!==this.value||options&&options.refresh||this.deep){var oldValue=this.value;if(this.value=value,this.user)try{this.cb.call(this.vm,value,oldValue,options)}catch(e){console.error(e)}else try{this.cb.call(this.vm,value,oldValue,options)}catch(e){console.error(e)}}}},Watcher.prototype.evaluate=function evaluate(){this.value=this.get(),this.dirty=!1},Watcher.prototype.depend=function depend(){for(var i=this.deps.length;i--;)this.deps[i].depend()},Watcher.prototype.teardown=function teardown(){if(this.active){remove(this.vm._watchers,this);for(var i=this.deps.length;i--;)this.deps[i].removeSub(this);this.active=!1}},Watcher}(),seenObjects=new Set,falsy$1,operators={"||":falsy$1,"&&":falsy$1,"(":falsy$1,")":falsy$1},mixinInjection={},computedWatcherOptions={lazy:!0},Model=function(){function Model(){_classCallCheck(this,Model)}return Model.prototype._constructor=function _constructor(model){(model instanceof Observer||model instanceof Model)&&(model=model.model),model&&model.__ob__?this.$$model=model:this.options=model||{},this._parent=Model.target;var state=_.isFunction(this.state)?this.state():this.state,computed=this.computed,context=this.context,childContext=this.childContext,watch$$1=this.watch,actions=this.actions,keys=_.keys(this.$$model).concat(_.keys(state)).concat(_.keys(computed)).concat(context||[]),mixins=this.mixins;if(defineProps(this,keys),childContext&&defineContext(this,childContext),this.$$model&&(this.model.__ob__=this.$$model.__ob__),initMixins(this,mixins),this.init(),initState(this,state),initComputed(this,computed),initWatch(this,watch$$1),initMethods(this,actions),this.created&&this.created(),this.$$model)return this.model},Model.prototype._init=function _init(){},Model.prototype.init=function init(){this._init()},Model.prototype.destroy=function destroy(){for(var _key3 in this._computedWatchers)this._computedWatchers[_key3].teardown();_.each(this._watchers,function(unwatches){unwatches=_.isArray(unwatches)?unwatches:[unwatches],_.each(unwatches,function(unwatch){unwatch()})}),this._watchers&&(this._watchers=[]),this.destroyed&&this.destroyed(),this.$$model=null,this.$$computed=null,this.$$state=null},Model}(),version="2.0";exports.define=define,exports.version=version,exports.$$skipArray=$$skipArray,exports.mixin=mixin,exports.Model=Model,exports.observerState=observerState,exports.Observer=Observer,exports.observe=observe,exports.notify=notify,exports.defineReactive=defineReactive,exports.set=set,exports.del=del,exports.Watcher=Watcher,exports.pushTarget=pushTarget,exports.popTarget=popTarget,exports.watch=watch,exports.toJSON=toJSON,exports.__esModule=!0}),function(factory){"function"==typeof define&&define.amd?define(["../core/jquery"],factory):"object"==typeof exports?module.exports=factory:factory(BI.jQuery)}(function($){function handler(event){var orgEvent=event||_global.event,args=slice.call(arguments,1),delta=0,deltaX=0,deltaY=0,absDelta=0,offsetX=0,offsetY=0;if(event=$.event.fix(orgEvent),event.type="mousewheel","detail"in orgEvent&&(deltaY=orgEvent.detail*-1),"wheelDelta"in orgEvent&&(deltaY=orgEvent.wheelDelta),"wheelDeltaY"in orgEvent&&(deltaY=orgEvent.wheelDeltaY),"wheelDeltaX"in orgEvent&&(deltaX=orgEvent.wheelDeltaX*-1),"a
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(o.value)&&this.setSelectedValue(o.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(treeId,treeNode){this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,treeNode,this),this.fireEvent(BI.TreeView.EVENT_CHANGE,treeNode,this)},_configSetting:function(){function onClick(event,treeId,treeNode){var checked=treeNode.checked,status=treeNode.getCheckStatus();status.half===!0&&status.checked===!0&&(checked=!1),self.nodes.checkNode(treeNode,!checked,!0,!0)}function getUrl(treeId,treeNode){var parentNode=self._getParentValues(treeNode);treeNode.times=treeNode.times||1;var param="id="+treeNode.id+"&times="+treeNode.times++ +"&parentValues= "+_global.encodeURIComponent(BI.jsonEncode(parentNode))+"&checkState="+_global.encodeURIComponent(BI.jsonEncode(treeNode.getCheckStatus()));return"&"+param}function beforeExpand(treeId,treeNode){return treeNode.isAjaxing?(BI.Msg.toast("Please Wait。","warning"),!1):(treeNode.children||(treeNode.times=1,ajaxGetNodes(treeNode,"refresh")),!0)}function onAsyncSuccess(event,treeId,treeNode,msg){if(treeNode.halfCheck=!1,msg&&0!==msg.length&&!/^<html>[\s,\S]*<\/html>$/gi.test(msg)&&!self._stop){var zTree=self.nodes,totalCount=treeNode.count||0;treeNode.children.length>totalCount?(treeNode.count=treeNode.children.length,BI.delay(function(){ajaxGetNodes(treeNode)},perTime)):(zTree.updateNode(treeNode),zTree.selectNode(treeNode.children[0]))}}function onAsyncError(event,treeId,treeNode,XMLHttpRequest,textStatus,errorThrown){var zTree=self.nodes;BI.Msg.toast("Error!","warning")}function ajaxGetNodes(treeNode,reloadType){var zTree=self.nodes;"refresh"==reloadType&&zTree.updateNode(treeNode),zTree.reAsyncChildNodes(treeNode,reloadType,!0)}function beforeCheck(treeId,treeNode){function track(children){BI.each(children,function(i,ch){ch.halfCheck===!0&&(ch.halfCheck=!1,track(ch.children))})}if(treeNode.halfCheck=!1,treeNode.checked===!0){track(treeNode.children);var treeObj=self.nodes,nodes=treeObj.getSelectedNodes();BI.$.each(nodes,function(index,node){node.halfCheck=!1})}var status=treeNode.getCheckStatus();status.half===!0&&status.checked===!0&&(treeNode.checked=!1)}function onCheck(event,treeId,treeNode){self._selectTreeNode(treeId,treeNode)}function onExpand(event,treeId,treeNode){treeNode.halfCheck=!1}function onCollapse(event,treeId,treeNode){}var paras=this.options.paras,self=this,setting={async:{enable:!0,url:getUrl,autoParam:["id","name"],otherParam:BI.cjkEncodeDO(paras)},check:{enable:!0},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0,dblClickExpand:!1},callback:{beforeExpand:beforeExpand,onAsyncSuccess:onAsyncSuccess,onAsyncError:onAsyncError,beforeCheck:beforeCheck,onCheck:onCheck,onExpand:onExpand,onCollapse:onCollapse,onClick:onClick}},className="dark",perTime=100;return setting},_getParentValues:function(treeNode){if(!treeNode.getParentNode())return[];var parentNode=treeNode.getParentNode(),result=this._getParentValues(parentNode);return result=result.concat([this._getNodeValue(parentNode)])},_getNodeValue:function(node){return null==node.value?BI.replaceAll(node.text.replace(/<[^>]+>/g,""),"&nbsp;"," "):node.value},_getHalfSelectedValues:function(map,node){var self=this,checkState=node.getCheckStatus();if(checkState.checked!==!1||checkState.half!==!1){if(BI.isNotEmptyArray(node.children)&&checkState.half===!0){var children=node.children;return void BI.each(children,function(i,ch){self._getHalfSelectedValues(map,ch)})}var parent=node.parentValues||self._getParentValues(node),path=parent.concat(this.
el:this.combo}]})))),o.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 hide(){self.isEnabled()&&self.isValid()&&self.combo.isEnabled()&&self.combo.isValid()&&o.toggle===!0&&(self._hideView(),self.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",self.combo),self.fireEvent(BI.Combo.EVENT_COLLAPSE)),self.popupView&&self.popupView.element.off("mouseenter."+self.getName()).off("mouseleave."+self.getName()),enterPopup=!1}var self=this,o=this.options,evs=(this.options.trigger||"").split(","),st=function(e){o.stopEvent&&e.stopEvent(),o.stopPropagation&&e.stopPropagation()},enterPopup=!1;BI.each(evs,function(i,ev){switch(ev){case"hover":self.element.on("mouseenter."+self.getName(),function(e){self.isEnabled()&&self.isValid()&&self.combo.isEnabled()&&self.combo.isValid()&&(self._popupView(),self.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",self.combo),self.fireEvent(BI.Combo.EVENT_EXPAND))}),self.element.on("mouseleave."+self.getName(),function(e){self.popupView&&(self.popupView.element.on("mouseenter."+self.getName(),function(e){enterPopup=!0,self.popupView.element.on("mouseleave."+self.getName(),function(e){hide()}),self.popupView.element.off("mouseenter."+self.getName())}),BI.defer(function(){enterPopup||hide()},50))});break;case"click":var debounce=BI.debounce(function(e){self.combo.element.__isMouseInBounds__(e)&&self.isEnabled()&&self.isValid()&&self.combo.isEnabled()&&self.combo.isValid()&&(o.toggle?self._toggle():self._popupView(),self.isViewVisible()?(self.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",self.combo),self.fireEvent(BI.Combo.EVENT_EXPAND)):(self.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",self.combo),self.fireEvent(BI.Combo.EVENT_COLLAPSE)))},BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1});self.element.off(ev+"."+self.getName()).on(ev+"."+self.getName(),function(e){debounce(e),st(e)});break;case"click-hover":var debounce=BI.debounce(function(e){self.combo.element.__isMouseInBounds__(e)&&self.isEnabled()&&self.isValid()&&self.combo.isEnabled()&&self.combo.isValid()&&(self._popupView(),self.isViewVisible()&&(self.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",self.combo),self.fireEvent(BI.Combo.EVENT_EXPAND)))},BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1});self.element.off("click."+self.getName()).on("click."+self.getName(),function(e){debounce(e),st(e)}),self.element.on("mouseleave."+self.getName(),function(e){self.popupView&&(self.popupView.element.on("mouseenter."+self.getName(),function(e){enterPopup=!0,self.popupView.element.on("mouseleave."+self.getName(),function(e){hide()}),self.popupView.element.off("mouseenter."+self.getName())}),BI.defer(function(){enterPopup||hide()},50))})}})},_initCombo:function(){this.combo=BI.createWidget(this.options.el,{value:this.options.value})},_assertPopupView:function(){var self=this,o=this.options;null==this.popupView&&(this.popupView=BI.createWidget(this.options.popup,{type:"bi.popup_view",value:o.value},this),this.popupView.on(BI.Controller.EVENT_CHANGE,function(type,value,obj){type===BI.Events.CLICK&&(self.combo.setValue(self.getValue()),self.fireEvent(BI.Combo.EVENT_CHANGE,value,obj)),self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popupView.setVisible(!1),BI.nextTick(function(){self.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(this.element.find(e.target).length>0||this.popupView&&this.popupView.element.find(e.target).length>0||"CodeMirror-cursor"===e.target.className||BI.Widget._renderEngine.createElement(e.target).closest(".CodeMirror-hints").length>0){var directions=this.options.direction.split(",");return void((B
if(!self._stop){var args=[].slice.call(arguments);args.length>0&&args.push(keyword),BI.Maskers.show(self.getName()),self.popupView.populate.apply(self.popupView,args),o.isAutoSync&&o.adapter&&o.adapter.getValue&&self.popupView.setValue(o.adapter.getValue()),self.popupView.loaded&&self.popupView.loaded(),self.fireEvent(BI.Searcher.EVENT_SEARCHING)}})}},_getLastSearchKeyword:function(){if(this.isValid()){var res=this.editor.getValue().match(/[\S]+/g);return BI.isNull(res)?"":res[res.length-1]}},setAdapter:function(adapter){this.options.adapter=adapter,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(v){BI.isNull(this.popupView)?this.options.popup.value=v:this.popupView.setValue(v)},getKeyword:function(){return this._getLastSearchKeyword()},getKeywords:function(){return this.editor.getKeywords()},getValue:function(){var o=this.options;return o.isAutoSync&&o.adapter&&o.adapter.getValue?o.adapter.getValue():this.isSearching()?this.popupView.getValue():o.adapter&&o.adapter.getValue?o.adapter.getValue():BI.isNull(this.popupView)?o.popup.value:this.popupView.getValue()},populate:function(result,searchResult,keyword){var o=this.options;this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),o.isAutoSync&&o.adapter&&o.adapter.getValue&&this.popupView.setValue(o.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),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 self=this,o=this.options;this._initSwitcher(),this._initPullDownAction(),this.switcher.on(BI.Controller.EVENT_CHANGE,function(type,value,obj){self.isEnabled()&&self.isValid()&&(type===BI.Events.EXPAND&&self._popupView(),type===BI.Events.COLLAPSE&&self._hideView(),type===BI.Events.EXPAND&&(self.fireEvent(BI.Controller.EVENT_CHANGE,arguments),self.fireEvent(BI.Switcher.EVENT_EXPAND)),type===BI.Events.COLLAPSE&&(self.fireEvent(BI.Controller.EVENT_CHANGE,arguments),self.isViewVisible()&&self.fireEvent(BI.Switcher.EVENT_COLLAPSE)),type===BI.Events.CLICK&&self.fireEvent(BI.Switcher.EVENT_TRIGGER_CHANGE,value,obj))}),this.element.hover(function(){self.isEnabled()&&self.switcher.isEnabled()&&self.element.addClass(o.hoverClass)},function(){self.isEnabled()&&self.switcher.isEnabled()&&self.element.removeClass(o.hoverClass)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.switcher}]}),o.isDefaultInit&&this._assertPopupView()},_toggle:function(){this._assertPopupView(),this.isExpanded()?this._hideView():this.isEnabled()&&this._popupView()},_initPullDownAction:function(){var self=this,o=this.options,evs=this.options.trigger.split(",");BI.each(evs,function(i,e){switch(e){case"hover":self.element[e](function(e){self.isEnabled()&&self.swit
"max-height":resetHeight+"px"})},setValue:function(selectedValues){this.tab&&this.tab.setValue(selectedValues),this.view.setValue(selectedValues)},getValue:function(){return this.view.getValue()}}),BI.PopupView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.popup_view",BI.PopupView),BI.SearcherView=BI.inherit(BI.Pane,{_defaultConfig:function(){var conf=BI.SearcherView.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.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 self=this,o=this.options;this.matcher=BI.createWidget(o.matcher,{type:"bi.button_group",chooseType:o.chooseType,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}],value:o.value}),this.matcher.on(BI.Controller.EVENT_CHANGE,function(type,val,ob){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments),type===BI.Events.CLICK&&self.fireEvent(BI.SearcherView.EVENT_CHANGE,val,ob)}),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(o.searcher,{type:"bi.button_group",chooseType:o.chooseType,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}],value:o.value}),this.searcher.on(BI.Controller.EVENT_CHANGE,function(type,val,ob){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments),type===BI.Events.CLICK&&self.fireEvent(BI.SearcherView.EVENT_CHANGE,val,ob)}),BI.createWidget({type:"bi.vertical",element:this,items:[this.matcher,this.spliter,this.searcher]})},startSearch:function(){},stopSearch:function(){},setValue:function(v){this.matcher.setValue(v),this.searcher.setValue(v)},getValue:function(){return this.matcher.getValue().concat(this.searcher.getValue())},populate:function(searchResult,matchResult,keyword){searchResult||(searchResult=[]),matchResult||(matchResult=[]),this.setTipVisible(searchResult.length+matchResult.length===0),this.spliter.setVisible(BI.isNotEmptyArray(matchResult)&&BI.isNotEmptyArray(searchResult)),this.matcher.populate(matchResult,keyword),this.searcher.populate(searchResult,keyword)},empty:function(){this.searcher.empty(),this.matcher.empty()},hasMatched:function(){return this.matcher.getAllButtons().length>0}}),BI.SearcherView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.searcher_view",BI.SearcherView),BI.ListView=BI.inherit(BI.Widget,{props:function(){return{baseCls:"bi-list-view",overscanHeight:100,blockSize:10,scrollTop:0,el:{},items:[]}},init:function(){var self=this;this.renderedIndex=-1,this.cache={}},render:function(){var self=this,o=this.options;return{type:"bi.vertical",items:[BI.extend({type:"bi.vertical",scrolly:!1,ref:function(){self.container=this}},o.el)],element:this}},mounted:function(){var self=this,o=this.options;this._populate(),this.element.scroll(function(e){o.scrollTop=self.element.scrollTop(),self._calculateBlocksToRender()});var lastWidth=this.element.width(),lastHeight=this.element.height();BI.ResizeDetector.addResizeListener(this,function(){var width=self.element.width(),height=self.element.height();width===lastWidth&&height===lastHeight||(lastWidth=width,lastHeight=height,self._calculateBlocksToRender())})},_renderMoreIf:function(){for(var self=this,o=this.options,height=this.element.height(),minContentHeight=o.scrollTop+height+o.overscanHeight,index=this.cache[this.renderedIndex]&&this.cache[this.renderedIndex].index+o.blockSize||0,cnt=this.renderedIndex+1,lastHeight,getElementHeight=function(){return self.container.element.height()};(lastHeight=getElementHeight())<minContentHeight&&index<o.items.length;){var items=o.items.slice(index,index+o.blockSize);this.container.addItems(items,this);var addedHeight=getElementHeight()-lastHeight;this.cache[cnt]={index:index,scrollTo
textRgap:0})},_init:function(){BI.TextIconItem.superclass._init.apply(this,arguments);var o=this.options,c=this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:o.textHgap,vgap:o.textVgap,lgap:o.textLgap,rgap:o.textRgap,text:o.text,value:o.value,keyword:o.keyword,height:o.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:o.height,height:o.height,iconWidth:o.iconWidth,iconHeight:o.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(o.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),BI.TextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var conf=BI.TextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.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 o=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:o.textAlign,whiteSpace:o.whiteSpace,textHeight:"nowrap"==o.whiteSpace?o.height:o.textHeight,height:o.height,hgap:o.textHgap,vgap:o.textVgap,lgap:o.textLgap,rgap:o.textRgap,text:o.text,value:o.value,keyword:o.keyword,py:o.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),BI.IconTextIconNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var conf=BI.IconTextIconNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.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 o=this.options,c=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:o.textHgap,vgap:o.textVgap,lgap:o.textLgap,rgap:o.textRgap,text:o.text,value:o.value,keyword:o.keyword,height:o.height});var icon1=BI.createWidget({type:"bi.icon_label",cls:o.iconCls1,width:o.height,height:o.height,iconWidth:o.iconWidth,iconHeight:o.iconHeight}),blank=BI.createWidget({type:"bi.layout",width:o.height,height:o.height});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.icon_label",cls:o.iconCls2,width:o.height,iconWidth:o.iconWidth,iconHeight:o.iconHeight},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(o.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",icon1,this.text,bl
/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(handler,maxSize,width,height){var length=handler.files.length,i=0,onload=handler.onload,onloadstart=handler.onloadstart;for(handler.current=0,handler.total=0,handler.sent=0;handler.current<length;)handler.total+=handler.files[handler.current].fileSize||handler.files[handler.current].size,handler.current++;return handler.current=0,length&&handler.files[0].fileSize!==-1?(handler.file=handler.files[handler.current],sendFile(handler,maxSize,width,height).onload=function(rpe,xhr){handler.onloadstart=null,handler.sent+=handler.files[handler.current].fileSize||handler.files[handler.current].size,++handler.current<length?(handler.file=handler.files[handler.current],sendFile(handler,maxSize,width,height).onload=arguments.callee):onload&&(handler.onloadstart=onloadstart,handler.onload=onload,handler.onload(rpe,xhr))}):length&&(handler.total=100*length,handler.file=handler.files[handler.current],sendFile(handler,maxSize,width,height).onload=function(rpe,xhr){var callee=arguments.callee;handler.onloadstart=null,handler.sent+=100,++handler.current<length?(/\b(chrome|safari)\b/i.test(navigator.userAgent)&&(handler.iframe.parentNode.removeChild(handler.iframe),handler.iframe=null),setTimeout(function(){handler.file=handler.files[handler.current],sendFile(handler,maxSize,width,height).onload=callee},15)):onload&&setTimeout(function(){handler.iframe.parentNode.removeChild(handler.iframe),handler.iframe=null,handler.onloadstart=onloadstart,handler.onload=onload,handler.onload(rpe,xhr)},15)}),handler};BI.File=BI.inherit(BI.Single,{_defaultConfig:function(){var conf=BI.File.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.baseCls||"")+" bi-file display-block",tagName:"input",attributes:{type:"file"},name:"",url:"",multiple:!0,accept:"",maxSize:-1})},_init:function(){var self=this,o=this.options;BI.File.superclass._init.apply(this,arguments),o.multiple===!0&&this.element.attr("multiple","multiple"),this.element.attr("name",o.name||this.getName()),this.element.attr("title",o.title||"")},created:function(){var self=this,o=this.options,_wrap=this.wrap=this._wrap(this.element[0],o.maxSize);_wrap.onloadstart=function(rpe,xhr){self.fireEvent(BI.File.EVENT_UPLOADSTART,arguments)},_wrap.onprogress=function(rpe,xhr){this.file.fileSize!==-1&&rpe.simulation,self.fireEvent(BI.File.EVENT_PROGRESS,{file:this.file,total:rpe.total,loaded:rpe.loaded,simulation:rpe.simulation})},_wrap.onerror=function(){self.fireEvent(BI.File.EVENT_ERROR)},_wrap.onload=function(rpe,xhr){var self_=this;setTimeout(function(){if(self_.clean(),self_.hide(),200>xhr.status||xhr.status>399)return BI.Msg.toast(BI.i18nText("BI-Upload_File_Error"),{level:"error"}),void self.fireEvent(BI.File.EVENT_ERROR);var error=BI.some(_wrap.attach_array,function(index,attach){if(attach.errorCode)return BI.Msg.toast(attach.errorMsg,{level:"error"}),self.fireEvent(BI.File.EVENT_ERROR,attach),!0});!error&&self.fireEvent(BI.File.EVENT_UPLOADED)},1e3)},_wrap.url=o.url,_wrap.fileType=o.accept,_wrap.attach_array=[],_wrap.attach_names=[],_wrap.attachNum=0},_events:function(wrap){var self=this;return event.add(wrap.dom.input,"change",function(){event.del(wrap.dom.input,"change",arguments.callee);for(var input=wrap.dom.input.cloneNode(!0),i=0,files=F(wrap.dom.input);i<files.length;i++){var item=files.item(i),tempFile=item.value||item.name,value=item.fileName||(item.fileName=tempFile.
}),o.bind(c.ASYNC_ERROR,function(event,treeId,node,XMLHttpRequest,textStatus,errorThrown){tools.apply(setting.callback.onAsyncError,[event,treeId,node,XMLHttpRequest,textStatus,errorThrown])}),o.bind(c.REMOVE,function(event,treeId,treeNode){tools.apply(setting.callback.onRemove,[event,treeId,treeNode])}),o.bind(c.SELECTED,function(event,srcEvent,treeId,node){tools.apply(setting.callback.onSelected,[srcEvent,treeId,node])}),o.bind(c.UNSELECTED,function(event,srcEvent,treeId,node){tools.apply(setting.callback.onUnSelected,[srcEvent,treeId,node])})},_unbindEvent=function(setting){var o=setting.treeObj,c=consts.event;o.unbind(c.NODECREATED).unbind(c.CLICK).unbind(c.EXPAND).unbind(c.COLLAPSE).unbind(c.ASYNC_SUCCESS).unbind(c.ASYNC_ERROR).unbind(c.REMOVE).unbind(c.SELECTED).unbind(c.UNSELECTED)},_eventProxy=function(event){var target=event.target,setting=data.getSetting(event.data.treeId),tId="",node=null,nodeEventType="",treeEventType="",nodeEventCallback=null,treeEventCallback=null,tmp=null;if(tools.eqs(event.type,"mousedown")?treeEventType="mousedown":tools.eqs(event.type,"mouseup")?treeEventType="mouseup":tools.eqs(event.type,"contextmenu")?treeEventType="contextmenu":tools.eqs(event.type,"click")?tools.eqs(target.tagName,"span")&&null!==target.getAttribute("treeNode"+consts.id.SWITCH)?(tId=tools.getNodeMainDom(target).id,nodeEventType="switchNode"):(tmp=tools.getMDom(setting,target,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),tmp&&(tId=tools.getNodeMainDom(tmp).id,nodeEventType="clickNode")):tools.eqs(event.type,"dblclick")&&(treeEventType="dblclick",tmp=tools.getMDom(setting,target,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),tmp&&(tId=tools.getNodeMainDom(tmp).id,nodeEventType="switchNode")),treeEventType.length>0&&0==tId.length&&(tmp=tools.getMDom(setting,target,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),tmp&&(tId=tools.getNodeMainDom(tmp).id)),tId.length>0)switch(node=data.getNodeCache(setting,tId),nodeEventType){case"switchNode":node.isParent&&(tools.eqs(event.type,"click")||tools.eqs(event.type,"dblclick")&&tools.apply(setting.view.dblClickExpand,[setting.treeId,node],setting.view.dblClickExpand))?nodeEventCallback=handler.onSwitchNode:nodeEventType="";break;case"clickNode":nodeEventCallback=handler.onClickNode}switch(treeEventType){case"mousedown":treeEventCallback=handler.onZTreeMousedown;break;case"mouseup":treeEventCallback=handler.onZTreeMouseup;break;case"dblclick":treeEventCallback=handler.onZTreeDblclick;break;case"contextmenu":treeEventCallback=handler.onZTreeContextmenu}var proxyResult={stop:!1,node:node,nodeEventType:nodeEventType,nodeEventCallback:nodeEventCallback,treeEventType:treeEventType,treeEventCallback:treeEventCallback};return proxyResult},_initNode=function(setting,level,n,parentNode,isFirstNode,isLastNode,openFlag){if(n){var r=data.getRoot(setting),childKey=setting.data.key.children;n.level=level,n.tId=setting.treeId+"_"+ ++r.zId,n.parentTId=parentNode?parentNode.tId:null,n.open="string"==typeof n.open?tools.eqs(n.open,"true"):!!n.open,n[childKey]&&n[childKey].length>0?(n.isParent=!0,n.zAsync=!0):(n.isParent="string"==typeof n.isParent?tools.eqs(n.isParent,"true"):!!n.isParent,n.open=!(!n.isParent||setting.async.enable)&&n.open,n.zAsync=!n.isParent),n.isFirstNode=isFirstNode,n.isLastNode=isLastNode,n.getParentNode=function(){return data.getNodeCache(setting,n.parentTId)},n.getPreNode=function(){return data.getPreNode(setting,n)},n.getNextNode=function(){return data.getNextNode(setting,n)},n.isAjaxing=!1,data.fixPIdKeyValue(setting,n)}},_init={bind:[_bindEvent],unbind:[_unbindEvent],caches:[_initCache],nodes:[_initNode],proxys:[_eventProxy],roots:[_initRoot],beforeA:[],afterA:[],innerBeforeA:[],innerAfterA:[],zTreeTools:[]},data={addNodeCache:function(setting,node){data.getCache(setting).nodes[data.getNodeCacheId(node.tId)]=node},getNodeCacheId:function(tId){return tId.substring(tId.lastIndexOf("_")+1)},addAfterA:function(afterA){_init.afterA.push(afterA)},addBeforeA:function(beforeA){_init.beforeA.push(beforeA)},addInnerAfterA:function(innerAfterA){_init.innerAfterA.push(innerAf
if(obj){var tmpName=obj.attr("class");if(void 0!=tmpName){var tmpList=tmpName.split("_");switch(newName){case consts.line.ROOT:case consts.line.ROOTS:case consts.line.CENTER:case consts.line.BOTTOM:case consts.line.NOLINE:tmpList[0]=view.makeNodeLineClassEx(node)+newName;break;case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:tmpList[1]=newName}obj.attr("class",tmpList.join("_")),newName!==consts.folder.DOCU?obj.removeAttr("disabled"):obj.attr("disabled","disabled")}}},selectNode:function(setting,node,addFlag){addFlag||view.cancelPreSelectedNode(setting,null,node),$$(node,consts.id.A,setting).addClass(consts.node.CURSELECTED),data.addSelectedNode(setting,node),setting.treeObj.trigger(consts.event.SELECTED,[event,setting.treeId,node])},setNodeFontCss:function(setting,treeNode){var aObj=$$(treeNode,consts.id.A,setting),fontCss=view.makeNodeFontCss(setting,treeNode);fontCss&&aObj.css(fontCss)},setNodeLineIcos:function(setting,node){if(node){var switchObj=$$(node,consts.id.SWITCH,setting),ulObj=$$(node,consts.id.UL,setting),icoObj=$$(node,consts.id.ICON,setting),ulLine=view.makeUlLineClass(setting,node);0==ulLine.length?ulObj.removeClass(consts.line.LINE):ulObj.addClass(ulLine),switchObj.attr("class",view.makeNodeLineClass(setting,node)),node.isParent?switchObj.removeAttr("disabled"):switchObj.attr("disabled","disabled"),icoObj.removeAttr("style"),icoObj.attr("style",view.makeNodeIcoStyle(setting,node)),icoObj.attr("class",view.makeNodeIcoClass(setting,node))}},setNodeName:function(setting,node){var title=data.getNodeTitle(setting,node),nObj=$$(node,consts.id.SPAN,setting);if(nObj.empty(),setting.view.nameIsHTML?nObj.html(data.getNodeName(setting,node)):nObj.text(data.getNodeName(setting,node)),tools.apply(setting.view.showTitle,[setting.treeId,node],setting.view.showTitle)){var aObj=$$(node,consts.id.A,setting);aObj.attr("title",title?title:"")}},setNodeTarget:function(setting,node){var aObj=$$(node,consts.id.A,setting);aObj.attr("target",view.makeNodeTarget(node))},setNodeUrl:function(setting,node){var aObj=$$(node,consts.id.A,setting),url=view.makeNodeUrl(setting,node);null==url||0==url.length?aObj.removeAttr("href"):aObj.attr("href",url)},switchNode:function(setting,node){if(node.open||!tools.canAsync(setting,node))view.expandCollapseNode(setting,node,!node.open);else if(setting.async.enable){if(!view.asyncNode(setting,node))return void view.expandCollapseNode(setting,node,!node.open)}else node&&view.expandCollapseNode(setting,node,!node.open)}};$.fn.zTree={consts:_consts,_z:{tools:tools,view:view,event:event,data:data},getZTreeObj:function(treeId){var o=data.getZTreeTools(treeId);return o?o:null},destroy:function(treeId){if(treeId&&treeId.length>0)view.destroy(data.getSetting(treeId));else for(var s in settings)view.destroy(settings[s])},init:function(obj,zSetting,zNodes){var setting=tools.clone(_setting);$.extend(!0,setting,zSetting),setting.treeId=obj.attr("id"),setting.treeObj=obj,setting.treeObj.empty(),settings[setting.treeId]=setting,"undefined"==typeof document.body.style.maxHeight&&(setting.view.expandSpeed=""),data.initRoot(setting);var root=data.getRoot(setting),childKey=setting.data.key.children;zNodes=zNodes?tools.clone(tools.isArray(zNodes)?zNodes:[zNodes]):[],setting.data.simpleData.enable?root[childKey]=data.transformTozTreeFormat(setting,zNodes):root[childKey]=zNodes,data.initCache(setting),event.unbindTree(setting),event.bindTree(setting),event.unbindEvent(setting),event.bindEvent(setting);var zTreeTools={setting:setting,addNodes:function(parentNode,newNodes,isSilent){function addCallback(){view.addNodes(setting,parentNode,xNewNodes,1==isSilent)}if(!newNodes)return null;if(parentNode||(parentNode=null),parentNode&&!parentNode.isParent&&setting.data.keep.leaf)return null;var xNewNodes=tools.clone(tools.isArray(newNodes)?newNodes:[newNodes]);return tools.canAsync(setting,parentNode)?view.asyncNode(setting,parentNode,isSilent,addCallback):addCallback(),xNewNodes},cancelSelectedNode:function(node){view.cancelPreSelectedNode(setting,node)},destroy:function(){view.destroy(setting)},exp
type:"bi.icon_text_item",element:this,cls:o.iconCls,once:o.once,iconWrapperWidth:o.iconWrapperWidth,selected:o.selected,height:o.height,iconHeight:o.iconHeight,iconWidth:o.iconWidth,text:o.text,keyword:o.keyword,value:o.value,py:o.py}),this.text.on(BI.Controller.EVENT_CHANGE,function(){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},isSelected:function(){return this.text.isSelected()},setSelected:function(b){this.text.setSelected(b)},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),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 self=this,o=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:o.textAlign,whiteSpace:"nowrap",textHeight:o.height,height:o.height,hgap:o.hgap,text:o.text,keyword:o.keyword,value:o.value,title:o.title||o.text,warningTitle:o.warningTitle,py:o.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(v){BI.SingleSelectItem.superclass.setSelected.apply(this,arguments)}}),BI.SingleSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_item",BI.SingleSelectItem),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 self=this,o=this.options;this.radio=BI.createWidget({type:"bi.radio",once:o.once}),this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",whiteSpace:"nowrap",textHeight:o.height,height:o.height,hgap:o.hgap,text:o.text,keyword:o.keyword,value:o.value,py:o.py}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(o.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(v){BI.SingleSelectRadioItem.superclass.setSelected.apply(this,arguments),this.radio.setSelected(v)}}),BI.SingleSelectRadioItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_radio_item",BI.SingleSelectRadioItem),BI.ArrowNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var conf=BI.ArrowNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.baseCls||"")+" bi-arrow-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24})},_init:function(){var self=this,o=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:o.height,height:o.height,hgap:o.hgap,text:o.text,value:o.value,py:o.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(type){type===BI.Events.CLICK&&self.setSelected(self.isSelected()),self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var ty
return Y=0|Y,!!BI.checkDateVoid(BI.YearCalendar.getEndYear(Y)+1,1,1,o.min,o.max)[0]},_getItems:function(){var o=this.options,years=this._yearCreator(o.year||this.currentYear),len=years.length,tyears=BI.makeArray(len,""),map=[0,6,1,7,2,8,3,9,4,10,5,11];BI.each(years,function(i,y){tyears[i]=years[map[i]]});var items=[];return items.push(tyears.slice(0,2)),items.push(tyears.slice(2,4)),items.push(tyears.slice(4,6)),items.push(tyears.slice(6,8)),items.push(tyears.slice(8,10)),items.push(tyears.slice(10,12)),BI.map(items,function(i,item){return BI.map(item,function(j,td){return BI.extend(td,{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"normal",once:!1,forceSelected:!0,height:24,width:45,value:td.text,disabled:td.disabled})})})},_populate:function(){this.years.populate(this._getItems())},setMinDate:function(minDate){var o=this.options;BI.isNotEmptyString(o.min)&&(o.min=minDate,this._populate())},setMaxDate:function(maxDate){var o=this.options;BI.isNotEmptyString(this.options.max)&&(o.max=maxDate,this._populate())},setValue:function(val){this.years.setValue([val])},getValue:function(){return this.years.getValue()[0]}}),BI.extend(BI.YearCalendar,{INTERVAL:12,getStartYear:function(year){var cur=BI.getDate().getFullYear();return year-((year-cur+3)%BI.YearCalendar.INTERVAL+12)%BI.YearCalendar.INTERVAL},getEndYear:function(year){return BI.YearCalendar.getStartYear(year)+BI.YearCalendar.INTERVAL-1},getPageByYear:function(year){var cur=BI.getDate().getFullYear();return year=BI.YearCalendar.getStartYear(year),(year-cur+3)/BI.YearCalendar.INTERVAL}}),BI.shortcut("bi.year_calendar",BI.YearCalendar),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(v){BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this,arguments),v?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),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(v){BI.CheckingMarkNode.superclass.setSelected.apply(this,arguments),v===!0?this.element.addClass("check-mark-font"):this.element.removeClass("check-mark-font")}}),BI.shortcut("bi.checking_mark_node",BI.CheckingMarkNode),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(v){BI.FirstTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),v===!0?this.element.addClass("tree-expand-icon-type2"):this.element.removeClass("tree-expand-icon-type2")}}),BI.shortcut("bi.first_tree_node_checkbox",BI.FirstTreeNodeCheckbox),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(v){BI.LastTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),v===!0?this.element.addClass("tree-expand-icon-type4"):this.element.removeClass("tree-expand-icon-type4")}}),BI.shortcut("bi.last_tree_node_checkbox",BI.LastTreeNodeCheckbox),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(v){BI.MidTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),v===!0?this.element.addC
offsetStyle:"left",el:{},popup:{}})},_init:function(){BI.BubbleCombo.superclass._init.apply(this,arguments);var self=this,o=this.options;this.combo=BI.createWidget({type:"bi.combo",element:this,trigger:o.trigger,toggle:o.toggle,container:o.container,direction:o.direction,isDefaultInit:o.isDefaultInit,destroyWhenHide:o.destroyWhenHide,isNeedAdjustHeight:o.isNeedAdjustHeight,isNeedAdjustWidth:o.isNeedAdjustWidth,adjustLength:this._getAdjustLength(),stopPropagation:o.stopPropagation,adjustXOffset:0,adjustYOffset:0,hideChecker:o.hideChecker,offsetStyle:o.offsetStyle,el:o.el,popup:BI.extend({type:"bi.bubble_popup_view"},o.popup)}),this.combo.on(BI.Combo.EVENT_TRIGGER_CHANGE,function(){self.fireEvent(BI.BubbleCombo.EVENT_TRIGGER_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){self.fireEvent(BI.BubbleCombo.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_EXPAND,function(){self.fireEvent(BI.BubbleCombo.EVENT_EXPAND,arguments)}),this.combo.on(BI.Combo.EVENT_COLLAPSE,function(){self.fireEvent(BI.BubbleCombo.EVENT_COLLAPSE,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_INIT,function(){self.fireEvent(BI.BubbleCombo.EVENT_AFTER_INIT,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){self.fireEvent(BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){self._showTriangle(),self.fireEvent(BI.BubbleCombo.EVENT_AFTER_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){self._hideTriangle(),self.fireEvent(BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){self.fireEvent(BI.BubbleCombo.EVENT_AFTER_HIDEVIEW,arguments)})},_getAdjustLength:function(){return this._const.TRIANGLE_LENGTH+this.options.adjustLength},_createTriangle:function(direction){var pos={},op={},adjustLength=this.options.adjustLength,offset=this.element.offset(),left=offset.left,right=offset.left+this.element.outerWidth(),top=offset.top,bottom=offset.top+this.element.outerHeight();switch(direction){case"left":pos={top:top,height:this.element.outerHeight(),left:left-adjustLength-this._const.TRIANGLE_LENGTH},op={width:this._const.TRIANGLE_LENGTH};break;case"right":pos={top:top,height:this.element.outerHeight(),left:right+adjustLength},op={width:this._const.TRIANGLE_LENGTH};break;case"top":pos={left:left,width:this.element.outerWidth(),top:top-adjustLength-this._const.TRIANGLE_LENGTH},op={height:this._const.TRIANGLE_LENGTH};break;case"bottom":pos={left:left,width:this.element.outerWidth(),top:bottom+adjustLength},op={height:this._const.TRIANGLE_LENGTH}}this.triangle&&this.triangle.destroy(),this.triangle=BI.createWidget(op,{type:"bi.center_adapt",cls:"button-combo-triangle-wrapper",items:[{type:"bi.layout",cls:"bubble-combo-triangle-"+direction}]}),pos.el=this.triangle,BI.createWidget({type:"bi.absolute",element:this,items:[pos]})},_createLeftTriangle:function(){this._createTriangle("left")},_createRightTriangle:function(){this._createTriangle("right")},_createTopTriangle:function(){this._createTriangle("top")},_createBottomTriangle:function(){this._createTriangle("bottom")},_showTriangle:function(){var pos=this.combo.getPopupPosition();switch(pos.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.EVE
}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:this.clear,width:24}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){self.fireEvent(BI.ClearEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){self.fireEvent(BI.ClearEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){self.fireEvent(BI.ClearEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){self._checkClear(),self.fireEvent(BI.ClearEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(v){self.fireEvent(BI.ClearEditor.EVENT_KEY_DOWN,v)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){self.fireEvent(BI.ClearEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){self.fireEvent(BI.ClearEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){self.fireEvent(BI.ClearEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){self.fireEvent(BI.ClearEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){self.fireEvent(BI.ClearEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){self.fireEvent(BI.ClearEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){self._checkClear(),self.fireEvent(BI.ClearEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){self.fireEvent(BI.ClearEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){self.fireEvent(BI.ClearEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){self.fireEvent(BI.ClearEditor.EVENT_CHANGE_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){self.fireEvent(BI.ClearEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){self.fireEvent(BI.ClearEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){self.fireEvent(BI.ClearEditor.EVENT_STOP)}),BI.isKey(o.value)?this.clear.visible():this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},setWaterMark:function(v){this.options.watermark=v,this.editor.setWaterMark(v)},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid()){var res=this.editor.getValue().match(/[\S]+/g);return BI.isNull(res)?"":res[res.length-1]}},setValue:function(v){this.editor.setValue(v),BI.isKey(v)&&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),BI.ShelterEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var conf=BI.ShelterEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.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 self=this,o=this.options;this.editor=BI.createWidget({type:"bi.editor",height:o.height,hgap:o.hgap,vgap:o.vgap,lgap:o.lgap,rgap:o.rgap,tgap:o.tgap,bgap:o.bgap,value:o.value,validationChecker:o.validationChecker,quitChecker:o.quitChecker,allowBlank:o
this.check()},removeItemAt:function(indexes){indexes=indexes||[],BI.removeAt(this.options.items,indexes),this.button_group.removeItemAt.apply(this.button_group,arguments),this.check()},populate:function(items){var self=this,o=this.options;return 0===arguments.length&&BI.isFunction(this.button_group.attr("itemsCreator"))?void this.button_group.attr("itemsCreator").apply(this,[{times:1},function(){if(0===arguments.length)throw new Error("参数不能为空");self.populate.apply(self,arguments)}]):(BI.ListPane.superclass.populate.apply(this,arguments),void 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(value){return this.button_group.getIndexByValue(value)},getNodeById:function(id){return this.button_group.getNodeById(id)},getNodeByValue:function(value){return this.button_group.getNodeByValue(value)}}),BI.ListPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_pane",BI.ListPane),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 o=this.options;BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend(o.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this._createTitle(),this.options.el)}))))},_createTitle:function(){var self=this,o=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"panel-title-text",text:o.title,height:30}),this.button_group=BI.createWidget({type:"bi.button_group",items:o.titleButtons,layouts:[{type:"bi.center_adapt",lgap:10}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(value,obj){self.fireEvent(BI.Panel.EVENT_CHANGE,value,obj)}),{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(title){this.text.setValue(title)}}),BI.Panel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.panel",BI.Panel),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 self=this,o=this.options;return[{type:"bi.label",text:o.text,height:o.height,value:o.value,hgap:o.hgap,ref:function(){self.text=this}},{type:"bi.absolute",items:[{el:{type:"bi.layout",cls:"line-segment-button-line",height:2,ref:function(){self.line=this}},left:0,right:0,bottom:0}]}]},setSelected:function(v){BI.LinearSegmentButton.superclass.setSelected.apply(this,arguments),v?this.line.element.addClass("bi-high-light-background"):this.line.element.removeClass("bi-high-light-background")},setText:function(text){this.text.setText(text)}}),BI.shortcut("bi.linear_segment_button",BI.LinearSegmentButton),BI.LinearSegment=BI.inherit(BI.Widget,{props:{baseCls:"bi-linear-segment bi-split-bottom",items:[],height:29},render:function(){var self=this,o=this.options;return{type:"bi.button_group",items:BI.createItems(o.items,{type:"bi.linear_segment_button",height:o.height-1}),layout:[{type:"bi.center"}],listeners:[{eventName:"__EVENT_CHANGE__",action:function(){self.fireEvent("__
}),layout:[{type:"bi.center"}]}),this.buttonGroup.on(BI.Controller.EVENT_CHANGE,function(){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.buttonGroup.on(BI.ButtonGroup.EVENT_CHANGE,function(value,obj){self.fireEvent(BI.Segment.EVENT_CHANGE,value,obj)})},_setEnable:function(enable){BI.Segment.superclass._setEnable.apply(this,arguments),enable===!0?this.element.removeClass("base-disabled disabled"):enable===!1&&this.element.addClass("base-disabled disabled")},setValue:function(v){this.buttonGroup.setValue(v)},setEnabledValue:function(v){this.buttonGroup.setEnabledValue(v)},getValue:function(){return this.buttonGroup.getValue()}}),BI.Segment.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.segment",BI.Segment),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(selectedValues){return selectedValues.length>0},halfSelected:!1,iconWrapperWidth:26})},_init:function(){BI.MultiSelectBar.superclass._init.apply(this,arguments);var self=this,o=this.options,isSelect=o.selected===!0,isHalfSelect=!o.selected&&o.halfSelected;this.checkbox=BI.createWidget({type:"bi.checkbox",stopPropagation:!0,handler:function(){self.setSelected(self.isSelected())},selected:isSelect,invisible:isHalfSelect}),this.half=BI.createWidget({type:"bi.half_icon_button",stopPropagation:!0,handler:function(){self.setSelected(!0)},invisible:isSelect||!isHalfSelect}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(){self.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,self.isSelected(),self)}),this.checkbox.on(BI.Checkbox.EVENT_CHANGE,function(){self.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,self.isSelected(),self)}),this.half.on(BI.Controller.EVENT_CHANGE,function(){self.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,self.isSelected(),self)}),this.half.on(BI.HalfIconButton.EVENT_CHANGE,function(){self.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,self.isSelected(),self)}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:o.height,height:o.height,hgap:o.hgap,text:o.text,keyword:o.keyword,value:o.value,py:o.py}),BI.createWidget({type:"bi.htape",element:this,items:[{width:o.iconWrapperWidth,el:{type:"bi.center_adapt",items:[this.checkbox,this.half]}},{el:this.text}]})},_setSelected:function(v){this.checkbox.setSelected(!!v)},beforeClick:function(){var isHalf=this.isHalfSelected(),isSelected=this.isSelected();isHalf===!0?this.setSelected(!0):this.setSelected(!isSelected)},setSelected:function(v){this.checkbox.setSelected(v),this.setHalfSelected(!1)},setHalfSelected:function(b){this.halfSelected=!!b,b===!0?(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(selectedValues){BI.MultiSelectBar.superclass.setValue.apply(this,arguments);var isAllChecked=this.options.isAllCheckedBySelectedValue.apply(this,arguments);this._setSelected(isAllChecked),!isAllChecked&&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),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(nodes,layer,pNode){var self=this;return BI.each(nodes,function(i,node){var extend={layer:
self.fireEvent(BI.Controller.EVENT_CHANGE,arguments),type===BI.Events.CLICK&&self.fireEvent(BI.MonthPopup.EVENT_CHANGE)})},getValue:function(){return this.month.getValue()[0]},setValue:function(v){v=BI.parseInt(v),this.month.setValue([v])}}),BI.MonthPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_popup",BI.MonthPopup),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(v){var o=this.options,y=this._year,calendar=BI.createWidget({type:"bi.year_calendar",behaviors:o.behaviors,min:o.min,max:o.max,logic:{dynamic:!0},year:y+12*v});return calendar.setValue(this._year),calendar},_init:function(){BI.YearPopup.superclass._init.apply(this,arguments);var self=this,o=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(self.selectedYear);var calendar=this.getSelectedCard();calendar&&self.backBtn.setEnable(!calendar.isFrontYear()),calendar&&self.preBtn.setEnable(!calendar.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){self.selectedYear=this.getValue(),self.fireEvent(BI.Controller.EVENT_CHANGE,arguments),self.fireEvent(BI.YearPopup.EVENT_CHANGE,self.selectedYear)}),BI.isKey(o.value)&&this.setValue(o.value)},_checkMin:function(){var calendar=this.navigation.getSelectedCard();BI.isNotNull(calendar)&&(calendar.setMinDate(this.options.min),this.backBtn.setEnable(!calendar.isFrontYear()),this.preBtn.setEnable(!calendar.isFinalYear()))},_checkMax:function(){var calendar=this.navigation.getSelectedCard();BI.isNotNull(calendar)&&(calendar.setMaxDate(this.options.max),this.backBtn.setEnable(!calendar.isFrontYear()),this.preBtn.setEnable(!calendar.isFinalYear()))},setMinDate:function(minDate){BI.isNotEmptyString(this.options.min)&&(this.options.min=minDate,this._checkMin())},setMaxDate:function(maxDate){BI.isNotEmptyString(this.options.max)&&(this.options.max=maxDate,this._checkMax())},getValue:function(){return this.selectedYear},setValue:function(v){var o=this.options;v=BI.parseInt(v);var startDate=BI.parseDateTime(o.min,"%Y-%X-%d"),endDate=BI.parseDateTime(o.max,"%Y-%X-%d");BI.checkDateVoid(v,1,1,BI.print(BI.getDate(startDate.getFullYear(),0,1),"%Y-%X-%d"),BI.print(BI.getDate(endDate.getFullYear(),0,1),"%Y-%X-%d"))[0]?(v=BI.getDate().getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(v)),this.navigation.setValue("")):(this.selectedYear=v,this.navigation.setSelect(BI.YearCalendar.getPageByYear(v)),this.navigation.setValue(v))}}),BI.YearPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_popup",BI.YearPopup),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 o=this.options,c=this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"right",text:o.text,value:o.value,height:c.height}),BI.createWidget({type:"bi.vertical_adapt",element:this,items:[{el:this.text,rgap:5},{type:"bi.icon_label",width:16}]})},setValue:function(v){this.text.setValue(v)},getValue:function(){return this.text.getValue()},setText:function(v){this.text.setText(v)},getText:function(){return this.item.getText()},getKey:function(){}}),BI.shortcut("bi.date_triangle_tri
BI.isNotEmptyString(v)&&value.push(v)}else item.value===values[idx][0]&&value.push(values[idx][0])})}),value},populate:function(items){BI.DownListPopup.superclass.populate.apply(this,arguments),this.items=BI.deepClone(items),this.childValueMap={},this.fatherValueMap={},this.singleValues=[];var children=this._createChildren(this.items),popupItem=BI.createItems(children,{},{adjustLength:-2});this.popup.populate(popupItem)},setValue:function(valueItem){this.popup.setValue(this._digest(valueItem))},_getValue:function(){var v=[];return BI.each(this.popup.getAllButtons(),function(i,item){i%2===0&&v.push(item.getValue())}),v},getValue:function(){var self=this,result=[],values=this._checkValues(this._getValue());return BI.each(values,function(i,value){var valueItem={};if(BI.isNotNull(self.childValueMap[value])){var fartherValue=self.fatherValueMap[value];valueItem.childValue=self.childValueMap[value],valueItem.value=fartherValue}else valueItem.value=value;result.push(valueItem)}),result}}),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(){BI.DynamicDateHelper={},BI.extend(BI.DynamicDateHelper,{getCalculation:function(obj){var date=BI.getDate();return this.getCalculationByDate(date,obj)},getCalculationByDate:function(date,obj){if(BI.isNotNull(obj.year)&&(date=BI.getDate(date.getFullYear()+BI.parseInt(obj.year),date.getMonth(),date.getDate())),BI.isNotNull(obj.quarter)&&(date=BI.getOffsetQuarter(date,BI.parseInt(obj.quarter))),BI.isNotNull(obj.month)&&(date=BI.getOffsetMonth(date,BI.parseInt(obj.month))),BI.isNotNull(obj.week)&&(date=BI.getOffsetDate(date,7*BI.parseInt(obj.week))),BI.isNotNull(obj.day)&&(date=BI.getOffsetDate(date,BI.parseInt(obj.day))),BI.isNotNull(obj.workDay))if(BI.isNotNull(BI.holidays))for(var count=Math.abs(obj.workDay),i=0;i<count;i++)date=BI.getOffsetDate(date,obj.workDay<0?-1:1),BI.isNotNull(BI.holidays[BI.print(date,"%Y-%X-%d")])&&i--;else date=BI.getOffsetDate(date,BI.parseInt(obj.workDay));return BI.isNotNull(obj.position)&&obj.position!==BI.DynamicDateCard.OFFSET.CURRENT&&(date=this.getBeginDate(date,obj)),BI.getDate(date.getFullYear(),date.getMonth(),date.getDate())},getBeginDate:function(date,obj){return BI.isNotNull(obj.day)?obj.position===BI.DynamicDateCard.OFFSET.BEGIN?BI.getDate(date.getFullYear(),date.getMonth(),1):BI.getDate(date.getFullYear(),date.getMonth(),BI.getLastDateOfMonth(date).getDate()):BI.isNotNull(obj.week)?obj.position===BI.DynamicDateCard.OFFSET.BEGIN?BI.getWeekStartDate(date):BI.getWeekEndDate(date):BI.isNotNull(obj.month)?obj.position===BI.DynamicDateCard.OFFSET.BEGIN?BI.getDate(date.getFullYear(),date.getMonth(),1):BI.getDate(date.getFullYear(),date.getMonth(),BI.getLastDateOfMonth(date).getDate()):BI.isNotNull(obj.quarter)?obj.position===BI.DynamicDateCard.OFFSET.BEGIN?BI.getQuarterStartDate(date):BI.getQuarterEndDate(date):BI.isNotNull(obj.year)?obj.position===BI.DynamicDateCard.OFFSET.BEGIN?BI.getDate(date.getFullYear(),0,1):BI.getDate(date.getFullYear(),11,31):date}})}(),BI.DynamicDateCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-card"},render:function(){var self=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(){self.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,a
var date=BI.getDate();return this.storeValue=opts.value,{type:"bi.htape",items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:opts.height,height:opts.height,ref:function(){self.changeIcon=this}},width:opts.height},{type:"bi.absolute",items:[{el:{type:"bi.combo",destroyWhenHide:!0,container:opts.container,ref:function(){self.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_time_trigger",min:opts.minDate,max:opts.maxDate,allowEdit:opts.allowEdit,watermark:opts.watermark,format:opts.format,height:opts.height,value:opts.value,ref:function(){self.trigger=this},listeners:[{eventName:BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN,action:function(){self.combo.isViewVisible()&&self.combo.hideView(),self.fireEvent(BI.DynamicDateTimeCombo.EVENT_KEY_DOWN,arguments)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_STOP,action:function(){self.combo.isViewVisible()||self.combo.showView()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_TRIGGER_CLICK,action:function(){self.combo.toggle()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_FOCUS,action:function(){self.storeTriggerValue=self.trigger.getKey(),self.combo.isViewVisible()||self.combo.showView(),self.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_BLUR,action:function(){self.fireEvent(BI.DynamicDateTimeCombo.EVENT_BLUR)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_ERROR,action:function(){self.storeValue={type:BI.DynamicDateTimeCombo.Static,value:{year:date.getFullYear(),month:date.getMonth()+1}},self.fireEvent(BI.DynamicDateTimeCombo.EVENT_ERROR)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_VALID,action:function(){self.fireEvent(BI.DynamicDateTimeCombo.EVENT_VALID)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_CHANGE,action:function(){self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CHANGE)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_CONFIRM,action:function(){if(!self.combo.isViewVisible()){var dateStore=self.storeTriggerValue,dateObj=self.trigger.getKey();BI.isNotEmptyString(dateObj)&&!BI.isEqual(dateObj,dateStore)?(self.storeValue=self.trigger.getValue(),self.setValue(self.trigger.getValue())):BI.isEmptyString(dateObj)&&(self.storeValue=null,self.trigger.setValue()),self._checkDynamicValue(self.storeValue),self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:{type:"bi.dynamic_date_time_popup",behaviors:opts.behaviors,min:opts.minDate,max:opts.maxDate,ref:function(){self.popup=this},listeners:[{eventName:BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){self.setValue(),self.combo.hideView(),self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var date=BI.getDate();self.setValue({type:BI.DynamicDateTimeCombo.Static,value:{year:date.getFullYear(),month:date.getMonth()+1,day:date.getDate(),hour:0,minute:0,second:0}}),self.combo.hideView(),self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE,action:function(){var value=self.popup.getValue();self._checkValue(value)&&self.setValue(value),self.combo.hideView(),self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.EVENT_CHANGE,action:function(){self.setValue(self.popup.getValue()),self.combo.hideView(),self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}}]},stopPropagation:!1},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){self.popup.setValue(self.storeValue),self.popup.setMinDate(opts.minDate),self.popup.setMaxDate(opts.maxDate),self.fireEvent(BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW)}}],hideChecker:function(e){return 0===self.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:opts.height,height:opts.height,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){self.combo.isViewVisible()||self.combo.showView()}}],ref:function(){self.triggerBtn=t
self.fireEvent(BI.TextEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){self.fireEvent(BI.TextEditor.EVENT_EMPTY)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]})},setWaterMark:function(v){this.options.watermark=v,this.editor.setWaterMark(v)},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setErrorText:function(text){this.editor.setErrorText(text)},getErrorText:function(){return this.editor.getErrorText()},isValid:function(){return this.editor.isValid()},setValue:function(v){this.editor.setValue(v)},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),BI.SmallTextEditor=BI.inherit(BI.TextEditor,{_defaultConfig:function(){var conf=BI.SmallTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.baseCls||"")+" bi-small-text-editor",height:20})},_init:function(){BI.SmallTextEditor.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.small_text_editor",BI.SmallTextEditor),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 self=this,c=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:c.EDITOR_WIDTH,validationChecker:function(v){return self._checkValidation(v)}}),this.labelOne.element.hover(function(){self.labelOne.element.removeClass("bi-border").addClass("bi-border")},function(){self.labelOne.element.removeClass("bi-border")}),this.labelOne.on(BI.Editor.EVENT_CONFIRM,function(){var oldValueOne=self.valueOne,v=BI.parseFloat(this.getValue());self.valueOne=v;var percent=self._getPercentByValue(v),significantPercent=BI.parseFloat(percent.toFixed(1));self._setSliderOnePosition(significantPercent),self._setBlueTrack(),self._checkLabelPosition(oldValueOne,self.valueTwo,self.valueOne,self.valueTwo),self.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:c.EDITOR_WIDTH,validationChecker:function(v){return self._checkValidation(v)}}),this.labelTwo.element.hover(function(){self.labelTwo.element.removeClass("bi-border").addClass("bi-border")},function(){self.labelTwo.element.removeClass("bi-border")}),this.labelTwo.on(BI.Editor.EVENT_CONFIRM,function(){var oldValueTwo=self.valueTwo,v=BI.parseFloat(this.getValue());self.valueTwo=v;var percent=self._getPercentByValue(v),significantPercent=BI.parseFloat(percent.toFixed(1));self._setSliderTwoPosition(significantPercent),self._setBlueTrack(),self._checkLabelPosition(self.valueOne,oldValueTwo,self.valueOne,self.valueTwo),self.fireEvent(BI.IntervalSlider.EVENT_CHANGE)}),this.sliderOne=BI.createWidget({type:"bi.single_slider_button"}),this.slid
scrollable:null,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}},{eventName:BI.MultiLayerSelectLevelTree.EVENT_CHANGE,action:function(){self.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(_ref){self.addNotMatchTip=_ref},handler:function(){self.fireEvent(BI.MultiLayerSelectTreeInsertSearchPane.EVENT_ADD_ITEM,o.keywordGetter())}},this.tree]}},setKeyword:function(keyword){var showTip=BI.isEmptyArray(this.tree.getAllLeaves());this.addNotMatchTip.setVisible(showTip),showTip&&this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",keyword))},getValue:function(){return this.tree.getValue()},setValue:function(v){v=BI.isArray(v)?v:[v],this.tree.setValue(v)},populate:function(items){this.tree.populate(items)}}),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),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 o=this.options;BI.MultiLayerSelectLevelTree.superclass._init.apply(this,arguments),this.storeValue=o.value,this.initTree(this.options.items),this.check()},_formatItems:function(nodes,layer,pNode){var self=this,o=this.options,keyword=o.keywordGetter();return BI.each(nodes,function(i,node){var extend={};node.layer=layer,BI.isKey(node.id)||(node.id=BI.UUID()),node.keyword=node.keyword||keyword,extend.pNode=pNode,node.isParent===!0||node.parent===!0||BI.isNotEmptyArray(node.children)?(extend.type="bi.multilayer_select_tree_mid_plus_group_node",i===nodes.length-1&&(extend.type="bi.multilayer_select_tree_last_plus_group_node",extend.isLastNode=!0),0!==i||pNode||(extend.type="bi.multilayer_select_tree_first_plus_group_node"),0!==i||i!==nodes.length-1||pNode||(extend.type="bi.multilayer_select_tree_plus_group_node"),BI.defaults(node,extend),self._formatItems(node.children,layer+1,node)):(extend.type="bi.multilayer_single_tree_mid_tree_leaf_item",0!==i||pNode||(extend.type="bi.multilayer_single_tree_first_tree_leaf_item"),i===nodes.length-1&&(extend.type="bi.multilayer_single_tree_last_tree_leaf_item"),BI.defaults(node,extend))}),nodes},_assertId:function(sNodes){BI.each(sNodes,function(i,node){node.id=node.id||BI.UUID()})},initTree:function(nodes){var self=this,o=this.options,hasNext=!1;this.empty(),this._assertId(nodes),this.tree=BI.createWidget({type:"bi.custom_tree",cls:"tree-view display-table",expander:{type:"bi.select_tree_expander",isDefaultInit:o.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(nodes),0),itemsCreator:function(op,callback){1===op.times&&!op.node&&BI.nextTick(function(){self.loading()}),o.itemsCreator(op,function(ob){hasNext=ob.hasNext,1===op.times&&!op.node&&self._populate(ob.items),callback(self._formatItems(BI.Tree.transformToTreeFormat(ob.items),op.node?op.node.layer+1:0,op.node)),self.setValue(self.storeValue),1===op.times&&!op.node&&BI.nextTick(function(){self.loaded()})})},value:o.value,el:{type:"bi.loader",isDefaultInit:o.itemsCreator!==BI.emptyFn,el:{type:"bi.button_tree",chooseType:o.chooseType,behaviors:o.behaviors,layouts:[{type:"bi.vertical"}]},hasNext:function(){return hasNext}}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(type,value){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments),type===BI.Events.CLICK&&(self.setValue(value),self.fireEvent(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,arguments))}),BI.createWidget({type:"bi.adaptive",element:this,scrollable:o.scrollable,
var find=BI.Func.getSearchResult(self.tree.isRoot(node)?[]:BI.concat([node.text],o.allowSearchValue?[node.value]:[]),keyword);if(find.find.length>0||find.match.length>0)return items.push(node),!0}),this._fillTreeStructure4Search(items,"id")},_createJson:function(node,open){return{id:node.id,pId:node.pId,text:node.text,value:node.value,isParent:BI.isNotEmptyArray(node.children),open:open}},_getChildren:function(node){var self=this;node.children=node.children||[];var nodes=[];return BI.each(node.children,function(idx,child){var children=self._getChildren(child);nodes=nodes.concat(children)}),node.children.concat(nodes)},_fillTreeStructure4Search:function(leaves){var self=this,result=[],queue=[];for(BI.each(leaves,function(idx,node){queue.push({pId:node.pId}),result.push(node),result=result.concat(self._getChildren(node))});BI.isNotEmptyArray(queue);){var node=queue.pop(),pNode=this.tree.search(this.tree.getRoot(),node.pId,"id");null!=pNode&&(pNode.open=!0,queue.push({pId:pNode.pId}),result.push(pNode))}return BI.uniqBy(BI.map(result,function(idx,node){return self._createJson(node,node.open)}),"id")},_digest:function(v){var o=this.options;if(o.itemsCreator===BI.emptyFn){var result=BI.find(o.items,function(i,item){return item.value===v});return BI.isNotNull(result)?result.text:o.text}return o.valueFormatter(v)},stopEditing:function(){this.searcher.stopSearch()},getSearcher:function(){return this.searcher},populate:function(items){this.options.items=items,this._initData()},setValue:function(v){this.editor.setState(this._digest(v[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),BI.MultiLayerSingleTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var conf=BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{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 self=this,o=this.options;this.node=this._createNode();for(var needBlankLayers=[],pNode=o.pNode;pNode;)pNode.isLastNode&&needBlankLayers.push(pNode.layer),pNode=pNode.pNode;var items=[];BI.count(0,o.layer,function(index){items.push({type:"bi.layout",cls:BI.contains(needBlankLayers,index)?"":"base-line-conn-background",width:12,height:o.height})}),items.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(o.layer,12),items:[items]})},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(v){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(v)},_createNode:function(){var self=this,o=this.options;return BI.createWidget({type:"bi.first_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:o.id,pId:o.pId,open:o.open,isLastNode:o.isLastNode,height:o.height,hgap:o.hgap,text:o.text,value:o.value,py:o.py,keyword:o.keyword,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(type){type!==BI.Events.CLICK&&self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]})}}),BI.shortcut("bi.multilayer_single_tree_first_plus_group_node",BI.MultiLayerSingleTreeFirstPlusGroupNode),BI.MultiLayerSingleTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var conf=BI.MultiL
}),this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){self.trigger.refreshPlaceHolderWidth(b===!0?self.numberCounter.element.outerWidth()+8:0)})}),this.trigger.element.click(function(e){self.trigger.element.find(e.target).length>0&&self.numberCounter.hideView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:triggerBtn,right:0,top:0,bottom:0},{el:{type:"bi.vertical_adapt",items:[this.numberCounter]},right:o.height,top:0,height:o.height}]})},_itemsCreator4Trigger:function(op,callback){var self=this,o=this.options;o.itemsCreator(op,function(res){1===op.times&&BI.isNotNull(op.keywords)&&self.trigger.setValue(BI.deepClone(self.storeValue)),callback.apply(self,arguments)})},_stopEditing:function(){this.trigger.stopEditing(),this.numberCounter.hideView()},_defaultState:function(){this._stopEditing(),this.combo.hideView()},_assertValue:function(val){val||(val={}),val.type||(val.type=BI.Selection.Multi),val.value||(val.value=[])},_makeMap:function(values){return BI.makeObject(values||[])},_joinKeywords:function(keywords,callback){function digest(items){var selectedMap=self._makeMap(items);BI.each(keywords,function(i,val){BI.isNotNull(selectedMap[val])&&(self.storeValue.type===BI.Selection.Multi?BI.pushDistinct(self.storeValue.value,val):BI.remove(self.storeValue.value,val))}),self._adjust(callback)}var self=this,o=this.options;this._assertValue(this.storeValue),this.requesting=!0,o.itemsCreator({type:BI.MultiSelectNoBarCombo.REQ_GET_ALL_DATA,keywords:keywords},function(ob){var values=BI.map(ob.items,"value");digest(values)})},_joinAll:function(res,callback){var self=this,o=this.options;this._assertValue(res),this.requesting=!0,o.itemsCreator({type:BI.MultiSelectNoBarCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(ob){var items=BI.map(ob.items,"value");if(self.storeValue.type===res.type){var change=!1,map=self._makeMap(self.storeValue.value);return BI.each(items,function(i,v){BI.isNotNull(map[v])&&(change=!0,self.storeValue.assist&&self.storeValue.assist.push(map[v]),delete map[v])}),change&&(self.storeValue.value=BI.values(map)),void self._adjust(callback)}var selectedMap=self._makeMap(self.storeValue.value),notSelectedMap=self._makeMap(res.value),newItems=[];BI.each(items,function(i,item){BI.isNotNull(selectedMap[items[i]])&&(self.storeValue.assist&&self.storeValue.assist.push(selectedMap[items[i]]),delete selectedMap[items[i]]),BI.isNull(notSelectedMap[items[i]])&&(BI.remove(self.storeValue.assist,item),newItems.push(item))}),self.storeValue.value=newItems.concat(BI.values(selectedMap)),self._adjust(callback)})},_adjust:function(callback){function adjust(){self.wants2Quit===!0&&(self.fireEvent(BI.MultiSelectNoBarCombo.EVENT_CONFIRM),self.wants2Quit=!1),self.requesting=!1}var self=this,o=this.options;adjust(),callback()},_join:function(res,callback){var self=this,o=this.options;if(this._assertValue(res),this._assertValue(this.storeValue),this.storeValue.type===res.type){var map=this._makeMap(this.storeValue.value);BI.each(res.value,function(i,v){map[v]||(self.storeValue.value.push(v),BI.remove(self.storeValue.assist,v),map[v]=v)});var change=!1;return BI.each(res.assist,function(i,v){BI.isNotNull(map[v])&&(change=!0,self.storeValue.assist&&self.storeValue.assist.push(map[v]),delete map[v])}),change&&(this.storeValue.value=BI.values(map)),void self._adjust(callback)}this._joinAll(res,callback)},_setStartValue:function(value){this._startValue=value,this.popup.setStartValue(value)},setValue:function(v){this.storeValue={type:BI.Selection.Multi,value:v||[]},this.combo.setValue(this.storeValue),this.numberCounter.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue.value)},populate:function(){this.combo.populate.apply(this.combo,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.MultiSelectNo
}callback(firstItems.concat(self._createItems(ob.items)),ob.keyword||""),1===op.times&&self.storeValue&&(BI.isKey(startValue)&&(self.storeValue.type===BI.Selection.All?BI.remove(self.storeValue.value,startValue):BI.pushDistinct(self.storeValue.value,startValue)),self.setValue(self.storeValue)),1===op.times&&self._scrollToTop()})},hasNext:function(){return hasNext},value:this.storeValue},opts.el)),BI.createWidget({type:"bi.vertical",element:this,items:[this.button_group],vgap:5}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){self.fireEvent(BI.MultiSelectNoBarLoader.EVENT_CHANGE,arguments)})},_createItems:function(items){return BI.createItems(items,{type:"bi.multi_select_item",cls:"bi-list-item-active",logic:this.options.logic,height:24,iconWrapperWidth:36})},_scrollToTop:function(){var self=this;BI.delay(function(){self.button_group.element.scrollTop(0)},30)},_assertValue:function(val){val||(val={}),val.type||(val.type=BI.Selection.Multi),val.value||(val.value=[])},setStartValue:function(v){this._startValue=v},setValue:function(v){this.storeValue=v||{},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(items){arguments[0]=this._createItems(items),this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(h){this.button_group.element.css({"max-height":h+"px"})},resetWidth:function(){}}),BI.MultiSelectNoBarLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_no_bar_loader",BI.MultiSelectNoBarLoader),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 self=this,opts=this.options;this.loader=BI.createWidget({type:"bi.multi_select_loader",itemsCreator:opts.itemsCreator,valueFormatter:opts.valueFormatter,onLoaded:opts.onLoaded,value:opts.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:opts.maxWidth,minWidth:opts.minWidth,maxHeight:opts.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:opts.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){self.fireEvent(BI.MultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(index){switch(index){case 0:self.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:self.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(v){this.loader.setStartValue(v)},setValue:function(v){this.popupView.setValue(v)},getValue:function(){return this.popupView.getValue()},populate:function(items){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(h){this.popupView.resetHeight(h)},resetWidth:function(w){this.popupView.resetWidth(w)}}),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),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.appl
self._showAdapter(),self.adapter.setValue(self.storeValue),self._setStartValue(keyword),assertShowValue(),self.adapter.populate(),self._setStartValue(""),self.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)}),self._showAdapter()}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var keywords=this.getKeywords(),last=BI.last(keywords);keywords=BI.initial(keywords||[]),keywords.length>0&&self._joinKeywords(keywords,function(){BI.isEndWithBlank(last)?(self.adapter.setValue(self.storeValue),assertShowValue(),self.adapter.populate(),self._setStartValue("")):(self.adapter.setValue(self.storeValue),assertShowValue()),self.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(value,obj){obj instanceof BI.MultiSelectBar?self._joinAll(this.getValue(),function(){assertShowValue(),self.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)}):self._join(this.getValue(),function(){assertShowValue(),self.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)})}}],value:o.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(val){val||(val={}),val.type||(val.type=BI.Selection.Multi),val.value||(val.value=[])},_makeMap:function(values){return BI.makeObject(values||[])},_joinKeywords:function(keywords,callback){function digest(items){var selectedMap=self._makeMap(items);BI.each(keywords,function(i,val){BI.isNotNull(selectedMap[val])&&(self.storeValue.type===BI.Selection.Multi?BI.pushDistinct(self.storeValue.value,val):BI.remove(self.storeValue.value,val))}),callback()}var self=this,o=this.options;this._assertValue(this.storeValue),o.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA,keywords:keywords},function(ob){var values=BI.map(ob.items,"value");digest(values)})},_joinAll:function(res,callback){var self=this,o=this.options;this._assertValue(res),o.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA,keywords:[self.trigger.getKeyword()]},function(ob){var items=BI.map(ob.items,"value");if(self.storeValue.type===res.type){var change=!1,map=self._makeMap(self.storeValue.value);return BI.each(items,function(i,v){BI.isNotNull(map[v])&&(change=!0,delete map[v])}),change&&(self.storeValue.value=BI.values(map)),void callback()}var selectedMap=self._makeMap(self.storeValue.value),notSelectedMap=self._makeMap(res.value),newItems=[];BI.each(items,function(i,item){BI.isNotNull(selectedMap[items[i]])&&delete selectedMap[items[i]],BI.isNull(notSelectedMap[items[i]])&&newItems.push(item)}),self.storeValue.value=newItems.concat(BI.values(selectedMap)),callback()})},_join:function(res,callback){var self=this,o=this.options;if(this._assertValue(res),this._assertValue(this.storeValue),this.storeValue.type===res.type){var map=this._makeMap(this.storeValue.value);BI.each(res.value,function(i,v){map[v]||(self.storeValue.value.push(v),map[v]=v)});var change=!1;return BI.each(res.assist,function(i,v){BI.isNotNull(map[v])&&(change=!0,delete map[v])}),change&&(this.storeValue.value=BI.values(map)),void callback()}this._joinAll(res,callback)},_setStartValue:function(value){this._startValue=value,this.adapter.setStartValue(value)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(v){this.storeValue=v||{},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_C
},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){self.numberCounter.adjustView(),isInit=!0,want2showCounter===!0&&showCounter()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){change=!0;var val={type:BI.Selection.Multi,value:this.hasChecked()?this.getValue():{}};self.trigger.getSearcher().setState(val),self.numberCounter.setButtonChecked(val),self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM,self.combo.getValue())}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){self.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){clear=!0,self.setValue(),self._defaultState()}}],itemsCreator:o.itemsCreator,onLoaded:function(){BI.nextTick(function(){self.numberCounter.adjustView(),self.trigger.getSearcher().adjustView()})}},value:{value:o.value||{}},hideChecker:function(e){return 0===triggerBtn.element.find(e.target).length&&0===self.numberCounter.element.find(e.target).length}});var change=!1,clear=!1,isSearching=function(){return self.trigger.getSearcher().isSearching()},isPopupView=function(){return self.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS,function(){self.fireEvent(BI.MultiTreeInsertCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR,function(){self.fireEvent(BI.MultiTreeInsertCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){self.storeValue={value:self.combo.getValue()},this.setValue(self.storeValue),self.numberCounter.setValue(self.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){self.storeValue={value:this.getValue()},self.combo.setValue(self.storeValue),self.numberCounter.setValue(self.storeValue),BI.nextTick(function(){isPopupView()&&self.combo.populate()}),self.fireEvent(BI.MultiTreeInsertCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(){self.fireEvent(BI.MultiTreeInsertCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){self.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var checked=this.getSearcher().hasChecked(),val={type:BI.Selection.Multi,value:checked?{1:1}:{}};this.getSearcher().setState(checked?BI.Selection.Multi:BI.Selection.None),self.numberCounter.setButtonChecked(val),self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM,self.combo.getValue())}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){isSearching()||(change===!0&&(self.storeValue={value:self.combo.getValue()},change=!1),self.combo.setValue(self.storeValue),self.numberCounter.setValue(self.storeValue),self.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){isSearching()?(self._stopEditing(),self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CONFIRM)):isPopupView()&&(self._stopEditing(),self.storeValue={value:self.combo.getValue()},clear===!0&&(self.storeValue={value:{}}),self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CONFIRM)),clear=!1,change=!1});var triggerBtn=BI.createWidget({type:"bi.trigger_icon_button",width:o.height,height:o.height,cls:"multi-select-trigger-icon-button"});triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE,function(){self.numberCounter.hideView(),self.combo.isViewVisible()?self.combo.hideView():self.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:o.itemsCreator,masker:{offset:this.constants.offset},valueFormatter:o.valueFormatter,value:o.value}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){self.combo.isViewVisible()||self.combo.showView()}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){want2showCounter===!1&&(want2showCounter=!0),isInit===!0&&(want2showCounter=null,showCounter())}),this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){self.trigger.refreshPlaceHolderWidth(b===!0?self.numberCounter.element.outerWidth()+8:0)})}),this.trigger.elem
items:[self.label]}),self._setValidEvent(self.bigEditor,c.bigEditor),self._setValidEvent(self.smallEditor,c.smallEditor),self._setErrorEvent(self.bigEditor,c.bigEditor),self._setErrorEvent(self.smallEditor,c.smallEditor),self._setBlurEvent(self.bigEditor),self._setBlurEvent(self.smallEditor),self._setFocusEvent(self.bigEditor),self._setFocusEvent(self.smallEditor),self._setComboValueChangedEvent(self.bigCombo),self._setComboValueChangedEvent(self.smallCombo),self._setEditorValueChangedEvent(self.bigEditor),self._setEditorValueChangedEvent(self.smallEditor),self._checkValidation()},_checkValidation:function(){var self=this,c=this.constants,o=this.options;if(self._setTitle(""),BI.Bubbles.hide(c.typeError),BI.Bubbles.hide(c.numberError),BI.Bubbles.hide(c.signalError),!self.smallEditor.isValid()||!self.bigEditor.isValid())return self.element.removeClass("number-error"),o.validation="invalid",c.typeError;if(BI.isEmptyString(self.smallEditor.getValue())||BI.isEmptyString(self.bigEditor.getValue()))return self.element.removeClass("number-error"),o.validation="valid","";var smallValue=parseFloat(self.smallEditor.getValue()),bigValue=parseFloat(self.bigEditor.getValue()),bigComboValue=self.bigCombo.getValue(),smallComboValue=self.smallCombo.getValue();return bigComboValue[0]===c.less_equal&&smallComboValue[0]===c.less_equal?smallValue>bigValue?(self.element.addClass("number-error"),o.validation="invalid",c.numberError):(self.element.removeClass("number-error"),o.validation="valid",""):smallValue>bigValue?(self.element.addClass("number-error"),o.validation="invalid",c.numberError):smallValue===bigValue?(self.element.addClass("number-error"),o.validation="invalid",c.signalError):(self.element.removeClass("number-error"),o.validation="valid","")},_setTitle:function(v){this.label.setTitle(v)},_setFocusEvent:function(w){var self=this,c=this.constants;w.on(BI.NumberIntervalSingleEidtor.EVENT_FOCUS,function(){switch(self._setTitle(""),self._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),self,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),self,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),self,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;default:return}})},_setBlurEvent:function(w){var c=this.constants,self=this;w.on(BI.NumberIntervalSingleEidtor.EVENT_BLUR,function(){switch(BI.Bubbles.hide(c.typeError),BI.Bubbles.hide(c.numberError),BI.Bubbles.hide(c.signalError),self._checkValidation()){case c.typeError:self._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));break;case c.numberError:self._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));break;case c.signalError:self._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));break;default:self._setTitle("")}})},_setErrorEvent:function(w){var c=this.constants,self=this;w.on(BI.NumberIntervalSingleEidtor.EVENT_ERROR,function(){self._checkValidation(),BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),self,{offsetStyle:"left",adjustYOffset:c.adjustYOffset}),self.fireEvent(BI.NumberInterval.EVENT_ERROR)})},_setValidEvent:function(w){var self=this,c=this.constants;w.on(BI.NumberIntervalSingleEidtor.EVENT_VALID,function(){switch(self._checkValidation()){case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),self,{offsetStyle:"left",adjustYOffset:c.adjustYOffset}),self.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),self,{offsetStyle:"left",adjustYOffset:c.adjustYOffset}),self.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:self.fireEvent(BI.NumberInterval.EVENT_VALID)}})},_setEditorValueChangedEvent:function(w){var self=this,c=this.constants;w.on(BI.NumberIntervalSingleEidtor.EVENT_CHANGE,function(){switch(
var conf=BI.SelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.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 self=this,o=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:o.height,height:o.height,hgap:o.hgap,text:o.text,value:o.value,keyword:o.keyword,py:o.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(type){type===BI.Events.CLICK&&(this.isSelected()?self.triggerExpand():self.triggerCollapse())});var type=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),items=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(type,BI.extend(o.logic,{items:items}))))},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(v){BI.SelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(v)}}),BI.shortcut("bi.select_tree_first_plus_group_node",BI.SelectTreeFirstPlusGroupNode),BI.SelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var conf=BI.SelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.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 self=this,o=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:o.height,height:o.height,hgap:o.hgap,text:o.text,value:o.value,keyword:o.keyword,py:o.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(type){type===BI.Events.CLICK&&(this.isSelected()?self.triggerExpand():self.triggerCollapse())});var type=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),items=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(type,BI.extend(o.logic,{items:items}))))},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(v){BI.SelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(v)}}),BI.shortcut("bi.select_tree_last_plus_group_node",BI.SelectTreeLastPlusGroupNode),BI.SelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var conf=BI.SelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.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 self=this,o=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:o.height,height:o.height,hgap:o.hgap,text:o.text,value:o.value,keyword:o.keyword,py:o.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(type){type===BI.Events.CLICK&&(this.isSelected()?self.triggerExpand():self.triggerCollapse())});var
}),this.list.on(BI.Controller.EVENT_CHANGE,function(type,value,obj){type===BI.Events.CLICK&&self.fireEvent(BI.SingleSelectList.EVENT_CHANGE,value,obj),self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction),BI.extend({scrolly:!0},o.logic,{items:o.allowNoSelect?BI.LogicFactory.createLogicItemsByDirection(o.direction,{type:"bi.single_select_item",cls:"bi-list-item-active",height:24,forceNotSelected:!0,text:BI.i18nText("BI-Basic_No_Select"),ref:function(_ref){self.toolbar=_ref},listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(type){type===BI.Events.CLICK&&(self.list.setValue(),self.fireEvent(BI.SingleSelectList.EVENT_CHANGE)),self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]},this.list):BI.LogicFactory.createLogicItemsByDirection(o.direction,this.list)}))))},hasPrev:function(){return this.list.hasPrev()},hasNext:function(){return this.list.hasNext()},prependItems:function(items){this.list.prependItems.apply(this.list,arguments)},addItems:function(items){this.list.addItems.apply(this.list,arguments)},setValue:function(v){this.list.setValue([v])},getValue:function(){return this.list.getValue()[0]},empty:function(){this.list.empty()},populate:function(items){this.list.populate.apply(this.list,arguments)},resetHeight:function(h){this.list.resetHeight?this.list.resetHeight(h):this.list.element.css({"max-height":h+"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(value){return this.list.getIndexByValue(value)},getNodeById:function(id){return this.list.getNodeById(id)},getNodeByValue:function(value){return this.list.getNodeByValue(value)}}),BI.SingleSelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_list",BI.SingleSelectList),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 self=this,opts=this.options,hasNext=!1;this.storeValue=opts.value,this.button_group=BI.createWidget({type:"bi.single_select_list",allowNoSelect:opts.allowNoSelect,logic:opts.logic,el:BI.extend({onLoaded:opts.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"}]}}},opts.el),itemsCreator:function(op,callback){var startValue=self._startValue;BI.isNotNull(self.storeValue)&&(op=BI.extend(op||{},{selectedValues:[self.storeValue]})),opts.itemsCreator(op,function(ob){hasNext=ob.hasNext;var firstItems=[];if(1===op.times&&BI.isNotNull(self.storeValue)){var json=BI.map([self.storeValue],function(i,v){var txt=opts.valueFormatter(v)||v;return{text:txt,value:v,title:txt,selected:!0}});firstItems=self._createItems(json)}callback(firstItems.concat(self._createItems(ob.items)),ob.keyword||""),1===op.times&&self.storeValue&&(BI.isKey(startValue)&&(self.storeValue=startValue),self.setValue(self.storeValue)),1===op.times&&self._scrollToTop()})},hasNext:function(){return hasNext},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(){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){self.fireEvent(BI.SingleSelectLoader.EVENT_CHANGE,arguments)})},_createItems:fun
self.value=v,self.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)}},function(){if(startDrag===!0){size=optimizeSize(size);var percent=100*size/self._getGrayTrackLength(),significantPercent=BI.parseFloat(percent.toFixed(1));self._setSliderPosition(significantPercent),size=0,offset=0,defaultSize=size,startDrag=!1}widget.element.removeClass("dragging"),mouseMoveTracker.releaseMouseMoves(),self.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)},window);widget.element.on("mousedown",function(event){widget.isEnabled()&&(defaultSize=this.offsetLeft,optimizeSize(defaultSize),mouseMoveTracker.captureMouseMoves(event))})},_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(v){return BI.isNumeric(v)&&!(BI.isNull(v)||v<this.min||v>this.max)},_setBlueTrack:function(percent){this.blueTrack.element.css({width:percent+"%"})},_setLabelPosition:function(percent){},_setSliderPosition:function(percent){this.slider.element.css({left:percent+"%"})},_setAllPosition:function(percent){this._setSliderPosition(percent),this._setLabelPosition(percent),this._setBlueTrack(percent)},_setVisible:function(visible){this.slider.setVisible(visible),this.label.setVisible(visible)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(percent){var thousandth=BI.parseInt(10*percent);return(this.max-this.min)*thousandth/1e3+this.min},_getPercentByValue:function(v){return 100*(v-this.min)/(this.max-this.min)},_setEnable:function(b){BI.SingleSliderLabel.superclass._setEnable.apply(this,[b]),b?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(v){var o=this.options;v=BI.parseFloat(v),v=o.digit===!1?v:v.toFixed(o.digit),isNaN(v)||(this._checkValidation(v)&&(this.value=v),v>this.max&&(this.value=this.max),v<this.min&&(this.value=this.min))},setMinAndMax:function(v){var minNumber=BI.parseFloat(v.min),maxNumber=BI.parseFloat(v.max);!isNaN(minNumber)&&!isNaN(maxNumber)&&maxNumber>minNumber&&(this.min=minNumber,this.max=maxNumber)},reset:function(){this._setVisible(!1),this.enable=!1,this.value="",this.min=0,this.max=0,this._setBlueTrack(0)},populate:function(){var o=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+o.unit),this._setAllPosition(this._getPercentByValue(this.value))):(this.label.setValue(this.max+o.unit),this._setAllPosition(100)))}}),BI.SingleSliderLabel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_slider_label",BI.SingleSliderLabel),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 self=this,c=this._constant,track=this._createTrack();this.slider=BI.createWidget({type:"bi.single_slider_button"}),this._draggable(this.slider);var sliderVertical=BI.createWidget({type:"bi.vertical",items:[{type:"bi.absolute",items:[this.slider]}],hgap:c.SLIDER_WIDTH_HALF,height:c.SLIDER_HEIGHT});return sliderVertical.element.click(function(e){if(self.enable&&self.isEnabled()&&sliderVertical.element[0]===e.originalEvent.target){var offset=e.clientX-self.element.offset().left-c.SLIDER_WIDTH_HALF,trackLength=self.track.element[0].scrollWidth-c.TRACK_GAP,percent=0;offset<0&&(percent=0),offset>0&&offset<trackLength&&(percent=100*offset/self._getGrayTrackLength()),offset>=trackLength&&(percent=100);var significantPercent=BI.parseFloat(percent.toFixed(1));self._setAllPosition(significantPercent);var v=self._getValueByPercent(significantPercent);self.value=v,self.fireEvent(BI.Singl
},setValue:function(date){date=date||{},this.left.setValue(date.start),this.right.setValue(date.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(){BI.TimePeriods=BI.inherit(BI.Single,{constants:{height:24,width:24,lgap:15,offset:0},props:{extraCls:"bi-time-interval",value:{}},render:function(){var self=this,o=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(_ref){self.label=_ref}}]},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(_ref){self.left=_ref}},this._createCombo(o.value.start)),left:this.constants.offset,right:this.constants.width/2,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:BI.extend({ref:function(_ref){self.right=_ref}},this._createCombo(o.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(v){var self=this;return{type:"bi.time_combo",value:v,listeners:[{eventName:BI.TimeCombo.EVENT_BEFORE_POPUPVIEW,action:function(){self.left.hidePopupView(),self.right.hidePopupView()}},{eventName:BI.TimeCombo.EVENT_CHANGE,action:function(){self.fireEvent(BI.TimePeriods.EVENT_CHANGE)}},{eventName:BI.TimeCombo.EVENT_CONFIRM,action:function(){self.fireEvent(BI.TimePeriods.EVENT_CONFIRM)}}]}},setValue:function(date){date=date||{},this.left.setValue(date.start),this.right.setValue(date.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)}(),BI.DynamicYearCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-card"},render:function(){var self=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(){self.item=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){self.fireEvent("EVENT_CHANGE")}}]}],vgap:10,hgap:10}},_createValue:function(type,v){return{dateType:type,value:Math.abs(v),offset:v>0?1:0}},setValue:function(v){v=v||{year:0},this.item.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR,v.year))},getValue:function(){var value=this.item.getValue();return{year:0===value.offset?-value.value:value.value}}}),BI.DynamicYearCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_card",BI.DynamicYearCard),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(v){var o=this.options,y=this._year,calendar=BI.createWidget({type:"bi.year_calendar",behaviors:o.behaviors,min:o.min,max:o.max,logic:{dynamic:!0},year:y+12*v});return calendar.setValue(this._year),calendar},_init:function(){BI.StaticYearCard.superclass._init.apply(this,arguments);var self=this,o=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(){self.navigation.setSelect(self.navigation.getSelect()-1),self._checkLeftValid(),self._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(){self.navigation.setSelect(self.navigation.getSelect()+1),self._checkLeftValid(),self._checkRightValid()}}]}),this.navigation=BI.createWidget({type:"bi.navigation",direction:"top",element:this,single:!0,logic:
}),editor.on(BI.SignEditor.EVENT_CHANGE,function(){isYear&&self._autoSwitch(editor)}),editor},_titleCreator:function(){var storeValue=this.storeValue||{},type=storeValue.type||BI.DynamicDateCombo.Static,value=storeValue.value;if(!this.monthEditor.isValid()||!this.yearEditor.isValid())return"";switch(type){case BI.DynamicDateCombo.Dynamic:var text=this._getText(value),date=BI.getDate();date=BI.DynamicDateHelper.getCalculation(value);var dateStr=BI.print(date,"%Y-%x");return BI.isEmptyString(text)?dateStr:text+":"+dateStr;case BI.DynamicDateCombo.Static:default:return value=value||{},this._getStaticTitle(value)}},_doEditorConfirm:function(editor){var value=editor.getValue();BI.isNotNull(value)&&editor.setValue(value);var monthValue=this.monthEditor.getValue();this.storeValue={type:BI.DynamicDateCombo.Static,value:{year:this.yearEditor.getValue(),month:BI.isEmptyString(this.monthEditor.getValue())?"":monthValue}}},_yearCheck:function(v){var date=BI.print(BI.parseDateTime(v,"%Y-%X-%d"),"%Y-%X-%d");return BI.print(BI.parseDateTime(v,"%Y"),"%Y")===v&&date>=this.options.min&&date<=this.options.max},_autoSwitch:function(editor){var v=editor.getValue();BI.isNotEmptyString(v)&&BI.checkDateLegal(v)&&4===v.length&&this._yearCheck(v)&&(this._doEditorConfirm(editor),this.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM),this.monthEditor.focus())},_getText:function(obj){var value="";return BI.isNotNull(obj.year)&&0!==BI.parseInt(obj.year)&&(value+=Math.abs(obj.year)+BI.i18nText("BI-Basic_Year")+(obj.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),BI.isNotNull(obj.month)&&0!==BI.parseInt(obj.month)&&(value+=Math.abs(obj.month)+BI.i18nText("BI-Basic_Month")+(obj.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),value},_setInnerValue:function(date,text){this.yearEditor.setValue(date.getFullYear()),this.monthEditor.setValue(date.getMonth()+1)},_getStaticTitle:function(value){value=value||{};var hasYear=!(BI.isNull(value.year)||BI.isEmptyString(value.year)),hasMonth=!(BI.isNull(value.month)||BI.isEmptyString(value.month));switch(hasYear<<1|hasMonth){case 0:return"";case 1:return value.month;case 2:return value.year;case 3:default:return value.year+"-"+value.month}},setValue:function(v){var type,value,date=BI.getDate();switch(this.storeValue=v,BI.isNotNull(v)&&(type=v.type||BI.DynamicDateCombo.Static,value=v.value||v),type){case BI.DynamicDateCombo.Dynamic:var text=this._getText(value);date=BI.DynamicDateHelper.getCalculation(value),this._setInnerValue(date,text);break;case BI.DynamicDateCombo.Static:default:value=value||{};var month=BI.isNull(value.month)?null:value.month;this.yearEditor.setValue(value.year),this.monthEditor.setValue(month)}},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),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 self=this,o=this.options;BI.YearMonthInterval.superclass._init.apply(this,arguments),o.value=o.value||{},this.left=this._createCombo(o.value.start),this.right=this._createCombo(o.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:self,type:"bi.center",hgap:15,height:this.constants.height,items:[{type:"bi.absolute",items:[{el:self.left,left:this.constants.offset,right:0,top:0,bottom:0}]},{type:
}))}}function expandSelectedValue(selectedValues,parents,notSelectedValue){var next=selectedValues,childrenCount=[],path=[];BI.some(parents,function(i,v){var t=next[v];if(null==t){if(0===i)return!0;if(!BI.isEmpty(next))return!0;var split=parents.slice(0,i),expanded=self._getChildren(split);if(path.push(split),childrenCount.push(expanded.length),i===parents.length-1&&1===expanded.length&&expanded[0].value===notSelectedValue)for(var j=childrenCount.length-1;j>=0&&1===childrenCount[j];j--)self._deleteNode(selectedValues,path[j]);else BI.each(expanded,function(m,child){return i===parents.length-1&&child.value===notSelectedValue||void(next[child.value]={})});next=next[v]}else next=t})}function search(parents,current,result,searched){var newParents=BI.clone(parents);if(newParents.push(current),self._isMatch(parents,current,keyword))return searched&&searched.push(newParents),!0;var children=self._getChildren(newParents),notSearch=[],can=!1;return BI.each(children,function(i,child){search(newParents,child.value,result,searched)?can=!0:notSearch.push(child.value)}),can===!0&&BI.each(notSearch,function(i,v){var next=BI.clone(newParents);next.push(v),result.push(next)}),can}function isSearchValueInParent(parentValues){for(var i=0,len=parentValues.length;i<len;i++)if(self._isMatch(parentValues.slice(0,i),parentValues[i],keyword))return!0;return!1}function canFindKey(selectedValues,parents){for(var t=selectedValues,i=0;i<parents.length;i++){var v=parents[i];if(t=t[v],null==t)return!1}return!0}function isChild(selectedValues,parents){for(var t=selectedValues,i=0;i<parents.length;i++){var v=parents[i];if(!BI.has(t,v))return!1;if(t=t[v],BI.isEmpty(t))return!0}return!1}var self=this,selectedValues=BI.deepClone(op.selectedValues),notSelectedValue=op.notSelectedValue||{},keyword=op.keyword||"",parentValues=op.parentValues||[];return null==selectedValues||BI.isEmpty(selectedValues)?void callback({}):(dealWithSelectedValues(selectedValues),void callback(selectedValues))},_reqAdjustTreeNode:function(op,callback){function dealWithSelectedValues(selected,parents){if(null==selected||BI.isEmpty(selected))return!0;var can=!0;return BI.each(selected,function(k,v){var p=BI.clone(parents);p.push(k),dealWithSelectedValues(selected[k],p)||(BI.each(selected[k],function(nk,nv){var t=BI.clone(p);t.push(nk),result.push(t)}),can=!1)}),can&&isAllSelected(selected,parents)}function isAllSelected(selected,parents){return BI.isEmpty(selected)||self._getChildCount(parents)===BI.size(selected)}var self=this,result=[],selectedValues=op.selectedValues;if(null==selectedValues||BI.isEmpty(selectedValues))return void callback({});BI.each(selectedValues,function(k,v){result.push([k])}),dealWithSelectedValues(selectedValues,[]);var jo={};BI.each(result,function(i,strs){self._buildTree(jo,strs)}),callback(jo)},_reqInitTreeNode:function(op,callback){function search(){var children=self._getChildren([]),start=children.length;if(""!==lastSearchValue){for(var j=0,len=start;j<len;j++)if(children[j].value===lastSearchValue){start=j+1;break}}else start=0;for(var output=[],i=start,len=children.length;i<len;i++){if(output.length<self._const.perPage)var find=nodeSearch(1,[],children[i].value,!1,result);else if(output.length===self._const.perPage)var find=nodeSearch(1,[],children[i].value,!1,[]);if(find[0]===!0&&output.push(children[i].value),output.length>self._const.perPage)break}if(1===op.times){var nodes=self._getAddedValueNode([],selectedValues);result=BI.concat(BI.filter(nodes,function(idx,node){var find=BI.Func.getSearchResult([node.text||node.value],keyword);return find.find.length>0||find.match.length>0}),result)}return output}function nodeSearch(deep,parentValues,current,isAllSelect,result){if(self._isMatch(parentValues,current,keyword)){var checked=isAllSelect||isSelected(parentValues,current);return createOneJson(parentValues,current,!1,checked,!isAllSelect&&isHalf(parentValues,current),!0,result),[!0,checked]}var newParents=BI.clone(parentValues);newParents.push(current);var children=self._getChildren(newParents),can=!1,checked=!1,isCurAllSelected=isAllSelect||isAllSel
fireEvent:function(){this.trigger.apply(this,arguments)},listenTo:function(obj,name,callback){var listeningTo=this._listeningTo||(this._listeningTo={}),id=obj._listenId||(obj._listenId=_.uniqueId("l"));return listeningTo[id]=obj,callback||"object"!=typeof name||(callback=this),obj.on(name,callback,this),this},listenToOnce:function(obj,name,callback){if("object"==typeof name){for(var event in name)this.listenToOnce(obj,event,name[event]);return this}if(eventSplitter.test(name)){for(var names=name.split(eventSplitter),i=0,length=names.length;i<length;i++)this.listenToOnce(obj,names[i],callback);return this}if(!callback)return this;var once=_.once(function(){this.stopListening(obj,name,once),callback.apply(this,arguments)});return once._callback=callback,this.listenTo(obj,name,once)},stopListening:function(obj,name,callback){var listeningTo=this._listeningTo;if(!listeningTo)return this;var remove=!name&&!callback;callback||"object"!=typeof name||(callback=this),obj&&((listeningTo={})[obj._listenId]=obj);for(var id in listeningTo)obj=listeningTo[id],obj.off(name,callback,this),(remove||_.isEmpty(obj._events))&&delete this._listeningTo[id];return this}},eventSplitter=/\s+/,eventsApi=function(obj,action,name,rest){if(!name)return!0;if("object"==typeof name){for(var key in name)obj[action].apply(obj,[key,name[key]].concat(rest));return!1}if(eventSplitter.test(name)){for(var names=name.split(eventSplitter),i=0,length=names.length;i<length;i++)obj[action].apply(obj,[names[i]].concat(rest));return!1}return!0},triggerEvents=function(events,args){var ev,i=-1,l=events.length,a1=args[0],a2=args[1],a3=args[2];switch(args.length){case 0:for(;++i<l;)(ev=events[i]).callback.call(ev.ctx);return;case 1:for(;++i<l;)(ev=events[i]).callback.call(ev.ctx,a1);return;case 2:for(;++i<l;)(ev=events[i]).callback.call(ev.ctx,a1,a2);return;case 3:for(;++i<l;)(ev=events[i]).callback.call(ev.ctx,a1,a2,a3);return;default:for(;++i<l;)(ev=events[i]).callback.apply(ev.ctx,args);return}},Router=BI.Router=function(options){options||(options={}),options.routes&&(this.routes=options.routes),this._bindRoutes(),this._init.apply(this,arguments)},optionalParam=/\((.*?)\)/g,namedParam=/(\(\?)?:\w+/g,splatParam=/\*\w+/g,escapeRegExp=/[\-{}\[\]+?.,\\\^$|#\s]/g;_.extend(Router.prototype,Events,{_init:function(){},route:function(route,name,callback){_.isRegExp(route)||(route=this._routeToRegExp(route)),_.isFunction(name)&&(callback=name,name=""),callback||(callback=this[name]);var router=this;return BI.history.route(route,function(fragment){var args=router._extractParameters(route,fragment);router.execute(callback,args,name)!==!1&&(router.trigger.apply(router,["route:"+name].concat(args)),router.trigger("route",name,args),BI.history.trigger("route",router,name,args))}),this},execute:function(callback,args,name){callback&&callback.apply(this,args)},navigate:function(fragment,options){return BI.history.navigate(fragment,options),this},_bindRoutes:function(){if(this.routes){this.routes=_.result(this,"routes");for(var route,routes=_.keys(this.routes);null!=(route=routes.pop());)this.route(route,this.routes[route])}},_routeToRegExp:function(route){return route=route.replace(escapeRegExp,"\\$&").replace(optionalParam,"(?:$1)?").replace(namedParam,function(match,optional){return optional?match:"([^/?]+)"}).replace(splatParam,"([^?]*?)"),new RegExp("^"+route+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(route,fragment){var params=route.exec(fragment).slice(1);return _.map(params,function(param,i){return i===params.length-1?param||null:param?decodeURIComponent(param):null})}});var History=function(){this.handlers=[],this.checkUrl=_.bind(this.checkUrl,this),"undefined"!=typeof window&&(this.location=_global.location,this.history=_global.history)},routeStripper=/^[#\/]|\s+$/g,rootStripper=/^\/+|\/+$/g,pathStripper=/#.*$/;History.started=!1,_.extend(History.prototype,Events,{interval:50,atRoot:function(){var path=this.location.pathname.replace(/[^\/]$/,"$&/");return path===this.root&&!this.getSearch()},getSearch:function(){var match=this.location.href.replace(/#.*/,"").match
!function(n){var r={};function o(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.m=n,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=313)}({313:function(e,t,n){e.exports=n(314)},314:function(e,t,n){"use strict";n.r(t);var r={};function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){e.prototype=Object.create(t.prototype),function i(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var o=n[r],u=Object.getOwnPropertyDescriptor(t,o);u&&u.configurable&&e[o]===undefined&&Object.defineProperty(e,o,u)}return e}(e.prototype.constructor=e,t)}function o(){return function(e){BI.shortcut(e.xtype,e)}}function f(){return function(e){BI.model(e.xtype,e)}}function d(n){var r=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};return function(e){return function(e){function t(){return e.apply(this,arguments)||this}return c(t,e),t.prototype._store=function(){var e=r.props?r.props.apply(this):undefined;return BI.Models.getModel(n.xtype,e)},t}(e)}}n.r(r),n.d(r,"shortcut",function(){return o}),n.d(r,"model",function(){return f}),n.d(r,"store",function(){return d}),n.d(r,"Model",function(){return l});var l=function(o){function e(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return i(u(e=o.call.apply(o,[this].concat(n))||this),"model",void 0),i(u(e),"store",void 0),i(u(e),"context",void 0),i(u(e),"actions",void 0),i(u(e),"childContext",void 0),i(u(e),"TYPE",void 0),i(u(e),"computed",void 0),e}return c(e,o),e.prototype.state=function(){return{}},e}(Fix.Model),p={Decorators:r};BI.extend(BI,p)}});