d=!0);elseBI.each(a,function(c,e){BI.isEqual(b,a[c])&&(deletea[c],d=!0)});returnd},deepWithout:function(a,b){if(BI.isArray(a)){for(varc=[],d=0;d<a.length;d++)BI.isEqual(b,a[d])||c.push(a[d]);returnc}varc={};returnBI.each(a,function(d,e){BI.isEqual(b,a[d])||(c[d]=e)}),c},deepUnique:function(a){varb=[];returnBI.each(a,function(a,c){BI.deepContains(b,c)||b.push(c)}),b},deepDiff:function(a,b){a||(a={}),b||(b={});varc=[],d=[];for(vareina)this.has(a,e)&&(this.isEqual(a[e],b[e])||c.push(e),d.push(e));for(vareinb)this.has(b,e)&&!d.contains(e)&&c.push(e);returnc},deepExtend:function(){vara=[].slice.call(arguments);returna.unshift(!0),$.extend.apply($,a)}}),_.each(["uniqueId","result","chain","iteratee","escape","unescape"],function(a){BI[a]=function(){return_[a].apply(_,arguments)}}),_.each(["bind","once","partial","debounce","throttle","delay","defer","wrap"],function(a){BI[a]=function(){return_[a].apply(_,arguments)}}),_.extend(BI,{nextTick:function(){functiona(){d=!1;vara=c.slice(0);c=[];for(varb=0;b<a.length;b++)a[b]()}varb,c=[],d=!1;if("undefined"!=typeofPromise){vare=Promise.resolve();b=function(){e.then(a)}}elseif("undefined"!=typeofMutationObserver){varf=1,g=newMutationObserver(a),h=document.createTextNode(f+"");g.observe(h,{characterData:!0}),b=function(){f=(f+1)%2,h.data=f+""}}elseb=function(){setTimeout(a,0)};returnfunction(a){vare,f=[].slice.call(arguments,1);if(c.push(function(){a&&a.apply(null,f),e&&e.apply(null,f)}),d||(d=!0,b()),!a&&"undefined"!=typeofPromise)returnnewPromise(function(a){e=a})}}()}),_.each(["random"],function(a){BI[a]=c(a)}),_.extend(BI,{getTime:function(){returnwindow.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():BI.getDate().getTime()},parseInt:function(a){varb=10;/^0x/g.test(a)&&(b=16);try{returnparseInt(a,b)}catch(c){thrownewError(a+"parse int error")}},parseSafeInt:function(a){varb=9007199254740991;returna?this.clamp(this.parseInt(a),-b,b):0===a?a:0},parseFloat:function(a){try{returnparseFloat(a)}catch(b){thrownewError(a+"parse float error")}},isNaturalNumber:function(a){return!!/^\d+$/.test(a)},isPositiveInteger:function(a){return!!/^\+?[1-9][0-9]*$/.test(a)},isNegativeInteger:function(a){return!!/^\-[1-9][0-9]*$/.test(a)},isInteger:function(a){return!!/^\-?\d+$/.test(a)},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},isFloat:function(a){return!!/^([+-]?)\\d*\\.\\d+$/.test(a)},isOdd:function(a){return!!BI.isInteger(a)&&a&!0},isEven:function(a){return!!BI.isInteger(a)&&a&!1},sum:function(a,b,c){vard=0;returnBI.each(a,function(a,e){d+=b?Number(b.apply(c,[a,e])):Number(e)}),d},average:function(a,b,c){vard=BI.sum(a,b,c);returnd/a.length}}),_.extend(BI,{trim:function(){return_.trim.apply(_,arguments)},toUpperCase:function(a){return(a+"").toLocaleUpperCase()},toLowerCase:function(a){return(a+"").toLocaleLowerCase()},isEndWithBlank:function(a){return/(\s|\u00A0)$/.test(a)},isLiteral:function(a){varb=/^\s?(true|false|-?[\d\.]+|'[^']*'|"[^"]*")\s?$/;returnb.test(a)},stripQuotes:function(a){varb=a.charCodeAt(0),c=a.charCodeAt(a.length-1);returnb!==c||34!==b&&39!==b?a:a.slice(1,-1)},camelize:function(a){returna.replace(/-(.)/g,function(a,b){returnb.toUpperCase()})},hyphenate:function(a){returna.replace(/([A-Z])/g,"-$1").toLowerCase()},isNotEmptyString:function(a){returnBI.isString(a)&&!BI.isEmpty(a)},isEmptyString:function(a){returnBI.isString(a)&&BI.isEmpty(a)},encrypt:function(a,b){if(""==a)return"";if(a=escape(a),b&&""!=b||(b="655"),b=escape(b),null==b||b.length<=0)returnalert("Please enter a password with which to encrypt the message."),null;for(varc="",d=0;d<b.length;d++)c+=b.charCodeAt(d).toString();vare=Math.floor(c.length/5),f=parseInt(c.charAt(e)+c.charAt(2*e)+c.charAt(3*e)+c.charAt(4*e)+c.charAt(5*e)),g=Math.ceil(b.length/2),h=Math.pow(2,31)-1;if(f<2)returnalert("Algorithmcannotfindasuitablehash.Pleasechooseadifferentpassword.\nPossibleconsiderationsaretochooseamorecomplexorlong
},clear:function(){this.parent=null,this.left=null,this.right=null,this.children=[]}},BI.extend(BI.Tree,{transformToArrayFormat:function(a,b){if(!a)return[];varc=[];if(BI.isArray(a))for(vard=0,e=a.length;d<e;d++){varf=BI.clone(a[d]);f.pId=null==f.pId?b:f.pId,deletef.children,c.push(f),a[d].children&&(c=c.concat(BI.Tree.transformToArrayFormat(a[d].children,f.id)))}else{varg=BI.clone(a);g.pId=null==g.pId?b:g.pId,deleteg.children,c.push(g),a.children&&(c=c.concat(BI.Tree.transformToArrayFormat(a.children,g.id)))}returnc},arrayFormat:function(a,b){if(!a)return[];varc=[];if(BI.isArray(a))for(vard=0,e=a.length;d<e;d++){varf=a[d];f.pId=null==f.pId?b:f.pId,c.push(f),a[d].children&&(c=c.concat(BI.Tree.arrayFormat(a[d].children,f.id)))}else{varg=a;g.pId=null==g.pId?b:g.pId,c.push(g),a.children&&(c=c.concat(BI.Tree.arrayFormat(a.children,g.id)))}returnc},transformToTreeFormat:function(a){varb,c;if(!a)return[];if(BI.isArray(a)){vard=[],e=[];for(b=0,c=a.length;b<c;b++){if(BI.isNull(a[b].id))returna;e[a[b].id]=BI.clone(a[b])}for(b=0,c=a.length;b<c;b++)e[a[b].pId]&&a[b].id!==a[b].pId?(e[a[b].pId].children||(e[a[b].pId].children=[]),e[a[b].pId].children.push(e[a[b].id])):d.push(e[a[b].id]),deletee[a[b].id].pId;returnd}return[a]},treeFormat:function(a){varb,c;if(!a)return[];if(BI.isArray(a)){vard=[],e=[];for(b=0,c=a.length;b<c;b++){if(BI.isNull(a[b].id))returna;e[a[b].id]=a[b]}for(b=0,c=a.length;b<c;b++)e[a[b].pId]&&a[b].id!==a[b].pId?(e[a[b].pId].children||(e[a[b].pId].children=[]),e[a[b].pId].children.push(e[a[b].id])):d.push(e[a[b].id]);returnd}return[a]},traversal:function(a,b){if(!BI.isNull(a)){varc=this;BI.any(a,function(a,d){returnb(a,d)===!1||voidc.traversal(d.children,b)})}}})}(),BI.Vector=function(a,b){this.x=a,this.y=b},BI.Vector.prototype={constructor:BI.Vector,cross:function(a){returnthis.x*a.y-this.y*a.x},length:function(a){returnMath.sqrt(this.x*a.x+this.y*a.y)}},BI.Region=function(a,b,c,d){this.x=a,this.y=b,this.w=c,this.h=d},BI.Region.prototype={constructor:BI.Region,isIntersects:function(a){if(this.isPointInside(a.x,a.y)||this.isPointInside(a.x+a.w,a.y)||this.isPointInside(a.x,a.y+a.h)||this.isPointInside(a.x+a.w,a.y+a.h))return!0;if(a.isPointInside(this.x,this.y)||a.isPointInside(this.x+this.w,this.y)||a.isPointInside(this.x,this.y+this.h)||a.isPointInside(this.x+this.w,this.y+this.h))return!0;if(null!=a.x&&null!=a.y){varb=newBI.Vector(this.w,this.h),c=newBI.Vector(a.x-this.x,a.y-this.y),d=newBI.Vector(c.x+a.w,c.y+a.h);if(b.cross(c)*b.cross(d)<0)return!0}return!1},isPointInside:function(a,b){returnnull!=this.x&&null!=this.y&&(a>=this.x&&a<=this.x+this.w&&b>=this.y&&b<=this.y+this.h)},getPosition:function(){vara=[];returna.push(this.x+this.w/2),a.push(this.y+this.h/2),a}},Date._DN=["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],Date._SDN=["日","一","二","三","四","五","六","日"],Date._FD=1,Date._MN=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],Date._SMN=[0,1,2,3,4,5,6,7,8,9,10,11],Date._QN=["","第1季度","第2季度","第3季度","第4季度"],Date._MD=[31,28,31,30,31,30,31,31,30,31,30,31],Date._OFFSET=[0,-1,-2,-3,-4,-5,-6],function(){vara={};BI.BufferPool={put:function(b,c){if(BI.isNotNull(a[b]))thrownewError("Buffer Pool has the key already!");a[b]=c},get:function(b){returna[b]}}}(),function(){vara={};BI.SharingPool={_Shared:a,put:function(b,c){a[b]=c},cat:function(){for(varb=Array.prototype.slice.call(arguments,0),c=a,d=0;d<b.length;d++)c=c&&c[b[d]];returnc},get:function(){returnBI.deepClone(this.cat.apply(this,arguments))},remove:function(b){deletea[b]}}}(),BI.Req={};