/*! fineui */
function accAdd ( a , b ) { var c , d , e , f ; try { c = a . toString ( ) . split ( "." ) [ 1 ] . length } catch ( g ) { c = 0 } try { d = b . toString ( ) . split ( "." ) [ 1 ] . length } catch ( g ) { d = 0 } if ( f = Math . abs ( c - d ) , e = Math . pow ( 10 , Math . max ( c , d ) ) , f > 0 ) { var h = Math . pow ( 10 , f ) ; c > d ? ( a = Number ( a . toString ( ) . replace ( "." , "" ) ) , b = Number ( b . toString ( ) . replace ( "." , "" ) ) * h ) : ( a = Number ( a . toString ( ) . replace ( "." , "" ) ) * h , b = Number ( b . toString ( ) . replace ( "." , "" ) ) ) } else a = Number ( a . toString ( ) . replace ( "." , "" ) ) , b = Number ( b . toString ( ) . replace ( "." , "" ) ) ; return ( a + b ) / e } function accSub ( a , b ) { var c , d , e , f ; try { c = a . toString ( ) . split ( "." ) [ 1 ] . length } catch ( g ) { c = 0 } try { d = b . toString ( ) . split ( "." ) [ 1 ] . length } catch ( g ) { d = 0 } return e = Math . pow ( 10 , Math . max ( c , d ) ) , f = c >= d ? c : d , ( ( a * e - b * e ) / e ) . toFixed ( f ) } function accMul ( a , b ) { var c = 0 , d = a . toString ( ) , e = b . toString ( ) ; try { c += d . split ( "." ) [ 1 ] . length } catch ( f ) { } try { c += e . split ( "." ) [ 1 ] . length } catch ( f ) { } return Number ( d . replace ( "." , "" ) ) * Number ( e . replace ( "." , "" ) ) / Math . pow ( 10 , c ) } function accDiv ( arg1 , arg2 ) { var t1 = 0 , t2 = 0 , r1 , r2 ; try { t1 = arg1 . toString ( ) . split ( "." ) [ 1 ] . length } catch ( e ) { } try { t2 = arg2 . toString ( ) . split ( "." ) [ 1 ] . length } catch ( e ) { } with ( Math ) return r1 = Number ( arg1 . toString ( ) . replace ( "." , "" ) ) , r2 = Number ( arg2 . toString ( ) . replace ( "." , "" ) ) , t2 > t1 ? r1 / r2 * pow ( 10 , t2 - t1 ) : r1 / r2 / pow ( 10 , t1 - t2 ) } ! function ( a , b ) { function c ( a ) { var b = a . length , c = ia . type ( a ) ; return ! ia . isWindow ( a ) && ( ! ( 1 !== a . nodeType || ! b ) || ( "array" === c || "function" !== c && ( 0 === b || "number" == typeof b && b > 0 && b - 1 in a ) ) ) } function d ( a ) { var b = xa [ a ] = { } ; return ia . each ( a . match ( ka ) || [ ] , function ( a , c ) { b [ c ] = ! 0 } ) , b } function e ( a , c , d , e ) { if ( ia . acceptData ( a ) ) { var f , g , h = ia . expando , i = "string" == typeof c , j = a . nodeType , k = j ? ia . cache : a , l = j ? a [ h ] : a [ h ] && h ; if ( l && k [ l ] && ( e || k [ l ] . data ) || ! i || d !== b ) return l || ( j ? a [ h ] = l = _ . pop ( ) || ia . guid ++ : l = h ) , k [ l ] || ( k [ l ] = { } , j || ( k [ l ] . toJSON = ia . noop ) ) , "object" != typeof c && "function" != typeof c || ( e ? k [ l ] = ia . extend ( k [ l ] , c ) : k [ l ] . data = ia . extend ( k [ l ] . data , c ) ) , f = k [ l ] , e || ( f . data || ( f . data = { } ) , f = f . data ) , d !== b && ( f [ ia . camelCase ( c ) ] = d ) , i ? ( g = f [ c ] , null == g && ( g = f [ ia . camelCase ( c ) ] ) ) : g = f , g } } function f ( a , b , c ) { if ( ia . acceptData ( a ) ) { var d , e , f , g = a . nodeType , i = g ? ia . cache : a , j = g ? a [ ia . expando ] : ia . expando ; if ( i [ j ] ) { if ( b && ( f = c ? i [ j ] : i [ j ] . data ) ) { ia . isArray ( b ) ? b = b . concat ( ia . map ( b , ia . camelCase ) ) : b in f ? b = [ b ] : ( b = ia . camelCase ( b ) , b = b in f ? [ b ] : b . split ( " " ) ) ; for ( d = 0 , e = b . length ; d < e ; d ++ ) delete f [ b [ d ] ] ; if ( ! ( c ? h : ia . isEmptyObject ) ( f ) ) return } ( c || ( delete i [ j ] . data , h ( i [ j ] ) ) ) && ( g ? ia . cleanData ( [ a ] , ! 0 ) : ia . support . deleteExpando || i != i . window ? delete i [ j ] : i [ j ] = null ) } } } function g ( a , c , d ) { if ( d === b && 1 === a . nodeType ) { var e = "data-" + c . replace ( za , "-$1" ) . toLowerCase ( ) ; if ( d = a . getAttribute ( e ) , "string" == typeof d ) { try { d = "true" === d || "false" !== d && ( "null" === d ? null : + d + "" === d ? + d : ya . test ( d ) ? ia . parseJSON ( d ) : d ) } catch ( f ) { } ia . data ( a , c , d ) } else d = b } return d } function h ( a ) { var b ; for ( b in a ) if ( ( "data" !== b || ! ia . isEmptyObject ( a [ b ] ) ) && "toJSON" !== b ) return ! 1 ; return ! 0 } function i ( ) { return ! 0 } function j ( ) { return ! 1 } function k ( a , b ) { do a = a [ b ] ; while ( a && 1 !== a . nodeType ) ; return a } function l ( a , b , c ) { if ( b = b || 0 , ia . isFunction ( b ) ) return ia . grep ( a , function ( a , d ) { var e = ! ! b . call ( a , d , a ) ; return e === c } ) ; if ( b . nodeType ) return ia . grep ( a , function ( a ) { return a === b === c } ) ; if ( "string" == typeof b ) { var d = ia . grep ( a , function ( a ) { return 1 === a . nodeType } ) ; if ( Ra . test ( b ) ) return ia . filter ( b , d , ! c ) ; b = ia . filter ( b , d ) } return ia . grep ( a , function ( a ) { return ia . inArray ( a , b ) >= 0 === c } ) } function m ( a ) { var b = Ua . split ( "|" ) , c = a . createDocumentFragment ( ) ; if ( c . createElement ) for ( ; b . length ; ) c . createElement ( b . pop ( ) ) ; return c } function n ( a , b ) { return a . getElementsByTagName ( b ) [ 0 ] || a . appendChild ( a . ownerDocument . createElement ( b ) ) } function o ( a ) { var b = a . getAttributeNode ( "type" ) ; return a . type = ( b && b . specified ) + "/" + a . type , a } function p ( a ) { var b = eb . exec ( a . type ) ; return b ? a . type = b [ 1 ] : a . removeAttribute ( "type" ) , a } function q ( a , b ) { for ( var c , d = 0 ; null != ( c = a [ d ] ) ; d ++ ) ia . _data ( c , "globalEval" , ! b || ia . _data ( b [ d ] , "globalEval" ) ) } function r ( a , b ) { if ( 1 === b . nodeType && ia . hasData ( a ) ) { var c , d , e , f = ia . _data ( a ) , g = ia . _data ( b , f ) , h = f . events ; if ( h ) { delete g . handle , g . events = { } ; for ( c in h ) for ( d = 0 , e = h [ c ] . length ; d < e ; d ++ ) ia . event . add ( b , c , h [ c ] [ d ] ) } g . data && ( g . data = ia . extend ( { } , g . data ) ) } } function s ( a , b ) { var c , d , e ; if ( 1 === b . nodeType ) { if ( c = b . nodeName . toLowerCase ( ) , ! ia . support . noCloneEvent &&
Ga . test ( c ) ? ! Ia && Ha . test ( c ) ? a [ ia . camelCase ( "default-" + c ) ] = a [ d ] = ! 1 : a [ d ] = ! 1 : ia . attr ( a , c , "" ) , a . removeAttribute ( Ia ? c : d ) } , attrHooks : { type : { set : function ( a , b ) { if ( ! ia . support . radioValue && "radio" === b && ia . nodeName ( a , "input" ) ) { var c = a . value ; return a . setAttribute ( "type" , b ) , c && ( a . value = c ) , b } } } } , 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 ( a , c , d ) { var e , f , g , h = a . nodeType ; if ( a && 3 !== h && 8 !== h && 2 !== h ) return g = 1 !== h || ! ia . isXMLDoc ( a ) , g && ( c = ia . propFix [ c ] || c , f = ia . propHooks [ c ] ) , d !== b ? f && "set" in f && ( e = f . set ( a , d , c ) ) !== b ? e : a [ c ] = d : f && "get" in f && null !== ( e = f . get ( a , c ) ) ? e : a [ c ] } , propHooks : { tabIndex : { get : function ( a ) { var c = a . getAttributeNode ( "tabindex" ) ; return c && c . specified ? parseInt ( c . value , 10 ) : Ea . test ( a . nodeName ) || Fa . test ( a . nodeName ) && a . href ? 0 : b } } } } ) , Ba = { get : function ( a , c ) { var d = ia . prop ( a , c ) , e = "boolean" == typeof d && a . getAttribute ( c ) , f = "boolean" == typeof d ? Ja && Ia ? null != e : Ha . test ( c ) ? a [ ia . camelCase ( "default-" + c ) ] : ! ! e : a . getAttributeNode ( c ) ; return f && f . value !== ! 1 ? c . toLowerCase ( ) : b } , set : function ( a , b , c ) { return b === ! 1 ? ia . removeAttr ( a , c ) : Ja && Ia || ! Ha . test ( c ) ? a . setAttribute ( ! Ia && ia . propFix [ c ] || c , c ) : a [ ia . camelCase ( "default-" + c ) ] = a [ c ] = ! 0 , c } } , Ja && Ia || ( ia . attrHooks . value = { get : function ( a , c ) { var d = a . getAttributeNode ( c ) ; return ia . nodeName ( a , "input" ) ? a . defaultValue : d && d . specified ? d . value : b } , set : function ( a , b , c ) { return ia . nodeName ( a , "input" ) ? void ( a . defaultValue = b ) : Aa && Aa . set ( a , b , c ) } } ) , Ia || ( Aa = ia . valHooks . button = { get : function ( a , c ) { var d = a . getAttributeNode ( c ) ; return d && ( "id" === c || "name" === c || "coords" === c ? "" !== d . value : d . specified ) ? d . value : b } , set : function ( a , c , d ) { var e = a . getAttributeNode ( d ) ; return e || a . setAttributeNode ( e = a . ownerDocument . createAttribute ( d ) ) , e . value = c += "" , "value" === d || c === a . getAttribute ( d ) ? c : b } } , ia . attrHooks . contenteditable = { get : Aa . get , set : function ( a , b , c ) { Aa . set ( a , "" !== b && b , c ) } } , ia . each ( [ "width" , "height" ] , function ( a , b ) { ia . attrHooks [ b ] = ia . extend ( ia . attrHooks [ b ] , { set : function ( a , c ) { if ( "" === c ) return a . setAttribute ( b , "auto" ) , c } } ) } ) ) , ia . support . hrefNormalized || ( ia . each ( [ "href" , "src" , "width" , "height" ] , function ( a , c ) { ia . attrHooks [ c ] = ia . extend ( ia . attrHooks [ c ] , { get : function ( a ) { var d = a . getAttribute ( c , 2 ) ; return null == d ? b : d } } ) } ) , ia . each ( [ "href" , "src" ] , function ( a , b ) { ia . propHooks [ b ] = { get : function ( a ) { return a . getAttribute ( b , 4 ) } } } ) ) , ia . support . style || ( ia . attrHooks . style = { get : function ( a ) { return a . style . cssText || b } , set : function ( a , b ) { return a . style . cssText = b + "" } } ) , ia . support . optSelected || ( ia . propHooks . selected = ia . extend ( ia . propHooks . selected , { get : function ( a ) { var b = a . parentNode ; return b && ( b . selectedIndex , b . parentNode && b . parentNode . selectedIndex ) , null } } ) ) , ia . support . enctype || ( ia . propFix . enctype = "encoding" ) , ia . support . checkOn || ia . each ( [ "radio" , "checkbox" ] , function ( ) { ia . valHooks [ this ] = { get : function ( a ) { return null === a . getAttribute ( "value" ) ? "on" : a . value } } } ) , ia . each ( [ "radio" , "checkbox" ] , function ( ) { ia . valHooks [ this ] = ia . extend ( ia . valHooks [ this ] , { set : function ( a , b ) { if ( ia . isArray ( b ) ) return a . checked = ia . inArray ( ia ( a ) . val ( ) , b ) >= 0 } } ) } ) ; var Ka = /^(?:input|select|textarea)$/i , La = /^key/ , Ma = /^(?:mouse|contextmenu)|click/ , Na = /^(?:focusinfocus|focusoutblur)$/ , Oa = /^([^.]*)(?:\.(.+)|)$/ ; ia . event = { global : { } , add : function ( a , c , d , e , f ) { var g , h , i , j , k , l , m , n , o , p , q , r = ia . _data ( a ) ; if ( r ) { for ( d . handler && ( j = d , d = j . handler , f = j . selector ) , d . guid || ( d . guid = ia . guid ++ ) , ( h = r . events ) || ( h = r . events = { } ) , ( l = r . handle ) || ( l = r . handle = function ( a ) { return typeof ia === V || a && ia . event . triggered === a . type ? b : ia . event . dispatch . apply ( l . elem , arguments ) } , l . elem = a ) , c = ( c || "" ) . match ( ka ) || [ "" ] , i = c . length ; i -- ; ) g = Oa . exec ( c [ i ] ) || [ ] , o = q = g [ 1 ] , p = ( g [ 2 ] || "" ) . split ( "." ) . sort ( ) , k = ia . event . special [ o ] || { } , o = ( f ? k . delegateType : k . bindType ) || o , k = ia . event . special [ o ] || { } , m = ia . extend ( { type : o , origType : q , data : e , handler : d , guid : d . guid , selector : f , needsContext : f && ia . expr . match . needsContext . test ( f ) , namespace : p . join ( "." ) } , j ) , ( n = h [ o ] ) || ( n = h [ o ] = [ ] , n . delegateCount = 0 , k . setup && k . setup . call ( a , e , p , l ) !== ! 1 || ( a . addEventListener ? a . addEventListener ( o , l , ! 1 ) : a . att
return this . pushStack ( l ( this , a , ! 0 ) ) } , is : function ( a ) { return ! ! a && ( "string" == typeof a ? Sa . test ( a ) ? ia ( a , this . context ) . index ( this [ 0 ] ) >= 0 : ia . filter ( a , this ) . length > 0 : this . filter ( a ) . length > 0 ) } , closest : function ( a , b ) { for ( var c , d = 0 , e = this . length , f = [ ] , g = Sa . test ( a ) || "string" != typeof a ? ia ( a , b || this . context ) : 0 ; d < e ; d ++ ) for ( c = this [ d ] ; c && c . ownerDocument && c !== b && 11 !== c . nodeType ; ) { if ( g ? g . index ( c ) > - 1 : ia . find . matchesSelector ( c , a ) ) { f . push ( c ) ; break } c = c . parentNode } return this . pushStack ( f . length > 1 ? ia . unique ( f ) : f ) } , index : function ( a ) { return a ? "string" == typeof a ? ia . inArray ( this [ 0 ] , ia ( a ) ) : ia . inArray ( a . jquery ? a [ 0 ] : a , this ) : this [ 0 ] && this [ 0 ] . parentNode ? this . first ( ) . prevAll ( ) . length : - 1 } , add : function ( a , b ) { var c = "string" == typeof a ? ia ( a , b ) : ia . makeArray ( a && a . nodeType ? [ a ] : a ) , d = ia . merge ( this . get ( ) , c ) ; return this . pushStack ( ia . unique ( d ) ) } , addBack : function ( a ) { return this . add ( null == a ? this . prevObject : this . prevObject . filter ( a ) ) } } ) , ia . fn . andSelf = ia . fn . addBack , ia . each ( { parent : function ( a ) { var b = a . parentNode ; return b && 11 !== b . nodeType ? b : null } , parents : function ( a ) { return ia . dir ( a , "parentNode" ) } , parentsUntil : function ( a , b , c ) { return ia . dir ( a , "parentNode" , c ) } , next : function ( a ) { return k ( a , "nextSibling" ) } , prev : function ( a ) { return k ( a , "previousSibling" ) } , nextAll : function ( a ) { return ia . dir ( a , "nextSibling" ) } , prevAll : function ( a ) { return ia . dir ( a , "previousSibling" ) } , nextUntil : function ( a , b , c ) { return ia . dir ( a , "nextSibling" , c ) } , prevUntil : function ( a , b , c ) { return ia . dir ( a , "previousSibling" , c ) } , siblings : function ( a ) { return ia . sibling ( ( a . parentNode || { } ) . firstChild , a ) } , children : function ( a ) { return ia . sibling ( a . firstChild ) } , contents : function ( a ) { return ia . nodeName ( a , "iframe" ) ? a . contentDocument || a . contentWindow . document : ia . merge ( [ ] , a . childNodes ) } } , function ( a , b ) { ia . fn [ a ] = function ( c , d ) { var e = ia . map ( this , b , c ) ; return Pa . test ( a ) || ( d = c ) , d && "string" == typeof d && ( e = ia . filter ( d , e ) ) , e = this . length > 1 && ! Ta [ a ] ? ia . unique ( e ) : e , this . length > 1 && Qa . test ( a ) && ( e = e . reverse ( ) ) , this . pushStack ( e ) } } ) , ia . extend ( { filter : function ( a , b , c ) { return c && ( a = ":not(" + a + ")" ) , 1 === b . length ? ia . find . matchesSelector ( b [ 0 ] , a ) ? [ b [ 0 ] ] : [ ] : ia . find . matches ( a , b ) } , dir : function ( a , c , d ) { for ( var e = [ ] , f = a [ c ] ; f && 9 !== f . nodeType && ( d === b || 1 !== f . nodeType || ! ia ( f ) . is ( d ) ) ; ) 1 === f . nodeType && e . push ( f ) , f = f [ c ] ; return e } , sibling : function ( a , b ) { for ( var c = [ ] ; a ; a = a . nextSibling ) 1 === a . nodeType && a !== b && c . push ( a ) ; return c } } ) ; var Ua = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video" , Va = / jQuery\d+="(?:null|\d+)"/g , Wa = new RegExp ( "<(?:" + Ua + ")[\\s/>]" , "i" ) , Xa = /^\s+/ , Ya = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi , Za = /<([\w:]+)/ , $a = /<tbody/i , _a = /<|&#?\w+;/ , ab = /<(?:script|style|link)/i , bb = /^(?:checkbox|radio)$/i , cb = /checked\s*(?:[^=]|=\s*.checked.)/i , db = /^$|\/(?:java|ecma)script/i , eb = /^true\/(.*)/ , fb = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g , gb = { option : [ 1 , "<select multiple='multiple'>" , "</select>" ] , legend : [ 1 , "<fieldset>" , "</fieldset>" ] , area : [ 1 , "<map>" , "</map>" ] , param : [ 1 , "<object>" , "</object>" ] , thead : [ 1 , "<table>" , "</table>" ] , tr : [ 2 , "<table><tbody>" , "</tbody></table>" ] , col : [ 2 , "<table><tbody></tbody><colgroup>" , "</colgroup></table>" ] , td : [ 3 , "<table><tbody><tr>" , "</tr></tbody></table>" ] , _default : ia . support . htmlSerialize ? [ 0 , "" , "" ] : [ 1 , "X<div>" , "</div>" ] } , hb = m ( W ) , ib = hb . appendChild ( W . createElement ( "div" ) ) ; gb . optgroup = gb . option , gb . tbody = gb . tfoot = gb . colgroup = gb . caption = gb . thead , gb . th = gb . td , ia . fn . extend ( { text : function ( a ) { return ia . access ( this , function ( a ) { return a === b ? ia . text ( this ) : this . empty ( ) . append ( ( this [ 0 ] && this [ 0 ] . ownerDocument || W ) . createTextNode ( a ) ) } , null , a , arguments . length ) } , wrapAll : function ( a ) { if ( ia . isFunction ( a ) ) return this . each ( function ( b ) { ia ( this ) . wrapAll ( a . call ( this , b ) ) } ) ; if ( this [ 0 ] ) { var b = ia ( a , this [ 0 ] . ownerDocument ) . eq ( 0 ) . clone ( ! 0 ) ; this [ 0 ] . parentNode && b . insertBefore ( this [ 0 ] ) , b . map ( function ( ) { for ( var a = this ; a . firstChild && 1 === a . firstChild . nodeType ; ) a = a . firstChild ; return a } ) . append ( this ) } return this } , wrapInner : function ( a ) { return ia . isFunction ( a ) ? this . each ( function ( b ) { ia ( this ) . wrapInner ( a . call ( this , b ) ) } ) : this . each ( function ( ) { var b = ia ( this ) , c = b . contents ( ) ; c . leng
var j = g [ i ] ; b && void 0 !== c [ j ] || ( c [ j ] = f [ j ] ) } return c } } , v = function ( a ) { if ( ! r . isObject ( a ) ) return { } ; if ( p ) return p ( a ) ; q . prototype = a ; var b = new q ; return q . prototype = null , b } , w = Math . pow ( 2 , 53 ) - 1 , x = function ( a ) { var b = null != a && a . length ; return "number" == typeof b && b >= 0 && b <= w } ; r . each = r . forEach = function ( a , b , c ) { b = s ( b , c ) ; var d , e ; if ( x ( a ) ) for ( d = 0 , e = a . length ; d < e ; d ++ ) b ( a [ d ] , d , a ) ; else { var f = r . keys ( a ) ; for ( d = 0 , e = f . length ; d < e ; d ++ ) b ( a [ f [ d ] ] , f [ d ] , a ) } return a } , r . map = r . collect = function ( a , b , c ) { b = t ( b , c ) ; for ( var d = ! x ( a ) && r . keys ( a ) , e = ( d || a ) . length , f = Array ( e ) , g = 0 ; g < e ; g ++ ) { var h = d ? d [ g ] : g ; f [ g ] = b ( a [ h ] , h , a ) } return f } , r . reduce = r . foldl = r . inject = a ( 1 ) , r . reduceRight = r . foldr = a ( - 1 ) , r . find = r . detect = function ( a , b , c ) { var d ; if ( d = x ( a ) ? r . findIndex ( a , b , c ) : r . findKey ( a , b , c ) , void 0 !== d && d !== - 1 ) return a [ d ] } , r . filter = r . select = function ( a , b , c ) { var d = [ ] ; return b = t ( b , c ) , r . each ( a , function ( a , c , e ) { b ( a , c , e ) && d . push ( a ) } ) , d } , r . reject = function ( a , b , c ) { return r . filter ( a , r . negate ( t ( b ) ) , c ) } , r . every = r . all = function ( a , b , c ) { b = t ( b , c ) ; for ( var d = ! x ( a ) && r . keys ( a ) , e = ( d || a ) . length , f = 0 ; f < e ; f ++ ) { var g = d ? d [ f ] : f ; if ( ! b ( a [ g ] , g , a ) ) return ! 1 } return ! 0 } , r . some = r . any = function ( a , b , c ) { b = t ( b , c ) ; for ( var d = ! x ( a ) && r . keys ( a ) , e = ( d || a ) . length , f = 0 ; f < e ; f ++ ) { var g = d ? d [ f ] : f ; if ( b ( a [ g ] , g , a ) ) return ! 0 } return ! 1 } , r . contains = r . includes = r . include = function ( a , b , c ) { return x ( a ) || ( a = r . values ( a ) ) , r . indexOf ( a , b , "number" == typeof c && c ) >= 0 } , r . invoke = function ( a , b ) { var c = j . call ( arguments , 2 ) , d = r . isFunction ( b ) ; return r . map ( a , function ( a ) { var e = d ? b : a [ b ] ; return null == e ? e : e . apply ( a , c ) } ) } , r . pluck = function ( a , b ) { return r . map ( a , r . property ( b ) ) } , r . where = function ( a , b ) { return r . filter ( a , r . matcher ( b ) ) } , r . findWhere = function ( a , b ) { return r . find ( a , r . matcher ( b ) ) } , r . max = function ( a , b , c ) { var d , e , f = - ( 1 / 0 ) , g = - ( 1 / 0 ) ; if ( null == b && null != a ) { a = x ( a ) ? a : r . values ( a ) ; for ( var h = 0 , i = a . length ; h < i ; h ++ ) d = a [ h ] , d > f && ( f = d ) } else b = t ( b , c ) , r . each ( a , function ( a , c , d ) { e = b ( a , c , d ) , ( e > g || e === - ( 1 / 0 ) && f === - ( 1 / 0 ) ) && ( f = a , g = e ) } ) ; return f } , r . min = function ( a , b , c ) { var d , e , f = 1 / 0 , g = 1 / 0 ; if ( null == b && null != a ) { a = x ( a ) ? a : r . values ( a ) ; for ( var h = 0 , i = a . length ; h < i ; h ++ ) d = a [ h ] , d < f && ( f = d ) } else b = t ( b , c ) , r . each ( a , function ( a , c , d ) { e = b ( a , c , d ) , ( e < g || e === 1 / 0 && f === 1 / 0 ) && ( f = a , g = e ) } ) ; return f } , r . shuffle = function ( a ) { for ( var b , c = x ( a ) ? a : r . values ( a ) , d = c . length , e = Array ( d ) , f = 0 ; f < d ; f ++ ) b = r . random ( 0 , f ) , b !== f && ( e [ f ] = e [ b ] ) , e [ b ] = c [ f ] ; return e } , r . sample = function ( a , b , c ) { return null == b || c ? ( x ( a ) || ( a = r . values ( a ) ) , a [ r . random ( a . length - 1 ) ] ) : r . shuffle ( a ) . slice ( 0 , Math . max ( 0 , b ) ) } , r . sortBy = function ( a , b , c ) { return b = t ( b , c ) , r . pluck ( r . map ( a , function ( a , c , d ) { return { value : a , index : c , criteria : b ( a , c , d ) } } ) . sort ( function ( a , b ) { var c = a . criteria , d = b . criteria ; if ( c !== d ) { if ( c > d || void 0 === c ) return 1 ; if ( c < d || void 0 === d ) return - 1 } return a . index - b . index } ) , "value" ) } ; var y = function ( a ) { return function ( b , c , d ) { var e = { } ; return c = t ( c , d ) , r . each ( b , function ( d , f ) { var g = c ( d , f , b ) ; a ( e , d , g ) } ) , e } } ; r . groupBy = y ( function ( a , b , c ) { r . has ( a , c ) ? a [ c ] . push ( b ) : a [ c ] = [ b ] } ) , r . indexBy = y ( function ( a , b , c ) { a [ c ] = b } ) , r . countBy = y ( function ( a , b , c ) { r . has ( a , c ) ? a [ c ] ++ : a [ c ] = 1 } ) , r . toArray = function ( a ) { return a ? r . isArray ( a ) ? j . call ( a ) : x ( a ) ? r . map ( a , r . identity ) : r . values ( a ) : [ ] } , r . size = function ( a ) { return null == a ? 0 : x ( a ) ? a . length : r . keys ( a ) . length } , r . partition = function ( a , b , c ) { b = t ( b , c ) ; var d = [ ] , e = [ ] ; return r . each ( a , function ( a , c , f ) { ( b ( a , c , f ) ? d : e ) . push ( a ) } ) , [ d , e ] } , r . first = r . head = r . take = function ( a , b , c ) { if ( null != a ) return null == b || c ? a [ 0 ] : r . initial ( a , a . length - b ) } , r . initial = function ( a , b , c ) { return j . call ( a , 0 , Math . max ( 0 , a . length - ( null == b || c ? 1 : b ) ) ) } , r . last = function ( a , b , c ) { if ( null != a ) return null == b || c ? a [ a . length - 1 ] : r . rest ( a , Math . max ( 0 , a . length - b ) ) } , r . rest = r . tail = r . drop = function ( a , b , c ) { return j . call ( a , null == b || c ? 1 : b ) } , r . compact = function ( a ) { return r . filter ( a , r . identity ) } ; var z = function ( a , b , c , d ) { for ( var e = [ ] , f = 0 , g = d || 0 , h = a && a . length ; g < h ; g ++ ) { var i = a [ g ] ; if ( x ( i ) && ( r . isArray ( i ) || r . isArguments ( i ) ) ) { b || ( i = z ( i , b , c ) ) ; var j = 0 , k = i . length ; for ( e . length += k ; j < k ; ) e [ f ++ ] = i [ j ++ ] } else c || ( e [ f ++ ] = i ) } return e } ; r . flatten = function ( a , b ) { return z ( a , b , ! 1 ) } , r . without = function ( a ) { return r . difference ( a , j . call ( arguments , 1 ) ) } , r . uniq = r . unique = function ( a , b , c , d ) { if ( null == a ) return [ ] ; r . isBoolean ( b ) || ( d = c , c = b , b = ! 1 ) , null != c && ( c = t ( c , d ) ) ; for ( var e = [ ] , f = [ ] , g = 0 , h = a . length ; g < h ; g ++ ) { var i = a [ g ] ,
a . attributes && this . element . attr ( a . attributes ) , a . data && this . element . data ( a . data ) , this . _children = { } } , _initElementWidth : function ( ) { var a = this . options ; BI . isWidthOrHeight ( a . width ) && this . element . css ( "width" , a . width ) } , _initElementHeight : function ( ) { var a = this . options ; BI . isWidthOrHeight ( a . height ) && this . element . css ( "height" , a . height ) } , _initVisual : function ( ) { var a = this . options ; a . invisible && this . element . css ( "display" , "none" ) } , _initEffects : function ( ) { var a = this . options ; ( a . disabled || a . invalid ) && ( this . options . disabled && this . setEnable ( ! 1 ) , this . options . invalid && this . setValid ( ! 1 ) ) } , _initState : function ( ) { this . _isMounted = ! 1 } , _initElement : function ( ) { var a = this , b = this . render && this . render ( ) ; BI . isPlainObject ( b ) && ( b = [ b ] ) , BI . isArray ( b ) && BI . each ( b , function ( b , c ) { BI . createWidget ( c , { element : a } ) } ) , this . _mount ( ) } , _setParent : function ( a ) { this . _parent = a } , _mount : function ( ) { var a = this , b = this . _isMounted ; ! b && this . isVisible ( ) && ( this . _isRoot === ! 0 ? b = ! 0 : this . _parent && this . _parent . _isMounted === ! 0 && ( b = ! 0 ) , b && ( this . beforeMount && this . beforeMount ( ) , this . _isMounted = ! 0 , this . _mountChildren && this . _mountChildren ( ) , BI . each ( this . _children , function ( b , c ) { ! a . isEnabled ( ) && c . _setEnable ( ! 1 ) , ! a . isValid ( ) && c . _setValid ( ! 1 ) , c . _mount && c . _mount ( ) } ) , this . mounted && this . mounted ( ) ) ) } , _mountChildren : null , isMounted : function ( ) { return this . _isMounted } , setWidth : function ( a ) { this . options . width = a , this . _initElementWidth ( ) } , setHeight : function ( a ) { this . options . height = a , this . _initElementHeight ( ) } , _setEnable : function ( a ) { a === ! 0 ? this . options . disabled = ! 1 : a === ! 1 && ( this . options . disabled = ! 0 ) , BI . each ( this . _children , function ( b , c ) { ! c . _manualSetEnable && c . _setEnable && c . _setEnable ( a ) } ) } , _setValid : function ( a ) { a === ! 0 ? this . options . invalid = ! 1 : a === ! 1 && ( this . options . invalid = ! 0 ) , BI . each ( this . _children , function ( b , c ) { ! c . _manualSetValid && c . _setValid && c . _setValid ( a ) } ) } , _setVisible : function ( a ) { a === ! 0 ? this . options . invisible = ! 1 : a === ! 1 && ( this . options . invisible = ! 0 ) } , setEnable : function ( a ) { this . _manualSetEnable = ! 0 , this . _setEnable ( a ) , a === ! 0 ? this . element . removeClass ( "base-disabled disabled" ) : a === ! 1 && this . element . addClass ( "base-disabled disabled" ) } , setVisible : function ( a ) { this . _setVisible ( a ) , a === ! 0 ? ( this . element . css ( "display" , "" ) , this . _mount ( ) ) : a === ! 1 && this . element . css ( "display" , "none" ) , this . fireEvent ( BI . Events . VIEW , a ) } , setValid : function ( a ) { this . _manualSetValid = ! 0 , this . _setValid ( a ) , a === ! 0 ? this . element . removeClass ( "base-invalid invalid" ) : a === ! 1 && this . element . addClass ( "base-invalid invalid" ) } , doBehavior : function ( ) { var a = arguments ; BI . each ( this . _children , function ( b , c ) { c . doBehavior && c . doBehavior . apply ( c , a ) } ) } , getWidth : function ( ) { return this . options . width } , getHeight : function ( ) { return this . options . height } , isValid : function ( ) { return ! this . options . invalid } , addWidget : function ( a , b ) { var c = this ; if ( a instanceof BI . Widget && ( b = a , a = b . getName ( ) ) , BI . isKey ( a ) && ( a += "" ) , a = a || b . getName ( ) || BI . uniqueId ( "widget" ) , this . _children [ a ] ) throw new Error ( "name has already been existed" ) ; return b . _setParent && b . _setParent ( this ) , b . on ( BI . Events . DESTROY , function ( ) { BI . remove ( c . _children , this ) } ) , this . _children [ a ] = b } , getWidgetByName : function ( a ) { if ( ! BI . isKey ( a ) || a === this . getName ( ) ) return this ; a += "" ; var b = void 0 , c = { } ; return BI . any ( this . _children , function ( d , e ) { return d === a ? ( b = e , ! 0 ) : void ( c [ d ] = e ) } ) , b || BI . any ( c , function ( a , c ) { return b = c . getWidgetByName ( a ) } ) , b } , removeWidget : function ( a ) { BI . isWidget ( a ) ? BI . remove ( this . _children , a ) : delete this . _children [ a ] } , hasWidget : function ( a ) { return null != this . _children [ a ] } , getName : function ( ) { return this . widgetName } , setTag : function ( a ) { this . options . tag = a } , getTag : function ( ) { return this . options . tag } , attr : function ( a , b ) { var c = this ; return BI . isPlainObject ( a ) ? void BI . each ( a , function ( a , b ) { c . attr ( a , b ) } ) : BI . isNotNull ( b ) ? this . options [ a ] = b : this . options [ a ] } , getText : function ( ) { } , setText : function ( a ) { } , getValue : function ( ) { } , setValue : function ( a ) { } , isEnabled : function ( ) { return ! this . options . disabled } , isVisible : function ( ) { return ! this . options . invisible } , disable : function ( ) { this . setEnable ( ! 1 ) } , enable : function ( ) { this . setEnable ( ! 0 ) } , valid : function ( ) { this . setValid ( ! 0 ) } , invalid : function ( ) { this . setValid ( ! 1 ) } , invisible : function ( ) { this . setVisible ( ! 1 ) } , visible : function ( ) { this . setVisible
19969 : "DZ" , 19975 : "WM" , 19988 : "QJ" , 20048 : "YL" , 20056 : "SC" , 20060 : "NM" , 20094 : "QG" , 20127 : "QJ" , 20167 : "QC" , 20193 : "YG" , 20250 : "KH" , 20256 : "ZC" , 20282 : "SC" , 20285 : "QJG" , 20291 : "TD" , 20314 : "YD" , 20340 : "NE" , 20375 : "TD" , 20389 : "YJ" , 20391 : "CZ" , 20415 : "PB" , 20446 : "YS" , 20447 : "SQ" , 20504 : "TC" , 20608 : "KG" , 20854 : "QJ" , 20857 : "ZC" , 20911 : "PF" , 20504 : "TC" , 20608 : "KG" , 20854 : "QJ" , 20857 : "ZC" , 20911 : "PF" , 20985 : "AW" , 21032 : "PB" , 21048 : "XQ" , 21049 : "SC" , 21089 : "YS" , 21119 : "JC" , 21242 : "SB" , 21273 : "SC" , 21305 : "YP" , 21306 : "QO" , 21330 : "ZC" , 21333 : "SDC" , 21345 : "QK" , 21378 : "CA" , 21397 : "SC" , 21414 : "XS" , 21442 : "SC" , 21477 : "JG" , 21480 : "TD" , 21484 : "ZS" , 21494 : "YX" , 21505 : "YX" , 21512 : "HG" , 21523 : "XH" , 21537 : "PB" , 21542 : "PF" , 21549 : "KH" , 21571 : "E" , 21574 : "DA" , 21588 : "TD" , 21589 : "O" , 21618 : "ZC" , 21621 : "KHA" , 21632 : "ZJ" , 21654 : "KG" , 21679 : "LKG" , 21683 : "KH" , 21710 : "A" , 21719 : "YH" , 21734 : "WOE" , 21769 : "A" , 21780 : "WN" , 21804 : "XH" , 21834 : "A" , 21899 : "ZD" , 21903 : "RN" , 21908 : "WO" , 21939 : "ZC" , 21956 : "SA" , 21964 : "YA" , 21970 : "TD" , 22003 : "A" , 22031 : "JG" , 22040 : "XS" , 22060 : "ZC" , 22066 : "ZC" , 22079 : "MH" , 22129 : "XJ" , 22179 : "XA" , 22237 : "NJ" , 22244 : "TD" , 22280 : "JQ" , 22300 : "YH" , 22313 : "XW" , 22331 : "YQ" , 22343 : "YJ" , 22351 : "PH" , 22395 : "DC" , 22412 : "TD" , 22484 : "PB" , 22500 : "PB" , 22534 : "ZD" , 22549 : "DH" , 22561 : "PB" , 22612 : "TD" , 22771 : "KQ" , 22831 : "HB" , 22841 : "JG" , 22855 : "QJ" , 22865 : "XQ" , 23013 : "ML" , 23081 : "WM" , 23487 : "SX" , 23558 : "QJ" , 23561 : "YW" , 23586 : "YW" , 23614 : "YW" , 23615 : "SN" , 23631 : "PB" , 23646 : "ZS" , 23663 : "ZT" , 23673 : "YG" , 23762 : "TD" , 23769 : "ZS" , 23780 : "QJ" , 23884 : "QK" , 24055 : "XH" , 24113 : "DC" , 24162 : "ZC" , 24191 : "GA" , 24273 : "QJ" , 24324 : "NL" , 24377 : "TD" , 24378 : "QJ" , 24439 : "PF" , 24554 : "ZS" , 24683 : "TD" , 24694 : "WE" , 24733 : "LK" , 24925 : "TN" , 25094 : "ZG" , 25100 : "XQ" , 25103 : "XH" , 25153 : "PB" , 25170 : "PB" , 25179 : "KG" , 25203 : "PB" , 25240 : "ZS" , 25282 : "FB" , 25303 : "NA" , 25324 : "KG" , 25341 : "ZY" , 25373 : "WZ" , 25375 : "XJ" , 25384 : "A" , 25457 : "A" , 25528 : "SD" , 25530 : "SC" , 25552 : "TD" , 25774 : "ZC" , 25874 : "ZC" , 26044 : "YW" , 26080 : "WM" , 26292 : "PB" , 26333 : "PB" , 26355 : "ZY" , 26366 : "CZ" , 26397 : "ZC" , 26399 : "QJ" , 26415 : "ZS" , 26451 : "SB" , 26526 : "ZC" , 26552 : "JG" , 26561 : "TD" , 26588 : "JG" , 26597 : "CZ" , 26629 : "ZS" , 26638 : "YL" , 26646 : "XQ" , 26653 : "KG" , 26657 : "XJ" , 26727 : "HG" , 26894 : "ZC" , 26937 : "ZS" , 26946 : "ZC" , 26999 : "KJ" , 27099 : "KJ" , 27449 : "YQ" , 27481 : "XS" , 27542 : "ZS" , 27663 : "ZS" , 27748 : "TS" , 27784 : "SC" , 27788 : "ZD" , 27795 : "TD" , 27812 : "O" , 27850 : "PB" , 27852 : "MB" , 27895 : "SL" , 27898 : "PL" , 27973 : "QJ" , 27981 : "KH" , 27986 : "HX" , 27994 : "XJ" , 28044 : "YC" , 28065 : "WG" , 28177 : "SM" , 28267 : "QJ" , 28291 : "KH" , 28337 : "ZQ" , 28463 : "TL" , 28548 : "DC" , 28601 : "TD" , 28689 : "PB" , 28805 : "JG" , 28820 : "QG" , 28846 : "PB" , 28952 : "TD" , 28975 : "ZC" , 29100 : "A" , 29325 : "QJ" , 29575 : "SL" , 29602 : "FB" , 30010 : "TD" , 30044 : "CX" , 30058 : "PF" , 30091 : "YSP" , 30111 : "YN" , 30229 : "XJ" , 30427 : "SC" , 30465 : "SX" , 30631 : "YQ" , 30655 : "QJ" , 30684 : "QJG" , 30707 : "SD" , 30729 : "XH" , 30796 : "LG" , 30917 : "PB" , 31074 : "NM" , 31085 : "JZ" , 31109 : "SC" , 31181 : "ZC" , 31192 : "MLB" , 31293 : "JQ" , 31400 : "YX" , 31584 : "YJ" , 31896 : "ZN" , 31909 : "ZY" , 31995 : "XJ" , 32321 : "PF" , 32327 : "ZY" , 32418 : "HG" , 32420 : "XQ" , 32421 : "HG" , 32438 : "LG" , 32473 : "GJ" , 32488 : "TD" , 32521 : "QJ" , 32527 : "PB" , 32562 : "ZSQ" , 32564 : "JZ" , 32735 : "ZD" , 32793 : "PB" , 33071 : "PF" , 33098 : "XL" , 33100 : "YA" , 33152 : "PB" , 33261 : "CX" , 33324 : "BP" , 33333 : "TD" , 33406 : "YA" , 33426 : "WM" , 33432 : "PB" , 33445 : "JG" , 33486 : "ZN" , 33493 : "TS" , 33507 : "QJ" , 33540 : "QJ" , 33544 : "ZC" , 33564 : "XQ" , 33617 : "YT" , 33632 : "QJ" , 33636 : "XH" , 33637 : "YX" , 33694 : "WG" , 33705 : "PF" , 33728 : "YW" , 33882 : "SR" , 34067 : "WM" , 34074 : "YW" , 34121 : "QJ" , 34255 : "ZC" , 34259 : "XL" , 34425 : "JH" , 34430 : "XH" , 34485 : "KH" , 34503 : "YS" , 34532 : "HG" , 34552 : "XS" , 34558 : "YE" , 34593 : "ZL" , 34660 : "YQ" , 34892 : "XH" , 34928 : "SC" , 34999 : "QJ" , 35048 : "PB" , 35059 : "SC" , 35098 : "ZC" , 35203 : "TQ" , 35265 : "JX" , 35299 : "JX" , 35782 : "SZ" , 35828 : "YS" , 35830 : "E" , 35843 : "TD" , 35895 : "YG" , 35977 : "MH" , 36158 : "JG" , 36228 : "QJ" , 36426 : "XQ" , 36466 : "DC" , 36710 : "JC" , 36711 : "ZYG" , 36767 : "PB" , 36866 : "SK" , 36951 : "YW" , 37034 : "YX" , 37063 : "XH" , 37218 : "ZC" , 37325 : "ZC" , 38063 : "PB" , 38079 : "TD" , 38085 : "QY" , 38107 : "DC" , 38116 : "TD" , 38123 : "YD" , 38224 : "HG" , 38241 : "XTC" , 38271 : "ZC" , 38415 : "YE" , 38426 : "KH" , 38461 : "YD" , 38463 : "AE" , 38466 : "PB" , 38477 : "XJ" , 38518 : "YT" , 38551 : "WK" , 38585 : "ZC" , 38704 : "XS" , 38739 : "LJ" , 38761 : "GJ" , 38808 : "SQ" , 39048 : "JG" , 39049 : "XJ" , 39052 : "HG" , 39076 : "CZ" , 39271 : "XT" , 39534 : "TD" , 39552 : "TD" , 39584 : "PB" , 39647 : "SB" , 39730 : "LG" , 39748 : "TPB" , 40109 : "ZQ" , 40479 : "ND" , 40516 : "HG" , 40536 : "HG" , 40583 : "QJ" , 40765 : "YQ" , 40
null != b && b . setRight ( c || null ) , null != c && c . setLeft ( b || null ) , this . children . splice ( a , 1 ) } , removeAllChilds : function ( ) { this . children = [ ] } , addChild : function ( a , b ) { var c = null ; c = BI . isUndefined ( b ) ? this . children . length - 1 : b - 1 , a . setParent ( this ) , c >= 0 && ( this . getChild ( c ) && this . getChild ( c ) . setRight ( a ) , a . setLeft ( this . getChild ( c ) ) ) , BI . isUndefined ( b ) ? this . children . push ( a ) : this . children . splice ( b , 0 , a ) } , equals : function ( a ) { return this === a || this . id === a . id } , clear : function ( ) { this . parent = null , this . left = null , this . right = null , this . children = [ ] } } , BI . extend ( BI . Tree , { transformToArrayFormat : function ( a , b ) { if ( ! a ) return [ ] ; var c = [ ] ; if ( BI . isArray ( a ) ) for ( var d = 0 , e = a . length ; d < e ; d ++ ) { var f = BI . clone ( a [ d ] ) ; f . pId = null == f . pId ? b : f . pId , delete f . children , c . push ( f ) , a [ d ] . children && ( c = c . concat ( BI . Tree . transformToArrayFormat ( a [ d ] . children , f . id ) ) ) } else { var g = BI . clone ( a ) ; g . pId = null == g . pId ? b : g . pId , delete g . children , c . push ( g ) , a . children && ( c = c . concat ( BI . Tree . transformToArrayFormat ( a . children , g . id ) ) ) } return c } , arrayFormat : function ( a , b ) { if ( ! a ) return [ ] ; var c = [ ] ; if ( BI . isArray ( a ) ) for ( var d = 0 , e = a . length ; d < e ; d ++ ) { var f = 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 { var g = a ; g . pId = null == g . pId ? b : g . pId , c . push ( g ) , a . children && ( c = c . concat ( BI . Tree . arrayFormat ( a . children , g . id ) ) ) } return c } , transformToTreeFormat : function ( a ) { var b , c ; if ( ! a ) return [ ] ; if ( BI . isArray ( a ) ) { var d = [ ] , e = [ ] ; for ( b = 0 , c = a . length ; b < c ; b ++ ) { if ( BI . isNull ( a [ b ] . id ) ) return a ; 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 ] ) , delete e [ a [ b ] . id ] . pId ; return d } return [ a ] } , treeFormat : function ( a ) { var b , c ; if ( ! a ) return [ ] ; if ( BI . isArray ( a ) ) { var d = [ ] , e = [ ] ; for ( b = 0 , c = a . length ; b < c ; b ++ ) { if ( BI . isNull ( a [ b ] . id ) ) return a ; 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 ] ) ; return d } return [ a ] } , traversal : function ( a , b ) { if ( ! BI . isNull ( a ) ) { var c = this ; BI . any ( a , function ( a , d ) { return b ( a , d ) === ! 1 || void c . traversal ( d . children , b ) } ) } } } ) } ( ) , BI . Vector = function ( a , b ) { this . x = a , this . y = b } , BI . Vector . prototype = { constructor : BI . Vector , cross : function ( a ) { return this . x * a . y - this . y * a . x } , length : function ( a ) { return Math . 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 ) { var b = new BI . Vector ( this . w , this . h ) , c = new BI . Vector ( a . x - this . x , a . y - this . y ) , d = new BI . 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 ) { return null != this . x && null != this . y && ( a >= this . x && a <= this . x + this . w && b >= this . y && b <= this . y + this . h ) } , getPosition : function ( ) { var a = [ ] ; return a . push ( this . x + this . w / 2 ) , a . push ( this . y + this . h / 2 ) , a } } , BI . BehaviorFactory = { createBehavior : function ( a , b ) { var c ; switch ( a ) { case "highlight" : c = BI . HighlightBehavior ; break ; case "redmark" : c = BI . RedMarkBehavior } return new c ( b ) } } , BI . Behavior = BI . inherit ( BI . OB , { _defaultConfig : function ( ) { return BI . extend ( BI . Behavior . superclass . _defaultConfig . apply ( this , arguments ) , { rule : function ( ) { return ! 0 } } ) } , _init : function ( ) { BI . Behavior . superclass . _init . apply ( this , arguments ) } , doBehavior : function ( ) { } } ) , BI . Layout = BI . inherit ( BI . Widget , { props : function ( ) { return { scrollable : null , scrollx : ! 1 , scrolly : ! 1 , items : [ ] } } , render : function ( ) { this . _init4Margin ( ) , this . _init4Scroll ( ) } , _init4Margin : function ( ) { this . options . top && this . element . css ( "top" , this . options . top ) , this . options . left && this . element . css ( "left" , this . options . left ) , this . options . bottom && this . element . css ( "bottom" , this . options . bottom ) , this . options . right && this . element . css ( "right" , this . options . right ) } , _init4Scroll : function ( ) { switch ( this . options . sc
this ) } , get : function ( a ) { return this . tooltipsManager [ a ] } , set : function ( a , b ) { this . tooltipsManager [ a ] = b } , has : function ( a ) { return null != this . tooltipsManager [ a ] } , remove : function ( a ) { return this . has ( a ) ? ( this . tooltipsManager [ a ] . destroy ( ) , delete this . tooltipsManager [ a ] , this ) : this } } ) , _ . extend ( BI , { Events : { KEYDOWN : "_KEYDOWN" , BACKSPACE : "_BACKSPACE" , SPACE : "_SPACE" , ENTER : "_ENTER" , CONFIRM : "_CONFIRM" , ERROR : "_ERROR" , PAUSE : "_PAUSE" , DESTROY : "_DESTROY" , UNMOUNT : "_UNMOUNT" , CLEAR : "_CLEAR" , ADD : "_ADD" , EDITING : "_EDITING" , EMPTY : "_EMPTY" , VIEW : "_VIEW" , RESIZE : "_RESIZE" , BEFOREEDIT : "_BEFOREEDIT" , AFTEREDIT : "_AFTEREDIT" , STARTEDIT : "_STARTEDIT" , STOPEDIT : "_STOPEDIT" , CHANGE : "_CHANGE" , EXPAND : "_EXPAND" , COLLAPSE : "_COLLAPSE" , CALLBACK : "_CALLBACK" , CLICK : "_CLICK" , STATECHANGE : "_STATECHANGE" , BEFORESTATECHANGE : "_BEFORESTATECHANGE" , INIT : "_INIT" , AFTERINIT : "_AFTERINIT" , SCROLL : "_SCROLL" , STARTLOAD : "_STARTLOAD" , AFTERLOAD : "_AFTERLOAD" , BS : "beforesubmit" , AS : "aftersubmit" , SC : "submitcomplete" , SF : "submitfailure" , SS : "submitsuccess" , BVW : "beforeverifywrite" , AVW : "afterverifywrite" , AV : "afterverify" , BW : "beforewrite" , AW : "afterwrite" , WS : "writesuccess" , WF : "writefailure" , BA : "beforeappend" , AA : "afterappend" , BD : "beforedelete" , AD : "beforedelete" , UC : "unloadcheck" , BTOPDF : "beforetopdf" , ATOPDF : "aftertopdf" , BTOEXCEL : "beforetoexcel" , ATOEXCEL : "aftertoexcel" , BTOWORD : "beforetoword" , ATOWORD : "aftertoword" , BTOIMAGE : "beforetoimage" , ATOIMAGE : "aftertoimage" , BTOHTML : "beforetohtml" , ATOHTML : "aftertohtml" , BIMEXCEL : "beforeimportexcel" , AIMEXCEL : "afterimportexcel" , BPDFPRINT : "beforepdfprint" , APDFPRINT : "afterpdfprint" , BFLASHPRINT : "beforeflashprint" , AFLASHPRINT : "afterflashprint" , BAPPLETPRINT : "beforeappletprint" , AAPPLETPRINT : "afterappletprint" , BSEVERPRINT : "beforeserverprint" , ASERVERPRINT : "afterserverprint" , BEMAIL : "beforeemail" , AEMAIL : "afteremail" } } ) , BI . extend ( jQuery . fn , { destroy : function ( ) { this . remove ( ) , BI . isIE ( ) === ! 0 && ( this [ 0 ] . outerHTML = "" ) } , _ _textKeywordMarked _ _ : function ( a , b , c ) { if ( ! BI . isKey ( b ) || ( a + "" ) . length > 100 ) return this . html ( BI . Func . formatSpecialCharInHtml ( a ) ) ; b += "" , b = BI . toUpperCase ( b ) ; var d = ( a || "" ) + "" ; for ( c = ( c || BI . makeFirstPY ( a ) ) + "" , null != c && ( c = BI . toUpperCase ( c ) ) , this . empty ( ) ; ; ) { var e = BI . toUpperCase ( d ) . indexOf ( b ) , f = null ; if ( null != c && ( f = c . indexOf ( b ) , f >= 0 && ( f %= a . length ) ) , e >= 0 ) this . append ( d . substr ( 0 , e ) ) , this . append ( $ ( "<span>" ) . addClass ( "bi-keyword-red-mark" ) . html ( BI . Func . formatSpecialCharInHtml ( d . substr ( e , b . length ) ) ) ) , d = d . substr ( e + b . length ) , null != c && ( c = c . substr ( e + b . length ) ) ; else { if ( ! ( null != f && f >= 0 && Math . floor ( f / a . length ) === Math . floor ( ( f + b . length - 1 ) / a . length ) ) ) { this . append ( d ) ; break } this . append ( d . substr ( 0 , f ) ) , this . append ( $ ( "<span>" ) . addClass ( "bi-keyword-red-mark" ) . html ( BI . Func . formatSpecialCharInHtml ( d . substr ( f , b . length ) ) ) ) , null != c && ( c = c . substr ( f + b . length ) ) , d = d . substr ( f + b . length ) } } return this } , getDomHeight : function ( a ) { var b = $ ( this ) . clone ( ) ; b . appendTo ( $ ( a || "body" ) ) ; var c = b . height ( ) ; return b . remove ( ) , c } , hasVerticalScroll : function ( ) { return this . height ( ) > 0 && this [ 0 ] . clientWidth < this [ 0 ] . offsetWidth } , hasHorizonScroll : function ( ) { return this . width ( ) > 0 && this [ 0 ] . clientHeight < this [ 0 ] . offsetHeight } , getStyle : function ( a ) { var b = this [ 0 ] , c = void 0 ; if ( window . getComputedStyle && ( c = window . getComputedStyle ( b , null ) ) ) return c . getPropertyValue ( BI . hyphenate ( a ) ) ; if ( document . defaultView && document . defaultView . getComputedStyle ) { if ( c = document . defaultView . getComputedStyle ( b , null ) ) return c . getPropertyValue ( BI . hyphenate ( a ) ) ; if ( "display" === a ) return "none" } return b . currentStyle ? "float" === a ? b . currentStyle . cssFloat || b . currentStyle . styleFloat : b . currentStyle [ BI . camelize ( a ) ] : b . style && b . style [ BI . camelize ( a ) ] } , _ _isMouseInBounds _ _ : function ( a ) { var b = this . offset ( ) ; return ! ( a . pageX < b . left || a . pageX > b . left + this . outerWidth ( ) || a . pageY < b . top || a . pageY > b . top + this . outerHeight ( ) ) } , _ _hasZIndexMask _ _ : function ( a ) { return a && null != this . zIndexMask [ a ] } , _ _buildZIndexMask _ _ : function ( a , b ) { this . zIndexMask = this . zIndexMask || { } , this . indexMask = this . indexMask || [ ] ; var c = BI . createWidget ( { type : "bi.center_adapt" , cls : "bi-z-index-mask" , items : b } ) ; return c . element . css ( { "z-index" : a } ) , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : c , left : 0 , right : 0 , top : 0 , bottom : 0 } ] } ) , this . indexMask . push ( c ) , a && ( t
a ( 1 , 1 ) , b ( 2 ) , j = c ( ) } else a ( 0 , l ) , a ( 1 << - k , 0 ) , j = c ( ) + "0.00000000000000000000" . slice ( 2 , 2 + g ) ; return g > 0 ? ( n = j . length , j = n <= g ? i + "0.0000000000000000000" . slice ( 0 , g - n + 2 ) + j : i + j . slice ( 0 , n - g ) + "." + j . slice ( n - g ) ) : j = i + j , j } } ( ) , Number . prototype . add = function ( a ) { return accAdd ( a , this ) } , Number . prototype . sub = function ( a ) { return accSub ( this , a ) } , Number . prototype . mul = function ( a ) { return accMul ( a , this ) } , Number . prototype . div = function ( a ) { return accDiv ( this , a ) } , $ . extend ( String . prototype , { startWith : function ( a ) { return ! ( null == a || "" == a || 0 === this . length || a . length > this . length ) && this . substr ( 0 , a . length ) == a } , endWith : function ( a ) { return ! ( null == a || "" == a || 0 === this . length || a . length > this . length ) && this . substring ( this . length - a . length ) == a } , getQuery : function ( a ) { var b = new RegExp ( "(^|&)" + a + "=([^&]*)(&|$)" ) , c = this . substr ( this . indexOf ( "?" ) + 1 ) . match ( b ) ; return c ? unescape ( c [ 2 ] ) : null } , appendQuery : function ( a ) { if ( ! a ) return this ; var b = this ; return b . indexOf ( "?" ) === - 1 && ( b += "?" ) , b . endWith ( "?" ) !== ! 1 || ( b += "&" ) , $ . each ( a , function ( a , c ) { "string" == typeof a && ( b += a + "=" + c + "&" ) } ) , b = b . substr ( 0 , b . length - 1 ) } , replaceAll : function ( a , b ) { return this . replace ( new RegExp ( a , "gm" ) , b ) } , perfectStart : function ( a ) { return this . startWith ( a ) ? this : a + this } , allIndexOf : function ( a ) { if ( "string" != typeof a ) return [ ] ; for ( var b = this , c = [ ] , d = 0 ; b . length > 0 ; ) { var e = b . indexOf ( a ) ; if ( e === - 1 ) break ; c . push ( d + e ) , b = b . substring ( e + a . length , b . length ) , d += e + a . length } return c } } ) , $ . extend ( String , { escape : function ( a ) { return a . replace ( /('|\\)/g , "\\$1" ) } , leftPad : function ( a , b , c ) { var d = String ( a ) ; for ( c || ( c = " " ) ; d . length < b ; ) d = c + d ; return d . toString ( ) } , format : function ( a ) { var b = Array . prototype . slice . call ( arguments , 1 ) ; return a . replace ( /\{(\d+)\}/g , function ( a , c ) { return b [ c ] } ) } } ) , BI . EventListener = { listen : function ( a , b , c ) { return a . addEventListener ? ( a . addEventListener ( b , c , ! 1 ) , { remove : function ( ) { a . removeEventListener ( b , c , ! 1 ) } } ) : a . attachEvent ? ( a . attachEvent ( "on" + b , c ) , { remove : function ( ) { a . detachEvent ( "on" + b , c ) } } ) : void 0 } , capture : function ( a , b , c ) { return a . addEventListener ? ( a . addEventListener ( b , c , ! 0 ) , { remove : function ( ) { a . removeEventListener ( b , c , ! 0 ) } } ) : { remove : BI . emptyFn } } , registerDefault : function ( ) { } } , ! function ( ) { var a = window . cancelAnimationFrame || window . webkitCancelAnimationFrame || window . mozCancelAnimationFrame || window . oCancelAnimationFrame || window . msCancelAnimationFrame || window . clearTimeout , b = window . requestAnimationFrame || window . webkitRequestAnimationFrame || window . mozRequestAnimationFrame || window . oRequestAnimationFrame || window . msRequestAnimationFrame || window . setTimeout ; BI . MouseMoveTracker = function ( a , b , c ) { this . _isDragging = ! 1 , this . _animationFrameID = null , this . _domNode = c , this . _onMove = a , this . _onMoveEnd = b , this . _onMouseMove = BI . bind ( this . _onMouseMove , this ) , this . _onMouseUp = BI . bind ( this . _onMouseUp , this ) , this . _didMouseMove = BI . bind ( this . _didMouseMove , this ) } , BI . MouseMoveTracker . prototype = { constructor : BI . MouseMoveTracker , captureMouseMoves : function ( a ) { this . _eventMoveToken || this . _eventUpToken || ( this . _eventMoveToken = BI . EventListener . listen ( this . _domNode , "mousemove" , this . _onMouseMove ) , this . _eventUpToken = BI . EventListener . listen ( this . _domNode , "mouseup" , this . _onMouseUp ) ) , this . _isDragging || ( this . _deltaX = 0 , this . _deltaY = 0 , this . _isDragging = ! 0 , this . _x = a . clientX , this . _y = a . clientY ) , a . preventDefault ? a . preventDefault ( ) : a . returnValue = ! 1 } , releaseMouseMoves : function ( ) { this . _eventMoveToken && this . _eventUpToken && ( this . _eventMoveToken . remove ( ) , this . _eventMoveToken = null , this . _eventUpToken . remove ( ) , this . _eventUpToken = null ) , null !== this . _animationFrameID && ( a ( this . _animationFrameID ) , this . _animationFrameID = null ) , this . _isDragging && ( this . _isDragging = ! 1 , this . _x = null , this . _y = null ) } , isDragging : function ( ) { return this . _isDragging } , _onMouseMove : function ( a ) { var c = a . clientX , d = a . clientY ; this . _deltaX += c - this . _x , this . _deltaY += d - this . _y , null === this . _animationFrameID && ( this . _animationFrameID = b ( this . _didMouseMove ) ) , this . _x = c , this . _y = d , a . preventDefault ? a . preventDefault ( ) : a . returnValue = ! 1 } , _didMouseMove : function ( ) { this . _animationFrameID = null , this . _onMove ( this . _deltaX , this . _deltaY ) , this . _deltaX = 0 , this . _deltaY = 0 } , _onMouseUp : function ( ) { this . _animationFrameID && this . _didMouseMove ( ) , this . _onMoveEnd ( ) } } } ( ) , ! function ( ) { function a ( a ) { var e
} ) ) , BI . isNotNull ( c . rgap ) && ( f += c . rgap , d . element . css ( { right : f } ) ) , BI . isNotNull ( c . tgap ) && ( g += c . tgap , d . element . css ( { top : g } ) ) , BI . isNotNull ( c . bgap ) && ( h += c . bgap , d . element . css ( { bottom : h } ) ) , BI . isNotNull ( b . width ) && d . element . css ( { width : b . width } ) , BI . isNotNull ( b . height ) && d . element . css ( { height : b . height } ) , d } , resize : function ( ) { this . stroke ( this . options . items ) } , populate : function ( a ) { BI . AbsoluteLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.adaptive" , BI . AdaptiveLayout ) , BI . BorderLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . BorderLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-border-layout" , items : { } } ) } , render : function ( ) { BI . BorderLayout . superclass . render . apply ( this , arguments ) , this . populate ( this . options . items ) } , resize : function ( ) { this . stroke ( this . options . items ) } , addItem : function ( a ) { throw new Error ( "cannot be added" ) } , stroke : function ( a ) { var b , c = 0 , d = 0 , e = 0 , f = 0 ; if ( "north" in a && ( b = a . north , null != b ) ) { if ( b . el ) { if ( ! this . hasWidget ( this . getName ( ) + "north" ) ) { var g = BI . createWidget ( b ) ; this . addWidget ( this . getName ( ) + "north" , g ) } this . getWidgetByName ( this . getName ( ) + "north" ) . element . height ( b . height ) . css ( { position : "absolute" , top : b . top || 0 , left : b . left || 0 , right : b . right || 0 , bottom : "initial" } ) } c = ( b . height || 0 ) + ( b . top || 0 ) + ( b . bottom || 0 ) } if ( "south" in a && ( b = a . south , null != b ) ) { if ( b . el ) { if ( ! this . hasWidget ( this . getName ( ) + "south" ) ) { var g = BI . createWidget ( b ) ; this . addWidget ( this . getName ( ) + "south" , g ) } this . getWidgetByName ( this . getName ( ) + "south" ) . element . height ( b . height ) . css ( { position : "absolute" , bottom : b . bottom || 0 , left : b . left || 0 , right : b . right || 0 , top : "initial" } ) } d = ( b . height || 0 ) + ( b . top || 0 ) + ( b . bottom || 0 ) } if ( "west" in a && ( b = a . west , null != b ) ) { if ( b . el ) { if ( ! this . hasWidget ( this . getName ( ) + "west" ) ) { var g = BI . createWidget ( b ) ; this . addWidget ( this . getName ( ) + "west" , g ) } this . getWidgetByName ( this . getName ( ) + "west" ) . element . width ( b . width ) . css ( { position : "absolute" , left : b . left || 0 , top : c , bottom : d , right : "initial" } ) } e = ( b . width || 0 ) + ( b . left || 0 ) + ( b . right || 0 ) } if ( "east" in a && ( b = a . east , null != b ) ) { if ( b . el ) { if ( ! this . hasWidget ( this . getName ( ) + "east" ) ) { var g = BI . createWidget ( b ) ; this . addWidget ( this . getName ( ) + "east" , g ) } this . getWidgetByName ( this . getName ( ) + "east" ) . element . width ( b . width ) . css ( { position : "absolute" , right : b . right || 0 , top : c , bottom : d , left : "initial" } ) } f = ( b . width || 0 ) + ( b . left || 0 ) + ( b . right || 0 ) } if ( "center" in a && ( b = a . center , null != b ) ) { if ( ! this . hasWidget ( this . getName ( ) + "center" ) ) { var g = BI . createWidget ( b ) ; this . addWidget ( this . getName ( ) + "center" , g ) } this . getWidgetByName ( this . getName ( ) + "center" ) . element . css ( { position : "absolute" , top : c , bottom : d , left : e , right : f } ) } } , populate : function ( a ) { BI . BorderLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.border" , BI . BorderLayout ) , BI . CardLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . CardLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-card-layout" , items : [ ] } ) } , render : function ( ) { BI . CardLayout . superclass . render . apply ( this , arguments ) , this . populate ( this . options . items ) } , resize : function ( ) { } , stroke : function ( a ) { var b = this , c = this . options ; this . showIndex = void 0 , BI . each ( a , function ( a , d ) { if ( d ) { if ( b . hasWidget ( d . cardName ) ) var e = b . getWidgetByName ( d . cardName ) ; else { var e = BI . createWidget ( d ) ; e . on ( BI . Events . DESTROY , function ( ) { var a = BI . findIndex ( c . items , function ( a , b ) { return b . cardName == d . cardName } ) ; a > - 1 && c . items . splice ( a , 1 ) } ) , b . addWidget ( d . cardName , e ) } e . element . css ( { position : "absolute" , top : "0" , right : "0" , bottom : "0" , left : "0" } ) , e . setVisible ( ! 1 ) } } ) } , update : function ( ) { } , empty : function ( ) { BI . CardLayout . superclass . empty . apply ( this , arguments ) , this . options . items = [ ] } , populate : function ( a ) { BI . CardLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) , this . options . defaultShowName && this . showCardByName ( this . options . defaultShowName ) } , isCardExisted : function ( a ) { return BI . some ( this . options . items , function ( b , c ) { return c . cardName == a && c . el } ) } , getCardByName : function ( a ) { if ( ! this . isCardExisted ( a ) ) throw new Error ( "cardName is not exist" ) ; return this . _children [ a ] } , _deleteCardByName : function ( a ) { delete this . _children [ a ] ; var b = BI . findIndex ( this . options . items , function ( b , c ) { return c . cardName == a } ) ; b > - 1 && this . options . items . spli
} ) , c [ a ] . el . addItem ( e ) } } ) , BI . createWidget ( { type : "bi.left" , element : this , items : c } ) } , populate : function ( a ) { BI . FloatCenterLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.float_center" , BI . FloatCenterLayout ) , BI . HorizontalCenterLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . HorizontalCenterLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-horizontal-center-layout" , hgap : 0 , vgap : 0 , lgap : 0 , rgap : 0 , tgap : 0 , bgap : 0 } ) } , render : function ( ) { BI . HorizontalCenterLayout . superclass . render . apply ( this , arguments ) , this . populate ( this . options . items ) } , resize : function ( ) { } , addItem : function ( a ) { throw new Error ( "cannot be added" ) } , stroke : function ( a ) { var b = this . options , c = [ ] ; BI . each ( a , function ( b ) { c . push ( { column : b , row : 0 , el : BI . createWidget ( { type : "bi.default" , cls : "center-element " + ( 0 === b ? "first-element " : "" ) + ( b === a . length - 1 ? "last-element" : "" ) } ) } ) } ) , BI . each ( a , function ( a , d ) { if ( d ) { var e = BI . createWidget ( d ) ; e . element . css ( { position : "absolute" , left : b . hgap + b . lgap , right : b . hgap + b . rgap , top : b . vgap + b . tgap , bottom : b . vgap + b . bgap , width : "auto" } ) , c [ a ] . el . addItem ( e ) } } ) , BI . createWidget ( { type : "bi.grid" , element : this , columns : c . length , rows : 1 , items : c } ) } , populate : function ( a ) { BI . HorizontalCenterLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.horizontal_center" , BI . HorizontalCenterLayout ) , BI . VerticalCenterLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . VerticalCenterLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-vertical-center-layout" , hgap : 0 , vgap : 0 , lgap : 0 , rgap : 0 , tgap : 0 , bgap : 0 } ) } , render : function ( ) { BI . VerticalCenterLayout . superclass . render . apply ( this , arguments ) , this . populate ( this . options . items ) } , resize : function ( ) { } , addItem : function ( a ) { throw new Error ( "cannot be added" ) } , stroke : function ( a ) { var b = this . options , c = [ ] ; BI . each ( a , function ( b ) { c . push ( { column : 0 , row : b , el : BI . createWidget ( { type : "bi.default" , cls : "center-element " + ( 0 === b ? "first-element " : "" ) + ( b === a . length - 1 ? "last-element" : "" ) } ) } ) } ) , BI . each ( a , function ( a , d ) { if ( d ) { var e = BI . createWidget ( d ) ; e . element . css ( { position : "absolute" , left : b . hgap + b . lgap , right : b . hgap + b . rgap , top : b . vgap + b . tgap , bottom : b . vgap + b . bgap , height : "auto" } ) , c [ a ] . el . addItem ( e ) } } ) , BI . createWidget ( { type : "bi.grid" , element : this , columns : 1 , rows : c . length , items : c } ) } , populate : function ( a ) { BI . VerticalCenterLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.vertical_center" , BI . VerticalCenterLayout ) , BI . Data = Data = { } , Data . Constant = BICst = { } , function ( ) { var a = { } ; Data . BufferPool = { put : function ( b , c ) { if ( BI . isNotNull ( a [ b ] ) ) throw new Error ( "Buffer Pool has the key already!" ) ; a [ b ] = c } , get : function ( b ) { return a [ b ] } } } ( ) , function ( ) { var a = { } ; Data . SharingPool = { _Shared : a , put : function ( b , c ) { a [ b ] = c } , cat : function ( ) { for ( var b = Array . prototype . slice . call ( arguments , 0 ) , c = a , d = 0 ; d < b . length ; d ++ ) c = c && c [ b [ d ] ] ; return c } , get : function ( ) { return BI . deepClone ( this . cat . apply ( this , arguments ) ) } , remove : function ( b ) { delete a [ b ] } } } ( ) , Data . Req = { } , Data . Source = BISource = { } , function ( a ) { "function" == typeof define && define . amd ? define ( [ "../core/jquery" ] , a ) : "object" == typeof exports ? module . exports = a : a ( jQuery ) } ( function ( a ) { function b ( b ) { var g = b || window . event , h = i . call ( arguments , 1 ) , j = 0 , l = 0 , m = 0 , n = 0 , o = 0 , p = 0 ; if ( b = a . event . fix ( g ) , b . type = "mousewheel" , "detail" in g && ( m = g . detail * - 1 ) , "wheelDelta" in g && ( m = g . wheelDelta ) , "wheelDeltaY" in g && ( m = g . wheelDeltaY ) , "wheelDeltaX" in g && ( l = g . wheelDeltaX * - 1 ) , "axis" in g && g . axis === g . HORIZONTAL _AXIS && ( l = m * - 1 , m = 0 ) , j = 0 === m ? l : m , "deltaY" in g && ( m = g . deltaY * - 1 , j = m ) , "deltaX" in g && ( l = g . deltaX , 0 === m && ( j = l * - 1 ) ) , 0 !== m || 0 !== l ) { if ( 1 === g . deltaMode ) { var q = 40 ; j *= q , m *= q , l *= q } else if ( 2 === g . deltaMode ) { var r = 800 ; j *= r , m *= r , l *= r } if ( n = Math . max ( Math . abs ( m ) , Math . abs ( l ) ) , ( ! f || n < f ) && ( f = n , d ( g , n ) && ( f /= 40 ) ) , d ( g , n ) && ( j /= 40 , l /= 40 , m /= 40 ) , j = Math [ j >= 1 ? "floor" : "ceil" ] ( j / f ) , l = Math [ l >= 1 ? "floor" : "ceil" ] ( l / f ) , m = Math [ m >= 1 ? "floor" : "ceil" ] ( m / f ) , k . settings . normalizeOffset && this . getBoundingClientRect ) { var s = this . getBoundingClientRect ( ) ; o = b . clientX - s . left , p = b . clientY - s . top } return b . deltaX = l , b . deltaY = m , b . deltaFactor = f , b . offsetX = o , b . offsetY = p , b . deltaMode = 0 , h . unshift ( b , j , l , m ) , e && clearTimeout ( e ) , e = setTimeout ( c , 200 ) , ( a . event . dispatch || a . e
} , _init : function ( ) { BI . AsyncTree . superclass . _init . apply ( this , arguments ) } , _configSetting : function ( ) { function a ( a , b , c ) { var d = $ . fn . zTree . getZTreeObj ( b ) ; d . checkNode ( c , ! c . checked , ! 0 , ! 0 ) } function b ( a , b ) { function c ( a ) { BI . each ( a , function ( a , b ) { b . halfCheck === ! 0 && ( b . halfCheck = ! 1 , c ( b . children ) ) } ) } if ( b . halfCheck = ! 1 , b . checked === ! 0 ) { c ( b . children ) ; var d = $ . fn . zTree . getZTreeObj ( a ) , e = d . getSelectedNodes ( ) ; BI . each ( e , function ( a , b ) { b . halfCheck = ! 1 } ) } } function c ( a , b ) { h . _beforeExpandNode ( a , b ) } function d ( a , b , c ) { h . _selectTreeNode ( b , c ) } function e ( a , b , c ) { c . halfCheck = ! 1 } function f ( a , b , c ) { c . halfCheck = ! 1 } var g = this . options . paras , h = this , i = { async : { enable : ! 1 , otherParam : BI . cjkEncodeDO ( g ) } , check : { enable : ! 0 } , data : { key : { title : "title" , name : "text" } , simpleData : { enable : ! 0 } } , view : { showIcon : ! 1 , expandSpeed : "" , nameIsHTML : ! 0 , dblClickExpand : ! 1 } , callback : { beforeCheck : b , onCheck : d , beforeExpand : c , onExpand : e , onCollapse : f , onClick : a } } ; return i } , _selectTreeNode : function ( a , b ) { var c = this , d = ( this . options , BI . deepClone ( b . parentValues || c . _getParentValues ( b ) ) ) , e = this . _getNodeValue ( b ) ; if ( b . checked === ! 0 ) ; else { var f = b , g = this . _getTree ( this . options . paras . selectedValues , d ) ; for ( BI . isNotNull ( g [ e ] ) && delete g [ e ] ; null != f && BI . isEmpty ( g ) ; ) d = d . slice ( 0 , d . length - 1 ) , f = f . getParentNode ( ) , null != f && ( g = this . _getTree ( this . options . paras . selectedValues , d ) , e = this . _getNodeValue ( f ) , delete g [ e ] ) } BI . AsyncTree . superclass . _selectTreeNode . apply ( c , arguments ) } , _beforeExpandNode : function ( a , b ) { function c ( a , c ) { d . nodes . addNodes ( b , a ) , c === ! 0 && BI . delay ( function ( ) { i ++ , g . times = i , e . itemsCreator ( g , h ) } , 100 ) } var d = this , e = this . options , f = b . parentValues || d . _getParentValues ( b ) , g = BI . extend ( { } , e . paras , { id : b . id , times : 1 , parentValues : f . concat ( this . _getNodeValue ( b ) ) , checkState : b . getCheckStatus ( ) } ) , h = function ( a ) { var b = a . items || [ ] ; b . length > 0 && c ( d . _dealWidthNodes ( b ) , ! ! a . hasNext ) } , i = 1 ; b . children || e . itemsCreator ( g , h ) } , _join : function ( a , b ) { function c ( a , b , f ) { BI . each ( b , function ( g , h ) { BI . isNull ( f [ g ] ) ? d . _addTreeNode ( e , a , g , h ) : BI . isEmpty ( f [ g ] ) ? d . _addTreeNode ( e , a , g , { } ) : c ( a . concat ( [ g ] ) , b [ g ] , f [ g ] ) } ) } var d = this , e = { } ; return c ( [ ] , a , b ) , c ( [ ] , b , a ) , e } , hasChecked : function ( ) { return ! BI . isEmpty ( this . options . paras . selectedValues ) || BI . AsyncTree . superclass . hasChecked . apply ( this , arguments ) } , getValue : function ( ) { if ( ! this . nodes ) return { } ; var a = this . _getSelectedValues ( ) ; return BI . isEmpty ( a ) ? BI . deepClone ( this . options . paras . selectedValues ) : BI . isEmpty ( this . options . paras . selectedValues ) ? a : this . _join ( a , this . options . paras . selectedValues ) } , stroke : function ( a ) { delete this . options . keyword , BI . extend ( this . options . paras , a ) ; var b = this . _configSetting ( ) ; this . _initTree ( b ) } } ) , BI . shortcut ( "bi.async_tree" , BI . AsyncTree ) , BI . PartTree = BI . inherit ( BI . AsyncTree , { _defaultConfig : function ( ) { return BI . extend ( BI . PartTree . superclass . _defaultConfig . apply ( this , arguments ) , { } ) } , _init : function ( ) { BI . PartTree . superclass . _init . apply ( this , arguments ) } , _loadMore : function ( ) { var a = this , b = this . options , c = BI . extend ( { } , b . paras , { type : BI . TreeView . REQ _TYPE _INIT _DATA , times : ++ this . times } ) ; this . tip . setLoading ( ) , b . itemsCreator ( c , function ( c ) { var d = ! ! c . hasNext , e = c . items || [ ] ; b . paras . lastSearchValue = c . lastSearchValue , a . _stop !== ! 0 && ( d ? a . tip . setLoaded ( ) : a . tip . setEnd ( ) , e . length > 0 && a . nodes . addNodes ( null , a . _dealWidthNodes ( e ) ) ) } ) } , _selectTreeNode : function ( a , b ) { var c = this , d = this . options , e = BI . deepClone ( b . parentValues || c . _getParentValues ( b ) ) , f = this . _getNodeValue ( b ) ; if ( b . checked === ! 0 ) BI . AsyncTree . superclass . _selectTreeNode . apply ( c , arguments ) ; else { for ( var g = this . options . paras . selectedValues , h = e . concat ( f ) , i = 0 , j = h . length ; i < j ; i ++ ) { if ( g = g [ h [ i ] ] , null == g ) return ; if ( BI . isEmpty ( g ) ) break } d . itemsCreator ( BI . extend ( { } , d . paras , { type : BI . TreeView . REQ _TYPE _SELECT _DATA , notSelectedValue : f , parentValues : e } ) , function ( a ) { c . options . paras . selectedValues = a , BI . AsyncTree . superclass . _selectTreeNode . apply ( c , arguments ) } ) } } , _getSelectedValues : function ( ) { function a ( d ) { BI . each ( d , function ( d , e ) { var f = e . getCheckStatus ( ) ; if ( f . checked === ! 1 ) return ! 0 ; var g = e . parentValues || b . _getParentValues ( e ) , h = g . concat ( [ b . _getNodeValue ( e ) ] ) ; return b . _buildTree ( c , h ) , BI . isNotEmptyArray ( e . children ) ? ( a ( e . children ) , ! 0 ) : void ( f . half === ! 0 && b . _getHalfSelectedValues ( c , e ) ) } ) } var b = this , c = { } , d = this . nodes . getNodes ( )
BI . VirtualGroup = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . VirtualGroup . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-virtual-group" , items : [ ] , layouts : [ { type : "bi.center" , hgap : 0 , vgap : 0 } ] } ) } , render : function ( ) { this . populate ( this . options . items ) } , _packageBtns : function ( a ) { for ( var b = this . options , c = b . layouts . length - 1 ; c > 0 ; c -- ) a = BI . map ( a , function ( a , d ) { return BI . extend ( { } , b . layouts [ c ] , { items : [ BI . extend ( { } , b . layouts [ c ] . el , { el : BI . stripEL ( d ) } ) ] } ) } ) ; return a } , _packageItems : function ( a , b ) { return BI . createItems ( BI . makeArrayByArray ( a , { } ) , BI . clone ( b ) ) } , _packageLayout : function ( a ) { for ( var b = this . options , c = BI . deepClone ( b . layouts [ 0 ] ) , d = BI . formatEL ( c ) . el ; d && d . items && ! BI . isEmpty ( d . items ) ; ) d = BI . formatEL ( d . items [ 0 ] ) . el ; return d . items = a , c } , addItems : function ( a ) { this . layouts . addItems ( a ) } , prependItems : function ( a ) { this . layouts . prependItems ( a ) } , setValue : function ( a ) { } , getValue : function ( ) { return this . layouts . getValue ( ) } , populate : function ( a ) { a = a || [ ] , this . options . items = a , a = this . _packageBtns ( a ) , this . layouts ? this . layouts . populate ( a ) : this . layouts = BI . createWidget ( BI . extend ( { element : this } , this . _packageLayout ( a ) ) ) } } ) , BI . VirtualGroup . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.virtual_group" , BI . VirtualGroup ) , BI . Loader = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . Loader . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-loader" , direction : "top" , isDefaultInit : ! 0 , logic : { dynamic : ! 0 , scrolly : ! 0 } , el : { type : "bi.button_group" } , items : [ ] , itemsCreator : BI . emptyFn , onLoaded : BI . emptyFn , count : ! 1 , prev : ! 1 , next : { } , hasPrev : BI . emptyFn , hasNext : BI . emptyFn } ) } , _prevLoad : function ( ) { var a = this , b = this . options ; this . prev . setLoading ( ) , b . itemsCreator . apply ( this , [ { times : -- this . times } , function ( ) { a . prev . setLoaded ( ) , a . prependItems . apply ( a , arguments ) } ] ) } , _nextLoad : function ( ) { var a = this , b = this . options ; this . next . setLoading ( ) , b . itemsCreator . apply ( this , [ { times : ++ this . times } , function ( ) { a . next . setLoaded ( ) , a . addItems . apply ( a , arguments ) } ] ) } , _init : function ( ) { BI . Loader . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; b . itemsCreator === ! 1 && ( b . prev = ! 1 , b . next = ! 1 ) , b . prev !== ! 1 && ( this . prev = BI . createWidget ( BI . extend ( { type : "bi.loading_bar" } , b . prev ) ) , this . prev . on ( BI . Controller . EVENT _CHANGE , function ( b ) { b === BI . Events . CLICK && a . _prevLoad ( ) } ) ) , this . button _group = BI . createWidget ( b . el , { type : "bi.button_group" , chooseType : 0 , items : b . items , behaviors : { } , layouts : [ { type : "bi.vertical" } ] } ) , this . button _group . on ( BI . Controller . EVENT _CHANGE , function ( b , c , d ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , b === BI . Events . CLICK && a . fireEvent ( BI . Loader . EVENT _CHANGE , d ) } ) , b . next !== ! 1 && ( this . next = BI . createWidget ( BI . extend ( { type : "bi.loading_bar" } , b . next ) ) , this . next . on ( BI . Controller . EVENT _CHANGE , function ( b ) { b === BI . Events . CLICK && a . _nextLoad ( ) } ) ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( BI . LogicFactory . createLogicTypeByDirection ( b . direction ) , BI . extend ( { scrolly : ! 0 } , b . logic , { items : BI . LogicFactory . createLogicItemsByDirection ( b . direction , this . prev , this . button _group , this . next ) } ) ) ) ) , b . isDefaultInit && BI . isEmpty ( b . items ) && BI . nextTick ( BI . bind ( function ( ) { b . isDefaultInit && BI . isEmpty ( b . items ) && this . populate ( ) } , this ) ) , BI . isNotEmptyArray ( b . items ) && this . populate ( b . items ) } , hasPrev : function ( ) { var a = this . options ; return BI . isNumber ( a . count ) ? this . count < a . count : ! ! a . hasPrev . apply ( this , [ { times : this . times , count : this . count } ] ) } , hasNext : function ( ) { var a = this . options ; return BI . isNumber ( a . count ) ? this . count < a . count : ! ! a . hasNext . apply ( this , [ { times : this . times , count : this . count } ] ) } , prependItems : function ( a ) { this . count += a . length , this . next !== ! 1 && ( this . hasPrev ( ) ? ( this . options . items = this . options . items . concat ( a ) , this . prev . setLoaded ( ) ) : this . prev . setEnd ( ) ) , this . button _group . prependItems . apply ( this . button _group , arguments ) } , addItems : function ( a ) { this . count += a . length , BI . isObject ( this . next ) && ( this . hasNext ( ) ? ( this . options . items = this . options . items . concat ( a ) , this . next . setLoaded ( ) ) : this . next . setEnd ( ) ) , this . button _group . addItems . apply ( this . button _group , arguments ) } , populate : function ( a ) { var b = this , c = this . options ; return 0 === arguments . length && BI . isFunction ( c . itemsCreator ) ? void c . itemsCreator . apply (
this . oldDisplayWidth = Ua ( a ) , this . force = c , this . dims = H ( a ) , this . events = [ ] } function A ( a ) { var b = a . display ; ! b . scrollbarsClipped && b . scroller . offsetWidth && ( b . nativeBarWidth = b . scroller . offsetWidth - b . scroller . clientWidth , b . heightForcer . style . height = Ta ( a ) + "px" , b . sizer . style . marginBottom = - b . nativeBarWidth + "px" , b . sizer . style . borderRightWidth = Ta ( a ) + "px" , b . scrollbarsClipped = ! 0 ) } function B ( a , b ) { var c = a . display , d = a . doc ; if ( b . editorIsHidden ) return Kb ( a ) , ! 1 ; if ( ! b . force && b . visible . from >= c . viewFrom && b . visible . to <= c . viewTo && ( null == c . updateLineNumbers || c . updateLineNumbers >= c . viewTo ) && c . renderedView == c . view && 0 == Ob ( a ) ) return ! 1 ; w ( a ) && ( Kb ( a ) , b . dims = H ( a ) ) ; var e = d . first + d . size , f = Math . max ( b . visible . from - a . options . viewportMargin , d . first ) , g = Math . min ( e , b . visible . to + a . options . viewportMargin ) ; c . viewFrom < f && f - c . viewFrom < 20 && ( f = Math . max ( d . first , c . viewFrom ) ) , c . viewTo > g && c . viewTo - g < 20 && ( g = Math . min ( e , c . viewTo ) ) , Ef && ( f = qd ( a . doc , f ) , g = rd ( a . doc , g ) ) ; var h = f != c . viewFrom || g != c . viewTo || c . lastWrapHeight != b . wrapperHeight || c . lastWrapWidth != b . wrapperWidth ; Nb ( a , f , g ) , c . viewOffset = _d ( Vd ( a . doc , c . viewFrom ) ) , a . display . mover . style . top = c . viewOffset + "px" ; var i = Ob ( a ) ; if ( ! h && 0 == i && ! b . force && c . renderedView == c . view && ( null == c . updateLineNumbers || c . updateLineNumbers >= c . viewTo ) ) return ! 1 ; var j = Pe ( ) ; return i > 4 && ( c . lineDiv . style . display = "none" ) , I ( a , c . updateLineNumbers , b . dims ) , i > 4 && ( c . lineDiv . style . display = "" ) , c . renderedView = c . view , j && Pe ( ) != j && j . offsetHeight && j . focus ( ) , Ne ( c . cursorDiv ) , Ne ( c . selectionDiv ) , c . gutters . style . height = 0 , h && ( c . lastWrapHeight = b . wrapperHeight , c . lastWrapWidth = b . wrapperWidth , Ma ( a , 400 ) ) , c . updateLineNumbers = null , ! 0 } function C ( a , b ) { for ( var c = b . viewport , d = ! 0 ; ( d && a . options . lineWrapping && b . oldDisplayWidth != Ua ( a ) || ( c && null != c . top && ( c = { top : Math . min ( a . doc . height + Ra ( a . display ) - Va ( a ) , c . top ) } ) , b . visible = u ( a . display , a . doc , c ) , ! ( b . visible . from >= a . display . viewFrom && b . visible . to <= a . display . viewTo ) ) ) && B ( a , b ) ; d = ! 1 ) { F ( a ) ; var e = o ( a ) ; Ha ( a ) , E ( a , e ) , s ( a , e ) } b . signal ( a , "update" , a ) , a . display . viewFrom == a . display . reportedViewFrom && a . display . viewTo == a . display . reportedViewTo || ( b . signal ( a , "viewportChange" , a , a . display . viewFrom , a . display . viewTo ) , a . display . reportedViewFrom = a . display . viewFrom , a . display . reportedViewTo = a . display . viewTo ) } function D ( a , b ) { var c = new z ( a , b ) ; if ( B ( a , c ) ) { F ( a ) , C ( a , c ) ; var d = o ( a ) ; Ha ( a ) , E ( a , d ) , s ( a , d ) , c . finish ( ) } } function E ( a , b ) { a . display . sizer . style . minHeight = b . docHeight + "px" ; var c = b . docHeight + a . display . barHeight ; a . display . heightForcer . style . top = c + "px" , a . display . gutters . style . height = Math . max ( c + Ta ( a ) , b . clientHeight ) + "px" } function F ( a ) { for ( var b = a . display , c = b . lineDiv . offsetTop , d = 0 ; d < b . view . length ; d ++ ) { var e , f = b . view [ d ] ; if ( ! f . hidden ) { if ( nf && of < 8 ) { var g = f . node . offsetTop + f . node . offsetHeight ; e = g - c , c = g } else { var h = f . node . getBoundingClientRect ( ) ; e = h . bottom - h . top } var i = f . line . height - e ; if ( e < 2 && ( e = rb ( b ) ) , ( i > . 001 || i < - . 001 ) && ( Yd ( f . line , e ) , G ( f . line ) , f . rest ) ) for ( var j = 0 ; j < f . rest . length ; j ++ ) G ( f . rest [ j ] ) } } } function G ( a ) { if ( a . widgets ) for ( var b = 0 ; b < a . widgets . length ; ++ b ) a . widgets [ b ] . height = a . widgets [ b ] . node . offsetHeight } function H ( a ) { for ( var b = a . display , c = { } , d = { } , e = b . gutters . clientLeft , f = b . gutters . firstChild , g = 0 ; f ; f = f . nextSibling , ++ g ) c [ a . options . gutters [ g ] ] = f . offsetLeft + f . clientLeft + e , d [ a . options . gutters [ g ] ] = f . clientWidth ; return { fixedPos : y ( b ) , gutterTotalWidth : b . gutters . offsetWidth , gutterLeft : c , gutterWidth : d , wrapperWidth : b . wrapper . clientWidth } } function I ( a , b , c ) { function d ( b ) { var c = b . nextSibling ; return pf && yf && a . display . currentWheelTarget == b ? b . style . display = "none" : b . parentNode . removeChild ( b ) , c } for ( var e = a . display , f = a . options . lineNumbers , g = e . lineDiv , h = g . firstChild , i = e . view , j = e . viewFrom , k = 0 ; k < i . length ; k ++ ) { var l = i [ k ] ; if ( l . hidden ) ; else if ( l . node && l . node . parentNode == g ) { for ( ; h != l . node ; ) h = d ( h ) ; var m = f && null != b && b <= j && l . lineNumber ; l . changes && ( De ( l . changes , "gutter" ) > - 1 && ( m = ! 1 ) , J ( a , l , j , c ) ) , m && ( Ne ( l . lineNumber ) , l . lineNumber . appendChild ( document . createTextNode ( x ( a . options , j ) ) ) ) , h = l . node . nextSibling } else { var n = R ( a , l , j , c ) ; g . insertBefore ( n , h ) } j += l . size } for ( ; h ; ) h = d ( h ) } function J ( a , b , c , d ) { for ( var e = 0 ; e < b . changes . length ; e ++ ) { var f = b . changes [ e ] ; "text" == f ? N ( a , b ) : "gutter" == f ? P ( a , b , c , d ) : "class" == f ? O ( b ) : "widget" == f && Q ( a , b , d ) } b . changes
e . viewTo += d ) : Kb ( a ) } var i = e . externalMeasured ; i && ( c < i . lineN ? i . lineN += d : b < i . lineN + i . size && ( e . externalMeasured = null ) ) } function Jb ( a , b , c ) { a . curOp . viewChanged = ! 0 ; var d = a . display , e = a . display . externalMeasured ; if ( e && b >= e . lineN && b < e . lineN + e . size && ( d . externalMeasured = null ) , ! ( b < d . viewFrom || b >= d . viewTo ) ) { var f = d . view [ Lb ( a , b ) ] ; if ( null != f . node ) { var g = f . changes || ( f . changes = [ ] ) ; De ( g , c ) == - 1 && g . push ( c ) } } } function Kb ( a ) { a . display . viewFrom = a . display . viewTo = a . doc . first , a . display . view = [ ] , a . display . viewOffset = 0 } function Lb ( a , b ) { if ( b >= a . display . viewTo ) return null ; if ( b -= a . display . viewFrom , b < 0 ) return null ; for ( var c = a . display . view , d = 0 ; d < c . length ; d ++ ) if ( b -= c [ d ] . size , b < 0 ) return d } function Mb ( a , b , c , d ) { var e , f = Lb ( a , b ) , g = a . display . view ; if ( ! Ef || c == a . doc . first + a . doc . size ) return { index : f , lineN : c } ; for ( var h = 0 , i = a . display . viewFrom ; h < f ; h ++ ) i += g [ h ] . size ; if ( i != b ) { if ( d > 0 ) { if ( f == g . length - 1 ) return null ; e = i + g [ f ] . size - b , f ++ } else e = i - b ; b += e , c += e } for ( ; qd ( a . doc , c ) != c ; ) { if ( f == ( d < 0 ? 0 : g . length - 1 ) ) return null ; c += d * g [ f - ( d < 0 ? 1 : 0 ) ] . size , f += d } return { index : f , lineN : c } } function Nb ( a , b , c ) { var d = a . display , e = d . view ; 0 == e . length || b >= d . viewTo || c <= d . viewFrom ? ( d . view = Hb ( a , b , c ) , d . viewFrom = b ) : ( d . viewFrom > b ? d . view = Hb ( a , b , d . viewFrom ) . concat ( d . view ) : d . viewFrom < b && ( d . view = d . view . slice ( Lb ( a , b ) ) ) , d . viewFrom = b , d . viewTo < c ? d . view = d . view . concat ( Hb ( a , d . viewTo , c ) ) : d . viewTo > c && ( d . view = d . view . slice ( 0 , Lb ( a , c ) ) ) ) , d . viewTo = c } function Ob ( a ) { for ( var b = a . display . view , c = 0 , d = 0 ; d < b . length ; d ++ ) { var e = b [ d ] ; e . hidden || e . node && ! e . changes || ++ c } return c } function Pb ( a ) { function b ( ) { e . activeTouch && ( f = setTimeout ( function ( ) { e . activeTouch = null } , 1e3 ) , g = e . activeTouch , g . end = + new Date ) } function c ( a ) { if ( 1 != a . touches . length ) return ! 1 ; var b = a . touches [ 0 ] ; return b . radiusX <= 1 && b . radiusY <= 1 } function d ( a , b ) { if ( null == b . left ) return ! 0 ; var c = b . left - a . left , d = b . top - a . top ; return c * c + d * d > 400 } var e = a . display ; xg ( e . scroller , "mousedown" , Db ( a , Ub ) ) , nf && of < 11 ? xg ( e . scroller , "dblclick" , Db ( a , function ( b ) { if ( ! ve ( a , b ) ) { var c = Tb ( a , b ) ; if ( c && ! Zb ( a , b ) && ! Sb ( a . display , b ) ) { ug ( b ) ; var d = a . findWordAt ( c ) ; va ( a . doc , d . anchor , d . head ) } } } ) ) : xg ( e . scroller , "dblclick" , function ( b ) { ve ( a , b ) || ug ( b ) } ) , Cf || xg ( e . scroller , "contextmenu" , function ( b ) { pc ( a , b ) } ) ; var f , g = { end : 0 } ; xg ( e . scroller , "touchstart" , function ( a ) { if ( ! c ( a ) ) { clearTimeout ( f ) ; var b = + new Date ; e . activeTouch = { start : b , moved : ! 1 , prev : b - g . end <= 300 ? g : null } , 1 == a . touches . length && ( e . activeTouch . left = a . touches [ 0 ] . pageX , e . activeTouch . top = a . touches [ 0 ] . pageY ) } } ) , xg ( e . scroller , "touchmove" , function ( ) { e . activeTouch && ( e . activeTouch . moved = ! 0 ) } ) , xg ( e . scroller , "touchend" , function ( c ) { var f = e . activeTouch ; if ( f && ! Sb ( e , c ) && null != f . left && ! f . moved && new Date - f . start < 300 ) { var g , h = a . coordsChar ( e . activeTouch , "page" ) ; g = ! f . prev || d ( f , f . prev ) ? new ma ( h , h ) : ! f . prev . prev || d ( f , f . prev . prev ) ? a . findWordAt ( h ) : new ma ( Ff ( h . line , 0 ) , qa ( a . doc , Ff ( h . line + 1 , 0 ) ) ) , a . setSelection ( g . anchor , g . head ) , a . focus ( ) , ug ( c ) } b ( ) } ) , xg ( e . scroller , "touchcancel" , b ) , xg ( e . scroller , "scroll" , function ( ) { e . scroller . clientHeight && ( ac ( a , e . scroller . scrollTop ) , bc ( a , e . scroller . scrollLeft , ! 0 ) , zg ( a , "scroll" , a ) ) } ) , xg ( e . scroller , "mousewheel" , function ( b ) { cc ( a , b ) } ) , xg ( e . scroller , "DOMMouseScroll" , function ( b ) { cc ( a , b ) } ) , xg ( e . wrapper , "scroll" , function ( ) { e . wrapper . scrollTop = e . wrapper . scrollLeft = 0 } ) , e . dragFunctions = { simple : function ( b ) { ve ( a , b ) || wg ( b ) } , start : function ( b ) { _b ( a , b ) } , drop : Db ( a , $b ) } ; var h = e . input . getField ( ) ; xg ( h , "keyup" , function ( b ) { kc . call ( a , b ) } ) , xg ( h , "keydown" , Db ( a , ic ) ) , xg ( h , "keypress" , Db ( a , lc ) ) , xg ( h , "focus" , Ie ( nc , a ) ) , xg ( h , "blur" , Ie ( oc , a ) ) } function Qb ( b , c , d ) { var e = d && d != a . Init ; if ( ! c != ! e ) { var f = b . display . dragFunctions , g = c ? xg : yg ; g ( b . display . scroller , "dragstart" , f . start ) , g ( b . display . scroller , "dragenter" , f . simple ) , g ( b . display . scroller , "dragover" , f . simple ) , g ( b . display . scroller , "drop" , f . drop ) } } function Rb ( a ) { var b = a . display ; b . lastWrapHeight == b . wrapper . clientHeight && b . lastWrapWidth == b . wrapper . clientWidth || ( b . cachedCharWidth = b . cachedTextHeight = b . cachedPaddingH = null , b . scrollbarsClipped = ! 1 , a . setSize ( ) ) } function Sb ( a , b ) { for ( var c = re ( b ) ; c != a . wrapper ; c = c . parentNode ) if ( ! c || 1 == c . nodeType && "true" == c . getAttribute ( "cm-ignore-events" ) || c . parentNode == a . sizer && c != a . mover ) return ! 0 } function Tb ( a , b , c , d ) { var e = a . display ; if ( ! c && "true"
} } function Bd ( b , c , d , e ) { for ( var f = 0 ; f < 10 ; f ++ ) { e && ( e [ 0 ] = a . innerMode ( b , d ) . mode ) ; var g = b . token ( c , d ) ; if ( c . pos > c . start ) return g } throw new Error ( "Mode " + b . name + " failed to advance stream." ) } function Cd ( a , b , c , d ) { function e ( a ) { return { start : l . start , end : l . pos , string : l . current ( ) , type : f || null , state : a ? bg ( g . mode , k ) : k } } var f , g = a . doc , h = g . mode ; b = qa ( g , b ) ; var i , j = Vd ( g , b . line ) , k = Pa ( a , b . line , c ) , l = new ig ( j . text , a . options . tabSize ) ; for ( d && ( i = [ ] ) ; ( d || l . pos < b . ch ) && ! l . eol ( ) ; ) l . start = l . pos , f = Bd ( h , l , k ) , d && i . push ( e ( ! 0 ) ) ; return d ? i : e ( ) } function Dd ( a , b , c , d , e , f , g ) { var h = c . flattenSpans ; null == h && ( h = a . options . flattenSpans ) ; var i , j = 0 , k = null , l = new ig ( b , a . options . tabSize ) , m = a . options . addModeClass && [ null ] ; for ( "" == b && zd ( Ad ( c , d ) , f ) ; ! l . eol ( ) ; ) { if ( l . pos > a . options . maxHighlightLength ? ( h = ! 1 , g && Gd ( a , b , d , l . pos ) , l . pos = b . length , i = null ) : i = zd ( Bd ( c , l , d , m ) , f ) , m ) { var n = m [ 0 ] . name ; n && ( i = "m-" + ( i ? n + " " + i : n ) ) } if ( ! h || k != i ) { for ( ; j < l . start ; ) j = Math . min ( l . start , j + 5e4 ) , e ( j , k ) ; k = i } l . start = l . pos } for ( ; j < l . pos ; ) { var o = Math . min ( l . pos , j + 5e4 ) ; e ( o , k ) , j = o } } function Ed ( a , b , c , d ) { var e = [ a . state . modeGen ] , f = { } ; Dd ( a , b . text , a . doc . mode , c , function ( a , b ) { e . push ( a , b ) } , f , d ) ; for ( var g = 0 ; g < a . state . overlays . length ; ++ g ) { var h = a . state . overlays [ g ] , i = 1 , j = 0 ; Dd ( a , b . text , h . mode , ! 0 , function ( a , b ) { for ( var c = i ; j < a ; ) { var d = e [ i ] ; d > a && e . splice ( i , 1 , a , e [ i + 1 ] , d ) , i += 2 , j = Math . min ( a , d ) } if ( b ) if ( h . opaque ) e . splice ( c , i - c , a , "cm-overlay " + b ) , i = c + 2 ; else for ( ; c < i ; c += 2 ) { var f = e [ c + 1 ] ; e [ c + 1 ] = ( f ? f + " " : "" ) + "cm-overlay " + b } } , f ) } return { styles : e , classes : f . bgClass || f . textClass ? f : null } } function Fd ( a , b , c ) { if ( ! b . styles || b . styles [ 0 ] != a . state . modeGen ) { var d = Ed ( a , b , b . stateAfter = Pa ( a , Zd ( b ) ) ) ; b . styles = d . styles , d . classes ? b . styleClasses = d . classes : b . styleClasses && ( b . styleClasses = null ) , c === a . doc . frontier && a . doc . frontier ++ } return b . styles } function Gd ( a , b , c , d ) { var e = a . doc . mode , f = new ig ( b , a . options . tabSize ) ; for ( f . start = f . pos = d || 0 , "" == b && Ad ( e , c ) ; ! f . eol ( ) && f . pos <= a . options . maxHighlightLength ; ) Bd ( e , f , c ) , f . start = f . pos } function Hd ( a , b ) { if ( ! a || /^\s*$/ . test ( a ) ) return null ; var c = b . addModeClass ? pg : og ; return c [ a ] || ( c [ a ] = a . replace ( /\S+/g , "cm-$&" ) ) } function Id ( a , b ) { var c = Me ( "span" , null , null , pf ? "padding-right: .1px" : null ) , d = { pre : Me ( "pre" , [ c ] , "CodeMirror-line" ) , content : c , col : 0 , pos : 0 , cm : a , splitSpaces : ( nf || pf ) && a . getOption ( "lineWrapping" ) } ; b . measure = { } ; for ( var e = 0 ; e <= ( b . rest ? b . rest . length : 0 ) ; e ++ ) { var f , g = e ? b . rest [ e - 1 ] : b . line ; d . pos = 0 , d . addToken = Kd , We ( a . display . measure ) && ( f = ae ( g ) ) && ( d . addToken = Md ( d . addToken , f ) ) , d . map = [ ] ; var h = b != a . display . externalMeasured && Zd ( g ) ; Od ( g , d , Fd ( a , g , h ) ) , g . styleClasses && ( g . styleClasses . bgClass && ( d . bgClass = Re ( g . styleClasses . bgClass , d . bgClass || "" ) ) , g . styleClasses . textClass && ( d . textClass = Re ( g . styleClasses . textClass , d . textClass || "" ) ) ) , 0 == d . map . length && d . map . push ( 0 , 0 , d . content . appendChild ( Ve ( a . display . measure ) ) ) , 0 == e ? ( b . measure . map = d . map , b . measure . cache = { } ) : ( ( b . measure . maps || ( b . measure . maps = [ ] ) ) . push ( d . map ) , ( b . measure . caches || ( b . measure . caches = [ ] ) ) . push ( { } ) ) } return pf && /\bcm-tab\b/ . test ( d . content . lastChild . className ) && ( d . content . className = "cm-tab-wrap-hack" ) , zg ( a , "renderLine" , a , b . line , d . pre ) , d . pre . className && ( d . textClass = Re ( d . pre . className , d . textClass || "" ) ) , d } function Jd ( a ) { var b = Me ( "span" , "•" , "cm-invalidchar" ) ; return b . title = "\\u" + a . charCodeAt ( 0 ) . toString ( 16 ) , b . setAttribute ( "aria-label" , b . title ) , b } function Kd ( a , b , c , d , e , f , g ) { if ( b ) { var h = a . splitSpaces ? b . replace ( / {3,}/g , Ld ) : b , i = a . cm . state . specialChars , j = ! 1 ; if ( i . test ( b ) ) for ( var k = document . createDocumentFragment ( ) , l = 0 ; ; ) { i . lastIndex = l ; var m = i . exec ( b ) , n = m ? m . index - l : b . length - l ; if ( n ) { var o = document . createTextNode ( h . slice ( l , l + n ) ) ; nf && of < 9 ? k . appendChild ( Me ( "span" , [ o ] ) ) : k . appendChild ( o ) , a . map . push ( a . pos , a . pos + n , o ) , a . col += n , a . pos += n } if ( ! m ) break ; if ( l += n + 1 , "\t" == m [ 0 ] ) { var p = a . cm . options . tabSize , q = p - a . col % p , o = k . appendChild ( Me ( "span" , Be ( q ) , "cm-tab" ) ) ; o . setAttribute ( "role" , "presentation" ) , o . setAttribute ( "cm-text" , "\t" ) , a . col += q } else { var o = a . cm . options . specialCharPlaceholder ( m [ 0 ] ) ; o . setAttribute ( "cm-text" , m [ 0 ] ) , nf && of < 9 ? k . appendChild ( Me ( "span" , [ o ] ) ) : k . appendChild ( o ) , a . col += 1 } a . map . push ( a . pos , a . pos + 1 , o ) , a . pos ++ } else { a . col += b . length ; var k = document . createTextNode ( h ) ; a . map . push ( a . pos , a . pos + b . length , k ) , nf && of < 9 && ( j = ! 0 ) , a . pos += b
if ( 0 != Gf ( c . anchor , d . anchor ) || 0 != Gf ( c . head , d . head ) ) return ! 1 } return ! 0 } , deepCopy : function ( ) { for ( var a = [ ] , b = 0 ; b < this . ranges . length ; b ++ ) a [ b ] = new ma ( V ( this . ranges [ b ] . anchor ) , V ( this . ranges [ b ] . head ) ) ; return new la ( a , this . primIndex ) } , somethingSelected : function ( ) { for ( var a = 0 ; a < this . ranges . length ; a ++ ) if ( ! this . ranges [ a ] . empty ( ) ) return ! 0 ; return ! 1 } , contains : function ( a , b ) { b || ( b = a ) ; for ( var c = 0 ; c < this . ranges . length ; c ++ ) { var d = this . ranges [ c ] ; if ( Gf ( b , d . from ( ) ) >= 0 && Gf ( a , d . to ( ) ) <= 0 ) return c } return - 1 } } , ma . prototype = { from : function ( ) { return X ( this . anchor , this . head ) } , to : function ( ) { return W ( this . anchor , this . head ) } , empty : function ( ) { return this . head . line == this . anchor . line && this . head . ch == this . anchor . ch } } ; var If , Jf , Kf , Lf = { left : 0 , right : 0 , top : 0 , bottom : 0 } , Mf = null , Nf = 0 , Of = 0 , Pf = 0 , Qf = null ; nf ? Qf = - . 53 : kf ? Qf = 15 : rf ? Qf = - . 7 : tf && ( Qf = - 1 / 3 ) ; var Rf = function ( a ) { var b = a . wheelDeltaX , c = a . wheelDeltaY ; return null == b && a . detail && a . axis == a . HORIZONTAL _AXIS && ( b = a . detail ) , null == c && a . detail && a . axis == a . VERTICAL _AXIS ? c = a . detail : null == c && ( c = a . wheelDelta ) , { x : b , y : c } } ; a . wheelEventPixels = function ( a ) { var b = Rf ( a ) ; return b . x *= Qf , b . y *= Qf , b } ; var Sf = new ze , Tf = null , Uf = a . changeEnd = function ( a ) { return a . text ? Ff ( a . from . line + a . text . length - 1 , Ce ( a . text ) . length + ( 1 == a . text . length ? a . from . ch : 0 ) ) : a . to } ; a . prototype = { constructor : a , focus : function ( ) { window . focus ( ) , this . display . input . focus ( ) } , setOption : function ( a , b ) { var c = this . options , d = c [ a ] ; c [ a ] == b && "mode" != a || ( c [ a ] = b , Wf . hasOwnProperty ( a ) && Db ( this , Wf [ a ] ) ( this , b , d ) ) } , getOption : function ( a ) { return this . options [ a ] } , getDoc : function ( ) { return this . doc } , addKeyMap : function ( a , b ) { this . state . keyMaps [ b ? "push" : "unshift" ] ( Rc ( a ) ) } , removeKeyMap : function ( a ) { for ( var b = this . state . keyMaps , c = 0 ; c < b . length ; ++ c ) if ( b [ c ] == a || b [ c ] . name == a ) return b . splice ( c , 1 ) , ! 0 } , addOverlay : Eb ( function ( b , c ) { var d = b . token ? b : a . getMode ( this . options , b ) ; if ( d . startState ) throw new Error ( "Overlays may not be stateful." ) ; this . state . overlays . push ( { mode : d , modeSpec : b , opaque : c && c . opaque } ) , this . state . modeGen ++ , Ib ( this ) } ) , removeOverlay : Eb ( function ( a ) { for ( var b = this . state . overlays , c = 0 ; c < b . length ; ++ c ) { var d = b [ c ] . modeSpec ; if ( d == a || "string" == typeof a && d . name == a ) return b . splice ( c , 1 ) , this . state . modeGen ++ , void Ib ( this ) } } ) , indentLine : Eb ( function ( a , b , c ) { "string" != typeof b && "number" != typeof b && ( b = null == b ? this . options . smartIndent ? "smart" : "prev" : b ? "add" : "subtract" ) , sa ( this . doc , a ) && Kc ( this , a , b , c ) } ) , indentSelection : Eb ( function ( a ) { for ( var b = this . doc . sel . ranges , c = - 1 , d = 0 ; d < b . length ; d ++ ) { var e = b [ d ] ; if ( e . empty ( ) ) e . head . line > c && ( Kc ( this , e . head . line , a , ! 0 ) , c = e . head . line , d == this . doc . sel . primIndex && Ic ( this ) ) ; else { var f = e . from ( ) , g = e . to ( ) , h = Math . max ( c , f . line ) ; c = Math . min ( this . lastLine ( ) , g . line - ( g . ch ? 0 : 1 ) ) + 1 ; for ( var i = h ; i < c ; ++ i ) Kc ( this , i , a ) ; var j = this . doc . sel . ranges ; 0 == f . ch && b . length == j . length && j [ d ] . from ( ) . ch > 0 && xa ( this . doc , d , new ma ( f , j [ d ] . to ( ) ) , Dg ) } } } ) , getTokenAt : function ( a , b ) { return Cd ( this , a , b ) } , getLineTokens : function ( a , b ) { return Cd ( this , Ff ( a ) , b , ! 0 ) } , getTokenTypeAt : function ( a ) { a = qa ( this . doc , a ) ; var b , c = Fd ( this , Vd ( this . doc , a . line ) ) , d = 0 , e = ( c . length - 1 ) / 2 , f = a . ch ; if ( 0 == f ) b = c [ 2 ] ; else for ( ; ; ) { var g = d + e >> 1 ; if ( ( g ? c [ 2 * g - 1 ] : 0 ) >= f ) e = g ; else { if ( ! ( c [ 2 * g + 1 ] < f ) ) { b = c [ 2 * g + 2 ] ; break } d = g + 1 } } var h = b ? b . indexOf ( "cm-overlay " ) : - 1 ; return h < 0 ? b : 0 == h ? null : b . slice ( 0 , h - 1 ) } , getModeAt : function ( b ) { var c = this . doc . mode ; return c . innerMode ? a . innerMode ( c , this . getTokenAt ( b ) . state ) . mode : c } , getHelper : function ( a , b ) { return this . getHelpers ( a , b ) [ 0 ] } , getHelpers : function ( a , b ) { var c = [ ] ; if ( ! ag . hasOwnProperty ( b ) ) return c ; var d = ag [ b ] , e = this . getModeAt ( a ) ; if ( "string" == typeof e [ b ] ) d [ e [ b ] ] && c . push ( d [ e [ b ] ] ) ; else if ( e [ b ] ) for ( var f = 0 ; f < e [ b ] . length ; f ++ ) { var g = d [ e [ b ] [ f ] ] ; g && c . push ( g ) } else e . helperType && d [ e . helperType ] ? c . push ( d [ e . helperType ] ) : d [ e . name ] && c . push ( d [ e . name ] ) ; for ( var f = 0 ; f < d . _global . length ; f ++ ) { var h = d . _global [ f ] ; h . pred ( e , this ) && De ( c , h . val ) == - 1 && c . push ( h . val ) } return c } , getStateAfter : function ( a , b ) { var c = this . doc ; return a = pa ( c , null == a ? c . first + c . size - 1 : a ) , Pa ( this , a + 1 , b ) } , cursorCoords : function ( a , b ) { var c , d = this . doc . sel . primary ( ) ; return c = null == a ? d . head : "object" == typeof a ? qa ( this . doc , a ) : a ? d . from ( ) : d . to ( ) , mb ( this , c , b || "page" ) } , charCoords : function ( a , b ) { return lb ( this , qa ( this . doc , a ) , b || "page" ) } , coo
} , setCursor : Fb ( function ( a , b , c ) { ya ( this , qa ( this , "number" == typeof a ? Ff ( a , b || 0 ) : a ) , null , c ) } ) , setSelection : Fb ( function ( a , b , c ) { ya ( this , qa ( this , a ) , qa ( this , b || a ) , c ) } ) , extendSelection : Fb ( function ( a , b , c ) { va ( this , qa ( this , a ) , b && qa ( this , b ) , c ) } ) , extendSelections : Fb ( function ( a , b ) { wa ( this , ta ( this , a , b ) ) } ) , extendSelectionsBy : Fb ( function ( a , b ) { wa ( this , Ee ( this . sel . ranges , a ) , b ) } ) , setSelections : Fb ( function ( a , b , c ) { if ( a . length ) { for ( var d = 0 , e = [ ] ; d < a . length ; d ++ ) e [ d ] = new ma ( qa ( this , a [ d ] . anchor ) , qa ( this , a [ d ] . head ) ) ; null == b && ( b = Math . min ( a . length - 1 , this . sel . primIndex ) ) , Ba ( this , na ( e , b ) , c ) } } ) , addSelection : Fb ( function ( a , b , c ) { var d = this . sel . ranges . slice ( 0 ) ; d . push ( new ma ( qa ( this , a ) , qa ( this , b || a ) ) ) , Ba ( this , na ( d , d . length - 1 ) , c ) } ) , getSelection : function ( a ) { for ( var b , c = this . sel . ranges , d = 0 ; d < c . length ; d ++ ) { var e = Wd ( this , c [ d ] . from ( ) , c [ d ] . to ( ) ) ; b = b ? b . concat ( e ) : e } return a === ! 1 ? b : b . join ( a || "\n" ) } , getSelections : function ( a ) { for ( var b = [ ] , c = this . sel . ranges , d = 0 ; d < c . length ; d ++ ) { var e = Wd ( this , c [ d ] . from ( ) , c [ d ] . to ( ) ) ; a !== ! 1 && ( e = e . join ( a || "\n" ) ) , b [ d ] = e } return b } , replaceSelection : function ( a , b , c ) { for ( var d = [ ] , e = 0 ; e < this . sel . ranges . length ; e ++ ) d [ e ] = a ; this . replaceSelections ( d , b , c || "+input" ) } , replaceSelections : Fb ( function ( a , b , c ) { for ( var d = [ ] , e = this . sel , f = 0 ; f < e . ranges . length ; f ++ ) { var g = e . ranges [ f ] ; d [ f ] = { from : g . from ( ) , to : g . to ( ) , text : Ug ( a [ f ] ) , origin : c } } for ( var h = b && "end" != b && uc ( this , d , b ) , f = d . length - 1 ; f >= 0 ; f -- ) wc ( this , d [ f ] ) ; h ? Aa ( this , h ) : this . cm && Ic ( this . cm ) } ) , undo : Fb ( function ( ) { yc ( this , "undo" ) } ) , redo : Fb ( function ( ) { yc ( this , "redo" ) } ) , undoSelection : Fb ( function ( ) { yc ( this , "undo" , ! 0 ) } ) , redoSelection : Fb ( function ( ) { yc ( this , "redo" , ! 0 ) } ) , setExtending : function ( a ) { this . extend = a } , getExtending : function ( ) { return this . extend } , historySize : function ( ) { for ( var a = this . history , b = 0 , c = 0 , d = 0 ; d < a . done . length ; d ++ ) a . done [ d ] . ranges || ++ b ; for ( var d = 0 ; d < a . undone . length ; d ++ ) a . undone [ d ] . ranges || ++ c ; return { undo : b , redo : c } } , clearHistory : function ( ) { this . history = new be ( this . history . maxGeneration ) } , markClean : function ( ) { this . cleanGeneration = this . changeGeneration ( ! 0 ) } , changeGeneration : function ( a ) { return a && ( this . history . lastOp = this . history . lastSelOp = this . history . lastOrigin = null ) , this . history . generation } , isClean : function ( a ) { return this . history . generation == ( a || this . cleanGeneration ) } , getHistory : function ( ) { return { done : me ( this . history . done ) , undone : me ( this . history . undone ) } } , setHistory : function ( a ) { var b = this . history = new be ( this . history . maxGeneration ) ; b . done = me ( a . done . slice ( 0 ) , null , ! 0 ) , b . undone = me ( a . undone . slice ( 0 ) , null , ! 0 ) } , addLineClass : Fb ( function ( a , b , c ) { return Lc ( this , a , "gutter" == b ? "gutter" : "class" , function ( a ) { var d = "text" == b ? "textClass" : "background" == b ? "bgClass" : "gutter" == b ? "gutterClass" : "wrapClass" ; if ( a [ d ] ) { if ( Qe ( c ) . test ( a [ d ] ) ) return ! 1 ; a [ d ] += " " + c } else a [ d ] = c ; return ! 0 } ) } ) , removeLineClass : Fb ( function ( a , b , c ) { return Lc ( this , a , "gutter" == b ? "gutter" : "class" , function ( a ) { var d = "text" == b ? "textClass" : "background" == b ? "bgClass" : "gutter" == b ? "gutterClass" : "wrapClass" , e = a [ d ] ; if ( ! e ) return ! 1 ; if ( null == c ) a [ d ] = null ; else { var f = e . match ( Qe ( c ) ) ; if ( ! f ) return ! 1 ; var g = f . index + f [ 0 ] . length ; a [ d ] = e . slice ( 0 , f . index ) + ( f . index && g != e . length ? " " : "" ) + e . slice ( g ) || null } return ! 0 } ) } ) , addLineWidget : Fb ( function ( a , b , c ) { return wd ( this , a , b , c ) } ) , removeLineWidget : function ( a ) { a . clear ( ) } , markText : function ( a , b , c ) { return Sc ( this , qa ( this , a ) , qa ( this , b ) , c , "range" ) } , setBookmark : function ( a , b ) { var c = { replacedWith : b && ( null == b . nodeType ? b . widget : b ) , insertLeft : b && b . insertLeft , clearWhenEmpty : ! 1 , shared : b && b . shared , handleMouseEvents : b && b . handleMouseEvents } ; return a = qa ( this , a ) , Sc ( this , a , a , c , "bookmark" ) } , findMarksAt : function ( a ) { a = qa ( this , a ) ; var b = [ ] , c = Vd ( this , a . line ) . markedSpans ; if ( c ) for ( var d = 0 ; d < c . length ; ++ d ) { var e = c [ d ] ; ( null == e . from || e . from <= a . ch ) && ( null == e . to || e . to >= a . ch ) && b . push ( e . marker . parent || e . marker ) } return b } , findMarks : function ( a , b , c ) { a = qa ( this , a ) , b = qa ( this , b ) ; var d = [ ] , e = a . line ; return this . iter ( a . line , b . line + 1 , function ( f ) { var g = f . markedSpans ; if ( g ) for ( var h = 0 ; h < g . length ; h ++ ) { var i = g [ h ] ; e == a . line && a . ch > i . to || null == i . from && e != a . line || e == b . line && i . from > b . ch || c && ! c ( i . marker ) || d . push ( i . marker . parent || i . marker ) } ++ e } ) , d } , getAllMarks : function ( ) { var a = [ ] ; return this . iter ( function ( b ) { var c = b . mar
b . editor . focus ( ) , a . stopEvent ( ) } ) , this . watermark . element . css ( { position : "absolute" , left : 3 , right : 3 , top : 6 , bottom : 0 } ) } } , _checkWaterMark : function ( ) { var a = this . options ; ! this . disabledWaterMark && BI . isEmptyString ( this . editor . getValue ( ) ) && BI . isKey ( a . watermark ) ? this . watermark && this . watermark . visible ( ) : this . watermark && this . watermark . invisible ( ) } , disableWaterMark : function ( ) { this . disabledWaterMark = ! 0 , this . _checkWaterMark ( ) } , focus : function ( ) { this . editor . focus ( ) } , insertField : function ( a ) { var b = this . editor . getCursor ( ) ; this . editor . replaceSelection ( " " + a + " " ) ; var c = this . editor . getCursor ( ) ; this . editor . markText ( b , c , { className : "fieldName" , atomic : ! 0 , startStyle : "start" , endStyle : "end" } ) , this . editor . replaceSelection ( " " ) , this . editor . focus ( ) } , insertFunction : function ( a ) { var b = this . editor . getCursor ( ) ; this . editor . replaceSelection ( a ) ; var c = this . editor . getCursor ( ) ; this . editor . markText ( b , c , { className : "#function" , atomic : ! 0 } ) , this . editor . replaceSelection ( "() " ) , c = this . editor . getCursor ( ) , c . ch = c . ch - 2 , this . editor . setCursor ( c ) , this . editor . focus ( ) } , insertOperator : function ( a ) { var b = this . editor . getCursor ( ) ; this . editor . replaceSelection ( a ) ; var c = this . editor . getCursor ( ) ; this . editor . markText ( b , c , { className : "%operator" , atomic : ! 0 } ) , this . editor . replaceSelection ( " " ) , this . editor . focus ( ) } , setFunction : function ( a ) { var b = this . editor . getCursor ( ) ; this . editor . replaceSelection ( a ) ; var c = this . editor . getCursor ( ) ; this . editor . markText ( b , c , { className : "#function" , atomic : ! 0 } ) } , insertString : function ( a ) { this . editor . replaceSelection ( a ) , this . editor . focus ( ) } , getFormulaString : function ( ) { return this . editor . getValue ( ) } , getUsedFields : function ( ) { var a = this . options . fieldTextValueMap , b = [ ] ; return this . editor . getValue ( ! 0 , function ( c ) { var d = c . text ; _ . forEach ( c . markedSpans , function ( c , e ) { switch ( c . marker . className ) { case "fieldName" : var f = a [ d . substr ( c . from + 1 , c . to - c . from - 2 ) ] ; b . contains ( f ) || b . push ( f ) } } ) } ) , b } , getCheckString : function ( ) { return this . editor . getValue ( ! 0 , function ( a ) { var b = a . text , c = a . text , d = 0 ; return c . text = b , _ . forEach ( a . markedSpans , function ( a , b ) { switch ( a . marker . className ) { case "fieldName" : var e = a . to - a . from ; c = c . substr ( 0 , a . from + d ) + "$a" + c . substr ( a . to + d , c . length ) , d = d + 2 - e } } ) , c } ) } , getValue : function ( ) { var a = this . options . fieldTextValueMap ; return this . editor . getValue ( "\n" , function ( b ) { var c = b . text , d = b . text , e = 0 ; return d . text = c , _ . forEach ( b . markedSpans , function ( b , c ) { switch ( b . marker . className ) { case "fieldName" : var f = b . to - b . from , g = b . from + e + 1 , h = f - 2 , i = a [ d . substr ( g , h ) ] ; d = d . substr ( 0 , b . from + e ) + "${" + i + "}" + d . substr ( b . to + e , d . length ) , e += i . length - f + 3 } } ) , d } ) } , setValue : function ( a ) { this . editor . setValue ( a ) } , setFieldTextValueMap : function ( a ) { this . options . fieldTextValueMap = a } , refresh : function ( ) { var a = this ; BI . nextTick ( function ( ) { a . editor . refresh ( ) } ) } } ) , BI . FormulaEditor . EVENT _CHANGE = "EVENT_CHANGE" , BI . FormulaEditor . EVENT _BLUR = "EVENT_BLUR" , BI . FormulaEditor . EVENT _FOCUS = "EVENT_FOCUS" , BI . shortcut ( "bi.formula_editor" , BI . FormulaEditor ) , $ . extend ( BI , { Msg : function ( ) { var a , b , c ; return { alert : function ( a , b , c ) { this . _show ( ! 1 , a , b , c ) } , confirm : function ( a , b , c ) { this . _show ( ! 0 , a , b , c ) } , prompt : function ( a , b , c , d , e ) { } , toast : function ( a , b , c ) { c = c || $ ( "body" ) ; var d = BI . createWidget ( { type : "bi.toast" , level : b , text : a } ) ; BI . createWidget ( { type : "bi.absolute" , element : c , items : [ { el : d , left : "50%" , top : 0 } ] } ) , d . element . outerWidth ( ) > c . outerWidth ( ) && d . setWidth ( c . width ( ) ) , d . element . css ( { "margin-left" : - 1 * d . element . outerWidth ( ) / 2 } ) , d . invisible ( ) , d . element . slideDown ( 500 , function ( ) { BI . delay ( function ( ) { d . element . slideUp ( 500 , function ( ) { d . destroy ( ) } ) } , 5e3 ) } ) } , _show : function ( d , e , f , g ) { b = $ ( '<div class="bi-z-index-mask">' ) . css ( { position : "absolute" , zIndex : BI . zIndex _tip - 2 , top : 0 , left : 0 , right : 0 , bottom : 0 , opacity : . 5 } ) . appendTo ( "body" ) , c = $ ( '<div class="bi-message-depend">' ) . css ( { position : "absolute" , zIndex : BI . zIndex _tip - 1 , top : 0 , left : 0 , right : 0 , bottom : 0 } ) . appendTo ( "body" ) ; var h = function ( ) { a . destroy ( ) , b . remove ( ) } , i = [ ] ; d === ! 0 && i . push ( { el : { type : "bi.button" , text : BI . i18nText ( "BI-Basic_Cancel" ) , height : 30 , level : "ignore" , handler : function ( ) { h ( ) , BI . isFunction ( g ) && g . apply ( null , [ ! 1 ] ) } } } ) , i . push ( { el : { type : "bi.button" , text : BI . i18nText ( "BI-Basic_OK" ) , height : 30 , handler : function ( ) { h ( ) , BI . isFunction ( g ) && g . apply ( null , [ ! 0 ] ) } }
BI . ImageButton . superclass . setWidth . apply ( this , arguments ) , this . options . width = a } , setHeight : function ( a ) { BI . ImageButton . superclass . setHeight . apply ( this , arguments ) , this . options . height = a } , setImageWidth : function ( a ) { this . image . setWidth ( a ) } , setImageHeight : function ( a ) { this . image . setHeight ( a ) } , getImageWidth : function ( ) { return this . image . element . width ( ) } , getImageHeight : function ( ) { return this . image . element . height ( ) } , setSrc : function ( a ) { this . options . src = a , this . image . setSrc ( a ) } , getSrc : function ( ) { return this . image . getSrc ( ) } , doClick : function ( ) { BI . ImageButton . superclass . doClick . apply ( this , arguments ) , this . isValid ( ) && this . fireEvent ( BI . ImageButton . EVENT _CHANGE , this ) } } ) , BI . ImageButton . EVENT _CHANGE = "ImageButton.EVENT_CHANGE" , BI . shortcut ( "bi.image_button" , BI . ImageButton ) , function ( a ) { BI . Button = BI . inherit ( BI . BasicButton , { _defaultConfig : function ( a ) { var b = BI . Button . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( b , { baseCls : ( b . baseCls || "" ) + " bi-button" , minWidth : a . block === ! 0 || a . clear === ! 0 ? 0 : 90 , shadow : a . clear !== ! 0 , isShadowShowingOnSelected : ! 0 , readonly : ! 0 , iconClass : "" , level : "common" , block : ! 1 , clear : ! 1 , textAlign : "center" , whiteSpace : "nowrap" , forceCenter : ! 1 , textWidth : null , textHeight : null , hgap : a . clear ? 0 : 10 , vgap : 0 , tgap : 0 , bgap : 0 , lgap : 0 , rgap : 0 } ) } , _init : function ( ) { BI . Button . superclass . _init . apply ( this , arguments ) ; var a = this . options ; ! BI . isNumber ( a . height ) || a . clear || a . block ? this . element . css ( { lineHeight : a . height + "px" } ) : this . element . css ( { height : a . height + "px" , lineHeight : a . height + "px" } ) , BI . isKey ( a . iconClass ) ? ( this . icon = BI . createWidget ( { type : "bi.icon" , width : 18 } ) , this . text = BI . createWidget ( { type : "bi.label" , text : a . text , value : a . value } ) , BI . createWidget ( { type : "bi.horizontal_auto" , cls : "button-" + a . level + " " + a . iconClass , element : this , hgap : a . hgap , vgap : a . vgap , tgap : a . tgap , bgap : a . bgap , lgap : a . lgap , rgap : a . rgap , items : [ { type : "bi.horizontal" , items : [ this . icon , this . text ] } ] } ) ) : this . text = BI . createWidget ( { type : "bi.label" , cls : "button-" + a . level , textAlign : a . textAlign , whiteSpace : a . whiteSpace , forceCenter : a . forceCenter , textWidth : a . textWidth , textHeight : a . textHeight , hgap : a . hgap , vgap : a . vgap , tgap : a . tgap , bgap : a . bgap , lgap : a . lgap , rgap : a . rgap , element : this , text : a . text , value : a . value } ) , a . block === ! 0 && this . element . addClass ( "block" ) , a . clear === ! 0 && this . element . addClass ( "clear" ) , a . minWidth > 0 && this . element . css ( { "min-width" : a . minWidth + "px" } ) } , doClick : function ( ) { BI . Button . superclass . doClick . apply ( this , arguments ) , this . isValid ( ) && this . fireEvent ( BI . Button . EVENT _CHANGE , this ) } , setText : function ( a ) { BI . Button . superclass . setText . apply ( this , arguments ) , this . text . setText ( a ) } , setValue : function ( a ) { BI . Button . superclass . setValue . apply ( this , arguments ) , this . isReadOnly ( ) || this . text . setValue ( a ) } , doRedMark : function ( ) { this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } , doHighLight : function ( ) { this . text . doHighLight . apply ( this . text , arguments ) } , unHighLight : function ( ) { this . text . unHighLight . apply ( this . text , arguments ) } , destroy : function ( ) { BI . Button . superclass . destroy . apply ( this , arguments ) } } ) , BI . shortcut ( "bi.button" , BI . Button ) , BI . Button . EVENT _CHANGE = "EVENT_CHANGE" } ( jQuery ) , BI . TextButton = BI . inherit ( BI . BasicButton , { _defaultConfig : function ( ) { var a = BI . TextButton . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-text-button" , textAlign : "center" , whiteSpace : "nowrap" , forceCenter : ! 1 , textWidth : null , textHeight : null , hgap : 0 , lgap : 0 , rgap : 0 , text : "" , py : "" } ) } , _init : function ( ) { BI . TextButton . superclass . _init . apply ( this , arguments ) ; var a = this . options ; this . text = BI . createWidget ( { type : "bi.label" , element : this , textAlign : a . textAlign , whiteSpace : a . whiteSpace , textWidth : a . textWidth , textHeight : a . textHeight , forceCenter : a . forceCenter , width : a . width , height : a . height , hgap : a . hgap , lgap : a . lgap , rgap : a . rgap , text : a . text , value : a . value , py : a . py } ) } , doClick : function ( ) { BI . TextButton . superclass . doClick . apply ( this , arguments ) , this . isValid ( ) && this . fireEvent ( BI . TextButton . EVENT _CHANGE , this . getValue ( ) , this ) } , doRedMark : function ( ) { this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } , doHighLight : function ( ) { this . text . do
BI . isKey ( b ) && ( ! this . isEnabled ( ) || this . isValid ( ) || BI . Bubbles . has ( this . getName ( ) ) && BI . Bubbles . get ( this . getName ( ) ) . isVisible ( ) ? this . setTitle ( "" ) : this . setTitle ( b ) ) } , _checkError : function ( ) { this . setErrorVisible ( this . isEnabled ( ) && ! this . isValid ( ) ) , this . _checkToolTip ( ) } , _checkWaterMark : function ( ) { var a = this . options ; ! this . disabledWaterMark && "" === this . editor . getValue ( ) && BI . isKey ( a . watermark ) ? this . watermark && this . watermark . visible ( ) : this . watermark && this . watermark . invisible ( ) } , setErrorText : function ( a ) { this . options . errorText = a } , getErrorText : function ( ) { return this . options . errorText } , setErrorVisible : function ( a ) { var b = this . options , c = b . errorText ; if ( BI . isFunction ( c ) && ( c = c ( this . editor . getValue ( ) ) ) , ! this . disabledError && BI . isKey ( c ) ) return BI . Bubbles [ a ? "show" : "hide" ] ( this . getName ( ) , c , this ) , this . _checkToolTip ( ) , BI . Bubbles . get ( this . getName ( ) ) } , disableError : function ( ) { this . disabledError = ! 0 , this . _checkError ( ) } , enableError : function ( ) { this . disabledError = ! 1 , this . _checkError ( ) } , disableWaterMark : function ( ) { this . disabledWaterMark = ! 0 , this . _checkWaterMark ( ) } , enableWaterMark : function ( ) { this . disabledWaterMark = ! 1 , this . _checkWaterMark ( ) } , focus : function ( ) { this . element . addClass ( "text-editor-focus" ) , this . editor . focus ( ) } , blur : function ( ) { this . element . removeClass ( "text-editor-focus" ) , this . editor . blur ( ) } , selectAll : function ( ) { this . editor . selectAll ( ) } , onKeyDown : function ( a ) { this . editor . onKeyDown ( a ) } , setValue : function ( a ) { BI . Editor . superclass . setValue . apply ( this , arguments ) , this . editor . setValue ( a ) , this . _checkError ( ) , this . _checkWaterMark ( ) } , getLastValidValue : function ( ) { return this . editor . getLastValidValue ( ) } , resetLastValidValue : function ( ) { this . editor . resetLastValidValue ( ) } , getValue : function ( ) { return this . isValid ( ) ? BI . trim ( this . editor . getValue ( ) ) : BI . trim ( this . editor . getLastValidValue ( ) ) } , isEditing : function ( ) { return this . editor . isEditing ( ) } , isValid : function ( ) { return this . editor . isValid ( ) } } ) , BI . Editor . EVENT _CHANGE = "EVENT_CHANGE" , BI . Editor . EVENT _FOCUS = "EVENT_FOCUS" , BI . Editor . EVENT _BLUR = "EVENT_BLUR" , BI . Editor . EVENT _CLICK = "EVENT_CLICK" , BI . Editor . EVENT _KEY _DOWN = "EVENT_KEY_DOWN" , BI . Editor . EVENT _SPACE = "EVENT_SPACE" , BI . Editor . EVENT _BACKSPACE = "EVENT_BACKSPACE" , BI . Editor . EVENT _START = "EVENT_START" , BI . Editor . EVENT _PAUSE = "EVENT_PAUSE" , BI . Editor . EVENT _STOP = "EVENT_STOP" , BI . Editor . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . Editor . EVENT _VALID = "EVENT_VALID" , BI . Editor . EVENT _ERROR = "EVENT_ERROR" , BI . Editor . EVENT _ENTER = "EVENT_ENTER" , BI . Editor . EVENT _RESTRICT = "EVENT_RESTRICT" , BI . Editor . EVENT _REMOVE = "EVENT_REMOVE" , BI . Editor . EVENT _EMPTY = "EVENT_EMPTY" , BI . shortcut ( "bi.editor" , BI . Editor ) , BI . MultifileEditor = BI . inherit ( BI . Single , { _defaultConfig : function ( ) { var a = BI . MultifileEditor . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-multifile-editor" , multiple : ! 1 , maxSize : - 1 , accept : "" , url : "" } ) } , _init : function ( ) { var a = this , b = this . options ; BI . MultifileEditor . superclass . _init . apply ( this , arguments ) , this . file = BI . createWidget ( { type : "bi.file" , cls : "multifile-editor" , width : "100%" , height : "100%" , name : b . name , url : b . url , multiple : b . multiple , accept : b . accept , maxSize : b . maxSize } ) , this . file . on ( BI . File . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . MultifileEditor . EVENT _CHANGE , arguments ) } ) , this . file . on ( BI . File . EVENT _UPLOADSTART , function ( ) { a . fireEvent ( BI . MultifileEditor . EVENT _UPLOADSTART , arguments ) } ) , this . file . on ( BI . File . EVENT _ERROR , function ( ) { a . fireEvent ( BI . MultifileEditor . EVENT _ERROR , arguments ) } ) , this . file . on ( BI . File . EVENT _PROGRESS , function ( ) { a . fireEvent ( BI . MultifileEditor . EVENT _PROGRESS , arguments ) } ) , this . file . on ( BI . File . EVENT _UPLOADED , function ( ) { a . fireEvent ( BI . MultifileEditor . EVENT _UPLOADED , arguments ) } ) , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : { type : "bi.adaptive" , scrollable : ! 1 , items : [ this . file ] } , top : 0 , right : 0 , left : 0 , bottom : 0 } ] } ) } , select : function ( ) { this . file . select ( ) } , getValue : function ( ) { return this . file . getValue ( ) } , upload : function ( ) { this . file . upload ( ) } , reset : function ( ) { this . file . reset ( ) } } ) , BI . MultifileEditor . EVENT _CHANGE = "MultifileEditor.EVENT_CHANGE" , BI . MultifileEditor . EVENT _UPLOADSTART = "MultifileEditor.EVENT_UPLOADSTART" , BI . MultifileEditor . EVENT _ERROR = "MultifileEditor.EVENT_ERROR" ,
element : this , items : [ this . text ] } ) ) : ( this . text = BI . createWidget ( BI . extend ( b , { element : this } ) ) , void BI . createWidget ( { type : "bi.layout" , element : this . text , scrollable : "normal" === a . whiteSpace } ) ) ) } , doRedMark : function ( ) { this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } , doHighLight : function ( ) { this . text . doHighLight . apply ( this . text , arguments ) } , unHighLight : function ( ) { this . text . unHighLight . apply ( this . text , arguments ) } , setText : function ( a ) { this . options . text = a , this . text . setText ( a ) } , getText : function ( ) { return this . options . text } , setStyle : function ( a ) { this . text . setStyle ( a ) } , setValue : function ( a ) { BI . Label . superclass . setValue . apply ( this , arguments ) , this . isReadOnly ( ) || this . text . setValue ( a ) } , populate : function ( ) { BI . Label . superclass . populate . apply ( this , arguments ) } } ) , BI . shortcut ( "bi.label" , BI . Label ) , BI . Link = BI . inherit ( BI . Label , { _defaultConfig : function ( ) { var a = BI . Link . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-link" , href : "" , target : "_blank" } ) } , _createJson : function ( ) { var a = this . options ; return { type : "bi.a" , textAlign : a . textAlign , whiteSpace : a . whiteSpace , lineHeight : a . textHeight , text : a . text , keyword : a . keyword , value : a . value , py : a . py , href : a . href , target : a . target } } , _init : function ( ) { BI . Link . superclass . _init . apply ( this , arguments ) } } ) , BI . shortcut ( "bi.link" , BI . Link ) , BI . Bubble = BI . inherit ( BI . Tip , { _defaultConfig : function ( ) { return BI . extend ( BI . Bubble . superclass . _defaultConfig . apply ( this , arguments ) , { extraCls : "bi-bubble" , direction : "top" , text : "" , height : 35 } ) } , _init : function ( ) { BI . Bubble . superclass . _init . apply ( this , arguments ) ; var a = function ( a ) { return a . stopPropagation ( ) , a . stopEvent ( ) , ! 1 } ; this . element . bind ( { click : a , mousedown : a , mouseup : a , mouseover : a , mouseenter : a , mouseleave : a , mousemove : a } ) , BI . createWidget ( { type : "bi.left" , element : this , items : [ this [ "_" + this . options . direction ] ( ) ] } ) } , _createBubbleText : function ( ) { return this . text = BI . createWidget ( { type : "bi.label" , cls : "bubble-text" , text : this . options . text , hgap : 10 , height : 30 } ) } , _top : function ( ) { return BI . createWidget ( { type : "bi.vertical" , items : [ { el : this . _createBubbleText ( ) , height : 30 } , { el : { type : "bi.layout" } , height : 3 } ] } ) } , _bottom : function ( ) { return BI . createWidget ( { type : "bi.vertical" , items : [ { el : { type : "bi.layout" } , height : 3 } , { el : this . _createBubbleText ( ) , height : 30 } ] } ) } , _left : function ( ) { return BI . createWidget ( { type : "bi.right" , items : [ { el : { type : "bi.layout" , width : 3 , height : 30 } } , { el : this . _createBubbleText ( ) } ] } ) } , _right : function ( ) { return BI . createWidget ( { type : "bi.left" , items : [ { el : { type : "bi.layout" , width : 3 , height : 30 } } , { el : this . _createBubbleText ( ) } ] } ) } , setText : function ( a ) { this . text . setText ( a ) } } ) , BI . shortcut ( "bi.bubble" , BI . Bubble ) , BI . Toast = BI . inherit ( BI . Tip , { _const : { minWidth : 200 , hgap : 20 } , _defaultConfig : function ( ) { return BI . extend ( BI . Toast . superclass . _defaultConfig . apply ( this , arguments ) , { extraCls : "bi-toast" , text : "" , level : "success" , height : 30 } ) } , _init : function ( ) { BI . Toast . superclass . _init . apply ( this , arguments ) ; var a = this . options ; this . element . css ( { minWidth : this . _const . minWidth + "px" } ) , this . element . addClass ( "toast-" + a . level ) ; var b = function ( a ) { return a . stopPropagation ( ) , a . stopEvent ( ) , ! 1 } ; this . element . bind ( { click : b , mousedown : b , mouseup : b , mouseover : b , mouseenter : b , mouseleave : b , mousemove : b } ) , this . text = BI . createWidget ( { type : "bi.label" , element : this , text : a . text , height : 30 , hgap : this . _const . hgap } ) } , setWidth : function ( a ) { this . element . width ( a ) } , setText : function ( a ) { this . text . setText ( a ) } } ) , BI . shortcut ( "bi.toast" , BI . Toast ) , BI . Tooltip = BI . inherit ( BI . Tip , { _const : { hgap : 10 } , _defaultConfig : function ( ) { return BI . extend ( BI . Tooltip . superclass . _defaultConfig . apply ( this , arguments ) , { extraCls : "bi-tooltip" , text : "" , level : "success" , stopEvent : ! 1 , stopPropagation : ! 1 , height : 20 } ) } , _init : function ( ) { BI . Tooltip . superclass . _init . apply ( this , arguments ) ; var a = this . options ; this . element . addClass ( "tooltip-" + a . level ) ; var b = function ( b ) { a . stopPropagation && b . stopPropagation ( ) , a . stopEvent && b . stopEvent ( ) } ; this . element . bind ( { click : b , mousedown : b , mouseup : b , mouseover : b , mouseenter : b , mouseleave : b , mousemove : b } ) ; var c = ( a . text + "" ) . split ( "\n" ) ; c . length > 1 ? BI . createWidget ( { type : "bi.vertical" , element : this , hgap : this . _cons
y : Q ( j , 3 ) * b + 3 * Q ( j , 2 ) * i * d + 3 * j * i * i * f + Q ( i , 3 ) * h } } , Ha = e ( function ( a , b , c , d , e , f , g , h ) { var i , j = e - 2 * c + a - ( g - 2 * e + c ) , k = 2 * ( c - a ) - 2 * ( e - c ) , l = a - c , m = ( - k + M . sqrt ( k * k - 4 * j * l ) ) / 2 / j , n = ( - k - M . sqrt ( k * k - 4 * j * l ) ) / 2 / j , o = [ b , h ] , p = [ a , g ] ; return P ( m ) > "1e12" && ( m = . 5 ) , P ( n ) > "1e12" && ( n = . 5 ) , m > 0 && m < 1 && ( i = Ga ( a , b , c , d , e , f , g , h , m ) , p . push ( i . x ) , o . push ( i . y ) ) , n > 0 && n < 1 && ( i = Ga ( a , b , c , d , e , f , g , h , n ) , p . push ( i . x ) , o . push ( i . y ) ) , j = f - 2 * d + b - ( h - 2 * f + d ) , k = 2 * ( d - b ) - 2 * ( f - d ) , l = b - d , m = ( - k + M . sqrt ( k * k - 4 * j * l ) ) / 2 / j , n = ( - k - M . sqrt ( k * k - 4 * j * l ) ) / 2 / j , P ( m ) > "1e12" && ( m = . 5 ) , P ( n ) > "1e12" && ( n = . 5 ) , m > 0 && m < 1 && ( i = Ga ( a , b , c , d , e , f , g , h , m ) , p . push ( i . x ) , o . push ( i . y ) ) , n > 0 && n < 1 && ( i = Ga ( a , b , c , d , e , f , g , h , n ) , p . push ( i . x ) , o . push ( i . y ) ) , { min : { x : O [ C ] ( 0 , p ) , y : O [ C ] ( 0 , o ) } , max : { x : N [ C ] ( 0 , p ) , y : N [ C ] ( 0 , o ) } } } ) , Ia = b . _path2curve = e ( function ( a , b ) { var c = ! b && ya ( a ) ; if ( ! b && c . curve ) return Aa ( c . curve ) ; for ( var d = Ca ( a ) , e = b && Ca ( b ) , f = { x : 0 , y : 0 , bx : 0 , by : 0 , X : 0 , Y : 0 , qx : null , qy : null } , g = { x : 0 , y : 0 , bx : 0 , by : 0 , X : 0 , Y : 0 , qx : null , qy : null } , h = ( function ( a , b , c ) { var d , e , f = { T : 1 , Q : 1 } ; if ( ! a ) return [ "C" , b . x , b . y , b . x , b . y , b . x , b . y ] ; switch ( ! ( a [ 0 ] in f ) && ( b . qx = b . qy = null ) , a [ 0 ] ) { case "M" : b . X = a [ 1 ] , b . Y = a [ 2 ] ; break ; case "A" : a = [ "C" ] [ D ] ( Fa [ C ] ( 0 , [ b . x , b . y ] [ D ] ( a . slice ( 1 ) ) ) ) ; break ; case "S" : "C" == c || "S" == c ? ( d = 2 * b . x - b . bx , e = 2 * b . y - b . by ) : ( d = b . x , e = b . y ) , a = [ "C" , d , e ] [ D ] ( a . slice ( 1 ) ) ; break ; case "T" : "Q" == c || "T" == c ? ( b . qx = 2 * b . x - b . qx , b . qy = 2 * b . y - b . qy ) : ( b . qx = b . x , b . qy = b . y ) , a = [ "C" ] [ D ] ( Ea ( b . x , b . y , b . qx , b . qy , a [ 1 ] , a [ 2 ] ) ) ; break ; case "Q" : b . qx = a [ 1 ] , b . qy = a [ 2 ] , a = [ "C" ] [ D ] ( Ea ( b . x , b . y , a [ 1 ] , a [ 2 ] , a [ 3 ] , a [ 4 ] ) ) ; break ; case "L" : a = [ "C" ] [ D ] ( Da ( b . x , b . y , a [ 1 ] , a [ 2 ] ) ) ; break ; case "H" : a = [ "C" ] [ D ] ( Da ( b . x , b . y , a [ 1 ] , b . y ) ) ; break ; case "V" : a = [ "C" ] [ D ] ( Da ( b . x , b . y , b . x , a [ 1 ] ) ) ; break ; case "Z" : a = [ "C" ] [ D ] ( Da ( b . x , b . y , b . X , b . Y ) ) } return a } ) , i = function ( a , b ) { if ( a [ b ] . length > 7 ) { a [ b ] . shift ( ) ; for ( var c = a [ b ] ; c . length ; ) k [ b ] = "A" , e && ( l [ b ] = "A" ) , a . splice ( b ++ , 0 , [ "C" ] [ D ] ( c . splice ( 0 , 6 ) ) ) ; a . splice ( b , 1 ) , p = N ( d . length , e && e . length || 0 ) } } , j = function ( a , b , c , f , g ) { a && b && "M" == a [ g ] [ 0 ] && "M" != b [ g ] [ 0 ] && ( b . splice ( g , 0 , [ "M" , f . x , f . y ] ) , c . bx = 0 , c . by = 0 , c . x = a [ g ] [ 1 ] , c . y = a [ g ] [ 2 ] , p = N ( d . length , e && e . length || 0 ) ) } , k = [ ] , l = [ ] , m = "" , n = "" , o = 0 , p = N ( d . length , e && e . length || 0 ) ; o < p ; o ++ ) { d [ o ] && ( m = d [ o ] [ 0 ] ) , "C" != m && ( k [ o ] = m , o && ( n = k [ o - 1 ] ) ) , d [ o ] = h ( d [ o ] , f , n ) , "A" != k [ o ] && "C" == m && ( k [ o ] = "C" ) , i ( d , o ) , e && ( e [ o ] && ( m = e [ o ] [ 0 ] ) , "C" != m && ( l [ o ] = m , o && ( n = l [ o - 1 ] ) ) , e [ o ] = h ( e [ o ] , g , n ) , "A" != l [ o ] && "C" == m && ( l [ o ] = "C" ) , i ( e , o ) ) , j ( d , e , f , g , o ) , j ( e , d , g , f , o ) ; var q = d [ o ] , r = e && e [ o ] , s = q . length , t = e && r . length ; f . x = q [ s - 2 ] , f . y = q [ s - 1 ] , f . bx = $ ( q [ s - 4 ] ) || f . x , f . by = $ ( q [ s - 3 ] ) || f . y , g . bx = e && ( $ ( r [ t - 4 ] ) || g . x ) , g . by = e && ( $ ( r [ t - 3 ] ) || g . y ) , g . x = e && r [ t - 2 ] , g . y = e && r [ t - 1 ] } return e || ( c . curve = Aa ( d ) ) , e ? [ d , e ] : d } , null , Aa ) , Ja = ( b . _parseDots = e ( function ( a ) { for ( var c = [ ] , d = 0 , e = a . length ; d < e ; d ++ ) { var f = { } , g = a [ d ] . match ( /^([^:]*):?([\d\.]*)/ ) ; if ( f . color = b . getRGB ( g [ 1 ] ) , f . color . error ) return null ; f . opacity = f . color . opacity , f . color = f . color . hex , g [ 2 ] && ( f . offset = g [ 2 ] + "%" ) , c . push ( f ) } for ( d = 1 , e = c . length - 1 ; d < e ; d ++ ) if ( ! c [ d ] . offset ) { for ( var h = $ ( c [ d - 1 ] . offset || 0 ) , i = 0 , j = d + 1 ; j < e ; j ++ ) if ( c [ j ] . offset ) { i = c [ j ] . offset ; break } i || ( i = 100 , j = e ) , i = $ ( i ) ; for ( var k = ( i - h ) / ( j - d + 1 ) ; d < j ; d ++ ) h += k , c [ d ] . offset = h + "%" } return c } ) , b . _tear = function ( a , b ) { a == b . top && ( b . top = a . prev ) , a == b . bottom && ( b . bottom = a . next ) , a . next && ( a . next . prev = a . prev ) , a . prev && ( a . prev . next = a . next ) } ) , Ka = ( b . _tofront = function ( a , b ) { b . top !== a && ( Ja ( a , b ) , a . next = null , a . prev = b . top , b . top . next = a , b . top = a ) } , b . _toback = function ( a , b ) { b . bottom !== a && ( Ja ( a , b ) , a . next = b . bottom , a . prev = null , b . bottom . prev = a , b . bottom = a ) } , b . _insertafter = function ( a , b , c ) { Ja ( a , c ) , b == c . top && ( c . top = a ) , b . next && ( b . next . prev = a ) , a . next = b . next , a . prev = b , b . next = a } , b . _insertbefore = function ( a , b , c ) { Ja ( a , c ) , b == c . bottom && ( c . bottom = a ) , b . prev && ( b . prev . next = a ) , a . prev = b . prev , b . prev = a , a . next = b } , b . toMatrix = function ( a , b ) { var c = za ( a ) , d = { _ : { transform : F } , getBBox : function ( ) { return c } } ; return La ( d , b ) , d . matrix } ) , La = ( b . transformPath = function ( a , b ) { return pa ( a , Ka ( a , b ) ) } , b . _extractTransform = function ( a , c ) { if ( null == c ) return a . _ . transform ; c = H ( c ) . replace ( /\.{3}|\u2026/g , a . _ . transform || F ) ; var d = b . parseTransformString ( c ) , e = 0 , f = 0 , g = 0 , h = 1 , i = 1 , j = a . _ , k = new n ; if ( j . transform = d || [ ] , d ) for ( var l = 0 , m = d . length ; l < m ; l ++ ) { var o , p , q , r , s , t = d [ l ] , u = t . length , v = H ( t [ 0 ] ) . toLowerCase ( ) , w = t [ 0 ] != v , x = w ? k . invert ( ) : 0 ; "t" == v && 3 == u ? w ? ( o = x . x ( 0 , 0 ) , p = x . y ( 0 , 0 ) , q = x . x ( t [ 1 ] , t [ 2 ] ) , r = x . y ( t [ 1 ] , t [ 2 ] ) , k . translate ( q - o , r - p ) )
p [ B ] = 1 ) , q ( C , k ) ; var E = i * ( "diamond" != w && "oval" != w ) ; f ? ( g = d . _ . arrows . startdx * u || 0 , h = a . getTotalLength ( t . path ) - E * u ) : ( g = E * u , h = a . getTotalLength ( t . path ) - ( d . _ . arrows . enddx * u || 0 ) ) , k = { } , k [ "marker-" + r ] = "url(#" + B + ")" , ( h || g ) && ( k . d = a . getSubpath ( t . path , g , h ) ) , q ( s , k ) , d . _ . arrows [ r + "Path" ] = A , d . _ . arrows [ r + "Marker" ] = B , d . _ . arrows [ r + "dx" ] = E , d . _ . arrows [ r + "Type" ] = w , d . _ . arrows [ r + "String" ] = e } else f ? ( g = d . _ . arrows . startdx * u || 0 , h = a . getTotalLength ( t . path ) - g ) : ( g = 0 , h = a . getTotalLength ( t . path ) - ( d . _ . arrows . enddx * u || 0 ) ) , d . _ . arrows [ r + "Path" ] && q ( s , { d : a . getSubpath ( t . path , g , h ) } ) , delete d . _ . arrows [ r + "Path" ] , delete d . _ . arrows [ r + "Marker" ] , delete d . _ . arrows [ r + "dx" ] , delete d . _ . arrows [ r + "Type" ] , delete d . _ . arrows [ r + "String" ] ; for ( k in p ) if ( p [ b ] ( k ) && ! p [ k ] ) { var F = a . _g . doc . getElementById ( k ) ; F && F . parentNode . removeChild ( F ) } } } , u = { "-" : [ 3 , 1 ] , "." : [ 1 , 1 ] , "-." : [ 3 , 1 , 1 , 1 ] , "-.." : [ 3 , 1 , 1 , 1 , 1 , 1 ] , ". " : [ 1 , 3 ] , "- " : [ 4 , 3 ] , "--" : [ 8 , 3 ] , "- ." : [ 4 , 3 , 1 , 3 ] , "--." : [ 8 , 3 , 1 , 3 ] , "--.." : [ 8 , 3 , 1 , 3 , 1 , 3 ] } , v = function ( a , b , d ) { if ( b = u [ c ( b ) . toLowerCase ( ) ] ) { for ( var e = a . attrs [ "stroke-width" ] || "1" , f = { round : e , square : e , butt : 0 } [ a . attrs [ "stroke-linecap" ] || d [ "stroke-linecap" ] ] || 0 , g = [ ] , h = b . length ; h -- ; ) g [ h ] = b [ h ] * e + ( h % 2 ? 1 : - 1 ) * f ; q ( a . node , { "stroke-dasharray" : g . join ( "," ) } ) } else q ( a . node , { "stroke-dasharray" : "none" } ) } , w = function ( d , f ) { var i = d . node , k = d . attrs , m = i . style . visibility ; i . style . visibility = "hidden" ; for ( var o in f ) if ( f [ b ] ( o ) ) { if ( ! a . _availableAttrs [ b ] ( o ) ) continue ; var p = f [ o ] ; switch ( k [ o ] = p , o ) { case "blur" : d . blur ( p ) ; break ; case "title" : var u = i . getElementsByTagName ( "title" ) ; if ( u . length && ( u = u [ 0 ] ) ) u . firstChild . nodeValue = p ; else { u = q ( "title" ) ; var w = a . _g . doc . createTextNode ( p ) ; u . appendChild ( w ) , i . appendChild ( u ) } break ; case "href" : case "target" : var x = i . parentNode ; if ( "a" != x . tagName . toLowerCase ( ) ) { var z = q ( "a" ) ; x . insertBefore ( z , i ) , z . appendChild ( i ) , x = z } "target" == o ? x . setAttributeNS ( n , "show" , "blank" == p ? "new" : p ) : x . setAttributeNS ( n , o , p ) ; break ; case "cursor" : i . style . cursor = p ; break ; case "transform" : d . transform ( p ) ; break ; case "arrow-start" : t ( d , p ) ; break ; case "arrow-end" : t ( d , p , 1 ) ; break ; case "clip-rect" : var A = c ( p ) . split ( j ) ; if ( 4 == A . length ) { d . clip && d . clip . parentNode . parentNode . removeChild ( d . clip . parentNode ) ; var B = q ( "clipPath" ) , C = q ( "rect" ) ; B . id = a . createUUID ( ) , q ( C , { x : A [ 0 ] , y : A [ 1 ] , width : A [ 2 ] , height : A [ 3 ] } ) , B . appendChild ( C ) , d . paper . defs . appendChild ( B ) , q ( i , { "clip-path" : "url(#" + B . id + ")" } ) , d . clip = C } if ( ! p ) { var D = i . getAttribute ( "clip-path" ) ; if ( D ) { var E = a . _g . doc . getElementById ( D . replace ( /(^url\(#|\)$)/g , l ) ) ; E && E . parentNode . removeChild ( E ) , q ( i , { "clip-path" : l } ) , delete d . clip } } break ; case "path" : "path" == d . type && ( q ( i , { d : p ? k . path = a . _pathToAbsolute ( p ) : "M0,0" } ) , d . _ . dirty = 1 , d . _ . arrows && ( "startString" in d . _ . arrows && t ( d , d . _ . arrows . startString ) , "endString" in d . _ . arrows && t ( d , d . _ . arrows . endString , 1 ) ) ) ; break ; case "width" : if ( i . setAttribute ( o , p ) , d . _ . dirty = 1 , ! k . fx ) break ; o = "x" , p = k . x ; case "x" : k . fx && ( p = - k . x - ( k . width || 0 ) ) ; case "rx" : if ( "rx" == o && "rect" == d . type ) break ; case "cx" : i . setAttribute ( o , p ) , d . pattern && s ( d ) , d . _ . dirty = 1 ; break ; case "height" : if ( i . setAttribute ( o , p ) , d . _ . dirty = 1 , ! k . fy ) break ; o = "y" , p = k . y ; case "y" : k . fy && ( p = - k . y - ( k . height || 0 ) ) ; case "ry" : if ( "ry" == o && "rect" == d . type ) break ; case "cy" : i . setAttribute ( o , p ) , d . pattern && s ( d ) , d . _ . dirty = 1 ; break ; case "r" : "rect" == d . type ? q ( i , { rx : p , ry : p } ) : i . setAttribute ( o , p ) , d . _ . dirty = 1 ; break ; case "src" : "image" == d . type && i . setAttributeNS ( n , "href" , p ) ; break ; case "stroke-width" : 1 == d . _ . sx && 1 == d . _ . sy || ( p /= g ( h ( d . _ . sx ) , h ( d . _ . sy ) ) || 1 ) , i . setAttribute ( o , p ) , k [ "stroke-dasharray" ] && v ( d , k [ "stroke-dasharray" ] , f ) , d . _ . arrows && ( "startString" in d . _ . arrows && t ( d , d . _ . arrows . startString ) , "endString" in d . _ . arrows && t ( d , d . _ . arrows . endString , 1 ) ) ; break ; case "stroke-dasharray" : v ( d , p , f ) ; break ; case "fill" : var F = c ( p ) . match ( a . _ISURL ) ; if ( F ) { B = q ( "pattern" ) ; var G = q ( "image" ) ; B . id = a . createUUID ( ) , q ( B , { x : 0 , y : 0 , patternUnits : "userSpaceOnUse" , height : 1 , width : 1 } ) , q ( G , { x : 0 , y : 0 , "xlink:href" : F [ 1 ] } ) , B . appendChild ( G ) , function ( b ) { a . _preload ( F [ 1 ] , function ( ) { var a = this . offsetWidth , c = this . offsetHeight ; q ( b , { width : a , height : c } ) , q ( G , { width : a , height : c } ) } ) } ( B ) , d . paper . defs . appendChild ( B ) , q ( i , { fill : "url(#" + B . id + ")" } ) , d . pattern = B , d . pattern && s ( d ) ; break } var H = a . getRGB ( p ) ; if ( H . error ) { if ( ( "circle" == d . type || "ellipse" == d . type || "r" != c ( p ) . charAt ( ) ) && r ( d , p ) ) { if ( " op
this . canvas . appendChild ( this . span ) , this . bottom = this . top = null } , a . prototype . remove = function ( ) { a . eve ( "raphael.remove" , this ) , this . canvas . parentNode . removeChild ( this . canvas ) ; for ( var b in this ) this [ b ] = "function" == typeof this [ b ] ? a . _removedFactory ( b ) : null ; return ! 0 } ; var G = a . st ; for ( var H in E ) E [ b ] ( H ) && ! G [ b ] ( H ) && ( G [ H ] = function ( a ) { return function ( ) { var b = arguments ; return this . forEach ( function ( c ) { c [ a ] . apply ( c , b ) } ) } } ( H ) ) } } ) , function ( a , b ) { if ( "function" == typeof define && define . amd ) define ( "raphael" , [ "raphael.core" , "raphael.svg" , "raphael.vml" ] , function ( a ) { return b ( a ) } ) ; else if ( "object" == typeof exports ) { var c = require ( "raphael.core" ) ; require ( "raphael.svg" ) , require ( "raphael.vml" ) , module . exports = b ( c ) } } ( this , function ( a ) { return a . ninja ( ) } ) , BI . Svg = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . Svg . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-svg" } ) } , _init : function ( ) { BI . Svg . superclass . _init . apply ( this , arguments ) , this . paper = Raphael ( this . element [ 0 ] ) , this . element . css ( "overflow" , "hidden" ) , $ ( this . paper . canvas ) . width ( "100%" ) . height ( "100%" ) . css ( { left : "0" , top : "0" } ) . appendTo ( this . element ) , this . top = this . paper . top , this . bottom = this . paper . bottom , this . customAttributes = this . paper . customAttributes , this . ca = this . paper . ca , this . raphael = this . paper . raphael } , add : function ( ) { return this . paper . add . apply ( this . paper , arguments ) } , path : function ( ) { return this . paper . path . apply ( this . paper , arguments ) } , image : function ( ) { return this . paper . image . apply ( this . paper , arguments ) } , rect : function ( ) { return this . paper . rect . apply ( this . paper , arguments ) } , circle : function ( ) { return this . paper . circle . apply ( this . paper , arguments ) } , ellipse : function ( ) { return this . paper . ellipse . apply ( this . paper , arguments ) } , text : function ( ) { return this . paper . text . apply ( this . paper , arguments ) } , print : function ( ) { return this . paper . print . apply ( this . paper , arguments ) } , setStart : function ( ) { return this . paper . setStart . apply ( this . paper , arguments ) } , setFinish : function ( ) { return this . paper . setFinish . apply ( this . paper , arguments ) } , setSize : function ( ) { return this . paper . setSize . apply ( this . paper , arguments ) } , setViewBox : function ( ) { return this . paper . setViewBox . apply ( this . paper , arguments ) } , getById : function ( ) { return this . paper . getById . apply ( this . paper , arguments ) } , getElementByPoint : function ( ) { return this . paper . getElementByPoint . apply ( this . paper , arguments ) } , getElementsByPoint : function ( ) { return this . paper . getElementsByPoint . apply ( this . paper , arguments ) } , getFont : function ( ) { return this . paper . getFont . apply ( this . paper , arguments ) } , set : function ( ) { return this . paper . set . apply ( this . paper , arguments ) } , remove : function ( ) { return this . paper . remove . apply ( this . paper , arguments ) } , clear : function ( ) { return this . paper . clear . apply ( this . paper , arguments ) } } ) , BI . shortcut ( "bi.svg" , BI . Svg ) , BI . NativeTableScrollbar = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . NativeTableScrollbar . superclass . _defaultConfig . apply ( this , arguments ) , { attributes : { tabIndex : 0 } , contentSize : 0 , defaultPosition : 0 , position : 0 , size : 0 } ) } , render : function ( ) { var a = this ; this . options ; this . element . width ( 36 ) ; var b = BI . throttle ( function ( ) { a . fireEvent ( BI . NativeTableScrollbar . EVENT _SCROLL , a . element . scrollTop ( ) ) } , 150 , { leading : ! 1 } ) ; return this . element . scroll ( function ( ) { b ( ) } ) , { type : "bi.default" , scrolly : ! 0 , items : [ { type : "bi.layout" , width : 1 , ref : function ( b ) { a . inner = b } } ] } } , mounted : function ( ) { this . _populate ( ) } , _populate : function ( ) { var a = this . options ; if ( a . size < 1 || a . contentSize <= a . size ) return void this . setVisible ( ! 1 ) ; this . setVisible ( ! 0 ) ; try { this . element . scrollTop ( a . position ) } catch ( b ) { } this . inner . element . height ( a . contentSize ) } , setContentSize : function ( a ) { this . options . contentSize = a } , setPosition : function ( a ) { this . options . position = a } , setSize : function ( a ) { this . setHeight ( a ) , this . options . size = a } , populate : function ( ) { this . _populate ( ) } } ) , BI . NativeTableScrollbar . EVENT _SCROLL = "EVENT_SCROLL" , BI . shortcut ( "bi.native_table_scrollbar" , BI . NativeTableScrollbar ) , BI . NativeTableHorizontalScrollbar = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . NativeTableHorizontalScrollbar . superclass . _defaultConfig . apply ( this , arguments ) , { attributes : { tabIndex : 0 } , contentSize : 0 , position : 0 , size : 0 } ) } , render : fun
return this . bottomRightGrid . getScrollLeft ( ) } , setWidth : function ( a ) { BI . GridTable . superclass . setWidth . apply ( this , arguments ) , this . _width = this . options . width - BI . GridTableScrollbar . SIZE } , setHeight : function ( a ) { BI . GridTable . superclass . setHeight . apply ( this , arguments ) , this . _height = this . options . height - BI . GridTableScrollbar . SIZE } , setColumnSize : function ( a ) { this . options . columnSize = a , this . _isNeedDigest = ! 0 } , setRegionColumnSize : function ( a ) { this . options . regionColumnSize = a , this . _isNeedDigest = ! 0 } , getColumnSize : function ( ) { return this . options . columnSize } , getRegionColumnSize : function ( ) { return this . options . regionColumnSize } , populate : function ( a , b ) { a && this . options . items !== a && ( this . options . items = a , this . items = this . _getItems ( ) , this . _restore ( ) ) , b && this . options . header !== b && ( this . options . header = b , this . header = this . _getHeader ( ) , this . _restore ( ) ) , this . _populate ( ) } , _restore : function ( ) { this . topLeftGrid . restore ( ) , this . topRightGrid . restore ( ) , this . bottomLeftGrid . restore ( ) , this . bottomRightGrid . restore ( ) } , restore : function ( ) { this . _restore ( ) } } ) , BI . shortcut ( "bi.grid_table" , BI . GridTable ) , BI . QuickGridTable = BI . inherit ( BI . GridTable , { _defaultConfig : function ( ) { return BI . extend ( BI . QuickGridTable . superclass . _defaultConfig . apply ( this , arguments ) , { extraCls : "bi-quick-grid-table" } ) } , render : function ( ) { BI . QuickGridTable . superclass . render . apply ( this , arguments ) ; this . options ; this . topLeftGrid . setOverflowX ( ! 1 ) , this . topLeftGrid . setOverflowY ( ! 1 ) , this . topRightGrid . setOverflowX ( ! 1 ) , this . topRightGrid . setOverflowY ( ! 1 ) , this . bottomLeftGrid . setOverflowX ( ! 1 ) , this . bottomLeftGrid . setOverflowY ( ! 1 ) , this . bottomRightGrid . setOverflowX ( ! 1 ) , this . bottomRightGrid . setOverflowY ( ! 1 ) } , mounted : function ( ) { BI . QuickGridTable . superclass . mounted . apply ( this , arguments ) ; var a = this ; this . _topLeftWheelHandler = new BI . WheelHandler ( BI . bind ( this . _onWheelLeft , this ) , BI . bind ( this . _shouldHandleLeftX , this ) , BI . bind ( this . _shouldHandleY , this ) ) , this . _topRightWheelHandler = new BI . WheelHandler ( BI . bind ( this . _onWheelRight , this ) , BI . bind ( this . _shouldHandleRightX , this ) , BI . bind ( this . _shouldHandleY , this ) ) , this . _bottomLeftWheelHandler = new BI . WheelHandler ( BI . bind ( this . _onWheelLeft , this ) , BI . bind ( this . _shouldHandleLeftX , this ) , BI . bind ( this . _shouldHandleY , this ) ) , this . _bottomRightWheelHandler = new BI . WheelHandler ( BI . bind ( this . _onWheelRight , this ) , BI . bind ( this . _shouldHandleRightX , this ) , BI . bind ( this . _shouldHandleY , this ) ) , this . topLeftGrid . element . mousewheel ( function ( b ) { a . _topLeftWheelHandler . onWheel ( b . originalEvent ) } ) , this . topRightGrid . element . mousewheel ( function ( b ) { a . _topRightWheelHandler . onWheel ( b . originalEvent ) } ) , this . bottomLeftGrid . element . mousewheel ( function ( b ) { a . _bottomLeftWheelHandler . onWheel ( b . originalEvent ) } ) , this . bottomRightGrid . element . mousewheel ( function ( b ) { a . _bottomRightWheelHandler . onWheel ( b . originalEvent ) } ) } , _shouldHandleLeftX : function ( a ) { return a > 0 ? this . bottomLeftGrid . getScrollLeft ( ) < this . bottomLeftGrid . getMaxScrollLeft ( ) : this . bottomLeftGrid . getScrollLeft ( ) > 0 } , _shouldHandleRightX : function ( a ) { return a > 0 ? this . bottomRightGrid . getScrollLeft ( ) < this . bottomRightGrid . getMaxScrollLeft ( ) : this . bottomRightGrid . getScrollLeft ( ) > 0 } , _shouldHandleY : function ( a ) { return a > 0 ? this . bottomRightGrid . getScrollTop ( ) < this . bottomRightGrid . getMaxScrollTop ( ) : this . bottomRightGrid . getScrollTop ( ) > 0 } , _onWheelLeft : function ( a , b ) { var c = this , d = this . bottomLeftGrid . getScrollTop ( ) , e = this . bottomLeftGrid . getScrollLeft ( ) ; d += b , e += a , this . bottomLeftGrid . setScrollTop ( d ) , this . bottomRightGrid . setScrollTop ( d ) , this . topLeftGrid . setScrollLeft ( e ) , this . bottomLeftGrid . setScrollLeft ( e ) , c . _populateScrollbar ( ) , this . fireEvent ( BI . Table . EVENT _TABLE _SCROLL , arguments ) } , _onWheelRight : function ( a , b ) { var c = this , d = this . bottomRightGrid . getScrollTop ( ) , e = this . bottomRightGrid . getScrollLeft ( ) ; d += b , e += a , this . bottomLeftGrid . setScrollTop ( d ) , this . bottomRightGrid . setScrollTop ( d ) , this . topRightGrid . setScrollLeft ( e ) , this . bottomRightGrid . setScrollLeft ( e ) , c . _populateScrollbar ( ) , this . fireEvent ( BI . Table . EVENT _TABLE _SCROLL , arguments ) } , _populateTable : function ( ) { var a = this . options , b = this . getRegionSize ( ) , c = 0 , d = 0 , e = 0 , f = [ ] , g = this . _getFreezeColLength ( ) ; BI . each ( a . columnSize , function ( b , g ) { a . isNeedFreeze === ! 0 && a . freezeCols . contains ( b ) ? c
var g = 0 ; BI . each ( c . columnSize , function ( c , e ) { b . footerTds [ d ] [ a ] . _ _mergeCols . contains ( c ) && ( g += e ) } ) , g = b . _calculateWidth ( g ) , g > 1 && ( g += b . footerTds [ d ] [ a ] . _ _mergeCols . length - 1 ) , BI . isNumeric ( g ) ? a == BI . size ( e ) - 1 ? e [ a ] . element . attr ( "width" , g - 1 ) . css ( "width" , g - 1 ) : e [ a ] . element . attr ( "width" , g ) . css ( "width" , g ) : e [ a ] . element . attr ( "width" , "" ) . css ( "width" , "" ) } else BI . isNumeric ( f ) ? a == BI . size ( e ) - 1 ? e [ a ] . element . attr ( "width" , f - 1 ) . css ( "width" , f - 1 ) : e [ a ] . element . attr ( "width" , f ) . css ( "width" , f ) : e [ a ] . element . attr ( "width" , "" ) . css ( "width" , "" ) } ) } } ) ; var n = this . _calculateWidth ( BI . sum ( c . columnSize ) ) ; n > 1.05 && ( n += c . columnSize . length ) , n > 1.05 && this . tableContainer . element . width ( n ) } } , getColumnSize : function ( ) { return this . options . columnSize } , getCalculateColumnSize : function ( ) { var a = this , b = this . options , c = [ ] ; if ( b . isNeedFreeze === ! 0 ) { if ( BI . size ( this . bottomLeftBodyTds ) > 0 || BI . size ( this . bottomRightBodyTds ) > 0 ) return BI . any ( this . bottomLeftBodyTds , function ( a , b ) { if ( ! BI . any ( b , function ( a , b ) { if ( b . _ _mergeCols . length > 1 ) return ! 0 } ) ) return BI . each ( b , function ( a , d ) { var e = d . width ( ) / d . _ _mergeCols . length ; a == BI . size ( b ) - 1 && e ++ , c . push ( e ) } ) , ! 0 } ) || BI . each ( this . bottomLeftBodyTds [ 0 ] , function ( b , d ) { var e = d . width ( ) / d . _ _mergeCols . length ; b == BI . size ( a . bottomLeftBodyTds [ 0 ] ) - 1 && e ++ , c . push ( e ) } ) , BI . any ( this . bottomRightBodyTds , function ( a , b ) { if ( ! BI . any ( b , function ( a , b ) { if ( b . _ _mergeCols . length > 1 ) return ! 0 } ) ) return BI . each ( b , function ( a , d ) { var e = d . width ( ) / d . _ _mergeCols . length ; a == BI . size ( b ) - 1 && e ++ , c . push ( e ) } ) , ! 0 } ) || BI . each ( this . bottomRightBodyTds [ 0 ] , function ( b , d ) { var e = d . width ( ) / d . _ _mergeCols . length ; b == BI . size ( a . bottomRightBodyTds [ 0 ] ) - 1 && e ++ , c . push ( e ) } ) , c ; BI . any ( this . topLeftBodyTds , function ( a , b ) { if ( ! BI . any ( b , function ( a , b ) { if ( b . _ _mergeCols . length > 1 ) return ! 0 } ) ) return BI . each ( b , function ( a , d ) { var e = d . width ( ) / d . _ _mergeCols . length ; a == BI . size ( b ) - 1 && e ++ , c . push ( e ) } ) , ! 0 } ) || BI . each ( this . topLeftBodyTds [ BI . size ( this . topLeftBodyTds ) - 1 ] , function ( b , d ) { var e = d . width ( ) / d . _ _mergeCols . length ; b == BI . size ( a . topLeftBodyTds [ BI . size ( a . topLeftBodyTds ) - 1 ] ) - 1 && e ++ , c . push ( e ) } ) , BI . any ( this . topRightBodyTds , function ( a , b ) { if ( ! BI . any ( b , function ( a , b ) { if ( b . _ _mergeCols . length > 1 ) return ! 0 } ) ) return BI . each ( b , function ( a , d ) { var e = d . width ( ) / d . _ _mergeCols . length ; a == BI . size ( b ) - 1 && e ++ , c . push ( e ) } ) , ! 0 } ) || BI . each ( this . topRightBodyTds [ BI . size ( this . topRightBodyTds ) - 1 ] , function ( b , d ) { var e = d . width ( ) / d . _ _mergeCols . length ; b == BI . size ( a . topRightBodyTds [ BI . size ( a . topRightBodyTds ) - 1 ] ) - 1 && e ++ , c . push ( e ) } ) } else BI . each ( this . headerTds [ BI . size ( this . headerTds ) - 1 ] , function ( b , d ) { var e = d . width ( ) / d . _ _mergeCols . length ; b == BI . size ( a . headerTds [ BI . size ( a . headerTds ) - 1 ] ) - 1 && e ++ , c . push ( e ) } ) ; return c } , setHeaderColumnSize : function ( a ) { var b = this , c = this . options , d = this . _isRightFreeze ( ) ; if ( c . isNeedFreeze ) { var e = [ ] , f = [ ] ; BI . each ( a , function ( a , b ) { c . freezeCols . contains ( a ) ? d ? f . push ( b ) : e . push ( b ) : d ? e . push ( b ) : f . push ( b ) } ) ; var g = 0 , h = 1 , i = function ( a ) { var c , d , i , j ; switch ( a ) { case g : c = b . topLeftColGroupTds , d = b . topLeftBodyTds , i = b . topLeftBodyItems , j = e ; break ; case h : c = b . topRightColGroupTds , d = b . topRightBodyTds , i = b . topRightBodyItems , j = f } BI . each ( c , function ( a , c ) { var e = 0 | c . attr ( "width" ) ; if ( e !== j [ a ] ) { var f = b . _calculateWidth ( j [ a ] ) ; c . attr ( "width" , f ) . css ( "width" , f ) , BI . each ( d , function ( c , d ) { if ( d [ a ] ) if ( d [ a ] . _ _mergeCols . length > 1 ) { var e = 0 ; BI . each ( j , function ( b , c ) { d [ a ] . _ _mergeCols . contains ( b ) && ( e += c ) } ) , e = b . _calculateWidth ( e ) , e > 1 && ( e += d [ a ] . _ _mergeCols . length - 1 ) , BI . isNumeric ( e ) ? a == BI . size ( d ) - 1 ? d [ a ] . attr ( "width" , e - 1 ) . css ( "width" , e - 1 ) : d [ a ] . attr ( "width" , e ) . css ( "width" , e ) : d [ a ] . attr ( "width" , "" ) . css ( "width" , "" ) } else a == BI . size ( d ) - 1 ? d [ a ] . attr ( "width" , f - 1 ) . css ( "width" , f - 1 ) : d [ a ] . attr ( "width" , f ) . css ( "width" , f ) } ) , BI . each ( i , function ( c , e ) { if ( e [ a ] ) if ( d [ c ] [ a ] . _ _mergeCols . length > 1 ) { var g = 0 ; BI . each ( j , function ( b , e ) { d [ c ] [ a ] . _ _mergeCols . contains ( b ) && ( g += e ) } ) , g = b . _calculateWidth ( g ) , g > 1 && ( g += d [ c ] [ a ] . _ _mergeCols . length - 1 ) , BI . isNumeric ( g ) ? a == BI . size ( e ) - 1 ? e [ a ] . element . attr ( "width" , g - 1 ) . css ( "width" , g - 1 ) : e [ a ] . element . attr ( "width" , g ) . css ( "width" , g ) : e [ a ] . element . attr ( "width" , "" ) . css ( "width" , "" ) } else BI . isNumeric ( f ) ? a == BI . size ( e ) - 1 ? e [ a ] . element . attr ( "width" , f - 1 ) . css ( "width" , f - 1 ) : e [ a ] . element . attr ( "width" , f ) . css ( "width" , f ) : e [ a ] . element . attr ( "width" , "" ) . css ( "width" , "" ) }
treeId : a . treeId } , c = a . treeObj ; a . view . txtSelectedEnable || c . bind ( "selectstart" , function ( a ) { var b = a . originalEvent . srcElement . nodeName . toLowerCase ( ) ; return "input" === b || "textarea" === b } ) . css ( { "-moz-user-select" : "-moz-none" } ) , c . bind ( "click" , b , event . proxy ) , c . bind ( "dblclick" , b , event . proxy ) , c . bind ( "mouseover" , b , event . proxy ) , c . bind ( "mouseout" , b , event . proxy ) , c . bind ( "mousedown" , b , event . proxy ) , c . bind ( "mouseup" , b , event . proxy ) , c . bind ( "contextmenu" , b , event . proxy ) } , unbindTree : function ( a ) { var b = a . treeObj ; b . unbind ( "click" , event . proxy ) . unbind ( "dblclick" , event . proxy ) . unbind ( "mouseover" , event . proxy ) . unbind ( "mouseout" , event . proxy ) . unbind ( "mousedown" , event . proxy ) . unbind ( "mouseup" , event . proxy ) . unbind ( "contextmenu" , event . proxy ) } , doProxy : function ( a ) { for ( var b = [ ] , c = 0 , d = _init . proxys . length ; c < d ; c ++ ) { var e = _init . proxys [ c ] . apply ( this , arguments ) ; if ( b . push ( e ) , e . stop ) break } return b } , proxy : function ( a ) { var b = data . getSetting ( a . data . treeId ) ; if ( ! tools . uCanDo ( b , a ) ) return ! 0 ; for ( var c = event . doProxy ( a ) , d = ! 0 , e = ! 1 , f = 0 , g = c . length ; f < g ; f ++ ) { var h = c [ f ] ; h . nodeEventCallback && ( e = ! 0 , d = h . nodeEventCallback . apply ( h , [ a , h . node ] ) && d ) , h . treeEventCallback && ( e = ! 0 , d = h . treeEventCallback . apply ( h , [ a , h . node ] ) && d ) } return d } } , handler = { onSwitchNode : function ( a , b ) { var c = data . getSetting ( a . data . treeId ) ; if ( b . open ) { if ( 0 == tools . apply ( c . callback . beforeCollapse , [ c . treeId , b ] , ! 0 ) ) return ! 0 ; data . getRoot ( c ) . expandTriggerFlag = ! 0 , view . switchNode ( c , b ) } else { if ( 0 == tools . apply ( c . callback . beforeExpand , [ c . treeId , b ] , ! 0 ) ) return ! 0 ; data . getRoot ( c ) . expandTriggerFlag = ! 0 , view . switchNode ( c , b ) } return ! 0 } , onClickNode : function ( a , b ) { var c = data . getSetting ( a . data . treeId ) , d = c . view . autoCancelSelected && ( a . ctrlKey || a . metaKey ) && data . isSelectedNode ( c , b ) ? 0 : c . view . autoCancelSelected && ( a . ctrlKey || a . metaKey ) && c . view . selectedMulti ? 2 : 1 ; return 0 == tools . apply ( c . callback . beforeClick , [ c . treeId , b , d ] , ! 0 ) || ( 0 === d ? view . cancelPreSelectedNode ( c , b ) : view . selectNode ( c , b , 2 === d ) , c . treeObj . trigger ( consts . event . CLICK , [ a , c . treeId , b , d ] ) , ! 0 ) } , onZTreeMousedown : function ( a , b ) { var c = data . getSetting ( a . data . treeId ) ; return tools . apply ( c . callback . beforeMouseDown , [ c . treeId , b ] , ! 0 ) && tools . apply ( c . callback . onMouseDown , [ a , c . treeId , b ] ) , ! 0 } , onZTreeMouseup : function ( a , b ) { var c = data . getSetting ( a . data . treeId ) ; return tools . apply ( c . callback . beforeMouseUp , [ c . treeId , b ] , ! 0 ) && tools . apply ( c . callback . onMouseUp , [ a , c . treeId , b ] ) , ! 0 } , onZTreeDblclick : function ( a , b ) { var c = data . getSetting ( a . data . treeId ) ; return tools . apply ( c . callback . beforeDblClick , [ c . treeId , b ] , ! 0 ) && tools . apply ( c . callback . onDblClick , [ a , c . treeId , b ] ) , ! 0 } , onZTreeContextmenu : function ( a , b ) { var c = data . getSetting ( a . data . treeId ) ; return tools . apply ( c . callback . beforeRightClick , [ c . treeId , b ] , ! 0 ) && tools . apply ( c . callback . onRightClick , [ a , c . treeId , b ] ) , "function" != typeof c . callback . onRightClick } } , tools = { apply : function ( a , b , c ) { return "function" == typeof a ? a . apply ( zt , b ? b : [ ] ) : c } , canAsync : function ( a , b ) { var c = a . data . key . children ; return a . async . enable && b && b . isParent && ! ( b . zAsync || b [ c ] && b [ c ] . length > 0 ) } , clone : function ( a ) { if ( null === a ) return null ; var b = tools . isArray ( a ) ? [ ] : { } ; for ( var c in a ) b [ c ] = a [ c ] instanceof Date ? new Date ( a [ c ] . getTime ( ) ) : "object" == typeof a [ c ] ? arguments . callee ( a [ c ] ) : a [ c ] ; return b } , eqs : function ( a , b ) { return a . toLowerCase ( ) === b . toLowerCase ( ) } , isArray : function ( a ) { return "[object Array]" === Object . prototype . toString . apply ( a ) } , $ : function ( a , b , c ) { return b && "string" != typeof b && ( c = b , b = "" ) , "string" == typeof a ? $ ( a , c ? c . treeObj . get ( 0 ) . ownerDocument : null ) : $ ( "#" + a . tId + b , c ? c . treeObj : null ) } , getMDom : function ( a , b , c ) { if ( ! b ) return null ; for ( ; b && b . id !== a . treeId ; ) { for ( var d = 0 , e = c . length ; b . tagName && d < e ; d ++ ) if ( tools . eqs ( b . tagName , c [ d ] . tagName ) && null !== b . getAttribute ( c [ d ] . attrName ) ) return b ; b = b . parentNode } return null } , getNodeMainDom : function ( a ) { return $ ( a ) . parent ( "li" ) . get ( 0 ) || $ ( a ) . parentsUntil ( "li" ) . parent ( ) . get ( 0 ) } , isChildOrSelf : function ( a , b ) { return $ ( a ) . closest ( "#" + b ) . length > 0 } , uCanDo : function ( a , b ) { return ! 0 } } , view = { addNodes : function ( a , b , c , d ) { if ( ! a . data . keep . leaf || ! b || b . isParent ) if ( tools . isArray ( c ) || ( c = [ c ] ) , a . data . simpleData . enable && ( c = data . transformTozTreeFormat ( a , c ) ) , b ) { var e = $$ ( b , consts . id . SWITCH , a ) , f = $$ ( b , consts . id . ICON , a ) , g = $$ ( b , consts . id . UL , a ) ; b . open || ( view . replac
s . $ ) ; v . exSetting ( c ) , v . addInitBind ( f ) , v . addInitUnBind ( g ) , v . addInitCache ( e ) , v . addInitNode ( i ) , v . addInitProxy ( h , ! 0 ) , v . addInitRoot ( d ) , v . addBeforeA ( j ) , v . addZTreeTools ( k ) ; var x = u . createNodes ; u . createNodes = function ( a , b , c , d ) { x && x . apply ( u , arguments ) , c && u . repairParentChkClassWithSelf ( a , d ) } ; var y = u . removeNode ; u . removeNode = function ( a , b ) { var c = b . getParentNode ( ) ; y && y . apply ( u , arguments ) , b && c && ( u . repairChkClass ( a , c ) , u . repairParentChkClass ( a , c ) ) } ; var z = u . appendNodes ; u . appendNodes = function ( a , b , c , d , e , f ) { var g = "" ; return z && ( g = z . apply ( u , arguments ) ) , d && v . makeChkFlag ( a , d ) , g } } ( jQuery ) , BI . IconChangeButton = BI . inherit ( BI . Single , { _defaultConfig : function ( ) { var a = BI . IconChangeButton . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : "bi-icon-change-button" , iconClass : "" , iconWidth : null , iconHeight : null , stopEvent : ! 1 , stopPropagation : ! 1 , selected : ! 1 , once : ! 1 , forceSelected : ! 1 , forceNotSelected : ! 1 , disableSelected : ! 1 , shadow : ! 1 , isShadowShowingOnSelected : ! 1 , trigger : null , handler : BI . emptyFn } ) } , _init : function ( ) { BI . IconChangeButton . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . button = BI . createWidget ( { type : "bi.icon_button" , element : this , cls : b . iconClass , height : b . height , iconWidth : b . iconWidth , iconHeight : b . iconHeight , stopEvent : b . stopEvent , stopPropagation : b . stopPropagation , selected : b . selected , once : b . once , forceSelected : b . forceSelected , forceNotSelected : b . forceNotSelected , disableSelected : b . disableSelected , shadow : b . shadow , isShadowShowingOnSelected : b . isShadowShowingOnSelected , trigger : b . trigger , handler : b . handler } ) , this . button . on ( BI . Controller . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . button . on ( BI . IconButton . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . IconChangeButton . EVENT _CHANGE , arguments ) } ) } , isSelected : function ( ) { return this . button . isSelected ( ) } , setSelected : function ( a ) { this . button . setSelected ( a ) } , setIcon : function ( a ) { var b = this . options ; b . iconClass !== a && ( this . element . removeClass ( b . iconClass ) . addClass ( a ) , b . iconClass = a ) } } ) , BI . IconChangeButton . EVENT _CHANGE = "IconChangeButton.EVENT_CHANGE" , BI . shortcut ( "bi.icon_change_button" , BI . IconChangeButton ) , BI . HalfIconButton = BI . inherit ( BI . IconButton , { _defaultConfig : function ( ) { var a = BI . HalfIconButton . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { extraCls : "bi-half-icon-button check-half-select-icon" , height : 16 , width : 16 , iconWidth : 16 , iconHeight : 16 , selected : ! 1 } ) } , _init : function ( ) { BI . HalfIconButton . superclass . _init . apply ( this , arguments ) } , doClick : function ( ) { BI . HalfIconButton . superclass . doClick . apply ( this , arguments ) , this . isValid ( ) && this . fireEvent ( BI . HalfIconButton . EVENT _CHANGE ) } } ) , BI . HalfIconButton . EVENT _CHANGE = "HalfIconButton.EVENT_CHANGE" , BI . shortcut ( "bi.half_icon_button" , BI . HalfIconButton ) , BI . TriggerIconButton = BI . inherit ( BI . IconButton , { _defaultConfig : function ( ) { var a = BI . TriggerIconButton . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-trigger-icon-button" , extraCls : "pull-down-font" } ) } , _init : function ( ) { BI . TriggerIconButton . superclass . _init . apply ( this , arguments ) } , doClick : function ( ) { BI . TriggerIconButton . superclass . doClick . apply ( this , arguments ) , this . isValid ( ) && this . fireEvent ( BI . TriggerIconButton . EVENT _CHANGE , this ) } } ) , BI . TriggerIconButton . EVENT _CHANGE = "TriggerIconButton.EVENT_CHANGE" , BI . shortcut ( "bi.trigger_icon_button" , BI . TriggerIconButton ) , BI . MultiSelectItem = BI . inherit ( BI . BasicButton , { _defaultConfig : function ( ) { return BI . extend ( BI . MultiSelectItem . superclass . _defaultConfig . apply ( this , arguments ) , { extraCls : "bi-multi-select-item" , height : 25 , logic : { dynamic : ! 1 } } ) } , _init : function ( ) { BI . MultiSelectItem . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . checkbox = BI . createWidget ( { type : "bi.checkbox" } ) , this . text = BI . createWidget ( { type : "bi.label" , cls : "list-item-text" , textAlign : "left" , whiteSpace : "nowrap" , textHeight : b . height , height : b . height , hgap : b . hgap , rgap : b . rgap , text : b . text , keyword : b . keyword , value : b . value , py : b . py } ) , this . checkbox . on ( BI . Controller . EVENT _CHANGE , function ( b ) { b === BI . Events . CLICK && a . setSelected ( a . isSelected ( ) ) } ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( "horizontal" , B
c . push ( e . slice ( 28 , 35 ) ) , c . push ( e . slice ( 35 , 42 ) ) , c = BI . map ( c , function ( a , c ) { return BI . map ( c , function ( a , c ) { return BI . extend ( c , { type : "bi.text_item" , cls : "bi-list-item-active" , textAlign : "center" , whiteSpace : "normal" , once : ! 1 , forceSelected : ! 0 , height : 25 , value : b . year + "-" + b . month + "-" + c . text , disabled : c . lastMonth || c . nextMonth || c . disabled } ) } ) } ) , this . days = BI . createWidget ( { type : "bi.button_group" , items : BI . createItems ( c , { } ) , layouts : [ BI . LogicFactory . createLogic ( "table" , BI . extend ( { } , b . logic , { columns : 7 , rows : 6 , columnSize : [ 1 / 7 , 1 / 7 , 1 / 7 , 1 / 7 , 1 / 7 , 1 / 7 , 1 / 7 ] , rowSize : 25 } ) ) ] } ) , this . days . on ( BI . Controller . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( "vertical" , BI . extend ( { } , b . logic , { items : BI . LogicFactory . createLogicItemsByDirection ( "top" , d , this . days ) } ) ) ) ) } , isFrontDate : function ( ) { var a = this . options , b = ( this . _const , a . year ) , c = a . month , d = Date . getDate ( ) , e = d . getDay ( ) ; b = 0 | b , d . setFullYear ( b , c , 1 ) ; var f = d . getOffsetDate ( - 1 * ( e + 1 ) ) ; return ! ! Date . checkVoid ( f . getFullYear ( ) , f . getMonth ( ) , f . getDate ( ) , a . min , a . max ) [ 0 ] } , isFinalDate : function ( ) { var a = this . options , b = ( this . _const , a . year ) , c = a . month , d = Date . getDate ( ) , e = d . getDay ( ) ; b = 0 | b , d . setFullYear ( b , c , 1 ) ; var f = d . getOffsetDate ( 42 - e ) ; return ! ! Date . checkVoid ( f . getFullYear ( ) , f . getMonth ( ) , f . getDate ( ) , a . min , a . max ) [ 0 ] } , setValue : function ( a ) { this . days . setValue ( [ a . year + "-" + a . month + "-" + a . day ] ) } , getValue : function ( ) { var a = this . days . getValue ( ) [ 0 ] . match ( /\d+/g ) ; return { year : 0 | a [ 0 ] , month : 0 | a [ 1 ] , day : 0 | a [ 2 ] } } } ) , BI . extend ( BI . Calendar , { getPageByDateJSON : function ( a ) { var b = Date . getDate ( ) . getFullYear ( ) , c = Date . getDate ( ) . getMonth ( ) , d = 12 * ( a . year - b ) ; return d += a . month - c } , getDateJSONByPage : function ( a ) { var b = Date . getDate ( ) . getMonth ( ) , c = a ; c += b ; var d = BI . parseInt ( c / 12 ) ; c < 0 && c % 12 !== 0 && d -- ; var e = c >= 0 ? c % 12 : ( 12 + c % 12 ) % 12 ; return { year : Date . getDate ( ) . getFullYear ( ) + d , month : e } } } ) , BI . shortcut ( "bi.calendar" , BI . Calendar ) , BI . YearCalendar = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { var a = BI . YearCalendar . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : "bi-year-calendar" , behaviors : { } , logic : { dynamic : ! 1 } , min : "1900-01-01" , max : "2099-12-31" , year : null } ) } , _yearCreator : function ( a ) { var b = this . options ; a = 0 | a ; var c = BI . YearCalendar . getStartYear ( a ) , d = [ ] ; return BI . each ( BI . range ( BI . YearCalendar . INTERVAL ) , function ( a ) { var e = { } ; Date . checkVoid ( c + a , 1 , 1 , b . min , b . max ) [ 0 ] && ( e . disabled = ! 0 ) , e . text = c + a , d . push ( e ) } ) , d } , _init : function ( ) { BI . YearCalendar . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . currentYear = Date . getDate ( ) . getFullYear ( ) ; var c = this . _yearCreator ( b . year || this . currentYear ) , d = c . length , e = BI . makeArray ( d , "" ) , f = [ 0 , 6 , 1 , 7 , 2 , 8 , 3 , 9 , 4 , 10 , 5 , 11 ] ; BI . each ( c , function ( a , b ) { e [ a ] = c [ f [ a ] ] } ) ; var g = [ ] ; g . push ( e . slice ( 0 , 2 ) ) , g . push ( e . slice ( 2 , 4 ) ) , g . push ( e . slice ( 4 , 6 ) ) , g . push ( e . slice ( 6 , 8 ) ) , g . push ( e . slice ( 8 , 10 ) ) , g . push ( e . slice ( 10 , 12 ) ) , g = BI . map ( g , function ( a , b ) { return BI . map ( b , function ( a , b ) { return BI . extend ( b , { type : "bi.text_item" , cls : "bi-list-item-active" , textAlign : "center" , whiteSpace : "normal" , once : ! 1 , forceSelected : ! 0 , height : 23 , width : 38 , value : b . text , disabled : b . disabled } ) } ) } ) , this . years = BI . createWidget ( { type : "bi.button_group" , behaviors : b . behaviors , items : BI . createItems ( g , { } ) , layouts : [ BI . LogicFactory . createLogic ( "table" , BI . extend ( { } , b . logic , { columns : 2 , rows : 6 , columnSize : [ . 5 , . 5 ] , rowSize : 25 } ) ) , { type : "bi.center_adapt" , vgap : 1 } ] } ) , this . years . on ( BI . Controller . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( "vertical" , BI . extend ( { } , b . logic , { items : BI . LogicFactory . createLogicItemsByDirection ( "top" , this . years ) } ) ) ) ) } , isFrontYear : function ( ) { var a = this . options , b = a . year ; return b = 0 | b , ! ! Date . checkVoid ( BI . YearCalendar . getStartYear ( b ) - 1 , 1 , 1 , a . min , a . max ) [ 0 ] } , isFinalYear : function ( ) { var a = this . options , b = ( this . _const , a . year ) ; return b = 0 | b , ! ! Date . checkVoid ( BI . YearCalendar . getEndYear ( b ) + 1 , 1 , 1 , a . min , a . max ) [ 0 ] } , setValue : function ( a ) { this . years . setValue ( [ a ] ) } , getValue : function ( ) { return this . years . getValue ( ) [ 0 ] } } ) , BI . extend ( BI . YearCalendar , { INTERVAL : 12 , getStartYear : function ( a ) { var b = Date . getDate ( ) . getFullYear ( ) ; return a
} ) , this . colorPicker = BI . createWidget ( { type : "bi.color_picker" , width : 190 , height : 50 } ) , this . colorPicker . on ( BI . ColorPicker . EVENT _CHANGE , function ( ) { a . setValue ( this . getValue ( ) [ 0 ] ) , a . fireEvent ( BI . ColorChooserPopup . EVENT _CHANGE , arguments ) } ) , this . customColorChooser = BI . createWidget ( { type : "bi.custom_color_chooser" } ) ; var b = BI . createWidget ( { type : "bi.popup_panel" , buttons : [ BI . i18nText ( "BI-Basic_Cancel" ) , BI . i18nText ( "BI-Basic_Save" ) ] , title : BI . i18nText ( "BI-Custom_Color" ) , el : this . customColorChooser , stopPropagation : ! 1 , bgap : - 1 , rgap : 1 , lgap : 1 , minWidth : 227 } ) ; this . more = BI . createWidget ( { type : "bi.combo" , direction : "right,top" , isNeedAdjustHeight : ! 1 , el : { type : "bi.text_item" , cls : "color-chooser-popup-more bi-list-item" , textAlign : "center" , height : 20 , text : BI . i18nText ( "BI-Basic_More" ) + "..." } , popup : b } ) , this . more . on ( BI . Combo . EVENT _AFTER _POPUPVIEW , function ( ) { a . customColorChooser . setValue ( a . getValue ( ) ) } ) , b . on ( BI . PopupPanel . EVENT _CLICK _TOOLBAR _BUTTON , function ( b ) { switch ( b ) { case 0 : a . more . hideView ( ) ; break ; case 1 : a . setValue ( a . customColorChooser . getValue ( ) ) , a . more . hideView ( ) , a . fireEvent ( BI . ColorChooserPopup . EVENT _CHANGE , arguments ) } } ) , BI . createWidget ( { type : "bi.vtape" , element : this , items : [ { el : { type : "bi.absolute" , cls : "bi-background bi-border-bottom" , items : [ { el : this . colorEditor , left : 0 , right : 0 , top : 5 } ] } , height : 30 } , { el : { type : "bi.absolute" , items : [ { el : this . storeColors , left : 5 , right : 5 , top : 5 } ] } , height : 30 } , { el : { type : "bi.absolute" , items : [ { el : this . colorPicker , left : 5 , right : 5 , top : 5 } ] } , height : 65 } , { el : this . more , height : 20 } ] } ) } , setStoreColors : function ( a ) { if ( BI . isArray ( a ) ) { var b = BI . map ( a , function ( a , b ) { return { value : b } } ) ; BI . count ( a . length , 8 , function ( a ) { b . push ( { value : "" , disabled : ! 0 } ) } ) , this . storeColors . populate ( [ b ] ) } } , setValue : function ( a ) { this . colorEditor . setValue ( a ) , this . colorPicker . setValue ( a ) , this . storeColors . setValue ( a ) } , getValue : function ( ) { return this . colorEditor . getValue ( ) } } ) , BI . ColorChooserPopup . EVENT _VALUE _CHANGE = "ColorChooserPopup.EVENT_VALUE_CHANGE" , BI . ColorChooserPopup . EVENT _CHANGE = "ColorChooserPopup.EVENT_CHANGE" , BI . shortcut ( "bi.color_chooser_popup" , BI . ColorChooserPopup ) , BI . ColorChooserTrigger = BI . inherit ( BI . Trigger , { _defaultConfig : function ( ) { var a = BI . ColorChooserTrigger . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-color-chooser-trigger" , height : 30 } ) } , _init : function ( ) { BI . ColorChooserTrigger . superclass . _init . apply ( this , arguments ) , this . colorContainer = BI . createWidget ( { type : "bi.layout" , cls : "bi-card color-chooser-trigger-content" } ) ; var a = BI . createWidget ( { type : "bi.icon_button" , disableSelected : ! 0 , cls : "icon-combo-down-icon trigger-triangle-font" , width : 12 , height : 8 } ) ; BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : this . colorContainer , left : 3 , right : 3 , top : 3 , bottom : 3 } , { el : a , right : 3 , bottom : 3 } ] } ) , this . options . value && this . setValue ( this . options . value ) } , setValue : function ( a ) { BI . ColorChooserTrigger . superclass . setValue . apply ( this , arguments ) , "" === a ? this . colorContainer . element . css ( "background-color" , "" ) . removeClass ( "trans-color-background" ) . addClass ( "auto-color-background" ) : "transparent" === a ? this . colorContainer . element . css ( "background-color" , "" ) . removeClass ( "auto-color-background" ) . addClass ( "trans-color-background" ) : this . colorContainer . element . css ( { "background-color" : a } ) . removeClass ( "auto-color-background" ) . removeClass ( "trans-color-background" ) } } ) , BI . ColorChooserTrigger . EVENT _CHANGE = "ColorChooserTrigger.EVENT_CHANGE" , BI . shortcut ( "bi.color_chooser_trigger" , BI . ColorChooserTrigger ) , BI . ColorPickerButton = BI . inherit ( BI . BasicButton , { _defaultConfig : function ( ) { var a = BI . ColorPickerButton . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-color-picker-button bi-background bi-border-top bi-border-left" } ) } , _init : function ( ) { BI . ColorPickerButton . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; if ( b . value ) { this . element . css ( "background-color" , b . value ) ; var c = this . getName ( ) ; this . element . hover ( function ( ) { a . _createMask ( ) , a . isEnabled ( ) && BI . Maskers . show ( c ) } , function ( ) { a . isSelected ( ) || BI . Maskers . hide ( c ) } ) } } , _createMask : function ( ) { var a = this . options , b = this . getName ( ) ; if ( this . isEnabled ( ) && ! BI . Maskers . has ( b ) ) {
} , populate : function ( a ) { this . options . items = a , this . textIconCheckCombo . populate ( a ) } } ) , BI . TextValueCheckCombo . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.text_value_check_combo" , BI . TextValueCheckCombo ) , BI . SmallTextValueCheckCombo = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . SmallTextValueCheckCombo . superclass . _defaultConfig . apply ( this , arguments ) , { width : 100 , height : 24 , chooseType : BI . ButtonGroup . CHOOSE _TYPE _SINGLE , text : "" } ) } , _init : function ( ) { BI . SmallTextValueCheckCombo . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . trigger = BI . createWidget ( { type : "bi.small_select_text_trigger" , items : b . items , height : b . height , text : b . text } ) , this . popup = BI . createWidget ( { type : "bi.text_value_check_combo_popup" , chooseType : b . chooseType , items : b . items } ) , this . popup . on ( BI . TextValueCheckComboPopup . EVENT _CHANGE , function ( ) { a . setValue ( a . popup . getValue ( ) ) , a . SmallTextIconCheckCombo . hideView ( ) , a . fireEvent ( BI . SmallTextValueCheckCombo . EVENT _CHANGE ) } ) , this . popup . on ( BI . Controller . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . SmallTextIconCheckCombo = BI . createWidget ( { type : "bi.combo" , element : this , adjustLength : 2 , el : this . trigger , popup : { el : this . popup , maxHeight : 300 } } ) } , setValue : function ( a ) { this . SmallTextIconCheckCombo . setValue ( a ) } , getValue : function ( ) { return this . SmallTextIconCheckCombo . getValue ( ) } , populate : function ( a ) { this . options . items = a , this . SmallTextIconCheckCombo . populate ( a ) } } ) , BI . SmallTextValueCheckCombo . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.small_text_value_check_combo" , BI . SmallTextValueCheckCombo ) , BI . TextValueCheckComboPopup = BI . inherit ( BI . Pane , { _defaultConfig : function ( ) { return BI . extend ( BI . TextValueCheckComboPopup . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-text-icon-popup" , chooseType : BI . ButtonGroup . CHOOSE _TYPE _SINGLE } ) } , _init : function ( ) { BI . TextValueCheckComboPopup . superclass . _init . apply ( this , arguments ) ; var a = this . options , b = this ; this . popup = BI . createWidget ( { type : "bi.button_group" , items : this . _formatItems ( a . items ) , chooseType : a . chooseType , layouts : [ { type : "bi.vertical" } ] } ) , this . popup . on ( BI . Controller . EVENT _CHANGE , function ( a , c , d ) { b . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , a === BI . Events . CLICK && b . fireEvent ( BI . TextValueCheckComboPopup . EVENT _CHANGE , c , d ) } ) , BI . createWidget ( { type : "bi.vertical" , element : this , items : [ this . popup ] } ) } , _formatItems : function ( a ) { return BI . map ( a , function ( a , b ) { return BI . extend ( { type : "bi.icon_text_item" , cls : "item-check-font bi-list-item" , height : 30 } , b ) } ) } , populate : function ( a ) { BI . TextValueCheckComboPopup . superclass . populate . apply ( this , arguments ) , this . popup . populate ( this . _formatItems ( a ) ) } , getValue : function ( ) { return this . popup . getValue ( ) } , setValue : function ( a ) { this . popup . setValue ( a ) } } ) , BI . TextValueCheckComboPopup . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.text_value_check_combo_popup" , BI . TextValueCheckComboPopup ) , BI . TextValueCombo = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . TextValueCombo . superclass . _defaultConfig . apply ( this , arguments ) , { baseClass : "bi-text-value-combo" , height : 30 , chooseType : BI . ButtonGroup . CHOOSE _TYPE _SINGLE , text : "" , el : { } } ) } , _init : function ( ) { BI . TextValueCombo . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . trigger = BI . createWidget ( b . el , { type : "bi.select_text_trigger" , items : b . items , height : b . height , text : b . text } ) , this . popup = BI . createWidget ( { type : "bi.text_value_combo_popup" , chooseType : b . chooseType , items : b . items } ) , this . popup . on ( BI . TextValueComboPopup . EVENT _CHANGE , function ( ) { a . setValue ( a . popup . getValue ( ) ) , a . textIconCombo . hideView ( ) , a . fireEvent ( BI . TextValueCombo . EVENT _CHANGE , arguments ) } ) , this . popup . on ( BI . Controller . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . textIconCombo = BI . createWidget ( { type : "bi.combo" , element : this , adjustLength : 2 , el : this . trigger , popup : { el : this . popup , maxHeight : 300 } } ) } , setValue : function ( a ) { this . textIconCombo . setValue ( a ) } , getValue : function ( ) { return this . textIconCombo . getValue ( ) } , populate : function ( a ) { this . options . items = a , this . textIconCombo . populate ( a ) } } ) , BI . TextValueCombo . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.text_value_combo" , BI . TextValueCombo ) , BI . Sma
} ) , this . editor . on ( BI . Editor . EVENT _EMPTY , function ( ) { a . fireEvent ( BI . StateEditor . EVENT _EMPTY , arguments ) } ) , BI . createWidget ( { type : "bi.vertical" , scrolly : ! 1 , element : this , items : [ this . editor ] } ) , this . _showHint ( ) } , doRedMark : function ( ) { "" === this . editor . getValue ( ) && BI . isKey ( this . options . watermark ) || this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } , doHighLight : function ( ) { "" === this . editor . getValue ( ) && BI . isKey ( this . options . watermark ) || this . text . doHighLight . apply ( this . text , arguments ) } , unHighLight : function ( ) { this . text . unHighLight . apply ( this . text , arguments ) } , focus : function ( ) { this . options . disabled === ! 1 && ( this . _showInput ( ) , this . editor . focus ( ) ) } , blur : function ( ) { this . editor . blur ( ) , this . _showHint ( ) } , _showInput : function ( ) { this . editor . visible ( ) , this . text . invisible ( ) } , _showHint : function ( ) { this . editor . invisible ( ) , this . text . visible ( ) } , isValid : function ( ) { return this . editor . isValid ( ) } , setErrorText : function ( a ) { this . editor . setErrorText ( a ) } , getErrorText : function ( ) { return this . editor . getErrorText ( ) } , isEditing : function ( ) { return this . editor . isEditing ( ) } , getLastValidValue : function ( ) { return this . editor . getLastValidValue ( ) } , setValue : function ( a ) { this . editor . setValue ( a ) } , getValue : function ( ) { return this . editor . getValue ( ) } , getState : function ( ) { return this . editor . getValue ( ) . match ( /[^\s]+/g ) } , setState : function ( a ) { return BI . StateEditor . superclass . setValue . apply ( this , arguments ) , BI . isNumber ( a ) ? void ( a === BI . Selection . All ? ( this . text . setText ( BI . i18nText ( "BI-Select_All" ) ) , this . text . setTitle ( "" ) , this . text . element . removeClass ( "state-editor-infinite-text" ) ) : a === BI . Selection . Multi ? ( this . text . setText ( BI . i18nText ( "BI-Select_Part" ) ) , this . text . setTitle ( "" ) , this . text . element . removeClass ( "state-editor-infinite-text" ) ) : ( this . text . setText ( BI . i18nText ( "BI-Basic_Unrestricted" ) ) , this . text . setTitle ( "" ) , this . text . element . addClass ( "state-editor-infinite-text" ) ) ) : BI . isString ( a ) ? ( this . text . setText ( a ) , this . text . setTitle ( a ) , void this . text . element . removeClass ( "state-editor-infinite-text" ) ) : void ( BI . isArray ( a ) && ( BI . isEmpty ( a ) ? ( this . text . setText ( BI . i18nText ( "BI-Basic_Unrestricted" ) ) , this . text . element . addClass ( "state-editor-infinite-text" ) ) : 1 === a . length ? ( this . text . setText ( a [ 0 ] ) , this . text . setTitle ( a [ 0 ] ) , this . text . element . removeClass ( "state-editor-infinite-text" ) ) : ( this . text . setText ( BI . i18nText ( "BI-Select_Part" ) ) , this . text . setTitle ( "" ) , this . text . element . removeClass ( "state-editor-infinite-text" ) ) ) ) } } ) , BI . StateEditor . EVENT _CHANGE = "EVENT_CHANGE" , BI . StateEditor . EVENT _FOCUS = "EVENT_FOCUS" , BI . StateEditor . EVENT _BLUR = "EVENT_BLUR" , BI . StateEditor . EVENT _CLICK = "EVENT_CLICK" , BI . StateEditor . EVENT _KEY _DOWN = "EVENT_KEY_DOWN" , BI . StateEditor . EVENT _CLICK _LABEL = "EVENT_CLICK_LABEL" , BI . StateEditor . EVENT _START = "EVENT_START" , BI . StateEditor . EVENT _PAUSE = "EVENT_PAUSE" , BI . StateEditor . EVENT _STOP = "EVENT_STOP" , BI . StateEditor . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . StateEditor . EVENT _VALID = "EVENT_VALID" , BI . StateEditor . EVENT _ERROR = "EVENT_ERROR" , BI . StateEditor . EVENT _ENTER = "EVENT_ENTER" , BI . StateEditor . EVENT _RESTRICT = "EVENT_RESTRICT" , BI . StateEditor . EVENT _SPACE = "EVENT_SPACE" , BI . StateEditor . EVENT _EMPTY = "EVENT_EMPTY" , BI . shortcut ( "bi.state_editor" , BI . StateEditor ) , BI . SimpleStateEditor = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { var a = BI . SimpleStateEditor . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-simple-state-editor" , hgap : 4 , vgap : 2 , lgap : 0 , rgap : 0 , tgap : 0 , bgap : 0 , validationChecker : BI . emptyFn , quitChecker : BI . emptyFn , mouseOut : ! 1 , allowBlank : ! 0 , watermark : "" , errorText : "" , height : 24 } ) } , _init : function ( ) { BI . SimpleStateEditor . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . editor = BI . createWidget ( { type : "bi.editor" , height : b . height , hgap : b . hgap , vgap : b . vgap , lgap : b . lgap , rgap : b . rgap , tgap : b . tgap , bgap : b . bgap , value : b . value , validationChecker : b . validationChecker , quitChecker : b . quitChecker , allowBlank : b . allowBlank , watermark : b . watermark , errorText : b . errorText } ) , this . text = BI . createWidget ( { type : "bi.text_button" , cls : "state-editor-infinite-text bi-disabled" , textAlign : "left" , height : b . height , text : BI . i18nText ( "BI-Basic_Unrestricted" ) , hgap : 4 , handle
top : 5 , right : 74 } , { el : this . vlabel , top : 5 , right : 111 } , { el : this . hpager , top : 5 , right : - 9 } , { el : this . hlabel , top : 5 , right : 28 } ] } ) } , _createVPager : function ( ) { var a = this , b = this . options , c = b . vertical ; this . vlabel = BI . createWidget ( { type : "bi.label" , width : 24 , height : 20 , value : c . curr , title : c . curr , invisible : ! 0 } ) , this . vpager = BI . createWidget ( { type : "bi.pager" , width : 76 , layouts : [ { type : "bi.horizontal" , scrollx : ! 1 , rgap : 24 , vgap : 1 } ] , invisible : ! 0 , dynamicShow : ! 1 , pages : c . pages , curr : c . curr , groups : 0 , first : ! 1 , last : ! 1 , prev : { type : "bi.icon_button" , value : "prev" , title : BI . i18nText ( "BI-Up_Page" ) , warningTitle : BI . i18nText ( "BI-Current_Is_First_Page" ) , height : 20 , iconWidth : 16 , iconHeight : 16 , cls : "direction-pager-prev column-pre-page-h-font" } , next : { type : "bi.icon_button" , value : "next" , title : BI . i18nText ( "BI-Down_Page" ) , warningTitle : BI . i18nText ( "BI-Current_Is_Last_Page" ) , height : 20 , iconWidth : 16 , iconHeight : 16 , cls : "direction-pager-next column-next-page-h-font" } , hasPrev : c . hasPrev , hasNext : c . hasNext , firstPage : c . firstPage , lastPage : c . lastPage } ) , this . vpager . on ( BI . Pager . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . DirectionPager . EVENT _CHANGE ) } ) , this . vpager . on ( BI . Pager . EVENT _AFTER _POPULATE , function ( ) { a . vlabel . setValue ( this . getCurrentPage ( ) ) , a . vlabel . setTitle ( this . getCurrentPage ( ) ) } ) } , _createHPager : function ( ) { var a = this , b = this . options , c = b . horizontal ; this . hlabel = BI . createWidget ( { type : "bi.label" , width : 24 , height : 20 , value : c . curr , title : c . curr , invisible : ! 0 } ) , this . hpager = BI . createWidget ( { type : "bi.pager" , width : 76 , layouts : [ { type : "bi.horizontal" , scrollx : ! 1 , rgap : 24 , vgap : 1 } ] , invisible : ! 0 , dynamicShow : ! 1 , pages : c . pages , curr : c . curr , groups : 0 , first : ! 1 , last : ! 1 , prev : { type : "bi.icon_button" , value : "prev" , title : BI . i18nText ( "BI-Left_Page" ) , warningTitle : BI . i18nText ( "BI-Current_Is_First_Page" ) , height : 20 , iconWidth : 16 , iconHeight : 16 , cls : "direction-pager-prev row-pre-page-h-font" } , next : { type : "bi.icon_button" , value : "next" , title : BI . i18nText ( "BI-Right_Page" ) , warningTitle : BI . i18nText ( "BI-Current_Is_Last_Page" ) , height : 20 , iconWidth : 16 , iconHeight : 16 , cls : "direction-pager-next row-next-page-h-font" } , hasPrev : c . hasPrev , hasNext : c . hasNext , firstPage : c . firstPage , lastPage : c . lastPage } ) , this . hpager . on ( BI . Pager . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . DirectionPager . EVENT _CHANGE ) } ) , this . hpager . on ( BI . Pager . EVENT _AFTER _POPULATE , function ( ) { a . hlabel . setValue ( this . getCurrentPage ( ) ) , a . hlabel . setTitle ( this . getCurrentPage ( ) ) } ) } , getVPage : function ( ) { return this . vpager . getCurrentPage ( ) } , getHPage : function ( ) { return this . hpager . getCurrentPage ( ) } , setVPage : function ( a ) { this . vpager . setValue ( a ) , this . vlabel . setValue ( a ) , this . vlabel . setTitle ( a ) } , setHPage : function ( a ) { this . hpager . setValue ( a ) , this . hlabel . setValue ( a ) , this . hlabel . setTitle ( a ) } , hasVNext : function ( ) { return this . vpager . hasNext ( ) } , hasHNext : function ( ) { return this . hpager . hasNext ( ) } , hasVPrev : function ( ) { return this . vpager . hasPrev ( ) } , hasHPrev : function ( ) { return this . hpager . hasPrev ( ) } , setHPagerVisible : function ( a ) { this . hpager . setVisible ( a ) , this . hlabel . setVisible ( a ) } , setVPagerVisible : function ( a ) { this . vpager . setVisible ( a ) , this . vlabel . setVisible ( a ) } , populate : function ( ) { this . vpager . populate ( ) , this . hpager . populate ( ) ; var a = ! 1 , b = ! 1 ; this . hasHNext ( ) || this . hasHPrev ( ) ? ( this . setHPagerVisible ( ! 0 ) , b = ! 0 ) : this . setHPagerVisible ( ! 1 ) , this . hasVNext ( ) || this . hasVPrev ( ) ? ( this . setVPagerVisible ( ! 0 ) , a = ! 0 ) : this . setVPagerVisible ( ! 1 ) , this . setVisible ( b || a ) ; var c = [ 74 , 111 , - 9 , 28 ] , d = this . layout . attr ( "items" ) ; a === ! 0 && b === ! 0 ? ( d [ 0 ] . right = c [ 0 ] , d [ 1 ] . right = c [ 1 ] , d [ 2 ] . right = c [ 2 ] , d [ 3 ] . right = c [ 3 ] ) : a === ! 0 ? ( d [ 0 ] . right = c [ 2 ] , d [ 1 ] . right = c [ 3 ] ) : b === ! 0 && ( d [ 2 ] . right = c [ 2 ] , d [ 3 ] . right = c [ 3 ] ) , this . layout . attr ( "items" , d ) , this . layout . resize ( ) } , clear : function ( ) { this . vpager . attr ( "curr" , 1 ) , this . hpager . attr ( "curr" , 1 ) } } ) , BI . DirectionPager . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.direction_pager" , BI . DirectionPager ) , BI . DetailPager = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . DetailPager . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-detail-pager" , behaviors : { } , layouts : [ { type : "bi.horizontal" , hgap : 10 , vgap : 0 } ] , dynamicShow : ! 0 , dynamicShowFirstLast : ! 1 , dynamicShowPrevNext : ! 1 , pages : ! 1 , curr : function ( ) { return 1 } , groups : 0 , jump : BI . emptyFn , first : ! 1 , last : ! 1 , prev : " <EFBFBD> <EFBFBD>
} , setRightHorizontalScroll : function ( a ) { this . table . setRightHorizontalScroll ( a ) } , getVerticalScroll : function ( ) { return this . table . getVerticalScroll ( ) } , getLeftHorizontalScroll : function ( ) { return this . table . getLeftHorizontalScroll ( ) } , getRightHorizontalScroll : function ( ) { return this . table . getRightHorizontalScroll ( ) } , attr : function ( a , b ) { var c = BI . AdaptiveTable . superclass . attr . apply ( this , arguments ) ; return "freezeCols" === a ? c : this . table . attr . apply ( this . table , arguments ) } , restore : function ( ) { this . table . restore ( ) } , populate : function ( a ) { this . options ; this . _populate ( ) , this . table . populate . apply ( this . table , arguments ) } , destroy : function ( ) { this . table . destroy ( ) , BI . AdaptiveTable . superclass . destroy . apply ( this , arguments ) } } ) , BI . shortcut ( "bi.adaptive_table" , BI . AdaptiveTable ) , BI . DynamicSummaryLayerTreeTable = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . DynamicSummaryLayerTreeTable . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-dynamic-summary-layer-tree-table" , el : { type : "bi.resizable_table" } , isNeedResize : ! 0 , isResizeAdapt : ! 0 , isNeedFreeze : ! 1 , freezeCols : [ ] , isNeedMerge : ! 0 , mergeCols : [ ] , mergeRule : BI . emptyFn , columnSize : [ ] , minColumnSize : [ ] , maxColumnSize : [ ] , headerRowSize : 25 , footerRowSize : 25 , rowSize : 25 , regionColumnSize : [ ] , rowHeaderCreator : null , headerCellStyleGetter : BI . emptyFn , summaryCellStyleGetter : BI . emptyFn , sequenceCellStyleGetter : BI . emptyFn , header : [ ] , footer : ! 1 , items : [ ] , crossHeader : [ ] , crossItems : [ ] } ) } , _getVDeep : function ( ) { return this . options . crossHeader . length } , _getHDeep : function ( ) { var a = this . options ; return Math . max ( a . mergeCols . length , a . freezeCols . length , BI . TableTree . maxDeep ( a . items ) - 1 ) } , _createHeader : function ( a ) { var b = this . options , c = b . header || [ ] , d = b . crossHeader || [ ] , e = BI . TableTree . formatCrossItems ( b . crossItems , a , b . headerCellStyleGetter ) , f = [ ] ; if ( BI . each ( e , function ( a , b ) { var c = [ d [ a ] ] ; f . push ( c . concat ( b || [ ] ) ) } ) , c && c . length > 0 ) { var g = this . _formatColumns ( c ) , h = this . _getHDeep ( ) ; h <= 0 ? g . unshift ( b . rowHeaderCreator || { type : "bi.table_style_cell" , text : BI . i18nText ( "BI-Row_Header" ) , styleGetter : b . headerCellStyleGetter } ) : g [ 0 ] = b . rowHeaderCreator || { type : "bi.table_style_cell" , text : BI . i18nText ( "BI-Row_Header" ) , styleGetter : b . headerCellStyleGetter } , f . push ( g ) } return f } , _formatItems : function ( a , b , c ) { function d ( a , b ) { a . type || ( a . type = "bi.layer_tree_table_cell" ) , a . layer = b ; var c = [ a ] ; c = c . concat ( a . values || [ ] ) , c . length > 0 && f . push ( c ) , BI . isNotEmptyArray ( a . children ) && BI . each ( a . children , function ( a , c ) { d ( c , b + 1 ) } ) } var e = this . options , f = [ ] ; return BI . each ( a , function ( a , b ) { if ( BI . each ( b . children , function ( a , b ) { d ( b , 0 ) } ) , BI . isArray ( b . values ) ) { var c = [ { type : "bi.table_style_cell" , text : BI . i18nText ( "BI-Summary_Values" ) , styleGetter : function ( ) { return e . summaryCellStyleGetter ( ! 0 ) } } ] . concat ( b . values ) ; f . push ( c ) } } ) , BI . DynamicSummaryTreeTable . formatSummaryItems ( f , b , e . crossItems , 1 ) } , _formatColumns : function ( a , b ) { return BI . isNotEmptyArray ( a ) ? ( b = b || this . _getHDeep ( ) , a . slice ( Math . max ( 0 , b - 1 ) ) ) : a } , _formatFreezeCols : function ( ) { return this . options . freezeCols . length > 0 ? [ 0 ] : [ ] } , _formatColumnSize : function ( a , b ) { if ( a . length <= 0 ) return [ ] ; var c = [ 0 ] ; return b = b || this . _getHDeep ( ) , BI . each ( a , function ( a , d ) { return a < b ? void ( c [ 0 ] += d ) : void c . push ( d ) } ) , c } , _recomputeColumnSize : function ( ) { var a = this . options ; a . regionColumnSize = this . table . getRegionColumnSize ( ) ; var b = this . table . getColumnSize ( ) . slice ( ) ; if ( a . freezeCols . length > 1 ) for ( var c = 0 ; c < a . freezeCols . length - 1 ; c ++ ) b . splice ( 1 , 0 , 0 ) ; a . columnSize = b } , _digest : function ( ) { var a = this . options , b = this . _getHDeep ( ) , c = this . _getVDeep ( ) , d = this . _createHeader ( c ) , e = this . _formatItems ( a . items , d , b ) , f = a . columnSize . slice ( ) , g = a . minColumnSize . slice ( ) , h = a . maxColumnSize . slice ( ) ; return BI . removeAt ( f , e . deletedCols ) , BI . removeAt ( g , e . deletedCols ) , BI . removeAt ( h , e . deletedCols ) , { header : e . header , items : e . items , columnSize : this . _formatColumnSize ( f , b ) , minColumnSize : this . _formatColumns ( g , b ) , maxColumnSize : this . _formatColumns ( h , b ) , freezeCols : this . _formatFreezeCols ( ) } } , _init : function ( ) { BI . DynamicSummaryLayerTreeTable . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options , c = this . _digest ( ) ; this . table = BI . createWidget ( b . el , { type : "bi.resizable_table" , element : this , width : b . width , height : b . height , isNeedResize : b . isNeedResi
} , setValue : function ( a ) { } , getValue : function ( ) { } , _transformToTreeFormat : function ( a ) { var b , c ; if ( ! a ) return [ ] ; if ( BI . isArray ( a ) ) { var d = [ ] , e = [ ] ; for ( b = 0 , c = a . length ; b < c ; b ++ ) 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 ( a [ b ] ) ) : d . push ( a [ b ] ) ; return d } return [ a ] } , populate : function ( a ) { var b = this . options ; b . items = a || [ ] , this . empty ( ) , a = this . _transformToTreeFormat ( b . items ) , this . tree = new BI . Tree , this . tree . initTree ( a ) , this . svg = BI . createWidget ( { type : "bi.svg" } ) ; var c = this . _stratification ( ) ; if ( this . _isNeedAdjust ( ) ) { var d = this . _translate ( c ) ; d = this . _adjust ( d ) , this . _createBranches ( d ) } else { var d = this . _fill ( c ) ; this . _createBranches ( d ) } var e = BI . createWidget ( { type : "bi.layout" , width : this . _isVertical ( ) ? this . _calculateWidth ( ) : this . _calculateHeight ( ) , height : this . _isVertical ( ) ? this . _calculateHeight ( ) : this . _calculateWidth ( ) } ) ; BI . createWidget ( { type : "bi.absolute" , element : e , items : [ { el : this . svg , top : 0 , left : 0 , right : 0 , bottom : 0 } ] } ) , a = this . _isVertical ( ) ? [ { type : "bi.handstand_branch_tree" , expander : { direction : b . direction } , el : { layouts : [ { type : "bi.horizontal_adapt" , verticalAlign : b . align } ] } , items : a } ] : [ { type : "bi.branch_tree" , expander : { direction : b . direction } , el : { layouts : [ { type : "bi.vertical" } , { type : b . align === BI . HorizontalAlign . Left ? "bi.left" : "bi.right" } ] } , items : a } ] , BI . createWidget ( { type : "bi.adaptive" , element : e , items : a } ) , BI . createWidget ( { type : "bi.center_adapt" , scrollable : ! 0 , element : this , items : [ e ] } ) } } ) , BI . BranchRelation . EVENT _CHANGE = "BranchRelation.EVENT_CHANGE" , BI . shortcut ( "bi.branch_relation" , BI . BranchRelation ) , BI . HandStandBranchExpander = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . HandStandBranchExpander . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-handstand-branch-expander" , direction : BI . Direction . Top , logic : { dynamic : ! 0 } , el : { type : "bi.label" } , popup : { } } ) } , _init : function ( ) { BI . HandStandBranchExpander . superclass . _init . apply ( this , arguments ) ; var a = this . options ; this . _initExpander ( ) , this . _initBranchView ( ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( BI . LogicFactory . createLogicTypeByDirection ( a . direction ) , BI . extend ( { } , a . logic , { items : BI . LogicFactory . createLogicItemsByDirection ( a . direction , { type : "bi.center_adapt" , items : [ this . expander ] } , this . branchView ) } ) ) ) ) } , _initExpander : function ( ) { var a = this , b = this . options ; this . expander = BI . createWidget ( b . el ) , this . expander . on ( BI . Controller . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) } , _initBranchView : function ( ) { var a = this , b = this . options ; this . branchView = BI . createWidget ( b . popup , { } ) , this . branchView . on ( BI . Controller . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) } , populate : function ( a ) { this . branchView . populate . apply ( this . branchView , arguments ) } , getValue : function ( ) { return this . branchView . getValue ( ) } } ) , BI . HandStandBranchExpander . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.handstand_branch_expander" , BI . HandStandBranchExpander ) , BI . BranchExpander = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . BranchExpander . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-branch-expander" , direction : BI . Direction . Left , logic : { dynamic : ! 0 } , el : { } , popup : { } } ) } , _init : function ( ) { BI . BranchExpander . superclass . _init . apply ( this , arguments ) ; var a = this . options ; this . _initExpander ( ) , this . _initBranchView ( ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( BI . LogicFactory . createLogicTypeByDirection ( a . direction ) , BI . extend ( { } , a . logic , { items : BI . LogicFactory . createLogicItemsByDirection ( a . direction , this . expander , this . branchView ) } ) ) ) ) } , _initExpander : function ( ) { var a = this , b = this . options ; this . expander = BI . createWidget ( b . el , { type : "bi.label" , width : 30 , height : "100%" } ) , this . expander . on ( BI . Controller . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) } , _initBranchView : function ( ) { var a = this , b = this . options ; this . branchView = BI . createWidget ( b . popup , { } ) , this . branchView . on ( BI . Controller . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) } , populate : function ( a ) { this . branchView . populate . apply ( this . branchView
} return ! 1 } , _isArrangeFine : function ( a ) { switch ( this . options . layoutType ) { case BI . Arrangement . LAYOUT _TYPE . FREE : return ! 0 ; case BI . Arrangement . LAYOUT _TYPE . GRID : } return ! 0 } , _getRegionNames : function ( a ) { var b = [ ] ; return BI . each ( a || this . regions , function ( a , c ) { b . push ( c . id || c . attr ( "id" ) ) } ) , b } , _getRegionsByNames : function ( a , b ) { if ( a = BI . isArray ( a ) ? a : [ a ] , b = b || this . regions , BI . isArray ( b ) ) { var c = [ ] ; BI . each ( b , function ( b , d ) { a . contains ( d . id || d . attr ( "id" ) ) && c . push ( d ) } ) } else { var c = { } ; BI . each ( a , function ( a , d ) { c [ d ] = b [ d ] } ) } return c } , _cloneRegion : function ( a ) { var b = { } ; return BI . each ( a || this . regions , function ( a , c ) { b [ a ] = { } , b [ a ] . el = c . el , b [ a ] . id = c . id , b [ a ] . left = c . left , b [ a ] . top = c . top , b [ a ] . width = c . width , b [ a ] . height = c . height } ) , b } , _test : function ( a ) { return ! BI . any ( a || this . regions , function ( a , b ) { if ( BI . isNaN ( b . width ) || BI . isNaN ( b . height ) || b . width <= 21 || b . height <= 21 ) return ! 0 } ) } , _getScrollOffset : function ( ) { return { left : this . container . element [ 0 ] . scrollLeft , top : this . container . element [ 0 ] . scrollTop } } , _createOneRegion : function ( a ) { var b = BI . createWidget ( a . el ) ; return b . setVisible ( ! 0 ) , { id : b . attr ( "id" ) , left : a . left , top : a . top , width : a . width , height : a . height , el : b } } , _applyRegion : function ( a ) { this . options ; BI . each ( a || this . regions , function ( a , b ) { b . el . element . css ( { left : b . left , top : b . top , width : b . width , height : b . height } ) } ) , this . _applyContainer ( ) , this . ratio = this . getLayoutRatio ( ) } , _renderRegion : function ( ) { var a = BI . toArray ( this . regions ) ; BI . each ( a , function ( a , b ) { BI . isNotNull ( b . el ) ? b . el . options . key = b . id : b . key = b . id } ) , BI . isNull ( this . wrapper ) && ( this . wrapper = BI . createWidget ( { type : "bi.absolute" , element : this . container } ) ) , this . wrapper . addItems ( a ) } , getClientWidth : function ( ) { return this . container . element [ 0 ] . clientWidth } , getClientHeight : function ( ) { return this . container . element [ 0 ] . clientHeight } , _applyContainer : function ( ) { var a = this . _getRegionOccupied ( ) ; return a } , _modifyRegion : function ( a ) { BI . each ( this . regions , function ( b , c ) { a [ b ] && ( c . left = a [ b ] . left , c . top = a [ b ] . top , c . width = a [ b ] . width , c . height = a [ b ] . height ) } ) } , _addRegion : function ( a ) { var b = this . _createOneRegion ( a ) ; this . regions [ b . id ] = b , BI . createWidget ( { type : "bi.absolute" , element : this . container , items : [ b ] } ) } , _deleteRegionByName : function ( a ) { this . regions [ a ] . el . setVisible ( ! 1 ) , delete this . regions [ a ] } , _setArrangeSize : function ( a ) { this . arrangement . element . css ( { left : a . left , top : a . top , width : a . width , height : a . height } ) } , _getOneWidthPortion : function ( ) { return this . getClientWidth ( ) / BI . Arrangement . PORTION } , _getOneHeightPortion : function ( ) { return this . getClientHeight ( ) / BI . Arrangement . H _PORTION } , _getGridPositionAndSize : function ( a ) { var b = this . _getOneWidthPortion ( ) , c = this . _getOneHeightPortion ( ) , d = Math . round ( a . width / b ) , e = Math . round ( a . left / b ) , f = Math . round ( a . top / c ) , g = Math . round ( a . height / c ) ; return 0 === d && ( d = 1 ) , 0 === g && ( g = 1 ) , { x : e , y : f , w : d , h : g } } , _getBlockPositionAndSize : function ( a ) { var b = this . _getOneWidthPortion ( ) , c = this . _getOneHeightPortion ( ) ; return { left : a . x * b , top : a . y * c , width : a . w * b , height : a . h * c } } , _getLayoutsByRegions : function ( a ) { var b = this , c = [ ] ; return BI . each ( a || this . regions , function ( a , d ) { c . push ( BI . extend ( b . _getGridPositionAndSize ( d ) , { i : d . id } ) ) } ) , c } , _getLayoutIndexByName : function ( a , b ) { return BI . findIndex ( a , function ( a , c ) { return c . i === b } ) } , _setBlockPositionAndSize : function ( a ) { this . block . element . css ( { left : a . left , top : a . top , width : a . width , height : a . height } ) } , _getRegionsByLayout : function ( a ) { var b = this , c = { } ; return BI . each ( a , function ( a , d ) { c [ d . i ] = BI . extend ( b . _getBlockPositionAndSize ( d ) , { id : d . i } ) } ) , c } , _setRegionsByLayout : function ( a , b ) { var c = this ; return a || ( a = this . regions ) , BI . each ( b , function ( b , d ) { a [ d . i ] && BI . extend ( a [ d . i ] , c . _getBlockPositionAndSize ( d ) ) } ) , a } , _moveElement : function ( a , b , c , d , e ) { function f ( a , b ) { return BI . filter ( a , function ( a , c ) { return g . _collides ( c , b ) } ) } var g = this ; if ( b . _static ) return a ; if ( b . y === d && b . x === c ) return a ; var h = d && b . y > d ; "number" == typeof c && ( b . x = c ) , "number" == typeof d && ( b . y = d ) , b . moved = ! 0 ; var i = this . _sortLayoutItemsByRowCol ( a ) ; h && ( i = i . reverse ( ) ) ; for ( var j = f ( i , b ) , k = 0 , l = j . length ; k < l ; k ++ ) { var m = j [ k ] ; m . moved || b . y > m . y && b . y - m . y > m . h / 4 || ( a = m . _static ? this . _moveElementAwayFromCollision ( a , m , b , e ) : this . _moveElementAwayFromCollision ( a , b , m , e ) ) } return a } , _sortLayoutItemsByRowCol : function ( a ) { return [ ] . concat ( a ) . sort ( func
this . calendar . setValue ( a ) , this . selectedTime = a } , _setDatePicker : function ( a ) { BI . isNull ( a ) || BI . isNull ( a . year ) || BI . isNull ( a . month ) ? this . datePicker . setValue ( this . _getNewCurrentDate ( ) ) : this . datePicker . setValue ( a ) } , _setCalendar : function ( a ) { BI . isNull ( a ) || BI . isNull ( a . day ) ? ( this . calendar . empty ( ) , this . _setCalenderValue ( this . _getNewCurrentDate ( ) ) ) : this . _setCalenderValue ( a ) } , setValue : function ( a ) { this . _setDatePicker ( a ) , this . _setCalendar ( a ) } , getValue : function ( ) { return this . selectedTime } } ) , BI . shortcut ( "bi.date_pane" , BI . DatePaneWidget ) , BI . DateTimeCombo = BI . inherit ( BI . Single , { constants : { popupHeight : 290 , popupWidth : 270 , comboAdjustHeight : 1 , border : 1 , DATE _MIN _VALUE : "1900-01-01" , DATE _MAX _VALUE : "2099-12-31" } , _defaultConfig : function ( ) { return BI . extend ( BI . DateTimeCombo . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-date-time-combo bi-border" , width : 200 , height : 24 } ) } , _init : function ( ) { BI . DateTimeCombo . superclass . _init . apply ( this , arguments ) ; var a = this , b = ( this . options , Date . getDate ( ) ) ; this . storeValue = { year : b . getFullYear ( ) , month : b . getMonth ( ) , day : b . getDate ( ) , hour : b . getHours ( ) , minute : b . getMinutes ( ) , second : b . getSeconds ( ) } , this . trigger = BI . createWidget ( { type : "bi.date_time_trigger" , min : this . constants . DATE _MIN _VALUE , max : this . constants . DATE _MAX _VALUE } ) , this . popup = BI . createWidget ( { type : "bi.date_time_popup" , min : this . constants . DATE _MIN _VALUE , max : this . constants . DATE _MAX _VALUE } ) , a . setValue ( this . storeValue ) , this . popup . on ( BI . DateTimePopup . BUTTON _CANCEL _EVENT _CHANGE , function ( ) { a . setValue ( a . storeValue ) , a . hidePopupView ( ) , a . fireEvent ( BI . DateTimeCombo . EVENT _CANCEL ) } ) , this . popup . on ( BI . DateTimePopup . BUTTON _OK _EVENT _CHANGE , function ( ) { a . storeValue = a . popup . getValue ( ) , a . setValue ( a . storeValue ) , a . hidePopupView ( ) , a . fireEvent ( BI . DateTimeCombo . EVENT _CONFIRM ) } ) , this . popup . on ( BI . DateTimePopup . CALENDAR _EVENT _CHANGE , function ( ) { a . trigger . setValue ( a . popup . getValue ( ) ) , a . fireEvent ( BI . DateTimeCombo . EVENT _CHANGE ) } ) , this . combo = BI . createWidget ( { type : "bi.combo" , toggle : ! 1 , isNeedAdjustHeight : ! 1 , isNeedAdjustWidth : ! 1 , el : this . trigger , adjustLength : this . constants . comboAdjustHeight , popup : { el : this . popup , maxHeight : this . constants . popupHeight , width : this . constants . popupWidth , stopPropagation : ! 1 } } ) , this . combo . on ( BI . Combo . EVENT _BEFORE _POPUPVIEW , function ( ) { a . popup . setValue ( a . storeValue ) , a . fireEvent ( BI . DateTimeCombo . EVENT _BEFORE _POPUPVIEW ) } ) ; var c = BI . createWidget ( { type : "bi.icon_button" , cls : "bi-trigger-icon-button date-font bi-border-right" , width : 24 , height : 24 } ) ; c . on ( BI . TriggerIconButton . EVENT _CHANGE , function ( ) { a . combo . isViewVisible ( ) ? a . combo . hideView ( ) : a . combo . showView ( ) } ) , BI . createWidget ( { type : "bi.htape" , element : this , items : [ { type : "bi.absolute" , items : [ { el : this . combo , top : 0 , left : 0 , right : 0 , bottom : 0 } , { el : c , top : 0 , left : 0 } ] } ] } ) } , setValue : function ( a ) { this . storeValue = a , this . popup . setValue ( a ) , this . trigger . setValue ( a ) } , getValue : function ( ) { return this . storeValue } , hidePopupView : function ( ) { this . combo . hideView ( ) } } ) , BI . DateTimeCombo . EVENT _CANCEL = "EVENT_CANCEL" , BI . DateTimeCombo . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . DateTimeCombo . EVENT _CHANGE = "EVENT_CHANGE" , BI . DateTimeCombo . EVENT _BEFORE _POPUPVIEW = "BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW" , BI . shortcut ( "bi.date_time_combo" , BI . DateTimeCombo ) , BI . DateTimePopup = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . DateTimePopup . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-date-time-popup" , width : 268 , height : 290 } ) } , _init : function ( ) { BI . DateTimePopup . superclass . _init . apply ( this , arguments ) ; var a = this ; this . options ; this . cancelButton = BI . createWidget ( { type : "bi.text_button" , forceCenter : ! 0 , cls : "multidate-popup-button bi-border-top bi-border-right" , shadow : ! 0 , text : BI . i18nText ( "BI-Basic_Cancel" ) } ) , this . cancelButton . on ( BI . TextButton . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . DateTimePopup . BUTTON _CANCEL _EVENT _CHANGE ) } ) , this . okButton = BI . createWidget ( { type : "bi.text_button" , forceCenter : ! 0 , cls : "multidate-popup-button bi-border-top" , shadow : ! 0 , text : BI . i18nText ( "BI-Basic_OK" ) } ) , this . okButton . on ( BI . TextButton . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . DateTimePopup . BUTTON _OK _EVENT _CHANGE ) } ) , this . dateCombo = BI . createWidget ( { type : "bi.date_calendar_popup" , min : a . options . min , max : a . options . max
return this . button _group . getNotSelectedValue ( ) } , getAllLeaves : function ( ) { return this . button _group . getAllLeaves ( ) } , getAllButtons : function ( ) { return this . button _group . getAllButtons ( ) } , getSelectedButtons : function ( ) { return this . button _group . getSelectedButtons ( ) } , getNotSelectedButtons : function ( ) { return this . button _group . getNotSelectedButtons ( ) } , populate : function ( a ) { this . button _group . populate ( this . _formatItems ( a ) ) } } ) , BI . FileManagerButtonGroup . EVENT _CHANGE = "FileManagerButtonGroup.EVENT_CHANGE" , BI . shortcut ( "bi.file_manager_button_group" , BI . FileManagerButtonGroup ) , BI . FileManager = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . FileManager . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-file-manager" , el : { } , items : [ ] } ) } , _init : function ( ) { BI . FileManager . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . tree = new BI . Tree ; var c = BI . Tree . transformToTreeFormat ( b . items ) ; this . tree . initTree ( c ) , this . selectedValues = [ ] , this . nav = BI . createWidget ( { type : "bi.file_manager_nav" , items : BI . deepClone ( c ) } ) , this . nav . on ( BI . FileManagerNav . EVENT _CHANGE , function ( b , c ) { if ( "-1" == b ) a . populate ( { children : a . tree . toJSON ( ) } ) ; else { var d = a . tree . search ( c . attr ( "id" ) ) ; a . populate ( BI . extend ( { id : d . id } , d . get ( "data" ) , { children : a . tree . toJSON ( d ) } ) ) } a . setValue ( a . selectedValues ) } ) , this . list = BI . createWidget ( b . el , { type : "bi.file_manager_list" , items : c } ) , this . list . on ( BI . Controller . EVENT _CHANGE , function ( b , c , d ) { if ( b === BI . Events . CHANGE ) { var e = a . tree . search ( d . attr ( "id" ) ) ; a . populate ( BI . extend ( { id : e . id } , e . get ( "data" ) , { children : a . tree . toJSON ( e ) } ) ) } else if ( b === BI . Events . CLICK ) { var f = [ ] ; if ( d instanceof BI . MultiSelectBar ) { var g = a . list . getValue ( ) ; c = g . type === BI . Selection . All , f = BI . concat ( g . assist , g . value ) } else f = d . getAllLeaves ( ) ; BI . each ( f , function ( b , d ) { c === ! 0 ? a . selectedValues . pushDistinct ( d ) : a . selectedValues . remove ( d ) } ) } a . setValue ( a . selectedValues ) } ) , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : this . list , left : 0 , right : 0 , top : 0 , bottom : 10 } , { el : this . nav , left : 40 , right : 100 , top : 0 } ] } ) } , setValue : function ( a ) { this . selectedValues = a || [ ] , this . list . setValue ( this . selectedValues ) } , getValue : function ( ) { var a = this . list . getValue ( ) , b = a . type === BI . Selection . All ? a . assist : a . value ; return b . pushDistinctArray ( this . selectedValues ) , b } , _populate : function ( a ) { this . list . populate ( a ) } , getSelectedValue : function ( ) { return this . nav . getValue ( ) [ 0 ] } , getSelectedId : function ( ) { return this . nav . getId ( ) [ 0 ] } , populate : function ( a ) { var b = BI . deepClone ( a ) ; this . _populate ( a . children ) , this . nav . populate ( b ) } } ) , BI . FileManager . EVENT _CHANGE = "FileManager.EVENT_CHANGE" , BI . shortcut ( "bi.file_manager" , BI . FileManager ) , BI . FileManagerFileItem = BI . inherit ( BI . Single , { _defaultConfig : function ( ) { return BI . extend ( BI . FileManagerFileItem . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-file-manager-file-item bi-list-item bi-border-bottom" , height : 30 } ) } , _init : function ( ) { BI . FileManagerFileItem . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . checked = BI . createWidget ( { type : "bi.multi_select_bar" , text : "" , width : 36 , height : b . height } ) , this . checked . on ( BI . Controller . EVENT _CHANGE , function ( ) { arguments [ 2 ] = a , a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , BI . createWidget ( { type : "bi.htape" , element : this , items : [ { el : this . checked , width : 36 } , { el : { type : "bi.icon_button" , cls : "create-by-me-file-font" } , width : 20 } , { el : { type : "bi.label" , textAlign : "left" , height : b . height , text : b . text , value : b . value } } ] } ) } , getAllLeaves : function ( ) { return [ this . options . value ] } , isSelected : function ( ) { return this . checked . isSelected ( ) } , setSelected : function ( a ) { this . checked . setSelected ( a ) } } ) , BI . FileManagerFileItem . EVENT _CHANGE = "FileManagerFileItem.EVENT_CHANGE" , BI . shortcut ( "bi.file_manager_file_item" , BI . FileManagerFileItem ) , BI . FileManagerFolderItem = BI . inherit ( BI . Single , { _defaultConfig : function ( ) { return BI . extend ( BI . FileManagerFolderItem . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-file-manager-folder-item bi-list-item bi-border-bottom" , height : 30 } ) } , _init : function ( ) { BI . FileManagerFolderItem . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . checked = BI . createWidget ( { type : "bi.multi_select_bar" , text : "" , width : 36 , heigh
} } ) , BI . MonthCombo = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . MonthCombo . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-month-combo" , behaviors : { } , height : 25 } ) } , _init : function ( ) { BI . MonthCombo . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . trigger = BI . createWidget ( { type : "bi.month_trigger" } ) , this . trigger . on ( BI . MonthTrigger . EVENT _CONFIRM , function ( b ) { a . combo . isViewVisible ( ) || ( this . getKey ( ) && this . getKey ( ) !== a . storeValue ? a . setValue ( this . getValue ( ) ) : this . getKey ( ) || a . setValue ( ) , a . fireEvent ( BI . MonthCombo . EVENT _CONFIRM ) ) } ) , this . trigger . on ( BI . MonthTrigger . EVENT _FOCUS , function ( ) { a . storeValue = this . getKey ( ) } ) , this . trigger . on ( BI . MonthTrigger . EVENT _START , function ( ) { a . combo . hideView ( ) } ) , this . trigger . on ( BI . MonthTrigger . EVENT _STOP , function ( ) { a . combo . isViewVisible ( ) || a . combo . showView ( ) } ) , this . popup = BI . createWidget ( { type : "bi.month_popup" , behaviors : b . behaviors } ) , this . popup . on ( BI . MonthPopup . EVENT _CHANGE , function ( ) { a . setValue ( a . popup . getValue ( ) ) , a . combo . hideView ( ) , a . fireEvent ( BI . MonthCombo . EVENT _CONFIRM ) } ) , this . combo = BI . createWidget ( { type : "bi.combo" , element : this , isNeedAdjustHeight : ! 1 , isNeedAdjustWidth : ! 1 , el : this . trigger , popup : { minWidth : 85 , el : this . popup } } ) , this . combo . on ( BI . Combo . EVENT _BEFORE _POPUPVIEW , function ( ) { a . fireEvent ( BI . MonthCombo . EVENT _BEFORE _POPUPVIEW ) } ) } , setValue : function ( a ) { this . trigger . setValue ( a ) , this . popup . setValue ( a ) } , getValue : function ( ) { return this . popup . getValue ( ) } } ) , BI . MonthCombo . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . MonthCombo . EVENT _BEFORE _POPUPVIEW = "EVENT_BEFORE_POPUPVIEW" , BI . shortcut ( "bi.month_combo" , BI . MonthCombo ) , BI . MonthPopup = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . MonthPopup . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-month-popup" , behaviors : { } } ) } , _init : function ( ) { BI . MonthPopup . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options , c = [ 0 , 6 , 1 , 7 , 2 , 8 , 3 , 9 , 4 , 10 , 5 , 11 ] , d = [ ] ; d . push ( c . slice ( 0 , 2 ) ) , d . push ( c . slice ( 2 , 4 ) ) , d . push ( c . slice ( 4 , 6 ) ) , d . push ( c . slice ( 6 , 8 ) ) , d . push ( c . slice ( 8 , 10 ) ) , d . push ( c . slice ( 10 , 12 ) ) , d = BI . map ( d , function ( a , b ) { return BI . map ( b , function ( a , b ) { return { type : "bi.text_item" , cls : "bi-list-item-active" , textAlign : "center" , whiteSpace : "nowrap" , once : ! 1 , forceSelected : ! 0 , height : 23 , width : 38 , value : b , text : b + 1 } } ) } ) , this . month = BI . createWidget ( { type : "bi.button_group" , element : this , behaviors : b . behaviors , items : BI . createItems ( d , { } ) , layouts : [ BI . LogicFactory . createLogic ( "table" , BI . extend ( { dynamic : ! 0 } , { columns : 2 , rows : 6 , columnSize : [ . 5 , . 5 ] , rowSize : 25 } ) ) , { type : "bi.center_adapt" , vgap : 1 , hgap : 2 } ] } ) , this . month . on ( BI . Controller . EVENT _CHANGE , function ( b ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , b === BI . Events . CLICK && a . fireEvent ( BI . MonthPopup . EVENT _CHANGE ) } ) } , getValue : function ( ) { return this . month . getValue ( ) [ 0 ] } , setValue : function ( a ) { this . month . setValue ( [ a ] ) } } ) , BI . MonthPopup . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.month_popup" , BI . MonthPopup ) , BI . MonthTrigger = BI . inherit ( BI . Trigger , { _const : { hgap : 4 , vgap : 2 , errorText : BI . i18nText ( "BI-Month_Trigger_Error_Text" ) } , _defaultConfig : function ( ) { return BI . extend ( BI . MonthTrigger . superclass . _defaultConfig . apply ( this , arguments ) , { extraCls : "bi-month-trigger bi-border" , height : 24 } ) } , _init : function ( ) { BI . MonthTrigger . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options , c = this . _const ; this . editor = BI . createWidget ( { type : "bi.sign_editor" , height : b . height , validationChecker : function ( a ) { return "" === a || BI . isPositiveInteger ( a ) && a >= 1 && a <= 12 } , quitChecker : function ( a ) { return ! 1 } , hgap : c . hgap , vgap : c . vgap , allowBlank : ! 0 , errorText : c . errorText } ) , this . editor . on ( BI . SignEditor . EVENT _FOCUS , function ( ) { a . fireEvent ( BI . MonthTrigger . EVENT _FOCUS ) } ) , this . editor . on ( BI . SignEditor . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . MonthTrigger . EVENT _CHANGE ) } ) , this . editor . on ( BI . SignEditor . EVENT _CONFIRM , function ( ) { var b = a . editor . getValue ( ) ; BI . isNotNull ( b ) && ( a . editor . setValue ( b ) , a . editor . setTitle ( b ) ) , a . fireEvent ( BI . MonthTrigger . EVENT _CONFIRM ) } ) , this . editor . on ( BI . SignEditor . EVENT _SPACE , function ( ) { a . editor . isValid ( ) && a . editor . blur ( ) } ) , this . editor . on ( BI . SignEditor . EVENT _START , function ( ) { a . fireEvent ( BI . MonthTrigger . EVENT _START ) } ) , this . editor . on ( BI . SignEdit
f . type = "bi.multilayer_select_tree_last_plus_group_node" ; break ; default : f . type = "bi.multilayer_select_tree_mid_plus_group_node" } BI . defaults ( e , f ) , c . _formatItems ( e . children , b + 1 ) } else { switch ( d ) { case a . length - 1 : f . type = "bi.multilayer_single_tree_last_tree_leaf_item" ; break ; default : f . type = "bi.multilayer_single_tree_mid_tree_leaf_item" } BI . defaults ( e , f ) } } ) , a } , _assertId : function ( a ) { BI . each ( a , function ( a , b ) { b . id = b . id || BI . UUID ( ) } ) } , initTree : function ( a ) { var b = this , c = this . options ; this . empty ( ) , this . _assertId ( a ) , this . tree = BI . createWidget ( { type : "bi.custom_tree" , element : this , expander : { type : "bi.select_tree_expander" , isDefaultInit : c . isDefaultInit , el : { } , popup : { type : "bi.custom_tree" } } , items : this . _formatItems ( BI . Tree . transformToTreeFormat ( a ) , 0 ) , itemsCreator : c . itemsCreator , el : { type : "bi.button_tree" , chooseType : BI . Selection . Single , layouts : [ { type : "bi.vertical" } ] } } ) , this . tree . on ( BI . Controller . EVENT _CHANGE , function ( a ) { b . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , a === BI . Events . CLICK && b . fireEvent ( BI . MultiLayerSelectLevelTree . EVENT _CHANGE , arguments ) } ) } , populate : function ( a ) { this . tree . populate ( this . _formatItems ( BI . Tree . transformToTreeFormat ( a ) , 0 ) ) } , setValue : function ( a ) { this . tree . setValue ( a ) } , getValue : function ( ) { return this . tree . getValue ( ) } , getAllLeaves : function ( ) { return this . tree . getAllLeaves ( ) } , getNodeById : function ( a ) { return this . tree . getNodeById ( a ) } , getNodeByValue : function ( a ) { return this . tree . getNodeByValue ( a ) } } ) , BI . MultiLayerSelectLevelTree . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.multilayer_select_level_tree" , BI . MultiLayerSelectLevelTree ) , BI . MultiLayerSelectTreePopup = BI . inherit ( BI . Pane , { _defaultConfig : function ( ) { return BI . extend ( BI . MultiLayerSelectTreePopup . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multilayer-select-tree-popup" , tipText : BI . i18nText ( "BI-No_Selected_Item" ) , isDefaultInit : ! 1 , itemsCreator : BI . emptyFn , items : [ ] } ) } , _init : function ( ) { BI . MultiLayerSelectTreePopup . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . tree = BI . createWidget ( { type : "bi.multilayer_select_level_tree" , isDefaultInit : b . isDefaultInit , items : b . items , itemsCreator : b . itemsCreator } ) , BI . createWidget ( { type : "bi.vertical" , scrolly : ! 1 , scrollable : ! 0 , element : this , items : [ this . tree ] } ) , this . tree . on ( BI . Controller . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . tree . on ( BI . MultiLayerSelectLevelTree . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . MultiLayerSelectTreePopup . EVENT _CHANGE ) } ) , this . check ( ) } , getValue : function ( ) { return this . tree . getValue ( ) } , setValue : function ( a ) { a = BI . isArray ( a ) ? a : [ a ] , this . tree . setValue ( a ) } , populate : function ( a ) { BI . MultiLayerSelectTreePopup . superclass . populate . apply ( this , arguments ) , this . tree . populate ( a ) } } ) , BI . MultiLayerSelectTreePopup . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.multilayer_select_tree_popup" , BI . MultiLayerSelectTreePopup ) , BI . MultiLayerSelectTreeFirstPlusGroupNode = BI . inherit ( BI . NodeButton , { _defaultConfig : function ( ) { var a = BI . MultiLayerSelectTreeFirstPlusGroupNode . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { extraCls : "bi-multilayer-select-tree-first-plus-group-node bi-list-item-active" , layer : 0 , id : "" , pId : "" , readonly : ! 0 , open : ! 1 , height : 25 } ) } , _init : function ( ) { BI . MultiLayerSelectTreeFirstPlusGroupNode . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . node = BI . createWidget ( { type : "bi.select_tree_first_plus_group_node" , cls : "bi-list-item-none" , stopPropagation : ! 0 , logic : { dynamic : ! 0 } , id : b . id , pId : b . pId , open : b . open , height : b . height , hgap : b . hgap , text : b . text , value : b . value , py : b . py } ) , this . node . on ( BI . Controller . EVENT _CHANGE , function ( b ) { a . setSelected ( a . isSelected ( ) ) , a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) ; var c = [ ] ; BI . count ( 0 , b . layer , function ( ) { c . push ( { type : "bi.layout" , cls : "base-line-conn-background" , width : 13 , height : b . height } ) } ) , c . push ( this . node ) , BI . createWidget ( { type : "bi.td" , element : this , columnSize : BI . makeArray ( b . layer , 13 ) , items : [ c ] } ) } , isOnce : function ( ) { return ! 0 } , doRedMark : function ( ) { this . node . doRedMark . apply ( this . node , arguments ) } , unRedMark : function ( ) { this . node . unRedMark . apply ( this . node , arguments ) } , isSelected : function ( ) { return this . node . isSelected ( ) } , setSelected : func
} ) } , _init : function ( ) { BI . MultiSelectCombo . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options , c = function ( ) { BI . isKey ( a . _startValue ) && a . storeValue . value [ a . storeValue . type === BI . Selection . All ? "remove" : "pushDistinct" ] ( a . _startValue ) , a . trigger . getSearcher ( ) . setState ( a . storeValue ) , a . trigger . getCounter ( ) . setButtonChecked ( a . storeValue ) } ; this . storeValue = { } , this . requesting = ! 1 , this . trigger = BI . createWidget ( { type : "bi.multi_select_trigger" , height : b . height , masker : { offset : { left : 1 , top : 1 , right : 2 , bottom : 33 } } , valueFormatter : b . valueFormatter , itemsCreator : function ( c , d ) { b . itemsCreator ( c , function ( b ) { 1 === c . times && BI . isNotNull ( c . keywords ) && a . trigger . setValue ( BI . deepClone ( a . getValue ( ) ) ) , d . apply ( a , arguments ) } ) } } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _START , function ( ) { a . _setStartValue ( "" ) , this . getSearcher ( ) . setValue ( a . storeValue ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _STOP , function ( ) { a . _setStartValue ( "" ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _PAUSE , function ( ) { if ( this . getSearcher ( ) . hasMatched ( ) ) { var b = this . getSearcher ( ) . getKeyword ( ) ; a . _join ( { type : BI . Selection . Multi , value : [ b ] } , function ( ) { a . combo . setValue ( a . storeValue ) , a . _setStartValue ( b ) , c ( ) , a . populate ( ) , a . _setStartValue ( "" ) } ) } } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _SEARCHING , function ( b ) { var d = BI . last ( b ) ; b = BI . initial ( b || [ ] ) , b . length > 0 && a . _joinKeywords ( b , function ( ) { BI . isEndWithBlank ( d ) ? ( a . combo . setValue ( a . storeValue ) , c ( ) , a . combo . populate ( ) , a . _setStartValue ( "" ) ) : ( a . combo . setValue ( a . storeValue ) , c ( ) ) } ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _CHANGE , function ( b , d ) { d instanceof BI . MultiSelectBar ? a . _joinAll ( this . getValue ( ) , function ( ) { c ( ) } ) : a . _join ( this . getValue ( ) , function ( ) { c ( ) } ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _BEFORE _COUNTER _POPUPVIEW , function ( ) { this . getCounter ( ) . setValue ( a . storeValue ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _COUNTER _CLICK , function ( ) { a . combo . isViewVisible ( ) || a . combo . showView ( ) } ) , this . combo = BI . createWidget ( { type : "bi.combo" , toggle : ! 1 , el : this . trigger , adjustLength : 1 , popup : { type : "bi.multi_select_popup_view" , ref : function ( ) { a . popup = this , a . trigger . setAdapter ( this ) } , listeners : [ { eventName : BI . MultiSelectPopupView . EVENT _CHANGE , action : function ( ) { a . storeValue = this . getValue ( ) , a . _adjust ( function ( ) { c ( ) } ) } } , { eventName : BI . MultiSelectPopupView . EVENT _CLICK _CONFIRM , action : function ( ) { a . _defaultState ( ) } } , { eventName : BI . MultiSelectPopupView . EVENT _CLICK _CLEAR , action : function ( ) { a . setValue ( ) , a . _defaultState ( ) } } ] , itemsCreator : b . itemsCreator , valueFormatter : b . valueFormatter , onLoaded : function ( ) { BI . nextTick ( function ( ) { a . combo . adjustWidth ( ) , a . combo . adjustHeight ( ) , a . trigger . getCounter ( ) . adjustView ( ) , a . trigger . getSearcher ( ) . adjustView ( ) } ) } } , hideChecker : function ( a ) { return 0 === d . element . find ( a . target ) . length } } ) , this . combo . on ( BI . Combo . EVENT _BEFORE _POPUPVIEW , function ( ) { this . setValue ( a . storeValue ) , BI . nextTick ( function ( ) { a . populate ( ) } ) } ) , this . wants2Quit = ! 1 , this . combo . on ( BI . Combo . EVENT _AFTER _HIDEVIEW , function ( ) { a . trigger . stopEditing ( ) , a . requesting === ! 0 ? a . wants2Quit = ! 0 : a . fireEvent ( BI . MultiSelectCombo . EVENT _CONFIRM ) } ) ; var d = BI . createWidget ( { type : "bi.trigger_icon_button" , width : b . height , height : b . height , cls : "multi-select-trigger-icon-button bi-border-left" } ) ; d . on ( BI . TriggerIconButton . EVENT _CHANGE , function ( ) { a . trigger . getCounter ( ) . hideView ( ) , a . combo . isViewVisible ( ) ? a . combo . hideView ( ) : a . combo . showView ( ) } ) , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : this . combo , left : 0 , right : 0 , top : 0 , bottom : 0 } , { el : d , right : 0 , top : 0 , bottom : 0 } ] } ) } , _defaultState : function ( ) { this . trigger . stopEditing ( ) , this . combo . hideView ( ) } , _assertValue : function ( a ) { a || ( a = { } ) , a . type || ( a . type = BI . Selection . Multi ) , a . value || ( a . value = [ ] ) } , _makeMap : function ( a ) { return BI . makeObject ( a || [ ] ) } , _joinKeywords : function ( a , b ) { function c ( c ) { var e = d . _makeMap ( c ) ; BI . each ( a , function ( a , b ) { BI . isNotNull ( e [ b ] ) && d . storeValue . value [ d . storeValue . type === BI . Selection . Multi ? "pushDistinct" : "remove" ] ( b ) } ) , d . _adjust ( b ) } var d = this , e = this . options ; this . _assertValue ( this . storeValue ) , this . requesting = ! 0 , e . itemsCreator ( { type : BI . MultiSelectCombo . REQ _GET _ALL _DATA , keywords : a } , function ( a ) { var b = BI . pluck ( a . items , "value" ) ; c ( b ) } ) } , _joinAll : function ( a , b ) { v
this . adapter . populate . apply ( this . adapter , arguments ) , this . trigger . populate . apply ( this . trigger , arguments ) } } ) , BI . extend ( BI . MultiSelectInsertList , { REQ _GET _DATA _LENGTH : 0 , REQ _GET _ALL _DATA : - 1 } ) , BI . MultiSelectInsertList . EVENT _CHANGE = "BI.MultiSelectInsertList.EVENT_CHANGE" , BI . shortcut ( "bi.multi_select_insert_list" , BI . MultiSelectInsertList ) , BI . MultiSelectList = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . MultiSelectList . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multi-select-list" , itemsCreator : BI . emptyFn , valueFormatter : BI . emptyFn } ) } , _init : function ( ) { BI . MultiSelectList . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . storeValue = { } ; var c = function ( ) { BI . isKey ( a . _startValue ) && a . storeValue . value [ a . storeValue . type === BI . Selection . All ? "remove" : "pushDistinct" ] ( a . _startValue ) } ; this . adapter = BI . createWidget ( { type : "bi.multi_select_loader" , cls : "popup-multi-select-list bi-border-left bi-border-right bi-border-bottom" , itemsCreator : b . itemsCreator , valueFormatter : b . valueFormatter , logic : { dynamic : ! 1 } , el : { } } ) , this . adapter . on ( BI . MultiSelectLoader . EVENT _CHANGE , function ( ) { a . storeValue = this . getValue ( ) , a . _adjust ( function ( ) { c ( ) , a . fireEvent ( BI . MultiSelectList . EVENT _CHANGE ) } ) } ) , this . searcherPane = BI . createWidget ( { type : "bi.multi_select_search_pane" , cls : "bi-border-left bi-border-right bi-border-bottom" , valueFormatter : b . valueFormatter , keywordGetter : function ( ) { return a . trigger . getKeyword ( ) } , itemsCreator : function ( c , d ) { c . keyword = a . trigger . getKeyword ( ) , this . setKeyword ( c . keyword ) , b . itemsCreator ( c , d ) } } ) , this . searcherPane . setVisible ( ! 1 ) , this . trigger = BI . createWidget ( { type : "bi.searcher" , isAutoSearch : ! 1 , isAutoSync : ! 1 , onSearch : function ( a , b ) { b ( ) } , adapter : this . adapter , popup : this . searcherPane , height : 200 , masker : ! 1 , listeners : [ { eventName : BI . Searcher . EVENT _START , action : function ( ) { a . _showSearcherPane ( ) , a . _setStartValue ( "" ) , this . setValue ( BI . deepClone ( a . storeValue ) ) } } , { eventName : BI . Searcher . EVENT _STOP , action : function ( ) { a . _showAdapter ( ) , a . _setStartValue ( "" ) , a . adapter . setValue ( a . storeValue ) , a . adapter . populate ( ) } } , { eventName : BI . Searcher . EVENT _PAUSE , action : function ( ) { var b = this . getKeyword ( ) ; this . hasMatched ( ) && a . _join ( { type : BI . Selection . Multi , value : [ b ] } , function ( ) { a . _showAdapter ( ) , a . adapter . setValue ( a . storeValue ) , a . _setStartValue ( b ) , c ( ) , a . adapter . populate ( ) , a . _setStartValue ( "" ) , a . fireEvent ( BI . MultiSelectList . EVENT _CHANGE ) } ) } } , { eventName : BI . Searcher . EVENT _SEARCHING , action : function ( ) { var b = this . getKeyword ( ) , d = BI . last ( b ) ; b = BI . initial ( b || [ ] ) , b . length > 0 && a . _joinKeywords ( b , function ( ) { BI . isEndWithBlank ( d ) ? ( a . adapter . setValue ( a . storeValue ) , c ( ) , a . adapter . populate ( ) , a . _setStartValue ( "" ) ) : ( a . adapter . setValue ( a . storeValue ) , c ( ) ) } ) } } , { eventName : BI . Searcher . EVENT _CHANGE , action : function ( b , d ) { d instanceof BI . MultiSelectBar ? a . _joinAll ( this . getValue ( ) , function ( ) { c ( ) , a . fireEvent ( BI . MultiSelectList . EVENT _CHANGE ) } ) : a . _join ( this . getValue ( ) , function ( ) { c ( ) , a . fireEvent ( BI . MultiSelectList . EVENT _CHANGE ) } ) } } ] } ) , BI . createWidget ( { type : "bi.vtape" , element : this , items : [ { el : this . trigger , height : 24 } , { el : this . adapter , height : "fill" } ] } ) , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : this . searcherPane , top : 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 ( a ) { a || ( a = { } ) , a . type || ( a . type = BI . Selection . Multi ) , a . value || ( a . value = [ ] ) } , _makeMap : function ( a ) { return BI . makeObject ( a || [ ] ) } , _joinKeywords : function ( a , b ) { function c ( c ) { var e = d . _makeMap ( c ) ; BI . each ( a , function ( a , b ) { BI . isNotNull ( e [ b ] ) && d . storeValue . value [ d . storeValue . type === BI . Selection . Multi ? "pushDistinct" : "remove" ] ( b ) } ) , d . _adjust ( b ) } var d = this , e = this . options ; this . _assertValue ( this . storeValue ) , this . _allData ? c ( this . _allData ) : e . itemsCreator ( { type : BI . MultiSelectList . REQ _GET _ALL _DATA } , function ( a ) { d . _allData = BI . pluck ( a . items , "value" ) , c ( d . _allData ) } ) } , _joinAll : function ( a , b ) { var c = this , d = this . options ; this . _assertValue ( a ) , d . itemsCreator ( { type : BI . MultiSelectList . REQ _GET _ALL _DATA , keyword : c . trigg
offsetStyle : "center" } ) ; break ; case c . numberError : BI . Bubbles . show ( c . numberError , BI . i18nText ( "BI-Numerical_Interval_Number_Value" ) , b , { offsetStyle : "center" } ) ; break ; case c . signalError : BI . Bubbles . show ( c . signalError , BI . i18nText ( "BI-Numerical_Interval_Signal_Value" ) , b , { offsetStyle : "center" } ) } b . fireEvent ( BI . NumberInterval . EVENT _CHANGE ) } ) } , _setComboValueChangedEvent : function ( a ) { var b = this , c = this . constants ; a . on ( BI . IconCombo . EVENT _CHANGE , function ( ) { switch ( b . _checkValidation ( ) ) { case c . typeError : b . _setTitle ( BI . i18nText ( "BI-Numerical_Interval_Input_Data" ) ) , b . fireEvent ( BI . NumberInterval . EVENT _ERROR ) ; break ; case c . numberError : b . _setTitle ( BI . i18nText ( "BI-Numerical_Interval_Number_Value" ) ) , b . fireEvent ( BI . NumberInterval . EVENT _ERROR ) ; break ; case c . signalError : b . _setTitle ( BI . i18nText ( "BI-Numerical_Interval_Signal_Value" ) ) , b . fireEvent ( BI . NumberInterval . EVENT _ERROR ) ; break ; default : b . fireEvent ( BI . NumberInterval . EVENT _CHANGE ) , b . fireEvent ( BI . NumberInterval . EVENT _VALID ) } } ) } , isStateValid : function ( ) { return "valid" === this . options . validation } , setMinEnable : function ( a ) { this . smallEditor . setEnable ( a ) } , setCloseMinEnable : function ( a ) { this . smallCombo . setEnable ( a ) } , setMaxEnable : function ( a ) { this . bigEditor . setEnable ( a ) } , setCloseMaxEnable : function ( a ) { this . bigCombo . setEnable ( a ) } , showNumTip : function ( ) { this . smallTip . setVisible ( ! 0 ) , this . bigTip . setVisible ( ! 0 ) } , hideNumTip : function ( ) { this . smallTip . setVisible ( ! 1 ) , this . bigTip . setVisible ( ! 1 ) } , setNumTip : function ( a ) { this . smallTip . setText ( a ) , this . bigTip . setText ( a ) } , getNumTip : function ( ) { return this . smallTip . getText ( ) } , setValue : function ( a ) { a = a || { } ; var b , c = this ; ( BI . isNumeric ( a . min ) || BI . isEmptyString ( a . min ) ) && c . smallEditor . setValue ( a . min ) , BI . isNotNull ( a . min ) || c . smallEditor . setValue ( "" ) , ( BI . isNumeric ( a . max ) || BI . isEmptyString ( a . max ) ) && c . bigEditor . setValue ( a . max ) , BI . isNotNull ( a . max ) || c . bigEditor . setValue ( "" ) , BI . isNull ( a . closemin ) || ( b = a . closemin === ! 0 ? 1 : 0 , c . smallCombo . setValue ( b ) ) , BI . isNull ( a . closemax ) || ( b = a . closemax === ! 0 ? 1 : 0 , c . bigCombo . setValue ( b ) ) } , getValue : function ( ) { var a = this , b = { } , c = a . smallCombo . getValue ( ) , d = a . bigCombo . getValue ( ) ; return b . min = a . smallEditor . getValue ( ) , b . max = a . bigEditor . getValue ( ) , 0 === c [ 0 ] ? b . closemin = ! 1 : b . closemin = ! 0 , 0 === d [ 0 ] ? b . closemax = ! 1 : b . closemax = ! 0 , b } } ) , BI . NumberInterval . EVENT _CHANGE = "EVENT_CHANGE" , BI . NumberInterval . EVENT _VALID = "EVENT_VALID" , BI . NumberInterval . EVENT _ERROR = "EVENT_ERROR" , BI . shortcut ( "bi.number_interval" , BI . NumberInterval ) , BI . PageTableCell = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . PageTableCell . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-page-table-cell" , text : "" , title : "" } ) } , _init : function ( ) { BI . PageTableCell . superclass . _init . apply ( this , arguments ) ; BI . createWidget ( { type : "bi.label" , element : this , textAlign : "left" , whiteSpace : "nowrap" , height : this . options . height , text : this . options . text , title : this . options . title , value : this . options . value , lgap : 5 , rgap : 5 } ) ; BI . isNotNull ( this . options . styles ) && BI . isObject ( this . options . styles ) && this . element . css ( this . options . styles ) } } ) , BI . shortcut ( "bi.page_table_cell" , BI . PageTableCell ) , BI . PageTable = BI . inherit ( BI . Widget , { _const : { scrollWidth : 18 , minScrollWidth : 100 } , _defaultConfig : function ( ) { return BI . extend ( BI . PageTable . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-page-table" , el : { type : "bi.sequence_table" } , pager : { horizontal : { pages : ! 1 , curr : 1 , hasPrev : BI . emptyFn , hasNext : BI . emptyFn , firstPage : 1 , lastPage : BI . emptyFn } , vertical : { pages : ! 1 , curr : 1 , hasPrev : BI . emptyFn , hasNext : BI . emptyFn , firstPage : 1 , lastPage : BI . emptyFn } } , itemsCreator : BI . emptyFn , isNeedFreeze : ! 1 , freezeCols : [ ] , isNeedMerge : ! 1 , mergeCols : [ ] , mergeRule : BI . emptyFn , columnSize : [ ] , minColumnSize : [ ] , maxColumnSize : [ ] , headerRowSize : 25 , rowSize : 25 , regionColumnSize : [ ] , headerCellStyleGetter : BI . emptyFn , summaryCellStyleGetter : BI . emptyFn , sequenceCellStyleGetter : BI . emptyFn , header : [ ] , items : [ ] , crossHeader : [ ] , crossItems : [ ] } ) } , _init : function ( ) { BI . PageTable . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . hCurr = 1 , this . vCurr = 1 , this . table = BI . createWidget ( b . el , { type : "bi.sequence_table" , width : b . width , height : b . height && b . height - 30 , isNeedResize : ! 0 , isResizeAdapt : ! 1 , isNeedFreeze : b . isNeedFreeze , freez
text : b . text , handler : b . handler , items : b . items , belongPackage : b . belongPackage } ) , this . region . on ( BI . RelationViewRegion . EVENT _PREVIEW , function ( b ) { a . fireEvent ( BI . RelationViewRegionContainer . EVENT _PREVIEW , b ) } ) , this . region . on ( BI . RelationViewRegion . EVENT _HOVER _IN , function ( b ) { a . fireEvent ( BI . RelationViewRegionContainer . EVENT _HOVER _IN , b ) } ) , this . region . on ( BI . RelationViewRegion . EVENT _HOVER _OUT , function ( b ) { a . fireEvent ( BI . RelationViewRegionContainer . EVENT _HOVER _OUT , b ) } ) , BI . createWidget ( { type : "bi.vertical" , element : this , items : [ this . region ] , width : this . region . getWidth ( ) , height : this . region . getHeight ( ) } ) } , doRedMark : function ( ) { this . region . doRedMark . apply ( this . region , arguments ) } , unRedMark : function ( ) { this . region . unRedMark . apply ( this . region , arguments ) } , getWidth : function ( ) { return this . region . getWidth ( ) } , getHeight : function ( ) { return this . region . getHeight ( ) } , getTopLeftPosition : function ( ) { return this . region . getTopLeftPosition ( ) } , getTopRightPosition : function ( ) { return this . region . getTopRightPosition ( ) } , getBottomPosition : function ( ) { return this . region . getBottomPosition ( ) } , getLeftPosition : function ( ) { return this . region . getLeftPosition ( ) } , getRightPosition : function ( ) { return this . region . getRightPosition ( ) } , setValue : function ( a ) { this . region . setValue ( a ) } , toggleRegion : function ( a ) { a === ! 0 ? this . region . element . fadeIn ( ) : this . region . element . fadeOut ( ) } , setPreviewSelected : function ( a ) { this . region . setPreviewSelected ( a ) } } ) , BI . RelationViewRegionContainer . EVENT _HOVER _IN = "RelationViewRegion.EVENT_HOVER_IN" , BI . RelationViewRegionContainer . EVENT _HOVER _OUT = "RelationViewRegion.EVENT_HOVER_OUT" , BI . RelationViewRegionContainer . EVENT _PREVIEW = "RelationViewRegion.EVENT_PREVIEW" , BI . shortcut ( "bi.relation_view_region_container" , BI . RelationViewRegionContainer ) , BI . RelationViewRegion = BI . inherit ( BI . BasicButton , { _defaultConfig : function ( ) { return BI . extend ( BI . RelationViewRegion . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-relation-view-region cursor-pointer" , width : 150 , text : "" , value : "" , header : "" , items : [ ] , belongPackage : ! 0 } ) } , _init : function ( ) { BI . RelationViewRegion . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . preview = BI . createWidget ( { type : "bi.icon_button" , cls : "relation-table-preview-font" , width : 25 , height : 25 , stopPropagation : ! 0 } ) , this . preview . on ( BI . IconButton . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . RelationViewRegion . EVENT _PREVIEW , this . isSelected ( ) ) } ) , this . title = BI . createWidget ( { type : "bi.label" , height : 25 , width : 70 , text : b . text , value : b . value , textAlign : "left" } ) , BI . isKey ( b . header ) && this . title . setTitle ( b . header , { container : "body" } ) , this . button _group = BI . createWidget ( { type : "bi.button_group" , items : this . _createItems ( b . items ) , layouts : [ { type : "bi.vertical" } ] } ) , BI . createWidget ( { type : "bi.vertical" , element : this , items : [ { type : "bi.vertical" , cls : "relation-view-region-container bi-card bi-border " + ( b . belongPackage ? "" : "other-package" ) , items : [ { type : "bi.vertical_adapt" , cls : "relation-view-region-title bi-border-bottom" , items : [ this . preview , this . title ] } , this . button _group ] } ] , hgap : 25 , vgap : 20 } ) } , _createItems : function ( a ) { var b = this ; return BI . map ( a , function ( a , c ) { return BI . extend ( c , { type : "bi.relation_view_item" , hoverIn : function ( ) { b . setValue ( c . value ) , b . fireEvent ( BI . RelationViewRegion . EVENT _HOVER _IN , c . value ) } , hoverOut : function ( ) { b . setValue ( [ ] ) , b . fireEvent ( BI . RelationViewRegion . EVENT _HOVER _OUT , c . value ) } } ) } ) } , doRedMark : function ( ) { this . title . doRedMark . apply ( this . title , arguments ) } , unRedMark : function ( ) { this . title . unRedMark . apply ( this . title , arguments ) } , getWidth : function ( ) { return this . options . width } , getHeight : function ( ) { return 25 * this . button _group . getAllButtons ( ) . length + 25 + 40 + 3 } , getTopLeftPosition : function ( ) { return { x : 35 , y : 20 } } , getTopRightPosition : function ( ) { return { x : this . getWidth ( ) - 25 - 10 , y : 20 } } , getBottomPosition : function ( ) { return { x : 35 , y : this . getHeight ( ) - 20 } } , getLeftPosition : function ( ) { return { x : 25 , y : 30 } } , getRightPosition : function ( ) { return { x : this . getWidth ( ) - 25 , y : 30 } } , setValue : function ( a ) { this . button _group . setValue ( a ) } , setPreviewSelected : function ( a ) { this . preview . setSelected ( a ) } } ) , BI . RelationViewRegion . EVENT _HOVER _IN = "RelationViewRegion.EVENT_HOVER_IN" , BI . RelationViewRegion . EVENT _HOVER _OUT = " RelationViewRegion . EV
this . text . setWarningTitle ( a ) } , focus : function ( ) { this . _showInput ( ) , this . editor . focus ( ) } , blur : function ( ) { this . editor . blur ( ) , this . _showHint ( ) , this . _checkText ( ) } , doRedMark : function ( ) { "" === this . editor . getValue ( ) && BI . isKey ( this . options . watermark ) || this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } , doHighLight : function ( ) { "" === this . editor . getValue ( ) && BI . isKey ( this . options . watermark ) || this . text . doHighLight . apply ( this . text , arguments ) } , unHighLight : function ( ) { this . text . unHighLight . apply ( this . text , arguments ) } , isValid : function ( ) { return this . editor . isValid ( ) } , setErrorText : function ( a ) { this . editor . setErrorText ( a ) } , getErrorText : function ( ) { return this . editor . getErrorText ( ) } , isEditing : function ( ) { return this . editor . isEditing ( ) } , getLastValidValue : function ( ) { return this . editor . getLastValidValue ( ) } , setValue : function ( a ) { this . editor . setValue ( a ) , this . _checkText ( ) } , getValue : function ( ) { return this . editor . getValue ( ) } , getState : function ( ) { return this . text . getValue ( ) } , setState : function ( a ) { var b = this . options ; this . _showHint ( ) , a = BI . isEmpty ( a ) || a == b . text ? b . text : a + b . text , this . text . setValue ( a ) } } ) , BI . SignTextEditor . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . SignTextEditor . EVENT _CLICK _LABEL = "EVENT_CLICK_LABEL" , BI . shortcut ( "bi.sign_text_editor" , BI . SignTextEditor ) , BI . SliderIconButton = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . SliderIconButton . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-single-slider-button" } ) } , _init : function ( ) { BI . extend ( BI . SliderIconButton . superclass . _init . apply ( this , arguments ) ) , this . slider = BI . createWidget ( { type : "bi.icon_button" , cls : "slider-icon slider-button" , iconWidth : 14 , iconHeight : 14 , height : 14 , width : 14 } ) , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : this . slider , top : 7 , left : - 7 } ] , width : 0 , height : 14 } ) } } ) , BI . shortcut ( "bi.single_slider_button" , BI . SliderIconButton ) , BI . SingleSlider = BI . inherit ( BI . Widget , { _constant : { EDITOR _WIDTH : 90 , EDITOR _HEIGHT : 30 , SLIDER _WIDTH _HALF : 15 , SLIDER _WIDTH : 30 , SLIDER _HEIGHT : 30 , TRACK _HEIGHT : 24 } , _defaultConfig : function ( ) { return BI . extend ( BI . SingleSlider . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-single-slider bi-slider-track" , digit : ! 1 , unit : "" } ) } , _init : function ( ) { BI . SingleSlider . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options , c = this . _constant ; this . enable = ! 1 , this . value = "" , this . grayTrack = BI . createWidget ( { type : "bi.layout" , cls : "gray-track" , height : 6 } ) , this . blueTrack = BI . createWidget ( { type : "bi.layout" , cls : "blue-track bi-high-light-background" , height : 6 } ) , this . track = this . _createTrackWrapper ( ) , this . slider = BI . createWidget ( { type : "bi.single_slider_button" } ) , this . _draggable ( this . slider ) ; var d = BI . createWidget ( { type : "bi.vertical" , items : [ { type : "bi.absolute" , items : [ this . slider ] } ] , hgap : c . SLIDER _WIDTH _HALF , height : c . SLIDER _HEIGHT } ) ; d . element . click ( function ( d ) { if ( a . enable ) { var e = d . clientX - a . element . offset ( ) . left - c . SLIDER _WIDTH _HALF , f = a . track . element [ 0 ] . scrollWidth , g = 0 ; e < 0 && ( g = 0 ) , e > 0 && e < f - c . SLIDER _WIDTH && ( g = 100 * e / a . _getGrayTrackLength ( ) ) , e > f - c . SLIDER _WIDTH && ( g = 100 ) ; var h = BI . parseFloat ( g . toFixed ( 1 ) ) ; a . _setAllPosition ( h ) ; var i = a . _getValueByPercent ( h ) ; i = b . digit === ! 1 ? i : i . toFixed ( b . digit ) , a . label . setValue ( i ) , a . value = i , a . fireEvent ( BI . SingleSlider . EVENT _CHANGE ) } } ) , this . label = BI . createWidget ( { type : "bi.sign_text_editor" , cls : "slider-editor-button" , errorText : "" , text : b . unit , width : c . EDITOR _WIDTH - 2 , allowBlank : ! 1 , validationChecker : function ( b ) { return a . _checkValidation ( b ) } } ) , this . label . element . hover ( function ( ) { a . label . element . removeClass ( "bi-border" ) . addClass ( "bi-border" ) } , function ( ) { a . label . element . removeClass ( "bi-border" ) } ) , this . label . on ( BI . SignEditor . EVENT _CONFIRM , function ( ) { var b = BI . parseFloat ( this . getValue ( ) ) , c = a . _getPercentByValue ( b ) , d = BI . parseFloat ( c . toFixed ( 1 ) ) ; a . _setAllPosition ( d ) , this . setValue ( b ) , a . value = b , a . fireEvent ( BI . SingleSlider . EVENT _CHANGE ) } ) , this . _setVisible ( ! 1 ) , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : { type : "bi.vertical" , items : [ { type : "bi.absolute" , items : [ { el : this . track , width : "100%" , height : c . TRACK _HEIGHT } ] } ] , hgap : 7 , height : c . TRACK _HEIGHT } , top : 23 , left : 0 , width : "100%" } , { el : d , top : 20 , left : 0 , width
a . fireEvent ( BI . YearMonthCombo . EVENT _BEFORE _POPUPVIEW ) } ) , BI . createWidget ( { type : "bi.center" , element : this , hgap : 5 , items : [ this . year , this . month ] } ) } , setValue : function ( a ) { a = a || { } , this . month . setValue ( a . month ) , this . year . setValue ( a . year ) } , getValue : function ( ) { return { year : this . year . getValue ( ) , month : this . month . getValue ( ) } } } ) , BI . YearMonthCombo . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . YearMonthCombo . EVENT _BEFORE _POPUPVIEW = "EVENT_BEFORE_POPUPVIEW" , BI . shortcut ( "bi.year_month_combo" , BI . YearMonthCombo ) , BI . YearQuarterCombo = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . YearQuarterCombo . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-year-quarter-combo" , yearBehaviors : { } , quarterBehaviors : { } , height : 25 } ) } , _init : function ( ) { BI . YearQuarterCombo . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . year = BI . createWidget ( { type : "bi.year_combo" , behaviors : b . yearBehaviors } ) , this . quarter = BI . createWidget ( { type : "bi.quarter_combo" , behaviors : b . quarterBehaviors } ) , this . year . on ( BI . YearCombo . EVENT _CONFIRM , function ( ) { a . fireEvent ( BI . YearQuarterCombo . EVENT _CONFIRM ) } ) , this . year . on ( BI . YearCombo . EVENT _BEFORE _POPUPVIEW , function ( ) { a . fireEvent ( BI . YearQuarterCombo . EVENT _BEFORE _POPUPVIEW ) } ) , this . quarter . on ( BI . QuarterCombo . EVENT _CONFIRM , function ( ) { a . fireEvent ( BI . YearQuarterCombo . EVENT _CONFIRM ) } ) , this . quarter . on ( BI . QuarterCombo . EVENT _BEFORE _POPUPVIEW , function ( ) { a . fireEvent ( BI . YearQuarterCombo . EVENT _BEFORE _POPUPVIEW ) } ) , BI . createWidget ( { type : "bi.center" , element : this , hgap : 5 , items : [ this . year , this . quarter ] } ) } , setValue : function ( a ) { a = a || { } , this . quarter . setValue ( a . quarter ) , this . year . setValue ( a . year ) } , getValue : function ( ) { return { year : this . year . getValue ( ) , quarter : this . quarter . getValue ( ) } } } ) , BI . YearQuarterCombo . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . YearQuarterCombo . EVENT _BEFORE _POPUPVIEW = "EVENT_BEFORE_POPUPVIEW" , BI . shortcut ( "bi.year_quarter_combo" , BI . YearQuarterCombo ) , BI . AbstractAllValueChooser = BI . inherit ( BI . Widget , { _const : { perPage : 100 } , _defaultConfig : function ( ) { return BI . extend ( BI . AbstractAllValueChooser . superclass . _defaultConfig . apply ( this , arguments ) , { width : 200 , height : 30 , items : null , itemsCreator : BI . emptyFn , cache : ! 0 } ) } , _valueFormatter : function ( a ) { var b = a ; return BI . isNotNull ( this . items ) && BI . some ( this . items , function ( c , d ) { if ( d . value === a ) return b = d . text , ! 0 } ) , b } , _itemsCreator : function ( a , b ) { function c ( c ) { var d = ( a . keywords || [ ] ) . slice ( ) ; if ( a . keyword && d . push ( a . keyword ) , BI . each ( d , function ( a , b ) { var d = BI . Func . getSearchResult ( c , b ) ; c = d . matched . concat ( d . finded ) } ) , a . selectedValues ) { var e = BI . makeObject ( a . selectedValues , ! 0 ) ; c = BI . filter ( c , function ( a , b ) { return ! e [ b . value ] } ) } return a . type === BI . MultiSelectCombo . REQ _GET _ALL _DATA ? void b ( { items : c } ) : a . type === BI . MultiSelectCombo . REQ _GET _DATA _LENGTH ? void b ( { count : c . length } ) : void b ( { items : c , hasNext : ! 1 } ) } var d = this , e = this . options ; e . cache && this . items ? c ( this . items ) : e . itemsCreator ( { } , function ( a ) { d . items = a , c ( a ) } ) } } ) , BI . AllValueChooserCombo = BI . inherit ( BI . AbstractAllValueChooser , { _defaultConfig : function ( ) { return BI . extend ( BI . AllValueChooserCombo . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-all-value-chooser-combo" , width : 200 , height : 30 , items : null , itemsCreator : BI . emptyFn , cache : ! 0 } ) } , _init : function ( ) { BI . AllValueChooserCombo . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; BI . isNotNull ( b . items ) && ( this . items = b . items ) , this . combo = BI . createWidget ( { type : "bi.multi_select_combo" , element : this , itemsCreator : BI . bind ( this . _itemsCreator , this ) , valueFormatter : BI . bind ( this . _valueFormatter , this ) , width : b . width , height : b . height } ) , this . combo . on ( BI . MultiSelectCombo . EVENT _CONFIRM , function ( ) { a . fireEvent ( BI . AllValueChooserCombo . EVENT _CONFIRM ) } ) } , setValue : function ( a ) { this . combo . setValue ( { type : BI . Selection . Multi , value : a || [ ] } ) } , getValue : function ( ) { var a = this . combo . getValue ( ) || { } ; return a . type === BI . Selection . All ? a . assist : a . value || [ ] } , populate : function ( ) { this . combo . populate . apply ( this , arguments ) } } ) , BI . AllValueChooserCombo . EVENT _CONFIRM = "AllValueChooserCombo.EVENT_CONFIRM" , BI . shortcut ( "bi.all_value_chooser_combo" , BI . AllValueChooserCombo ) , BI . AllValueChooserPane = BI . inherit ( BI . AbstractAllValueChooser , { _defaultConfig : function ( ) { return BI . extend (