diff --git a/demo/js/config/widget.js b/demo/js/config/widget.js index cd42165d2..5b71f6c77 100644 --- a/demo/js/config/widget.js +++ b/demo/js/config/widget.js @@ -222,4 +222,8 @@ Demo.WIDGET_CONFIG = [{ id: 420, text: "滚动sliders", value: "demo.slider" +}, { + id: 422, + text: "过滤Filter", + value: "demo.filter" }]; \ No newline at end of file diff --git a/demo/js/widget/filter/demo.filter.js b/demo/js/widget/filter/demo.filter.js new file mode 100644 index 000000000..e0b151b89 --- /dev/null +++ b/demo/js/widget/filter/demo.filter.js @@ -0,0 +1,65 @@ +Demo.Filter = BI.inherit(BI.Widget, { + props: {}, + _createFilter: function () { + var filter = BI.createWidget({ + type: "bi.filter", + width: 600, + height: 300, + items: [{ + id: "3beb41be9c67d80d", + value: 81, + children: [{ + id: 1, + type: "bi.label", + value: "节点1" + }, { + id: "74cf470c15a7cb23", + value: 80, + children: [{ + id: 2, + type: "bi.label", + value: "节点2" + }, { + id: 3, + type: "bi.label", + value: "节点3" + }] + }, { + id: 4, + type: "bi.label", + value: "节点4" + }] + }], + itemCreator: function (item) { + if(item.value === BI.Filter.FILTER_TYPE.EMPTY_FORMULA || item.value === BI.Filter.FILTER_TYPE.EMPTY_CONDITION) { + item.type = "bi.label"; + item.value = "这是一个新添的数据"; + } + } + }); + + return filter; + }, + + render: function () { + + var filter = this._createFilter(); + + return { + type: "bi.vertical", + hgap: 30, + vgap: 20, + items: [{ + el: filter + }, { + type: "bi.button", + text: "过滤结构getValue()", + height: 30, + handler: function () { + BI.Msg.alert("过滤结构", JSON.stringify(filter.getValue())); + } + }] + }; + } +}); +BI.shortcut("demo.filter", Demo.Filter); \ No newline at end of file diff --git a/demo/version.js b/demo/version.js index d13159199..4c2d72597 100644 --- a/demo/version.js +++ b/demo/version.js @@ -147,5 +147,13 @@ BI.i18n = { "BI-Basic_Year_Quarter": "年季度", "BI-Basic_Input_Can_Not_Null": "输入框不能为空", "BI-Basic_Input_From_To_Number": "请输入{R1}的数值", - "BI-Basic_Date_Time_Error_Text": "日期格式示例:2015-3-11 00:00:00" + "BI-Basic_Date_Time_Error_Text": "日期格式示例:2015-3-11 00:00:00", + "BI-Basic_Or": "或", + "BI-Basic_And": "且", + "BI-Conf_Add_Formula": "添加公式", + "BI-Conf_Add_Condition": "添加条件", + "BI-Conf_Formula_And": "且公式条件", + "BI-Conf_Formula_Or": "或公式条件", + "BI-Conf_Condition_And": "且条件", + "BI-Conf_Condition_Or": "或条件" }; \ No newline at end of file diff --git a/dist/_fineui.min.js b/dist/_fineui.min.js index 7db02231b..6cf7445ad 100644 --- a/dist/_fineui.min.js +++ b/dist/_fineui.min.js @@ -40,13 +40,14 @@ BI.shortcut("bi.handstand_branch_expander",BI.HandStandBranchExpander),BI.Branch a.fireEvent(BI.YearPopup.EVENT_CHANGE,a.selectedYear)}),BI.isKey(b.value)&&this.setValue(b.value)},getValue:function(){return this.selectedYear},setValue:function(a){var b=this.options;BI.checkDateVoid(a,1,1,b.min,b.max)[0]?(a=BI.getDate().getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue("")):(this.selectedYear=a,this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue(a))}}),BI.YearPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_popup",BI.YearPopup),BI.DateTriangleTrigger=BI.inherit(BI.Trigger,{_const:{height:25,iconWidth:16,iconHeight:13},_defaultConfig:function(){return BI.extend(BI.DateTriangleTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-triangle-trigger pull-down-ha-font cursor-pointer",height:25})},_init:function(){BI.DateTriangleTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"right",text:a.text,value:a.value,height:b.height}),this.icon=BI.createWidget({type:"bi.icon",width:b.iconWidth,height:b.iconHeight}),BI.createWidget({type:"bi.center_adapt",element:this,items:[{type:"bi.center_adapt",width:50,height:b.height,items:[this.text,this.icon]}]})},setValue:function(a){this.text.setValue(a)},getValue:function(){return this.text.getValue()},setText:function(a){this.text.setText(a)},getText:function(){return this.item.getText()},getKey:function(){}}),BI.shortcut("bi.date_triangle_trigger",BI.DateTriangleTrigger),BI.DateCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DateCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-combo bi-border",height:25})},_init:function(){BI.DateCombo.superclass._init.apply(this,arguments);var a=this;this.options;this.trigger=BI.createWidget({type:"bi.date_trigger"}),this.trigger.on(BI.DateTrigger.EVENT_TRIGGER_CLICK,function(){a.combo.toggle()}),this.popup=BI.createWidget({type:"bi.date_calendar_popup"}),this.popup.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue())}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{width:270,el:this.popup,stopPropagation:!1}})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.shortcut("bi.date_combo",BI.DateCombo),BI.DateTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,yearLength:4,yearMonthLength:7},_defaultConfig:function(){return BI.extend(BI.DateTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-date-trigger",min:"1900-01-01",max:"2099-12-31",height:24})},_init:function(){BI.DateTrigger.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(b){var c=b.match(/\d+/g);return a._autoAppend(b,c),a._dateCheck(b)&&BI.checkDateLegal(b)&&a._checkVoid({year:c[0],month:c[1],day:c[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){return a.editor.isEditing()?BI.i18nText("BI-Date_Trigger_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")}}),this.editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){a.fireEvent(BI.DateTrigger.EVENT_KEY_DOWN)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.DateTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DateTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_VALID,function(){a.fireEvent(BI.DateTrigger.EVENT_VALID)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DateTrigger.EVENT_ERROR)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();if(BI.isNotNull(b)&&a.editor.setState(b),BI.isNotEmptyString(b)){var c=b.split("-");a.store_value={type:BI.DateTrigger.MULTI_DATE_CALENDAR,value:{year:0|c[0],month:c[1]-1,day:0|c[2]}}}a.fireEvent(BI.DateTrigger.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.DateTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.DateTrigger.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:BI.createWidget(),width:30},{el:this.editor}]}),this.setValue(b.value)},_dateCheck:function(a){return BI.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")==a||BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")==a||BI.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")==a||BI.parseDateTime(a,"%Y-%X-%e").print("%Y-%X-%e")==a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.options.min,this.options.max)[0]},_autoAppend:function(a,b){var c=this,d=BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d"),e=function(a){return BI.parseDateTime(a,"%Y").print("%Y")==a&&d>=c.options.min&&d<=c.options.max},f=function(a){return BI.parseDateTime(a,"%Y-%X").print("%Y-%X")==a&&d>=c.options.min&&d<=c.options.max};if(BI.isNotNull(b)&&BI.checkDateLegal(a))switch(a.length){case this._const.yearLength:e(a)&&this.editor.setValue(a+"-");break;case this._const.yearMonthLength:f(a)&&this.editor.setValue(a+"-")}},setValue:function(a){var b,c,d=this,e=BI.getDate();this.store_value=a,BI.isNotNull(a)&&(b=a.type||BI.DateTrigger.MULTI_DATE_CALENDAR,c=a.value,BI.isNull(c)&&(c=a));var f=function(a,b){var c=a.print("%Y-%x-%e");d.editor.setState(c),d.editor.setValue(c),d.setTitle(b+":"+c)};switch(b){case BI.DateTrigger.MULTI_DATE_YEAR_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_PREV];e=BI.getDate(e.getFullYear()-1*c,e.getMonth(),e.getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_AFTER];e=BI.getDate(e.getFullYear()+1*c,e.getMonth(),e.getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_BEGIN];e=BI.getDate(e.getFullYear(),0,1),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_END];e=BI.getDate(e.getFullYear(),11,31),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_PREV];e=BI.getDate().getBeforeMulQuarter(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_AFTER];e=BI.getDate().getAfterMulQuarter(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN];e=BI.getDate().getQuarterStartDate(),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_END];e=BI.getDate().getQuarterEndDate(),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_PREV];e=BI.getDate().getBeforeMultiMonth(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_AFTER];e=BI.getDate().getAfterMultiMonth(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_BEGIN];e=BI.getDate(e.getFullYear(),e.getMonth(),1),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_END];e=BI.getDate(e.getFullYear(),e.getMonth(),e.getLastDateOfMonth().getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_WEEK_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_PREV];e=e.getOffsetDate(-7*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_WEEK_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_AFTER];e=e.getOffsetDate(7*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_PREV];e=e.getOffsetDate(-1*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_AFTER];e=e.getOffsetDate(1*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_TODAY:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_TODAY];e=BI.getDate(),f(e,g);break;default:if(BI.isNull(c)||BI.isNull(c.day))this.editor.setState(""),this.editor.setValue(""),this.setTitle("");else{var h=c.year+"-"+(c.month+1)+"-"+c.day;this.editor.setState(h),this.editor.setValue(h),this.setTitle(h)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.store_value}}),BI.DateTrigger.MULTI_DATE_YEAR_PREV=1,BI.DateTrigger.MULTI_DATE_YEAR_AFTER=2,BI.DateTrigger.MULTI_DATE_YEAR_BEGIN=3,BI.DateTrigger.MULTI_DATE_YEAR_END=4,BI.DateTrigger.MULTI_DATE_MONTH_PREV=5,BI.DateTrigger.MULTI_DATE_MONTH_AFTER=6,BI.DateTrigger.MULTI_DATE_MONTH_BEGIN=7,BI.DateTrigger.MULTI_DATE_MONTH_END=8,BI.DateTrigger.MULTI_DATE_QUARTER_PREV=9,BI.DateTrigger.MULTI_DATE_QUARTER_AFTER=10,BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN=11,BI.DateTrigger.MULTI_DATE_QUARTER_END=12,BI.DateTrigger.MULTI_DATE_WEEK_PREV=13,BI.DateTrigger.MULTI_DATE_WEEK_AFTER=14,BI.DateTrigger.MULTI_DATE_DAY_PREV=15,BI.DateTrigger.MULTI_DATE_DAY_AFTER=16,BI.DateTrigger.MULTI_DATE_DAY_TODAY=17,BI.DateTrigger.MULTI_DATE_PARAM=18,BI.DateTrigger.MULTI_DATE_CALENDAR=19,BI.DateTrigger.MULTI_DATE_SEGMENT_NUM={},BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_PREV]=BI.i18nText("BI-Multi_Date_Year_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_AFTER]=BI.i18nText("BI-Multi_Date_Year_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_BEGIN]=BI.i18nText("BI-Multi_Date_Year_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_END]=BI.i18nText("BI-Multi_Date_Year_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_PREV]=BI.i18nText("BI-Multi_Date_Quarter_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_AFTER]=BI.i18nText("BI-Multi_Date_Quarter_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN]=BI.i18nText("BI-Multi_Date_Quarter_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_END]=BI.i18nText("BI-Multi_Date_Quarter_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_PREV]=BI.i18nText("BI-Multi_Date_Month_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_AFTER]=BI.i18nText("BI-Multi_Date_Month_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_BEGIN]=BI.i18nText("BI-Multi_Date_Month_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_END]=BI.i18nText("BI-Multi_Date_Month_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_PREV]=BI.i18nText("BI-Multi_Date_Week_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_AFTER]=BI.i18nText("BI-Multi_Date_Week_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_PREV]=BI.i18nText("BI-Multi_Date_Day_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_AFTER]=BI.i18nText("BI-Multi_Date_Day_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_TODAY]=BI.i18nText("BI-Multi_Date_Today"),BI.DateTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DateTrigger.EVENT_START="EVENT_START",BI.DateTrigger.EVENT_STOP="EVENT_STOP",BI.DateTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DateTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.DateTrigger.EVENT_VALID="EVENT_VALID",BI.DateTrigger.EVENT_ERROR="EVENT_ERROR",BI.DateTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.DateTrigger.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.shortcut("bi.date_trigger",BI.DateTrigger),BI.StaticDatePaneCard=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StaticDatePaneCard.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-pane",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_init:function(){BI.StaticDatePaneCard.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth(),this.selectedTime=b.selectedTime||{year:this._year,month:this._month},this.datePicker=BI.createWidget({type:"bi.date_picker",min:b.min,max:b.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){a.selectedTime=a.datePicker.getValue(),a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime))}),this.calendar=BI.createWidget({direction:"top",element:this,logic:{dynamic:!1},type:"bi.navigation",tab:this.datePicker,cardCreator:BI.bind(this._createNav,this)}),this.calendar.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedTime=a.calendar.getValue(),a.calendar.empty(),a.setValue(a.selectedTime),a.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)}),this.setValue(b.selectedTime)},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!1},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:this.selectedTime.day});return c},_getNewCurrentDate:function(){var a=BI.getDate();return{year:a.getFullYear(),month:a.getMonth()}},_setCalenderValue:function(a){this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),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.static_date_pane_card",BI.StaticDatePaneCard),BI.DynamicDatePane=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-pane"},render:function(){var a=this;return{type:"bi.vtape",items:[{el:{type:"bi.linear_segment",cls:"bi-border-bottom",height:30,items:BI.createItems([{text:BI.i18nText("BI-Multi_Date_YMD"),value:BI.DynamicDatePane.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicDatePane.Dynamic}],{textAlign:"center"}),listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(){var b=this.getValue()[0];switch(a.dateTab.setSelect(b),b){case BI.DynamicDatePane.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth(),day:c.getDate()});break;case BI.DynamicDatePane.Dynamic:a.dynamicPane.setValue({year:0})}}}],ref:function(){a["switch"]=this}},height:30},{type:"bi.tab",ref:function(){a.dateTab=this},showIndex:BI.DynamicDatePane.Static,cardCreator:function(b){switch(b){case BI.DynamicDatePane.Static:return{type:"bi.static_date_pane_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.ymd=this}};case BI.DynamicDatePane.Dynamic:default:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.dynamicPane=this}}}}}]}},mounted:function(){this.setValue(this.options.value)},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},setValue:function(a){a=a||{};var b=a.type||BI.DynamicDateCombo.Static,c=a.value||a;switch(this["switch"].setValue(b),this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c);break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var d=BI.getDate();this.ymd.setValue({year:d.getFullYear(),month:d.getMonth()})}else this.ymd.setValue(c)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.shortcut("bi.dynamic_date_pane",BI.DynamicDatePane),BI.extend(BI.DynamicDatePane,{Static:1,Dynamic:2}),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,c=BI.getDate();this.storeValue=BI.isNotNull(b.value)?b.value:{year:c.getFullYear(),month:c.getMonth(),day:c.getDate(),hour:c.getHours(),minute:c.getMinutes(),second:c.getSeconds()},this.trigger=BI.createWidget({type:"bi.date_time_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,value:b.value}),this.popup=BI.createWidget({type:"bi.date_time_popup",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,value:b.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,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 d=BI.createWidget({type:"bi.icon_button",cls:"bi-trigger-icon-button date-font bi-border-right",width:24,height:24});d.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:d,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:374})},_init:function(){BI.DateTimePopup.superclass._init.apply(this,arguments);var a=this,b=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}),a.dateCombo.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}),this.dateSelect=BI.createWidget({type:"bi.vertical_adapt",cls:"bi-border-top",items:[{type:"bi.label",text:BI.i18nText("BI-Basic_Time"),width:45},{type:"bi.date_time_select",max:23,min:0,width:60,height:30,listeners:[{eventName:BI.DateTimeSelect.EVENT_CONFIRM,action:function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}}],ref:function(b){a.hour=b}},{type:"bi.label",text:":",width:15},{type:"bi.date_time_select",max:59,min:0,width:60,height:30,listeners:[{eventName:BI.DateTimeSelect.EVENT_CONFIRM,action:function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}}],ref:function(b){a.minute=b}},{type:"bi.label",text:":",width:15},{type:"bi.date_time_select",max:59,min:0,width:60,height:30,listeners:[{eventName:BI.DateTimeSelect.EVENT_CONFIRM,action:function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}}],ref:function(b){a.second=b}}]}),this.setValue(b.value),this.dateButton=BI.createWidget({type:"bi.grid",items:[[this.cancelButton,this.okButton]]}),BI.createWidget({element:this,type:"bi.vtape",items:[{el:this.dateCombo},{el:this.dateSelect,height:50},{el:this.dateButton,height:30}]})},setValue:function(a){var b,c=a;BI.isNull(c)?(b=BI.getDate(),this.dateCombo.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),this.hour.setValue(b.getHours()),this.minute.setValue(b.getMinutes()),this.second.setValue(b.getSeconds())):(this.dateCombo.setValue({year:c.year,month:c.month,day:c.day}),this.hour.setValue(c.hour),this.minute.setValue(c.minute),this.second.setValue(c.second))},getValue:function(){return{year:this.dateCombo.getValue().year,month:this.dateCombo.getValue().month,day:this.dateCombo.getValue().day,hour:this.hour.getValue(),minute:this.minute.getValue(),second:this.second.getValue()}}}),BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE="BUTTON_CANCEL_EVENT_CHANGE",BI.DateTimePopup.CALENDAR_EVENT_CHANGE="CALENDAR_EVENT_CHANGE",BI.shortcut("bi.date_time_popup",BI.DateTimePopup),BI.DateTimeSelect=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DateTimeSelect.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-select bi-border",max:23,min:0})},_init:function(){BI.DateTimeSelect.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",value:this._alertInEditorValue(b.min),allowBlank:!1,errorText:BI.i18nText("BI-Please_Input_Natural_Number"),validationChecker:function(a){return BI.isNaturalNumber(a)}}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){a._finetuning(0),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",cls:"column-pre-page-h-font top-button bi-border-left bi-border-bottom"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(1),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",cls:"column-next-page-h-font bottom-button bi-border-left"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-1),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this._finetuning(0),BI.createWidget({type:"bi.htape",element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:30}]})},_alertOutEditorValue:function(a){return a>this.options.max&&(a=this.options.min),athis.options.max&&(a=this.options.min),a1},_needSpliter:function(a,b){return a0?1:0}},setValue:function(a){a=a||{};var b=[],c=[];BI.isNotNull(a.year)&&(b.push(BI.DynamicDateCard.TYPE.YEAR),c.push(this._createValue(BI.DynamicDateCard.TYPE.YEAR,a.year))),BI.isNotNull(a.quarter)&&(b.push(BI.DynamicDateCard.TYPE.QUARTER),c.push(this._createValue(BI.DynamicDateCard.TYPE.QUARTER,a.quarter))),BI.isNotNull(a.month)&&(b.push(BI.DynamicDateCard.TYPE.MONTH),c.push(this._createValue(BI.DynamicDateCard.TYPE.MONTH,a.month))),BI.isNotNull(a.week)&&(b.push(BI.DynamicDateCard.TYPE.WEEK),c.push(this._createValue(BI.DynamicDateCard.TYPE.WEEK,a.week))),BI.isNotNull(a.day)&&(b.push(BI.DynamicDateCard.TYPE.DAY),c.push(this._createValue(BI.DynamicDateCard.TYPE.DAY,a.day))),BI.isNotNull(a.workDay)&&(b.push(BI.DynamicDateCard.TYPE.WORK_DAY),c.push(this._createValue(BI.DynamicDateCard.TYPE.WORK_DAY,a.workDay))),this.checkgroup.setValue(b),this.workDayBox.setSelected(BI.isNotNull(a.workDay)),this.resultPane.populate(this._getParamJson(c,a.position))},getValue:function(){var a=this,b={},c=this.checkgroup.getValue(),d=this.resultPane.getAllButtons();if(0!==c.length&&BI.each(d,function(c,d){var e=d.getValue();switch(e.dateType){case BI.DynamicDateCard.TYPE.YEAR:b.year=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.QUARTER:b.quarter=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.MONTH:b.month=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.WEEK:b.week=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.DAY:b.day=0===e.offset?-e.value:e.value}BI.isNull(e.dateType)&&(b.position=a.position||BI.DynamicDateCard.OFFSET.CURRENT)}),this.workDayBox.isSelected()){var e=d[0].getValue();b.workDay=0===e.offset?-e.value:e.value}return b}}),BI.shortcut("bi.dynamic_date_card",BI.DynamicDateCard),BI.extend(BI.DynamicDateCard,{TYPE:{YEAR:1,QUARTER:2,MONTH:3,WEEK:4,DAY:5,WORK_DAY:6},OFFSET:{CURRENT:1,BEGIN:2,END:3}}),BI.DynamicDateCombo=BI.inherit(BI.Single,{constants:{popupHeight:259,popupWidth:270,comboAdjustHeight:1,border:1,DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},props:{baseCls:"bi-dynamic-date-combo bi-border",height:24},render:function(){var a=this,b=this.options;this.storeTriggerValue="";var c=BI.getDate();return this.storeValue=b.value,{type:"bi.htape",items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24,ref:function(){a.changeIcon=this}},width:24},{type:"bi.absolute",items:[{el:{type:"bi.combo",ref:function(){a.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,value:b.value,ref:function(){a.trigger=this},listeners:[{eventName:BI.DynamicDateTrigger.EVENT_KEY_DOWN,action:function(){a.combo.isViewVisible()&&a.combo.hideView()}},{eventName:BI.DynamicDateTrigger.EVENT_STOP,action:function(){a.combo.isViewVisible()||a.combo.showView()}},{eventName:BI.DynamicDateTrigger.EVENT_TRIGGER_CLICK,action:function(){a.combo.toggle()}},{eventName:BI.DynamicDateTrigger.EVENT_FOCUS,action:function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS)}},{eventName:BI.DynamicDateTrigger.EVENT_ERROR,action:function(){a.storeValue={year:c.getFullYear(),month:c.getMonth()},a.popup.setValue(),a.fireEvent(BI.DynamicDateCombo.EVENT_ERROR)}},{eventName:BI.DynamicDateTrigger.EVENT_VALID,action:function(){a.fireEvent(BI.DynamicDateCombo.EVENT_VALID)}},{eventName:BI.DynamicDateTrigger.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateCombo.EVENT_CHANGE)}},{eventName:BI.DynamicDateTrigger.EVENT_CONFIRM,action:function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:{type:"bi.dynamic_date_popup",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,value:b.value,ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}]},stopPropagation:!1},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW)}}]},top:0,left:0,right:0,bottom:0},{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:24,height:24,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}}]},top:0,right:0}]}],ref:function(b){a.comboWrapper=b}}},mounted:function(){this._checkDynamicValue(this.options.value)},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.DynamicDateCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()},hidePopupView:function(){this.combo.hideView()}}),BI.DynamicDateCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicDateCombo.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DynamicDateCombo.EVENT_VALID="EVENT_VALID",BI.DynamicDateCombo.EVENT_ERROR="EVENT_ERROR",BI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW="BI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_date_combo",BI.DynamicDateCombo),BI.extend(BI.DynamicDateCombo,{Static:1,Dynamic:2}),BI.DynamicDateParamItem=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-param-item",dateType:BI.DynamicDateCard.TYPE.YEAR,value:0,offset:0,height:24},render:function(){var a=this,b=this.options;return{type:"bi.htape",items:[{el:{type:"bi.sign_editor",cls:"bi-border",height:22,validationChecker:function(a){return BI.isNaturalNumber(a)},value:b.value,ref:function(){a.editor=this},errorText:function(a){return BI.isEmptyString(a)?BI.i18nText("BI-Basic_Input_Can_Not_Null"):BI.i18nText("BI-Please_Input_Positive_Integer")},allowBlank:!1,listeners:[{eventName:BI.SignEditor.EVENT_CONFIRM,action:function(){a.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE)}}]},width:60},{el:{type:"bi.label",height:24,text:this._getText()},width:20},{type:"bi.text_value_combo",height:24,items:[{text:BI.i18nText("BI-Basic_Front"),value:0},{text:BI.i18nText("BI-Basic_Behind"),value:1}],ref:function(){a.offsetCombo=this},value:b.offset,listeners:[{eventName:BI.TextValueCombo.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE)}}]}]}},_getText:function(){var a="";switch(this.options.dateType){case BI.DynamicDateCard.TYPE.YEAR:a=BI.i18nText("BI-Basic_Year");break;case BI.DynamicDateCard.TYPE.QUARTER:a=BI.i18nText("BI-Basic_Single_Quarter");break;case BI.DynamicDateCard.TYPE.MONTH:a=BI.i18nText("BI-Basic_Month");break;case BI.DynamicDateCard.TYPE.WEEK:a=BI.i18nText("BI-Basic_Week");break;case BI.DynamicDateCard.TYPE.DAY:default:a=BI.i18nText("BI-Basic_Day")}return a},setValue:function(a){a=a||{},a.value=a.value||0,a.offset=a.offset||0,this.editor.setValue(a.value),this.offsetCombo.setValue(a.offset)},getValue:function(){return{dateType:this.options.dateType,value:this.editor.getValue(),offset:this.offsetCombo.getValue()[0]}}}),BI.DynamicDateParamItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_date_param_item",BI.DynamicDateParamItem),BI.DynamicDatePopup=BI.inherit(BI.Widget,{constants:{tabHeight:30},props:{baseCls:"bi-dynamic-date-popup",width:248,height:344},_init:function(){BI.DynamicDatePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={type:BI.DynamicDateCombo.Static},BI.createWidget({element:this,type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",forceCenter:!0,cls:"bi-high-light bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-left bi-border-right bi-border-top",shadow:!0,text:BI.i18nText("BI-Multi_Date_Today"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-high-light bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}),this.setValue(b.value)},_getTabJson:function(){var a=this;return{type:"bi.tab",showIndex:BI.DynamicDateCombo.Static,ref:function(){a.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-border-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Multi_Date_YMD"),value:BI.DynamicDateCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicDateCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(b){switch(b){case BI.DynamicDateCombo.Dynamic:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,b)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicDateCombo.Static:default:return{type:"bi.date_calendar_popup",min:a.options.min,max:a.options.max,listeners:[{eventName:BI.DateCalendarPopup.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.EVENT_CHANGE)}}],ref:function(){a.ymd=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicDateCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth(),day:c.getDate()}),a._setInnerValue();break;case BI.DynamicDateCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicDateCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=a.print("%Y-%x-%e"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var e=BI.getDate();this.ymd.setValue({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.ymd.setValue(c),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"));this.textButton.setEnable(!0)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.DynamicDatePopup.EVENT_CHANGE="EVENT_CHANGE",BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.shortcut("bi.dynamic_date_popup",BI.DynamicDatePopup),BI.DynamicDateTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,yearLength:4,yearMonthLength:7},props:{extraCls:"bi-date-trigger",min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicDateTrigger.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(b){var c=b.match(/\d+/g);return a._autoAppend(b,c),a._dateCheck(b)&&BI.checkDateLegal(b)&&a._checkVoid({year:c[0],month:c[1],day:c[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){return a.editor.isEditing()?BI.i18nText("BI-Date_Trigger_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")}}),this.editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_VALID,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_VALID)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_ERROR)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();if(BI.isNotNull(b)&&a.editor.setState(b),BI.isNotEmptyString(b)){var c=b.split("-");a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:0|c[0],month:c[1],day:0|c[2]}}}a.fireEvent(BI.DynamicDateTrigger.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.DynamicDateTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.editor},{el:BI.createWidget(),width:30}]}),this.setValue(b.value)},_dateCheck:function(a){return BI.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")===a||BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")===a||BI.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")===a||BI.parseDateTime(a,"%Y-%X-%e").print("%Y-%X-%e")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.options.min,this.options.max)[0]},_autoAppend:function(a,b){if(BI.isNotNull(b)&&BI.checkDateLegal(a))switch(a.length){case this._const.yearLength:this._yearCheck(a)&&this.editor.setValue(a+"-");break;case this._const.yearMonthLength:this._monthCheck(a)&&this.editor.setValue(a+"-")}},_yearCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d");return BI.parseDateTime(a,"%Y").print("%Y")===a&&b>=this.options.min&&b<=this.options.max},_monthCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d");return BI.parseDateTime(a,"%Y-%X").print("%Y-%X")===a&&b>=this.options.min&&b<=this.options.max},_setInnerValue:function(a,b){var c=a.print("%Y-%x-%e");this.editor.setState(c),this.editor.setValue(c),this.setTitle(BI.isEmptyString(b)?c:b+":"+c)},_getText:function(a){function b(a,b){switch(b){case BI.DynamicDateCard.OFFSET.BEGIN:return a+BI.i18nText("BI-Basic_Begin_Start");case BI.DynamicDateCard.OFFSET.END:return a+BI.i18nText("BI-Basic_End_Stop");case BI.DynamicDateCard.OFFSET.CURRENT:default:return BI.i18nText("BI-Basic_Current_Day")}}var c="";return BI.isNotNull(a.year)&&0!==a.year&&(c+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))+b(BI.i18nText("BI-Basic_Year"),a.position)),BI.isNotNull(a.quarter)&&0!==a.quarter&&(c+=Math.abs(a.quarter)+BI.i18nText("BI-Basic_Single_Quarter")+(a.quarter<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))+b(BI.i18nText("BI-Basic_Year"),a.position)),BI.isNotNull(a.month)&&0!==a.month&&(c+=Math.abs(a.month)+BI.i18nText("BI-Basic_Month")+(a.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))+b(BI.i18nText("BI-Basic_Month"),a.position)),BI.isNotNull(a.week)&&0!==a.week&&(c+=Math.abs(a.week)+BI.i18nText("BI-Basic_Week")+(a.week<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))+b(BI.i18nText("BI-Basic_Week"),a.position)),BI.isNotNull(a.day)&&0!==a.day&&(c+=Math.abs(a.day)+BI.i18nText("BI-Basic_Day")+(a.day<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))+BI.size(a)===1?b(BI.i18nText("BI-Basic_Month"),a.position):""),BI.isNotNull(a.workDay)&&0!==a.workDay&&(c+=Math.abs(a.workDay)+BI.i18nText("BI-Basic_Work_Day")+(a.workDay<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),c},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:if(BI.isNull(c)||BI.isNull(c.day))this.editor.setState(""),this.editor.setValue(""),this.setTitle("");else{var f=c.year+"-"+c.month+"-"+c.day;this.editor.setState(f),this.editor.setValue(f),this.setTitle(f)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.storeValue}}),BI.DynamicDateTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicDateTrigger.EVENT_START="EVENT_START",BI.DynamicDateTrigger.EVENT_STOP="EVENT_STOP",BI.DynamicDateTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicDateTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.DynamicDateTrigger.EVENT_VALID="EVENT_VALID",BI.DynamicDateTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicDateTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.DynamicDateTrigger.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.shortcut("bi.dynamic_date_trigger",BI.DynamicDateTrigger),BI.DynamicDateTimeCombo=BI.inherit(BI.Single,{constants:{popupHeight:259,popupWidth:270,comboAdjustHeight:1,border:1,DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},props:{baseCls:"bi-dynamic-date-combo bi-border",height:24},render:function(){var a=this,b=this.options;this.storeTriggerValue="";var c=BI.getDate();return this.storeValue=b.value,{type:"bi.htape",items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24,ref:function(){a.changeIcon=this}},width:24},{type:"bi.absolute",items:[{el:{type:"bi.combo", ref:function(){a.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_time_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,value:b.value,ref:function(){a.trigger=this},listeners:[{eventName:BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN,action:function(){a.combo.isViewVisible()&&a.combo.hideView()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_STOP,action:function(){a.combo.isViewVisible()||a.combo.showView()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_TRIGGER_CLICK,action:function(){a.combo.toggle()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_FOCUS,action:function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_ERROR,action:function(){a.storeValue={year:c.getFullYear(),month:c.getMonth()},a.popup.setValue(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_ERROR)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_VALID,action:function(){a.fireEvent(BI.DynamicDateTimeCombo.EVENT_VALID)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CHANGE)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_CONFIRM,action:function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:{type:"bi.dynamic_date_time_popup",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,value:b.value,ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate(),hour:0,minute:0,second:0}),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}}]},stopPropagation:!1},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW)}}]},top:0,left:0,right:0,bottom:0},{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:24,height:24,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}}]},top:0,right:0}]}],ref:function(b){a.comboWrapper=b}}},mounted:function(){this._checkDynamicValue(this.options.value)},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.DynamicDateTimeCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()},hidePopupView:function(){this.combo.hideView()}}),BI.DynamicDateTimeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicDateTimeCombo.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicDateTimeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DynamicDateTimeCombo.EVENT_VALID="EVENT_VALID",BI.DynamicDateTimeCombo.EVENT_ERROR="EVENT_ERROR",BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_date_time_combo",BI.DynamicDateTimeCombo),BI.extend(BI.DynamicDateTimeCombo,{Static:1,Dynamic:2}),BI.DynamicDateTimePopup=BI.inherit(BI.Widget,{constants:{tabHeight:30},props:{baseCls:"bi-dynamic-date-time-popup",width:248,height:385},_init:function(){BI.DynamicDateTimePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={type:BI.DynamicDateCombo.Static},BI.createWidget({element:this,type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",forceCenter:!0,cls:"bi-high-light bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-left bi-border-right bi-border-top",shadow:!0,text:BI.i18nText("BI-Multi_Date_Today"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-high-light bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}),this.setValue(b.value)},_getTabJson:function(){var a=this;return{type:"bi.tab",showIndex:BI.DynamicDateCombo.Static,ref:function(){a.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-border-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Multi_Date_YMD"),value:BI.DynamicDateCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicDateCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(b){switch(b){case BI.DynamicDateCombo.Dynamic:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,b)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicDateCombo.Static:default:return{type:"bi.vtape",items:[{type:"bi.date_calendar_popup",min:a.options.min,max:a.options.max,ref:function(){a.ymd=this}},{el:{type:"bi.dynamic_date_time_select",ref:function(){a.timeSelect=this},listeners:[{eventName:BI.DynamicDateTimeSelect.EVENT_CONFIRM,action:function(){}}]},height:40}]}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicDateCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth(),day:c.getDate()}),a.timeSelect.setValue(),a._setInnerValue();break;case BI.DynamicDateCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicDateCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=a.print("%Y-%x-%e"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var e=BI.getDate();this.ymd.setValue({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()}),this.timeSelect.setValue(),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.ymd.setValue(c),this.timeSelect.setValue({hour:c.hour,minute:c.minute,second:c.second}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"));this.textButton.setEnable(!0)}},getValue:function(){var a=this.dateTab.getSelect();return{type:a,value:a===BI.DynamicDateTimeCombo.Static?BI.extend(this.ymd.getValue(),this.timeSelect.getValue()):this.dynamicPane.getValue()}}}),BI.DynamicDateTimePopup.EVENT_CHANGE="EVENT_CHANGE",BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.shortcut("bi.dynamic_date_time_popup",BI.DynamicDateTimePopup),BI.DynamicDateTimeSelect=BI.inherit(BI.Widget,{props:{baseCls:"bi-date-time-select bi-border-top"},render:function(){var a=this;return{type:"bi.center_adapt",items:[{type:"bi.vertical_adapt",items:[{el:{type:"bi.number_editor",ref:function(){a.hour=this},validationChecker:function(a){return BI.isNaturalNumber(a)&&BI.parseInt(a)<24},errorText:function(){return BI.i18nText("BI-Basic_Input_From_To_Number",'"00-23"')},listeners:[{eventName:BI.SignEditor.EVENT_CONFIRM,action:function(){this.setValue(a._formatValueToDoubleDigit(this.getValue())),a.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}},{eventName:BI.SignEditor.EVENT_CHANGE,action:function(){var b=a._autoSwitch(this.getValue(),BI.DynamicDateTimeSelect.HOUR);this.setValue(b)}}],width:60,height:24},lgap:14},{type:"bi.label",text:":",width:20},{type:"bi.number_editor",ref:function(){a.minute=this},validationChecker:function(a){return BI.isNaturalNumber(a)&&BI.parseInt(a)<60},errorText:function(){return BI.i18nText("BI-Basic_Input_From_To_Number",'"00-59"')},listeners:[{eventName:BI.SignEditor.EVENT_CONFIRM,action:function(){this.setValue(a._formatValueToDoubleDigit(this.getValue()),BI.DynamicDateTimeSelect.MINUTE),a.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}},{eventName:BI.SignEditor.EVENT_CHANGE,action:function(){var b=a._autoSwitch(this.getValue(),BI.DynamicDateTimeSelect.MINUTE);this.setValue(b)}}],width:60,height:24},{type:"bi.label",text:":",width:20},{type:"bi.number_editor",ref:function(){a.second=this},validationChecker:function(a){return BI.isNaturalNumber(a)&&BI.parseInt(a)<60},errorText:function(){return BI.i18nText("BI-Basic_Input_From_To_Number",'"00-59"')},listeners:[{eventName:BI.SignEditor.EVENT_CONFIRM,action:function(){this.setValue(a._formatValueToDoubleDigit(this.getValue())),a.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}}],width:60,height:24}]}]}},_autoSwitch:function(a,b){var c=0,d=a;switch(b){case BI.DynamicDateTimeSelect.HOUR:c=2;break;case BI.DynamicDateTimeSelect.MINUTE:c=6}return 1===a.length&&BI.parseInt(a)>c&&(d="0"+d),2===d.length&&(b===BI.DynamicDateTimeSelect.HOUR?this.minute.focus():this.second.focus()),d},_formatValueToDoubleDigit:function(a){(BI.isNull(a)||BI.isEmptyString(a))&&(a=0);var b=BI.parseInt(a);return b<10&&(b="0"+b),b},_assertValue:function(a){return a=a||{},a.hour=this._formatValueToDoubleDigit(a.hour)||"00",a.minute=this._formatValueToDoubleDigit(a.minute)||"00",a.second=this._formatValueToDoubleDigit(a.second)||"00",a},getValue:function(){return{hour:BI.parseInt(this.hour.getValue()),minute:BI.parseInt(this.minute.getValue()),second:BI.parseInt(this.second.getValue())}},setValue:function(a){a=this._assertValue(a),this.hour.setValue(a.hour),this.minute.setValue(a.minute),this.second.setValue(a.second)}}),BI.DynamicDateTimeSelect.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.dynamic_date_time_select",BI.DynamicDateTimeSelect),BI.extend(BI.DynamicDateTimeSelect,{HOUR:1,MINUTE:2}),BI.DynamicDateTimeTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,yearLength:4,yearMonthLength:7},props:{extraCls:"bi-date-time-trigger",min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicDateTimeTrigger.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(b){var c=b.match(/\d+/g);return a._autoAppend(b,c),a._dateCheck(b)&&BI.checkDateLegal(b)&&a._checkVoid({year:c[0],month:c[1],day:c[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){return a.editor.isEditing()?BI.i18nText("BI-Basic_Date_Time_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")}}),this.editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_VALID,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_VALID)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_ERROR)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();if(BI.isNotNull(b)&&a.editor.setState(b),BI.isNotEmptyString(b)){var c=b.split(/-|\s|:/);a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:0|c[0],month:c[1],day:0|c[2],hour:0|c[3],minute:0|c[4],second:0|c[5]}}}a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.editor},{el:BI.createWidget(),width:30}]}),this.setValue(b.value)},_dateCheck:function(a){return BI.parseDateTime(a,"%Y-%x-%d %H:%M:%S").print("%Y-%x-%d %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%X-%d %H:%M:%S").print("%Y-%X-%d %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%x-%e %H:%M:%S").print("%Y-%x-%e %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%X-%e %H:%M:%S").print("%Y-%X-%e %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")===a||BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")===a||BI.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")===a||BI.parseDateTime(a,"%Y-%X-%e").print("%Y-%X-%e")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.options.min,this.options.max)[0]},_autoAppend:function(a,b){if(BI.isNotNull(b)&&BI.checkDateLegal(a))switch(a.length){case this._const.yearLength:this._yearCheck(a)&&this.editor.setValue(a+"-");break;case this._const.yearMonthLength:this._monthCheck(a)&&this.editor.setValue(a+"-")}},_yearCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d");return BI.parseDateTime(a,"%Y").print("%Y")===a&&b>=this.options.min&&b<=this.options.max},_monthCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d");return BI.parseDateTime(a,"%Y-%X").print("%Y-%X")===a&&b>=this.options.min&&b<=this.options.max},_setInnerValue:function(a,b){var c=a.print("%Y-%x-%e %H:%M:%S");this.editor.setState(c),this.editor.setValue(c),this.setTitle(BI.isEmptyString(b)?c:b+":"+c)},_getText:function(a){function b(a,b){switch(b){case BI.DynamicDateCard.OFFSET.BEGIN:return a+BI.i18nText("BI-Basic_Begin_Start");case BI.DynamicDateCard.OFFSET.END:return a+BI.i18nText("BI-Basic_End_Stop");case BI.DynamicDateCard.OFFSET.CURRENT:default:return BI.i18nText("BI-Basic_Current_Day")}}var c="";return BI.isNotNull(a.year)&&0!==a.year&&(c+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))+b(BI.i18nText("BI-Basic_Year"),a.position)),BI.isNotNull(a.quarter)&&0!==a.quarter&&(c+=Math.abs(a.quarter)+BI.i18nText("BI-Basic_Single_Quarter")+(a.quarter<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))+b(BI.i18nText("BI-Basic_Year"),a.position)),BI.isNotNull(a.month)&&0!==a.month&&(c+=Math.abs(a.month)+BI.i18nText("BI-Basic_Month")+(a.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))+b(BI.i18nText("BI-Basic_Month"),a.position)),BI.isNotNull(a.week)&&0!==a.week&&(c+=Math.abs(a.week)+BI.i18nText("BI-Basic_Week")+(a.week<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))+b(BI.i18nText("BI-Basic_Week"),a.position)),BI.isNotNull(a.day)&&0!==a.day&&(c+=Math.abs(a.day)+BI.i18nText("BI-Basic_Day")+(a.day<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))+BI.size(a)===1?b(BI.i18nText("BI-Basic_Month"),a.position):""),BI.isNotNull(a.workDay)&&0!==a.workDay&&(c+=Math.abs(a.workDay)+BI.i18nText("BI-Basic_Work_Day")+(a.workDay<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),c},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:if(BI.isNull(c)||BI.isNull(c.day))this.editor.setState(""),this.editor.setValue(""),this.setTitle("");else{var f=c.year+"-"+c.month+"-"+c.day+" "+(c.hour||"00")+":"+(c.minute||"00")+":"+(c.second||"00");this.editor.setState(f),this.editor.setValue(f),this.setTitle(f)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.storeValue}}),BI.DynamicDateTimeTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicDateTimeTrigger.EVENT_START="EVENT_START",BI.DynamicDateTimeTrigger.EVENT_STOP="EVENT_STOP",BI.DynamicDateTimeTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicDateTimeTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.DynamicDateTimeTrigger.EVENT_VALID="EVENT_VALID",BI.DynamicDateTimeTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicDateTimeTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.shortcut("bi.dynamic_date_time_trigger",BI.DynamicDateTimeTrigger),BI.SearchEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SearchEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-search-editor bi-border",height:24,errorText:"",watermark:BI.i18nText("BI-Basic_Search"),validationChecker:BI.emptyFn,quitChecker:BI.emptyFn})},_init:function(){this.options.height-=2,BI.SearchEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,watermark:b.watermark,allowBlank:!0,errorText:b.errorText,validationChecker:b.validationChecker,quitChecker:b.quitChecker}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"search-close-h-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){a.setValue(""),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),a.fireEvent(BI.SearchEditor.EVENT_CLEAR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:{type:"bi.center_adapt",cls:"search-font",items:[{el:{type:"bi.icon"}}]},width:25},{el:a.editor},{el:this.clear,width:25}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SearchEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SearchEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SearchEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a._checkClear(),a.fireEvent(BI.SearchEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SearchEditor.EVENT_KEY_DOWN,b)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SearchEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){a.fireEvent(BI.SearchEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SearchEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.SearchEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SearchEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SearchEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a._checkClear(),a.fireEvent(BI.SearchEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){a.fireEvent(BI.SearchEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.SearchEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SearchEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SearchEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SearchEditor.EVENT_STOP)}),this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid()){var a=this.editor.getValue().match(/[\S]+/g);return BI.isNull(a)?"":a[a.length-1]}},getLastValidValue:function(){return this.editor.getLastValidValue()},setValue:function(a){this.editor.setValue(a),BI.isKey(a)&&this.clear.visible()},isEditing:function(){return this.editor.isEditing()},isValid:function(){return this.editor.isValid()}}),BI.SearchEditor.EVENT_CHANGE="EVENT_CHANGE",BI.SearchEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SearchEditor.EVENT_BLUR="EVENT_BLUR",BI.SearchEditor.EVENT_CLICK="EVENT_CLICK",BI.SearchEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.SearchEditor.EVENT_SPACE="EVENT_SPACE",BI.SearchEditor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.SearchEditor.EVENT_CLEAR="EVENT_CLEAR",BI.SearchEditor.EVENT_START="EVENT_START",BI.SearchEditor.EVENT_PAUSE="EVENT_PAUSE",BI.SearchEditor.EVENT_STOP="EVENT_STOP",BI.SearchEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SearchEditor.EVENT_VALID="EVENT_VALID",BI.SearchEditor.EVENT_ERROR="EVENT_ERROR",BI.SearchEditor.EVENT_ENTER="EVENT_ENTER",BI.SearchEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.SearchEditor.EVENT_REMOVE="EVENT_REMOVE",BI.SearchEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.search_editor",BI.SearchEditor),BI.SmallSearchEditor=BI.inherit(BI.SearchEditor,{_defaultConfig:function(){var a=BI.SmallSearchEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-small-search-editor",height:24})},_init:function(){BI.SmallSearchEditor.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.small_search_editor",BI.SmallSearchEditor),BI.TextEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.TextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-text-editor bi-border",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!1,watermark:"",errorText:"",height:24})},_init:function(){BI.TextEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNumber(b.height)&&this.element.css({height:b.height-2}),BI.isNumber(b.width)&&this.element.css({width:b.width-2}),this.editor=BI.createWidget({type:"bi.editor",height:b.height-2,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,title:b.title,tipType:b.tipType,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.TextEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.TextEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.TextEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.TextEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.TextEditor.EVENT_KEY_DOWN)}),this.editor.on(BI.Editor.EVENT_SPACE,function(b){a.fireEvent(BI.TextEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(b){a.fireEvent(BI.TextEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.TextEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.TextEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(b){a.fireEvent(BI.TextEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.TextEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.TextEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.TextEditor.EVENT_STOP)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.TextEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.TextEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.TextEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.TextEditor.EVENT_EMPTY)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isValid:function(){return this.editor.isValid()},setValue:function(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()}}),BI.TextEditor.EVENT_CHANGE="EVENT_CHANGE",BI.TextEditor.EVENT_FOCUS="EVENT_FOCUS",BI.TextEditor.EVENT_BLUR="EVENT_BLUR",BI.TextEditor.EVENT_CLICK="EVENT_CLICK",BI.TextEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.TextEditor.EVENT_SPACE="EVENT_SPACE",BI.TextEditor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.TextEditor.EVENT_START="EVENT_START",BI.TextEditor.EVENT_PAUSE="EVENT_PAUSE",BI.TextEditor.EVENT_STOP="EVENT_STOP",BI.TextEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.TextEditor.EVENT_VALID="EVENT_VALID",BI.TextEditor.EVENT_ERROR="EVENT_ERROR",BI.TextEditor.EVENT_ENTER="EVENT_ENTER",BI.TextEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.TextEditor.EVENT_REMOVE="EVENT_REMOVE",BI.TextEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.text_editor",BI.TextEditor),BI.SmallTextEditor=BI.inherit(BI.TextEditor,{_defaultConfig:function(){var a=BI.SmallTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-small-text-editor",height:25})},_init:function(){BI.SmallTextEditor.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.small_text_editor",BI.SmallTextEditor),BI.FileManagerButtonGroup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerButtonGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-button_group",items:[]})},_init:function(){BI.FileManagerButtonGroup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button_group=BI.createWidget({type:"bi.button_tree",element:this,chooseType:BI.Selection.Multi,items:this._formatItems(b.items),layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_formatItems:function(a){this.options;return BI.each(a,function(a,b){b.children&&b.children.length>0?b.type="bi.file_manager_folder_item":b.type="bi.file_manager_file_item"}),a},setValue:function(a){this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getNotSelectedValue:function(){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,height:b.height}),this.checked.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button=BI.createWidget({type:"bi.text_button",textAlign:"left",height:b.height,text:b.text,value:b.value}),this.button.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CHANGE,b.value,a)}),this.tree=new BI.Tree,this.tree.initTree([{id:b.id,children:b.children}]),this.selectValue=[],BI.createWidget({type:"bi.htape",element:this,items:[{el:this.checked,width:36},{el:{type:"bi.icon_button",cls:"create-by-me-folder-font"},width:20},{el:this.button}]})},setAllSelected:function(a){this.checked.setSelected(a),this.selectValue=[]},setHalfSelected:function(a){this.checked.setHalfSelected(a), -a||(this.selectValue=[])},setValue:function(a){var b=(this.options,!1),c=[];this.tree.traverse(function(d){d.isLeaf()&&(BI.contains(a,d.get("data").value)?c.push(d.get("data").value):b=!0)}),this.setAllSelected(c.length>0&&!b),this.setHalfSelected(c.length>0&&b),this.checked.isHalfSelected()&&(this.selectValue=c)},getAllButtons:function(){return[this]},getAllLeaves:function(){var a=(this.options,[]);return this.tree.traverse(function(b){b.isLeaf()&&a.push(b.get("data").value)}),a},getNotSelectedValue:function(){var a=this,b=(this.options,[]),c=this.checked.isSelected();if(c===!0)return b;var d=this.checked.isHalfSelected();return this.tree.traverse(function(c){if(c.isLeaf()){var e=c.get("data").value;d===!0?BI.contains(a.selectValue,c.get("data").value)||b.push(e):b.push(e)}}),b},getValue:function(){var a=[];return this.checked.isSelected()?(this.tree.traverse(function(b){b.isLeaf()&&a.push(b.get("data").value)}),a):this.checked.isHalfSelected()?this.selectValue:[]}}),BI.FileManagerFolderItem.EVENT_CHANGE="FileManagerFolderItem.EVENT_CHANGE",BI.shortcut("bi.file_manager_folder_item",BI.FileManagerFolderItem),BI.FileManagerList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-list",el:{},items:[]})},_init:function(){BI.FileManagerList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.list=BI.createWidget({type:"bi.select_list",element:this,items:b.items,toolbar:{type:"bi.multi_select_bar",height:40,text:""},el:{type:"bi.list_pane",el:BI.isWidget(b.el)?b.el:BI.extend({type:"bi.file_manager_button_group"},b.el)}}),this.list.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){this.list.setValue({value:a})},getValue:function(){return this.list.getValue()},populate:function(a){this.list.populate(a),this.list.setToolBarVisible(!0)}}),BI.FileManagerList.EVENT_CHANGE="FileManagerList.EVENT_CHANGE",BI.shortcut("bi.file_manager_list",BI.FileManagerList),BI.FileManagerNavButton=BI.inherit(BI.Widget,{_const:{normal_color:"#ffffff",select_color:"#eff1f4"},_defaultConfig:function(){return BI.extend(BI.FileManagerNavButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-nav-button",selected:!1,height:40})},_init:function(){BI.FileManagerNavButton.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.button=BI.createWidget({type:"bi.text_button",cls:"file-manager-nav-button-text bi-card",once:!0,selected:b.selected,text:b.text,title:b.text,value:b.value,height:b.height,lgap:20,rgap:10}),this.button.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var d=BI.createWidget({type:"bi.svg",cls:"file-manager-nav-button-triangle",width:15,height:b.height}),e=d.path("M0,0L15,20L0,40").attr({stroke:c.select_color,fill:b.selected?c.select_color:c.normal_color});this.button.on(BI.TextButton.EVENT_CHANGE,function(){this.isSelected()?e.attr("fill",c.select_color):e.attr("fill",c.normal_color)}),BI.createWidget({type:"bi.default",element:this,items:[this.button]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:d,right:-15,top:0,bottom:0}]})},isSelected:function(){return this.button.isSelected()},setValue:function(a){this.button.setValue(a)},getValue:function(){return this.button.getValue()},populate:function(a){}}),BI.FileManagerNavButton.EVENT_CHANGE="FileManagerNavButton.EVENT_CHANGE",BI.shortcut("bi.file_manager_nav_button",BI.FileManagerNavButton),BI.FileManagerNav=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerNav.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-nav bi-border-left",height:40,items:[]})},_init:function(){BI.FileManagerNav.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=new BI.Tree,this.refreshTreeData(b.items),this.tree.getRoot().set("data",{text:BI.i18nText("BI-Created_By_Me"),value:BI.FileManagerNav.ROOT_CREATE_BY_ME,id:BI.FileManagerNav.ROOT_CREATE_BY_ME}),this.button_group=BI.createWidget({type:"bi.button_group",element:this,items:[{type:"bi.file_manager_nav_button",text:BI.i18nText("BI-Created_By_Me"),selected:!0,id:BI.FileManagerNav.ROOT_CREATE_BY_ME,value:BI.FileManagerNav.ROOT_CREATE_BY_ME}],layouts:[{type:"bi.horizontal"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.FileManagerNav.EVENT_CHANGE,arguments)})},_getAllParents:function(a){var b,c=[];for(b=a?this.tree.search(a):this.tree.getRoot();b.parent;)c.push(b),b=b.parent;return c.push(b),c.reverse()},_formatNodes:function(a){var b=[];return BI.each(a,function(a,c){b.push(BI.extend({type:"bi.file_manager_nav_button",id:c.id},c.get("data")))}),BI.last(b).selected=!0,b},getValue:function(){return this.button_group.getValue()},getId:function(){var a=[];return BI.each(this.button_group.getSelectedButtons(),function(b,c){a.push(c.attr("id"))}),a},refreshTreeData:function(a){this.tree.initTree(BI.Tree.transformToTreeFormat(a)),this.tree.getRoot().set("data",{text:BI.i18nText("BI-Created_By_Me"),value:BI.FileManagerNav.ROOT_CREATE_BY_ME,id:BI.FileManagerNav.ROOT_CREATE_BY_ME})},populate:function(a){var b=BI.isNull(a)?[this.tree.getRoot()]:this._getAllParents(a.id);this.button_group.populate(this._formatNodes(b))}}),BI.extend(BI.FileManagerNav,{ROOT_CREATE_BY_ME:"-1"}),BI.FileManagerNav.EVENT_CHANGE="FileManagerNav.EVENT_CHANGE",BI.shortcut("bi.file_manager_nav",BI.FileManagerNav),BI.IntervalSlider=BI.inherit(BI.Widget,{_constant:{EDITOR_WIDTH:58,EDITOR_R_GAP:60,EDITOR_HEIGHT:30,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},_defaultConfig:function(){return BI.extend(BI.IntervalSlider.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-interval-slider bi-slider-track",digit:!1,unit:""})},_init:function(){BI.IntervalSlider.superclass._init.apply(this,arguments);var a=this,b=this._constant;this.enable=!1,this.valueOne="",this.valueTwo="",this.calculation=new BI.AccurateCalculationModel,this.grayTrack=BI.createWidget({type:"bi.layout",cls:"gray-track",height:6}),this.blueTrack=BI.createWidget({type:"bi.layout",cls:"blue-track bi-high-light-background",height:6}),this.track=this._createTrackWrapper(),this.labelOne=BI.createWidget({type:"bi.sign_text_editor",cls:"slider-editor-button",text:this.options.unit,errorText:"",allowBlank:!1,width:b.EDITOR_WIDTH,validationChecker:function(b){return a._checkValidation(b)}}),this.labelOne.element.hover(function(){a.labelOne.element.removeClass("bi-border").addClass("bi-border")},function(){a.labelOne.element.removeClass("bi-border")}),this.labelOne.on(BI.Editor.EVENT_CONFIRM,function(){var b=BI.parseFloat(this.getValue());a.valueOne=b;var c=a._getPercentByValue(b),d=BI.parseFloat(c.toFixed(1));a._setLabelOnePosition(d),a._setSliderOnePosition(d),a._setBlueTrack(),a.fireEvent(BI.IntervalSlider.EVENT_CHANGE)}),this.labelTwo=BI.createWidget({type:"bi.sign_text_editor",cls:"slider-editor-button",errorText:"",text:this.options.unit,allowBlank:!1,width:b.EDITOR_WIDTH,validationChecker:function(b){return a._checkValidation(b)}}),this.labelTwo.element.hover(function(){a.labelTwo.element.removeClass("bi-border").addClass("bi-border")},function(){a.labelTwo.element.removeClass("bi-border")}),this.labelTwo.on(BI.Editor.EVENT_CONFIRM,function(){var b=BI.parseFloat(this.getValue());a.valueTwo=b;var c=a._getPercentByValue(b),d=BI.parseFloat(c.toFixed(1));a._setLabelTwoPosition(d),a._setSliderTwoPosition(d),a._setBlueTrack(),a.fireEvent(BI.IntervalSlider.EVENT_CHANGE)}),this.sliderOne=BI.createWidget({type:"bi.single_slider_button"}),this.sliderTwo=BI.createWidget({type:"bi.single_slider_button"}),this._draggable(this.sliderOne,!0),this._draggable(this.sliderTwo,!1),this._setVisible(!1),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.track,width:"100%",height:b.TRACK_HEIGHT}]}],hgap:7,height:b.TRACK_HEIGHT},top:23,left:0,width:"100%"},this._createLabelWrapper(),this._createSliderWrapper()]})},_rePosBySizeAfterMove:function(a,b){var c=this.options,d=100*a/this._getGrayTrackLength(),e=BI.parseFloat(d.toFixed(1)),f=this._getValueByPercent(e);f=this._assertValue(f),f=c.digit===!1?f:f.toFixed(c.digit),b?(this._setLabelOnePosition(e),this._setSliderOnePosition(e),this.labelOne.setValue(f),this.valueOne=f):(this._setLabelTwoPosition(e),this._setSliderTwoPosition(e),this.labelTwo.setValue(f),this.valueTwo=f),this._setBlueTrack()},_rePosBySizeAfterStop:function(a,b){var c=100*a/this._getGrayTrackLength(),d=BI.parseFloat(c.toFixed(1));b?this._setSliderOnePosition(d):this._setSliderTwoPosition(d)},_draggable:function(a,b){function c(a){return BI.clamp(a,0,d._getGrayTrackLength())}var d=this,e=(this.options,!1),f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){i.isDragging()&&(e=!0,g+=j,f=c(h+g),a.element.addClass("dragging"),d._rePosBySizeAfterMove(f,b))},function(){e===!0&&(f=c(f),d._rePosBySizeAfterStop(f,b),f=0,g=0,h=f,e=!1),a.element.removeClass("dragging"),i.releaseMouseMoves(),d.fireEvent(BI.IntervalSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(b){a.isEnabled()&&(h=this.offsetLeft,c(h),i.captureMouseMoves(b))})},_createLabelWrapper:function(){var a=this._constant;return{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.labelOne,top:0,left:"0%"}]},{type:"bi.absolute",items:[{el:this.labelTwo,top:0,left:"100%"}]}],rgap:a.EDITOR_R_GAP,height:70},top:0,left:0,width:"100%"}},_createSliderWrapper:function(){var a=this._constant;return{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.sliderOne,top:0,left:"0%"}]},{type:"bi.absolute",items:[{el:this.sliderTwo,top:0,left:"100%"}]}],hgap:a.SLIDER_WIDTH_HALF,height:a.SLIDER_HEIGHT},top:20,left:0,width:"100%"}},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){var b=this.options,c=!1,d=(a+"").split(".")[1];return BI.isEmptyString(d)||BI.isNumeric(a)&&!(BI.isNull(a)||athis.max)&&(b.digit===!1?c=!0:(d=d||"",c=d.length===b.digit)),c},_checkOverlap:function(){var a=this.labelOne.element[0].offsetLeft,b=this.labelTwo.element[0].offsetLeft;a<=b?b-a<90?this.labelTwo.element.css({top:40}):this.labelTwo.element.css({top:0}):a-b<90?this.labelTwo.element.css({top:40}):this.labelTwo.element.css({top:0})},_setLabelOnePosition:function(a){this.labelOne.element.css({left:a+"%"}),this._checkOverlap()},_setLabelTwoPosition:function(a){this.labelTwo.element.css({left:a+"%"}),this._checkOverlap()},_setSliderOnePosition:function(a){this.sliderOne.element.css({left:a+"%"})},_setSliderTwoPosition:function(a){this.sliderTwo.element.css({left:a+"%"})},_setBlueTrackLeft:function(a){this.blueTrack.element.css({left:a+"%"})},_setBlueTrackWidth:function(a){this.blueTrack.element.css({width:a+"%"})},_setBlueTrack:function(){var a=this._getPercentByValue(this.labelOne.getValue()),b=this._getPercentByValue(this.labelTwo.getValue());a<=b?(this._setBlueTrackLeft(a),this._setBlueTrackWidth(b-a)):(this._setBlueTrackLeft(b),this._setBlueTrackWidth(a-b))},_setAllPosition:function(a,b){this._setSliderOnePosition(a),this._setLabelOnePosition(a),this._setSliderTwoPosition(b),this._setLabelTwoPosition(b),this._setBlueTrack()},_setVisible:function(a){this.sliderOne.setVisible(a),this.sliderTwo.setVisible(a),this.labelOne.setVisible(a),this.labelTwo.setVisible(a)},_setErrorText:function(){var a=BI.i18nText("BI-Please_Enter")+this.min+"-"+this.max+BI.i18nText("BI-Basic_De")+BI.i18nText("BI-Basic_Number");this.labelOne.setErrorText(a),this.labelTwo.setErrorText(a)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(a){var b=this.calculation.accurateSubtraction(this.max,this.min),c=this.calculation.accurateMultiplication(b,a),d=this.calculation.accurateDivisionTenExponent(c,2);if(this.precision<0){var e=BI.parseFloat(this.calculation.accurateAddition(d,this.min)),f=Math.round(this.calculation.accurateDivisionTenExponent(e,-this.precision));return this.calculation.accurateMultiplication(f,Math.pow(10,-this.precision))}return BI.parseFloat(this.calculation.accurateAddition(d,this.min).toFixed(this.precision))},_getPercentByValue:function(a){return 100*(a-this.min)/(this.max-this.min)},_setDraggableEnable:function(a){this.sliderOne.setEnable(a),this.sliderTwo.setEnable(a)},_getPrecision:function(){var a=this.calculation.accurateSubtraction(this.max,this.min),b=a.toPrecision(4),c=b.indexOf("e"),d=[];if(c>-1){d=b.split("e");var e=BI.size(d[0].split(".")[1]),f=BI.parseInt(d[1].substring(1));return e-f}return d=b.split("."),d.length>1?d[1].length:0},_assertValue:function(a){return a<=this.min?this.min:a>=this.max?this.max:a},getValue:function(){return this.valueOne<=this.valueTwo?{min:this.valueOne,max:this.valueTwo}:{min:this.valueTwo,max:this.valueOne}},setMinAndMax:function(a){var b=BI.parseFloat(a.min),c=BI.parseFloat(a.max);!isNaN(b)&&!isNaN(c)&&c>=b&&(this.min=b,this.max=c,this.valueOne=b,this.valueTwo=c,this.precision=this._getPrecision(),this._setDraggableEnable(!0)),c===b&&this._setDraggableEnable(!1)},setValue:function(a){var b=this.options,c=BI.parseFloat(a.min),d=BI.parseFloat(a.max);c=b.digit===!1?c:c.toFixed(b.digit),d=b.digit===!1?d:d.toFixed(b.digit),isNaN(c)||isNaN(d)||(this._checkValidation(c)&&(this.valueOne=c),this._checkValidation(d)&&(this.valueTwo=d),cthis.max&&(this.valueTwo=this.max))},reset:function(){this._setVisible(!1),this.enable=!1,this.valueOne="",this.valueTwo="",this.min=NaN,this.max=NaN,this._setBlueTrackWidth(0)},populate:function(){isNaN(this.min)||isNaN(this.max)||(this.enable=!0,this._setVisible(!0),this._setErrorText(),(BI.isNumeric(this.valueOne)||BI.isNotEmptyString(this.valueOne))&&(BI.isNumeric(this.valueTwo)||BI.isNotEmptyString(this.valueTwo))?(this.labelOne.setValue(this.valueOne),this.labelTwo.setValue(this.valueTwo),this._setAllPosition(this._getPercentByValue(this.valueOne),this._getPercentByValue(this.valueTwo))):(this.labelOne.setValue(this.min),this.labelTwo.setValue(this.max),this._setAllPosition(0,100)))}}),BI.IntervalSlider.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.interval_slider",BI.IntervalSlider),BI.AccurateCalculationModel=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.AccurateCalculationModel.superclass._defaultConfig.apply(this,arguments),{baseCls:""})},_init:function(){BI.AccurateCalculationModel.superclass._init.apply(this,arguments)},_getMagnitude:function(a){for(var b="1",c=0;c0)var d=b;else{var d=a;c=0-c}for(var e=0;e=b.numDecimal.length?a.numDecimal.length:b.numDecimal.length}function d(a,b){for(var c=b-a.length,d=0;d=BI.parseInt(f.numDecimal))var i=(BI.parseInt(e.numDecimal)-BI.parseInt(f.numDecimal)).toString(),j=d(i,h);else{g--;var k=this._getMagnitude(h),i=(k+BI.parseInt(e.numDecimal)-BI.parseInt(f.numDecimal)).toString(),j=d(i,h)}var l=g+"."+j;return BI.parseFloat(l)},_accurateAddition:function(a,b){function c(a,b){for(var c=b-a.length,d=0;db)var e=d.numInteger.slice(0,d.numInteger.length-b),f=d.numInteger.slice(-b);else var e="0",f=c(d.numInteger,b);var g=e+"."+f+d.numDecimal;return BI.parseFloat(g)},accurateSubtraction:function(a,b){return a>=0&&b>=0?a>=b?this._accurateSubtraction(a,b):-this._accurateSubtraction(b,a):a>=0&&b<0?this._accurateAddition(a,-b):a<0&&b>=0?-this._accurateAddition(-a,b):a<0&&b<0?a>=b?this._accurateSubtraction(-b,-a):this._accurateSubtraction(-a,-b):void 0},accurateAddition:function(a,b){return a>=0&&b>=0?this._accurateAddition(a,b):a>=0&&b<0?this.accurateSubtraction(a,-b):a<0&&b>=0?this.accurateSubtraction(b,-a):a<0&&b<0?-this._accurateAddition(-a,-b):void 0},accurateMultiplication:function(a,b){return a>=0&&b>=0?this._accurateMultiplication(a,b):a>=0&&b<0?-this._accurateMultiplication(a,-b):a<0&&b>=0?-this._accurateMultiplication(-a,b):a<0&&b<0?this._accurateMultiplication(-a,-b):void 0},accurateDivisionTenExponent:function(a,b){return a>=0?this._accurateDivisionTenExponent(a,b):-this._accurateDivisionTenExponent(-a,b)}}),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",value:b.value}),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,value:b.value}),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 BI.isNull(this.popup)?this.options.value||"":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=[1,7,2,8,3,9,4,10,5,11,6,12],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}})}),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}],value:b.value}),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.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.MonthTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Month"),baseCls:"bi-trigger-month-text",width:b.height},width:b.height},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]}),this.setValue(b.value)},setValue:function(a){return BI.isNotNull(a)?(this.editor.setState(a+1),this.editor.setValue(a+1),void this.editor.setTitle(a+1)):(this.editor.setState(""),this.editor.setValue(""),void this.editor.setTitle(""))},getKey:function(){return 0|this.editor.getValue()},getValue:function(){return this.editor.getValue()-1}}),BI.MonthTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.MonthTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.MonthTrigger.EVENT_START="EVENT_START",BI.MonthTrigger.EVENT_STOP="EVENT_STOP",BI.MonthTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_trigger",BI.MonthTrigger),BI.DownListCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-down-list-combo",height:24,items:[],adjustLength:0,direction:"bottom",trigger:"click",container:null,stopPropagation:!1,el:{}})},_init:function(){BI.DownListCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popupview=BI.createWidget({type:"bi.multi_layer_down_list_popup",items:b.items,chooseType:b.chooseType,value:b.value}),this.popupview.on(BI.DownListPopup.EVENT_CHANGE,function(b){a.fireEvent(BI.DownListCombo.EVENT_CHANGE,b),a.downlistcombo.hideView()}),this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,function(b,c){a.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,b,c),a.downlistcombo.hideView()}),this.downlistcombo=BI.createWidget({element:this,type:"bi.combo",trigger:b.trigger,isNeedAdjustWidth:!1,container:b.container,adjustLength:b.adjustLength,direction:b.direction,stopPropagation:b.stopPropagation,el:BI.createWidget(b.el,{type:"bi.icon_trigger",extraCls:b.iconCls?b.iconCls:"pull-down-font",width:b.width,height:b.height}),popup:{el:this.popupview,stopPropagation:!0,maxHeight:1e3}}),this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW)})},hideView:function(){this.downlistcombo.hideView()},showView:function(){this.downlistcombo.showView()},populate:function(a){this.popupview.populate(a)},setValue:function(a){this.popupview.setValue(a)},getValue:function(){return this.popupview.getValue()}}),BI.DownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DownListCombo.EVENT_SON_VALUE_CHANGE="EVENT_SON_VALUE_CHANGE",BI.DownListCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_layer_down_list_combo",BI.DownListCombo),BI.MultiLayerDownListPopup=BI.inherit(BI.Pane,{constants:{nextIcon:"pull-right-e-font",height:25,iconHeight:12,iconWidth:12,hgap:0,vgap:0,border:1},_defaultConfig:function(){var a=BI.MultiLayerDownListPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-down-list-popup",items:[],chooseType:BI.Selection.Multi})},_init:function(){BI.MultiLayerDownListPopup.superclass._init.apply(this,arguments),this.singleValues=[],this.childValueMap={},this.fatherValueMap={};var a=this,b=this.options,c=this._createPopupItems(b.items);this.popup=BI.createWidget({type:"bi.button_tree",items:BI.createItems(c,{},{adjustLength:-2}),layouts:[{type:"bi.vertical",hgap:this.constants.hgap,vgap:this.constants.vgap}],value:this._digest(b.value),chooseType:b.chooseType}),this.popup.on(BI.ButtonTree.EVENT_CHANGE,function(b,c){var d=b;if(BI.isNotNull(a.childValueMap[b])){d=a.childValueMap[b];var e=a.fatherValueMap[b],f=(e+"").split("_");a.fireEvent(BI.MultiLayerDownListPopup.EVENT_SON_VALUE_CHANGE,d,f.length>1?f:e)}else a.fireEvent(BI.MultiLayerDownListPopup.EVENT_CHANGE,d,c);if(!a.singleValues.contains(d)){var g=a.getValue(),h=[];BI.each(g,function(a,b){b.value!=d&&h.push(b)}),a.setValue(h)}}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup]})},_createPopupItems:function(a){var b=this,c=[];return BI.each(a,function(d,e){var f={type:"bi.down_list_group",items:[]};if(BI.each(e,function(a,c){BI.isNotEmptyArray(c.children)&&!BI.isEmpty(c.el)?(c.type="bi.combo_group",c.cls="down-list-group",c.trigger="hover",c.isNeedAdjustWidth=!1,c.el.title=c.el.title||c.el.text,c.el.type="bi.down_list_group_item",c.el.logic={dynamic:!0},c.el.height=b.constants.height,c.el.iconCls2=b.constants.nextIcon,c.popup={lgap:4,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}},c.el.childValues=[],BI.each(c.children,function(a,d){d=d.el?BI.extend(d.el,{children:d.children}):d;var e=BI.deepClone(c.el.value),f=BI.deepClone(d.value);b.singleValues.push(d.value),d.type="bi.down_list_item",d.extraCls=" child-down-list-item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),c.el.childValues.push(d.value),BI.isNotEmptyArray(d.children)&&(d.type="bi.down_list_group_item",b._createChildren(d),d.height=b.constants.height,d.iconCls2=b.constants.nextIcon,c.el.childValues=BI.concat(c.el.childValues,d.childValues))})):(c.type="bi.down_list_item",c.title=c.title||c.text,c.textRgap=10,c.isNeedAdjustWidth=!1,c.logic={dynamic:!0});var d={};d.el=c,f.items.push(d)}),b._isGroup(f.items)&&BI.each(f.items,function(a,c){b.singleValues.push(c.el.value)}),c.push(f),b._needSpliter(d,a.length)){var g=BI.createWidget({type:"bi.vertical",items:[{el:{type:"bi.layout",cls:"bi-down-list-spliter bi-border-top cursor-pointer",height:0}}],cls:"bi-down-list-spliter-container cursor-pointer",lgap:10,rgap:10});c.push(g)}}),c},_createChildren:function(a){var b=this;a.childValues=[],BI.each(a.children,function(c,d){var e=BI.deepClone(a.value),f=BI.deepClone(d.value);d.type="bi.down_list_item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),a.childValues.push(d.value)})},_isGroup:function(a){return a.length>1},_needSpliter:function(a,b){return a1?g:f}else e.value=d;b.push(e)}),b}}),BI.MultiLayerDownListPopup.EVENT_CHANGE="EVENT_CHANGE",BI.MultiLayerDownListPopup.EVENT_SON_VALUE_CHANGE="EVENT_SON_VALUE_CHANGE",BI.shortcut("bi.multi_layer_down_list_popup",BI.MultiLayerDownListPopup),BI.MultiLayerSelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer_select_tree-combo",isDefaultInit:!1,height:30,text:"",items:[],value:""})},_init:function(){BI.MultiLayerSelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value}),this.popup=BI.createWidget({type:"bi.multilayer_select_tree_popup",isDefaultInit:b.isDefaultInit,items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.MultiLayerSelectTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_CHANGE)})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.MultiLayerSelectTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_combo",BI.MultiLayerSelectTreeCombo),BI.MultiLayerSelectLevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-select-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn,value:"" -})},_init:function(){BI.MultiLayerSelectLevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={};if(e.layer=b,BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.multilayer_select_tree_first_plus_group_node";break;case a.length-1: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",cls:"tree-view display-inline",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,value:c.value,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)}),BI.createWidget({type:"bi.adaptive",element:this,scrollable:!0,items:[this.tree]})},populate:function(a){this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},setValue:function(a){this.tree.setValue(a)},getValue:function(){return BI.uniq(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:[],value:""})},_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,value:b.value,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:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_first_plus_group_node",BI.MultiLayerSelectTreeFirstPlusGroupNode),BI.MultiLayerSelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-last-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_last_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id: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]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_last_plus_group_node",BI.MultiLayerSelectTreeLastPlusGroupNode),BI.MultiLayerSelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-mid-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_mid_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id: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]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_mid_plus_group_node",BI.MultiLayerSelectTreeMidPlusGroupNode),BI.MultiLayerSingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-singletree-combo",isDefaultInit:!1,height:30,text:"",itemsCreator:BI.emptyFn,items:[],value:""})},_init:function(){BI.MultiLayerSingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value}),this.popup=BI.createWidget({type:"bi.multilayer_single_tree_popup",isDefaultInit:b.isDefaultInit,items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.MultiLayerSingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_CHANGE)})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.MultiLayerSingleTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_combo",BI.MultiLayerSingleTreeCombo),BI.MultiLayerSingleLevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-single-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn})},_init:function(){BI.MultiLayerSingleLevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={};if(e.layer=b,BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.multilayer_single_tree_first_plus_group_node";break;case a.length-1:f.type="bi.multilayer_single_tree_last_plus_group_node";break;default:f.type="bi.multilayer_single_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",cls:"tree-view display-inline",expander:{isDefaultInit:c.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),value:c.value,itemsCreator:function(a,b){c.itemsCreator(a,function(a){b(BI.Tree.transformToTreeFormat(a),0)})},el:{type:"bi.button_tree",chooseType:BI.Selection.Single,layouts:[{type:"bi.vertical"}]}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,c)}),BI.createWidget({type:"bi.adaptive",element:this,scrollable:!0,items:[this.tree]})},populate:function(a){this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},setValue:function(a){this.tree.setValue(a)},getValue:function(){return BI.filter(BI.uniq(this.tree.getValue()),function(a,b){return BI.isNotNull(b)})},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.MultiLayerSingleLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_level_tree",BI.MultiLayerSingleLevelTree),BI.MultiLayerSingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-singletree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:b.isDefaultInit,items:b.items,itemsCreator:b.itemsCreator,value:b.value}),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.MultiLayerSingleLevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.MultiLayerSingleTreePopup.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.MultiLayerSingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.MultiLayerSingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_popup",BI.MultiLayerSingleTreePopup),BI.MultiLayerSingleTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-first-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.first_plus_group_node",cls:"bi-list-item-none",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,keyword:b.keyword}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_first_plus_group_node",BI.MultiLayerSingleTreeFirstPlusGroupNode),BI.MultiLayerSingleTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-last-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.last_plus_group_node",cls:"bi-list-item-none",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,keyword:b.keyword}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_last_plus_group_node",BI.MultiLayerSingleTreeLastPlusGroupNode),BI.MultiLayerSingleTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-mid-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.mid_plus_group_node",cls:"bi-list-item-none",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,keyword:b.keyword}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_plus_group_node",BI.MultiLayerSingleTreeMidPlusGroupNode),BI.MultiLayerSingleTreeFirstTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-first-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.first_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_first_tree_leaf_item",BI.MultiLayerSingleTreeFirstTreeLeafItem),BI.MultiLayerSingleTreeLastTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-last-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.last_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_last_tree_leaf_item",BI.MultiLayerSingleTreeLastTreeLeafItem),BI.MultiLayerSingleTreeMidTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-mid-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.mid_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_tree_leaf_item",BI.MultiLayerSingleTreeMidTreeLeafItem),BI.MultiSelectCheckPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-pane bi-background",items:[],itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,onClickContinueSelect:BI.emptyFn})},_init:function(){BI.MultiSelectCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value||{},this.display=BI.createWidget({type:"bi.display_selected_list",items:b.items,itemsCreator:function(c,d){return c=BI.extend(c||{},{selectedValues:a.storeValue.value}),a.storeValue.type===BI.Selection.Multi?void d({items:BI.map(a.storeValue.value,function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d}})}):void b.itemsCreator(c,d)}}),this.continueSelect=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-select-check-selected bi-high-light"}),this.continueSelect.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect()}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:{type:"bi.left",cls:"multi-select-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:this.continueSelect,lgap:this.constants.lgap,tgap:this.constants.tgap}]}},{height:"fill",el:this.display}]})},setValue:function(a){this.storeValue=a||{}},empty:function(){this.display.empty()},populate:function(){this.display.populate.apply(this.display,arguments)}}),BI.shortcut("bi.multi_select_check_pane",BI.MultiSelectCheckPane),BI.DisplaySelectedList=BI.inherit(BI.Pane,{constants:{height:25,lgap:10},_defaultConfig:function(){return BI.extend(BI.DisplaySelectedList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-display-list",itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.DisplaySelectedList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.hasNext=!1,this.button_group=BI.createWidget({type:"bi.list_pane",element:this,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},items:this._createItems(b.items),chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical",lgap:10}]},itemsCreator:function(c,d){b.itemsCreator(c,function(b){a.hasNext=!!b.hasNext,d(a._createItems(b.items))})},hasNext:function(){return a.hasNext}})},_createItems:function(a){return BI.createItems(a,{type:"bi.icon_text_item",cls:"cursor-default check-font display-list-item bi-tips",once:!0,invalid:!0,selected:!0,height:this.constants.height,logic:{dynamic:!0}})},empty:function(){this.button_group.empty()},populate:function(a){0===arguments.length?this.button_group.populate():this.button_group.populate(this._createItems(a))}}),BI.shortcut("bi.display_selected_list",BI.DisplaySelectedList),BI.MultiSelectInsertCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_init:function(){BI.MultiSelectInsertCombo.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)})},value:b.value}),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(){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.storeValue.type===BI.Selection.Multi&&a.storeValue.value.pushDistinct(b),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()})}},value:b.value,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.MultiSelectInsertCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button"});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.MultiSelectInsertCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectInsertCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;b(),a()},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this.combo.populate.apply(this.combo,arguments); -}}),BI.extend(BI.MultiSelectInsertCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_insert_combo",BI.MultiSelectInsertCombo),BI.MultiSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_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=b.value||{},this._assertValue(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)})},value:this.storeValue}),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()})}},value:b.value,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"});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.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.storeValue.type===BI.Selection.All&&c.storeValue.value.length>=c._count?c.storeValue={type:BI.Selection.Multi,value:[]}:c.storeValue.type===BI.Selection.Multi&&c.storeValue.value.length>=c._count&&(c.storeValue={type:BI.Selection.All,value:[]}),c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_combo",BI.MultiSelectCombo),BI.MultiSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=b.value||{},this._assertValue(this.storeValue),this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!a.storeValue.value.contains(a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](f),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:this.options.logic,height:25,selected:this.isAllSelected()})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_loader",BI.MultiSelectLoader),BI.MultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.multi_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_popup_view",BI.MultiSelectPopupView),BI.MultiSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.MultiSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.multi_select_searcher",height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker,value:b.value}),this.searcher.on(BI.MultiSelectSearcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_CHANGE,arguments)}),this.numberCounter=BI.createWidget(b.switcher,{type:"bi.multi_select_check_selected_switcher",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,adapter:b.adapter,masker:b.masker,value:b.value}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK)}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW)});var c=BI.createWidget({type:"bi.right_vertical_adapt",hgap:4,items:[{el:this.numberCounter}]}),d=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:c,width:0},{el:BI.createWidget(),width:30}]});this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){d.attr("items")[1].width=b===!0?a.numberCounter.element.outerWidth()+8:0,d.resize()})}),this.element.click(function(b){a.element.__isMouseInBounds__(b)&&!a.numberCounter.element.__isMouseInBounds__(b)&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.MultiSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.MultiSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectTrigger.EVENT_START="EVENT_START",BI.MultiSelectTrigger.EVENT_STOP="EVENT_STOP",BI.MultiSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.multi_select_trigger",BI.MultiSelectTrigger),BI.MultiSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=BI.deepClone(b.value),this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:{dynamic:!1},value:b.value,el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:a.storeValue.value})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=a._filterValues(a.storeValue);h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:{dynamic:!1},height:25,selected:this.isAllSelected()})},isAllSelected:function(){return this.button_group.isAllSelected()},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=BI.deepClone(a.value)||[],e=BI.map(d,function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.match.concat(f.find)}return BI.map(d,function(b,c){return{text:c.text,title:c.text,value:c.value,selected:a.type===BI.Selection.All}})},setValue:function(a){this.storeValue=BI.deepClone(a),this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_loader",BI.MultiSelectSearchLoader),BI.MultiSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.multi_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},isAllSelected:function(){return this.loader.isAllSelected()},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.MultiSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_pane",BI.MultiSelectSearchPane),BI.MultiSelectCheckSelectedButton=BI.inherit(BI.Single,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-button bi-high-light",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectCheckSelectedButton.superclass._init.apply(this,arguments);var a=this,b=this.options;this.numberCounter=BI.createWidget({type:"bi.text_button",element:this,hgap:4,text:"0",textAlign:"center",textHeight:15}),this.numberCounter.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.numberCounter.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),this.numberCounter.element.hover(function(){a.numberCounter.setTag(a.numberCounter.getText()),a.numberCounter.setText(a._const.checkSelected)},function(){a.numberCounter.setText(a.numberCounter.getTag())}),this.setVisible(!1),BI.isNotNull(b.value)&&this.setValue(b.value)},setValue:function(a){var b=this,c=this.options;return a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[]),a.type===BI.Selection.All?void c.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(c){var d=c.count-a.value.length;BI.nextTick(function(){b.numberCounter.setText(d),b.setVisible(d>0)})}):void BI.nextTick(function(){b.numberCounter.setText(a.value.length),b.setVisible(a.value.length>0)})},getValue:function(){}}),BI.MultiSelectCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_check_selected_button",BI.MultiSelectCheckSelectedButton),BI.MultiSelectEditor=BI.inherit(BI.Widget,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-editor",el:{}})},_init:function(){BI.MultiSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0,value:b.value}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_CLICK_LABEL,function(){})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastValidValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.MultiSelectEditor.EVENT_PAUSE="MultiSelectEditor.EVENT_PAUSE",BI.shortcut("bi.multi_select_editor",BI.MultiSelectEditor),BI.MultiSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.MultiSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),this.setKeyword(c.keyword),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiSelectSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;if(a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All)if(0===a.value.length)this.editor.setState(BI.Selection.All);else if(BI.size(a.assist)<=20){var c="";BI.each(a.assist,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi);else if(0===a.value.length)this.editor.setState(BI.Selection.None);else if(BI.size(a.value)<=20){var c="";BI.each(a.value,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectSearcher.EVENT_START="EVENT_START",BI.MultiSelectSearcher.EVENT_STOP="EVENT_STOP",BI.MultiSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.multi_select_searcher",BI.MultiSelectSearcher),BI.MultiSelectCheckSelectedSwitcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedSwitcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-switcher",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,el:{},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectCheckSelectedSwitcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button=BI.createWidget(b.el,{type:"bi.multi_select_check_selected_button",itemsCreator:b.itemsCreator,value:b.value}),this.button.on(BI.Events.VIEW,function(){a.fireEvent(BI.Events.VIEW,arguments)}),this.switcher=BI.createWidget({type:"bi.switcher",toggle:!1,element:this,el:this.button,popup:BI.extend({type:"bi.multi_select_check_pane",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,onClickContinueSelect:function(){a.switcher.hideView()},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.switcher.on(BI.Switcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE)}),this.switcher.on(BI.Switcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW)}),this.switcher.on(BI.Switcher.EVENT_AFTER_POPUPVIEW,function(){var a=this;BI.nextTick(function(){a.populate()})}),this.switcher.element.click(function(a){a.stopPropagation()})},adjustView:function(){this.switcher.adjustView()},hideView:function(){this.switcher.empty(),this.switcher.hideView()},setAdapter:function(a){this.switcher.setAdapter(a)},setValue:function(a){this.switcher.setValue(a)},setButtonChecked:function(a){this.button.setValue(a)},getValue:function(){},populate:function(a){this.switcher.populate.apply(this.switcher,arguments)}}),BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE="MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE",BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW="MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_select_check_selected_switcher",BI.MultiSelectCheckSelectedSwitcher),BI.MultiSelectInsertList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectInsertList.superclass._init.apply(this,arguments);var 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(),c(),a.fireEvent(BI.MultiSelectInsertList.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.storeValue.type===BI.Selection.Multi&&a.storeValue.value.pushDistinct(b),a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a.adapter.populate(),a._setStartValue(""),a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)}):(a.storeValue.type===BI.Selection.Multi&&a.storeValue.value.pushDistinct(b),a._showAdapter(),a.adapter.setValue(a.storeValue),a.adapter.populate(),a.storeValue.type===BI.Selection.Multi&&a.fireEvent(BI.MultiSelectInsertList.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.MultiSelectInsertList.EVENT_CHANGE)}):a._join(this.getValue(),function(){c(),a.fireEvent(BI.MultiSelectInsertList.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)}),b()}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA},function(a){d._allData=BI.map(a.items,"value"),c(d._allData)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),d.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA,keyword:c.trigger.getKeyword()},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void b()}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b); -}),c.storeValue.value=j.concat(BI.values(h)),b()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void b()}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.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.map(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.trigger.getKeyword()},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.storeValue.type===BI.Selection.All&&c.storeValue.value.length>=c._count?c.storeValue={type:BI.Selection.Multi,value:[]}:c.storeValue.type===BI.Selection.Multi&&c.storeValue.value.length>=c._count&&(c.storeValue={type:BI.Selection.All,value:[]})}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.MultiSelectList.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectList,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectList.EVENT_CHANGE="BI.MultiSelectList.EVENT_CHANGE",BI.shortcut("bi.multi_select_list",BI.MultiSelectList),BI.MultiSelectTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={value:{}},this.adapter=BI.createWidget({type:"bi.multi_select_tree_popup",itemsCreator:b.itemsCreator}),this.adapter.on(BI.MultiSelectTreePopup.EVENT_CHANGE,function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_tree_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",keywordGetter:function(){return a.searcher.getKeyword()},itemsCreator:function(c,d){c.keyword=a.searcher.getKeyword(),b.itemsCreator(c,d)}}),this.searcherPane.setVisible(!1),this.searcher=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.searcher.getKeyword()})},adapter:this.adapter,popup:this.searcherPane,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){a._showSearcherPane()}},{eventName:BI.Searcher.EVENT_STOP,action:function(){a._showAdapter(),BI.nextTick(function(){a.adapter.populate()})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){a._showAdapter()}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.searcher,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)},resize:function(){},setSelectedValue:function(a){this.storeValue.value=a||{},this.adapter.setSelectedValue(a),this.searcherPane.setSelectedValue(a),this.searcher.setValue({value:a||{}})},setValue:function(a){this.adapter.setValue(a)},stopSearch:function(){this.searcher.stopSearch()},updateValue:function(a){this.adapter.updateValue(a)},getValue:function(){return this.storeValue.value},populate:function(){this.searcher.populate.apply(this.searcher,arguments),this.adapter.populate.apply(this.adapter,arguments)}}),BI.MultiSelectTree.EVENT_CHANGE="BI.MultiSelectTree.EVENT_CHANGE",BI.shortcut("bi.multi_select_tree",BI.MultiSelectTree),BI.MultiSelectTreePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree-popup bi-border-left bi-border-right bi-border-bottom",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popup=BI.createWidget({type:"bi.async_tree",element:this,itemsCreator:b.itemsCreator}),this.popup.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_AFTER_INIT)}),this.popup.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_CHANGE)})},hasChecked:function(){return this.popup.hasChecked()},getValue:function(){return this.popup.getValue()},setValue:function(a){a||(a={}),this.popup.setValue(a)},setSelectedValue:function(a){a||(a={}),this.popup.setSelectedValue(a)},updateValue:function(a){this.popup.updateValue(a),this.popup.refresh()},populate:function(a){this.popup.stroke(a)}}),BI.MultiSelectTreePopup.EVENT_AFTER_INIT="BI.MultiSelectTreePopup.EVENT_AFTER_INIT",BI.MultiSelectTreePopup.EVENT_CHANGE="BI.MultiSelectTreePopup.EVENT_CHANGE",BI.shortcut("bi.multi_select_tree_popup",BI.MultiSelectTreePopup),BI.MultiTreeCheckPane=BI.inherit(BI.Pane,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-pane bi-background",onClickContinueSelect:BI.emptyFn})},_init:function(){BI.MultiTreeCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={};var c=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-tree-check-selected"});c.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect(),BI.nextTick(function(){a.empty()})});var d=BI.createWidget({type:"bi.left",cls:"multi-tree-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:c,lgap:this.constants.lgap,tgap:this.constants.tgap}]});this.display=BI.createWidget({type:"bi.display_tree",cls:"bi-multi-tree-display",itemsCreator:function(a,c){a.type=BI.TreeView.REQ_TYPE_GET_SELECTED_DATA,b.itemsCreator(a,c)},value:(b.value||{}).value}),this.display.on(BI.Events.AFTERINIT,function(){a.fireEvent(BI.Events.AFTERINIT)}),this.display.on(BI.TreeView.EVENT_INIT,function(){d.setVisible(!1)}),this.display.on(BI.TreeView.EVENT_AFTERINIT,function(){d.setVisible(!0)}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:d},{height:"fill",el:this.display}]})},empty:function(){this.display.empty()},populate:function(a){this.display.stroke(a)},setValue:function(a){a||(a={}),this.display.setSelectedValue(a.value)},getValue:function(){}}),BI.MultiTreeCheckPane.EVENT_CONTINUE_CLICK="EVENT_CONTINUE_CLICK",BI.shortcut("bi.multi_tree_check_pane",BI.MultiTreeCheckPane),BI.MultiTreeCombo=BI.inherit(BI.Single,{constants:{offset:{top:1,left:1,right:2,bottom:33}},_defaultConfig:function(){return BI.extend(BI.MultiTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-combo",itemsCreator:BI.emptyFn,height:25})},_init:function(){function a(){h()?b.storeValue={value:b.trigger.getValue()}:i()&&(b.storeValue={value:b.combo.getValue()}),b.trigger.setValue(b.storeValue)}BI.MultiTreeCombo.superclass._init.apply(this,arguments);var b=this,c=this.options,d=!1,e=!1;this.storeValue={value:c.value||{}},this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:c.height,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_tree_searcher",itemsCreator:c.itemsCreator},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",itemsCreator:c.itemsCreator}},value:{value:c.value||{}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){b.popup=this,b.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){b.trigger.getCounter().adjustView(),d=!0,e===!0&&a()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){f=!0;var a={type:BI.Selection.Multi,value:this.hasChecked()?this.getValue():{}};b.trigger.getSearcher().setState(a),b.trigger.getCounter().setButtonChecked(a)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){b.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){g=!0,b.setValue(),b._defaultState()}}],itemsCreator:c.itemsCreator,onLoaded:function(){BI.nextTick(function(){b.trigger.getCounter().adjustView(),b.trigger.getSearcher().adjustView()})}},value:{value:c.value||{}},hideChecker:function(a){return 0===j.element.find(a.target).length}});var f=!1,g=!1,h=function(){return b.trigger.getSearcher().isSearching()},i=function(){return b.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){b.storeValue={value:b.combo.getValue()},this.setValue(b.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){b.storeValue={value:this.getValue()},b.combo.setValue(b.storeValue),BI.nextTick(function(){i()&&b.combo.populate()})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){e===!1&&(e=!0),d===!0&&(e=null,a())}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){b.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){b.combo.isViewVisible()||b.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var a=this.getSearcher().hasChecked(),b={type:BI.Selection.Multi,value:a?{1:1}:{}};this.getSearcher().setState(a?BI.Selection.Multi:BI.Selection.None),this.getCounter().setButtonChecked(b)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){h()||(f===!0&&(b.storeValue={value:b.combo.getValue()},f=!1),b.combo.setValue(b.storeValue),b.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){h()?(b.trigger.stopEditing(),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)):i()&&(b.trigger.stopEditing(),b.storeValue={value:b.combo.getValue()},g===!0&&(b.storeValue={value:{}}),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)),g=!1,f=!1});var j=BI.createWidget({type:"bi.trigger_icon_button",width:c.height,height:c.height,cls:"multi-select-trigger-icon-button"});j.on(BI.TriggerIconButton.EVENT_CHANGE,function(){b.trigger.getCounter().hideView(),b.combo.isViewVisible()?b.combo.hideView():b.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:j,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},setValue:function(a){this.storeValue.value=a||{},this.combo.setValue({value:a||{}})},getValue:function(){return this.storeValue.value},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeCombo.EVENT_CONFIRM="MultiTreeCombo.EVENT_CONFIRM",BI.shortcut("bi.multi_tree_combo",BI.MultiTreeCombo),BI.MultiTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-popup",maxWidth:"auto",minWidth:100,maxHeight:400,onLoaded:BI.emptyFn})},_init:function(){BI.MultiTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={},this.tree=BI.createWidget({type:"bi.async_tree",height:400,cls:"popup-view-tree",itemsCreator:b.itemsCreator,onLoaded:b.onLoaded,value:b.value||{}}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",element:this,stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.tree}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CONFIRM)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreePopup.EVENT_CHANGE)}),this.tree.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiTreePopup.EVENT_AFTERINIT)})},getValue:function(){return this.tree.getValue()},setValue:function(a){a||(a={}),this.tree.setSelectedValue(a.value)},populate:function(a){this.tree.stroke(a)},hasChecked:function(){return this.tree.hasChecked()},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreePopup.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreePopup.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreePopup.EVENT_AFTERINIT="EVENT_AFTERINIT",BI.shortcut("bi.multi_tree_popup_view",BI.MultiTreePopup),BI.MultiTreeSearchPane=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-search-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiTreeSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.partTree=BI.createWidget({type:"bi.part_tree",element:this,tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(a,c){a.keyword=b.keywordGetter(),b.itemsCreator(a,c)},value:b.value}),this.partTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.partTree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearchPane.EVENT_CHANGE)})},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_tree_search_pane",BI.MultiTreeSearchPane),BI.MultiTreeCheckSelectedButton=BI.inherit(BI.Single,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-selected-button",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiTreeCheckSelectedButton.superclass._init.apply(this,arguments);var a=this;this.indicator=BI.createWidget({type:"bi.icon_button",cls:"check-font trigger-check-selected",width:15,height:15,stopPropagation:!0}),this.checkSelected=BI.createWidget({type:"bi.text_button",cls:"trigger-check-selected",invisible:!0,hgap:4,text:this._const.checkSelected,textAlign:"center",textHeight:15}),this.checkSelected.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.checkSelected.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.horizontal",element:this,items:[this.indicator,this.checkSelected]}),this.element.hover(function(){a.indicator.setVisible(!1),a.checkSelected.setVisible(!0)},function(){a.indicator.setVisible(!0),a.checkSelected.setVisible(!1)}),this.setVisible(!1)},setValue:function(a){a||(a={}),this.setVisible(BI.size(a.value)>0)}}),BI.MultiTreeCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_tree_check_selected_button",BI.MultiTreeCheckSelectedButton),BI.MultiTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",height:b.height}}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_CHANGE,arguments)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){function b(a){var c="",d=0,e=BI.size(a);return BI.each(a,function(a,f){d++;var g=b(f);c+=a+(""===g?"":":"+g)+(d===e?"":",")}),c}if(a||(a={}),a.value||(a.value={}),BI.isNumber(a))this.editor.setState(a);else if(0===BI.size(a.value))this.editor.setState(BI.Selection.None);else{var c="";BI.each(a.value,function(a,d){var e=b(d);c+=a+(""===e?"":":"+e)+"; "}),this.editor.setState(c)}},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearcher.EVENT_START="EVENT_START",BI.MultiTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_tree_searcher",BI.MultiTreeSearcher),BI.NumberEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-number-editor bi-border",validationChecker:function(){return!0},valueFormatter:function(a){return a},value:0,allowBlank:!1,errorText:"",step:1})},_init:function(){BI.NumberEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,allowBlank:b.allowBlank,value:b.valueFormatter(b.value),validationChecker:b.validationChecker,errorText:b.errorText}),this.editor.on(BI.TextEditor.EVENT_CHANGE,function(){b.value=this.getValue(),a.fireEvent(BI.NumberEditor.EVENT_CHANGE)}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){this.setValue(BI.parseFloat(this.getValue())),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",cls:"column-pre-page-h-font top-button bi-border-left bi-border-bottom"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",cls:"column-next-page-h-font bottom-button bi-border-left bi-border-top"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),BI.createWidget({type:"bi.htape",element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:23}]})},focus:function(){this.editor.focus()},_finetuning:function(a){var b=BI.parseFloat(this.getValue());this.setValue(b.add(a))},setUpEnable:function(a){this.topBtn.setEnable(!!a)},setDownEnable:function(a){this.bottomBtn.setEnable(!!a)},getValue:function(){return this.options.value},setValue:function(a){var b=this.options;b.value=a,this.editor.setValue(b.valueFormatter(a))}}),BI.NumberEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberEditor.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.number_editor",BI.NumberEditor),BI.NumberInterval=BI.inherit(BI.Single,{constants:{typeError:"typeBubble",numberError:"numberBubble",signalError:"signalBubble",editorWidth:114,columns:5,width:30,rows:1,numberErrorCls:"number-error",border:1,less:0,less_equal:1,numTip:""},_defaultConfig:function(){var a=BI.NumberInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-number-interval",height:25,validation:"valid"})},_init:function(){var a=this,b=this.constants,c=this.options;BI.NumberInterval.superclass._init.apply(this,arguments),this.smallEditor=BI.createWidget({type:"bi.editor",height:c.height-2,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,value:c.min,level:"warning",tipType:"warning",quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.smallEditorBubbleType=b.typeError,!1)},cls:"number-interval-small-editor bi-border-top bi-border-bottom bi-border-left"}),this.smallTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.smallEditor.element,items:[{el:this.smallTip,top:0,right:5}]}),this.bigEditor=BI.createWidget({type:"bi.editor",height:c.height-2,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,value:c.max,level:"warning",tipType:"warning",quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.bigEditorBubbleType=b.typeError,!1)},cls:"number-interval-big-editor bi-border-top bi-border-bottom bi-border-right"}),this.bigTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.bigEditor.element,items:[{el:this.bigTip,top:0,right:5}]}),this.smallCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-small-combo bi-border",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closemin===!0?this.smallCombo.setValue(1):this.smallCombo.setValue(0),this.bigCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-big-combo bi-border",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closemax===!0?this.bigCombo.setValue(1):this.bigCombo.setValue(0),this.label=BI.createWidget({type:"bi.label",text:BI.i18nText("BI-Basic_Value"),textHeight:c.height-2*b.border,width:b.width-2*b.border,height:c.height-2*b.border,level:"warning",tipType:"warning"}),this.left=BI.createWidget({type:"bi.htape",items:[{el:a.smallEditor},{el:a.smallCombo,width:b.width-2*b.border}]}),this.right=BI.createWidget({type:"bi.htape",items:[{el:a.bigCombo,width:b.width-2*b.border},{el:a.bigEditor}]}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:c.height,items:[{type:"bi.absolute",items:[{el:a.left,left:-15,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:-15,top:0,bottom:0}]}]}),BI.createWidget({element:a,type:"bi.horizontal_auto",items:[a.label]}),a._setValidEvent(a.bigEditor,b.bigEditor),a._setValidEvent(a.smallEditor,b.smallEditor),a._setErrorEvent(a.bigEditor,b.bigEditor),a._setErrorEvent(a.smallEditor,b.smallEditor),a._setBlurEvent(a.bigEditor),a._setBlurEvent(a.smallEditor),a._setFocusEvent(a.bigEditor),a._setFocusEvent(a.smallEditor),a._setComboValueChangedEvent(a.bigCombo),a._setComboValueChangedEvent(a.smallCombo),a._setEditorValueChangedEvent(a.bigEditor),a._setEditorValueChangedEvent(a.smallEditor)},_checkValidation:function(){var a=this,b=this.constants,c=this.options;if(a._setTitle(""),BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),!a.smallEditor.isValid()||!a.bigEditor.isValid())return a.element.removeClass("number-error"),c.validation="invalid",b.typeError;if(BI.isEmptyString(a.smallEditor.getValue())||BI.isEmptyString(a.bigEditor.getValue()))return a.element.removeClass("number-error"),c.validation="valid","";var d=parseFloat(a.smallEditor.getValue()),e=parseFloat(a.bigEditor.getValue()),f=a.bigCombo.getValue(),g=a.smallCombo.getValue();return f[0]===b.less_equal&&g[0]===b.less_equal?d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):(a.element.removeClass("number-error"),c.validation="valid",""):d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):d===e?(a.element.addClass("number-error"),c.validation="invalid",b.signalError):(a.element.removeClass("number-error"),c.validation="valid","")},_setTitle:function(a){var b=this;b.bigEditor.setTitle(a),b.smallEditor.setTitle(a),b.label.setTitle(a)},_setFocusEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_FOCUS,function(){switch(b._setTitle(""),b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{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"});break;default:return}})},_setBlurEvent:function(a){var b=this.constants,c=this;a.on(BI.Editor.EVENT_BLUR,function(){switch(BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),c._checkValidation()){case b.typeError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));break;case b.numberError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value")); -break;case b.signalError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));break;default:c._setTitle("")}})},_setErrorEvent:function(a){var b=this.constants,c=this;a.on(BI.Editor.EVENT_ERROR,function(){c._checkValidation(),BI.Bubbles.show(b.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),c,{offsetStyle:"center"}),c.fireEvent(BI.NumberInterval.EVENT_ERROR)})},_setValidEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_VALID,function(){switch(b._checkValidation()){case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumberInterval.EVENT_VALID)}})},_setEditorValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{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,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)}),this.pager=BI.createWidget(b.pager,{type:"bi.direction_pager",height:30}),this.pager.on(BI.Pager.EVENT_CHANGE,function(){var c=this.getVPage&&this.getVPage();BI.isNull(c)&&(c=this.getCurrentPage());var d=this.getHPage&&this.getHPage();b.itemsCreator({vpage:c,hpage:d},function(b,e,f,g){a.table.setVPage?a.table.setVPage(c):a.table.setValue(c),a.table.setHPage&&a.table.setHPage(d),a.populate.apply(a,arguments)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.table,left:0,top:0},{el:this.pager,left:0,right:0,bottom:0}]})},setHPage:function(a){this.hCurr=a,this.pager.setHPage&&this.pager.setHPage(a),this.table.setHPage&&this.table.setHPage(a)},setVPage:function(a){this.vCurr=a,this.pager.setVPage&&this.pager.setVPage(a),this.table.setVPage&&this.table.setVPage(a)},getHPage:function(){var a=this.pager.getHPage&&this.pager.getHPage();return BI.isNotNull(a)?a:(a=this.pager.getCurrentPage&&this.pager.getCurrentPage(),BI.isNotNull(a)?a:this.hpage)},getVPage:function(){var a=this.pager.getVPage&&this.pager.getVPage();return BI.isNotNull(a)?a:(a=this.pager.getCurrentPage&&this.pager.getCurrentPage(),BI.isNotNull(a)?a:this.vpage)},setWidth:function(a){BI.PageTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.PageTable.superclass.setHeight.apply(this,arguments);var b=!1;this.pager.alwaysShowPager?b=!0:this.pager.hasHNext&&this.pager.hasHNext()?b=!0:this.pager.hasHPrev&&this.pager.hasHPrev()?b=!0:this.pager.hasVNext&&this.pager.hasVNext()?b=!0:this.pager.hasVPrev&&this.pager.hasVPrev()?b=!0:this.pager.hasNext&&this.pager.hasNext()?b=!0:this.pager.hasPrev&&this.pager.hasPrev()&&(b=!0),this.table.setHeight(a-(b?30:0))},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.columnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getVerticalScroll:function(){return this.table.getVerticalScroll()},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},restore:function(){this.table.restore()},attr:function(){BI.PageTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},populate:function(){this.pager.populate(),this.table.populate.apply(this.table,arguments)},destroy:function(){this.table.destroy(),this.pager&&this.pager.destroy(),BI.PageTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.page_table",BI.PageTable),BI.PreviewTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table-cell",text:""})},_init:function(){BI.PreviewTableCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.preview_table_cell",BI.PreviewTableCell),BI.PreviewTableHeaderCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTableHeaderCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table-header-cell",text:""})},_init:function(){BI.PreviewTableHeaderCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.preview_table_header_cell",BI.PreviewTableHeaderCell),BI.PreviewTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table",isNeedFreeze:!1,freezeCols:[],rowSize:null,columnSize:[],headerRowSize:30,header:[],items:[]})},_init:function(){BI.PreviewTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.table=BI.createWidget({type:"bi.table_view",element:this,isNeedResize:!1,isResizeAdapt:!1,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,rowSize:b.rowSize,columnSize:b.columnSize,headerRowSize:b.headerRowSize,header:BI.map(b.header,function(a,b){return BI.map(b,function(a,b){return BI.extend({type:"bi.preview_table_header_cell"},b)})}),items:BI.map(b.items,function(a,b){return BI.map(b,function(a,b){return BI.extend({type:"bi.preview_table_cell"},b)})})}),this.table.on(BI.Table.EVENT_TABLE_AFTER_INIT,function(){a._adjustColumns(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT,arguments)}),this.table.on(BI.Table.EVENT_TABLE_RESIZE,function(){a._adjustColumns()})},_hasAdaptCol:function(a){return BI.any(a,function(a,b){return""===b})},_isPercentage:function(a){return a[0]<=1},_adjustColumns:function(){var a=this.options;if(a.isNeedFreeze===!0){if(this._isPercentage(a.columnSize)){if(this._hasAdaptCol(a.columnSize)){var b=[],c=0;BI.each(a.columnSize,function(a,d){""===d?b.push(a):c+=d}),c=1-c;var d=c/b.length;BI.each(b,function(b,c){a.columnSize[c]=d})}var e=0!==BI.first(a.freezeCols),f=[],g=[];BI.each(a.columnSize,function(b,c){a.freezeCols.contains(b)?f.push(c):g.push(c)});var h=BI.sum(f),i=BI.sum(g);BI.each(f,function(a,b){f[a]=b/h}),BI.each(g,function(a,b){g[a]=b/i}),this.table.setRegionColumnSize(e?["fill",h]:[h,"fill"]),this.table.setColumnSize(e?g.concat(f):f.concat(g))}}else(this._hasAdaptCol(a.columnSize)||this._isPercentage(a.columnSize))&&this.table.setRegionColumnSize(["100%"])},setColumnSize:function(a){return this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){return this.table.setHeaderColumnSize(a)},setRegionColumnSize:function(a){return this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},setVerticalScroll:function(a){return this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){return this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){return this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},getColumns:function(){return this.table.getColumns()},populate:function(a,b){this.table.populate(a,b)}}),BI.PreviewTable.EVENT_CHANGE="PreviewTable.EVENT_CHANGE",BI.shortcut("bi.preview_table",BI.PreviewTable),BI.QuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-combo",behaviors:{},height:25})},_init:function(){BI.QuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.quarter_trigger",value:b.value}),this.trigger.on(BI.QuarterTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.QuarterTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.QuarterTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM))}),this.popup=BI.createWidget({type:"bi.quarter_popup",behaviors:b.behaviors,value:b.value}),this.popup.on(BI.QuarterPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.QuarterCombo.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.QuarterCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return BI.isNull(this.popup)?this.options.value||"":this.popup.getValue()||""}}),BI.QuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.quarter_combo",BI.QuarterCombo),BI.QuarterPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-popup",behaviors:{}})},_init:function(){BI.QuarterPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[{text:Date._QN[1],value:1},{text:Date._QN[2],value:2},{text:Date._QN[3],value:3},{text:Date._QN[4],value:4}];c=BI.map(c,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"left",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:25})}),this.quarter=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(c,{}),layouts:[{type:"bi.vertical"}],value:b.value}),this.quarter.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.quarter.getValue()[0]},setValue:function(a){this.quarter.setValue([a])}}),BI.QuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quarter_popup",BI.QuarterPopup),BI.QuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,textWidth:40,errorText:BI.i18nText("BI-Quarter_Trigger_Error_Text")},_defaultConfig:function(){return BI.extend(BI.QuarterTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-quarter-trigger bi-border",height:24})},_init:function(){BI.QuarterTrigger.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<=4},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.QuarterTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.QuarterTrigger.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.QuarterTrigger.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.QuarterTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.QuarterTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-quarter-text",text:BI.i18nText("BI-Multi_Date_Quarter"),width:c.textWidth},width:c.textWidth},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]}),this.setValue(b.value)},setValue:function(a){a=a||"",this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return this.editor.getValue()}}),BI.QuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.QuarterTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.QuarterTrigger.EVENT_START="EVENT_START",BI.QuarterTrigger.EVENT_STOP="EVENT_STOP",BI.QuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.quarter_trigger",BI.QuarterTrigger),BI.ResponisveTable=BI.inherit(BI.Widget,{_const:{perColumnSize:100},_defaultConfig:function(){return BI.extend(BI.ResponisveTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-responsive-table",isNeedFreeze:!1,freezeCols:[],logic:{dynamic:!1},isNeedMerge:!1,mergeCols:[],mergeRule:function(a,b){return BI.isEqual(a,b)},columnSize:[],headerRowSize:25,footerRowSize:25,rowSize:25,regionColumnSize:!1,header:[],footer:!1,items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.ResponisveTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.table=BI.createWidget({type:"bi.table_view",element:this,logic:b.logic,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,headerRowSize:b.headerRowSize,footerRowSize:b.footerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:b.header,footer:b.footer,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_AFTER_INIT,function(){a._initRegionSize(),a.table.resize(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT,arguments)}),this.table.on(BI.Table.EVENT_TABLE_RESIZE,function(){a._resizeRegion(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE,function(){a.fireEvent(BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_REGION_RESIZE,function(){b.isNeedResize===!0&&a._isAdaptiveColumn()&&a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE,function(){a._resizeBody(),a.fireEvent(BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_COLUMN_RESIZE,function(){a.fireEvent(BI.Table.EVENT_TABLE_COLUMN_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){a._resizeRegion(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_initRegionSize:function(){var a=this.options;if(a.isNeedFreeze===!0){var b=this.table.getRegionColumnSize(),c=this.table.element.width();if(!b[0]||"fill"===b[0]||b[0]>c||b[1]>c){var d=a.freezeCols;if(0===d.length)this.table.setRegionColumnSize([0,"fill"]);else if(d.length>0&&d.lengtha.columnSize.length/2&&(e=2*c/3),this.table.setRegionColumnSize([e,"fill"])}else this.table.setRegionColumnSize(["fill",0])}}},_getBlockSize:function(){var a=this.options,b=this.table.getCalculateColumnSize();if(a.isNeedFreeze===!0){var c=[],d=[];BI.each(b,function(b,e){a.freezeCols.contains(b)?c.push(e):d.push(e)});var e=BI.sum(c)+c.length,f=BI.sum(d)+d.length;return{sumLeft:e,sumRight:f,left:c,right:d}}return{size:b,sum:BI.sum(b)+b.length}},_isAdaptiveColumn:function(a){return!(BI.last(a||this.table.getColumnSize())>1.05)},_resizeHeader:function(){var a=this,b=this.options;if(b.isNeedFreeze===!0)if(this._isAdaptiveColumn()){var c=this.table.getCalculateColumnSize();this.table.setHeaderColumnSize(c)}else{var d=this.table.getClientRegionColumnSize(),e=this._getBlockSize(),f=e.sumLeft,g=e.sumRight,h=e.left,i=e.right;h[h.length-1]+=d[0]-f,i[i.length-1]+=d[1]-g;var j=BI.clone(h),k=BI.clone(i);j[j.length-1]="",k[k.length-1]="",this.table.setColumnSize(j.concat(k)),e=a._getBlockSize(),h[h.length-1]0&&a.freezeCols.length=d+e)&&this.table.setRegionColumnSize([d,"fill"]),this._resizeRegion()}},_resizeRegion:function(){var a=this.options,b=this.table.getCalculateRegionColumnSize();if(a.isNeedFreeze===!0&&a.freezeCols.length>0&&a.freezeCols.lengtha.columnSize.length/2&&(e=2*c/3),this.table.setRegionColumnSize([e,"fill"])}}},resize:function(){this.table.resize(),this._resizeRegion(),this._resizeHeader()},setColumnSize:function(a){this.table.setColumnSize(a),this._adjustRegion(),this._resizeHeader()},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){this.table.setHeaderColumnSize(a),this._adjustRegion(),this._resizeHeader()},setRegionColumnSize:function(a){this.table.setRegionColumnSize(a),this._resizeHeader()},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},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()},getColumns:function(){return this.table.getColumns()},attr:function(){BI.ResponisveTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},populate:function(a){var b=this,c=this.options;this.table.populate.apply(this.table,arguments),c.isNeedFreeze===!0&&BI.nextTick(function(){b._initRegionSize(),b.table.resize(),b._resizeHeader()})}}),BI.shortcut("bi.responsive_table",BI.ResponisveTable),BI.SelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-first-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.first_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_first_plus_group_node",BI.SelectTreeFirstPlusGroupNode),BI.SelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-last-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.last_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_last_plus_group_node",BI.SelectTreeLastPlusGroupNode),BI.SelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-mid-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.mid_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_mid_plus_group_node",BI.SelectTreeMidPlusGroupNode),BI.SelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-combo",height:30,text:"",items:[],value:""})},_init:function(){BI.SelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value}),this.popup=BI.createWidget({type:"bi.select_level_tree",items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView()})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.shortcut("bi.select_tree_combo",BI.SelectTreeCombo),BI.SelectTreeExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-expander",trigger:"click",toggle:!0,direction:"bottom",isDefaultInit:!0,el:{},popup:{}})},_init:function(){BI.SelectTreeExpander.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({stopPropagation:!0},b.el)),this.trigger.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&this.isSelected()&&a.expander.setValue([]),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.expander=BI.createWidget({type:"bi.expander",element:this,trigger:b.trigger,toggle:b.toggle,direction:b.direction,isDefaultInit:b.isDefaultInit,el:this.trigger,popup:b.popup}),this.expander.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.trigger.setSelected(!1), -a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){BI.contains(a,this.trigger.getValue())?(this.trigger.setSelected(!0),this.expander.setValue([])):(this.trigger.setSelected(!1),this.expander.setValue(a))},getValue:function(){return this.trigger.isSelected()?[this.trigger.getValue()]:this.expander.getValue()},populate:function(a){this.expander.populate(a)}}),BI.shortcut("bi.select_tree_expander",BI.SelectTreeExpander),BI.SelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-level-tree",tipText:BI.i18nText("BI-No_Selected_Item"),items:[],value:""})},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={layer:b};if(e.id=e.id||BI.UUID(),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.select_tree_first_plus_group_node";break;case a.length-1:f.type="bi.select_tree_last_plus_group_node";break;default:f.type="bi.select_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children)}else{switch(d){case a.length-1:f.type="bi.last_tree_leaf_item";break;default:f.type="bi.mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_init:function(){BI.SelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{type:"bi.select_tree_expander",isDefaultInit:!0},items:this._formatItems(BI.Tree.transformToTreeFormat(b.items)),value:b.value,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SelectTreePopup.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.SelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a)))}}),BI.SelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_level_tree",BI.SelectTreePopup),BI.SequenceTableDynamicNumber=BI.inherit(BI.SequenceTableTreeNumber,{_defaultConfig:function(){return BI.extend(BI.SequenceTableDynamicNumber.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-sequence-table-dynamic-number"})},_init:function(){BI.SequenceTableDynamicNumber.superclass._init.apply(this,arguments)},_formatNumber:function(a){function b(a){var c=0;return BI.isNotEmptyArray(a.children)?(BI.each(a.children,function(a,d){c+=b(d)}),a.children.length>1&&BI.isNotEmptyArray(a.values)&&c++):c++,c}var c=this.options,d=[],e=this._getStart(a),f=0,g=0;return BI.each(a,function(a,h){BI.isArray(h.children)&&(BI.each(h.children,function(a,h){var i=b(h);d.push({text:e++,start:f,top:g,cnt:i,index:a,height:i*c.rowSize}),f+=i,g+=i*c.rowSize}),BI.isNotEmptyArray(h.values)&&(d.push({text:BI.i18nText("BI-Summary_Values"),start:f++,top:g,cnt:1,isSummary:!0,height:c.rowSize}),g+=c.rowSize))}),d}}),BI.shortcut("bi.sequence_table_dynamic_number",BI.SequenceTableDynamicNumber),BI.SequenceTableListNumber=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTableListNumber.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table-list-number",isNeedFreeze:!1,scrollTop:0,startSequence:1,headerRowSize:25,rowSize:25,sequenceHeaderCreator:null,header:[],items:[],crossHeader:[],crossItems:[],pageSize:20})},_init:function(){BI.SequenceTableListNumber.superclass._init.apply(this,arguments);var a=this.options;this.start=a.startSequence,this.renderedCells=[],this.renderedKeys=[],this.container=BI.createWidget({type:"bi.absolute",width:60,scrollable:!1}),this.scrollContainer=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.container]}),this.headerContainer=BI.createWidget({type:"bi.absolute",cls:"bi-border",width:58,scrollable:!1}),this.layout=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.headerContainer,height:a.headerRowSize*a.header.length-2},{el:{type:"bi.layout"},height:2},{el:this.scrollContainer}]}),this._populate()},_layout:function(){var a=this.options,b=a.headerRowSize*a.header.length-2,c=this.layout.attr("items");a.isNeedFreeze===!1?(c[0].height=0,c[1].height=0):a.isNeedFreeze===!0&&(c[0].height=b,c[1].height=2),this.layout.attr("items",c),this.layout.resize(),this.container.setHeight(a.items.length*a.rowSize);try{this.scrollContainer.element.scrollTop(a.scrollTop)}catch(d){}},_createHeader:function(){var a=this.options;BI.createWidget({type:"bi.absolute",element:this.headerContainer,items:[{el:a.sequenceHeaderCreator||{type:"bi.table_style_cell",cls:"sequence-table-title-cell",styleGetter:a.headerCellStyleGetter,text:BI.i18nText("BI-Number_Index")},left:0,top:0,right:0,bottom:0}]})},_calculateChildrenToRender:function(){for(var a=this,b=this.options,c=BI.clamp(b.scrollTop,0,b.rowSize*b.items.length-(b.height-b.header.length*b.headerRowSize)+BI.DOM.getScrollWidth()),d=Math.floor(c/b.rowSize),e=d+Math.floor((b.height-b.header.length*b.headerRowSize)/b.rowSize),f=[],g=[],h=d,i=0;h<=e&&h-1)b.rowSize!==this.renderedCells[j]._height&&(this.renderedCells[j]._height=b.rowSize,this.renderedCells[j].el.setHeight(b.rowSize)),this.renderedCells[j].top!==k&&(this.renderedCells[j].top=k,this.renderedCells[j].el.element.css("top",k+"px")),f.push(this.renderedCells[j]);else{var l=BI.createWidget(BI.extend({type:"bi.table_style_cell",cls:"sequence-table-number-cell bi-border-left bi-border-right bi-border-bottom",width:60,height:b.rowSize,text:this.start+h,styleGetter:function(c){return function(){return b.sequenceCellStyleGetter(a.start+h-1)}}(i)}));f.push({el:l,left:0,top:k,_height:b.rowSize})}g.push(this.start+h)}var m={},n={},o=[];BI.each(g,function(b,c){BI.deepContains(a.renderedKeys,c)?m[b]=c:n[b]=c}),BI.each(this.renderedKeys,function(a,b){BI.deepContains(m,b)||BI.deepContains(n,b)||o.push(a)}),BI.each(o,function(b,c){a.renderedCells[c].el.destroy()});var p=[];BI.each(n,function(a){p.push(f[a])}),BI.createWidget({type:"bi.absolute",element:this.container,items:p}),this.renderedCells=f,this.renderedKeys=g},_populate:function(){this.headerContainer.empty(),this._createHeader(),this._layout(),this._calculateChildrenToRender()},setVerticalScroll:function(a){if(this.options.scrollTop!==a){this.options.scrollTop=a;try{this.scrollContainer.element.scrollTop(a)}catch(b){}}},getVerticalScroll:function(){return this.options.scrollTop},setVPage:function(a){a=a<1?1:a;var b=this.options;this.start=(a-1)*b.pageSize+1},_restore:function(){this.options;BI.each(this.renderedCells,function(a,b){b.el.destroy()}),this.renderedCells=[],this.renderedKeys=[]},restore:function(){this._restore()},populate:function(a,b){var c=this.options;a&&a!==this.options.items&&(c.items=a,this._restore()),b&&b!==this.options.header&&(c.header=b),this._populate()}}),BI.shortcut("bi.sequence_table_list_number",BI.SequenceTableListNumber),BI.SequenceTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table",el:{type:"bi.adaptive_table"},sequence:{},isNeedResize:!0,isResizeAdapt:!1,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:[],showSequence:!1,startSequence:1})},_init:function(){BI.SequenceTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.sequence=BI.createWidget(b.sequence,{type:"bi.sequence_table_list_number",invisible:b.showSequence===!1,startSequence:b.startSequence,isNeedFreeze:b.isNeedFreeze,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems,headerRowSize:b.headerRowSize,rowSize:b.rowSize,width:60,height:b.height&&b.height-BI.GridTableScrollbar.SIZE,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter}),this.table=BI.createWidget(b.el,{type:"bi.adaptive_table",width:b.showSequence===!0?b.width-60:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(b){a.sequence.getVerticalScroll()!==this.getVerticalScroll()&&(a.sequence.setVerticalScroll(this.getVerticalScroll()),a.sequence.populate()),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)}),this.htape=BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.sequence,left:0,top:0},{el:this.table,top:0,left:b.showSequence===!0?60:0}]}),this._populate()},_populate:function(){var a=this.options;a.showSequence===!0?(this.sequence.setVisible(!0),this.table.element.css("left","60px"),this.table.setWidth(a.width-60)):(this.sequence.setVisible(!1),this.table.element.css("left","0px"),this.table.setWidth(a.width))},setWidth:function(a){BI.PageTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(this.options.showSequence?a-60:a)},setHeight:function(a){BI.PageTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a),this.sequence.setHeight(a-BI.GridTableScrollbar.SIZE)},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.columnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},hasLeftHorizontalScroll:function(){return this.table.hasLeftHorizontalScroll()},hasRightHorizontalScroll:function(){return this.table.hasRightHorizontalScroll()},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a),this.sequence.setVerticalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},setVPage:function(a){this.sequence.setVPage&&this.sequence.setVPage(a)},setHPage:function(a){this.sequence.setHPage&&this.sequence.setHPage(a)},attr:function(){BI.SequenceTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments),this.sequence.attr.apply(this.sequence,arguments)},restore:function(){this.table.restore(),this.sequence.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d),this._populate(),this.table.populate.apply(this.table,arguments),this.sequence.populate.apply(this.sequence,arguments),this.sequence.setVerticalScroll(this.table.getVerticalScroll())},destroy:function(){this.table.destroy(),BI.SequenceTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.sequence_table",BI.SequenceTable),BI.SingleSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.single_select_list",element:this,logic:{dynamic:!1},value:b.value,el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map([a.storeValue],function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d,selected:!1}});h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.single_select_radio_item",logic:{dynamic:!1},height:25,selected:!1})},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=BI.deepClone(a.value)||[],e=BI.map(d,function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.match.concat(f.find)}return BI.map(d,function(a,b){return{text:b.text,title:b.text,value:b.value,selected:!1}})},setValue:function(a){this.storeValue=a,this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SingleSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_loader",BI.SingleSelectSearchLoader),BI.SingleSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"single-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.single_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_pane",BI.SingleSelectSearchPane),BI.SingleSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_init:function(){BI.SingleSelectCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue),a.trigger.getSearcher().setState(a.storeValue)};this.storeValue=b.value||"",this.requesting=!1,this.trigger=BI.createWidget({type:"bi.single_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(a.getValue()),d.apply(a,arguments)})},value:this.storeValue}),this.trigger.on(BI.SingleSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.SingleSelectTrigger.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.SingleSelectTrigger.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.SingleSelectTrigger.EVENT_CHANGE,function(b,d){a.storeValue=this.getValue(),c()}),this.trigger.on(BI.SingleSelectTrigger.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.single_select_popup_view",ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.SingleSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c()})}},{eventName:BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){a._defaultState()}},{eventName:BI.SingleSelectPopupView.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.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length},value:b.value}),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.SingleSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"single-select-trigger-icon-button"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){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="")},_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.remove(b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||"",this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return this.storeValue},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.SingleSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.single_select_combo",BI.SingleSelectCombo),BI.SingleSelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-list",direction:BI.Direction.Top,logic:{dynamic:!0},items:[],itemsCreator:BI.emptyFn,hasNext:BI.emptyFn,onLoaded:BI.emptyFn,el:{type:"bi.list_pane"}})},_init:function(){BI.SingleSelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.list=BI.createWidget(b.el,{type:"bi.list_pane",items:b.items,itemsCreator:function(c,d){b.itemsCreator(c,function(b){d.apply(a,arguments)})},onLoaded:b.onLoaded,hasNext:b.hasNext,value:b.value}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&a.fireEvent(BI.SingleSelectList.EVENT_CHANGE,c,d),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),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.list)}))))},hasPrev:function(){return this.list.hasPrev()},hasNext:function(){return this.list.hasNext()},prependItems:function(a){this.list.prependItems.apply(this.list,arguments)},addItems:function(a){this.list.addItems.apply(this.list,arguments)},setValue:function(a){this.list.setValue([a])},getValue:function(){return this.list.getValue()[0]},empty:function(){this.list.empty()},populate:function(a){this.list.populate.apply(this.list,arguments)},resetHeight:function(a){this.list.resetHeight?this.list.resetHeight(a):this.list.element.css({"max-height":a+"px"})},setNotSelectedValue:function(){this.list.setNotSelectedValue.apply(this.list,arguments)},getNotSelectedValue:function(){return this.list.getNotSelectedValue()},getAllButtons:function(){return this.list.getAllButtons()},getAllLeaves:function(){return this.list.getAllLeaves()},getSelectedButtons:function(){return this.list.getSelectedButtons()},getNotSelectedButtons:function(){return this.list.getNotSelectedButtons()},getIndexByValue:function(a){return this.list.getIndexByValue(a)},getNodeById:function(a){return this.list.getNodeById(a)},getNodeByValue:function(a){return this.list.getNodeByValue(a)}}),BI.SingleSelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_list",BI.SingleSelectList),BI.SingleSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.single_select_list",element:this,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map([a.storeValue],function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d,selected:!1}});h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&(a.storeValue=f),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.single_select_radio_item",logic:this.options.logic,height:25,selected:!1})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},_assertValue:function(a){a||(a="")},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||"",this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SingleSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_loader",BI.SingleSelectLoader),BI.SingleSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.single_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.SingleSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM)}})},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.SingleSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.SingleSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.single_select_popup_view",BI.SingleSelectPopupView),BI.SingleSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.SingleSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.single_select_searcher",height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker,value:b.value}),this.searcher.on(BI.SingleSelectSearcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_START)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_CHANGE,arguments)});BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:BI.createWidget(),width:30}]})},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch()},setAdapter:function(a){this.searcher.setAdapter(a)},setValue:function(a){this.searcher.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.SingleSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.SingleSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.SingleSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectTrigger.EVENT_START="EVENT_START",BI.SingleSelectTrigger.EVENT_STOP="EVENT_STOP",BI.SingleSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.single_select_trigger",BI.SingleSelectTrigger),BI.SingleSelectEditor=BI.inherit(BI.Widget,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-editor",el:{}})},_init:function(){BI.SingleSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0,value:b.value}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_CLICK_LABEL,function(){})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastValidValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.SingleSelectEditor.EVENT_PAUSE="SingleSelectEditor.EVENT_PAUSE", -BI.shortcut("bi.single_select_editor",BI.SingleSelectEditor),BI.SingleSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.SingleSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.single_select_editor",height:b.height}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.single_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),this.setKeyword(c.keyword),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.SingleSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.SingleSelectSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;a||(a=""),""===a?this.editor.setState(BI.Selection.None):this.editor.setState(b.valueFormatter(a+"")||a+"")},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.SingleSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.SingleSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectSearcher.EVENT_START="EVENT_START",BI.SingleSelectSearcher.EVENT_STOP="EVENT_STOP",BI.SingleSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.single_select_searcher",BI.SingleSelectSearcher),BI.SingleSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.single_select_list",element:this,logic:{dynamic:!1},el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map([a.storeValue],function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d,selected:!1}});h=a._createItems(i)}if(g){for(var j=!1,k=0;k0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_add_pane",BI.SingleSelectSearchPane),BI.SingleSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_init:function(){BI.SingleSelectCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue),a.trigger.getSearcher().setState(a.storeValue)};this.storeValue="",this.requesting=!1,this.trigger=BI.createWidget({type:"bi.single_select_add_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(a.getValue()),d.apply(a,arguments)})}}),this.trigger.on(BI.SingleSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.SingleSelectTrigger.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.SingleSelectTrigger.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.SingleSelectTrigger.EVENT_CHANGE,function(b,d){a.storeValue=this.getValue(),c()}),this.trigger.on(BI.SingleSelectTrigger.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.single_select_popup_view",ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.SingleSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c()})}},{eventName:BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){a._defaultState()}},{eventName:BI.SingleSelectPopupView.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.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.SingleSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"single-select-trigger-icon-button"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){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="")},_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.remove(b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||"",this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return this.storeValue},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.SingleSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.single_select_add_combo",BI.SingleSelectCombo),BI.SingleSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.SingleSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.single_select_add_searcher",height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.SingleSelectSearcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_START)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_CHANGE,arguments)});BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:BI.createWidget(),width:30}]})},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch()},setAdapter:function(a){this.searcher.setAdapter(a)},setValue:function(a){this.searcher.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.SingleSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.SingleSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.SingleSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectTrigger.EVENT_START="EVENT_START",BI.SingleSelectTrigger.EVENT_STOP="EVENT_STOP",BI.SingleSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.single_select_add_trigger",BI.SingleSelectTrigger),BI.SingleSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.SingleSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.single_select_editor",height:b.height}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.single_select_search_add_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),this.setKeyword(c.keyword),b.itemsCreator(c,d)}},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.SingleSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.SingleSelectSearcher.EVENT_SEARCHING,b)})},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;a||(a=""),""===a?this.editor.setState(BI.Selection.None):this.editor.setState(b.valueFormatter(a+"")||a+"")},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.SingleSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.SingleSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectSearcher.EVENT_START="EVENT_START",BI.SingleSelectSearcher.EVENT_STOP="EVENT_STOP",BI.SingleSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.single_select_add_searcher",BI.SingleSelectSearcher),BI.SignTextEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-sign-initial-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",text:"",height:24})},_init:function(){BI.SignTextEditor.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:"sign-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:"left",height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.SignTextEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignTextEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText()}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;BI.nextTick(BI.bind(function(){if(""===this.editor.getValue())this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark");else{var b=this.editor.getValue();b=BI.isEmpty(b)||b==a.text?a.text:b+a.text,this.text.setValue(b),this.text.element.removeClass("bi-water-mark")}},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){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&&ef-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:"100%"},{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[this.label]}],rgap:c.EDITOR_WIDTH,height:c.EDITOR_HEIGHT},top:0,left:0,width:"100%"}]})},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setLabelPosition(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.label.setValue(m),c.value=m,c.fireEvent(BI.SingleSlider.EVENT_CHANGE)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){var b=this.options,c=!1;if(BI.isNumeric(a)&&!(BI.isNull(a)||athis.max))if(b.digit===!1)c=!0;else{var d=(a+"").split(".")[1]||"";c=d.length===b.digit}return c},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setLabelPosition:function(a){this.label.element.css({left:a+"%"})},_setSliderPosition:function(a){this.slider.element.css({left:a+"%"})},_setAllPosition:function(a){this._setSliderPosition(a),this._setLabelPosition(a),this._setBlueTrack(a)},_setVisible:function(a){this.slider.setVisible(a),this.label.setVisible(a)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(a){var b=BI.parseInt(10*a);return(this.max-this.min)*b/1e3+this.min},_getPercentByValue:function(a){return 100*(a-this.min)/(this.max-this.min)},getValue:function(){return this.value},setValue:function(a){var b=this.options;a=BI.parseFloat(a),a=b.digit===!1?a:a.toFixed(b.digit),isNaN(a)||(this._checkValidation(a)&&(this.value=a),a>this.max&&(this.value=this.max),ab&&(this.min=b,this.max=c)},reset:function(){this._setVisible(!1),this.enable=!1,this.value="",this.min=0,this.max=0,this._setBlueTrack(0)},populate:function(){isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,this.label.setErrorText(BI.i18nText("BI-Please_Enter")+this.min+"-"+this.max+BI.i18nText("BI-Basic_De")+BI.i18nText("BI-Basic_Number")),BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?(this.label.setValue(this.value),this._setAllPosition(this._getPercentByValue(this.value))):(this.label.setValue(this.max),this._setAllPosition(100)))}}),BI.SingleSlider.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_slider",BI.SingleSlider),BI.SingleSliderLabel=BI.inherit(BI.Widget,{_constant:{EDITOR_WIDTH:90,EDITOR_HEIGHT:20,HEIGHT:20,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},_defaultConfig:function(){return BI.extend(BI.SingleSliderLabel.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-slider-label bi-slider-track",digit:!1,unit:""})},_init:function(){BI.SingleSliderLabel.superclass._init.apply(this,arguments);var a=this,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&&ef-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.setText(i+b.unit),a.value=i,a.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)}}),this.label=BI.createWidget({type:"bi.label",height:c.HEIGHT,width:c.EDITOR_WIDTH-2}),this._setVisible(!1),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.track,width:"100%",height:c.TRACK_HEIGHT}]}],hgap:7,height:c.TRACK_HEIGHT},top:13,left:0,width:"100%"},{el:d,top:10,left:0,width:"100%"},{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[this.label]}],rgap:c.EDITOR_WIDTH,height:c.EDITOR_HEIGHT},top:0,left:0,width:"100%"}]})},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setLabelPosition(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.label.setValue(m),c.value=m,c.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){return BI.isNumeric(a)&&!(BI.isNull(a)||athis.max)},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setLabelPosition:function(a){this.label.element.css({left:a+"%"})},_setSliderPosition:function(a){this.slider.element.css({left:a+"%"})},_setAllPosition:function(a){this._setSliderPosition(a),this._setLabelPosition(a),this._setBlueTrack(a)},_setVisible:function(a){this.slider.setVisible(a),this.label.setVisible(a)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(a){var b=BI.parseInt(10*a);return(this.max-this.min)*b/1e3+this.min},_getPercentByValue:function(a){return 100*(a-this.min)/(this.max-this.min)},getValue:function(){return this.value},setValue:function(a){var b=this.options;a=BI.parseFloat(a),a=b.digit===!1?a:a.toFixed(b.digit),isNaN(a)||(this._checkValidation(a)&&(this.value=a),a>this.max&&(this.value=this.max),ab&&(this.min=b,this.max=c)},reset:function(){this._setVisible(!1),this.enable=!1,this.value="",this.min=0,this.max=0,this._setBlueTrack(0)},populate:function(){var a=this.options;isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?(this.label.setValue(this.value+a.unit),this._setAllPosition(this._getPercentByValue(this.value))):(this.label.setValue(this.max+a.unit),this._setAllPosition(100)))}}),BI.SingleSliderLabel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_slider_label",BI.SingleSliderLabel),BI.SingleSliderNormal=BI.inherit(BI.Widget,{ -_constant:{HEIGHT:28,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},props:{baseCls:"bi-single-slider-normal bi-slider-track",minMax:{min:0,max:100}},render:function(){var a=this,b=this._constant,c=this._createTrack();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:b.SLIDER_WIDTH_HALF,height:b.SLIDER_HEIGHT});return d.element.click(function(c){if(a.enable){var d=c.clientX-a.element.offset().left-b.SLIDER_WIDTH_HALF,e=a.track.element[0].scrollWidth,f=0;d<0&&(f=0),d>0&&de-b.SLIDER_WIDTH&&(f=100);var g=BI.parseFloat(f.toFixed(1));a._setAllPosition(g);var h=a._getValueByPercent(g);a.value=h,a.fireEvent(BI.SingleSlider.EVENT_CHANGE)}}),{type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:c,width:"100%",height:b.TRACK_HEIGHT}]}],hgap:7,height:b.TRACK_HEIGHT},top:3,left:0,width:"100%"},{el:d,top:0,left:0,width:"100%"}]}},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.value=m,c.fireEvent(BI.SingleSliderNormal.EVENT_DRAG,m)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrack:function(){var a=this;this._constant;return this.grayTrack=BI.createWidget({type:"bi.layout",cls:"gray-track",height:6}),this.blueTrack=BI.createWidget({type:"bi.layout",cls:"blue-track bi-high-light-background",height:6}),this.options.color&&this.blueTrack.element.css({"background-color":this.options.color}),{type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}],ref:function(b){a.track=b}}},_checkValidation:function(a){return!(BI.isNull(a)||athis.max)},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setSliderPosition:function(a){this.slider.element.css({left:a+"%"})},_setAllPosition:function(a){this._setSliderPosition(a),this._setBlueTrack(a)},_setVisible:function(a){this.slider.setVisible(a)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(a){var b=BI.parseInt(10*a);return(this.max-this.min)*b/1e3+this.min},_getPercentByValue:function(a){return 100*(a-this.min)/(this.max-this.min)},getValue:function(){return this.value},setValue:function(a){var b=BI.parseFloat(a);isNaN(b)||(this._checkValidation(b)&&(this.value=b),b>this.max&&(this.value=this.max),bb&&(this.min=b,this.max=c)},reset:function(){this._setVisible(!1),this.enable=!1,this.value="",this.min=0,this.max=0,this._setBlueTrack(0)},populate:function(){isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?this._setAllPosition(this._getPercentByValue(this.value)):this._setAllPosition(100))}}),BI.SingleSliderNormal.EVENT_DRAG="EVENT_DRAG",BI.shortcut("bi.single_slider_normal",BI.SingleSliderNormal),BI.SingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-combo",trigger:{},height:24,text:"",items:[],value:""})},_init:function(){BI.SingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value},b.trigger)),this.popup=BI.createWidget({type:"bi.single_level_tree",items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.SingleTreeCombo.EVENT_CHANGE)})},populate:function(a){this.combo.populate(a)},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.SingleTreeCombo.EVENT_CHANGE="SingleTreeCombo.EVENT_CHANGE",BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.single_tree_combo",BI.SingleTreeCombo),BI.SingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-level-tree",tipText:BI.i18nText("BI-No_Selected_Item"),items:[],value:""})},_init:function(){BI.SingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{isDefaultInit:!0},items:b.items,value:b.value,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SingleTreePopup.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.SingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.SingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_level_tree",BI.SingleTreePopup),BI.SingleTreeTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SingleTreeTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-trigger",height:24,text:"",items:[],value:""})},_init:function(){BI.SingleTreeTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,text:a.text,items:a.items,height:a.height,value:a.value})},_checkTitle:function(){var a=this,b=this.getValue();BI.any(this.options.items,function(c,d){if(b.contains(d.value))return a.trigger.setTitle(d.text||d.value),!0})},setValue:function(a){a=BI.isArray(a)?a:[a],this.options.value=a,this.trigger.setValue(a),this._checkTitle()},getValue:function(){return this.options.value||[]},populate:function(a){BI.SingleTreeTrigger.superclass.populate.apply(this,arguments),this.trigger.populate(a)}}),BI.shortcut("bi.single_tree_trigger",BI.SingleTreeTrigger),BI.SwitchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SwitchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-switch-tree",items:[]})},_init:function(){BI.SwitchTree.superclass._init.apply(this,arguments);this.options;this.tab=BI.createWidget({type:"bi.tab",element:this,tab:null,showIndex:BI.SwitchTree.SelectType.SingleSelect,cardCreator:BI.bind(this._createTree,this)})},_createTree:function(a){var b=this,c=this.options;switch(a){case BI.SwitchTree.SelectType.SingleSelect:return this.levelTree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:!0,items:BI.deepClone(c.items),value:c.value}),this.levelTree.on(BI.LevelTree.EVENT_CHANGE,function(){b.fireEvent(BI.SwitchTree.EVENT_CHANGE,arguments)}),this.levelTree;case BI.SwitchTree.SelectType.MultiSelect:return this.tree=BI.createWidget({type:"bi.simple_tree",items:this._removeIsParent(BI.deepClone(c.items)),value:c.value}),this.tree.on(BI.SimpleTreeView.EVENT_CHANGE,function(){b.fireEvent(BI.SwitchTree.EVENT_CHANGE,arguments)}),this.tree}},_removeIsParent:function(a){return BI.each(a,function(a,b){BI.isNotNull(b.isParent)&&delete b.isParent}),a},switchSelect:function(){switch(this.getSelect()){case BI.SwitchTree.SelectType.SingleSelect:this.setSelect(BI.SwitchTree.SelectType.MultiSelect);break;case BI.SwitchTree.SelectType.MultiSelect:this.setSelect(BI.SwitchTree.SelectType.SingleSelect)}},setSelect:function(a){this.tab.setSelect(a)},getSelect:function(){return this.tab.getSelect()},setValue:function(a){switch(this.storeValue=a,this.getSelect()){case BI.SwitchTree.SelectType.SingleSelect:this.levelTree.setValue(a);break;case BI.SwitchTree.SelectType.MultiSelect:this.tree.setValue(a)}},getValue:function(){return this.tab.getValue()},populate:function(a){this.options.items=a,BI.isNotNull(this.levelTree)&&this.levelTree.populate(BI.deepClone(a)),BI.isNotNull(this.tree)&&this.tree.populate(this._removeIsParent(BI.deepClone(a)))}}),BI.SwitchTree.EVENT_CHANGE="SwitchTree.EVENT_CHANGE",BI.SwitchTree.SelectType={SingleSelect:BI.Selection.Single,MultiSelect:BI.Selection.Multi},BI.shortcut("bi.switch_tree",BI.SwitchTree),BI.DateInterval=BI.inherit(BI.Single,{constants:{height:25,width:25,lgap:15,offset:-15,timeErrorCls:"time-error",DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){var a=BI.DateInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-date-interval"})},_init:function(){var a=this,b=this.options;BI.DateInterval.superclass._init.apply(this,arguments),b.value=b.value||{},this.left=this._createCombo(b.value.start),this.right=this._createCombo(b.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:this.constants.height,items:[{type:"bi.absolute",items:[{el:a.left,left:this.constants.offset,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[a.label]})},_createCombo:function(a){var b=this,c=BI.createWidget({type:"bi.dynamic_date_combo",value:a});return c.on(BI.DynamicDateCombo.EVENT_ERROR,function(){b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.DateInterval.EVENT_ERROR)}),c.on(BI.DynamicDateCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.DateInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicDateCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.DateInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW,function(){b.left.hidePopupView(),b.right.hidePopupView()}),c.on(BI.DynamicDateCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),b.fireEvent(BI.DateInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.DateInterval.EVENT_CHANGE))}),c},_dateCheck:function(a){return BI.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")===a||BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")===a||BI.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")===a||BI.parseDateTime(a,"%Y-%X-%e").print("%Y-%X-%e")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.constants.DATE_MIN_VALUE,this.constants.DATE_MAX_VALUE)[0]},_check:function(a,b){var c=a.match(/\d+/g),d=b.match(/\d+/g);return this._dateCheck(a)&&BI.checkDateLegal(a)&&this._checkVoid({year:c[0],month:c[1],day:c[2]})&&this._dateCheck(b)&&BI.checkDateLegal(b)&&this._checkVoid({year:d[0],month:d[1],day:d[2]})},_compare:function(a,b){return a=BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d"),b=BI.parseDateTime(b,"%Y-%X-%d").print("%Y-%X-%d"),BI.isNotNull(a)&&BI.isNotNull(b)&&a>b},_setTitle:function(a){this.left.setTitle(a),this.right.setTitle(a),this.label.setTitle(a)},_clearTitle:function(){this.left.setTitle(""),this.right.setTitle(""),this.label.setTitle("")},setValue:function(a){a=a||{},this.left.setValue(a.start),this.right.setValue(a.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.DateInterval.EVENT_VALID="EVENT_VALID",BI.DateInterval.EVENT_ERROR="EVENT_ERROR",BI.DateInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.date_interval",BI.DateInterval),BI.TimeInterval=BI.inherit(BI.Single,{constants:{height:25,width:25,lgap:15,offset:-15,timeErrorCls:"time-error",DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){var a=BI.TimeInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-time-interval"})},_init:function(){var a=this,b=this.options;BI.TimeInterval.superclass._init.apply(this,arguments),b.value=b.value||{},this.left=this._createCombo(b.value.start),this.right=this._createCombo(b.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:this.constants.height,items:[{type:"bi.absolute",items:[{el:a.left,left:this.constants.offset,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[a.label]})},_createCombo:function(a){var b=this,c=BI.createWidget({type:"bi.dynamic_date_time_combo",value:a});return c.on(BI.DynamicDateTimeCombo.EVENT_ERROR,function(){b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.TimeInterval.EVENT_ERROR)}),c.on(BI.DynamicDateTimeCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.TimeInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicDateTimeCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.TimeInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW,function(){b.left.hidePopupView(),b.right.hidePopupView()}),c.on(BI.DynamicDateTimeCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),b.fireEvent(BI.TimeInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.TimeInterval.EVENT_CHANGE))}),c},_dateCheck:function(a){return BI.parseDateTime(a,"%Y-%x-%d %H:%M:%S").print("%Y-%x-%d %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%X-%d %H:%M:%S").print("%Y-%X-%d %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%x-%e %H:%M:%S").print("%Y-%x-%e %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%X-%e %H:%M:%S").print("%Y-%X-%e %H:%M:%S")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.constants.DATE_MIN_VALUE,this.constants.DATE_MAX_VALUE)[0]},_check:function(a,b){var c=a.match(/\d+/g),d=b.match(/\d+/g);return this._dateCheck(a)&&BI.checkDateLegal(a)&&this._checkVoid({year:c[0],month:c[1],day:c[2]})&&this._dateCheck(b)&&BI.checkDateLegal(b)&&this._checkVoid({year:d[0],month:d[1],day:d[2]})},_compare:function(a,b){return a=BI.parseDateTime(a,"%Y-%X-%d %H:%M:%S").print("%Y-%X-%d %H:%M:%S"),b=BI.parseDateTime(b,"%Y-%X-%d %H:%M:%S").print("%Y-%X-%d %H:%M:%S"),BI.isNotNull(a)&&BI.isNotNull(b)&&a>b},_setTitle:function(a){this.left.setTitle(a),this.right.setTitle(a),this.label.setTitle(a)},_clearTitle:function(){this.left.setTitle(""),this.right.setTitle(""),this.label.setTitle("")},setValue:function(a){a=a||{},this.left.setValue(a.start),this.right.setValue(a.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.TimeInterval.EVENT_VALID="EVENT_VALID",BI.TimeInterval.EVENT_ERROR="EVENT_ERROR",BI.TimeInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.time_interval",BI.TimeInterval),BI.DynamicYearCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-card"},render:function(){var a=this;return{type:"bi.vertical",items:[{type:"bi.label",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),textAlign:"left",height:24},{type:"bi.dynamic_date_param_item",ref:function(){a.item=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]}],vgap:10,hgap:10}},_createValue:function(a,b){return{dateType:a,value:Math.abs(b),offset:b>0?1:0}},setValue:function(a){a=a||{year:0},this.item.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR,a.year))},getValue:function(){var a=this.item.getValue();return{year:0===a.offset?-a.value:a.value}}}),BI.DynamicYearCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_card",BI.DynamicYearCard),BI.StaticYearCard=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.StaticYearCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-card",behaviors:{},min:"1900-01-01",max:"2099-12-31"})},_createYearCalendar:function(a){var b=this.options,c=this._year,d=BI.createWidget({type:"bi.year_calendar",behaviors:b.behaviors,min:b.min,max:b.max,logic:{dynamic:!0},year:c+12*a});return d.setValue(this._year),d},_init:function(){BI.StaticYearCard.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedYear=this._year=BI.getDate().getFullYear(),this.backBtn=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:25,height:25,value:-1,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.navigation.setSelect(a.navigation.getSelect()-1),a._checkLeftValid(),a._checkRightValid()}}]}),this.preBtn=BI.createWidget({type:"bi.icon_button",cls:"next-page-h-font",width:25,height:25,value:1,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.navigation.setSelect(a.navigation.getSelect()+1),a._checkLeftValid(),a._checkRightValid()}}]}),this.navigation=BI.createWidget({type:"bi.navigation",direction:"top",element:this,single:!0,logic:{dynamic:!0},tab:{type:"bi.htape",cls:"bi-border-top bi-border-bottom",height:30,items:[{el:{type:"bi.center_adapt",items:[a.backBtn]},width:25},{type:"bi.layout"},{el:{type:"bi.center_adapt",items:[a.preBtn]},width:25}]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(a.selectedYear);var b=this.getSelectedCard();a.backBtn.setEnable(!b.isFrontYear()),a.preBtn.setEnable(!b.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedYear=this.getValue(),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.StaticYearCard.EVENT_CHANGE,a.selectedYear)}),BI.isKey(b.value)&&this.setValue(b.value)},_checkLeftValid:function(){var a=(this.options,!0);return this.backBtn.setEnable(a),a},_checkRightValid:function(){var a=(this.options,!0);return this.preBtn.setEnable(a),a},getValue:function(){return{year:this.selectedYear}},setValue:function(a){var b=this.options;a=a||{};var c=a.year;BI.checkDateVoid(c,1,1,b.min,b.max)[0]?(c=BI.getDate().getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(c)),this.navigation.setValue("")):(this.selectedYear=BI.parseInt(c),this.navigation.setSelect(BI.YearCalendar.getPageByYear(c)),this.navigation.setValue(this.selectedYear)),this._checkLeftValid(),this._checkRightValid()}}),BI.StaticYearCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.static_year_card",BI.StaticYearCard),BI.DynamicYearCombo=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-combo bi-border",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicYearCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value,this.trigger=BI.createWidget({type:"bi.dynamic_year_trigger",min:b.min,max:b.max,value:b.value||""}),this.trigger.on(BI.DynamicYearTrigger.EVENT_FOCUS,function(){a.storeTriggerValue=this.getKey()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_STOP,function(){a.combo.showView()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_ERROR,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeTriggerValue?(a.storeValue=a.trigger.getValue(),a.setValue(a.storeValue)):this.getKey()||(a.storeValue=null,a.setValue()),a.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM))}),this.combo=BI.createWidget({type:"bi.combo",isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.dynamic_year_popup",ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicYearPopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({year:b.getFullYear()}),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}],behaviors:b.behaviors,min:b.min,max:b.max},value:b.value||""}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicYearCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.htape",element:this,ref:function(){a.comboWrapper=this},items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24,ref:function(){a.changeIcon=this}},width:24},this.combo]}),this._checkDynamicValue(b.value)},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.DynamicYearCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue}}),BI.DynamicYearCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_year_combo",BI.DynamicYearCombo),BI.extend(BI.DynamicYearCombo,{Static:1,Dynamic:2}),BI.DynamicYearPopup=BI.inherit(BI.Widget,{constants:{tabHeight:30},props:{baseCls:"bi-year-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31",width:180,height:240},render:function(){var a=this;this.options;return this.storeValue={type:BI.DynamicYearCombo.Static},{type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-left bi-border-right bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Current_Year"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Basic_Current_Year")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=a.print("%Y"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-border-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Basic_Year_Fen"),value:BI.DynamicYearCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicYearCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(c){switch(c){case BI.DynamicYearCombo.Dynamic:return{type:"bi.dynamic_year_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicYearCombo.Static:default:return{type:"bi.static_year_card",behaviors:b.behaviors,min:a.options.min,max:a.options.max,listeners:[{eventName:BI.StaticYearCard.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearPopup.EVENT_CHANGE)}}],ref:function(){a.year=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicYearCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.year.setValue({year:c.getFullYear()}),a._setInnerValue();break;case BI.DynamicYearCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicYearCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:this.year.setValue(c),this.textButton.setValue(BI.i18nText("BI-Basic_Current_Year")),this.textButton.setEnable(!0)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicYearPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_popup",BI.DynamicYearPopup),BI.DynamicYearTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,errorText:BI.i18nText("BI-Please_Input_Positive_Integer"),errorTextInvalid:BI.i18nText("BI-Year_Trigger_Invalid_Text")},_defaultConfig:function(){return BI.extend(BI.DynamicYearTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-year-trigger",min:"1900-01-01",max:"2099-12-31",height:24})},_init:function(){BI.DynamicYearTrigger.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)&&!BI.checkDateVoid(a,1,1,b.min,b.max)[0]},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,errorText:function(a){return BI.isPositiveInteger(a)?c.errorTextInvalid:c.errorText}}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.DynamicYearTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DynamicYearTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&a.editor.setValue(b),BI.isNotEmptyString(b)&&(a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:b}}),a.fireEvent(BI.DynamicYearTrigger.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.DynamicYearTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DynamicYearTrigger.EVENT_ERROR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-year-text",text:BI.i18nText("BI-Multi_Date_Year"),width:b.height},width:b.height},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]}),this.setValue(b.value)},_getText:function(a){var b="";return BI.isNotNull(a.year)&&0!==a.year&&(b+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),b},_setInnerValue:function(a,b){var c=a.print("%Y");this.editor.setState(c),this.editor.setValue(c),this.setTitle(BI.isEmptyString(b)?c:b+":"+c)},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:c=c||{},this.editor.setState(c.year),this.editor.setValue(c.year),this.editor.setTitle(c.year)}},getValue:function(){return this.storeValue},getKey:function(){return 0|this.editor.getValue()}}),BI.DynamicYearTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearTrigger.EVENT_START="EVENT_START",BI.DynamicYearTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearTrigger.EVENT_STOP="EVENT_STOP",BI.shortcut("bi.dynamic_year_trigger",BI.DynamicYearTrigger),BI.DynamicYearMonthCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-month-card"},render:function(){var a=this;return{type:"bi.vertical",items:[{type:"bi.label",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),textAlign:"left",height:24},{type:"bi.dynamic_date_param_item",ref:function(){a.year=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]},{type:"bi.dynamic_date_param_item",dateType:BI.DynamicDateCard.TYPE.MONTH,ref:function(){a.month=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]}],vgap:10,hgap:10}},_createValue:function(a,b){return{dateType:a,value:Math.abs(b),offset:b>0?1:0}},setValue:function(a){a=a||{year:0,month:0},this.year.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR,a.year)),this.month.setValue(this._createValue(BI.DynamicDateCard.TYPE.MONTH,a.month))},getValue:function(){var a=this.year.getValue(),b=this.month.getValue();return{year:0===a.offset?-a.value:a.value,month:0===b.offset?-b.value:b.value}}}),BI.DynamicYearMonthCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_month_card",BI.DynamicYearMonthCard), -BI.StaticYearMonthCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-static-year-month-card",behaviors:{}},_createMonths:function(){var a=[1,7,2,8,3,9,4,10,5,11,6,12],b=[];return b.push(a.slice(0,2)),b.push(a.slice(2,4)),b.push(a.slice(4,6)),b.push(a.slice(6,8)),b.push(a.slice(8,10)),b.push(a.slice(10,12)),BI.map(b,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}})})},render:function(){var a=this,b=this.options;return{type:"bi.vertical",items:[{type:"bi.year_picker",ref:function(){a.yearPicker=this},height:30,listeners:[{eventName:BI.YearPicker.EVENT_CHANGE,action:function(){var b=this.getValue();a.setValue({year:b,month:a.selectedMonth})}}]},{type:"bi.button_group",behaviors:b.behaviors,ref:function(){a.month=this},items:this._createMonths(),layouts:[BI.LogicFactory.createLogic("table",BI.extend({dynamic:!0},{columns:2,rows:6,columnSize:[.5,.5],rowSize:25})),{type:"bi.center_adapt",vgap:1,hgap:2}],value:b.value,listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(){a.selectedYear=a.yearPicker.getValue(),a.selectedMonth=this.getValue()[0],a.fireEvent(BI.StaticYearMonthCard.EVENT_CHANGE)}}]}]}},getValue:function(){return{year:this.selectedYear,month:this.selectedMonth}},setValue:function(a){var b=this.options;if(a=a||{},a.year=a.year||0,a.month=a.month||0,BI.checkDateVoid(a.year,a.month,1,b.min,b.max)[0]){var c=BI.getDate().getFullYear(),d=BI.getDate().getMonth();this.selectedYear="",this.selectedMonth="",this.yearPicker.setValue(c),this.month.setValue(d)}else this.selectedYear=BI.parseInt(a.year),this.selectedMonth=BI.parseInt(a.month),this.yearPicker.setValue(this.selectedYear),this.month.setValue(this.selectedMonth)}}),BI.StaticYearMonthCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.static_year_month_card",BI.StaticYearMonthCard),BI.DynamicYearMonthCombo=BI.inherit(BI.Single,{props:{baseCls:"bi-year-month-combo bi-border",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicYearMonthCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value,this.trigger=BI.createWidget({type:"bi.dynamic_year_month_trigger",min:b.min,max:b.max,value:b.value||""}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_STOP,function(){a.combo.showView()}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_ERROR,function(){a.combo.isViewVisible()&&a.combo.hideView(),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_ERROR)}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_VALID,function(){a.fireEvent(BI.DynamicYearMonthCombo.EVENT_VALID)}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(a.storeValue=a.trigger.getValue(),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM))}),this.trigger.on(BI.DynamicYearMonthCombo.EVENT_FOCUS,function(){a.fireEvent(BI.DynamicYearMonthCombo.EVENT_FOCUS)}),this.combo=BI.createWidget({type:"bi.combo",isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.dynamic_year_month_popup",ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicYearMonthPopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({year:b.getFullYear()}),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}],behaviors:b.behaviors,min:b.min,max:b.max},value:b.value||""}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.htape",element:this,ref:function(){a.comboWrapper=this},items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24,ref:function(){a.changeIcon=this}},width:24},this.combo]}),this._checkDynamicValue(b.value)},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.DynamicYearMonthCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},hideView:function(){this.combo.hideView()},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()}}),BI.DynamicYearMonthCombo.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearMonthCombo.EVENT_VALID="EVENT_VALID",BI.DynamicYearMonthCombo.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearMonthCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_year_month_combo",BI.DynamicYearMonthCombo),BI.extend(BI.DynamicYearMonthCombo,{Static:1,Dynamic:2}),BI.DynamicYearMonthPopup=BI.inherit(BI.Widget,{constants:{tabHeight:30},props:{baseCls:"bi-year-month-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31",width:180,height:240},render:function(){var a=this;this.options;return this.storeValue={type:BI.DynamicYearMonthCombo.Static},{type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-left bi-border-right bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Current_Month"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Basic_Current_Month")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=a.print("%Y-%x"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-border-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Basic_Year_Fen"),value:BI.DynamicYearCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicYearCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(c){switch(c){case BI.DynamicYearCombo.Dynamic:return{type:"bi.dynamic_year_month_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicYearCombo.Static:default:return{type:"bi.static_year_month_card",behaviors:b.behaviors,min:a.options.min,max:a.options.max,listeners:[{eventName:BI.StaticYearMonthCard.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearMonthPopup.EVENT_CHANGE)}}],ref:function(){a.year=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicYearCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.year.setValue({year:c.getFullYear(),month:c.getMonth()}),a._setInnerValue();break;case BI.DynamicYearCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicYearCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:this.year.setValue(c),this.textButton.setValue(BI.i18nText("BI-Basic_Current_Month")),this.textButton.setEnable(!0)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicYearMonthPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_month_popup",BI.DynamicYearMonthPopup),BI.DynamicYearMonthTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,errorText:BI.i18nText("BI-Please_Input_Positive_Integer"),errorTextInvalid:BI.i18nText("BI-Year_Trigger_Invalid_Text")},props:{extraCls:"bi-year-month-trigger",min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicYearMonthTrigger.superclass._init.apply(this,arguments);var a=this.options;this.yearEditor=this._createEditor(!0),this.monthEditor=this._createEditor(!1),BI.createWidget({element:this,type:"bi.htape",items:[{type:"bi.center",items:[{type:"bi.htape",items:[this.yearEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Year"),width:a.height},width:a.height}]},{type:"bi.htape",items:[this.monthEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Month"),width:a.height},width:a.height}]}]},{el:{type:"bi.trigger_icon_button",width:a.height},width:a.height}]}),this.setValue(a.value)},_createEditor:function(a){var b=this,c=this.options,d=this._const,e=BI.createWidget({type:"bi.sign_editor",height:c.height,validationChecker:function(b){return a?""===b||BI.isPositiveInteger(b)&&!BI.checkDateVoid(b,1,1,c.min,c.max)[0]:""===b||b>=1&&b<=12&&!BI.checkDateVoid(BI.getDate().getFullYear(),b,1,c.min,c.max)[0]},quitChecker:function(){return!1},watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(a){return BI.isPositiveInteger(a)?d.errorTextInvalid:d.errorText},hgap:d.hgap,vgap:d.vgap,allowBlank:!0});return e.on(BI.SignEditor.EVENT_FOCUS,function(){b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_FOCUS)}),e.on(BI.SignEditor.EVENT_STOP,function(){b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_STOP)}),e.on(BI.SignEditor.EVENT_CONFIRM,function(){var a=e.getValue();if(BI.isNotNull(a)&&e.setValue(a),BI.isNotEmptyString(a)){var c=b.monthEditor.getValue();b.storeValue={type:BI.DynamicDateCombo.Static,value:{year:b.yearEditor.getValue(),month:BI.isEmptyString(b.monthEditor.getValue())?"":c-1}}}b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM)}),e.on(BI.SignEditor.EVENT_SPACE,function(){e.isValid()&&e.blur()}),e.on(BI.SignEditor.EVENT_START,function(){b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_START)}),e.on(BI.SignEditor.EVENT_ERROR,function(){b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_ERROR)}),e.on(BI.SignEditor.EVENT_VALID,function(){var a=b.yearEditor.getValue(),d=b.monthEditor.getValue();BI.isNotEmptyString(a)&&BI.isNotEmptyString(d)&&BI.isPositiveInteger(a)&&d>=1&&d<=12&&!BI.checkDateVoid(a,d,1,c.min,c.max)[0]&&b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_VALID)}),e.on(BI.SignEditor.EVENT_CHANGE,function(){a&&b._autoSwitch(e.getValue())}),e},_yearCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d");return BI.parseDateTime(a,"%Y").print("%Y")===a&&b>=this.options.min&&b<=this.options.max},_autoSwitch:function(a){BI.checkDateLegal(a)&&4===a.length&&this._yearCheck(a)&&this.monthEditor.focus()},_getText:function(a){var b="";return BI.isNotNull(a.year)&&(b+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),BI.isNotNull(a.month)&&0!==a.month&&(b+=Math.abs(a.month)+BI.i18nText("BI-Basic_Year")+(a.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),b},_setInnerValue:function(a,b){var c=a.print("%Y-%x");this.yearEditor.setValue(a.getFullYear()),this.monthEditor.setValue(a.getMonth()+1),this.setTitle(BI.isEmptyString(b)?c:b+":"+c)},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:c=c||{};var f=BI.isNull(c.month)?null:c.month;this.yearEditor.setValue(c.year),this.yearEditor.setTitle(c.year),this.monthEditor.setValue(f),this.monthEditor.setTitle(f)}},getValue:function(){return this.storeValue},getKey:function(){return this.yearEditor.getValue()+"-"+this.monthEditor.getValue()}}),BI.DynamicYearMonthTrigger.EVENT_VALID="EVENT_FOCUS",BI.DynamicYearMonthTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearMonthTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearMonthTrigger.EVENT_START="EVENT_START",BI.DynamicYearMonthTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearMonthTrigger.EVENT_STOP="EVENT_STOP",BI.shortcut("bi.dynamic_year_month_trigger",BI.DynamicYearMonthTrigger),BI.YearMonthInterval=BI.inherit(BI.Single,{constants:{height:25,width:25,lgap:15,offset:-15,timeErrorCls:"time-error",DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},props:{extraCls:"bi-year-month-interval"},_init:function(){var a=this,b=this.options;BI.YearMonthInterval.superclass._init.apply(this,arguments),b.value=b.value||{},this.left=this._createCombo(b.value.start),this.right=this._createCombo(b.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:this.constants.height,items:[{type:"bi.absolute",items:[{el:a.left,left:this.constants.offset,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[a.label]})},_createCombo:function(a){var b=this,c=BI.createWidget({type:"bi.dynamic_year_month_combo",value:a});return c.on(BI.DynamicYearMonthCombo.EVENT_ERROR,function(){b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.YearMonthInterval.EVENT_ERROR)}),c.on(BI.DynamicYearMonthCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.YearMonthInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicYearMonthCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.YearMonthInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW,function(){b.left.hideView(),b.right.hideView()}),c.on(BI.DynamicYearMonthCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),b.fireEvent(BI.YearMonthInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.YearMonthInterval.EVENT_CHANGE))}),c},_dateCheck:function(a){return BI.parseDateTime(a,"%Y-%x").print("%Y-%x")===a||BI.parseDateTime(a,"%Y-%X").print("%Y-%X")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,1,this.constants.DATE_MIN_VALUE,this.constants.DATE_MAX_VALUE)[0]},_check:function(a,b){var c=a.match(/\d+/g),d=b.match(/\d+/g);return this._dateCheck(a)&&BI.checkDateLegal(a)&&this._checkVoid({year:c[0],month:c[1],day:1})&&this._dateCheck(b)&&BI.checkDateLegal(b)&&this._checkVoid({year:d[0],month:d[1],day:1})},_compare:function(a,b){return a=BI.parseDateTime(a,"%Y-%X").print("%Y-%X"),b=BI.parseDateTime(b,"%Y-%X").print("%Y-%X"),BI.isNotNull(a)&&BI.isNotNull(b)&&a>b},_setTitle:function(a){this.left.setTitle(a),this.right.setTitle(a),this.label.setTitle(a)},_clearTitle:function(){this.left.setTitle(""),this.right.setTitle(""),this.label.setTitle("")},setValue:function(a){a=a||{},this.left.setValue(a.start),this.right.setValue(a.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.YearMonthInterval.EVENT_VALID="EVENT_VALID",BI.YearMonthInterval.EVENT_ERROR="EVENT_ERROR",BI.YearMonthInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_month_interval",BI.YearMonthInterval),BI.DynamicYearQuarterCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-month-card"},render:function(){var a=this;return{type:"bi.vertical",items:[{type:"bi.label",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),textAlign:"left",height:24},{type:"bi.dynamic_date_param_item",ref:function(){a.year=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]},{type:"bi.dynamic_date_param_item",dateType:BI.DynamicDateCard.TYPE.QUARTER,ref:function(){a.quarter=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]}],vgap:10,hgap:10}},_createValue:function(a,b){return{dateType:a,value:Math.abs(b),offset:b>0?1:0}},setValue:function(a){a=a||{year:0,month:0},this.year.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR,a.year)),this.quarter.setValue(this._createValue(BI.DynamicDateCard.TYPE.QUARTER,a.quarter))},getValue:function(){var a=this.year.getValue(),b=this.quarter.getValue();return{year:0===a.offset?-a.value:a.value,quarter:0===b.offset?-b.value:b.value}}}),BI.DynamicYearQuarterCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_quarter_card",BI.DynamicYearQuarterCard),BI.StaticYearQuarterCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-static-year-quarter-card",behaviors:{}},_createQuarter:function(){var a=[{text:Date._QN[1],value:1},{text:Date._QN[2],value:2},{text:Date._QN[3],value:3},{text:Date._QN[4],value:4}];return BI.map(a,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"center",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:24})})},render:function(){var a=this,b=this.options;return{type:"bi.vertical",items:[{type:"bi.year_picker",ref:function(){a.yearPicker=this},height:30,listeners:[{eventName:BI.YearPicker.EVENT_CHANGE,action:function(){var b=this.getValue();a.setValue({year:b,quarter:a.selectedQuarter})}}]},{type:"bi.button_group",behaviors:b.behaviors,ref:function(){a.quarter=this},items:this._createQuarter(),layouts:[{type:"bi.vertical",vgap:10}],value:b.value,listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(){a.selectedYear=a.yearPicker.getValue(),a.selectedQuarter=this.getValue()[0],a.fireEvent(BI.StaticYearQuarterCard.EVENT_CHANGE)}}]}]}},getValue:function(){return{year:this.selectedYear,quarter:this.selectedQuarter}},setValue:function(a){var b=this.options;if(a=a||{},a.year=a.year||0,a.quarter=a.quarter||0,BI.checkDateVoid(a.year,a.quarter,1,b.min,b.max)[0]){var c=BI.getDate().getFullYear(),d=BI.getDate().getQuarter();this.selectedYear="",this.selectedQuarter="",this.yearPicker.setValue(c),this.quarter.setValue(d)}else this.selectedYear=BI.parseInt(a.year),this.selectedQuarter=BI.parseInt(a.quarter),this.yearPicker.setValue(this.selectedYear),this.quarter.setValue(this.selectedQuarter)}}),BI.StaticYearQuarterCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.static_year_quarter_card",BI.StaticYearQuarterCard),BI.DynamicYearQuarterCombo=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-quarter-combo bi-border",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicYearQuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value,this.trigger=BI.createWidget({type:"bi.dynamic_year_quarter_trigger",min:b.min,max:b.max,value:b.value||""}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_STOP,function(){a.combo.showView()}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_ERROR,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(a.storeValue=a.trigger.getValue(),a.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM))}),this.combo=BI.createWidget({type:"bi.combo",isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.dynamic_year_quarter_popup",ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicYearQuarterPopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({year:b.getFullYear()}),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}],behaviors:b.behaviors,min:b.min,max:b.max},value:b.value||""}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicYearQuarterCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.htape",element:this,ref:function(){a.comboWrapper=this},items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24,ref:function(){a.changeIcon=this}},width:24},this.combo]}),this._checkDynamicValue(b.value)},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.DynamicYearQuarterCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue}}),BI.DynamicYearQuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearQuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_year_quarter_combo",BI.DynamicYearQuarterCombo),BI.extend(BI.DynamicYearQuarterCombo,{Static:1,Dynamic:2}),BI.DynamicYearQuarterPopup=BI.inherit(BI.Widget,{constants:{tabHeight:30},props:{baseCls:"bi-year-quarter-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31",width:180,height:240},render:function(){var a=this;this.options;return this.storeValue={type:BI.DynamicYearQuarterCombo.Static},{type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-left bi-border-right bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Current_Quarter"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicYearQuarterCombo.Static)this.textButton.setValue(BI.i18nText("BI-Basic_Current_Quarter")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=a.print("%Y-%x"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-border-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Basic_Year_Fen"),value:BI.DynamicYearQuarterCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicYearQuarterCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(c){switch(c){case BI.DynamicYearQuarterCombo.Dynamic:return{type:"bi.dynamic_year_quarter_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicYearQuarterCombo.Static:default:return{type:"bi.static_year_quarter_card",behaviors:b.behaviors,min:a.options.min,max:a.options.max,listeners:[{eventName:BI.DynamicYearCard.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearQuarterPopup.EVENT_CHANGE)}}],ref:function(){a.year=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicYearQuarterCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.year.setValue({year:c.getFullYear(),quarter:c.getQuarter()}),a._setInnerValue();break;case BI.DynamicYearQuarterCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicYearQuarterCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:this.year.setValue(c),this.textButton.setValue(BI.i18nText("BI-Basic_Current_Quarter")),this.textButton.setEnable(!0)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicYearQuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_quarter_popup",BI.DynamicYearQuarterPopup),BI.DynamicYearQuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,errorText:BI.i18nText("BI-Please_Input_Positive_Integer"),errorTextInvalid:BI.i18nText("BI-Year_Trigger_Invalid_Text")},props:{extraCls:"bi-year-quarter-trigger",min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicYearQuarterTrigger.superclass._init.apply(this,arguments);var a=this.options;this.yearEditor=this._createEditor(!0),this.quarterEditor=this._createEditor(!1),BI.createWidget({element:this,type:"bi.htape",items:[{type:"bi.center",items:[{type:"bi.htape",items:[this.yearEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Year"),width:a.height},width:a.height}]},{type:"bi.htape",items:[this.quarterEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Quarter"),width:a.height},width:a.height}]}]},{el:{type:"bi.trigger_icon_button",width:a.height},width:a.height}]}),this.setValue(a.value)},_createEditor:function(a){var b=this,c=this.options,d=this._const,e=BI.createWidget({type:"bi.sign_editor",height:c.height,validationChecker:function(b){return a?""===b||BI.isPositiveInteger(b)&&!BI.checkDateVoid(b,1,1,c.min,c.max)[0]:""===b||b>=1&&b<=4&&!BI.checkDateVoid(BI.getDate().getFullYear(),b,1,c.min,c.max)[0]},quitChecker:function(){return!1},errorText:function(a){return BI.isPositiveInteger(a)?d.errorTextInvalid:d.errorText},watermark:BI.i18nText("BI-Basic_Unrestricted"),hgap:d.hgap,vgap:d.vgap,allowBlank:!0});return e.on(BI.SignEditor.EVENT_FOCUS,function(){b.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_FOCUS)}),e.on(BI.SignEditor.EVENT_STOP,function(){b.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_STOP)}),e.on(BI.SignEditor.EVENT_CONFIRM,function(){var a=e.getValue();if(BI.isNotNull(a)&&e.setValue(a),BI.isNotEmptyString(a)){var c=b.quarterEditor.getValue();b.storeValue={type:BI.DynamicYearQuarterCombo.Static,value:{year:b.yearEditor.getValue(),quarter:BI.isEmptyString(b.quarterEditor.getValue())?"":c}}}b.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM)}),e.on(BI.SignEditor.EVENT_SPACE,function(){e.isValid()&&e.blur()}),e.on(BI.SignEditor.EVENT_START,function(){b.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_START)}),e.on(BI.SignEditor.EVENT_ERROR,function(){b.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_ERROR)}),e.on(BI.SignEditor.EVENT_CHANGE,function(){a&&b._autoSwitch(e.getValue())}),e},_yearCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d");return BI.parseDateTime(a,"%Y").print("%Y")===a&&b>=this.options.min&&b<=this.options.max},_autoSwitch:function(a){BI.checkDateLegal(a)&&4===a.length&&this._yearCheck(a)&&this.quarterEditor.focus()},_getText:function(a){var b="";return BI.isNotNull(a.year)&&(b+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),BI.isNotNull(a.quarter)&&0!==a.quarter&&(b+=Math.abs(a.quarter)+BI.i18nText("BI-Basic_Year")+(a.quarter<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),b},_setInnerValue:function(a,b){var c=a.print("%Y-%x");this.yearEditor.setValue(a.getFullYear()),this.quarterEditor.setValue(a.getQuarter()),this.setTitle(BI.isEmptyString(b)?c:b+":"+c)},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicYearQuarterCombo.Static,c=a.value||a),b){case BI.DynamicYearQuarterCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicYearQuarterCombo.Static:default:c=c||{};var f=BI.isNull(c.quarter)?null:c.quarter;this.yearEditor.setValue(c.year),this.yearEditor.setTitle(c.year),this.quarterEditor.setValue(f),this.quarterEditor.setTitle(f)}},getValue:function(){return this.storeValue}}),BI.DynamicYearQuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearQuarterTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearQuarterTrigger.EVENT_START="EVENT_START",BI.DynamicYearQuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearQuarterTrigger.EVENT_STOP="EVENT_STOP",BI.shortcut("bi.dynamic_year_quarter_trigger",BI.DynamicYearQuarterTrigger),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.match.concat(d.find)}),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,value:{type:BI.Selection.Multi,value:b.value||[]}}),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(BI.AllValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-all-value-chooser-pane",width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.AllValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&(this.items=b.items),this.list=BI.createWidget({type:"bi.multi_select_list",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:b.width,height:b.height}),this.list.on(BI.MultiSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.AllValueChooserPane.EVENT_CHANGE)})},setValue:function(a){this.list.setValue({type:BI.Selection.Multi,value:a||[]})},getValue:function(){var a=this.list.getValue()||{};return a.type===BI.Selection.All?a.assist:a.value||[]},populate:function(){this.list.populate.apply(this.list,arguments)}}),BI.AllValueChooserPane.EVENT_CHANGE="AllValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.all_value_chooser_pane",BI.AllValueChooserPane),BI.AbstractTreeValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractTreeValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn})},_initData:function(a){this.items=a;var b=BI.Tree.treeFormat(a);this.tree=new BI.Tree,this.tree.initTree(b)},_itemsCreator:function(a,b){function c(){switch(a.type){case BI.TreeView.REQ_TYPE_INIT_DATA:d._reqInitTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_ADJUST_DATA:d._reqAdjustTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_SELECT_DATA:d._reqSelectedTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_GET_SELECTED_DATA:d._reqDisplayTreeNode(a,b);break;default:d._reqTreeNode(a,b)}}var d=this,e=this.options;this.items?c():e.itemsCreator({},function(a){d._initData(a),c()})},_reqDisplayTreeNode:function(a,b){function c(a,b,g){return null==g||BI.isEmpty(g)?void BI.each(b.getChildren(),function(d,g){var h=BI.clone(a);h.push(g.value);var i=f._getChildCount(h);e(g,b.id,i),c(h,g,{})}):void BI.each(g,function(b){var h=f._getTreeNode(a,b),i=BI.clone(a);i.push(h.value),e(h,h.parent&&h.parent.id,d(g[b],i)),c(i,h,g[b])})}function d(a,b){return null==a?0:BI.isEmpty(a)?f._getChildCount(b):BI.size(a)}function e(a,b,c){g.push({id:a.id,pId:b,text:a.text+(c>0?"("+BI.i18nText("BI-Basic_Altogether")+c+BI.i18nText("BI-Basic_Count")+")":""),value:a.value,open:!0})}var f=this,g=[],h=a.selectedValues;return null==h||BI.isEmpty(h)?void b({}):(c([],this.tree.getRoot(),h),void b({items:g}))},_reqSelectedTreeNode:function(a,b){function c(a){var b=m.concat(k);if(g(a,b))if(f(b))i._deleteNode(a,b);else{var c=[],j=e(m,k,[],c);j&&BI.isNotEmptyArray(c)&&BI.each(c,function(b,c){var e=i._getNode(a,c);e?i._deleteNode(a,c):d(a,c,BI.last(c))})}if(h(a,b)){var l=[],j=!1;f(b)?j=!0:(j=e(m,k,l),b=m),j===!0&&(d(a,b,k),l.length>0&&BI.each(l,function(b,c){i._buildTree(a,c)}))}}function d(a,b,c){var d=a,e=[],f=[];BI.some(b,function(g,h){var j=d[h];if(null==j){if(0===g)return!0;if(!BI.isEmpty(d))return!0;var k=b.slice(0,g),l=i._getChildren(k);if(f.push(k),e.push(l.length),g===b.length-1&&1===l.length&&l[0]===c)for(var m=e.length-1;m>=0&&1===e[m];m--)i._deleteNode(a,f[m]);else BI.each(l,function(a,e){return g===b.length-1&&e.value===c||void(d[e.value]={})});d=d[h]}else d=j})}function e(a,b,c,d){var f=BI.clone(a);if(f.push(b),i._isMatch(a,b,l))return d&&d.push(f),!0;var g=i._getChildren(f),h=[],j=!1;return BI.each(g,function(a,b){e(f,b.value,c,d)?j=!0:h.push(b.value)}),j===!0&&BI.each(h,function(a,b){var d=BI.clone(f);d.push(b),c.push(d)}),j}function f(a){for(var b=0,c=a.length;bj._const.perPage)break}return f}function d(a,b,c,i,k){if(j._isMatch(b,c,l)){var m=i||h(b,c);return e(b,c,!1,m,!i&&f(b,c),!0,k),[!0,m]}var n=BI.clone(b);n.push(c);var o=j._getChildren(n),p=!1,m=!1,q=i||g(b,c);return BI.each(o,function(b,c){var e=d(a+1,n,c.value,q,k);e[1]===!0&&(m=!0),e[0]===!0&&(p=!0)}),p===!0&&(m=q||h(b,c)&&m,e(b,c,!0,m,!1,!1,k)),[p,m]}function e(a,b,c,d,e,f,g){var h=j._getTreeNode(a,b);g.push({id:h.id,pId:h.pId,text:h.text,value:h.value,title:h.title,isParent:h.getChildrenLength()>0,open:c,checked:d,halfCheck:e,flag:f})}function f(a,b){var c=i(a);return null==c?null:BI.any(c,function(a,c){if(a===b&&null!=c&&!BI.isEmpty(c))return!0})}function g(a,b){var c=i(a);return null==c?null:BI.any(c,function(a,c){if(a===b&&null!=c&&BI.isEmpty(c))return!0})}function h(a,b){var c=i(a);return null!=c&&BI.any(c,function(a){if(a===b)return!0})}function i(a){var b=m;return null==b?null:(BI.every(a,function(a,c){return b=b[c],null!=b}),b)}var j=this,k=[],l=a.keyword||"",m=a.selectedValues,n=a.lastSearchValue||"",o=c();BI.nextTick(function(){b({hasNext:o.length>j._const.perPage,items:k,lastSearchValue:BI.last(o)})})},_reqTreeNode:function(a,b){function c(a,b){var c={};return BI.each(a,function(a,c){b=b[c]||{}}),BI.each(b,function(a,b){if(BI.isNull(b))return void(c[a]=[0,0]);if(BI.isEmpty(b))return void(c[a]=[2,0]);var d={};BI.each(b,function(a,b){(BI.isNull(b)||BI.isEmpty(b))&&(d[a]=!0)}),c[a]=[1,BI.size(d)]}),c}function d(a,b,c,d){var f=d.checked,g=d.half,h=!1,i=!1;if(BI.has(c,a))if(1===c[a][0]){var j=BI.clone(b);j.push(a);var k=e._getChildCount(j);k>0&&k!==c[a][1]&&(i=!0)}else 2===c[a][0]&&(h=!0);var l;return l=f||i||h?(h||f)&&!g||BI.has(c,a):BI.has(c,a),[l,i]}var e=this,f=[],g=a.times,h=a.checkState||{},i=a.parentValues||[],j=a.selectedValues||{},k={};k=c(i,j);for(var l=this._getChildren(i),m=(g-1)*this._const.perPage;l[m]&&m0,checked:n[0],halfCheck:n[1]})}BI.nextTick(function(){b({items:f,hasNext:l.length>g*e._const.perPage})})},_getNode:function(a,b){for(var c=a,d=0,e=b.length;d0&&BI.isEmpty(e);)c=d[d.length-1],d=d.slice(0,d.length-1),e=this._getNode(a,d),null!=e&&delete e[c]},_buildTree:function(a,b){var c=a;BI.each(b,function(a,b){BI.has(c,b)||(c[b]={}),c=c[b]})},_isMatch:function(a,b,c){var d=this._getTreeNode(a,b),e=BI.Func.getSearchResult([d.text||d.value],c);return e.find.length>0||e.match.length>0},_getTreeNode:function(a,b){var c,d=this,e=0;return this.tree.traverse(function(f){if(!d.tree.isRoot(f))return!(e>a.length)&&(e===a.length&&f.value===b?(c=f,!1):f.value!==a[e]||void e++)}),c},_getChildren:function(a){if(a.length>0)var b=BI.last(a),c=this._getTreeNode(a.slice(0,a.length-1),b);else var c=this.tree.getRoot();return c.getChildren()},_getChildCount:function(a){return this._getChildren(a).length}}),BI.TreeValueChooserCombo=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-combo",width:200,height:30,items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&this._initData(b.items),this.combo=BI.createWidget({type:"bi.multi_tree_combo",element:this,itemsCreator:BI.bind(this._itemsCreator,this),width:b.width,height:b.height}),this.combo.on(BI.MultiTreeCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.TreeValueChooserCombo.EVENT_CONFIRM)})},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.TreeValueChooserCombo.EVENT_CONFIRM="TreeValueChooserCombo.EVENT_CONFIRM",BI.shortcut("bi.tree_value_chooser_combo",BI.TreeValueChooserCombo),BI.TreeValueChooserPane=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-pane",items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.pane=BI.createWidget({type:"bi.multi_select_tree",element:this,itemsCreator:BI.bind(this._itemsCreator,this)}),this.pane.on(BI.MultiSelectTree.EVENT_CHANGE,function(){a.fireEvent(BI.TreeValueChooserPane.EVENT_CHANGE)}),BI.isNotNull(b.items)&&(this._initData(b.items),this.populate())},setSelectedValue:function(a){this.pane.setSelectedValue(a)},setValue:function(a){this.pane.setValue(a)},getValue:function(){return this.pane.getValue()},populate:function(){this.pane.populate.apply(this.pane,arguments)}}),BI.TreeValueChooserPane.EVENT_CHANGE="TreeValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.tree_value_chooser_pane",BI.TreeValueChooserPane),BI.AbstractValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn,cache:!0})},_valueFormatter:function(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},_getItemsByTimes:function(a,b){for(var c=[],d=(b-1)*this._const.perPage;a[d]&&d0&&!b),this.setHalfSelected(c.length>0&&b),this.checked.isHalfSelected()&&(this.selectValue=c)},getAllButtons:function(){return[this]},getAllLeaves:function(){var a=(this.options,[]);return this.tree.traverse(function(b){b.isLeaf()&&a.push(b.get("data").value)}),a},getNotSelectedValue:function(){var a=this,b=(this.options,[]),c=this.checked.isSelected();if(c===!0)return b;var d=this.checked.isHalfSelected();return this.tree.traverse(function(c){if(c.isLeaf()){var e=c.get("data").value;d===!0?BI.contains(a.selectValue,c.get("data").value)||b.push(e):b.push(e)}}),b},getValue:function(){var a=[];return this.checked.isSelected()?(this.tree.traverse(function(b){b.isLeaf()&&a.push(b.get("data").value)}),a):this.checked.isHalfSelected()?this.selectValue:[]}}),BI.FileManagerFolderItem.EVENT_CHANGE="FileManagerFolderItem.EVENT_CHANGE",BI.shortcut("bi.file_manager_folder_item",BI.FileManagerFolderItem),BI.FileManagerList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-list",el:{},items:[]})},_init:function(){BI.FileManagerList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.list=BI.createWidget({type:"bi.select_list",element:this,items:b.items,toolbar:{type:"bi.multi_select_bar",height:40,text:""},el:{type:"bi.list_pane",el:BI.isWidget(b.el)?b.el:BI.extend({type:"bi.file_manager_button_group"},b.el)}}),this.list.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){this.list.setValue({value:a})},getValue:function(){return this.list.getValue()},populate:function(a){this.list.populate(a),this.list.setToolBarVisible(!0)}}),BI.FileManagerList.EVENT_CHANGE="FileManagerList.EVENT_CHANGE",BI.shortcut("bi.file_manager_list",BI.FileManagerList),BI.FileManagerNavButton=BI.inherit(BI.Widget,{_const:{normal_color:"#ffffff",select_color:"#eff1f4"},_defaultConfig:function(){return BI.extend(BI.FileManagerNavButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-nav-button",selected:!1,height:40})},_init:function(){BI.FileManagerNavButton.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.button=BI.createWidget({type:"bi.text_button",cls:"file-manager-nav-button-text bi-card",once:!0,selected:b.selected,text:b.text,title:b.text,value:b.value,height:b.height,lgap:20,rgap:10}),this.button.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var d=BI.createWidget({type:"bi.svg",cls:"file-manager-nav-button-triangle",width:15,height:b.height}),e=d.path("M0,0L15,20L0,40").attr({stroke:c.select_color,fill:b.selected?c.select_color:c.normal_color});this.button.on(BI.TextButton.EVENT_CHANGE,function(){this.isSelected()?e.attr("fill",c.select_color):e.attr("fill",c.normal_color)}),BI.createWidget({type:"bi.default",element:this,items:[this.button]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:d,right:-15,top:0,bottom:0}]})},isSelected:function(){return this.button.isSelected()},setValue:function(a){this.button.setValue(a)},getValue:function(){return this.button.getValue()},populate:function(a){}}),BI.FileManagerNavButton.EVENT_CHANGE="FileManagerNavButton.EVENT_CHANGE",BI.shortcut("bi.file_manager_nav_button",BI.FileManagerNavButton),BI.FileManagerNav=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerNav.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-nav bi-border-left",height:40,items:[]})},_init:function(){BI.FileManagerNav.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=new BI.Tree,this.refreshTreeData(b.items),this.tree.getRoot().set("data",{text:BI.i18nText("BI-Created_By_Me"),value:BI.FileManagerNav.ROOT_CREATE_BY_ME,id:BI.FileManagerNav.ROOT_CREATE_BY_ME}),this.button_group=BI.createWidget({type:"bi.button_group",element:this,items:[{type:"bi.file_manager_nav_button",text:BI.i18nText("BI-Created_By_Me"),selected:!0,id:BI.FileManagerNav.ROOT_CREATE_BY_ME,value:BI.FileManagerNav.ROOT_CREATE_BY_ME}],layouts:[{type:"bi.horizontal"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.FileManagerNav.EVENT_CHANGE,arguments)})},_getAllParents:function(a){var b,c=[];for(b=a?this.tree.search(a):this.tree.getRoot();b.parent;)c.push(b),b=b.parent;return c.push(b),c.reverse()},_formatNodes:function(a){var b=[];return BI.each(a,function(a,c){b.push(BI.extend({type:"bi.file_manager_nav_button",id:c.id},c.get("data")))}),BI.last(b).selected=!0,b},getValue:function(){return this.button_group.getValue()},getId:function(){var a=[];return BI.each(this.button_group.getSelectedButtons(),function(b,c){a.push(c.attr("id"))}),a},refreshTreeData:function(a){this.tree.initTree(BI.Tree.transformToTreeFormat(a)),this.tree.getRoot().set("data",{text:BI.i18nText("BI-Created_By_Me"),value:BI.FileManagerNav.ROOT_CREATE_BY_ME,id:BI.FileManagerNav.ROOT_CREATE_BY_ME})},populate:function(a){var b=BI.isNull(a)?[this.tree.getRoot()]:this._getAllParents(a.id);this.button_group.populate(this._formatNodes(b))}}),BI.extend(BI.FileManagerNav,{ROOT_CREATE_BY_ME:"-1"}),BI.FileManagerNav.EVENT_CHANGE="FileManagerNav.EVENT_CHANGE",BI.shortcut("bi.file_manager_nav",BI.FileManagerNav),BI.AbstractFilterItem=BI.inherit(BI.Widget,{props:{baseCls:"bi-filter-item bi-border-right bi-border-bottom"},isSelectedCondition:function(){return this.emptyItem&&this.emptyItem.isVisible()},setSelectedCondition:function(a){a&&(this.emptyItem||(this.emptyItem=BI.createWidget({type:"bi.absolute",height:40,cls:"filter-item-empty-item bi-border-top",items:[{el:{type:"bi.center_adapt",cls:"empty-filter-item-leaf"}}],hgap:10,vgap:5}),BI.createWidget({type:"bi.vertical",element:this,items:[this.emptyItem],scrolly:!1}))),this.emptyItem&&this.emptyItem.setVisible(a)}}),BI.extend(BI.AbstractFilterItem,{FILTER_OPERATION_FORMULA:1,FILTER_OPERATION_CONDITION:2,FILTER_OPERATION_CONDITION_AND:3,FILTER_OPERATION_CONDITION_OR:4,FILTER_OPERATION_FORMULA_AND:5,FILTER_OPERATION_FORMULA_OR:6}),!function(){var a=BI.inherit(BI.Widget,{props:{baseCls:"bi-filter-expander",el:{},popup:{}},render:function(){var a=this,b=this.options;return{type:"bi.filter_expander",el:b.el,popup:b.popup,id:b.id,value:b.value,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}],ref:function(b){a.expander=b}}},populate:function(){this.expander.populate.apply(this.expander,arguments)},getValue:function(){var a=this.expander.getValue();return{filterType:a.type,filterValue:a.value,id:a.id}}});BI.shortcut("bi.and.or.filter.expander",a)}(),!function(){var a=BI.inherit(BI.AbstractFilterItem,{_constant:{EXPANDER_WIDTH:20},props:{baseCls:"bi-filter-item bi-filter-expander",el:{},popup:{}},render:function(){var a=this,b=this.options,c=b.value,d="";return d=c===BI.Filter.FILTER_TYPE.AND?BI.i18nText("BI-Basic_And"):BI.i18nText("BI-Basic_Or"),{type:"bi.horizontal_adapt",cls:"filter-item-empty-item",verticalAlign:BI.VerticalAlign.Middle,items:[{type:"bi.text_button",cls:"condition-and-or",text:d,value:c,id:b.id,width:this._constant.EXPANDER_WIDTH,height:"100%",ref:function(b){a.expander=b},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,"",a)}}]},BI.extend(b.popup,{ref:function(b){a.conditionsView=b},listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]})]}},getValue:function(){return{type:this.expander.getValue(),value:this.conditionsView.getValue(),id:this.options.id}},populate:function(){this.conditionsView.populate.apply(this.conditionsView,arguments)}});BI.shortcut("bi.filter_expander",a)}(),!function(){BI.constant("bi.constant.component.filter",{FORMULA_COMBO:[{text:BI.i18nText("BI-Conf_Formula_And"),value:BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_AND},{text:BI.i18nText("BI-Conf_Formula_Or"),value:BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_OR}],CONDITION_COMBO:[{text:BI.i18nText("BI-Conf_Condition_And"),value:BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_AND},{text:BI.i18nText("BI-Conf_Condition_Or"),value:BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_OR}]})}(),BI.Filter=BI.inherit(BI.Widget,{constants:{FIELD_TYPE_NUMBER:1,FIELD_TYPE_STRING:0,FIELD_TYPE_DATE:2},props:{baseCls:"bi-filter",expander:{},items:[],el:{},itemCreator:BI.empty},render:function(){var a=this,b=this.options;return BI.extend({type:"bi.filter_operation",expander:b.expander,listeners:[{eventName:"EVENT_OPERATION",action:function(b){switch(b){case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION:case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_AND:a._addAndOrCondition(BI.Filter.FILTER_TYPE.EMPTY_CONDITION);break;case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_OR:a._addAndOrCondition(BI.Filter.FILTER_TYPE.EMPTY_CONDITION,1);break;case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA:case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_AND:a._addAndOrCondition(BI.Filter.FILTER_TYPE.EMPTY_FORMULA);break;case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_OR:a._addAndOrCondition(BI.Filter.FILTER_TYPE.EMPTY_FORMULA,1)}}},{eventName:"BI.FilterOperation.EVENT_DESTROY_ITEM",action:function(b){a._removeCondition(b)}}],ref:function(b){a.filter=b}},b.el)},mounted:function(){this.tree=new BI.Tree,this.tree.initTree(this.options.items),this._populate(this.tree.toJSONWithNode())},_createEmptyNode:function(a){var b=new BI.Node(BI.UUID());return b.set("data",{value:a}),b},_insertAndOrCondition:function(a,b,c){var d=["AND","OR"];c||(c=0);var e=this.tree.search(a);if(BI.isNotNull(e)){var f=e.get("data"),g=e.getParent(),h=g.getChildIndex(e.id),i=g.get("data")||{},j=this._createEmptyNode(b);if(f.value===BI.Filter.FILTER_TYPE[d[c]])return void this.tree.addNode(e,j);if(f.value===BI.Filter.FILTER_TYPE[d[1-c]]&&i.value===BI.Filter.FILTER_TYPE[d[c]])return void g.addChild(j,h+1);if(f.value===BI.Filter.FILTER_TYPE[d[1-c]]&&i.value!==BI.Filter.FILTER_TYPE[d[c]]||i.value===BI.Filter.FILTER_TYPE[d[1-c]]||i.value!==BI.Filter.FILTER_TYPE.AND&&i.value!==BI.Filter.FILTER_TYPE.OR){var k=new BI.Node(BI.UUID());return k.set("data",{value:BI.Filter.FILTER_TYPE[d[c]],children:[e.get("data"),j.get("data")]}),g.removeChildByIndex(h),g.addChild(k,h),k.addChild(e),void k.addChild(j)}g.addChild(j,h+1)}},_removeCondition:function(a){var b=this.tree.search(a);if(BI.isNotNull(b)){var c=b.getParent();if(c.removeChild(a),c.getChildrenLength()<=1){var d=c.getParent();if(BI.isNotNull(d)){var e=d.getChildIndex(c.id);d.removeChildByIndex(e),1===c.getChildrenLength()&&d.addChild(c.getFirstChild(),e)}}this._populate(this.tree.toJSONWithNode()),this.fireEvent("EVENT_CHANGE")}},_addAndOrCondition:function(a,b){var c=["AND","OR"];b||(b=0);var d=this.filter.getCurrentSelectItem();if(BI.isNotNull(d)){var e=d.attr("id");this._insertAndOrCondition(e,a,b)}else{var f=this._createEmptyNode(a),g=this.tree.getRoot(),h=g.getLastChild();if(BI.isNotNull(h)){var i=h.get("data");if(i.value===BI.Filter.FILTER_TYPE[c[b]])this.tree.addNode(h,f);else{var j=new BI.Node(BI.UUID());j.set("data",{value:BI.Filter.FILTER_TYPE[c[b]],children:[h.get("data"),f.get("data")]}),g.removeChild(h.id),this.tree.addNode(j),this.tree.addNode(j,h),this.tree.addNode(j,f)}}else this.tree.addNode(f)}this._populate(this.tree.toJSONWithNode()),this.fireEvent("EVENT_CHANGE")},_populate:function(a){this.filter.defaultState();var b=this.options;b.items=a,BI.Tree.traversal(a,function(a,c){b.itemCreator(c)}),this.filter.populate.apply(this.filter,[a])},populate:function(a){this.tree.initTree(a),this._populate(this.tree.toJSONWithNode())},getValue:function(){return this.filter.getValue()}}),BI.shortcut("bi.filter",BI.Filter),BI.Filter.FILTER_TYPE={},BI.Filter.FILTER_TYPE.FORMULA=33,BI.Filter.FILTER_TYPE.AND=34,BI.Filter.FILTER_TYPE.OR=35,BI.Filter.FILTER_TYPE.EMPTY_FORMULA=36,BI.Filter.FILTER_TYPE.EMPTY_CONDITION=37,!function(){var a=BI.inherit(BI.ButtonTree,{props:{baseCls:"bi-button-map"},_createBtns:function(a){var b=this.options,c=BI.createWidgets(BI.createItems(a,{type:"bi.text_button",once:0===b.chooseType})),d=BI.map(a,function(a,b){if(b=BI.stripEL(b),!b.id&&!b.value)throw new Error("item must have 'id' or 'value' as its property");return b.id||b.value});return BI.zipObject(d,c)},setValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setSelected)?void(a.contains(b)?c.setSelected&&c.setSelected(!0):c.setSelected&&c.setSelected(!1)):void c.setValue(a)})},setNotSelectedValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setSelected)?void(a.contains(b)?c.setSelected&&c.setSelected(!1):c.setSelected&&c.setSelected(!0)):void c.setNotSelectedValue(a)})},populate:function(a){var b=this,c=[].slice.call(arguments),d=new BI.LinkHashMap,e=function(a){return a.id||a.value};this.buttons||(this.buttons={});var f=[];BI.each(a,function(a,d){if(d=BI.stripEL(d),b.buttons[e(d)]){var g=b.buttons[e(d)];c[0]=d.items,c[2]=d,g.populate&&g.populate.apply(g,c)}else f.push(d)}),c[0]=f;var g=this._btnsCreator.apply(this,c),h=[];BI.each(a,function(a,c){c=BI.stripEL(c);var f=b.buttons[e(c)]||g[e(c)];d.add(e(c),f),h.push(f)}),this.buttons=d.map,BI.DOM.hang(this.buttons),this.element.empty();var i=this._packageItems(a,this._packageBtns(h));BI.createWidget(BI.extend({element:this},this._packageLayout(i)))},getIndexByValue:function(){throw new Error("Can not use getIndexByValue")}});BI.shortcut("bi.filter_list",a)}(),!function(){var a=0,b=1,c=BI.inherit(BI.Widget,{props:{baseCls:"bi-filter-operation",expander:{},items:[],selections:[BI.AbstractFilterItem.FILTER_OPERATION_CONDITION,BI.AbstractFilterItem.FILTER_OPERATION_FORMULA],itemsCreator:BI.emptyFn},render:function(){var c=this,d=this.options;return this.currentSelected=null,{type:"bi.vtape",items:[{el:{type:"bi.tab",showIndex:a,cardCreator:BI.bind(this._createTabs,this),ref:function(a){c.buttonComboTab=a}},height:40},{el:{type:"bi.absolute",scrollable:!0,items:[{el:{type:"bi.left",items:[{type:"bi.filter_pane",expander:d.expander,items:d.items,itemsCreator:d.itemsCreator,listeners:[{eventName:"EVENT_CHANGE",action:function(d,e,f){d===BI.Events.CLICK&&(BI.isNotNull(c.currentSelected)&&c.currentSelected===f?f.setSelectedCondition(!f.isSelectedCondition()):(BI.isNotNull(c.currentSelected)&&c.currentSelected.setSelectedCondition(!1),c.currentSelected=f,f.setSelectedCondition(!0)),c.currentSelected.isSelectedCondition()?c.buttonComboTab.setSelect(b):c.buttonComboTab.setSelect(a)),d===BI.Events.DESTROY&&(c.currentSelected===f&&(c.currentSelected=null,c.buttonComboTab.setSelect(a)),c.fireEvent("BI.FilterOperation.EVENT_DESTROY_ITEM",e,f))}}],ref:function(a){c.filter=a}}]},top:0,right:2,bottom:0,left:0}]}}]}},_createTabs:function(c){var d=this;switch(c){case a:return{type:"bi.button_group",items:BI.createItems(d._createButtons(),{type:"bi.icon_text_item",height:30,width:100}),chooseType:BI.ButtonGroup.CHOOSE_TYPE_DEFAULT,layouts:[{type:"bi.left",vgap:5}],listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(a,b){BI.isEmptyArray(d.filter.getValue())&&d.filter.element.addClass("bi-border-top bi-border-left"),d.fireEvent("EVENT_OPERATION",b.getValue()),d.defaultState()}}]};case b:return{type:"bi.button_group",chooseType:BI.ButtonGroup.CHOOSE_TYPE_DEFAULT,items:d._buildOperationButton(),layouts:[{type:"bi.left",vgap:5}]}}},_createButtons:function(){var a=[];return BI.each(this.options.selections,function(b,c){switch(c){case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA:a.push({text:BI.i18nText("BI-Conf_Add_Formula"),value:BI.AbstractFilterItem.FILTER_OPERATION_FORMULA,cls:"operation-trigger filter-formula-font"});break;case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION:a.push({text:BI.i18nText("BI-Conf_Add_Condition"),value:BI.AbstractFilterItem.FILTER_OPERATION_CONDITION,cls:"operation-trigger filter-condition-font"})}}),a},_buildOperationButton:function(){var a=this,b=[];return BI.each(this.options.selections,function(c,d){var e="",f="",g=[];switch(d){case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA:e=BI.i18nText("BI-Conf_Add_Formula"),f="filter-formula-font",g=BI.Constants.getConstant("bi.constant.component.filter").FORMULA_COMBO;break;case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION:default:e=BI.i18nText("BI-Conf_Add_Condition"),f="filter-condition-font",g=BI.Constants.getConstant("bi.constant.component.filter").CONDITION_COMBO}var h=BI.createWidget({type:"bi.icon_text_item",cls:"operation-trigger "+f,text:e,height:30,width:100});b.push({type:"bi.combo",el:h,popup:{el:{type:"bi.button_group",chooseType:BI.ButtonGroup.CHOOSE_TYPE_NONE,items:BI.createItems(g,{type:"bi.single_select_item",height:25}),layouts:[{type:"bi.vertical"}]}},listeners:[{eventName:BI.Combo.EVENT_CHANGE,action:function(b,c){switch(BI.isEmptyArray(a.filter.getValue())&&a.filter.element.addClass("bi-border-top bi-border-left"),b){case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_AND:case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_OR:h.setText(BI.i18nText("BI-Conf_Add_Condition"));break;case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_AND:case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_OR:h.setText(BI.i18nText("BI-Conf_Add_Formula"));break;default:h.setText()}a.fireEvent("EVENT_OPERATION",c.getValue()),a.defaultState(),this.hideView()}}]})}),b},defaultState:function(){BI.isNotNull(this.currentSelected)&&this.currentSelected.setSelectedCondition(!1),this.buttonComboTab.setSelect(a)},getCurrentSelectItem:function(){if(BI.isNotNull(this.currentSelected)&&this.currentSelected.isSelectedCondition())return this.currentSelected},populate:function(a){this.filter.populate.apply(this.filter,arguments)},getValue:function(){return this.filter.getValue()}});BI.shortcut("bi.filter_operation",c)}(),!function(){var a=BI.inherit(BI.Widget,{props:{baseCls:"bi-filter-pane",expander:{},items:[],itemsCreator:BI.emptyFn},render:function(){var a=this,b=this.options;return{type:"bi.custom_tree",cls:BI.isNotEmptyArray(b.items)?"bi-border-top bi-border-left":"",expander:BI.extend({type:"bi.filter_expander",el:{},popup:{type:"bi.custom_tree"}},b.expander),el:{type:"bi.filter_list",chooseType:BI.ButtonGroup.CHOOSE_TYPE_DEFAULT,layouts:[{type:"bi.vertical",scrolly:!1}]},items:b.items,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(){a.fireEvent("EVENT_CHANGE",arguments)}}],ref:function(b){a.tree=b}}},populate:function(a){BI.isNotEmptyArray(a)?this.element.addClass("bi-border-top bi-border-left"):this.element.removeClass("bi-border-top bi-border-left"),this.tree.populate.apply(this.tree,arguments)},getValue:function(){return this.tree.getValue()}});BI.shortcut("bi.filter_pane",a)}(),BI.IntervalSlider=BI.inherit(BI.Widget,{_constant:{EDITOR_WIDTH:58,EDITOR_R_GAP:60,EDITOR_HEIGHT:30,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},_defaultConfig:function(){return BI.extend(BI.IntervalSlider.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-interval-slider bi-slider-track",digit:!1,unit:""})},_init:function(){BI.IntervalSlider.superclass._init.apply(this,arguments);var a=this,b=this._constant;this.enable=!1,this.valueOne="",this.valueTwo="",this.calculation=new BI.AccurateCalculationModel,this.grayTrack=BI.createWidget({type:"bi.layout",cls:"gray-track",height:6}),this.blueTrack=BI.createWidget({type:"bi.layout",cls:"blue-track bi-high-light-background",height:6}),this.track=this._createTrackWrapper(),this.labelOne=BI.createWidget({type:"bi.sign_text_editor",cls:"slider-editor-button",text:this.options.unit,errorText:"",allowBlank:!1,width:b.EDITOR_WIDTH,validationChecker:function(b){return a._checkValidation(b)}}),this.labelOne.element.hover(function(){a.labelOne.element.removeClass("bi-border").addClass("bi-border")},function(){a.labelOne.element.removeClass("bi-border")}),this.labelOne.on(BI.Editor.EVENT_CONFIRM,function(){var b=BI.parseFloat(this.getValue());a.valueOne=b;var c=a._getPercentByValue(b),d=BI.parseFloat(c.toFixed(1));a._setLabelOnePosition(d),a._setSliderOnePosition(d),a._setBlueTrack(),a.fireEvent(BI.IntervalSlider.EVENT_CHANGE)}),this.labelTwo=BI.createWidget({type:"bi.sign_text_editor",cls:"slider-editor-button",errorText:"",text:this.options.unit,allowBlank:!1,width:b.EDITOR_WIDTH,validationChecker:function(b){return a._checkValidation(b)}}),this.labelTwo.element.hover(function(){a.labelTwo.element.removeClass("bi-border").addClass("bi-border")},function(){a.labelTwo.element.removeClass("bi-border")}),this.labelTwo.on(BI.Editor.EVENT_CONFIRM,function(){var b=BI.parseFloat(this.getValue());a.valueTwo=b;var c=a._getPercentByValue(b),d=BI.parseFloat(c.toFixed(1));a._setLabelTwoPosition(d),a._setSliderTwoPosition(d),a._setBlueTrack(),a.fireEvent(BI.IntervalSlider.EVENT_CHANGE)}),this.sliderOne=BI.createWidget({type:"bi.single_slider_button"}),this.sliderTwo=BI.createWidget({type:"bi.single_slider_button"}),this._draggable(this.sliderOne,!0),this._draggable(this.sliderTwo,!1),this._setVisible(!1),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.track,width:"100%",height:b.TRACK_HEIGHT}]}],hgap:7,height:b.TRACK_HEIGHT},top:23,left:0,width:"100%"},this._createLabelWrapper(),this._createSliderWrapper()]})},_rePosBySizeAfterMove:function(a,b){var c=this.options,d=100*a/this._getGrayTrackLength(),e=BI.parseFloat(d.toFixed(1)),f=this._getValueByPercent(e);f=this._assertValue(f),f=c.digit===!1?f:f.toFixed(c.digit),b?(this._setLabelOnePosition(e),this._setSliderOnePosition(e),this.labelOne.setValue(f),this.valueOne=f):(this._setLabelTwoPosition(e),this._setSliderTwoPosition(e),this.labelTwo.setValue(f),this.valueTwo=f),this._setBlueTrack()},_rePosBySizeAfterStop:function(a,b){var c=100*a/this._getGrayTrackLength(),d=BI.parseFloat(c.toFixed(1));b?this._setSliderOnePosition(d):this._setSliderTwoPosition(d)},_draggable:function(a,b){function c(a){return BI.clamp(a,0,d._getGrayTrackLength())}var d=this,e=(this.options,!1),f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){i.isDragging()&&(e=!0,g+=j,f=c(h+g),a.element.addClass("dragging"),d._rePosBySizeAfterMove(f,b))},function(){e===!0&&(f=c(f),d._rePosBySizeAfterStop(f,b),f=0,g=0,h=f,e=!1),a.element.removeClass("dragging"),i.releaseMouseMoves(),d.fireEvent(BI.IntervalSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(b){a.isEnabled()&&(h=this.offsetLeft,c(h),i.captureMouseMoves(b))})},_createLabelWrapper:function(){var a=this._constant;return{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.labelOne,top:0,left:"0%"}]},{type:"bi.absolute",items:[{el:this.labelTwo,top:0,left:"100%"}]}],rgap:a.EDITOR_R_GAP,height:70},top:0,left:0,width:"100%"}},_createSliderWrapper:function(){var a=this._constant;return{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.sliderOne,top:0,left:"0%"}]},{type:"bi.absolute",items:[{el:this.sliderTwo,top:0,left:"100%"}]}],hgap:a.SLIDER_WIDTH_HALF,height:a.SLIDER_HEIGHT},top:20,left:0,width:"100%"}},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){var b=this.options,c=!1,d=(a+"").split(".")[1];return BI.isEmptyString(d)||BI.isNumeric(a)&&!(BI.isNull(a)||athis.max)&&(b.digit===!1?c=!0:(d=d||"",c=d.length===b.digit)),c},_checkOverlap:function(){var a=this.labelOne.element[0].offsetLeft,b=this.labelTwo.element[0].offsetLeft;a<=b?b-a<90?this.labelTwo.element.css({top:40}):this.labelTwo.element.css({top:0}):a-b<90?this.labelTwo.element.css({top:40}):this.labelTwo.element.css({top:0})},_setLabelOnePosition:function(a){this.labelOne.element.css({left:a+"%"}),this._checkOverlap()},_setLabelTwoPosition:function(a){this.labelTwo.element.css({left:a+"%"}),this._checkOverlap()},_setSliderOnePosition:function(a){this.sliderOne.element.css({left:a+"%"})},_setSliderTwoPosition:function(a){this.sliderTwo.element.css({left:a+"%"})},_setBlueTrackLeft:function(a){this.blueTrack.element.css({left:a+"%"})},_setBlueTrackWidth:function(a){this.blueTrack.element.css({width:a+"%"})},_setBlueTrack:function(){var a=this._getPercentByValue(this.labelOne.getValue()),b=this._getPercentByValue(this.labelTwo.getValue());a<=b?(this._setBlueTrackLeft(a),this._setBlueTrackWidth(b-a)):(this._setBlueTrackLeft(b),this._setBlueTrackWidth(a-b))},_setAllPosition:function(a,b){this._setSliderOnePosition(a),this._setLabelOnePosition(a),this._setSliderTwoPosition(b),this._setLabelTwoPosition(b),this._setBlueTrack()},_setVisible:function(a){this.sliderOne.setVisible(a),this.sliderTwo.setVisible(a),this.labelOne.setVisible(a),this.labelTwo.setVisible(a)},_setErrorText:function(){var a=BI.i18nText("BI-Please_Enter")+this.min+"-"+this.max+BI.i18nText("BI-Basic_De")+BI.i18nText("BI-Basic_Number");this.labelOne.setErrorText(a),this.labelTwo.setErrorText(a)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(a){var b=this.calculation.accurateSubtraction(this.max,this.min),c=this.calculation.accurateMultiplication(b,a),d=this.calculation.accurateDivisionTenExponent(c,2);if(this.precision<0){var e=BI.parseFloat(this.calculation.accurateAddition(d,this.min)),f=Math.round(this.calculation.accurateDivisionTenExponent(e,-this.precision));return this.calculation.accurateMultiplication(f,Math.pow(10,-this.precision))}return BI.parseFloat(this.calculation.accurateAddition(d,this.min).toFixed(this.precision))},_getPercentByValue:function(a){return 100*(a-this.min)/(this.max-this.min)},_setDraggableEnable:function(a){this.sliderOne.setEnable(a),this.sliderTwo.setEnable(a)},_getPrecision:function(){var a=this.calculation.accurateSubtraction(this.max,this.min),b=a.toPrecision(4),c=b.indexOf("e"),d=[];if(c>-1){d=b.split("e");var e=BI.size(d[0].split(".")[1]),f=BI.parseInt(d[1].substring(1));return e-f}return d=b.split("."),d.length>1?d[1].length:0},_assertValue:function(a){return a<=this.min?this.min:a>=this.max?this.max:a},getValue:function(){return this.valueOne<=this.valueTwo?{min:this.valueOne,max:this.valueTwo}:{min:this.valueTwo,max:this.valueOne}},setMinAndMax:function(a){var b=BI.parseFloat(a.min),c=BI.parseFloat(a.max);!isNaN(b)&&!isNaN(c)&&c>=b&&(this.min=b,this.max=c,this.valueOne=b,this.valueTwo=c,this.precision=this._getPrecision(),this._setDraggableEnable(!0)),c===b&&this._setDraggableEnable(!1)},setValue:function(a){var b=this.options,c=BI.parseFloat(a.min),d=BI.parseFloat(a.max);c=b.digit===!1?c:c.toFixed(b.digit),d=b.digit===!1?d:d.toFixed(b.digit),isNaN(c)||isNaN(d)||(this._checkValidation(c)&&(this.valueOne=c),this._checkValidation(d)&&(this.valueTwo=d),cthis.max&&(this.valueTwo=this.max))},reset:function(){this._setVisible(!1),this.enable=!1,this.valueOne="",this.valueTwo="",this.min=NaN,this.max=NaN,this._setBlueTrackWidth(0)},populate:function(){isNaN(this.min)||isNaN(this.max)||(this.enable=!0,this._setVisible(!0),this._setErrorText(),(BI.isNumeric(this.valueOne)||BI.isNotEmptyString(this.valueOne))&&(BI.isNumeric(this.valueTwo)||BI.isNotEmptyString(this.valueTwo))?(this.labelOne.setValue(this.valueOne),this.labelTwo.setValue(this.valueTwo),this._setAllPosition(this._getPercentByValue(this.valueOne),this._getPercentByValue(this.valueTwo))):(this.labelOne.setValue(this.min),this.labelTwo.setValue(this.max),this._setAllPosition(0,100)))}}),BI.IntervalSlider.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.interval_slider",BI.IntervalSlider),BI.AccurateCalculationModel=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.AccurateCalculationModel.superclass._defaultConfig.apply(this,arguments),{baseCls:""})},_init:function(){BI.AccurateCalculationModel.superclass._init.apply(this,arguments)},_getMagnitude:function(a){for(var b="1",c=0;c0)var d=b;else{var d=a;c=0-c}for(var e=0;e=b.numDecimal.length?a.numDecimal.length:b.numDecimal.length}function d(a,b){for(var c=b-a.length,d=0;d=BI.parseInt(f.numDecimal))var i=(BI.parseInt(e.numDecimal)-BI.parseInt(f.numDecimal)).toString(),j=d(i,h);else{g--;var k=this._getMagnitude(h),i=(k+BI.parseInt(e.numDecimal)-BI.parseInt(f.numDecimal)).toString(),j=d(i,h)}var l=g+"."+j;return BI.parseFloat(l)},_accurateAddition:function(a,b){function c(a,b){for(var c=b-a.length,d=0;db)var e=d.numInteger.slice(0,d.numInteger.length-b),f=d.numInteger.slice(-b);else var e="0",f=c(d.numInteger,b);var g=e+"."+f+d.numDecimal;return BI.parseFloat(g)},accurateSubtraction:function(a,b){return a>=0&&b>=0?a>=b?this._accurateSubtraction(a,b):-this._accurateSubtraction(b,a):a>=0&&b<0?this._accurateAddition(a,-b):a<0&&b>=0?-this._accurateAddition(-a,b):a<0&&b<0?a>=b?this._accurateSubtraction(-b,-a):this._accurateSubtraction(-a,-b):void 0},accurateAddition:function(a,b){return a>=0&&b>=0?this._accurateAddition(a,b):a>=0&&b<0?this.accurateSubtraction(a,-b):a<0&&b>=0?this.accurateSubtraction(b,-a):a<0&&b<0?-this._accurateAddition(-a,-b):void 0},accurateMultiplication:function(a,b){return a>=0&&b>=0?this._accurateMultiplication(a,b):a>=0&&b<0?-this._accurateMultiplication(a,-b):a<0&&b>=0?-this._accurateMultiplication(-a,b):a<0&&b<0?this._accurateMultiplication(-a,-b):void 0},accurateDivisionTenExponent:function(a,b){return a>=0?this._accurateDivisionTenExponent(a,b):-this._accurateDivisionTenExponent(-a,b)}}),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",value:b.value}),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,value:b.value}),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 BI.isNull(this.popup)?this.options.value||"":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=[1,7,2,8,3,9,4,10,5,11,6,12],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}})}),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}],value:b.value}),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.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.MonthTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Month"),baseCls:"bi-trigger-month-text",width:b.height},width:b.height},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]}),this.setValue(b.value)},setValue:function(a){return BI.isNotNull(a)?(this.editor.setState(a+1),this.editor.setValue(a+1),void this.editor.setTitle(a+1)):(this.editor.setState(""),this.editor.setValue(""),void this.editor.setTitle(""))},getKey:function(){return 0|this.editor.getValue()},getValue:function(){return this.editor.getValue()-1}}),BI.MonthTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.MonthTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.MonthTrigger.EVENT_START="EVENT_START",BI.MonthTrigger.EVENT_STOP="EVENT_STOP",BI.MonthTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_trigger",BI.MonthTrigger),BI.DownListCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-down-list-combo",height:24,items:[],adjustLength:0,direction:"bottom",trigger:"click",container:null,stopPropagation:!1,el:{}})},_init:function(){BI.DownListCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popupview=BI.createWidget({type:"bi.multi_layer_down_list_popup",items:b.items,chooseType:b.chooseType,value:b.value}),this.popupview.on(BI.DownListPopup.EVENT_CHANGE,function(b){a.fireEvent(BI.DownListCombo.EVENT_CHANGE,b),a.downlistcombo.hideView()}),this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,function(b,c){a.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,b,c),a.downlistcombo.hideView()}),this.downlistcombo=BI.createWidget({element:this,type:"bi.combo",trigger:b.trigger,isNeedAdjustWidth:!1,container:b.container,adjustLength:b.adjustLength,direction:b.direction,stopPropagation:b.stopPropagation,el:BI.createWidget(b.el,{type:"bi.icon_trigger",extraCls:b.iconCls?b.iconCls:"pull-down-font",width:b.width,height:b.height}),popup:{el:this.popupview,stopPropagation:!0,maxHeight:1e3}}),this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW)})},hideView:function(){this.downlistcombo.hideView()},showView:function(){this.downlistcombo.showView()},populate:function(a){this.popupview.populate(a)},setValue:function(a){this.popupview.setValue(a)},getValue:function(){return this.popupview.getValue()}}),BI.DownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DownListCombo.EVENT_SON_VALUE_CHANGE="EVENT_SON_VALUE_CHANGE",BI.DownListCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_layer_down_list_combo",BI.DownListCombo),BI.MultiLayerDownListPopup=BI.inherit(BI.Pane,{constants:{nextIcon:"pull-right-e-font",height:25,iconHeight:12,iconWidth:12,hgap:0,vgap:0,border:1},_defaultConfig:function(){var a=BI.MultiLayerDownListPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-down-list-popup",items:[],chooseType:BI.Selection.Multi})},_init:function(){BI.MultiLayerDownListPopup.superclass._init.apply(this,arguments),this.singleValues=[],this.childValueMap={},this.fatherValueMap={};var a=this,b=this.options,c=this._createPopupItems(b.items);this.popup=BI.createWidget({type:"bi.button_tree",items:BI.createItems(c,{},{adjustLength:-2}),layouts:[{type:"bi.vertical",hgap:this.constants.hgap,vgap:this.constants.vgap}],value:this._digest(b.value),chooseType:b.chooseType}),this.popup.on(BI.ButtonTree.EVENT_CHANGE,function(b,c){var d=b;if(BI.isNotNull(a.childValueMap[b])){d=a.childValueMap[b];var e=a.fatherValueMap[b],f=(e+"").split("_");a.fireEvent(BI.MultiLayerDownListPopup.EVENT_SON_VALUE_CHANGE,d,f.length>1?f:e)}else a.fireEvent(BI.MultiLayerDownListPopup.EVENT_CHANGE,d,c);if(!a.singleValues.contains(d)){var g=a.getValue(),h=[];BI.each(g,function(a,b){b.value!=d&&h.push(b)}),a.setValue(h)}}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup]})},_createPopupItems:function(a){var b=this,c=[];return BI.each(a,function(d,e){var f={type:"bi.down_list_group",items:[]};if(BI.each(e,function(a,c){BI.isNotEmptyArray(c.children)&&!BI.isEmpty(c.el)?(c.type="bi.combo_group",c.cls="down-list-group",c.trigger="hover",c.isNeedAdjustWidth=!1,c.el.title=c.el.title||c.el.text,c.el.type="bi.down_list_group_item",c.el.logic={dynamic:!0},c.el.height=b.constants.height,c.el.iconCls2=b.constants.nextIcon,c.popup={lgap:4,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}},c.el.childValues=[],BI.each(c.children,function(a,d){d=d.el?BI.extend(d.el,{children:d.children}):d;var e=BI.deepClone(c.el.value),f=BI.deepClone(d.value);b.singleValues.push(d.value),d.type="bi.down_list_item",d.extraCls=" child-down-list-item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),c.el.childValues.push(d.value),BI.isNotEmptyArray(d.children)&&(d.type="bi.down_list_group_item",b._createChildren(d),d.height=b.constants.height,d.iconCls2=b.constants.nextIcon,c.el.childValues=BI.concat(c.el.childValues,d.childValues))})):(c.type="bi.down_list_item",c.title=c.title||c.text,c.textRgap=10,c.isNeedAdjustWidth=!1,c.logic={dynamic:!0});var d={};d.el=c,f.items.push(d)}),b._isGroup(f.items)&&BI.each(f.items,function(a,c){b.singleValues.push(c.el.value)}),c.push(f),b._needSpliter(d,a.length)){var g=BI.createWidget({type:"bi.vertical",items:[{el:{type:"bi.layout",cls:"bi-down-list-spliter bi-border-top cursor-pointer",height:0}}],cls:"bi-down-list-spliter-container cursor-pointer",lgap:10,rgap:10});c.push(g)}}),c},_createChildren:function(a){var b=this;a.childValues=[],BI.each(a.children,function(c,d){var e=BI.deepClone(a.value),f=BI.deepClone(d.value);d.type="bi.down_list_item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),a.childValues.push(d.value)})},_isGroup:function(a){return a.length>1},_needSpliter:function(a,b){return a1?g:f}else e.value=d;b.push(e)}),b}}),BI.MultiLayerDownListPopup.EVENT_CHANGE="EVENT_CHANGE",BI.MultiLayerDownListPopup.EVENT_SON_VALUE_CHANGE="EVENT_SON_VALUE_CHANGE",BI.shortcut("bi.multi_layer_down_list_popup",BI.MultiLayerDownListPopup),BI.MultiLayerSelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer_select_tree-combo",isDefaultInit:!1,height:30,text:"",items:[],value:""})},_init:function(){BI.MultiLayerSelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value}),this.popup=BI.createWidget({type:"bi.multilayer_select_tree_popup",isDefaultInit:b.isDefaultInit,items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.MultiLayerSelectTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_CHANGE)})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.MultiLayerSelectTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_combo",BI.MultiLayerSelectTreeCombo),BI.MultiLayerSelectLevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-select-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn,value:""})},_init:function(){BI.MultiLayerSelectLevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={};if(e.layer=b,BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.multilayer_select_tree_first_plus_group_node";break;case a.length-1: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",cls:"tree-view display-inline",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,value:c.value,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)}),BI.createWidget({type:"bi.adaptive",element:this,scrollable:!0,items:[this.tree]})},populate:function(a){this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},setValue:function(a){this.tree.setValue(a)},getValue:function(){return BI.uniq(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:[],value:""})},_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,value:b.value,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:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_first_plus_group_node",BI.MultiLayerSelectTreeFirstPlusGroupNode),BI.MultiLayerSelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-last-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_last_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id: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]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_last_plus_group_node",BI.MultiLayerSelectTreeLastPlusGroupNode),BI.MultiLayerSelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-mid-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_mid_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id: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]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_mid_plus_group_node",BI.MultiLayerSelectTreeMidPlusGroupNode),BI.MultiLayerSingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-singletree-combo",isDefaultInit:!1,height:30,text:"",itemsCreator:BI.emptyFn,items:[],value:""})},_init:function(){BI.MultiLayerSingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value}),this.popup=BI.createWidget({type:"bi.multilayer_single_tree_popup",isDefaultInit:b.isDefaultInit,items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.MultiLayerSingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_CHANGE)})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.MultiLayerSingleTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_combo",BI.MultiLayerSingleTreeCombo),BI.MultiLayerSingleLevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-single-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn})},_init:function(){BI.MultiLayerSingleLevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={};if(e.layer=b,BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.multilayer_single_tree_first_plus_group_node";break;case a.length-1:f.type="bi.multilayer_single_tree_last_plus_group_node";break;default:f.type="bi.multilayer_single_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",cls:"tree-view display-inline",expander:{isDefaultInit:c.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),value:c.value,itemsCreator:function(a,b){c.itemsCreator(a,function(a){b(BI.Tree.transformToTreeFormat(a),0)})},el:{type:"bi.button_tree",chooseType:BI.Selection.Single,layouts:[{type:"bi.vertical"}]}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,c)}),BI.createWidget({type:"bi.adaptive",element:this,scrollable:!0,items:[this.tree]})},populate:function(a){this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},setValue:function(a){this.tree.setValue(a)},getValue:function(){return BI.filter(BI.uniq(this.tree.getValue()),function(a,b){return BI.isNotNull(b)})},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.MultiLayerSingleLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_level_tree",BI.MultiLayerSingleLevelTree),BI.MultiLayerSingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-singletree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:b.isDefaultInit,items:b.items,itemsCreator:b.itemsCreator,value:b.value}),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.MultiLayerSingleLevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.MultiLayerSingleTreePopup.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.MultiLayerSingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.MultiLayerSingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_popup",BI.MultiLayerSingleTreePopup),BI.MultiLayerSingleTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-first-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.first_plus_group_node",cls:"bi-list-item-none",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,keyword:b.keyword}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_first_plus_group_node",BI.MultiLayerSingleTreeFirstPlusGroupNode),BI.MultiLayerSingleTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-last-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.last_plus_group_node",cls:"bi-list-item-none",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,keyword:b.keyword}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_last_plus_group_node",BI.MultiLayerSingleTreeLastPlusGroupNode),BI.MultiLayerSingleTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-mid-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.mid_plus_group_node",cls:"bi-list-item-none",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,keyword:b.keyword}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_plus_group_node",BI.MultiLayerSingleTreeMidPlusGroupNode),BI.MultiLayerSingleTreeFirstTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{ +extraCls:"bi-multilayer-single-tree-first-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.first_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_first_tree_leaf_item",BI.MultiLayerSingleTreeFirstTreeLeafItem),BI.MultiLayerSingleTreeLastTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-last-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.last_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_last_tree_leaf_item",BI.MultiLayerSingleTreeLastTreeLeafItem),BI.MultiLayerSingleTreeMidTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-mid-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.mid_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_tree_leaf_item",BI.MultiLayerSingleTreeMidTreeLeafItem),BI.MultiSelectCheckPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-pane bi-background",items:[],itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,onClickContinueSelect:BI.emptyFn})},_init:function(){BI.MultiSelectCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value||{},this.display=BI.createWidget({type:"bi.display_selected_list",items:b.items,itemsCreator:function(c,d){return c=BI.extend(c||{},{selectedValues:a.storeValue.value}),a.storeValue.type===BI.Selection.Multi?void d({items:BI.map(a.storeValue.value,function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d}})}):void b.itemsCreator(c,d)}}),this.continueSelect=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-select-check-selected bi-high-light"}),this.continueSelect.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect()}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:{type:"bi.left",cls:"multi-select-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:this.continueSelect,lgap:this.constants.lgap,tgap:this.constants.tgap}]}},{height:"fill",el:this.display}]})},setValue:function(a){this.storeValue=a||{}},empty:function(){this.display.empty()},populate:function(){this.display.populate.apply(this.display,arguments)}}),BI.shortcut("bi.multi_select_check_pane",BI.MultiSelectCheckPane),BI.DisplaySelectedList=BI.inherit(BI.Pane,{constants:{height:25,lgap:10},_defaultConfig:function(){return BI.extend(BI.DisplaySelectedList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-display-list",itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.DisplaySelectedList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.hasNext=!1,this.button_group=BI.createWidget({type:"bi.list_pane",element:this,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},items:this._createItems(b.items),chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical",lgap:10}]},itemsCreator:function(c,d){b.itemsCreator(c,function(b){a.hasNext=!!b.hasNext,d(a._createItems(b.items))})},hasNext:function(){return a.hasNext}})},_createItems:function(a){return BI.createItems(a,{type:"bi.icon_text_item",cls:"cursor-default check-font display-list-item bi-tips",once:!0,invalid:!0,selected:!0,height:this.constants.height,logic:{dynamic:!0}})},empty:function(){this.button_group.empty()},populate:function(a){0===arguments.length?this.button_group.populate():this.button_group.populate(this._createItems(a))}}),BI.shortcut("bi.display_selected_list",BI.DisplaySelectedList),BI.MultiSelectInsertCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_init:function(){BI.MultiSelectInsertCombo.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)})},value:b.value}),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(){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.storeValue.type===BI.Selection.Multi&&a.storeValue.value.pushDistinct(b),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()})}},value:b.value,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.MultiSelectInsertCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button"});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.MultiSelectInsertCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectInsertCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;b(),a()},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectInsertCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_insert_combo",BI.MultiSelectInsertCombo),BI.MultiSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_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=b.value||{},this._assertValue(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)})},value:this.storeValue}),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()})}},value:b.value,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"});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.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.storeValue.type===BI.Selection.All&&c.storeValue.value.length>=c._count?c.storeValue={type:BI.Selection.Multi,value:[]}:c.storeValue.type===BI.Selection.Multi&&c.storeValue.value.length>=c._count&&(c.storeValue={type:BI.Selection.All,value:[]}),c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_combo",BI.MultiSelectCombo),BI.MultiSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=b.value||{},this._assertValue(this.storeValue),this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!a.storeValue.value.contains(a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](f),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:this.options.logic,height:25,selected:this.isAllSelected()})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_loader",BI.MultiSelectLoader),BI.MultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.multi_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_popup_view",BI.MultiSelectPopupView),BI.MultiSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.MultiSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.multi_select_searcher",height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker,value:b.value}),this.searcher.on(BI.MultiSelectSearcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_CHANGE,arguments)}),this.numberCounter=BI.createWidget(b.switcher,{type:"bi.multi_select_check_selected_switcher",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,adapter:b.adapter,masker:b.masker,value:b.value}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK)}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW)});var c=BI.createWidget({type:"bi.right_vertical_adapt",hgap:4,items:[{el:this.numberCounter}]}),d=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:c,width:0},{el:BI.createWidget(),width:30}]});this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){d.attr("items")[1].width=b===!0?a.numberCounter.element.outerWidth()+8:0,d.resize()})}),this.element.click(function(b){a.element.__isMouseInBounds__(b)&&!a.numberCounter.element.__isMouseInBounds__(b)&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.MultiSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.MultiSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectTrigger.EVENT_START="EVENT_START",BI.MultiSelectTrigger.EVENT_STOP="EVENT_STOP",BI.MultiSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.multi_select_trigger",BI.MultiSelectTrigger),BI.MultiSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=BI.deepClone(b.value),this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:{dynamic:!1},value:b.value,el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:a.storeValue.value})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=a._filterValues(a.storeValue);h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:{dynamic:!1},height:25,selected:this.isAllSelected()})},isAllSelected:function(){return this.button_group.isAllSelected()},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=BI.deepClone(a.value)||[],e=BI.map(d,function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.match.concat(f.find)}return BI.map(d,function(b,c){return{text:c.text,title:c.text,value:c.value,selected:a.type===BI.Selection.All}})},setValue:function(a){this.storeValue=BI.deepClone(a),this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_loader",BI.MultiSelectSearchLoader),BI.MultiSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.multi_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue(); +c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},isAllSelected:function(){return this.loader.isAllSelected()},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.MultiSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_pane",BI.MultiSelectSearchPane),BI.MultiSelectCheckSelectedButton=BI.inherit(BI.Single,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-button bi-high-light",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectCheckSelectedButton.superclass._init.apply(this,arguments);var a=this,b=this.options;this.numberCounter=BI.createWidget({type:"bi.text_button",element:this,hgap:4,text:"0",textAlign:"center",textHeight:15}),this.numberCounter.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.numberCounter.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),this.numberCounter.element.hover(function(){a.numberCounter.setTag(a.numberCounter.getText()),a.numberCounter.setText(a._const.checkSelected)},function(){a.numberCounter.setText(a.numberCounter.getTag())}),this.setVisible(!1),BI.isNotNull(b.value)&&this.setValue(b.value)},setValue:function(a){var b=this,c=this.options;return a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[]),a.type===BI.Selection.All?void c.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(c){var d=c.count-a.value.length;BI.nextTick(function(){b.numberCounter.setText(d),b.setVisible(d>0)})}):void BI.nextTick(function(){b.numberCounter.setText(a.value.length),b.setVisible(a.value.length>0)})},getValue:function(){}}),BI.MultiSelectCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_check_selected_button",BI.MultiSelectCheckSelectedButton),BI.MultiSelectEditor=BI.inherit(BI.Widget,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-editor",el:{}})},_init:function(){BI.MultiSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0,value:b.value}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_CLICK_LABEL,function(){})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastValidValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.MultiSelectEditor.EVENT_PAUSE="MultiSelectEditor.EVENT_PAUSE",BI.shortcut("bi.multi_select_editor",BI.MultiSelectEditor),BI.MultiSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.MultiSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),this.setKeyword(c.keyword),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiSelectSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;if(a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All)if(0===a.value.length)this.editor.setState(BI.Selection.All);else if(BI.size(a.assist)<=20){var c="";BI.each(a.assist,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi);else if(0===a.value.length)this.editor.setState(BI.Selection.None);else if(BI.size(a.value)<=20){var c="";BI.each(a.value,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectSearcher.EVENT_START="EVENT_START",BI.MultiSelectSearcher.EVENT_STOP="EVENT_STOP",BI.MultiSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.multi_select_searcher",BI.MultiSelectSearcher),BI.MultiSelectCheckSelectedSwitcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedSwitcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-switcher",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,el:{},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectCheckSelectedSwitcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button=BI.createWidget(b.el,{type:"bi.multi_select_check_selected_button",itemsCreator:b.itemsCreator,value:b.value}),this.button.on(BI.Events.VIEW,function(){a.fireEvent(BI.Events.VIEW,arguments)}),this.switcher=BI.createWidget({type:"bi.switcher",toggle:!1,element:this,el:this.button,popup:BI.extend({type:"bi.multi_select_check_pane",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,onClickContinueSelect:function(){a.switcher.hideView()},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.switcher.on(BI.Switcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE)}),this.switcher.on(BI.Switcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW)}),this.switcher.on(BI.Switcher.EVENT_AFTER_POPUPVIEW,function(){var a=this;BI.nextTick(function(){a.populate()})}),this.switcher.element.click(function(a){a.stopPropagation()})},adjustView:function(){this.switcher.adjustView()},hideView:function(){this.switcher.empty(),this.switcher.hideView()},setAdapter:function(a){this.switcher.setAdapter(a)},setValue:function(a){this.switcher.setValue(a)},setButtonChecked:function(a){this.button.setValue(a)},getValue:function(){},populate:function(a){this.switcher.populate.apply(this.switcher,arguments)}}),BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE="MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE",BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW="MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_select_check_selected_switcher",BI.MultiSelectCheckSelectedSwitcher),BI.MultiSelectInsertList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectInsertList.superclass._init.apply(this,arguments);var 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(),c(),a.fireEvent(BI.MultiSelectInsertList.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.storeValue.type===BI.Selection.Multi&&a.storeValue.value.pushDistinct(b),a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a.adapter.populate(),a._setStartValue(""),a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)}):(a.storeValue.type===BI.Selection.Multi&&a.storeValue.value.pushDistinct(b),a._showAdapter(),a.adapter.setValue(a.storeValue),a.adapter.populate(),a.storeValue.type===BI.Selection.Multi&&a.fireEvent(BI.MultiSelectInsertList.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.MultiSelectInsertList.EVENT_CHANGE)}):a._join(this.getValue(),function(){c(),a.fireEvent(BI.MultiSelectInsertList.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)}),b()}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA},function(a){d._allData=BI.map(a.items,"value"),c(d._allData)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),d.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA,keyword:c.trigger.getKeyword()},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void b()}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),b()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void b()}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.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.map(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.trigger.getKeyword()},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.storeValue.type===BI.Selection.All&&c.storeValue.value.length>=c._count?c.storeValue={type:BI.Selection.Multi,value:[]}:c.storeValue.type===BI.Selection.Multi&&c.storeValue.value.length>=c._count&&(c.storeValue={type:BI.Selection.All,value:[]})}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.MultiSelectList.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectList,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectList.EVENT_CHANGE="BI.MultiSelectList.EVENT_CHANGE",BI.shortcut("bi.multi_select_list",BI.MultiSelectList),BI.MultiSelectTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={value:{}},this.adapter=BI.createWidget({type:"bi.multi_select_tree_popup",itemsCreator:b.itemsCreator}),this.adapter.on(BI.MultiSelectTreePopup.EVENT_CHANGE,function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_tree_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",keywordGetter:function(){return a.searcher.getKeyword()},itemsCreator:function(c,d){c.keyword=a.searcher.getKeyword(),b.itemsCreator(c,d)}}),this.searcherPane.setVisible(!1),this.searcher=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.searcher.getKeyword()})},adapter:this.adapter,popup:this.searcherPane,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){a._showSearcherPane()}},{eventName:BI.Searcher.EVENT_STOP,action:function(){a._showAdapter(),BI.nextTick(function(){a.adapter.populate()})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){a._showAdapter()}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.searcher,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)},resize:function(){},setSelectedValue:function(a){this.storeValue.value=a||{},this.adapter.setSelectedValue(a),this.searcherPane.setSelectedValue(a),this.searcher.setValue({value:a||{}})},setValue:function(a){this.adapter.setValue(a)},stopSearch:function(){this.searcher.stopSearch()},updateValue:function(a){this.adapter.updateValue(a)},getValue:function(){return this.storeValue.value},populate:function(){this.searcher.populate.apply(this.searcher,arguments),this.adapter.populate.apply(this.adapter,arguments)}}),BI.MultiSelectTree.EVENT_CHANGE="BI.MultiSelectTree.EVENT_CHANGE",BI.shortcut("bi.multi_select_tree",BI.MultiSelectTree),BI.MultiSelectTreePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree-popup bi-border-left bi-border-right bi-border-bottom",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popup=BI.createWidget({type:"bi.async_tree",element:this,itemsCreator:b.itemsCreator}),this.popup.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_AFTER_INIT)}),this.popup.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_CHANGE)})},hasChecked:function(){return this.popup.hasChecked()},getValue:function(){return this.popup.getValue()},setValue:function(a){a||(a={}),this.popup.setValue(a)},setSelectedValue:function(a){a||(a={}),this.popup.setSelectedValue(a)},updateValue:function(a){this.popup.updateValue(a),this.popup.refresh()},populate:function(a){this.popup.stroke(a)}}),BI.MultiSelectTreePopup.EVENT_AFTER_INIT="BI.MultiSelectTreePopup.EVENT_AFTER_INIT",BI.MultiSelectTreePopup.EVENT_CHANGE="BI.MultiSelectTreePopup.EVENT_CHANGE",BI.shortcut("bi.multi_select_tree_popup",BI.MultiSelectTreePopup),BI.MultiTreeCheckPane=BI.inherit(BI.Pane,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-pane bi-background",onClickContinueSelect:BI.emptyFn})},_init:function(){BI.MultiTreeCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={};var c=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-tree-check-selected"});c.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect(),BI.nextTick(function(){a.empty()})});var d=BI.createWidget({type:"bi.left",cls:"multi-tree-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:c,lgap:this.constants.lgap,tgap:this.constants.tgap}]});this.display=BI.createWidget({type:"bi.display_tree",cls:"bi-multi-tree-display",itemsCreator:function(a,c){a.type=BI.TreeView.REQ_TYPE_GET_SELECTED_DATA,b.itemsCreator(a,c)},value:(b.value||{}).value}),this.display.on(BI.Events.AFTERINIT,function(){a.fireEvent(BI.Events.AFTERINIT)}),this.display.on(BI.TreeView.EVENT_INIT,function(){d.setVisible(!1)}),this.display.on(BI.TreeView.EVENT_AFTERINIT,function(){d.setVisible(!0)}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:d},{height:"fill",el:this.display}]})},empty:function(){this.display.empty()},populate:function(a){this.display.stroke(a)},setValue:function(a){a||(a={}),this.display.setSelectedValue(a.value)},getValue:function(){}}),BI.MultiTreeCheckPane.EVENT_CONTINUE_CLICK="EVENT_CONTINUE_CLICK",BI.shortcut("bi.multi_tree_check_pane",BI.MultiTreeCheckPane),BI.MultiTreeCombo=BI.inherit(BI.Single,{constants:{offset:{top:1,left:1,right:2,bottom:33}},_defaultConfig:function(){return BI.extend(BI.MultiTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-combo",itemsCreator:BI.emptyFn,height:25})},_init:function(){function a(){h()?b.storeValue={value:b.trigger.getValue()}:i()&&(b.storeValue={value:b.combo.getValue()}),b.trigger.setValue(b.storeValue)}BI.MultiTreeCombo.superclass._init.apply(this,arguments);var b=this,c=this.options,d=!1,e=!1;this.storeValue={value:c.value||{}},this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:c.height,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_tree_searcher",itemsCreator:c.itemsCreator},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",itemsCreator:c.itemsCreator}},value:{value:c.value||{}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){b.popup=this,b.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){b.trigger.getCounter().adjustView(),d=!0,e===!0&&a()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){f=!0;var a={type:BI.Selection.Multi,value:this.hasChecked()?this.getValue():{}};b.trigger.getSearcher().setState(a),b.trigger.getCounter().setButtonChecked(a)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){b.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){g=!0,b.setValue(),b._defaultState()}}],itemsCreator:c.itemsCreator,onLoaded:function(){BI.nextTick(function(){b.trigger.getCounter().adjustView(),b.trigger.getSearcher().adjustView()})}},value:{value:c.value||{}},hideChecker:function(a){return 0===j.element.find(a.target).length}});var f=!1,g=!1,h=function(){return b.trigger.getSearcher().isSearching()},i=function(){return b.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){b.storeValue={value:b.combo.getValue()},this.setValue(b.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){b.storeValue={value:this.getValue()},b.combo.setValue(b.storeValue),BI.nextTick(function(){i()&&b.combo.populate()})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){e===!1&&(e=!0),d===!0&&(e=null,a())}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){b.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){b.combo.isViewVisible()||b.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var a=this.getSearcher().hasChecked(),b={type:BI.Selection.Multi,value:a?{1:1}:{}};this.getSearcher().setState(a?BI.Selection.Multi:BI.Selection.None),this.getCounter().setButtonChecked(b)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){h()||(f===!0&&(b.storeValue={value:b.combo.getValue()},f=!1),b.combo.setValue(b.storeValue),b.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){h()?(b.trigger.stopEditing(),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)):i()&&(b.trigger.stopEditing(),b.storeValue={value:b.combo.getValue()},g===!0&&(b.storeValue={value:{}}),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)),g=!1,f=!1});var j=BI.createWidget({type:"bi.trigger_icon_button",width:c.height,height:c.height,cls:"multi-select-trigger-icon-button"});j.on(BI.TriggerIconButton.EVENT_CHANGE,function(){b.trigger.getCounter().hideView(),b.combo.isViewVisible()?b.combo.hideView():b.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:j,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},setValue:function(a){this.storeValue.value=a||{},this.combo.setValue({value:a||{}})},getValue:function(){return this.storeValue.value},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeCombo.EVENT_CONFIRM="MultiTreeCombo.EVENT_CONFIRM",BI.shortcut("bi.multi_tree_combo",BI.MultiTreeCombo),BI.MultiTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-popup",maxWidth:"auto",minWidth:100,maxHeight:400,onLoaded:BI.emptyFn})},_init:function(){BI.MultiTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={},this.tree=BI.createWidget({type:"bi.async_tree",height:400,cls:"popup-view-tree",itemsCreator:b.itemsCreator,onLoaded:b.onLoaded,value:b.value||{}}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",element:this,stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.tree}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CONFIRM)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreePopup.EVENT_CHANGE)}),this.tree.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiTreePopup.EVENT_AFTERINIT)})},getValue:function(){return this.tree.getValue()},setValue:function(a){a||(a={}),this.tree.setSelectedValue(a.value)},populate:function(a){this.tree.stroke(a)},hasChecked:function(){return this.tree.hasChecked()},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreePopup.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreePopup.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR", +BI.MultiTreePopup.EVENT_AFTERINIT="EVENT_AFTERINIT",BI.shortcut("bi.multi_tree_popup_view",BI.MultiTreePopup),BI.MultiTreeSearchPane=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-search-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiTreeSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.partTree=BI.createWidget({type:"bi.part_tree",element:this,tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(a,c){a.keyword=b.keywordGetter(),b.itemsCreator(a,c)},value:b.value}),this.partTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.partTree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearchPane.EVENT_CHANGE)})},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_tree_search_pane",BI.MultiTreeSearchPane),BI.MultiTreeCheckSelectedButton=BI.inherit(BI.Single,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-selected-button",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiTreeCheckSelectedButton.superclass._init.apply(this,arguments);var a=this;this.indicator=BI.createWidget({type:"bi.icon_button",cls:"check-font trigger-check-selected",width:15,height:15,stopPropagation:!0}),this.checkSelected=BI.createWidget({type:"bi.text_button",cls:"trigger-check-selected",invisible:!0,hgap:4,text:this._const.checkSelected,textAlign:"center",textHeight:15}),this.checkSelected.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.checkSelected.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.horizontal",element:this,items:[this.indicator,this.checkSelected]}),this.element.hover(function(){a.indicator.setVisible(!1),a.checkSelected.setVisible(!0)},function(){a.indicator.setVisible(!0),a.checkSelected.setVisible(!1)}),this.setVisible(!1)},setValue:function(a){a||(a={}),this.setVisible(BI.size(a.value)>0)}}),BI.MultiTreeCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_tree_check_selected_button",BI.MultiTreeCheckSelectedButton),BI.MultiTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",height:b.height}}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_CHANGE,arguments)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){function b(a){var c="",d=0,e=BI.size(a);return BI.each(a,function(a,f){d++;var g=b(f);c+=a+(""===g?"":":"+g)+(d===e?"":",")}),c}if(a||(a={}),a.value||(a.value={}),BI.isNumber(a))this.editor.setState(a);else if(0===BI.size(a.value))this.editor.setState(BI.Selection.None);else{var c="";BI.each(a.value,function(a,d){var e=b(d);c+=a+(""===e?"":":"+e)+"; "}),this.editor.setState(c)}},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearcher.EVENT_START="EVENT_START",BI.MultiTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_tree_searcher",BI.MultiTreeSearcher),BI.NumberEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-number-editor bi-border",validationChecker:function(){return!0},valueFormatter:function(a){return a},value:0,allowBlank:!1,errorText:"",step:1})},_init:function(){BI.NumberEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,allowBlank:b.allowBlank,value:b.valueFormatter(b.value),validationChecker:b.validationChecker,errorText:b.errorText}),this.editor.on(BI.TextEditor.EVENT_CHANGE,function(){b.value=this.getValue(),a.fireEvent(BI.NumberEditor.EVENT_CHANGE)}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){this.setValue(BI.parseFloat(this.getValue())),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",cls:"column-pre-page-h-font top-button bi-border-left bi-border-bottom"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",cls:"column-next-page-h-font bottom-button bi-border-left bi-border-top"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),BI.createWidget({type:"bi.htape",element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:23}]})},focus:function(){this.editor.focus()},_finetuning:function(a){var b=BI.parseFloat(this.getValue());this.setValue(b.add(a))},setUpEnable:function(a){this.topBtn.setEnable(!!a)},setDownEnable:function(a){this.bottomBtn.setEnable(!!a)},getValue:function(){return this.options.value},setValue:function(a){var b=this.options;b.value=a,this.editor.setValue(b.valueFormatter(a))}}),BI.NumberEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberEditor.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.number_editor",BI.NumberEditor),BI.NumberInterval=BI.inherit(BI.Single,{constants:{typeError:"typeBubble",numberError:"numberBubble",signalError:"signalBubble",editorWidth:114,columns:5,width:30,rows:1,numberErrorCls:"number-error",border:1,less:0,less_equal:1,numTip:""},_defaultConfig:function(){var a=BI.NumberInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-number-interval",height:25,validation:"valid"})},_init:function(){var a=this,b=this.constants,c=this.options;BI.NumberInterval.superclass._init.apply(this,arguments),this.smallEditor=BI.createWidget({type:"bi.editor",height:c.height-2,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,value:c.min,level:"warning",tipType:"warning",quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.smallEditorBubbleType=b.typeError,!1)},cls:"number-interval-small-editor bi-border-top bi-border-bottom bi-border-left"}),this.smallTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.smallEditor.element,items:[{el:this.smallTip,top:0,right:5}]}),this.bigEditor=BI.createWidget({type:"bi.editor",height:c.height-2,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,value:c.max,level:"warning",tipType:"warning",quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.bigEditorBubbleType=b.typeError,!1)},cls:"number-interval-big-editor bi-border-top bi-border-bottom bi-border-right"}),this.bigTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.bigEditor.element,items:[{el:this.bigTip,top:0,right:5}]}),this.smallCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-small-combo bi-border",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closemin===!0?this.smallCombo.setValue(1):this.smallCombo.setValue(0),this.bigCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-big-combo bi-border",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closemax===!0?this.bigCombo.setValue(1):this.bigCombo.setValue(0),this.label=BI.createWidget({type:"bi.label",text:BI.i18nText("BI-Basic_Value"),textHeight:c.height-2*b.border,width:b.width-2*b.border,height:c.height-2*b.border,level:"warning",tipType:"warning"}),this.left=BI.createWidget({type:"bi.htape",items:[{el:a.smallEditor},{el:a.smallCombo,width:b.width-2*b.border}]}),this.right=BI.createWidget({type:"bi.htape",items:[{el:a.bigCombo,width:b.width-2*b.border},{el:a.bigEditor}]}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:c.height,items:[{type:"bi.absolute",items:[{el:a.left,left:-15,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:-15,top:0,bottom:0}]}]}),BI.createWidget({element:a,type:"bi.horizontal_auto",items:[a.label]}),a._setValidEvent(a.bigEditor,b.bigEditor),a._setValidEvent(a.smallEditor,b.smallEditor),a._setErrorEvent(a.bigEditor,b.bigEditor),a._setErrorEvent(a.smallEditor,b.smallEditor),a._setBlurEvent(a.bigEditor),a._setBlurEvent(a.smallEditor),a._setFocusEvent(a.bigEditor),a._setFocusEvent(a.smallEditor),a._setComboValueChangedEvent(a.bigCombo),a._setComboValueChangedEvent(a.smallCombo),a._setEditorValueChangedEvent(a.bigEditor),a._setEditorValueChangedEvent(a.smallEditor)},_checkValidation:function(){var a=this,b=this.constants,c=this.options;if(a._setTitle(""),BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),!a.smallEditor.isValid()||!a.bigEditor.isValid())return a.element.removeClass("number-error"),c.validation="invalid",b.typeError;if(BI.isEmptyString(a.smallEditor.getValue())||BI.isEmptyString(a.bigEditor.getValue()))return a.element.removeClass("number-error"),c.validation="valid","";var d=parseFloat(a.smallEditor.getValue()),e=parseFloat(a.bigEditor.getValue()),f=a.bigCombo.getValue(),g=a.smallCombo.getValue();return f[0]===b.less_equal&&g[0]===b.less_equal?d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):(a.element.removeClass("number-error"),c.validation="valid",""):d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):d===e?(a.element.addClass("number-error"),c.validation="invalid",b.signalError):(a.element.removeClass("number-error"),c.validation="valid","")},_setTitle:function(a){var b=this;b.bigEditor.setTitle(a),b.smallEditor.setTitle(a),b.label.setTitle(a)},_setFocusEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_FOCUS,function(){switch(b._setTitle(""),b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{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"});break;default:return}})},_setBlurEvent:function(a){var b=this.constants,c=this;a.on(BI.Editor.EVENT_BLUR,function(){switch(BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),c._checkValidation()){case b.typeError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));break;case b.numberError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));break;case b.signalError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));break;default:c._setTitle("")}})},_setErrorEvent:function(a){var b=this.constants,c=this;a.on(BI.Editor.EVENT_ERROR,function(){c._checkValidation(),BI.Bubbles.show(b.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),c,{offsetStyle:"center"}),c.fireEvent(BI.NumberInterval.EVENT_ERROR)})},_setValidEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_VALID,function(){switch(b._checkValidation()){case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumberInterval.EVENT_VALID)}})},_setEditorValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{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,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)}),this.pager=BI.createWidget(b.pager,{type:"bi.direction_pager",height:30}),this.pager.on(BI.Pager.EVENT_CHANGE,function(){var c=this.getVPage&&this.getVPage();BI.isNull(c)&&(c=this.getCurrentPage());var d=this.getHPage&&this.getHPage();b.itemsCreator({vpage:c,hpage:d},function(b,e,f,g){a.table.setVPage?a.table.setVPage(c):a.table.setValue(c),a.table.setHPage&&a.table.setHPage(d),a.populate.apply(a,arguments)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.table,left:0,top:0},{el:this.pager,left:0,right:0,bottom:0}]})},setHPage:function(a){this.hCurr=a,this.pager.setHPage&&this.pager.setHPage(a),this.table.setHPage&&this.table.setHPage(a)},setVPage:function(a){this.vCurr=a,this.pager.setVPage&&this.pager.setVPage(a),this.table.setVPage&&this.table.setVPage(a)},getHPage:function(){var a=this.pager.getHPage&&this.pager.getHPage();return BI.isNotNull(a)?a:(a=this.pager.getCurrentPage&&this.pager.getCurrentPage(),BI.isNotNull(a)?a:this.hpage)},getVPage:function(){var a=this.pager.getVPage&&this.pager.getVPage();return BI.isNotNull(a)?a:(a=this.pager.getCurrentPage&&this.pager.getCurrentPage(),BI.isNotNull(a)?a:this.vpage)},setWidth:function(a){BI.PageTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.PageTable.superclass.setHeight.apply(this,arguments);var b=!1;this.pager.alwaysShowPager?b=!0:this.pager.hasHNext&&this.pager.hasHNext()?b=!0:this.pager.hasHPrev&&this.pager.hasHPrev()?b=!0:this.pager.hasVNext&&this.pager.hasVNext()?b=!0:this.pager.hasVPrev&&this.pager.hasVPrev()?b=!0:this.pager.hasNext&&this.pager.hasNext()?b=!0:this.pager.hasPrev&&this.pager.hasPrev()&&(b=!0),this.table.setHeight(a-(b?30:0))},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.columnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getVerticalScroll:function(){return this.table.getVerticalScroll()},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},restore:function(){this.table.restore()},attr:function(){BI.PageTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},populate:function(){this.pager.populate(),this.table.populate.apply(this.table,arguments)},destroy:function(){this.table.destroy(),this.pager&&this.pager.destroy(),BI.PageTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.page_table",BI.PageTable),BI.PreviewTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table-cell",text:""})},_init:function(){BI.PreviewTableCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.preview_table_cell",BI.PreviewTableCell),BI.PreviewTableHeaderCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTableHeaderCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table-header-cell",text:""})},_init:function(){BI.PreviewTableHeaderCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.preview_table_header_cell",BI.PreviewTableHeaderCell),BI.PreviewTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table",isNeedFreeze:!1,freezeCols:[],rowSize:null,columnSize:[],headerRowSize:30,header:[],items:[]})},_init:function(){BI.PreviewTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.table=BI.createWidget({type:"bi.table_view",element:this,isNeedResize:!1,isResizeAdapt:!1,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,rowSize:b.rowSize,columnSize:b.columnSize,headerRowSize:b.headerRowSize,header:BI.map(b.header,function(a,b){return BI.map(b,function(a,b){return BI.extend({type:"bi.preview_table_header_cell"},b)})}),items:BI.map(b.items,function(a,b){return BI.map(b,function(a,b){return BI.extend({type:"bi.preview_table_cell"},b)})})}),this.table.on(BI.Table.EVENT_TABLE_AFTER_INIT,function(){a._adjustColumns(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT,arguments)}),this.table.on(BI.Table.EVENT_TABLE_RESIZE,function(){a._adjustColumns()})},_hasAdaptCol:function(a){return BI.any(a,function(a,b){return""===b})},_isPercentage:function(a){return a[0]<=1},_adjustColumns:function(){var a=this.options;if(a.isNeedFreeze===!0){if(this._isPercentage(a.columnSize)){if(this._hasAdaptCol(a.columnSize)){var b=[],c=0;BI.each(a.columnSize,function(a,d){""===d?b.push(a):c+=d}),c=1-c;var d=c/b.length;BI.each(b,function(b,c){a.columnSize[c]=d})}var e=0!==BI.first(a.freezeCols),f=[],g=[];BI.each(a.columnSize,function(b,c){a.freezeCols.contains(b)?f.push(c):g.push(c)});var h=BI.sum(f),i=BI.sum(g);BI.each(f,function(a,b){f[a]=b/h}),BI.each(g,function(a,b){g[a]=b/i}),this.table.setRegionColumnSize(e?["fill",h]:[h,"fill"]),this.table.setColumnSize(e?g.concat(f):f.concat(g))}}else(this._hasAdaptCol(a.columnSize)||this._isPercentage(a.columnSize))&&this.table.setRegionColumnSize(["100%"])},setColumnSize:function(a){return this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){return this.table.setHeaderColumnSize(a)},setRegionColumnSize:function(a){return this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},setVerticalScroll:function(a){return this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){return this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){return this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},getColumns:function(){return this.table.getColumns()},populate:function(a,b){this.table.populate(a,b)}}),BI.PreviewTable.EVENT_CHANGE="PreviewTable.EVENT_CHANGE",BI.shortcut("bi.preview_table",BI.PreviewTable),BI.QuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-combo",behaviors:{},height:25})},_init:function(){BI.QuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.quarter_trigger",value:b.value}),this.trigger.on(BI.QuarterTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.QuarterTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.QuarterTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM))}),this.popup=BI.createWidget({type:"bi.quarter_popup",behaviors:b.behaviors,value:b.value}),this.popup.on(BI.QuarterPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.QuarterCombo.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.QuarterCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return BI.isNull(this.popup)?this.options.value||"":this.popup.getValue()||""}}),BI.QuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.quarter_combo",BI.QuarterCombo),BI.QuarterPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-popup",behaviors:{}})},_init:function(){BI.QuarterPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[{text:Date._QN[1],value:1},{text:Date._QN[2],value:2},{text:Date._QN[3],value:3},{text:Date._QN[4],value:4}];c=BI.map(c,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"left",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:25})}),this.quarter=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(c,{}),layouts:[{type:"bi.vertical"}],value:b.value}),this.quarter.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.quarter.getValue()[0]},setValue:function(a){this.quarter.setValue([a])}}),BI.QuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quarter_popup",BI.QuarterPopup),BI.QuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,textWidth:40,errorText:BI.i18nText("BI-Quarter_Trigger_Error_Text")},_defaultConfig:function(){return BI.extend(BI.QuarterTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-quarter-trigger bi-border",height:24})},_init:function(){BI.QuarterTrigger.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<=4},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.QuarterTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.QuarterTrigger.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.QuarterTrigger.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.QuarterTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.QuarterTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-quarter-text",text:BI.i18nText("BI-Multi_Date_Quarter"),width:c.textWidth},width:c.textWidth},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]}),this.setValue(b.value)},setValue:function(a){a=a||"",this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return this.editor.getValue()}}),BI.QuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.QuarterTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.QuarterTrigger.EVENT_START="EVENT_START",BI.QuarterTrigger.EVENT_STOP="EVENT_STOP",BI.QuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.quarter_trigger",BI.QuarterTrigger),BI.ResponisveTable=BI.inherit(BI.Widget,{_const:{perColumnSize:100},_defaultConfig:function(){return BI.extend(BI.ResponisveTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-responsive-table", +isNeedFreeze:!1,freezeCols:[],logic:{dynamic:!1},isNeedMerge:!1,mergeCols:[],mergeRule:function(a,b){return BI.isEqual(a,b)},columnSize:[],headerRowSize:25,footerRowSize:25,rowSize:25,regionColumnSize:!1,header:[],footer:!1,items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.ResponisveTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.table=BI.createWidget({type:"bi.table_view",element:this,logic:b.logic,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,headerRowSize:b.headerRowSize,footerRowSize:b.footerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:b.header,footer:b.footer,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_AFTER_INIT,function(){a._initRegionSize(),a.table.resize(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT,arguments)}),this.table.on(BI.Table.EVENT_TABLE_RESIZE,function(){a._resizeRegion(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE,function(){a.fireEvent(BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_REGION_RESIZE,function(){b.isNeedResize===!0&&a._isAdaptiveColumn()&&a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE,function(){a._resizeBody(),a.fireEvent(BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_COLUMN_RESIZE,function(){a.fireEvent(BI.Table.EVENT_TABLE_COLUMN_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){a._resizeRegion(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_initRegionSize:function(){var a=this.options;if(a.isNeedFreeze===!0){var b=this.table.getRegionColumnSize(),c=this.table.element.width();if(!b[0]||"fill"===b[0]||b[0]>c||b[1]>c){var d=a.freezeCols;if(0===d.length)this.table.setRegionColumnSize([0,"fill"]);else if(d.length>0&&d.lengtha.columnSize.length/2&&(e=2*c/3),this.table.setRegionColumnSize([e,"fill"])}else this.table.setRegionColumnSize(["fill",0])}}},_getBlockSize:function(){var a=this.options,b=this.table.getCalculateColumnSize();if(a.isNeedFreeze===!0){var c=[],d=[];BI.each(b,function(b,e){a.freezeCols.contains(b)?c.push(e):d.push(e)});var e=BI.sum(c)+c.length,f=BI.sum(d)+d.length;return{sumLeft:e,sumRight:f,left:c,right:d}}return{size:b,sum:BI.sum(b)+b.length}},_isAdaptiveColumn:function(a){return!(BI.last(a||this.table.getColumnSize())>1.05)},_resizeHeader:function(){var a=this,b=this.options;if(b.isNeedFreeze===!0)if(this._isAdaptiveColumn()){var c=this.table.getCalculateColumnSize();this.table.setHeaderColumnSize(c)}else{var d=this.table.getClientRegionColumnSize(),e=this._getBlockSize(),f=e.sumLeft,g=e.sumRight,h=e.left,i=e.right;h[h.length-1]+=d[0]-f,i[i.length-1]+=d[1]-g;var j=BI.clone(h),k=BI.clone(i);j[j.length-1]="",k[k.length-1]="",this.table.setColumnSize(j.concat(k)),e=a._getBlockSize(),h[h.length-1]0&&a.freezeCols.length=d+e)&&this.table.setRegionColumnSize([d,"fill"]),this._resizeRegion()}},_resizeRegion:function(){var a=this.options,b=this.table.getCalculateRegionColumnSize();if(a.isNeedFreeze===!0&&a.freezeCols.length>0&&a.freezeCols.lengtha.columnSize.length/2&&(e=2*c/3),this.table.setRegionColumnSize([e,"fill"])}}},resize:function(){this.table.resize(),this._resizeRegion(),this._resizeHeader()},setColumnSize:function(a){this.table.setColumnSize(a),this._adjustRegion(),this._resizeHeader()},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){this.table.setHeaderColumnSize(a),this._adjustRegion(),this._resizeHeader()},setRegionColumnSize:function(a){this.table.setRegionColumnSize(a),this._resizeHeader()},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},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()},getColumns:function(){return this.table.getColumns()},attr:function(){BI.ResponisveTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},populate:function(a){var b=this,c=this.options;this.table.populate.apply(this.table,arguments),c.isNeedFreeze===!0&&BI.nextTick(function(){b._initRegionSize(),b.table.resize(),b._resizeHeader()})}}),BI.shortcut("bi.responsive_table",BI.ResponisveTable),BI.SelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-first-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.first_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_first_plus_group_node",BI.SelectTreeFirstPlusGroupNode),BI.SelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-last-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.last_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_last_plus_group_node",BI.SelectTreeLastPlusGroupNode),BI.SelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-mid-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.mid_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_mid_plus_group_node",BI.SelectTreeMidPlusGroupNode),BI.SelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-combo",height:30,text:"",items:[],value:""})},_init:function(){BI.SelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value}),this.popup=BI.createWidget({type:"bi.select_level_tree",items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView()})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.shortcut("bi.select_tree_combo",BI.SelectTreeCombo),BI.SelectTreeExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-expander",trigger:"click",toggle:!0,direction:"bottom",isDefaultInit:!0,el:{},popup:{}})},_init:function(){BI.SelectTreeExpander.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({stopPropagation:!0},b.el)),this.trigger.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&this.isSelected()&&a.expander.setValue([]),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.expander=BI.createWidget({type:"bi.expander",element:this,trigger:b.trigger,toggle:b.toggle,direction:b.direction,isDefaultInit:b.isDefaultInit,el:this.trigger,popup:b.popup}),this.expander.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.trigger.setSelected(!1),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){BI.contains(a,this.trigger.getValue())?(this.trigger.setSelected(!0),this.expander.setValue([])):(this.trigger.setSelected(!1),this.expander.setValue(a))},getValue:function(){return this.trigger.isSelected()?[this.trigger.getValue()]:this.expander.getValue()},populate:function(a){this.expander.populate(a)}}),BI.shortcut("bi.select_tree_expander",BI.SelectTreeExpander),BI.SelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-level-tree",tipText:BI.i18nText("BI-No_Selected_Item"),items:[],value:""})},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={layer:b};if(e.id=e.id||BI.UUID(),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.select_tree_first_plus_group_node";break;case a.length-1:f.type="bi.select_tree_last_plus_group_node";break;default:f.type="bi.select_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children)}else{switch(d){case a.length-1:f.type="bi.last_tree_leaf_item";break;default:f.type="bi.mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_init:function(){BI.SelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{type:"bi.select_tree_expander",isDefaultInit:!0},items:this._formatItems(BI.Tree.transformToTreeFormat(b.items)),value:b.value,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SelectTreePopup.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.SelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a)))}}),BI.SelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_level_tree",BI.SelectTreePopup),BI.SequenceTableDynamicNumber=BI.inherit(BI.SequenceTableTreeNumber,{_defaultConfig:function(){return BI.extend(BI.SequenceTableDynamicNumber.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-sequence-table-dynamic-number"})},_init:function(){BI.SequenceTableDynamicNumber.superclass._init.apply(this,arguments)},_formatNumber:function(a){function b(a){var c=0;return BI.isNotEmptyArray(a.children)?(BI.each(a.children,function(a,d){c+=b(d)}),a.children.length>1&&BI.isNotEmptyArray(a.values)&&c++):c++,c}var c=this.options,d=[],e=this._getStart(a),f=0,g=0;return BI.each(a,function(a,h){BI.isArray(h.children)&&(BI.each(h.children,function(a,h){var i=b(h);d.push({text:e++,start:f,top:g,cnt:i,index:a,height:i*c.rowSize}),f+=i,g+=i*c.rowSize}),BI.isNotEmptyArray(h.values)&&(d.push({text:BI.i18nText("BI-Summary_Values"),start:f++,top:g,cnt:1,isSummary:!0,height:c.rowSize}),g+=c.rowSize))}),d}}),BI.shortcut("bi.sequence_table_dynamic_number",BI.SequenceTableDynamicNumber),BI.SequenceTableListNumber=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTableListNumber.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table-list-number",isNeedFreeze:!1,scrollTop:0,startSequence:1,headerRowSize:25,rowSize:25,sequenceHeaderCreator:null,header:[],items:[],crossHeader:[],crossItems:[],pageSize:20})},_init:function(){BI.SequenceTableListNumber.superclass._init.apply(this,arguments);var a=this.options;this.start=a.startSequence,this.renderedCells=[],this.renderedKeys=[],this.container=BI.createWidget({type:"bi.absolute",width:60,scrollable:!1}),this.scrollContainer=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.container]}),this.headerContainer=BI.createWidget({type:"bi.absolute",cls:"bi-border",width:58,scrollable:!1}),this.layout=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.headerContainer,height:a.headerRowSize*a.header.length-2},{el:{type:"bi.layout"},height:2},{el:this.scrollContainer}]}),this._populate()},_layout:function(){var a=this.options,b=a.headerRowSize*a.header.length-2,c=this.layout.attr("items");a.isNeedFreeze===!1?(c[0].height=0,c[1].height=0):a.isNeedFreeze===!0&&(c[0].height=b,c[1].height=2),this.layout.attr("items",c),this.layout.resize(),this.container.setHeight(a.items.length*a.rowSize);try{this.scrollContainer.element.scrollTop(a.scrollTop)}catch(d){}},_createHeader:function(){var a=this.options;BI.createWidget({type:"bi.absolute",element:this.headerContainer,items:[{el:a.sequenceHeaderCreator||{type:"bi.table_style_cell",cls:"sequence-table-title-cell",styleGetter:a.headerCellStyleGetter,text:BI.i18nText("BI-Number_Index")},left:0,top:0,right:0,bottom:0}]})},_calculateChildrenToRender:function(){for(var a=this,b=this.options,c=BI.clamp(b.scrollTop,0,b.rowSize*b.items.length-(b.height-b.header.length*b.headerRowSize)+BI.DOM.getScrollWidth()),d=Math.floor(c/b.rowSize),e=d+Math.floor((b.height-b.header.length*b.headerRowSize)/b.rowSize),f=[],g=[],h=d,i=0;h<=e&&h-1)b.rowSize!==this.renderedCells[j]._height&&(this.renderedCells[j]._height=b.rowSize,this.renderedCells[j].el.setHeight(b.rowSize)),this.renderedCells[j].top!==k&&(this.renderedCells[j].top=k,this.renderedCells[j].el.element.css("top",k+"px")),f.push(this.renderedCells[j]);else{var l=BI.createWidget(BI.extend({type:"bi.table_style_cell",cls:"sequence-table-number-cell bi-border-left bi-border-right bi-border-bottom",width:60,height:b.rowSize,text:this.start+h,styleGetter:function(c){return function(){return b.sequenceCellStyleGetter(a.start+h-1)}}(i)}));f.push({el:l,left:0,top:k,_height:b.rowSize})}g.push(this.start+h)}var m={},n={},o=[];BI.each(g,function(b,c){BI.deepContains(a.renderedKeys,c)?m[b]=c:n[b]=c}),BI.each(this.renderedKeys,function(a,b){BI.deepContains(m,b)||BI.deepContains(n,b)||o.push(a)}),BI.each(o,function(b,c){a.renderedCells[c].el.destroy()});var p=[];BI.each(n,function(a){p.push(f[a])}),BI.createWidget({type:"bi.absolute",element:this.container,items:p}),this.renderedCells=f,this.renderedKeys=g},_populate:function(){this.headerContainer.empty(),this._createHeader(),this._layout(),this._calculateChildrenToRender()},setVerticalScroll:function(a){if(this.options.scrollTop!==a){this.options.scrollTop=a;try{this.scrollContainer.element.scrollTop(a)}catch(b){}}},getVerticalScroll:function(){return this.options.scrollTop},setVPage:function(a){a=a<1?1:a;var b=this.options;this.start=(a-1)*b.pageSize+1},_restore:function(){this.options;BI.each(this.renderedCells,function(a,b){b.el.destroy()}),this.renderedCells=[],this.renderedKeys=[]},restore:function(){this._restore()},populate:function(a,b){var c=this.options;a&&a!==this.options.items&&(c.items=a,this._restore()),b&&b!==this.options.header&&(c.header=b),this._populate()}}),BI.shortcut("bi.sequence_table_list_number",BI.SequenceTableListNumber),BI.SequenceTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table",el:{type:"bi.adaptive_table"},sequence:{},isNeedResize:!0,isResizeAdapt:!1,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:[],showSequence:!1,startSequence:1})},_init:function(){BI.SequenceTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.sequence=BI.createWidget(b.sequence,{type:"bi.sequence_table_list_number",invisible:b.showSequence===!1,startSequence:b.startSequence,isNeedFreeze:b.isNeedFreeze,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems,headerRowSize:b.headerRowSize,rowSize:b.rowSize,width:60,height:b.height&&b.height-BI.GridTableScrollbar.SIZE,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter}),this.table=BI.createWidget(b.el,{type:"bi.adaptive_table",width:b.showSequence===!0?b.width-60:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(b){a.sequence.getVerticalScroll()!==this.getVerticalScroll()&&(a.sequence.setVerticalScroll(this.getVerticalScroll()),a.sequence.populate()),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)}),this.htape=BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.sequence,left:0,top:0},{el:this.table,top:0,left:b.showSequence===!0?60:0}]}),this._populate()},_populate:function(){var a=this.options;a.showSequence===!0?(this.sequence.setVisible(!0),this.table.element.css("left","60px"),this.table.setWidth(a.width-60)):(this.sequence.setVisible(!1),this.table.element.css("left","0px"),this.table.setWidth(a.width))},setWidth:function(a){BI.PageTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(this.options.showSequence?a-60:a)},setHeight:function(a){BI.PageTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a),this.sequence.setHeight(a-BI.GridTableScrollbar.SIZE)},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.columnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},hasLeftHorizontalScroll:function(){return this.table.hasLeftHorizontalScroll()},hasRightHorizontalScroll:function(){return this.table.hasRightHorizontalScroll()},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a),this.sequence.setVerticalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},setVPage:function(a){this.sequence.setVPage&&this.sequence.setVPage(a)},setHPage:function(a){this.sequence.setHPage&&this.sequence.setHPage(a)},attr:function(){BI.SequenceTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments),this.sequence.attr.apply(this.sequence,arguments)},restore:function(){this.table.restore(),this.sequence.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d),this._populate(),this.table.populate.apply(this.table,arguments),this.sequence.populate.apply(this.sequence,arguments),this.sequence.setVerticalScroll(this.table.getVerticalScroll())},destroy:function(){this.table.destroy(),BI.SequenceTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.sequence_table",BI.SequenceTable),BI.SingleSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.single_select_list",element:this,logic:{dynamic:!1},value:b.value,el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map([a.storeValue],function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d,selected:!1}});h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.single_select_radio_item",logic:{dynamic:!1},height:25,selected:!1})},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=BI.deepClone(a.value)||[],e=BI.map(d,function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.match.concat(f.find)}return BI.map(d,function(a,b){return{text:b.text,title:b.text,value:b.value,selected:!1}})},setValue:function(a){this.storeValue=a,this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SingleSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_loader",BI.SingleSelectSearchLoader),BI.SingleSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"single-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.single_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_pane",BI.SingleSelectSearchPane),BI.SingleSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_init:function(){BI.SingleSelectCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue),a.trigger.getSearcher().setState(a.storeValue)};this.storeValue=b.value||"",this.requesting=!1,this.trigger=BI.createWidget({type:"bi.single_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(a.getValue()),d.apply(a,arguments)})},value:this.storeValue}),this.trigger.on(BI.SingleSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.SingleSelectTrigger.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.SingleSelectTrigger.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.SingleSelectTrigger.EVENT_CHANGE,function(b,d){a.storeValue=this.getValue(),c()}),this.trigger.on(BI.SingleSelectTrigger.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.single_select_popup_view",ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.SingleSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c()})}},{eventName:BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM, +action:function(){a._defaultState()}},{eventName:BI.SingleSelectPopupView.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.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length},value:b.value}),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.SingleSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"single-select-trigger-icon-button"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){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="")},_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.remove(b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||"",this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return this.storeValue},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.SingleSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.single_select_combo",BI.SingleSelectCombo),BI.SingleSelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-list",direction:BI.Direction.Top,logic:{dynamic:!0},items:[],itemsCreator:BI.emptyFn,hasNext:BI.emptyFn,onLoaded:BI.emptyFn,el:{type:"bi.list_pane"}})},_init:function(){BI.SingleSelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.list=BI.createWidget(b.el,{type:"bi.list_pane",items:b.items,itemsCreator:function(c,d){b.itemsCreator(c,function(b){d.apply(a,arguments)})},onLoaded:b.onLoaded,hasNext:b.hasNext,value:b.value}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&a.fireEvent(BI.SingleSelectList.EVENT_CHANGE,c,d),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),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.list)}))))},hasPrev:function(){return this.list.hasPrev()},hasNext:function(){return this.list.hasNext()},prependItems:function(a){this.list.prependItems.apply(this.list,arguments)},addItems:function(a){this.list.addItems.apply(this.list,arguments)},setValue:function(a){this.list.setValue([a])},getValue:function(){return this.list.getValue()[0]},empty:function(){this.list.empty()},populate:function(a){this.list.populate.apply(this.list,arguments)},resetHeight:function(a){this.list.resetHeight?this.list.resetHeight(a):this.list.element.css({"max-height":a+"px"})},setNotSelectedValue:function(){this.list.setNotSelectedValue.apply(this.list,arguments)},getNotSelectedValue:function(){return this.list.getNotSelectedValue()},getAllButtons:function(){return this.list.getAllButtons()},getAllLeaves:function(){return this.list.getAllLeaves()},getSelectedButtons:function(){return this.list.getSelectedButtons()},getNotSelectedButtons:function(){return this.list.getNotSelectedButtons()},getIndexByValue:function(a){return this.list.getIndexByValue(a)},getNodeById:function(a){return this.list.getNodeById(a)},getNodeByValue:function(a){return this.list.getNodeByValue(a)}}),BI.SingleSelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_list",BI.SingleSelectList),BI.SingleSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.single_select_list",element:this,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map([a.storeValue],function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d,selected:!1}});h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&(a.storeValue=f),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.single_select_radio_item",logic:this.options.logic,height:25,selected:!1})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},_assertValue:function(a){a||(a="")},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||"",this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SingleSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_loader",BI.SingleSelectLoader),BI.SingleSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.single_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.SingleSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM)}})},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.SingleSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.SingleSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.single_select_popup_view",BI.SingleSelectPopupView),BI.SingleSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.SingleSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.single_select_searcher",height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker,value:b.value}),this.searcher.on(BI.SingleSelectSearcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_START)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_CHANGE,arguments)});BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:BI.createWidget(),width:30}]})},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch()},setAdapter:function(a){this.searcher.setAdapter(a)},setValue:function(a){this.searcher.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.SingleSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.SingleSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.SingleSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectTrigger.EVENT_START="EVENT_START",BI.SingleSelectTrigger.EVENT_STOP="EVENT_STOP",BI.SingleSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.single_select_trigger",BI.SingleSelectTrigger),BI.SingleSelectEditor=BI.inherit(BI.Widget,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-editor",el:{}})},_init:function(){BI.SingleSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0,value:b.value}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_CLICK_LABEL,function(){})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastValidValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.SingleSelectEditor.EVENT_PAUSE="SingleSelectEditor.EVENT_PAUSE",BI.shortcut("bi.single_select_editor",BI.SingleSelectEditor),BI.SingleSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.SingleSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.single_select_editor",height:b.height}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.single_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),this.setKeyword(c.keyword),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.SingleSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.SingleSelectSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;a||(a=""),""===a?this.editor.setState(BI.Selection.None):this.editor.setState(b.valueFormatter(a+"")||a+"")},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.SingleSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.SingleSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectSearcher.EVENT_START="EVENT_START",BI.SingleSelectSearcher.EVENT_STOP="EVENT_STOP",BI.SingleSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.single_select_searcher",BI.SingleSelectSearcher),BI.SingleSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.single_select_list",element:this,logic:{dynamic:!1},el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map([a.storeValue],function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d,selected:!1}});h=a._createItems(i)}if(g){for(var j=!1,k=0;k0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_add_pane",BI.SingleSelectSearchPane),BI.SingleSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_init:function(){BI.SingleSelectCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue),a.trigger.getSearcher().setState(a.storeValue)};this.storeValue="",this.requesting=!1,this.trigger=BI.createWidget({type:"bi.single_select_add_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(a.getValue()),d.apply(a,arguments)})}}),this.trigger.on(BI.SingleSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.SingleSelectTrigger.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.SingleSelectTrigger.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.SingleSelectTrigger.EVENT_CHANGE,function(b,d){a.storeValue=this.getValue(),c()}),this.trigger.on(BI.SingleSelectTrigger.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.single_select_popup_view",ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.SingleSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c()})}},{eventName:BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){a._defaultState()}},{eventName:BI.SingleSelectPopupView.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.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.SingleSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"single-select-trigger-icon-button"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){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="")},_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.remove(b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||"",this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return this.storeValue},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.SingleSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.single_select_add_combo",BI.SingleSelectCombo),BI.SingleSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.SingleSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.single_select_add_searcher",height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.SingleSelectSearcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_START)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_CHANGE,arguments)});BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:BI.createWidget(),width:30}]})},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch()},setAdapter:function(a){this.searcher.setAdapter(a)},setValue:function(a){this.searcher.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.SingleSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.SingleSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.SingleSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectTrigger.EVENT_START="EVENT_START",BI.SingleSelectTrigger.EVENT_STOP="EVENT_STOP",BI.SingleSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.single_select_add_trigger",BI.SingleSelectTrigger),BI.SingleSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.SingleSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.single_select_editor",height:b.height}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.single_select_search_add_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),this.setKeyword(c.keyword),b.itemsCreator(c,d)}},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.SingleSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.SingleSelectSearcher.EVENT_SEARCHING,b)})},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;a||(a=""),""===a?this.editor.setState(BI.Selection.None):this.editor.setState(b.valueFormatter(a+"")||a+"")},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.SingleSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.SingleSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectSearcher.EVENT_START="EVENT_START",BI.SingleSelectSearcher.EVENT_STOP="EVENT_STOP",BI.SingleSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.single_select_add_searcher",BI.SingleSelectSearcher),BI.SignTextEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-sign-initial-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",text:"",height:24})},_init:function(){BI.SignTextEditor.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:"sign-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:"left",height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.SignTextEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignTextEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText()}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;BI.nextTick(BI.bind(function(){if(""===this.editor.getValue())this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark");else{var b=this.editor.getValue();b=BI.isEmpty(b)||b==a.text?a.text:b+a.text,this.text.setValue(b),this.text.element.removeClass("bi-water-mark")}},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){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&&ef-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:"100%"},{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[this.label]}],rgap:c.EDITOR_WIDTH,height:c.EDITOR_HEIGHT},top:0,left:0,width:"100%"}]})},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setLabelPosition(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.label.setValue(m),c.value=m,c.fireEvent(BI.SingleSlider.EVENT_CHANGE)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){var b=this.options,c=!1;if(BI.isNumeric(a)&&!(BI.isNull(a)||athis.max))if(b.digit===!1)c=!0;else{var d=(a+"").split(".")[1]||"";c=d.length===b.digit}return c},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setLabelPosition:function(a){this.label.element.css({left:a+"%"})},_setSliderPosition:function(a){this.slider.element.css({left:a+"%"})},_setAllPosition:function(a){this._setSliderPosition(a),this._setLabelPosition(a),this._setBlueTrack(a)},_setVisible:function(a){this.slider.setVisible(a),this.label.setVisible(a)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(a){var b=BI.parseInt(10*a);return(this.max-this.min)*b/1e3+this.min},_getPercentByValue:function(a){return 100*(a-this.min)/(this.max-this.min)},getValue:function(){return this.value},setValue:function(a){var b=this.options;a=BI.parseFloat(a),a=b.digit===!1?a:a.toFixed(b.digit),isNaN(a)||(this._checkValidation(a)&&(this.value=a),a>this.max&&(this.value=this.max),ab&&(this.min=b,this.max=c)},reset:function(){this._setVisible(!1),this.enable=!1,this.value="",this.min=0,this.max=0,this._setBlueTrack(0)},populate:function(){isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,this.label.setErrorText(BI.i18nText("BI-Please_Enter")+this.min+"-"+this.max+BI.i18nText("BI-Basic_De")+BI.i18nText("BI-Basic_Number")),BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?(this.label.setValue(this.value),this._setAllPosition(this._getPercentByValue(this.value))):(this.label.setValue(this.max),this._setAllPosition(100)))}}),BI.SingleSlider.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_slider",BI.SingleSlider),BI.SingleSliderLabel=BI.inherit(BI.Widget,{_constant:{EDITOR_WIDTH:90,EDITOR_HEIGHT:20,HEIGHT:20,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},_defaultConfig:function(){return BI.extend(BI.SingleSliderLabel.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-slider-label bi-slider-track",digit:!1,unit:""})},_init:function(){BI.SingleSliderLabel.superclass._init.apply(this,arguments);var a=this,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&&ef-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.setText(i+b.unit),a.value=i,a.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)}}),this.label=BI.createWidget({type:"bi.label",height:c.HEIGHT,width:c.EDITOR_WIDTH-2}),this._setVisible(!1),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.track,width:"100%",height:c.TRACK_HEIGHT}]}],hgap:7,height:c.TRACK_HEIGHT},top:13,left:0,width:"100%"},{el:d,top:10,left:0,width:"100%"},{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[this.label]}],rgap:c.EDITOR_WIDTH,height:c.EDITOR_HEIGHT},top:0,left:0,width:"100%"}]})},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setLabelPosition(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.label.setValue(m),c.value=m,c.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){return BI.isNumeric(a)&&!(BI.isNull(a)||athis.max)},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setLabelPosition:function(a){this.label.element.css({left:a+"%"})},_setSliderPosition:function(a){this.slider.element.css({left:a+"%"})},_setAllPosition:function(a){this._setSliderPosition(a),this._setLabelPosition(a),this._setBlueTrack(a)},_setVisible:function(a){this.slider.setVisible(a),this.label.setVisible(a)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(a){var b=BI.parseInt(10*a);return(this.max-this.min)*b/1e3+this.min},_getPercentByValue:function(a){return 100*(a-this.min)/(this.max-this.min)},getValue:function(){return this.value},setValue:function(a){var b=this.options;a=BI.parseFloat(a),a=b.digit===!1?a:a.toFixed(b.digit),isNaN(a)||(this._checkValidation(a)&&(this.value=a),a>this.max&&(this.value=this.max),ab&&(this.min=b,this.max=c)},reset:function(){this._setVisible(!1),this.enable=!1,this.value="",this.min=0,this.max=0,this._setBlueTrack(0)},populate:function(){var a=this.options;isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?(this.label.setValue(this.value+a.unit),this._setAllPosition(this._getPercentByValue(this.value))):(this.label.setValue(this.max+a.unit),this._setAllPosition(100)))}}),BI.SingleSliderLabel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_slider_label",BI.SingleSliderLabel),BI.SingleSliderNormal=BI.inherit(BI.Widget,{_constant:{HEIGHT:28,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},props:{baseCls:"bi-single-slider-normal bi-slider-track",minMax:{min:0,max:100}},render:function(){var a=this,b=this._constant,c=this._createTrack();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:b.SLIDER_WIDTH_HALF,height:b.SLIDER_HEIGHT});return d.element.click(function(c){if(a.enable){var d=c.clientX-a.element.offset().left-b.SLIDER_WIDTH_HALF,e=a.track.element[0].scrollWidth,f=0;d<0&&(f=0),d>0&&de-b.SLIDER_WIDTH&&(f=100);var g=BI.parseFloat(f.toFixed(1));a._setAllPosition(g);var h=a._getValueByPercent(g);a.value=h,a.fireEvent(BI.SingleSlider.EVENT_CHANGE)}}),{type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:c,width:"100%",height:b.TRACK_HEIGHT}]}],hgap:7,height:b.TRACK_HEIGHT},top:3,left:0,width:"100%"},{el:d,top:0,left:0,width:"100%"}]}},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.value=m,c.fireEvent(BI.SingleSliderNormal.EVENT_DRAG,m)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrack:function(){var a=this;this._constant;return this.grayTrack=BI.createWidget({type:"bi.layout",cls:"gray-track",height:6}),this.blueTrack=BI.createWidget({type:"bi.layout",cls:"blue-track bi-high-light-background",height:6}),this.options.color&&this.blueTrack.element.css({"background-color":this.options.color}),{type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}],ref:function(b){a.track=b}}},_checkValidation:function(a){return!(BI.isNull(a)||athis.max)},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setSliderPosition:function(a){this.slider.element.css({left:a+"%"})},_setAllPosition:function(a){this._setSliderPosition(a),this._setBlueTrack(a)},_setVisible:function(a){this.slider.setVisible(a)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(a){var b=BI.parseInt(10*a);return(this.max-this.min)*b/1e3+this.min},_getPercentByValue:function(a){return 100*(a-this.min)/(this.max-this.min)},getValue:function(){return this.value},setValue:function(a){var b=BI.parseFloat(a);isNaN(b)||(this._checkValidation(b)&&(this.value=b),b>this.max&&(this.value=this.max),bb&&(this.min=b,this.max=c)},reset:function(){this._setVisible(!1),this.enable=!1,this.value="",this.min=0,this.max=0,this._setBlueTrack(0)},populate:function(){isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?this._setAllPosition(this._getPercentByValue(this.value)):this._setAllPosition(100))}}),BI.SingleSliderNormal.EVENT_DRAG="EVENT_DRAG",BI.shortcut("bi.single_slider_normal",BI.SingleSliderNormal),BI.SingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-combo",trigger:{},height:24,text:"",items:[],value:""})},_init:function(){BI.SingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value},b.trigger)),this.popup=BI.createWidget({type:"bi.single_level_tree",items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.SingleTreeCombo.EVENT_CHANGE)})},populate:function(a){this.combo.populate(a)},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.SingleTreeCombo.EVENT_CHANGE="SingleTreeCombo.EVENT_CHANGE",BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.single_tree_combo",BI.SingleTreeCombo),BI.SingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-level-tree",tipText:BI.i18nText("BI-No_Selected_Item"),items:[],value:""})},_init:function(){BI.SingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{isDefaultInit:!0},items:b.items,value:b.value,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SingleTreePopup.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.SingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.SingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_level_tree",BI.SingleTreePopup),BI.SingleTreeTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SingleTreeTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-trigger",height:24,text:"",items:[],value:""})},_init:function(){BI.SingleTreeTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,text:a.text,items:a.items,height:a.height,value:a.value})},_checkTitle:function(){var a=this,b=this.getValue();BI.any(this.options.items,function(c,d){if(b.contains(d.value))return a.trigger.setTitle(d.text||d.value),!0})},setValue:function(a){a=BI.isArray(a)?a:[a],this.options.value=a,this.trigger.setValue(a),this._checkTitle()},getValue:function(){return this.options.value||[]},populate:function(a){BI.SingleTreeTrigger.superclass.populate.apply(this,arguments),this.trigger.populate(a)}}),BI.shortcut("bi.single_tree_trigger",BI.SingleTreeTrigger),BI.SwitchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SwitchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-switch-tree",items:[]})},_init:function(){BI.SwitchTree.superclass._init.apply(this,arguments);this.options;this.tab=BI.createWidget({type:"bi.tab",element:this,tab:null,showIndex:BI.SwitchTree.SelectType.SingleSelect,cardCreator:BI.bind(this._createTree,this)})},_createTree:function(a){var b=this,c=this.options;switch(a){case BI.SwitchTree.SelectType.SingleSelect:return this.levelTree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:!0,items:BI.deepClone(c.items),value:c.value}),this.levelTree.on(BI.LevelTree.EVENT_CHANGE,function(){b.fireEvent(BI.SwitchTree.EVENT_CHANGE,arguments)}),this.levelTree;case BI.SwitchTree.SelectType.MultiSelect:return this.tree=BI.createWidget({type:"bi.simple_tree",items:this._removeIsParent(BI.deepClone(c.items)),value:c.value}),this.tree.on(BI.SimpleTreeView.EVENT_CHANGE,function(){b.fireEvent(BI.SwitchTree.EVENT_CHANGE,arguments)}),this.tree}},_removeIsParent:function(a){return BI.each(a,function(a,b){BI.isNotNull(b.isParent)&&delete b.isParent}),a},switchSelect:function(){switch(this.getSelect()){case BI.SwitchTree.SelectType.SingleSelect:this.setSelect(BI.SwitchTree.SelectType.MultiSelect);break;case BI.SwitchTree.SelectType.MultiSelect:this.setSelect(BI.SwitchTree.SelectType.SingleSelect)}},setSelect:function(a){this.tab.setSelect(a)},getSelect:function(){return this.tab.getSelect()},setValue:function(a){switch(this.storeValue=a,this.getSelect()){case BI.SwitchTree.SelectType.SingleSelect:this.levelTree.setValue(a);break;case BI.SwitchTree.SelectType.MultiSelect:this.tree.setValue(a)}},getValue:function(){return this.tab.getValue()},populate:function(a){this.options.items=a,BI.isNotNull(this.levelTree)&&this.levelTree.populate(BI.deepClone(a)),BI.isNotNull(this.tree)&&this.tree.populate(this._removeIsParent(BI.deepClone(a)))}}),BI.SwitchTree.EVENT_CHANGE="SwitchTree.EVENT_CHANGE",BI.SwitchTree.SelectType={SingleSelect:BI.Selection.Single,MultiSelect:BI.Selection.Multi},BI.shortcut("bi.switch_tree",BI.SwitchTree),BI.DateInterval=BI.inherit(BI.Single,{constants:{height:25,width:25,lgap:15,offset:-15,timeErrorCls:"time-error",DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){var a=BI.DateInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-date-interval"})},_init:function(){var a=this,b=this.options;BI.DateInterval.superclass._init.apply(this,arguments),b.value=b.value||{},this.left=this._createCombo(b.value.start),this.right=this._createCombo(b.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:this.constants.height,items:[{type:"bi.absolute",items:[{el:a.left,left:this.constants.offset,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[a.label]})},_createCombo:function(a){var b=this,c=BI.createWidget({type:"bi.dynamic_date_combo",value:a});return c.on(BI.DynamicDateCombo.EVENT_ERROR,function(){b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.DateInterval.EVENT_ERROR)}),c.on(BI.DynamicDateCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.DateInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicDateCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.DateInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW,function(){b.left.hidePopupView(),b.right.hidePopupView()}),c.on(BI.DynamicDateCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),b.fireEvent(BI.DateInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.DateInterval.EVENT_CHANGE))}),c},_dateCheck:function(a){return BI.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")===a||BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")===a||BI.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")===a||BI.parseDateTime(a,"%Y-%X-%e").print("%Y-%X-%e")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.constants.DATE_MIN_VALUE,this.constants.DATE_MAX_VALUE)[0]},_check:function(a,b){var c=a.match(/\d+/g),d=b.match(/\d+/g);return this._dateCheck(a)&&BI.checkDateLegal(a)&&this._checkVoid({year:c[0],month:c[1],day:c[2]})&&this._dateCheck(b)&&BI.checkDateLegal(b)&&this._checkVoid({year:d[0],month:d[1],day:d[2]})},_compare:function(a,b){return a=BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d"),b=BI.parseDateTime(b,"%Y-%X-%d").print("%Y-%X-%d"),BI.isNotNull(a)&&BI.isNotNull(b)&&a>b},_setTitle:function(a){this.left.setTitle(a),this.right.setTitle(a),this.label.setTitle(a)},_clearTitle:function(){this.left.setTitle(""),this.right.setTitle(""),this.label.setTitle("")},setValue:function(a){a=a||{},this.left.setValue(a.start),this.right.setValue(a.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.DateInterval.EVENT_VALID="EVENT_VALID",BI.DateInterval.EVENT_ERROR="EVENT_ERROR",BI.DateInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.date_interval",BI.DateInterval),BI.TimeInterval=BI.inherit(BI.Single,{constants:{height:25,width:25,lgap:15,offset:-15,timeErrorCls:"time-error",DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){var a=BI.TimeInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-time-interval"})},_init:function(){var a=this,b=this.options;BI.TimeInterval.superclass._init.apply(this,arguments),b.value=b.value||{},this.left=this._createCombo(b.value.start),this.right=this._createCombo(b.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:this.constants.height,items:[{type:"bi.absolute",items:[{el:a.left,left:this.constants.offset,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[a.label]})},_createCombo:function(a){var b=this,c=BI.createWidget({type:"bi.dynamic_date_time_combo",value:a});return c.on(BI.DynamicDateTimeCombo.EVENT_ERROR,function(){b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.TimeInterval.EVENT_ERROR)}),c.on(BI.DynamicDateTimeCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.TimeInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicDateTimeCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.TimeInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW,function(){b.left.hidePopupView(),b.right.hidePopupView()}),c.on(BI.DynamicDateTimeCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),b.fireEvent(BI.TimeInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.TimeInterval.EVENT_CHANGE))}),c},_dateCheck:function(a){return BI.parseDateTime(a,"%Y-%x-%d %H:%M:%S").print("%Y-%x-%d %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%X-%d %H:%M:%S").print("%Y-%X-%d %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%x-%e %H:%M:%S").print("%Y-%x-%e %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%X-%e %H:%M:%S").print("%Y-%X-%e %H:%M:%S")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.constants.DATE_MIN_VALUE,this.constants.DATE_MAX_VALUE)[0]},_check:function(a,b){var c=a.match(/\d+/g),d=b.match(/\d+/g);return this._dateCheck(a)&&BI.checkDateLegal(a)&&this._checkVoid({year:c[0],month:c[1],day:c[2]})&&this._dateCheck(b)&&BI.checkDateLegal(b)&&this._checkVoid({year:d[0],month:d[1],day:d[2]})},_compare:function(a,b){return a=BI.parseDateTime(a,"%Y-%X-%d %H:%M:%S").print("%Y-%X-%d %H:%M:%S"),b=BI.parseDateTime(b,"%Y-%X-%d %H:%M:%S").print("%Y-%X-%d %H:%M:%S"),BI.isNotNull(a)&&BI.isNotNull(b)&&a>b},_setTitle:function(a){this.left.setTitle(a),this.right.setTitle(a),this.label.setTitle(a)},_clearTitle:function(){this.left.setTitle(""),this.right.setTitle(""),this.label.setTitle("")},setValue:function(a){a=a||{},this.left.setValue(a.start),this.right.setValue(a.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.TimeInterval.EVENT_VALID="EVENT_VALID",BI.TimeInterval.EVENT_ERROR="EVENT_ERROR",BI.TimeInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.time_interval",BI.TimeInterval),BI.DynamicYearCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-card"},render:function(){var a=this;return{type:"bi.vertical",items:[{type:"bi.label",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),textAlign:"left",height:24},{type:"bi.dynamic_date_param_item",ref:function(){a.item=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]}],vgap:10,hgap:10}},_createValue:function(a,b){return{dateType:a,value:Math.abs(b),offset:b>0?1:0}},setValue:function(a){a=a||{year:0},this.item.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR,a.year))},getValue:function(){var a=this.item.getValue();return{year:0===a.offset?-a.value:a.value}}}),BI.DynamicYearCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_card",BI.DynamicYearCard),BI.StaticYearCard=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.StaticYearCard.superclass._defaultConfig.apply(this,arguments),{ +baseCls:"bi-year-card",behaviors:{},min:"1900-01-01",max:"2099-12-31"})},_createYearCalendar:function(a){var b=this.options,c=this._year,d=BI.createWidget({type:"bi.year_calendar",behaviors:b.behaviors,min:b.min,max:b.max,logic:{dynamic:!0},year:c+12*a});return d.setValue(this._year),d},_init:function(){BI.StaticYearCard.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedYear=this._year=BI.getDate().getFullYear(),this.backBtn=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:25,height:25,value:-1,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.navigation.setSelect(a.navigation.getSelect()-1),a._checkLeftValid(),a._checkRightValid()}}]}),this.preBtn=BI.createWidget({type:"bi.icon_button",cls:"next-page-h-font",width:25,height:25,value:1,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.navigation.setSelect(a.navigation.getSelect()+1),a._checkLeftValid(),a._checkRightValid()}}]}),this.navigation=BI.createWidget({type:"bi.navigation",direction:"top",element:this,single:!0,logic:{dynamic:!0},tab:{type:"bi.htape",cls:"bi-border-top bi-border-bottom",height:30,items:[{el:{type:"bi.center_adapt",items:[a.backBtn]},width:25},{type:"bi.layout"},{el:{type:"bi.center_adapt",items:[a.preBtn]},width:25}]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(a.selectedYear);var b=this.getSelectedCard();a.backBtn.setEnable(!b.isFrontYear()),a.preBtn.setEnable(!b.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedYear=this.getValue(),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.StaticYearCard.EVENT_CHANGE,a.selectedYear)}),BI.isKey(b.value)&&this.setValue(b.value)},_checkLeftValid:function(){var a=(this.options,!0);return this.backBtn.setEnable(a),a},_checkRightValid:function(){var a=(this.options,!0);return this.preBtn.setEnable(a),a},getValue:function(){return{year:this.selectedYear}},setValue:function(a){var b=this.options;a=a||{};var c=a.year;BI.checkDateVoid(c,1,1,b.min,b.max)[0]?(c=BI.getDate().getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(c)),this.navigation.setValue("")):(this.selectedYear=BI.parseInt(c),this.navigation.setSelect(BI.YearCalendar.getPageByYear(c)),this.navigation.setValue(this.selectedYear)),this._checkLeftValid(),this._checkRightValid()}}),BI.StaticYearCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.static_year_card",BI.StaticYearCard),BI.DynamicYearCombo=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-combo bi-border",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicYearCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value,this.trigger=BI.createWidget({type:"bi.dynamic_year_trigger",min:b.min,max:b.max,value:b.value||""}),this.trigger.on(BI.DynamicYearTrigger.EVENT_FOCUS,function(){a.storeTriggerValue=this.getKey()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_STOP,function(){a.combo.showView()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_ERROR,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeTriggerValue?(a.storeValue=a.trigger.getValue(),a.setValue(a.storeValue)):this.getKey()||(a.storeValue=null,a.setValue()),a.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM))}),this.combo=BI.createWidget({type:"bi.combo",isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.dynamic_year_popup",ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicYearPopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({year:b.getFullYear()}),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}],behaviors:b.behaviors,min:b.min,max:b.max},value:b.value||""}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicYearCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.htape",element:this,ref:function(){a.comboWrapper=this},items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24,ref:function(){a.changeIcon=this}},width:24},this.combo]}),this._checkDynamicValue(b.value)},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.DynamicYearCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue}}),BI.DynamicYearCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_year_combo",BI.DynamicYearCombo),BI.extend(BI.DynamicYearCombo,{Static:1,Dynamic:2}),BI.DynamicYearPopup=BI.inherit(BI.Widget,{constants:{tabHeight:30},props:{baseCls:"bi-year-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31",width:180,height:240},render:function(){var a=this;this.options;return this.storeValue={type:BI.DynamicYearCombo.Static},{type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-left bi-border-right bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Current_Year"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Basic_Current_Year")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=a.print("%Y"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-border-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Basic_Year_Fen"),value:BI.DynamicYearCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicYearCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(c){switch(c){case BI.DynamicYearCombo.Dynamic:return{type:"bi.dynamic_year_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicYearCombo.Static:default:return{type:"bi.static_year_card",behaviors:b.behaviors,min:a.options.min,max:a.options.max,listeners:[{eventName:BI.StaticYearCard.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearPopup.EVENT_CHANGE)}}],ref:function(){a.year=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicYearCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.year.setValue({year:c.getFullYear()}),a._setInnerValue();break;case BI.DynamicYearCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicYearCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:this.year.setValue(c),this.textButton.setValue(BI.i18nText("BI-Basic_Current_Year")),this.textButton.setEnable(!0)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicYearPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_popup",BI.DynamicYearPopup),BI.DynamicYearTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,errorText:BI.i18nText("BI-Please_Input_Positive_Integer"),errorTextInvalid:BI.i18nText("BI-Year_Trigger_Invalid_Text")},_defaultConfig:function(){return BI.extend(BI.DynamicYearTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-year-trigger",min:"1900-01-01",max:"2099-12-31",height:24})},_init:function(){BI.DynamicYearTrigger.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)&&!BI.checkDateVoid(a,1,1,b.min,b.max)[0]},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,errorText:function(a){return BI.isPositiveInteger(a)?c.errorTextInvalid:c.errorText}}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.DynamicYearTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DynamicYearTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&a.editor.setValue(b),BI.isNotEmptyString(b)&&(a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:b}}),a.fireEvent(BI.DynamicYearTrigger.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.DynamicYearTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DynamicYearTrigger.EVENT_ERROR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-year-text",text:BI.i18nText("BI-Multi_Date_Year"),width:b.height},width:b.height},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]}),this.setValue(b.value)},_getText:function(a){var b="";return BI.isNotNull(a.year)&&0!==a.year&&(b+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),b},_setInnerValue:function(a,b){var c=a.print("%Y");this.editor.setState(c),this.editor.setValue(c),this.setTitle(BI.isEmptyString(b)?c:b+":"+c)},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:c=c||{},this.editor.setState(c.year),this.editor.setValue(c.year),this.editor.setTitle(c.year)}},getValue:function(){return this.storeValue},getKey:function(){return 0|this.editor.getValue()}}),BI.DynamicYearTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearTrigger.EVENT_START="EVENT_START",BI.DynamicYearTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearTrigger.EVENT_STOP="EVENT_STOP",BI.shortcut("bi.dynamic_year_trigger",BI.DynamicYearTrigger),BI.DynamicYearMonthCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-month-card"},render:function(){var a=this;return{type:"bi.vertical",items:[{type:"bi.label",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),textAlign:"left",height:24},{type:"bi.dynamic_date_param_item",ref:function(){a.year=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]},{type:"bi.dynamic_date_param_item",dateType:BI.DynamicDateCard.TYPE.MONTH,ref:function(){a.month=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]}],vgap:10,hgap:10}},_createValue:function(a,b){return{dateType:a,value:Math.abs(b),offset:b>0?1:0}},setValue:function(a){a=a||{year:0,month:0},this.year.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR,a.year)),this.month.setValue(this._createValue(BI.DynamicDateCard.TYPE.MONTH,a.month))},getValue:function(){var a=this.year.getValue(),b=this.month.getValue();return{year:0===a.offset?-a.value:a.value,month:0===b.offset?-b.value:b.value}}}),BI.DynamicYearMonthCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_month_card",BI.DynamicYearMonthCard),BI.StaticYearMonthCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-static-year-month-card",behaviors:{}},_createMonths:function(){var a=[1,7,2,8,3,9,4,10,5,11,6,12],b=[];return b.push(a.slice(0,2)),b.push(a.slice(2,4)),b.push(a.slice(4,6)),b.push(a.slice(6,8)),b.push(a.slice(8,10)),b.push(a.slice(10,12)),BI.map(b,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}})})},render:function(){var a=this,b=this.options;return{type:"bi.vertical",items:[{type:"bi.year_picker",ref:function(){a.yearPicker=this},height:30,listeners:[{eventName:BI.YearPicker.EVENT_CHANGE,action:function(){var b=this.getValue();a.setValue({year:b,month:a.selectedMonth})}}]},{type:"bi.button_group",behaviors:b.behaviors,ref:function(){a.month=this},items:this._createMonths(),layouts:[BI.LogicFactory.createLogic("table",BI.extend({dynamic:!0},{columns:2,rows:6,columnSize:[.5,.5],rowSize:25})),{type:"bi.center_adapt",vgap:1,hgap:2}],value:b.value,listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(){a.selectedYear=a.yearPicker.getValue(),a.selectedMonth=this.getValue()[0],a.fireEvent(BI.StaticYearMonthCard.EVENT_CHANGE)}}]}]}},getValue:function(){return{year:this.selectedYear,month:this.selectedMonth}},setValue:function(a){var b=this.options;if(a=a||{},a.year=a.year||0,a.month=a.month||0,BI.checkDateVoid(a.year,a.month,1,b.min,b.max)[0]){var c=BI.getDate().getFullYear(),d=BI.getDate().getMonth();this.selectedYear="",this.selectedMonth="",this.yearPicker.setValue(c),this.month.setValue(d)}else this.selectedYear=BI.parseInt(a.year),this.selectedMonth=BI.parseInt(a.month),this.yearPicker.setValue(this.selectedYear),this.month.setValue(this.selectedMonth)}}),BI.StaticYearMonthCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.static_year_month_card",BI.StaticYearMonthCard),BI.DynamicYearMonthCombo=BI.inherit(BI.Single,{props:{baseCls:"bi-year-month-combo bi-border",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicYearMonthCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value,this.trigger=BI.createWidget({type:"bi.dynamic_year_month_trigger",min:b.min,max:b.max,value:b.value||""}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_STOP,function(){a.combo.showView()}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_ERROR,function(){a.combo.isViewVisible()&&a.combo.hideView(),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_ERROR)}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_VALID,function(){a.fireEvent(BI.DynamicYearMonthCombo.EVENT_VALID)}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(a.storeValue=a.trigger.getValue(),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM))}),this.trigger.on(BI.DynamicYearMonthCombo.EVENT_FOCUS,function(){a.fireEvent(BI.DynamicYearMonthCombo.EVENT_FOCUS)}),this.combo=BI.createWidget({type:"bi.combo",isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.dynamic_year_month_popup",ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicYearMonthPopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({year:b.getFullYear()}),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}],behaviors:b.behaviors,min:b.min,max:b.max},value:b.value||""}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.htape",element:this,ref:function(){a.comboWrapper=this},items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24,ref:function(){a.changeIcon=this}},width:24},this.combo]}),this._checkDynamicValue(b.value)},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.DynamicYearMonthCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},hideView:function(){this.combo.hideView()},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()}}),BI.DynamicYearMonthCombo.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearMonthCombo.EVENT_VALID="EVENT_VALID",BI.DynamicYearMonthCombo.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearMonthCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_year_month_combo",BI.DynamicYearMonthCombo),BI.extend(BI.DynamicYearMonthCombo,{Static:1,Dynamic:2}),BI.DynamicYearMonthPopup=BI.inherit(BI.Widget,{constants:{tabHeight:30},props:{baseCls:"bi-year-month-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31",width:180,height:240},render:function(){var a=this;this.options;return this.storeValue={type:BI.DynamicYearMonthCombo.Static},{type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-left bi-border-right bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Current_Month"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Basic_Current_Month")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=a.print("%Y-%x"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-border-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Basic_Year_Fen"),value:BI.DynamicYearCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicYearCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(c){switch(c){case BI.DynamicYearCombo.Dynamic:return{type:"bi.dynamic_year_month_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicYearCombo.Static:default:return{type:"bi.static_year_month_card",behaviors:b.behaviors,min:a.options.min,max:a.options.max,listeners:[{eventName:BI.StaticYearMonthCard.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearMonthPopup.EVENT_CHANGE)}}],ref:function(){a.year=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicYearCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.year.setValue({year:c.getFullYear(),month:c.getMonth()}),a._setInnerValue();break;case BI.DynamicYearCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicYearCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:this.year.setValue(c),this.textButton.setValue(BI.i18nText("BI-Basic_Current_Month")),this.textButton.setEnable(!0)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicYearMonthPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_month_popup",BI.DynamicYearMonthPopup),BI.DynamicYearMonthTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,errorText:BI.i18nText("BI-Please_Input_Positive_Integer"),errorTextInvalid:BI.i18nText("BI-Year_Trigger_Invalid_Text")},props:{extraCls:"bi-year-month-trigger",min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicYearMonthTrigger.superclass._init.apply(this,arguments);var a=this.options;this.yearEditor=this._createEditor(!0),this.monthEditor=this._createEditor(!1),BI.createWidget({element:this,type:"bi.htape",items:[{type:"bi.center",items:[{type:"bi.htape",items:[this.yearEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Year"),width:a.height},width:a.height}]},{type:"bi.htape",items:[this.monthEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Month"),width:a.height},width:a.height}]}]},{el:{type:"bi.trigger_icon_button",width:a.height},width:a.height}]}),this.setValue(a.value)},_createEditor:function(a){var b=this,c=this.options,d=this._const,e=BI.createWidget({type:"bi.sign_editor",height:c.height,validationChecker:function(b){return a?""===b||BI.isPositiveInteger(b)&&!BI.checkDateVoid(b,1,1,c.min,c.max)[0]:""===b||b>=1&&b<=12&&!BI.checkDateVoid(BI.getDate().getFullYear(),b,1,c.min,c.max)[0]},quitChecker:function(){return!1},watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(a){return BI.isPositiveInteger(a)?d.errorTextInvalid:d.errorText},hgap:d.hgap,vgap:d.vgap,allowBlank:!0});return e.on(BI.SignEditor.EVENT_FOCUS,function(){b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_FOCUS)}),e.on(BI.SignEditor.EVENT_STOP,function(){b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_STOP)}),e.on(BI.SignEditor.EVENT_CONFIRM,function(){var a=e.getValue();if(BI.isNotNull(a)&&e.setValue(a),BI.isNotEmptyString(a)){var c=b.monthEditor.getValue();b.storeValue={type:BI.DynamicDateCombo.Static,value:{year:b.yearEditor.getValue(),month:BI.isEmptyString(b.monthEditor.getValue())?"":c-1}}}b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM)}),e.on(BI.SignEditor.EVENT_SPACE,function(){e.isValid()&&e.blur()}),e.on(BI.SignEditor.EVENT_START,function(){b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_START)}),e.on(BI.SignEditor.EVENT_ERROR,function(){b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_ERROR)}),e.on(BI.SignEditor.EVENT_VALID,function(){var a=b.yearEditor.getValue(),d=b.monthEditor.getValue();BI.isNotEmptyString(a)&&BI.isNotEmptyString(d)&&BI.isPositiveInteger(a)&&d>=1&&d<=12&&!BI.checkDateVoid(a,d,1,c.min,c.max)[0]&&b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_VALID)}),e.on(BI.SignEditor.EVENT_CHANGE,function(){a&&b._autoSwitch(e.getValue())}),e},_yearCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d");return BI.parseDateTime(a,"%Y").print("%Y")===a&&b>=this.options.min&&b<=this.options.max},_autoSwitch:function(a){BI.checkDateLegal(a)&&4===a.length&&this._yearCheck(a)&&this.monthEditor.focus()},_getText:function(a){var b="";return BI.isNotNull(a.year)&&(b+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),BI.isNotNull(a.month)&&0!==a.month&&(b+=Math.abs(a.month)+BI.i18nText("BI-Basic_Year")+(a.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),b},_setInnerValue:function(a,b){var c=a.print("%Y-%x");this.yearEditor.setValue(a.getFullYear()),this.monthEditor.setValue(a.getMonth()+1),this.setTitle(BI.isEmptyString(b)?c:b+":"+c)},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:c=c||{};var f=BI.isNull(c.month)?null:c.month;this.yearEditor.setValue(c.year),this.yearEditor.setTitle(c.year),this.monthEditor.setValue(f),this.monthEditor.setTitle(f)}},getValue:function(){return this.storeValue},getKey:function(){return this.yearEditor.getValue()+"-"+this.monthEditor.getValue()}}),BI.DynamicYearMonthTrigger.EVENT_VALID="EVENT_FOCUS",BI.DynamicYearMonthTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearMonthTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearMonthTrigger.EVENT_START="EVENT_START",BI.DynamicYearMonthTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearMonthTrigger.EVENT_STOP="EVENT_STOP",BI.shortcut("bi.dynamic_year_month_trigger",BI.DynamicYearMonthTrigger),BI.YearMonthInterval=BI.inherit(BI.Single,{constants:{height:25,width:25,lgap:15,offset:-15,timeErrorCls:"time-error",DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},props:{extraCls:"bi-year-month-interval"},_init:function(){var a=this,b=this.options;BI.YearMonthInterval.superclass._init.apply(this,arguments),b.value=b.value||{},this.left=this._createCombo(b.value.start),this.right=this._createCombo(b.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:this.constants.height,items:[{type:"bi.absolute",items:[{el:a.left,left:this.constants.offset,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[a.label]})},_createCombo:function(a){var b=this,c=BI.createWidget({type:"bi.dynamic_year_month_combo",value:a});return c.on(BI.DynamicYearMonthCombo.EVENT_ERROR,function(){b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.YearMonthInterval.EVENT_ERROR)}),c.on(BI.DynamicYearMonthCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.YearMonthInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicYearMonthCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.YearMonthInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW,function(){b.left.hideView(),b.right.hideView()}),c.on(BI.DynamicYearMonthCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),b.fireEvent(BI.YearMonthInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.YearMonthInterval.EVENT_CHANGE))}),c},_dateCheck:function(a){return BI.parseDateTime(a,"%Y-%x").print("%Y-%x")===a||BI.parseDateTime(a,"%Y-%X").print("%Y-%X")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,1,this.constants.DATE_MIN_VALUE,this.constants.DATE_MAX_VALUE)[0]},_check:function(a,b){var c=a.match(/\d+/g),d=b.match(/\d+/g);return this._dateCheck(a)&&BI.checkDateLegal(a)&&this._checkVoid({year:c[0],month:c[1],day:1})&&this._dateCheck(b)&&BI.checkDateLegal(b)&&this._checkVoid({year:d[0],month:d[1],day:1})},_compare:function(a,b){return a=BI.parseDateTime(a,"%Y-%X").print("%Y-%X"),b=BI.parseDateTime(b,"%Y-%X").print("%Y-%X"),BI.isNotNull(a)&&BI.isNotNull(b)&&a>b},_setTitle:function(a){this.left.setTitle(a),this.right.setTitle(a),this.label.setTitle(a)},_clearTitle:function(){this.left.setTitle(""),this.right.setTitle(""),this.label.setTitle("")},setValue:function(a){a=a||{},this.left.setValue(a.start),this.right.setValue(a.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.YearMonthInterval.EVENT_VALID="EVENT_VALID",BI.YearMonthInterval.EVENT_ERROR="EVENT_ERROR",BI.YearMonthInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_month_interval",BI.YearMonthInterval),BI.DynamicYearQuarterCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-month-card"},render:function(){var a=this;return{type:"bi.vertical",items:[{type:"bi.label",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),textAlign:"left",height:24},{type:"bi.dynamic_date_param_item",ref:function(){a.year=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]},{type:"bi.dynamic_date_param_item",dateType:BI.DynamicDateCard.TYPE.QUARTER,ref:function(){a.quarter=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]}],vgap:10,hgap:10}},_createValue:function(a,b){return{dateType:a,value:Math.abs(b),offset:b>0?1:0}},setValue:function(a){a=a||{year:0,month:0},this.year.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR,a.year)),this.quarter.setValue(this._createValue(BI.DynamicDateCard.TYPE.QUARTER,a.quarter))},getValue:function(){var a=this.year.getValue(),b=this.quarter.getValue();return{year:0===a.offset?-a.value:a.value,quarter:0===b.offset?-b.value:b.value +}}}),BI.DynamicYearQuarterCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_quarter_card",BI.DynamicYearQuarterCard),BI.StaticYearQuarterCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-static-year-quarter-card",behaviors:{}},_createQuarter:function(){var a=[{text:Date._QN[1],value:1},{text:Date._QN[2],value:2},{text:Date._QN[3],value:3},{text:Date._QN[4],value:4}];return BI.map(a,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"center",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:24})})},render:function(){var a=this,b=this.options;return{type:"bi.vertical",items:[{type:"bi.year_picker",ref:function(){a.yearPicker=this},height:30,listeners:[{eventName:BI.YearPicker.EVENT_CHANGE,action:function(){var b=this.getValue();a.setValue({year:b,quarter:a.selectedQuarter})}}]},{type:"bi.button_group",behaviors:b.behaviors,ref:function(){a.quarter=this},items:this._createQuarter(),layouts:[{type:"bi.vertical",vgap:10}],value:b.value,listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(){a.selectedYear=a.yearPicker.getValue(),a.selectedQuarter=this.getValue()[0],a.fireEvent(BI.StaticYearQuarterCard.EVENT_CHANGE)}}]}]}},getValue:function(){return{year:this.selectedYear,quarter:this.selectedQuarter}},setValue:function(a){var b=this.options;if(a=a||{},a.year=a.year||0,a.quarter=a.quarter||0,BI.checkDateVoid(a.year,a.quarter,1,b.min,b.max)[0]){var c=BI.getDate().getFullYear(),d=BI.getDate().getQuarter();this.selectedYear="",this.selectedQuarter="",this.yearPicker.setValue(c),this.quarter.setValue(d)}else this.selectedYear=BI.parseInt(a.year),this.selectedQuarter=BI.parseInt(a.quarter),this.yearPicker.setValue(this.selectedYear),this.quarter.setValue(this.selectedQuarter)}}),BI.StaticYearQuarterCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.static_year_quarter_card",BI.StaticYearQuarterCard),BI.DynamicYearQuarterCombo=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-quarter-combo bi-border",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicYearQuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value,this.trigger=BI.createWidget({type:"bi.dynamic_year_quarter_trigger",min:b.min,max:b.max,value:b.value||""}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_STOP,function(){a.combo.showView()}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_ERROR,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(a.storeValue=a.trigger.getValue(),a.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM))}),this.combo=BI.createWidget({type:"bi.combo",isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.dynamic_year_quarter_popup",ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicYearQuarterPopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({year:b.getFullYear()}),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}],behaviors:b.behaviors,min:b.min,max:b.max},value:b.value||""}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicYearQuarterCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.htape",element:this,ref:function(){a.comboWrapper=this},items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24,ref:function(){a.changeIcon=this}},width:24},this.combo]}),this._checkDynamicValue(b.value)},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.DynamicYearQuarterCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue}}),BI.DynamicYearQuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearQuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_year_quarter_combo",BI.DynamicYearQuarterCombo),BI.extend(BI.DynamicYearQuarterCombo,{Static:1,Dynamic:2}),BI.DynamicYearQuarterPopup=BI.inherit(BI.Widget,{constants:{tabHeight:30},props:{baseCls:"bi-year-quarter-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31",width:180,height:240},render:function(){var a=this;this.options;return this.storeValue={type:BI.DynamicYearQuarterCombo.Static},{type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-left bi-border-right bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Current_Quarter"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicYearQuarterCombo.Static)this.textButton.setValue(BI.i18nText("BI-Basic_Current_Quarter")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=a.print("%Y-%x"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-border-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Basic_Year_Fen"),value:BI.DynamicYearQuarterCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicYearQuarterCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(c){switch(c){case BI.DynamicYearQuarterCombo.Dynamic:return{type:"bi.dynamic_year_quarter_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicYearQuarterCombo.Static:default:return{type:"bi.static_year_quarter_card",behaviors:b.behaviors,min:a.options.min,max:a.options.max,listeners:[{eventName:BI.DynamicYearCard.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearQuarterPopup.EVENT_CHANGE)}}],ref:function(){a.year=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicYearQuarterCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.year.setValue({year:c.getFullYear(),quarter:c.getQuarter()}),a._setInnerValue();break;case BI.DynamicYearQuarterCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicYearQuarterCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:this.year.setValue(c),this.textButton.setValue(BI.i18nText("BI-Basic_Current_Quarter")),this.textButton.setEnable(!0)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicYearQuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_quarter_popup",BI.DynamicYearQuarterPopup),BI.DynamicYearQuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,errorText:BI.i18nText("BI-Please_Input_Positive_Integer"),errorTextInvalid:BI.i18nText("BI-Year_Trigger_Invalid_Text")},props:{extraCls:"bi-year-quarter-trigger",min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicYearQuarterTrigger.superclass._init.apply(this,arguments);var a=this.options;this.yearEditor=this._createEditor(!0),this.quarterEditor=this._createEditor(!1),BI.createWidget({element:this,type:"bi.htape",items:[{type:"bi.center",items:[{type:"bi.htape",items:[this.yearEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Year"),width:a.height},width:a.height}]},{type:"bi.htape",items:[this.quarterEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Quarter"),width:a.height},width:a.height}]}]},{el:{type:"bi.trigger_icon_button",width:a.height},width:a.height}]}),this.setValue(a.value)},_createEditor:function(a){var b=this,c=this.options,d=this._const,e=BI.createWidget({type:"bi.sign_editor",height:c.height,validationChecker:function(b){return a?""===b||BI.isPositiveInteger(b)&&!BI.checkDateVoid(b,1,1,c.min,c.max)[0]:""===b||b>=1&&b<=4&&!BI.checkDateVoid(BI.getDate().getFullYear(),b,1,c.min,c.max)[0]},quitChecker:function(){return!1},errorText:function(a){return BI.isPositiveInteger(a)?d.errorTextInvalid:d.errorText},watermark:BI.i18nText("BI-Basic_Unrestricted"),hgap:d.hgap,vgap:d.vgap,allowBlank:!0});return e.on(BI.SignEditor.EVENT_FOCUS,function(){b.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_FOCUS)}),e.on(BI.SignEditor.EVENT_STOP,function(){b.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_STOP)}),e.on(BI.SignEditor.EVENT_CONFIRM,function(){var a=e.getValue();if(BI.isNotNull(a)&&e.setValue(a),BI.isNotEmptyString(a)){var c=b.quarterEditor.getValue();b.storeValue={type:BI.DynamicYearQuarterCombo.Static,value:{year:b.yearEditor.getValue(),quarter:BI.isEmptyString(b.quarterEditor.getValue())?"":c}}}b.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM)}),e.on(BI.SignEditor.EVENT_SPACE,function(){e.isValid()&&e.blur()}),e.on(BI.SignEditor.EVENT_START,function(){b.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_START)}),e.on(BI.SignEditor.EVENT_ERROR,function(){b.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_ERROR)}),e.on(BI.SignEditor.EVENT_CHANGE,function(){a&&b._autoSwitch(e.getValue())}),e},_yearCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d");return BI.parseDateTime(a,"%Y").print("%Y")===a&&b>=this.options.min&&b<=this.options.max},_autoSwitch:function(a){BI.checkDateLegal(a)&&4===a.length&&this._yearCheck(a)&&this.quarterEditor.focus()},_getText:function(a){var b="";return BI.isNotNull(a.year)&&(b+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),BI.isNotNull(a.quarter)&&0!==a.quarter&&(b+=Math.abs(a.quarter)+BI.i18nText("BI-Basic_Year")+(a.quarter<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),b},_setInnerValue:function(a,b){var c=a.print("%Y-%x");this.yearEditor.setValue(a.getFullYear()),this.quarterEditor.setValue(a.getQuarter()),this.setTitle(BI.isEmptyString(b)?c:b+":"+c)},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicYearQuarterCombo.Static,c=a.value||a),b){case BI.DynamicYearQuarterCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicYearQuarterCombo.Static:default:c=c||{};var f=BI.isNull(c.quarter)?null:c.quarter;this.yearEditor.setValue(c.year),this.yearEditor.setTitle(c.year),this.quarterEditor.setValue(f),this.quarterEditor.setTitle(f)}},getValue:function(){return this.storeValue}}),BI.DynamicYearQuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearQuarterTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearQuarterTrigger.EVENT_START="EVENT_START",BI.DynamicYearQuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearQuarterTrigger.EVENT_STOP="EVENT_STOP",BI.shortcut("bi.dynamic_year_quarter_trigger",BI.DynamicYearQuarterTrigger),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.match.concat(d.find)}),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,value:{type:BI.Selection.Multi,value:b.value||[]}}),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(BI.AllValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-all-value-chooser-pane",width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.AllValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&(this.items=b.items),this.list=BI.createWidget({type:"bi.multi_select_list",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:b.width,height:b.height}),this.list.on(BI.MultiSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.AllValueChooserPane.EVENT_CHANGE)})},setValue:function(a){this.list.setValue({type:BI.Selection.Multi,value:a||[]})},getValue:function(){var a=this.list.getValue()||{};return a.type===BI.Selection.All?a.assist:a.value||[]},populate:function(){this.list.populate.apply(this.list,arguments)}}),BI.AllValueChooserPane.EVENT_CHANGE="AllValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.all_value_chooser_pane",BI.AllValueChooserPane),BI.AbstractTreeValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractTreeValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn})},_initData:function(a){this.items=a;var b=BI.Tree.treeFormat(a);this.tree=new BI.Tree,this.tree.initTree(b)},_itemsCreator:function(a,b){function c(){switch(a.type){case BI.TreeView.REQ_TYPE_INIT_DATA:d._reqInitTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_ADJUST_DATA:d._reqAdjustTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_SELECT_DATA:d._reqSelectedTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_GET_SELECTED_DATA:d._reqDisplayTreeNode(a,b);break;default:d._reqTreeNode(a,b)}}var d=this,e=this.options;this.items?c():e.itemsCreator({},function(a){d._initData(a),c()})},_reqDisplayTreeNode:function(a,b){function c(a,b,g){return null==g||BI.isEmpty(g)?void BI.each(b.getChildren(),function(d,g){var h=BI.clone(a);h.push(g.value);var i=f._getChildCount(h);e(g,b.id,i),c(h,g,{})}):void BI.each(g,function(b){var h=f._getTreeNode(a,b),i=BI.clone(a);i.push(h.value),e(h,h.parent&&h.parent.id,d(g[b],i)),c(i,h,g[b])})}function d(a,b){return null==a?0:BI.isEmpty(a)?f._getChildCount(b):BI.size(a)}function e(a,b,c){g.push({id:a.id,pId:b,text:a.text+(c>0?"("+BI.i18nText("BI-Basic_Altogether")+c+BI.i18nText("BI-Basic_Count")+")":""),value:a.value,open:!0})}var f=this,g=[],h=a.selectedValues;return null==h||BI.isEmpty(h)?void b({}):(c([],this.tree.getRoot(),h),void b({items:g}))},_reqSelectedTreeNode:function(a,b){function c(a){var b=m.concat(k);if(g(a,b))if(f(b))i._deleteNode(a,b);else{var c=[],j=e(m,k,[],c);j&&BI.isNotEmptyArray(c)&&BI.each(c,function(b,c){var e=i._getNode(a,c);e?i._deleteNode(a,c):d(a,c,BI.last(c))})}if(h(a,b)){var l=[],j=!1;f(b)?j=!0:(j=e(m,k,l),b=m),j===!0&&(d(a,b,k),l.length>0&&BI.each(l,function(b,c){i._buildTree(a,c)}))}}function d(a,b,c){var d=a,e=[],f=[];BI.some(b,function(g,h){var j=d[h];if(null==j){if(0===g)return!0;if(!BI.isEmpty(d))return!0;var k=b.slice(0,g),l=i._getChildren(k);if(f.push(k),e.push(l.length),g===b.length-1&&1===l.length&&l[0]===c)for(var m=e.length-1;m>=0&&1===e[m];m--)i._deleteNode(a,f[m]);else BI.each(l,function(a,e){return g===b.length-1&&e.value===c||void(d[e.value]={})});d=d[h]}else d=j})}function e(a,b,c,d){var f=BI.clone(a);if(f.push(b),i._isMatch(a,b,l))return d&&d.push(f),!0;var g=i._getChildren(f),h=[],j=!1;return BI.each(g,function(a,b){e(f,b.value,c,d)?j=!0:h.push(b.value)}),j===!0&&BI.each(h,function(a,b){var d=BI.clone(f);d.push(b),c.push(d)}),j}function f(a){for(var b=0,c=a.length;bj._const.perPage)break}return f}function d(a,b,c,i,k){if(j._isMatch(b,c,l)){var m=i||h(b,c);return e(b,c,!1,m,!i&&f(b,c),!0,k),[!0,m]}var n=BI.clone(b);n.push(c);var o=j._getChildren(n),p=!1,m=!1,q=i||g(b,c);return BI.each(o,function(b,c){var e=d(a+1,n,c.value,q,k);e[1]===!0&&(m=!0),e[0]===!0&&(p=!0)}),p===!0&&(m=q||h(b,c)&&m,e(b,c,!0,m,!1,!1,k)),[p,m]}function e(a,b,c,d,e,f,g){var h=j._getTreeNode(a,b);g.push({id:h.id,pId:h.pId,text:h.text,value:h.value,title:h.title,isParent:h.getChildrenLength()>0,open:c,checked:d,halfCheck:e,flag:f})}function f(a,b){var c=i(a);return null==c?null:BI.any(c,function(a,c){if(a===b&&null!=c&&!BI.isEmpty(c))return!0})}function g(a,b){var c=i(a);return null==c?null:BI.any(c,function(a,c){if(a===b&&null!=c&&BI.isEmpty(c))return!0})}function h(a,b){var c=i(a);return null!=c&&BI.any(c,function(a){if(a===b)return!0})}function i(a){var b=m;return null==b?null:(BI.every(a,function(a,c){return b=b[c],null!=b}),b)}var j=this,k=[],l=a.keyword||"",m=a.selectedValues,n=a.lastSearchValue||"",o=c();BI.nextTick(function(){b({hasNext:o.length>j._const.perPage,items:k,lastSearchValue:BI.last(o)})})},_reqTreeNode:function(a,b){function c(a,b){var c={};return BI.each(a,function(a,c){b=b[c]||{}}),BI.each(b,function(a,b){if(BI.isNull(b))return void(c[a]=[0,0]);if(BI.isEmpty(b))return void(c[a]=[2,0]);var d={};BI.each(b,function(a,b){(BI.isNull(b)||BI.isEmpty(b))&&(d[a]=!0)}),c[a]=[1,BI.size(d)]}),c}function d(a,b,c,d){var f=d.checked,g=d.half,h=!1,i=!1;if(BI.has(c,a))if(1===c[a][0]){var j=BI.clone(b);j.push(a);var k=e._getChildCount(j);k>0&&k!==c[a][1]&&(i=!0)}else 2===c[a][0]&&(h=!0);var l;return l=f||i||h?(h||f)&&!g||BI.has(c,a):BI.has(c,a),[l,i]}var e=this,f=[],g=a.times,h=a.checkState||{},i=a.parentValues||[],j=a.selectedValues||{},k={};k=c(i,j);for(var l=this._getChildren(i),m=(g-1)*this._const.perPage;l[m]&&m0,checked:n[0],halfCheck:n[1]})}BI.nextTick(function(){b({items:f,hasNext:l.length>g*e._const.perPage})})},_getNode:function(a,b){for(var c=a,d=0,e=b.length;d0&&BI.isEmpty(e);)c=d[d.length-1],d=d.slice(0,d.length-1),e=this._getNode(a,d),null!=e&&delete e[c]},_buildTree:function(a,b){var c=a;BI.each(b,function(a,b){BI.has(c,b)||(c[b]={}),c=c[b]})},_isMatch:function(a,b,c){var d=this._getTreeNode(a,b),e=BI.Func.getSearchResult([d.text||d.value],c);return e.find.length>0||e.match.length>0},_getTreeNode:function(a,b){var c,d=this,e=0;return this.tree.traverse(function(f){if(!d.tree.isRoot(f))return!(e>a.length)&&(e===a.length&&f.value===b?(c=f,!1):f.value!==a[e]||void e++)}),c},_getChildren:function(a){if(a.length>0)var b=BI.last(a),c=this._getTreeNode(a.slice(0,a.length-1),b);else var c=this.tree.getRoot();return c.getChildren()},_getChildCount:function(a){return this._getChildren(a).length}}),BI.TreeValueChooserCombo=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-combo",width:200,height:30,items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&this._initData(b.items),this.combo=BI.createWidget({type:"bi.multi_tree_combo",element:this,itemsCreator:BI.bind(this._itemsCreator,this),width:b.width,height:b.height}),this.combo.on(BI.MultiTreeCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.TreeValueChooserCombo.EVENT_CONFIRM)})},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.TreeValueChooserCombo.EVENT_CONFIRM="TreeValueChooserCombo.EVENT_CONFIRM",BI.shortcut("bi.tree_value_chooser_combo",BI.TreeValueChooserCombo),BI.TreeValueChooserPane=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-pane",items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.pane=BI.createWidget({type:"bi.multi_select_tree",element:this,itemsCreator:BI.bind(this._itemsCreator,this)}),this.pane.on(BI.MultiSelectTree.EVENT_CHANGE,function(){a.fireEvent(BI.TreeValueChooserPane.EVENT_CHANGE)}),BI.isNotNull(b.items)&&(this._initData(b.items),this.populate())},setSelectedValue:function(a){this.pane.setSelectedValue(a)},setValue:function(a){this.pane.setValue(a)},getValue:function(){return this.pane.getValue()},populate:function(){this.pane.populate.apply(this.pane,arguments)}}),BI.TreeValueChooserPane.EVENT_CHANGE="TreeValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.tree_value_chooser_pane",BI.TreeValueChooserPane),BI.AbstractValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn,cache:!0})},_valueFormatter:function(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},_getItemsByTimes:function(a,b){for(var c=[],d=(b-1)*this._const.perPage;a[d]&&d .filter-item-empty-item { + border-top: 0px; + border-right: 1px solid #d4dadd; + border-bottom: 1px solid #d4dadd; +} +.bi-filter-expander > table { + min-width: 100%; +} +.bi-filter-expander > table > tbody > tr > td.first-element { + width: 20px; + border-right: 1px solid #d4dadd !important; + border-bottom: 1px solid #d4dadd !important; +} +.bi-theme-dark .bi-filter-expander > .filter-item-empty-item { + border-right: 1px solid #525466; + border-bottom: 1px solid #525466; +} +.bi-theme-dark .bi-filter-expander > table > tbody > tr > td.first-element { + border-right: 1px solid #525466 !important; + border-bottom: 1px solid #525466 !important; +} +.bi-filter-operation .operation-trigger.hover, +.bi-filter-operation .operation-trigger:hover { + color: #58cc7d; +} +.bi-filter-pane { + min-width: 100%; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; +} .bi-interactive-arrangement .interactive-arrangement-dragtag-line { z-index: 1000000000; background-color: #faaa39; diff --git a/dist/bundle.js b/dist/bundle.js index 42f8a0049..5fb6e5c07 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -92681,6 +92681,795 @@ BI.extend(BI.FileManagerNav, { }); BI.FileManagerNav.EVENT_CHANGE = "FileManagerNav.EVENT_CHANGE"; BI.shortcut("bi.file_manager_nav", BI.FileManagerNav);/** + * 过滤条件抽象类 + * + * @class BI.AbstractFilterItem + * @extend BI.Widget + */ +BI.AbstractFilterItem = BI.inherit(BI.Widget, { + + props: { + baseCls: "bi-filter-item bi-border-right bi-border-bottom" + }, + + isSelectedCondition: function () { + return this.emptyItem && this.emptyItem.isVisible(); + }, + + setSelectedCondition: function (b) { + if (b) { + if (!this.emptyItem) { + this.emptyItem = BI.createWidget({ + type: "bi.absolute", + height: 40, + cls: "filter-item-empty-item bi-border-top", + items: [{ + el: { + type: "bi.center_adapt", + cls: "empty-filter-item-leaf" + } + }], + hgap: 10, + vgap: 5 + }); + BI.createWidget({ + type: "bi.vertical", + element: this, + items: [this.emptyItem], + scrolly: false + }); + } + } + this.emptyItem && this.emptyItem.setVisible(b); + } +}); +BI.extend(BI.AbstractFilterItem, { + FILTER_OPERATION_FORMULA: 1, + FILTER_OPERATION_CONDITION: 2, + FILTER_OPERATION_CONDITION_AND: 3, + FILTER_OPERATION_CONDITION_OR: 4, + FILTER_OPERATION_FORMULA_AND: 5, + FILTER_OPERATION_FORMULA_OR: 6 +});/** + * Created by Urthur on 2017/11/21. + */ +!(function () { + var Expander = BI.inherit(BI.Widget, { + props: { + baseCls: "bi-filter-expander", + el: {}, + popup: {} + }, + + render: function () { + var self = this, o = this.options; + return { + type: "bi.filter_expander", + el: o.el, + popup: o.popup, + id: o.id, + value: o.value, + listeners: [{ + eventName: BI.Controller.EVENT_CHANGE, + action: function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + } + }], + ref: function (_ref) { + self.expander = _ref; + } + }; + }, + + populate: function () { + this.expander.populate.apply(this.expander, arguments); + }, + + getValue: function () { + var val = this.expander.getValue(); + return { + filterType: val.type, + filterValue: val.value, + id: val.id + }; + } + }); + BI.shortcut("bi.and.or.filter.expander", Expander); +}());/** + * @class BI.FilterExpander + * @extend BI.AbstractFilterItem + * 过滤树的一个expander节点 + */ +!(function () { + var FilterExpander = BI.inherit(BI.AbstractFilterItem, { + _constant: { + EXPANDER_WIDTH: 20 + }, + + props: { + baseCls: "bi-filter-item bi-filter-expander", + el: {}, + popup: {} + }, + + render: function () { + var self = this, o = this.options; + var value = o.value, text = ""; + if (value === BI.Filter.FILTER_TYPE.AND) { + text = BI.i18nText("BI-Basic_And"); + } else { + text = BI.i18nText("BI-Basic_Or"); + } + return { + type: "bi.horizontal_adapt", + cls: "filter-item-empty-item", + verticalAlign: BI.VerticalAlign.Middle, + items: [{ + type: "bi.text_button", + cls: "condition-and-or", + text: text, + value: value, + id: o.id, + width: this._constant.EXPANDER_WIDTH, + height: "100%", + ref: function (_ref) { + self.expander = _ref; + }, + listeners: [{ + eventName: BI.TextButton.EVENT_CHANGE, + action: function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, "", self); + } + }] + }, BI.extend(o.popup, { + ref: function (_ref) { + self.conditionsView = _ref; + }, + listeners: [{ + eventName: BI.Controller.EVENT_CHANGE, + action: function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + } + }] + })] + }; + }, + + getValue: function () { + return { + type: this.expander.getValue(), + value: this.conditionsView.getValue(), + id: this.options.id + }; + }, + + populate: function () { + this.conditionsView.populate.apply(this.conditionsView, arguments); + } + }); + BI.shortcut("bi.filter_expander", FilterExpander); +}());/** + * Created by Urthur on 2017/12/21. + */ +!(function () { + BI.constant("bi.constant.component.filter", { + FORMULA_COMBO: [{ + text: BI.i18nText("BI-Conf_Formula_And"), + value: BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_AND + }, { + text: BI.i18nText("BI-Conf_Formula_Or"), + value: BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_OR + }], + CONDITION_COMBO: [{ + text: BI.i18nText("BI-Conf_Condition_And"), + value: BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_AND + }, { + text: BI.i18nText("BI-Conf_Condition_Or"), + value: BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_OR + }] + }); +}());/** + * 过滤 + * + * Created by GUY on 2015/11/20. + * @class BI.Filter + * @extend BI.Widget + */ +BI.Filter = BI.inherit(BI.Widget, { + + constants: { + FIELD_TYPE_NUMBER: 1, + FIELD_TYPE_STRING: 0, + FIELD_TYPE_DATE: 2 + }, + + props: { + baseCls: "bi-filter", + expander: {}, + items: [], + el: {}, + itemCreator: BI.empty + }, + + render: function () { + var self = this, o = this.options; + return BI.extend({ + type: "bi.filter_operation", + expander: o.expander, + listeners: [{ + eventName: "EVENT_OPERATION", + action: function (type) { + switch (type) { + case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION: + case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_AND: + self._addAndOrCondition(BI.Filter.FILTER_TYPE.EMPTY_CONDITION); + break; + case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_OR: + self._addAndOrCondition(BI.Filter.FILTER_TYPE.EMPTY_CONDITION, 1); + break; + case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA: + case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_AND: + self._addAndOrCondition(BI.Filter.FILTER_TYPE.EMPTY_FORMULA); + break; + case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_OR: + self._addAndOrCondition(BI.Filter.FILTER_TYPE.EMPTY_FORMULA, 1); + break; + } + } + }, { + eventName: "BI.FilterOperation.EVENT_DESTROY_ITEM", + action: function (id) { + self._removeCondition(id); + } + }], + ref: function (_ref) { + self.filter = _ref; + } + }, o.el); + }, + + mounted: function () { + this.tree = new BI.Tree(); + this.tree.initTree(this.options.items); + this._populate(this.tree.toJSONWithNode()); + }, + + _createEmptyNode: function (type) { + var node = new BI.Node(BI.UUID()); + node.set("data", { + value: type + }); + return node; + }, + + _insertAndOrCondition: function (id, formulaOrField, type) { + var ANDOR = ["AND", "OR"]; + type || (type = 0); + var finded = this.tree.search(id); + if (BI.isNotNull(finded)) { + var data = finded.get("data"); + var parent = finded.getParent(); + var index = parent.getChildIndex(finded.id); + var pdata = parent.get("data") || {}; + var node = this._createEmptyNode(formulaOrField); + if (data.value === BI.Filter.FILTER_TYPE[ANDOR[type]]) { + this.tree.addNode(finded, node); + return; + } + if (data.value === BI.Filter.FILTER_TYPE[ANDOR[1 - type]]) { + if (pdata.value === BI.Filter.FILTER_TYPE[ANDOR[type]]) { + parent.addChild(node, index + 1); + return; + } + } + if ((data.value === BI.Filter.FILTER_TYPE[ANDOR[1 - type]] && pdata.value !== BI.Filter.FILTER_TYPE[ANDOR[type]]) + || pdata.value === BI.Filter.FILTER_TYPE[ANDOR[1 - type]] + || (pdata.value !== BI.Filter.FILTER_TYPE.AND && pdata.value !== BI.Filter.FILTER_TYPE.OR)) { + var andor = new BI.Node(BI.UUID()); + andor.set("data", { + value: BI.Filter.FILTER_TYPE[ANDOR[type]], + children: [finded.get("data"), node.get("data")] + }); + parent.removeChildByIndex(index); + parent.addChild(andor, index); + andor.addChild(finded); + andor.addChild(node); + return; + } + parent.addChild(node, index + 1); + } + }, + + _removeCondition: function (id) { + var finded = this.tree.search(id); + if (BI.isNotNull(finded)) { + var parent = finded.getParent(); + parent.removeChild(id); + if (parent.getChildrenLength() <= 1) { + var prev = parent.getParent(); + if (BI.isNotNull(prev)) { + var index = prev.getChildIndex(parent.id); + prev.removeChildByIndex(index); + if (parent.getChildrenLength() === 1) { + prev.addChild(parent.getFirstChild(), index); + } + } + } + this._populate(this.tree.toJSONWithNode()); + this.fireEvent("EVENT_CHANGE"); + } + }, + + _addAndOrCondition: function (formulaOrField, type) { + var ANDOR = ["AND", "OR"]; + type || (type = 0); + var currentSelectItem = this.filter.getCurrentSelectItem(); + if (BI.isNotNull(currentSelectItem)) { + var id = currentSelectItem.attr("id"); + this._insertAndOrCondition(id, formulaOrField, type); + } else { + var node = this._createEmptyNode(formulaOrField); + var root = this.tree.getRoot(); + var child = root.getLastChild(); + if (BI.isNotNull(child)) { + var data = child.get("data"); + if (data.value === BI.Filter.FILTER_TYPE[ANDOR[type]]) { + this.tree.addNode(child, node); + } else { + var andor = new BI.Node(BI.UUID()); + andor.set("data", { + value: BI.Filter.FILTER_TYPE[ANDOR[type]], + children: [child.get("data"), node.get("data")] + }); + root.removeChild(child.id); + this.tree.addNode(andor); + this.tree.addNode(andor, child); + this.tree.addNode(andor, node); + } + } else { + this.tree.addNode(node); + } + } + this._populate(this.tree.toJSONWithNode()); + this.fireEvent("EVENT_CHANGE"); + }, + + _populate: function (items) { + this.filter.defaultState(); + var o = this.options; + o.items = items; + BI.Tree.traversal(items, function (i, item) { + o.itemCreator(item); + }); + this.filter.populate.apply(this.filter, [items]); + }, + + populate: function (conditions) { + this.tree.initTree(conditions); + this._populate(this.tree.toJSONWithNode()); + }, + + getValue: function () { + return this.filter.getValue(); + } +}); + +BI.shortcut("bi.filter", BI.Filter); + +BI.Filter.FILTER_TYPE = {}; +BI.Filter.FILTER_TYPE.FORMULA = 33; +BI.Filter.FILTER_TYPE.AND = 34; +BI.Filter.FILTER_TYPE.OR = 35; +BI.Filter.FILTER_TYPE.EMPTY_FORMULA = 36; +BI.Filter.FILTER_TYPE.EMPTY_CONDITION = 37; +/** + * Created by windy on 2017/3/28. + */ +!(function () { + var FilterList = BI.inherit(BI.ButtonTree, { + props: { + baseCls: "bi-button-map" + }, + + _createBtns: function (items) { + var o = this.options; + var buttons = BI.createWidgets(BI.createItems(items, {type: "bi.text_button", once: o.chooseType === 0})); + var keys = BI.map(items, function (i, item) { + item = BI.stripEL(item); + if (!(item.id || item.value)) { + throw new Error("item must have 'id' or 'value' as its property"); + } + return item.id || item.value; + }); + return BI.zipObject(keys, buttons); + }, + + setValue: function (v) { + v = BI.isArray(v) ? v : [v]; + BI.each(this.buttons, function (val, item) { + if (!BI.isFunction(item.setSelected)) { + item.setValue(v); + return; + } + if (v.contains(val)) { + item.setSelected && item.setSelected(true); + } else { + item.setSelected && item.setSelected(false); + } + }); + }, + + setNotSelectedValue: function (v) { + v = BI.isArray(v) ? v : [v]; + BI.each(this.buttons, function (val, item) { + if (!BI.isFunction(item.setSelected)) { + item.setNotSelectedValue(v); + return; + } + if (v.contains(val)) { + item.setSelected && item.setSelected(false); + } else { + item.setSelected && item.setSelected(true); + } + }); + }, + + populate: function (items) { + var self = this; + var args = [].slice.call(arguments); + var linkHashMap = new BI.LinkHashMap(); + var val = function (item) { + return item.id || item.value; + }; + if (!this.buttons) { + this.buttons = {}; + } + // 所有已存在的和新添加的 + var willCreated = []; + BI.each(items, function (i, item) { + item = BI.stripEL(item); + if (self.buttons[val(item)]) { + var ob = self.buttons[val(item)]; + args[0] = item.items; + args[2] = item; + ob.populate && ob.populate.apply(ob, args); + } else { + willCreated.push(item); + } + }); + // 创建新元素 + args[0] = willCreated; + var newBtns = this._btnsCreator.apply(this, args); + + // 整理 + var array = []; + BI.each(items, function (i, item) { + item = BI.stripEL(item); + var button = self.buttons[val(item)] || newBtns[val(item)]; + linkHashMap.add(val(item), button); + array.push(button); + }); + this.buttons = linkHashMap.map; + + BI.DOM.hang(this.buttons); + this.element.empty(); + + var packages = this._packageItems(items, this._packageBtns(array)); + BI.createWidget(BI.extend({element: this}, this._packageLayout(packages))); + }, + + getIndexByValue: function () { + throw new Error("Can not use getIndexByValue"); + } + }); + BI.shortcut("bi.filter_list", FilterList); +}());/** + * 过滤条件 + * + * Created by GUY on 2015/9/25. + * @class BI.FilterOperation + * @extend BI.Widget + */ +!(function () { + var OPERATION_ADD_CONDITION = 0, OPERATION_ADD_ANDOR_CONDITION = 1; + var FilterOperation = BI.inherit(BI.Widget, { + props: { + baseCls: "bi-filter-operation", + expander: {}, + items: [], + selections: [BI.AbstractFilterItem.FILTER_OPERATION_CONDITION, BI.AbstractFilterItem.FILTER_OPERATION_FORMULA], + itemsCreator: BI.emptyFn + }, + + render: function () { + var self = this, o = this.options; + this.currentSelected = null; + + return { + type: "bi.vtape", + items: [{ + el: { + type: "bi.tab", + showIndex: OPERATION_ADD_CONDITION, + cardCreator: BI.bind(this._createTabs, this), + ref: function (_ref) { + self.buttonComboTab = _ref; + } + }, + height: 40 + }, { + el: { + type: "bi.absolute", + scrollable: true, + items: [{ + el: { + type: "bi.left", + items: [{ + type: "bi.filter_pane", + expander: o.expander, + items: o.items, + itemsCreator: o.itemsCreator, + listeners: [{ + eventName: "EVENT_CHANGE", + action: function (type, value, obj) { + if (type === BI.Events.CLICK) { + if (BI.isNotNull(self.currentSelected) && self.currentSelected === obj) { + obj.setSelectedCondition(!obj.isSelectedCondition()); + } else { + if (BI.isNotNull(self.currentSelected)) { + self.currentSelected.setSelectedCondition(false); + } + self.currentSelected = obj; + obj.setSelectedCondition(true); + } + if (self.currentSelected.isSelectedCondition()) { + self.buttonComboTab.setSelect(OPERATION_ADD_ANDOR_CONDITION); + } else { + self.buttonComboTab.setSelect(OPERATION_ADD_CONDITION); + } + } + if (type === BI.Events.DESTROY) { + if (self.currentSelected === obj) { + self.currentSelected = null; + self.buttonComboTab.setSelect(OPERATION_ADD_CONDITION); + } + self.fireEvent("BI.FilterOperation.EVENT_DESTROY_ITEM", value, obj); + } + } + }], + ref: function (_ref) { + self.filter = _ref; + } + }] + }, + top: 0, + right: 2, + bottom: 0, + left: 0 + }] + } + }] + }; + }, + + _createTabs: function (v) { + var self = this; + switch (v) { + case OPERATION_ADD_CONDITION: + return { + type: "bi.button_group", + items: BI.createItems(self._createButtons(), { + type: "bi.icon_text_item", + height: 30, + width: 100 + }), + chooseType: BI.ButtonGroup.CHOOSE_TYPE_DEFAULT, + layouts: [{ + type: "bi.left", + vgap: 5 + }], + listeners: [{ + eventName: BI.ButtonGroup.EVENT_CHANGE, + action: function (value, obj) { + if (BI.isEmptyArray(self.filter.getValue())) { + self.filter.element.addClass("bi-border-top bi-border-left"); + } + self.fireEvent("EVENT_OPERATION", obj.getValue()); + self.defaultState(); + } + }] + }; + case OPERATION_ADD_ANDOR_CONDITION: + return { + type: "bi.button_group", + chooseType: BI.ButtonGroup.CHOOSE_TYPE_DEFAULT, + items: self._buildOperationButton(), + layouts: [{ + type: "bi.left", + vgap: 5 + }] + }; + } + }, + + _createButtons: function () { + var buttons = []; + BI.each(this.options.selections, function (i, type) { + switch (type) { + case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA: + buttons.push({ + text: BI.i18nText("BI-Conf_Add_Formula"), + value: BI.AbstractFilterItem.FILTER_OPERATION_FORMULA, + cls: "operation-trigger filter-formula-font" + }); + break; + case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION: + buttons.push({ + text: BI.i18nText("BI-Conf_Add_Condition"), + value: BI.AbstractFilterItem.FILTER_OPERATION_CONDITION, + cls: "operation-trigger filter-condition-font" + }); + break; + } + }); + return buttons; + }, + + _buildOperationButton: function () { + var self = this, combos = []; + BI.each(this.options.selections, function (i, type) { + var text = "", cls = "", items = []; + switch (type) { + case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA: + text = BI.i18nText("BI-Conf_Add_Formula"); + cls = "filter-formula-font"; + items = BI.Constants.getConstant("bi.constant.component.filter").FORMULA_COMBO; + break; + case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION: + default: + text = BI.i18nText("BI-Conf_Add_Condition"); + cls = "filter-condition-font"; + items = BI.Constants.getConstant("bi.constant.component.filter").CONDITION_COMBO; + break; + } + + var trigger = BI.createWidget({ + type: "bi.icon_text_item", + cls: "operation-trigger " + cls, + text: text, + height: 30, + width: 100 + }); + combos.push({ + type: "bi.combo", + el: trigger, + popup: { + el: { + type: "bi.button_group", + chooseType: BI.ButtonGroup.CHOOSE_TYPE_NONE, + items: BI.createItems(items, { + type: "bi.single_select_item", + height: 25 + }), + layouts: [{ + type: "bi.vertical" + }] + } + }, + listeners: [{ + eventName: BI.Combo.EVENT_CHANGE, + action: function (value, obj) { + if (BI.isEmptyArray(self.filter.getValue())) { + self.filter.element.addClass("bi-border-top bi-border-left"); + } + + switch (value) { + case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_AND: + case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_OR: + trigger.setText(BI.i18nText("BI-Conf_Add_Condition")); + break; + case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_AND: + case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_OR: + trigger.setText(BI.i18nText("BI-Conf_Add_Formula")); + break; + default: + trigger.setText(); + } + self.fireEvent("EVENT_OPERATION", obj.getValue()); + self.defaultState(); + this.hideView(); + } + }] + }); + }); + return combos; + }, + + defaultState: function () { + if (BI.isNotNull(this.currentSelected)) { + this.currentSelected.setSelectedCondition(false); + } + this.buttonComboTab.setSelect(OPERATION_ADD_CONDITION); + }, + + getCurrentSelectItem: function () { + if (BI.isNotNull(this.currentSelected) && this.currentSelected.isSelectedCondition()) { + return this.currentSelected; + } + }, + + populate: function (items) { + this.filter.populate.apply(this.filter, arguments); + }, + + getValue: function () { + return this.filter.getValue(); + } + }); + BI.shortcut("bi.filter_operation", FilterOperation); +}()); +/** + * @class BI.FilterPane + * @extend BI.Widget + * 过滤面板 + */ +!(function () { + var FilterPane = BI.inherit(BI.Widget, { + props: { + baseCls: "bi-filter-pane", + expander: {}, + items: [], + itemsCreator: BI.emptyFn + }, + + render: function () { + var self = this, o = this.options; + return { + type: "bi.custom_tree", + cls: BI.isNotEmptyArray(o.items) ? "bi-border-top bi-border-left" : "", + expander: BI.extend({ + type: "bi.filter_expander", + el: {}, + popup: { + type: "bi.custom_tree" + } + }, o.expander), + el: { + type: "bi.filter_list", + chooseType: BI.ButtonGroup.CHOOSE_TYPE_DEFAULT, + layouts: [{ + type: "bi.vertical", + scrolly: false + }] + }, + items: o.items, + listeners: [{ + eventName: BI.Controller.EVENT_CHANGE, + action: function () { + self.fireEvent("EVENT_CHANGE", arguments); + } + }], + ref: function (_ref) { + self.tree = _ref; + } + }; + }, + + populate: function (items) { + if (BI.isNotEmptyArray(items)) { + this.element.addClass("bi-border-top bi-border-left"); + } else { + this.element.removeClass("bi-border-top bi-border-left"); + } + this.tree.populate.apply(this.tree, arguments); + }, + + getValue: function () { + return this.tree.getValue(); + } + }); + BI.shortcut("bi.filter_pane", FilterPane); +}());/** * Created by zcf on 2016/9/26. */ BI.IntervalSlider = BI.inherit(BI.Widget, { @@ -110606,5 +111395,13 @@ BI.i18n = { "BI-Basic_Year_Quarter": "年季度", "BI-Basic_Input_From_To_Number": "请输入{R1}的数值", "BI-Basic_Input_Can_Not_Null": "输入框不能为空", - "BI-Basic_Date_Time_Error_Text": "日期格式示例:2015-3-11 00:00:00" + "BI-Basic_Date_Time_Error_Text": "日期格式示例:2015-3-11 00:00:00", + "BI-Basic_Or": "或", + "BI-Basic_And": "且", + "BI-Conf_Add_Formula": "添加公式", + "BI-Conf_Add_Condition": "添加条件", + "BI-Conf_Formula_And": "且公式条件", + "BI-Conf_Formula_Or": "或公式条件", + "BI-Conf_Condition_And": "且条件", + "BI-Conf_Condition_Or": "或条件" }; \ No newline at end of file diff --git a/dist/bundle.min.css b/dist/bundle.min.css index d0d183baa..a56511a14 100644 --- a/dist/bundle.min.css +++ b/dist/bundle.min.css @@ -1 +1 @@ -/*! normalize.css v1.0.0 | MIT License | git.io/normalize */dl,h3,menu,ol,p,pre,ul{margin:1em 0}.b-font,i{-webkit-text-stroke-width:.2px;-moz-osx-font-smoothing:grayscale}.cm-em,dfn{font-style:italic}.bi-label,.bi-text,.overflow-dot{text-overflow:ellipsis}.bi-excel-table-header-cell,.bi-preview-table-header-cell,.cm-header,.cm-strong,b,strong{font-weight:700}.b-font,body,i{-moz-osx-font-smoothing:grayscale}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}h2{font-size:1.5em;margin:.83em 0}h3{font-size:1.17em}h4{font-size:1em;margin:1.33em 0}h5{font-size:.83em;margin:1.67em 0}h6{font-size:.75em;margin:2.33em 0}abbr[title]{border-bottom:1px dotted}blockquote{margin:1em 40px}mark{background:#ff0;color:#000}.base-disabled,.base-disabled .b-font:before,.base-disabled .bi-input,.base-disabled .bi-textarea{color:#9ea6b2!important}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}small,sub,sup{font-size:75%}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}q{quotes:none}q:after,q:before{content:'';content:none}sub,sup{line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dd{margin:0 0 0 40px}menu,ol,ul{padding:0 0 0 40px}nav ol,nav ul{list-style:none}img{border:0;-ms-interpolation-mode:bicubic}svg:not(:root){overflow:hidden}figure,form{margin:0}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0;white-space:normal}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline}button,input{line-height:normal}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],input[disabled]{cursor:default}.base-disabled,.base-invalid{cursor:default!important}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}.bi-collection-table-cell,.bi-text,.border-sizing{-moz-box-sizing:border-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}*,a,body,div,html,img,li,ol,p,span,ul{margin:0;padding:0}a{outline:0;text-decoration:none}a:focus{outline:0}input::-webkit-contacts-auto-fill-button{visibility:hidden;display:none!important;pointer-events:none;position:absolute;right:0}input::-ms-clear{display:none}input,textarea{margin:0;padding:0;outline:0;border:1px solid #d4dadd}ul{list-style:disc}li{list-style-type:none}i{-webkit-font-smoothing:antialiased}.bi-theme-dark input,.bi-theme-dark textarea{border:1px solid #525466}.bi-theme-dark .base-disabled,.bi-theme-dark .base-disabled .b-font:before,.bi-theme-dark .base-disabled .bi-input,.bi-theme-dark .base-disabled .bi-textarea{color:#666!important}.clearfix:after,.clearfix:before{content:" ";display:table;line-height:0}.clearfix:after{clear:both}.bi-background{background-color:#fafbfc;color:#3d4d66}.bi-background .bi-input,.bi-background .bi-textarea{color:#3d4d66}.bi-theme-dark .bi-background{background-color:#191B2B;color:#ccc}.bi-theme-dark .bi-background .bi-input,.bi-theme-dark .bi-background .bi-textarea{color:#ccc}.bi-card,.bi-card .bi-input,.bi-card .bi-textarea{color:#3d4d66}.bi-card{background-color:#fff}.bi-theme-dark .bi-card{background-color:#242640;color:#ccc}.bi-theme-dark .bi-card .bi-input,.bi-theme-dark .bi-card .bi-textarea{color:#ccc}.bi-disabled,.bi-disabled .bi-input,.bi-disabled .bi-textarea{color:#9ea6b2}.bi-theme-dark .bi-disabled,.bi-theme-dark .bi-disabled .bi-input,.bi-theme-dark .bi-disabled .bi-textarea{color:#666}.bi-tips,.bi-tips .bi-input,.bi-tips .bi-textarea{color:#c4c9d1}.bi-border{border:1px solid #d4dadd}.bi-theme-dark .bi-border{border:1px solid #525466}.bi-border-left{border-left:1px solid #d4dadd}.bi-theme-dark .bi-border-left{border-left:1px solid #525466}.bi-border-right{border-right:1px solid #d4dadd}.bi-theme-dark .bi-border-right{border-right:1px solid #525466}.bi-border-top{border-top:1px solid #d4dadd}.bi-theme-dark .bi-border-top{border-top:1px solid #525466}.bi-border-bottom{border-bottom:1px solid #d4dadd}.bi-theme-dark .bi-border-bottom{border-bottom:1px solid #525466}.bi-keyword-red-mark,.bi-keyword-red-mark .bi-input,.bi-keyword-red-mark .bi-textarea{color:#faaa39}.bi-high-light,.bi-high-light .bi-input,.bi-high-light .bi-textarea{color:#3685f2}.bi-high-light-background{background-color:#3f8ce8;color:#fff}.bi-high-light-background .bi-input,.bi-high-light-background .bi-textarea{color:#fff}.bi-high-light-border{border-color:#178cdf}.bi-water-mark{color:#ccc;cursor:text}.bi-water-mark .bi-input,.bi-water-mark .bi-textarea{color:#ccc}.bi-theme-dark .bi-water-mark,.bi-theme-dark .bi-water-mark .bi-input,.bi-theme-dark .bi-water-mark .bi-textarea{color:#666}.bi-mask,.bi-mask .bi-input,.bi-mask .bi-textarea{color:#fff}.bi-resizer{background:#1a1a1a;opacity:.2;filter:alpha(opacity=20);z-index:1000000000!important}.bi-theme-dark .bi-resizer{background:#fff}.bi-mask{background-color:rgba(26,26,26,.2);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#331a1a1a, endColorstr=#331a1a1a)}.bi-theme-dark .bi-mask{color:#242640;background-color:rgba(255,255,255,.2);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#33ffffff, endColorstr=#33ffffff)}.bi-theme-dark .bi-mask .bi-input,.bi-theme-dark .bi-mask .bi-textarea{color:#242640}.bi-z-index-mask{color:#fff;background-color:rgba(26,26,26,.5);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#801a1a1a, endColorstr=#801a1a1a)}.bi-z-index-mask .bi-input,.bi-z-index-mask .bi-textarea{color:#fff}.bi-list-item.hover,.bi-list-item:hover{color:#1a1a1a;background-color:rgba(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.bi-list-item.hover .bi-input,.bi-list-item.hover .bi-textarea,.bi-list-item:hover .bi-input,.bi-list-item:hover .bi-textarea{color:#1a1a1a}.bi-list-item.disabled,.bi-list-item.disabled:active,.bi-list-item.disabled:hover{background-color:transparent!important;color:#9ea6b2!important}.bi-list-item.disabled .bi-high-light,.bi-list-item.disabled .bi-input,.bi-list-item.disabled .bi-textarea,.bi-list-item.disabled:active .bi-high-light,.bi-list-item.disabled:active .bi-input,.bi-list-item.disabled:active .bi-textarea,.bi-list-item.disabled:hover .bi-high-light,.bi-list-item.disabled:hover .bi-input,.bi-list-item.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item.hover,.bi-theme-dark .bi-list-item:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item.hover .bi-input,.bi-theme-dark .bi-list-item.hover .bi-textarea,.bi-theme-dark .bi-list-item:hover .bi-input,.bi-theme-dark .bi-list-item:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item.disabled,.bi-theme-dark .bi-list-item.disabled:active,.bi-theme-dark .bi-list-item.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item.disabled .bi-high-light,.bi-theme-dark .bi-list-item.disabled .bi-input,.bi-theme-dark .bi-list-item.disabled .bi-textarea,.bi-theme-dark .bi-list-item.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item.disabled:active .bi-input,.bi-theme-dark .bi-list-item.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item.disabled:hover .bi-input,.bi-theme-dark .bi-list-item.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-border.active,.bi-list-item-border:active{border:1px solid #178cdf}.bi-list-item-simple.hover,.bi-list-item-simple.hover .bi-input,.bi-list-item-simple.hover .bi-textarea,.bi-list-item-simple:hover,.bi-list-item-simple:hover .bi-input,.bi-list-item-simple:hover .bi-textarea{color:#3685f2}.bi-list-item-simple.disabled,.bi-list-item-simple.disabled .bi-high-light,.bi-list-item-simple.disabled .bi-input,.bi-list-item-simple.disabled .bi-textarea,.bi-list-item-simple.disabled:active,.bi-list-item-simple.disabled:active .bi-high-light,.bi-list-item-simple.disabled:active .bi-input,.bi-list-item-simple.disabled:active .bi-textarea,.bi-list-item-simple.disabled:hover,.bi-list-item-simple.disabled:hover .bi-high-light,.bi-list-item-simple.disabled:hover .bi-input,.bi-list-item-simple.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-list-item-effect:hover,.bi-list-item-effect:hover .bi-input,.bi-list-item-effect:hover .bi-textarea{color:#1a1a1a}.bi-list-item-effect.active,.bi-list-item-effect.active .bi-input,.bi-list-item-effect.active .bi-textarea,.bi-list-item-effect:active,.bi-list-item-effect:active .bi-input,.bi-list-item-effect:active .bi-textarea{color:#3685f2}.bi-list-item-effect.disabled,.bi-list-item-effect.disabled .bi-high-light,.bi-list-item-effect.disabled .bi-input,.bi-list-item-effect.disabled .bi-textarea,.bi-list-item-effect.disabled:active,.bi-list-item-effect.disabled:active .bi-high-light,.bi-list-item-effect.disabled:active .bi-input,.bi-list-item-effect.disabled:active .bi-textarea,.bi-list-item-effect.disabled:hover,.bi-list-item-effect.disabled:hover .bi-high-light,.bi-list-item-effect.disabled:hover .bi-input,.bi-list-item-effect.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item-effect:hover,.bi-theme-dark .bi-list-item-effect:hover .bi-input,.bi-theme-dark .bi-list-item-effect:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-effect.active,.bi-theme-dark .bi-list-item-effect.active .bi-input,.bi-theme-dark .bi-list-item-effect.active .bi-textarea,.bi-theme-dark .bi-list-item-effect:active,.bi-theme-dark .bi-list-item-effect:active .bi-input,.bi-theme-dark .bi-list-item-effect:active .bi-textarea{color:#3685f2}.bi-theme-dark .bi-list-item-effect.disabled,.bi-theme-dark .bi-list-item-effect.disabled:active,.bi-theme-dark .bi-list-item-effect.disabled:hover{background-color:transparent!important;color:#666!important}.bi-list-item-active.active,.bi-list-item-active.hover,.bi-list-item-active:active,.bi-list-item-active:hover{background-color:rgba(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.bi-theme-dark .bi-list-item-effect.disabled .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled .bi-input,.bi-theme-dark .bi-list-item-effect.disabled .bi-textarea,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-input,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-active.hover,.bi-list-item-active.hover .bi-input,.bi-list-item-active.hover .bi-textarea,.bi-list-item-active:hover,.bi-list-item-active:hover .bi-input,.bi-list-item-active:hover .bi-textarea{color:#1a1a1a}.bi-list-item-active.active,.bi-list-item-active.active .bi-input,.bi-list-item-active.active .bi-textarea,.bi-list-item-active:active,.bi-list-item-active:active .bi-input,.bi-list-item-active:active .bi-textarea{color:#3685f2}.bi-list-item-active.disabled,.bi-list-item-active.disabled:active,.bi-list-item-active.disabled:hover{background-color:transparent!important;color:#9ea6b2!important}.bi-list-item-active.disabled .bi-high-light,.bi-list-item-active.disabled .bi-input,.bi-list-item-active.disabled .bi-textarea,.bi-list-item-active.disabled:active .bi-high-light,.bi-list-item-active.disabled:active .bi-input,.bi-list-item-active.disabled:active .bi-textarea,.bi-list-item-active.disabled:hover .bi-high-light,.bi-list-item-active.disabled:hover .bi-input,.bi-list-item-active.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item-active.hover,.bi-theme-dark .bi-list-item-active:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-active.hover .bi-input,.bi-theme-dark .bi-list-item-active.hover .bi-textarea,.bi-theme-dark .bi-list-item-active:hover .bi-input,.bi-theme-dark .bi-list-item-active:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-active.active,.bi-theme-dark .bi-list-item-active:active{color:#3685f2;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-active.active .bi-input,.bi-theme-dark .bi-list-item-active.active .bi-textarea,.bi-theme-dark .bi-list-item-active:active .bi-input,.bi-theme-dark .bi-list-item-active:active .bi-textarea{color:#3685f2}.bi-theme-dark .bi-list-item-active.disabled,.bi-theme-dark .bi-list-item-active.disabled:active,.bi-theme-dark .bi-list-item-active.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-active.disabled .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled .bi-input,.bi-theme-dark .bi-list-item-active.disabled .bi-textarea,.bi-theme-dark .bi-list-item-active.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled:active .bi-input,.bi-theme-dark .bi-list-item-active.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-active2.hover,.bi-list-item-active2:hover{color:#1a1a1a;background-color:#fff}.bi-list-item-active2.hover .bi-input,.bi-list-item-active2.hover .bi-textarea,.bi-list-item-active2:hover .bi-input,.bi-list-item-active2:hover .bi-textarea{color:#1a1a1a}.bi-list-item-active2.active,.bi-list-item-active2:active{color:#3685f2;background-color:#fff}.bi-list-item-active2.active .bi-input,.bi-list-item-active2.active .bi-textarea,.bi-list-item-active2:active .bi-input,.bi-list-item-active2:active .bi-textarea{color:#3685f2}.bi-list-item-active2.disabled,.bi-list-item-active2.disabled:active,.bi-list-item-active2.disabled:hover{background-color:transparent!important;color:#9ea6b2!important}.bi-list-item-active2.disabled .bi-high-light,.bi-list-item-active2.disabled .bi-input,.bi-list-item-active2.disabled .bi-textarea,.bi-list-item-active2.disabled:active .bi-high-light,.bi-list-item-active2.disabled:active .bi-input,.bi-list-item-active2.disabled:active .bi-textarea,.bi-list-item-active2.disabled:hover .bi-high-light,.bi-list-item-active2.disabled:hover .bi-input,.bi-list-item-active2.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item-active2.hover,.bi-theme-dark .bi-list-item-active2:hover{color:#fff;background-color:#242640}.bi-theme-dark .bi-list-item-active2.hover .bi-input,.bi-theme-dark .bi-list-item-active2.hover .bi-textarea,.bi-theme-dark .bi-list-item-active2:hover .bi-input,.bi-theme-dark .bi-list-item-active2:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-active2.active,.bi-theme-dark .bi-list-item-active2:active{color:#3685f2;background-color:#242640}.bi-theme-dark .bi-list-item-active2.active .bi-input,.bi-theme-dark .bi-list-item-active2.active .bi-textarea,.bi-theme-dark .bi-list-item-active2:active .bi-input,.bi-theme-dark .bi-list-item-active2:active .bi-textarea{color:#3685f2}.bi-theme-dark .bi-list-item-active2.disabled,.bi-theme-dark .bi-list-item-active2.disabled:active,.bi-theme-dark .bi-list-item-active2.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-active2.disabled .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled .bi-input,.bi-theme-dark .bi-list-item-active2.disabled .bi-textarea,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-input,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-select.hover,.bi-list-item-select:hover{color:#1a1a1a;background-color:rgba(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.bi-list-item-select.hover .bi-input,.bi-list-item-select.hover .bi-textarea,.bi-list-item-select:hover .bi-input,.bi-list-item-select:hover .bi-textarea{color:#1a1a1a}.bi-list-item-select.active,.bi-list-item-select:active{color:#fff;background-color:#3f8ce8}.bi-list-item-select.active .bi-high-light,.bi-list-item-select.active .bi-input,.bi-list-item-select.active .bi-textarea,.bi-list-item-select:active .bi-high-light,.bi-list-item-select:active .bi-input,.bi-list-item-select:active .bi-textarea{color:#fff}.bi-list-item-select.button-success.active,.bi-list-item-select.button-success:active{color:#fff;background-color:#58cc7d}.bi-list-item-select.button-success.active .bi-high-light,.bi-list-item-select.button-success.active .bi-input,.bi-list-item-select.button-success.active .bi-textarea,.bi-list-item-select.button-success:active .bi-high-light,.bi-list-item-select.button-success:active .bi-input,.bi-list-item-select.button-success:active .bi-textarea{color:#fff}.bi-list-item-select.button-warning,.bi-list-item-select.button-warning .bi-high-light,.bi-list-item-select.button-warning .bi-input,.bi-list-item-select.button-warning .bi-textarea,.bi-list-item-select.button-warning.hover .bi-high-light,.bi-list-item-select.button-warning.hover .bi-input,.bi-list-item-select.button-warning.hover .bi-textarea,.bi-list-item-select.button-warning:hover .bi-high-light,.bi-list-item-select.button-warning:hover .bi-input,.bi-list-item-select.button-warning:hover .bi-textarea{color:#ff4949}.bi-list-item-select.button-success.active.bi-high-light-border,.bi-list-item-select.button-success:active.bi-high-light-border{border-color:#58cc7d}.bi-list-item-select.button-warning.active.bi-high-light-border,.bi-list-item-select.button-warning.bi-high-light-border,.bi-list-item-select.button-warning.hover.bi-high-light-border,.bi-list-item-select.button-warning:active.bi-high-light-border,.bi-list-item-select.button-warning:hover.bi-high-light-border{border-color:#e85050}.bi-list-item-select.button-warning.hover,.bi-list-item-select.button-warning:hover{color:#ff4949;background-color:#ffecec}.bi-list-item-select.button-warning.active,.bi-list-item-select.button-warning:active{color:#fff;background-color:#ff4949}.bi-list-item-select.button-warning.active .bi-high-light,.bi-list-item-select.button-warning.active .bi-input,.bi-list-item-select.button-warning.active .bi-textarea,.bi-list-item-select.button-warning:active .bi-high-light,.bi-list-item-select.button-warning:active .bi-input,.bi-list-item-select.button-warning:active .bi-textarea{color:#fff}.bi-list-item-select.disabled,.bi-list-item-select.disabled:active,.bi-list-item-select.disabled:hover{color:#9ea6b2!important;background-color:transparent!important}.bi-list-item-select.disabled .bi-high-light,.bi-list-item-select.disabled .bi-input,.bi-list-item-select.disabled .bi-textarea,.bi-list-item-select.disabled:active .bi-high-light,.bi-list-item-select.disabled:active .bi-input,.bi-list-item-select.disabled:active .bi-textarea,.bi-list-item-select.disabled:hover .bi-high-light,.bi-list-item-select.disabled:hover .bi-input,.bi-list-item-select.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-list-item-select.disabled.bi-high-light-border,.bi-list-item-select.disabled:active.bi-high-light-border,.bi-list-item-select.disabled:hover.bi-high-light-border{border-color:#ccc}.bi-theme-dark .bi-list-item-select.hover,.bi-theme-dark .bi-list-item-select:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-select.hover .bi-input,.bi-theme-dark .bi-list-item-select.hover .bi-textarea,.bi-theme-dark .bi-list-item-select:hover .bi-input,.bi-theme-dark .bi-list-item-select:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-select.active,.bi-theme-dark .bi-list-item-select:active{color:#fff;background-color:#3f8ce8}.bi-theme-dark .bi-list-item-select.active .bi-high-light,.bi-theme-dark .bi-list-item-select.active .bi-input,.bi-theme-dark .bi-list-item-select.active .bi-textarea,.bi-theme-dark .bi-list-item-select:active .bi-high-light,.bi-theme-dark .bi-list-item-select:active .bi-input,.bi-theme-dark .bi-list-item-select:active .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-select.disabled,.bi-theme-dark .bi-list-item-select.disabled:active,.bi-theme-dark .bi-list-item-select.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-select.disabled .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled .bi-input,.bi-theme-dark .bi-list-item-select.disabled .bi-textarea,.bi-theme-dark .bi-list-item-select.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled:active .bi-input,.bi-theme-dark .bi-list-item-select.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-none.hover,.bi-list-item-none:hover{color:inherit;background-color:transparent}.bi-list-item-none.hover .bi-input,.bi-list-item-none.hover .bi-textarea,.bi-list-item-none:hover .bi-input,.bi-list-item-none:hover .bi-textarea{color:inherit}.bi-list-item-none.active,.bi-list-item-none:active{color:inherit;background-color:transparent}.bi-list-item-none.active .bi-high-light,.bi-list-item-none.active .bi-input,.bi-list-item-none.active .bi-textarea,.bi-list-item-none:active .bi-high-light,.bi-list-item-none:active .bi-input,.bi-list-item-none:active .bi-textarea{color:inherit}.bi-list-item-none.disabled,.bi-list-item-none.disabled:active,.bi-list-item-none.disabled:hover{color:#9ea6b2!important;background-color:transparent!important}.bi-list-item-none.disabled .bi-high-light,.bi-list-item-none.disabled .bi-input,.bi-list-item-none.disabled .bi-textarea,.bi-list-item-none.disabled:active .bi-high-light,.bi-list-item-none.disabled:active .bi-input,.bi-list-item-none.disabled:active .bi-textarea,.bi-list-item-none.disabled:hover .bi-high-light,.bi-list-item-none.disabled:hover .bi-input,.bi-list-item-none.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item-none.hover,.bi-theme-dark .bi-list-item-none:hover{color:inherit;background-color:transparent}.bi-theme-dark .bi-list-item-none.hover .bi-input,.bi-theme-dark .bi-list-item-none.hover .bi-textarea,.bi-theme-dark .bi-list-item-none:hover .bi-input,.bi-theme-dark .bi-list-item-none:hover .bi-textarea{color:inherit}.bi-theme-dark .bi-list-item-none.active,.bi-theme-dark .bi-list-item-none:active{color:inherit;background-color:transparent}.bi-theme-dark .bi-list-item-none.active .bi-high-light,.bi-theme-dark .bi-list-item-none.active .bi-input,.bi-theme-dark .bi-list-item-none.active .bi-textarea,.bi-theme-dark .bi-list-item-none:active .bi-high-light,.bi-theme-dark .bi-list-item-none:active .bi-input,.bi-theme-dark .bi-list-item-none:active .bi-textarea{color:inherit}.bi-theme-dark .bi-list-item-none.disabled,.bi-theme-dark .bi-list-item-none.disabled:active,.bi-theme-dark .bi-list-item-none.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-none.disabled .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled .bi-input,.bi-theme-dark .bi-list-item-none.disabled .bi-textarea,.bi-theme-dark .bi-list-item-none.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled:active .bi-input,.bi-theme-dark .bi-list-item-none.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-textarea{color:#666!important}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.cursor-move{cursor:move}.CodeMirror-crosshair,.farbtastic *{cursor:crosshair}.y-overflow-auto{overflow-y:auto;overflow-x:hidden}.x-overflow-auto{overflow-y:hidden;overflow-x:auto}.y-overflow-scroll{overflow-y:scroll;overflow-x:hidden}.x-overflow-scroll{overflow-y:hidden;overflow-x:scroll}.overflow-auto{overflow-x:auto;overflow-y:auto}.overflow-scroll{overflow-x:scroll;overflow-y:scroll}.overflow-dot,.overflow-hidden{overflow-x:hidden;overflow-y:hidden}.td-overflow{white-space:normal;word-break:break-all}.overflow-dot{white-space:nowrap}.display-block{display:block}.display-inline{display:inline-block}.vertical-super{vertical-align:super}.vertical-top{vertical-align:top}.horizon-center{text-align:center}.horizon-left{text-align:left}.border-sizing{-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.content-sizing{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;-ms-box-sizing:content-box;box-sizing:content-box}.bi-flex-center-layout{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-flex-align:center;-ms-align-items:center;-o-align-items:center;align-items:center}.bi-flex-horizontal-layout{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:start;-webkit-align-items:flex-start;-moz-align-items:flex-start;-ms-align-items:flex-start;-ms-flex-align:start;-o-align-items:flex-start;align-items:flex-start;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap}.bi-flex-horizontal-layout.middle{-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-ms-flex-align:center;-o-align-items:center;align-items:center}.bi-flex-horizontal-layout.bottom{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-moz-align-items:flex-end;-ms-align-items:flex-end;-ms-flex-align:end;-o-align-items:flex-end;align-items:flex-end}.bi-flex-vertical-center{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-ms-flex-align:center;-o-align-items:center;align-items:center;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap}.bi-flex-vertical-center.stretch{-webkit-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;-o-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-ms-flex-pack:center;-o-justify-content:center;justify-content:center;-webkit-box-align:stretch;-webkit-align-items:stretch;-moz-align-items:stretch;-ms-align-items:stretch;-ms-flex-align:stretch;-o-align-items:stretch;align-items:stretch}.bi-flex-wrapper-center-layout .flex-wrapper-center-layout-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-ms-flex-pack:center;-o-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-ms-flex-align:center;-o-align-items:center;align-items:center;min-width:100%;min-height:100%;float:left}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-ms-flex-pack:start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:flex-start;-webkit-align-items:flex-start;-moz-align-items:flex-start;-ms-align-items:flex-start;-ms-flex-align:start;-o-align-items:flex-start;align-items:flex-start;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap;min-height:100%}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.middle{-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.bottom{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-moz-align-items:flex-end;-ms-align-items:flex-end;-o-align-items:flex-end;align-items:flex-end}.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-ms-flex-pack:start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-ms-flex-align:center;-o-align-items:center;align-items:center;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap;min-height:100%;float:left}.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper.stretch{width:100%;-webkit-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;-o-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-box-align:stretch;-webkit-align-items:stretch;-moz-align-items:stretch;-ms-align-items:stretch;-o-align-items:stretch;align-items:stretch}.bi-theme-dark{background-color:#191B2B;color:#ccc}.bi-theme-dark .bi-input{color:#fff}.bi-color-chooser-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;box-shadow:0 0 2px 1px #d4dadd inset;-webkit-box-shadow:0 0 2px 1px #d4dadd inset;-moz-box-shadow:0 0 2px 1px #d4dadd inset}.bi-color-picker-button .color-picker-button-mask{border:1px solid #1a1a1a}.bi-theme-dark .bi-color-picker-button .color-picker-button-mask{border:1px solid #fff}.bi-color-picker-editor .color-picker-editor-display{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;box-shadow:0 0 2px 1px #d4dadd inset;-webkit-box-shadow:0 0 2px 1px #d4dadd inset;-moz-box-shadow:0 0 2px 1px #d4dadd inset}.farbtastic{position:relative}.farbtastic *{position:absolute}.farbtastic,.farbtastic .wheel{width:195px;height:195px}.farbtastic .color,.farbtastic .overlay{top:47px;left:47px;width:101px;height:101px}.farbtastic .wheel{width:195px;height:195px}.farbtastic .marker{width:17px;height:17px;margin:-8px 0 0 -8px;overflow:hidden}.bi-bubble-combo .button-combo-triangle-wrapper{position:fixed!important;z-index:10000000}.bi-bubble-combo .bubble-combo-triangle-left{z-index:1;position:absolute;width:16px;height:10px;border-bottom:1px solid #f5f5f5}.bi-bubble-combo .bubble-combo-triangle-left:before{position:absolute;top:0;right:0;bottom:0;border-bottom:10px solid #ccc;border-left:8px solid transparent;border-right:8px solid transparent;content:""}.bi-bubble-combo .bubble-combo-triangle-left:after{position:absolute;right:1px;top:1px;bottom:0;border-bottom:9px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent;content:""}.bi-bubble-combo .bubble-combo-triangle-right{z-index:1;position:absolute;width:16px;height:6px;border-bottom:1px solid #f5f5f5}.bi-bubble-combo .bubble-combo-triangle-right:before{position:absolute;top:0;right:0;bottom:0;border-bottom:10px solid #ccc;border-left:8px solid transparent;border-right:8px solid transparent;content:""}.bi-bubble-combo .bubble-combo-triangle-right:after{position:absolute;right:1px;top:1px;bottom:0;border-bottom:9px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent;content:""}.bi-bubble-combo .bubble-combo-triangle-top{z-index:1;position:absolute;width:16px;height:10px;border-top:1px solid #fff}.bi-bubble-combo .bubble-combo-triangle-top:after{position:absolute;right:1px;top:0;border-top:6px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent;content:""}.bi-bubble-combo .bubble-combo-triangle-bottom:before,.bi-bubble-combo .bubble-combo-triangle-top:before{border-left:8px solid transparent;border-right:8px solid transparent;content:"";position:absolute}.bi-bubble-combo .bubble-combo-triangle-top:before{border-top:7px solid #ccc}.bi-bubble-combo .bubble-combo-triangle-bottom{z-index:1;position:absolute;width:16px;height:5px;border-bottom:1px solid #fff}.bi-bubble-combo .bubble-combo-triangle-bottom:before{top:0;right:0;bottom:0;border-bottom:7px solid #ccc}.bi-bubble-combo .bubble-combo-triangle-bottom:after{position:absolute;right:1px;top:1px;bottom:0;border-bottom:6px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent;content:""}.cm-tab-wrap-hack:after,.scrollbar-layout-face:after{content:''}.bi-combo.bi-combo-popup{display:block!important;visibility:visible!important}.bi-search-text-value-combo .trigger-icon-button{font-size:16px}.bi-adapt-editor .adapt-editor-text{font-size:14px}.bi-search-editor .close-font,.bi-search-editor .search-font{font-size:20px}.bi-small-search-editor .bi-editor,.bi-small-search-editor .bi-editor .bi-input,.bi-small-search-editor .bi-editor .bi-label{font-size:12px}.bi-small-search-editor .close-font,.bi-small-search-editor .search-font{font-size:18px}.bi-sign-initial-editor .sign-initial-editor-text{font-size:14px}.CodeMirror{font-family:monospace;cursor:text;width:100%;height:100%}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror div.CodeMirror-cursor{border-left:1px solid #1a1a1a}.bi-theme-dark .CodeMirror div.CodeMirror-cursor{border-left:1px solid #fff}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.CodeMirror.cm-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7}.CodeMirror.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}@-moz-keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}@-webkit-keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}@keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.bi-display-tree .ztree li a:hover,.ztree li a{text-decoration:none}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default span[class*=fieldName]{display:inline-block;color:#fff;background:#3685f2;padding:0 5px;margin:1px}.cm-s-default span[class*=start]{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;margin-left:3px}.cm-s-default span[class*=end]{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;margin-right:3px}.cm-s-default span[class*="start end"]{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.cm-s-default span[class*="#"]{color:#3685f2}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none}.bi-message-text,.bi-page-table-cell{-webkit-user-select:text;-ms-user-select:text;-o-user-select:text;-khtml-user-select:text}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent}.codemirror-high-line-height{line-height:2}.codemirror-low-line-height{line-height:1.4}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-code{outline:0}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.bi-collection-table-cell,.bi-text{-webkit-box-sizing:border-box;-ms-box-sizing:border-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-measure pre{position:static}.CodeMirror div.CodeMirror-cursor{position:absolute;border-right:none;width:0}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}span.CodeMirror-selectedtext{background:0 0}.CodeMirror-hints{position:absolute;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,.2);-moz-box-shadow:2px 3px 5px rgba(0,0,0,.2);box-shadow:2px 3px 5px rgba(0,0,0,.2);border-radius:3px;border:1px solid silver;background:#fff;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto;z-index:1000000000}.bi-label,.bi-segment>.center-element,.bi-text,.bi-textarea-editor{overflow-x:hidden;overflow-y:hidden}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;max-width:19em;overflow:hidden;white-space:pre;color:#000;cursor:pointer}.bi-label,.bi-text,.ztree li{white-space:nowrap}li.CodeMirror-hint-active{background:#08f;color:#fff}.bi-message-title{font-size:16px;cursor:pointer}.bi-message-text{font-size:16px;-moz-user-select:text;user-select:text}.bi-message-content{font-size:16px}.bi-message-close{font-size:25px}.bi-message-animate{-webkit-transition:opacity .3s,transform .4s,-webkit-transform .4s;-moz-transition:opacity .3s,transform .4s,-webkit-transform .4s;-o-transition:opacity .3s,transform .4s,-webkit-transform .4s;transition:opacity .3s,transform .4s,-webkit-transform .4s}.bi-message-enter{opacity:1}.bi-message-leave{opacity:0;transform:translateY(-100%)}.bi-multi-list-view .bi-button-mask{opacity:.1;filter:alpha(opacity=10)}.bi-panel{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-panel .panel-title{background-color:#F2F4F7}.bi-panel .panel-title .panel-title-text{cursor:text;font-size:14px}.bi-all-count-pager .all-pager-next,.bi-all-count-pager .all-pager-prev,.bi-direction-pager .direction-pager-next,.bi-direction-pager .direction-pager-prev,.bi-rich-editor-text-toolbar .text-toolbar-button{font-size:16px}.bi-pager .page-item{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-segment>.center-element{overflow:hidden;background:#fff;border-right:1px solid #d4dadd;border-top:1px solid #d4dadd;border-bottom:1px solid #d4dadd}.bi-segment>.first-element{border-left:1px solid #d4dadd;-webkit-border-radius:6px 0 0 6px;-moz-border-radius:6px 0 0 6px;border-radius:6px 0 0 6px}.bi-segment>.last-element{-webkit-border-radius:0 6px 6px 0;-moz-border-radius:0 6px 6px 0;border-radius:0 6px 6px 0}.bi-theme-dark .bi-segment>.center-element{overflow:hidden;overflow-x:hidden;overflow-y:hidden;background:#242640;border-right:1px solid #525466;border-top:1px solid #525466;border-bottom:1px solid #525466}.bi-theme-dark .bi-segment>.first-element{border-left:1px solid #242640}#body .bi-button,body .bi-button{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;border:1px solid #178cdf;background-color:#3f8ce8;text-align:center;vertical-align:middle;cursor:pointer;font-size:14px}#body .bi-button.clear,#body .bi-button.ghost,body .bi-button.clear,body .bi-button.ghost{background-color:transparent;font-size:inherit}#body .bi-button.block,body .bi-button.block{font-size:inherit;border-width:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}#body .bi-button.clear,body .bi-button.clear{border-width:0}#body .bi-button.clear:hover,body .bi-button.clear:hover{opacity:.9;filter:alpha(opacity=90)}#body .bi-button.clear:active,body .bi-button.clear:active{opacity:.8;filter:alpha(opacity=80)}#body .bi-button.button-common,#body .bi-button.button-common .b-font:before,body .bi-button.button-common,body .bi-button.button-common .b-font:before{color:#fff}#body .bi-button.button-common.clear,#body .bi-button.button-common.clear .b-font:before,#body .bi-button.button-common.ghost,#body .bi-button.button-common.ghost .b-font:before,body .bi-button.button-common.clear,body .bi-button.button-common.clear .b-font:before,body .bi-button.button-common.ghost,body .bi-button.button-common.ghost .b-font:before{color:#3685f2}#body .bi-button.button-common.ghost:hover,body .bi-button.button-common.ghost:hover{color:#fff;background-color:#3f8ce8}#body .bi-button.button-common.ghost:active,body .bi-button.button-common.ghost:active{background-color:#3f8ce8}#body .bi-button.button-ignore,body .bi-button.button-ignore{background-color:#fff;border-color:#178cdf}#body .bi-button.button-ignore,#body .bi-button.button-ignore .b-font:before,body .bi-button.button-ignore,body .bi-button.button-ignore .b-font:before{color:#3685f2}#body .bi-button.button-ignore.clear,body .bi-button.button-ignore.clear{background-color:transparent;border-width:0}#body .bi-button.button-success,body .bi-button.button-success{background-color:#58cc7d;border-color:#58cc7d}#body .bi-button.button-success,#body .bi-button.button-success .b-font:before,body .bi-button.button-success,body .bi-button.button-success .b-font:before{color:#fff}#body .bi-button.button-success.clear,body .bi-button.button-success.clear{background-color:transparent;border-width:0}#body .bi-button.button-success.clear,#body .bi-button.button-success.clear .b-font:before,body .bi-button.button-success.clear,body .bi-button.button-success.clear .b-font:before{color:#5cb75d}#body .bi-button.button-warning,body .bi-button.button-warning{background-color:#faaa39;border-color:#fbb03b}#body .bi-button.button-warning,#body .bi-button.button-warning .b-font:before,body .bi-button.button-warning,body .bi-button.button-warning .b-font:before{color:#fff}#body .bi-button.button-warning.clear,body .bi-button.button-warning.clear{background-color:transparent;border-width:0}#body .bi-button.button-warning.clear,#body .bi-button.button-warning.clear .b-font:before,body .bi-button.button-warning.clear,body .bi-button.button-warning.clear .b-font:before{color:#faaa39}#body .bi-button.button-error,body .bi-button.button-error{background-color:#ff4949;border-color:#e85050}#body .bi-button.button-error,#body .bi-button.button-error .b-font:before,body .bi-button.button-error,body .bi-button.button-error .b-font:before{color:#fff}#body .bi-button.button-error.clear,body .bi-button.button-error.clear{background-color:transparent;border-width:0}#body .bi-button.button-error.clear,#body .bi-button.button-error.clear .b-font:before,body .bi-button.button-error.clear,body .bi-button.button-error.clear .b-font:before{color:#ff4949}#body .bi-button.button-common.disabled,#body .bi-button.button-common.disabled.base-disabled,#body .bi-button.button-error.disabled,#body .bi-button.button-error.disabled.base-disabled,#body .bi-button.button-success.disabled,#body .bi-button.button-success.disabled.base-disabled,#body .bi-button.button-warning.disabled,#body .bi-button.button-warning.disabled.base-disabled,body .bi-button.button-common.disabled,body .bi-button.button-common.disabled.base-disabled,body .bi-button.button-error.disabled,body .bi-button.button-error.disabled.base-disabled,body .bi-button.button-success.disabled,body .bi-button.button-success.disabled.base-disabled,body .bi-button.button-warning.disabled,body .bi-button.button-warning.disabled.base-disabled{background:#ccc!important;border-color:#ccc!important}#body .bi-button.button-common.disabled,#body .bi-button.button-common.disabled .b-font:before,#body .bi-button.button-common.disabled.base-disabled,#body .bi-button.button-common.disabled.base-disabled .b-font:before,#body .bi-button.button-error.disabled,#body .bi-button.button-error.disabled .b-font:before,#body .bi-button.button-error.disabled.base-disabled,#body .bi-button.button-error.disabled.base-disabled .b-font:before,#body .bi-button.button-success.disabled,#body .bi-button.button-success.disabled .b-font:before,#body .bi-button.button-success.disabled.base-disabled,#body .bi-button.button-success.disabled.base-disabled .b-font:before,#body .bi-button.button-warning.disabled,#body .bi-button.button-warning.disabled .b-font:before,#body .bi-button.button-warning.disabled.base-disabled,#body .bi-button.button-warning.disabled.base-disabled .b-font:before,body .bi-button.button-common.disabled,body .bi-button.button-common.disabled .b-font:before,body .bi-button.button-common.disabled.base-disabled,body .bi-button.button-common.disabled.base-disabled .b-font:before,body .bi-button.button-error.disabled,body .bi-button.button-error.disabled .b-font:before,body .bi-button.button-error.disabled.base-disabled,body .bi-button.button-error.disabled.base-disabled .b-font:before,body .bi-button.button-success.disabled,body .bi-button.button-success.disabled .b-font:before,body .bi-button.button-success.disabled.base-disabled,body .bi-button.button-success.disabled.base-disabled .b-font:before,body .bi-button.button-warning.disabled,body .bi-button.button-warning.disabled .b-font:before,body .bi-button.button-warning.disabled.base-disabled,body .bi-button.button-warning.disabled.base-disabled .b-font:before{color:#fff!important}#body .bi-button.button-common.disabled.clear,#body .bi-button.button-common.disabled.clear .b-font:before,#body .bi-button.button-error.disabled.clear,#body .bi-button.button-error.disabled.clear .b-font:before,#body .bi-button.button-ignore.disabled,#body .bi-button.button-ignore.disabled .b-font:before,#body .bi-button.button-ignore.disabled.clear,#body .bi-button.button-ignore.disabled.clear .b-font:before,#body .bi-button.button-success.disabled.clear,#body .bi-button.button-success.disabled.clear .b-font:before,#body .bi-button.button-warning.disabled.clear,#body .bi-button.button-warning.disabled.clear .b-font:before,body .bi-button.button-common.disabled.clear,body .bi-button.button-common.disabled.clear .b-font:before,body .bi-button.button-error.disabled.clear,body .bi-button.button-error.disabled.clear .b-font:before,body .bi-button.button-ignore.disabled,body .bi-button.button-ignore.disabled .b-font:before,body .bi-button.button-ignore.disabled.clear,body .bi-button.button-ignore.disabled.clear .b-font:before,body .bi-button.button-success.disabled.clear,body .bi-button.button-success.disabled.clear .b-font:before,body .bi-button.button-warning.disabled.clear,body .bi-button.button-warning.disabled.clear .b-font:before{color:#9ea6b2!important}#body .bi-button.button-ignore.disabled,body .bi-button.button-ignore.disabled{background:#fff!important;border-color:#d4dadd!important}#body .bi-button.button-common.disabled.clear,#body .bi-button.button-error.disabled.clear,#body .bi-button.button-ignore.disabled.clear,#body .bi-button.button-success.disabled.clear,#body .bi-button.button-warning.disabled.clear,body .bi-button.button-common.disabled.clear,body .bi-button.button-error.disabled.clear,body .bi-button.button-ignore.disabled.clear,body .bi-button.button-success.disabled.clear,body .bi-button.button-warning.disabled.clear{background:0 0!important;border-width:0!important}#body .bi-button.button-common.disabled.clear:active,#body .bi-button.button-common.disabled.clear:hover,#body .bi-button.button-error.disabled.clear:active,#body .bi-button.button-error.disabled.clear:hover,#body .bi-button.button-ignore.disabled.clear:active,#body .bi-button.button-ignore.disabled.clear:hover,#body .bi-button.button-success.disabled.clear:active,#body .bi-button.button-success.disabled.clear:hover,#body .bi-button.button-warning.disabled.clear:active,#body .bi-button.button-warning.disabled.clear:hover,body .bi-button.button-common.disabled.clear:active,body .bi-button.button-common.disabled.clear:hover,body .bi-button.button-error.disabled.clear:active,body .bi-button.button-error.disabled.clear:hover,body .bi-button.button-ignore.disabled.clear:active,body .bi-button.button-ignore.disabled.clear:hover,body .bi-button.button-success.disabled.clear:active,body .bi-button.button-success.disabled.clear:hover,body .bi-button.button-warning.disabled.clear:active,body .bi-button.button-warning.disabled.clear:hover{opacity:1;filter:alpha(opacity=100)}#body .bi-button.button-common.disabled.ghost,#body .bi-button.button-error.disabled.ghost,#body .bi-button.button-ignore.disabled.ghost,#body .bi-button.button-success.disabled.ghost,#body .bi-button.button-warning.disabled.ghost,body .bi-button.button-common.disabled.ghost,body .bi-button.button-error.disabled.ghost,body .bi-button.button-ignore.disabled.ghost,body .bi-button.button-success.disabled.ghost,body .bi-button.button-warning.disabled.ghost{background:0 0!important;border-color:#3685f2!important;opacity:.5;filter:alpha(opacity=50)}#body .bi-button.button-common.disabled.ghost,#body .bi-button.button-common.disabled.ghost .b-font:before,#body .bi-button.button-error.disabled.ghost,#body .bi-button.button-error.disabled.ghost .b-font:before,#body .bi-button.button-ignore.disabled.ghost,#body .bi-button.button-ignore.disabled.ghost .b-font:before,#body .bi-button.button-success.disabled.ghost,#body .bi-button.button-success.disabled.ghost .b-font:before,#body .bi-button.button-warning.disabled.ghost,#body .bi-button.button-warning.disabled.ghost .b-font:before,body .bi-button.button-common.disabled.ghost,body .bi-button.button-common.disabled.ghost .b-font:before,body .bi-button.button-error.disabled.ghost,body .bi-button.button-error.disabled.ghost .b-font:before,body .bi-button.button-ignore.disabled.ghost,body .bi-button.button-ignore.disabled.ghost .b-font:before,body .bi-button.button-success.disabled.ghost,body .bi-button.button-success.disabled.ghost .b-font:before,body .bi-button.button-warning.disabled.ghost,body .bi-button.button-warning.disabled.ghost .b-font:before{color:#3685f2!important}.bi-basic-button.button-common:hover .bi-button-mask,.bi-basic-button.button-error:hover .bi-button-mask,.bi-basic-button.button-ignore:hover .bi-button-mask,.bi-basic-button.button-success:hover .bi-button-mask,.bi-basic-button.button-warning:hover .bi-button-mask{opacity:.1;filter:alpha(opacity=10);background-color:#fff}.bi-basic-button.button-common:active .bi-button-mask,.bi-basic-button.button-error:active .bi-button-mask,.bi-basic-button.button-ignore:active .bi-button-mask,.bi-basic-button.button-success:active .bi-button-mask,.bi-basic-button.button-warning:active .bi-button-mask{opacity:.1;filter:alpha(opacity=10);background-color:#1a1a1a}.bi-theme-dark #body .bi-button.button-common.ghost,.bi-theme-dark #body .bi-button.button-common.ghost .b-font:before,.bi-theme-dark body .bi-button.button-common.ghost,.bi-theme-dark body .bi-button.button-common.ghost .b-font:before{color:#fff;border-color:#fff}.bi-theme-dark #body .bi-button.button-common.ghost:hover,.bi-theme-dark body .bi-button.button-common.ghost:hover{color:#3d4d66;background-color:#fff}.bi-theme-dark #body .bi-button.button-common.ghost:active,.bi-theme-dark body .bi-button.button-common.ghost:active{background-color:rgba(255,255,255,.9);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#e6ffffff, endColorstr=#e6ffffff)}.bi-theme-dark #body .bi-button.button-common.disabled.ghost,.bi-theme-dark body .bi-button.button-common.disabled.ghost{background:0 0!important;border-color:#fff!important;opacity:.5;filter:alpha(opacity=50)}.bi-theme-dark #body .bi-button.button-common.disabled.ghost,.bi-theme-dark #body .bi-button.button-common.disabled.ghost .b-font:before,.bi-theme-dark body .bi-button.button-common.disabled.ghost,.bi-theme-dark body .bi-button.button-common.disabled.ghost .b-font:before{color:#fff!important}.bi-single-select-icon-text-item.active .b-font:before,.bi-single-select-icon-text-item:active .b-font:before{color:#3685f2}.bi-switch{-webkit-border-radius:40px 40px 40px 40px;-moz-border-radius:40px;border-radius:40px;background-color:#d4dadd}.bi-switch.active,.bi-switch:active{background-color:#3f8ce8}.bi-switch .circle-button{-webkit-border-radius:9px 9px 9px 9px;-moz-border-radius:9px;border-radius:9px}.bi-code-editor .param{color:#fff;padding:0 5px;margin:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#3f8ce8;display:inline-block}.bi-code-editor .error-param{color:#ff4949;padding:0 5px;margin:1px;display:inline-block}.bi-multifile-editor .multifile-editor{text-align:right;cursor:pointer;font-size:100px;z-index:2}.bi-resizable-table .resizable-table-region-resizer,.bi-resizable-table-cell .resizable-table-cell-resizer-container{cursor:ew-resize;z-index:1}.bi-shelter-editor .shelter-editor-text,.bi-sign-editor .sign-editor-text{font-size:12px}.bi-textarea-editor{overflow:hidden}.bi-textarea-editor .textarea-editor-content{font-size:12px;border:none}.bi-bubble,.bi-toast{font-size:14px}.x-icon.b-font{margin:auto;width:100%}.bi-file{opacity:0;filter:alpha(opacity=0);z-index:2}.bi-input,.bi-textarea{border:none;outline:0;background-color:transparent;padding:0;margin:0;width:100%;height:100%}.bi-input.bi-input-focus,.bi-textarea.bi-input-focus{border:none}.bi-input.bi-input-error,.bi-textarea.bi-input-error{border:none;color:#ff4949!important}.bi-bubble .bubble-text,.bi-toast{-webkit-border-radius:2px;-moz-border-radius:2px}.bi-label{word-break:break-all}.bi-text{box-sizing:border-box;word-wrap:break-word;word-break:break-word}.bi-bubble .bubble-text{border-radius:2px}.bi-bubble .bubble-error{background:#ffecec;color:#ff4949}.bi-bubble .bubble-common{background:#eaf2fd;color:#3685f2}.bi-bubble .bubble-success{background:#e1f4e7;color:#5cb75d}.bi-bubble .bubble-warning{background:#feeed7;color:#faaa39}.bi-tip{position:fixed!important}.bi-toast{color:#fff;max-width:400px;min-width:150px;border-radius:2px}.bi-toast .toast-icon,.bi-trigger .bi-trigger-icon-button{font-size:16px}.bi-toast.toast-success{background:#58cc7d}.bi-toast.toast-warning{background:#faaa39}.bi-toast.toast-error{background:#ff4949}.bi-toast.toast-normal{background:#3f8ce8}.bi-tooltip{max-width:250px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;font-size:12px;color:#fff}.bi-tooltip.tooltip-success{background:#647185;border:1px solid #647185}.bi-tooltip.tooltip-warning{background:#ff4949;border:1px solid #e85050}.bi-table>div.bottom-left>div>div>table,.bi-table>div.bottom-right>div>div>table,.bi-table>div.top-left>div>div>table,.bi-table>div.top-right>div>div>table,.bi-table>div>div>table{border-right:1px solid #d4dadd;border-bottom:1px solid #d4dadd}.bi-sql-editor .cm-s-default .cm-function,.bi-sql-editor .cm-s-default .cm-keyword,.bi-sql-editor .cm-s-default span[class*="#"]{color:#3685f2}.bi-sql-editor .param{color:#fff;padding:0 5px;margin:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#3f8ce8;display:inline-block}.CodeMirror-hints .sql-fr-function,.CodeMirror-hints .sql-keyword{color:#3685f2}.bi-collection-table-cell{box-sizing:border-box}.bi-grid-table-cell,.bi-sequence-table-dynamic-number .sequence-table-title-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box}.bi-collection-table-cell.first-row{border-top:1px solid #d4dadd}.bi-collection-table-cell.first-col{border-left:1px solid #d4dadd}.bi-theme-dark .bi-collection-table-cell.first-row{border-top:1px solid #525466}.bi-theme-dark .bi-collection-table-cell.first-col{border-left:1px solid #525466}.bi-quick-collection-table>div>.bi-collection{overflow:hidden!important;overflow-x:hidden!important;overflow-y:hidden!important}.bi-table>.first-col{border-left:none}.bi-table>.first-row{border-top:none}.bi-theme-dark .bi-table>div.bottom-left>div>div>table,.bi-theme-dark .bi-table>div.bottom-right>div>div>table,.bi-theme-dark .bi-table>div.top-left>div>div>table,.bi-theme-dark .bi-table>div.top-right>div>div>table,.bi-theme-dark .bi-table>div>div>table{border-right:1px solid #525466;border-bottom:1px solid #525466}.bi-table>div>div>div>table,.bi-table>div>div>table{min-width:100%;clear:both;border-spacing:0;border-collapse:separate}.bi-table>div>div>div>table,.bi-table>div>div>div>table>*>*>td,.bi-table>div>div>div>table>*>*>th,.bi-table>div>div>table,.bi-table>div>div>table>*>*>td,.bi-table>div>div>table>*>*>th{vertical-align:middle;margin:0;padding:0}.bi-table>div>div>div>table>tbody>tr>td,.bi-table>div>div>div>table>thead>tr>td,.bi-table>div>div>table>tbody>tr>td,.bi-table>div>div>table>thead>tr>td{border-top:1px solid #d4dadd;border-left:1px solid #d4dadd}.bi-theme-dark .bi-table>div>div>div>table>tbody>tr>td,.bi-theme-dark .bi-table>div>div>div>table>thead>tr>td,.bi-theme-dark .bi-table>div>div>table>tbody>tr>td,.bi-theme-dark .bi-table>div>div>table>thead>tr>td{border-top:1px solid #525466;border-left:1px solid #525466}.bi-grid-table-cell{box-sizing:border-box}.bi-grid-table-cell.first-row{border-top:1px solid #d4dadd}.bi-grid-table-cell.first-col{border-left:1px solid #d4dadd}.bi-theme-dark .bi-grid-table-cell.first-row{border-top:1px solid #525466}.bi-theme-dark .bi-grid-table-cell.first-col{border-left:1px solid #525466}.scrollbar-layout-main{box-sizing:border-box;outline:0;overflow:hidden;position:absolute;transition-duration:250ms;transition-timing-function:ease;user-select:none;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666);border-radius:5px}.bi-theme-dark .scrollbar-layout-main{background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc)}.scrollbar-layout-main-vertical{bottom:0;right:0;top:0;transition-property:background-color;width:10px}.scrollbar-layout-main-vertical.public-scrollbar-main-active,.scrollbar-layout-main-vertical:hover{width:10px}.scrollbar-layout-main-horizontal{bottom:0;height:10px;left:0;transition-property:background-color;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666)}.bi-theme-dark .scrollbar-layout-main-horizontal{background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc)}.scrollbar-layout-main-horizontal.public-scrollbar-main-active,.scrollbar-layout-main-horizontal:hover{height:10px}.scrollbar-layout-face{left:0;overflow:hidden;position:absolute;z-index:1}.scrollbar-layout-face:after{border-radius:6px;display:block;position:absolute;transition:background-color 250ms ease}.scrollbar-layout-face-horizontal{bottom:0;left:0;top:0}.scrollbar-layout-face-horizontal:after{bottom:2px;left:0;top:2px;width:100%}.scrollbar-layout-face-vertical{left:0;right:0;top:0}.scrollbar-layout-face-vertical:after{height:100%;left:2px;right:2px;top:0}.public-scrollbar-face:after{background-color:rgba(102,102,102,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d666666, endColorstr=#4d666666)}.bi-theme-dark .public-scrollbar-face:after{background-color:rgba(204,204,204,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dcccccc, endColorstr=#4dcccccc)}.public-scrollbar-face-active:after,.public-scrollbar-main-active .public-scrollbar-face:after,.public-scrollbar-main:hover .public-scrollbar-face:after{background-color:rgba(102,102,102,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3666666, endColorstr=#b3666666)}.bi-theme-dark .public-scrollbar-face-active:after,.bi-theme-dark .public-scrollbar-main-active .public-scrollbar-face:after,.bi-theme-dark .public-scrollbar-main:hover .public-scrollbar-face:after{background-color:rgba(204,204,204,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3cccccc, endColorstr=#b3cccccc)}.horizontal-scrollbar{bottom:0;position:absolute}.bi-resizable-table-cell .resizable-table-cell-resizer-container.dragging .resizable-table-cell-resizer-knob,.bi-resizable-table-cell .resizable-table-cell-resizer-container:hover .resizable-table-cell-resizer-knob{background-color:#3f8ce8}.bi-resizable-table-cell .resizable-table-cell-resizer-container.suitable .resizable-table-cell-resizer-knob{background-color:#58cc7d}.bi-resizable-table .resizable-table-resizer{cursor:ew-resize;z-index:1;background-color:#3f8ce8}.bi-resizable-table .resizable-table-resizer.suitable{background-color:#58cc7d}.bi-resizable-table .resizable-table-region-resizer.dragging .resizable-table-region-resizer-knob,.bi-resizable-table .resizable-table-region-resizer:hover .resizable-table-region-resizer-knob{background-color:#3f8ce8}.bi-branch-tree .bi-branch-tree-view{min-width:300px}.bi-display-tree .ztree *{color:#999}.bi-display-tree .ztree li a,.bi-display-tree .ztree li span{cursor:default!important}.bi-display-tree .ztree li a.curSelectedNode{padding-top:1px;border:none;background-color:inherit;opacity:1;filter:alpha(opacity=100)}.ztree li a.tmpTargetNode_inner,ul.tmpTargetzTree,ul.ztree.zTreeDragUL{opacity:.8;filter:alpha(opacity=80)}.ztree *{padding:0;margin:0}.ztree{margin:0;padding:5px}.ztree li{padding:0;margin:0;list-style:none;line-height:14px;text-align:left;outline:0}.ztree li ul{margin:0;padding:0 0 0 18px}.ztree li a{padding:1px 3px 0 0;margin:0;cursor:pointer;height:24px;background-color:transparent;vertical-align:top;display:inline-block}.ztree li a.curSelectedNode_Edit{padding-top:0;background-color:#FFE6B0;color:#000;height:16px;border:1px solid #FFB951;opacity:.8}.ztree li a.tmpTargetNode_inner{padding-top:0;background-color:#316AC5;color:#fff;height:16px;border:1px solid #316AC5}.ztree li a input.rename{height:14px;width:80px;padding:0;margin:0;font-size:12px;border:1px solid #7EC4CC}.ztree li span.button,span.tmpzTreeMove_arrow{display:inline-block;border:0;background-repeat:no-repeat}.ztree li span{line-height:24px;margin-right:2px}.ztree li span.button{line-height:0;margin:0;width:16px;height:16px;vertical-align:middle;cursor:pointer;outline:0;background-color:transparent;background-attachment:scroll}.ztree li span.button.chk{width:16px;height:16px;margin:0 3px 0 0;cursor:auto}.ztree li span.button.chk.checkbox_false_disable{background-position:0 -56px}.ztree li span.button.chk.checkbox_true_disable{background-position:-14px -56px}.ztree li span.button.chk.radio_false_full{background-position:-28px 0}.ztree li span.button.chk.radio_false_full_focus{background-position:-28px -14px}.ztree li span.button.chk.radio_false_part{background-position:-28px -28px}.ztree li span.button.chk.radio_false_part_focus{background-position:-28px -42px}.ztree li span.button.chk.radio_false_disable{background-position:-28px -56px}.ztree li span.button.chk.radio_true_full{background-position:-42px 0}.ztree li span.button.chk.radio_true_full_focus{background-position:-42px -14px}.ztree li span.button.chk.radio_true_part{background-position:-42px -28px}.ztree li span.button.chk.radio_true_part_focus{background-position:-42px -42px}.ztree li span.button.chk.radio_true_disable{background-position:-42px -56px}.ztree li span.button.switch{width:25px;height:25px}.ztree li span.button.noline_open{background-position:-92px -72px}.ztree li span.button.noline_close{background-position:-74px -72px}.ztree li span.button.noline_docu,.ztree li span.button.root_docu{background:0 0}.ztree li span.button.ico_open{margin-right:2px;background-position:-110px -16px;vertical-align:top}.ztree li span.button.ico_close{margin-right:2px;background-position:-110px 0;vertical-align:top}.ztree li span.button.ico_docu{margin-right:2px;background-position:-110px -32px;vertical-align:top}.ztree li span.button.edit{margin-right:2px;background-position:-110px -48px;vertical-align:top}.ztree li span.button.remove{margin-right:2px;background-position:-110px -64px;vertical-align:top}.ztree li span.button.ico_loading{width:0;margin-right:2px;vertical-align:top}ul.tmpTargetzTree{background-color:#FFE6B0}span.tmpzTreeMove_arrow{width:16px;height:16px;padding:0;margin:2px 0 0 1px;position:absolute;background-color:transparent;background-attachment:scroll;background-position:-110px -80px}.zTreeMask,ul.ztree.zTreeDragUL{background-color:#cfcfcf;position:absolute}ul.ztree.zTreeDragUL{margin:0;padding:0;width:auto;height:auto;overflow:hidden;border:1px dotted #00B83F}body,html{height:100%}.zTreeMask{z-index:10000;opacity:0;filter:alpha(opacity=0)}.bi-select-text-trigger,.bi-small-select-text-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-popup-view{position:fixed!important;overflow-y:visible!important;overflow-x:visible!important;overflow:visible!important;cursor:default}.bi-popup-view .list-view-outer{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-date-trigger,.bi-month-trigger{-webkit-border-radius:2px;-moz-border-radius:2px}.bi-popup-view .list-view-toolbar{line-height:30px}.bi-popup-view .list-view-toolbar>.center-element{border-left:1px solid #d4dadd}.bi-popup-view .list-view-toolbar>.first-element{border-left:none}.bi-theme-dark .bi-popup-view .list-view-toolbar>.center-element{border-left:1px solid #525466}.bi-theme-dark .bi-popup-view .list-view-toolbar>.first-element{border-left:none}.bi-arrangement .arrangement-helper{background:#3f8ce8;z-index:1000000000}.bi-arrangement .arrangement-block,.bi-arrangement .arrangement-drop-container{z-index:1000000000}.bi-arrangement .arrangement-drop-container .arrangement-drop-region{overflow:hidden}.bi-arrangement .arrangement-drop-container .bottom-center,.bi-arrangement .arrangement-drop-container .bottom-center-second,.bi-arrangement .arrangement-drop-container .bottom-left,.bi-arrangement .arrangement-drop-container .bottom-left-second,.bi-arrangement .arrangement-drop-container .bottom-right,.bi-arrangement .arrangement-drop-container .bottom-right-second,.bi-arrangement .arrangement-drop-container .drop-devider,.bi-arrangement .arrangement-drop-container .left-center,.bi-arrangement .arrangement-drop-container .left-center-second,.bi-arrangement .arrangement-drop-container .right-center,.bi-arrangement .arrangement-drop-container .right-center-second,.bi-arrangement .arrangement-drop-container .top-center,.bi-arrangement .arrangement-drop-container .top-center-second,.bi-arrangement .arrangement-drop-container .top-left,.bi-arrangement .arrangement-drop-container .top-left-second,.bi-arrangement .arrangement-drop-container .top-right,.bi-arrangement .arrangement-drop-container .top-right-second{z-index:1000000001;background:#3f8ce8}.bi-arrangement-droppable{z-index:100000}.bi-date-trigger{border-radius:2px}.bi-down-list-popup .bi-down-list-item .list-item-text,.bi-down-list-popup .list-group-item-text{max-width:203px}.bi-excel-table>div.bottom-right>div>div>table{border-right:1px solid #d4dadd}.bi-theme-dark .bi-excel-table>div.bottom-right>div>div>table{border-right:1px solid #525466}.bi-file-manager-nav-button .file-manager-nav-button-text{max-width:200px}.bi-file-manager-nav-button .file-manager-nav-button-text.active{background-color:#fafbfc;color:#999}.bi-file-manager-nav-button .file-manager-nav-button-triangle{z-index:1}.bi-theme-dark .bi-file-manager-nav-button .file-manager-nav-button-text.active{background-color:#191b2b;color:#999}.bi-interactive-arrangement .interactive-arrangement-dragtag-line{z-index:1000000000;background-color:#faaa39}.bi-interactive-arrangement .interactive-arrangement-dragtag-icon{z-index:1000000000}.bi-interval-slider{min-height:70px}.bi-interval-slider-label{min-height:50px}.bi-month-trigger{border-radius:2px}.bi-multidate-combo{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-multidate-popup .multidate-popup-label{color:#3685f2;font-size:14px}.bi-multidate-popup .multidate-popup-item.active,.bi-multidate-popup .multidate-popup-item:active{background-color:#3685f2;color:#fff;-webkit-border-radius:2px 2px 0 0;-moz-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0}.bi-multidate-popup .multidate-popup-button{color:#3685f2;font-size:14px}.bi-multidate-segment .bi-multidate-editor{font-size:14px}.bi-multi-select-combo .multi-select-trigger-icon-button,.bi-multi-select-insert-combo .multi-select-trigger-icon-button,.bi-multi-tree-combo .multi-select-trigger-icon-button{font-size:16px}.bi-multilayer-select-level-tree .tree-view,.bi-multilayer-single-level-tree .tree-view{min-width:100%}.bi-multi-select-check-pane .multi-select-check-selected{text-decoration:underline}.bi-multi-select-trigger{-webkit-border-radius:2px 2px 2px 2px;-moz-border-radius:2px;border-radius:2px}.bi-number-editor,.bi-quarter-trigger{-webkit-border-radius:2px;-moz-border-radius:2px}.bi-multi-select-search-pane .multi-select-toolbar{color:#ff4949}.bi-multi-select-check-selected-button{z-index:1}.bi-multi-tree-check-pane .multi-tree-check-selected{color:#3685f2}.bi-number-interval .number-interval-big-combo .bi-icon-combo-trigger .icon-combo-trigger-icon,.bi-number-interval .number-interval-small-combo .bi-icon-combo-trigger .icon-combo-trigger-icon{font-size:14px}.bi-multi-tree-popup .popup-view-tree{min-height:170px}.bi-preview-table-cell,.bi-preview-table-header-cell{min-height:25px;min-width:80px}.bi-multi-tree-check-selected-button .trigger-check-selected{color:#3685f2;z-index:1}.bi-number-editor{border-radius:2px}.bi-number-interval .number-interval-small-editor{-moz-border-radius-topleft:2px;-webkit-border-top-left-radius:2px;-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;border-top-left-radius:2px;border-bottom-left-radius:2px}.bi-number-interval .number-interval-big-editor{-moz-border-radius-topright:2px;-webkit-border-top-right-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px}.bi-number-interval .number-interval-big-combo{-moz-border-radius-topleft:2px;-webkit-border-top-left-radius:2px;-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;border-top-left-radius:2px;border-bottom-left-radius:2px}.bi-number-interval .number-interval-small-combo{-moz-border-radius-topright:2px;-webkit-border-top-right-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px}.bi-relation-view-item .primary-key-region,.bi-relation-view-region .relation-view-region-container .relation-view-region-title .eye,.bi-single-select-combo .single-select-trigger-icon-button{font-size:16px}.bi-number-interval.number-error .bi-input{color:#ff4949!important}.bi-date-interval.time-error .bi-input,.bi-date-interval.time-error .sign-editor-text,.bi-time-interval.time-error .bi-date-time-trigger .bi-input,.bi-time-interval.time-error .bi-date-time-trigger .sign-editor-text,.bi-year-month-interval.time-error .bi-input,.bi-year-month-interval.time-error .sign-editor-text{color:#ff4949}.bi-page-table-cell{-moz-user-select:text;user-select:text}.bi-path-chooser .path-chooser-radio,.bi-path-region .path-region-label{z-index:1}.bi-preview-table{-webkit-user-select:text;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;-o-user-select:text;user-select:text}.bi-preview-table>div>div>div>table>thead>tr.odd,.bi-preview-table>div>table>thead>tr.odd{background-color:#fafbfc}.bi-theme-dark .bi-preview-table>div>div>div>table>thead>tr.odd,.bi-theme-dark .bi-preview-table>div>table>thead>tr.odd{background-color:#191B2B}.bi-quarter-trigger{border-radius:2px}.bi-relation-view-region .relation-view-region-container{z-index:1;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-relation-view-region .relation-view-region-container .split-line{border-bottom:1px solid #ccc}.bi-sequence-table-dynamic-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;box-sizing:border-box}.bi-sequence-table-dynamic-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-list-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-list-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-tree-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-tree-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-single-slider-label{min-height:50px}.bi-single-slider-normal{min-height:30px}.bi-single-slider{min-height:50px}.bi-single-slider-button .slider-button{cursor:ew-resize;-webkit-box-shadow:0 0 10px rgba(0,0,0,.2);-moz-box-shadow:0 0 10px rgba(0,0,0,.2);box-shadow:0 0 10px rgba(0,0,0,.2);-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.bi-slider-track .gray-track{background-color:rgba(153,153,153,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d999999, endColorstr=#4d999999);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.bi-slider-track .blue-track{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.bi-time-interval .bi-date-time-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-year-popup .year-popup-navigation{line-height:30px}.bi-year-popup .year-popup-navigation>.center-element{border-left:1px solid #d4dadd}.bi-year-popup .year-popup-navigation>.first-element{border-left:none}.bi-theme-dark .bi-year-popup .year-popup-navigation>.center-element{border-left:1px solid #525466}.bi-theme-dark .bi-year-popup .year-popup-navigation>.first-element{border-left:none}.bi-year-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}*,button,html,input,select,textarea{font-family:"Microsoft YaHei","Hiragino Sans GB W3"}html{overflow:hidden}body{position:absolute;width:100%;margin:0;padding:0;top:0;left:0;background-repeat:repeat;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;color:#3d4d66;font:400 12px "Microsoft YaHei","Hiragino Sans GB W3";-webkit-font-smoothing:antialiased;text-decoration:none;-kthml-user-focus:normal;-moz-user-focus:normal;-moz-outline:0 none;outline:0}div::-webkit-scrollbar,textarea::-webkit-scrollbar{-webkit-appearance:none;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666);width:6px;height:6px}div::-webkit-scrollbar-thumb,textarea::-webkit-scrollbar-thumb{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-color:rgba(102,102,102,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d666666, endColorstr=#4d666666)}div::-webkit-scrollbar-thumb:hover,textarea::-webkit-scrollbar-thumb:hover{background-color:rgba(102,102,102,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3666666, endColorstr=#b3666666)}.bi-theme-dark div::-webkit-scrollbar,.bi-theme-dark textarea::-webkit-scrollbar{-webkit-appearance:none;background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc);width:6px;height:6px}.bi-theme-dark div::-webkit-scrollbar-thumb,.bi-theme-dark textarea::-webkit-scrollbar-thumb{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-color:rgba(204,204,204,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dcccccc, endColorstr=#4dcccccc)}.bi-theme-dark div::-webkit-scrollbar-thumb:hover,.bi-theme-dark textarea::-webkit-scrollbar-thumb:hover{background-color:rgba(204,204,204,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3cccccc, endColorstr=#b3cccccc)}.farbtastic .wheel{background:url(https://fanruan.coding.me/fineui/dist/images/1x/background/wheel.png) center center no-repeat}.farbtastic .overlay{background:url(https://fanruan.coding.me/fineui/dist/images/1x/background/mask.png) center center no-repeat}.farbtastic .marker{background:url(https://fanruan.coding.me/fineui/dist/images/1x/background/marker.png) center center no-repeat}.bi-display-tree .ztree li span.button.switch.center_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_3.png) center center no-repeat}.bi-display-tree .ztree li span.button.switch.roots_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_2.png) center center no-repeat}.bi-display-tree .ztree li span.button.switch.bottom_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_4.png) center center no-repeat}.ztree li ul.line{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_1.png) repeat-y}.bi-theme-dark .ztree li ul.line{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_1.png) repeat-y}.ztree li span.button.chk.checkbox_false_full,.ztree li span.button.chk.checkbox_false_full_focus{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_normal.png) center center no-repeat}.ztree li span.button.chk.checkbox_false_part,.ztree li span.button.chk.checkbox_false_part_focus{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png) center center no-repeat}.ztree li span.button.chk.checkbox_true_full,.ztree li span.button.chk.checkbox_true_full_focus{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_active.png) center center no-repeat}.ztree li span.button.chk.checkbox_true_part,.ztree li span.button.chk.checkbox_true_part_focus{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png) center center no-repeat}.ztree li span.button.root_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_1.png) center center no-repeat}.bi-theme-dark .ztree li span.button.root_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_1.png) center center no-repeat}.ztree li span.button.root_close{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_1.png) center center no-repeat}.bi-theme-dark .ztree li span.button.root_close{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_1.png) center center no-repeat}.ztree li span.button.roots_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_2.png) center center no-repeat}.bi-theme-dark .ztree li span.button.roots_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_2.png) center center no-repeat}.ztree li span.button.roots_close{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_2.png) center center no-repeat}.bi-theme-dark .ztree li span.button.roots_close{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_2.png) center center no-repeat}.ztree li span.button.center_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_3.png) center center no-repeat}.bi-theme-dark .ztree li span.button.center_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_3.png) center center no-repeat}.ztree li span.button.center_close{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_3.png) center center no-repeat}.bi-theme-dark .ztree li span.button.center_close{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_3.png) center center no-repeat}.ztree li span.button.bottom_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_4.png) center center no-repeat}.bi-theme-dark .ztree li span.button.bottom_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_4.png) center center no-repeat}.ztree li span.button.bottom_close{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_4.png) center center no-repeat}.bi-theme-dark .ztree li span.button.bottom_close{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_4.png) center center no-repeat}.ztree li span.button.roots_docu{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_2.png) center center no-repeat}.bi-theme-dark .ztree li span.button.roots_docu{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_2.png) center center no-repeat}.ztree li span.button.center_docu{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_3.png) center center no-repeat}.bi-theme-dark .ztree li span.button.center_docu{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_3.png) center center no-repeat}.ztree li span.button.bottom_docu{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_4.png) center center no-repeat}.bi-theme-dark .ztree li span.button.bottom_docu{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_4.png) center center no-repeat}.ztree li span.button.ico_loading{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/loading.gif) center center no-repeat}.base-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_1.png) repeat-y}.bi-theme-dark .base-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_1.png) repeat-y}.first-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_2.png) center center no-repeat}.bi-theme-dark .first-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_2.png) center center no-repeat}.mid-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_3.png) center center no-repeat}.bi-theme-dark .mid-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_3.png) center center no-repeat}.last-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_4.png) center center no-repeat}.bi-theme-dark .last-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_4.png) center center no-repeat}.loading-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/loading.gif) center center no-repeat}.auto-color-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/background/auto_color.png) center center no-repeat}.trans-color-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/background/trans_color.png) center center no-repeat}@font-face{font-family:bi;src:url(https://fanruan.coding.me/fineui/dist/font/iconfont.eot);src:url(https://fanruan.coding.me/fineui/dist/font/iconfont.eot?#iefix) format('embedded-opentype'),url(https://fanruan.coding.me/fineui/dist/font/iconfont.woff) format('woff'),url(https://fanruan.coding.me/fineui/dist/font/iconfont.ttf) format('truetype'),url(https://fanruan.coding.me/fineui/dist/font/iconfont.svg#svgFontName) format('svg')}.b-font{font-family:bi;font-style:normal;-webkit-font-smoothing:antialiased}.close-font .b-font:before,.close-font.disabled .b-font:before,.close-h-font .b-font:before,.close-h-font.disabled .b-font:before,.close-h-font.hover .b-font:before,.close-h-font:hover .b-font:before,.close-ha-font .b-font:before,.close-ha-font.hover .b-font:before,.close-ha-font:hover .b-font:before{content:"\e6d0";color:inherit}.close-ha-font.active .b-font:before,.close-ha-font:active .b-font:before{content:"\e6d0";color:#3f8ce8}.close-ha-font.disabled .b-font:before,.search-close-h-font .b-font:before{content:"\e6d0";color:inherit}.search-close-h-font.hover .b-font:before,.search-close-h-font:hover .b-font:before{content:"\e6d0";color:#ff4949}.search-close-h-font.disabled .b-font:before{content:"\e6d0";color:inherit}.pre-page-h-font .b-font:before,.pre-page-h-font.disabled .b-font:before,.pre-page-h-font.hover .b-font:before,.pre-page-h-font:hover .b-font:before{content:"\e70d";color:inherit}.next-page-h-font .b-font:before,.next-page-h-font.disabled .b-font:before,.next-page-h-font.hover .b-font:before,.next-page-h-font:hover .b-font:before{content:"\e70c";color:inherit}.search-font .b-font:before,.search-font.disabled .b-font:before{content:"\e6dc";color:inherit}.date-font .b-font:before,.date-font.disabled .b-font:before{content:"\e733";color:inherit}.date-change-h-font .b-font:before,.date-change-h-font.disabled .b-font:before,.date-change-h-font.hover .b-font:before,.date-change-h-font:hover .b-font:before{content:"\e72f";color:inherit}.dot-font .b-font:before,.dot-font.disabled .b-font:before,.dot-h-font .b-font:before{content:"\e762";color:#1a1a1a}.dot-h-font.hover .b-font:before,.dot-h-font:hover .b-font:before{content:"\e762";color:inherit}.dot-h-font.disabled .b-font:before{content:"\e762";color:#1a1a1a}.dot-ha-font .b-font:before{content:"\e762";color:#fff}.dot-ha-font.hover .b-font:before,.dot-ha-font:hover .b-font:before{content:"\e762";color:#999}.dot-ha-font.active .b-font:before,.dot-ha-font:active .b-font:before{content:"\e762";color:#1a1a1a}.dot-e-font .b-font:before,.dot-ha-font.disabled .b-font:before{content:"\e762";color:#fff}.dot-e-font.hover .b-font:before,.dot-e-font:hover .b-font:before{content:"\e762";color:#999}.dot-e-font:active .b-font:before{content:"\e762";color:#3685f2}.dot-e-font.active .b-font:before{content:"\e762";color:#1a1a1a}.dot-e-font.disabled .b-font:before{content:"\e762";color:#fff}.pull-right-font .b-font:before,.pull-right-font.disabled .b-font:before,.pull-right-h-font .b-font:before,.pull-right-h-font.disabled .b-font:before,.pull-right-h-font.hover .b-font:before,.pull-right-h-font:hover .b-font:before,.pull-right-ha-font .b-font:before,.pull-right-ha-font.hover .b-font:before,.pull-right-ha-font:hover .b-font:before{content:"\e70c";color:inherit}.pull-right-ha-font.active .b-font:before,.pull-right-ha-font:active .b-font:before{content:"\e70c";color:#3f8ce8}.pull-right-e-font .b-font:before,.pull-right-e-font.hover .b-font:before,.pull-right-e-font:hover .b-font:before,.pull-right-ha-font.disabled .b-font:before{content:"\e70c";color:inherit}.pull-right-e-font.active .b-font:before,.pull-right-e-font:active .b-font:before{content:"\e70c";color:#3f8ce8}.pull-right-e-font.disabled .b-font:before{content:"\e70c";color:inherit}.copy-font .b-font:before,.copy-font.disabled .b-font:before{content:"\e6bd";color:inherit}.copy-h-font .b-font:before{content:"\e6bd";color:#1a1a1a}.copy-h-font.hover .b-font:before,.copy-h-font:hover .b-font:before{content:"\e6bd";color:inherit}.copy-h-font.disabled .b-font:before{content:"\e6bd";color:#1a1a1a}.copy-ha-font .b-font:before,.copy-ha-font.hover .b-font:before,.copy-ha-font:hover .b-font:before{content:"\e6bd";color:inherit}.copy-ha-font.active .b-font:before,.copy-ha-font:active .b-font:before{content:"\e6bd";color:#3f8ce8}.copy-e-font .b-font:before,.copy-e-font.hover .b-font:before,.copy-e-font:hover .b-font:before,.copy-ha-font.disabled .b-font:before{content:"\e6bd";color:inherit}.copy-e-font.active .b-font:before,.copy-e-font:active .b-font:before{content:"\e6bd";color:#3f8ce8}.copy-e-font.disabled .b-font:before{content:"\e6bd";color:inherit}.check-mark-font .b-font:before,.check-mark-font.disabled .b-font:before,.check-mark-h-font .b-font:before,.check-mark-h-font.disabled .b-font:before,.check-mark-h-font.hover .b-font:before,.check-mark-h-font:hover .b-font:before,.check-mark-ha-font .b-font:before,.check-mark-ha-font.hover .b-font:before,.check-mark-ha-font:hover .b-font:before{content:"\e6cf";color:inherit}.check-mark-ha-font.active .b-font:before,.check-mark-ha-font:active .b-font:before{content:"\e6cf";color:#3f8ce8}.check-mark-e-font .b-font:before,.check-mark-e-font.hover .b-font:before,.check-mark-e-font:hover .b-font:before,.check-mark-ha-font.disabled .b-font:before{content:"\e6cf";color:inherit}.check-mark-e-font.active .b-font:before,.check-mark-e-font:active .b-font:before{content:"\e6cf";color:#3f8ce8}.check-mark-e-font.disabled .b-font:before{content:"\e6cf";color:inherit}.row-pre-page-h-font .b-font:before,.row-pre-page-h-font.disabled .b-font:before,.row-pre-page-h-font.hover .b-font:before,.row-pre-page-h-font:hover .b-font:before{content:"\e6d9";color:inherit}.row-next-page-h-font .b-font:before,.row-next-page-h-font.disabled .b-font:before,.row-next-page-h-font.hover .b-font:before,.row-next-page-h-font:hover .b-font:before{content:"\e6d8";color:inherit}.column-pre-page-h-font .b-font:before,.column-pre-page-h-font.disabled .b-font:before,.column-pre-page-h-font.hover .b-font:before,.column-pre-page-h-font:hover .b-font:before{content:"\e6d6";color:inherit}.column-next-page-h-font .b-font:before,.column-next-page-h-font.disabled .b-font:before,.column-next-page-h-font.hover .b-font:before,.column-next-page-h-font:hover .b-font:before{content:"\e6d7";color:inherit}.trigger-triangle-font .b-font:before,.trigger-triangle-font.hover .b-font:before,.trigger-triangle-font:hover .b-font:before{content:"\e6f0";color:#999}.trigger-triangle-font.active .b-font:before,.trigger-triangle-font:active .b-font:before{content:"\e6f0";color:#3685f2}.trigger-triangle-font.disabled .b-font:before{content:"\e6f0";color:#999}.pull-down-font .b-font:before,.pull-down-font.disabled .b-font:before,.pull-down-h-font .b-font:before,.pull-down-h-font.disabled .b-font:before,.pull-down-h-font.hover .b-font:before,.pull-down-h-font:hover .b-font:before,.pull-down-ha-font .b-font:before,.pull-down-ha-font.hover .b-font:before,.pull-down-ha-font:hover .b-font:before{content:"\e70b";color:inherit}.pull-down-ha-font.active .b-font:before,.pull-down-ha-font:active .b-font:before{content:"\e70b";color:#3f8ce8}.pull-down-ha-font.disabled .b-font:before{content:"\e70b";color:inherit}.check-font .b-font:before,.check-font.disabled .b-font:before{content:"\e6cf";color:#3685f2}.item-check-font .b-font:before{content:"\e6cf";color:#fff}.item-check-font.hover .b-font:before,.item-check-font:hover .b-font:before{content:"\e6cf";color:#999}.item-check-font.active .b-font:before,.item-check-font:active .b-font:before{content:"\e6cf";color:#3f8ce8}.item-check-font.disabled .b-font:before{content:"\e6cf";color:#fff}.primary-key-font .b-font:before,.primary-key-font.disabled .b-font:before,.primary-key-font.hover .b-font:before,.primary-key-font:hover .b-font:before{content:"\e740";color:inherit}.drag-tag-font .b-font:before,.drag-tag-font.disabled .b-font:before{content:"\e6d0";color:#faaa39}.less-font .b-font:before,.less-font.hover .b-font:before,.less-font:hover .b-font:before{content:"\e75f";color:inherit}.less-font.active .b-font:before,.less-font:active .b-font:before{content:"\e75f";color:#3f8ce8}.less-font.disabled .b-font:before{content:"\e75f";color:inherit}.less-equal-font .b-font:before,.less-equal-font.hover .b-font:before,.less-equal-font:hover .b-font:before{content:"\e760";color:inherit}.less-equal-font.active .b-font:before,.less-equal-font:active .b-font:before{content:"\e760";color:#3f8ce8}.less-equal-font.disabled .b-font:before{content:"\e760";color:inherit}.text-bold-font .b-font:before,.text-bold-font.disabled .b-font:before{content:"\e75b";color:inherit}.text-italic-font .b-font:before,.text-italic-font.disabled .b-font:before{content:"\e75c";color:inherit}.text-underline-font .b-font:before,.text-underline-font.disabled .b-font:before{content:"\e75d";color:inherit}.text-color-font .b-font:before,.text-color-font.disabled .b-font:before{content:"\e75a";color:inherit}.text-background-font .b-font:before,.text-background-font.disabled .b-font:before{content:"\e758";color:inherit}.text-color-underline-font .b-font:before,.text-color-underline-font.disabled .b-font:before{content:"\e75d";color:inherit}.text-align-left-font .b-font:before,.text-align-left-font.disabled .b-font:before{content:"\e6ca";color:inherit}.text-align-center-font .b-font:before,.text-align-center-font.disabled .b-font:before{content:"\e6bf";color:inherit}.text-align-right-font .b-font:before,.text-align-right-font.disabled .b-font:before{content:"\e6c8";color:inherit}.toast-error-font .b-font:before,.toast-error-font.disabled .b-font:before{content:"\e757";color:inherit}.toast-success-font .b-font:before,.toast-success-font.disabled .b-font:before{content:"\e756";color:inherit}.toast-warning-font .b-font:before,.toast-warning-font.disabled .b-font:before{content:"\e755";color:inherit}.toast-message-font .b-font:before,.toast-message-font.disabled .b-font:before{content:"\e74b";color:inherit}.tree-collapse-icon-type1 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_collapse_1.png) center center no-repeat;background-size:contain}.tree-collapse-icon-type1 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_1.png) center center no-repeat}.tree-collapse-icon-type2 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_collapse_2.png) center center no-repeat;background-size:contain}.tree-collapse-icon-type2 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_2.png) center center no-repeat}.tree-collapse-icon-type3 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_collapse_3.png) center center no-repeat;background-size:contain}.tree-collapse-icon-type3 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_3.png) center center no-repeat}.tree-collapse-icon-type4 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_collapse_4.png) center center no-repeat;background-size:contain}.tree-collapse-icon-type4 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_4.png) center center no-repeat}.tree-expand-icon-type1 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_expand_1.png) center center no-repeat;background-size:contain}.tree-expand-icon-type1 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_1.png) center center no-repeat}.tree-expand-icon-type2 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_expand_2.png) center center no-repeat;background-size:contain}.tree-expand-icon-type2 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_2.png) center center no-repeat}.tree-expand-icon-type3 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_expand_3.png) center center no-repeat;background-size:contain}.tree-expand-icon-type3 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_3.png) center center no-repeat}.tree-expand-icon-type4 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_expand_4.png) center center no-repeat;background-size:contain}.tree-expand-icon-type4 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_4.png) center center no-repeat}.tree-vertical-line-type2 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_vertical_line_2.png) center center no-repeat;background-size:contain}.tree-vertical-line-type2 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_2.png) center center no-repeat}.tree-vertical-line-type3 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_vertical_line_3.png) center center no-repeat;background-size:contain}.tree-vertical-line-type3 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_3.png) center center no-repeat}.tree-vertical-line-type4 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_vertical_line_4.png) center center no-repeat;background-size:contain}.tree-vertical-line-type4 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_4.png) center center no-repeat}.bi-theme-dark .tree-collapse-icon-type1 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_collapse_1.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type1 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_1.png) center center no-repeat}.bi-theme-dark .tree-collapse-icon-type2 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_collapse_2.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type2 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_2.png) center center no-repeat}.bi-theme-dark .tree-collapse-icon-type3 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_collapse_3.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type3 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_3.png) center center no-repeat}.bi-theme-dark .tree-collapse-icon-type4 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_collapse_4.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type4 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_4.png) center center no-repeat}.bi-theme-dark .tree-expand-icon-type1 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_expand_1.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type1 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_1.png) center center no-repeat}.bi-theme-dark .tree-expand-icon-type2 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_expand_2.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type2 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_2.png) center center no-repeat}.bi-theme-dark .tree-expand-icon-type3 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_expand_3.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type3 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_3.png) center center no-repeat}.bi-theme-dark .tree-expand-icon-type4 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_expand_4.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type4 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_4.png) center center no-repeat}.bi-theme-dark .tree-vertical-line-type2 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_vertical_line_2.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type2 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_2.png) center center no-repeat}.bi-theme-dark .tree-vertical-line-type3 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_vertical_line_3.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type3 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_3.png) center center no-repeat}.bi-theme-dark .tree-vertical-line-type4 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_vertical_line_4.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type4 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_4.png) center center no-repeat}.check-box-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check_box_normal.png) center center no-repeat;background-size:contain}.check-box-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_normal.png) center center no-repeat}.check-box-icon.hover .x-icon,.check-box-icon:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check_box_normal.png) center center no-repeat;background-size:contain}.check-box-icon.hover .x-icon.hack,.check-box-icon:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_normal.png) center center no-repeat}.check-box-icon:active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check_box_normal.png) center center no-repeat;background-size:contain}.check-box-icon:active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_normal.png) center center no-repeat}.check-box-icon.active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check_box_active.png) center center no-repeat;background-size:contain}.check-box-icon.active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_active.png) center center no-repeat}.check-box-icon.disabled .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check_box_disable.png) center center no-repeat;background-size:contain}.check-box-icon.disabled .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_disable.png) center center no-repeat}.check-box-icon.disabled.active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check_box_disable2.png) center center no-repeat;background-size:contain}.check-box-icon.disabled.active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_disable2.png) center center no-repeat}.radio-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio_normal.png) center center no-repeat;background-size:contain}.radio-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio_normal.png) center center no-repeat}.radio-icon.hover .x-icon,.radio-icon:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio_normal.png) center center no-repeat;background-size:contain}.radio-icon.hover .x-icon.hack,.radio-icon:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio_normal.png) center center no-repeat}.radio-icon:active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio_normal.png) center center no-repeat;background-size:contain}.radio-icon:active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio_normal.png) center center no-repeat}.radio-icon.active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio_active.png) center center no-repeat;background-size:contain}.radio-icon.active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio_active.png) center center no-repeat}.radio-icon.disabled .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio_disable.png) center center no-repeat;background-size:contain}.radio-icon.disabled .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio_disable.png) center center no-repeat}.radio-icon.disabled.active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio_disable2.png) center center no-repeat;background-size:contain}.radio-icon.disabled.active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio_disable2.png) center center no-repeat}.check-half-select-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/half_selected.png) center center no-repeat;background-size:contain}.check-half-select-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png) center center no-repeat}.slider-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/slider_normal_small.png) center center no-repeat;background-size:contain}.slider-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/slider_normal_small.png) center center no-repeat}.slider-icon.hover .x-icon,.slider-icon:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/slider_active_small.png) center center no-repeat;background-size:contain}.slider-icon.hover .x-icon.hack,.slider-icon:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/slider_active_small.png) center center no-repeat}.slider-icon.disabled .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/slider_normal_small.png) center center no-repeat;background-size:contain}.slider-icon.disabled .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/slider_normal_small.png) center center no-repeat}.auto-color-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/auto_normal.png) center center no-repeat;background-size:contain}.auto-color-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/auto_normal.png) center center no-repeat}.auto-color-icon.active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/auto_select.png) center center no-repeat;background-size:contain}.auto-color-icon.active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/auto_select.png) center center no-repeat}.auto-color-icon.disabled .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/auto_disable.png) center center no-repeat;background-size:contain}.auto-color-icon.disabled .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/auto_disable.png) center center no-repeat}.trans-color-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/trans_normal.png) center center no-repeat;background-size:contain}.trans-color-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/trans_normal.png) center center no-repeat}.trans-color-icon.active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/trans_select.png) center center no-repeat;background-size:contain}.trans-color-icon.active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/trans_select.png) center center no-repeat}.trans-color-icon.disabled .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/trans_disable.png) center center no-repeat;background-size:contain}.trans-color-icon.disabled .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/trans_disable.png) center center no-repeat} \ No newline at end of file +/*! normalize.css v1.0.0 | MIT License | git.io/normalize */dl,h3,menu,ol,p,pre,ul{margin:1em 0}.b-font,i{-webkit-text-stroke-width:.2px;-moz-osx-font-smoothing:grayscale}.bi-label,.bi-text,.overflow-dot{text-overflow:ellipsis}.bi-excel-table-header-cell,.bi-preview-table-header-cell,.cm-header,.cm-strong,b,strong{font-weight:700}.cm-em,dfn{font-style:italic}.b-font,body,i{-moz-osx-font-smoothing:grayscale}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}h2{font-size:1.5em;margin:.83em 0}h3{font-size:1.17em}h4{font-size:1em;margin:1.33em 0}h5{font-size:.83em;margin:1.67em 0}h6{font-size:.75em;margin:2.33em 0}abbr[title]{border-bottom:1px dotted}blockquote{margin:1em 40px}mark{background:#ff0;color:#000}.base-disabled,.base-disabled .b-font:before,.base-disabled .bi-input,.base-disabled .bi-textarea{color:#9ea6b2!important}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}small,sub,sup{font-size:75%}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}q{quotes:none}q:after,q:before{content:'';content:none}sub,sup{line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dd{margin:0 0 0 40px}menu,ol,ul{padding:0 0 0 40px}nav ol,nav ul{list-style:none}img{border:0;-ms-interpolation-mode:bicubic}svg:not(:root){overflow:hidden}figure,form{margin:0}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0;white-space:normal}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline}button,input{line-height:normal}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],input[disabled]{cursor:default}.base-disabled,.base-invalid{cursor:default!important}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}.bi-collection-table-cell,.bi-text,.border-sizing{-moz-box-sizing:border-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}*,a,body,div,html,img,li,ol,p,span,ul{margin:0;padding:0}a{outline:0;text-decoration:none}a:focus{outline:0}input::-webkit-contacts-auto-fill-button{visibility:hidden;display:none!important;pointer-events:none;position:absolute;right:0}input::-ms-clear{display:none}input,textarea{margin:0;padding:0;outline:0;border:1px solid #d4dadd}ul{list-style:disc}li{list-style-type:none}i{-webkit-font-smoothing:antialiased}.bi-theme-dark input,.bi-theme-dark textarea{border:1px solid #525466}.bi-theme-dark .base-disabled,.bi-theme-dark .base-disabled .b-font:before,.bi-theme-dark .base-disabled .bi-input,.bi-theme-dark .base-disabled .bi-textarea{color:#666!important}.clearfix:after,.clearfix:before{content:" ";display:table;line-height:0}.clearfix:after{clear:both}.bi-background{background-color:#fafbfc;color:#3d4d66}.bi-background .bi-input,.bi-background .bi-textarea{color:#3d4d66}.bi-theme-dark .bi-background{background-color:#191B2B;color:#ccc}.bi-theme-dark .bi-background .bi-input,.bi-theme-dark .bi-background .bi-textarea{color:#ccc}.bi-card,.bi-card .bi-input,.bi-card .bi-textarea{color:#3d4d66}.bi-card{background-color:#fff}.bi-theme-dark .bi-card{background-color:#242640;color:#ccc}.bi-theme-dark .bi-card .bi-input,.bi-theme-dark .bi-card .bi-textarea{color:#ccc}.bi-disabled,.bi-disabled .bi-input,.bi-disabled .bi-textarea{color:#9ea6b2}.bi-theme-dark .bi-disabled,.bi-theme-dark .bi-disabled .bi-input,.bi-theme-dark .bi-disabled .bi-textarea{color:#666}.bi-tips,.bi-tips .bi-input,.bi-tips .bi-textarea{color:#c4c9d1}.bi-border{border:1px solid #d4dadd}.bi-theme-dark .bi-border{border:1px solid #525466}.bi-border-left{border-left:1px solid #d4dadd}.bi-theme-dark .bi-border-left{border-left:1px solid #525466}.bi-border-right{border-right:1px solid #d4dadd}.bi-theme-dark .bi-border-right{border-right:1px solid #525466}.bi-border-top{border-top:1px solid #d4dadd}.bi-theme-dark .bi-border-top{border-top:1px solid #525466}.bi-border-bottom{border-bottom:1px solid #d4dadd}.bi-theme-dark .bi-border-bottom{border-bottom:1px solid #525466}.bi-keyword-red-mark,.bi-keyword-red-mark .bi-input,.bi-keyword-red-mark .bi-textarea{color:#faaa39}.bi-high-light,.bi-high-light .bi-input,.bi-high-light .bi-textarea{color:#3685f2}.bi-high-light-background{background-color:#3f8ce8;color:#fff}.bi-high-light-background .bi-input,.bi-high-light-background .bi-textarea{color:#fff}.bi-high-light-border{border-color:#178cdf}.bi-water-mark{color:#ccc;cursor:text}.bi-water-mark .bi-input,.bi-water-mark .bi-textarea{color:#ccc}.bi-theme-dark .bi-water-mark,.bi-theme-dark .bi-water-mark .bi-input,.bi-theme-dark .bi-water-mark .bi-textarea{color:#666}.bi-mask,.bi-mask .bi-input,.bi-mask .bi-textarea{color:#fff}.bi-resizer{background:#1a1a1a;opacity:.2;filter:alpha(opacity=20);z-index:1000000000!important}.bi-theme-dark .bi-resizer{background:#fff}.bi-mask{background-color:rgba(26,26,26,.2);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#331a1a1a, endColorstr=#331a1a1a)}.bi-theme-dark .bi-mask{color:#242640;background-color:rgba(255,255,255,.2);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#33ffffff, endColorstr=#33ffffff)}.bi-theme-dark .bi-mask .bi-input,.bi-theme-dark .bi-mask .bi-textarea{color:#242640}.bi-z-index-mask{color:#fff;background-color:rgba(26,26,26,.5);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#801a1a1a, endColorstr=#801a1a1a)}.bi-z-index-mask .bi-input,.bi-z-index-mask .bi-textarea{color:#fff}.bi-list-item.hover,.bi-list-item:hover{color:#1a1a1a;background-color:rgba(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.bi-list-item.hover .bi-input,.bi-list-item.hover .bi-textarea,.bi-list-item:hover .bi-input,.bi-list-item:hover .bi-textarea{color:#1a1a1a}.bi-list-item.disabled,.bi-list-item.disabled:active,.bi-list-item.disabled:hover{background-color:transparent!important;color:#9ea6b2!important}.bi-list-item.disabled .bi-high-light,.bi-list-item.disabled .bi-input,.bi-list-item.disabled .bi-textarea,.bi-list-item.disabled:active .bi-high-light,.bi-list-item.disabled:active .bi-input,.bi-list-item.disabled:active .bi-textarea,.bi-list-item.disabled:hover .bi-high-light,.bi-list-item.disabled:hover .bi-input,.bi-list-item.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item.hover,.bi-theme-dark .bi-list-item:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item.hover .bi-input,.bi-theme-dark .bi-list-item.hover .bi-textarea,.bi-theme-dark .bi-list-item:hover .bi-input,.bi-theme-dark .bi-list-item:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item.disabled,.bi-theme-dark .bi-list-item.disabled:active,.bi-theme-dark .bi-list-item.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item.disabled .bi-high-light,.bi-theme-dark .bi-list-item.disabled .bi-input,.bi-theme-dark .bi-list-item.disabled .bi-textarea,.bi-theme-dark .bi-list-item.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item.disabled:active .bi-input,.bi-theme-dark .bi-list-item.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item.disabled:hover .bi-input,.bi-theme-dark .bi-list-item.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-border.active,.bi-list-item-border:active{border:1px solid #178cdf}.bi-list-item-simple.hover,.bi-list-item-simple.hover .bi-input,.bi-list-item-simple.hover .bi-textarea,.bi-list-item-simple:hover,.bi-list-item-simple:hover .bi-input,.bi-list-item-simple:hover .bi-textarea{color:#3685f2}.bi-list-item-simple.disabled,.bi-list-item-simple.disabled .bi-high-light,.bi-list-item-simple.disabled .bi-input,.bi-list-item-simple.disabled .bi-textarea,.bi-list-item-simple.disabled:active,.bi-list-item-simple.disabled:active .bi-high-light,.bi-list-item-simple.disabled:active .bi-input,.bi-list-item-simple.disabled:active .bi-textarea,.bi-list-item-simple.disabled:hover,.bi-list-item-simple.disabled:hover .bi-high-light,.bi-list-item-simple.disabled:hover .bi-input,.bi-list-item-simple.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-list-item-effect:hover,.bi-list-item-effect:hover .bi-input,.bi-list-item-effect:hover .bi-textarea{color:#1a1a1a}.bi-list-item-effect.active,.bi-list-item-effect.active .bi-input,.bi-list-item-effect.active .bi-textarea,.bi-list-item-effect:active,.bi-list-item-effect:active .bi-input,.bi-list-item-effect:active .bi-textarea{color:#3685f2}.bi-list-item-effect.disabled,.bi-list-item-effect.disabled .bi-high-light,.bi-list-item-effect.disabled .bi-input,.bi-list-item-effect.disabled .bi-textarea,.bi-list-item-effect.disabled:active,.bi-list-item-effect.disabled:active .bi-high-light,.bi-list-item-effect.disabled:active .bi-input,.bi-list-item-effect.disabled:active .bi-textarea,.bi-list-item-effect.disabled:hover,.bi-list-item-effect.disabled:hover .bi-high-light,.bi-list-item-effect.disabled:hover .bi-input,.bi-list-item-effect.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item-effect:hover,.bi-theme-dark .bi-list-item-effect:hover .bi-input,.bi-theme-dark .bi-list-item-effect:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-effect.active,.bi-theme-dark .bi-list-item-effect.active .bi-input,.bi-theme-dark .bi-list-item-effect.active .bi-textarea,.bi-theme-dark .bi-list-item-effect:active,.bi-theme-dark .bi-list-item-effect:active .bi-input,.bi-theme-dark .bi-list-item-effect:active .bi-textarea{color:#3685f2}.bi-theme-dark .bi-list-item-effect.disabled,.bi-theme-dark .bi-list-item-effect.disabled:active,.bi-theme-dark .bi-list-item-effect.disabled:hover{background-color:transparent!important;color:#666!important}.bi-list-item-active.active,.bi-list-item-active.hover,.bi-list-item-active:active,.bi-list-item-active:hover{background-color:rgba(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.bi-theme-dark .bi-list-item-effect.disabled .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled .bi-input,.bi-theme-dark .bi-list-item-effect.disabled .bi-textarea,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-input,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-active.hover,.bi-list-item-active.hover .bi-input,.bi-list-item-active.hover .bi-textarea,.bi-list-item-active:hover,.bi-list-item-active:hover .bi-input,.bi-list-item-active:hover .bi-textarea{color:#1a1a1a}.bi-list-item-active.active,.bi-list-item-active.active .bi-input,.bi-list-item-active.active .bi-textarea,.bi-list-item-active:active,.bi-list-item-active:active .bi-input,.bi-list-item-active:active .bi-textarea{color:#3685f2}.bi-list-item-active.disabled,.bi-list-item-active.disabled:active,.bi-list-item-active.disabled:hover{background-color:transparent!important;color:#9ea6b2!important}.bi-list-item-active.disabled .bi-high-light,.bi-list-item-active.disabled .bi-input,.bi-list-item-active.disabled .bi-textarea,.bi-list-item-active.disabled:active .bi-high-light,.bi-list-item-active.disabled:active .bi-input,.bi-list-item-active.disabled:active .bi-textarea,.bi-list-item-active.disabled:hover .bi-high-light,.bi-list-item-active.disabled:hover .bi-input,.bi-list-item-active.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item-active.hover,.bi-theme-dark .bi-list-item-active:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-active.hover .bi-input,.bi-theme-dark .bi-list-item-active.hover .bi-textarea,.bi-theme-dark .bi-list-item-active:hover .bi-input,.bi-theme-dark .bi-list-item-active:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-active.active,.bi-theme-dark .bi-list-item-active:active{color:#3685f2;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-active.active .bi-input,.bi-theme-dark .bi-list-item-active.active .bi-textarea,.bi-theme-dark .bi-list-item-active:active .bi-input,.bi-theme-dark .bi-list-item-active:active .bi-textarea{color:#3685f2}.bi-theme-dark .bi-list-item-active.disabled,.bi-theme-dark .bi-list-item-active.disabled:active,.bi-theme-dark .bi-list-item-active.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-active.disabled .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled .bi-input,.bi-theme-dark .bi-list-item-active.disabled .bi-textarea,.bi-theme-dark .bi-list-item-active.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled:active .bi-input,.bi-theme-dark .bi-list-item-active.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-active2.hover,.bi-list-item-active2:hover{color:#1a1a1a;background-color:#fff}.bi-list-item-active2.hover .bi-input,.bi-list-item-active2.hover .bi-textarea,.bi-list-item-active2:hover .bi-input,.bi-list-item-active2:hover .bi-textarea{color:#1a1a1a}.bi-list-item-active2.active,.bi-list-item-active2:active{color:#3685f2;background-color:#fff}.bi-list-item-active2.active .bi-input,.bi-list-item-active2.active .bi-textarea,.bi-list-item-active2:active .bi-input,.bi-list-item-active2:active .bi-textarea{color:#3685f2}.bi-list-item-active2.disabled,.bi-list-item-active2.disabled:active,.bi-list-item-active2.disabled:hover{background-color:transparent!important;color:#9ea6b2!important}.bi-list-item-active2.disabled .bi-high-light,.bi-list-item-active2.disabled .bi-input,.bi-list-item-active2.disabled .bi-textarea,.bi-list-item-active2.disabled:active .bi-high-light,.bi-list-item-active2.disabled:active .bi-input,.bi-list-item-active2.disabled:active .bi-textarea,.bi-list-item-active2.disabled:hover .bi-high-light,.bi-list-item-active2.disabled:hover .bi-input,.bi-list-item-active2.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item-active2.hover,.bi-theme-dark .bi-list-item-active2:hover{color:#fff;background-color:#242640}.bi-theme-dark .bi-list-item-active2.hover .bi-input,.bi-theme-dark .bi-list-item-active2.hover .bi-textarea,.bi-theme-dark .bi-list-item-active2:hover .bi-input,.bi-theme-dark .bi-list-item-active2:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-active2.active,.bi-theme-dark .bi-list-item-active2:active{color:#3685f2;background-color:#242640}.bi-theme-dark .bi-list-item-active2.active .bi-input,.bi-theme-dark .bi-list-item-active2.active .bi-textarea,.bi-theme-dark .bi-list-item-active2:active .bi-input,.bi-theme-dark .bi-list-item-active2:active .bi-textarea{color:#3685f2}.bi-theme-dark .bi-list-item-active2.disabled,.bi-theme-dark .bi-list-item-active2.disabled:active,.bi-theme-dark .bi-list-item-active2.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-active2.disabled .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled .bi-input,.bi-theme-dark .bi-list-item-active2.disabled .bi-textarea,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-input,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-select.hover,.bi-list-item-select:hover{color:#1a1a1a;background-color:rgba(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.bi-list-item-select.hover .bi-input,.bi-list-item-select.hover .bi-textarea,.bi-list-item-select:hover .bi-input,.bi-list-item-select:hover .bi-textarea{color:#1a1a1a}.bi-list-item-select.active,.bi-list-item-select:active{color:#fff;background-color:#3f8ce8}.bi-list-item-select.active .bi-high-light,.bi-list-item-select.active .bi-input,.bi-list-item-select.active .bi-textarea,.bi-list-item-select:active .bi-high-light,.bi-list-item-select:active .bi-input,.bi-list-item-select:active .bi-textarea{color:#fff}.bi-list-item-select.button-success.active,.bi-list-item-select.button-success:active{color:#fff;background-color:#58cc7d}.bi-list-item-select.button-success.active .bi-high-light,.bi-list-item-select.button-success.active .bi-input,.bi-list-item-select.button-success.active .bi-textarea,.bi-list-item-select.button-success:active .bi-high-light,.bi-list-item-select.button-success:active .bi-input,.bi-list-item-select.button-success:active .bi-textarea{color:#fff}.bi-list-item-select.button-warning,.bi-list-item-select.button-warning .bi-high-light,.bi-list-item-select.button-warning .bi-input,.bi-list-item-select.button-warning .bi-textarea,.bi-list-item-select.button-warning.hover .bi-high-light,.bi-list-item-select.button-warning.hover .bi-input,.bi-list-item-select.button-warning.hover .bi-textarea,.bi-list-item-select.button-warning:hover .bi-high-light,.bi-list-item-select.button-warning:hover .bi-input,.bi-list-item-select.button-warning:hover .bi-textarea{color:#ff4949}.bi-list-item-select.button-success.active.bi-high-light-border,.bi-list-item-select.button-success:active.bi-high-light-border{border-color:#58cc7d}.bi-list-item-select.button-warning.active.bi-high-light-border,.bi-list-item-select.button-warning.bi-high-light-border,.bi-list-item-select.button-warning.hover.bi-high-light-border,.bi-list-item-select.button-warning:active.bi-high-light-border,.bi-list-item-select.button-warning:hover.bi-high-light-border{border-color:#e85050}.bi-list-item-select.button-warning.hover,.bi-list-item-select.button-warning:hover{color:#ff4949;background-color:#ffecec}.bi-list-item-select.button-warning.active,.bi-list-item-select.button-warning:active{color:#fff;background-color:#ff4949}.bi-list-item-select.button-warning.active .bi-high-light,.bi-list-item-select.button-warning.active .bi-input,.bi-list-item-select.button-warning.active .bi-textarea,.bi-list-item-select.button-warning:active .bi-high-light,.bi-list-item-select.button-warning:active .bi-input,.bi-list-item-select.button-warning:active .bi-textarea{color:#fff}.bi-list-item-select.disabled,.bi-list-item-select.disabled:active,.bi-list-item-select.disabled:hover{color:#9ea6b2!important;background-color:transparent!important}.bi-list-item-select.disabled .bi-high-light,.bi-list-item-select.disabled .bi-input,.bi-list-item-select.disabled .bi-textarea,.bi-list-item-select.disabled:active .bi-high-light,.bi-list-item-select.disabled:active .bi-input,.bi-list-item-select.disabled:active .bi-textarea,.bi-list-item-select.disabled:hover .bi-high-light,.bi-list-item-select.disabled:hover .bi-input,.bi-list-item-select.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-list-item-select.disabled.bi-high-light-border,.bi-list-item-select.disabled:active.bi-high-light-border,.bi-list-item-select.disabled:hover.bi-high-light-border{border-color:#ccc}.bi-theme-dark .bi-list-item-select.hover,.bi-theme-dark .bi-list-item-select:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-select.hover .bi-input,.bi-theme-dark .bi-list-item-select.hover .bi-textarea,.bi-theme-dark .bi-list-item-select:hover .bi-input,.bi-theme-dark .bi-list-item-select:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-select.active,.bi-theme-dark .bi-list-item-select:active{color:#fff;background-color:#3f8ce8}.bi-theme-dark .bi-list-item-select.active .bi-high-light,.bi-theme-dark .bi-list-item-select.active .bi-input,.bi-theme-dark .bi-list-item-select.active .bi-textarea,.bi-theme-dark .bi-list-item-select:active .bi-high-light,.bi-theme-dark .bi-list-item-select:active .bi-input,.bi-theme-dark .bi-list-item-select:active .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-select.disabled,.bi-theme-dark .bi-list-item-select.disabled:active,.bi-theme-dark .bi-list-item-select.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-select.disabled .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled .bi-input,.bi-theme-dark .bi-list-item-select.disabled .bi-textarea,.bi-theme-dark .bi-list-item-select.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled:active .bi-input,.bi-theme-dark .bi-list-item-select.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-none.hover,.bi-list-item-none:hover{color:inherit;background-color:transparent}.bi-list-item-none.hover .bi-input,.bi-list-item-none.hover .bi-textarea,.bi-list-item-none:hover .bi-input,.bi-list-item-none:hover .bi-textarea{color:inherit}.bi-list-item-none.active,.bi-list-item-none:active{color:inherit;background-color:transparent}.bi-list-item-none.active .bi-high-light,.bi-list-item-none.active .bi-input,.bi-list-item-none.active .bi-textarea,.bi-list-item-none:active .bi-high-light,.bi-list-item-none:active .bi-input,.bi-list-item-none:active .bi-textarea{color:inherit}.bi-list-item-none.disabled,.bi-list-item-none.disabled:active,.bi-list-item-none.disabled:hover{color:#9ea6b2!important;background-color:transparent!important}.bi-list-item-none.disabled .bi-high-light,.bi-list-item-none.disabled .bi-input,.bi-list-item-none.disabled .bi-textarea,.bi-list-item-none.disabled:active .bi-high-light,.bi-list-item-none.disabled:active .bi-input,.bi-list-item-none.disabled:active .bi-textarea,.bi-list-item-none.disabled:hover .bi-high-light,.bi-list-item-none.disabled:hover .bi-input,.bi-list-item-none.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item-none.hover,.bi-theme-dark .bi-list-item-none:hover{color:inherit;background-color:transparent}.bi-theme-dark .bi-list-item-none.hover .bi-input,.bi-theme-dark .bi-list-item-none.hover .bi-textarea,.bi-theme-dark .bi-list-item-none:hover .bi-input,.bi-theme-dark .bi-list-item-none:hover .bi-textarea{color:inherit}.bi-theme-dark .bi-list-item-none.active,.bi-theme-dark .bi-list-item-none:active{color:inherit;background-color:transparent}.bi-theme-dark .bi-list-item-none.active .bi-high-light,.bi-theme-dark .bi-list-item-none.active .bi-input,.bi-theme-dark .bi-list-item-none.active .bi-textarea,.bi-theme-dark .bi-list-item-none:active .bi-high-light,.bi-theme-dark .bi-list-item-none:active .bi-input,.bi-theme-dark .bi-list-item-none:active .bi-textarea{color:inherit}.bi-theme-dark .bi-list-item-none.disabled,.bi-theme-dark .bi-list-item-none.disabled:active,.bi-theme-dark .bi-list-item-none.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-none.disabled .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled .bi-input,.bi-theme-dark .bi-list-item-none.disabled .bi-textarea,.bi-theme-dark .bi-list-item-none.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled:active .bi-input,.bi-theme-dark .bi-list-item-none.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-textarea{color:#666!important}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.cursor-move{cursor:move}.y-overflow-auto{overflow-y:auto;overflow-x:hidden}.x-overflow-auto{overflow-y:hidden;overflow-x:auto}.y-overflow-scroll{overflow-y:scroll;overflow-x:hidden}.x-overflow-scroll{overflow-y:hidden;overflow-x:scroll}.overflow-auto{overflow-x:auto;overflow-y:auto}.overflow-scroll{overflow-x:scroll;overflow-y:scroll}.overflow-dot,.overflow-hidden{overflow-x:hidden;overflow-y:hidden}.td-overflow{white-space:normal;word-break:break-all}.overflow-dot{white-space:nowrap}.display-block{display:block}.display-inline{display:inline-block}.vertical-super{vertical-align:super}.vertical-top{vertical-align:top}.horizon-center{text-align:center}.horizon-left{text-align:left}.border-sizing{-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.content-sizing{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;-ms-box-sizing:content-box;box-sizing:content-box}.bi-flex-center-layout{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-flex-align:center;-ms-align-items:center;-o-align-items:center;align-items:center}.bi-flex-horizontal-layout{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:start;-webkit-align-items:flex-start;-moz-align-items:flex-start;-ms-align-items:flex-start;-ms-flex-align:start;-o-align-items:flex-start;align-items:flex-start;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap}.bi-flex-horizontal-layout.middle{-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-ms-flex-align:center;-o-align-items:center;align-items:center}.bi-flex-horizontal-layout.bottom{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-moz-align-items:flex-end;-ms-align-items:flex-end;-ms-flex-align:end;-o-align-items:flex-end;align-items:flex-end}.bi-flex-vertical-center{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-ms-flex-align:center;-o-align-items:center;align-items:center;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap}.bi-flex-vertical-center.stretch{-webkit-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;-o-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-ms-flex-pack:center;-o-justify-content:center;justify-content:center;-webkit-box-align:stretch;-webkit-align-items:stretch;-moz-align-items:stretch;-ms-align-items:stretch;-ms-flex-align:stretch;-o-align-items:stretch;align-items:stretch}.bi-flex-wrapper-center-layout .flex-wrapper-center-layout-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-ms-flex-pack:center;-o-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-ms-flex-align:center;-o-align-items:center;align-items:center;min-width:100%;min-height:100%;float:left}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-ms-flex-pack:start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:flex-start;-webkit-align-items:flex-start;-moz-align-items:flex-start;-ms-align-items:flex-start;-ms-flex-align:start;-o-align-items:flex-start;align-items:flex-start;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap;min-height:100%}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.middle{-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.bottom{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-moz-align-items:flex-end;-ms-align-items:flex-end;-o-align-items:flex-end;align-items:flex-end}.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-ms-flex-pack:start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-ms-flex-align:center;-o-align-items:center;align-items:center;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap;min-height:100%;float:left}.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper.stretch{width:100%;-webkit-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;-o-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-box-align:stretch;-webkit-align-items:stretch;-moz-align-items:stretch;-ms-align-items:stretch;-o-align-items:stretch;align-items:stretch}.bi-theme-dark{background-color:#191B2B;color:#ccc}.bi-theme-dark .bi-input{color:#fff}.bi-color-chooser-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;box-shadow:0 0 2px 1px #d4dadd inset;-webkit-box-shadow:0 0 2px 1px #d4dadd inset;-moz-box-shadow:0 0 2px 1px #d4dadd inset}.bi-color-picker-button .color-picker-button-mask{border:1px solid #1a1a1a}.bi-theme-dark .bi-color-picker-button .color-picker-button-mask{border:1px solid #fff}.bi-color-picker-editor .color-picker-editor-display{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;box-shadow:0 0 2px 1px #d4dadd inset;-webkit-box-shadow:0 0 2px 1px #d4dadd inset;-moz-box-shadow:0 0 2px 1px #d4dadd inset}.farbtastic{position:relative}.farbtastic *{position:absolute;cursor:crosshair}.farbtastic,.farbtastic .wheel{width:195px;height:195px}.farbtastic .color,.farbtastic .overlay{top:47px;left:47px;width:101px;height:101px}.farbtastic .wheel{width:195px;height:195px}.farbtastic .marker{width:17px;height:17px;margin:-8px 0 0 -8px;overflow:hidden}.bi-bubble-combo .button-combo-triangle-wrapper{position:fixed!important;z-index:10000000}.bi-bubble-combo .bubble-combo-triangle-left{z-index:1;position:absolute;width:16px;height:10px;border-bottom:1px solid #f5f5f5}.bi-bubble-combo .bubble-combo-triangle-left:before{position:absolute;top:0;right:0;bottom:0;border-bottom:10px solid #ccc;border-left:8px solid transparent;border-right:8px solid transparent;content:""}.bi-bubble-combo .bubble-combo-triangle-left:after{position:absolute;right:1px;top:1px;bottom:0;border-bottom:9px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent;content:""}.bi-bubble-combo .bubble-combo-triangle-right{z-index:1;position:absolute;width:16px;height:6px;border-bottom:1px solid #f5f5f5}.bi-bubble-combo .bubble-combo-triangle-right:before{position:absolute;top:0;right:0;bottom:0;border-bottom:10px solid #ccc;border-left:8px solid transparent;border-right:8px solid transparent;content:""}.bi-bubble-combo .bubble-combo-triangle-right:after{position:absolute;right:1px;top:1px;bottom:0;border-bottom:9px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent;content:""}.bi-bubble-combo .bubble-combo-triangle-top{z-index:1;position:absolute;width:16px;height:10px;border-top:1px solid #fff}.bi-bubble-combo .bubble-combo-triangle-top:after{position:absolute;right:1px;top:0;border-top:6px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent;content:""}.bi-bubble-combo .bubble-combo-triangle-bottom:before,.bi-bubble-combo .bubble-combo-triangle-top:before{border-left:8px solid transparent;border-right:8px solid transparent;content:"";position:absolute}.bi-bubble-combo .bubble-combo-triangle-top:before{border-top:7px solid #ccc}.bi-bubble-combo .bubble-combo-triangle-bottom{z-index:1;position:absolute;width:16px;height:5px;border-bottom:1px solid #fff}.bi-bubble-combo .bubble-combo-triangle-bottom:before{top:0;right:0;bottom:0;border-bottom:7px solid #ccc}.bi-bubble-combo .bubble-combo-triangle-bottom:after{position:absolute;right:1px;top:1px;bottom:0;border-bottom:6px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent;content:""}.cm-tab-wrap-hack:after,.scrollbar-layout-face:after{content:''}.bi-combo.bi-combo-popup{display:block!important;visibility:visible!important}.bi-search-text-value-combo .trigger-icon-button{font-size:16px}.bi-adapt-editor .adapt-editor-text{font-size:14px}.bi-search-editor .close-font,.bi-search-editor .search-font{font-size:20px}.bi-small-search-editor .bi-editor,.bi-small-search-editor .bi-editor .bi-input,.bi-small-search-editor .bi-editor .bi-label{font-size:12px}.bi-small-search-editor .close-font,.bi-small-search-editor .search-font{font-size:18px}.bi-sign-initial-editor .sign-initial-editor-text{font-size:14px}.CodeMirror{font-family:monospace;cursor:text;width:100%;height:100%}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror div.CodeMirror-cursor{border-left:1px solid #1a1a1a}.bi-theme-dark .CodeMirror div.CodeMirror-cursor{border-left:1px solid #fff}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.CodeMirror.cm-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7}.CodeMirror.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}@-moz-keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}@-webkit-keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}@keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.bi-display-tree .ztree li a:hover,.ztree li a{text-decoration:none}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default span[class*=fieldName]{display:inline-block;color:#fff;background:#3685f2;padding:0 5px;margin:1px}.cm-s-default span[class*=start]{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;margin-left:3px}.cm-s-default span[class*=end]{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;margin-right:3px}.cm-s-default span[class*="start end"]{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.cm-s-default span[class*="#"]{color:#3685f2}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none}.bi-message-text,.bi-page-table-cell{-webkit-user-select:text;-ms-user-select:text;-o-user-select:text;-khtml-user-select:text}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent}.codemirror-high-line-height{line-height:2}.codemirror-low-line-height{line-height:1.4}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-code{outline:0}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.bi-collection-table-cell,.bi-text{-webkit-box-sizing:border-box;-ms-box-sizing:border-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-measure pre{position:static}.CodeMirror div.CodeMirror-cursor{position:absolute;border-right:none;width:0}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}span.CodeMirror-selectedtext{background:0 0}.CodeMirror-hints{position:absolute;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,.2);-moz-box-shadow:2px 3px 5px rgba(0,0,0,.2);box-shadow:2px 3px 5px rgba(0,0,0,.2);border-radius:3px;border:1px solid silver;background:#fff;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto;z-index:1000000000}.bi-label,.bi-segment>.center-element,.bi-text,.bi-textarea-editor{overflow-x:hidden;overflow-y:hidden}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;max-width:19em;overflow:hidden;white-space:pre;color:#000;cursor:pointer}.bi-label,.bi-text,.ztree li{white-space:nowrap}li.CodeMirror-hint-active{background:#08f;color:#fff}.bi-message-title{font-size:16px;cursor:pointer}.bi-message-text{font-size:16px;-moz-user-select:text;user-select:text}.bi-message-content{font-size:16px}.bi-message-close{font-size:25px}.bi-message-animate{-webkit-transition:opacity .3s,transform .4s,-webkit-transform .4s;-moz-transition:opacity .3s,transform .4s,-webkit-transform .4s;-o-transition:opacity .3s,transform .4s,-webkit-transform .4s;transition:opacity .3s,transform .4s,-webkit-transform .4s}.bi-message-enter{opacity:1}.bi-message-leave{opacity:0;transform:translateY(-100%)}.bi-multi-list-view .bi-button-mask{opacity:.1;filter:alpha(opacity=10)}.bi-panel{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-panel .panel-title{background-color:#F2F4F7}.bi-panel .panel-title .panel-title-text{cursor:text;font-size:14px}.bi-all-count-pager .all-pager-next,.bi-all-count-pager .all-pager-prev,.bi-direction-pager .direction-pager-next,.bi-direction-pager .direction-pager-prev,.bi-rich-editor-text-toolbar .text-toolbar-button{font-size:16px}.bi-pager .page-item{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-segment>.center-element{overflow:hidden;background:#fff;border-right:1px solid #d4dadd;border-top:1px solid #d4dadd;border-bottom:1px solid #d4dadd}.bi-segment>.first-element{border-left:1px solid #d4dadd;-webkit-border-radius:6px 0 0 6px;-moz-border-radius:6px 0 0 6px;border-radius:6px 0 0 6px}.bi-segment>.last-element{-webkit-border-radius:0 6px 6px 0;-moz-border-radius:0 6px 6px 0;border-radius:0 6px 6px 0}.bi-theme-dark .bi-segment>.center-element{overflow:hidden;overflow-x:hidden;overflow-y:hidden;background:#242640;border-right:1px solid #525466;border-top:1px solid #525466;border-bottom:1px solid #525466}.bi-theme-dark .bi-segment>.first-element{border-left:1px solid #242640}#body .bi-button,body .bi-button{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;border:1px solid #178cdf;background-color:#3f8ce8;text-align:center;vertical-align:middle;cursor:pointer;font-size:14px}#body .bi-button.clear,#body .bi-button.ghost,body .bi-button.clear,body .bi-button.ghost{background-color:transparent;font-size:inherit}#body .bi-button.block,body .bi-button.block{font-size:inherit;border-width:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}#body .bi-button.clear,body .bi-button.clear{border-width:0}#body .bi-button.clear:hover,body .bi-button.clear:hover{opacity:.9;filter:alpha(opacity=90)}#body .bi-button.clear:active,body .bi-button.clear:active{opacity:.8;filter:alpha(opacity=80)}#body .bi-button.button-common,#body .bi-button.button-common .b-font:before,body .bi-button.button-common,body .bi-button.button-common .b-font:before{color:#fff}#body .bi-button.button-common.clear,#body .bi-button.button-common.clear .b-font:before,#body .bi-button.button-common.ghost,#body .bi-button.button-common.ghost .b-font:before,body .bi-button.button-common.clear,body .bi-button.button-common.clear .b-font:before,body .bi-button.button-common.ghost,body .bi-button.button-common.ghost .b-font:before{color:#3685f2}#body .bi-button.button-common.ghost:hover,body .bi-button.button-common.ghost:hover{color:#fff;background-color:#3f8ce8}#body .bi-button.button-common.ghost:active,body .bi-button.button-common.ghost:active{background-color:#3f8ce8}#body .bi-button.button-ignore,body .bi-button.button-ignore{background-color:#fff;border-color:#178cdf}#body .bi-button.button-ignore,#body .bi-button.button-ignore .b-font:before,body .bi-button.button-ignore,body .bi-button.button-ignore .b-font:before{color:#3685f2}#body .bi-button.button-ignore.clear,body .bi-button.button-ignore.clear{background-color:transparent;border-width:0}#body .bi-button.button-success,body .bi-button.button-success{background-color:#58cc7d;border-color:#58cc7d}#body .bi-button.button-success,#body .bi-button.button-success .b-font:before,body .bi-button.button-success,body .bi-button.button-success .b-font:before{color:#fff}#body .bi-button.button-success.clear,body .bi-button.button-success.clear{background-color:transparent;border-width:0}#body .bi-button.button-success.clear,#body .bi-button.button-success.clear .b-font:before,body .bi-button.button-success.clear,body .bi-button.button-success.clear .b-font:before{color:#5cb75d}#body .bi-button.button-warning,body .bi-button.button-warning{background-color:#faaa39;border-color:#fbb03b}#body .bi-button.button-warning,#body .bi-button.button-warning .b-font:before,body .bi-button.button-warning,body .bi-button.button-warning .b-font:before{color:#fff}#body .bi-button.button-warning.clear,body .bi-button.button-warning.clear{background-color:transparent;border-width:0}#body .bi-button.button-warning.clear,#body .bi-button.button-warning.clear .b-font:before,body .bi-button.button-warning.clear,body .bi-button.button-warning.clear .b-font:before{color:#faaa39}#body .bi-button.button-error,body .bi-button.button-error{background-color:#ff4949;border-color:#e85050}#body .bi-button.button-error,#body .bi-button.button-error .b-font:before,body .bi-button.button-error,body .bi-button.button-error .b-font:before{color:#fff}#body .bi-button.button-error.clear,body .bi-button.button-error.clear{background-color:transparent;border-width:0}#body .bi-button.button-error.clear,#body .bi-button.button-error.clear .b-font:before,body .bi-button.button-error.clear,body .bi-button.button-error.clear .b-font:before{color:#ff4949}#body .bi-button.button-common.disabled,#body .bi-button.button-common.disabled.base-disabled,#body .bi-button.button-error.disabled,#body .bi-button.button-error.disabled.base-disabled,#body .bi-button.button-success.disabled,#body .bi-button.button-success.disabled.base-disabled,#body .bi-button.button-warning.disabled,#body .bi-button.button-warning.disabled.base-disabled,body .bi-button.button-common.disabled,body .bi-button.button-common.disabled.base-disabled,body .bi-button.button-error.disabled,body .bi-button.button-error.disabled.base-disabled,body .bi-button.button-success.disabled,body .bi-button.button-success.disabled.base-disabled,body .bi-button.button-warning.disabled,body .bi-button.button-warning.disabled.base-disabled{background:#ccc!important;border-color:#ccc!important}#body .bi-button.button-common.disabled,#body .bi-button.button-common.disabled .b-font:before,#body .bi-button.button-common.disabled.base-disabled,#body .bi-button.button-common.disabled.base-disabled .b-font:before,#body .bi-button.button-error.disabled,#body .bi-button.button-error.disabled .b-font:before,#body .bi-button.button-error.disabled.base-disabled,#body .bi-button.button-error.disabled.base-disabled .b-font:before,#body .bi-button.button-success.disabled,#body .bi-button.button-success.disabled .b-font:before,#body .bi-button.button-success.disabled.base-disabled,#body .bi-button.button-success.disabled.base-disabled .b-font:before,#body .bi-button.button-warning.disabled,#body .bi-button.button-warning.disabled .b-font:before,#body .bi-button.button-warning.disabled.base-disabled,#body .bi-button.button-warning.disabled.base-disabled .b-font:before,body .bi-button.button-common.disabled,body .bi-button.button-common.disabled .b-font:before,body .bi-button.button-common.disabled.base-disabled,body .bi-button.button-common.disabled.base-disabled .b-font:before,body .bi-button.button-error.disabled,body .bi-button.button-error.disabled .b-font:before,body .bi-button.button-error.disabled.base-disabled,body .bi-button.button-error.disabled.base-disabled .b-font:before,body .bi-button.button-success.disabled,body .bi-button.button-success.disabled .b-font:before,body .bi-button.button-success.disabled.base-disabled,body .bi-button.button-success.disabled.base-disabled .b-font:before,body .bi-button.button-warning.disabled,body .bi-button.button-warning.disabled .b-font:before,body .bi-button.button-warning.disabled.base-disabled,body .bi-button.button-warning.disabled.base-disabled .b-font:before{color:#fff!important}#body .bi-button.button-common.disabled.clear,#body .bi-button.button-common.disabled.clear .b-font:before,#body .bi-button.button-error.disabled.clear,#body .bi-button.button-error.disabled.clear .b-font:before,#body .bi-button.button-ignore.disabled,#body .bi-button.button-ignore.disabled .b-font:before,#body .bi-button.button-ignore.disabled.clear,#body .bi-button.button-ignore.disabled.clear .b-font:before,#body .bi-button.button-success.disabled.clear,#body .bi-button.button-success.disabled.clear .b-font:before,#body .bi-button.button-warning.disabled.clear,#body .bi-button.button-warning.disabled.clear .b-font:before,body .bi-button.button-common.disabled.clear,body .bi-button.button-common.disabled.clear .b-font:before,body .bi-button.button-error.disabled.clear,body .bi-button.button-error.disabled.clear .b-font:before,body .bi-button.button-ignore.disabled,body .bi-button.button-ignore.disabled .b-font:before,body .bi-button.button-ignore.disabled.clear,body .bi-button.button-ignore.disabled.clear .b-font:before,body .bi-button.button-success.disabled.clear,body .bi-button.button-success.disabled.clear .b-font:before,body .bi-button.button-warning.disabled.clear,body .bi-button.button-warning.disabled.clear .b-font:before{color:#9ea6b2!important}#body .bi-button.button-ignore.disabled,body .bi-button.button-ignore.disabled{background:#fff!important;border-color:#d4dadd!important}#body .bi-button.button-common.disabled.clear,#body .bi-button.button-error.disabled.clear,#body .bi-button.button-ignore.disabled.clear,#body .bi-button.button-success.disabled.clear,#body .bi-button.button-warning.disabled.clear,body .bi-button.button-common.disabled.clear,body .bi-button.button-error.disabled.clear,body .bi-button.button-ignore.disabled.clear,body .bi-button.button-success.disabled.clear,body .bi-button.button-warning.disabled.clear{background:0 0!important;border-width:0!important}#body .bi-button.button-common.disabled.clear:active,#body .bi-button.button-common.disabled.clear:hover,#body .bi-button.button-error.disabled.clear:active,#body .bi-button.button-error.disabled.clear:hover,#body .bi-button.button-ignore.disabled.clear:active,#body .bi-button.button-ignore.disabled.clear:hover,#body .bi-button.button-success.disabled.clear:active,#body .bi-button.button-success.disabled.clear:hover,#body .bi-button.button-warning.disabled.clear:active,#body .bi-button.button-warning.disabled.clear:hover,body .bi-button.button-common.disabled.clear:active,body .bi-button.button-common.disabled.clear:hover,body .bi-button.button-error.disabled.clear:active,body .bi-button.button-error.disabled.clear:hover,body .bi-button.button-ignore.disabled.clear:active,body .bi-button.button-ignore.disabled.clear:hover,body .bi-button.button-success.disabled.clear:active,body .bi-button.button-success.disabled.clear:hover,body .bi-button.button-warning.disabled.clear:active,body .bi-button.button-warning.disabled.clear:hover{opacity:1;filter:alpha(opacity=100)}#body .bi-button.button-common.disabled.ghost,#body .bi-button.button-error.disabled.ghost,#body .bi-button.button-ignore.disabled.ghost,#body .bi-button.button-success.disabled.ghost,#body .bi-button.button-warning.disabled.ghost,body .bi-button.button-common.disabled.ghost,body .bi-button.button-error.disabled.ghost,body .bi-button.button-ignore.disabled.ghost,body .bi-button.button-success.disabled.ghost,body .bi-button.button-warning.disabled.ghost{background:0 0!important;border-color:#3685f2!important;opacity:.5;filter:alpha(opacity=50)}#body .bi-button.button-common.disabled.ghost,#body .bi-button.button-common.disabled.ghost .b-font:before,#body .bi-button.button-error.disabled.ghost,#body .bi-button.button-error.disabled.ghost .b-font:before,#body .bi-button.button-ignore.disabled.ghost,#body .bi-button.button-ignore.disabled.ghost .b-font:before,#body .bi-button.button-success.disabled.ghost,#body .bi-button.button-success.disabled.ghost .b-font:before,#body .bi-button.button-warning.disabled.ghost,#body .bi-button.button-warning.disabled.ghost .b-font:before,body .bi-button.button-common.disabled.ghost,body .bi-button.button-common.disabled.ghost .b-font:before,body .bi-button.button-error.disabled.ghost,body .bi-button.button-error.disabled.ghost .b-font:before,body .bi-button.button-ignore.disabled.ghost,body .bi-button.button-ignore.disabled.ghost .b-font:before,body .bi-button.button-success.disabled.ghost,body .bi-button.button-success.disabled.ghost .b-font:before,body .bi-button.button-warning.disabled.ghost,body .bi-button.button-warning.disabled.ghost .b-font:before{color:#3685f2!important}.bi-basic-button.button-common:hover .bi-button-mask,.bi-basic-button.button-error:hover .bi-button-mask,.bi-basic-button.button-ignore:hover .bi-button-mask,.bi-basic-button.button-success:hover .bi-button-mask,.bi-basic-button.button-warning:hover .bi-button-mask{opacity:.1;filter:alpha(opacity=10);background-color:#fff}.bi-basic-button.button-common:active .bi-button-mask,.bi-basic-button.button-error:active .bi-button-mask,.bi-basic-button.button-ignore:active .bi-button-mask,.bi-basic-button.button-success:active .bi-button-mask,.bi-basic-button.button-warning:active .bi-button-mask{opacity:.1;filter:alpha(opacity=10);background-color:#1a1a1a}.bi-theme-dark #body .bi-button.button-common.ghost,.bi-theme-dark #body .bi-button.button-common.ghost .b-font:before,.bi-theme-dark body .bi-button.button-common.ghost,.bi-theme-dark body .bi-button.button-common.ghost .b-font:before{color:#fff;border-color:#fff}.bi-theme-dark #body .bi-button.button-common.ghost:hover,.bi-theme-dark body .bi-button.button-common.ghost:hover{color:#3d4d66;background-color:#fff}.bi-theme-dark #body .bi-button.button-common.ghost:active,.bi-theme-dark body .bi-button.button-common.ghost:active{background-color:rgba(255,255,255,.9);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#e6ffffff, endColorstr=#e6ffffff)}.bi-theme-dark #body .bi-button.button-common.disabled.ghost,.bi-theme-dark body .bi-button.button-common.disabled.ghost{background:0 0!important;border-color:#fff!important;opacity:.5;filter:alpha(opacity=50)}.bi-theme-dark #body .bi-button.button-common.disabled.ghost,.bi-theme-dark #body .bi-button.button-common.disabled.ghost .b-font:before,.bi-theme-dark body .bi-button.button-common.disabled.ghost,.bi-theme-dark body .bi-button.button-common.disabled.ghost .b-font:before{color:#fff!important}.bi-single-select-icon-text-item.active .b-font:before,.bi-single-select-icon-text-item:active .b-font:before{color:#3685f2}.bi-switch{-webkit-border-radius:40px 40px 40px 40px;-moz-border-radius:40px;border-radius:40px;background-color:#d4dadd}.bi-switch.active,.bi-switch:active{background-color:#3f8ce8}.bi-switch .circle-button{-webkit-border-radius:9px 9px 9px 9px;-moz-border-radius:9px;border-radius:9px}.bi-code-editor .param{color:#fff;padding:0 5px;margin:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#3f8ce8;display:inline-block}.bi-code-editor .error-param{color:#ff4949;padding:0 5px;margin:1px;display:inline-block}.bi-multifile-editor .multifile-editor{text-align:right;cursor:pointer;font-size:100px;z-index:2}.bi-resizable-table .resizable-table-region-resizer,.bi-resizable-table-cell .resizable-table-cell-resizer-container{cursor:ew-resize;z-index:1}.bi-shelter-editor .shelter-editor-text,.bi-sign-editor .sign-editor-text{font-size:12px}.bi-textarea-editor{overflow:hidden}.bi-textarea-editor .textarea-editor-content{font-size:12px;border:none}.bi-bubble,.bi-toast{font-size:14px}.x-icon.b-font{margin:auto;width:100%}.bi-file{opacity:0;filter:alpha(opacity=0);z-index:2}.bi-input,.bi-textarea{border:none;outline:0;background-color:transparent;padding:0;margin:0;width:100%;height:100%}.bi-input.bi-input-focus,.bi-textarea.bi-input-focus{border:none}.bi-input.bi-input-error,.bi-textarea.bi-input-error{border:none;color:#ff4949!important}.bi-bubble .bubble-text,.bi-toast{-webkit-border-radius:2px;-moz-border-radius:2px}.bi-label{word-break:break-all}.bi-text{box-sizing:border-box;word-wrap:break-word;word-break:break-word}.bi-bubble .bubble-text{border-radius:2px}.bi-bubble .bubble-error{background:#ffecec;color:#ff4949}.bi-bubble .bubble-common{background:#eaf2fd;color:#3685f2}.bi-bubble .bubble-success{background:#e1f4e7;color:#5cb75d}.bi-bubble .bubble-warning{background:#feeed7;color:#faaa39}.bi-tip{position:fixed!important}.bi-toast{color:#fff;max-width:400px;min-width:150px;border-radius:2px}.bi-toast .toast-icon,.bi-trigger .bi-trigger-icon-button{font-size:16px}.bi-toast.toast-success{background:#58cc7d}.bi-toast.toast-warning{background:#faaa39}.bi-toast.toast-error{background:#ff4949}.bi-toast.toast-normal{background:#3f8ce8}.bi-tooltip{max-width:250px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;font-size:12px;color:#fff}.bi-tooltip.tooltip-success{background:#647185;border:1px solid #647185}.bi-tooltip.tooltip-warning{background:#ff4949;border:1px solid #e85050}.bi-table>div.bottom-left>div>div>table,.bi-table>div.bottom-right>div>div>table,.bi-table>div.top-left>div>div>table,.bi-table>div.top-right>div>div>table,.bi-table>div>div>table{border-right:1px solid #d4dadd;border-bottom:1px solid #d4dadd}.bi-sql-editor .cm-s-default .cm-function,.bi-sql-editor .cm-s-default .cm-keyword,.bi-sql-editor .cm-s-default span[class*="#"]{color:#3685f2}.bi-sql-editor .param{color:#fff;padding:0 5px;margin:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#3f8ce8;display:inline-block}.CodeMirror-hints .sql-fr-function,.CodeMirror-hints .sql-keyword{color:#3685f2}.bi-collection-table-cell{box-sizing:border-box}.bi-grid-table-cell,.bi-sequence-table-dynamic-number .sequence-table-title-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box}.bi-collection-table-cell.first-row{border-top:1px solid #d4dadd}.bi-collection-table-cell.first-col{border-left:1px solid #d4dadd}.bi-theme-dark .bi-collection-table-cell.first-row{border-top:1px solid #525466}.bi-theme-dark .bi-collection-table-cell.first-col{border-left:1px solid #525466}.bi-quick-collection-table>div>.bi-collection{overflow:hidden!important;overflow-x:hidden!important;overflow-y:hidden!important}.bi-table>.first-col{border-left:none}.bi-table>.first-row{border-top:none}.bi-theme-dark .bi-table>div.bottom-left>div>div>table,.bi-theme-dark .bi-table>div.bottom-right>div>div>table,.bi-theme-dark .bi-table>div.top-left>div>div>table,.bi-theme-dark .bi-table>div.top-right>div>div>table,.bi-theme-dark .bi-table>div>div>table{border-right:1px solid #525466;border-bottom:1px solid #525466}.bi-table>div>div>div>table,.bi-table>div>div>table{min-width:100%;clear:both;border-spacing:0;border-collapse:separate}.bi-table>div>div>div>table,.bi-table>div>div>div>table>*>*>td,.bi-table>div>div>div>table>*>*>th,.bi-table>div>div>table,.bi-table>div>div>table>*>*>td,.bi-table>div>div>table>*>*>th{vertical-align:middle;margin:0;padding:0}.bi-table>div>div>div>table>tbody>tr>td,.bi-table>div>div>div>table>thead>tr>td,.bi-table>div>div>table>tbody>tr>td,.bi-table>div>div>table>thead>tr>td{border-top:1px solid #d4dadd;border-left:1px solid #d4dadd}.bi-theme-dark .bi-table>div>div>div>table>tbody>tr>td,.bi-theme-dark .bi-table>div>div>div>table>thead>tr>td,.bi-theme-dark .bi-table>div>div>table>tbody>tr>td,.bi-theme-dark .bi-table>div>div>table>thead>tr>td{border-top:1px solid #525466;border-left:1px solid #525466}.bi-grid-table-cell{box-sizing:border-box}.bi-grid-table-cell.first-row{border-top:1px solid #d4dadd}.bi-grid-table-cell.first-col{border-left:1px solid #d4dadd}.bi-theme-dark .bi-grid-table-cell.first-row{border-top:1px solid #525466}.bi-theme-dark .bi-grid-table-cell.first-col{border-left:1px solid #525466}.scrollbar-layout-main{box-sizing:border-box;outline:0;overflow:hidden;position:absolute;transition-duration:250ms;transition-timing-function:ease;user-select:none;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666);border-radius:5px}.bi-theme-dark .scrollbar-layout-main{background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc)}.scrollbar-layout-main-vertical{bottom:0;right:0;top:0;transition-property:background-color;width:10px}.scrollbar-layout-main-vertical.public-scrollbar-main-active,.scrollbar-layout-main-vertical:hover{width:10px}.scrollbar-layout-main-horizontal{bottom:0;height:10px;left:0;transition-property:background-color;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666)}.bi-theme-dark .scrollbar-layout-main-horizontal{background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc)}.scrollbar-layout-main-horizontal.public-scrollbar-main-active,.scrollbar-layout-main-horizontal:hover{height:10px}.scrollbar-layout-face{left:0;overflow:hidden;position:absolute;z-index:1}.scrollbar-layout-face:after{border-radius:6px;display:block;position:absolute;transition:background-color 250ms ease}.scrollbar-layout-face-horizontal{bottom:0;left:0;top:0}.scrollbar-layout-face-horizontal:after{bottom:2px;left:0;top:2px;width:100%}.scrollbar-layout-face-vertical{left:0;right:0;top:0}.scrollbar-layout-face-vertical:after{height:100%;left:2px;right:2px;top:0}.public-scrollbar-face:after{background-color:rgba(102,102,102,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d666666, endColorstr=#4d666666)}.bi-theme-dark .public-scrollbar-face:after{background-color:rgba(204,204,204,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dcccccc, endColorstr=#4dcccccc)}.public-scrollbar-face-active:after,.public-scrollbar-main-active .public-scrollbar-face:after,.public-scrollbar-main:hover .public-scrollbar-face:after{background-color:rgba(102,102,102,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3666666, endColorstr=#b3666666)}.bi-theme-dark .public-scrollbar-face-active:after,.bi-theme-dark .public-scrollbar-main-active .public-scrollbar-face:after,.bi-theme-dark .public-scrollbar-main:hover .public-scrollbar-face:after{background-color:rgba(204,204,204,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3cccccc, endColorstr=#b3cccccc)}.horizontal-scrollbar{bottom:0;position:absolute}.bi-resizable-table-cell .resizable-table-cell-resizer-container.dragging .resizable-table-cell-resizer-knob,.bi-resizable-table-cell .resizable-table-cell-resizer-container:hover .resizable-table-cell-resizer-knob{background-color:#3f8ce8}.bi-resizable-table-cell .resizable-table-cell-resizer-container.suitable .resizable-table-cell-resizer-knob{background-color:#58cc7d}.bi-resizable-table .resizable-table-resizer{cursor:ew-resize;z-index:1;background-color:#3f8ce8}.bi-resizable-table .resizable-table-resizer.suitable{background-color:#58cc7d}.bi-resizable-table .resizable-table-region-resizer.dragging .resizable-table-region-resizer-knob,.bi-resizable-table .resizable-table-region-resizer:hover .resizable-table-region-resizer-knob{background-color:#3f8ce8}.bi-branch-tree .bi-branch-tree-view{min-width:300px}.bi-filter-expander>table,.bi-filter-pane,.bi-multilayer-select-level-tree .tree-view,.bi-multilayer-single-level-tree .tree-view{min-width:100%}.bi-display-tree .ztree *{color:#999}.bi-display-tree .ztree li a,.bi-display-tree .ztree li span{cursor:default!important}.bi-display-tree .ztree li a.curSelectedNode{padding-top:1px;border:none;background-color:inherit;opacity:1;filter:alpha(opacity=100)}.ztree li a.tmpTargetNode_inner,ul.tmpTargetzTree,ul.ztree.zTreeDragUL{opacity:.8;filter:alpha(opacity=80)}.ztree *{padding:0;margin:0}.ztree{margin:0;padding:5px}.ztree li{padding:0;margin:0;list-style:none;line-height:14px;text-align:left;outline:0}.ztree li ul{margin:0;padding:0 0 0 18px}.ztree li a{padding:1px 3px 0 0;margin:0;cursor:pointer;height:24px;background-color:transparent;vertical-align:top;display:inline-block}.ztree li a.curSelectedNode_Edit{padding-top:0;background-color:#FFE6B0;color:#000;height:16px;border:1px solid #FFB951;opacity:.8}.ztree li a.tmpTargetNode_inner{padding-top:0;background-color:#316AC5;color:#fff;height:16px;border:1px solid #316AC5}.ztree li a input.rename{height:14px;width:80px;padding:0;margin:0;font-size:12px;border:1px solid #7EC4CC}.ztree li span.button,span.tmpzTreeMove_arrow{display:inline-block;border:0;background-color:transparent}.ztree li span{line-height:24px;margin-right:2px}.ztree li span.button{line-height:0;margin:0;width:16px;height:16px;vertical-align:middle;cursor:pointer;outline:0;background-repeat:no-repeat;background-attachment:scroll}.bi-popup-view .list-view-toolbar,.bi-year-popup .year-popup-navigation{line-height:30px}.ztree li span.button.chk{width:16px;height:16px;margin:0 3px 0 0;cursor:auto}.ztree li span.button.chk.checkbox_false_disable{background-position:0 -56px}.ztree li span.button.chk.checkbox_true_disable{background-position:-14px -56px}.ztree li span.button.chk.radio_false_full{background-position:-28px 0}.ztree li span.button.chk.radio_false_full_focus{background-position:-28px -14px}.ztree li span.button.chk.radio_false_part{background-position:-28px -28px}.ztree li span.button.chk.radio_false_part_focus{background-position:-28px -42px}.ztree li span.button.chk.radio_false_disable{background-position:-28px -56px}.ztree li span.button.chk.radio_true_full{background-position:-42px 0}.ztree li span.button.chk.radio_true_full_focus{background-position:-42px -14px}.ztree li span.button.chk.radio_true_part{background-position:-42px -28px}.ztree li span.button.chk.radio_true_part_focus{background-position:-42px -42px}.ztree li span.button.chk.radio_true_disable{background-position:-42px -56px}.ztree li span.button.switch{width:25px;height:25px}.ztree li span.button.noline_open{background-position:-92px -72px}.ztree li span.button.noline_close{background-position:-74px -72px}.ztree li span.button.noline_docu,.ztree li span.button.root_docu{background:0 0}.ztree li span.button.ico_open{margin-right:2px;background-position:-110px -16px;vertical-align:top}.ztree li span.button.ico_close{margin-right:2px;background-position:-110px 0;vertical-align:top}.ztree li span.button.ico_docu{margin-right:2px;background-position:-110px -32px;vertical-align:top}.ztree li span.button.edit{margin-right:2px;background-position:-110px -48px;vertical-align:top}.ztree li span.button.remove{margin-right:2px;background-position:-110px -64px;vertical-align:top}.ztree li span.button.ico_loading{width:0;margin-right:2px;vertical-align:top}ul.tmpTargetzTree{background-color:#FFE6B0}span.tmpzTreeMove_arrow{width:16px;height:16px;padding:0;margin:2px 0 0 1px;position:absolute;background-repeat:no-repeat;background-attachment:scroll;background-position:-110px -80px}.zTreeMask,ul.ztree.zTreeDragUL{background-color:#cfcfcf;position:absolute}ul.ztree.zTreeDragUL{margin:0;padding:0;width:auto;height:auto;overflow:hidden;border:1px dotted #00B83F}body,html{height:100%}.zTreeMask{z-index:10000;opacity:0;filter:alpha(opacity=0)}.bi-select-text-trigger,.bi-small-select-text-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-popup-view{position:fixed!important;overflow-y:visible!important;overflow-x:visible!important;overflow:visible!important;cursor:default}.bi-popup-view .list-view-outer{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-popup-view .list-view-toolbar>.center-element{border-left:1px solid #d4dadd}.bi-popup-view .list-view-toolbar>.first-element{border-left:none}.bi-theme-dark .bi-popup-view .list-view-toolbar>.center-element{border-left:1px solid #525466}.bi-theme-dark .bi-popup-view .list-view-toolbar>.first-element{border-left:none}.bi-arrangement .arrangement-helper{background:#3f8ce8;z-index:1000000000}.bi-arrangement .arrangement-block,.bi-arrangement .arrangement-drop-container{z-index:1000000000}.bi-arrangement .arrangement-drop-container .arrangement-drop-region{overflow:hidden}.bi-arrangement .arrangement-drop-container .bottom-center,.bi-arrangement .arrangement-drop-container .bottom-center-second,.bi-arrangement .arrangement-drop-container .bottom-left,.bi-arrangement .arrangement-drop-container .bottom-left-second,.bi-arrangement .arrangement-drop-container .bottom-right,.bi-arrangement .arrangement-drop-container .bottom-right-second,.bi-arrangement .arrangement-drop-container .drop-devider,.bi-arrangement .arrangement-drop-container .left-center,.bi-arrangement .arrangement-drop-container .left-center-second,.bi-arrangement .arrangement-drop-container .right-center,.bi-arrangement .arrangement-drop-container .right-center-second,.bi-arrangement .arrangement-drop-container .top-center,.bi-arrangement .arrangement-drop-container .top-center-second,.bi-arrangement .arrangement-drop-container .top-left,.bi-arrangement .arrangement-drop-container .top-left-second,.bi-arrangement .arrangement-drop-container .top-right,.bi-arrangement .arrangement-drop-container .top-right-second{z-index:1000000001;background:#3f8ce8}.bi-arrangement-droppable{z-index:100000}.bi-date-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-down-list-popup .bi-down-list-item .list-item-text,.bi-down-list-popup .list-group-item-text{max-width:203px}.bi-excel-table>div.bottom-right>div>div>table{border-right:1px solid #d4dadd}.bi-theme-dark .bi-excel-table>div.bottom-right>div>div>table{border-right:1px solid #525466}.bi-file-manager-nav-button .file-manager-nav-button-text{max-width:200px}.bi-file-manager-nav-button .file-manager-nav-button-text.active{background-color:#fafbfc;color:#999}.bi-file-manager-nav-button .file-manager-nav-button-triangle{z-index:1}.bi-theme-dark .bi-file-manager-nav-button .file-manager-nav-button-text.active{background-color:#191b2b;color:#999}.bi-filter-item .filter-item-empty-item .empty-filter-item-leaf{border:1px dashed #178cdf;background:#eaf2fd}.bi-filter-pane,.bi-month-trigger{-webkit-border-radius:2px;-moz-border-radius:2px}.bi-filter-expander{min-width:100%;border-right:0;border-bottom:0}.bi-filter-expander>.filter-item-empty-item{border-top:0;border-right:1px solid #d4dadd;border-bottom:1px solid #d4dadd}.bi-filter-expander>table>tbody>tr>td.first-element{width:20px;border-right:1px solid #d4dadd!important;border-bottom:1px solid #d4dadd!important}.bi-theme-dark .bi-filter-expander>.filter-item-empty-item{border-right:1px solid #525466;border-bottom:1px solid #525466}.bi-theme-dark .bi-filter-expander>table>tbody>tr>td.first-element{border-right:1px solid #525466!important;border-bottom:1px solid #525466!important}.bi-filter-operation .operation-trigger.hover,.bi-filter-operation .operation-trigger:hover{color:#58cc7d}.bi-filter-pane{border-radius:2px}.bi-interactive-arrangement .interactive-arrangement-dragtag-line{z-index:1000000000;background-color:#faaa39}.bi-interactive-arrangement .interactive-arrangement-dragtag-icon{z-index:1000000000}.bi-interval-slider{min-height:70px}.bi-interval-slider-label{min-height:50px}.bi-month-trigger{border-radius:2px}.bi-multidate-combo{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-multidate-popup .multidate-popup-label{color:#3685f2;font-size:14px}.bi-multidate-popup .multidate-popup-item.active,.bi-multidate-popup .multidate-popup-item:active{background-color:#3685f2;color:#fff;-webkit-border-radius:2px 2px 0 0;-moz-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0}.bi-multidate-popup .multidate-popup-button{color:#3685f2;font-size:14px}.bi-multidate-segment .bi-multidate-editor{font-size:14px}.bi-multi-select-combo .multi-select-trigger-icon-button,.bi-multi-select-insert-combo .multi-select-trigger-icon-button,.bi-multi-tree-combo .multi-select-trigger-icon-button{font-size:16px}.bi-multi-select-check-pane .multi-select-check-selected{text-decoration:underline}.bi-multi-select-trigger{-webkit-border-radius:2px 2px 2px 2px;-moz-border-radius:2px;border-radius:2px}.bi-number-editor,.bi-quarter-trigger{-webkit-border-radius:2px;-moz-border-radius:2px}.bi-multi-select-search-pane .multi-select-toolbar{color:#ff4949}.bi-multi-select-check-selected-button{z-index:1}.bi-multi-tree-check-pane .multi-tree-check-selected{color:#3685f2}.bi-number-interval .number-interval-big-combo .bi-icon-combo-trigger .icon-combo-trigger-icon,.bi-number-interval .number-interval-small-combo .bi-icon-combo-trigger .icon-combo-trigger-icon{font-size:14px}.bi-multi-tree-popup .popup-view-tree{min-height:170px}.bi-preview-table-cell,.bi-preview-table-header-cell{min-height:25px;min-width:80px}.bi-multi-tree-check-selected-button .trigger-check-selected{color:#3685f2;z-index:1}.bi-number-editor{border-radius:2px}.bi-number-interval .number-interval-small-editor{-moz-border-radius-topleft:2px;-webkit-border-top-left-radius:2px;-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;border-top-left-radius:2px;border-bottom-left-radius:2px}.bi-number-interval .number-interval-big-editor{-moz-border-radius-topright:2px;-webkit-border-top-right-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px}.bi-number-interval .number-interval-big-combo{-moz-border-radius-topleft:2px;-webkit-border-top-left-radius:2px;-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;border-top-left-radius:2px;border-bottom-left-radius:2px}.bi-number-interval .number-interval-small-combo{-moz-border-radius-topright:2px;-webkit-border-top-right-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px}.bi-relation-view-item .primary-key-region,.bi-relation-view-region .relation-view-region-container .relation-view-region-title .eye,.bi-single-select-combo .single-select-trigger-icon-button{font-size:16px}.bi-number-interval.number-error .bi-input{color:#ff4949!important}.bi-date-interval.time-error .bi-input,.bi-date-interval.time-error .sign-editor-text,.bi-time-interval.time-error .bi-date-time-trigger .bi-input,.bi-time-interval.time-error .bi-date-time-trigger .sign-editor-text,.bi-year-month-interval.time-error .bi-input,.bi-year-month-interval.time-error .sign-editor-text{color:#ff4949}.bi-page-table-cell{-moz-user-select:text;user-select:text}.bi-path-chooser .path-chooser-radio,.bi-path-region .path-region-label{z-index:1}.bi-preview-table{-webkit-user-select:text;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;-o-user-select:text;user-select:text}.bi-preview-table>div>div>div>table>thead>tr.odd,.bi-preview-table>div>table>thead>tr.odd{background-color:#fafbfc}.bi-theme-dark .bi-preview-table>div>div>div>table>thead>tr.odd,.bi-theme-dark .bi-preview-table>div>table>thead>tr.odd{background-color:#191B2B}.bi-quarter-trigger{border-radius:2px}.bi-relation-view-region .relation-view-region-container{z-index:1;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-relation-view-region .relation-view-region-container .split-line{border-bottom:1px solid #ccc}.bi-sequence-table-dynamic-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;box-sizing:border-box}.bi-sequence-table-dynamic-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-list-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-list-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-tree-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-tree-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-single-slider-label{min-height:50px}.bi-single-slider-normal{min-height:30px}.bi-single-slider{min-height:50px}.bi-single-slider-button .slider-button{cursor:ew-resize;-webkit-box-shadow:0 0 10px rgba(0,0,0,.2);-moz-box-shadow:0 0 10px rgba(0,0,0,.2);box-shadow:0 0 10px rgba(0,0,0,.2);-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.bi-slider-track .gray-track{background-color:rgba(153,153,153,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d999999, endColorstr=#4d999999);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.bi-slider-track .blue-track{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.bi-time-interval .bi-date-time-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-year-popup .year-popup-navigation>.center-element{border-left:1px solid #d4dadd}.bi-year-popup .year-popup-navigation>.first-element{border-left:none}.bi-theme-dark .bi-year-popup .year-popup-navigation>.center-element{border-left:1px solid #525466}.bi-theme-dark .bi-year-popup .year-popup-navigation>.first-element{border-left:none}.bi-year-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}*,button,html,input,select,textarea{font-family:"Microsoft YaHei","Hiragino Sans GB W3"}html{overflow:hidden}body{position:absolute;width:100%;margin:0;padding:0;top:0;left:0;background-repeat:repeat;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;color:#3d4d66;font:400 12px "Microsoft YaHei","Hiragino Sans GB W3";-webkit-font-smoothing:antialiased;text-decoration:none;-kthml-user-focus:normal;-moz-user-focus:normal;-moz-outline:0 none;outline:0}div::-webkit-scrollbar,textarea::-webkit-scrollbar{-webkit-appearance:none;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666);width:6px;height:6px}div::-webkit-scrollbar-thumb,textarea::-webkit-scrollbar-thumb{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-color:rgba(102,102,102,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d666666, endColorstr=#4d666666)}div::-webkit-scrollbar-thumb:hover,textarea::-webkit-scrollbar-thumb:hover{background-color:rgba(102,102,102,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3666666, endColorstr=#b3666666)}.bi-theme-dark div::-webkit-scrollbar,.bi-theme-dark textarea::-webkit-scrollbar{-webkit-appearance:none;background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc);width:6px;height:6px}.bi-theme-dark div::-webkit-scrollbar-thumb,.bi-theme-dark textarea::-webkit-scrollbar-thumb{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-color:rgba(204,204,204,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dcccccc, endColorstr=#4dcccccc)}.bi-theme-dark div::-webkit-scrollbar-thumb:hover,.bi-theme-dark textarea::-webkit-scrollbar-thumb:hover{background-color:rgba(204,204,204,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3cccccc, endColorstr=#b3cccccc)}.farbtastic .wheel{background:url(https://fanruan.coding.me/fineui/dist/images/1x/background/wheel.png) center center no-repeat}.farbtastic .overlay{background:url(https://fanruan.coding.me/fineui/dist/images/1x/background/mask.png) center center no-repeat}.farbtastic .marker{background:url(https://fanruan.coding.me/fineui/dist/images/1x/background/marker.png) center center no-repeat}.bi-display-tree .ztree li span.button.switch.center_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_3.png) center center no-repeat}.bi-display-tree .ztree li span.button.switch.roots_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_2.png) center center no-repeat}.bi-display-tree .ztree li span.button.switch.bottom_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_4.png) center center no-repeat}.ztree li ul.line{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_1.png) repeat-y}.bi-theme-dark .ztree li ul.line{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_1.png) repeat-y}.ztree li span.button.chk.checkbox_false_full,.ztree li span.button.chk.checkbox_false_full_focus{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_normal.png) center center no-repeat}.ztree li span.button.chk.checkbox_false_part,.ztree li span.button.chk.checkbox_false_part_focus{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png) center center no-repeat}.ztree li span.button.chk.checkbox_true_full,.ztree li span.button.chk.checkbox_true_full_focus{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_active.png) center center no-repeat}.ztree li span.button.chk.checkbox_true_part,.ztree li span.button.chk.checkbox_true_part_focus{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png) center center no-repeat}.ztree li span.button.root_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_1.png) center center no-repeat}.bi-theme-dark .ztree li span.button.root_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_1.png) center center no-repeat}.ztree li span.button.root_close{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_1.png) center center no-repeat}.bi-theme-dark .ztree li span.button.root_close{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_1.png) center center no-repeat}.ztree li span.button.roots_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_2.png) center center no-repeat}.bi-theme-dark .ztree li span.button.roots_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_2.png) center center no-repeat}.ztree li span.button.roots_close{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_2.png) center center no-repeat}.bi-theme-dark .ztree li span.button.roots_close{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_2.png) center center no-repeat}.ztree li span.button.center_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_3.png) center center no-repeat}.bi-theme-dark .ztree li span.button.center_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_3.png) center center no-repeat}.ztree li span.button.center_close{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_3.png) center center no-repeat}.bi-theme-dark .ztree li span.button.center_close{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_3.png) center center no-repeat}.ztree li span.button.bottom_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_4.png) center center no-repeat}.bi-theme-dark .ztree li span.button.bottom_open{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_4.png) center center no-repeat}.ztree li span.button.bottom_close{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_4.png) center center no-repeat}.bi-theme-dark .ztree li span.button.bottom_close{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_4.png) center center no-repeat}.ztree li span.button.roots_docu{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_2.png) center center no-repeat}.bi-theme-dark .ztree li span.button.roots_docu{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_2.png) center center no-repeat}.ztree li span.button.center_docu{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_3.png) center center no-repeat}.bi-theme-dark .ztree li span.button.center_docu{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_3.png) center center no-repeat}.ztree li span.button.bottom_docu{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_4.png) center center no-repeat}.bi-theme-dark .ztree li span.button.bottom_docu{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_4.png) center center no-repeat}.ztree li span.button.ico_loading{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/loading.gif) center center no-repeat}.base-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_1.png) repeat-y}.bi-theme-dark .base-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_1.png) repeat-y}.first-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_2.png) center center no-repeat}.bi-theme-dark .first-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_2.png) center center no-repeat}.mid-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_3.png) center center no-repeat}.bi-theme-dark .mid-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_3.png) center center no-repeat}.last-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_4.png) center center no-repeat}.bi-theme-dark .last-line-conn-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_4.png) center center no-repeat}.loading-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/loading.gif) center center no-repeat}.auto-color-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/background/auto_color.png) center center no-repeat}.trans-color-background{background:url(https://fanruan.coding.me/fineui/dist/images/1x/background/trans_color.png) center center no-repeat}@font-face{font-family:bi;src:url(https://fanruan.coding.me/fineui/dist/font/iconfont.eot);src:url(https://fanruan.coding.me/fineui/dist/font/iconfont.eot?#iefix) format('embedded-opentype'),url(https://fanruan.coding.me/fineui/dist/font/iconfont.woff) format('woff'),url(https://fanruan.coding.me/fineui/dist/font/iconfont.ttf) format('truetype'),url(https://fanruan.coding.me/fineui/dist/font/iconfont.svg#svgFontName) format('svg')}.b-font{font-family:bi;font-style:normal;-webkit-font-smoothing:antialiased}.close-font .b-font:before,.close-font.disabled .b-font:before,.close-h-font .b-font:before,.close-h-font.disabled .b-font:before,.close-h-font.hover .b-font:before,.close-h-font:hover .b-font:before,.close-ha-font .b-font:before,.close-ha-font.hover .b-font:before,.close-ha-font:hover .b-font:before{content:"\e6d0";color:inherit}.close-ha-font.active .b-font:before,.close-ha-font:active .b-font:before{content:"\e6d0";color:#3f8ce8}.close-ha-font.disabled .b-font:before,.search-close-h-font .b-font:before{content:"\e6d0";color:inherit}.search-close-h-font.hover .b-font:before,.search-close-h-font:hover .b-font:before{content:"\e6d0";color:#ff4949}.search-close-h-font.disabled .b-font:before{content:"\e6d0";color:inherit}.pre-page-h-font .b-font:before,.pre-page-h-font.disabled .b-font:before,.pre-page-h-font.hover .b-font:before,.pre-page-h-font:hover .b-font:before{content:"\e70d";color:inherit}.next-page-h-font .b-font:before,.next-page-h-font.disabled .b-font:before,.next-page-h-font.hover .b-font:before,.next-page-h-font:hover .b-font:before{content:"\e70c";color:inherit}.search-font .b-font:before,.search-font.disabled .b-font:before{content:"\e6dc";color:inherit}.date-font .b-font:before,.date-font.disabled .b-font:before{content:"\e733";color:inherit}.date-change-h-font .b-font:before,.date-change-h-font.disabled .b-font:before,.date-change-h-font.hover .b-font:before,.date-change-h-font:hover .b-font:before{content:"\e72f";color:inherit}.dot-font .b-font:before,.dot-font.disabled .b-font:before,.dot-h-font .b-font:before{content:"\e762";color:#1a1a1a}.dot-h-font.hover .b-font:before,.dot-h-font:hover .b-font:before{content:"\e762";color:inherit}.dot-h-font.disabled .b-font:before{content:"\e762";color:#1a1a1a}.dot-ha-font .b-font:before{content:"\e762";color:#fff}.dot-ha-font.hover .b-font:before,.dot-ha-font:hover .b-font:before{content:"\e762";color:#999}.dot-ha-font.active .b-font:before,.dot-ha-font:active .b-font:before{content:"\e762";color:#1a1a1a}.dot-e-font .b-font:before,.dot-ha-font.disabled .b-font:before{content:"\e762";color:#fff}.dot-e-font.hover .b-font:before,.dot-e-font:hover .b-font:before{content:"\e762";color:#999}.dot-e-font:active .b-font:before{content:"\e762";color:#3685f2}.dot-e-font.active .b-font:before{content:"\e762";color:#1a1a1a}.dot-e-font.disabled .b-font:before{content:"\e762";color:#fff}.pull-right-font .b-font:before,.pull-right-font.disabled .b-font:before,.pull-right-h-font .b-font:before,.pull-right-h-font.disabled .b-font:before,.pull-right-h-font.hover .b-font:before,.pull-right-h-font:hover .b-font:before,.pull-right-ha-font .b-font:before,.pull-right-ha-font.hover .b-font:before,.pull-right-ha-font:hover .b-font:before{content:"\e70c";color:inherit}.pull-right-ha-font.active .b-font:before,.pull-right-ha-font:active .b-font:before{content:"\e70c";color:#3f8ce8}.pull-right-e-font .b-font:before,.pull-right-e-font.hover .b-font:before,.pull-right-e-font:hover .b-font:before,.pull-right-ha-font.disabled .b-font:before{content:"\e70c";color:inherit}.pull-right-e-font.active .b-font:before,.pull-right-e-font:active .b-font:before{content:"\e70c";color:#3f8ce8}.pull-right-e-font.disabled .b-font:before{content:"\e70c";color:inherit}.copy-font .b-font:before,.copy-font.disabled .b-font:before{content:"\e6bd";color:inherit}.copy-h-font .b-font:before{content:"\e6bd";color:#1a1a1a}.copy-h-font.hover .b-font:before,.copy-h-font:hover .b-font:before{content:"\e6bd";color:inherit}.copy-h-font.disabled .b-font:before{content:"\e6bd";color:#1a1a1a}.copy-ha-font .b-font:before,.copy-ha-font.hover .b-font:before,.copy-ha-font:hover .b-font:before{content:"\e6bd";color:inherit}.copy-ha-font.active .b-font:before,.copy-ha-font:active .b-font:before{content:"\e6bd";color:#3f8ce8}.copy-e-font .b-font:before,.copy-e-font.hover .b-font:before,.copy-e-font:hover .b-font:before,.copy-ha-font.disabled .b-font:before{content:"\e6bd";color:inherit}.copy-e-font.active .b-font:before,.copy-e-font:active .b-font:before{content:"\e6bd";color:#3f8ce8}.copy-e-font.disabled .b-font:before{content:"\e6bd";color:inherit}.check-mark-font .b-font:before,.check-mark-font.disabled .b-font:before,.check-mark-h-font .b-font:before,.check-mark-h-font.disabled .b-font:before,.check-mark-h-font.hover .b-font:before,.check-mark-h-font:hover .b-font:before,.check-mark-ha-font .b-font:before,.check-mark-ha-font.hover .b-font:before,.check-mark-ha-font:hover .b-font:before{content:"\e6cf";color:inherit}.check-mark-ha-font.active .b-font:before,.check-mark-ha-font:active .b-font:before{content:"\e6cf";color:#3f8ce8}.check-mark-e-font .b-font:before,.check-mark-e-font.hover .b-font:before,.check-mark-e-font:hover .b-font:before,.check-mark-ha-font.disabled .b-font:before{content:"\e6cf";color:inherit}.check-mark-e-font.active .b-font:before,.check-mark-e-font:active .b-font:before{content:"\e6cf";color:#3f8ce8}.check-mark-e-font.disabled .b-font:before{content:"\e6cf";color:inherit}.row-pre-page-h-font .b-font:before,.row-pre-page-h-font.disabled .b-font:before,.row-pre-page-h-font.hover .b-font:before,.row-pre-page-h-font:hover .b-font:before{content:"\e6d9";color:inherit}.row-next-page-h-font .b-font:before,.row-next-page-h-font.disabled .b-font:before,.row-next-page-h-font.hover .b-font:before,.row-next-page-h-font:hover .b-font:before{content:"\e6d8";color:inherit}.column-pre-page-h-font .b-font:before,.column-pre-page-h-font.disabled .b-font:before,.column-pre-page-h-font.hover .b-font:before,.column-pre-page-h-font:hover .b-font:before{content:"\e6d6";color:inherit}.column-next-page-h-font .b-font:before,.column-next-page-h-font.disabled .b-font:before,.column-next-page-h-font.hover .b-font:before,.column-next-page-h-font:hover .b-font:before{content:"\e6d7";color:inherit}.trigger-triangle-font .b-font:before,.trigger-triangle-font.hover .b-font:before,.trigger-triangle-font:hover .b-font:before{content:"\e6f0";color:#999}.trigger-triangle-font.active .b-font:before,.trigger-triangle-font:active .b-font:before{content:"\e6f0";color:#3685f2}.trigger-triangle-font.disabled .b-font:before{content:"\e6f0";color:#999}.pull-down-font .b-font:before,.pull-down-font.disabled .b-font:before,.pull-down-h-font .b-font:before,.pull-down-h-font.disabled .b-font:before,.pull-down-h-font.hover .b-font:before,.pull-down-h-font:hover .b-font:before,.pull-down-ha-font .b-font:before,.pull-down-ha-font.hover .b-font:before,.pull-down-ha-font:hover .b-font:before{content:"\e70b";color:inherit}.pull-down-ha-font.active .b-font:before,.pull-down-ha-font:active .b-font:before{content:"\e70b";color:#3f8ce8}.pull-down-ha-font.disabled .b-font:before{content:"\e70b";color:inherit}.check-font .b-font:before,.check-font.disabled .b-font:before{content:"\e6cf";color:#3685f2}.item-check-font .b-font:before{content:"\e6cf";color:#fff}.item-check-font.hover .b-font:before,.item-check-font:hover .b-font:before{content:"\e6cf";color:#999}.item-check-font.active .b-font:before,.item-check-font:active .b-font:before{content:"\e6cf";color:#3f8ce8}.item-check-font.disabled .b-font:before{content:"\e6cf";color:#fff}.primary-key-font .b-font:before,.primary-key-font.disabled .b-font:before,.primary-key-font.hover .b-font:before,.primary-key-font:hover .b-font:before{content:"\e740";color:inherit}.drag-tag-font .b-font:before,.drag-tag-font.disabled .b-font:before{content:"\e6d0";color:#faaa39}.less-font .b-font:before,.less-font.hover .b-font:before,.less-font:hover .b-font:before{content:"\e75f";color:inherit}.less-font.active .b-font:before,.less-font:active .b-font:before{content:"\e75f";color:#3f8ce8}.less-font.disabled .b-font:before{content:"\e75f";color:inherit}.less-equal-font .b-font:before,.less-equal-font.hover .b-font:before,.less-equal-font:hover .b-font:before{content:"\e760";color:inherit}.less-equal-font.active .b-font:before,.less-equal-font:active .b-font:before{content:"\e760";color:#3f8ce8}.less-equal-font.disabled .b-font:before{content:"\e760";color:inherit}.text-bold-font .b-font:before,.text-bold-font.disabled .b-font:before{content:"\e75b";color:inherit}.text-italic-font .b-font:before,.text-italic-font.disabled .b-font:before{content:"\e75c";color:inherit}.text-underline-font .b-font:before,.text-underline-font.disabled .b-font:before{content:"\e75d";color:inherit}.text-color-font .b-font:before,.text-color-font.disabled .b-font:before{content:"\e75a";color:inherit}.text-background-font .b-font:before,.text-background-font.disabled .b-font:before{content:"\e758";color:inherit}.text-color-underline-font .b-font:before,.text-color-underline-font.disabled .b-font:before{content:"\e75d";color:inherit}.text-align-left-font .b-font:before,.text-align-left-font.disabled .b-font:before{content:"\e6ca";color:inherit}.text-align-center-font .b-font:before,.text-align-center-font.disabled .b-font:before{content:"\e6bf";color:inherit}.text-align-right-font .b-font:before,.text-align-right-font.disabled .b-font:before{content:"\e6c8";color:inherit}.toast-error-font .b-font:before,.toast-error-font.disabled .b-font:before{content:"\e757";color:inherit}.toast-success-font .b-font:before,.toast-success-font.disabled .b-font:before{content:"\e756";color:inherit}.toast-warning-font .b-font:before,.toast-warning-font.disabled .b-font:before{content:"\e755";color:inherit}.toast-message-font .b-font:before,.toast-message-font.disabled .b-font:before{content:"\e74b";color:inherit}.tree-collapse-icon-type1 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_collapse_1.png) center center no-repeat;background-size:contain}.tree-collapse-icon-type1 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_1.png) center center no-repeat}.tree-collapse-icon-type2 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_collapse_2.png) center center no-repeat;background-size:contain}.tree-collapse-icon-type2 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_2.png) center center no-repeat}.tree-collapse-icon-type3 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_collapse_3.png) center center no-repeat;background-size:contain}.tree-collapse-icon-type3 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_3.png) center center no-repeat}.tree-collapse-icon-type4 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_collapse_4.png) center center no-repeat;background-size:contain}.tree-collapse-icon-type4 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_collapse_4.png) center center no-repeat}.tree-expand-icon-type1 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_expand_1.png) center center no-repeat;background-size:contain}.tree-expand-icon-type1 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_1.png) center center no-repeat}.tree-expand-icon-type2 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_expand_2.png) center center no-repeat;background-size:contain}.tree-expand-icon-type2 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_2.png) center center no-repeat}.tree-expand-icon-type3 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_expand_3.png) center center no-repeat;background-size:contain}.tree-expand-icon-type3 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_3.png) center center no-repeat}.tree-expand-icon-type4 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_expand_4.png) center center no-repeat;background-size:contain}.tree-expand-icon-type4 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_expand_4.png) center center no-repeat}.tree-vertical-line-type2 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_vertical_line_2.png) center center no-repeat;background-size:contain}.tree-vertical-line-type2 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_2.png) center center no-repeat}.tree-vertical-line-type3 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_vertical_line_3.png) center center no-repeat;background-size:contain}.tree-vertical-line-type3 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_3.png) center center no-repeat}.tree-vertical-line-type4 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/tree_vertical_line_4.png) center center no-repeat;background-size:contain}.tree-vertical-line-type4 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/tree_vertical_line_4.png) center center no-repeat}.bi-theme-dark .tree-collapse-icon-type1 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_collapse_1.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type1 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_1.png) center center no-repeat}.bi-theme-dark .tree-collapse-icon-type2 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_collapse_2.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type2 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_2.png) center center no-repeat}.bi-theme-dark .tree-collapse-icon-type3 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_collapse_3.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type3 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_3.png) center center no-repeat}.bi-theme-dark .tree-collapse-icon-type4 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_collapse_4.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type4 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_collapse_4.png) center center no-repeat}.bi-theme-dark .tree-expand-icon-type1 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_expand_1.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type1 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_1.png) center center no-repeat}.bi-theme-dark .tree-expand-icon-type2 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_expand_2.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type2 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_2.png) center center no-repeat}.bi-theme-dark .tree-expand-icon-type3 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_expand_3.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type3 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_3.png) center center no-repeat}.bi-theme-dark .tree-expand-icon-type4 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_expand_4.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type4 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_expand_4.png) center center no-repeat}.bi-theme-dark .tree-vertical-line-type2 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_vertical_line_2.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type2 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_2.png) center center no-repeat}.bi-theme-dark .tree-vertical-line-type3 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_vertical_line_3.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type3 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_3.png) center center no-repeat}.bi-theme-dark .tree-vertical-line-type4 .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/dark/tree_vertical_line_4.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type4 .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/dark/tree_vertical_line_4.png) center center no-repeat}.check-box-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check_box_normal.png) center center no-repeat;background-size:contain}.check-box-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_normal.png) center center no-repeat}.check-box-icon.hover .x-icon,.check-box-icon:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check_box_normal.png) center center no-repeat;background-size:contain}.check-box-icon.hover .x-icon.hack,.check-box-icon:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_normal.png) center center no-repeat}.check-box-icon:active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check_box_normal.png) center center no-repeat;background-size:contain}.check-box-icon:active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_normal.png) center center no-repeat}.check-box-icon.active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check_box_active.png) center center no-repeat;background-size:contain}.check-box-icon.active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_active.png) center center no-repeat}.check-box-icon.disabled .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check_box_disable.png) center center no-repeat;background-size:contain}.check-box-icon.disabled .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_disable.png) center center no-repeat}.check-box-icon.disabled.active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/check_box_disable2.png) center center no-repeat;background-size:contain}.check-box-icon.disabled.active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/check_box_disable2.png) center center no-repeat}.radio-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio_normal.png) center center no-repeat;background-size:contain}.radio-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio_normal.png) center center no-repeat}.radio-icon.hover .x-icon,.radio-icon:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio_normal.png) center center no-repeat;background-size:contain}.radio-icon.hover .x-icon.hack,.radio-icon:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio_normal.png) center center no-repeat}.radio-icon:active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio_normal.png) center center no-repeat;background-size:contain}.radio-icon:active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio_normal.png) center center no-repeat}.radio-icon.active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio_active.png) center center no-repeat;background-size:contain}.radio-icon.active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio_active.png) center center no-repeat}.radio-icon.disabled .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio_disable.png) center center no-repeat;background-size:contain}.radio-icon.disabled .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio_disable.png) center center no-repeat}.radio-icon.disabled.active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/radio_disable2.png) center center no-repeat;background-size:contain}.radio-icon.disabled.active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/radio_disable2.png) center center no-repeat}.check-half-select-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/half_selected.png) center center no-repeat;background-size:contain}.check-half-select-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png) center center no-repeat}.slider-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/slider_normal_small.png) center center no-repeat;background-size:contain}.slider-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/slider_normal_small.png) center center no-repeat}.slider-icon.hover .x-icon,.slider-icon:hover .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/slider_active_small.png) center center no-repeat;background-size:contain}.slider-icon.hover .x-icon.hack,.slider-icon:hover .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/slider_active_small.png) center center no-repeat}.slider-icon.disabled .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/slider_normal_small.png) center center no-repeat;background-size:contain}.slider-icon.disabled .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/slider_normal_small.png) center center no-repeat}.auto-color-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/auto_normal.png) center center no-repeat;background-size:contain}.auto-color-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/auto_normal.png) center center no-repeat}.auto-color-icon.active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/auto_select.png) center center no-repeat;background-size:contain}.auto-color-icon.active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/auto_select.png) center center no-repeat}.auto-color-icon.disabled .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/auto_disable.png) center center no-repeat;background-size:contain}.auto-color-icon.disabled .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/auto_disable.png) center center no-repeat}.trans-color-icon .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/trans_normal.png) center center no-repeat;background-size:contain}.trans-color-icon .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/trans_normal.png) center center no-repeat}.trans-color-icon.active .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/trans_select.png) center center no-repeat;background-size:contain}.trans-color-icon.active .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/trans_select.png) center center no-repeat}.trans-color-icon.disabled .x-icon{display:block;background:url(https://fanruan.coding.me/fineui/dist/images/2x/icon/trans_disable.png) center center no-repeat;background-size:contain}.trans-color-icon.disabled .x-icon.hack{background:url(https://fanruan.coding.me/fineui/dist/images/1x/icon/trans_disable.png) center center no-repeat} \ No newline at end of file diff --git a/dist/bundle.min.js b/dist/bundle.min.js index 4a71c6980..f7f3d4e20 100644 --- a/dist/bundle.min.js +++ b/dist/bundle.min.js @@ -40,14 +40,14 @@ if(c.getChildrenLength()>0&&!c.leaf){var d="",h=b[c.id],i=h.y-e/2;d+="M"+h.x+"," type:"bi.icon_button",cls:"next-page-h-font",width:25,height:25}),this.right.on(BI.IconButton.EVENT_CHANGE,function(){a.setValue(a.year.getValue()+1),a.fireEvent(BI.YearPicker.EVENT_CHANGE),a._checkLeftValid(),a._checkRightValid()}),this.year=BI.createWidget({type:"bi.year_date_combo",min:b.min,max:b.max}),this.year.on(BI.YearDateCombo.EVENT_CHANGE,function(){a.setValue(a.year.getValue()),a.fireEvent(BI.YearPicker.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:{type:"bi.center_adapt",items:[this.left]},width:25},{type:"bi.center_adapt",items:[this.year]},{el:{type:"bi.center_adapt",items:[this.right]},width:25}]}),this.setValue({year:this._year})},_checkLeftValid:function(){var a=this.options,b=!(this._year===BI.parseDateTime(a.min,"%Y-%X-%d").getFullYear());return this.left.setEnable(b),b},_checkRightValid:function(){var a=this.options,b=!(this._year===BI.parseDateTime(a.max,"%Y-%X-%d").getFullYear());return this.right.setEnable(b),b},setValue:function(a){this._year=a,this.year.setValue(a),this._checkLeftValid(),this._checkRightValid()},getValue:function(){return this.year.getValue()}}),BI.YearPicker.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_picker",BI.YearPicker),BI.DateCalendarPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.DateCalendarPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-calendar-popup",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!0},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:this.selectedTime.day});return c},_init:function(){BI.DateCalendarPopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth(),this._day=this.today.getDate(),this.selectedTime=b.selectedTime||{year:this._year,month:this._month,day:this._day},this.datePicker=BI.createWidget({type:"bi.date_picker",min:b.min,max:b.max}),this.calendar=BI.createWidget({direction:"top",element:this,logic:{dynamic:!0},type:"bi.navigation",tab:this.datePicker,cardCreator:BI.bind(this._createNav,this),afterCardCreated:function(){},afterCardShow:function(){this.setValue(a.selectedTime)}}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){a.selectedTime=a.datePicker.getValue(),a.selectedTime.day=1,a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime))}),this.calendar.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedTime=a.calendar.getValue(),a.setValue(a.selectedTime),a.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)})},setValue:function(a){this.datePicker.setValue(a),this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),this.calendar.setValue(a),this.selectedTime=a},getValue:function(){return this.selectedTime}}),BI.DateCalendarPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.date_calendar_popup",BI.DateCalendarPopup),BI.YearPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31"})},_createYearCalendar:function(a){var b=this.options,c=this._year,d=BI.createWidget({type:"bi.year_calendar",behaviors:b.behaviors,min:b.min,max:b.max,logic:{dynamic:!0},year:c+12*a});return d.setValue(this._year),d},_init:function(){BI.YearPopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedYear=this._year=BI.getDate().getFullYear();var c=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:25,height:25,value:-1}),d=BI.createWidget({type:"bi.icon_button",cls:"next-page-h-font",width:25,height:25,value:1});this.navigation=BI.createWidget({type:"bi.navigation",element:this,single:!0,logic:{dynamic:!0},tab:{cls:"year-popup-navigation bi-high-light bi-border-top",height:25,items:[c,d]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(a.selectedYear);var b=this.getSelectedCard();c.setEnable(!b.isFrontYear()),d.setEnable(!b.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedYear=this.getValue(),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.YearPopup.EVENT_CHANGE,a.selectedYear)}),BI.isKey(b.value)&&this.setValue(b.value)},getValue:function(){return this.selectedYear},setValue:function(a){var b=this.options;BI.checkDateVoid(a,1,1,b.min,b.max)[0]?(a=BI.getDate().getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue("")):(this.selectedYear=a,this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue(a))}}),BI.YearPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_popup",BI.YearPopup),BI.DateTriangleTrigger=BI.inherit(BI.Trigger,{_const:{height:25,iconWidth:16,iconHeight:13},_defaultConfig:function(){return BI.extend(BI.DateTriangleTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-triangle-trigger pull-down-ha-font cursor-pointer",height:25})},_init:function(){BI.DateTriangleTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"right",text:a.text,value:a.value,height:b.height}),this.icon=BI.createWidget({type:"bi.icon",width:b.iconWidth,height:b.iconHeight}),BI.createWidget({type:"bi.center_adapt",element:this,items:[{type:"bi.center_adapt",width:50,height:b.height,items:[this.text,this.icon]}]})},setValue:function(a){this.text.setValue(a)},getValue:function(){return this.text.getValue()},setText:function(a){this.text.setText(a)},getText:function(){return this.item.getText()},getKey:function(){}}),BI.shortcut("bi.date_triangle_trigger",BI.DateTriangleTrigger),BI.DateCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DateCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-combo bi-border",height:25})},_init:function(){BI.DateCombo.superclass._init.apply(this,arguments);var a=this;this.options;this.trigger=BI.createWidget({type:"bi.date_trigger"}),this.trigger.on(BI.DateTrigger.EVENT_TRIGGER_CLICK,function(){a.combo.toggle()}),this.popup=BI.createWidget({type:"bi.date_calendar_popup"}),this.popup.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue())}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{width:270,el:this.popup,stopPropagation:!1}})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.shortcut("bi.date_combo",BI.DateCombo),BI.DateTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,yearLength:4,yearMonthLength:7},_defaultConfig:function(){return BI.extend(BI.DateTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-date-trigger",min:"1900-01-01",max:"2099-12-31",height:24})},_init:function(){BI.DateTrigger.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(b){var c=b.match(/\d+/g);return a._autoAppend(b,c),a._dateCheck(b)&&BI.checkDateLegal(b)&&a._checkVoid({year:c[0],month:c[1],day:c[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){return a.editor.isEditing()?BI.i18nText("BI-Date_Trigger_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")}}),this.editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){a.fireEvent(BI.DateTrigger.EVENT_KEY_DOWN)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.DateTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DateTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_VALID,function(){a.fireEvent(BI.DateTrigger.EVENT_VALID)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DateTrigger.EVENT_ERROR)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();if(BI.isNotNull(b)&&a.editor.setState(b),BI.isNotEmptyString(b)){var c=b.split("-");a.store_value={type:BI.DateTrigger.MULTI_DATE_CALENDAR,value:{year:0|c[0],month:c[1]-1,day:0|c[2]}}}a.fireEvent(BI.DateTrigger.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.DateTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.DateTrigger.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:BI.createWidget(),width:30},{el:this.editor}]}),this.setValue(b.value)},_dateCheck:function(a){return BI.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")==a||BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")==a||BI.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")==a||BI.parseDateTime(a,"%Y-%X-%e").print("%Y-%X-%e")==a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.options.min,this.options.max)[0]},_autoAppend:function(a,b){var c=this,d=BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d"),e=function(a){return BI.parseDateTime(a,"%Y").print("%Y")==a&&d>=c.options.min&&d<=c.options.max},f=function(a){return BI.parseDateTime(a,"%Y-%X").print("%Y-%X")==a&&d>=c.options.min&&d<=c.options.max};if(BI.isNotNull(b)&&BI.checkDateLegal(a))switch(a.length){case this._const.yearLength:e(a)&&this.editor.setValue(a+"-");break;case this._const.yearMonthLength:f(a)&&this.editor.setValue(a+"-")}},setValue:function(a){var b,c,d=this,e=BI.getDate();this.store_value=a,BI.isNotNull(a)&&(b=a.type||BI.DateTrigger.MULTI_DATE_CALENDAR,c=a.value,BI.isNull(c)&&(c=a));var f=function(a,b){var c=a.print("%Y-%x-%e");d.editor.setState(c),d.editor.setValue(c),d.setTitle(b+":"+c)};switch(b){case BI.DateTrigger.MULTI_DATE_YEAR_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_PREV];e=BI.getDate(e.getFullYear()-1*c,e.getMonth(),e.getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_AFTER];e=BI.getDate(e.getFullYear()+1*c,e.getMonth(),e.getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_BEGIN];e=BI.getDate(e.getFullYear(),0,1),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_END];e=BI.getDate(e.getFullYear(),11,31),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_PREV];e=BI.getDate().getBeforeMulQuarter(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_AFTER];e=BI.getDate().getAfterMulQuarter(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN];e=BI.getDate().getQuarterStartDate(),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_END];e=BI.getDate().getQuarterEndDate(),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_PREV];e=BI.getDate().getBeforeMultiMonth(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_AFTER];e=BI.getDate().getAfterMultiMonth(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_BEGIN];e=BI.getDate(e.getFullYear(),e.getMonth(),1),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_END];e=BI.getDate(e.getFullYear(),e.getMonth(),e.getLastDateOfMonth().getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_WEEK_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_PREV];e=e.getOffsetDate(-7*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_WEEK_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_AFTER];e=e.getOffsetDate(7*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_PREV];e=e.getOffsetDate(-1*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_AFTER];e=e.getOffsetDate(1*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_TODAY:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_TODAY];e=BI.getDate(),f(e,g);break;default:if(BI.isNull(c)||BI.isNull(c.day))this.editor.setState(""),this.editor.setValue(""),this.setTitle("");else{var h=c.year+"-"+(c.month+1)+"-"+c.day;this.editor.setState(h),this.editor.setValue(h),this.setTitle(h)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.store_value}}),BI.DateTrigger.MULTI_DATE_YEAR_PREV=1,BI.DateTrigger.MULTI_DATE_YEAR_AFTER=2,BI.DateTrigger.MULTI_DATE_YEAR_BEGIN=3,BI.DateTrigger.MULTI_DATE_YEAR_END=4,BI.DateTrigger.MULTI_DATE_MONTH_PREV=5,BI.DateTrigger.MULTI_DATE_MONTH_AFTER=6,BI.DateTrigger.MULTI_DATE_MONTH_BEGIN=7,BI.DateTrigger.MULTI_DATE_MONTH_END=8,BI.DateTrigger.MULTI_DATE_QUARTER_PREV=9,BI.DateTrigger.MULTI_DATE_QUARTER_AFTER=10,BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN=11,BI.DateTrigger.MULTI_DATE_QUARTER_END=12,BI.DateTrigger.MULTI_DATE_WEEK_PREV=13,BI.DateTrigger.MULTI_DATE_WEEK_AFTER=14,BI.DateTrigger.MULTI_DATE_DAY_PREV=15,BI.DateTrigger.MULTI_DATE_DAY_AFTER=16,BI.DateTrigger.MULTI_DATE_DAY_TODAY=17,BI.DateTrigger.MULTI_DATE_PARAM=18,BI.DateTrigger.MULTI_DATE_CALENDAR=19,BI.DateTrigger.MULTI_DATE_SEGMENT_NUM={},BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_PREV]=BI.i18nText("BI-Multi_Date_Year_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_AFTER]=BI.i18nText("BI-Multi_Date_Year_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_BEGIN]=BI.i18nText("BI-Multi_Date_Year_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_END]=BI.i18nText("BI-Multi_Date_Year_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_PREV]=BI.i18nText("BI-Multi_Date_Quarter_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_AFTER]=BI.i18nText("BI-Multi_Date_Quarter_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN]=BI.i18nText("BI-Multi_Date_Quarter_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_END]=BI.i18nText("BI-Multi_Date_Quarter_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_PREV]=BI.i18nText("BI-Multi_Date_Month_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_AFTER]=BI.i18nText("BI-Multi_Date_Month_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_BEGIN]=BI.i18nText("BI-Multi_Date_Month_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_END]=BI.i18nText("BI-Multi_Date_Month_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_PREV]=BI.i18nText("BI-Multi_Date_Week_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_AFTER]=BI.i18nText("BI-Multi_Date_Week_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_PREV]=BI.i18nText("BI-Multi_Date_Day_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_AFTER]=BI.i18nText("BI-Multi_Date_Day_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_TODAY]=BI.i18nText("BI-Multi_Date_Today"),BI.DateTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DateTrigger.EVENT_START="EVENT_START",BI.DateTrigger.EVENT_STOP="EVENT_STOP",BI.DateTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DateTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.DateTrigger.EVENT_VALID="EVENT_VALID",BI.DateTrigger.EVENT_ERROR="EVENT_ERROR",BI.DateTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.DateTrigger.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.shortcut("bi.date_trigger",BI.DateTrigger),BI.StaticDatePaneCard=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StaticDatePaneCard.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-pane",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_init:function(){BI.StaticDatePaneCard.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth(),this.selectedTime=b.selectedTime||{year:this._year,month:this._month},this.datePicker=BI.createWidget({type:"bi.date_picker",min:b.min,max:b.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){a.selectedTime=a.datePicker.getValue(),a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime))}),this.calendar=BI.createWidget({direction:"top",element:this,logic:{dynamic:!1},type:"bi.navigation",tab:this.datePicker,cardCreator:BI.bind(this._createNav,this)}),this.calendar.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedTime=a.calendar.getValue(),a.calendar.empty(),a.setValue(a.selectedTime),a.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)}),this.setValue(b.selectedTime)},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!1},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:this.selectedTime.day});return c},_getNewCurrentDate:function(){var a=BI.getDate();return{year:a.getFullYear(),month:a.getMonth()}},_setCalenderValue:function(a){this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),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.static_date_pane_card",BI.StaticDatePaneCard),BI.DynamicDatePane=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-pane"},render:function(){var a=this;return{type:"bi.vtape",items:[{el:{type:"bi.linear_segment",cls:"bi-border-bottom",height:30,items:BI.createItems([{text:BI.i18nText("BI-Multi_Date_YMD"),value:BI.DynamicDatePane.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicDatePane.Dynamic}],{textAlign:"center"}),listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(){var b=this.getValue()[0];switch(a.dateTab.setSelect(b),b){case BI.DynamicDatePane.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth(),day:c.getDate()});break;case BI.DynamicDatePane.Dynamic:a.dynamicPane.setValue({year:0})}}}],ref:function(){a["switch"]=this}},height:30},{type:"bi.tab",ref:function(){a.dateTab=this},showIndex:BI.DynamicDatePane.Static,cardCreator:function(b){switch(b){case BI.DynamicDatePane.Static:return{type:"bi.static_date_pane_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.ymd=this}};case BI.DynamicDatePane.Dynamic:default:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.dynamicPane=this}}}}}]}},mounted:function(){this.setValue(this.options.value)},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},setValue:function(a){a=a||{};var b=a.type||BI.DynamicDateCombo.Static,c=a.value||a;switch(this["switch"].setValue(b),this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c);break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var d=BI.getDate();this.ymd.setValue({year:d.getFullYear(),month:d.getMonth()})}else this.ymd.setValue(c)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.shortcut("bi.dynamic_date_pane",BI.DynamicDatePane),BI.extend(BI.DynamicDatePane,{Static:1,Dynamic:2}),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,c=BI.getDate();this.storeValue=BI.isNotNull(b.value)?b.value:{year:c.getFullYear(),month:c.getMonth(),day:c.getDate(),hour:c.getHours(),minute:c.getMinutes(),second:c.getSeconds()},this.trigger=BI.createWidget({type:"bi.date_time_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,value:b.value}),this.popup=BI.createWidget({type:"bi.date_time_popup",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,value:b.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,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 d=BI.createWidget({type:"bi.icon_button",cls:"bi-trigger-icon-button date-font bi-border-right",width:24,height:24});d.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:d,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:374})},_init:function(){BI.DateTimePopup.superclass._init.apply(this,arguments);var a=this,b=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}),a.dateCombo.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}),this.dateSelect=BI.createWidget({type:"bi.vertical_adapt",cls:"bi-border-top",items:[{type:"bi.label",text:BI.i18nText("BI-Basic_Time"),width:45},{type:"bi.date_time_select",max:23,min:0,width:60,height:30,listeners:[{eventName:BI.DateTimeSelect.EVENT_CONFIRM,action:function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}}],ref:function(b){a.hour=b}},{type:"bi.label",text:":",width:15},{type:"bi.date_time_select",max:59,min:0,width:60,height:30,listeners:[{eventName:BI.DateTimeSelect.EVENT_CONFIRM,action:function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}}],ref:function(b){a.minute=b}},{type:"bi.label",text:":",width:15},{type:"bi.date_time_select",max:59,min:0,width:60,height:30,listeners:[{eventName:BI.DateTimeSelect.EVENT_CONFIRM,action:function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}}],ref:function(b){a.second=b}}]}),this.setValue(b.value),this.dateButton=BI.createWidget({type:"bi.grid",items:[[this.cancelButton,this.okButton]]}),BI.createWidget({element:this,type:"bi.vtape",items:[{el:this.dateCombo},{el:this.dateSelect,height:50},{el:this.dateButton,height:30}]})},setValue:function(a){var b,c=a;BI.isNull(c)?(b=BI.getDate(),this.dateCombo.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),this.hour.setValue(b.getHours()),this.minute.setValue(b.getMinutes()),this.second.setValue(b.getSeconds())):(this.dateCombo.setValue({year:c.year,month:c.month,day:c.day}),this.hour.setValue(c.hour),this.minute.setValue(c.minute),this.second.setValue(c.second))},getValue:function(){return{year:this.dateCombo.getValue().year,month:this.dateCombo.getValue().month,day:this.dateCombo.getValue().day,hour:this.hour.getValue(),minute:this.minute.getValue(),second:this.second.getValue()}}}),BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE="BUTTON_CANCEL_EVENT_CHANGE",BI.DateTimePopup.CALENDAR_EVENT_CHANGE="CALENDAR_EVENT_CHANGE",BI.shortcut("bi.date_time_popup",BI.DateTimePopup),BI.DateTimeSelect=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DateTimeSelect.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-select bi-border",max:23,min:0})},_init:function(){BI.DateTimeSelect.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",value:this._alertInEditorValue(b.min),allowBlank:!1,errorText:BI.i18nText("BI-Please_Input_Natural_Number"),validationChecker:function(a){return BI.isNaturalNumber(a)}}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){a._finetuning(0),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",cls:"column-pre-page-h-font top-button bi-border-left bi-border-bottom"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(1),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",cls:"column-next-page-h-font bottom-button bi-border-left"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-1),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this._finetuning(0),BI.createWidget({type:"bi.htape",element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:30}]})},_alertOutEditorValue:function(a){return a>this.options.max&&(a=this.options.min),athis.options.max&&(a=this.options.min),a1},_needSpliter:function(a,b){return a0?1:0}},setValue:function(a){a=a||{};var b=[],c=[];BI.isNotNull(a.year)&&(b.push(BI.DynamicDateCard.TYPE.YEAR),c.push(this._createValue(BI.DynamicDateCard.TYPE.YEAR,a.year))),BI.isNotNull(a.quarter)&&(b.push(BI.DynamicDateCard.TYPE.QUARTER),c.push(this._createValue(BI.DynamicDateCard.TYPE.QUARTER,a.quarter))),BI.isNotNull(a.month)&&(b.push(BI.DynamicDateCard.TYPE.MONTH),c.push(this._createValue(BI.DynamicDateCard.TYPE.MONTH,a.month))),BI.isNotNull(a.week)&&(b.push(BI.DynamicDateCard.TYPE.WEEK),c.push(this._createValue(BI.DynamicDateCard.TYPE.WEEK,a.week))),BI.isNotNull(a.day)&&(b.push(BI.DynamicDateCard.TYPE.DAY),c.push(this._createValue(BI.DynamicDateCard.TYPE.DAY,a.day))),BI.isNotNull(a.workDay)&&(b.push(BI.DynamicDateCard.TYPE.WORK_DAY),c.push(this._createValue(BI.DynamicDateCard.TYPE.WORK_DAY,a.workDay))),this.checkgroup.setValue(b),this.workDayBox.setSelected(BI.isNotNull(a.workDay)),this.resultPane.populate(this._getParamJson(c,a.position))},getValue:function(){var a=this,b={},c=this.checkgroup.getValue(),d=this.resultPane.getAllButtons();if(0!==c.length&&BI.each(d,function(c,d){var e=d.getValue();switch(e.dateType){case BI.DynamicDateCard.TYPE.YEAR:b.year=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.QUARTER:b.quarter=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.MONTH:b.month=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.WEEK:b.week=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.DAY:b.day=0===e.offset?-e.value:e.value}BI.isNull(e.dateType)&&(b.position=a.position||BI.DynamicDateCard.OFFSET.CURRENT)}),this.workDayBox.isSelected()){var e=d[0].getValue();b.workDay=0===e.offset?-e.value:e.value}return b}}),BI.shortcut("bi.dynamic_date_card",BI.DynamicDateCard),BI.extend(BI.DynamicDateCard,{TYPE:{YEAR:1,QUARTER:2,MONTH:3,WEEK:4,DAY:5,WORK_DAY:6},OFFSET:{CURRENT:1,BEGIN:2,END:3}}),BI.DynamicDateCombo=BI.inherit(BI.Single,{constants:{popupHeight:259,popupWidth:270,comboAdjustHeight:1,border:1,DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},props:{baseCls:"bi-dynamic-date-combo bi-border",height:24},render:function(){var a=this,b=this.options;this.storeTriggerValue="";var c=BI.getDate();return this.storeValue=b.value,{type:"bi.htape",items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24,ref:function(){a.changeIcon=this}},width:24},{type:"bi.absolute",items:[{el:{type:"bi.combo",ref:function(){a.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,value:b.value,ref:function(){a.trigger=this},listeners:[{eventName:BI.DynamicDateTrigger.EVENT_KEY_DOWN,action:function(){a.combo.isViewVisible()&&a.combo.hideView()}},{eventName:BI.DynamicDateTrigger.EVENT_STOP,action:function(){a.combo.isViewVisible()||a.combo.showView()}},{eventName:BI.DynamicDateTrigger.EVENT_TRIGGER_CLICK,action:function(){a.combo.toggle()}},{eventName:BI.DynamicDateTrigger.EVENT_FOCUS,action:function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS)}},{eventName:BI.DynamicDateTrigger.EVENT_ERROR,action:function(){a.storeValue={year:c.getFullYear(),month:c.getMonth()},a.popup.setValue(),a.fireEvent(BI.DynamicDateCombo.EVENT_ERROR)}},{eventName:BI.DynamicDateTrigger.EVENT_VALID,action:function(){a.fireEvent(BI.DynamicDateCombo.EVENT_VALID)}},{eventName:BI.DynamicDateTrigger.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateCombo.EVENT_CHANGE)}},{eventName:BI.DynamicDateTrigger.EVENT_CONFIRM,action:function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:{type:"bi.dynamic_date_popup",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,value:b.value,ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}]},stopPropagation:!1},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW)}}]},top:0,left:0,right:0,bottom:0},{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:24,height:24,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}}]},top:0,right:0}]}],ref:function(b){a.comboWrapper=b}}},mounted:function(){this._checkDynamicValue(this.options.value)},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.DynamicDateCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()},hidePopupView:function(){this.combo.hideView()}}),BI.DynamicDateCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicDateCombo.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DynamicDateCombo.EVENT_VALID="EVENT_VALID",BI.DynamicDateCombo.EVENT_ERROR="EVENT_ERROR",BI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW="BI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_date_combo",BI.DynamicDateCombo),BI.extend(BI.DynamicDateCombo,{Static:1,Dynamic:2}),BI.DynamicDateParamItem=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-param-item",dateType:BI.DynamicDateCard.TYPE.YEAR,value:0,offset:0,height:24},render:function(){var a=this,b=this.options;return{type:"bi.htape",items:[{el:{type:"bi.sign_editor",cls:"bi-border",height:22,validationChecker:function(a){return BI.isNaturalNumber(a)},value:b.value,ref:function(){a.editor=this},errorText:function(a){return BI.isEmptyString(a)?BI.i18nText("BI-Basic_Input_Can_Not_Null"):BI.i18nText("BI-Please_Input_Positive_Integer")},allowBlank:!1,listeners:[{eventName:BI.SignEditor.EVENT_CONFIRM,action:function(){a.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE)}}]},width:60},{el:{type:"bi.label",height:24,text:this._getText()},width:20},{type:"bi.text_value_combo",height:24,items:[{text:BI.i18nText("BI-Basic_Front"),value:0},{text:BI.i18nText("BI-Basic_Behind"),value:1}],ref:function(){a.offsetCombo=this},value:b.offset,listeners:[{eventName:BI.TextValueCombo.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE)}}]}]}},_getText:function(){var a="";switch(this.options.dateType){case BI.DynamicDateCard.TYPE.YEAR:a=BI.i18nText("BI-Basic_Year");break;case BI.DynamicDateCard.TYPE.QUARTER:a=BI.i18nText("BI-Basic_Single_Quarter");break;case BI.DynamicDateCard.TYPE.MONTH:a=BI.i18nText("BI-Basic_Month");break;case BI.DynamicDateCard.TYPE.WEEK:a=BI.i18nText("BI-Basic_Week");break;case BI.DynamicDateCard.TYPE.DAY:default:a=BI.i18nText("BI-Basic_Day")}return a},setValue:function(a){a=a||{},a.value=a.value||0,a.offset=a.offset||0,this.editor.setValue(a.value),this.offsetCombo.setValue(a.offset)},getValue:function(){return{dateType:this.options.dateType,value:this.editor.getValue(),offset:this.offsetCombo.getValue()[0]}}}),BI.DynamicDateParamItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_date_param_item",BI.DynamicDateParamItem),BI.DynamicDatePopup=BI.inherit(BI.Widget,{constants:{tabHeight:30},props:{baseCls:"bi-dynamic-date-popup",width:248,height:344},_init:function(){BI.DynamicDatePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={type:BI.DynamicDateCombo.Static},BI.createWidget({element:this,type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",forceCenter:!0,cls:"bi-high-light bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-left bi-border-right bi-border-top",shadow:!0,text:BI.i18nText("BI-Multi_Date_Today"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-high-light bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}),this.setValue(b.value)},_getTabJson:function(){var a=this;return{type:"bi.tab",showIndex:BI.DynamicDateCombo.Static,ref:function(){a.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-border-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Multi_Date_YMD"),value:BI.DynamicDateCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicDateCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(b){switch(b){case BI.DynamicDateCombo.Dynamic:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,b)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicDateCombo.Static:default:return{type:"bi.date_calendar_popup",min:a.options.min,max:a.options.max,listeners:[{eventName:BI.DateCalendarPopup.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.EVENT_CHANGE)}}],ref:function(){a.ymd=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicDateCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth(),day:c.getDate()}),a._setInnerValue();break;case BI.DynamicDateCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicDateCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=a.print("%Y-%x-%e"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var e=BI.getDate();this.ymd.setValue({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.ymd.setValue(c),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"));this.textButton.setEnable(!0)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.DynamicDatePopup.EVENT_CHANGE="EVENT_CHANGE",BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.shortcut("bi.dynamic_date_popup",BI.DynamicDatePopup),BI.DynamicDateTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,yearLength:4,yearMonthLength:7},props:{extraCls:"bi-date-trigger",min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicDateTrigger.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(b){var c=b.match(/\d+/g);return a._autoAppend(b,c),a._dateCheck(b)&&BI.checkDateLegal(b)&&a._checkVoid({year:c[0],month:c[1],day:c[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){return a.editor.isEditing()?BI.i18nText("BI-Date_Trigger_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")}}),this.editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_VALID,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_VALID)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_ERROR)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();if(BI.isNotNull(b)&&a.editor.setState(b),BI.isNotEmptyString(b)){var c=b.split("-");a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:0|c[0],month:c[1],day:0|c[2]}}}a.fireEvent(BI.DynamicDateTrigger.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.DynamicDateTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.editor},{el:BI.createWidget(),width:30}]}),this.setValue(b.value)},_dateCheck:function(a){ return BI.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")===a||BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")===a||BI.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")===a||BI.parseDateTime(a,"%Y-%X-%e").print("%Y-%X-%e")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.options.min,this.options.max)[0]},_autoAppend:function(a,b){if(BI.isNotNull(b)&&BI.checkDateLegal(a))switch(a.length){case this._const.yearLength:this._yearCheck(a)&&this.editor.setValue(a+"-");break;case this._const.yearMonthLength:this._monthCheck(a)&&this.editor.setValue(a+"-")}},_yearCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d");return BI.parseDateTime(a,"%Y").print("%Y")===a&&b>=this.options.min&&b<=this.options.max},_monthCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d");return BI.parseDateTime(a,"%Y-%X").print("%Y-%X")===a&&b>=this.options.min&&b<=this.options.max},_setInnerValue:function(a,b){var c=a.print("%Y-%x-%e");this.editor.setState(c),this.editor.setValue(c),this.setTitle(BI.isEmptyString(b)?c:b+":"+c)},_getText:function(a){function b(a,b){switch(b){case BI.DynamicDateCard.OFFSET.BEGIN:return a+BI.i18nText("BI-Basic_Begin_Start");case BI.DynamicDateCard.OFFSET.END:return a+BI.i18nText("BI-Basic_End_Stop");case BI.DynamicDateCard.OFFSET.CURRENT:default:return BI.i18nText("BI-Basic_Current_Day")}}var c="";return BI.isNotNull(a.year)&&0!==a.year&&(c+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))+b(BI.i18nText("BI-Basic_Year"),a.position)),BI.isNotNull(a.quarter)&&0!==a.quarter&&(c+=Math.abs(a.quarter)+BI.i18nText("BI-Basic_Single_Quarter")+(a.quarter<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))+b(BI.i18nText("BI-Basic_Year"),a.position)),BI.isNotNull(a.month)&&0!==a.month&&(c+=Math.abs(a.month)+BI.i18nText("BI-Basic_Month")+(a.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))+b(BI.i18nText("BI-Basic_Month"),a.position)),BI.isNotNull(a.week)&&0!==a.week&&(c+=Math.abs(a.week)+BI.i18nText("BI-Basic_Week")+(a.week<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))+b(BI.i18nText("BI-Basic_Week"),a.position)),BI.isNotNull(a.day)&&0!==a.day&&(c+=Math.abs(a.day)+BI.i18nText("BI-Basic_Day")+(a.day<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))+BI.size(a)===1?b(BI.i18nText("BI-Basic_Month"),a.position):""),BI.isNotNull(a.workDay)&&0!==a.workDay&&(c+=Math.abs(a.workDay)+BI.i18nText("BI-Basic_Work_Day")+(a.workDay<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),c},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:if(BI.isNull(c)||BI.isNull(c.day))this.editor.setState(""),this.editor.setValue(""),this.setTitle("");else{var f=c.year+"-"+c.month+"-"+c.day;this.editor.setState(f),this.editor.setValue(f),this.setTitle(f)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.storeValue}}),BI.DynamicDateTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicDateTrigger.EVENT_START="EVENT_START",BI.DynamicDateTrigger.EVENT_STOP="EVENT_STOP",BI.DynamicDateTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicDateTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.DynamicDateTrigger.EVENT_VALID="EVENT_VALID",BI.DynamicDateTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicDateTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.DynamicDateTrigger.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.shortcut("bi.dynamic_date_trigger",BI.DynamicDateTrigger),BI.DynamicDateTimeCombo=BI.inherit(BI.Single,{constants:{popupHeight:259,popupWidth:270,comboAdjustHeight:1,border:1,DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},props:{baseCls:"bi-dynamic-date-combo bi-border",height:24},render:function(){var a=this,b=this.options;this.storeTriggerValue="";var c=BI.getDate();return this.storeValue=b.value,{type:"bi.htape",items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24,ref:function(){a.changeIcon=this}},width:24},{type:"bi.absolute",items:[{el:{type:"bi.combo",ref:function(){a.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_time_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,value:b.value,ref:function(){a.trigger=this},listeners:[{eventName:BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN,action:function(){a.combo.isViewVisible()&&a.combo.hideView()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_STOP,action:function(){a.combo.isViewVisible()||a.combo.showView()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_TRIGGER_CLICK,action:function(){a.combo.toggle()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_FOCUS,action:function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_ERROR,action:function(){a.storeValue={year:c.getFullYear(),month:c.getMonth()},a.popup.setValue(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_ERROR)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_VALID,action:function(){a.fireEvent(BI.DynamicDateTimeCombo.EVENT_VALID)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CHANGE)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_CONFIRM,action:function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:{type:"bi.dynamic_date_time_popup",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,value:b.value,ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate(),hour:0,minute:0,second:0}),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}}]},stopPropagation:!1},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW)}}]},top:0,left:0,right:0,bottom:0},{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:24,height:24,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}}]},top:0,right:0}]}],ref:function(b){a.comboWrapper=b}}},mounted:function(){this._checkDynamicValue(this.options.value)},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.DynamicDateTimeCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()},hidePopupView:function(){this.combo.hideView()}}),BI.DynamicDateTimeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicDateTimeCombo.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicDateTimeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DynamicDateTimeCombo.EVENT_VALID="EVENT_VALID",BI.DynamicDateTimeCombo.EVENT_ERROR="EVENT_ERROR",BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_date_time_combo",BI.DynamicDateTimeCombo),BI.extend(BI.DynamicDateTimeCombo,{Static:1,Dynamic:2}),BI.DynamicDateTimePopup=BI.inherit(BI.Widget,{constants:{tabHeight:30},props:{baseCls:"bi-dynamic-date-time-popup",width:248,height:385},_init:function(){BI.DynamicDateTimePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={type:BI.DynamicDateCombo.Static},BI.createWidget({element:this,type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",forceCenter:!0,cls:"bi-high-light bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-left bi-border-right bi-border-top",shadow:!0,text:BI.i18nText("BI-Multi_Date_Today"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-high-light bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}),this.setValue(b.value)},_getTabJson:function(){var a=this;return{type:"bi.tab",showIndex:BI.DynamicDateCombo.Static,ref:function(){a.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-border-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Multi_Date_YMD"),value:BI.DynamicDateCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicDateCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(b){switch(b){case BI.DynamicDateCombo.Dynamic:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,b)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicDateCombo.Static:default:return{type:"bi.vtape",items:[{type:"bi.date_calendar_popup",min:a.options.min,max:a.options.max,ref:function(){a.ymd=this}},{el:{type:"bi.dynamic_date_time_select",ref:function(){a.timeSelect=this},listeners:[{eventName:BI.DynamicDateTimeSelect.EVENT_CONFIRM,action:function(){}}]},height:40}]}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicDateCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth(),day:c.getDate()}),a.timeSelect.setValue(),a._setInnerValue();break;case BI.DynamicDateCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicDateCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=a.print("%Y-%x-%e"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var e=BI.getDate();this.ymd.setValue({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()}),this.timeSelect.setValue(),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.ymd.setValue(c),this.timeSelect.setValue({hour:c.hour,minute:c.minute,second:c.second}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"));this.textButton.setEnable(!0)}},getValue:function(){var a=this.dateTab.getSelect();return{type:a,value:a===BI.DynamicDateTimeCombo.Static?BI.extend(this.ymd.getValue(),this.timeSelect.getValue()):this.dynamicPane.getValue()}}}),BI.DynamicDateTimePopup.EVENT_CHANGE="EVENT_CHANGE",BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.shortcut("bi.dynamic_date_time_popup",BI.DynamicDateTimePopup),BI.DynamicDateTimeSelect=BI.inherit(BI.Widget,{props:{baseCls:"bi-date-time-select bi-border-top"},render:function(){var a=this;return{type:"bi.center_adapt",items:[{type:"bi.vertical_adapt",items:[{el:{type:"bi.number_editor",ref:function(){a.hour=this},validationChecker:function(a){return BI.isNaturalNumber(a)&&BI.parseInt(a)<24},errorText:function(){return BI.i18nText("BI-Basic_Input_From_To_Number",'"00-23"')},listeners:[{eventName:BI.SignEditor.EVENT_CONFIRM,action:function(){this.setValue(a._formatValueToDoubleDigit(this.getValue())),a.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}},{eventName:BI.SignEditor.EVENT_CHANGE,action:function(){var b=a._autoSwitch(this.getValue(),BI.DynamicDateTimeSelect.HOUR);this.setValue(b)}}],width:60,height:24},lgap:14},{type:"bi.label",text:":",width:20},{type:"bi.number_editor",ref:function(){a.minute=this},validationChecker:function(a){return BI.isNaturalNumber(a)&&BI.parseInt(a)<60},errorText:function(){return BI.i18nText("BI-Basic_Input_From_To_Number",'"00-59"')},listeners:[{eventName:BI.SignEditor.EVENT_CONFIRM,action:function(){this.setValue(a._formatValueToDoubleDigit(this.getValue()),BI.DynamicDateTimeSelect.MINUTE),a.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}},{eventName:BI.SignEditor.EVENT_CHANGE,action:function(){var b=a._autoSwitch(this.getValue(),BI.DynamicDateTimeSelect.MINUTE);this.setValue(b)}}],width:60,height:24},{type:"bi.label",text:":",width:20},{type:"bi.number_editor",ref:function(){a.second=this},validationChecker:function(a){return BI.isNaturalNumber(a)&&BI.parseInt(a)<60},errorText:function(){return BI.i18nText("BI-Basic_Input_From_To_Number",'"00-59"')},listeners:[{eventName:BI.SignEditor.EVENT_CONFIRM,action:function(){this.setValue(a._formatValueToDoubleDigit(this.getValue())),a.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}}],width:60,height:24}]}]}},_autoSwitch:function(a,b){var c=0,d=a;switch(b){case BI.DynamicDateTimeSelect.HOUR:c=2;break;case BI.DynamicDateTimeSelect.MINUTE:c=6}return 1===a.length&&BI.parseInt(a)>c&&(d="0"+d),2===d.length&&(b===BI.DynamicDateTimeSelect.HOUR?this.minute.focus():this.second.focus()),d},_formatValueToDoubleDigit:function(a){(BI.isNull(a)||BI.isEmptyString(a))&&(a=0);var b=BI.parseInt(a);return b<10&&(b="0"+b),b},_assertValue:function(a){return a=a||{},a.hour=this._formatValueToDoubleDigit(a.hour)||"00",a.minute=this._formatValueToDoubleDigit(a.minute)||"00",a.second=this._formatValueToDoubleDigit(a.second)||"00",a},getValue:function(){return{hour:BI.parseInt(this.hour.getValue()),minute:BI.parseInt(this.minute.getValue()),second:BI.parseInt(this.second.getValue())}},setValue:function(a){a=this._assertValue(a),this.hour.setValue(a.hour),this.minute.setValue(a.minute),this.second.setValue(a.second)}}),BI.DynamicDateTimeSelect.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.dynamic_date_time_select",BI.DynamicDateTimeSelect),BI.extend(BI.DynamicDateTimeSelect,{HOUR:1,MINUTE:2}),BI.DynamicDateTimeTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,yearLength:4,yearMonthLength:7},props:{extraCls:"bi-date-time-trigger",min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicDateTimeTrigger.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(b){var c=b.match(/\d+/g);return a._autoAppend(b,c),a._dateCheck(b)&&BI.checkDateLegal(b)&&a._checkVoid({year:c[0],month:c[1],day:c[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){return a.editor.isEditing()?BI.i18nText("BI-Basic_Date_Time_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")}}),this.editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_VALID,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_VALID)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_ERROR)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();if(BI.isNotNull(b)&&a.editor.setState(b),BI.isNotEmptyString(b)){var c=b.split(/-|\s|:/);a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:0|c[0],month:c[1],day:0|c[2],hour:0|c[3],minute:0|c[4],second:0|c[5]}}}a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.editor},{el:BI.createWidget(),width:30}]}),this.setValue(b.value)},_dateCheck:function(a){return BI.parseDateTime(a,"%Y-%x-%d %H:%M:%S").print("%Y-%x-%d %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%X-%d %H:%M:%S").print("%Y-%X-%d %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%x-%e %H:%M:%S").print("%Y-%x-%e %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%X-%e %H:%M:%S").print("%Y-%X-%e %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")===a||BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")===a||BI.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")===a||BI.parseDateTime(a,"%Y-%X-%e").print("%Y-%X-%e")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.options.min,this.options.max)[0]},_autoAppend:function(a,b){if(BI.isNotNull(b)&&BI.checkDateLegal(a))switch(a.length){case this._const.yearLength:this._yearCheck(a)&&this.editor.setValue(a+"-");break;case this._const.yearMonthLength:this._monthCheck(a)&&this.editor.setValue(a+"-")}},_yearCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d");return BI.parseDateTime(a,"%Y").print("%Y")===a&&b>=this.options.min&&b<=this.options.max},_monthCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d");return BI.parseDateTime(a,"%Y-%X").print("%Y-%X")===a&&b>=this.options.min&&b<=this.options.max},_setInnerValue:function(a,b){var c=a.print("%Y-%x-%e %H:%M:%S");this.editor.setState(c),this.editor.setValue(c),this.setTitle(BI.isEmptyString(b)?c:b+":"+c)},_getText:function(a){function b(a,b){switch(b){case BI.DynamicDateCard.OFFSET.BEGIN:return a+BI.i18nText("BI-Basic_Begin_Start");case BI.DynamicDateCard.OFFSET.END:return a+BI.i18nText("BI-Basic_End_Stop");case BI.DynamicDateCard.OFFSET.CURRENT:default:return BI.i18nText("BI-Basic_Current_Day")}}var c="";return BI.isNotNull(a.year)&&0!==a.year&&(c+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))+b(BI.i18nText("BI-Basic_Year"),a.position)),BI.isNotNull(a.quarter)&&0!==a.quarter&&(c+=Math.abs(a.quarter)+BI.i18nText("BI-Basic_Single_Quarter")+(a.quarter<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))+b(BI.i18nText("BI-Basic_Year"),a.position)),BI.isNotNull(a.month)&&0!==a.month&&(c+=Math.abs(a.month)+BI.i18nText("BI-Basic_Month")+(a.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))+b(BI.i18nText("BI-Basic_Month"),a.position)),BI.isNotNull(a.week)&&0!==a.week&&(c+=Math.abs(a.week)+BI.i18nText("BI-Basic_Week")+(a.week<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))+b(BI.i18nText("BI-Basic_Week"),a.position)),BI.isNotNull(a.day)&&0!==a.day&&(c+=Math.abs(a.day)+BI.i18nText("BI-Basic_Day")+(a.day<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))+BI.size(a)===1?b(BI.i18nText("BI-Basic_Month"),a.position):""),BI.isNotNull(a.workDay)&&0!==a.workDay&&(c+=Math.abs(a.workDay)+BI.i18nText("BI-Basic_Work_Day")+(a.workDay<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),c},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:if(BI.isNull(c)||BI.isNull(c.day))this.editor.setState(""),this.editor.setValue(""),this.setTitle("");else{var f=c.year+"-"+c.month+"-"+c.day+" "+(c.hour||"00")+":"+(c.minute||"00")+":"+(c.second||"00");this.editor.setState(f),this.editor.setValue(f),this.setTitle(f)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.storeValue}}),BI.DynamicDateTimeTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicDateTimeTrigger.EVENT_START="EVENT_START",BI.DynamicDateTimeTrigger.EVENT_STOP="EVENT_STOP",BI.DynamicDateTimeTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicDateTimeTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.DynamicDateTimeTrigger.EVENT_VALID="EVENT_VALID",BI.DynamicDateTimeTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicDateTimeTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.shortcut("bi.dynamic_date_time_trigger",BI.DynamicDateTimeTrigger),BI.SearchEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SearchEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-search-editor bi-border",height:24,errorText:"",watermark:BI.i18nText("BI-Basic_Search"),validationChecker:BI.emptyFn,quitChecker:BI.emptyFn})},_init:function(){this.options.height-=2,BI.SearchEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,watermark:b.watermark,allowBlank:!0,errorText:b.errorText,validationChecker:b.validationChecker,quitChecker:b.quitChecker}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"search-close-h-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){a.setValue(""),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),a.fireEvent(BI.SearchEditor.EVENT_CLEAR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:{type:"bi.center_adapt",cls:"search-font",items:[{el:{type:"bi.icon"}}]},width:25},{el:a.editor},{el:this.clear,width:25}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SearchEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SearchEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SearchEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a._checkClear(),a.fireEvent(BI.SearchEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SearchEditor.EVENT_KEY_DOWN,b)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SearchEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){a.fireEvent(BI.SearchEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SearchEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.SearchEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SearchEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SearchEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a._checkClear(),a.fireEvent(BI.SearchEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){a.fireEvent(BI.SearchEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.SearchEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SearchEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SearchEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SearchEditor.EVENT_STOP)}),this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid()){var a=this.editor.getValue().match(/[\S]+/g);return BI.isNull(a)?"":a[a.length-1]}},getLastValidValue:function(){return this.editor.getLastValidValue()},setValue:function(a){this.editor.setValue(a),BI.isKey(a)&&this.clear.visible()},isEditing:function(){return this.editor.isEditing()},isValid:function(){return this.editor.isValid()}}),BI.SearchEditor.EVENT_CHANGE="EVENT_CHANGE",BI.SearchEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SearchEditor.EVENT_BLUR="EVENT_BLUR",BI.SearchEditor.EVENT_CLICK="EVENT_CLICK",BI.SearchEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.SearchEditor.EVENT_SPACE="EVENT_SPACE",BI.SearchEditor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.SearchEditor.EVENT_CLEAR="EVENT_CLEAR",BI.SearchEditor.EVENT_START="EVENT_START",BI.SearchEditor.EVENT_PAUSE="EVENT_PAUSE",BI.SearchEditor.EVENT_STOP="EVENT_STOP",BI.SearchEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SearchEditor.EVENT_VALID="EVENT_VALID",BI.SearchEditor.EVENT_ERROR="EVENT_ERROR",BI.SearchEditor.EVENT_ENTER="EVENT_ENTER",BI.SearchEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.SearchEditor.EVENT_REMOVE="EVENT_REMOVE",BI.SearchEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.search_editor",BI.SearchEditor),BI.SmallSearchEditor=BI.inherit(BI.SearchEditor,{_defaultConfig:function(){var a=BI.SmallSearchEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-small-search-editor",height:24})},_init:function(){BI.SmallSearchEditor.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.small_search_editor",BI.SmallSearchEditor),BI.TextEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.TextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-text-editor bi-border",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!1,watermark:"",errorText:"",height:24})},_init:function(){BI.TextEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNumber(b.height)&&this.element.css({height:b.height-2}),BI.isNumber(b.width)&&this.element.css({width:b.width-2}),this.editor=BI.createWidget({type:"bi.editor",height:b.height-2,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,title:b.title,tipType:b.tipType,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.TextEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.TextEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.TextEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.TextEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.TextEditor.EVENT_KEY_DOWN)}),this.editor.on(BI.Editor.EVENT_SPACE,function(b){a.fireEvent(BI.TextEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(b){a.fireEvent(BI.TextEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.TextEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.TextEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(b){a.fireEvent(BI.TextEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.TextEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.TextEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.TextEditor.EVENT_STOP)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.TextEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.TextEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.TextEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.TextEditor.EVENT_EMPTY)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isValid:function(){return this.editor.isValid()},setValue:function(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()}}),BI.TextEditor.EVENT_CHANGE="EVENT_CHANGE",BI.TextEditor.EVENT_FOCUS="EVENT_FOCUS",BI.TextEditor.EVENT_BLUR="EVENT_BLUR",BI.TextEditor.EVENT_CLICK="EVENT_CLICK",BI.TextEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.TextEditor.EVENT_SPACE="EVENT_SPACE",BI.TextEditor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.TextEditor.EVENT_START="EVENT_START",BI.TextEditor.EVENT_PAUSE="EVENT_PAUSE",BI.TextEditor.EVENT_STOP="EVENT_STOP",BI.TextEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.TextEditor.EVENT_VALID="EVENT_VALID",BI.TextEditor.EVENT_ERROR="EVENT_ERROR",BI.TextEditor.EVENT_ENTER="EVENT_ENTER",BI.TextEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.TextEditor.EVENT_REMOVE="EVENT_REMOVE",BI.TextEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.text_editor",BI.TextEditor),BI.SmallTextEditor=BI.inherit(BI.TextEditor,{_defaultConfig:function(){var a=BI.SmallTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-small-text-editor",height:25})},_init:function(){BI.SmallTextEditor.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.small_text_editor",BI.SmallTextEditor),BI.FileManagerButtonGroup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerButtonGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-button_group",items:[]})},_init:function(){BI.FileManagerButtonGroup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button_group=BI.createWidget({type:"bi.button_tree",element:this,chooseType:BI.Selection.Multi,items:this._formatItems(b.items),layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_formatItems:function(a){this.options;return BI.each(a,function(a,b){b.children&&b.children.length>0?b.type="bi.file_manager_folder_item":b.type="bi.file_manager_file_item"}),a},setValue:function(a){this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getNotSelectedValue:function(){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,height:b.height}),this.checked.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button=BI.createWidget({type:"bi.text_button",textAlign:"left",height:b.height,text:b.text,value:b.value}),this.button.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CHANGE,b.value,a)}),this.tree=new BI.Tree,this.tree.initTree([{id:b.id,children:b.children}]),this.selectValue=[],BI.createWidget({type:"bi.htape",element:this,items:[{el:this.checked,width:36},{el:{type:"bi.icon_button",cls:"create-by-me-folder-font"},width:20},{el:this.button}]})},setAllSelected:function(a){this.checked.setSelected(a),this.selectValue=[]},setHalfSelected:function(a){this.checked.setHalfSelected(a),a||(this.selectValue=[])},setValue:function(a){var b=(this.options,!1),c=[];this.tree.traverse(function(d){d.isLeaf()&&(BI.contains(a,d.get("data").value)?c.push(d.get("data").value):b=!0)}),this.setAllSelected(c.length>0&&!b),this.setHalfSelected(c.length>0&&b),this.checked.isHalfSelected()&&(this.selectValue=c)},getAllButtons:function(){return[this]},getAllLeaves:function(){var a=(this.options,[]);return this.tree.traverse(function(b){b.isLeaf()&&a.push(b.get("data").value)}),a},getNotSelectedValue:function(){var a=this,b=(this.options,[]),c=this.checked.isSelected();if(c===!0)return b;var d=this.checked.isHalfSelected();return this.tree.traverse(function(c){if(c.isLeaf()){var e=c.get("data").value;d===!0?BI.contains(a.selectValue,c.get("data").value)||b.push(e):b.push(e)}}),b},getValue:function(){var a=[];return this.checked.isSelected()?(this.tree.traverse(function(b){b.isLeaf()&&a.push(b.get("data").value)}),a):this.checked.isHalfSelected()?this.selectValue:[]}}),BI.FileManagerFolderItem.EVENT_CHANGE="FileManagerFolderItem.EVENT_CHANGE",BI.shortcut("bi.file_manager_folder_item",BI.FileManagerFolderItem),BI.FileManagerList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-list",el:{},items:[]})},_init:function(){BI.FileManagerList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.list=BI.createWidget({type:"bi.select_list",element:this,items:b.items,toolbar:{type:"bi.multi_select_bar",height:40,text:""},el:{type:"bi.list_pane",el:BI.isWidget(b.el)?b.el:BI.extend({type:"bi.file_manager_button_group"},b.el)}}),this.list.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){this.list.setValue({value:a})},getValue:function(){return this.list.getValue()},populate:function(a){this.list.populate(a),this.list.setToolBarVisible(!0)}}),BI.FileManagerList.EVENT_CHANGE="FileManagerList.EVENT_CHANGE",BI.shortcut("bi.file_manager_list",BI.FileManagerList),BI.FileManagerNavButton=BI.inherit(BI.Widget,{_const:{normal_color:"#ffffff",select_color:"#eff1f4"},_defaultConfig:function(){return BI.extend(BI.FileManagerNavButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-nav-button",selected:!1,height:40})},_init:function(){BI.FileManagerNavButton.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.button=BI.createWidget({type:"bi.text_button",cls:"file-manager-nav-button-text bi-card",once:!0,selected:b.selected,text:b.text,title:b.text,value:b.value,height:b.height,lgap:20,rgap:10}),this.button.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var d=BI.createWidget({type:"bi.svg",cls:"file-manager-nav-button-triangle",width:15,height:b.height}),e=d.path("M0,0L15,20L0,40").attr({stroke:c.select_color,fill:b.selected?c.select_color:c.normal_color});this.button.on(BI.TextButton.EVENT_CHANGE,function(){this.isSelected()?e.attr("fill",c.select_color):e.attr("fill",c.normal_color)}),BI.createWidget({type:"bi.default",element:this,items:[this.button]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:d,right:-15,top:0,bottom:0}]})},isSelected:function(){return this.button.isSelected()},setValue:function(a){this.button.setValue(a)},getValue:function(){return this.button.getValue()},populate:function(a){}}),BI.FileManagerNavButton.EVENT_CHANGE="FileManagerNavButton.EVENT_CHANGE",BI.shortcut("bi.file_manager_nav_button",BI.FileManagerNavButton),BI.FileManagerNav=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerNav.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-nav bi-border-left",height:40,items:[]})},_init:function(){BI.FileManagerNav.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=new BI.Tree,this.refreshTreeData(b.items),this.tree.getRoot().set("data",{text:BI.i18nText("BI-Created_By_Me"),value:BI.FileManagerNav.ROOT_CREATE_BY_ME,id:BI.FileManagerNav.ROOT_CREATE_BY_ME}),this.button_group=BI.createWidget({type:"bi.button_group",element:this,items:[{type:"bi.file_manager_nav_button",text:BI.i18nText("BI-Created_By_Me"),selected:!0,id:BI.FileManagerNav.ROOT_CREATE_BY_ME,value:BI.FileManagerNav.ROOT_CREATE_BY_ME}],layouts:[{type:"bi.horizontal"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.FileManagerNav.EVENT_CHANGE,arguments)})},_getAllParents:function(a){var b,c=[];for(b=a?this.tree.search(a):this.tree.getRoot();b.parent;)c.push(b),b=b.parent;return c.push(b),c.reverse()},_formatNodes:function(a){var b=[];return BI.each(a,function(a,c){b.push(BI.extend({type:"bi.file_manager_nav_button",id:c.id},c.get("data")))}),BI.last(b).selected=!0,b},getValue:function(){return this.button_group.getValue()},getId:function(){var a=[];return BI.each(this.button_group.getSelectedButtons(),function(b,c){a.push(c.attr("id"))}),a},refreshTreeData:function(a){this.tree.initTree(BI.Tree.transformToTreeFormat(a)),this.tree.getRoot().set("data",{text:BI.i18nText("BI-Created_By_Me"),value:BI.FileManagerNav.ROOT_CREATE_BY_ME,id:BI.FileManagerNav.ROOT_CREATE_BY_ME})},populate:function(a){var b=BI.isNull(a)?[this.tree.getRoot()]:this._getAllParents(a.id);this.button_group.populate(this._formatNodes(b))}}),BI.extend(BI.FileManagerNav,{ROOT_CREATE_BY_ME:"-1"}),BI.FileManagerNav.EVENT_CHANGE="FileManagerNav.EVENT_CHANGE",BI.shortcut("bi.file_manager_nav",BI.FileManagerNav),BI.IntervalSlider=BI.inherit(BI.Widget,{_constant:{EDITOR_WIDTH:58,EDITOR_R_GAP:60,EDITOR_HEIGHT:30,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},_defaultConfig:function(){return BI.extend(BI.IntervalSlider.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-interval-slider bi-slider-track",digit:!1,unit:""})},_init:function(){BI.IntervalSlider.superclass._init.apply(this,arguments);var a=this,b=this._constant;this.enable=!1,this.valueOne="",this.valueTwo="",this.calculation=new BI.AccurateCalculationModel,this.grayTrack=BI.createWidget({type:"bi.layout",cls:"gray-track",height:6}),this.blueTrack=BI.createWidget({type:"bi.layout",cls:"blue-track bi-high-light-background",height:6}),this.track=this._createTrackWrapper(),this.labelOne=BI.createWidget({type:"bi.sign_text_editor",cls:"slider-editor-button",text:this.options.unit,errorText:"",allowBlank:!1,width:b.EDITOR_WIDTH,validationChecker:function(b){return a._checkValidation(b)}}),this.labelOne.element.hover(function(){a.labelOne.element.removeClass("bi-border").addClass("bi-border")},function(){a.labelOne.element.removeClass("bi-border")}),this.labelOne.on(BI.Editor.EVENT_CONFIRM,function(){var b=BI.parseFloat(this.getValue());a.valueOne=b;var c=a._getPercentByValue(b),d=BI.parseFloat(c.toFixed(1));a._setLabelOnePosition(d),a._setSliderOnePosition(d),a._setBlueTrack(),a.fireEvent(BI.IntervalSlider.EVENT_CHANGE)}),this.labelTwo=BI.createWidget({type:"bi.sign_text_editor",cls:"slider-editor-button",errorText:"",text:this.options.unit,allowBlank:!1,width:b.EDITOR_WIDTH,validationChecker:function(b){return a._checkValidation(b)}}),this.labelTwo.element.hover(function(){a.labelTwo.element.removeClass("bi-border").addClass("bi-border")},function(){a.labelTwo.element.removeClass("bi-border")}),this.labelTwo.on(BI.Editor.EVENT_CONFIRM,function(){var b=BI.parseFloat(this.getValue());a.valueTwo=b;var c=a._getPercentByValue(b),d=BI.parseFloat(c.toFixed(1));a._setLabelTwoPosition(d),a._setSliderTwoPosition(d),a._setBlueTrack(),a.fireEvent(BI.IntervalSlider.EVENT_CHANGE)}),this.sliderOne=BI.createWidget({type:"bi.single_slider_button"}),this.sliderTwo=BI.createWidget({type:"bi.single_slider_button"}),this._draggable(this.sliderOne,!0),this._draggable(this.sliderTwo,!1),this._setVisible(!1),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.track,width:"100%",height:b.TRACK_HEIGHT}]}],hgap:7,height:b.TRACK_HEIGHT},top:23,left:0,width:"100%"},this._createLabelWrapper(),this._createSliderWrapper()]})},_rePosBySizeAfterMove:function(a,b){var c=this.options,d=100*a/this._getGrayTrackLength(),e=BI.parseFloat(d.toFixed(1)),f=this._getValueByPercent(e);f=this._assertValue(f),f=c.digit===!1?f:f.toFixed(c.digit),b?(this._setLabelOnePosition(e),this._setSliderOnePosition(e),this.labelOne.setValue(f),this.valueOne=f):(this._setLabelTwoPosition(e),this._setSliderTwoPosition(e),this.labelTwo.setValue(f),this.valueTwo=f),this._setBlueTrack()},_rePosBySizeAfterStop:function(a,b){var c=100*a/this._getGrayTrackLength(),d=BI.parseFloat(c.toFixed(1));b?this._setSliderOnePosition(d):this._setSliderTwoPosition(d)},_draggable:function(a,b){function c(a){return BI.clamp(a,0,d._getGrayTrackLength())}var d=this,e=(this.options,!1),f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){i.isDragging()&&(e=!0,g+=j,f=c(h+g),a.element.addClass("dragging"),d._rePosBySizeAfterMove(f,b))},function(){e===!0&&(f=c(f),d._rePosBySizeAfterStop(f,b),f=0,g=0,h=f,e=!1),a.element.removeClass("dragging"),i.releaseMouseMoves(),d.fireEvent(BI.IntervalSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(b){a.isEnabled()&&(h=this.offsetLeft,c(h),i.captureMouseMoves(b))})},_createLabelWrapper:function(){var a=this._constant;return{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.labelOne,top:0,left:"0%"}]},{type:"bi.absolute",items:[{el:this.labelTwo,top:0,left:"100%"}]}],rgap:a.EDITOR_R_GAP,height:70},top:0,left:0,width:"100%"}},_createSliderWrapper:function(){var a=this._constant;return{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.sliderOne,top:0,left:"0%"}]},{type:"bi.absolute",items:[{el:this.sliderTwo,top:0,left:"100%"}]}],hgap:a.SLIDER_WIDTH_HALF,height:a.SLIDER_HEIGHT},top:20,left:0,width:"100%"}},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){var b=this.options,c=!1,d=(a+"").split(".")[1];return BI.isEmptyString(d)||BI.isNumeric(a)&&!(BI.isNull(a)||athis.max)&&(b.digit===!1?c=!0:(d=d||"",c=d.length===b.digit)),c},_checkOverlap:function(){var a=this.labelOne.element[0].offsetLeft,b=this.labelTwo.element[0].offsetLeft;a<=b?b-a<90?this.labelTwo.element.css({top:40}):this.labelTwo.element.css({top:0}):a-b<90?this.labelTwo.element.css({top:40}):this.labelTwo.element.css({top:0})},_setLabelOnePosition:function(a){this.labelOne.element.css({left:a+"%"}),this._checkOverlap()},_setLabelTwoPosition:function(a){this.labelTwo.element.css({left:a+"%"}),this._checkOverlap()},_setSliderOnePosition:function(a){this.sliderOne.element.css({left:a+"%"})},_setSliderTwoPosition:function(a){this.sliderTwo.element.css({left:a+"%"})},_setBlueTrackLeft:function(a){this.blueTrack.element.css({left:a+"%"})},_setBlueTrackWidth:function(a){this.blueTrack.element.css({width:a+"%"})},_setBlueTrack:function(){var a=this._getPercentByValue(this.labelOne.getValue()),b=this._getPercentByValue(this.labelTwo.getValue());a<=b?(this._setBlueTrackLeft(a),this._setBlueTrackWidth(b-a)):(this._setBlueTrackLeft(b),this._setBlueTrackWidth(a-b))},_setAllPosition:function(a,b){this._setSliderOnePosition(a),this._setLabelOnePosition(a),this._setSliderTwoPosition(b),this._setLabelTwoPosition(b),this._setBlueTrack()},_setVisible:function(a){this.sliderOne.setVisible(a),this.sliderTwo.setVisible(a),this.labelOne.setVisible(a),this.labelTwo.setVisible(a)},_setErrorText:function(){var a=BI.i18nText("BI-Please_Enter")+this.min+"-"+this.max+BI.i18nText("BI-Basic_De")+BI.i18nText("BI-Basic_Number");this.labelOne.setErrorText(a),this.labelTwo.setErrorText(a)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(a){var b=this.calculation.accurateSubtraction(this.max,this.min),c=this.calculation.accurateMultiplication(b,a),d=this.calculation.accurateDivisionTenExponent(c,2);if(this.precision<0){var e=BI.parseFloat(this.calculation.accurateAddition(d,this.min)),f=Math.round(this.calculation.accurateDivisionTenExponent(e,-this.precision));return this.calculation.accurateMultiplication(f,Math.pow(10,-this.precision))}return BI.parseFloat(this.calculation.accurateAddition(d,this.min).toFixed(this.precision))},_getPercentByValue:function(a){return 100*(a-this.min)/(this.max-this.min)},_setDraggableEnable:function(a){this.sliderOne.setEnable(a),this.sliderTwo.setEnable(a)},_getPrecision:function(){var a=this.calculation.accurateSubtraction(this.max,this.min),b=a.toPrecision(4),c=b.indexOf("e"),d=[];if(c>-1){d=b.split("e");var e=BI.size(d[0].split(".")[1]),f=BI.parseInt(d[1].substring(1));return e-f}return d=b.split("."),d.length>1?d[1].length:0},_assertValue:function(a){return a<=this.min?this.min:a>=this.max?this.max:a},getValue:function(){return this.valueOne<=this.valueTwo?{min:this.valueOne,max:this.valueTwo}:{min:this.valueTwo,max:this.valueOne}},setMinAndMax:function(a){var b=BI.parseFloat(a.min),c=BI.parseFloat(a.max);!isNaN(b)&&!isNaN(c)&&c>=b&&(this.min=b,this.max=c,this.valueOne=b,this.valueTwo=c,this.precision=this._getPrecision(),this._setDraggableEnable(!0)),c===b&&this._setDraggableEnable(!1)},setValue:function(a){var b=this.options,c=BI.parseFloat(a.min),d=BI.parseFloat(a.max);c=b.digit===!1?c:c.toFixed(b.digit),d=b.digit===!1?d:d.toFixed(b.digit),isNaN(c)||isNaN(d)||(this._checkValidation(c)&&(this.valueOne=c),this._checkValidation(d)&&(this.valueTwo=d),cthis.max&&(this.valueTwo=this.max))},reset:function(){this._setVisible(!1),this.enable=!1,this.valueOne="",this.valueTwo="",this.min=NaN,this.max=NaN,this._setBlueTrackWidth(0)},populate:function(){isNaN(this.min)||isNaN(this.max)||(this.enable=!0,this._setVisible(!0),this._setErrorText(),(BI.isNumeric(this.valueOne)||BI.isNotEmptyString(this.valueOne))&&(BI.isNumeric(this.valueTwo)||BI.isNotEmptyString(this.valueTwo))?(this.labelOne.setValue(this.valueOne),this.labelTwo.setValue(this.valueTwo),this._setAllPosition(this._getPercentByValue(this.valueOne),this._getPercentByValue(this.valueTwo))):(this.labelOne.setValue(this.min),this.labelTwo.setValue(this.max),this._setAllPosition(0,100)))}}),BI.IntervalSlider.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.interval_slider",BI.IntervalSlider),BI.AccurateCalculationModel=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.AccurateCalculationModel.superclass._defaultConfig.apply(this,arguments),{baseCls:""})},_init:function(){BI.AccurateCalculationModel.superclass._init.apply(this,arguments)},_getMagnitude:function(a){for(var b="1",c=0;c0)var d=b;else{var d=a;c=0-c}for(var e=0;e=b.numDecimal.length?a.numDecimal.length:b.numDecimal.length}function d(a,b){for(var c=b-a.length,d=0;d=BI.parseInt(f.numDecimal))var i=(BI.parseInt(e.numDecimal)-BI.parseInt(f.numDecimal)).toString(),j=d(i,h);else{g--;var k=this._getMagnitude(h),i=(k+BI.parseInt(e.numDecimal)-BI.parseInt(f.numDecimal)).toString(),j=d(i,h)}var l=g+"."+j;return BI.parseFloat(l)},_accurateAddition:function(a,b){function c(a,b){for(var c=b-a.length,d=0;db)var e=d.numInteger.slice(0,d.numInteger.length-b),f=d.numInteger.slice(-b);else var e="0",f=c(d.numInteger,b);var g=e+"."+f+d.numDecimal;return BI.parseFloat(g)},accurateSubtraction:function(a,b){return a>=0&&b>=0?a>=b?this._accurateSubtraction(a,b):-this._accurateSubtraction(b,a):a>=0&&b<0?this._accurateAddition(a,-b):a<0&&b>=0?-this._accurateAddition(-a,b):a<0&&b<0?a>=b?this._accurateSubtraction(-b,-a):this._accurateSubtraction(-a,-b):void 0},accurateAddition:function(a,b){return a>=0&&b>=0?this._accurateAddition(a,b):a>=0&&b<0?this.accurateSubtraction(a,-b):a<0&&b>=0?this.accurateSubtraction(b,-a):a<0&&b<0?-this._accurateAddition(-a,-b):void 0},accurateMultiplication:function(a,b){return a>=0&&b>=0?this._accurateMultiplication(a,b):a>=0&&b<0?-this._accurateMultiplication(a,-b):a<0&&b>=0?-this._accurateMultiplication(-a,b):a<0&&b<0?this._accurateMultiplication(-a,-b):void 0},accurateDivisionTenExponent:function(a,b){return a>=0?this._accurateDivisionTenExponent(a,b):-this._accurateDivisionTenExponent(-a,b)}}),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",value:b.value}),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,value:b.value}),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 BI.isNull(this.popup)?this.options.value||"":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=[1,7,2,8,3,9,4,10,5,11,6,12],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}})}),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}],value:b.value}),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.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.MonthTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Month"),baseCls:"bi-trigger-month-text",width:b.height},width:b.height},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]}),this.setValue(b.value)},setValue:function(a){return BI.isNotNull(a)?(this.editor.setState(a+1),this.editor.setValue(a+1),void this.editor.setTitle(a+1)):(this.editor.setState(""),this.editor.setValue(""),void this.editor.setTitle(""))},getKey:function(){return 0|this.editor.getValue()},getValue:function(){return this.editor.getValue()-1}}),BI.MonthTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.MonthTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.MonthTrigger.EVENT_START="EVENT_START",BI.MonthTrigger.EVENT_STOP="EVENT_STOP",BI.MonthTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_trigger",BI.MonthTrigger),BI.DownListCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-down-list-combo",height:24,items:[],adjustLength:0,direction:"bottom",trigger:"click",container:null,stopPropagation:!1,el:{}})},_init:function(){BI.DownListCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popupview=BI.createWidget({type:"bi.multi_layer_down_list_popup",items:b.items,chooseType:b.chooseType,value:b.value}),this.popupview.on(BI.DownListPopup.EVENT_CHANGE,function(b){a.fireEvent(BI.DownListCombo.EVENT_CHANGE,b),a.downlistcombo.hideView()}),this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,function(b,c){a.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,b,c),a.downlistcombo.hideView()}),this.downlistcombo=BI.createWidget({element:this,type:"bi.combo",trigger:b.trigger,isNeedAdjustWidth:!1,container:b.container,adjustLength:b.adjustLength,direction:b.direction,stopPropagation:b.stopPropagation,el:BI.createWidget(b.el,{type:"bi.icon_trigger",extraCls:b.iconCls?b.iconCls:"pull-down-font",width:b.width,height:b.height}),popup:{el:this.popupview,stopPropagation:!0,maxHeight:1e3}}),this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW)})},hideView:function(){this.downlistcombo.hideView()},showView:function(){this.downlistcombo.showView()},populate:function(a){this.popupview.populate(a)},setValue:function(a){this.popupview.setValue(a)},getValue:function(){return this.popupview.getValue()}}),BI.DownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DownListCombo.EVENT_SON_VALUE_CHANGE="EVENT_SON_VALUE_CHANGE",BI.DownListCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_layer_down_list_combo",BI.DownListCombo),BI.MultiLayerDownListPopup=BI.inherit(BI.Pane,{constants:{nextIcon:"pull-right-e-font",height:25,iconHeight:12,iconWidth:12,hgap:0,vgap:0,border:1},_defaultConfig:function(){var a=BI.MultiLayerDownListPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-down-list-popup",items:[],chooseType:BI.Selection.Multi})},_init:function(){BI.MultiLayerDownListPopup.superclass._init.apply(this,arguments),this.singleValues=[],this.childValueMap={},this.fatherValueMap={};var a=this,b=this.options,c=this._createPopupItems(b.items);this.popup=BI.createWidget({type:"bi.button_tree",items:BI.createItems(c,{},{adjustLength:-2}),layouts:[{type:"bi.vertical",hgap:this.constants.hgap,vgap:this.constants.vgap}],value:this._digest(b.value),chooseType:b.chooseType}),this.popup.on(BI.ButtonTree.EVENT_CHANGE,function(b,c){var d=b;if(BI.isNotNull(a.childValueMap[b])){d=a.childValueMap[b];var e=a.fatherValueMap[b],f=(e+"").split("_");a.fireEvent(BI.MultiLayerDownListPopup.EVENT_SON_VALUE_CHANGE,d,f.length>1?f:e)}else a.fireEvent(BI.MultiLayerDownListPopup.EVENT_CHANGE,d,c);if(!a.singleValues.contains(d)){var g=a.getValue(),h=[];BI.each(g,function(a,b){b.value!=d&&h.push(b)}),a.setValue(h)}}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup]})},_createPopupItems:function(a){var b=this,c=[];return BI.each(a,function(d,e){var f={type:"bi.down_list_group",items:[]};if(BI.each(e,function(a,c){BI.isNotEmptyArray(c.children)&&!BI.isEmpty(c.el)?(c.type="bi.combo_group",c.cls="down-list-group",c.trigger="hover",c.isNeedAdjustWidth=!1,c.el.title=c.el.title||c.el.text,c.el.type="bi.down_list_group_item",c.el.logic={dynamic:!0},c.el.height=b.constants.height,c.el.iconCls2=b.constants.nextIcon,c.popup={lgap:4,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}},c.el.childValues=[],BI.each(c.children,function(a,d){d=d.el?BI.extend(d.el,{children:d.children}):d;var e=BI.deepClone(c.el.value),f=BI.deepClone(d.value);b.singleValues.push(d.value),d.type="bi.down_list_item",d.extraCls=" child-down-list-item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),c.el.childValues.push(d.value),BI.isNotEmptyArray(d.children)&&(d.type="bi.down_list_group_item",b._createChildren(d),d.height=b.constants.height,d.iconCls2=b.constants.nextIcon,c.el.childValues=BI.concat(c.el.childValues,d.childValues)); -})):(c.type="bi.down_list_item",c.title=c.title||c.text,c.textRgap=10,c.isNeedAdjustWidth=!1,c.logic={dynamic:!0});var d={};d.el=c,f.items.push(d)}),b._isGroup(f.items)&&BI.each(f.items,function(a,c){b.singleValues.push(c.el.value)}),c.push(f),b._needSpliter(d,a.length)){var g=BI.createWidget({type:"bi.vertical",items:[{el:{type:"bi.layout",cls:"bi-down-list-spliter bi-border-top cursor-pointer",height:0}}],cls:"bi-down-list-spliter-container cursor-pointer",lgap:10,rgap:10});c.push(g)}}),c},_createChildren:function(a){var b=this;a.childValues=[],BI.each(a.children,function(c,d){var e=BI.deepClone(a.value),f=BI.deepClone(d.value);d.type="bi.down_list_item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),a.childValues.push(d.value)})},_isGroup:function(a){return a.length>1},_needSpliter:function(a,b){return a1?g:f}else e.value=d;b.push(e)}),b}}),BI.MultiLayerDownListPopup.EVENT_CHANGE="EVENT_CHANGE",BI.MultiLayerDownListPopup.EVENT_SON_VALUE_CHANGE="EVENT_SON_VALUE_CHANGE",BI.shortcut("bi.multi_layer_down_list_popup",BI.MultiLayerDownListPopup),BI.MultiLayerSelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer_select_tree-combo",isDefaultInit:!1,height:30,text:"",items:[],value:""})},_init:function(){BI.MultiLayerSelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value}),this.popup=BI.createWidget({type:"bi.multilayer_select_tree_popup",isDefaultInit:b.isDefaultInit,items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.MultiLayerSelectTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_CHANGE)})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.MultiLayerSelectTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_combo",BI.MultiLayerSelectTreeCombo),BI.MultiLayerSelectLevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-select-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn,value:""})},_init:function(){BI.MultiLayerSelectLevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={};if(e.layer=b,BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.multilayer_select_tree_first_plus_group_node";break;case a.length-1: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",cls:"tree-view display-inline",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,value:c.value,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)}),BI.createWidget({type:"bi.adaptive",element:this,scrollable:!0,items:[this.tree]})},populate:function(a){this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},setValue:function(a){this.tree.setValue(a)},getValue:function(){return BI.uniq(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:[],value:""})},_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,value:b.value,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:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_first_plus_group_node",BI.MultiLayerSelectTreeFirstPlusGroupNode),BI.MultiLayerSelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-last-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_last_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id: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]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_last_plus_group_node",BI.MultiLayerSelectTreeLastPlusGroupNode),BI.MultiLayerSelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-mid-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_mid_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id: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]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_mid_plus_group_node",BI.MultiLayerSelectTreeMidPlusGroupNode),BI.MultiLayerSingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-singletree-combo",isDefaultInit:!1,height:30,text:"",itemsCreator:BI.emptyFn,items:[],value:""})},_init:function(){BI.MultiLayerSingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value}),this.popup=BI.createWidget({type:"bi.multilayer_single_tree_popup",isDefaultInit:b.isDefaultInit,items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.MultiLayerSingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_CHANGE)})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.MultiLayerSingleTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_combo",BI.MultiLayerSingleTreeCombo),BI.MultiLayerSingleLevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-single-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn})},_init:function(){BI.MultiLayerSingleLevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={};if(e.layer=b,BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.multilayer_single_tree_first_plus_group_node";break;case a.length-1:f.type="bi.multilayer_single_tree_last_plus_group_node";break;default:f.type="bi.multilayer_single_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",cls:"tree-view display-inline",expander:{isDefaultInit:c.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),value:c.value,itemsCreator:function(a,b){c.itemsCreator(a,function(a){b(BI.Tree.transformToTreeFormat(a),0)})},el:{type:"bi.button_tree",chooseType:BI.Selection.Single,layouts:[{type:"bi.vertical"}]}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,c)}),BI.createWidget({type:"bi.adaptive",element:this,scrollable:!0,items:[this.tree]})},populate:function(a){this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},setValue:function(a){this.tree.setValue(a)},getValue:function(){return BI.filter(BI.uniq(this.tree.getValue()),function(a,b){return BI.isNotNull(b)})},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.MultiLayerSingleLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_level_tree",BI.MultiLayerSingleLevelTree),BI.MultiLayerSingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-singletree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:b.isDefaultInit,items:b.items,itemsCreator:b.itemsCreator,value:b.value}),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.MultiLayerSingleLevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.MultiLayerSingleTreePopup.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.MultiLayerSingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.MultiLayerSingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_popup",BI.MultiLayerSingleTreePopup),BI.MultiLayerSingleTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-first-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.first_plus_group_node",cls:"bi-list-item-none",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,keyword:b.keyword}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_first_plus_group_node",BI.MultiLayerSingleTreeFirstPlusGroupNode),BI.MultiLayerSingleTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-last-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.last_plus_group_node",cls:"bi-list-item-none",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,keyword:b.keyword}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_last_plus_group_node",BI.MultiLayerSingleTreeLastPlusGroupNode),BI.MultiLayerSingleTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-mid-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.mid_plus_group_node",cls:"bi-list-item-none",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,keyword:b.keyword}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_plus_group_node",BI.MultiLayerSingleTreeMidPlusGroupNode),BI.MultiLayerSingleTreeFirstTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-first-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.first_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_first_tree_leaf_item",BI.MultiLayerSingleTreeFirstTreeLeafItem),BI.MultiLayerSingleTreeLastTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-last-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.last_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_last_tree_leaf_item",BI.MultiLayerSingleTreeLastTreeLeafItem),BI.MultiLayerSingleTreeMidTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-mid-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.mid_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_tree_leaf_item",BI.MultiLayerSingleTreeMidTreeLeafItem),BI.MultiSelectCheckPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-pane bi-background",items:[],itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,onClickContinueSelect:BI.emptyFn})},_init:function(){BI.MultiSelectCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value||{},this.display=BI.createWidget({type:"bi.display_selected_list",items:b.items,itemsCreator:function(c,d){return c=BI.extend(c||{},{selectedValues:a.storeValue.value}),a.storeValue.type===BI.Selection.Multi?void d({items:BI.map(a.storeValue.value,function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d}})}):void b.itemsCreator(c,d)}}),this.continueSelect=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-select-check-selected bi-high-light"}),this.continueSelect.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect()}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:{type:"bi.left",cls:"multi-select-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:this.continueSelect,lgap:this.constants.lgap,tgap:this.constants.tgap}]}},{height:"fill",el:this.display}]})},setValue:function(a){this.storeValue=a||{}},empty:function(){this.display.empty()},populate:function(){this.display.populate.apply(this.display,arguments)}}),BI.shortcut("bi.multi_select_check_pane",BI.MultiSelectCheckPane),BI.DisplaySelectedList=BI.inherit(BI.Pane,{constants:{height:25,lgap:10},_defaultConfig:function(){return BI.extend(BI.DisplaySelectedList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-display-list",itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.DisplaySelectedList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.hasNext=!1,this.button_group=BI.createWidget({type:"bi.list_pane",element:this,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},items:this._createItems(b.items),chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical",lgap:10}]},itemsCreator:function(c,d){b.itemsCreator(c,function(b){a.hasNext=!!b.hasNext,d(a._createItems(b.items))})},hasNext:function(){return a.hasNext}})},_createItems:function(a){return BI.createItems(a,{type:"bi.icon_text_item",cls:"cursor-default check-font display-list-item bi-tips",once:!0,invalid:!0,selected:!0,height:this.constants.height,logic:{dynamic:!0}})},empty:function(){this.button_group.empty()},populate:function(a){0===arguments.length?this.button_group.populate():this.button_group.populate(this._createItems(a))}}),BI.shortcut("bi.display_selected_list",BI.DisplaySelectedList),BI.MultiSelectInsertCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_init:function(){BI.MultiSelectInsertCombo.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)})},value:b.value}),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(){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.storeValue.type===BI.Selection.Multi&&a.storeValue.value.pushDistinct(b),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()})}},value:b.value,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.MultiSelectInsertCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button"});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.MultiSelectInsertCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectInsertCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;b(),a()},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectInsertCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_insert_combo",BI.MultiSelectInsertCombo),BI.MultiSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_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=b.value||{},this._assertValue(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)})},value:this.storeValue}),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()})}},value:b.value,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"});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.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.storeValue.type===BI.Selection.All&&c.storeValue.value.length>=c._count?c.storeValue={type:BI.Selection.Multi,value:[]}:c.storeValue.type===BI.Selection.Multi&&c.storeValue.value.length>=c._count&&(c.storeValue={type:BI.Selection.All,value:[]}),c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_combo",BI.MultiSelectCombo),BI.MultiSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=b.value||{},this._assertValue(this.storeValue),this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!a.storeValue.value.contains(a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](f),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:this.options.logic,height:25,selected:this.isAllSelected()})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_loader",BI.MultiSelectLoader),BI.MultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.multi_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_popup_view",BI.MultiSelectPopupView),BI.MultiSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.MultiSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.multi_select_searcher",height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker,value:b.value}),this.searcher.on(BI.MultiSelectSearcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_CHANGE,arguments)}),this.numberCounter=BI.createWidget(b.switcher,{type:"bi.multi_select_check_selected_switcher",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,adapter:b.adapter,masker:b.masker,value:b.value}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK)}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW)});var c=BI.createWidget({type:"bi.right_vertical_adapt",hgap:4,items:[{el:this.numberCounter}]}),d=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:c,width:0},{el:BI.createWidget(),width:30}]});this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){d.attr("items")[1].width=b===!0?a.numberCounter.element.outerWidth()+8:0,d.resize()})}),this.element.click(function(b){a.element.__isMouseInBounds__(b)&&!a.numberCounter.element.__isMouseInBounds__(b)&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.MultiSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.MultiSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectTrigger.EVENT_START="EVENT_START",BI.MultiSelectTrigger.EVENT_STOP="EVENT_STOP",BI.MultiSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.multi_select_trigger",BI.MultiSelectTrigger),BI.MultiSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=BI.deepClone(b.value),this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:{dynamic:!1},value:b.value,el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:a.storeValue.value})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=a._filterValues(a.storeValue);h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:{dynamic:!1},height:25,selected:this.isAllSelected()})},isAllSelected:function(){return this.button_group.isAllSelected()},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=BI.deepClone(a.value)||[],e=BI.map(d,function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.match.concat(f.find)}return BI.map(d,function(b,c){return{text:c.text,title:c.text,value:c.value,selected:a.type===BI.Selection.All}})},setValue:function(a){this.storeValue=BI.deepClone(a),this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_loader",BI.MultiSelectSearchLoader),BI.MultiSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.multi_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},isAllSelected:function(){return this.loader.isAllSelected()},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.MultiSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_pane",BI.MultiSelectSearchPane),BI.MultiSelectCheckSelectedButton=BI.inherit(BI.Single,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-button bi-high-light",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectCheckSelectedButton.superclass._init.apply(this,arguments);var a=this,b=this.options;this.numberCounter=BI.createWidget({type:"bi.text_button",element:this,hgap:4,text:"0",textAlign:"center",textHeight:15}),this.numberCounter.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.numberCounter.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),this.numberCounter.element.hover(function(){a.numberCounter.setTag(a.numberCounter.getText()),a.numberCounter.setText(a._const.checkSelected)},function(){a.numberCounter.setText(a.numberCounter.getTag())}),this.setVisible(!1),BI.isNotNull(b.value)&&this.setValue(b.value)},setValue:function(a){var b=this,c=this.options;return a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[]),a.type===BI.Selection.All?void c.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(c){var d=c.count-a.value.length;BI.nextTick(function(){b.numberCounter.setText(d),b.setVisible(d>0)})}):void BI.nextTick(function(){b.numberCounter.setText(a.value.length),b.setVisible(a.value.length>0)})},getValue:function(){}}),BI.MultiSelectCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_check_selected_button",BI.MultiSelectCheckSelectedButton),BI.MultiSelectEditor=BI.inherit(BI.Widget,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-editor",el:{}})},_init:function(){BI.MultiSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0,value:b.value}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_CLICK_LABEL,function(){})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastValidValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.MultiSelectEditor.EVENT_PAUSE="MultiSelectEditor.EVENT_PAUSE",BI.shortcut("bi.multi_select_editor",BI.MultiSelectEditor),BI.MultiSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.MultiSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),this.setKeyword(c.keyword),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiSelectSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;if(a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All)if(0===a.value.length)this.editor.setState(BI.Selection.All);else if(BI.size(a.assist)<=20){var c="";BI.each(a.assist,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi);else if(0===a.value.length)this.editor.setState(BI.Selection.None);else if(BI.size(a.value)<=20){var c="";BI.each(a.value,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectSearcher.EVENT_START="EVENT_START",BI.MultiSelectSearcher.EVENT_STOP="EVENT_STOP",BI.MultiSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.multi_select_searcher",BI.MultiSelectSearcher),BI.MultiSelectCheckSelectedSwitcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedSwitcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-switcher",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,el:{},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectCheckSelectedSwitcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button=BI.createWidget(b.el,{type:"bi.multi_select_check_selected_button",itemsCreator:b.itemsCreator,value:b.value}),this.button.on(BI.Events.VIEW,function(){a.fireEvent(BI.Events.VIEW,arguments)}),this.switcher=BI.createWidget({type:"bi.switcher",toggle:!1,element:this,el:this.button,popup:BI.extend({type:"bi.multi_select_check_pane",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,onClickContinueSelect:function(){a.switcher.hideView()},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.switcher.on(BI.Switcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE)}),this.switcher.on(BI.Switcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW)}),this.switcher.on(BI.Switcher.EVENT_AFTER_POPUPVIEW,function(){var a=this;BI.nextTick(function(){a.populate()})}),this.switcher.element.click(function(a){a.stopPropagation()})},adjustView:function(){this.switcher.adjustView()},hideView:function(){this.switcher.empty(),this.switcher.hideView()},setAdapter:function(a){this.switcher.setAdapter(a)},setValue:function(a){this.switcher.setValue(a)},setButtonChecked:function(a){this.button.setValue(a)},getValue:function(){},populate:function(a){this.switcher.populate.apply(this.switcher,arguments)}}),BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE="MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE",BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW="MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_select_check_selected_switcher",BI.MultiSelectCheckSelectedSwitcher),BI.MultiSelectInsertList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){ -BI.MultiSelectInsertList.superclass._init.apply(this,arguments);var 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(),c(),a.fireEvent(BI.MultiSelectInsertList.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.storeValue.type===BI.Selection.Multi&&a.storeValue.value.pushDistinct(b),a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a.adapter.populate(),a._setStartValue(""),a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)}):(a.storeValue.type===BI.Selection.Multi&&a.storeValue.value.pushDistinct(b),a._showAdapter(),a.adapter.setValue(a.storeValue),a.adapter.populate(),a.storeValue.type===BI.Selection.Multi&&a.fireEvent(BI.MultiSelectInsertList.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.MultiSelectInsertList.EVENT_CHANGE)}):a._join(this.getValue(),function(){c(),a.fireEvent(BI.MultiSelectInsertList.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)}),b()}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA},function(a){d._allData=BI.map(a.items,"value"),c(d._allData)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),d.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA,keyword:c.trigger.getKeyword()},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void b()}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),b()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void b()}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.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.map(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.trigger.getKeyword()},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.storeValue.type===BI.Selection.All&&c.storeValue.value.length>=c._count?c.storeValue={type:BI.Selection.Multi,value:[]}:c.storeValue.type===BI.Selection.Multi&&c.storeValue.value.length>=c._count&&(c.storeValue={type:BI.Selection.All,value:[]})}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.MultiSelectList.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectList,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectList.EVENT_CHANGE="BI.MultiSelectList.EVENT_CHANGE",BI.shortcut("bi.multi_select_list",BI.MultiSelectList),BI.MultiSelectTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={value:{}},this.adapter=BI.createWidget({type:"bi.multi_select_tree_popup",itemsCreator:b.itemsCreator}),this.adapter.on(BI.MultiSelectTreePopup.EVENT_CHANGE,function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_tree_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",keywordGetter:function(){return a.searcher.getKeyword()},itemsCreator:function(c,d){c.keyword=a.searcher.getKeyword(),b.itemsCreator(c,d)}}),this.searcherPane.setVisible(!1),this.searcher=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.searcher.getKeyword()})},adapter:this.adapter,popup:this.searcherPane,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){a._showSearcherPane()}},{eventName:BI.Searcher.EVENT_STOP,action:function(){a._showAdapter(),BI.nextTick(function(){a.adapter.populate()})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){a._showAdapter()}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.searcher,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)},resize:function(){},setSelectedValue:function(a){this.storeValue.value=a||{},this.adapter.setSelectedValue(a),this.searcherPane.setSelectedValue(a),this.searcher.setValue({value:a||{}})},setValue:function(a){this.adapter.setValue(a)},stopSearch:function(){this.searcher.stopSearch()},updateValue:function(a){this.adapter.updateValue(a)},getValue:function(){return this.storeValue.value},populate:function(){this.searcher.populate.apply(this.searcher,arguments),this.adapter.populate.apply(this.adapter,arguments)}}),BI.MultiSelectTree.EVENT_CHANGE="BI.MultiSelectTree.EVENT_CHANGE",BI.shortcut("bi.multi_select_tree",BI.MultiSelectTree),BI.MultiSelectTreePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree-popup bi-border-left bi-border-right bi-border-bottom",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popup=BI.createWidget({type:"bi.async_tree",element:this,itemsCreator:b.itemsCreator}),this.popup.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_AFTER_INIT)}),this.popup.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_CHANGE)})},hasChecked:function(){return this.popup.hasChecked()},getValue:function(){return this.popup.getValue()},setValue:function(a){a||(a={}),this.popup.setValue(a)},setSelectedValue:function(a){a||(a={}),this.popup.setSelectedValue(a)},updateValue:function(a){this.popup.updateValue(a),this.popup.refresh()},populate:function(a){this.popup.stroke(a)}}),BI.MultiSelectTreePopup.EVENT_AFTER_INIT="BI.MultiSelectTreePopup.EVENT_AFTER_INIT",BI.MultiSelectTreePopup.EVENT_CHANGE="BI.MultiSelectTreePopup.EVENT_CHANGE",BI.shortcut("bi.multi_select_tree_popup",BI.MultiSelectTreePopup),BI.MultiTreeCheckPane=BI.inherit(BI.Pane,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-pane bi-background",onClickContinueSelect:BI.emptyFn})},_init:function(){BI.MultiTreeCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={};var c=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-tree-check-selected"});c.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect(),BI.nextTick(function(){a.empty()})});var d=BI.createWidget({type:"bi.left",cls:"multi-tree-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:c,lgap:this.constants.lgap,tgap:this.constants.tgap}]});this.display=BI.createWidget({type:"bi.display_tree",cls:"bi-multi-tree-display",itemsCreator:function(a,c){a.type=BI.TreeView.REQ_TYPE_GET_SELECTED_DATA,b.itemsCreator(a,c)},value:(b.value||{}).value}),this.display.on(BI.Events.AFTERINIT,function(){a.fireEvent(BI.Events.AFTERINIT)}),this.display.on(BI.TreeView.EVENT_INIT,function(){d.setVisible(!1)}),this.display.on(BI.TreeView.EVENT_AFTERINIT,function(){d.setVisible(!0)}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:d},{height:"fill",el:this.display}]})},empty:function(){this.display.empty()},populate:function(a){this.display.stroke(a)},setValue:function(a){a||(a={}),this.display.setSelectedValue(a.value)},getValue:function(){}}),BI.MultiTreeCheckPane.EVENT_CONTINUE_CLICK="EVENT_CONTINUE_CLICK",BI.shortcut("bi.multi_tree_check_pane",BI.MultiTreeCheckPane),BI.MultiTreeCombo=BI.inherit(BI.Single,{constants:{offset:{top:1,left:1,right:2,bottom:33}},_defaultConfig:function(){return BI.extend(BI.MultiTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-combo",itemsCreator:BI.emptyFn,height:25})},_init:function(){function a(){h()?b.storeValue={value:b.trigger.getValue()}:i()&&(b.storeValue={value:b.combo.getValue()}),b.trigger.setValue(b.storeValue)}BI.MultiTreeCombo.superclass._init.apply(this,arguments);var b=this,c=this.options,d=!1,e=!1;this.storeValue={value:c.value||{}},this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:c.height,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_tree_searcher",itemsCreator:c.itemsCreator},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",itemsCreator:c.itemsCreator}},value:{value:c.value||{}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){b.popup=this,b.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){b.trigger.getCounter().adjustView(),d=!0,e===!0&&a()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){f=!0;var a={type:BI.Selection.Multi,value:this.hasChecked()?this.getValue():{}};b.trigger.getSearcher().setState(a),b.trigger.getCounter().setButtonChecked(a)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){b.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){g=!0,b.setValue(),b._defaultState()}}],itemsCreator:c.itemsCreator,onLoaded:function(){BI.nextTick(function(){b.trigger.getCounter().adjustView(),b.trigger.getSearcher().adjustView()})}},value:{value:c.value||{}},hideChecker:function(a){return 0===j.element.find(a.target).length}});var f=!1,g=!1,h=function(){return b.trigger.getSearcher().isSearching()},i=function(){return b.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){b.storeValue={value:b.combo.getValue()},this.setValue(b.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){b.storeValue={value:this.getValue()},b.combo.setValue(b.storeValue),BI.nextTick(function(){i()&&b.combo.populate()})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){e===!1&&(e=!0),d===!0&&(e=null,a())}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){b.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){b.combo.isViewVisible()||b.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var a=this.getSearcher().hasChecked(),b={type:BI.Selection.Multi,value:a?{1:1}:{}};this.getSearcher().setState(a?BI.Selection.Multi:BI.Selection.None),this.getCounter().setButtonChecked(b)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){h()||(f===!0&&(b.storeValue={value:b.combo.getValue()},f=!1),b.combo.setValue(b.storeValue),b.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){h()?(b.trigger.stopEditing(),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)):i()&&(b.trigger.stopEditing(),b.storeValue={value:b.combo.getValue()},g===!0&&(b.storeValue={value:{}}),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)),g=!1,f=!1});var j=BI.createWidget({type:"bi.trigger_icon_button",width:c.height,height:c.height,cls:"multi-select-trigger-icon-button"});j.on(BI.TriggerIconButton.EVENT_CHANGE,function(){b.trigger.getCounter().hideView(),b.combo.isViewVisible()?b.combo.hideView():b.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:j,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},setValue:function(a){this.storeValue.value=a||{},this.combo.setValue({value:a||{}})},getValue:function(){return this.storeValue.value},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeCombo.EVENT_CONFIRM="MultiTreeCombo.EVENT_CONFIRM",BI.shortcut("bi.multi_tree_combo",BI.MultiTreeCombo),BI.MultiTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-popup",maxWidth:"auto",minWidth:100,maxHeight:400,onLoaded:BI.emptyFn})},_init:function(){BI.MultiTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={},this.tree=BI.createWidget({type:"bi.async_tree",height:400,cls:"popup-view-tree",itemsCreator:b.itemsCreator,onLoaded:b.onLoaded,value:b.value||{}}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",element:this,stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.tree}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CONFIRM)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreePopup.EVENT_CHANGE)}),this.tree.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiTreePopup.EVENT_AFTERINIT)})},getValue:function(){return this.tree.getValue()},setValue:function(a){a||(a={}),this.tree.setSelectedValue(a.value)},populate:function(a){this.tree.stroke(a)},hasChecked:function(){return this.tree.hasChecked()},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreePopup.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreePopup.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreePopup.EVENT_AFTERINIT="EVENT_AFTERINIT",BI.shortcut("bi.multi_tree_popup_view",BI.MultiTreePopup),BI.MultiTreeSearchPane=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-search-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiTreeSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.partTree=BI.createWidget({type:"bi.part_tree",element:this,tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(a,c){a.keyword=b.keywordGetter(),b.itemsCreator(a,c)},value:b.value}),this.partTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.partTree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearchPane.EVENT_CHANGE)})},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_tree_search_pane",BI.MultiTreeSearchPane),BI.MultiTreeCheckSelectedButton=BI.inherit(BI.Single,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-selected-button",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiTreeCheckSelectedButton.superclass._init.apply(this,arguments);var a=this;this.indicator=BI.createWidget({type:"bi.icon_button",cls:"check-font trigger-check-selected",width:15,height:15,stopPropagation:!0}),this.checkSelected=BI.createWidget({type:"bi.text_button",cls:"trigger-check-selected",invisible:!0,hgap:4,text:this._const.checkSelected,textAlign:"center",textHeight:15}),this.checkSelected.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.checkSelected.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.horizontal",element:this,items:[this.indicator,this.checkSelected]}),this.element.hover(function(){a.indicator.setVisible(!1),a.checkSelected.setVisible(!0)},function(){a.indicator.setVisible(!0),a.checkSelected.setVisible(!1)}),this.setVisible(!1)},setValue:function(a){a||(a={}),this.setVisible(BI.size(a.value)>0)}}),BI.MultiTreeCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_tree_check_selected_button",BI.MultiTreeCheckSelectedButton),BI.MultiTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",height:b.height}}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_CHANGE,arguments)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){function b(a){var c="",d=0,e=BI.size(a);return BI.each(a,function(a,f){d++;var g=b(f);c+=a+(""===g?"":":"+g)+(d===e?"":",")}),c}if(a||(a={}),a.value||(a.value={}),BI.isNumber(a))this.editor.setState(a);else if(0===BI.size(a.value))this.editor.setState(BI.Selection.None);else{var c="";BI.each(a.value,function(a,d){var e=b(d);c+=a+(""===e?"":":"+e)+"; "}),this.editor.setState(c)}},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearcher.EVENT_START="EVENT_START",BI.MultiTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_tree_searcher",BI.MultiTreeSearcher),BI.NumberEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-number-editor bi-border",validationChecker:function(){return!0},valueFormatter:function(a){return a},value:0,allowBlank:!1,errorText:"",step:1})},_init:function(){BI.NumberEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,allowBlank:b.allowBlank,value:b.valueFormatter(b.value),validationChecker:b.validationChecker,errorText:b.errorText}),this.editor.on(BI.TextEditor.EVENT_CHANGE,function(){b.value=this.getValue(),a.fireEvent(BI.NumberEditor.EVENT_CHANGE)}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){this.setValue(BI.parseFloat(this.getValue())),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",cls:"column-pre-page-h-font top-button bi-border-left bi-border-bottom"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",cls:"column-next-page-h-font bottom-button bi-border-left bi-border-top"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),BI.createWidget({type:"bi.htape",element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:23}]})},focus:function(){this.editor.focus()},_finetuning:function(a){var b=BI.parseFloat(this.getValue());this.setValue(b.add(a))},setUpEnable:function(a){this.topBtn.setEnable(!!a)},setDownEnable:function(a){this.bottomBtn.setEnable(!!a)},getValue:function(){return this.options.value},setValue:function(a){var b=this.options;b.value=a,this.editor.setValue(b.valueFormatter(a))}}),BI.NumberEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberEditor.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.number_editor",BI.NumberEditor),BI.NumberInterval=BI.inherit(BI.Single,{constants:{typeError:"typeBubble",numberError:"numberBubble",signalError:"signalBubble",editorWidth:114,columns:5,width:30,rows:1,numberErrorCls:"number-error",border:1,less:0,less_equal:1,numTip:""},_defaultConfig:function(){var a=BI.NumberInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-number-interval",height:25,validation:"valid"})},_init:function(){var a=this,b=this.constants,c=this.options;BI.NumberInterval.superclass._init.apply(this,arguments),this.smallEditor=BI.createWidget({type:"bi.editor",height:c.height-2,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,value:c.min,level:"warning",tipType:"warning",quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.smallEditorBubbleType=b.typeError,!1)},cls:"number-interval-small-editor bi-border-top bi-border-bottom bi-border-left"}),this.smallTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.smallEditor.element,items:[{el:this.smallTip,top:0,right:5}]}),this.bigEditor=BI.createWidget({type:"bi.editor",height:c.height-2,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,value:c.max,level:"warning",tipType:"warning",quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.bigEditorBubbleType=b.typeError, -!1)},cls:"number-interval-big-editor bi-border-top bi-border-bottom bi-border-right"}),this.bigTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.bigEditor.element,items:[{el:this.bigTip,top:0,right:5}]}),this.smallCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-small-combo bi-border",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closemin===!0?this.smallCombo.setValue(1):this.smallCombo.setValue(0),this.bigCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-big-combo bi-border",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closemax===!0?this.bigCombo.setValue(1):this.bigCombo.setValue(0),this.label=BI.createWidget({type:"bi.label",text:BI.i18nText("BI-Basic_Value"),textHeight:c.height-2*b.border,width:b.width-2*b.border,height:c.height-2*b.border,level:"warning",tipType:"warning"}),this.left=BI.createWidget({type:"bi.htape",items:[{el:a.smallEditor},{el:a.smallCombo,width:b.width-2*b.border}]}),this.right=BI.createWidget({type:"bi.htape",items:[{el:a.bigCombo,width:b.width-2*b.border},{el:a.bigEditor}]}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:c.height,items:[{type:"bi.absolute",items:[{el:a.left,left:-15,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:-15,top:0,bottom:0}]}]}),BI.createWidget({element:a,type:"bi.horizontal_auto",items:[a.label]}),a._setValidEvent(a.bigEditor,b.bigEditor),a._setValidEvent(a.smallEditor,b.smallEditor),a._setErrorEvent(a.bigEditor,b.bigEditor),a._setErrorEvent(a.smallEditor,b.smallEditor),a._setBlurEvent(a.bigEditor),a._setBlurEvent(a.smallEditor),a._setFocusEvent(a.bigEditor),a._setFocusEvent(a.smallEditor),a._setComboValueChangedEvent(a.bigCombo),a._setComboValueChangedEvent(a.smallCombo),a._setEditorValueChangedEvent(a.bigEditor),a._setEditorValueChangedEvent(a.smallEditor)},_checkValidation:function(){var a=this,b=this.constants,c=this.options;if(a._setTitle(""),BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),!a.smallEditor.isValid()||!a.bigEditor.isValid())return a.element.removeClass("number-error"),c.validation="invalid",b.typeError;if(BI.isEmptyString(a.smallEditor.getValue())||BI.isEmptyString(a.bigEditor.getValue()))return a.element.removeClass("number-error"),c.validation="valid","";var d=parseFloat(a.smallEditor.getValue()),e=parseFloat(a.bigEditor.getValue()),f=a.bigCombo.getValue(),g=a.smallCombo.getValue();return f[0]===b.less_equal&&g[0]===b.less_equal?d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):(a.element.removeClass("number-error"),c.validation="valid",""):d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):d===e?(a.element.addClass("number-error"),c.validation="invalid",b.signalError):(a.element.removeClass("number-error"),c.validation="valid","")},_setTitle:function(a){var b=this;b.bigEditor.setTitle(a),b.smallEditor.setTitle(a),b.label.setTitle(a)},_setFocusEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_FOCUS,function(){switch(b._setTitle(""),b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{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"});break;default:return}})},_setBlurEvent:function(a){var b=this.constants,c=this;a.on(BI.Editor.EVENT_BLUR,function(){switch(BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),c._checkValidation()){case b.typeError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));break;case b.numberError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));break;case b.signalError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));break;default:c._setTitle("")}})},_setErrorEvent:function(a){var b=this.constants,c=this;a.on(BI.Editor.EVENT_ERROR,function(){c._checkValidation(),BI.Bubbles.show(b.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),c,{offsetStyle:"center"}),c.fireEvent(BI.NumberInterval.EVENT_ERROR)})},_setValidEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_VALID,function(){switch(b._checkValidation()){case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumberInterval.EVENT_VALID)}})},_setEditorValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{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,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)}),this.pager=BI.createWidget(b.pager,{type:"bi.direction_pager",height:30}),this.pager.on(BI.Pager.EVENT_CHANGE,function(){var c=this.getVPage&&this.getVPage();BI.isNull(c)&&(c=this.getCurrentPage());var d=this.getHPage&&this.getHPage();b.itemsCreator({vpage:c,hpage:d},function(b,e,f,g){a.table.setVPage?a.table.setVPage(c):a.table.setValue(c),a.table.setHPage&&a.table.setHPage(d),a.populate.apply(a,arguments)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.table,left:0,top:0},{el:this.pager,left:0,right:0,bottom:0}]})},setHPage:function(a){this.hCurr=a,this.pager.setHPage&&this.pager.setHPage(a),this.table.setHPage&&this.table.setHPage(a)},setVPage:function(a){this.vCurr=a,this.pager.setVPage&&this.pager.setVPage(a),this.table.setVPage&&this.table.setVPage(a)},getHPage:function(){var a=this.pager.getHPage&&this.pager.getHPage();return BI.isNotNull(a)?a:(a=this.pager.getCurrentPage&&this.pager.getCurrentPage(),BI.isNotNull(a)?a:this.hpage)},getVPage:function(){var a=this.pager.getVPage&&this.pager.getVPage();return BI.isNotNull(a)?a:(a=this.pager.getCurrentPage&&this.pager.getCurrentPage(),BI.isNotNull(a)?a:this.vpage)},setWidth:function(a){BI.PageTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.PageTable.superclass.setHeight.apply(this,arguments);var b=!1;this.pager.alwaysShowPager?b=!0:this.pager.hasHNext&&this.pager.hasHNext()?b=!0:this.pager.hasHPrev&&this.pager.hasHPrev()?b=!0:this.pager.hasVNext&&this.pager.hasVNext()?b=!0:this.pager.hasVPrev&&this.pager.hasVPrev()?b=!0:this.pager.hasNext&&this.pager.hasNext()?b=!0:this.pager.hasPrev&&this.pager.hasPrev()&&(b=!0),this.table.setHeight(a-(b?30:0))},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.columnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getVerticalScroll:function(){return this.table.getVerticalScroll()},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},restore:function(){this.table.restore()},attr:function(){BI.PageTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},populate:function(){this.pager.populate(),this.table.populate.apply(this.table,arguments)},destroy:function(){this.table.destroy(),this.pager&&this.pager.destroy(),BI.PageTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.page_table",BI.PageTable),BI.PreviewTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table-cell",text:""})},_init:function(){BI.PreviewTableCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.preview_table_cell",BI.PreviewTableCell),BI.PreviewTableHeaderCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTableHeaderCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table-header-cell",text:""})},_init:function(){BI.PreviewTableHeaderCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.preview_table_header_cell",BI.PreviewTableHeaderCell),BI.PreviewTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table",isNeedFreeze:!1,freezeCols:[],rowSize:null,columnSize:[],headerRowSize:30,header:[],items:[]})},_init:function(){BI.PreviewTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.table=BI.createWidget({type:"bi.table_view",element:this,isNeedResize:!1,isResizeAdapt:!1,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,rowSize:b.rowSize,columnSize:b.columnSize,headerRowSize:b.headerRowSize,header:BI.map(b.header,function(a,b){return BI.map(b,function(a,b){return BI.extend({type:"bi.preview_table_header_cell"},b)})}),items:BI.map(b.items,function(a,b){return BI.map(b,function(a,b){return BI.extend({type:"bi.preview_table_cell"},b)})})}),this.table.on(BI.Table.EVENT_TABLE_AFTER_INIT,function(){a._adjustColumns(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT,arguments)}),this.table.on(BI.Table.EVENT_TABLE_RESIZE,function(){a._adjustColumns()})},_hasAdaptCol:function(a){return BI.any(a,function(a,b){return""===b})},_isPercentage:function(a){return a[0]<=1},_adjustColumns:function(){var a=this.options;if(a.isNeedFreeze===!0){if(this._isPercentage(a.columnSize)){if(this._hasAdaptCol(a.columnSize)){var b=[],c=0;BI.each(a.columnSize,function(a,d){""===d?b.push(a):c+=d}),c=1-c;var d=c/b.length;BI.each(b,function(b,c){a.columnSize[c]=d})}var e=0!==BI.first(a.freezeCols),f=[],g=[];BI.each(a.columnSize,function(b,c){a.freezeCols.contains(b)?f.push(c):g.push(c)});var h=BI.sum(f),i=BI.sum(g);BI.each(f,function(a,b){f[a]=b/h}),BI.each(g,function(a,b){g[a]=b/i}),this.table.setRegionColumnSize(e?["fill",h]:[h,"fill"]),this.table.setColumnSize(e?g.concat(f):f.concat(g))}}else(this._hasAdaptCol(a.columnSize)||this._isPercentage(a.columnSize))&&this.table.setRegionColumnSize(["100%"])},setColumnSize:function(a){return this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){return this.table.setHeaderColumnSize(a)},setRegionColumnSize:function(a){return this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},setVerticalScroll:function(a){return this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){return this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){return this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},getColumns:function(){return this.table.getColumns()},populate:function(a,b){this.table.populate(a,b)}}),BI.PreviewTable.EVENT_CHANGE="PreviewTable.EVENT_CHANGE",BI.shortcut("bi.preview_table",BI.PreviewTable),BI.QuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-combo",behaviors:{},height:25})},_init:function(){BI.QuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.quarter_trigger",value:b.value}),this.trigger.on(BI.QuarterTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.QuarterTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.QuarterTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM))}),this.popup=BI.createWidget({type:"bi.quarter_popup",behaviors:b.behaviors,value:b.value}),this.popup.on(BI.QuarterPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.QuarterCombo.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.QuarterCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return BI.isNull(this.popup)?this.options.value||"":this.popup.getValue()||""}}),BI.QuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.quarter_combo",BI.QuarterCombo),BI.QuarterPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-popup",behaviors:{}})},_init:function(){BI.QuarterPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[{text:Date._QN[1],value:1},{text:Date._QN[2],value:2},{text:Date._QN[3],value:3},{text:Date._QN[4],value:4}];c=BI.map(c,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"left",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:25})}),this.quarter=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(c,{}),layouts:[{type:"bi.vertical"}],value:b.value}),this.quarter.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.quarter.getValue()[0]},setValue:function(a){this.quarter.setValue([a])}}),BI.QuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quarter_popup",BI.QuarterPopup),BI.QuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,textWidth:40,errorText:BI.i18nText("BI-Quarter_Trigger_Error_Text")},_defaultConfig:function(){return BI.extend(BI.QuarterTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-quarter-trigger bi-border",height:24})},_init:function(){BI.QuarterTrigger.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<=4},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.QuarterTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.QuarterTrigger.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.QuarterTrigger.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.QuarterTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.QuarterTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-quarter-text",text:BI.i18nText("BI-Multi_Date_Quarter"),width:c.textWidth},width:c.textWidth},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]}),this.setValue(b.value)},setValue:function(a){a=a||"",this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return this.editor.getValue()}}),BI.QuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.QuarterTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.QuarterTrigger.EVENT_START="EVENT_START",BI.QuarterTrigger.EVENT_STOP="EVENT_STOP",BI.QuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.quarter_trigger",BI.QuarterTrigger),BI.ResponisveTable=BI.inherit(BI.Widget,{_const:{perColumnSize:100},_defaultConfig:function(){return BI.extend(BI.ResponisveTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-responsive-table",isNeedFreeze:!1,freezeCols:[],logic:{dynamic:!1},isNeedMerge:!1,mergeCols:[],mergeRule:function(a,b){return BI.isEqual(a,b)},columnSize:[],headerRowSize:25,footerRowSize:25,rowSize:25,regionColumnSize:!1,header:[],footer:!1,items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.ResponisveTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.table=BI.createWidget({type:"bi.table_view",element:this,logic:b.logic,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,headerRowSize:b.headerRowSize,footerRowSize:b.footerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:b.header,footer:b.footer,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_AFTER_INIT,function(){a._initRegionSize(),a.table.resize(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT,arguments)}),this.table.on(BI.Table.EVENT_TABLE_RESIZE,function(){a._resizeRegion(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE,function(){a.fireEvent(BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_REGION_RESIZE,function(){b.isNeedResize===!0&&a._isAdaptiveColumn()&&a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE,function(){a._resizeBody(),a.fireEvent(BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_COLUMN_RESIZE,function(){a.fireEvent(BI.Table.EVENT_TABLE_COLUMN_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){a._resizeRegion(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_initRegionSize:function(){var a=this.options;if(a.isNeedFreeze===!0){var b=this.table.getRegionColumnSize(),c=this.table.element.width();if(!b[0]||"fill"===b[0]||b[0]>c||b[1]>c){var d=a.freezeCols;if(0===d.length)this.table.setRegionColumnSize([0,"fill"]);else if(d.length>0&&d.lengtha.columnSize.length/2&&(e=2*c/3),this.table.setRegionColumnSize([e,"fill"])}else this.table.setRegionColumnSize(["fill",0])}}},_getBlockSize:function(){var a=this.options,b=this.table.getCalculateColumnSize();if(a.isNeedFreeze===!0){var c=[],d=[];BI.each(b,function(b,e){a.freezeCols.contains(b)?c.push(e):d.push(e)});var e=BI.sum(c)+c.length,f=BI.sum(d)+d.length;return{sumLeft:e,sumRight:f,left:c,right:d}}return{size:b,sum:BI.sum(b)+b.length}},_isAdaptiveColumn:function(a){return!(BI.last(a||this.table.getColumnSize())>1.05)},_resizeHeader:function(){var a=this,b=this.options;if(b.isNeedFreeze===!0)if(this._isAdaptiveColumn()){var c=this.table.getCalculateColumnSize();this.table.setHeaderColumnSize(c)}else{var d=this.table.getClientRegionColumnSize(),e=this._getBlockSize(),f=e.sumLeft,g=e.sumRight,h=e.left,i=e.right;h[h.length-1]+=d[0]-f,i[i.length-1]+=d[1]-g;var j=BI.clone(h),k=BI.clone(i);j[j.length-1]="",k[k.length-1]="",this.table.setColumnSize(j.concat(k)),e=a._getBlockSize(),h[h.length-1]0&&a.freezeCols.length=d+e)&&this.table.setRegionColumnSize([d,"fill"]),this._resizeRegion()}},_resizeRegion:function(){var a=this.options,b=this.table.getCalculateRegionColumnSize();if(a.isNeedFreeze===!0&&a.freezeCols.length>0&&a.freezeCols.lengtha.columnSize.length/2&&(e=2*c/3),this.table.setRegionColumnSize([e,"fill"])}}},resize:function(){this.table.resize(),this._resizeRegion(),this._resizeHeader()},setColumnSize:function(a){this.table.setColumnSize(a),this._adjustRegion(),this._resizeHeader()},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){this.table.setHeaderColumnSize(a),this._adjustRegion(),this._resizeHeader()},setRegionColumnSize:function(a){this.table.setRegionColumnSize(a),this._resizeHeader()},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},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()},getColumns:function(){return this.table.getColumns()},attr:function(){BI.ResponisveTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},populate:function(a){var b=this,c=this.options;this.table.populate.apply(this.table,arguments),c.isNeedFreeze===!0&&BI.nextTick(function(){b._initRegionSize(),b.table.resize(),b._resizeHeader()})}}),BI.shortcut("bi.responsive_table",BI.ResponisveTable),BI.SelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-first-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.first_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_first_plus_group_node",BI.SelectTreeFirstPlusGroupNode),BI.SelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-last-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.last_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{ -width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_last_plus_group_node",BI.SelectTreeLastPlusGroupNode),BI.SelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-mid-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.mid_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_mid_plus_group_node",BI.SelectTreeMidPlusGroupNode),BI.SelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-combo",height:30,text:"",items:[],value:""})},_init:function(){BI.SelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value}),this.popup=BI.createWidget({type:"bi.select_level_tree",items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView()})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.shortcut("bi.select_tree_combo",BI.SelectTreeCombo),BI.SelectTreeExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-expander",trigger:"click",toggle:!0,direction:"bottom",isDefaultInit:!0,el:{},popup:{}})},_init:function(){BI.SelectTreeExpander.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({stopPropagation:!0},b.el)),this.trigger.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&this.isSelected()&&a.expander.setValue([]),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.expander=BI.createWidget({type:"bi.expander",element:this,trigger:b.trigger,toggle:b.toggle,direction:b.direction,isDefaultInit:b.isDefaultInit,el:this.trigger,popup:b.popup}),this.expander.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.trigger.setSelected(!1),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){BI.contains(a,this.trigger.getValue())?(this.trigger.setSelected(!0),this.expander.setValue([])):(this.trigger.setSelected(!1),this.expander.setValue(a))},getValue:function(){return this.trigger.isSelected()?[this.trigger.getValue()]:this.expander.getValue()},populate:function(a){this.expander.populate(a)}}),BI.shortcut("bi.select_tree_expander",BI.SelectTreeExpander),BI.SelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-level-tree",tipText:BI.i18nText("BI-No_Selected_Item"),items:[],value:""})},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={layer:b};if(e.id=e.id||BI.UUID(),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.select_tree_first_plus_group_node";break;case a.length-1:f.type="bi.select_tree_last_plus_group_node";break;default:f.type="bi.select_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children)}else{switch(d){case a.length-1:f.type="bi.last_tree_leaf_item";break;default:f.type="bi.mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_init:function(){BI.SelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{type:"bi.select_tree_expander",isDefaultInit:!0},items:this._formatItems(BI.Tree.transformToTreeFormat(b.items)),value:b.value,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SelectTreePopup.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.SelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a)))}}),BI.SelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_level_tree",BI.SelectTreePopup),BI.SequenceTableDynamicNumber=BI.inherit(BI.SequenceTableTreeNumber,{_defaultConfig:function(){return BI.extend(BI.SequenceTableDynamicNumber.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-sequence-table-dynamic-number"})},_init:function(){BI.SequenceTableDynamicNumber.superclass._init.apply(this,arguments)},_formatNumber:function(a){function b(a){var c=0;return BI.isNotEmptyArray(a.children)?(BI.each(a.children,function(a,d){c+=b(d)}),a.children.length>1&&BI.isNotEmptyArray(a.values)&&c++):c++,c}var c=this.options,d=[],e=this._getStart(a),f=0,g=0;return BI.each(a,function(a,h){BI.isArray(h.children)&&(BI.each(h.children,function(a,h){var i=b(h);d.push({text:e++,start:f,top:g,cnt:i,index:a,height:i*c.rowSize}),f+=i,g+=i*c.rowSize}),BI.isNotEmptyArray(h.values)&&(d.push({text:BI.i18nText("BI-Summary_Values"),start:f++,top:g,cnt:1,isSummary:!0,height:c.rowSize}),g+=c.rowSize))}),d}}),BI.shortcut("bi.sequence_table_dynamic_number",BI.SequenceTableDynamicNumber),BI.SequenceTableListNumber=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTableListNumber.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table-list-number",isNeedFreeze:!1,scrollTop:0,startSequence:1,headerRowSize:25,rowSize:25,sequenceHeaderCreator:null,header:[],items:[],crossHeader:[],crossItems:[],pageSize:20})},_init:function(){BI.SequenceTableListNumber.superclass._init.apply(this,arguments);var a=this.options;this.start=a.startSequence,this.renderedCells=[],this.renderedKeys=[],this.container=BI.createWidget({type:"bi.absolute",width:60,scrollable:!1}),this.scrollContainer=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.container]}),this.headerContainer=BI.createWidget({type:"bi.absolute",cls:"bi-border",width:58,scrollable:!1}),this.layout=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.headerContainer,height:a.headerRowSize*a.header.length-2},{el:{type:"bi.layout"},height:2},{el:this.scrollContainer}]}),this._populate()},_layout:function(){var a=this.options,b=a.headerRowSize*a.header.length-2,c=this.layout.attr("items");a.isNeedFreeze===!1?(c[0].height=0,c[1].height=0):a.isNeedFreeze===!0&&(c[0].height=b,c[1].height=2),this.layout.attr("items",c),this.layout.resize(),this.container.setHeight(a.items.length*a.rowSize);try{this.scrollContainer.element.scrollTop(a.scrollTop)}catch(d){}},_createHeader:function(){var a=this.options;BI.createWidget({type:"bi.absolute",element:this.headerContainer,items:[{el:a.sequenceHeaderCreator||{type:"bi.table_style_cell",cls:"sequence-table-title-cell",styleGetter:a.headerCellStyleGetter,text:BI.i18nText("BI-Number_Index")},left:0,top:0,right:0,bottom:0}]})},_calculateChildrenToRender:function(){for(var a=this,b=this.options,c=BI.clamp(b.scrollTop,0,b.rowSize*b.items.length-(b.height-b.header.length*b.headerRowSize)+BI.DOM.getScrollWidth()),d=Math.floor(c/b.rowSize),e=d+Math.floor((b.height-b.header.length*b.headerRowSize)/b.rowSize),f=[],g=[],h=d,i=0;h<=e&&h-1)b.rowSize!==this.renderedCells[j]._height&&(this.renderedCells[j]._height=b.rowSize,this.renderedCells[j].el.setHeight(b.rowSize)),this.renderedCells[j].top!==k&&(this.renderedCells[j].top=k,this.renderedCells[j].el.element.css("top",k+"px")),f.push(this.renderedCells[j]);else{var l=BI.createWidget(BI.extend({type:"bi.table_style_cell",cls:"sequence-table-number-cell bi-border-left bi-border-right bi-border-bottom",width:60,height:b.rowSize,text:this.start+h,styleGetter:function(c){return function(){return b.sequenceCellStyleGetter(a.start+h-1)}}(i)}));f.push({el:l,left:0,top:k,_height:b.rowSize})}g.push(this.start+h)}var m={},n={},o=[];BI.each(g,function(b,c){BI.deepContains(a.renderedKeys,c)?m[b]=c:n[b]=c}),BI.each(this.renderedKeys,function(a,b){BI.deepContains(m,b)||BI.deepContains(n,b)||o.push(a)}),BI.each(o,function(b,c){a.renderedCells[c].el.destroy()});var p=[];BI.each(n,function(a){p.push(f[a])}),BI.createWidget({type:"bi.absolute",element:this.container,items:p}),this.renderedCells=f,this.renderedKeys=g},_populate:function(){this.headerContainer.empty(),this._createHeader(),this._layout(),this._calculateChildrenToRender()},setVerticalScroll:function(a){if(this.options.scrollTop!==a){this.options.scrollTop=a;try{this.scrollContainer.element.scrollTop(a)}catch(b){}}},getVerticalScroll:function(){return this.options.scrollTop},setVPage:function(a){a=a<1?1:a;var b=this.options;this.start=(a-1)*b.pageSize+1},_restore:function(){this.options;BI.each(this.renderedCells,function(a,b){b.el.destroy()}),this.renderedCells=[],this.renderedKeys=[]},restore:function(){this._restore()},populate:function(a,b){var c=this.options;a&&a!==this.options.items&&(c.items=a,this._restore()),b&&b!==this.options.header&&(c.header=b),this._populate()}}),BI.shortcut("bi.sequence_table_list_number",BI.SequenceTableListNumber),BI.SequenceTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table",el:{type:"bi.adaptive_table"},sequence:{},isNeedResize:!0,isResizeAdapt:!1,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:[],showSequence:!1,startSequence:1})},_init:function(){BI.SequenceTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.sequence=BI.createWidget(b.sequence,{type:"bi.sequence_table_list_number",invisible:b.showSequence===!1,startSequence:b.startSequence,isNeedFreeze:b.isNeedFreeze,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems,headerRowSize:b.headerRowSize,rowSize:b.rowSize,width:60,height:b.height&&b.height-BI.GridTableScrollbar.SIZE,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter}),this.table=BI.createWidget(b.el,{type:"bi.adaptive_table",width:b.showSequence===!0?b.width-60:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(b){a.sequence.getVerticalScroll()!==this.getVerticalScroll()&&(a.sequence.setVerticalScroll(this.getVerticalScroll()),a.sequence.populate()),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)}),this.htape=BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.sequence,left:0,top:0},{el:this.table,top:0,left:b.showSequence===!0?60:0}]}),this._populate()},_populate:function(){var a=this.options;a.showSequence===!0?(this.sequence.setVisible(!0),this.table.element.css("left","60px"),this.table.setWidth(a.width-60)):(this.sequence.setVisible(!1),this.table.element.css("left","0px"),this.table.setWidth(a.width))},setWidth:function(a){BI.PageTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(this.options.showSequence?a-60:a)},setHeight:function(a){BI.PageTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a),this.sequence.setHeight(a-BI.GridTableScrollbar.SIZE)},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.columnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},hasLeftHorizontalScroll:function(){return this.table.hasLeftHorizontalScroll()},hasRightHorizontalScroll:function(){return this.table.hasRightHorizontalScroll()},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a),this.sequence.setVerticalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},setVPage:function(a){this.sequence.setVPage&&this.sequence.setVPage(a)},setHPage:function(a){this.sequence.setHPage&&this.sequence.setHPage(a)},attr:function(){BI.SequenceTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments),this.sequence.attr.apply(this.sequence,arguments)},restore:function(){this.table.restore(),this.sequence.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d),this._populate(),this.table.populate.apply(this.table,arguments),this.sequence.populate.apply(this.sequence,arguments),this.sequence.setVerticalScroll(this.table.getVerticalScroll())},destroy:function(){this.table.destroy(),BI.SequenceTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.sequence_table",BI.SequenceTable),BI.SingleSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.single_select_list",element:this,logic:{dynamic:!1},value:b.value,el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map([a.storeValue],function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d,selected:!1}});h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.single_select_radio_item",logic:{dynamic:!1},height:25,selected:!1})},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=BI.deepClone(a.value)||[],e=BI.map(d,function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.match.concat(f.find)}return BI.map(d,function(a,b){return{text:b.text,title:b.text,value:b.value,selected:!1}})},setValue:function(a){this.storeValue=a,this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SingleSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_loader",BI.SingleSelectSearchLoader),BI.SingleSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"single-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.single_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_pane",BI.SingleSelectSearchPane),BI.SingleSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_init:function(){BI.SingleSelectCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue),a.trigger.getSearcher().setState(a.storeValue)};this.storeValue=b.value||"",this.requesting=!1,this.trigger=BI.createWidget({type:"bi.single_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(a.getValue()),d.apply(a,arguments)})},value:this.storeValue}),this.trigger.on(BI.SingleSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.SingleSelectTrigger.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.SingleSelectTrigger.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.SingleSelectTrigger.EVENT_CHANGE,function(b,d){a.storeValue=this.getValue(),c()}),this.trigger.on(BI.SingleSelectTrigger.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.single_select_popup_view",ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.SingleSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c()})}},{eventName:BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){a._defaultState()}},{eventName:BI.SingleSelectPopupView.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.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length},value:b.value}),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.SingleSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"single-select-trigger-icon-button"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){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="")},_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.remove(b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||"",this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return this.storeValue},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.SingleSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.single_select_combo",BI.SingleSelectCombo),BI.SingleSelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-list",direction:BI.Direction.Top,logic:{dynamic:!0},items:[],itemsCreator:BI.emptyFn,hasNext:BI.emptyFn,onLoaded:BI.emptyFn,el:{type:"bi.list_pane"}})},_init:function(){BI.SingleSelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.list=BI.createWidget(b.el,{type:"bi.list_pane",items:b.items,itemsCreator:function(c,d){b.itemsCreator(c,function(b){d.apply(a,arguments)})},onLoaded:b.onLoaded,hasNext:b.hasNext,value:b.value}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&a.fireEvent(BI.SingleSelectList.EVENT_CHANGE,c,d),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),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.list)}))))},hasPrev:function(){return this.list.hasPrev()},hasNext:function(){return this.list.hasNext()},prependItems:function(a){this.list.prependItems.apply(this.list,arguments)},addItems:function(a){this.list.addItems.apply(this.list,arguments)},setValue:function(a){this.list.setValue([a])},getValue:function(){return this.list.getValue()[0]},empty:function(){this.list.empty()},populate:function(a){this.list.populate.apply(this.list,arguments)},resetHeight:function(a){this.list.resetHeight?this.list.resetHeight(a):this.list.element.css({"max-height":a+"px"})},setNotSelectedValue:function(){this.list.setNotSelectedValue.apply(this.list,arguments)},getNotSelectedValue:function(){return this.list.getNotSelectedValue()},getAllButtons:function(){return this.list.getAllButtons()},getAllLeaves:function(){return this.list.getAllLeaves()},getSelectedButtons:function(){return this.list.getSelectedButtons()},getNotSelectedButtons:function(){return this.list.getNotSelectedButtons()},getIndexByValue:function(a){return this.list.getIndexByValue(a)},getNodeById:function(a){return this.list.getNodeById(a)},getNodeByValue:function(a){return this.list.getNodeByValue(a)}}),BI.SingleSelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_list",BI.SingleSelectList),BI.SingleSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.single_select_list",element:this,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map([a.storeValue],function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d,selected:!1}});h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&(a.storeValue=f),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.single_select_radio_item",logic:this.options.logic,height:25,selected:!1})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},_assertValue:function(a){a||(a="")},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||"",this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SingleSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_loader",BI.SingleSelectLoader),BI.SingleSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.single_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.SingleSelectPopupView.EVENT_CLICK_CLEAR); -break;case 1:a.fireEvent(BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM)}})},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.SingleSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.SingleSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.single_select_popup_view",BI.SingleSelectPopupView),BI.SingleSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.SingleSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.single_select_searcher",height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker,value:b.value}),this.searcher.on(BI.SingleSelectSearcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_START)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_CHANGE,arguments)});BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:BI.createWidget(),width:30}]})},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch()},setAdapter:function(a){this.searcher.setAdapter(a)},setValue:function(a){this.searcher.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.SingleSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.SingleSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.SingleSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectTrigger.EVENT_START="EVENT_START",BI.SingleSelectTrigger.EVENT_STOP="EVENT_STOP",BI.SingleSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.single_select_trigger",BI.SingleSelectTrigger),BI.SingleSelectEditor=BI.inherit(BI.Widget,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-editor",el:{}})},_init:function(){BI.SingleSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0,value:b.value}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_CLICK_LABEL,function(){})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastValidValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.SingleSelectEditor.EVENT_PAUSE="SingleSelectEditor.EVENT_PAUSE",BI.shortcut("bi.single_select_editor",BI.SingleSelectEditor),BI.SingleSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.SingleSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.single_select_editor",height:b.height}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.single_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),this.setKeyword(c.keyword),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.SingleSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.SingleSelectSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;a||(a=""),""===a?this.editor.setState(BI.Selection.None):this.editor.setState(b.valueFormatter(a+"")||a+"")},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.SingleSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.SingleSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectSearcher.EVENT_START="EVENT_START",BI.SingleSelectSearcher.EVENT_STOP="EVENT_STOP",BI.SingleSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.single_select_searcher",BI.SingleSelectSearcher),BI.SingleSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.single_select_list",element:this,logic:{dynamic:!1},el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map([a.storeValue],function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d,selected:!1}});h=a._createItems(i)}if(g){for(var j=!1,k=0;k0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_add_pane",BI.SingleSelectSearchPane),BI.SingleSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_init:function(){BI.SingleSelectCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue),a.trigger.getSearcher().setState(a.storeValue)};this.storeValue="",this.requesting=!1,this.trigger=BI.createWidget({type:"bi.single_select_add_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(a.getValue()),d.apply(a,arguments)})}}),this.trigger.on(BI.SingleSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.SingleSelectTrigger.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.SingleSelectTrigger.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.SingleSelectTrigger.EVENT_CHANGE,function(b,d){a.storeValue=this.getValue(),c()}),this.trigger.on(BI.SingleSelectTrigger.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.single_select_popup_view",ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.SingleSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c()})}},{eventName:BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){a._defaultState()}},{eventName:BI.SingleSelectPopupView.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.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.SingleSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"single-select-trigger-icon-button"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){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="")},_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.remove(b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||"",this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return this.storeValue},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.SingleSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.single_select_add_combo",BI.SingleSelectCombo),BI.SingleSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.SingleSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.single_select_add_searcher",height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.SingleSelectSearcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_START)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_CHANGE,arguments)});BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:BI.createWidget(),width:30}]})},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch()},setAdapter:function(a){this.searcher.setAdapter(a)},setValue:function(a){this.searcher.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.SingleSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.SingleSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.SingleSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectTrigger.EVENT_START="EVENT_START",BI.SingleSelectTrigger.EVENT_STOP="EVENT_STOP",BI.SingleSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.single_select_add_trigger",BI.SingleSelectTrigger),BI.SingleSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.SingleSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.single_select_editor",height:b.height}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.single_select_search_add_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),this.setKeyword(c.keyword),b.itemsCreator(c,d)}},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.SingleSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.SingleSelectSearcher.EVENT_SEARCHING,b)})},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;a||(a=""),""===a?this.editor.setState(BI.Selection.None):this.editor.setState(b.valueFormatter(a+"")||a+"")},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.SingleSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.SingleSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectSearcher.EVENT_START="EVENT_START",BI.SingleSelectSearcher.EVENT_STOP="EVENT_STOP",BI.SingleSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.single_select_add_searcher",BI.SingleSelectSearcher),BI.SignTextEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-sign-initial-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",text:"",height:24})},_init:function(){BI.SignTextEditor.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:"sign-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:"left",height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.SignTextEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignTextEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText()}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;BI.nextTick(BI.bind(function(){if(""===this.editor.getValue())this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark");else{var b=this.editor.getValue();b=BI.isEmpty(b)||b==a.text?a.text:b+a.text,this.text.setValue(b),this.text.element.removeClass("bi-water-mark")}},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){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&&ef-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:"100%"},{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[this.label]}],rgap:c.EDITOR_WIDTH,height:c.EDITOR_HEIGHT},top:0,left:0,width:"100%"}]})},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setLabelPosition(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.label.setValue(m),c.value=m,c.fireEvent(BI.SingleSlider.EVENT_CHANGE)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){var b=this.options,c=!1;if(BI.isNumeric(a)&&!(BI.isNull(a)||athis.max))if(b.digit===!1)c=!0;else{var d=(a+"").split(".")[1]||"";c=d.length===b.digit}return c},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setLabelPosition:function(a){this.label.element.css({left:a+"%"})},_setSliderPosition:function(a){this.slider.element.css({left:a+"%"})},_setAllPosition:function(a){this._setSliderPosition(a),this._setLabelPosition(a),this._setBlueTrack(a)},_setVisible:function(a){this.slider.setVisible(a),this.label.setVisible(a)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(a){var b=BI.parseInt(10*a);return(this.max-this.min)*b/1e3+this.min},_getPercentByValue:function(a){return 100*(a-this.min)/(this.max-this.min)},getValue:function(){return this.value},setValue:function(a){var b=this.options;a=BI.parseFloat(a),a=b.digit===!1?a:a.toFixed(b.digit),isNaN(a)||(this._checkValidation(a)&&(this.value=a),a>this.max&&(this.value=this.max),ab&&(this.min=b,this.max=c)},reset:function(){this._setVisible(!1),this.enable=!1,this.value="",this.min=0,this.max=0,this._setBlueTrack(0)},populate:function(){isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,this.label.setErrorText(BI.i18nText("BI-Please_Enter")+this.min+"-"+this.max+BI.i18nText("BI-Basic_De")+BI.i18nText("BI-Basic_Number")),BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?(this.label.setValue(this.value),this._setAllPosition(this._getPercentByValue(this.value))):(this.label.setValue(this.max),this._setAllPosition(100)))}}),BI.SingleSlider.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_slider",BI.SingleSlider),BI.SingleSliderLabel=BI.inherit(BI.Widget,{_constant:{EDITOR_WIDTH:90,EDITOR_HEIGHT:20,HEIGHT:20,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},_defaultConfig:function(){return BI.extend(BI.SingleSliderLabel.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-slider-label bi-slider-track",digit:!1,unit:""})},_init:function(){BI.SingleSliderLabel.superclass._init.apply(this,arguments);var a=this,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&&ef-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.setText(i+b.unit),a.value=i,a.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)}}),this.label=BI.createWidget({type:"bi.label",height:c.HEIGHT,width:c.EDITOR_WIDTH-2}),this._setVisible(!1),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.track,width:"100%",height:c.TRACK_HEIGHT}]}],hgap:7,height:c.TRACK_HEIGHT},top:13,left:0,width:"100%"},{el:d,top:10,left:0,width:"100%"},{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[this.label]}],rgap:c.EDITOR_WIDTH,height:c.EDITOR_HEIGHT},top:0,left:0,width:"100%"}]})},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setLabelPosition(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.label.setValue(m),c.value=m,c.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){return BI.isNumeric(a)&&!(BI.isNull(a)||athis.max)},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setLabelPosition:function(a){this.label.element.css({left:a+"%"})},_setSliderPosition:function(a){this.slider.element.css({left:a+"%"})},_setAllPosition:function(a){this._setSliderPosition(a),this._setLabelPosition(a),this._setBlueTrack(a)},_setVisible:function(a){this.slider.setVisible(a),this.label.setVisible(a)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(a){var b=BI.parseInt(10*a);return(this.max-this.min)*b/1e3+this.min},_getPercentByValue:function(a){return 100*(a-this.min)/(this.max-this.min)},getValue:function(){return this.value},setValue:function(a){var b=this.options;a=BI.parseFloat(a),a=b.digit===!1?a:a.toFixed(b.digit),isNaN(a)||(this._checkValidation(a)&&(this.value=a),a>this.max&&(this.value=this.max),ab&&(this.min=b,this.max=c)},reset:function(){this._setVisible(!1),this.enable=!1,this.value="",this.min=0,this.max=0,this._setBlueTrack(0)},populate:function(){var a=this.options;isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?(this.label.setValue(this.value+a.unit),this._setAllPosition(this._getPercentByValue(this.value))):(this.label.setValue(this.max+a.unit),this._setAllPosition(100)))}}),BI.SingleSliderLabel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_slider_label",BI.SingleSliderLabel),BI.SingleSliderNormal=BI.inherit(BI.Widget,{_constant:{HEIGHT:28,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},props:{baseCls:"bi-single-slider-normal bi-slider-track",minMax:{min:0,max:100}},render:function(){var a=this,b=this._constant,c=this._createTrack();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:b.SLIDER_WIDTH_HALF,height:b.SLIDER_HEIGHT});return d.element.click(function(c){if(a.enable){var d=c.clientX-a.element.offset().left-b.SLIDER_WIDTH_HALF,e=a.track.element[0].scrollWidth,f=0;d<0&&(f=0),d>0&&de-b.SLIDER_WIDTH&&(f=100);var g=BI.parseFloat(f.toFixed(1));a._setAllPosition(g);var h=a._getValueByPercent(g);a.value=h,a.fireEvent(BI.SingleSlider.EVENT_CHANGE)}}),{type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:c,width:"100%",height:b.TRACK_HEIGHT}]}],hgap:7,height:b.TRACK_HEIGHT},top:3,left:0,width:"100%"},{el:d,top:0,left:0,width:"100%"}]}},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.value=m,c.fireEvent(BI.SingleSliderNormal.EVENT_DRAG,m)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrack:function(){var a=this;this._constant;return this.grayTrack=BI.createWidget({type:"bi.layout",cls:"gray-track",height:6}),this.blueTrack=BI.createWidget({type:"bi.layout",cls:"blue-track bi-high-light-background",height:6}),this.options.color&&this.blueTrack.element.css({"background-color":this.options.color}),{type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}],ref:function(b){a.track=b}}},_checkValidation:function(a){return!(BI.isNull(a)||athis.max)},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setSliderPosition:function(a){this.slider.element.css({left:a+"%"})},_setAllPosition:function(a){this._setSliderPosition(a),this._setBlueTrack(a)},_setVisible:function(a){this.slider.setVisible(a)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(a){var b=BI.parseInt(10*a);return(this.max-this.min)*b/1e3+this.min},_getPercentByValue:function(a){return 100*(a-this.min)/(this.max-this.min)},getValue:function(){return this.value},setValue:function(a){var b=BI.parseFloat(a);isNaN(b)||(this._checkValidation(b)&&(this.value=b),b>this.max&&(this.value=this.max),bb&&(this.min=b,this.max=c)},reset:function(){this._setVisible(!1),this.enable=!1,this.value="",this.min=0,this.max=0,this._setBlueTrack(0)},populate:function(){isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?this._setAllPosition(this._getPercentByValue(this.value)):this._setAllPosition(100))}}),BI.SingleSliderNormal.EVENT_DRAG="EVENT_DRAG",BI.shortcut("bi.single_slider_normal",BI.SingleSliderNormal),BI.SingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-combo",trigger:{},height:24,text:"",items:[],value:""})},_init:function(){BI.SingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value},b.trigger)),this.popup=BI.createWidget({type:"bi.single_level_tree",items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.SingleTreeCombo.EVENT_CHANGE)})},populate:function(a){this.combo.populate(a)},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.SingleTreeCombo.EVENT_CHANGE="SingleTreeCombo.EVENT_CHANGE",BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.single_tree_combo",BI.SingleTreeCombo),BI.SingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-level-tree",tipText:BI.i18nText("BI-No_Selected_Item"),items:[],value:""})},_init:function(){BI.SingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{isDefaultInit:!0},items:b.items,value:b.value,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SingleTreePopup.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.SingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.SingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_level_tree",BI.SingleTreePopup),BI.SingleTreeTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SingleTreeTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-trigger",height:24,text:"",items:[],value:""})},_init:function(){BI.SingleTreeTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,text:a.text,items:a.items,height:a.height,value:a.value})},_checkTitle:function(){var a=this,b=this.getValue();BI.any(this.options.items,function(c,d){if(b.contains(d.value))return a.trigger.setTitle(d.text||d.value),!0})},setValue:function(a){a=BI.isArray(a)?a:[a],this.options.value=a,this.trigger.setValue(a),this._checkTitle()},getValue:function(){return this.options.value||[]},populate:function(a){BI.SingleTreeTrigger.superclass.populate.apply(this,arguments),this.trigger.populate(a)}}),BI.shortcut("bi.single_tree_trigger",BI.SingleTreeTrigger),BI.SwitchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SwitchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-switch-tree",items:[]})},_init:function(){BI.SwitchTree.superclass._init.apply(this,arguments);this.options;this.tab=BI.createWidget({type:"bi.tab",element:this,tab:null,showIndex:BI.SwitchTree.SelectType.SingleSelect,cardCreator:BI.bind(this._createTree,this)})},_createTree:function(a){var b=this,c=this.options;switch(a){case BI.SwitchTree.SelectType.SingleSelect:return this.levelTree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:!0,items:BI.deepClone(c.items),value:c.value}),this.levelTree.on(BI.LevelTree.EVENT_CHANGE,function(){b.fireEvent(BI.SwitchTree.EVENT_CHANGE,arguments)}),this.levelTree;case BI.SwitchTree.SelectType.MultiSelect:return this.tree=BI.createWidget({type:"bi.simple_tree",items:this._removeIsParent(BI.deepClone(c.items)),value:c.value}),this.tree.on(BI.SimpleTreeView.EVENT_CHANGE,function(){b.fireEvent(BI.SwitchTree.EVENT_CHANGE,arguments)}),this.tree}},_removeIsParent:function(a){return BI.each(a,function(a,b){BI.isNotNull(b.isParent)&&delete b.isParent}),a},switchSelect:function(){switch(this.getSelect()){case BI.SwitchTree.SelectType.SingleSelect:this.setSelect(BI.SwitchTree.SelectType.MultiSelect);break;case BI.SwitchTree.SelectType.MultiSelect:this.setSelect(BI.SwitchTree.SelectType.SingleSelect)}},setSelect:function(a){this.tab.setSelect(a)},getSelect:function(){return this.tab.getSelect()},setValue:function(a){switch(this.storeValue=a,this.getSelect()){case BI.SwitchTree.SelectType.SingleSelect:this.levelTree.setValue(a);break;case BI.SwitchTree.SelectType.MultiSelect:this.tree.setValue(a)}},getValue:function(){return this.tab.getValue()},populate:function(a){this.options.items=a,BI.isNotNull(this.levelTree)&&this.levelTree.populate(BI.deepClone(a)),BI.isNotNull(this.tree)&&this.tree.populate(this._removeIsParent(BI.deepClone(a)))}}),BI.SwitchTree.EVENT_CHANGE="SwitchTree.EVENT_CHANGE",BI.SwitchTree.SelectType={SingleSelect:BI.Selection.Single,MultiSelect:BI.Selection.Multi},BI.shortcut("bi.switch_tree",BI.SwitchTree),BI.DateInterval=BI.inherit(BI.Single,{constants:{height:25,width:25,lgap:15,offset:-15,timeErrorCls:"time-error",DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){var a=BI.DateInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-date-interval"})},_init:function(){var a=this,b=this.options;BI.DateInterval.superclass._init.apply(this,arguments),b.value=b.value||{},this.left=this._createCombo(b.value.start),this.right=this._createCombo(b.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:this.constants.height,items:[{type:"bi.absolute",items:[{el:a.left,left:this.constants.offset,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[a.label]})},_createCombo:function(a){var b=this,c=BI.createWidget({type:"bi.dynamic_date_combo",value:a});return c.on(BI.DynamicDateCombo.EVENT_ERROR,function(){b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.DateInterval.EVENT_ERROR)}),c.on(BI.DynamicDateCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.DateInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicDateCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.DateInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW,function(){b.left.hidePopupView(),b.right.hidePopupView()}),c.on(BI.DynamicDateCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),b.fireEvent(BI.DateInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.DateInterval.EVENT_CHANGE))}),c},_dateCheck:function(a){return BI.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")===a||BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")===a||BI.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")===a||BI.parseDateTime(a,"%Y-%X-%e").print("%Y-%X-%e")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.constants.DATE_MIN_VALUE,this.constants.DATE_MAX_VALUE)[0]},_check:function(a,b){var c=a.match(/\d+/g),d=b.match(/\d+/g);return this._dateCheck(a)&&BI.checkDateLegal(a)&&this._checkVoid({year:c[0],month:c[1],day:c[2]})&&this._dateCheck(b)&&BI.checkDateLegal(b)&&this._checkVoid({year:d[0],month:d[1],day:d[2]})},_compare:function(a,b){return a=BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d"),b=BI.parseDateTime(b,"%Y-%X-%d").print("%Y-%X-%d"),BI.isNotNull(a)&&BI.isNotNull(b)&&a>b},_setTitle:function(a){this.left.setTitle(a),this.right.setTitle(a),this.label.setTitle(a)},_clearTitle:function(){this.left.setTitle(""),this.right.setTitle(""),this.label.setTitle("")},setValue:function(a){a=a||{},this.left.setValue(a.start),this.right.setValue(a.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.DateInterval.EVENT_VALID="EVENT_VALID",BI.DateInterval.EVENT_ERROR="EVENT_ERROR",BI.DateInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.date_interval",BI.DateInterval),BI.TimeInterval=BI.inherit(BI.Single,{constants:{height:25,width:25,lgap:15,offset:-15,timeErrorCls:"time-error",DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){var a=BI.TimeInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-time-interval"})},_init:function(){var a=this,b=this.options;BI.TimeInterval.superclass._init.apply(this,arguments),b.value=b.value||{},this.left=this._createCombo(b.value.start),this.right=this._createCombo(b.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:this.constants.height,items:[{type:"bi.absolute",items:[{el:a.left,left:this.constants.offset,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[a.label]})},_createCombo:function(a){var b=this,c=BI.createWidget({type:"bi.dynamic_date_time_combo",value:a});return c.on(BI.DynamicDateTimeCombo.EVENT_ERROR,function(){b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.TimeInterval.EVENT_ERROR)}),c.on(BI.DynamicDateTimeCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.TimeInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicDateTimeCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.TimeInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW,function(){b.left.hidePopupView(),b.right.hidePopupView()}),c.on(BI.DynamicDateTimeCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),b.fireEvent(BI.TimeInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.TimeInterval.EVENT_CHANGE))}),c},_dateCheck:function(a){return BI.parseDateTime(a,"%Y-%x-%d %H:%M:%S").print("%Y-%x-%d %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%X-%d %H:%M:%S").print("%Y-%X-%d %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%x-%e %H:%M:%S").print("%Y-%x-%e %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%X-%e %H:%M:%S").print("%Y-%X-%e %H:%M:%S")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.constants.DATE_MIN_VALUE,this.constants.DATE_MAX_VALUE)[0]},_check:function(a,b){var c=a.match(/\d+/g),d=b.match(/\d+/g);return this._dateCheck(a)&&BI.checkDateLegal(a)&&this._checkVoid({year:c[0],month:c[1],day:c[2]})&&this._dateCheck(b)&&BI.checkDateLegal(b)&&this._checkVoid({year:d[0],month:d[1],day:d[2]})},_compare:function(a,b){return a=BI.parseDateTime(a,"%Y-%X-%d %H:%M:%S").print("%Y-%X-%d %H:%M:%S"),b=BI.parseDateTime(b,"%Y-%X-%d %H:%M:%S").print("%Y-%X-%d %H:%M:%S"),BI.isNotNull(a)&&BI.isNotNull(b)&&a>b},_setTitle:function(a){this.left.setTitle(a),this.right.setTitle(a),this.label.setTitle(a)},_clearTitle:function(){this.left.setTitle(""),this.right.setTitle(""),this.label.setTitle("")},setValue:function(a){a=a||{},this.left.setValue(a.start),this.right.setValue(a.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.TimeInterval.EVENT_VALID="EVENT_VALID",BI.TimeInterval.EVENT_ERROR="EVENT_ERROR",BI.TimeInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.time_interval",BI.TimeInterval),BI.DynamicYearCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-card"},render:function(){var a=this;return{type:"bi.vertical",items:[{type:"bi.label",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),textAlign:"left",height:24},{type:"bi.dynamic_date_param_item",ref:function(){a.item=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]}],vgap:10,hgap:10}},_createValue:function(a,b){return{dateType:a,value:Math.abs(b),offset:b>0?1:0}},setValue:function(a){a=a||{year:0},this.item.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR,a.year))},getValue:function(){var a=this.item.getValue();return{year:0===a.offset?-a.value:a.value}}}),BI.DynamicYearCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_card",BI.DynamicYearCard),BI.StaticYearCard=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.StaticYearCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-card",behaviors:{},min:"1900-01-01",max:"2099-12-31"})},_createYearCalendar:function(a){var b=this.options,c=this._year,d=BI.createWidget({type:"bi.year_calendar",behaviors:b.behaviors,min:b.min,max:b.max,logic:{dynamic:!0},year:c+12*a});return d.setValue(this._year),d},_init:function(){BI.StaticYearCard.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedYear=this._year=BI.getDate().getFullYear(),this.backBtn=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:25,height:25,value:-1,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.navigation.setSelect(a.navigation.getSelect()-1),a._checkLeftValid(),a._checkRightValid()}}]}),this.preBtn=BI.createWidget({type:"bi.icon_button",cls:"next-page-h-font",width:25,height:25,value:1,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.navigation.setSelect(a.navigation.getSelect()+1),a._checkLeftValid(),a._checkRightValid()}}]}),this.navigation=BI.createWidget({type:"bi.navigation",direction:"top",element:this,single:!0,logic:{dynamic:!0},tab:{type:"bi.htape",cls:"bi-border-top bi-border-bottom",height:30,items:[{el:{type:"bi.center_adapt",items:[a.backBtn]},width:25},{type:"bi.layout"},{el:{type:"bi.center_adapt",items:[a.preBtn]},width:25}]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(a.selectedYear);var b=this.getSelectedCard();a.backBtn.setEnable(!b.isFrontYear()),a.preBtn.setEnable(!b.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedYear=this.getValue(),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.StaticYearCard.EVENT_CHANGE,a.selectedYear)}),BI.isKey(b.value)&&this.setValue(b.value)},_checkLeftValid:function(){var a=(this.options,!0);return this.backBtn.setEnable(a),a},_checkRightValid:function(){var a=(this.options,!0);return this.preBtn.setEnable(a),a},getValue:function(){return{year:this.selectedYear}},setValue:function(a){var b=this.options;a=a||{};var c=a.year;BI.checkDateVoid(c,1,1,b.min,b.max)[0]?(c=BI.getDate().getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(c)),this.navigation.setValue("")):(this.selectedYear=BI.parseInt(c),this.navigation.setSelect(BI.YearCalendar.getPageByYear(c)),this.navigation.setValue(this.selectedYear)),this._checkLeftValid(),this._checkRightValid()}}),BI.StaticYearCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.static_year_card",BI.StaticYearCard),BI.DynamicYearCombo=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-combo bi-border",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicYearCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value,this.trigger=BI.createWidget({type:"bi.dynamic_year_trigger",min:b.min,max:b.max,value:b.value||""}),this.trigger.on(BI.DynamicYearTrigger.EVENT_FOCUS,function(){a.storeTriggerValue=this.getKey()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_STOP,function(){a.combo.showView()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_ERROR,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeTriggerValue?(a.storeValue=a.trigger.getValue(),a.setValue(a.storeValue)):this.getKey()||(a.storeValue=null,a.setValue()),a.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM))}),this.combo=BI.createWidget({type:"bi.combo",isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.dynamic_year_popup",ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicYearPopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({year:b.getFullYear()}),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}],behaviors:b.behaviors,min:b.min,max:b.max},value:b.value||""}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicYearCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.htape",element:this,ref:function(){a.comboWrapper=this},items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24,ref:function(){a.changeIcon=this}},width:24},this.combo]}),this._checkDynamicValue(b.value)},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.DynamicYearCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue}}),BI.DynamicYearCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_year_combo",BI.DynamicYearCombo),BI.extend(BI.DynamicYearCombo,{Static:1,Dynamic:2}),BI.DynamicYearPopup=BI.inherit(BI.Widget,{constants:{tabHeight:30},props:{baseCls:"bi-year-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31",width:180,height:240},render:function(){var a=this;this.options;return this.storeValue={type:BI.DynamicYearCombo.Static},{type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-left bi-border-right bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Current_Year"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Basic_Current_Year")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=a.print("%Y"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-border-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Basic_Year_Fen"),value:BI.DynamicYearCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicYearCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(c){switch(c){case BI.DynamicYearCombo.Dynamic:return{type:"bi.dynamic_year_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicYearCombo.Static:default:return{type:"bi.static_year_card",behaviors:b.behaviors,min:a.options.min,max:a.options.max,listeners:[{eventName:BI.StaticYearCard.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearPopup.EVENT_CHANGE)}}],ref:function(){a.year=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicYearCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.year.setValue({year:c.getFullYear()}),a._setInnerValue();break;case BI.DynamicYearCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicYearCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:this.year.setValue(c),this.textButton.setValue(BI.i18nText("BI-Basic_Current_Year")),this.textButton.setEnable(!0)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicYearPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_popup",BI.DynamicYearPopup), -BI.DynamicYearTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,errorText:BI.i18nText("BI-Please_Input_Positive_Integer"),errorTextInvalid:BI.i18nText("BI-Year_Trigger_Invalid_Text")},_defaultConfig:function(){return BI.extend(BI.DynamicYearTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-year-trigger",min:"1900-01-01",max:"2099-12-31",height:24})},_init:function(){BI.DynamicYearTrigger.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)&&!BI.checkDateVoid(a,1,1,b.min,b.max)[0]},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,errorText:function(a){return BI.isPositiveInteger(a)?c.errorTextInvalid:c.errorText}}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.DynamicYearTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DynamicYearTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&a.editor.setValue(b),BI.isNotEmptyString(b)&&(a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:b}}),a.fireEvent(BI.DynamicYearTrigger.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.DynamicYearTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DynamicYearTrigger.EVENT_ERROR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-year-text",text:BI.i18nText("BI-Multi_Date_Year"),width:b.height},width:b.height},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]}),this.setValue(b.value)},_getText:function(a){var b="";return BI.isNotNull(a.year)&&0!==a.year&&(b+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),b},_setInnerValue:function(a,b){var c=a.print("%Y");this.editor.setState(c),this.editor.setValue(c),this.setTitle(BI.isEmptyString(b)?c:b+":"+c)},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:c=c||{},this.editor.setState(c.year),this.editor.setValue(c.year),this.editor.setTitle(c.year)}},getValue:function(){return this.storeValue},getKey:function(){return 0|this.editor.getValue()}}),BI.DynamicYearTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearTrigger.EVENT_START="EVENT_START",BI.DynamicYearTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearTrigger.EVENT_STOP="EVENT_STOP",BI.shortcut("bi.dynamic_year_trigger",BI.DynamicYearTrigger),BI.DynamicYearMonthCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-month-card"},render:function(){var a=this;return{type:"bi.vertical",items:[{type:"bi.label",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),textAlign:"left",height:24},{type:"bi.dynamic_date_param_item",ref:function(){a.year=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]},{type:"bi.dynamic_date_param_item",dateType:BI.DynamicDateCard.TYPE.MONTH,ref:function(){a.month=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]}],vgap:10,hgap:10}},_createValue:function(a,b){return{dateType:a,value:Math.abs(b),offset:b>0?1:0}},setValue:function(a){a=a||{year:0,month:0},this.year.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR,a.year)),this.month.setValue(this._createValue(BI.DynamicDateCard.TYPE.MONTH,a.month))},getValue:function(){var a=this.year.getValue(),b=this.month.getValue();return{year:0===a.offset?-a.value:a.value,month:0===b.offset?-b.value:b.value}}}),BI.DynamicYearMonthCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_month_card",BI.DynamicYearMonthCard),BI.StaticYearMonthCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-static-year-month-card",behaviors:{}},_createMonths:function(){var a=[1,7,2,8,3,9,4,10,5,11,6,12],b=[];return b.push(a.slice(0,2)),b.push(a.slice(2,4)),b.push(a.slice(4,6)),b.push(a.slice(6,8)),b.push(a.slice(8,10)),b.push(a.slice(10,12)),BI.map(b,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}})})},render:function(){var a=this,b=this.options;return{type:"bi.vertical",items:[{type:"bi.year_picker",ref:function(){a.yearPicker=this},height:30,listeners:[{eventName:BI.YearPicker.EVENT_CHANGE,action:function(){var b=this.getValue();a.setValue({year:b,month:a.selectedMonth})}}]},{type:"bi.button_group",behaviors:b.behaviors,ref:function(){a.month=this},items:this._createMonths(),layouts:[BI.LogicFactory.createLogic("table",BI.extend({dynamic:!0},{columns:2,rows:6,columnSize:[.5,.5],rowSize:25})),{type:"bi.center_adapt",vgap:1,hgap:2}],value:b.value,listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(){a.selectedYear=a.yearPicker.getValue(),a.selectedMonth=this.getValue()[0],a.fireEvent(BI.StaticYearMonthCard.EVENT_CHANGE)}}]}]}},getValue:function(){return{year:this.selectedYear,month:this.selectedMonth}},setValue:function(a){var b=this.options;if(a=a||{},a.year=a.year||0,a.month=a.month||0,BI.checkDateVoid(a.year,a.month,1,b.min,b.max)[0]){var c=BI.getDate().getFullYear(),d=BI.getDate().getMonth();this.selectedYear="",this.selectedMonth="",this.yearPicker.setValue(c),this.month.setValue(d)}else this.selectedYear=BI.parseInt(a.year),this.selectedMonth=BI.parseInt(a.month),this.yearPicker.setValue(this.selectedYear),this.month.setValue(this.selectedMonth)}}),BI.StaticYearMonthCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.static_year_month_card",BI.StaticYearMonthCard),BI.DynamicYearMonthCombo=BI.inherit(BI.Single,{props:{baseCls:"bi-year-month-combo bi-border",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicYearMonthCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value,this.trigger=BI.createWidget({type:"bi.dynamic_year_month_trigger",min:b.min,max:b.max,value:b.value||""}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_STOP,function(){a.combo.showView()}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_ERROR,function(){a.combo.isViewVisible()&&a.combo.hideView(),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_ERROR)}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_VALID,function(){a.fireEvent(BI.DynamicYearMonthCombo.EVENT_VALID)}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(a.storeValue=a.trigger.getValue(),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM))}),this.trigger.on(BI.DynamicYearMonthCombo.EVENT_FOCUS,function(){a.fireEvent(BI.DynamicYearMonthCombo.EVENT_FOCUS)}),this.combo=BI.createWidget({type:"bi.combo",isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.dynamic_year_month_popup",ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicYearMonthPopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({year:b.getFullYear()}),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}],behaviors:b.behaviors,min:b.min,max:b.max},value:b.value||""}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.htape",element:this,ref:function(){a.comboWrapper=this},items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24,ref:function(){a.changeIcon=this}},width:24},this.combo]}),this._checkDynamicValue(b.value)},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.DynamicYearMonthCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},hideView:function(){this.combo.hideView()},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()}}),BI.DynamicYearMonthCombo.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearMonthCombo.EVENT_VALID="EVENT_VALID",BI.DynamicYearMonthCombo.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearMonthCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_year_month_combo",BI.DynamicYearMonthCombo),BI.extend(BI.DynamicYearMonthCombo,{Static:1,Dynamic:2}),BI.DynamicYearMonthPopup=BI.inherit(BI.Widget,{constants:{tabHeight:30},props:{baseCls:"bi-year-month-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31",width:180,height:240},render:function(){var a=this;this.options;return this.storeValue={type:BI.DynamicYearMonthCombo.Static},{type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-left bi-border-right bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Current_Month"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Basic_Current_Month")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=a.print("%Y-%x"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-border-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Basic_Year_Fen"),value:BI.DynamicYearCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicYearCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(c){switch(c){case BI.DynamicYearCombo.Dynamic:return{type:"bi.dynamic_year_month_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicYearCombo.Static:default:return{type:"bi.static_year_month_card",behaviors:b.behaviors,min:a.options.min,max:a.options.max,listeners:[{eventName:BI.StaticYearMonthCard.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearMonthPopup.EVENT_CHANGE)}}],ref:function(){a.year=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicYearCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.year.setValue({year:c.getFullYear(),month:c.getMonth()}),a._setInnerValue();break;case BI.DynamicYearCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicYearCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:this.year.setValue(c),this.textButton.setValue(BI.i18nText("BI-Basic_Current_Month")),this.textButton.setEnable(!0)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicYearMonthPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_month_popup",BI.DynamicYearMonthPopup),BI.DynamicYearMonthTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,errorText:BI.i18nText("BI-Please_Input_Positive_Integer"),errorTextInvalid:BI.i18nText("BI-Year_Trigger_Invalid_Text")},props:{extraCls:"bi-year-month-trigger",min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicYearMonthTrigger.superclass._init.apply(this,arguments);var a=this.options;this.yearEditor=this._createEditor(!0),this.monthEditor=this._createEditor(!1),BI.createWidget({element:this,type:"bi.htape",items:[{type:"bi.center",items:[{type:"bi.htape",items:[this.yearEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Year"),width:a.height},width:a.height}]},{type:"bi.htape",items:[this.monthEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Month"),width:a.height},width:a.height}]}]},{el:{type:"bi.trigger_icon_button",width:a.height},width:a.height}]}),this.setValue(a.value)},_createEditor:function(a){var b=this,c=this.options,d=this._const,e=BI.createWidget({type:"bi.sign_editor",height:c.height,validationChecker:function(b){return a?""===b||BI.isPositiveInteger(b)&&!BI.checkDateVoid(b,1,1,c.min,c.max)[0]:""===b||b>=1&&b<=12&&!BI.checkDateVoid(BI.getDate().getFullYear(),b,1,c.min,c.max)[0]},quitChecker:function(){return!1},watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(a){return BI.isPositiveInteger(a)?d.errorTextInvalid:d.errorText},hgap:d.hgap,vgap:d.vgap,allowBlank:!0});return e.on(BI.SignEditor.EVENT_FOCUS,function(){b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_FOCUS)}),e.on(BI.SignEditor.EVENT_STOP,function(){b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_STOP)}),e.on(BI.SignEditor.EVENT_CONFIRM,function(){var a=e.getValue();if(BI.isNotNull(a)&&e.setValue(a),BI.isNotEmptyString(a)){var c=b.monthEditor.getValue();b.storeValue={type:BI.DynamicDateCombo.Static,value:{year:b.yearEditor.getValue(),month:BI.isEmptyString(b.monthEditor.getValue())?"":c-1}}}b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM)}),e.on(BI.SignEditor.EVENT_SPACE,function(){e.isValid()&&e.blur()}),e.on(BI.SignEditor.EVENT_START,function(){b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_START)}),e.on(BI.SignEditor.EVENT_ERROR,function(){b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_ERROR)}),e.on(BI.SignEditor.EVENT_VALID,function(){var a=b.yearEditor.getValue(),d=b.monthEditor.getValue();BI.isNotEmptyString(a)&&BI.isNotEmptyString(d)&&BI.isPositiveInteger(a)&&d>=1&&d<=12&&!BI.checkDateVoid(a,d,1,c.min,c.max)[0]&&b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_VALID)}),e.on(BI.SignEditor.EVENT_CHANGE,function(){a&&b._autoSwitch(e.getValue())}),e},_yearCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d");return BI.parseDateTime(a,"%Y").print("%Y")===a&&b>=this.options.min&&b<=this.options.max},_autoSwitch:function(a){BI.checkDateLegal(a)&&4===a.length&&this._yearCheck(a)&&this.monthEditor.focus()},_getText:function(a){var b="";return BI.isNotNull(a.year)&&(b+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),BI.isNotNull(a.month)&&0!==a.month&&(b+=Math.abs(a.month)+BI.i18nText("BI-Basic_Year")+(a.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),b},_setInnerValue:function(a,b){var c=a.print("%Y-%x");this.yearEditor.setValue(a.getFullYear()),this.monthEditor.setValue(a.getMonth()+1),this.setTitle(BI.isEmptyString(b)?c:b+":"+c)},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:c=c||{};var f=BI.isNull(c.month)?null:c.month;this.yearEditor.setValue(c.year),this.yearEditor.setTitle(c.year),this.monthEditor.setValue(f),this.monthEditor.setTitle(f)}},getValue:function(){return this.storeValue},getKey:function(){return this.yearEditor.getValue()+"-"+this.monthEditor.getValue()}}),BI.DynamicYearMonthTrigger.EVENT_VALID="EVENT_FOCUS",BI.DynamicYearMonthTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearMonthTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearMonthTrigger.EVENT_START="EVENT_START",BI.DynamicYearMonthTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearMonthTrigger.EVENT_STOP="EVENT_STOP",BI.shortcut("bi.dynamic_year_month_trigger",BI.DynamicYearMonthTrigger),BI.YearMonthInterval=BI.inherit(BI.Single,{constants:{height:25,width:25,lgap:15,offset:-15,timeErrorCls:"time-error",DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},props:{extraCls:"bi-year-month-interval"},_init:function(){var a=this,b=this.options;BI.YearMonthInterval.superclass._init.apply(this,arguments),b.value=b.value||{},this.left=this._createCombo(b.value.start),this.right=this._createCombo(b.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:this.constants.height,items:[{type:"bi.absolute",items:[{el:a.left,left:this.constants.offset,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[a.label]})},_createCombo:function(a){var b=this,c=BI.createWidget({type:"bi.dynamic_year_month_combo",value:a});return c.on(BI.DynamicYearMonthCombo.EVENT_ERROR,function(){b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.YearMonthInterval.EVENT_ERROR)}),c.on(BI.DynamicYearMonthCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.YearMonthInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicYearMonthCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.YearMonthInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW,function(){b.left.hideView(),b.right.hideView()}),c.on(BI.DynamicYearMonthCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),b.fireEvent(BI.YearMonthInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.YearMonthInterval.EVENT_CHANGE))}),c},_dateCheck:function(a){return BI.parseDateTime(a,"%Y-%x").print("%Y-%x")===a||BI.parseDateTime(a,"%Y-%X").print("%Y-%X")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,1,this.constants.DATE_MIN_VALUE,this.constants.DATE_MAX_VALUE)[0]},_check:function(a,b){var c=a.match(/\d+/g),d=b.match(/\d+/g);return this._dateCheck(a)&&BI.checkDateLegal(a)&&this._checkVoid({year:c[0],month:c[1],day:1})&&this._dateCheck(b)&&BI.checkDateLegal(b)&&this._checkVoid({year:d[0],month:d[1],day:1})},_compare:function(a,b){return a=BI.parseDateTime(a,"%Y-%X").print("%Y-%X"),b=BI.parseDateTime(b,"%Y-%X").print("%Y-%X"),BI.isNotNull(a)&&BI.isNotNull(b)&&a>b},_setTitle:function(a){this.left.setTitle(a),this.right.setTitle(a),this.label.setTitle(a)},_clearTitle:function(){this.left.setTitle(""),this.right.setTitle(""),this.label.setTitle("")},setValue:function(a){a=a||{},this.left.setValue(a.start),this.right.setValue(a.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.YearMonthInterval.EVENT_VALID="EVENT_VALID",BI.YearMonthInterval.EVENT_ERROR="EVENT_ERROR",BI.YearMonthInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_month_interval",BI.YearMonthInterval),BI.DynamicYearQuarterCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-month-card"},render:function(){var a=this;return{type:"bi.vertical",items:[{type:"bi.label",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),textAlign:"left",height:24},{type:"bi.dynamic_date_param_item",ref:function(){a.year=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]},{type:"bi.dynamic_date_param_item",dateType:BI.DynamicDateCard.TYPE.QUARTER,ref:function(){a.quarter=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]}],vgap:10,hgap:10}},_createValue:function(a,b){return{dateType:a,value:Math.abs(b),offset:b>0?1:0}},setValue:function(a){a=a||{year:0,month:0},this.year.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR,a.year)),this.quarter.setValue(this._createValue(BI.DynamicDateCard.TYPE.QUARTER,a.quarter))},getValue:function(){var a=this.year.getValue(),b=this.quarter.getValue();return{year:0===a.offset?-a.value:a.value,quarter:0===b.offset?-b.value:b.value}}}),BI.DynamicYearQuarterCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_quarter_card",BI.DynamicYearQuarterCard),BI.StaticYearQuarterCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-static-year-quarter-card",behaviors:{}},_createQuarter:function(){var a=[{text:Date._QN[1],value:1},{text:Date._QN[2],value:2},{text:Date._QN[3],value:3},{text:Date._QN[4],value:4}];return BI.map(a,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"center",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:24})})},render:function(){var a=this,b=this.options;return{type:"bi.vertical",items:[{type:"bi.year_picker",ref:function(){a.yearPicker=this},height:30,listeners:[{eventName:BI.YearPicker.EVENT_CHANGE,action:function(){var b=this.getValue();a.setValue({year:b,quarter:a.selectedQuarter})}}]},{type:"bi.button_group",behaviors:b.behaviors,ref:function(){a.quarter=this},items:this._createQuarter(),layouts:[{type:"bi.vertical",vgap:10}],value:b.value,listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(){a.selectedYear=a.yearPicker.getValue(),a.selectedQuarter=this.getValue()[0],a.fireEvent(BI.StaticYearQuarterCard.EVENT_CHANGE)}}]}]}},getValue:function(){return{year:this.selectedYear,quarter:this.selectedQuarter}},setValue:function(a){var b=this.options;if(a=a||{},a.year=a.year||0,a.quarter=a.quarter||0,BI.checkDateVoid(a.year,a.quarter,1,b.min,b.max)[0]){var c=BI.getDate().getFullYear(),d=BI.getDate().getQuarter();this.selectedYear="",this.selectedQuarter="",this.yearPicker.setValue(c),this.quarter.setValue(d)}else this.selectedYear=BI.parseInt(a.year),this.selectedQuarter=BI.parseInt(a.quarter),this.yearPicker.setValue(this.selectedYear),this.quarter.setValue(this.selectedQuarter)}}),BI.StaticYearQuarterCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.static_year_quarter_card",BI.StaticYearQuarterCard),BI.DynamicYearQuarterCombo=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-quarter-combo bi-border",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicYearQuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value,this.trigger=BI.createWidget({type:"bi.dynamic_year_quarter_trigger",min:b.min,max:b.max,value:b.value||""}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_STOP,function(){a.combo.showView()}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_ERROR,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(a.storeValue=a.trigger.getValue(),a.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM))}),this.combo=BI.createWidget({type:"bi.combo",isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.dynamic_year_quarter_popup",ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicYearQuarterPopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({year:b.getFullYear()}),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}],behaviors:b.behaviors,min:b.min,max:b.max},value:b.value||""}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicYearQuarterCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.htape",element:this,ref:function(){a.comboWrapper=this},items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24,ref:function(){a.changeIcon=this}},width:24},this.combo]}),this._checkDynamicValue(b.value)},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.DynamicYearQuarterCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue}}),BI.DynamicYearQuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearQuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_year_quarter_combo",BI.DynamicYearQuarterCombo),BI.extend(BI.DynamicYearQuarterCombo,{Static:1,Dynamic:2}),BI.DynamicYearQuarterPopup=BI.inherit(BI.Widget,{constants:{tabHeight:30},props:{baseCls:"bi-year-quarter-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31",width:180,height:240},render:function(){var a=this;this.options;return this.storeValue={type:BI.DynamicYearQuarterCombo.Static},{type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-left bi-border-right bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Current_Quarter"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicYearQuarterCombo.Static)this.textButton.setValue(BI.i18nText("BI-Basic_Current_Quarter")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=a.print("%Y-%x"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-border-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Basic_Year_Fen"),value:BI.DynamicYearQuarterCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicYearQuarterCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(c){switch(c){case BI.DynamicYearQuarterCombo.Dynamic:return{type:"bi.dynamic_year_quarter_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicYearQuarterCombo.Static:default:return{type:"bi.static_year_quarter_card",behaviors:b.behaviors,min:a.options.min,max:a.options.max,listeners:[{eventName:BI.DynamicYearCard.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearQuarterPopup.EVENT_CHANGE)}}],ref:function(){a.year=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicYearQuarterCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.year.setValue({year:c.getFullYear(),quarter:c.getQuarter()}),a._setInnerValue();break;case BI.DynamicYearQuarterCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicYearQuarterCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:this.year.setValue(c),this.textButton.setValue(BI.i18nText("BI-Basic_Current_Quarter")),this.textButton.setEnable(!0)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicYearQuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_quarter_popup",BI.DynamicYearQuarterPopup),BI.DynamicYearQuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,errorText:BI.i18nText("BI-Please_Input_Positive_Integer"),errorTextInvalid:BI.i18nText("BI-Year_Trigger_Invalid_Text")},props:{extraCls:"bi-year-quarter-trigger",min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicYearQuarterTrigger.superclass._init.apply(this,arguments);var a=this.options;this.yearEditor=this._createEditor(!0),this.quarterEditor=this._createEditor(!1),BI.createWidget({ -element:this,type:"bi.htape",items:[{type:"bi.center",items:[{type:"bi.htape",items:[this.yearEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Year"),width:a.height},width:a.height}]},{type:"bi.htape",items:[this.quarterEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Quarter"),width:a.height},width:a.height}]}]},{el:{type:"bi.trigger_icon_button",width:a.height},width:a.height}]}),this.setValue(a.value)},_createEditor:function(a){var b=this,c=this.options,d=this._const,e=BI.createWidget({type:"bi.sign_editor",height:c.height,validationChecker:function(b){return a?""===b||BI.isPositiveInteger(b)&&!BI.checkDateVoid(b,1,1,c.min,c.max)[0]:""===b||b>=1&&b<=4&&!BI.checkDateVoid(BI.getDate().getFullYear(),b,1,c.min,c.max)[0]},quitChecker:function(){return!1},errorText:function(a){return BI.isPositiveInteger(a)?d.errorTextInvalid:d.errorText},watermark:BI.i18nText("BI-Basic_Unrestricted"),hgap:d.hgap,vgap:d.vgap,allowBlank:!0});return e.on(BI.SignEditor.EVENT_FOCUS,function(){b.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_FOCUS)}),e.on(BI.SignEditor.EVENT_STOP,function(){b.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_STOP)}),e.on(BI.SignEditor.EVENT_CONFIRM,function(){var a=e.getValue();if(BI.isNotNull(a)&&e.setValue(a),BI.isNotEmptyString(a)){var c=b.quarterEditor.getValue();b.storeValue={type:BI.DynamicYearQuarterCombo.Static,value:{year:b.yearEditor.getValue(),quarter:BI.isEmptyString(b.quarterEditor.getValue())?"":c}}}b.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM)}),e.on(BI.SignEditor.EVENT_SPACE,function(){e.isValid()&&e.blur()}),e.on(BI.SignEditor.EVENT_START,function(){b.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_START)}),e.on(BI.SignEditor.EVENT_ERROR,function(){b.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_ERROR)}),e.on(BI.SignEditor.EVENT_CHANGE,function(){a&&b._autoSwitch(e.getValue())}),e},_yearCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d");return BI.parseDateTime(a,"%Y").print("%Y")===a&&b>=this.options.min&&b<=this.options.max},_autoSwitch:function(a){BI.checkDateLegal(a)&&4===a.length&&this._yearCheck(a)&&this.quarterEditor.focus()},_getText:function(a){var b="";return BI.isNotNull(a.year)&&(b+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),BI.isNotNull(a.quarter)&&0!==a.quarter&&(b+=Math.abs(a.quarter)+BI.i18nText("BI-Basic_Year")+(a.quarter<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),b},_setInnerValue:function(a,b){var c=a.print("%Y-%x");this.yearEditor.setValue(a.getFullYear()),this.quarterEditor.setValue(a.getQuarter()),this.setTitle(BI.isEmptyString(b)?c:b+":"+c)},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicYearQuarterCombo.Static,c=a.value||a),b){case BI.DynamicYearQuarterCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicYearQuarterCombo.Static:default:c=c||{};var f=BI.isNull(c.quarter)?null:c.quarter;this.yearEditor.setValue(c.year),this.yearEditor.setTitle(c.year),this.quarterEditor.setValue(f),this.quarterEditor.setTitle(f)}},getValue:function(){return this.storeValue}}),BI.DynamicYearQuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearQuarterTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearQuarterTrigger.EVENT_START="EVENT_START",BI.DynamicYearQuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearQuarterTrigger.EVENT_STOP="EVENT_STOP",BI.shortcut("bi.dynamic_year_quarter_trigger",BI.DynamicYearQuarterTrigger),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.match.concat(d.find)}),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,value:{type:BI.Selection.Multi,value:b.value||[]}}),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(BI.AllValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-all-value-chooser-pane",width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.AllValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&(this.items=b.items),this.list=BI.createWidget({type:"bi.multi_select_list",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:b.width,height:b.height}),this.list.on(BI.MultiSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.AllValueChooserPane.EVENT_CHANGE)})},setValue:function(a){this.list.setValue({type:BI.Selection.Multi,value:a||[]})},getValue:function(){var a=this.list.getValue()||{};return a.type===BI.Selection.All?a.assist:a.value||[]},populate:function(){this.list.populate.apply(this.list,arguments)}}),BI.AllValueChooserPane.EVENT_CHANGE="AllValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.all_value_chooser_pane",BI.AllValueChooserPane),BI.AbstractTreeValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractTreeValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn})},_initData:function(a){this.items=a;var b=BI.Tree.treeFormat(a);this.tree=new BI.Tree,this.tree.initTree(b)},_itemsCreator:function(a,b){function c(){switch(a.type){case BI.TreeView.REQ_TYPE_INIT_DATA:d._reqInitTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_ADJUST_DATA:d._reqAdjustTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_SELECT_DATA:d._reqSelectedTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_GET_SELECTED_DATA:d._reqDisplayTreeNode(a,b);break;default:d._reqTreeNode(a,b)}}var d=this,e=this.options;this.items?c():e.itemsCreator({},function(a){d._initData(a),c()})},_reqDisplayTreeNode:function(a,b){function c(a,b,g){return null==g||BI.isEmpty(g)?void BI.each(b.getChildren(),function(d,g){var h=BI.clone(a);h.push(g.value);var i=f._getChildCount(h);e(g,b.id,i),c(h,g,{})}):void BI.each(g,function(b){var h=f._getTreeNode(a,b),i=BI.clone(a);i.push(h.value),e(h,h.parent&&h.parent.id,d(g[b],i)),c(i,h,g[b])})}function d(a,b){return null==a?0:BI.isEmpty(a)?f._getChildCount(b):BI.size(a)}function e(a,b,c){g.push({id:a.id,pId:b,text:a.text+(c>0?"("+BI.i18nText("BI-Basic_Altogether")+c+BI.i18nText("BI-Basic_Count")+")":""),value:a.value,open:!0})}var f=this,g=[],h=a.selectedValues;return null==h||BI.isEmpty(h)?void b({}):(c([],this.tree.getRoot(),h),void b({items:g}))},_reqSelectedTreeNode:function(a,b){function c(a){var b=m.concat(k);if(g(a,b))if(f(b))i._deleteNode(a,b);else{var c=[],j=e(m,k,[],c);j&&BI.isNotEmptyArray(c)&&BI.each(c,function(b,c){var e=i._getNode(a,c);e?i._deleteNode(a,c):d(a,c,BI.last(c))})}if(h(a,b)){var l=[],j=!1;f(b)?j=!0:(j=e(m,k,l),b=m),j===!0&&(d(a,b,k),l.length>0&&BI.each(l,function(b,c){i._buildTree(a,c)}))}}function d(a,b,c){var d=a,e=[],f=[];BI.some(b,function(g,h){var j=d[h];if(null==j){if(0===g)return!0;if(!BI.isEmpty(d))return!0;var k=b.slice(0,g),l=i._getChildren(k);if(f.push(k),e.push(l.length),g===b.length-1&&1===l.length&&l[0]===c)for(var m=e.length-1;m>=0&&1===e[m];m--)i._deleteNode(a,f[m]);else BI.each(l,function(a,e){return g===b.length-1&&e.value===c||void(d[e.value]={})});d=d[h]}else d=j})}function e(a,b,c,d){var f=BI.clone(a);if(f.push(b),i._isMatch(a,b,l))return d&&d.push(f),!0;var g=i._getChildren(f),h=[],j=!1;return BI.each(g,function(a,b){e(f,b.value,c,d)?j=!0:h.push(b.value)}),j===!0&&BI.each(h,function(a,b){var d=BI.clone(f);d.push(b),c.push(d)}),j}function f(a){for(var b=0,c=a.length;bj._const.perPage)break}return f}function d(a,b,c,i,k){if(j._isMatch(b,c,l)){var m=i||h(b,c);return e(b,c,!1,m,!i&&f(b,c),!0,k),[!0,m]}var n=BI.clone(b);n.push(c);var o=j._getChildren(n),p=!1,m=!1,q=i||g(b,c);return BI.each(o,function(b,c){var e=d(a+1,n,c.value,q,k);e[1]===!0&&(m=!0),e[0]===!0&&(p=!0)}),p===!0&&(m=q||h(b,c)&&m,e(b,c,!0,m,!1,!1,k)),[p,m]}function e(a,b,c,d,e,f,g){var h=j._getTreeNode(a,b);g.push({id:h.id,pId:h.pId,text:h.text,value:h.value,title:h.title,isParent:h.getChildrenLength()>0,open:c,checked:d,halfCheck:e,flag:f})}function f(a,b){var c=i(a);return null==c?null:BI.any(c,function(a,c){if(a===b&&null!=c&&!BI.isEmpty(c))return!0})}function g(a,b){var c=i(a);return null==c?null:BI.any(c,function(a,c){if(a===b&&null!=c&&BI.isEmpty(c))return!0})}function h(a,b){var c=i(a);return null!=c&&BI.any(c,function(a){if(a===b)return!0})}function i(a){var b=m;return null==b?null:(BI.every(a,function(a,c){return b=b[c],null!=b}),b)}var j=this,k=[],l=a.keyword||"",m=a.selectedValues,n=a.lastSearchValue||"",o=c();BI.nextTick(function(){b({hasNext:o.length>j._const.perPage,items:k,lastSearchValue:BI.last(o)})})},_reqTreeNode:function(a,b){function c(a,b){var c={};return BI.each(a,function(a,c){b=b[c]||{}}),BI.each(b,function(a,b){if(BI.isNull(b))return void(c[a]=[0,0]);if(BI.isEmpty(b))return void(c[a]=[2,0]);var d={};BI.each(b,function(a,b){(BI.isNull(b)||BI.isEmpty(b))&&(d[a]=!0)}),c[a]=[1,BI.size(d)]}),c}function d(a,b,c,d){var f=d.checked,g=d.half,h=!1,i=!1;if(BI.has(c,a))if(1===c[a][0]){var j=BI.clone(b);j.push(a);var k=e._getChildCount(j);k>0&&k!==c[a][1]&&(i=!0)}else 2===c[a][0]&&(h=!0);var l;return l=f||i||h?(h||f)&&!g||BI.has(c,a):BI.has(c,a),[l,i]}var e=this,f=[],g=a.times,h=a.checkState||{},i=a.parentValues||[],j=a.selectedValues||{},k={};k=c(i,j);for(var l=this._getChildren(i),m=(g-1)*this._const.perPage;l[m]&&m0,checked:n[0],halfCheck:n[1]})}BI.nextTick(function(){b({items:f,hasNext:l.length>g*e._const.perPage})})},_getNode:function(a,b){for(var c=a,d=0,e=b.length;d0&&BI.isEmpty(e);)c=d[d.length-1],d=d.slice(0,d.length-1),e=this._getNode(a,d),null!=e&&delete e[c]},_buildTree:function(a,b){var c=a;BI.each(b,function(a,b){BI.has(c,b)||(c[b]={}),c=c[b]})},_isMatch:function(a,b,c){var d=this._getTreeNode(a,b),e=BI.Func.getSearchResult([d.text||d.value],c);return e.find.length>0||e.match.length>0},_getTreeNode:function(a,b){var c,d=this,e=0;return this.tree.traverse(function(f){if(!d.tree.isRoot(f))return!(e>a.length)&&(e===a.length&&f.value===b?(c=f,!1):f.value!==a[e]||void e++)}),c},_getChildren:function(a){if(a.length>0)var b=BI.last(a),c=this._getTreeNode(a.slice(0,a.length-1),b);else var c=this.tree.getRoot();return c.getChildren()},_getChildCount:function(a){return this._getChildren(a).length}}),BI.TreeValueChooserCombo=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-combo",width:200,height:30,items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&this._initData(b.items),this.combo=BI.createWidget({type:"bi.multi_tree_combo",element:this,itemsCreator:BI.bind(this._itemsCreator,this),width:b.width,height:b.height}),this.combo.on(BI.MultiTreeCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.TreeValueChooserCombo.EVENT_CONFIRM)})},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.TreeValueChooserCombo.EVENT_CONFIRM="TreeValueChooserCombo.EVENT_CONFIRM",BI.shortcut("bi.tree_value_chooser_combo",BI.TreeValueChooserCombo),BI.TreeValueChooserPane=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-pane",items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.pane=BI.createWidget({type:"bi.multi_select_tree",element:this,itemsCreator:BI.bind(this._itemsCreator,this)}),this.pane.on(BI.MultiSelectTree.EVENT_CHANGE,function(){a.fireEvent(BI.TreeValueChooserPane.EVENT_CHANGE)}),BI.isNotNull(b.items)&&(this._initData(b.items),this.populate())},setSelectedValue:function(a){this.pane.setSelectedValue(a)},setValue:function(a){this.pane.setValue(a)},getValue:function(){return this.pane.getValue()},populate:function(){this.pane.populate.apply(this.pane,arguments)}}),BI.TreeValueChooserPane.EVENT_CHANGE="TreeValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.tree_value_chooser_pane",BI.TreeValueChooserPane),BI.AbstractValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn,cache:!0})},_valueFormatter:function(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},_getItemsByTimes:function(a,b){for(var c=[],d=(b-1)*this._const.perPage;a[d]&&d0&&!b),this.setHalfSelected(c.length>0&&b),this.checked.isHalfSelected()&&(this.selectValue=c)},getAllButtons:function(){return[this]},getAllLeaves:function(){var a=(this.options,[]);return this.tree.traverse(function(b){b.isLeaf()&&a.push(b.get("data").value)}),a},getNotSelectedValue:function(){var a=this,b=(this.options,[]),c=this.checked.isSelected();if(c===!0)return b;var d=this.checked.isHalfSelected();return this.tree.traverse(function(c){if(c.isLeaf()){var e=c.get("data").value;d===!0?BI.contains(a.selectValue,c.get("data").value)||b.push(e):b.push(e)}}),b},getValue:function(){var a=[];return this.checked.isSelected()?(this.tree.traverse(function(b){b.isLeaf()&&a.push(b.get("data").value)}),a):this.checked.isHalfSelected()?this.selectValue:[]}}),BI.FileManagerFolderItem.EVENT_CHANGE="FileManagerFolderItem.EVENT_CHANGE",BI.shortcut("bi.file_manager_folder_item",BI.FileManagerFolderItem),BI.FileManagerList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-list",el:{},items:[]})},_init:function(){BI.FileManagerList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.list=BI.createWidget({type:"bi.select_list",element:this,items:b.items,toolbar:{type:"bi.multi_select_bar",height:40,text:""},el:{type:"bi.list_pane",el:BI.isWidget(b.el)?b.el:BI.extend({type:"bi.file_manager_button_group"},b.el)}}),this.list.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){this.list.setValue({value:a})},getValue:function(){return this.list.getValue()},populate:function(a){this.list.populate(a),this.list.setToolBarVisible(!0)}}),BI.FileManagerList.EVENT_CHANGE="FileManagerList.EVENT_CHANGE",BI.shortcut("bi.file_manager_list",BI.FileManagerList),BI.FileManagerNavButton=BI.inherit(BI.Widget,{_const:{normal_color:"#ffffff",select_color:"#eff1f4"},_defaultConfig:function(){return BI.extend(BI.FileManagerNavButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-nav-button",selected:!1,height:40})},_init:function(){BI.FileManagerNavButton.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.button=BI.createWidget({type:"bi.text_button",cls:"file-manager-nav-button-text bi-card",once:!0,selected:b.selected,text:b.text,title:b.text,value:b.value,height:b.height,lgap:20,rgap:10}),this.button.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var d=BI.createWidget({type:"bi.svg",cls:"file-manager-nav-button-triangle",width:15,height:b.height}),e=d.path("M0,0L15,20L0,40").attr({stroke:c.select_color,fill:b.selected?c.select_color:c.normal_color});this.button.on(BI.TextButton.EVENT_CHANGE,function(){this.isSelected()?e.attr("fill",c.select_color):e.attr("fill",c.normal_color)}),BI.createWidget({type:"bi.default",element:this,items:[this.button]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:d,right:-15,top:0,bottom:0}]})},isSelected:function(){return this.button.isSelected()},setValue:function(a){this.button.setValue(a)},getValue:function(){return this.button.getValue()},populate:function(a){}}),BI.FileManagerNavButton.EVENT_CHANGE="FileManagerNavButton.EVENT_CHANGE",BI.shortcut("bi.file_manager_nav_button",BI.FileManagerNavButton),BI.FileManagerNav=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerNav.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-nav bi-border-left",height:40,items:[]})},_init:function(){BI.FileManagerNav.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=new BI.Tree,this.refreshTreeData(b.items),this.tree.getRoot().set("data",{text:BI.i18nText("BI-Created_By_Me"),value:BI.FileManagerNav.ROOT_CREATE_BY_ME,id:BI.FileManagerNav.ROOT_CREATE_BY_ME}),this.button_group=BI.createWidget({type:"bi.button_group",element:this,items:[{type:"bi.file_manager_nav_button",text:BI.i18nText("BI-Created_By_Me"),selected:!0,id:BI.FileManagerNav.ROOT_CREATE_BY_ME,value:BI.FileManagerNav.ROOT_CREATE_BY_ME}],layouts:[{type:"bi.horizontal"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.FileManagerNav.EVENT_CHANGE,arguments)})},_getAllParents:function(a){var b,c=[];for(b=a?this.tree.search(a):this.tree.getRoot();b.parent;)c.push(b),b=b.parent;return c.push(b),c.reverse()},_formatNodes:function(a){var b=[];return BI.each(a,function(a,c){b.push(BI.extend({type:"bi.file_manager_nav_button",id:c.id},c.get("data")))}),BI.last(b).selected=!0,b},getValue:function(){return this.button_group.getValue()},getId:function(){var a=[];return BI.each(this.button_group.getSelectedButtons(),function(b,c){a.push(c.attr("id"))}),a},refreshTreeData:function(a){this.tree.initTree(BI.Tree.transformToTreeFormat(a)),this.tree.getRoot().set("data",{text:BI.i18nText("BI-Created_By_Me"),value:BI.FileManagerNav.ROOT_CREATE_BY_ME,id:BI.FileManagerNav.ROOT_CREATE_BY_ME})},populate:function(a){var b=BI.isNull(a)?[this.tree.getRoot()]:this._getAllParents(a.id);this.button_group.populate(this._formatNodes(b))}}),BI.extend(BI.FileManagerNav,{ROOT_CREATE_BY_ME:"-1"}),BI.FileManagerNav.EVENT_CHANGE="FileManagerNav.EVENT_CHANGE",BI.shortcut("bi.file_manager_nav",BI.FileManagerNav),BI.AbstractFilterItem=BI.inherit(BI.Widget,{props:{baseCls:"bi-filter-item bi-border-right bi-border-bottom"},isSelectedCondition:function(){return this.emptyItem&&this.emptyItem.isVisible()},setSelectedCondition:function(a){a&&(this.emptyItem||(this.emptyItem=BI.createWidget({type:"bi.absolute",height:40,cls:"filter-item-empty-item bi-border-top",items:[{el:{type:"bi.center_adapt",cls:"empty-filter-item-leaf"}}],hgap:10,vgap:5}),BI.createWidget({type:"bi.vertical",element:this,items:[this.emptyItem],scrolly:!1}))),this.emptyItem&&this.emptyItem.setVisible(a)}}),BI.extend(BI.AbstractFilterItem,{FILTER_OPERATION_FORMULA:1,FILTER_OPERATION_CONDITION:2,FILTER_OPERATION_CONDITION_AND:3,FILTER_OPERATION_CONDITION_OR:4,FILTER_OPERATION_FORMULA_AND:5,FILTER_OPERATION_FORMULA_OR:6}),!function(){var a=BI.inherit(BI.Widget,{props:{baseCls:"bi-filter-expander",el:{},popup:{}},render:function(){var a=this,b=this.options;return{type:"bi.filter_expander",el:b.el,popup:b.popup,id:b.id,value:b.value,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}],ref:function(b){a.expander=b}}},populate:function(){this.expander.populate.apply(this.expander,arguments)},getValue:function(){var a=this.expander.getValue();return{filterType:a.type,filterValue:a.value,id:a.id}}});BI.shortcut("bi.and.or.filter.expander",a)}(),!function(){var a=BI.inherit(BI.AbstractFilterItem,{_constant:{EXPANDER_WIDTH:20},props:{baseCls:"bi-filter-item bi-filter-expander",el:{},popup:{}},render:function(){var a=this,b=this.options,c=b.value,d="";return d=c===BI.Filter.FILTER_TYPE.AND?BI.i18nText("BI-Basic_And"):BI.i18nText("BI-Basic_Or"),{type:"bi.horizontal_adapt",cls:"filter-item-empty-item",verticalAlign:BI.VerticalAlign.Middle,items:[{type:"bi.text_button",cls:"condition-and-or",text:d,value:c,id:b.id,width:this._constant.EXPANDER_WIDTH,height:"100%",ref:function(b){a.expander=b},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,"",a)}}]},BI.extend(b.popup,{ref:function(b){a.conditionsView=b},listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]})]}},getValue:function(){return{type:this.expander.getValue(),value:this.conditionsView.getValue(),id:this.options.id}},populate:function(){this.conditionsView.populate.apply(this.conditionsView,arguments)}});BI.shortcut("bi.filter_expander",a)}(),!function(){BI.constant("bi.constant.component.filter",{FORMULA_COMBO:[{text:BI.i18nText("BI-Conf_Formula_And"),value:BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_AND},{text:BI.i18nText("BI-Conf_Formula_Or"),value:BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_OR}],CONDITION_COMBO:[{text:BI.i18nText("BI-Conf_Condition_And"),value:BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_AND},{text:BI.i18nText("BI-Conf_Condition_Or"),value:BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_OR}]})}(),BI.Filter=BI.inherit(BI.Widget,{constants:{FIELD_TYPE_NUMBER:1,FIELD_TYPE_STRING:0,FIELD_TYPE_DATE:2},props:{baseCls:"bi-filter",expander:{},items:[],el:{},itemCreator:BI.empty},render:function(){var a=this,b=this.options;return BI.extend({type:"bi.filter_operation",expander:b.expander,listeners:[{eventName:"EVENT_OPERATION",action:function(b){switch(b){case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION:case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_AND:a._addAndOrCondition(BI.Filter.FILTER_TYPE.EMPTY_CONDITION);break;case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_OR:a._addAndOrCondition(BI.Filter.FILTER_TYPE.EMPTY_CONDITION,1);break;case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA:case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_AND:a._addAndOrCondition(BI.Filter.FILTER_TYPE.EMPTY_FORMULA);break;case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_OR:a._addAndOrCondition(BI.Filter.FILTER_TYPE.EMPTY_FORMULA,1)}}},{eventName:"BI.FilterOperation.EVENT_DESTROY_ITEM",action:function(b){a._removeCondition(b)}}],ref:function(b){a.filter=b}},b.el)},mounted:function(){this.tree=new BI.Tree,this.tree.initTree(this.options.items),this._populate(this.tree.toJSONWithNode())},_createEmptyNode:function(a){var b=new BI.Node(BI.UUID());return b.set("data",{value:a}),b},_insertAndOrCondition:function(a,b,c){var d=["AND","OR"];c||(c=0);var e=this.tree.search(a);if(BI.isNotNull(e)){var f=e.get("data"),g=e.getParent(),h=g.getChildIndex(e.id),i=g.get("data")||{},j=this._createEmptyNode(b);if(f.value===BI.Filter.FILTER_TYPE[d[c]])return void this.tree.addNode(e,j);if(f.value===BI.Filter.FILTER_TYPE[d[1-c]]&&i.value===BI.Filter.FILTER_TYPE[d[c]])return void g.addChild(j,h+1);if(f.value===BI.Filter.FILTER_TYPE[d[1-c]]&&i.value!==BI.Filter.FILTER_TYPE[d[c]]||i.value===BI.Filter.FILTER_TYPE[d[1-c]]||i.value!==BI.Filter.FILTER_TYPE.AND&&i.value!==BI.Filter.FILTER_TYPE.OR){var k=new BI.Node(BI.UUID());return k.set("data",{value:BI.Filter.FILTER_TYPE[d[c]],children:[e.get("data"),j.get("data")]}),g.removeChildByIndex(h),g.addChild(k,h),k.addChild(e),void k.addChild(j)}g.addChild(j,h+1)}},_removeCondition:function(a){var b=this.tree.search(a);if(BI.isNotNull(b)){var c=b.getParent();if(c.removeChild(a),c.getChildrenLength()<=1){var d=c.getParent();if(BI.isNotNull(d)){var e=d.getChildIndex(c.id);d.removeChildByIndex(e),1===c.getChildrenLength()&&d.addChild(c.getFirstChild(),e)}}this._populate(this.tree.toJSONWithNode()),this.fireEvent("EVENT_CHANGE")}},_addAndOrCondition:function(a,b){var c=["AND","OR"];b||(b=0);var d=this.filter.getCurrentSelectItem();if(BI.isNotNull(d)){var e=d.attr("id");this._insertAndOrCondition(e,a,b)}else{var f=this._createEmptyNode(a),g=this.tree.getRoot(),h=g.getLastChild();if(BI.isNotNull(h)){var i=h.get("data");if(i.value===BI.Filter.FILTER_TYPE[c[b]])this.tree.addNode(h,f);else{var j=new BI.Node(BI.UUID());j.set("data",{value:BI.Filter.FILTER_TYPE[c[b]],children:[h.get("data"),f.get("data")]}),g.removeChild(h.id),this.tree.addNode(j),this.tree.addNode(j,h),this.tree.addNode(j,f)}}else this.tree.addNode(f)}this._populate(this.tree.toJSONWithNode()),this.fireEvent("EVENT_CHANGE")},_populate:function(a){this.filter.defaultState();var b=this.options;b.items=a,BI.Tree.traversal(a,function(a,c){b.itemCreator(c)}),this.filter.populate.apply(this.filter,[a])},populate:function(a){this.tree.initTree(a),this._populate(this.tree.toJSONWithNode())},getValue:function(){return this.filter.getValue()}}),BI.shortcut("bi.filter",BI.Filter),BI.Filter.FILTER_TYPE={},BI.Filter.FILTER_TYPE.FORMULA=33,BI.Filter.FILTER_TYPE.AND=34,BI.Filter.FILTER_TYPE.OR=35,BI.Filter.FILTER_TYPE.EMPTY_FORMULA=36,BI.Filter.FILTER_TYPE.EMPTY_CONDITION=37,!function(){var a=BI.inherit(BI.ButtonTree,{props:{baseCls:"bi-button-map"},_createBtns:function(a){var b=this.options,c=BI.createWidgets(BI.createItems(a,{type:"bi.text_button",once:0===b.chooseType})),d=BI.map(a,function(a,b){if(b=BI.stripEL(b),!b.id&&!b.value)throw new Error("item must have 'id' or 'value' as its property");return b.id||b.value});return BI.zipObject(d,c)},setValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setSelected)?void(a.contains(b)?c.setSelected&&c.setSelected(!0):c.setSelected&&c.setSelected(!1)):void c.setValue(a)})},setNotSelectedValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setSelected)?void(a.contains(b)?c.setSelected&&c.setSelected(!1):c.setSelected&&c.setSelected(!0)):void c.setNotSelectedValue(a)})},populate:function(a){var b=this,c=[].slice.call(arguments),d=new BI.LinkHashMap,e=function(a){return a.id||a.value};this.buttons||(this.buttons={});var f=[];BI.each(a,function(a,d){if(d=BI.stripEL(d),b.buttons[e(d)]){var g=b.buttons[e(d)];c[0]=d.items,c[2]=d,g.populate&&g.populate.apply(g,c)}else f.push(d)}),c[0]=f;var g=this._btnsCreator.apply(this,c),h=[];BI.each(a,function(a,c){c=BI.stripEL(c);var f=b.buttons[e(c)]||g[e(c)];d.add(e(c),f),h.push(f)}),this.buttons=d.map,BI.DOM.hang(this.buttons),this.element.empty();var i=this._packageItems(a,this._packageBtns(h));BI.createWidget(BI.extend({element:this},this._packageLayout(i)))},getIndexByValue:function(){throw new Error("Can not use getIndexByValue")}});BI.shortcut("bi.filter_list",a)}(),!function(){var a=0,b=1,c=BI.inherit(BI.Widget,{props:{baseCls:"bi-filter-operation",expander:{},items:[],selections:[BI.AbstractFilterItem.FILTER_OPERATION_CONDITION,BI.AbstractFilterItem.FILTER_OPERATION_FORMULA],itemsCreator:BI.emptyFn},render:function(){var c=this,d=this.options;return this.currentSelected=null,{type:"bi.vtape",items:[{el:{type:"bi.tab",showIndex:a,cardCreator:BI.bind(this._createTabs,this),ref:function(a){c.buttonComboTab=a}},height:40},{el:{type:"bi.absolute",scrollable:!0,items:[{el:{type:"bi.left",items:[{type:"bi.filter_pane",expander:d.expander,items:d.items,itemsCreator:d.itemsCreator,listeners:[{eventName:"EVENT_CHANGE",action:function(d,e,f){d===BI.Events.CLICK&&(BI.isNotNull(c.currentSelected)&&c.currentSelected===f?f.setSelectedCondition(!f.isSelectedCondition()):(BI.isNotNull(c.currentSelected)&&c.currentSelected.setSelectedCondition(!1),c.currentSelected=f,f.setSelectedCondition(!0)),c.currentSelected.isSelectedCondition()?c.buttonComboTab.setSelect(b):c.buttonComboTab.setSelect(a)),d===BI.Events.DESTROY&&(c.currentSelected===f&&(c.currentSelected=null,c.buttonComboTab.setSelect(a)),c.fireEvent("BI.FilterOperation.EVENT_DESTROY_ITEM",e,f))}}],ref:function(a){c.filter=a}}]},top:0,right:2,bottom:0,left:0}]}}]}},_createTabs:function(c){var d=this;switch(c){case a:return{type:"bi.button_group",items:BI.createItems(d._createButtons(),{type:"bi.icon_text_item",height:30,width:100}),chooseType:BI.ButtonGroup.CHOOSE_TYPE_DEFAULT,layouts:[{type:"bi.left",vgap:5}],listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(a,b){BI.isEmptyArray(d.filter.getValue())&&d.filter.element.addClass("bi-border-top bi-border-left"),d.fireEvent("EVENT_OPERATION",b.getValue()),d.defaultState()}}]};case b:return{type:"bi.button_group",chooseType:BI.ButtonGroup.CHOOSE_TYPE_DEFAULT,items:d._buildOperationButton(),layouts:[{type:"bi.left",vgap:5}]}}},_createButtons:function(){var a=[];return BI.each(this.options.selections,function(b,c){switch(c){case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA:a.push({text:BI.i18nText("BI-Conf_Add_Formula"),value:BI.AbstractFilterItem.FILTER_OPERATION_FORMULA,cls:"operation-trigger filter-formula-font"});break;case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION:a.push({text:BI.i18nText("BI-Conf_Add_Condition"),value:BI.AbstractFilterItem.FILTER_OPERATION_CONDITION,cls:"operation-trigger filter-condition-font"})}}),a},_buildOperationButton:function(){var a=this,b=[];return BI.each(this.options.selections,function(c,d){var e="",f="",g=[];switch(d){case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA:e=BI.i18nText("BI-Conf_Add_Formula"),f="filter-formula-font",g=BI.Constants.getConstant("bi.constant.component.filter").FORMULA_COMBO;break;case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION:default:e=BI.i18nText("BI-Conf_Add_Condition"),f="filter-condition-font",g=BI.Constants.getConstant("bi.constant.component.filter").CONDITION_COMBO}var h=BI.createWidget({type:"bi.icon_text_item",cls:"operation-trigger "+f,text:e,height:30,width:100});b.push({type:"bi.combo",el:h,popup:{el:{type:"bi.button_group",chooseType:BI.ButtonGroup.CHOOSE_TYPE_NONE,items:BI.createItems(g,{type:"bi.single_select_item",height:25}),layouts:[{type:"bi.vertical"}]}},listeners:[{eventName:BI.Combo.EVENT_CHANGE,action:function(b,c){switch(BI.isEmptyArray(a.filter.getValue())&&a.filter.element.addClass("bi-border-top bi-border-left"),b){case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_AND:case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_OR:h.setText(BI.i18nText("BI-Conf_Add_Condition"));break;case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_AND:case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_OR:h.setText(BI.i18nText("BI-Conf_Add_Formula"));break;default:h.setText()}a.fireEvent("EVENT_OPERATION",c.getValue()),a.defaultState(),this.hideView()}}]})}),b},defaultState:function(){BI.isNotNull(this.currentSelected)&&this.currentSelected.setSelectedCondition(!1),this.buttonComboTab.setSelect(a)},getCurrentSelectItem:function(){if(BI.isNotNull(this.currentSelected)&&this.currentSelected.isSelectedCondition())return this.currentSelected},populate:function(a){this.filter.populate.apply(this.filter,arguments)},getValue:function(){return this.filter.getValue()}});BI.shortcut("bi.filter_operation",c)}(),!function(){var a=BI.inherit(BI.Widget,{props:{baseCls:"bi-filter-pane",expander:{},items:[],itemsCreator:BI.emptyFn},render:function(){var a=this,b=this.options;return{type:"bi.custom_tree",cls:BI.isNotEmptyArray(b.items)?"bi-border-top bi-border-left":"",expander:BI.extend({type:"bi.filter_expander",el:{},popup:{type:"bi.custom_tree"}},b.expander),el:{type:"bi.filter_list",chooseType:BI.ButtonGroup.CHOOSE_TYPE_DEFAULT,layouts:[{type:"bi.vertical",scrolly:!1}]},items:b.items,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(){a.fireEvent("EVENT_CHANGE",arguments)}}],ref:function(b){a.tree=b}}},populate:function(a){BI.isNotEmptyArray(a)?this.element.addClass("bi-border-top bi-border-left"):this.element.removeClass("bi-border-top bi-border-left"),this.tree.populate.apply(this.tree,arguments)},getValue:function(){return this.tree.getValue()}});BI.shortcut("bi.filter_pane",a)}(),BI.IntervalSlider=BI.inherit(BI.Widget,{_constant:{EDITOR_WIDTH:58,EDITOR_R_GAP:60,EDITOR_HEIGHT:30,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},_defaultConfig:function(){return BI.extend(BI.IntervalSlider.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-interval-slider bi-slider-track",digit:!1,unit:""})},_init:function(){BI.IntervalSlider.superclass._init.apply(this,arguments);var a=this,b=this._constant;this.enable=!1,this.valueOne="",this.valueTwo="",this.calculation=new BI.AccurateCalculationModel,this.grayTrack=BI.createWidget({type:"bi.layout",cls:"gray-track",height:6}),this.blueTrack=BI.createWidget({type:"bi.layout",cls:"blue-track bi-high-light-background",height:6}),this.track=this._createTrackWrapper(),this.labelOne=BI.createWidget({type:"bi.sign_text_editor",cls:"slider-editor-button",text:this.options.unit,errorText:"",allowBlank:!1,width:b.EDITOR_WIDTH,validationChecker:function(b){return a._checkValidation(b)}}),this.labelOne.element.hover(function(){a.labelOne.element.removeClass("bi-border").addClass("bi-border")},function(){a.labelOne.element.removeClass("bi-border")}),this.labelOne.on(BI.Editor.EVENT_CONFIRM,function(){var b=BI.parseFloat(this.getValue());a.valueOne=b;var c=a._getPercentByValue(b),d=BI.parseFloat(c.toFixed(1));a._setLabelOnePosition(d),a._setSliderOnePosition(d),a._setBlueTrack(),a.fireEvent(BI.IntervalSlider.EVENT_CHANGE)}),this.labelTwo=BI.createWidget({type:"bi.sign_text_editor",cls:"slider-editor-button",errorText:"",text:this.options.unit,allowBlank:!1,width:b.EDITOR_WIDTH,validationChecker:function(b){return a._checkValidation(b)}}),this.labelTwo.element.hover(function(){a.labelTwo.element.removeClass("bi-border").addClass("bi-border")},function(){a.labelTwo.element.removeClass("bi-border")}),this.labelTwo.on(BI.Editor.EVENT_CONFIRM,function(){var b=BI.parseFloat(this.getValue());a.valueTwo=b;var c=a._getPercentByValue(b),d=BI.parseFloat(c.toFixed(1));a._setLabelTwoPosition(d),a._setSliderTwoPosition(d),a._setBlueTrack(),a.fireEvent(BI.IntervalSlider.EVENT_CHANGE)}),this.sliderOne=BI.createWidget({type:"bi.single_slider_button"}),this.sliderTwo=BI.createWidget({type:"bi.single_slider_button"}),this._draggable(this.sliderOne,!0),this._draggable(this.sliderTwo,!1),this._setVisible(!1),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.track,width:"100%",height:b.TRACK_HEIGHT}]}],hgap:7,height:b.TRACK_HEIGHT},top:23,left:0,width:"100%"},this._createLabelWrapper(),this._createSliderWrapper()]})},_rePosBySizeAfterMove:function(a,b){var c=this.options,d=100*a/this._getGrayTrackLength(),e=BI.parseFloat(d.toFixed(1)),f=this._getValueByPercent(e);f=this._assertValue(f),f=c.digit===!1?f:f.toFixed(c.digit),b?(this._setLabelOnePosition(e),this._setSliderOnePosition(e),this.labelOne.setValue(f),this.valueOne=f):(this._setLabelTwoPosition(e),this._setSliderTwoPosition(e),this.labelTwo.setValue(f),this.valueTwo=f),this._setBlueTrack()},_rePosBySizeAfterStop:function(a,b){var c=100*a/this._getGrayTrackLength(),d=BI.parseFloat(c.toFixed(1));b?this._setSliderOnePosition(d):this._setSliderTwoPosition(d)},_draggable:function(a,b){function c(a){return BI.clamp(a,0,d._getGrayTrackLength())}var d=this,e=(this.options,!1),f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){i.isDragging()&&(e=!0,g+=j,f=c(h+g),a.element.addClass("dragging"),d._rePosBySizeAfterMove(f,b))},function(){e===!0&&(f=c(f),d._rePosBySizeAfterStop(f,b),f=0,g=0,h=f,e=!1),a.element.removeClass("dragging"),i.releaseMouseMoves(),d.fireEvent(BI.IntervalSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(b){a.isEnabled()&&(h=this.offsetLeft,c(h),i.captureMouseMoves(b))})},_createLabelWrapper:function(){var a=this._constant;return{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.labelOne,top:0,left:"0%"}]},{type:"bi.absolute",items:[{el:this.labelTwo,top:0,left:"100%"}]}],rgap:a.EDITOR_R_GAP,height:70},top:0,left:0,width:"100%"}},_createSliderWrapper:function(){var a=this._constant;return{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.sliderOne,top:0,left:"0%"}]},{type:"bi.absolute",items:[{el:this.sliderTwo,top:0,left:"100%"}]}],hgap:a.SLIDER_WIDTH_HALF,height:a.SLIDER_HEIGHT},top:20,left:0,width:"100%"}},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){var b=this.options,c=!1,d=(a+"").split(".")[1];return BI.isEmptyString(d)||BI.isNumeric(a)&&!(BI.isNull(a)||athis.max)&&(b.digit===!1?c=!0:(d=d||"",c=d.length===b.digit)),c},_checkOverlap:function(){var a=this.labelOne.element[0].offsetLeft,b=this.labelTwo.element[0].offsetLeft;a<=b?b-a<90?this.labelTwo.element.css({top:40}):this.labelTwo.element.css({top:0}):a-b<90?this.labelTwo.element.css({top:40}):this.labelTwo.element.css({top:0})},_setLabelOnePosition:function(a){this.labelOne.element.css({left:a+"%"}),this._checkOverlap()},_setLabelTwoPosition:function(a){this.labelTwo.element.css({left:a+"%"}),this._checkOverlap()},_setSliderOnePosition:function(a){this.sliderOne.element.css({left:a+"%"})},_setSliderTwoPosition:function(a){this.sliderTwo.element.css({left:a+"%"})},_setBlueTrackLeft:function(a){this.blueTrack.element.css({left:a+"%"})},_setBlueTrackWidth:function(a){this.blueTrack.element.css({width:a+"%"})},_setBlueTrack:function(){var a=this._getPercentByValue(this.labelOne.getValue()),b=this._getPercentByValue(this.labelTwo.getValue());a<=b?(this._setBlueTrackLeft(a),this._setBlueTrackWidth(b-a)):(this._setBlueTrackLeft(b),this._setBlueTrackWidth(a-b))},_setAllPosition:function(a,b){this._setSliderOnePosition(a),this._setLabelOnePosition(a),this._setSliderTwoPosition(b),this._setLabelTwoPosition(b),this._setBlueTrack()},_setVisible:function(a){this.sliderOne.setVisible(a),this.sliderTwo.setVisible(a),this.labelOne.setVisible(a),this.labelTwo.setVisible(a)},_setErrorText:function(){var a=BI.i18nText("BI-Please_Enter")+this.min+"-"+this.max+BI.i18nText("BI-Basic_De")+BI.i18nText("BI-Basic_Number");this.labelOne.setErrorText(a),this.labelTwo.setErrorText(a)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(a){var b=this.calculation.accurateSubtraction(this.max,this.min),c=this.calculation.accurateMultiplication(b,a),d=this.calculation.accurateDivisionTenExponent(c,2);if(this.precision<0){var e=BI.parseFloat(this.calculation.accurateAddition(d,this.min)),f=Math.round(this.calculation.accurateDivisionTenExponent(e,-this.precision));return this.calculation.accurateMultiplication(f,Math.pow(10,-this.precision))}return BI.parseFloat(this.calculation.accurateAddition(d,this.min).toFixed(this.precision))},_getPercentByValue:function(a){return 100*(a-this.min)/(this.max-this.min)},_setDraggableEnable:function(a){this.sliderOne.setEnable(a),this.sliderTwo.setEnable(a)},_getPrecision:function(){var a=this.calculation.accurateSubtraction(this.max,this.min),b=a.toPrecision(4),c=b.indexOf("e"),d=[];if(c>-1){d=b.split("e");var e=BI.size(d[0].split(".")[1]),f=BI.parseInt(d[1].substring(1));return e-f}return d=b.split("."),d.length>1?d[1].length:0},_assertValue:function(a){return a<=this.min?this.min:a>=this.max?this.max:a},getValue:function(){return this.valueOne<=this.valueTwo?{min:this.valueOne,max:this.valueTwo}:{min:this.valueTwo,max:this.valueOne}},setMinAndMax:function(a){var b=BI.parseFloat(a.min),c=BI.parseFloat(a.max);!isNaN(b)&&!isNaN(c)&&c>=b&&(this.min=b,this.max=c,this.valueOne=b,this.valueTwo=c,this.precision=this._getPrecision(),this._setDraggableEnable(!0)),c===b&&this._setDraggableEnable(!1)},setValue:function(a){var b=this.options,c=BI.parseFloat(a.min),d=BI.parseFloat(a.max);c=b.digit===!1?c:c.toFixed(b.digit),d=b.digit===!1?d:d.toFixed(b.digit),isNaN(c)||isNaN(d)||(this._checkValidation(c)&&(this.valueOne=c),this._checkValidation(d)&&(this.valueTwo=d),cthis.max&&(this.valueTwo=this.max))},reset:function(){this._setVisible(!1),this.enable=!1,this.valueOne="",this.valueTwo="",this.min=NaN,this.max=NaN,this._setBlueTrackWidth(0)},populate:function(){isNaN(this.min)||isNaN(this.max)||(this.enable=!0,this._setVisible(!0),this._setErrorText(),(BI.isNumeric(this.valueOne)||BI.isNotEmptyString(this.valueOne))&&(BI.isNumeric(this.valueTwo)||BI.isNotEmptyString(this.valueTwo))?(this.labelOne.setValue(this.valueOne), +this.labelTwo.setValue(this.valueTwo),this._setAllPosition(this._getPercentByValue(this.valueOne),this._getPercentByValue(this.valueTwo))):(this.labelOne.setValue(this.min),this.labelTwo.setValue(this.max),this._setAllPosition(0,100)))}}),BI.IntervalSlider.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.interval_slider",BI.IntervalSlider),BI.AccurateCalculationModel=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.AccurateCalculationModel.superclass._defaultConfig.apply(this,arguments),{baseCls:""})},_init:function(){BI.AccurateCalculationModel.superclass._init.apply(this,arguments)},_getMagnitude:function(a){for(var b="1",c=0;c0)var d=b;else{var d=a;c=0-c}for(var e=0;e=b.numDecimal.length?a.numDecimal.length:b.numDecimal.length}function d(a,b){for(var c=b-a.length,d=0;d=BI.parseInt(f.numDecimal))var i=(BI.parseInt(e.numDecimal)-BI.parseInt(f.numDecimal)).toString(),j=d(i,h);else{g--;var k=this._getMagnitude(h),i=(k+BI.parseInt(e.numDecimal)-BI.parseInt(f.numDecimal)).toString(),j=d(i,h)}var l=g+"."+j;return BI.parseFloat(l)},_accurateAddition:function(a,b){function c(a,b){for(var c=b-a.length,d=0;db)var e=d.numInteger.slice(0,d.numInteger.length-b),f=d.numInteger.slice(-b);else var e="0",f=c(d.numInteger,b);var g=e+"."+f+d.numDecimal;return BI.parseFloat(g)},accurateSubtraction:function(a,b){return a>=0&&b>=0?a>=b?this._accurateSubtraction(a,b):-this._accurateSubtraction(b,a):a>=0&&b<0?this._accurateAddition(a,-b):a<0&&b>=0?-this._accurateAddition(-a,b):a<0&&b<0?a>=b?this._accurateSubtraction(-b,-a):this._accurateSubtraction(-a,-b):void 0},accurateAddition:function(a,b){return a>=0&&b>=0?this._accurateAddition(a,b):a>=0&&b<0?this.accurateSubtraction(a,-b):a<0&&b>=0?this.accurateSubtraction(b,-a):a<0&&b<0?-this._accurateAddition(-a,-b):void 0},accurateMultiplication:function(a,b){return a>=0&&b>=0?this._accurateMultiplication(a,b):a>=0&&b<0?-this._accurateMultiplication(a,-b):a<0&&b>=0?-this._accurateMultiplication(-a,b):a<0&&b<0?this._accurateMultiplication(-a,-b):void 0},accurateDivisionTenExponent:function(a,b){return a>=0?this._accurateDivisionTenExponent(a,b):-this._accurateDivisionTenExponent(-a,b)}}),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",value:b.value}),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,value:b.value}),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 BI.isNull(this.popup)?this.options.value||"":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=[1,7,2,8,3,9,4,10,5,11,6,12],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}})}),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}],value:b.value}),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.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.MonthTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Month"),baseCls:"bi-trigger-month-text",width:b.height},width:b.height},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]}),this.setValue(b.value)},setValue:function(a){return BI.isNotNull(a)?(this.editor.setState(a+1),this.editor.setValue(a+1),void this.editor.setTitle(a+1)):(this.editor.setState(""),this.editor.setValue(""),void this.editor.setTitle(""))},getKey:function(){return 0|this.editor.getValue()},getValue:function(){return this.editor.getValue()-1}}),BI.MonthTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.MonthTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.MonthTrigger.EVENT_START="EVENT_START",BI.MonthTrigger.EVENT_STOP="EVENT_STOP",BI.MonthTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_trigger",BI.MonthTrigger),BI.DownListCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-down-list-combo",height:24,items:[],adjustLength:0,direction:"bottom",trigger:"click",container:null,stopPropagation:!1,el:{}})},_init:function(){BI.DownListCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popupview=BI.createWidget({type:"bi.multi_layer_down_list_popup",items:b.items,chooseType:b.chooseType,value:b.value}),this.popupview.on(BI.DownListPopup.EVENT_CHANGE,function(b){a.fireEvent(BI.DownListCombo.EVENT_CHANGE,b),a.downlistcombo.hideView()}),this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,function(b,c){a.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,b,c),a.downlistcombo.hideView()}),this.downlistcombo=BI.createWidget({element:this,type:"bi.combo",trigger:b.trigger,isNeedAdjustWidth:!1,container:b.container,adjustLength:b.adjustLength,direction:b.direction,stopPropagation:b.stopPropagation,el:BI.createWidget(b.el,{type:"bi.icon_trigger",extraCls:b.iconCls?b.iconCls:"pull-down-font",width:b.width,height:b.height}),popup:{el:this.popupview,stopPropagation:!0,maxHeight:1e3}}),this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW)})},hideView:function(){this.downlistcombo.hideView()},showView:function(){this.downlistcombo.showView()},populate:function(a){this.popupview.populate(a)},setValue:function(a){this.popupview.setValue(a)},getValue:function(){return this.popupview.getValue()}}),BI.DownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DownListCombo.EVENT_SON_VALUE_CHANGE="EVENT_SON_VALUE_CHANGE",BI.DownListCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_layer_down_list_combo",BI.DownListCombo),BI.MultiLayerDownListPopup=BI.inherit(BI.Pane,{constants:{nextIcon:"pull-right-e-font",height:25,iconHeight:12,iconWidth:12,hgap:0,vgap:0,border:1},_defaultConfig:function(){var a=BI.MultiLayerDownListPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-down-list-popup",items:[],chooseType:BI.Selection.Multi})},_init:function(){BI.MultiLayerDownListPopup.superclass._init.apply(this,arguments),this.singleValues=[],this.childValueMap={},this.fatherValueMap={};var a=this,b=this.options,c=this._createPopupItems(b.items);this.popup=BI.createWidget({type:"bi.button_tree",items:BI.createItems(c,{},{adjustLength:-2}),layouts:[{type:"bi.vertical",hgap:this.constants.hgap,vgap:this.constants.vgap}],value:this._digest(b.value),chooseType:b.chooseType}),this.popup.on(BI.ButtonTree.EVENT_CHANGE,function(b,c){var d=b;if(BI.isNotNull(a.childValueMap[b])){d=a.childValueMap[b];var e=a.fatherValueMap[b],f=(e+"").split("_");a.fireEvent(BI.MultiLayerDownListPopup.EVENT_SON_VALUE_CHANGE,d,f.length>1?f:e)}else a.fireEvent(BI.MultiLayerDownListPopup.EVENT_CHANGE,d,c);if(!a.singleValues.contains(d)){var g=a.getValue(),h=[];BI.each(g,function(a,b){b.value!=d&&h.push(b)}),a.setValue(h)}}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup]})},_createPopupItems:function(a){var b=this,c=[];return BI.each(a,function(d,e){var f={type:"bi.down_list_group",items:[]};if(BI.each(e,function(a,c){BI.isNotEmptyArray(c.children)&&!BI.isEmpty(c.el)?(c.type="bi.combo_group",c.cls="down-list-group",c.trigger="hover",c.isNeedAdjustWidth=!1,c.el.title=c.el.title||c.el.text,c.el.type="bi.down_list_group_item",c.el.logic={dynamic:!0},c.el.height=b.constants.height,c.el.iconCls2=b.constants.nextIcon,c.popup={lgap:4,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}},c.el.childValues=[],BI.each(c.children,function(a,d){d=d.el?BI.extend(d.el,{children:d.children}):d;var e=BI.deepClone(c.el.value),f=BI.deepClone(d.value);b.singleValues.push(d.value),d.type="bi.down_list_item",d.extraCls=" child-down-list-item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),c.el.childValues.push(d.value),BI.isNotEmptyArray(d.children)&&(d.type="bi.down_list_group_item",b._createChildren(d),d.height=b.constants.height,d.iconCls2=b.constants.nextIcon,c.el.childValues=BI.concat(c.el.childValues,d.childValues))})):(c.type="bi.down_list_item",c.title=c.title||c.text,c.textRgap=10,c.isNeedAdjustWidth=!1,c.logic={dynamic:!0});var d={};d.el=c,f.items.push(d)}),b._isGroup(f.items)&&BI.each(f.items,function(a,c){b.singleValues.push(c.el.value)}),c.push(f),b._needSpliter(d,a.length)){var g=BI.createWidget({type:"bi.vertical",items:[{el:{type:"bi.layout",cls:"bi-down-list-spliter bi-border-top cursor-pointer",height:0}}],cls:"bi-down-list-spliter-container cursor-pointer",lgap:10,rgap:10});c.push(g)}}),c},_createChildren:function(a){var b=this;a.childValues=[],BI.each(a.children,function(c,d){var e=BI.deepClone(a.value),f=BI.deepClone(d.value);d.type="bi.down_list_item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),a.childValues.push(d.value)})},_isGroup:function(a){return a.length>1},_needSpliter:function(a,b){return a1?g:f}else e.value=d;b.push(e)}),b}}),BI.MultiLayerDownListPopup.EVENT_CHANGE="EVENT_CHANGE",BI.MultiLayerDownListPopup.EVENT_SON_VALUE_CHANGE="EVENT_SON_VALUE_CHANGE",BI.shortcut("bi.multi_layer_down_list_popup",BI.MultiLayerDownListPopup),BI.MultiLayerSelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer_select_tree-combo",isDefaultInit:!1,height:30,text:"",items:[],value:""})},_init:function(){BI.MultiLayerSelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value}),this.popup=BI.createWidget({type:"bi.multilayer_select_tree_popup",isDefaultInit:b.isDefaultInit,items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.MultiLayerSelectTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_CHANGE)})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.MultiLayerSelectTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_combo",BI.MultiLayerSelectTreeCombo),BI.MultiLayerSelectLevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-select-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn,value:""})},_init:function(){BI.MultiLayerSelectLevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={};if(e.layer=b,BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.multilayer_select_tree_first_plus_group_node";break;case a.length-1: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",cls:"tree-view display-inline",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,value:c.value,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)}),BI.createWidget({type:"bi.adaptive",element:this,scrollable:!0,items:[this.tree]})},populate:function(a){this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},setValue:function(a){this.tree.setValue(a)},getValue:function(){return BI.uniq(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:[],value:""})},_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,value:b.value,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:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_first_plus_group_node",BI.MultiLayerSelectTreeFirstPlusGroupNode),BI.MultiLayerSelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-last-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_last_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id: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]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_last_plus_group_node",BI.MultiLayerSelectTreeLastPlusGroupNode),BI.MultiLayerSelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-mid-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_mid_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id: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]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_mid_plus_group_node",BI.MultiLayerSelectTreeMidPlusGroupNode),BI.MultiLayerSingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-singletree-combo",isDefaultInit:!1,height:30,text:"",itemsCreator:BI.emptyFn,items:[],value:""})},_init:function(){BI.MultiLayerSingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value}),this.popup=BI.createWidget({type:"bi.multilayer_single_tree_popup",isDefaultInit:b.isDefaultInit,items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.MultiLayerSingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_CHANGE)})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.MultiLayerSingleTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_combo",BI.MultiLayerSingleTreeCombo),BI.MultiLayerSingleLevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-single-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn})},_init:function(){BI.MultiLayerSingleLevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={};if(e.layer=b,BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.multilayer_single_tree_first_plus_group_node";break;case a.length-1:f.type="bi.multilayer_single_tree_last_plus_group_node";break;default:f.type="bi.multilayer_single_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",cls:"tree-view display-inline",expander:{isDefaultInit:c.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),value:c.value,itemsCreator:function(a,b){c.itemsCreator(a,function(a){b(BI.Tree.transformToTreeFormat(a),0)})},el:{type:"bi.button_tree",chooseType:BI.Selection.Single,layouts:[{type:"bi.vertical"}]}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,c)}),BI.createWidget({type:"bi.adaptive",element:this,scrollable:!0,items:[this.tree]})},populate:function(a){this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},setValue:function(a){this.tree.setValue(a)},getValue:function(){return BI.filter(BI.uniq(this.tree.getValue()),function(a,b){return BI.isNotNull(b)})},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.MultiLayerSingleLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_level_tree",BI.MultiLayerSingleLevelTree),BI.MultiLayerSingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-singletree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:b.isDefaultInit,items:b.items,itemsCreator:b.itemsCreator,value:b.value}),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.MultiLayerSingleLevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.MultiLayerSingleTreePopup.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.MultiLayerSingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.MultiLayerSingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_popup",BI.MultiLayerSingleTreePopup),BI.MultiLayerSingleTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-first-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.first_plus_group_node",cls:"bi-list-item-none",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, +keyword:b.keyword}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_first_plus_group_node",BI.MultiLayerSingleTreeFirstPlusGroupNode),BI.MultiLayerSingleTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-last-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.last_plus_group_node",cls:"bi-list-item-none",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,keyword:b.keyword}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_last_plus_group_node",BI.MultiLayerSingleTreeLastPlusGroupNode),BI.MultiLayerSingleTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-mid-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.mid_plus_group_node",cls:"bi-list-item-none",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,keyword:b.keyword}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_plus_group_node",BI.MultiLayerSingleTreeMidPlusGroupNode),BI.MultiLayerSingleTreeFirstTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-first-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.first_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_first_tree_leaf_item",BI.MultiLayerSingleTreeFirstTreeLeafItem),BI.MultiLayerSingleTreeLastTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-last-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.last_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_last_tree_leaf_item",BI.MultiLayerSingleTreeLastTreeLeafItem),BI.MultiLayerSingleTreeMidTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-mid-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.mid_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_tree_leaf_item",BI.MultiLayerSingleTreeMidTreeLeafItem),BI.MultiSelectCheckPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-pane bi-background",items:[],itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,onClickContinueSelect:BI.emptyFn})},_init:function(){BI.MultiSelectCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value||{},this.display=BI.createWidget({type:"bi.display_selected_list",items:b.items,itemsCreator:function(c,d){return c=BI.extend(c||{},{selectedValues:a.storeValue.value}),a.storeValue.type===BI.Selection.Multi?void d({items:BI.map(a.storeValue.value,function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d}})}):void b.itemsCreator(c,d)}}),this.continueSelect=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-select-check-selected bi-high-light"}),this.continueSelect.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect()}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:{type:"bi.left",cls:"multi-select-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:this.continueSelect,lgap:this.constants.lgap,tgap:this.constants.tgap}]}},{height:"fill",el:this.display}]})},setValue:function(a){this.storeValue=a||{}},empty:function(){this.display.empty()},populate:function(){this.display.populate.apply(this.display,arguments)}}),BI.shortcut("bi.multi_select_check_pane",BI.MultiSelectCheckPane),BI.DisplaySelectedList=BI.inherit(BI.Pane,{constants:{height:25,lgap:10},_defaultConfig:function(){return BI.extend(BI.DisplaySelectedList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-display-list",itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.DisplaySelectedList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.hasNext=!1,this.button_group=BI.createWidget({type:"bi.list_pane",element:this,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},items:this._createItems(b.items),chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical",lgap:10}]},itemsCreator:function(c,d){b.itemsCreator(c,function(b){a.hasNext=!!b.hasNext,d(a._createItems(b.items))})},hasNext:function(){return a.hasNext}})},_createItems:function(a){return BI.createItems(a,{type:"bi.icon_text_item",cls:"cursor-default check-font display-list-item bi-tips",once:!0,invalid:!0,selected:!0,height:this.constants.height,logic:{dynamic:!0}})},empty:function(){this.button_group.empty()},populate:function(a){0===arguments.length?this.button_group.populate():this.button_group.populate(this._createItems(a))}}),BI.shortcut("bi.display_selected_list",BI.DisplaySelectedList),BI.MultiSelectInsertCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_init:function(){BI.MultiSelectInsertCombo.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)})},value:b.value}),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(){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.storeValue.type===BI.Selection.Multi&&a.storeValue.value.pushDistinct(b),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()})}},value:b.value,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.MultiSelectInsertCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button"});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.MultiSelectInsertCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectInsertCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;b(),a()},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectInsertCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_insert_combo",BI.MultiSelectInsertCombo),BI.MultiSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_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=b.value||{},this._assertValue(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)})},value:this.storeValue}),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()})}},value:b.value,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"});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.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.storeValue.type===BI.Selection.All&&c.storeValue.value.length>=c._count?c.storeValue={type:BI.Selection.Multi,value:[]}:c.storeValue.type===BI.Selection.Multi&&c.storeValue.value.length>=c._count&&(c.storeValue={type:BI.Selection.All,value:[]}),c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_combo",BI.MultiSelectCombo),BI.MultiSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=b.value||{},this._assertValue(this.storeValue),this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!a.storeValue.value.contains(a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](f),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:this.options.logic,height:25,selected:this.isAllSelected()})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_loader",BI.MultiSelectLoader),BI.MultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.multi_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_popup_view",BI.MultiSelectPopupView),BI.MultiSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.MultiSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.multi_select_searcher",height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker,value:b.value}),this.searcher.on(BI.MultiSelectSearcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_CHANGE,arguments)}),this.numberCounter=BI.createWidget(b.switcher,{type:"bi.multi_select_check_selected_switcher",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,adapter:b.adapter,masker:b.masker,value:b.value}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK)}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW)});var c=BI.createWidget({type:"bi.right_vertical_adapt",hgap:4,items:[{el:this.numberCounter}]}),d=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:c,width:0},{el:BI.createWidget(),width:30}]});this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){d.attr("items")[1].width=b===!0?a.numberCounter.element.outerWidth()+8:0,d.resize()})}),this.element.click(function(b){a.element.__isMouseInBounds__(b)&&!a.numberCounter.element.__isMouseInBounds__(b)&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK", +BI.MultiSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.MultiSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectTrigger.EVENT_START="EVENT_START",BI.MultiSelectTrigger.EVENT_STOP="EVENT_STOP",BI.MultiSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.multi_select_trigger",BI.MultiSelectTrigger),BI.MultiSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=BI.deepClone(b.value),this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:{dynamic:!1},value:b.value,el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:a.storeValue.value})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=a._filterValues(a.storeValue);h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:{dynamic:!1},height:25,selected:this.isAllSelected()})},isAllSelected:function(){return this.button_group.isAllSelected()},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=BI.deepClone(a.value)||[],e=BI.map(d,function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.match.concat(f.find)}return BI.map(d,function(b,c){return{text:c.text,title:c.text,value:c.value,selected:a.type===BI.Selection.All}})},setValue:function(a){this.storeValue=BI.deepClone(a),this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_loader",BI.MultiSelectSearchLoader),BI.MultiSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.multi_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},isAllSelected:function(){return this.loader.isAllSelected()},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.MultiSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_pane",BI.MultiSelectSearchPane),BI.MultiSelectCheckSelectedButton=BI.inherit(BI.Single,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-button bi-high-light",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectCheckSelectedButton.superclass._init.apply(this,arguments);var a=this,b=this.options;this.numberCounter=BI.createWidget({type:"bi.text_button",element:this,hgap:4,text:"0",textAlign:"center",textHeight:15}),this.numberCounter.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.numberCounter.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),this.numberCounter.element.hover(function(){a.numberCounter.setTag(a.numberCounter.getText()),a.numberCounter.setText(a._const.checkSelected)},function(){a.numberCounter.setText(a.numberCounter.getTag())}),this.setVisible(!1),BI.isNotNull(b.value)&&this.setValue(b.value)},setValue:function(a){var b=this,c=this.options;return a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[]),a.type===BI.Selection.All?void c.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(c){var d=c.count-a.value.length;BI.nextTick(function(){b.numberCounter.setText(d),b.setVisible(d>0)})}):void BI.nextTick(function(){b.numberCounter.setText(a.value.length),b.setVisible(a.value.length>0)})},getValue:function(){}}),BI.MultiSelectCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_check_selected_button",BI.MultiSelectCheckSelectedButton),BI.MultiSelectEditor=BI.inherit(BI.Widget,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-editor",el:{}})},_init:function(){BI.MultiSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0,value:b.value}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_CLICK_LABEL,function(){})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastValidValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.MultiSelectEditor.EVENT_PAUSE="MultiSelectEditor.EVENT_PAUSE",BI.shortcut("bi.multi_select_editor",BI.MultiSelectEditor),BI.MultiSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.MultiSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),this.setKeyword(c.keyword),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiSelectSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;if(a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All)if(0===a.value.length)this.editor.setState(BI.Selection.All);else if(BI.size(a.assist)<=20){var c="";BI.each(a.assist,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi);else if(0===a.value.length)this.editor.setState(BI.Selection.None);else if(BI.size(a.value)<=20){var c="";BI.each(a.value,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectSearcher.EVENT_START="EVENT_START",BI.MultiSelectSearcher.EVENT_STOP="EVENT_STOP",BI.MultiSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.multi_select_searcher",BI.MultiSelectSearcher),BI.MultiSelectCheckSelectedSwitcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedSwitcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-switcher",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,el:{},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectCheckSelectedSwitcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button=BI.createWidget(b.el,{type:"bi.multi_select_check_selected_button",itemsCreator:b.itemsCreator,value:b.value}),this.button.on(BI.Events.VIEW,function(){a.fireEvent(BI.Events.VIEW,arguments)}),this.switcher=BI.createWidget({type:"bi.switcher",toggle:!1,element:this,el:this.button,popup:BI.extend({type:"bi.multi_select_check_pane",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,onClickContinueSelect:function(){a.switcher.hideView()},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.switcher.on(BI.Switcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE)}),this.switcher.on(BI.Switcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW)}),this.switcher.on(BI.Switcher.EVENT_AFTER_POPUPVIEW,function(){var a=this;BI.nextTick(function(){a.populate()})}),this.switcher.element.click(function(a){a.stopPropagation()})},adjustView:function(){this.switcher.adjustView()},hideView:function(){this.switcher.empty(),this.switcher.hideView()},setAdapter:function(a){this.switcher.setAdapter(a)},setValue:function(a){this.switcher.setValue(a)},setButtonChecked:function(a){this.button.setValue(a)},getValue:function(){},populate:function(a){this.switcher.populate.apply(this.switcher,arguments)}}),BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE="MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE",BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW="MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_select_check_selected_switcher",BI.MultiSelectCheckSelectedSwitcher),BI.MultiSelectInsertList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectInsertList.superclass._init.apply(this,arguments);var 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(),c(),a.fireEvent(BI.MultiSelectInsertList.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.storeValue.type===BI.Selection.Multi&&a.storeValue.value.pushDistinct(b),a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a.adapter.populate(),a._setStartValue(""),a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)}):(a.storeValue.type===BI.Selection.Multi&&a.storeValue.value.pushDistinct(b),a._showAdapter(),a.adapter.setValue(a.storeValue),a.adapter.populate(),a.storeValue.type===BI.Selection.Multi&&a.fireEvent(BI.MultiSelectInsertList.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.MultiSelectInsertList.EVENT_CHANGE)}):a._join(this.getValue(),function(){c(),a.fireEvent(BI.MultiSelectInsertList.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)}),b()}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA},function(a){d._allData=BI.map(a.items,"value"),c(d._allData)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),d.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA,keyword:c.trigger.getKeyword()},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void b()}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),b()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void b()}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.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.map(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.trigger.getKeyword()},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.storeValue.type===BI.Selection.All&&c.storeValue.value.length>=c._count?c.storeValue={type:BI.Selection.Multi,value:[]}:c.storeValue.type===BI.Selection.Multi&&c.storeValue.value.length>=c._count&&(c.storeValue={type:BI.Selection.All,value:[]})}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.MultiSelectList.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectList,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectList.EVENT_CHANGE="BI.MultiSelectList.EVENT_CHANGE",BI.shortcut("bi.multi_select_list",BI.MultiSelectList),BI.MultiSelectTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={value:{}},this.adapter=BI.createWidget({type:"bi.multi_select_tree_popup",itemsCreator:b.itemsCreator}),this.adapter.on(BI.MultiSelectTreePopup.EVENT_CHANGE,function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_tree_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",keywordGetter:function(){return a.searcher.getKeyword()},itemsCreator:function(c,d){c.keyword=a.searcher.getKeyword(),b.itemsCreator(c,d)}}),this.searcherPane.setVisible(!1),this.searcher=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.searcher.getKeyword()})},adapter:this.adapter,popup:this.searcherPane,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){a._showSearcherPane()}},{eventName:BI.Searcher.EVENT_STOP,action:function(){a._showAdapter(),BI.nextTick(function(){a.adapter.populate()})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){a._showAdapter()}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.searcher,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)},resize:function(){},setSelectedValue:function(a){this.storeValue.value=a||{},this.adapter.setSelectedValue(a),this.searcherPane.setSelectedValue(a),this.searcher.setValue({value:a||{}})},setValue:function(a){this.adapter.setValue(a)},stopSearch:function(){this.searcher.stopSearch()},updateValue:function(a){this.adapter.updateValue(a)},getValue:function(){return this.storeValue.value},populate:function(){this.searcher.populate.apply(this.searcher,arguments),this.adapter.populate.apply(this.adapter,arguments)}}),BI.MultiSelectTree.EVENT_CHANGE="BI.MultiSelectTree.EVENT_CHANGE",BI.shortcut("bi.multi_select_tree",BI.MultiSelectTree),BI.MultiSelectTreePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree-popup bi-border-left bi-border-right bi-border-bottom",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popup=BI.createWidget({type:"bi.async_tree",element:this,itemsCreator:b.itemsCreator}),this.popup.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_AFTER_INIT)}),this.popup.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_CHANGE)})},hasChecked:function(){return this.popup.hasChecked()},getValue:function(){return this.popup.getValue()},setValue:function(a){a||(a={}),this.popup.setValue(a)},setSelectedValue:function(a){a||(a={}),this.popup.setSelectedValue(a)},updateValue:function(a){this.popup.updateValue(a),this.popup.refresh()},populate:function(a){this.popup.stroke(a)}}),BI.MultiSelectTreePopup.EVENT_AFTER_INIT="BI.MultiSelectTreePopup.EVENT_AFTER_INIT",BI.MultiSelectTreePopup.EVENT_CHANGE="BI.MultiSelectTreePopup.EVENT_CHANGE",BI.shortcut("bi.multi_select_tree_popup",BI.MultiSelectTreePopup),BI.MultiTreeCheckPane=BI.inherit(BI.Pane,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-pane bi-background",onClickContinueSelect:BI.emptyFn})},_init:function(){BI.MultiTreeCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={};var c=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-tree-check-selected"});c.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect(),BI.nextTick(function(){a.empty()})});var d=BI.createWidget({type:"bi.left",cls:"multi-tree-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:c,lgap:this.constants.lgap,tgap:this.constants.tgap}]});this.display=BI.createWidget({type:"bi.display_tree",cls:"bi-multi-tree-display",itemsCreator:function(a,c){a.type=BI.TreeView.REQ_TYPE_GET_SELECTED_DATA,b.itemsCreator(a,c)},value:(b.value||{}).value}),this.display.on(BI.Events.AFTERINIT,function(){a.fireEvent(BI.Events.AFTERINIT)}),this.display.on(BI.TreeView.EVENT_INIT,function(){d.setVisible(!1)}),this.display.on(BI.TreeView.EVENT_AFTERINIT,function(){d.setVisible(!0)}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:d},{height:"fill",el:this.display}]})},empty:function(){this.display.empty()},populate:function(a){this.display.stroke(a)},setValue:function(a){a||(a={}),this.display.setSelectedValue(a.value)},getValue:function(){}}),BI.MultiTreeCheckPane.EVENT_CONTINUE_CLICK="EVENT_CONTINUE_CLICK",BI.shortcut("bi.multi_tree_check_pane",BI.MultiTreeCheckPane),BI.MultiTreeCombo=BI.inherit(BI.Single,{constants:{offset:{top:1,left:1,right:2,bottom:33}},_defaultConfig:function(){return BI.extend(BI.MultiTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-combo",itemsCreator:BI.emptyFn,height:25})},_init:function(){function a(){h()?b.storeValue={value:b.trigger.getValue()}:i()&&(b.storeValue={value:b.combo.getValue()}),b.trigger.setValue(b.storeValue)}BI.MultiTreeCombo.superclass._init.apply(this,arguments);var b=this,c=this.options,d=!1,e=!1;this.storeValue={value:c.value||{}},this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:c.height,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_tree_searcher",itemsCreator:c.itemsCreator},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",itemsCreator:c.itemsCreator}},value:{value:c.value||{}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){b.popup=this,b.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){b.trigger.getCounter().adjustView(),d=!0,e===!0&&a()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){f=!0;var a={type:BI.Selection.Multi,value:this.hasChecked()?this.getValue():{}};b.trigger.getSearcher().setState(a),b.trigger.getCounter().setButtonChecked(a)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){b.combo.hideView(); +}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){g=!0,b.setValue(),b._defaultState()}}],itemsCreator:c.itemsCreator,onLoaded:function(){BI.nextTick(function(){b.trigger.getCounter().adjustView(),b.trigger.getSearcher().adjustView()})}},value:{value:c.value||{}},hideChecker:function(a){return 0===j.element.find(a.target).length}});var f=!1,g=!1,h=function(){return b.trigger.getSearcher().isSearching()},i=function(){return b.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){b.storeValue={value:b.combo.getValue()},this.setValue(b.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){b.storeValue={value:this.getValue()},b.combo.setValue(b.storeValue),BI.nextTick(function(){i()&&b.combo.populate()})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){e===!1&&(e=!0),d===!0&&(e=null,a())}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){b.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){b.combo.isViewVisible()||b.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var a=this.getSearcher().hasChecked(),b={type:BI.Selection.Multi,value:a?{1:1}:{}};this.getSearcher().setState(a?BI.Selection.Multi:BI.Selection.None),this.getCounter().setButtonChecked(b)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){h()||(f===!0&&(b.storeValue={value:b.combo.getValue()},f=!1),b.combo.setValue(b.storeValue),b.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){h()?(b.trigger.stopEditing(),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)):i()&&(b.trigger.stopEditing(),b.storeValue={value:b.combo.getValue()},g===!0&&(b.storeValue={value:{}}),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)),g=!1,f=!1});var j=BI.createWidget({type:"bi.trigger_icon_button",width:c.height,height:c.height,cls:"multi-select-trigger-icon-button"});j.on(BI.TriggerIconButton.EVENT_CHANGE,function(){b.trigger.getCounter().hideView(),b.combo.isViewVisible()?b.combo.hideView():b.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:j,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},setValue:function(a){this.storeValue.value=a||{},this.combo.setValue({value:a||{}})},getValue:function(){return this.storeValue.value},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeCombo.EVENT_CONFIRM="MultiTreeCombo.EVENT_CONFIRM",BI.shortcut("bi.multi_tree_combo",BI.MultiTreeCombo),BI.MultiTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-popup",maxWidth:"auto",minWidth:100,maxHeight:400,onLoaded:BI.emptyFn})},_init:function(){BI.MultiTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={},this.tree=BI.createWidget({type:"bi.async_tree",height:400,cls:"popup-view-tree",itemsCreator:b.itemsCreator,onLoaded:b.onLoaded,value:b.value||{}}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",element:this,stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.tree}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CONFIRM)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreePopup.EVENT_CHANGE)}),this.tree.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiTreePopup.EVENT_AFTERINIT)})},getValue:function(){return this.tree.getValue()},setValue:function(a){a||(a={}),this.tree.setSelectedValue(a.value)},populate:function(a){this.tree.stroke(a)},hasChecked:function(){return this.tree.hasChecked()},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreePopup.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreePopup.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreePopup.EVENT_AFTERINIT="EVENT_AFTERINIT",BI.shortcut("bi.multi_tree_popup_view",BI.MultiTreePopup),BI.MultiTreeSearchPane=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-search-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiTreeSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.partTree=BI.createWidget({type:"bi.part_tree",element:this,tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(a,c){a.keyword=b.keywordGetter(),b.itemsCreator(a,c)},value:b.value}),this.partTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.partTree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearchPane.EVENT_CHANGE)})},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_tree_search_pane",BI.MultiTreeSearchPane),BI.MultiTreeCheckSelectedButton=BI.inherit(BI.Single,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-selected-button",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiTreeCheckSelectedButton.superclass._init.apply(this,arguments);var a=this;this.indicator=BI.createWidget({type:"bi.icon_button",cls:"check-font trigger-check-selected",width:15,height:15,stopPropagation:!0}),this.checkSelected=BI.createWidget({type:"bi.text_button",cls:"trigger-check-selected",invisible:!0,hgap:4,text:this._const.checkSelected,textAlign:"center",textHeight:15}),this.checkSelected.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.checkSelected.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.horizontal",element:this,items:[this.indicator,this.checkSelected]}),this.element.hover(function(){a.indicator.setVisible(!1),a.checkSelected.setVisible(!0)},function(){a.indicator.setVisible(!0),a.checkSelected.setVisible(!1)}),this.setVisible(!1)},setValue:function(a){a||(a={}),this.setVisible(BI.size(a.value)>0)}}),BI.MultiTreeCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_tree_check_selected_button",BI.MultiTreeCheckSelectedButton),BI.MultiTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",height:b.height}}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_CHANGE,arguments)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){function b(a){var c="",d=0,e=BI.size(a);return BI.each(a,function(a,f){d++;var g=b(f);c+=a+(""===g?"":":"+g)+(d===e?"":",")}),c}if(a||(a={}),a.value||(a.value={}),BI.isNumber(a))this.editor.setState(a);else if(0===BI.size(a.value))this.editor.setState(BI.Selection.None);else{var c="";BI.each(a.value,function(a,d){var e=b(d);c+=a+(""===e?"":":"+e)+"; "}),this.editor.setState(c)}},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearcher.EVENT_START="EVENT_START",BI.MultiTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_tree_searcher",BI.MultiTreeSearcher),BI.NumberEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-number-editor bi-border",validationChecker:function(){return!0},valueFormatter:function(a){return a},value:0,allowBlank:!1,errorText:"",step:1})},_init:function(){BI.NumberEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,allowBlank:b.allowBlank,value:b.valueFormatter(b.value),validationChecker:b.validationChecker,errorText:b.errorText}),this.editor.on(BI.TextEditor.EVENT_CHANGE,function(){b.value=this.getValue(),a.fireEvent(BI.NumberEditor.EVENT_CHANGE)}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){this.setValue(BI.parseFloat(this.getValue())),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",cls:"column-pre-page-h-font top-button bi-border-left bi-border-bottom"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",cls:"column-next-page-h-font bottom-button bi-border-left bi-border-top"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),BI.createWidget({type:"bi.htape",element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:23}]})},focus:function(){this.editor.focus()},_finetuning:function(a){var b=BI.parseFloat(this.getValue());this.setValue(b.add(a))},setUpEnable:function(a){this.topBtn.setEnable(!!a)},setDownEnable:function(a){this.bottomBtn.setEnable(!!a)},getValue:function(){return this.options.value},setValue:function(a){var b=this.options;b.value=a,this.editor.setValue(b.valueFormatter(a))}}),BI.NumberEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberEditor.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.number_editor",BI.NumberEditor),BI.NumberInterval=BI.inherit(BI.Single,{constants:{typeError:"typeBubble",numberError:"numberBubble",signalError:"signalBubble",editorWidth:114,columns:5,width:30,rows:1,numberErrorCls:"number-error",border:1,less:0,less_equal:1,numTip:""},_defaultConfig:function(){var a=BI.NumberInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-number-interval",height:25,validation:"valid"})},_init:function(){var a=this,b=this.constants,c=this.options;BI.NumberInterval.superclass._init.apply(this,arguments),this.smallEditor=BI.createWidget({type:"bi.editor",height:c.height-2,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,value:c.min,level:"warning",tipType:"warning",quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.smallEditorBubbleType=b.typeError,!1)},cls:"number-interval-small-editor bi-border-top bi-border-bottom bi-border-left"}),this.smallTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.smallEditor.element,items:[{el:this.smallTip,top:0,right:5}]}),this.bigEditor=BI.createWidget({type:"bi.editor",height:c.height-2,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,value:c.max,level:"warning",tipType:"warning",quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.bigEditorBubbleType=b.typeError,!1)},cls:"number-interval-big-editor bi-border-top bi-border-bottom bi-border-right"}),this.bigTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.bigEditor.element,items:[{el:this.bigTip,top:0,right:5}]}),this.smallCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-small-combo bi-border",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closemin===!0?this.smallCombo.setValue(1):this.smallCombo.setValue(0),this.bigCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-big-combo bi-border",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closemax===!0?this.bigCombo.setValue(1):this.bigCombo.setValue(0),this.label=BI.createWidget({type:"bi.label",text:BI.i18nText("BI-Basic_Value"),textHeight:c.height-2*b.border,width:b.width-2*b.border,height:c.height-2*b.border,level:"warning",tipType:"warning"}),this.left=BI.createWidget({type:"bi.htape",items:[{el:a.smallEditor},{el:a.smallCombo,width:b.width-2*b.border}]}),this.right=BI.createWidget({type:"bi.htape",items:[{el:a.bigCombo,width:b.width-2*b.border},{el:a.bigEditor}]}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:c.height,items:[{type:"bi.absolute",items:[{el:a.left,left:-15,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:-15,top:0,bottom:0}]}]}),BI.createWidget({element:a,type:"bi.horizontal_auto",items:[a.label]}),a._setValidEvent(a.bigEditor,b.bigEditor),a._setValidEvent(a.smallEditor,b.smallEditor),a._setErrorEvent(a.bigEditor,b.bigEditor),a._setErrorEvent(a.smallEditor,b.smallEditor),a._setBlurEvent(a.bigEditor),a._setBlurEvent(a.smallEditor),a._setFocusEvent(a.bigEditor),a._setFocusEvent(a.smallEditor),a._setComboValueChangedEvent(a.bigCombo),a._setComboValueChangedEvent(a.smallCombo),a._setEditorValueChangedEvent(a.bigEditor),a._setEditorValueChangedEvent(a.smallEditor)},_checkValidation:function(){var a=this,b=this.constants,c=this.options;if(a._setTitle(""),BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),!a.smallEditor.isValid()||!a.bigEditor.isValid())return a.element.removeClass("number-error"),c.validation="invalid",b.typeError;if(BI.isEmptyString(a.smallEditor.getValue())||BI.isEmptyString(a.bigEditor.getValue()))return a.element.removeClass("number-error"),c.validation="valid","";var d=parseFloat(a.smallEditor.getValue()),e=parseFloat(a.bigEditor.getValue()),f=a.bigCombo.getValue(),g=a.smallCombo.getValue();return f[0]===b.less_equal&&g[0]===b.less_equal?d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):(a.element.removeClass("number-error"),c.validation="valid",""):d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):d===e?(a.element.addClass("number-error"),c.validation="invalid",b.signalError):(a.element.removeClass("number-error"),c.validation="valid","")},_setTitle:function(a){var b=this;b.bigEditor.setTitle(a),b.smallEditor.setTitle(a),b.label.setTitle(a)},_setFocusEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_FOCUS,function(){switch(b._setTitle(""),b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{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"});break;default:return}})},_setBlurEvent:function(a){var b=this.constants,c=this;a.on(BI.Editor.EVENT_BLUR,function(){switch(BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),c._checkValidation()){case b.typeError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));break;case b.numberError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));break;case b.signalError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));break;default:c._setTitle("")}})},_setErrorEvent:function(a){var b=this.constants,c=this;a.on(BI.Editor.EVENT_ERROR,function(){c._checkValidation(),BI.Bubbles.show(b.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),c,{offsetStyle:"center"}),c.fireEvent(BI.NumberInterval.EVENT_ERROR)})},_setValidEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_VALID,function(){switch(b._checkValidation()){case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumberInterval.EVENT_VALID)}})},_setEditorValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{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,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)}),this.pager=BI.createWidget(b.pager,{type:"bi.direction_pager",height:30}),this.pager.on(BI.Pager.EVENT_CHANGE,function(){var c=this.getVPage&&this.getVPage();BI.isNull(c)&&(c=this.getCurrentPage());var d=this.getHPage&&this.getHPage();b.itemsCreator({vpage:c,hpage:d},function(b,e,f,g){a.table.setVPage?a.table.setVPage(c):a.table.setValue(c),a.table.setHPage&&a.table.setHPage(d),a.populate.apply(a,arguments)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.table,left:0,top:0},{el:this.pager,left:0,right:0,bottom:0}]})},setHPage:function(a){this.hCurr=a,this.pager.setHPage&&this.pager.setHPage(a),this.table.setHPage&&this.table.setHPage(a)},setVPage:function(a){this.vCurr=a,this.pager.setVPage&&this.pager.setVPage(a),this.table.setVPage&&this.table.setVPage(a)},getHPage:function(){var a=this.pager.getHPage&&this.pager.getHPage();return BI.isNotNull(a)?a:(a=this.pager.getCurrentPage&&this.pager.getCurrentPage(),BI.isNotNull(a)?a:this.hpage)},getVPage:function(){var a=this.pager.getVPage&&this.pager.getVPage();return BI.isNotNull(a)?a:(a=this.pager.getCurrentPage&&this.pager.getCurrentPage(),BI.isNotNull(a)?a:this.vpage)},setWidth:function(a){BI.PageTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.PageTable.superclass.setHeight.apply(this,arguments);var b=!1;this.pager.alwaysShowPager?b=!0:this.pager.hasHNext&&this.pager.hasHNext()?b=!0:this.pager.hasHPrev&&this.pager.hasHPrev()?b=!0:this.pager.hasVNext&&this.pager.hasVNext()?b=!0:this.pager.hasVPrev&&this.pager.hasVPrev()?b=!0:this.pager.hasNext&&this.pager.hasNext()?b=!0:this.pager.hasPrev&&this.pager.hasPrev()&&(b=!0),this.table.setHeight(a-(b?30:0))},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.columnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getVerticalScroll:function(){return this.table.getVerticalScroll()},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},restore:function(){this.table.restore()},attr:function(){BI.PageTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},populate:function(){this.pager.populate(),this.table.populate.apply(this.table,arguments)},destroy:function(){this.table.destroy(),this.pager&&this.pager.destroy(),BI.PageTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.page_table",BI.PageTable),BI.PreviewTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table-cell",text:""})},_init:function(){BI.PreviewTableCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.preview_table_cell",BI.PreviewTableCell),BI.PreviewTableHeaderCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTableHeaderCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table-header-cell",text:""})},_init:function(){BI.PreviewTableHeaderCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.preview_table_header_cell",BI.PreviewTableHeaderCell),BI.PreviewTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table",isNeedFreeze:!1,freezeCols:[],rowSize:null,columnSize:[],headerRowSize:30,header:[],items:[]})},_init:function(){BI.PreviewTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.table=BI.createWidget({type:"bi.table_view",element:this,isNeedResize:!1,isResizeAdapt:!1,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,rowSize:b.rowSize,columnSize:b.columnSize,headerRowSize:b.headerRowSize,header:BI.map(b.header,function(a,b){return BI.map(b,function(a,b){return BI.extend({type:"bi.preview_table_header_cell"},b)})}),items:BI.map(b.items,function(a,b){return BI.map(b,function(a,b){return BI.extend({type:"bi.preview_table_cell"},b)})})}),this.table.on(BI.Table.EVENT_TABLE_AFTER_INIT,function(){a._adjustColumns(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT,arguments)}),this.table.on(BI.Table.EVENT_TABLE_RESIZE,function(){a._adjustColumns()})},_hasAdaptCol:function(a){return BI.any(a,function(a,b){return""===b})},_isPercentage:function(a){return a[0]<=1},_adjustColumns:function(){var a=this.options;if(a.isNeedFreeze===!0){if(this._isPercentage(a.columnSize)){if(this._hasAdaptCol(a.columnSize)){var b=[],c=0;BI.each(a.columnSize,function(a,d){""===d?b.push(a):c+=d}),c=1-c;var d=c/b.length;BI.each(b,function(b,c){a.columnSize[c]=d})}var e=0!==BI.first(a.freezeCols),f=[],g=[];BI.each(a.columnSize,function(b,c){a.freezeCols.contains(b)?f.push(c):g.push(c)});var h=BI.sum(f),i=BI.sum(g);BI.each(f,function(a,b){f[a]=b/h}),BI.each(g,function(a,b){g[a]=b/i}),this.table.setRegionColumnSize(e?["fill",h]:[h,"fill"]),this.table.setColumnSize(e?g.concat(f):f.concat(g))}}else(this._hasAdaptCol(a.columnSize)||this._isPercentage(a.columnSize))&&this.table.setRegionColumnSize(["100%"])},setColumnSize:function(a){return this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){return this.table.setHeaderColumnSize(a)},setRegionColumnSize:function(a){return this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},setVerticalScroll:function(a){return this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){return this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){return this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},getColumns:function(){return this.table.getColumns()},populate:function(a,b){this.table.populate(a,b)}}),BI.PreviewTable.EVENT_CHANGE="PreviewTable.EVENT_CHANGE",BI.shortcut("bi.preview_table",BI.PreviewTable),BI.QuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-combo",behaviors:{},height:25})},_init:function(){BI.QuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.quarter_trigger",value:b.value}),this.trigger.on(BI.QuarterTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.QuarterTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.QuarterTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(), +a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM))}),this.popup=BI.createWidget({type:"bi.quarter_popup",behaviors:b.behaviors,value:b.value}),this.popup.on(BI.QuarterPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.QuarterCombo.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.QuarterCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return BI.isNull(this.popup)?this.options.value||"":this.popup.getValue()||""}}),BI.QuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.quarter_combo",BI.QuarterCombo),BI.QuarterPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-popup",behaviors:{}})},_init:function(){BI.QuarterPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[{text:Date._QN[1],value:1},{text:Date._QN[2],value:2},{text:Date._QN[3],value:3},{text:Date._QN[4],value:4}];c=BI.map(c,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"left",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:25})}),this.quarter=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(c,{}),layouts:[{type:"bi.vertical"}],value:b.value}),this.quarter.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.quarter.getValue()[0]},setValue:function(a){this.quarter.setValue([a])}}),BI.QuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quarter_popup",BI.QuarterPopup),BI.QuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,textWidth:40,errorText:BI.i18nText("BI-Quarter_Trigger_Error_Text")},_defaultConfig:function(){return BI.extend(BI.QuarterTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-quarter-trigger bi-border",height:24})},_init:function(){BI.QuarterTrigger.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<=4},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.QuarterTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.QuarterTrigger.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.QuarterTrigger.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.QuarterTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.QuarterTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-quarter-text",text:BI.i18nText("BI-Multi_Date_Quarter"),width:c.textWidth},width:c.textWidth},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]}),this.setValue(b.value)},setValue:function(a){a=a||"",this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return this.editor.getValue()}}),BI.QuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.QuarterTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.QuarterTrigger.EVENT_START="EVENT_START",BI.QuarterTrigger.EVENT_STOP="EVENT_STOP",BI.QuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.quarter_trigger",BI.QuarterTrigger),BI.ResponisveTable=BI.inherit(BI.Widget,{_const:{perColumnSize:100},_defaultConfig:function(){return BI.extend(BI.ResponisveTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-responsive-table",isNeedFreeze:!1,freezeCols:[],logic:{dynamic:!1},isNeedMerge:!1,mergeCols:[],mergeRule:function(a,b){return BI.isEqual(a,b)},columnSize:[],headerRowSize:25,footerRowSize:25,rowSize:25,regionColumnSize:!1,header:[],footer:!1,items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.ResponisveTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.table=BI.createWidget({type:"bi.table_view",element:this,logic:b.logic,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,headerRowSize:b.headerRowSize,footerRowSize:b.footerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:b.header,footer:b.footer,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_AFTER_INIT,function(){a._initRegionSize(),a.table.resize(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT,arguments)}),this.table.on(BI.Table.EVENT_TABLE_RESIZE,function(){a._resizeRegion(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE,function(){a.fireEvent(BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_REGION_RESIZE,function(){b.isNeedResize===!0&&a._isAdaptiveColumn()&&a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE,function(){a._resizeBody(),a.fireEvent(BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_COLUMN_RESIZE,function(){a.fireEvent(BI.Table.EVENT_TABLE_COLUMN_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){a._resizeRegion(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_initRegionSize:function(){var a=this.options;if(a.isNeedFreeze===!0){var b=this.table.getRegionColumnSize(),c=this.table.element.width();if(!b[0]||"fill"===b[0]||b[0]>c||b[1]>c){var d=a.freezeCols;if(0===d.length)this.table.setRegionColumnSize([0,"fill"]);else if(d.length>0&&d.lengtha.columnSize.length/2&&(e=2*c/3),this.table.setRegionColumnSize([e,"fill"])}else this.table.setRegionColumnSize(["fill",0])}}},_getBlockSize:function(){var a=this.options,b=this.table.getCalculateColumnSize();if(a.isNeedFreeze===!0){var c=[],d=[];BI.each(b,function(b,e){a.freezeCols.contains(b)?c.push(e):d.push(e)});var e=BI.sum(c)+c.length,f=BI.sum(d)+d.length;return{sumLeft:e,sumRight:f,left:c,right:d}}return{size:b,sum:BI.sum(b)+b.length}},_isAdaptiveColumn:function(a){return!(BI.last(a||this.table.getColumnSize())>1.05)},_resizeHeader:function(){var a=this,b=this.options;if(b.isNeedFreeze===!0)if(this._isAdaptiveColumn()){var c=this.table.getCalculateColumnSize();this.table.setHeaderColumnSize(c)}else{var d=this.table.getClientRegionColumnSize(),e=this._getBlockSize(),f=e.sumLeft,g=e.sumRight,h=e.left,i=e.right;h[h.length-1]+=d[0]-f,i[i.length-1]+=d[1]-g;var j=BI.clone(h),k=BI.clone(i);j[j.length-1]="",k[k.length-1]="",this.table.setColumnSize(j.concat(k)),e=a._getBlockSize(),h[h.length-1]0&&a.freezeCols.length=d+e)&&this.table.setRegionColumnSize([d,"fill"]),this._resizeRegion()}},_resizeRegion:function(){var a=this.options,b=this.table.getCalculateRegionColumnSize();if(a.isNeedFreeze===!0&&a.freezeCols.length>0&&a.freezeCols.lengtha.columnSize.length/2&&(e=2*c/3),this.table.setRegionColumnSize([e,"fill"])}}},resize:function(){this.table.resize(),this._resizeRegion(),this._resizeHeader()},setColumnSize:function(a){this.table.setColumnSize(a),this._adjustRegion(),this._resizeHeader()},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){this.table.setHeaderColumnSize(a),this._adjustRegion(),this._resizeHeader()},setRegionColumnSize:function(a){this.table.setRegionColumnSize(a),this._resizeHeader()},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},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()},getColumns:function(){return this.table.getColumns()},attr:function(){BI.ResponisveTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},populate:function(a){var b=this,c=this.options;this.table.populate.apply(this.table,arguments),c.isNeedFreeze===!0&&BI.nextTick(function(){b._initRegionSize(),b.table.resize(),b._resizeHeader()})}}),BI.shortcut("bi.responsive_table",BI.ResponisveTable),BI.SelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-first-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.first_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_first_plus_group_node",BI.SelectTreeFirstPlusGroupNode),BI.SelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-last-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.last_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_last_plus_group_node",BI.SelectTreeLastPlusGroupNode),BI.SelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-mid-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.mid_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_mid_plus_group_node",BI.SelectTreeMidPlusGroupNode),BI.SelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-combo",height:30,text:"",items:[],value:""})},_init:function(){BI.SelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value}),this.popup=BI.createWidget({type:"bi.select_level_tree",items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView()})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.shortcut("bi.select_tree_combo",BI.SelectTreeCombo),BI.SelectTreeExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-expander",trigger:"click",toggle:!0,direction:"bottom",isDefaultInit:!0,el:{},popup:{}})},_init:function(){BI.SelectTreeExpander.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({stopPropagation:!0},b.el)),this.trigger.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&this.isSelected()&&a.expander.setValue([]),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.expander=BI.createWidget({type:"bi.expander",element:this,trigger:b.trigger,toggle:b.toggle,direction:b.direction,isDefaultInit:b.isDefaultInit,el:this.trigger,popup:b.popup}),this.expander.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.trigger.setSelected(!1),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){BI.contains(a,this.trigger.getValue())?(this.trigger.setSelected(!0),this.expander.setValue([])):(this.trigger.setSelected(!1),this.expander.setValue(a))},getValue:function(){return this.trigger.isSelected()?[this.trigger.getValue()]:this.expander.getValue()},populate:function(a){this.expander.populate(a)}}),BI.shortcut("bi.select_tree_expander",BI.SelectTreeExpander),BI.SelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-level-tree",tipText:BI.i18nText("BI-No_Selected_Item"),items:[],value:""})},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={layer:b};if(e.id=e.id||BI.UUID(),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.select_tree_first_plus_group_node";break;case a.length-1:f.type="bi.select_tree_last_plus_group_node";break;default:f.type="bi.select_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children)}else{switch(d){case a.length-1:f.type="bi.last_tree_leaf_item";break;default:f.type="bi.mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_init:function(){BI.SelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{type:"bi.select_tree_expander",isDefaultInit:!0},items:this._formatItems(BI.Tree.transformToTreeFormat(b.items)),value:b.value,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SelectTreePopup.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.SelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a)))}}),BI.SelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_level_tree",BI.SelectTreePopup),BI.SequenceTableDynamicNumber=BI.inherit(BI.SequenceTableTreeNumber,{_defaultConfig:function(){return BI.extend(BI.SequenceTableDynamicNumber.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-sequence-table-dynamic-number"})},_init:function(){BI.SequenceTableDynamicNumber.superclass._init.apply(this,arguments)},_formatNumber:function(a){function b(a){var c=0;return BI.isNotEmptyArray(a.children)?(BI.each(a.children,function(a,d){c+=b(d)}),a.children.length>1&&BI.isNotEmptyArray(a.values)&&c++):c++,c}var c=this.options,d=[],e=this._getStart(a),f=0,g=0;return BI.each(a,function(a,h){BI.isArray(h.children)&&(BI.each(h.children,function(a,h){var i=b(h);d.push({text:e++,start:f,top:g,cnt:i,index:a,height:i*c.rowSize}),f+=i,g+=i*c.rowSize}),BI.isNotEmptyArray(h.values)&&(d.push({text:BI.i18nText("BI-Summary_Values"),start:f++,top:g,cnt:1,isSummary:!0,height:c.rowSize}),g+=c.rowSize))}),d}}),BI.shortcut("bi.sequence_table_dynamic_number",BI.SequenceTableDynamicNumber),BI.SequenceTableListNumber=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTableListNumber.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table-list-number",isNeedFreeze:!1,scrollTop:0,startSequence:1,headerRowSize:25,rowSize:25,sequenceHeaderCreator:null,header:[],items:[],crossHeader:[],crossItems:[],pageSize:20})},_init:function(){BI.SequenceTableListNumber.superclass._init.apply(this,arguments);var a=this.options;this.start=a.startSequence,this.renderedCells=[],this.renderedKeys=[],this.container=BI.createWidget({type:"bi.absolute",width:60,scrollable:!1}),this.scrollContainer=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.container]}),this.headerContainer=BI.createWidget({type:"bi.absolute",cls:"bi-border",width:58,scrollable:!1}),this.layout=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.headerContainer,height:a.headerRowSize*a.header.length-2},{el:{type:"bi.layout"},height:2},{el:this.scrollContainer}]}),this._populate()},_layout:function(){var a=this.options,b=a.headerRowSize*a.header.length-2,c=this.layout.attr("items");a.isNeedFreeze===!1?(c[0].height=0,c[1].height=0):a.isNeedFreeze===!0&&(c[0].height=b,c[1].height=2),this.layout.attr("items",c),this.layout.resize(),this.container.setHeight(a.items.length*a.rowSize);try{this.scrollContainer.element.scrollTop(a.scrollTop)}catch(d){}},_createHeader:function(){var a=this.options;BI.createWidget({type:"bi.absolute",element:this.headerContainer,items:[{el:a.sequenceHeaderCreator||{type:"bi.table_style_cell",cls:"sequence-table-title-cell",styleGetter:a.headerCellStyleGetter,text:BI.i18nText("BI-Number_Index")},left:0,top:0,right:0,bottom:0}]})},_calculateChildrenToRender:function(){for(var a=this,b=this.options,c=BI.clamp(b.scrollTop,0,b.rowSize*b.items.length-(b.height-b.header.length*b.headerRowSize)+BI.DOM.getScrollWidth()),d=Math.floor(c/b.rowSize),e=d+Math.floor((b.height-b.header.length*b.headerRowSize)/b.rowSize),f=[],g=[],h=d,i=0;h<=e&&h-1)b.rowSize!==this.renderedCells[j]._height&&(this.renderedCells[j]._height=b.rowSize,this.renderedCells[j].el.setHeight(b.rowSize)),this.renderedCells[j].top!==k&&(this.renderedCells[j].top=k,this.renderedCells[j].el.element.css("top",k+"px")),f.push(this.renderedCells[j]);else{var l=BI.createWidget(BI.extend({type:"bi.table_style_cell",cls:"sequence-table-number-cell bi-border-left bi-border-right bi-border-bottom",width:60,height:b.rowSize,text:this.start+h,styleGetter:function(c){return function(){return b.sequenceCellStyleGetter(a.start+h-1)}}(i)}));f.push({el:l,left:0,top:k,_height:b.rowSize})}g.push(this.start+h)}var m={},n={},o=[];BI.each(g,function(b,c){BI.deepContains(a.renderedKeys,c)?m[b]=c:n[b]=c}),BI.each(this.renderedKeys,function(a,b){BI.deepContains(m,b)||BI.deepContains(n,b)||o.push(a)}),BI.each(o,function(b,c){a.renderedCells[c].el.destroy()});var p=[];BI.each(n,function(a){p.push(f[a])}),BI.createWidget({type:"bi.absolute",element:this.container,items:p}),this.renderedCells=f,this.renderedKeys=g},_populate:function(){this.headerContainer.empty(),this._createHeader(),this._layout(),this._calculateChildrenToRender()},setVerticalScroll:function(a){if(this.options.scrollTop!==a){this.options.scrollTop=a;try{this.scrollContainer.element.scrollTop(a)}catch(b){}}},getVerticalScroll:function(){return this.options.scrollTop},setVPage:function(a){a=a<1?1:a;var b=this.options;this.start=(a-1)*b.pageSize+1},_restore:function(){this.options;BI.each(this.renderedCells,function(a,b){b.el.destroy()}),this.renderedCells=[],this.renderedKeys=[]},restore:function(){this._restore()},populate:function(a,b){var c=this.options;a&&a!==this.options.items&&(c.items=a,this._restore()),b&&b!==this.options.header&&(c.header=b),this._populate()}}),BI.shortcut("bi.sequence_table_list_number",BI.SequenceTableListNumber),BI.SequenceTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table",el:{type:"bi.adaptive_table"},sequence:{},isNeedResize:!0,isResizeAdapt:!1,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:[],showSequence:!1,startSequence:1})},_init:function(){BI.SequenceTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.sequence=BI.createWidget(b.sequence,{type:"bi.sequence_table_list_number",invisible:b.showSequence===!1,startSequence:b.startSequence,isNeedFreeze:b.isNeedFreeze,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems,headerRowSize:b.headerRowSize,rowSize:b.rowSize,width:60,height:b.height&&b.height-BI.GridTableScrollbar.SIZE,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter}),this.table=BI.createWidget(b.el,{type:"bi.adaptive_table",width:b.showSequence===!0?b.width-60:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(b){a.sequence.getVerticalScroll()!==this.getVerticalScroll()&&(a.sequence.setVerticalScroll(this.getVerticalScroll()),a.sequence.populate()),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)}),this.htape=BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.sequence,left:0,top:0},{el:this.table,top:0,left:b.showSequence===!0?60:0}]}),this._populate()},_populate:function(){var a=this.options;a.showSequence===!0?(this.sequence.setVisible(!0),this.table.element.css("left","60px"),this.table.setWidth(a.width-60)):(this.sequence.setVisible(!1),this.table.element.css("left","0px"),this.table.setWidth(a.width))},setWidth:function(a){BI.PageTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(this.options.showSequence?a-60:a)},setHeight:function(a){BI.PageTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a),this.sequence.setHeight(a-BI.GridTableScrollbar.SIZE)},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.columnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},hasLeftHorizontalScroll:function(){return this.table.hasLeftHorizontalScroll()},hasRightHorizontalScroll:function(){return this.table.hasRightHorizontalScroll()},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a),this.sequence.setVerticalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},setVPage:function(a){this.sequence.setVPage&&this.sequence.setVPage(a)},setHPage:function(a){this.sequence.setHPage&&this.sequence.setHPage(a)},attr:function(){BI.SequenceTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments),this.sequence.attr.apply(this.sequence,arguments)},restore:function(){this.table.restore(),this.sequence.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d),this._populate(),this.table.populate.apply(this.table,arguments),this.sequence.populate.apply(this.sequence,arguments),this.sequence.setVerticalScroll(this.table.getVerticalScroll())},destroy:function(){this.table.destroy(),BI.SequenceTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.sequence_table",BI.SequenceTable),BI.SingleSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.single_select_list",element:this,logic:{dynamic:!1},value:b.value,el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map([a.storeValue],function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d,selected:!1}});h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.single_select_radio_item",logic:{dynamic:!1},height:25,selected:!1})},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=BI.deepClone(a.value)||[],e=BI.map(d,function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.match.concat(f.find)}return BI.map(d,function(a,b){return{text:b.text,title:b.text,value:b.value,selected:!1}})},setValue:function(a){this.storeValue=a,this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){ +this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SingleSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_loader",BI.SingleSelectSearchLoader),BI.SingleSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"single-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.single_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_pane",BI.SingleSelectSearchPane),BI.SingleSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_init:function(){BI.SingleSelectCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue),a.trigger.getSearcher().setState(a.storeValue)};this.storeValue=b.value||"",this.requesting=!1,this.trigger=BI.createWidget({type:"bi.single_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(a.getValue()),d.apply(a,arguments)})},value:this.storeValue}),this.trigger.on(BI.SingleSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.SingleSelectTrigger.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.SingleSelectTrigger.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.SingleSelectTrigger.EVENT_CHANGE,function(b,d){a.storeValue=this.getValue(),c()}),this.trigger.on(BI.SingleSelectTrigger.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.single_select_popup_view",ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.SingleSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c()})}},{eventName:BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){a._defaultState()}},{eventName:BI.SingleSelectPopupView.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.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length},value:b.value}),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.SingleSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"single-select-trigger-icon-button"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){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="")},_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.remove(b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||"",this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return this.storeValue},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.SingleSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.single_select_combo",BI.SingleSelectCombo),BI.SingleSelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-list",direction:BI.Direction.Top,logic:{dynamic:!0},items:[],itemsCreator:BI.emptyFn,hasNext:BI.emptyFn,onLoaded:BI.emptyFn,el:{type:"bi.list_pane"}})},_init:function(){BI.SingleSelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.list=BI.createWidget(b.el,{type:"bi.list_pane",items:b.items,itemsCreator:function(c,d){b.itemsCreator(c,function(b){d.apply(a,arguments)})},onLoaded:b.onLoaded,hasNext:b.hasNext,value:b.value}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&a.fireEvent(BI.SingleSelectList.EVENT_CHANGE,c,d),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),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.list)}))))},hasPrev:function(){return this.list.hasPrev()},hasNext:function(){return this.list.hasNext()},prependItems:function(a){this.list.prependItems.apply(this.list,arguments)},addItems:function(a){this.list.addItems.apply(this.list,arguments)},setValue:function(a){this.list.setValue([a])},getValue:function(){return this.list.getValue()[0]},empty:function(){this.list.empty()},populate:function(a){this.list.populate.apply(this.list,arguments)},resetHeight:function(a){this.list.resetHeight?this.list.resetHeight(a):this.list.element.css({"max-height":a+"px"})},setNotSelectedValue:function(){this.list.setNotSelectedValue.apply(this.list,arguments)},getNotSelectedValue:function(){return this.list.getNotSelectedValue()},getAllButtons:function(){return this.list.getAllButtons()},getAllLeaves:function(){return this.list.getAllLeaves()},getSelectedButtons:function(){return this.list.getSelectedButtons()},getNotSelectedButtons:function(){return this.list.getNotSelectedButtons()},getIndexByValue:function(a){return this.list.getIndexByValue(a)},getNodeById:function(a){return this.list.getNodeById(a)},getNodeByValue:function(a){return this.list.getNodeByValue(a)}}),BI.SingleSelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_list",BI.SingleSelectList),BI.SingleSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.single_select_list",element:this,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map([a.storeValue],function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d,selected:!1}});h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&(a.storeValue=f),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.single_select_radio_item",logic:this.options.logic,height:25,selected:!1})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},_assertValue:function(a){a||(a="")},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||"",this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SingleSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_loader",BI.SingleSelectLoader),BI.SingleSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.single_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.SingleSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM)}})},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.SingleSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.SingleSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.single_select_popup_view",BI.SingleSelectPopupView),BI.SingleSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.SingleSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.single_select_searcher",height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker,value:b.value}),this.searcher.on(BI.SingleSelectSearcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_START)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_CHANGE,arguments)});BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:BI.createWidget(),width:30}]})},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch()},setAdapter:function(a){this.searcher.setAdapter(a)},setValue:function(a){this.searcher.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.SingleSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.SingleSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.SingleSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectTrigger.EVENT_START="EVENT_START",BI.SingleSelectTrigger.EVENT_STOP="EVENT_STOP",BI.SingleSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.single_select_trigger",BI.SingleSelectTrigger),BI.SingleSelectEditor=BI.inherit(BI.Widget,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-editor",el:{}})},_init:function(){BI.SingleSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0,value:b.value}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_CLICK_LABEL,function(){})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastValidValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.SingleSelectEditor.EVENT_PAUSE="SingleSelectEditor.EVENT_PAUSE",BI.shortcut("bi.single_select_editor",BI.SingleSelectEditor),BI.SingleSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.SingleSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.single_select_editor",height:b.height}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.single_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),this.setKeyword(c.keyword),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.SingleSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.SingleSelectSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;a||(a=""),""===a?this.editor.setState(BI.Selection.None):this.editor.setState(b.valueFormatter(a+"")||a+"")},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.SingleSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.SingleSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectSearcher.EVENT_START="EVENT_START",BI.SingleSelectSearcher.EVENT_STOP="EVENT_STOP",BI.SingleSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.single_select_searcher",BI.SingleSelectSearcher),BI.SingleSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.single_select_list",element:this,logic:{dynamic:!1},el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map([a.storeValue],function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d,selected:!1}});h=a._createItems(i)}if(g){for(var j=!1,k=0;k0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_add_pane",BI.SingleSelectSearchPane),BI.SingleSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_init:function(){BI.SingleSelectCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue),a.trigger.getSearcher().setState(a.storeValue)};this.storeValue="",this.requesting=!1,this.trigger=BI.createWidget({type:"bi.single_select_add_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(a.getValue()),d.apply(a,arguments)})}}),this.trigger.on(BI.SingleSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.SingleSelectTrigger.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.SingleSelectTrigger.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.SingleSelectTrigger.EVENT_CHANGE,function(b,d){a.storeValue=this.getValue(),c()}),this.trigger.on(BI.SingleSelectTrigger.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.single_select_popup_view",ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.SingleSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c()})}},{eventName:BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){a._defaultState()}},{eventName:BI.SingleSelectPopupView.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.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.SingleSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"single-select-trigger-icon-button"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){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="")},_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.remove(b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||"",this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return this.storeValue},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.SingleSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.single_select_add_combo",BI.SingleSelectCombo),BI.SingleSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.SingleSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.single_select_add_searcher",height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.SingleSelectSearcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_START)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_CHANGE,arguments)});BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:BI.createWidget(), +width:30}]})},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch()},setAdapter:function(a){this.searcher.setAdapter(a)},setValue:function(a){this.searcher.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.SingleSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.SingleSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.SingleSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectTrigger.EVENT_START="EVENT_START",BI.SingleSelectTrigger.EVENT_STOP="EVENT_STOP",BI.SingleSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.single_select_add_trigger",BI.SingleSelectTrigger),BI.SingleSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.SingleSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.single_select_editor",height:b.height}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.single_select_search_add_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),this.setKeyword(c.keyword),b.itemsCreator(c,d)}},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.SingleSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.SingleSelectSearcher.EVENT_SEARCHING,b)})},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;a||(a=""),""===a?this.editor.setState(BI.Selection.None):this.editor.setState(b.valueFormatter(a+"")||a+"")},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.SingleSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.SingleSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectSearcher.EVENT_START="EVENT_START",BI.SingleSelectSearcher.EVENT_STOP="EVENT_STOP",BI.SingleSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.single_select_add_searcher",BI.SingleSelectSearcher),BI.SignTextEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-sign-initial-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",text:"",height:24})},_init:function(){BI.SignTextEditor.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:"sign-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:"left",height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.SignTextEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignTextEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText()}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;BI.nextTick(BI.bind(function(){if(""===this.editor.getValue())this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark");else{var b=this.editor.getValue();b=BI.isEmpty(b)||b==a.text?a.text:b+a.text,this.text.setValue(b),this.text.element.removeClass("bi-water-mark")}},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){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&&ef-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:"100%"},{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[this.label]}],rgap:c.EDITOR_WIDTH,height:c.EDITOR_HEIGHT},top:0,left:0,width:"100%"}]})},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setLabelPosition(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.label.setValue(m),c.value=m,c.fireEvent(BI.SingleSlider.EVENT_CHANGE)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){var b=this.options,c=!1;if(BI.isNumeric(a)&&!(BI.isNull(a)||athis.max))if(b.digit===!1)c=!0;else{var d=(a+"").split(".")[1]||"";c=d.length===b.digit}return c},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setLabelPosition:function(a){this.label.element.css({left:a+"%"})},_setSliderPosition:function(a){this.slider.element.css({left:a+"%"})},_setAllPosition:function(a){this._setSliderPosition(a),this._setLabelPosition(a),this._setBlueTrack(a)},_setVisible:function(a){this.slider.setVisible(a),this.label.setVisible(a)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(a){var b=BI.parseInt(10*a);return(this.max-this.min)*b/1e3+this.min},_getPercentByValue:function(a){return 100*(a-this.min)/(this.max-this.min)},getValue:function(){return this.value},setValue:function(a){var b=this.options;a=BI.parseFloat(a),a=b.digit===!1?a:a.toFixed(b.digit),isNaN(a)||(this._checkValidation(a)&&(this.value=a),a>this.max&&(this.value=this.max),ab&&(this.min=b,this.max=c)},reset:function(){this._setVisible(!1),this.enable=!1,this.value="",this.min=0,this.max=0,this._setBlueTrack(0)},populate:function(){isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,this.label.setErrorText(BI.i18nText("BI-Please_Enter")+this.min+"-"+this.max+BI.i18nText("BI-Basic_De")+BI.i18nText("BI-Basic_Number")),BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?(this.label.setValue(this.value),this._setAllPosition(this._getPercentByValue(this.value))):(this.label.setValue(this.max),this._setAllPosition(100)))}}),BI.SingleSlider.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_slider",BI.SingleSlider),BI.SingleSliderLabel=BI.inherit(BI.Widget,{_constant:{EDITOR_WIDTH:90,EDITOR_HEIGHT:20,HEIGHT:20,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},_defaultConfig:function(){return BI.extend(BI.SingleSliderLabel.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-slider-label bi-slider-track",digit:!1,unit:""})},_init:function(){BI.SingleSliderLabel.superclass._init.apply(this,arguments);var a=this,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&&ef-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.setText(i+b.unit),a.value=i,a.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)}}),this.label=BI.createWidget({type:"bi.label",height:c.HEIGHT,width:c.EDITOR_WIDTH-2}),this._setVisible(!1),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.track,width:"100%",height:c.TRACK_HEIGHT}]}],hgap:7,height:c.TRACK_HEIGHT},top:13,left:0,width:"100%"},{el:d,top:10,left:0,width:"100%"},{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[this.label]}],rgap:c.EDITOR_WIDTH,height:c.EDITOR_HEIGHT},top:0,left:0,width:"100%"}]})},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setLabelPosition(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.label.setValue(m),c.value=m,c.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){return BI.isNumeric(a)&&!(BI.isNull(a)||athis.max)},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setLabelPosition:function(a){this.label.element.css({left:a+"%"})},_setSliderPosition:function(a){this.slider.element.css({left:a+"%"})},_setAllPosition:function(a){this._setSliderPosition(a),this._setLabelPosition(a),this._setBlueTrack(a)},_setVisible:function(a){this.slider.setVisible(a),this.label.setVisible(a)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(a){var b=BI.parseInt(10*a);return(this.max-this.min)*b/1e3+this.min},_getPercentByValue:function(a){return 100*(a-this.min)/(this.max-this.min)},getValue:function(){return this.value},setValue:function(a){var b=this.options;a=BI.parseFloat(a),a=b.digit===!1?a:a.toFixed(b.digit),isNaN(a)||(this._checkValidation(a)&&(this.value=a),a>this.max&&(this.value=this.max),ab&&(this.min=b,this.max=c)},reset:function(){this._setVisible(!1),this.enable=!1,this.value="",this.min=0,this.max=0,this._setBlueTrack(0)},populate:function(){var a=this.options;isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?(this.label.setValue(this.value+a.unit),this._setAllPosition(this._getPercentByValue(this.value))):(this.label.setValue(this.max+a.unit),this._setAllPosition(100)))}}),BI.SingleSliderLabel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_slider_label",BI.SingleSliderLabel),BI.SingleSliderNormal=BI.inherit(BI.Widget,{_constant:{HEIGHT:28,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},props:{baseCls:"bi-single-slider-normal bi-slider-track",minMax:{min:0,max:100}},render:function(){var a=this,b=this._constant,c=this._createTrack();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:b.SLIDER_WIDTH_HALF,height:b.SLIDER_HEIGHT});return d.element.click(function(c){if(a.enable){var d=c.clientX-a.element.offset().left-b.SLIDER_WIDTH_HALF,e=a.track.element[0].scrollWidth,f=0;d<0&&(f=0),d>0&&de-b.SLIDER_WIDTH&&(f=100);var g=BI.parseFloat(f.toFixed(1));a._setAllPosition(g);var h=a._getValueByPercent(g);a.value=h,a.fireEvent(BI.SingleSlider.EVENT_CHANGE)}}),{type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:c,width:"100%",height:b.TRACK_HEIGHT}]}],hgap:7,height:b.TRACK_HEIGHT},top:3,left:0,width:"100%"},{el:d,top:0,left:0,width:"100%"}]}},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.value=m,c.fireEvent(BI.SingleSliderNormal.EVENT_DRAG,m)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrack:function(){var a=this;this._constant;return this.grayTrack=BI.createWidget({type:"bi.layout",cls:"gray-track",height:6}),this.blueTrack=BI.createWidget({type:"bi.layout",cls:"blue-track bi-high-light-background",height:6}),this.options.color&&this.blueTrack.element.css({"background-color":this.options.color}),{type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}],ref:function(b){a.track=b}}},_checkValidation:function(a){return!(BI.isNull(a)||athis.max)},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setSliderPosition:function(a){this.slider.element.css({left:a+"%"})},_setAllPosition:function(a){this._setSliderPosition(a),this._setBlueTrack(a)},_setVisible:function(a){this.slider.setVisible(a)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(a){var b=BI.parseInt(10*a);return(this.max-this.min)*b/1e3+this.min},_getPercentByValue:function(a){return 100*(a-this.min)/(this.max-this.min)},getValue:function(){return this.value},setValue:function(a){var b=BI.parseFloat(a);isNaN(b)||(this._checkValidation(b)&&(this.value=b),b>this.max&&(this.value=this.max),bb&&(this.min=b,this.max=c)},reset:function(){this._setVisible(!1),this.enable=!1,this.value="",this.min=0,this.max=0,this._setBlueTrack(0)},populate:function(){isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?this._setAllPosition(this._getPercentByValue(this.value)):this._setAllPosition(100))}}),BI.SingleSliderNormal.EVENT_DRAG="EVENT_DRAG",BI.shortcut("bi.single_slider_normal",BI.SingleSliderNormal),BI.SingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-combo",trigger:{},height:24,text:"",items:[],value:""})},_init:function(){BI.SingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value},b.trigger)),this.popup=BI.createWidget({type:"bi.single_level_tree",items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.SingleTreeCombo.EVENT_CHANGE)})},populate:function(a){this.combo.populate(a)},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.SingleTreeCombo.EVENT_CHANGE="SingleTreeCombo.EVENT_CHANGE",BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.single_tree_combo",BI.SingleTreeCombo),BI.SingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-level-tree",tipText:BI.i18nText("BI-No_Selected_Item"),items:[],value:""})},_init:function(){BI.SingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{isDefaultInit:!0},items:b.items,value:b.value,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SingleTreePopup.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.SingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.SingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_level_tree",BI.SingleTreePopup),BI.SingleTreeTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SingleTreeTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-trigger",height:24,text:"",items:[],value:""})},_init:function(){BI.SingleTreeTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,text:a.text,items:a.items,height:a.height,value:a.value})},_checkTitle:function(){var a=this,b=this.getValue();BI.any(this.options.items,function(c,d){if(b.contains(d.value))return a.trigger.setTitle(d.text||d.value),!0})},setValue:function(a){a=BI.isArray(a)?a:[a],this.options.value=a,this.trigger.setValue(a),this._checkTitle()},getValue:function(){return this.options.value||[]},populate:function(a){BI.SingleTreeTrigger.superclass.populate.apply(this,arguments),this.trigger.populate(a)}}),BI.shortcut("bi.single_tree_trigger",BI.SingleTreeTrigger),BI.SwitchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SwitchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-switch-tree",items:[]})},_init:function(){BI.SwitchTree.superclass._init.apply(this,arguments);this.options;this.tab=BI.createWidget({type:"bi.tab",element:this,tab:null,showIndex:BI.SwitchTree.SelectType.SingleSelect,cardCreator:BI.bind(this._createTree,this)})},_createTree:function(a){var b=this,c=this.options;switch(a){case BI.SwitchTree.SelectType.SingleSelect:return this.levelTree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:!0,items:BI.deepClone(c.items),value:c.value}),this.levelTree.on(BI.LevelTree.EVENT_CHANGE,function(){b.fireEvent(BI.SwitchTree.EVENT_CHANGE,arguments)}),this.levelTree;case BI.SwitchTree.SelectType.MultiSelect:return this.tree=BI.createWidget({type:"bi.simple_tree",items:this._removeIsParent(BI.deepClone(c.items)),value:c.value}),this.tree.on(BI.SimpleTreeView.EVENT_CHANGE,function(){b.fireEvent(BI.SwitchTree.EVENT_CHANGE,arguments)}),this.tree}},_removeIsParent:function(a){return BI.each(a,function(a,b){BI.isNotNull(b.isParent)&&delete b.isParent}),a},switchSelect:function(){switch(this.getSelect()){case BI.SwitchTree.SelectType.SingleSelect:this.setSelect(BI.SwitchTree.SelectType.MultiSelect);break;case BI.SwitchTree.SelectType.MultiSelect:this.setSelect(BI.SwitchTree.SelectType.SingleSelect)}},setSelect:function(a){this.tab.setSelect(a)},getSelect:function(){return this.tab.getSelect()},setValue:function(a){switch(this.storeValue=a,this.getSelect()){case BI.SwitchTree.SelectType.SingleSelect:this.levelTree.setValue(a);break;case BI.SwitchTree.SelectType.MultiSelect:this.tree.setValue(a)}},getValue:function(){return this.tab.getValue()},populate:function(a){this.options.items=a,BI.isNotNull(this.levelTree)&&this.levelTree.populate(BI.deepClone(a)),BI.isNotNull(this.tree)&&this.tree.populate(this._removeIsParent(BI.deepClone(a)))}}),BI.SwitchTree.EVENT_CHANGE="SwitchTree.EVENT_CHANGE",BI.SwitchTree.SelectType={SingleSelect:BI.Selection.Single,MultiSelect:BI.Selection.Multi},BI.shortcut("bi.switch_tree",BI.SwitchTree),BI.DateInterval=BI.inherit(BI.Single,{constants:{height:25,width:25,lgap:15,offset:-15,timeErrorCls:"time-error",DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){var a=BI.DateInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-date-interval"})},_init:function(){var a=this,b=this.options;BI.DateInterval.superclass._init.apply(this,arguments),b.value=b.value||{},this.left=this._createCombo(b.value.start),this.right=this._createCombo(b.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:this.constants.height,items:[{type:"bi.absolute",items:[{el:a.left,left:this.constants.offset,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[a.label]})},_createCombo:function(a){var b=this,c=BI.createWidget({type:"bi.dynamic_date_combo",value:a});return c.on(BI.DynamicDateCombo.EVENT_ERROR,function(){b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.DateInterval.EVENT_ERROR)}),c.on(BI.DynamicDateCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.DateInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicDateCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.DateInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW,function(){b.left.hidePopupView(),b.right.hidePopupView()}),c.on(BI.DynamicDateCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),b.fireEvent(BI.DateInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.DateInterval.EVENT_CHANGE))}),c},_dateCheck:function(a){return BI.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")===a||BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")===a||BI.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")===a||BI.parseDateTime(a,"%Y-%X-%e").print("%Y-%X-%e")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.constants.DATE_MIN_VALUE,this.constants.DATE_MAX_VALUE)[0]},_check:function(a,b){var c=a.match(/\d+/g),d=b.match(/\d+/g);return this._dateCheck(a)&&BI.checkDateLegal(a)&&this._checkVoid({year:c[0],month:c[1],day:c[2]})&&this._dateCheck(b)&&BI.checkDateLegal(b)&&this._checkVoid({year:d[0],month:d[1],day:d[2]})},_compare:function(a,b){return a=BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d"),b=BI.parseDateTime(b,"%Y-%X-%d").print("%Y-%X-%d"),BI.isNotNull(a)&&BI.isNotNull(b)&&a>b},_setTitle:function(a){this.left.setTitle(a),this.right.setTitle(a),this.label.setTitle(a)},_clearTitle:function(){this.left.setTitle(""),this.right.setTitle(""),this.label.setTitle("")},setValue:function(a){a=a||{},this.left.setValue(a.start),this.right.setValue(a.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.DateInterval.EVENT_VALID="EVENT_VALID",BI.DateInterval.EVENT_ERROR="EVENT_ERROR",BI.DateInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.date_interval",BI.DateInterval),BI.TimeInterval=BI.inherit(BI.Single,{constants:{height:25,width:25,lgap:15,offset:-15,timeErrorCls:"time-error",DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){var a=BI.TimeInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-time-interval"})},_init:function(){var a=this,b=this.options;BI.TimeInterval.superclass._init.apply(this,arguments),b.value=b.value||{},this.left=this._createCombo(b.value.start),this.right=this._createCombo(b.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:this.constants.height,items:[{type:"bi.absolute",items:[{el:a.left,left:this.constants.offset, +right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[a.label]})},_createCombo:function(a){var b=this,c=BI.createWidget({type:"bi.dynamic_date_time_combo",value:a});return c.on(BI.DynamicDateTimeCombo.EVENT_ERROR,function(){b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.TimeInterval.EVENT_ERROR)}),c.on(BI.DynamicDateTimeCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.TimeInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicDateTimeCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.TimeInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW,function(){b.left.hidePopupView(),b.right.hidePopupView()}),c.on(BI.DynamicDateTimeCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),b.fireEvent(BI.TimeInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.TimeInterval.EVENT_CHANGE))}),c},_dateCheck:function(a){return BI.parseDateTime(a,"%Y-%x-%d %H:%M:%S").print("%Y-%x-%d %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%X-%d %H:%M:%S").print("%Y-%X-%d %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%x-%e %H:%M:%S").print("%Y-%x-%e %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%X-%e %H:%M:%S").print("%Y-%X-%e %H:%M:%S")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.constants.DATE_MIN_VALUE,this.constants.DATE_MAX_VALUE)[0]},_check:function(a,b){var c=a.match(/\d+/g),d=b.match(/\d+/g);return this._dateCheck(a)&&BI.checkDateLegal(a)&&this._checkVoid({year:c[0],month:c[1],day:c[2]})&&this._dateCheck(b)&&BI.checkDateLegal(b)&&this._checkVoid({year:d[0],month:d[1],day:d[2]})},_compare:function(a,b){return a=BI.parseDateTime(a,"%Y-%X-%d %H:%M:%S").print("%Y-%X-%d %H:%M:%S"),b=BI.parseDateTime(b,"%Y-%X-%d %H:%M:%S").print("%Y-%X-%d %H:%M:%S"),BI.isNotNull(a)&&BI.isNotNull(b)&&a>b},_setTitle:function(a){this.left.setTitle(a),this.right.setTitle(a),this.label.setTitle(a)},_clearTitle:function(){this.left.setTitle(""),this.right.setTitle(""),this.label.setTitle("")},setValue:function(a){a=a||{},this.left.setValue(a.start),this.right.setValue(a.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.TimeInterval.EVENT_VALID="EVENT_VALID",BI.TimeInterval.EVENT_ERROR="EVENT_ERROR",BI.TimeInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.time_interval",BI.TimeInterval),BI.DynamicYearCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-card"},render:function(){var a=this;return{type:"bi.vertical",items:[{type:"bi.label",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),textAlign:"left",height:24},{type:"bi.dynamic_date_param_item",ref:function(){a.item=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]}],vgap:10,hgap:10}},_createValue:function(a,b){return{dateType:a,value:Math.abs(b),offset:b>0?1:0}},setValue:function(a){a=a||{year:0},this.item.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR,a.year))},getValue:function(){var a=this.item.getValue();return{year:0===a.offset?-a.value:a.value}}}),BI.DynamicYearCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_card",BI.DynamicYearCard),BI.StaticYearCard=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.StaticYearCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-card",behaviors:{},min:"1900-01-01",max:"2099-12-31"})},_createYearCalendar:function(a){var b=this.options,c=this._year,d=BI.createWidget({type:"bi.year_calendar",behaviors:b.behaviors,min:b.min,max:b.max,logic:{dynamic:!0},year:c+12*a});return d.setValue(this._year),d},_init:function(){BI.StaticYearCard.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedYear=this._year=BI.getDate().getFullYear(),this.backBtn=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:25,height:25,value:-1,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.navigation.setSelect(a.navigation.getSelect()-1),a._checkLeftValid(),a._checkRightValid()}}]}),this.preBtn=BI.createWidget({type:"bi.icon_button",cls:"next-page-h-font",width:25,height:25,value:1,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.navigation.setSelect(a.navigation.getSelect()+1),a._checkLeftValid(),a._checkRightValid()}}]}),this.navigation=BI.createWidget({type:"bi.navigation",direction:"top",element:this,single:!0,logic:{dynamic:!0},tab:{type:"bi.htape",cls:"bi-border-top bi-border-bottom",height:30,items:[{el:{type:"bi.center_adapt",items:[a.backBtn]},width:25},{type:"bi.layout"},{el:{type:"bi.center_adapt",items:[a.preBtn]},width:25}]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(a.selectedYear);var b=this.getSelectedCard();a.backBtn.setEnable(!b.isFrontYear()),a.preBtn.setEnable(!b.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedYear=this.getValue(),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.StaticYearCard.EVENT_CHANGE,a.selectedYear)}),BI.isKey(b.value)&&this.setValue(b.value)},_checkLeftValid:function(){var a=(this.options,!0);return this.backBtn.setEnable(a),a},_checkRightValid:function(){var a=(this.options,!0);return this.preBtn.setEnable(a),a},getValue:function(){return{year:this.selectedYear}},setValue:function(a){var b=this.options;a=a||{};var c=a.year;BI.checkDateVoid(c,1,1,b.min,b.max)[0]?(c=BI.getDate().getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(c)),this.navigation.setValue("")):(this.selectedYear=BI.parseInt(c),this.navigation.setSelect(BI.YearCalendar.getPageByYear(c)),this.navigation.setValue(this.selectedYear)),this._checkLeftValid(),this._checkRightValid()}}),BI.StaticYearCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.static_year_card",BI.StaticYearCard),BI.DynamicYearCombo=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-combo bi-border",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicYearCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value,this.trigger=BI.createWidget({type:"bi.dynamic_year_trigger",min:b.min,max:b.max,value:b.value||""}),this.trigger.on(BI.DynamicYearTrigger.EVENT_FOCUS,function(){a.storeTriggerValue=this.getKey()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_STOP,function(){a.combo.showView()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_ERROR,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeTriggerValue?(a.storeValue=a.trigger.getValue(),a.setValue(a.storeValue)):this.getKey()||(a.storeValue=null,a.setValue()),a.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM))}),this.combo=BI.createWidget({type:"bi.combo",isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.dynamic_year_popup",ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicYearPopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({year:b.getFullYear()}),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}],behaviors:b.behaviors,min:b.min,max:b.max},value:b.value||""}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicYearCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.htape",element:this,ref:function(){a.comboWrapper=this},items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24,ref:function(){a.changeIcon=this}},width:24},this.combo]}),this._checkDynamicValue(b.value)},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.DynamicYearCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue}}),BI.DynamicYearCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_year_combo",BI.DynamicYearCombo),BI.extend(BI.DynamicYearCombo,{Static:1,Dynamic:2}),BI.DynamicYearPopup=BI.inherit(BI.Widget,{constants:{tabHeight:30},props:{baseCls:"bi-year-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31",width:180,height:240},render:function(){var a=this;this.options;return this.storeValue={type:BI.DynamicYearCombo.Static},{type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-left bi-border-right bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Current_Year"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Basic_Current_Year")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=a.print("%Y"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-border-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Basic_Year_Fen"),value:BI.DynamicYearCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicYearCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(c){switch(c){case BI.DynamicYearCombo.Dynamic:return{type:"bi.dynamic_year_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicYearCombo.Static:default:return{type:"bi.static_year_card",behaviors:b.behaviors,min:a.options.min,max:a.options.max,listeners:[{eventName:BI.StaticYearCard.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearPopup.EVENT_CHANGE)}}],ref:function(){a.year=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicYearCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.year.setValue({year:c.getFullYear()}),a._setInnerValue();break;case BI.DynamicYearCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicYearCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:this.year.setValue(c),this.textButton.setValue(BI.i18nText("BI-Basic_Current_Year")),this.textButton.setEnable(!0)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicYearPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_popup",BI.DynamicYearPopup),BI.DynamicYearTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,errorText:BI.i18nText("BI-Please_Input_Positive_Integer"),errorTextInvalid:BI.i18nText("BI-Year_Trigger_Invalid_Text")},_defaultConfig:function(){return BI.extend(BI.DynamicYearTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-year-trigger",min:"1900-01-01",max:"2099-12-31",height:24})},_init:function(){BI.DynamicYearTrigger.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)&&!BI.checkDateVoid(a,1,1,b.min,b.max)[0]},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,errorText:function(a){return BI.isPositiveInteger(a)?c.errorTextInvalid:c.errorText}}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.DynamicYearTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DynamicYearTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&a.editor.setValue(b),BI.isNotEmptyString(b)&&(a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:b}}),a.fireEvent(BI.DynamicYearTrigger.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.DynamicYearTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DynamicYearTrigger.EVENT_ERROR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-year-text",text:BI.i18nText("BI-Multi_Date_Year"),width:b.height},width:b.height},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]}),this.setValue(b.value)},_getText:function(a){var b="";return BI.isNotNull(a.year)&&0!==a.year&&(b+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),b},_setInnerValue:function(a,b){var c=a.print("%Y");this.editor.setState(c),this.editor.setValue(c),this.setTitle(BI.isEmptyString(b)?c:b+":"+c)},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:c=c||{},this.editor.setState(c.year),this.editor.setValue(c.year),this.editor.setTitle(c.year)}},getValue:function(){return this.storeValue},getKey:function(){return 0|this.editor.getValue()}}),BI.DynamicYearTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearTrigger.EVENT_START="EVENT_START",BI.DynamicYearTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearTrigger.EVENT_STOP="EVENT_STOP",BI.shortcut("bi.dynamic_year_trigger",BI.DynamicYearTrigger),BI.DynamicYearMonthCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-month-card"},render:function(){var a=this;return{type:"bi.vertical",items:[{type:"bi.label",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),textAlign:"left",height:24},{type:"bi.dynamic_date_param_item",ref:function(){a.year=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]},{type:"bi.dynamic_date_param_item",dateType:BI.DynamicDateCard.TYPE.MONTH,ref:function(){a.month=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]}],vgap:10,hgap:10}},_createValue:function(a,b){return{dateType:a,value:Math.abs(b),offset:b>0?1:0}},setValue:function(a){a=a||{year:0,month:0},this.year.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR,a.year)),this.month.setValue(this._createValue(BI.DynamicDateCard.TYPE.MONTH,a.month))},getValue:function(){var a=this.year.getValue(),b=this.month.getValue();return{year:0===a.offset?-a.value:a.value,month:0===b.offset?-b.value:b.value}}}),BI.DynamicYearMonthCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_month_card",BI.DynamicYearMonthCard),BI.StaticYearMonthCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-static-year-month-card",behaviors:{}},_createMonths:function(){var a=[1,7,2,8,3,9,4,10,5,11,6,12],b=[];return b.push(a.slice(0,2)),b.push(a.slice(2,4)),b.push(a.slice(4,6)),b.push(a.slice(6,8)),b.push(a.slice(8,10)),b.push(a.slice(10,12)),BI.map(b,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}})})},render:function(){var a=this,b=this.options;return{type:"bi.vertical",items:[{type:"bi.year_picker",ref:function(){a.yearPicker=this},height:30,listeners:[{eventName:BI.YearPicker.EVENT_CHANGE,action:function(){var b=this.getValue();a.setValue({year:b,month:a.selectedMonth})}}]},{type:"bi.button_group",behaviors:b.behaviors,ref:function(){a.month=this},items:this._createMonths(),layouts:[BI.LogicFactory.createLogic("table",BI.extend({dynamic:!0},{columns:2,rows:6,columnSize:[.5,.5],rowSize:25})),{type:"bi.center_adapt",vgap:1,hgap:2}],value:b.value,listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(){a.selectedYear=a.yearPicker.getValue(),a.selectedMonth=this.getValue()[0],a.fireEvent(BI.StaticYearMonthCard.EVENT_CHANGE)}}]}]}},getValue:function(){return{year:this.selectedYear,month:this.selectedMonth}},setValue:function(a){var b=this.options;if(a=a||{},a.year=a.year||0,a.month=a.month||0,BI.checkDateVoid(a.year,a.month,1,b.min,b.max)[0]){var c=BI.getDate().getFullYear(),d=BI.getDate().getMonth();this.selectedYear="",this.selectedMonth="",this.yearPicker.setValue(c),this.month.setValue(d)}else this.selectedYear=BI.parseInt(a.year),this.selectedMonth=BI.parseInt(a.month),this.yearPicker.setValue(this.selectedYear),this.month.setValue(this.selectedMonth)}}),BI.StaticYearMonthCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.static_year_month_card",BI.StaticYearMonthCard),BI.DynamicYearMonthCombo=BI.inherit(BI.Single,{props:{baseCls:"bi-year-month-combo bi-border",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicYearMonthCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value,this.trigger=BI.createWidget({type:"bi.dynamic_year_month_trigger",min:b.min,max:b.max,value:b.value||""}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_STOP,function(){a.combo.showView()}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_ERROR,function(){a.combo.isViewVisible()&&a.combo.hideView(),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_ERROR)}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_VALID,function(){a.fireEvent(BI.DynamicYearMonthCombo.EVENT_VALID)}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(a.storeValue=a.trigger.getValue(),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM))}),this.trigger.on(BI.DynamicYearMonthCombo.EVENT_FOCUS,function(){a.fireEvent(BI.DynamicYearMonthCombo.EVENT_FOCUS)}),this.combo=BI.createWidget({type:"bi.combo",isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.dynamic_year_month_popup",ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicYearMonthPopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({year:b.getFullYear()}),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}],behaviors:b.behaviors,min:b.min,max:b.max},value:b.value||""}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.htape",element:this,ref:function(){a.comboWrapper=this},items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24,ref:function(){a.changeIcon=this}},width:24},this.combo]}),this._checkDynamicValue(b.value)},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.DynamicYearMonthCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},hideView:function(){this.combo.hideView()},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()}}),BI.DynamicYearMonthCombo.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearMonthCombo.EVENT_VALID="EVENT_VALID",BI.DynamicYearMonthCombo.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearMonthCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_year_month_combo",BI.DynamicYearMonthCombo),BI.extend(BI.DynamicYearMonthCombo,{Static:1,Dynamic:2}),BI.DynamicYearMonthPopup=BI.inherit(BI.Widget,{constants:{tabHeight:30},props:{baseCls:"bi-year-month-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31",width:180,height:240},render:function(){var a=this;this.options;return this.storeValue={type:BI.DynamicYearMonthCombo.Static},{type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-left bi-border-right bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Current_Month"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Basic_Current_Month")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=a.print("%Y-%x"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-border-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Basic_Year_Fen"),value:BI.DynamicYearCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicYearCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(c){switch(c){case BI.DynamicYearCombo.Dynamic:return{type:"bi.dynamic_year_month_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicYearCombo.Static:default:return{type:"bi.static_year_month_card",behaviors:b.behaviors,min:a.options.min,max:a.options.max,listeners:[{eventName:BI.StaticYearMonthCard.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearMonthPopup.EVENT_CHANGE)}}],ref:function(){a.year=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicYearCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.year.setValue({year:c.getFullYear(),month:c.getMonth()}),a._setInnerValue();break;case BI.DynamicYearCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicYearCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:this.year.setValue(c),this.textButton.setValue(BI.i18nText("BI-Basic_Current_Month")),this.textButton.setEnable(!0)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicYearMonthPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_month_popup",BI.DynamicYearMonthPopup),BI.DynamicYearMonthTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,errorText:BI.i18nText("BI-Please_Input_Positive_Integer"),errorTextInvalid:BI.i18nText("BI-Year_Trigger_Invalid_Text")},props:{extraCls:"bi-year-month-trigger",min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicYearMonthTrigger.superclass._init.apply(this,arguments);var a=this.options;this.yearEditor=this._createEditor(!0),this.monthEditor=this._createEditor(!1),BI.createWidget({element:this,type:"bi.htape",items:[{type:"bi.center",items:[{type:"bi.htape",items:[this.yearEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Year"),width:a.height},width:a.height}]},{type:"bi.htape",items:[this.monthEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Month"),width:a.height},width:a.height}]}]},{el:{type:"bi.trigger_icon_button",width:a.height},width:a.height}]}),this.setValue(a.value)},_createEditor:function(a){var b=this,c=this.options,d=this._const,e=BI.createWidget({type:"bi.sign_editor",height:c.height,validationChecker:function(b){return a?""===b||BI.isPositiveInteger(b)&&!BI.checkDateVoid(b,1,1,c.min,c.max)[0]:""===b||b>=1&&b<=12&&!BI.checkDateVoid(BI.getDate().getFullYear(),b,1,c.min,c.max)[0]},quitChecker:function(){return!1},watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(a){return BI.isPositiveInteger(a)?d.errorTextInvalid:d.errorText},hgap:d.hgap,vgap:d.vgap,allowBlank:!0});return e.on(BI.SignEditor.EVENT_FOCUS,function(){b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_FOCUS)}),e.on(BI.SignEditor.EVENT_STOP,function(){b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_STOP)}),e.on(BI.SignEditor.EVENT_CONFIRM,function(){var a=e.getValue();if(BI.isNotNull(a)&&e.setValue(a),BI.isNotEmptyString(a)){var c=b.monthEditor.getValue();b.storeValue={type:BI.DynamicDateCombo.Static,value:{year:b.yearEditor.getValue(),month:BI.isEmptyString(b.monthEditor.getValue())?"":c-1}}}b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM)}),e.on(BI.SignEditor.EVENT_SPACE,function(){e.isValid()&&e.blur()}),e.on(BI.SignEditor.EVENT_START,function(){b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_START)}),e.on(BI.SignEditor.EVENT_ERROR,function(){b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_ERROR)}),e.on(BI.SignEditor.EVENT_VALID,function(){var a=b.yearEditor.getValue(),d=b.monthEditor.getValue();BI.isNotEmptyString(a)&&BI.isNotEmptyString(d)&&BI.isPositiveInteger(a)&&d>=1&&d<=12&&!BI.checkDateVoid(a,d,1,c.min,c.max)[0]&&b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_VALID)}),e.on(BI.SignEditor.EVENT_CHANGE,function(){a&&b._autoSwitch(e.getValue())}),e},_yearCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d");return BI.parseDateTime(a,"%Y").print("%Y")===a&&b>=this.options.min&&b<=this.options.max},_autoSwitch:function(a){BI.checkDateLegal(a)&&4===a.length&&this._yearCheck(a)&&this.monthEditor.focus()},_getText:function(a){var b="";return BI.isNotNull(a.year)&&(b+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),BI.isNotNull(a.month)&&0!==a.month&&(b+=Math.abs(a.month)+BI.i18nText("BI-Basic_Year")+(a.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),b},_setInnerValue:function(a,b){var c=a.print("%Y-%x");this.yearEditor.setValue(a.getFullYear()),this.monthEditor.setValue(a.getMonth()+1),this.setTitle(BI.isEmptyString(b)?c:b+":"+c)},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:c=c||{};var f=BI.isNull(c.month)?null:c.month;this.yearEditor.setValue(c.year),this.yearEditor.setTitle(c.year),this.monthEditor.setValue(f),this.monthEditor.setTitle(f)}},getValue:function(){return this.storeValue},getKey:function(){return this.yearEditor.getValue()+"-"+this.monthEditor.getValue()}}),BI.DynamicYearMonthTrigger.EVENT_VALID="EVENT_FOCUS",BI.DynamicYearMonthTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearMonthTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearMonthTrigger.EVENT_START="EVENT_START",BI.DynamicYearMonthTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearMonthTrigger.EVENT_STOP="EVENT_STOP",BI.shortcut("bi.dynamic_year_month_trigger",BI.DynamicYearMonthTrigger),BI.YearMonthInterval=BI.inherit(BI.Single,{constants:{height:25,width:25,lgap:15,offset:-15,timeErrorCls:"time-error",DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},props:{extraCls:"bi-year-month-interval"},_init:function(){var a=this,b=this.options;BI.YearMonthInterval.superclass._init.apply(this,arguments),b.value=b.value||{},this.left=this._createCombo(b.value.start),this.right=this._createCombo(b.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center", +hgap:15,height:this.constants.height,items:[{type:"bi.absolute",items:[{el:a.left,left:this.constants.offset,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[a.label]})},_createCombo:function(a){var b=this,c=BI.createWidget({type:"bi.dynamic_year_month_combo",value:a});return c.on(BI.DynamicYearMonthCombo.EVENT_ERROR,function(){b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.YearMonthInterval.EVENT_ERROR)}),c.on(BI.DynamicYearMonthCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.YearMonthInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicYearMonthCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.YearMonthInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW,function(){b.left.hideView(),b.right.hideView()}),c.on(BI.DynamicYearMonthCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),b.fireEvent(BI.YearMonthInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.YearMonthInterval.EVENT_CHANGE))}),c},_dateCheck:function(a){return BI.parseDateTime(a,"%Y-%x").print("%Y-%x")===a||BI.parseDateTime(a,"%Y-%X").print("%Y-%X")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,1,this.constants.DATE_MIN_VALUE,this.constants.DATE_MAX_VALUE)[0]},_check:function(a,b){var c=a.match(/\d+/g),d=b.match(/\d+/g);return this._dateCheck(a)&&BI.checkDateLegal(a)&&this._checkVoid({year:c[0],month:c[1],day:1})&&this._dateCheck(b)&&BI.checkDateLegal(b)&&this._checkVoid({year:d[0],month:d[1],day:1})},_compare:function(a,b){return a=BI.parseDateTime(a,"%Y-%X").print("%Y-%X"),b=BI.parseDateTime(b,"%Y-%X").print("%Y-%X"),BI.isNotNull(a)&&BI.isNotNull(b)&&a>b},_setTitle:function(a){this.left.setTitle(a),this.right.setTitle(a),this.label.setTitle(a)},_clearTitle:function(){this.left.setTitle(""),this.right.setTitle(""),this.label.setTitle("")},setValue:function(a){a=a||{},this.left.setValue(a.start),this.right.setValue(a.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.YearMonthInterval.EVENT_VALID="EVENT_VALID",BI.YearMonthInterval.EVENT_ERROR="EVENT_ERROR",BI.YearMonthInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_month_interval",BI.YearMonthInterval),BI.DynamicYearQuarterCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-month-card"},render:function(){var a=this;return{type:"bi.vertical",items:[{type:"bi.label",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),textAlign:"left",height:24},{type:"bi.dynamic_date_param_item",ref:function(){a.year=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]},{type:"bi.dynamic_date_param_item",dateType:BI.DynamicDateCard.TYPE.QUARTER,ref:function(){a.quarter=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]}],vgap:10,hgap:10}},_createValue:function(a,b){return{dateType:a,value:Math.abs(b),offset:b>0?1:0}},setValue:function(a){a=a||{year:0,month:0},this.year.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR,a.year)),this.quarter.setValue(this._createValue(BI.DynamicDateCard.TYPE.QUARTER,a.quarter))},getValue:function(){var a=this.year.getValue(),b=this.quarter.getValue();return{year:0===a.offset?-a.value:a.value,quarter:0===b.offset?-b.value:b.value}}}),BI.DynamicYearQuarterCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_quarter_card",BI.DynamicYearQuarterCard),BI.StaticYearQuarterCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-static-year-quarter-card",behaviors:{}},_createQuarter:function(){var a=[{text:Date._QN[1],value:1},{text:Date._QN[2],value:2},{text:Date._QN[3],value:3},{text:Date._QN[4],value:4}];return BI.map(a,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"center",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:24})})},render:function(){var a=this,b=this.options;return{type:"bi.vertical",items:[{type:"bi.year_picker",ref:function(){a.yearPicker=this},height:30,listeners:[{eventName:BI.YearPicker.EVENT_CHANGE,action:function(){var b=this.getValue();a.setValue({year:b,quarter:a.selectedQuarter})}}]},{type:"bi.button_group",behaviors:b.behaviors,ref:function(){a.quarter=this},items:this._createQuarter(),layouts:[{type:"bi.vertical",vgap:10}],value:b.value,listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(){a.selectedYear=a.yearPicker.getValue(),a.selectedQuarter=this.getValue()[0],a.fireEvent(BI.StaticYearQuarterCard.EVENT_CHANGE)}}]}]}},getValue:function(){return{year:this.selectedYear,quarter:this.selectedQuarter}},setValue:function(a){var b=this.options;if(a=a||{},a.year=a.year||0,a.quarter=a.quarter||0,BI.checkDateVoid(a.year,a.quarter,1,b.min,b.max)[0]){var c=BI.getDate().getFullYear(),d=BI.getDate().getQuarter();this.selectedYear="",this.selectedQuarter="",this.yearPicker.setValue(c),this.quarter.setValue(d)}else this.selectedYear=BI.parseInt(a.year),this.selectedQuarter=BI.parseInt(a.quarter),this.yearPicker.setValue(this.selectedYear),this.quarter.setValue(this.selectedQuarter)}}),BI.StaticYearQuarterCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.static_year_quarter_card",BI.StaticYearQuarterCard),BI.DynamicYearQuarterCombo=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-quarter-combo bi-border",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicYearQuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value,this.trigger=BI.createWidget({type:"bi.dynamic_year_quarter_trigger",min:b.min,max:b.max,value:b.value||""}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_STOP,function(){a.combo.showView()}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_ERROR,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(a.storeValue=a.trigger.getValue(),a.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM))}),this.combo=BI.createWidget({type:"bi.combo",isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.dynamic_year_quarter_popup",ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicYearQuarterPopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({year:b.getFullYear()}),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}],behaviors:b.behaviors,min:b.min,max:b.max},value:b.value||""}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicYearQuarterCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.htape",element:this,ref:function(){a.comboWrapper=this},items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24,ref:function(){a.changeIcon=this}},width:24},this.combo]}),this._checkDynamicValue(b.value)},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.DynamicYearQuarterCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue}}),BI.DynamicYearQuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearQuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_year_quarter_combo",BI.DynamicYearQuarterCombo),BI.extend(BI.DynamicYearQuarterCombo,{Static:1,Dynamic:2}),BI.DynamicYearQuarterPopup=BI.inherit(BI.Widget,{constants:{tabHeight:30},props:{baseCls:"bi-year-quarter-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31",width:180,height:240},render:function(){var a=this;this.options;return this.storeValue={type:BI.DynamicYearQuarterCombo.Static},{type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-left bi-border-right bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Current_Quarter"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicYearQuarterCombo.Static)this.textButton.setValue(BI.i18nText("BI-Basic_Current_Quarter")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=a.print("%Y-%x"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-border-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Basic_Year_Fen"),value:BI.DynamicYearQuarterCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicYearQuarterCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(c){switch(c){case BI.DynamicYearQuarterCombo.Dynamic:return{type:"bi.dynamic_year_quarter_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicYearQuarterCombo.Static:default:return{type:"bi.static_year_quarter_card",behaviors:b.behaviors,min:a.options.min,max:a.options.max,listeners:[{eventName:BI.DynamicYearCard.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearQuarterPopup.EVENT_CHANGE)}}],ref:function(){a.year=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicYearQuarterCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.year.setValue({year:c.getFullYear(),quarter:c.getQuarter()}),a._setInnerValue();break;case BI.DynamicYearQuarterCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicYearQuarterCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:this.year.setValue(c),this.textButton.setValue(BI.i18nText("BI-Basic_Current_Quarter")),this.textButton.setEnable(!0)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicYearQuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_quarter_popup",BI.DynamicYearQuarterPopup),BI.DynamicYearQuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,errorText:BI.i18nText("BI-Please_Input_Positive_Integer"),errorTextInvalid:BI.i18nText("BI-Year_Trigger_Invalid_Text")},props:{extraCls:"bi-year-quarter-trigger",min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicYearQuarterTrigger.superclass._init.apply(this,arguments);var a=this.options;this.yearEditor=this._createEditor(!0),this.quarterEditor=this._createEditor(!1),BI.createWidget({element:this,type:"bi.htape",items:[{type:"bi.center",items:[{type:"bi.htape",items:[this.yearEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Year"),width:a.height},width:a.height}]},{type:"bi.htape",items:[this.quarterEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Quarter"),width:a.height},width:a.height}]}]},{el:{type:"bi.trigger_icon_button",width:a.height},width:a.height}]}),this.setValue(a.value)},_createEditor:function(a){var b=this,c=this.options,d=this._const,e=BI.createWidget({type:"bi.sign_editor",height:c.height,validationChecker:function(b){return a?""===b||BI.isPositiveInteger(b)&&!BI.checkDateVoid(b,1,1,c.min,c.max)[0]:""===b||b>=1&&b<=4&&!BI.checkDateVoid(BI.getDate().getFullYear(),b,1,c.min,c.max)[0]},quitChecker:function(){return!1},errorText:function(a){return BI.isPositiveInteger(a)?d.errorTextInvalid:d.errorText},watermark:BI.i18nText("BI-Basic_Unrestricted"),hgap:d.hgap,vgap:d.vgap,allowBlank:!0});return e.on(BI.SignEditor.EVENT_FOCUS,function(){b.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_FOCUS)}),e.on(BI.SignEditor.EVENT_STOP,function(){b.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_STOP)}),e.on(BI.SignEditor.EVENT_CONFIRM,function(){var a=e.getValue();if(BI.isNotNull(a)&&e.setValue(a),BI.isNotEmptyString(a)){var c=b.quarterEditor.getValue();b.storeValue={type:BI.DynamicYearQuarterCombo.Static,value:{year:b.yearEditor.getValue(),quarter:BI.isEmptyString(b.quarterEditor.getValue())?"":c}}}b.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM)}),e.on(BI.SignEditor.EVENT_SPACE,function(){e.isValid()&&e.blur()}),e.on(BI.SignEditor.EVENT_START,function(){b.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_START)}),e.on(BI.SignEditor.EVENT_ERROR,function(){b.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_ERROR)}),e.on(BI.SignEditor.EVENT_CHANGE,function(){a&&b._autoSwitch(e.getValue())}),e},_yearCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d");return BI.parseDateTime(a,"%Y").print("%Y")===a&&b>=this.options.min&&b<=this.options.max},_autoSwitch:function(a){BI.checkDateLegal(a)&&4===a.length&&this._yearCheck(a)&&this.quarterEditor.focus()},_getText:function(a){var b="";return BI.isNotNull(a.year)&&(b+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),BI.isNotNull(a.quarter)&&0!==a.quarter&&(b+=Math.abs(a.quarter)+BI.i18nText("BI-Basic_Year")+(a.quarter<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),b},_setInnerValue:function(a,b){var c=a.print("%Y-%x");this.yearEditor.setValue(a.getFullYear()),this.quarterEditor.setValue(a.getQuarter()),this.setTitle(BI.isEmptyString(b)?c:b+":"+c)},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicYearQuarterCombo.Static,c=a.value||a),b){case BI.DynamicYearQuarterCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicYearQuarterCombo.Static:default:c=c||{};var f=BI.isNull(c.quarter)?null:c.quarter;this.yearEditor.setValue(c.year),this.yearEditor.setTitle(c.year),this.quarterEditor.setValue(f),this.quarterEditor.setTitle(f)}},getValue:function(){return this.storeValue}}),BI.DynamicYearQuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearQuarterTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearQuarterTrigger.EVENT_START="EVENT_START",BI.DynamicYearQuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearQuarterTrigger.EVENT_STOP="EVENT_STOP",BI.shortcut("bi.dynamic_year_quarter_trigger",BI.DynamicYearQuarterTrigger),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.match.concat(d.find)}),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,value:{type:BI.Selection.Multi,value:b.value||[]}}),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(BI.AllValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-all-value-chooser-pane",width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.AllValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&(this.items=b.items),this.list=BI.createWidget({type:"bi.multi_select_list",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:b.width,height:b.height}),this.list.on(BI.MultiSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.AllValueChooserPane.EVENT_CHANGE)})},setValue:function(a){this.list.setValue({type:BI.Selection.Multi,value:a||[]})},getValue:function(){var a=this.list.getValue()||{};return a.type===BI.Selection.All?a.assist:a.value||[]},populate:function(){this.list.populate.apply(this.list,arguments)}}),BI.AllValueChooserPane.EVENT_CHANGE="AllValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.all_value_chooser_pane",BI.AllValueChooserPane),BI.AbstractTreeValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractTreeValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn})},_initData:function(a){this.items=a;var b=BI.Tree.treeFormat(a);this.tree=new BI.Tree,this.tree.initTree(b)},_itemsCreator:function(a,b){function c(){switch(a.type){case BI.TreeView.REQ_TYPE_INIT_DATA:d._reqInitTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_ADJUST_DATA:d._reqAdjustTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_SELECT_DATA:d._reqSelectedTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_GET_SELECTED_DATA:d._reqDisplayTreeNode(a,b);break;default:d._reqTreeNode(a,b)}}var d=this,e=this.options;this.items?c():e.itemsCreator({},function(a){d._initData(a),c()})},_reqDisplayTreeNode:function(a,b){function c(a,b,g){return null==g||BI.isEmpty(g)?void BI.each(b.getChildren(),function(d,g){var h=BI.clone(a);h.push(g.value);var i=f._getChildCount(h);e(g,b.id,i),c(h,g,{})}):void BI.each(g,function(b){var h=f._getTreeNode(a,b),i=BI.clone(a);i.push(h.value),e(h,h.parent&&h.parent.id,d(g[b],i)),c(i,h,g[b])})}function d(a,b){return null==a?0:BI.isEmpty(a)?f._getChildCount(b):BI.size(a)}function e(a,b,c){g.push({id:a.id,pId:b,text:a.text+(c>0?"("+BI.i18nText("BI-Basic_Altogether")+c+BI.i18nText("BI-Basic_Count")+")":""),value:a.value,open:!0})}var f=this,g=[],h=a.selectedValues;return null==h||BI.isEmpty(h)?void b({}):(c([],this.tree.getRoot(),h),void b({items:g}))},_reqSelectedTreeNode:function(a,b){function c(a){var b=m.concat(k);if(g(a,b))if(f(b))i._deleteNode(a,b);else{var c=[],j=e(m,k,[],c);j&&BI.isNotEmptyArray(c)&&BI.each(c,function(b,c){var e=i._getNode(a,c);e?i._deleteNode(a,c):d(a,c,BI.last(c))})}if(h(a,b)){var l=[],j=!1;f(b)?j=!0:(j=e(m,k,l),b=m),j===!0&&(d(a,b,k),l.length>0&&BI.each(l,function(b,c){i._buildTree(a,c)}))}}function d(a,b,c){var d=a,e=[],f=[];BI.some(b,function(g,h){var j=d[h];if(null==j){if(0===g)return!0;if(!BI.isEmpty(d))return!0;var k=b.slice(0,g),l=i._getChildren(k);if(f.push(k),e.push(l.length),g===b.length-1&&1===l.length&&l[0]===c)for(var m=e.length-1;m>=0&&1===e[m];m--)i._deleteNode(a,f[m]);else BI.each(l,function(a,e){return g===b.length-1&&e.value===c||void(d[e.value]={})});d=d[h]}else d=j})}function e(a,b,c,d){var f=BI.clone(a);if(f.push(b),i._isMatch(a,b,l))return d&&d.push(f),!0;var g=i._getChildren(f),h=[],j=!1;return BI.each(g,function(a,b){e(f,b.value,c,d)?j=!0:h.push(b.value)}),j===!0&&BI.each(h,function(a,b){var d=BI.clone(f);d.push(b),c.push(d)}),j}function f(a){for(var b=0,c=a.length;bj._const.perPage)break}return f}function d(a,b,c,i,k){if(j._isMatch(b,c,l)){var m=i||h(b,c);return e(b,c,!1,m,!i&&f(b,c),!0,k),[!0,m]}var n=BI.clone(b);n.push(c);var o=j._getChildren(n),p=!1,m=!1,q=i||g(b,c);return BI.each(o,function(b,c){var e=d(a+1,n,c.value,q,k);e[1]===!0&&(m=!0),e[0]===!0&&(p=!0)}),p===!0&&(m=q||h(b,c)&&m,e(b,c,!0,m,!1,!1,k)),[p,m]}function e(a,b,c,d,e,f,g){var h=j._getTreeNode(a,b);g.push({id:h.id,pId:h.pId,text:h.text,value:h.value,title:h.title,isParent:h.getChildrenLength()>0,open:c,checked:d,halfCheck:e,flag:f})}function f(a,b){var c=i(a);return null==c?null:BI.any(c,function(a,c){if(a===b&&null!=c&&!BI.isEmpty(c))return!0})}function g(a,b){var c=i(a);return null==c?null:BI.any(c,function(a,c){if(a===b&&null!=c&&BI.isEmpty(c))return!0})}function h(a,b){var c=i(a);return null!=c&&BI.any(c,function(a){if(a===b)return!0})}function i(a){var b=m;return null==b?null:(BI.every(a,function(a,c){return b=b[c],null!=b}),b)}var j=this,k=[],l=a.keyword||"",m=a.selectedValues,n=a.lastSearchValue||"",o=c();BI.nextTick(function(){b({hasNext:o.length>j._const.perPage,items:k,lastSearchValue:BI.last(o)})})},_reqTreeNode:function(a,b){function c(a,b){var c={};return BI.each(a,function(a,c){b=b[c]||{}}),BI.each(b,function(a,b){if(BI.isNull(b))return void(c[a]=[0,0]);if(BI.isEmpty(b))return void(c[a]=[2,0]);var d={};BI.each(b,function(a,b){(BI.isNull(b)||BI.isEmpty(b))&&(d[a]=!0)}),c[a]=[1,BI.size(d)]}),c}function d(a,b,c,d){var f=d.checked,g=d.half,h=!1,i=!1;if(BI.has(c,a))if(1===c[a][0]){var j=BI.clone(b);j.push(a);var k=e._getChildCount(j);k>0&&k!==c[a][1]&&(i=!0)}else 2===c[a][0]&&(h=!0);var l;return l=f||i||h?(h||f)&&!g||BI.has(c,a):BI.has(c,a),[l,i]}var e=this,f=[],g=a.times,h=a.checkState||{},i=a.parentValues||[],j=a.selectedValues||{},k={};k=c(i,j);for(var l=this._getChildren(i),m=(g-1)*this._const.perPage;l[m]&&m0,checked:n[0],halfCheck:n[1]})}BI.nextTick(function(){b({items:f,hasNext:l.length>g*e._const.perPage})})},_getNode:function(a,b){for(var c=a,d=0,e=b.length;d0&&BI.isEmpty(e);)c=d[d.length-1],d=d.slice(0,d.length-1),e=this._getNode(a,d),null!=e&&delete e[c]},_buildTree:function(a,b){var c=a;BI.each(b,function(a,b){BI.has(c,b)||(c[b]={}),c=c[b]})},_isMatch:function(a,b,c){var d=this._getTreeNode(a,b),e=BI.Func.getSearchResult([d.text||d.value],c);return e.find.length>0||e.match.length>0},_getTreeNode:function(a,b){var c,d=this,e=0;return this.tree.traverse(function(f){if(!d.tree.isRoot(f))return!(e>a.length)&&(e===a.length&&f.value===b?(c=f,!1):f.value!==a[e]||void e++)}),c},_getChildren:function(a){if(a.length>0)var b=BI.last(a),c=this._getTreeNode(a.slice(0,a.length-1),b);else var c=this.tree.getRoot();return c.getChildren()},_getChildCount:function(a){return this._getChildren(a).length}}),BI.TreeValueChooserCombo=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-combo",width:200,height:30,items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&this._initData(b.items),this.combo=BI.createWidget({type:"bi.multi_tree_combo",element:this,itemsCreator:BI.bind(this._itemsCreator,this),width:b.width,height:b.height}),this.combo.on(BI.MultiTreeCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.TreeValueChooserCombo.EVENT_CONFIRM)})},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.TreeValueChooserCombo.EVENT_CONFIRM="TreeValueChooserCombo.EVENT_CONFIRM",BI.shortcut("bi.tree_value_chooser_combo",BI.TreeValueChooserCombo),BI.TreeValueChooserPane=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-pane",items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.pane=BI.createWidget({type:"bi.multi_select_tree",element:this,itemsCreator:BI.bind(this._itemsCreator,this)}),this.pane.on(BI.MultiSelectTree.EVENT_CHANGE,function(){a.fireEvent(BI.TreeValueChooserPane.EVENT_CHANGE)}),BI.isNotNull(b.items)&&(this._initData(b.items),this.populate())},setSelectedValue:function(a){this.pane.setSelectedValue(a)},setValue:function(a){this.pane.setValue(a)},getValue:function(){return this.pane.getValue()},populate:function(){this.pane.populate.apply(this.pane,arguments)}}),BI.TreeValueChooserPane.EVENT_CHANGE="TreeValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.tree_value_chooser_pane",BI.TreeValueChooserPane),BI.AbstractValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn,cache:!0})},_valueFormatter:function(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},_getItemsByTimes:function(a,b){for(var c=[],d=(b-1)*this._const.perPage;a[d]&&d .filter-item-empty-item { + border-top: 0px; + border-right: 1px solid #d4dadd; + border-bottom: 1px solid #d4dadd; +} +.bi-filter-expander > table { + min-width: 100%; +} +.bi-filter-expander > table > tbody > tr > td.first-element { + width: 20px; + border-right: 1px solid #d4dadd !important; + border-bottom: 1px solid #d4dadd !important; +} +.bi-theme-dark .bi-filter-expander > .filter-item-empty-item { + border-right: 1px solid #525466; + border-bottom: 1px solid #525466; +} +.bi-theme-dark .bi-filter-expander > table > tbody > tr > td.first-element { + border-right: 1px solid #525466 !important; + border-bottom: 1px solid #525466 !important; +} +.bi-filter-operation .operation-trigger.hover, +.bi-filter-operation .operation-trigger:hover { + color: #58cc7d; +} +.bi-filter-pane { + min-width: 100%; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; +} .bi-interactive-arrangement .interactive-arrangement-dragtag-line { z-index: 1000000000; background-color: #faaa39; diff --git a/dist/fineui.min.css b/dist/fineui.min.css index b4bbd19fc..455922357 100644 --- a/dist/fineui.min.css +++ b/dist/fineui.min.css @@ -1 +1 @@ -/*! normalize.css v1.0.0 | MIT License | git.io/normalize */dl,h3,menu,ol,p,pre,ul{margin:1em 0}.b-font,i{-webkit-text-stroke-width:.2px;-moz-osx-font-smoothing:grayscale}.cm-em,dfn{font-style:italic}.bi-label,.bi-text,.overflow-dot{text-overflow:ellipsis}.bi-excel-table-header-cell,.bi-preview-table-header-cell,.cm-header,.cm-strong,b,strong{font-weight:700}.b-font,body,i{-moz-osx-font-smoothing:grayscale}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}h2{font-size:1.5em;margin:.83em 0}h3{font-size:1.17em}h4{font-size:1em;margin:1.33em 0}h5{font-size:.83em;margin:1.67em 0}h6{font-size:.75em;margin:2.33em 0}abbr[title]{border-bottom:1px dotted}blockquote{margin:1em 40px}mark{background:#ff0;color:#000}.base-disabled,.base-disabled .b-font:before,.base-disabled .bi-input,.base-disabled .bi-textarea{color:#9ea6b2!important}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}small,sub,sup{font-size:75%}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}q{quotes:none}q:after,q:before{content:'';content:none}sub,sup{line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dd{margin:0 0 0 40px}menu,ol,ul{padding:0 0 0 40px}nav ol,nav ul{list-style:none}img{border:0;-ms-interpolation-mode:bicubic}svg:not(:root){overflow:hidden}figure,form{margin:0}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0;white-space:normal}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline}button,input{line-height:normal}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],input[disabled]{cursor:default}.base-disabled,.base-invalid{cursor:default!important}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}.bi-collection-table-cell,.bi-text,.border-sizing{-moz-box-sizing:border-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}*,a,body,div,html,img,li,ol,p,span,ul{margin:0;padding:0}a{outline:0;text-decoration:none}a:focus{outline:0}input::-webkit-contacts-auto-fill-button{visibility:hidden;display:none!important;pointer-events:none;position:absolute;right:0}input::-ms-clear{display:none}input,textarea{margin:0;padding:0;outline:0;border:1px solid #d4dadd}ul{list-style:disc}li{list-style-type:none}i{-webkit-font-smoothing:antialiased}.bi-theme-dark input,.bi-theme-dark textarea{border:1px solid #525466}.bi-theme-dark .base-disabled,.bi-theme-dark .base-disabled .b-font:before,.bi-theme-dark .base-disabled .bi-input,.bi-theme-dark .base-disabled .bi-textarea{color:#666!important}.clearfix:after,.clearfix:before{content:" ";display:table;line-height:0}.clearfix:after{clear:both}.bi-background{background-color:#fafbfc;color:#3d4d66}.bi-background .bi-input,.bi-background .bi-textarea{color:#3d4d66}.bi-theme-dark .bi-background{background-color:#191B2B;color:#ccc}.bi-theme-dark .bi-background .bi-input,.bi-theme-dark .bi-background .bi-textarea{color:#ccc}.bi-card,.bi-card .bi-input,.bi-card .bi-textarea{color:#3d4d66}.bi-card{background-color:#fff}.bi-theme-dark .bi-card{background-color:#242640;color:#ccc}.bi-theme-dark .bi-card .bi-input,.bi-theme-dark .bi-card .bi-textarea{color:#ccc}.bi-disabled,.bi-disabled .bi-input,.bi-disabled .bi-textarea{color:#9ea6b2}.bi-theme-dark .bi-disabled,.bi-theme-dark .bi-disabled .bi-input,.bi-theme-dark .bi-disabled .bi-textarea{color:#666}.bi-tips,.bi-tips .bi-input,.bi-tips .bi-textarea{color:#c4c9d1}.bi-border{border:1px solid #d4dadd}.bi-theme-dark .bi-border{border:1px solid #525466}.bi-border-left{border-left:1px solid #d4dadd}.bi-theme-dark .bi-border-left{border-left:1px solid #525466}.bi-border-right{border-right:1px solid #d4dadd}.bi-theme-dark .bi-border-right{border-right:1px solid #525466}.bi-border-top{border-top:1px solid #d4dadd}.bi-theme-dark .bi-border-top{border-top:1px solid #525466}.bi-border-bottom{border-bottom:1px solid #d4dadd}.bi-theme-dark .bi-border-bottom{border-bottom:1px solid #525466}.bi-keyword-red-mark,.bi-keyword-red-mark .bi-input,.bi-keyword-red-mark .bi-textarea{color:#faaa39}.bi-high-light,.bi-high-light .bi-input,.bi-high-light .bi-textarea{color:#3685f2}.bi-high-light-background{background-color:#3f8ce8;color:#fff}.bi-high-light-background .bi-input,.bi-high-light-background .bi-textarea{color:#fff}.bi-high-light-border{border-color:#178cdf}.bi-water-mark{color:#ccc;cursor:text}.bi-water-mark .bi-input,.bi-water-mark .bi-textarea{color:#ccc}.bi-theme-dark .bi-water-mark,.bi-theme-dark .bi-water-mark .bi-input,.bi-theme-dark .bi-water-mark .bi-textarea{color:#666}.bi-mask,.bi-mask .bi-input,.bi-mask .bi-textarea{color:#fff}.bi-resizer{background:#1a1a1a;opacity:.2;filter:alpha(opacity=20);z-index:1000000000!important}.bi-theme-dark .bi-resizer{background:#fff}.bi-mask{background-color:rgba(26,26,26,.2);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#331a1a1a, endColorstr=#331a1a1a)}.bi-theme-dark .bi-mask{color:#242640;background-color:rgba(255,255,255,.2);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#33ffffff, endColorstr=#33ffffff)}.bi-theme-dark .bi-mask .bi-input,.bi-theme-dark .bi-mask .bi-textarea{color:#242640}.bi-z-index-mask{color:#fff;background-color:rgba(26,26,26,.5);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#801a1a1a, endColorstr=#801a1a1a)}.bi-z-index-mask .bi-input,.bi-z-index-mask .bi-textarea{color:#fff}.bi-list-item.hover,.bi-list-item:hover{color:#1a1a1a;background-color:rgba(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.bi-list-item.hover .bi-input,.bi-list-item.hover .bi-textarea,.bi-list-item:hover .bi-input,.bi-list-item:hover .bi-textarea{color:#1a1a1a}.bi-list-item.disabled,.bi-list-item.disabled:active,.bi-list-item.disabled:hover{background-color:transparent!important;color:#9ea6b2!important}.bi-list-item.disabled .bi-high-light,.bi-list-item.disabled .bi-input,.bi-list-item.disabled .bi-textarea,.bi-list-item.disabled:active .bi-high-light,.bi-list-item.disabled:active .bi-input,.bi-list-item.disabled:active .bi-textarea,.bi-list-item.disabled:hover .bi-high-light,.bi-list-item.disabled:hover .bi-input,.bi-list-item.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item.hover,.bi-theme-dark .bi-list-item:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item.hover .bi-input,.bi-theme-dark .bi-list-item.hover .bi-textarea,.bi-theme-dark .bi-list-item:hover .bi-input,.bi-theme-dark .bi-list-item:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item.disabled,.bi-theme-dark .bi-list-item.disabled:active,.bi-theme-dark .bi-list-item.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item.disabled .bi-high-light,.bi-theme-dark .bi-list-item.disabled .bi-input,.bi-theme-dark .bi-list-item.disabled .bi-textarea,.bi-theme-dark .bi-list-item.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item.disabled:active .bi-input,.bi-theme-dark .bi-list-item.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item.disabled:hover .bi-input,.bi-theme-dark .bi-list-item.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-border.active,.bi-list-item-border:active{border:1px solid #178cdf}.bi-list-item-simple.hover,.bi-list-item-simple.hover .bi-input,.bi-list-item-simple.hover .bi-textarea,.bi-list-item-simple:hover,.bi-list-item-simple:hover .bi-input,.bi-list-item-simple:hover .bi-textarea{color:#3685f2}.bi-list-item-simple.disabled,.bi-list-item-simple.disabled .bi-high-light,.bi-list-item-simple.disabled .bi-input,.bi-list-item-simple.disabled .bi-textarea,.bi-list-item-simple.disabled:active,.bi-list-item-simple.disabled:active .bi-high-light,.bi-list-item-simple.disabled:active .bi-input,.bi-list-item-simple.disabled:active .bi-textarea,.bi-list-item-simple.disabled:hover,.bi-list-item-simple.disabled:hover .bi-high-light,.bi-list-item-simple.disabled:hover .bi-input,.bi-list-item-simple.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-list-item-effect:hover,.bi-list-item-effect:hover .bi-input,.bi-list-item-effect:hover .bi-textarea{color:#1a1a1a}.bi-list-item-effect.active,.bi-list-item-effect.active .bi-input,.bi-list-item-effect.active .bi-textarea,.bi-list-item-effect:active,.bi-list-item-effect:active .bi-input,.bi-list-item-effect:active .bi-textarea{color:#3685f2}.bi-list-item-effect.disabled,.bi-list-item-effect.disabled .bi-high-light,.bi-list-item-effect.disabled .bi-input,.bi-list-item-effect.disabled .bi-textarea,.bi-list-item-effect.disabled:active,.bi-list-item-effect.disabled:active .bi-high-light,.bi-list-item-effect.disabled:active .bi-input,.bi-list-item-effect.disabled:active .bi-textarea,.bi-list-item-effect.disabled:hover,.bi-list-item-effect.disabled:hover .bi-high-light,.bi-list-item-effect.disabled:hover .bi-input,.bi-list-item-effect.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item-effect:hover,.bi-theme-dark .bi-list-item-effect:hover .bi-input,.bi-theme-dark .bi-list-item-effect:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-effect.active,.bi-theme-dark .bi-list-item-effect.active .bi-input,.bi-theme-dark .bi-list-item-effect.active .bi-textarea,.bi-theme-dark .bi-list-item-effect:active,.bi-theme-dark .bi-list-item-effect:active .bi-input,.bi-theme-dark .bi-list-item-effect:active .bi-textarea{color:#3685f2}.bi-theme-dark .bi-list-item-effect.disabled,.bi-theme-dark .bi-list-item-effect.disabled:active,.bi-theme-dark .bi-list-item-effect.disabled:hover{background-color:transparent!important;color:#666!important}.bi-list-item-active.active,.bi-list-item-active.hover,.bi-list-item-active:active,.bi-list-item-active:hover{background-color:rgba(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.bi-theme-dark .bi-list-item-effect.disabled .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled .bi-input,.bi-theme-dark .bi-list-item-effect.disabled .bi-textarea,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-input,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-active.hover,.bi-list-item-active.hover .bi-input,.bi-list-item-active.hover .bi-textarea,.bi-list-item-active:hover,.bi-list-item-active:hover .bi-input,.bi-list-item-active:hover .bi-textarea{color:#1a1a1a}.bi-list-item-active.active,.bi-list-item-active.active .bi-input,.bi-list-item-active.active .bi-textarea,.bi-list-item-active:active,.bi-list-item-active:active .bi-input,.bi-list-item-active:active .bi-textarea{color:#3685f2}.bi-list-item-active.disabled,.bi-list-item-active.disabled:active,.bi-list-item-active.disabled:hover{background-color:transparent!important;color:#9ea6b2!important}.bi-list-item-active.disabled .bi-high-light,.bi-list-item-active.disabled .bi-input,.bi-list-item-active.disabled .bi-textarea,.bi-list-item-active.disabled:active .bi-high-light,.bi-list-item-active.disabled:active .bi-input,.bi-list-item-active.disabled:active .bi-textarea,.bi-list-item-active.disabled:hover .bi-high-light,.bi-list-item-active.disabled:hover .bi-input,.bi-list-item-active.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item-active.hover,.bi-theme-dark .bi-list-item-active:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-active.hover .bi-input,.bi-theme-dark .bi-list-item-active.hover .bi-textarea,.bi-theme-dark .bi-list-item-active:hover .bi-input,.bi-theme-dark .bi-list-item-active:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-active.active,.bi-theme-dark .bi-list-item-active:active{color:#3685f2;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-active.active .bi-input,.bi-theme-dark .bi-list-item-active.active .bi-textarea,.bi-theme-dark .bi-list-item-active:active .bi-input,.bi-theme-dark .bi-list-item-active:active .bi-textarea{color:#3685f2}.bi-theme-dark .bi-list-item-active.disabled,.bi-theme-dark .bi-list-item-active.disabled:active,.bi-theme-dark .bi-list-item-active.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-active.disabled .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled .bi-input,.bi-theme-dark .bi-list-item-active.disabled .bi-textarea,.bi-theme-dark .bi-list-item-active.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled:active .bi-input,.bi-theme-dark .bi-list-item-active.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-active2.hover,.bi-list-item-active2:hover{color:#1a1a1a;background-color:#fff}.bi-list-item-active2.hover .bi-input,.bi-list-item-active2.hover .bi-textarea,.bi-list-item-active2:hover .bi-input,.bi-list-item-active2:hover .bi-textarea{color:#1a1a1a}.bi-list-item-active2.active,.bi-list-item-active2:active{color:#3685f2;background-color:#fff}.bi-list-item-active2.active .bi-input,.bi-list-item-active2.active .bi-textarea,.bi-list-item-active2:active .bi-input,.bi-list-item-active2:active .bi-textarea{color:#3685f2}.bi-list-item-active2.disabled,.bi-list-item-active2.disabled:active,.bi-list-item-active2.disabled:hover{background-color:transparent!important;color:#9ea6b2!important}.bi-list-item-active2.disabled .bi-high-light,.bi-list-item-active2.disabled .bi-input,.bi-list-item-active2.disabled .bi-textarea,.bi-list-item-active2.disabled:active .bi-high-light,.bi-list-item-active2.disabled:active .bi-input,.bi-list-item-active2.disabled:active .bi-textarea,.bi-list-item-active2.disabled:hover .bi-high-light,.bi-list-item-active2.disabled:hover .bi-input,.bi-list-item-active2.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item-active2.hover,.bi-theme-dark .bi-list-item-active2:hover{color:#fff;background-color:#242640}.bi-theme-dark .bi-list-item-active2.hover .bi-input,.bi-theme-dark .bi-list-item-active2.hover .bi-textarea,.bi-theme-dark .bi-list-item-active2:hover .bi-input,.bi-theme-dark .bi-list-item-active2:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-active2.active,.bi-theme-dark .bi-list-item-active2:active{color:#3685f2;background-color:#242640}.bi-theme-dark .bi-list-item-active2.active .bi-input,.bi-theme-dark .bi-list-item-active2.active .bi-textarea,.bi-theme-dark .bi-list-item-active2:active .bi-input,.bi-theme-dark .bi-list-item-active2:active .bi-textarea{color:#3685f2}.bi-theme-dark .bi-list-item-active2.disabled,.bi-theme-dark .bi-list-item-active2.disabled:active,.bi-theme-dark .bi-list-item-active2.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-active2.disabled .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled .bi-input,.bi-theme-dark .bi-list-item-active2.disabled .bi-textarea,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-input,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-select.hover,.bi-list-item-select:hover{color:#1a1a1a;background-color:rgba(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.bi-list-item-select.hover .bi-input,.bi-list-item-select.hover .bi-textarea,.bi-list-item-select:hover .bi-input,.bi-list-item-select:hover .bi-textarea{color:#1a1a1a}.bi-list-item-select.active,.bi-list-item-select:active{color:#fff;background-color:#3f8ce8}.bi-list-item-select.active .bi-high-light,.bi-list-item-select.active .bi-input,.bi-list-item-select.active .bi-textarea,.bi-list-item-select:active .bi-high-light,.bi-list-item-select:active .bi-input,.bi-list-item-select:active .bi-textarea{color:#fff}.bi-list-item-select.button-success.active,.bi-list-item-select.button-success:active{color:#fff;background-color:#58cc7d}.bi-list-item-select.button-success.active .bi-high-light,.bi-list-item-select.button-success.active .bi-input,.bi-list-item-select.button-success.active .bi-textarea,.bi-list-item-select.button-success:active .bi-high-light,.bi-list-item-select.button-success:active .bi-input,.bi-list-item-select.button-success:active .bi-textarea{color:#fff}.bi-list-item-select.button-warning,.bi-list-item-select.button-warning .bi-high-light,.bi-list-item-select.button-warning .bi-input,.bi-list-item-select.button-warning .bi-textarea,.bi-list-item-select.button-warning.hover .bi-high-light,.bi-list-item-select.button-warning.hover .bi-input,.bi-list-item-select.button-warning.hover .bi-textarea,.bi-list-item-select.button-warning:hover .bi-high-light,.bi-list-item-select.button-warning:hover .bi-input,.bi-list-item-select.button-warning:hover .bi-textarea{color:#ff4949}.bi-list-item-select.button-success.active.bi-high-light-border,.bi-list-item-select.button-success:active.bi-high-light-border{border-color:#58cc7d}.bi-list-item-select.button-warning.active.bi-high-light-border,.bi-list-item-select.button-warning.bi-high-light-border,.bi-list-item-select.button-warning.hover.bi-high-light-border,.bi-list-item-select.button-warning:active.bi-high-light-border,.bi-list-item-select.button-warning:hover.bi-high-light-border{border-color:#e85050}.bi-list-item-select.button-warning.hover,.bi-list-item-select.button-warning:hover{color:#ff4949;background-color:#ffecec}.bi-list-item-select.button-warning.active,.bi-list-item-select.button-warning:active{color:#fff;background-color:#ff4949}.bi-list-item-select.button-warning.active .bi-high-light,.bi-list-item-select.button-warning.active .bi-input,.bi-list-item-select.button-warning.active .bi-textarea,.bi-list-item-select.button-warning:active .bi-high-light,.bi-list-item-select.button-warning:active .bi-input,.bi-list-item-select.button-warning:active .bi-textarea{color:#fff}.bi-list-item-select.disabled,.bi-list-item-select.disabled:active,.bi-list-item-select.disabled:hover{color:#9ea6b2!important;background-color:transparent!important}.bi-list-item-select.disabled .bi-high-light,.bi-list-item-select.disabled .bi-input,.bi-list-item-select.disabled .bi-textarea,.bi-list-item-select.disabled:active .bi-high-light,.bi-list-item-select.disabled:active .bi-input,.bi-list-item-select.disabled:active .bi-textarea,.bi-list-item-select.disabled:hover .bi-high-light,.bi-list-item-select.disabled:hover .bi-input,.bi-list-item-select.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-list-item-select.disabled.bi-high-light-border,.bi-list-item-select.disabled:active.bi-high-light-border,.bi-list-item-select.disabled:hover.bi-high-light-border{border-color:#ccc}.bi-theme-dark .bi-list-item-select.hover,.bi-theme-dark .bi-list-item-select:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-select.hover .bi-input,.bi-theme-dark .bi-list-item-select.hover .bi-textarea,.bi-theme-dark .bi-list-item-select:hover .bi-input,.bi-theme-dark .bi-list-item-select:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-select.active,.bi-theme-dark .bi-list-item-select:active{color:#fff;background-color:#3f8ce8}.bi-theme-dark .bi-list-item-select.active .bi-high-light,.bi-theme-dark .bi-list-item-select.active .bi-input,.bi-theme-dark .bi-list-item-select.active .bi-textarea,.bi-theme-dark .bi-list-item-select:active .bi-high-light,.bi-theme-dark .bi-list-item-select:active .bi-input,.bi-theme-dark .bi-list-item-select:active .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-select.disabled,.bi-theme-dark .bi-list-item-select.disabled:active,.bi-theme-dark .bi-list-item-select.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-select.disabled .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled .bi-input,.bi-theme-dark .bi-list-item-select.disabled .bi-textarea,.bi-theme-dark .bi-list-item-select.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled:active .bi-input,.bi-theme-dark .bi-list-item-select.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-none.hover,.bi-list-item-none:hover{color:inherit;background-color:transparent}.bi-list-item-none.hover .bi-input,.bi-list-item-none.hover .bi-textarea,.bi-list-item-none:hover .bi-input,.bi-list-item-none:hover .bi-textarea{color:inherit}.bi-list-item-none.active,.bi-list-item-none:active{color:inherit;background-color:transparent}.bi-list-item-none.active .bi-high-light,.bi-list-item-none.active .bi-input,.bi-list-item-none.active .bi-textarea,.bi-list-item-none:active .bi-high-light,.bi-list-item-none:active .bi-input,.bi-list-item-none:active .bi-textarea{color:inherit}.bi-list-item-none.disabled,.bi-list-item-none.disabled:active,.bi-list-item-none.disabled:hover{color:#9ea6b2!important;background-color:transparent!important}.bi-list-item-none.disabled .bi-high-light,.bi-list-item-none.disabled .bi-input,.bi-list-item-none.disabled .bi-textarea,.bi-list-item-none.disabled:active .bi-high-light,.bi-list-item-none.disabled:active .bi-input,.bi-list-item-none.disabled:active .bi-textarea,.bi-list-item-none.disabled:hover .bi-high-light,.bi-list-item-none.disabled:hover .bi-input,.bi-list-item-none.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item-none.hover,.bi-theme-dark .bi-list-item-none:hover{color:inherit;background-color:transparent}.bi-theme-dark .bi-list-item-none.hover .bi-input,.bi-theme-dark .bi-list-item-none.hover .bi-textarea,.bi-theme-dark .bi-list-item-none:hover .bi-input,.bi-theme-dark .bi-list-item-none:hover .bi-textarea{color:inherit}.bi-theme-dark .bi-list-item-none.active,.bi-theme-dark .bi-list-item-none:active{color:inherit;background-color:transparent}.bi-theme-dark .bi-list-item-none.active .bi-high-light,.bi-theme-dark .bi-list-item-none.active .bi-input,.bi-theme-dark .bi-list-item-none.active .bi-textarea,.bi-theme-dark .bi-list-item-none:active .bi-high-light,.bi-theme-dark .bi-list-item-none:active .bi-input,.bi-theme-dark .bi-list-item-none:active .bi-textarea{color:inherit}.bi-theme-dark .bi-list-item-none.disabled,.bi-theme-dark .bi-list-item-none.disabled:active,.bi-theme-dark .bi-list-item-none.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-none.disabled .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled .bi-input,.bi-theme-dark .bi-list-item-none.disabled .bi-textarea,.bi-theme-dark .bi-list-item-none.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled:active .bi-input,.bi-theme-dark .bi-list-item-none.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-textarea{color:#666!important}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.cursor-move{cursor:move}.CodeMirror-crosshair,.farbtastic *{cursor:crosshair}.y-overflow-auto{overflow-y:auto;overflow-x:hidden}.x-overflow-auto{overflow-y:hidden;overflow-x:auto}.y-overflow-scroll{overflow-y:scroll;overflow-x:hidden}.x-overflow-scroll{overflow-y:hidden;overflow-x:scroll}.overflow-auto{overflow-x:auto;overflow-y:auto}.overflow-scroll{overflow-x:scroll;overflow-y:scroll}.overflow-dot,.overflow-hidden{overflow-x:hidden;overflow-y:hidden}.td-overflow{white-space:normal;word-break:break-all}.overflow-dot{white-space:nowrap}.display-block{display:block}.display-inline{display:inline-block}.vertical-super{vertical-align:super}.vertical-top{vertical-align:top}.horizon-center{text-align:center}.horizon-left{text-align:left}.border-sizing{-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.content-sizing{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;-ms-box-sizing:content-box;box-sizing:content-box}.bi-flex-center-layout{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-flex-align:center;-ms-align-items:center;-o-align-items:center;align-items:center}.bi-flex-horizontal-layout{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:start;-webkit-align-items:flex-start;-moz-align-items:flex-start;-ms-align-items:flex-start;-ms-flex-align:start;-o-align-items:flex-start;align-items:flex-start;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap}.bi-flex-horizontal-layout.middle{-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-ms-flex-align:center;-o-align-items:center;align-items:center}.bi-flex-horizontal-layout.bottom{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-moz-align-items:flex-end;-ms-align-items:flex-end;-ms-flex-align:end;-o-align-items:flex-end;align-items:flex-end}.bi-flex-vertical-center{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-ms-flex-align:center;-o-align-items:center;align-items:center;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap}.bi-flex-vertical-center.stretch{-webkit-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;-o-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-ms-flex-pack:center;-o-justify-content:center;justify-content:center;-webkit-box-align:stretch;-webkit-align-items:stretch;-moz-align-items:stretch;-ms-align-items:stretch;-ms-flex-align:stretch;-o-align-items:stretch;align-items:stretch}.bi-flex-wrapper-center-layout .flex-wrapper-center-layout-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-ms-flex-pack:center;-o-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-ms-flex-align:center;-o-align-items:center;align-items:center;min-width:100%;min-height:100%;float:left}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-ms-flex-pack:start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:flex-start;-webkit-align-items:flex-start;-moz-align-items:flex-start;-ms-align-items:flex-start;-ms-flex-align:start;-o-align-items:flex-start;align-items:flex-start;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap;min-height:100%}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.middle{-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.bottom{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-moz-align-items:flex-end;-ms-align-items:flex-end;-o-align-items:flex-end;align-items:flex-end}.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-ms-flex-pack:start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-ms-flex-align:center;-o-align-items:center;align-items:center;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap;min-height:100%;float:left}.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper.stretch{width:100%;-webkit-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;-o-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-box-align:stretch;-webkit-align-items:stretch;-moz-align-items:stretch;-ms-align-items:stretch;-o-align-items:stretch;align-items:stretch}.bi-theme-dark{background-color:#191B2B;color:#ccc}.bi-theme-dark .bi-input{color:#fff}.bi-color-chooser-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;box-shadow:0 0 2px 1px #d4dadd inset;-webkit-box-shadow:0 0 2px 1px #d4dadd inset;-moz-box-shadow:0 0 2px 1px #d4dadd inset}.bi-color-picker-button .color-picker-button-mask{border:1px solid #1a1a1a}.bi-theme-dark .bi-color-picker-button .color-picker-button-mask{border:1px solid #fff}.bi-color-picker-editor .color-picker-editor-display{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;box-shadow:0 0 2px 1px #d4dadd inset;-webkit-box-shadow:0 0 2px 1px #d4dadd inset;-moz-box-shadow:0 0 2px 1px #d4dadd inset}.farbtastic{position:relative}.farbtastic *{position:absolute}.farbtastic,.farbtastic .wheel{width:195px;height:195px}.farbtastic .color,.farbtastic .overlay{top:47px;left:47px;width:101px;height:101px}.farbtastic .wheel{width:195px;height:195px}.farbtastic .marker{width:17px;height:17px;margin:-8px 0 0 -8px;overflow:hidden}.bi-bubble-combo .button-combo-triangle-wrapper{position:fixed!important;z-index:10000000}.bi-bubble-combo .bubble-combo-triangle-left{z-index:1;position:absolute;width:16px;height:10px;border-bottom:1px solid #f5f5f5}.bi-bubble-combo .bubble-combo-triangle-left:before{position:absolute;top:0;right:0;bottom:0;border-bottom:10px solid #ccc;border-left:8px solid transparent;border-right:8px solid transparent;content:""}.bi-bubble-combo .bubble-combo-triangle-left:after{position:absolute;right:1px;top:1px;bottom:0;border-bottom:9px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent;content:""}.bi-bubble-combo .bubble-combo-triangle-right{z-index:1;position:absolute;width:16px;height:6px;border-bottom:1px solid #f5f5f5}.bi-bubble-combo .bubble-combo-triangle-right:before{position:absolute;top:0;right:0;bottom:0;border-bottom:10px solid #ccc;border-left:8px solid transparent;border-right:8px solid transparent;content:""}.bi-bubble-combo .bubble-combo-triangle-right:after{position:absolute;right:1px;top:1px;bottom:0;border-bottom:9px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent;content:""}.bi-bubble-combo .bubble-combo-triangle-top{z-index:1;position:absolute;width:16px;height:10px;border-top:1px solid #fff}.bi-bubble-combo .bubble-combo-triangle-top:after{position:absolute;right:1px;top:0;border-top:6px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent;content:""}.bi-bubble-combo .bubble-combo-triangle-bottom:before,.bi-bubble-combo .bubble-combo-triangle-top:before{border-left:8px solid transparent;border-right:8px solid transparent;content:"";position:absolute}.bi-bubble-combo .bubble-combo-triangle-top:before{border-top:7px solid #ccc}.bi-bubble-combo .bubble-combo-triangle-bottom{z-index:1;position:absolute;width:16px;height:5px;border-bottom:1px solid #fff}.bi-bubble-combo .bubble-combo-triangle-bottom:before{top:0;right:0;bottom:0;border-bottom:7px solid #ccc}.bi-bubble-combo .bubble-combo-triangle-bottom:after{position:absolute;right:1px;top:1px;bottom:0;border-bottom:6px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent;content:""}.cm-tab-wrap-hack:after,.scrollbar-layout-face:after{content:''}.bi-combo.bi-combo-popup{display:block!important;visibility:visible!important}.bi-search-text-value-combo .trigger-icon-button{font-size:16px}.bi-adapt-editor .adapt-editor-text{font-size:14px}.bi-search-editor .close-font,.bi-search-editor .search-font{font-size:20px}.bi-small-search-editor .bi-editor,.bi-small-search-editor .bi-editor .bi-input,.bi-small-search-editor .bi-editor .bi-label{font-size:12px}.bi-small-search-editor .close-font,.bi-small-search-editor .search-font{font-size:18px}.bi-sign-initial-editor .sign-initial-editor-text{font-size:14px}.CodeMirror{font-family:monospace;cursor:text;width:100%;height:100%}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror div.CodeMirror-cursor{border-left:1px solid #1a1a1a}.bi-theme-dark .CodeMirror div.CodeMirror-cursor{border-left:1px solid #fff}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.CodeMirror.cm-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7}.CodeMirror.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}@-moz-keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}@-webkit-keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}@keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.bi-display-tree .ztree li a:hover,.ztree li a{text-decoration:none}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default span[class*=fieldName]{display:inline-block;color:#fff;background:#3685f2;padding:0 5px;margin:1px}.cm-s-default span[class*=start]{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;margin-left:3px}.cm-s-default span[class*=end]{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;margin-right:3px}.cm-s-default span[class*="start end"]{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.cm-s-default span[class*="#"]{color:#3685f2}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none}.bi-message-text,.bi-page-table-cell{-webkit-user-select:text;-ms-user-select:text;-o-user-select:text;-khtml-user-select:text}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent}.codemirror-high-line-height{line-height:2}.codemirror-low-line-height{line-height:1.4}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-code{outline:0}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.bi-collection-table-cell,.bi-text{-webkit-box-sizing:border-box;-ms-box-sizing:border-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-measure pre{position:static}.CodeMirror div.CodeMirror-cursor{position:absolute;border-right:none;width:0}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}span.CodeMirror-selectedtext{background:0 0}.CodeMirror-hints{position:absolute;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,.2);-moz-box-shadow:2px 3px 5px rgba(0,0,0,.2);box-shadow:2px 3px 5px rgba(0,0,0,.2);border-radius:3px;border:1px solid silver;background:#fff;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto;z-index:1000000000}.bi-label,.bi-segment>.center-element,.bi-text,.bi-textarea-editor{overflow-x:hidden;overflow-y:hidden}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;max-width:19em;overflow:hidden;white-space:pre;color:#000;cursor:pointer}.bi-label,.bi-text,.ztree li{white-space:nowrap}li.CodeMirror-hint-active{background:#08f;color:#fff}.bi-message-title{font-size:16px;cursor:pointer}.bi-message-text{font-size:16px;-moz-user-select:text;user-select:text}.bi-message-content{font-size:16px}.bi-message-close{font-size:25px}.bi-message-animate{-webkit-transition:opacity .3s,transform .4s,-webkit-transform .4s;-moz-transition:opacity .3s,transform .4s,-webkit-transform .4s;-o-transition:opacity .3s,transform .4s,-webkit-transform .4s;transition:opacity .3s,transform .4s,-webkit-transform .4s}.bi-message-enter{opacity:1}.bi-message-leave{opacity:0;transform:translateY(-100%)}.bi-multi-list-view .bi-button-mask{opacity:.1;filter:alpha(opacity=10)}.bi-panel{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-panel .panel-title{background-color:#F2F4F7}.bi-panel .panel-title .panel-title-text{cursor:text;font-size:14px}.bi-all-count-pager .all-pager-next,.bi-all-count-pager .all-pager-prev,.bi-direction-pager .direction-pager-next,.bi-direction-pager .direction-pager-prev,.bi-rich-editor-text-toolbar .text-toolbar-button{font-size:16px}.bi-pager .page-item{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-segment>.center-element{overflow:hidden;background:#fff;border-right:1px solid #d4dadd;border-top:1px solid #d4dadd;border-bottom:1px solid #d4dadd}.bi-segment>.first-element{border-left:1px solid #d4dadd;-webkit-border-radius:6px 0 0 6px;-moz-border-radius:6px 0 0 6px;border-radius:6px 0 0 6px}.bi-segment>.last-element{-webkit-border-radius:0 6px 6px 0;-moz-border-radius:0 6px 6px 0;border-radius:0 6px 6px 0}.bi-theme-dark .bi-segment>.center-element{overflow:hidden;overflow-x:hidden;overflow-y:hidden;background:#242640;border-right:1px solid #525466;border-top:1px solid #525466;border-bottom:1px solid #525466}.bi-theme-dark .bi-segment>.first-element{border-left:1px solid #242640}#body .bi-button,body .bi-button{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;border:1px solid #178cdf;background-color:#3f8ce8;text-align:center;vertical-align:middle;cursor:pointer;font-size:14px}#body .bi-button.clear,#body .bi-button.ghost,body .bi-button.clear,body .bi-button.ghost{background-color:transparent;font-size:inherit}#body .bi-button.block,body .bi-button.block{font-size:inherit;border-width:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}#body .bi-button.clear,body .bi-button.clear{border-width:0}#body .bi-button.clear:hover,body .bi-button.clear:hover{opacity:.9;filter:alpha(opacity=90)}#body .bi-button.clear:active,body .bi-button.clear:active{opacity:.8;filter:alpha(opacity=80)}#body .bi-button.button-common,#body .bi-button.button-common .b-font:before,body .bi-button.button-common,body .bi-button.button-common .b-font:before{color:#fff}#body .bi-button.button-common.clear,#body .bi-button.button-common.clear .b-font:before,#body .bi-button.button-common.ghost,#body .bi-button.button-common.ghost .b-font:before,body .bi-button.button-common.clear,body .bi-button.button-common.clear .b-font:before,body .bi-button.button-common.ghost,body .bi-button.button-common.ghost .b-font:before{color:#3685f2}#body .bi-button.button-common.ghost:hover,body .bi-button.button-common.ghost:hover{color:#fff;background-color:#3f8ce8}#body .bi-button.button-common.ghost:active,body .bi-button.button-common.ghost:active{background-color:#3f8ce8}#body .bi-button.button-ignore,body .bi-button.button-ignore{background-color:#fff;border-color:#178cdf}#body .bi-button.button-ignore,#body .bi-button.button-ignore .b-font:before,body .bi-button.button-ignore,body .bi-button.button-ignore .b-font:before{color:#3685f2}#body .bi-button.button-ignore.clear,body .bi-button.button-ignore.clear{background-color:transparent;border-width:0}#body .bi-button.button-success,body .bi-button.button-success{background-color:#58cc7d;border-color:#58cc7d}#body .bi-button.button-success,#body .bi-button.button-success .b-font:before,body .bi-button.button-success,body .bi-button.button-success .b-font:before{color:#fff}#body .bi-button.button-success.clear,body .bi-button.button-success.clear{background-color:transparent;border-width:0}#body .bi-button.button-success.clear,#body .bi-button.button-success.clear .b-font:before,body .bi-button.button-success.clear,body .bi-button.button-success.clear .b-font:before{color:#5cb75d}#body .bi-button.button-warning,body .bi-button.button-warning{background-color:#faaa39;border-color:#fbb03b}#body .bi-button.button-warning,#body .bi-button.button-warning .b-font:before,body .bi-button.button-warning,body .bi-button.button-warning .b-font:before{color:#fff}#body .bi-button.button-warning.clear,body .bi-button.button-warning.clear{background-color:transparent;border-width:0}#body .bi-button.button-warning.clear,#body .bi-button.button-warning.clear .b-font:before,body .bi-button.button-warning.clear,body .bi-button.button-warning.clear .b-font:before{color:#faaa39}#body .bi-button.button-error,body .bi-button.button-error{background-color:#ff4949;border-color:#e85050}#body .bi-button.button-error,#body .bi-button.button-error .b-font:before,body .bi-button.button-error,body .bi-button.button-error .b-font:before{color:#fff}#body .bi-button.button-error.clear,body .bi-button.button-error.clear{background-color:transparent;border-width:0}#body .bi-button.button-error.clear,#body .bi-button.button-error.clear .b-font:before,body .bi-button.button-error.clear,body .bi-button.button-error.clear .b-font:before{color:#ff4949}#body .bi-button.button-common.disabled,#body .bi-button.button-common.disabled.base-disabled,#body .bi-button.button-error.disabled,#body .bi-button.button-error.disabled.base-disabled,#body .bi-button.button-success.disabled,#body .bi-button.button-success.disabled.base-disabled,#body .bi-button.button-warning.disabled,#body .bi-button.button-warning.disabled.base-disabled,body .bi-button.button-common.disabled,body .bi-button.button-common.disabled.base-disabled,body .bi-button.button-error.disabled,body .bi-button.button-error.disabled.base-disabled,body .bi-button.button-success.disabled,body .bi-button.button-success.disabled.base-disabled,body .bi-button.button-warning.disabled,body .bi-button.button-warning.disabled.base-disabled{background:#ccc!important;border-color:#ccc!important}#body .bi-button.button-common.disabled,#body .bi-button.button-common.disabled .b-font:before,#body .bi-button.button-common.disabled.base-disabled,#body .bi-button.button-common.disabled.base-disabled .b-font:before,#body .bi-button.button-error.disabled,#body .bi-button.button-error.disabled .b-font:before,#body .bi-button.button-error.disabled.base-disabled,#body .bi-button.button-error.disabled.base-disabled .b-font:before,#body .bi-button.button-success.disabled,#body .bi-button.button-success.disabled .b-font:before,#body .bi-button.button-success.disabled.base-disabled,#body .bi-button.button-success.disabled.base-disabled .b-font:before,#body .bi-button.button-warning.disabled,#body .bi-button.button-warning.disabled .b-font:before,#body .bi-button.button-warning.disabled.base-disabled,#body .bi-button.button-warning.disabled.base-disabled .b-font:before,body .bi-button.button-common.disabled,body .bi-button.button-common.disabled .b-font:before,body .bi-button.button-common.disabled.base-disabled,body .bi-button.button-common.disabled.base-disabled .b-font:before,body .bi-button.button-error.disabled,body .bi-button.button-error.disabled .b-font:before,body .bi-button.button-error.disabled.base-disabled,body .bi-button.button-error.disabled.base-disabled .b-font:before,body .bi-button.button-success.disabled,body .bi-button.button-success.disabled .b-font:before,body .bi-button.button-success.disabled.base-disabled,body .bi-button.button-success.disabled.base-disabled .b-font:before,body .bi-button.button-warning.disabled,body .bi-button.button-warning.disabled .b-font:before,body .bi-button.button-warning.disabled.base-disabled,body .bi-button.button-warning.disabled.base-disabled .b-font:before{color:#fff!important}#body .bi-button.button-common.disabled.clear,#body .bi-button.button-common.disabled.clear .b-font:before,#body .bi-button.button-error.disabled.clear,#body .bi-button.button-error.disabled.clear .b-font:before,#body .bi-button.button-ignore.disabled,#body .bi-button.button-ignore.disabled .b-font:before,#body .bi-button.button-ignore.disabled.clear,#body .bi-button.button-ignore.disabled.clear .b-font:before,#body .bi-button.button-success.disabled.clear,#body .bi-button.button-success.disabled.clear .b-font:before,#body .bi-button.button-warning.disabled.clear,#body .bi-button.button-warning.disabled.clear .b-font:before,body .bi-button.button-common.disabled.clear,body .bi-button.button-common.disabled.clear .b-font:before,body .bi-button.button-error.disabled.clear,body .bi-button.button-error.disabled.clear .b-font:before,body .bi-button.button-ignore.disabled,body .bi-button.button-ignore.disabled .b-font:before,body .bi-button.button-ignore.disabled.clear,body .bi-button.button-ignore.disabled.clear .b-font:before,body .bi-button.button-success.disabled.clear,body .bi-button.button-success.disabled.clear .b-font:before,body .bi-button.button-warning.disabled.clear,body .bi-button.button-warning.disabled.clear .b-font:before{color:#9ea6b2!important}#body .bi-button.button-ignore.disabled,body .bi-button.button-ignore.disabled{background:#fff!important;border-color:#d4dadd!important}#body .bi-button.button-common.disabled.clear,#body .bi-button.button-error.disabled.clear,#body .bi-button.button-ignore.disabled.clear,#body .bi-button.button-success.disabled.clear,#body .bi-button.button-warning.disabled.clear,body .bi-button.button-common.disabled.clear,body .bi-button.button-error.disabled.clear,body .bi-button.button-ignore.disabled.clear,body .bi-button.button-success.disabled.clear,body .bi-button.button-warning.disabled.clear{background:0 0!important;border-width:0!important}#body .bi-button.button-common.disabled.clear:active,#body .bi-button.button-common.disabled.clear:hover,#body .bi-button.button-error.disabled.clear:active,#body .bi-button.button-error.disabled.clear:hover,#body .bi-button.button-ignore.disabled.clear:active,#body .bi-button.button-ignore.disabled.clear:hover,#body .bi-button.button-success.disabled.clear:active,#body .bi-button.button-success.disabled.clear:hover,#body .bi-button.button-warning.disabled.clear:active,#body .bi-button.button-warning.disabled.clear:hover,body .bi-button.button-common.disabled.clear:active,body .bi-button.button-common.disabled.clear:hover,body .bi-button.button-error.disabled.clear:active,body .bi-button.button-error.disabled.clear:hover,body .bi-button.button-ignore.disabled.clear:active,body .bi-button.button-ignore.disabled.clear:hover,body .bi-button.button-success.disabled.clear:active,body .bi-button.button-success.disabled.clear:hover,body .bi-button.button-warning.disabled.clear:active,body .bi-button.button-warning.disabled.clear:hover{opacity:1;filter:alpha(opacity=100)}#body .bi-button.button-common.disabled.ghost,#body .bi-button.button-error.disabled.ghost,#body .bi-button.button-ignore.disabled.ghost,#body .bi-button.button-success.disabled.ghost,#body .bi-button.button-warning.disabled.ghost,body .bi-button.button-common.disabled.ghost,body .bi-button.button-error.disabled.ghost,body .bi-button.button-ignore.disabled.ghost,body .bi-button.button-success.disabled.ghost,body .bi-button.button-warning.disabled.ghost{background:0 0!important;border-color:#3685f2!important;opacity:.5;filter:alpha(opacity=50)}#body .bi-button.button-common.disabled.ghost,#body .bi-button.button-common.disabled.ghost .b-font:before,#body .bi-button.button-error.disabled.ghost,#body .bi-button.button-error.disabled.ghost .b-font:before,#body .bi-button.button-ignore.disabled.ghost,#body .bi-button.button-ignore.disabled.ghost .b-font:before,#body .bi-button.button-success.disabled.ghost,#body .bi-button.button-success.disabled.ghost .b-font:before,#body .bi-button.button-warning.disabled.ghost,#body .bi-button.button-warning.disabled.ghost .b-font:before,body .bi-button.button-common.disabled.ghost,body .bi-button.button-common.disabled.ghost .b-font:before,body .bi-button.button-error.disabled.ghost,body .bi-button.button-error.disabled.ghost .b-font:before,body .bi-button.button-ignore.disabled.ghost,body .bi-button.button-ignore.disabled.ghost .b-font:before,body .bi-button.button-success.disabled.ghost,body .bi-button.button-success.disabled.ghost .b-font:before,body .bi-button.button-warning.disabled.ghost,body .bi-button.button-warning.disabled.ghost .b-font:before{color:#3685f2!important}.bi-basic-button.button-common:hover .bi-button-mask,.bi-basic-button.button-error:hover .bi-button-mask,.bi-basic-button.button-ignore:hover .bi-button-mask,.bi-basic-button.button-success:hover .bi-button-mask,.bi-basic-button.button-warning:hover .bi-button-mask{opacity:.1;filter:alpha(opacity=10);background-color:#fff}.bi-basic-button.button-common:active .bi-button-mask,.bi-basic-button.button-error:active .bi-button-mask,.bi-basic-button.button-ignore:active .bi-button-mask,.bi-basic-button.button-success:active .bi-button-mask,.bi-basic-button.button-warning:active .bi-button-mask{opacity:.1;filter:alpha(opacity=10);background-color:#1a1a1a}.bi-theme-dark #body .bi-button.button-common.ghost,.bi-theme-dark #body .bi-button.button-common.ghost .b-font:before,.bi-theme-dark body .bi-button.button-common.ghost,.bi-theme-dark body .bi-button.button-common.ghost .b-font:before{color:#fff;border-color:#fff}.bi-theme-dark #body .bi-button.button-common.ghost:hover,.bi-theme-dark body .bi-button.button-common.ghost:hover{color:#3d4d66;background-color:#fff}.bi-theme-dark #body .bi-button.button-common.ghost:active,.bi-theme-dark body .bi-button.button-common.ghost:active{background-color:rgba(255,255,255,.9);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#e6ffffff, endColorstr=#e6ffffff)}.bi-theme-dark #body .bi-button.button-common.disabled.ghost,.bi-theme-dark body .bi-button.button-common.disabled.ghost{background:0 0!important;border-color:#fff!important;opacity:.5;filter:alpha(opacity=50)}.bi-theme-dark #body .bi-button.button-common.disabled.ghost,.bi-theme-dark #body .bi-button.button-common.disabled.ghost .b-font:before,.bi-theme-dark body .bi-button.button-common.disabled.ghost,.bi-theme-dark body .bi-button.button-common.disabled.ghost .b-font:before{color:#fff!important}.bi-single-select-icon-text-item.active .b-font:before,.bi-single-select-icon-text-item:active .b-font:before{color:#3685f2}.bi-switch{-webkit-border-radius:40px 40px 40px 40px;-moz-border-radius:40px;border-radius:40px;background-color:#d4dadd}.bi-switch.active,.bi-switch:active{background-color:#3f8ce8}.bi-switch .circle-button{-webkit-border-radius:9px 9px 9px 9px;-moz-border-radius:9px;border-radius:9px}.bi-code-editor .param{color:#fff;padding:0 5px;margin:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#3f8ce8;display:inline-block}.bi-code-editor .error-param{color:#ff4949;padding:0 5px;margin:1px;display:inline-block}.bi-multifile-editor .multifile-editor{text-align:right;cursor:pointer;font-size:100px;z-index:2}.bi-resizable-table .resizable-table-region-resizer,.bi-resizable-table-cell .resizable-table-cell-resizer-container{cursor:ew-resize;z-index:1}.bi-shelter-editor .shelter-editor-text,.bi-sign-editor .sign-editor-text{font-size:12px}.bi-textarea-editor{overflow:hidden}.bi-textarea-editor .textarea-editor-content{font-size:12px;border:none}.bi-bubble,.bi-toast{font-size:14px}.x-icon.b-font{margin:auto;width:100%}.bi-file{opacity:0;filter:alpha(opacity=0);z-index:2}.bi-input,.bi-textarea{border:none;outline:0;background-color:transparent;padding:0;margin:0;width:100%;height:100%}.bi-input.bi-input-focus,.bi-textarea.bi-input-focus{border:none}.bi-input.bi-input-error,.bi-textarea.bi-input-error{border:none;color:#ff4949!important}.bi-bubble .bubble-text,.bi-toast{-webkit-border-radius:2px;-moz-border-radius:2px}.bi-label{word-break:break-all}.bi-text{box-sizing:border-box;word-wrap:break-word;word-break:break-word}.bi-bubble .bubble-text{border-radius:2px}.bi-bubble .bubble-error{background:#ffecec;color:#ff4949}.bi-bubble .bubble-common{background:#eaf2fd;color:#3685f2}.bi-bubble .bubble-success{background:#e1f4e7;color:#5cb75d}.bi-bubble .bubble-warning{background:#feeed7;color:#faaa39}.bi-tip{position:fixed!important}.bi-toast{color:#fff;max-width:400px;min-width:150px;border-radius:2px}.bi-toast .toast-icon,.bi-trigger .bi-trigger-icon-button{font-size:16px}.bi-toast.toast-success{background:#58cc7d}.bi-toast.toast-warning{background:#faaa39}.bi-toast.toast-error{background:#ff4949}.bi-toast.toast-normal{background:#3f8ce8}.bi-tooltip{max-width:250px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;font-size:12px;color:#fff}.bi-tooltip.tooltip-success{background:#647185;border:1px solid #647185}.bi-tooltip.tooltip-warning{background:#ff4949;border:1px solid #e85050}.bi-table>div.bottom-left>div>div>table,.bi-table>div.bottom-right>div>div>table,.bi-table>div.top-left>div>div>table,.bi-table>div.top-right>div>div>table,.bi-table>div>div>table{border-right:1px solid #d4dadd;border-bottom:1px solid #d4dadd}.bi-sql-editor .cm-s-default .cm-function,.bi-sql-editor .cm-s-default .cm-keyword,.bi-sql-editor .cm-s-default span[class*="#"]{color:#3685f2}.bi-sql-editor .param{color:#fff;padding:0 5px;margin:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#3f8ce8;display:inline-block}.CodeMirror-hints .sql-fr-function,.CodeMirror-hints .sql-keyword{color:#3685f2}.bi-collection-table-cell{box-sizing:border-box}.bi-grid-table-cell,.bi-sequence-table-dynamic-number .sequence-table-title-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box}.bi-collection-table-cell.first-row{border-top:1px solid #d4dadd}.bi-collection-table-cell.first-col{border-left:1px solid #d4dadd}.bi-theme-dark .bi-collection-table-cell.first-row{border-top:1px solid #525466}.bi-theme-dark .bi-collection-table-cell.first-col{border-left:1px solid #525466}.bi-quick-collection-table>div>.bi-collection{overflow:hidden!important;overflow-x:hidden!important;overflow-y:hidden!important}.bi-table>.first-col{border-left:none}.bi-table>.first-row{border-top:none}.bi-theme-dark .bi-table>div.bottom-left>div>div>table,.bi-theme-dark .bi-table>div.bottom-right>div>div>table,.bi-theme-dark .bi-table>div.top-left>div>div>table,.bi-theme-dark .bi-table>div.top-right>div>div>table,.bi-theme-dark .bi-table>div>div>table{border-right:1px solid #525466;border-bottom:1px solid #525466}.bi-table>div>div>div>table,.bi-table>div>div>table{min-width:100%;clear:both;border-spacing:0;border-collapse:separate}.bi-table>div>div>div>table,.bi-table>div>div>div>table>*>*>td,.bi-table>div>div>div>table>*>*>th,.bi-table>div>div>table,.bi-table>div>div>table>*>*>td,.bi-table>div>div>table>*>*>th{vertical-align:middle;margin:0;padding:0}.bi-table>div>div>div>table>tbody>tr>td,.bi-table>div>div>div>table>thead>tr>td,.bi-table>div>div>table>tbody>tr>td,.bi-table>div>div>table>thead>tr>td{border-top:1px solid #d4dadd;border-left:1px solid #d4dadd}.bi-theme-dark .bi-table>div>div>div>table>tbody>tr>td,.bi-theme-dark .bi-table>div>div>div>table>thead>tr>td,.bi-theme-dark .bi-table>div>div>table>tbody>tr>td,.bi-theme-dark .bi-table>div>div>table>thead>tr>td{border-top:1px solid #525466;border-left:1px solid #525466}.bi-grid-table-cell{box-sizing:border-box}.bi-grid-table-cell.first-row{border-top:1px solid #d4dadd}.bi-grid-table-cell.first-col{border-left:1px solid #d4dadd}.bi-theme-dark .bi-grid-table-cell.first-row{border-top:1px solid #525466}.bi-theme-dark .bi-grid-table-cell.first-col{border-left:1px solid #525466}.scrollbar-layout-main{box-sizing:border-box;outline:0;overflow:hidden;position:absolute;transition-duration:250ms;transition-timing-function:ease;user-select:none;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666);border-radius:5px}.bi-theme-dark .scrollbar-layout-main{background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc)}.scrollbar-layout-main-vertical{bottom:0;right:0;top:0;transition-property:background-color;width:10px}.scrollbar-layout-main-vertical.public-scrollbar-main-active,.scrollbar-layout-main-vertical:hover{width:10px}.scrollbar-layout-main-horizontal{bottom:0;height:10px;left:0;transition-property:background-color;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666)}.bi-theme-dark .scrollbar-layout-main-horizontal{background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc)}.scrollbar-layout-main-horizontal.public-scrollbar-main-active,.scrollbar-layout-main-horizontal:hover{height:10px}.scrollbar-layout-face{left:0;overflow:hidden;position:absolute;z-index:1}.scrollbar-layout-face:after{border-radius:6px;display:block;position:absolute;transition:background-color 250ms ease}.scrollbar-layout-face-horizontal{bottom:0;left:0;top:0}.scrollbar-layout-face-horizontal:after{bottom:2px;left:0;top:2px;width:100%}.scrollbar-layout-face-vertical{left:0;right:0;top:0}.scrollbar-layout-face-vertical:after{height:100%;left:2px;right:2px;top:0}.public-scrollbar-face:after{background-color:rgba(102,102,102,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d666666, endColorstr=#4d666666)}.bi-theme-dark .public-scrollbar-face:after{background-color:rgba(204,204,204,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dcccccc, endColorstr=#4dcccccc)}.public-scrollbar-face-active:after,.public-scrollbar-main-active .public-scrollbar-face:after,.public-scrollbar-main:hover .public-scrollbar-face:after{background-color:rgba(102,102,102,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3666666, endColorstr=#b3666666)}.bi-theme-dark .public-scrollbar-face-active:after,.bi-theme-dark .public-scrollbar-main-active .public-scrollbar-face:after,.bi-theme-dark .public-scrollbar-main:hover .public-scrollbar-face:after{background-color:rgba(204,204,204,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3cccccc, endColorstr=#b3cccccc)}.horizontal-scrollbar{bottom:0;position:absolute}.bi-resizable-table-cell .resizable-table-cell-resizer-container.dragging .resizable-table-cell-resizer-knob,.bi-resizable-table-cell .resizable-table-cell-resizer-container:hover .resizable-table-cell-resizer-knob{background-color:#3f8ce8}.bi-resizable-table-cell .resizable-table-cell-resizer-container.suitable .resizable-table-cell-resizer-knob{background-color:#58cc7d}.bi-resizable-table .resizable-table-resizer{cursor:ew-resize;z-index:1;background-color:#3f8ce8}.bi-resizable-table .resizable-table-resizer.suitable{background-color:#58cc7d}.bi-resizable-table .resizable-table-region-resizer.dragging .resizable-table-region-resizer-knob,.bi-resizable-table .resizable-table-region-resizer:hover .resizable-table-region-resizer-knob{background-color:#3f8ce8}.bi-branch-tree .bi-branch-tree-view{min-width:300px}.bi-display-tree .ztree *{color:#999}.bi-display-tree .ztree li a,.bi-display-tree .ztree li span{cursor:default!important}.bi-display-tree .ztree li a.curSelectedNode{padding-top:1px;border:none;background-color:inherit;opacity:1;filter:alpha(opacity=100)}.ztree li a.tmpTargetNode_inner,ul.tmpTargetzTree,ul.ztree.zTreeDragUL{opacity:.8;filter:alpha(opacity=80)}.ztree *{padding:0;margin:0}.ztree{margin:0;padding:5px}.ztree li{padding:0;margin:0;list-style:none;line-height:14px;text-align:left;outline:0}.ztree li ul{margin:0;padding:0 0 0 18px}.ztree li a{padding:1px 3px 0 0;margin:0;cursor:pointer;height:24px;background-color:transparent;vertical-align:top;display:inline-block}.ztree li a.curSelectedNode_Edit{padding-top:0;background-color:#FFE6B0;color:#000;height:16px;border:1px solid #FFB951;opacity:.8}.ztree li a.tmpTargetNode_inner{padding-top:0;background-color:#316AC5;color:#fff;height:16px;border:1px solid #316AC5}.ztree li a input.rename{height:14px;width:80px;padding:0;margin:0;font-size:12px;border:1px solid #7EC4CC}.ztree li span.button,span.tmpzTreeMove_arrow{display:inline-block;border:0;background-repeat:no-repeat}.ztree li span{line-height:24px;margin-right:2px}.ztree li span.button{line-height:0;margin:0;width:16px;height:16px;vertical-align:middle;cursor:pointer;outline:0;background-color:transparent;background-attachment:scroll}.ztree li span.button.chk{width:16px;height:16px;margin:0 3px 0 0;cursor:auto}.ztree li span.button.chk.checkbox_false_disable{background-position:0 -56px}.ztree li span.button.chk.checkbox_true_disable{background-position:-14px -56px}.ztree li span.button.chk.radio_false_full{background-position:-28px 0}.ztree li span.button.chk.radio_false_full_focus{background-position:-28px -14px}.ztree li span.button.chk.radio_false_part{background-position:-28px -28px}.ztree li span.button.chk.radio_false_part_focus{background-position:-28px -42px}.ztree li span.button.chk.radio_false_disable{background-position:-28px -56px}.ztree li span.button.chk.radio_true_full{background-position:-42px 0}.ztree li span.button.chk.radio_true_full_focus{background-position:-42px -14px}.ztree li span.button.chk.radio_true_part{background-position:-42px -28px}.ztree li span.button.chk.radio_true_part_focus{background-position:-42px -42px}.ztree li span.button.chk.radio_true_disable{background-position:-42px -56px}.ztree li span.button.switch{width:25px;height:25px}.ztree li span.button.noline_open{background-position:-92px -72px}.ztree li span.button.noline_close{background-position:-74px -72px}.ztree li span.button.noline_docu,.ztree li span.button.root_docu{background:0 0}.ztree li span.button.ico_open{margin-right:2px;background-position:-110px -16px;vertical-align:top}.ztree li span.button.ico_close{margin-right:2px;background-position:-110px 0;vertical-align:top}.ztree li span.button.ico_docu{margin-right:2px;background-position:-110px -32px;vertical-align:top}.ztree li span.button.edit{margin-right:2px;background-position:-110px -48px;vertical-align:top}.ztree li span.button.remove{margin-right:2px;background-position:-110px -64px;vertical-align:top}.ztree li span.button.ico_loading{width:0;margin-right:2px;vertical-align:top}ul.tmpTargetzTree{background-color:#FFE6B0}span.tmpzTreeMove_arrow{width:16px;height:16px;padding:0;margin:2px 0 0 1px;position:absolute;background-color:transparent;background-attachment:scroll;background-position:-110px -80px}.zTreeMask,ul.ztree.zTreeDragUL{background-color:#cfcfcf;position:absolute}ul.ztree.zTreeDragUL{margin:0;padding:0;width:auto;height:auto;overflow:hidden;border:1px dotted #00B83F}body,html{height:100%}.zTreeMask{z-index:10000;opacity:0;filter:alpha(opacity=0)}.bi-select-text-trigger,.bi-small-select-text-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-popup-view{position:fixed!important;overflow-y:visible!important;overflow-x:visible!important;overflow:visible!important;cursor:default}.bi-popup-view .list-view-outer{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-date-trigger,.bi-month-trigger{-webkit-border-radius:2px;-moz-border-radius:2px}.bi-popup-view .list-view-toolbar{line-height:30px}.bi-popup-view .list-view-toolbar>.center-element{border-left:1px solid #d4dadd}.bi-popup-view .list-view-toolbar>.first-element{border-left:none}.bi-theme-dark .bi-popup-view .list-view-toolbar>.center-element{border-left:1px solid #525466}.bi-theme-dark .bi-popup-view .list-view-toolbar>.first-element{border-left:none}.bi-arrangement .arrangement-helper{background:#3f8ce8;z-index:1000000000}.bi-arrangement .arrangement-block,.bi-arrangement .arrangement-drop-container{z-index:1000000000}.bi-arrangement .arrangement-drop-container .arrangement-drop-region{overflow:hidden}.bi-arrangement .arrangement-drop-container .bottom-center,.bi-arrangement .arrangement-drop-container .bottom-center-second,.bi-arrangement .arrangement-drop-container .bottom-left,.bi-arrangement .arrangement-drop-container .bottom-left-second,.bi-arrangement .arrangement-drop-container .bottom-right,.bi-arrangement .arrangement-drop-container .bottom-right-second,.bi-arrangement .arrangement-drop-container .drop-devider,.bi-arrangement .arrangement-drop-container .left-center,.bi-arrangement .arrangement-drop-container .left-center-second,.bi-arrangement .arrangement-drop-container .right-center,.bi-arrangement .arrangement-drop-container .right-center-second,.bi-arrangement .arrangement-drop-container .top-center,.bi-arrangement .arrangement-drop-container .top-center-second,.bi-arrangement .arrangement-drop-container .top-left,.bi-arrangement .arrangement-drop-container .top-left-second,.bi-arrangement .arrangement-drop-container .top-right,.bi-arrangement .arrangement-drop-container .top-right-second{z-index:1000000001;background:#3f8ce8}.bi-arrangement-droppable{z-index:100000}.bi-date-trigger{border-radius:2px}.bi-down-list-popup .bi-down-list-item .list-item-text,.bi-down-list-popup .list-group-item-text{max-width:203px}.bi-excel-table>div.bottom-right>div>div>table{border-right:1px solid #d4dadd}.bi-theme-dark .bi-excel-table>div.bottom-right>div>div>table{border-right:1px solid #525466}.bi-file-manager-nav-button .file-manager-nav-button-text{max-width:200px}.bi-file-manager-nav-button .file-manager-nav-button-text.active{background-color:#fafbfc;color:#999}.bi-file-manager-nav-button .file-manager-nav-button-triangle{z-index:1}.bi-theme-dark .bi-file-manager-nav-button .file-manager-nav-button-text.active{background-color:#191b2b;color:#999}.bi-interactive-arrangement .interactive-arrangement-dragtag-line{z-index:1000000000;background-color:#faaa39}.bi-interactive-arrangement .interactive-arrangement-dragtag-icon{z-index:1000000000}.bi-interval-slider{min-height:70px}.bi-interval-slider-label{min-height:50px}.bi-month-trigger{border-radius:2px}.bi-multidate-combo{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-multidate-popup .multidate-popup-label{color:#3685f2;font-size:14px}.bi-multidate-popup .multidate-popup-item.active,.bi-multidate-popup .multidate-popup-item:active{background-color:#3685f2;color:#fff;-webkit-border-radius:2px 2px 0 0;-moz-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0}.bi-multidate-popup .multidate-popup-button{color:#3685f2;font-size:14px}.bi-multidate-segment .bi-multidate-editor{font-size:14px}.bi-multi-select-combo .multi-select-trigger-icon-button,.bi-multi-select-insert-combo .multi-select-trigger-icon-button,.bi-multi-tree-combo .multi-select-trigger-icon-button{font-size:16px}.bi-multilayer-select-level-tree .tree-view,.bi-multilayer-single-level-tree .tree-view{min-width:100%}.bi-multi-select-check-pane .multi-select-check-selected{text-decoration:underline}.bi-multi-select-trigger{-webkit-border-radius:2px 2px 2px 2px;-moz-border-radius:2px;border-radius:2px}.bi-number-editor,.bi-quarter-trigger{-webkit-border-radius:2px;-moz-border-radius:2px}.bi-multi-select-search-pane .multi-select-toolbar{color:#ff4949}.bi-multi-select-check-selected-button{z-index:1}.bi-multi-tree-check-pane .multi-tree-check-selected{color:#3685f2}.bi-number-interval .number-interval-big-combo .bi-icon-combo-trigger .icon-combo-trigger-icon,.bi-number-interval .number-interval-small-combo .bi-icon-combo-trigger .icon-combo-trigger-icon{font-size:14px}.bi-multi-tree-popup .popup-view-tree{min-height:170px}.bi-preview-table-cell,.bi-preview-table-header-cell{min-height:25px;min-width:80px}.bi-multi-tree-check-selected-button .trigger-check-selected{color:#3685f2;z-index:1}.bi-number-editor{border-radius:2px}.bi-number-interval .number-interval-small-editor{-moz-border-radius-topleft:2px;-webkit-border-top-left-radius:2px;-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;border-top-left-radius:2px;border-bottom-left-radius:2px}.bi-number-interval .number-interval-big-editor{-moz-border-radius-topright:2px;-webkit-border-top-right-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px}.bi-number-interval .number-interval-big-combo{-moz-border-radius-topleft:2px;-webkit-border-top-left-radius:2px;-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;border-top-left-radius:2px;border-bottom-left-radius:2px}.bi-number-interval .number-interval-small-combo{-moz-border-radius-topright:2px;-webkit-border-top-right-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px}.bi-relation-view-item .primary-key-region,.bi-relation-view-region .relation-view-region-container .relation-view-region-title .eye,.bi-single-select-combo .single-select-trigger-icon-button{font-size:16px}.bi-number-interval.number-error .bi-input{color:#ff4949!important}.bi-date-interval.time-error .bi-input,.bi-date-interval.time-error .sign-editor-text,.bi-time-interval.time-error .bi-date-time-trigger .bi-input,.bi-time-interval.time-error .bi-date-time-trigger .sign-editor-text,.bi-year-month-interval.time-error .bi-input,.bi-year-month-interval.time-error .sign-editor-text{color:#ff4949}.bi-page-table-cell{-moz-user-select:text;user-select:text}.bi-path-chooser .path-chooser-radio,.bi-path-region .path-region-label{z-index:1}.bi-preview-table{-webkit-user-select:text;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;-o-user-select:text;user-select:text}.bi-preview-table>div>div>div>table>thead>tr.odd,.bi-preview-table>div>table>thead>tr.odd{background-color:#fafbfc}.bi-theme-dark .bi-preview-table>div>div>div>table>thead>tr.odd,.bi-theme-dark .bi-preview-table>div>table>thead>tr.odd{background-color:#191B2B}.bi-quarter-trigger{border-radius:2px}.bi-relation-view-region .relation-view-region-container{z-index:1;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-relation-view-region .relation-view-region-container .split-line{border-bottom:1px solid #ccc}.bi-sequence-table-dynamic-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;box-sizing:border-box}.bi-sequence-table-dynamic-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-list-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-list-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-tree-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-tree-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-single-slider-label{min-height:50px}.bi-single-slider-normal{min-height:30px}.bi-single-slider{min-height:50px}.bi-single-slider-button .slider-button{cursor:ew-resize;-webkit-box-shadow:0 0 10px rgba(0,0,0,.2);-moz-box-shadow:0 0 10px rgba(0,0,0,.2);box-shadow:0 0 10px rgba(0,0,0,.2);-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.bi-slider-track .gray-track{background-color:rgba(153,153,153,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d999999, endColorstr=#4d999999);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.bi-slider-track .blue-track{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.bi-time-interval .bi-date-time-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-year-popup .year-popup-navigation{line-height:30px}.bi-year-popup .year-popup-navigation>.center-element{border-left:1px solid #d4dadd}.bi-year-popup .year-popup-navigation>.first-element{border-left:none}.bi-theme-dark .bi-year-popup .year-popup-navigation>.center-element{border-left:1px solid #525466}.bi-theme-dark .bi-year-popup .year-popup-navigation>.first-element{border-left:none}.bi-year-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}*,button,html,input,select,textarea{font-family:"Microsoft YaHei","Hiragino Sans GB W3"}html{overflow:hidden}body{position:absolute;width:100%;margin:0;padding:0;top:0;left:0;background-repeat:repeat;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;color:#3d4d66;font:400 12px "Microsoft YaHei","Hiragino Sans GB W3";-webkit-font-smoothing:antialiased;text-decoration:none;-kthml-user-focus:normal;-moz-user-focus:normal;-moz-outline:0 none;outline:0}div::-webkit-scrollbar,textarea::-webkit-scrollbar{-webkit-appearance:none;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666);width:6px;height:6px}div::-webkit-scrollbar-thumb,textarea::-webkit-scrollbar-thumb{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-color:rgba(102,102,102,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d666666, endColorstr=#4d666666)}div::-webkit-scrollbar-thumb:hover,textarea::-webkit-scrollbar-thumb:hover{background-color:rgba(102,102,102,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3666666, endColorstr=#b3666666)}.bi-theme-dark div::-webkit-scrollbar,.bi-theme-dark textarea::-webkit-scrollbar{-webkit-appearance:none;background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc);width:6px;height:6px}.bi-theme-dark div::-webkit-scrollbar-thumb,.bi-theme-dark textarea::-webkit-scrollbar-thumb{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-color:rgba(204,204,204,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dcccccc, endColorstr=#4dcccccc)}.bi-theme-dark div::-webkit-scrollbar-thumb:hover,.bi-theme-dark textarea::-webkit-scrollbar-thumb:hover{background-color:rgba(204,204,204,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3cccccc, endColorstr=#b3cccccc)}.farbtastic .wheel{background:url(resources?path=/com/fr/web/ui/images/1x/background/wheel.png) center center no-repeat}.farbtastic .overlay{background:url(resources?path=/com/fr/web/ui/images/1x/background/mask.png) center center no-repeat}.farbtastic .marker{background:url(resources?path=/com/fr/web/ui/images/1x/background/marker.png) center center no-repeat}.bi-display-tree .ztree li span.button.switch.center_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_3.png) center center no-repeat}.bi-display-tree .ztree li span.button.switch.roots_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_2.png) center center no-repeat}.bi-display-tree .ztree li span.button.switch.bottom_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_4.png) center center no-repeat}.ztree li ul.line{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_1.png) repeat-y}.bi-theme-dark .ztree li ul.line{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_1.png) repeat-y}.ztree li span.button.chk.checkbox_false_full,.ztree li span.button.chk.checkbox_false_full_focus{background:url(resources?path=/com/fr/web/ui/images/1x/icon/check_box_normal.png) center center no-repeat}.ztree li span.button.chk.checkbox_false_part,.ztree li span.button.chk.checkbox_false_part_focus{background:url(resources?path=/com/fr/web/ui/images/1x/icon/half_selected.png) center center no-repeat}.ztree li span.button.chk.checkbox_true_full,.ztree li span.button.chk.checkbox_true_full_focus{background:url(resources?path=/com/fr/web/ui/images/1x/icon/check_box_active.png) center center no-repeat}.ztree li span.button.chk.checkbox_true_part,.ztree li span.button.chk.checkbox_true_part_focus{background:url(resources?path=/com/fr/web/ui/images/1x/icon/half_selected.png) center center no-repeat}.ztree li span.button.root_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_expand_1.png) center center no-repeat}.bi-theme-dark .ztree li span.button.root_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_expand_1.png) center center no-repeat}.ztree li span.button.root_close{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_collapse_1.png) center center no-repeat}.bi-theme-dark .ztree li span.button.root_close{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_collapse_1.png) center center no-repeat}.ztree li span.button.roots_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_expand_2.png) center center no-repeat}.bi-theme-dark .ztree li span.button.roots_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_expand_2.png) center center no-repeat}.ztree li span.button.roots_close{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_collapse_2.png) center center no-repeat}.bi-theme-dark .ztree li span.button.roots_close{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_collapse_2.png) center center no-repeat}.ztree li span.button.center_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_expand_3.png) center center no-repeat}.bi-theme-dark .ztree li span.button.center_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_expand_3.png) center center no-repeat}.ztree li span.button.center_close{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_collapse_3.png) center center no-repeat}.bi-theme-dark .ztree li span.button.center_close{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_collapse_3.png) center center no-repeat}.ztree li span.button.bottom_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_expand_4.png) center center no-repeat}.bi-theme-dark .ztree li span.button.bottom_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_expand_4.png) center center no-repeat}.ztree li span.button.bottom_close{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_collapse_4.png) center center no-repeat}.bi-theme-dark .ztree li span.button.bottom_close{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_collapse_4.png) center center no-repeat}.ztree li span.button.roots_docu{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_2.png) center center no-repeat}.bi-theme-dark .ztree li span.button.roots_docu{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_2.png) center center no-repeat}.ztree li span.button.center_docu{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_3.png) center center no-repeat}.bi-theme-dark .ztree li span.button.center_docu{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_3.png) center center no-repeat}.ztree li span.button.bottom_docu{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_4.png) center center no-repeat}.bi-theme-dark .ztree li span.button.bottom_docu{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_4.png) center center no-repeat}.ztree li span.button.ico_loading{background:url(resources?path=/com/fr/web/ui/images/1x/icon/loading.gif) center center no-repeat}.base-line-conn-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_1.png) repeat-y}.bi-theme-dark .base-line-conn-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_1.png) repeat-y}.first-line-conn-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_2.png) center center no-repeat}.bi-theme-dark .first-line-conn-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_2.png) center center no-repeat}.mid-line-conn-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_3.png) center center no-repeat}.bi-theme-dark .mid-line-conn-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_3.png) center center no-repeat}.last-line-conn-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_4.png) center center no-repeat}.bi-theme-dark .last-line-conn-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_4.png) center center no-repeat}.loading-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/loading.gif) center center no-repeat}.auto-color-background{background:url(resources?path=/com/fr/web/ui/images/1x/background/auto_color.png) center center no-repeat}.trans-color-background{background:url(resources?path=/com/fr/web/ui/images/1x/background/trans_color.png) center center no-repeat}@font-face{font-family:bi;src:url(resources?path=/com/fr/web/ui/font/iconfont.eot);src:url(resources?path=/com/fr/web/ui/font/iconfont.eot?#iefix) format('embedded-opentype'),url(resources?path=/com/fr/web/ui/font/iconfont.woff) format('woff'),url(resources?path=/com/fr/web/ui/font/iconfont.ttf) format('truetype'),url(resources?path=/com/fr/web/ui/font/iconfont.svg#svgFontName) format('svg')}.b-font{font-family:bi;font-style:normal;-webkit-font-smoothing:antialiased}.close-font .b-font:before,.close-font.disabled .b-font:before,.close-h-font .b-font:before,.close-h-font.disabled .b-font:before,.close-h-font.hover .b-font:before,.close-h-font:hover .b-font:before,.close-ha-font .b-font:before,.close-ha-font.hover .b-font:before,.close-ha-font:hover .b-font:before{content:"\e6d0";color:inherit}.close-ha-font.active .b-font:before,.close-ha-font:active .b-font:before{content:"\e6d0";color:#3f8ce8}.close-ha-font.disabled .b-font:before,.search-close-h-font .b-font:before{content:"\e6d0";color:inherit}.search-close-h-font.hover .b-font:before,.search-close-h-font:hover .b-font:before{content:"\e6d0";color:#ff4949}.search-close-h-font.disabled .b-font:before{content:"\e6d0";color:inherit}.pre-page-h-font .b-font:before,.pre-page-h-font.disabled .b-font:before,.pre-page-h-font.hover .b-font:before,.pre-page-h-font:hover .b-font:before{content:"\e70d";color:inherit}.next-page-h-font .b-font:before,.next-page-h-font.disabled .b-font:before,.next-page-h-font.hover .b-font:before,.next-page-h-font:hover .b-font:before{content:"\e70c";color:inherit}.search-font .b-font:before,.search-font.disabled .b-font:before{content:"\e6dc";color:inherit}.date-font .b-font:before,.date-font.disabled .b-font:before{content:"\e733";color:inherit}.date-change-h-font .b-font:before,.date-change-h-font.disabled .b-font:before,.date-change-h-font.hover .b-font:before,.date-change-h-font:hover .b-font:before{content:"\e72f";color:inherit}.dot-font .b-font:before,.dot-font.disabled .b-font:before,.dot-h-font .b-font:before{content:"\e762";color:#1a1a1a}.dot-h-font.hover .b-font:before,.dot-h-font:hover .b-font:before{content:"\e762";color:inherit}.dot-h-font.disabled .b-font:before{content:"\e762";color:#1a1a1a}.dot-ha-font .b-font:before{content:"\e762";color:#fff}.dot-ha-font.hover .b-font:before,.dot-ha-font:hover .b-font:before{content:"\e762";color:#999}.dot-ha-font.active .b-font:before,.dot-ha-font:active .b-font:before{content:"\e762";color:#1a1a1a}.dot-e-font .b-font:before,.dot-ha-font.disabled .b-font:before{content:"\e762";color:#fff}.dot-e-font.hover .b-font:before,.dot-e-font:hover .b-font:before{content:"\e762";color:#999}.dot-e-font:active .b-font:before{content:"\e762";color:#3685f2}.dot-e-font.active .b-font:before{content:"\e762";color:#1a1a1a}.dot-e-font.disabled .b-font:before{content:"\e762";color:#fff}.pull-right-font .b-font:before,.pull-right-font.disabled .b-font:before,.pull-right-h-font .b-font:before,.pull-right-h-font.disabled .b-font:before,.pull-right-h-font.hover .b-font:before,.pull-right-h-font:hover .b-font:before,.pull-right-ha-font .b-font:before,.pull-right-ha-font.hover .b-font:before,.pull-right-ha-font:hover .b-font:before{content:"\e70c";color:inherit}.pull-right-ha-font.active .b-font:before,.pull-right-ha-font:active .b-font:before{content:"\e70c";color:#3f8ce8}.pull-right-e-font .b-font:before,.pull-right-e-font.hover .b-font:before,.pull-right-e-font:hover .b-font:before,.pull-right-ha-font.disabled .b-font:before{content:"\e70c";color:inherit}.pull-right-e-font.active .b-font:before,.pull-right-e-font:active .b-font:before{content:"\e70c";color:#3f8ce8}.pull-right-e-font.disabled .b-font:before{content:"\e70c";color:inherit}.copy-font .b-font:before,.copy-font.disabled .b-font:before{content:"\e6bd";color:inherit}.copy-h-font .b-font:before{content:"\e6bd";color:#1a1a1a}.copy-h-font.hover .b-font:before,.copy-h-font:hover .b-font:before{content:"\e6bd";color:inherit}.copy-h-font.disabled .b-font:before{content:"\e6bd";color:#1a1a1a}.copy-ha-font .b-font:before,.copy-ha-font.hover .b-font:before,.copy-ha-font:hover .b-font:before{content:"\e6bd";color:inherit}.copy-ha-font.active .b-font:before,.copy-ha-font:active .b-font:before{content:"\e6bd";color:#3f8ce8}.copy-e-font .b-font:before,.copy-e-font.hover .b-font:before,.copy-e-font:hover .b-font:before,.copy-ha-font.disabled .b-font:before{content:"\e6bd";color:inherit}.copy-e-font.active .b-font:before,.copy-e-font:active .b-font:before{content:"\e6bd";color:#3f8ce8}.copy-e-font.disabled .b-font:before{content:"\e6bd";color:inherit}.check-mark-font .b-font:before,.check-mark-font.disabled .b-font:before,.check-mark-h-font .b-font:before,.check-mark-h-font.disabled .b-font:before,.check-mark-h-font.hover .b-font:before,.check-mark-h-font:hover .b-font:before,.check-mark-ha-font .b-font:before,.check-mark-ha-font.hover .b-font:before,.check-mark-ha-font:hover .b-font:before{content:"\e6cf";color:inherit}.check-mark-ha-font.active .b-font:before,.check-mark-ha-font:active .b-font:before{content:"\e6cf";color:#3f8ce8}.check-mark-e-font .b-font:before,.check-mark-e-font.hover .b-font:before,.check-mark-e-font:hover .b-font:before,.check-mark-ha-font.disabled .b-font:before{content:"\e6cf";color:inherit}.check-mark-e-font.active .b-font:before,.check-mark-e-font:active .b-font:before{content:"\e6cf";color:#3f8ce8}.check-mark-e-font.disabled .b-font:before{content:"\e6cf";color:inherit}.row-pre-page-h-font .b-font:before,.row-pre-page-h-font.disabled .b-font:before,.row-pre-page-h-font.hover .b-font:before,.row-pre-page-h-font:hover .b-font:before{content:"\e6d9";color:inherit}.row-next-page-h-font .b-font:before,.row-next-page-h-font.disabled .b-font:before,.row-next-page-h-font.hover .b-font:before,.row-next-page-h-font:hover .b-font:before{content:"\e6d8";color:inherit}.column-pre-page-h-font .b-font:before,.column-pre-page-h-font.disabled .b-font:before,.column-pre-page-h-font.hover .b-font:before,.column-pre-page-h-font:hover .b-font:before{content:"\e6d6";color:inherit}.column-next-page-h-font .b-font:before,.column-next-page-h-font.disabled .b-font:before,.column-next-page-h-font.hover .b-font:before,.column-next-page-h-font:hover .b-font:before{content:"\e6d7";color:inherit}.trigger-triangle-font .b-font:before,.trigger-triangle-font.hover .b-font:before,.trigger-triangle-font:hover .b-font:before{content:"\e6f0";color:#999}.trigger-triangle-font.active .b-font:before,.trigger-triangle-font:active .b-font:before{content:"\e6f0";color:#3685f2}.trigger-triangle-font.disabled .b-font:before{content:"\e6f0";color:#999}.pull-down-font .b-font:before,.pull-down-font.disabled .b-font:before,.pull-down-h-font .b-font:before,.pull-down-h-font.disabled .b-font:before,.pull-down-h-font.hover .b-font:before,.pull-down-h-font:hover .b-font:before,.pull-down-ha-font .b-font:before,.pull-down-ha-font.hover .b-font:before,.pull-down-ha-font:hover .b-font:before{content:"\e70b";color:inherit}.pull-down-ha-font.active .b-font:before,.pull-down-ha-font:active .b-font:before{content:"\e70b";color:#3f8ce8}.pull-down-ha-font.disabled .b-font:before{content:"\e70b";color:inherit}.check-font .b-font:before,.check-font.disabled .b-font:before{content:"\e6cf";color:#3685f2}.item-check-font .b-font:before{content:"\e6cf";color:#fff}.item-check-font.hover .b-font:before,.item-check-font:hover .b-font:before{content:"\e6cf";color:#999}.item-check-font.active .b-font:before,.item-check-font:active .b-font:before{content:"\e6cf";color:#3f8ce8}.item-check-font.disabled .b-font:before{content:"\e6cf";color:#fff}.primary-key-font .b-font:before,.primary-key-font.disabled .b-font:before,.primary-key-font.hover .b-font:before,.primary-key-font:hover .b-font:before{content:"\e740";color:inherit}.drag-tag-font .b-font:before,.drag-tag-font.disabled .b-font:before{content:"\e6d0";color:#faaa39}.less-font .b-font:before,.less-font.hover .b-font:before,.less-font:hover .b-font:before{content:"\e75f";color:inherit}.less-font.active .b-font:before,.less-font:active .b-font:before{content:"\e75f";color:#3f8ce8}.less-font.disabled .b-font:before{content:"\e75f";color:inherit}.less-equal-font .b-font:before,.less-equal-font.hover .b-font:before,.less-equal-font:hover .b-font:before{content:"\e760";color:inherit}.less-equal-font.active .b-font:before,.less-equal-font:active .b-font:before{content:"\e760";color:#3f8ce8}.less-equal-font.disabled .b-font:before{content:"\e760";color:inherit}.text-bold-font .b-font:before,.text-bold-font.disabled .b-font:before{content:"\e75b";color:inherit}.text-italic-font .b-font:before,.text-italic-font.disabled .b-font:before{content:"\e75c";color:inherit}.text-underline-font .b-font:before,.text-underline-font.disabled .b-font:before{content:"\e75d";color:inherit}.text-color-font .b-font:before,.text-color-font.disabled .b-font:before{content:"\e75a";color:inherit}.text-background-font .b-font:before,.text-background-font.disabled .b-font:before{content:"\e758";color:inherit}.text-color-underline-font .b-font:before,.text-color-underline-font.disabled .b-font:before{content:"\e75d";color:inherit}.text-align-left-font .b-font:before,.text-align-left-font.disabled .b-font:before{content:"\e6ca";color:inherit}.text-align-center-font .b-font:before,.text-align-center-font.disabled .b-font:before{content:"\e6bf";color:inherit}.text-align-right-font .b-font:before,.text-align-right-font.disabled .b-font:before{content:"\e6c8";color:inherit}.toast-error-font .b-font:before,.toast-error-font.disabled .b-font:before{content:"\e757";color:inherit}.toast-success-font .b-font:before,.toast-success-font.disabled .b-font:before{content:"\e756";color:inherit}.toast-warning-font .b-font:before,.toast-warning-font.disabled .b-font:before{content:"\e755";color:inherit}.toast-message-font .b-font:before,.toast-message-font.disabled .b-font:before{content:"\e74b";color:inherit}.tree-collapse-icon-type1 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_collapse_1.png) center center no-repeat;background-size:contain}.tree-collapse-icon-type1 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_collapse_1.png) center center no-repeat}.tree-collapse-icon-type2 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_collapse_2.png) center center no-repeat;background-size:contain}.tree-collapse-icon-type2 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_collapse_2.png) center center no-repeat}.tree-collapse-icon-type3 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_collapse_3.png) center center no-repeat;background-size:contain}.tree-collapse-icon-type3 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_collapse_3.png) center center no-repeat}.tree-collapse-icon-type4 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_collapse_4.png) center center no-repeat;background-size:contain}.tree-collapse-icon-type4 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_collapse_4.png) center center no-repeat}.tree-expand-icon-type1 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_expand_1.png) center center no-repeat;background-size:contain}.tree-expand-icon-type1 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_expand_1.png) center center no-repeat}.tree-expand-icon-type2 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_expand_2.png) center center no-repeat;background-size:contain}.tree-expand-icon-type2 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_expand_2.png) center center no-repeat}.tree-expand-icon-type3 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_expand_3.png) center center no-repeat;background-size:contain}.tree-expand-icon-type3 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_expand_3.png) center center no-repeat}.tree-expand-icon-type4 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_expand_4.png) center center no-repeat;background-size:contain}.tree-expand-icon-type4 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_expand_4.png) center center no-repeat}.tree-vertical-line-type2 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_vertical_line_2.png) center center no-repeat;background-size:contain}.tree-vertical-line-type2 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_2.png) center center no-repeat}.tree-vertical-line-type3 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_vertical_line_3.png) center center no-repeat;background-size:contain}.tree-vertical-line-type3 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_3.png) center center no-repeat}.tree-vertical-line-type4 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_vertical_line_4.png) center center no-repeat;background-size:contain}.tree-vertical-line-type4 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_4.png) center center no-repeat}.bi-theme-dark .tree-collapse-icon-type1 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_collapse_1.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type1 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_collapse_1.png) center center no-repeat}.bi-theme-dark .tree-collapse-icon-type2 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_collapse_2.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type2 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_collapse_2.png) center center no-repeat}.bi-theme-dark .tree-collapse-icon-type3 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_collapse_3.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type3 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_collapse_3.png) center center no-repeat}.bi-theme-dark .tree-collapse-icon-type4 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_collapse_4.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type4 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_collapse_4.png) center center no-repeat}.bi-theme-dark .tree-expand-icon-type1 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_expand_1.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type1 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_expand_1.png) center center no-repeat}.bi-theme-dark .tree-expand-icon-type2 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_expand_2.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type2 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_expand_2.png) center center no-repeat}.bi-theme-dark .tree-expand-icon-type3 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_expand_3.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type3 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_expand_3.png) center center no-repeat}.bi-theme-dark .tree-expand-icon-type4 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_expand_4.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type4 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_expand_4.png) center center no-repeat}.bi-theme-dark .tree-vertical-line-type2 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_vertical_line_2.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type2 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_2.png) center center no-repeat}.bi-theme-dark .tree-vertical-line-type3 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_vertical_line_3.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type3 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_3.png) center center no-repeat}.bi-theme-dark .tree-vertical-line-type4 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_vertical_line_4.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type4 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_4.png) center center no-repeat}.check-box-icon .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/check_box_normal.png) center center no-repeat;background-size:contain}.check-box-icon .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/check_box_normal.png) center center no-repeat}.check-box-icon.hover .x-icon,.check-box-icon:hover .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/check_box_normal.png) center center no-repeat;background-size:contain}.check-box-icon.hover .x-icon.hack,.check-box-icon:hover .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/check_box_normal.png) center center no-repeat}.check-box-icon:active .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/check_box_normal.png) center center no-repeat;background-size:contain}.check-box-icon:active .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/check_box_normal.png) center center no-repeat}.check-box-icon.active .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/check_box_active.png) center center no-repeat;background-size:contain}.check-box-icon.active .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/check_box_active.png) center center no-repeat}.check-box-icon.disabled .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/check_box_disable.png) center center no-repeat;background-size:contain}.check-box-icon.disabled .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/check_box_disable.png) center center no-repeat}.check-box-icon.disabled.active .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/check_box_disable2.png) center center no-repeat;background-size:contain}.check-box-icon.disabled.active .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/check_box_disable2.png) center center no-repeat}.radio-icon .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/radio_normal.png) center center no-repeat;background-size:contain}.radio-icon .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/radio_normal.png) center center no-repeat}.radio-icon.hover .x-icon,.radio-icon:hover .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/radio_normal.png) center center no-repeat;background-size:contain}.radio-icon.hover .x-icon.hack,.radio-icon:hover .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/radio_normal.png) center center no-repeat}.radio-icon:active .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/radio_normal.png) center center no-repeat;background-size:contain}.radio-icon:active .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/radio_normal.png) center center no-repeat}.radio-icon.active .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/radio_active.png) center center no-repeat;background-size:contain}.radio-icon.active .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/radio_active.png) center center no-repeat}.radio-icon.disabled .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/radio_disable.png) center center no-repeat;background-size:contain}.radio-icon.disabled .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/radio_disable.png) center center no-repeat}.radio-icon.disabled.active .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/radio_disable2.png) center center no-repeat;background-size:contain}.radio-icon.disabled.active .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/radio_disable2.png) center center no-repeat}.check-half-select-icon .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/half_selected.png) center center no-repeat;background-size:contain}.check-half-select-icon .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/half_selected.png) center center no-repeat}.slider-icon .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/slider_normal_small.png) center center no-repeat;background-size:contain}.slider-icon .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/slider_normal_small.png) center center no-repeat}.slider-icon.hover .x-icon,.slider-icon:hover .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/slider_active_small.png) center center no-repeat;background-size:contain}.slider-icon.hover .x-icon.hack,.slider-icon:hover .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/slider_active_small.png) center center no-repeat}.slider-icon.disabled .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/slider_normal_small.png) center center no-repeat;background-size:contain}.slider-icon.disabled .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/slider_normal_small.png) center center no-repeat}.auto-color-icon .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/auto_normal.png) center center no-repeat;background-size:contain}.auto-color-icon .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/auto_normal.png) center center no-repeat}.auto-color-icon.active .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/auto_select.png) center center no-repeat;background-size:contain}.auto-color-icon.active .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/auto_select.png) center center no-repeat}.auto-color-icon.disabled .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/auto_disable.png) center center no-repeat;background-size:contain}.auto-color-icon.disabled .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/auto_disable.png) center center no-repeat}.trans-color-icon .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/trans_normal.png) center center no-repeat;background-size:contain}.trans-color-icon .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/trans_normal.png) center center no-repeat}.trans-color-icon.active .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/trans_select.png) center center no-repeat;background-size:contain}.trans-color-icon.active .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/trans_select.png) center center no-repeat}.trans-color-icon.disabled .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/trans_disable.png) center center no-repeat;background-size:contain}.trans-color-icon.disabled .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/trans_disable.png) center center no-repeat} \ No newline at end of file +/*! normalize.css v1.0.0 | MIT License | git.io/normalize */dl,h3,menu,ol,p,pre,ul{margin:1em 0}.b-font,i{-webkit-text-stroke-width:.2px;-moz-osx-font-smoothing:grayscale}.bi-label,.bi-text,.overflow-dot{text-overflow:ellipsis}.bi-excel-table-header-cell,.bi-preview-table-header-cell,.cm-header,.cm-strong,b,strong{font-weight:700}.cm-em,dfn{font-style:italic}.b-font,body,i{-moz-osx-font-smoothing:grayscale}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}h2{font-size:1.5em;margin:.83em 0}h3{font-size:1.17em}h4{font-size:1em;margin:1.33em 0}h5{font-size:.83em;margin:1.67em 0}h6{font-size:.75em;margin:2.33em 0}abbr[title]{border-bottom:1px dotted}blockquote{margin:1em 40px}mark{background:#ff0;color:#000}.base-disabled,.base-disabled .b-font:before,.base-disabled .bi-input,.base-disabled .bi-textarea{color:#9ea6b2!important}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}small,sub,sup{font-size:75%}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}q{quotes:none}q:after,q:before{content:'';content:none}sub,sup{line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dd{margin:0 0 0 40px}menu,ol,ul{padding:0 0 0 40px}nav ol,nav ul{list-style:none}img{border:0;-ms-interpolation-mode:bicubic}svg:not(:root){overflow:hidden}figure,form{margin:0}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0;white-space:normal}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline}button,input{line-height:normal}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],input[disabled]{cursor:default}.base-disabled,.base-invalid{cursor:default!important}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}.bi-collection-table-cell,.bi-text,.border-sizing{-moz-box-sizing:border-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}*,a,body,div,html,img,li,ol,p,span,ul{margin:0;padding:0}a{outline:0;text-decoration:none}a:focus{outline:0}input::-webkit-contacts-auto-fill-button{visibility:hidden;display:none!important;pointer-events:none;position:absolute;right:0}input::-ms-clear{display:none}input,textarea{margin:0;padding:0;outline:0;border:1px solid #d4dadd}ul{list-style:disc}li{list-style-type:none}i{-webkit-font-smoothing:antialiased}.bi-theme-dark input,.bi-theme-dark textarea{border:1px solid #525466}.bi-theme-dark .base-disabled,.bi-theme-dark .base-disabled .b-font:before,.bi-theme-dark .base-disabled .bi-input,.bi-theme-dark .base-disabled .bi-textarea{color:#666!important}.clearfix:after,.clearfix:before{content:" ";display:table;line-height:0}.clearfix:after{clear:both}.bi-background{background-color:#fafbfc;color:#3d4d66}.bi-background .bi-input,.bi-background .bi-textarea{color:#3d4d66}.bi-theme-dark .bi-background{background-color:#191B2B;color:#ccc}.bi-theme-dark .bi-background .bi-input,.bi-theme-dark .bi-background .bi-textarea{color:#ccc}.bi-card,.bi-card .bi-input,.bi-card .bi-textarea{color:#3d4d66}.bi-card{background-color:#fff}.bi-theme-dark .bi-card{background-color:#242640;color:#ccc}.bi-theme-dark .bi-card .bi-input,.bi-theme-dark .bi-card .bi-textarea{color:#ccc}.bi-disabled,.bi-disabled .bi-input,.bi-disabled .bi-textarea{color:#9ea6b2}.bi-theme-dark .bi-disabled,.bi-theme-dark .bi-disabled .bi-input,.bi-theme-dark .bi-disabled .bi-textarea{color:#666}.bi-tips,.bi-tips .bi-input,.bi-tips .bi-textarea{color:#c4c9d1}.bi-border{border:1px solid #d4dadd}.bi-theme-dark .bi-border{border:1px solid #525466}.bi-border-left{border-left:1px solid #d4dadd}.bi-theme-dark .bi-border-left{border-left:1px solid #525466}.bi-border-right{border-right:1px solid #d4dadd}.bi-theme-dark .bi-border-right{border-right:1px solid #525466}.bi-border-top{border-top:1px solid #d4dadd}.bi-theme-dark .bi-border-top{border-top:1px solid #525466}.bi-border-bottom{border-bottom:1px solid #d4dadd}.bi-theme-dark .bi-border-bottom{border-bottom:1px solid #525466}.bi-keyword-red-mark,.bi-keyword-red-mark .bi-input,.bi-keyword-red-mark .bi-textarea{color:#faaa39}.bi-high-light,.bi-high-light .bi-input,.bi-high-light .bi-textarea{color:#3685f2}.bi-high-light-background{background-color:#3f8ce8;color:#fff}.bi-high-light-background .bi-input,.bi-high-light-background .bi-textarea{color:#fff}.bi-high-light-border{border-color:#178cdf}.bi-water-mark{color:#ccc;cursor:text}.bi-water-mark .bi-input,.bi-water-mark .bi-textarea{color:#ccc}.bi-theme-dark .bi-water-mark,.bi-theme-dark .bi-water-mark .bi-input,.bi-theme-dark .bi-water-mark .bi-textarea{color:#666}.bi-mask,.bi-mask .bi-input,.bi-mask .bi-textarea{color:#fff}.bi-resizer{background:#1a1a1a;opacity:.2;filter:alpha(opacity=20);z-index:1000000000!important}.bi-theme-dark .bi-resizer{background:#fff}.bi-mask{background-color:rgba(26,26,26,.2);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#331a1a1a, endColorstr=#331a1a1a)}.bi-theme-dark .bi-mask{color:#242640;background-color:rgba(255,255,255,.2);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#33ffffff, endColorstr=#33ffffff)}.bi-theme-dark .bi-mask .bi-input,.bi-theme-dark .bi-mask .bi-textarea{color:#242640}.bi-z-index-mask{color:#fff;background-color:rgba(26,26,26,.5);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#801a1a1a, endColorstr=#801a1a1a)}.bi-z-index-mask .bi-input,.bi-z-index-mask .bi-textarea{color:#fff}.bi-list-item.hover,.bi-list-item:hover{color:#1a1a1a;background-color:rgba(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.bi-list-item.hover .bi-input,.bi-list-item.hover .bi-textarea,.bi-list-item:hover .bi-input,.bi-list-item:hover .bi-textarea{color:#1a1a1a}.bi-list-item.disabled,.bi-list-item.disabled:active,.bi-list-item.disabled:hover{background-color:transparent!important;color:#9ea6b2!important}.bi-list-item.disabled .bi-high-light,.bi-list-item.disabled .bi-input,.bi-list-item.disabled .bi-textarea,.bi-list-item.disabled:active .bi-high-light,.bi-list-item.disabled:active .bi-input,.bi-list-item.disabled:active .bi-textarea,.bi-list-item.disabled:hover .bi-high-light,.bi-list-item.disabled:hover .bi-input,.bi-list-item.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item.hover,.bi-theme-dark .bi-list-item:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item.hover .bi-input,.bi-theme-dark .bi-list-item.hover .bi-textarea,.bi-theme-dark .bi-list-item:hover .bi-input,.bi-theme-dark .bi-list-item:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item.disabled,.bi-theme-dark .bi-list-item.disabled:active,.bi-theme-dark .bi-list-item.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item.disabled .bi-high-light,.bi-theme-dark .bi-list-item.disabled .bi-input,.bi-theme-dark .bi-list-item.disabled .bi-textarea,.bi-theme-dark .bi-list-item.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item.disabled:active .bi-input,.bi-theme-dark .bi-list-item.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item.disabled:hover .bi-input,.bi-theme-dark .bi-list-item.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-border.active,.bi-list-item-border:active{border:1px solid #178cdf}.bi-list-item-simple.hover,.bi-list-item-simple.hover .bi-input,.bi-list-item-simple.hover .bi-textarea,.bi-list-item-simple:hover,.bi-list-item-simple:hover .bi-input,.bi-list-item-simple:hover .bi-textarea{color:#3685f2}.bi-list-item-simple.disabled,.bi-list-item-simple.disabled .bi-high-light,.bi-list-item-simple.disabled .bi-input,.bi-list-item-simple.disabled .bi-textarea,.bi-list-item-simple.disabled:active,.bi-list-item-simple.disabled:active .bi-high-light,.bi-list-item-simple.disabled:active .bi-input,.bi-list-item-simple.disabled:active .bi-textarea,.bi-list-item-simple.disabled:hover,.bi-list-item-simple.disabled:hover .bi-high-light,.bi-list-item-simple.disabled:hover .bi-input,.bi-list-item-simple.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-list-item-effect:hover,.bi-list-item-effect:hover .bi-input,.bi-list-item-effect:hover .bi-textarea{color:#1a1a1a}.bi-list-item-effect.active,.bi-list-item-effect.active .bi-input,.bi-list-item-effect.active .bi-textarea,.bi-list-item-effect:active,.bi-list-item-effect:active .bi-input,.bi-list-item-effect:active .bi-textarea{color:#3685f2}.bi-list-item-effect.disabled,.bi-list-item-effect.disabled .bi-high-light,.bi-list-item-effect.disabled .bi-input,.bi-list-item-effect.disabled .bi-textarea,.bi-list-item-effect.disabled:active,.bi-list-item-effect.disabled:active .bi-high-light,.bi-list-item-effect.disabled:active .bi-input,.bi-list-item-effect.disabled:active .bi-textarea,.bi-list-item-effect.disabled:hover,.bi-list-item-effect.disabled:hover .bi-high-light,.bi-list-item-effect.disabled:hover .bi-input,.bi-list-item-effect.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item-effect:hover,.bi-theme-dark .bi-list-item-effect:hover .bi-input,.bi-theme-dark .bi-list-item-effect:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-effect.active,.bi-theme-dark .bi-list-item-effect.active .bi-input,.bi-theme-dark .bi-list-item-effect.active .bi-textarea,.bi-theme-dark .bi-list-item-effect:active,.bi-theme-dark .bi-list-item-effect:active .bi-input,.bi-theme-dark .bi-list-item-effect:active .bi-textarea{color:#3685f2}.bi-theme-dark .bi-list-item-effect.disabled,.bi-theme-dark .bi-list-item-effect.disabled:active,.bi-theme-dark .bi-list-item-effect.disabled:hover{background-color:transparent!important;color:#666!important}.bi-list-item-active.active,.bi-list-item-active.hover,.bi-list-item-active:active,.bi-list-item-active:hover{background-color:rgba(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.bi-theme-dark .bi-list-item-effect.disabled .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled .bi-input,.bi-theme-dark .bi-list-item-effect.disabled .bi-textarea,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-input,.bi-theme-dark .bi-list-item-effect.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-effect.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-active.hover,.bi-list-item-active.hover .bi-input,.bi-list-item-active.hover .bi-textarea,.bi-list-item-active:hover,.bi-list-item-active:hover .bi-input,.bi-list-item-active:hover .bi-textarea{color:#1a1a1a}.bi-list-item-active.active,.bi-list-item-active.active .bi-input,.bi-list-item-active.active .bi-textarea,.bi-list-item-active:active,.bi-list-item-active:active .bi-input,.bi-list-item-active:active .bi-textarea{color:#3685f2}.bi-list-item-active.disabled,.bi-list-item-active.disabled:active,.bi-list-item-active.disabled:hover{background-color:transparent!important;color:#9ea6b2!important}.bi-list-item-active.disabled .bi-high-light,.bi-list-item-active.disabled .bi-input,.bi-list-item-active.disabled .bi-textarea,.bi-list-item-active.disabled:active .bi-high-light,.bi-list-item-active.disabled:active .bi-input,.bi-list-item-active.disabled:active .bi-textarea,.bi-list-item-active.disabled:hover .bi-high-light,.bi-list-item-active.disabled:hover .bi-input,.bi-list-item-active.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item-active.hover,.bi-theme-dark .bi-list-item-active:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-active.hover .bi-input,.bi-theme-dark .bi-list-item-active.hover .bi-textarea,.bi-theme-dark .bi-list-item-active:hover .bi-input,.bi-theme-dark .bi-list-item-active:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-active.active,.bi-theme-dark .bi-list-item-active:active{color:#3685f2;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-active.active .bi-input,.bi-theme-dark .bi-list-item-active.active .bi-textarea,.bi-theme-dark .bi-list-item-active:active .bi-input,.bi-theme-dark .bi-list-item-active:active .bi-textarea{color:#3685f2}.bi-theme-dark .bi-list-item-active.disabled,.bi-theme-dark .bi-list-item-active.disabled:active,.bi-theme-dark .bi-list-item-active.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-active.disabled .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled .bi-input,.bi-theme-dark .bi-list-item-active.disabled .bi-textarea,.bi-theme-dark .bi-list-item-active.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled:active .bi-input,.bi-theme-dark .bi-list-item-active.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-active.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-active2.hover,.bi-list-item-active2:hover{color:#1a1a1a;background-color:#fff}.bi-list-item-active2.hover .bi-input,.bi-list-item-active2.hover .bi-textarea,.bi-list-item-active2:hover .bi-input,.bi-list-item-active2:hover .bi-textarea{color:#1a1a1a}.bi-list-item-active2.active,.bi-list-item-active2:active{color:#3685f2;background-color:#fff}.bi-list-item-active2.active .bi-input,.bi-list-item-active2.active .bi-textarea,.bi-list-item-active2:active .bi-input,.bi-list-item-active2:active .bi-textarea{color:#3685f2}.bi-list-item-active2.disabled,.bi-list-item-active2.disabled:active,.bi-list-item-active2.disabled:hover{background-color:transparent!important;color:#9ea6b2!important}.bi-list-item-active2.disabled .bi-high-light,.bi-list-item-active2.disabled .bi-input,.bi-list-item-active2.disabled .bi-textarea,.bi-list-item-active2.disabled:active .bi-high-light,.bi-list-item-active2.disabled:active .bi-input,.bi-list-item-active2.disabled:active .bi-textarea,.bi-list-item-active2.disabled:hover .bi-high-light,.bi-list-item-active2.disabled:hover .bi-input,.bi-list-item-active2.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item-active2.hover,.bi-theme-dark .bi-list-item-active2:hover{color:#fff;background-color:#242640}.bi-theme-dark .bi-list-item-active2.hover .bi-input,.bi-theme-dark .bi-list-item-active2.hover .bi-textarea,.bi-theme-dark .bi-list-item-active2:hover .bi-input,.bi-theme-dark .bi-list-item-active2:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-active2.active,.bi-theme-dark .bi-list-item-active2:active{color:#3685f2;background-color:#242640}.bi-theme-dark .bi-list-item-active2.active .bi-input,.bi-theme-dark .bi-list-item-active2.active .bi-textarea,.bi-theme-dark .bi-list-item-active2:active .bi-input,.bi-theme-dark .bi-list-item-active2:active .bi-textarea{color:#3685f2}.bi-theme-dark .bi-list-item-active2.disabled,.bi-theme-dark .bi-list-item-active2.disabled:active,.bi-theme-dark .bi-list-item-active2.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-active2.disabled .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled .bi-input,.bi-theme-dark .bi-list-item-active2.disabled .bi-textarea,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-input,.bi-theme-dark .bi-list-item-active2.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-active2.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-select.hover,.bi-list-item-select:hover{color:#1a1a1a;background-color:rgba(26,26,26,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d1a1a1a, endColorstr=#0d1a1a1a)}.bi-list-item-select.hover .bi-input,.bi-list-item-select.hover .bi-textarea,.bi-list-item-select:hover .bi-input,.bi-list-item-select:hover .bi-textarea{color:#1a1a1a}.bi-list-item-select.active,.bi-list-item-select:active{color:#fff;background-color:#3f8ce8}.bi-list-item-select.active .bi-high-light,.bi-list-item-select.active .bi-input,.bi-list-item-select.active .bi-textarea,.bi-list-item-select:active .bi-high-light,.bi-list-item-select:active .bi-input,.bi-list-item-select:active .bi-textarea{color:#fff}.bi-list-item-select.button-success.active,.bi-list-item-select.button-success:active{color:#fff;background-color:#58cc7d}.bi-list-item-select.button-success.active .bi-high-light,.bi-list-item-select.button-success.active .bi-input,.bi-list-item-select.button-success.active .bi-textarea,.bi-list-item-select.button-success:active .bi-high-light,.bi-list-item-select.button-success:active .bi-input,.bi-list-item-select.button-success:active .bi-textarea{color:#fff}.bi-list-item-select.button-warning,.bi-list-item-select.button-warning .bi-high-light,.bi-list-item-select.button-warning .bi-input,.bi-list-item-select.button-warning .bi-textarea,.bi-list-item-select.button-warning.hover .bi-high-light,.bi-list-item-select.button-warning.hover .bi-input,.bi-list-item-select.button-warning.hover .bi-textarea,.bi-list-item-select.button-warning:hover .bi-high-light,.bi-list-item-select.button-warning:hover .bi-input,.bi-list-item-select.button-warning:hover .bi-textarea{color:#ff4949}.bi-list-item-select.button-success.active.bi-high-light-border,.bi-list-item-select.button-success:active.bi-high-light-border{border-color:#58cc7d}.bi-list-item-select.button-warning.active.bi-high-light-border,.bi-list-item-select.button-warning.bi-high-light-border,.bi-list-item-select.button-warning.hover.bi-high-light-border,.bi-list-item-select.button-warning:active.bi-high-light-border,.bi-list-item-select.button-warning:hover.bi-high-light-border{border-color:#e85050}.bi-list-item-select.button-warning.hover,.bi-list-item-select.button-warning:hover{color:#ff4949;background-color:#ffecec}.bi-list-item-select.button-warning.active,.bi-list-item-select.button-warning:active{color:#fff;background-color:#ff4949}.bi-list-item-select.button-warning.active .bi-high-light,.bi-list-item-select.button-warning.active .bi-input,.bi-list-item-select.button-warning.active .bi-textarea,.bi-list-item-select.button-warning:active .bi-high-light,.bi-list-item-select.button-warning:active .bi-input,.bi-list-item-select.button-warning:active .bi-textarea{color:#fff}.bi-list-item-select.disabled,.bi-list-item-select.disabled:active,.bi-list-item-select.disabled:hover{color:#9ea6b2!important;background-color:transparent!important}.bi-list-item-select.disabled .bi-high-light,.bi-list-item-select.disabled .bi-input,.bi-list-item-select.disabled .bi-textarea,.bi-list-item-select.disabled:active .bi-high-light,.bi-list-item-select.disabled:active .bi-input,.bi-list-item-select.disabled:active .bi-textarea,.bi-list-item-select.disabled:hover .bi-high-light,.bi-list-item-select.disabled:hover .bi-input,.bi-list-item-select.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-list-item-select.disabled.bi-high-light-border,.bi-list-item-select.disabled:active.bi-high-light-border,.bi-list-item-select.disabled:hover.bi-high-light-border{border-color:#ccc}.bi-theme-dark .bi-list-item-select.hover,.bi-theme-dark .bi-list-item-select:hover{color:#fff;background-color:rgba(255,255,255,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff, endColorstr=#0dffffff)}.bi-theme-dark .bi-list-item-select.hover .bi-input,.bi-theme-dark .bi-list-item-select.hover .bi-textarea,.bi-theme-dark .bi-list-item-select:hover .bi-input,.bi-theme-dark .bi-list-item-select:hover .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-select.active,.bi-theme-dark .bi-list-item-select:active{color:#fff;background-color:#3f8ce8}.bi-theme-dark .bi-list-item-select.active .bi-high-light,.bi-theme-dark .bi-list-item-select.active .bi-input,.bi-theme-dark .bi-list-item-select.active .bi-textarea,.bi-theme-dark .bi-list-item-select:active .bi-high-light,.bi-theme-dark .bi-list-item-select:active .bi-input,.bi-theme-dark .bi-list-item-select:active .bi-textarea{color:#fff}.bi-theme-dark .bi-list-item-select.disabled,.bi-theme-dark .bi-list-item-select.disabled:active,.bi-theme-dark .bi-list-item-select.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-select.disabled .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled .bi-input,.bi-theme-dark .bi-list-item-select.disabled .bi-textarea,.bi-theme-dark .bi-list-item-select.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled:active .bi-input,.bi-theme-dark .bi-list-item-select.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-select.disabled:hover .bi-textarea{color:#666!important}.bi-list-item-none.hover,.bi-list-item-none:hover{color:inherit;background-color:transparent}.bi-list-item-none.hover .bi-input,.bi-list-item-none.hover .bi-textarea,.bi-list-item-none:hover .bi-input,.bi-list-item-none:hover .bi-textarea{color:inherit}.bi-list-item-none.active,.bi-list-item-none:active{color:inherit;background-color:transparent}.bi-list-item-none.active .bi-high-light,.bi-list-item-none.active .bi-input,.bi-list-item-none.active .bi-textarea,.bi-list-item-none:active .bi-high-light,.bi-list-item-none:active .bi-input,.bi-list-item-none:active .bi-textarea{color:inherit}.bi-list-item-none.disabled,.bi-list-item-none.disabled:active,.bi-list-item-none.disabled:hover{color:#9ea6b2!important;background-color:transparent!important}.bi-list-item-none.disabled .bi-high-light,.bi-list-item-none.disabled .bi-input,.bi-list-item-none.disabled .bi-textarea,.bi-list-item-none.disabled:active .bi-high-light,.bi-list-item-none.disabled:active .bi-input,.bi-list-item-none.disabled:active .bi-textarea,.bi-list-item-none.disabled:hover .bi-high-light,.bi-list-item-none.disabled:hover .bi-input,.bi-list-item-none.disabled:hover .bi-textarea{color:#9ea6b2!important}.bi-theme-dark .bi-list-item-none.hover,.bi-theme-dark .bi-list-item-none:hover{color:inherit;background-color:transparent}.bi-theme-dark .bi-list-item-none.hover .bi-input,.bi-theme-dark .bi-list-item-none.hover .bi-textarea,.bi-theme-dark .bi-list-item-none:hover .bi-input,.bi-theme-dark .bi-list-item-none:hover .bi-textarea{color:inherit}.bi-theme-dark .bi-list-item-none.active,.bi-theme-dark .bi-list-item-none:active{color:inherit;background-color:transparent}.bi-theme-dark .bi-list-item-none.active .bi-high-light,.bi-theme-dark .bi-list-item-none.active .bi-input,.bi-theme-dark .bi-list-item-none.active .bi-textarea,.bi-theme-dark .bi-list-item-none:active .bi-high-light,.bi-theme-dark .bi-list-item-none:active .bi-input,.bi-theme-dark .bi-list-item-none:active .bi-textarea{color:inherit}.bi-theme-dark .bi-list-item-none.disabled,.bi-theme-dark .bi-list-item-none.disabled:active,.bi-theme-dark .bi-list-item-none.disabled:hover{background-color:transparent!important;color:#666!important}.bi-theme-dark .bi-list-item-none.disabled .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled .bi-input,.bi-theme-dark .bi-list-item-none.disabled .bi-textarea,.bi-theme-dark .bi-list-item-none.disabled:active .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled:active .bi-input,.bi-theme-dark .bi-list-item-none.disabled:active .bi-textarea,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-high-light,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-input,.bi-theme-dark .bi-list-item-none.disabled:hover .bi-textarea{color:#666!important}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.cursor-move{cursor:move}.y-overflow-auto{overflow-y:auto;overflow-x:hidden}.x-overflow-auto{overflow-y:hidden;overflow-x:auto}.y-overflow-scroll{overflow-y:scroll;overflow-x:hidden}.x-overflow-scroll{overflow-y:hidden;overflow-x:scroll}.overflow-auto{overflow-x:auto;overflow-y:auto}.overflow-scroll{overflow-x:scroll;overflow-y:scroll}.overflow-dot,.overflow-hidden{overflow-x:hidden;overflow-y:hidden}.td-overflow{white-space:normal;word-break:break-all}.overflow-dot{white-space:nowrap}.display-block{display:block}.display-inline{display:inline-block}.vertical-super{vertical-align:super}.vertical-top{vertical-align:top}.horizon-center{text-align:center}.horizon-left{text-align:left}.border-sizing{-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.content-sizing{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;-ms-box-sizing:content-box;box-sizing:content-box}.bi-flex-center-layout{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-flex-align:center;-ms-align-items:center;-o-align-items:center;align-items:center}.bi-flex-horizontal-layout{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:start;-webkit-align-items:flex-start;-moz-align-items:flex-start;-ms-align-items:flex-start;-ms-flex-align:start;-o-align-items:flex-start;align-items:flex-start;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap}.bi-flex-horizontal-layout.middle{-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-ms-flex-align:center;-o-align-items:center;align-items:center}.bi-flex-horizontal-layout.bottom{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-moz-align-items:flex-end;-ms-align-items:flex-end;-ms-flex-align:end;-o-align-items:flex-end;align-items:flex-end}.bi-flex-vertical-center{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-o-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-ms-flex-align:center;-o-align-items:center;align-items:center;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap}.bi-flex-vertical-center.stretch{-webkit-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;-o-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-ms-flex-pack:center;-o-justify-content:center;justify-content:center;-webkit-box-align:stretch;-webkit-align-items:stretch;-moz-align-items:stretch;-ms-align-items:stretch;-ms-flex-align:stretch;-o-align-items:stretch;align-items:stretch}.bi-flex-wrapper-center-layout .flex-wrapper-center-layout-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-ms-flex-pack:center;-o-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-ms-flex-align:center;-o-align-items:center;align-items:center;min-width:100%;min-height:100%;float:left}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-ms-flex-pack:start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:flex-start;-webkit-align-items:flex-start;-moz-align-items:flex-start;-ms-align-items:flex-start;-ms-flex-align:start;-o-align-items:flex-start;align-items:flex-start;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap;min-height:100%}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.middle{-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.bottom{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-moz-align-items:flex-end;-ms-align-items:flex-end;-o-align-items:flex-end;align-items:flex-end}.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper{display:box;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;-o-flex-direction:row;flex-direction:row;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;-ms-justify-content:flex-start;-ms-flex-pack:start;-o-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;-moz-align-items:center;-ms-align-items:center;-ms-flex-align:center;-o-align-items:center;align-items:center;-webkit-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-o-flex-wrap:nowrap;flex-wrap:nowrap;min-height:100%;float:left}.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper.stretch{width:100%;-webkit-box-orient:vertical;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;-o-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-box-align:stretch;-webkit-align-items:stretch;-moz-align-items:stretch;-ms-align-items:stretch;-o-align-items:stretch;align-items:stretch}.bi-theme-dark{background-color:#191B2B;color:#ccc}.bi-theme-dark .bi-input{color:#fff}.bi-color-chooser-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;box-shadow:0 0 2px 1px #d4dadd inset;-webkit-box-shadow:0 0 2px 1px #d4dadd inset;-moz-box-shadow:0 0 2px 1px #d4dadd inset}.bi-color-picker-button .color-picker-button-mask{border:1px solid #1a1a1a}.bi-theme-dark .bi-color-picker-button .color-picker-button-mask{border:1px solid #fff}.bi-color-picker-editor .color-picker-editor-display{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;box-shadow:0 0 2px 1px #d4dadd inset;-webkit-box-shadow:0 0 2px 1px #d4dadd inset;-moz-box-shadow:0 0 2px 1px #d4dadd inset}.farbtastic{position:relative}.farbtastic *{position:absolute;cursor:crosshair}.farbtastic,.farbtastic .wheel{width:195px;height:195px}.farbtastic .color,.farbtastic .overlay{top:47px;left:47px;width:101px;height:101px}.farbtastic .wheel{width:195px;height:195px}.farbtastic .marker{width:17px;height:17px;margin:-8px 0 0 -8px;overflow:hidden}.bi-bubble-combo .button-combo-triangle-wrapper{position:fixed!important;z-index:10000000}.bi-bubble-combo .bubble-combo-triangle-left{z-index:1;position:absolute;width:16px;height:10px;border-bottom:1px solid #f5f5f5}.bi-bubble-combo .bubble-combo-triangle-left:before{position:absolute;top:0;right:0;bottom:0;border-bottom:10px solid #ccc;border-left:8px solid transparent;border-right:8px solid transparent;content:""}.bi-bubble-combo .bubble-combo-triangle-left:after{position:absolute;right:1px;top:1px;bottom:0;border-bottom:9px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent;content:""}.bi-bubble-combo .bubble-combo-triangle-right{z-index:1;position:absolute;width:16px;height:6px;border-bottom:1px solid #f5f5f5}.bi-bubble-combo .bubble-combo-triangle-right:before{position:absolute;top:0;right:0;bottom:0;border-bottom:10px solid #ccc;border-left:8px solid transparent;border-right:8px solid transparent;content:""}.bi-bubble-combo .bubble-combo-triangle-right:after{position:absolute;right:1px;top:1px;bottom:0;border-bottom:9px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent;content:""}.bi-bubble-combo .bubble-combo-triangle-top{z-index:1;position:absolute;width:16px;height:10px;border-top:1px solid #fff}.bi-bubble-combo .bubble-combo-triangle-top:after{position:absolute;right:1px;top:0;border-top:6px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent;content:""}.bi-bubble-combo .bubble-combo-triangle-bottom:before,.bi-bubble-combo .bubble-combo-triangle-top:before{border-left:8px solid transparent;border-right:8px solid transparent;content:"";position:absolute}.bi-bubble-combo .bubble-combo-triangle-top:before{border-top:7px solid #ccc}.bi-bubble-combo .bubble-combo-triangle-bottom{z-index:1;position:absolute;width:16px;height:5px;border-bottom:1px solid #fff}.bi-bubble-combo .bubble-combo-triangle-bottom:before{top:0;right:0;bottom:0;border-bottom:7px solid #ccc}.bi-bubble-combo .bubble-combo-triangle-bottom:after{position:absolute;right:1px;top:1px;bottom:0;border-bottom:6px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent;content:""}.cm-tab-wrap-hack:after,.scrollbar-layout-face:after{content:''}.bi-combo.bi-combo-popup{display:block!important;visibility:visible!important}.bi-search-text-value-combo .trigger-icon-button{font-size:16px}.bi-adapt-editor .adapt-editor-text{font-size:14px}.bi-search-editor .close-font,.bi-search-editor .search-font{font-size:20px}.bi-small-search-editor .bi-editor,.bi-small-search-editor .bi-editor .bi-input,.bi-small-search-editor .bi-editor .bi-label{font-size:12px}.bi-small-search-editor .close-font,.bi-small-search-editor .search-font{font-size:18px}.bi-sign-initial-editor .sign-initial-editor-text{font-size:14px}.CodeMirror{font-family:monospace;cursor:text;width:100%;height:100%}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror div.CodeMirror-cursor{border-left:1px solid #1a1a1a}.bi-theme-dark .CodeMirror div.CodeMirror-cursor{border-left:1px solid #fff}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.CodeMirror.cm-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7}.CodeMirror.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}@-moz-keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}@-webkit-keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}@keyframes blink{0%,100%{background:#7e7}50%{background:0 0}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.bi-display-tree .ztree li a:hover,.ztree li a{text-decoration:none}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default span[class*=fieldName]{display:inline-block;color:#fff;background:#3685f2;padding:0 5px;margin:1px}.cm-s-default span[class*=start]{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;margin-left:3px}.cm-s-default span[class*=end]{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;margin-right:3px}.cm-s-default span[class*="start end"]{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.cm-s-default span[class*="#"]{color:#3685f2}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none}.bi-message-text,.bi-page-table-cell{-webkit-user-select:text;-ms-user-select:text;-o-user-select:text;-khtml-user-select:text}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent}.codemirror-high-line-height{line-height:2}.codemirror-low-line-height{line-height:1.4}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-code{outline:0}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.bi-collection-table-cell,.bi-text{-webkit-box-sizing:border-box;-ms-box-sizing:border-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-measure pre{position:static}.CodeMirror div.CodeMirror-cursor{position:absolute;border-right:none;width:0}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}span.CodeMirror-selectedtext{background:0 0}.CodeMirror-hints{position:absolute;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,.2);-moz-box-shadow:2px 3px 5px rgba(0,0,0,.2);box-shadow:2px 3px 5px rgba(0,0,0,.2);border-radius:3px;border:1px solid silver;background:#fff;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto;z-index:1000000000}.bi-label,.bi-segment>.center-element,.bi-text,.bi-textarea-editor{overflow-x:hidden;overflow-y:hidden}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;max-width:19em;overflow:hidden;white-space:pre;color:#000;cursor:pointer}.bi-label,.bi-text,.ztree li{white-space:nowrap}li.CodeMirror-hint-active{background:#08f;color:#fff}.bi-message-title{font-size:16px;cursor:pointer}.bi-message-text{font-size:16px;-moz-user-select:text;user-select:text}.bi-message-content{font-size:16px}.bi-message-close{font-size:25px}.bi-message-animate{-webkit-transition:opacity .3s,transform .4s,-webkit-transform .4s;-moz-transition:opacity .3s,transform .4s,-webkit-transform .4s;-o-transition:opacity .3s,transform .4s,-webkit-transform .4s;transition:opacity .3s,transform .4s,-webkit-transform .4s}.bi-message-enter{opacity:1}.bi-message-leave{opacity:0;transform:translateY(-100%)}.bi-multi-list-view .bi-button-mask{opacity:.1;filter:alpha(opacity=10)}.bi-panel{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-panel .panel-title{background-color:#F2F4F7}.bi-panel .panel-title .panel-title-text{cursor:text;font-size:14px}.bi-all-count-pager .all-pager-next,.bi-all-count-pager .all-pager-prev,.bi-direction-pager .direction-pager-next,.bi-direction-pager .direction-pager-prev,.bi-rich-editor-text-toolbar .text-toolbar-button{font-size:16px}.bi-pager .page-item{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-segment>.center-element{overflow:hidden;background:#fff;border-right:1px solid #d4dadd;border-top:1px solid #d4dadd;border-bottom:1px solid #d4dadd}.bi-segment>.first-element{border-left:1px solid #d4dadd;-webkit-border-radius:6px 0 0 6px;-moz-border-radius:6px 0 0 6px;border-radius:6px 0 0 6px}.bi-segment>.last-element{-webkit-border-radius:0 6px 6px 0;-moz-border-radius:0 6px 6px 0;border-radius:0 6px 6px 0}.bi-theme-dark .bi-segment>.center-element{overflow:hidden;overflow-x:hidden;overflow-y:hidden;background:#242640;border-right:1px solid #525466;border-top:1px solid #525466;border-bottom:1px solid #525466}.bi-theme-dark .bi-segment>.first-element{border-left:1px solid #242640}#body .bi-button,body .bi-button{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;border:1px solid #178cdf;background-color:#3f8ce8;text-align:center;vertical-align:middle;cursor:pointer;font-size:14px}#body .bi-button.clear,#body .bi-button.ghost,body .bi-button.clear,body .bi-button.ghost{background-color:transparent;font-size:inherit}#body .bi-button.block,body .bi-button.block{font-size:inherit;border-width:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}#body .bi-button.clear,body .bi-button.clear{border-width:0}#body .bi-button.clear:hover,body .bi-button.clear:hover{opacity:.9;filter:alpha(opacity=90)}#body .bi-button.clear:active,body .bi-button.clear:active{opacity:.8;filter:alpha(opacity=80)}#body .bi-button.button-common,#body .bi-button.button-common .b-font:before,body .bi-button.button-common,body .bi-button.button-common .b-font:before{color:#fff}#body .bi-button.button-common.clear,#body .bi-button.button-common.clear .b-font:before,#body .bi-button.button-common.ghost,#body .bi-button.button-common.ghost .b-font:before,body .bi-button.button-common.clear,body .bi-button.button-common.clear .b-font:before,body .bi-button.button-common.ghost,body .bi-button.button-common.ghost .b-font:before{color:#3685f2}#body .bi-button.button-common.ghost:hover,body .bi-button.button-common.ghost:hover{color:#fff;background-color:#3f8ce8}#body .bi-button.button-common.ghost:active,body .bi-button.button-common.ghost:active{background-color:#3f8ce8}#body .bi-button.button-ignore,body .bi-button.button-ignore{background-color:#fff;border-color:#178cdf}#body .bi-button.button-ignore,#body .bi-button.button-ignore .b-font:before,body .bi-button.button-ignore,body .bi-button.button-ignore .b-font:before{color:#3685f2}#body .bi-button.button-ignore.clear,body .bi-button.button-ignore.clear{background-color:transparent;border-width:0}#body .bi-button.button-success,body .bi-button.button-success{background-color:#58cc7d;border-color:#58cc7d}#body .bi-button.button-success,#body .bi-button.button-success .b-font:before,body .bi-button.button-success,body .bi-button.button-success .b-font:before{color:#fff}#body .bi-button.button-success.clear,body .bi-button.button-success.clear{background-color:transparent;border-width:0}#body .bi-button.button-success.clear,#body .bi-button.button-success.clear .b-font:before,body .bi-button.button-success.clear,body .bi-button.button-success.clear .b-font:before{color:#5cb75d}#body .bi-button.button-warning,body .bi-button.button-warning{background-color:#faaa39;border-color:#fbb03b}#body .bi-button.button-warning,#body .bi-button.button-warning .b-font:before,body .bi-button.button-warning,body .bi-button.button-warning .b-font:before{color:#fff}#body .bi-button.button-warning.clear,body .bi-button.button-warning.clear{background-color:transparent;border-width:0}#body .bi-button.button-warning.clear,#body .bi-button.button-warning.clear .b-font:before,body .bi-button.button-warning.clear,body .bi-button.button-warning.clear .b-font:before{color:#faaa39}#body .bi-button.button-error,body .bi-button.button-error{background-color:#ff4949;border-color:#e85050}#body .bi-button.button-error,#body .bi-button.button-error .b-font:before,body .bi-button.button-error,body .bi-button.button-error .b-font:before{color:#fff}#body .bi-button.button-error.clear,body .bi-button.button-error.clear{background-color:transparent;border-width:0}#body .bi-button.button-error.clear,#body .bi-button.button-error.clear .b-font:before,body .bi-button.button-error.clear,body .bi-button.button-error.clear .b-font:before{color:#ff4949}#body .bi-button.button-common.disabled,#body .bi-button.button-common.disabled.base-disabled,#body .bi-button.button-error.disabled,#body .bi-button.button-error.disabled.base-disabled,#body .bi-button.button-success.disabled,#body .bi-button.button-success.disabled.base-disabled,#body .bi-button.button-warning.disabled,#body .bi-button.button-warning.disabled.base-disabled,body .bi-button.button-common.disabled,body .bi-button.button-common.disabled.base-disabled,body .bi-button.button-error.disabled,body .bi-button.button-error.disabled.base-disabled,body .bi-button.button-success.disabled,body .bi-button.button-success.disabled.base-disabled,body .bi-button.button-warning.disabled,body .bi-button.button-warning.disabled.base-disabled{background:#ccc!important;border-color:#ccc!important}#body .bi-button.button-common.disabled,#body .bi-button.button-common.disabled .b-font:before,#body .bi-button.button-common.disabled.base-disabled,#body .bi-button.button-common.disabled.base-disabled .b-font:before,#body .bi-button.button-error.disabled,#body .bi-button.button-error.disabled .b-font:before,#body .bi-button.button-error.disabled.base-disabled,#body .bi-button.button-error.disabled.base-disabled .b-font:before,#body .bi-button.button-success.disabled,#body .bi-button.button-success.disabled .b-font:before,#body .bi-button.button-success.disabled.base-disabled,#body .bi-button.button-success.disabled.base-disabled .b-font:before,#body .bi-button.button-warning.disabled,#body .bi-button.button-warning.disabled .b-font:before,#body .bi-button.button-warning.disabled.base-disabled,#body .bi-button.button-warning.disabled.base-disabled .b-font:before,body .bi-button.button-common.disabled,body .bi-button.button-common.disabled .b-font:before,body .bi-button.button-common.disabled.base-disabled,body .bi-button.button-common.disabled.base-disabled .b-font:before,body .bi-button.button-error.disabled,body .bi-button.button-error.disabled .b-font:before,body .bi-button.button-error.disabled.base-disabled,body .bi-button.button-error.disabled.base-disabled .b-font:before,body .bi-button.button-success.disabled,body .bi-button.button-success.disabled .b-font:before,body .bi-button.button-success.disabled.base-disabled,body .bi-button.button-success.disabled.base-disabled .b-font:before,body .bi-button.button-warning.disabled,body .bi-button.button-warning.disabled .b-font:before,body .bi-button.button-warning.disabled.base-disabled,body .bi-button.button-warning.disabled.base-disabled .b-font:before{color:#fff!important}#body .bi-button.button-common.disabled.clear,#body .bi-button.button-common.disabled.clear .b-font:before,#body .bi-button.button-error.disabled.clear,#body .bi-button.button-error.disabled.clear .b-font:before,#body .bi-button.button-ignore.disabled,#body .bi-button.button-ignore.disabled .b-font:before,#body .bi-button.button-ignore.disabled.clear,#body .bi-button.button-ignore.disabled.clear .b-font:before,#body .bi-button.button-success.disabled.clear,#body .bi-button.button-success.disabled.clear .b-font:before,#body .bi-button.button-warning.disabled.clear,#body .bi-button.button-warning.disabled.clear .b-font:before,body .bi-button.button-common.disabled.clear,body .bi-button.button-common.disabled.clear .b-font:before,body .bi-button.button-error.disabled.clear,body .bi-button.button-error.disabled.clear .b-font:before,body .bi-button.button-ignore.disabled,body .bi-button.button-ignore.disabled .b-font:before,body .bi-button.button-ignore.disabled.clear,body .bi-button.button-ignore.disabled.clear .b-font:before,body .bi-button.button-success.disabled.clear,body .bi-button.button-success.disabled.clear .b-font:before,body .bi-button.button-warning.disabled.clear,body .bi-button.button-warning.disabled.clear .b-font:before{color:#9ea6b2!important}#body .bi-button.button-ignore.disabled,body .bi-button.button-ignore.disabled{background:#fff!important;border-color:#d4dadd!important}#body .bi-button.button-common.disabled.clear,#body .bi-button.button-error.disabled.clear,#body .bi-button.button-ignore.disabled.clear,#body .bi-button.button-success.disabled.clear,#body .bi-button.button-warning.disabled.clear,body .bi-button.button-common.disabled.clear,body .bi-button.button-error.disabled.clear,body .bi-button.button-ignore.disabled.clear,body .bi-button.button-success.disabled.clear,body .bi-button.button-warning.disabled.clear{background:0 0!important;border-width:0!important}#body .bi-button.button-common.disabled.clear:active,#body .bi-button.button-common.disabled.clear:hover,#body .bi-button.button-error.disabled.clear:active,#body .bi-button.button-error.disabled.clear:hover,#body .bi-button.button-ignore.disabled.clear:active,#body .bi-button.button-ignore.disabled.clear:hover,#body .bi-button.button-success.disabled.clear:active,#body .bi-button.button-success.disabled.clear:hover,#body .bi-button.button-warning.disabled.clear:active,#body .bi-button.button-warning.disabled.clear:hover,body .bi-button.button-common.disabled.clear:active,body .bi-button.button-common.disabled.clear:hover,body .bi-button.button-error.disabled.clear:active,body .bi-button.button-error.disabled.clear:hover,body .bi-button.button-ignore.disabled.clear:active,body .bi-button.button-ignore.disabled.clear:hover,body .bi-button.button-success.disabled.clear:active,body .bi-button.button-success.disabled.clear:hover,body .bi-button.button-warning.disabled.clear:active,body .bi-button.button-warning.disabled.clear:hover{opacity:1;filter:alpha(opacity=100)}#body .bi-button.button-common.disabled.ghost,#body .bi-button.button-error.disabled.ghost,#body .bi-button.button-ignore.disabled.ghost,#body .bi-button.button-success.disabled.ghost,#body .bi-button.button-warning.disabled.ghost,body .bi-button.button-common.disabled.ghost,body .bi-button.button-error.disabled.ghost,body .bi-button.button-ignore.disabled.ghost,body .bi-button.button-success.disabled.ghost,body .bi-button.button-warning.disabled.ghost{background:0 0!important;border-color:#3685f2!important;opacity:.5;filter:alpha(opacity=50)}#body .bi-button.button-common.disabled.ghost,#body .bi-button.button-common.disabled.ghost .b-font:before,#body .bi-button.button-error.disabled.ghost,#body .bi-button.button-error.disabled.ghost .b-font:before,#body .bi-button.button-ignore.disabled.ghost,#body .bi-button.button-ignore.disabled.ghost .b-font:before,#body .bi-button.button-success.disabled.ghost,#body .bi-button.button-success.disabled.ghost .b-font:before,#body .bi-button.button-warning.disabled.ghost,#body .bi-button.button-warning.disabled.ghost .b-font:before,body .bi-button.button-common.disabled.ghost,body .bi-button.button-common.disabled.ghost .b-font:before,body .bi-button.button-error.disabled.ghost,body .bi-button.button-error.disabled.ghost .b-font:before,body .bi-button.button-ignore.disabled.ghost,body .bi-button.button-ignore.disabled.ghost .b-font:before,body .bi-button.button-success.disabled.ghost,body .bi-button.button-success.disabled.ghost .b-font:before,body .bi-button.button-warning.disabled.ghost,body .bi-button.button-warning.disabled.ghost .b-font:before{color:#3685f2!important}.bi-basic-button.button-common:hover .bi-button-mask,.bi-basic-button.button-error:hover .bi-button-mask,.bi-basic-button.button-ignore:hover .bi-button-mask,.bi-basic-button.button-success:hover .bi-button-mask,.bi-basic-button.button-warning:hover .bi-button-mask{opacity:.1;filter:alpha(opacity=10);background-color:#fff}.bi-basic-button.button-common:active .bi-button-mask,.bi-basic-button.button-error:active .bi-button-mask,.bi-basic-button.button-ignore:active .bi-button-mask,.bi-basic-button.button-success:active .bi-button-mask,.bi-basic-button.button-warning:active .bi-button-mask{opacity:.1;filter:alpha(opacity=10);background-color:#1a1a1a}.bi-theme-dark #body .bi-button.button-common.ghost,.bi-theme-dark #body .bi-button.button-common.ghost .b-font:before,.bi-theme-dark body .bi-button.button-common.ghost,.bi-theme-dark body .bi-button.button-common.ghost .b-font:before{color:#fff;border-color:#fff}.bi-theme-dark #body .bi-button.button-common.ghost:hover,.bi-theme-dark body .bi-button.button-common.ghost:hover{color:#3d4d66;background-color:#fff}.bi-theme-dark #body .bi-button.button-common.ghost:active,.bi-theme-dark body .bi-button.button-common.ghost:active{background-color:rgba(255,255,255,.9);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#e6ffffff, endColorstr=#e6ffffff)}.bi-theme-dark #body .bi-button.button-common.disabled.ghost,.bi-theme-dark body .bi-button.button-common.disabled.ghost{background:0 0!important;border-color:#fff!important;opacity:.5;filter:alpha(opacity=50)}.bi-theme-dark #body .bi-button.button-common.disabled.ghost,.bi-theme-dark #body .bi-button.button-common.disabled.ghost .b-font:before,.bi-theme-dark body .bi-button.button-common.disabled.ghost,.bi-theme-dark body .bi-button.button-common.disabled.ghost .b-font:before{color:#fff!important}.bi-single-select-icon-text-item.active .b-font:before,.bi-single-select-icon-text-item:active .b-font:before{color:#3685f2}.bi-switch{-webkit-border-radius:40px 40px 40px 40px;-moz-border-radius:40px;border-radius:40px;background-color:#d4dadd}.bi-switch.active,.bi-switch:active{background-color:#3f8ce8}.bi-switch .circle-button{-webkit-border-radius:9px 9px 9px 9px;-moz-border-radius:9px;border-radius:9px}.bi-code-editor .param{color:#fff;padding:0 5px;margin:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#3f8ce8;display:inline-block}.bi-code-editor .error-param{color:#ff4949;padding:0 5px;margin:1px;display:inline-block}.bi-multifile-editor .multifile-editor{text-align:right;cursor:pointer;font-size:100px;z-index:2}.bi-resizable-table .resizable-table-region-resizer,.bi-resizable-table-cell .resizable-table-cell-resizer-container{cursor:ew-resize;z-index:1}.bi-shelter-editor .shelter-editor-text,.bi-sign-editor .sign-editor-text{font-size:12px}.bi-textarea-editor{overflow:hidden}.bi-textarea-editor .textarea-editor-content{font-size:12px;border:none}.bi-bubble,.bi-toast{font-size:14px}.x-icon.b-font{margin:auto;width:100%}.bi-file{opacity:0;filter:alpha(opacity=0);z-index:2}.bi-input,.bi-textarea{border:none;outline:0;background-color:transparent;padding:0;margin:0;width:100%;height:100%}.bi-input.bi-input-focus,.bi-textarea.bi-input-focus{border:none}.bi-input.bi-input-error,.bi-textarea.bi-input-error{border:none;color:#ff4949!important}.bi-bubble .bubble-text,.bi-toast{-webkit-border-radius:2px;-moz-border-radius:2px}.bi-label{word-break:break-all}.bi-text{box-sizing:border-box;word-wrap:break-word;word-break:break-word}.bi-bubble .bubble-text{border-radius:2px}.bi-bubble .bubble-error{background:#ffecec;color:#ff4949}.bi-bubble .bubble-common{background:#eaf2fd;color:#3685f2}.bi-bubble .bubble-success{background:#e1f4e7;color:#5cb75d}.bi-bubble .bubble-warning{background:#feeed7;color:#faaa39}.bi-tip{position:fixed!important}.bi-toast{color:#fff;max-width:400px;min-width:150px;border-radius:2px}.bi-toast .toast-icon,.bi-trigger .bi-trigger-icon-button{font-size:16px}.bi-toast.toast-success{background:#58cc7d}.bi-toast.toast-warning{background:#faaa39}.bi-toast.toast-error{background:#ff4949}.bi-toast.toast-normal{background:#3f8ce8}.bi-tooltip{max-width:250px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;font-size:12px;color:#fff}.bi-tooltip.tooltip-success{background:#647185;border:1px solid #647185}.bi-tooltip.tooltip-warning{background:#ff4949;border:1px solid #e85050}.bi-table>div.bottom-left>div>div>table,.bi-table>div.bottom-right>div>div>table,.bi-table>div.top-left>div>div>table,.bi-table>div.top-right>div>div>table,.bi-table>div>div>table{border-right:1px solid #d4dadd;border-bottom:1px solid #d4dadd}.bi-sql-editor .cm-s-default .cm-function,.bi-sql-editor .cm-s-default .cm-keyword,.bi-sql-editor .cm-s-default span[class*="#"]{color:#3685f2}.bi-sql-editor .param{color:#fff;padding:0 5px;margin:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#3f8ce8;display:inline-block}.CodeMirror-hints .sql-fr-function,.CodeMirror-hints .sql-keyword{color:#3685f2}.bi-collection-table-cell{box-sizing:border-box}.bi-grid-table-cell,.bi-sequence-table-dynamic-number .sequence-table-title-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box}.bi-collection-table-cell.first-row{border-top:1px solid #d4dadd}.bi-collection-table-cell.first-col{border-left:1px solid #d4dadd}.bi-theme-dark .bi-collection-table-cell.first-row{border-top:1px solid #525466}.bi-theme-dark .bi-collection-table-cell.first-col{border-left:1px solid #525466}.bi-quick-collection-table>div>.bi-collection{overflow:hidden!important;overflow-x:hidden!important;overflow-y:hidden!important}.bi-table>.first-col{border-left:none}.bi-table>.first-row{border-top:none}.bi-theme-dark .bi-table>div.bottom-left>div>div>table,.bi-theme-dark .bi-table>div.bottom-right>div>div>table,.bi-theme-dark .bi-table>div.top-left>div>div>table,.bi-theme-dark .bi-table>div.top-right>div>div>table,.bi-theme-dark .bi-table>div>div>table{border-right:1px solid #525466;border-bottom:1px solid #525466}.bi-table>div>div>div>table,.bi-table>div>div>table{min-width:100%;clear:both;border-spacing:0;border-collapse:separate}.bi-table>div>div>div>table,.bi-table>div>div>div>table>*>*>td,.bi-table>div>div>div>table>*>*>th,.bi-table>div>div>table,.bi-table>div>div>table>*>*>td,.bi-table>div>div>table>*>*>th{vertical-align:middle;margin:0;padding:0}.bi-table>div>div>div>table>tbody>tr>td,.bi-table>div>div>div>table>thead>tr>td,.bi-table>div>div>table>tbody>tr>td,.bi-table>div>div>table>thead>tr>td{border-top:1px solid #d4dadd;border-left:1px solid #d4dadd}.bi-theme-dark .bi-table>div>div>div>table>tbody>tr>td,.bi-theme-dark .bi-table>div>div>div>table>thead>tr>td,.bi-theme-dark .bi-table>div>div>table>tbody>tr>td,.bi-theme-dark .bi-table>div>div>table>thead>tr>td{border-top:1px solid #525466;border-left:1px solid #525466}.bi-grid-table-cell{box-sizing:border-box}.bi-grid-table-cell.first-row{border-top:1px solid #d4dadd}.bi-grid-table-cell.first-col{border-left:1px solid #d4dadd}.bi-theme-dark .bi-grid-table-cell.first-row{border-top:1px solid #525466}.bi-theme-dark .bi-grid-table-cell.first-col{border-left:1px solid #525466}.scrollbar-layout-main{box-sizing:border-box;outline:0;overflow:hidden;position:absolute;transition-duration:250ms;transition-timing-function:ease;user-select:none;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666);border-radius:5px}.bi-theme-dark .scrollbar-layout-main{background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc)}.scrollbar-layout-main-vertical{bottom:0;right:0;top:0;transition-property:background-color;width:10px}.scrollbar-layout-main-vertical.public-scrollbar-main-active,.scrollbar-layout-main-vertical:hover{width:10px}.scrollbar-layout-main-horizontal{bottom:0;height:10px;left:0;transition-property:background-color;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666)}.bi-theme-dark .scrollbar-layout-main-horizontal{background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc)}.scrollbar-layout-main-horizontal.public-scrollbar-main-active,.scrollbar-layout-main-horizontal:hover{height:10px}.scrollbar-layout-face{left:0;overflow:hidden;position:absolute;z-index:1}.scrollbar-layout-face:after{border-radius:6px;display:block;position:absolute;transition:background-color 250ms ease}.scrollbar-layout-face-horizontal{bottom:0;left:0;top:0}.scrollbar-layout-face-horizontal:after{bottom:2px;left:0;top:2px;width:100%}.scrollbar-layout-face-vertical{left:0;right:0;top:0}.scrollbar-layout-face-vertical:after{height:100%;left:2px;right:2px;top:0}.public-scrollbar-face:after{background-color:rgba(102,102,102,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d666666, endColorstr=#4d666666)}.bi-theme-dark .public-scrollbar-face:after{background-color:rgba(204,204,204,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dcccccc, endColorstr=#4dcccccc)}.public-scrollbar-face-active:after,.public-scrollbar-main-active .public-scrollbar-face:after,.public-scrollbar-main:hover .public-scrollbar-face:after{background-color:rgba(102,102,102,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3666666, endColorstr=#b3666666)}.bi-theme-dark .public-scrollbar-face-active:after,.bi-theme-dark .public-scrollbar-main-active .public-scrollbar-face:after,.bi-theme-dark .public-scrollbar-main:hover .public-scrollbar-face:after{background-color:rgba(204,204,204,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3cccccc, endColorstr=#b3cccccc)}.horizontal-scrollbar{bottom:0;position:absolute}.bi-resizable-table-cell .resizable-table-cell-resizer-container.dragging .resizable-table-cell-resizer-knob,.bi-resizable-table-cell .resizable-table-cell-resizer-container:hover .resizable-table-cell-resizer-knob{background-color:#3f8ce8}.bi-resizable-table-cell .resizable-table-cell-resizer-container.suitable .resizable-table-cell-resizer-knob{background-color:#58cc7d}.bi-resizable-table .resizable-table-resizer{cursor:ew-resize;z-index:1;background-color:#3f8ce8}.bi-resizable-table .resizable-table-resizer.suitable{background-color:#58cc7d}.bi-resizable-table .resizable-table-region-resizer.dragging .resizable-table-region-resizer-knob,.bi-resizable-table .resizable-table-region-resizer:hover .resizable-table-region-resizer-knob{background-color:#3f8ce8}.bi-branch-tree .bi-branch-tree-view{min-width:300px}.bi-filter-expander>table,.bi-filter-pane,.bi-multilayer-select-level-tree .tree-view,.bi-multilayer-single-level-tree .tree-view{min-width:100%}.bi-display-tree .ztree *{color:#999}.bi-display-tree .ztree li a,.bi-display-tree .ztree li span{cursor:default!important}.bi-display-tree .ztree li a.curSelectedNode{padding-top:1px;border:none;background-color:inherit;opacity:1;filter:alpha(opacity=100)}.ztree li a.tmpTargetNode_inner,ul.tmpTargetzTree,ul.ztree.zTreeDragUL{opacity:.8;filter:alpha(opacity=80)}.ztree *{padding:0;margin:0}.ztree{margin:0;padding:5px}.ztree li{padding:0;margin:0;list-style:none;line-height:14px;text-align:left;outline:0}.ztree li ul{margin:0;padding:0 0 0 18px}.ztree li a{padding:1px 3px 0 0;margin:0;cursor:pointer;height:24px;background-color:transparent;vertical-align:top;display:inline-block}.ztree li a.curSelectedNode_Edit{padding-top:0;background-color:#FFE6B0;color:#000;height:16px;border:1px solid #FFB951;opacity:.8}.ztree li a.tmpTargetNode_inner{padding-top:0;background-color:#316AC5;color:#fff;height:16px;border:1px solid #316AC5}.ztree li a input.rename{height:14px;width:80px;padding:0;margin:0;font-size:12px;border:1px solid #7EC4CC}.ztree li span.button,span.tmpzTreeMove_arrow{display:inline-block;border:0;background-color:transparent}.ztree li span{line-height:24px;margin-right:2px}.ztree li span.button{line-height:0;margin:0;width:16px;height:16px;vertical-align:middle;cursor:pointer;outline:0;background-repeat:no-repeat;background-attachment:scroll}.bi-popup-view .list-view-toolbar,.bi-year-popup .year-popup-navigation{line-height:30px}.ztree li span.button.chk{width:16px;height:16px;margin:0 3px 0 0;cursor:auto}.ztree li span.button.chk.checkbox_false_disable{background-position:0 -56px}.ztree li span.button.chk.checkbox_true_disable{background-position:-14px -56px}.ztree li span.button.chk.radio_false_full{background-position:-28px 0}.ztree li span.button.chk.radio_false_full_focus{background-position:-28px -14px}.ztree li span.button.chk.radio_false_part{background-position:-28px -28px}.ztree li span.button.chk.radio_false_part_focus{background-position:-28px -42px}.ztree li span.button.chk.radio_false_disable{background-position:-28px -56px}.ztree li span.button.chk.radio_true_full{background-position:-42px 0}.ztree li span.button.chk.radio_true_full_focus{background-position:-42px -14px}.ztree li span.button.chk.radio_true_part{background-position:-42px -28px}.ztree li span.button.chk.radio_true_part_focus{background-position:-42px -42px}.ztree li span.button.chk.radio_true_disable{background-position:-42px -56px}.ztree li span.button.switch{width:25px;height:25px}.ztree li span.button.noline_open{background-position:-92px -72px}.ztree li span.button.noline_close{background-position:-74px -72px}.ztree li span.button.noline_docu,.ztree li span.button.root_docu{background:0 0}.ztree li span.button.ico_open{margin-right:2px;background-position:-110px -16px;vertical-align:top}.ztree li span.button.ico_close{margin-right:2px;background-position:-110px 0;vertical-align:top}.ztree li span.button.ico_docu{margin-right:2px;background-position:-110px -32px;vertical-align:top}.ztree li span.button.edit{margin-right:2px;background-position:-110px -48px;vertical-align:top}.ztree li span.button.remove{margin-right:2px;background-position:-110px -64px;vertical-align:top}.ztree li span.button.ico_loading{width:0;margin-right:2px;vertical-align:top}ul.tmpTargetzTree{background-color:#FFE6B0}span.tmpzTreeMove_arrow{width:16px;height:16px;padding:0;margin:2px 0 0 1px;position:absolute;background-repeat:no-repeat;background-attachment:scroll;background-position:-110px -80px}.zTreeMask,ul.ztree.zTreeDragUL{background-color:#cfcfcf;position:absolute}ul.ztree.zTreeDragUL{margin:0;padding:0;width:auto;height:auto;overflow:hidden;border:1px dotted #00B83F}body,html{height:100%}.zTreeMask{z-index:10000;opacity:0;filter:alpha(opacity=0)}.bi-select-text-trigger,.bi-small-select-text-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-popup-view{position:fixed!important;overflow-y:visible!important;overflow-x:visible!important;overflow:visible!important;cursor:default}.bi-popup-view .list-view-outer{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-popup-view .list-view-toolbar>.center-element{border-left:1px solid #d4dadd}.bi-popup-view .list-view-toolbar>.first-element{border-left:none}.bi-theme-dark .bi-popup-view .list-view-toolbar>.center-element{border-left:1px solid #525466}.bi-theme-dark .bi-popup-view .list-view-toolbar>.first-element{border-left:none}.bi-arrangement .arrangement-helper{background:#3f8ce8;z-index:1000000000}.bi-arrangement .arrangement-block,.bi-arrangement .arrangement-drop-container{z-index:1000000000}.bi-arrangement .arrangement-drop-container .arrangement-drop-region{overflow:hidden}.bi-arrangement .arrangement-drop-container .bottom-center,.bi-arrangement .arrangement-drop-container .bottom-center-second,.bi-arrangement .arrangement-drop-container .bottom-left,.bi-arrangement .arrangement-drop-container .bottom-left-second,.bi-arrangement .arrangement-drop-container .bottom-right,.bi-arrangement .arrangement-drop-container .bottom-right-second,.bi-arrangement .arrangement-drop-container .drop-devider,.bi-arrangement .arrangement-drop-container .left-center,.bi-arrangement .arrangement-drop-container .left-center-second,.bi-arrangement .arrangement-drop-container .right-center,.bi-arrangement .arrangement-drop-container .right-center-second,.bi-arrangement .arrangement-drop-container .top-center,.bi-arrangement .arrangement-drop-container .top-center-second,.bi-arrangement .arrangement-drop-container .top-left,.bi-arrangement .arrangement-drop-container .top-left-second,.bi-arrangement .arrangement-drop-container .top-right,.bi-arrangement .arrangement-drop-container .top-right-second{z-index:1000000001;background:#3f8ce8}.bi-arrangement-droppable{z-index:100000}.bi-date-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-down-list-popup .bi-down-list-item .list-item-text,.bi-down-list-popup .list-group-item-text{max-width:203px}.bi-excel-table>div.bottom-right>div>div>table{border-right:1px solid #d4dadd}.bi-theme-dark .bi-excel-table>div.bottom-right>div>div>table{border-right:1px solid #525466}.bi-file-manager-nav-button .file-manager-nav-button-text{max-width:200px}.bi-file-manager-nav-button .file-manager-nav-button-text.active{background-color:#fafbfc;color:#999}.bi-file-manager-nav-button .file-manager-nav-button-triangle{z-index:1}.bi-theme-dark .bi-file-manager-nav-button .file-manager-nav-button-text.active{background-color:#191b2b;color:#999}.bi-filter-item .filter-item-empty-item .empty-filter-item-leaf{border:1px dashed #178cdf;background:#eaf2fd}.bi-filter-pane,.bi-month-trigger{-webkit-border-radius:2px;-moz-border-radius:2px}.bi-filter-expander{min-width:100%;border-right:0;border-bottom:0}.bi-filter-expander>.filter-item-empty-item{border-top:0;border-right:1px solid #d4dadd;border-bottom:1px solid #d4dadd}.bi-filter-expander>table>tbody>tr>td.first-element{width:20px;border-right:1px solid #d4dadd!important;border-bottom:1px solid #d4dadd!important}.bi-theme-dark .bi-filter-expander>.filter-item-empty-item{border-right:1px solid #525466;border-bottom:1px solid #525466}.bi-theme-dark .bi-filter-expander>table>tbody>tr>td.first-element{border-right:1px solid #525466!important;border-bottom:1px solid #525466!important}.bi-filter-operation .operation-trigger.hover,.bi-filter-operation .operation-trigger:hover{color:#58cc7d}.bi-filter-pane{border-radius:2px}.bi-interactive-arrangement .interactive-arrangement-dragtag-line{z-index:1000000000;background-color:#faaa39}.bi-interactive-arrangement .interactive-arrangement-dragtag-icon{z-index:1000000000}.bi-interval-slider{min-height:70px}.bi-interval-slider-label{min-height:50px}.bi-month-trigger{border-radius:2px}.bi-multidate-combo{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-multidate-popup .multidate-popup-label{color:#3685f2;font-size:14px}.bi-multidate-popup .multidate-popup-item.active,.bi-multidate-popup .multidate-popup-item:active{background-color:#3685f2;color:#fff;-webkit-border-radius:2px 2px 0 0;-moz-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0}.bi-multidate-popup .multidate-popup-button{color:#3685f2;font-size:14px}.bi-multidate-segment .bi-multidate-editor{font-size:14px}.bi-multi-select-combo .multi-select-trigger-icon-button,.bi-multi-select-insert-combo .multi-select-trigger-icon-button,.bi-multi-tree-combo .multi-select-trigger-icon-button{font-size:16px}.bi-multi-select-check-pane .multi-select-check-selected{text-decoration:underline}.bi-multi-select-trigger{-webkit-border-radius:2px 2px 2px 2px;-moz-border-radius:2px;border-radius:2px}.bi-number-editor,.bi-quarter-trigger{-webkit-border-radius:2px;-moz-border-radius:2px}.bi-multi-select-search-pane .multi-select-toolbar{color:#ff4949}.bi-multi-select-check-selected-button{z-index:1}.bi-multi-tree-check-pane .multi-tree-check-selected{color:#3685f2}.bi-number-interval .number-interval-big-combo .bi-icon-combo-trigger .icon-combo-trigger-icon,.bi-number-interval .number-interval-small-combo .bi-icon-combo-trigger .icon-combo-trigger-icon{font-size:14px}.bi-multi-tree-popup .popup-view-tree{min-height:170px}.bi-preview-table-cell,.bi-preview-table-header-cell{min-height:25px;min-width:80px}.bi-multi-tree-check-selected-button .trigger-check-selected{color:#3685f2;z-index:1}.bi-number-editor{border-radius:2px}.bi-number-interval .number-interval-small-editor{-moz-border-radius-topleft:2px;-webkit-border-top-left-radius:2px;-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;border-top-left-radius:2px;border-bottom-left-radius:2px}.bi-number-interval .number-interval-big-editor{-moz-border-radius-topright:2px;-webkit-border-top-right-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px}.bi-number-interval .number-interval-big-combo{-moz-border-radius-topleft:2px;-webkit-border-top-left-radius:2px;-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;border-top-left-radius:2px;border-bottom-left-radius:2px}.bi-number-interval .number-interval-small-combo{-moz-border-radius-topright:2px;-webkit-border-top-right-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px}.bi-relation-view-item .primary-key-region,.bi-relation-view-region .relation-view-region-container .relation-view-region-title .eye,.bi-single-select-combo .single-select-trigger-icon-button{font-size:16px}.bi-number-interval.number-error .bi-input{color:#ff4949!important}.bi-date-interval.time-error .bi-input,.bi-date-interval.time-error .sign-editor-text,.bi-time-interval.time-error .bi-date-time-trigger .bi-input,.bi-time-interval.time-error .bi-date-time-trigger .sign-editor-text,.bi-year-month-interval.time-error .bi-input,.bi-year-month-interval.time-error .sign-editor-text{color:#ff4949}.bi-page-table-cell{-moz-user-select:text;user-select:text}.bi-path-chooser .path-chooser-radio,.bi-path-region .path-region-label{z-index:1}.bi-preview-table{-webkit-user-select:text;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;-o-user-select:text;user-select:text}.bi-preview-table>div>div>div>table>thead>tr.odd,.bi-preview-table>div>table>thead>tr.odd{background-color:#fafbfc}.bi-theme-dark .bi-preview-table>div>div>div>table>thead>tr.odd,.bi-theme-dark .bi-preview-table>div>table>thead>tr.odd{background-color:#191B2B}.bi-quarter-trigger{border-radius:2px}.bi-relation-view-region .relation-view-region-container{z-index:1;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-relation-view-region .relation-view-region-container .split-line{border-bottom:1px solid #ccc}.bi-sequence-table-dynamic-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;box-sizing:border-box}.bi-sequence-table-dynamic-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-list-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-list-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-tree-number .sequence-table-title-cell{overflow:hidden;overflow-x:hidden;overflow-y:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-sequence-table-tree-number .sequence-table-number-cell{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.bi-single-slider-label{min-height:50px}.bi-single-slider-normal{min-height:30px}.bi-single-slider{min-height:50px}.bi-single-slider-button .slider-button{cursor:ew-resize;-webkit-box-shadow:0 0 10px rgba(0,0,0,.2);-moz-box-shadow:0 0 10px rgba(0,0,0,.2);box-shadow:0 0 10px rgba(0,0,0,.2);-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.bi-slider-track .gray-track{background-color:rgba(153,153,153,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d999999, endColorstr=#4d999999);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.bi-slider-track .blue-track{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.bi-time-interval .bi-date-time-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.bi-year-popup .year-popup-navigation>.center-element{border-left:1px solid #d4dadd}.bi-year-popup .year-popup-navigation>.first-element{border-left:none}.bi-theme-dark .bi-year-popup .year-popup-navigation>.center-element{border-left:1px solid #525466}.bi-theme-dark .bi-year-popup .year-popup-navigation>.first-element{border-left:none}.bi-year-trigger{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}*,button,html,input,select,textarea{font-family:"Microsoft YaHei","Hiragino Sans GB W3"}html{overflow:hidden}body{position:absolute;width:100%;margin:0;padding:0;top:0;left:0;background-repeat:repeat;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;color:#3d4d66;font:400 12px "Microsoft YaHei","Hiragino Sans GB W3";-webkit-font-smoothing:antialiased;text-decoration:none;-kthml-user-focus:normal;-moz-user-focus:normal;-moz-outline:0 none;outline:0}div::-webkit-scrollbar,textarea::-webkit-scrollbar{-webkit-appearance:none;background-color:rgba(102,102,102,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666, endColorstr=#0d666666);width:6px;height:6px}div::-webkit-scrollbar-thumb,textarea::-webkit-scrollbar-thumb{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-color:rgba(102,102,102,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d666666, endColorstr=#4d666666)}div::-webkit-scrollbar-thumb:hover,textarea::-webkit-scrollbar-thumb:hover{background-color:rgba(102,102,102,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3666666, endColorstr=#b3666666)}.bi-theme-dark div::-webkit-scrollbar,.bi-theme-dark textarea::-webkit-scrollbar{-webkit-appearance:none;background-color:rgba(204,204,204,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc, endColorstr=#0dcccccc);width:6px;height:6px}.bi-theme-dark div::-webkit-scrollbar-thumb,.bi-theme-dark textarea::-webkit-scrollbar-thumb{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-color:rgba(204,204,204,.3);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dcccccc, endColorstr=#4dcccccc)}.bi-theme-dark div::-webkit-scrollbar-thumb:hover,.bi-theme-dark textarea::-webkit-scrollbar-thumb:hover{background-color:rgba(204,204,204,.7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3cccccc, endColorstr=#b3cccccc)}.farbtastic .wheel{background:url(resources?path=/com/fr/web/ui/images/1x/background/wheel.png) center center no-repeat}.farbtastic .overlay{background:url(resources?path=/com/fr/web/ui/images/1x/background/mask.png) center center no-repeat}.farbtastic .marker{background:url(resources?path=/com/fr/web/ui/images/1x/background/marker.png) center center no-repeat}.bi-display-tree .ztree li span.button.switch.center_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_3.png) center center no-repeat}.bi-display-tree .ztree li span.button.switch.roots_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_2.png) center center no-repeat}.bi-display-tree .ztree li span.button.switch.bottom_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_4.png) center center no-repeat}.ztree li ul.line{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_1.png) repeat-y}.bi-theme-dark .ztree li ul.line{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_1.png) repeat-y}.ztree li span.button.chk.checkbox_false_full,.ztree li span.button.chk.checkbox_false_full_focus{background:url(resources?path=/com/fr/web/ui/images/1x/icon/check_box_normal.png) center center no-repeat}.ztree li span.button.chk.checkbox_false_part,.ztree li span.button.chk.checkbox_false_part_focus{background:url(resources?path=/com/fr/web/ui/images/1x/icon/half_selected.png) center center no-repeat}.ztree li span.button.chk.checkbox_true_full,.ztree li span.button.chk.checkbox_true_full_focus{background:url(resources?path=/com/fr/web/ui/images/1x/icon/check_box_active.png) center center no-repeat}.ztree li span.button.chk.checkbox_true_part,.ztree li span.button.chk.checkbox_true_part_focus{background:url(resources?path=/com/fr/web/ui/images/1x/icon/half_selected.png) center center no-repeat}.ztree li span.button.root_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_expand_1.png) center center no-repeat}.bi-theme-dark .ztree li span.button.root_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_expand_1.png) center center no-repeat}.ztree li span.button.root_close{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_collapse_1.png) center center no-repeat}.bi-theme-dark .ztree li span.button.root_close{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_collapse_1.png) center center no-repeat}.ztree li span.button.roots_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_expand_2.png) center center no-repeat}.bi-theme-dark .ztree li span.button.roots_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_expand_2.png) center center no-repeat}.ztree li span.button.roots_close{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_collapse_2.png) center center no-repeat}.bi-theme-dark .ztree li span.button.roots_close{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_collapse_2.png) center center no-repeat}.ztree li span.button.center_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_expand_3.png) center center no-repeat}.bi-theme-dark .ztree li span.button.center_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_expand_3.png) center center no-repeat}.ztree li span.button.center_close{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_collapse_3.png) center center no-repeat}.bi-theme-dark .ztree li span.button.center_close{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_collapse_3.png) center center no-repeat}.ztree li span.button.bottom_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_expand_4.png) center center no-repeat}.bi-theme-dark .ztree li span.button.bottom_open{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_expand_4.png) center center no-repeat}.ztree li span.button.bottom_close{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_collapse_4.png) center center no-repeat}.bi-theme-dark .ztree li span.button.bottom_close{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_collapse_4.png) center center no-repeat}.ztree li span.button.roots_docu{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_2.png) center center no-repeat}.bi-theme-dark .ztree li span.button.roots_docu{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_2.png) center center no-repeat}.ztree li span.button.center_docu{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_3.png) center center no-repeat}.bi-theme-dark .ztree li span.button.center_docu{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_3.png) center center no-repeat}.ztree li span.button.bottom_docu{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_4.png) center center no-repeat}.bi-theme-dark .ztree li span.button.bottom_docu{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_4.png) center center no-repeat}.ztree li span.button.ico_loading{background:url(resources?path=/com/fr/web/ui/images/1x/icon/loading.gif) center center no-repeat}.base-line-conn-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_1.png) repeat-y}.bi-theme-dark .base-line-conn-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_1.png) repeat-y}.first-line-conn-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_2.png) center center no-repeat}.bi-theme-dark .first-line-conn-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_2.png) center center no-repeat}.mid-line-conn-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_3.png) center center no-repeat}.bi-theme-dark .mid-line-conn-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_3.png) center center no-repeat}.last-line-conn-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_4.png) center center no-repeat}.bi-theme-dark .last-line-conn-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_4.png) center center no-repeat}.loading-background{background:url(resources?path=/com/fr/web/ui/images/1x/icon/loading.gif) center center no-repeat}.auto-color-background{background:url(resources?path=/com/fr/web/ui/images/1x/background/auto_color.png) center center no-repeat}.trans-color-background{background:url(resources?path=/com/fr/web/ui/images/1x/background/trans_color.png) center center no-repeat}@font-face{font-family:bi;src:url(resources?path=/com/fr/web/ui/font/iconfont.eot);src:url(resources?path=/com/fr/web/ui/font/iconfont.eot?#iefix) format('embedded-opentype'),url(resources?path=/com/fr/web/ui/font/iconfont.woff) format('woff'),url(resources?path=/com/fr/web/ui/font/iconfont.ttf) format('truetype'),url(resources?path=/com/fr/web/ui/font/iconfont.svg#svgFontName) format('svg')}.b-font{font-family:bi;font-style:normal;-webkit-font-smoothing:antialiased}.close-font .b-font:before,.close-font.disabled .b-font:before,.close-h-font .b-font:before,.close-h-font.disabled .b-font:before,.close-h-font.hover .b-font:before,.close-h-font:hover .b-font:before,.close-ha-font .b-font:before,.close-ha-font.hover .b-font:before,.close-ha-font:hover .b-font:before{content:"\e6d0";color:inherit}.close-ha-font.active .b-font:before,.close-ha-font:active .b-font:before{content:"\e6d0";color:#3f8ce8}.close-ha-font.disabled .b-font:before,.search-close-h-font .b-font:before{content:"\e6d0";color:inherit}.search-close-h-font.hover .b-font:before,.search-close-h-font:hover .b-font:before{content:"\e6d0";color:#ff4949}.search-close-h-font.disabled .b-font:before{content:"\e6d0";color:inherit}.pre-page-h-font .b-font:before,.pre-page-h-font.disabled .b-font:before,.pre-page-h-font.hover .b-font:before,.pre-page-h-font:hover .b-font:before{content:"\e70d";color:inherit}.next-page-h-font .b-font:before,.next-page-h-font.disabled .b-font:before,.next-page-h-font.hover .b-font:before,.next-page-h-font:hover .b-font:before{content:"\e70c";color:inherit}.search-font .b-font:before,.search-font.disabled .b-font:before{content:"\e6dc";color:inherit}.date-font .b-font:before,.date-font.disabled .b-font:before{content:"\e733";color:inherit}.date-change-h-font .b-font:before,.date-change-h-font.disabled .b-font:before,.date-change-h-font.hover .b-font:before,.date-change-h-font:hover .b-font:before{content:"\e72f";color:inherit}.dot-font .b-font:before,.dot-font.disabled .b-font:before,.dot-h-font .b-font:before{content:"\e762";color:#1a1a1a}.dot-h-font.hover .b-font:before,.dot-h-font:hover .b-font:before{content:"\e762";color:inherit}.dot-h-font.disabled .b-font:before{content:"\e762";color:#1a1a1a}.dot-ha-font .b-font:before{content:"\e762";color:#fff}.dot-ha-font.hover .b-font:before,.dot-ha-font:hover .b-font:before{content:"\e762";color:#999}.dot-ha-font.active .b-font:before,.dot-ha-font:active .b-font:before{content:"\e762";color:#1a1a1a}.dot-e-font .b-font:before,.dot-ha-font.disabled .b-font:before{content:"\e762";color:#fff}.dot-e-font.hover .b-font:before,.dot-e-font:hover .b-font:before{content:"\e762";color:#999}.dot-e-font:active .b-font:before{content:"\e762";color:#3685f2}.dot-e-font.active .b-font:before{content:"\e762";color:#1a1a1a}.dot-e-font.disabled .b-font:before{content:"\e762";color:#fff}.pull-right-font .b-font:before,.pull-right-font.disabled .b-font:before,.pull-right-h-font .b-font:before,.pull-right-h-font.disabled .b-font:before,.pull-right-h-font.hover .b-font:before,.pull-right-h-font:hover .b-font:before,.pull-right-ha-font .b-font:before,.pull-right-ha-font.hover .b-font:before,.pull-right-ha-font:hover .b-font:before{content:"\e70c";color:inherit}.pull-right-ha-font.active .b-font:before,.pull-right-ha-font:active .b-font:before{content:"\e70c";color:#3f8ce8}.pull-right-e-font .b-font:before,.pull-right-e-font.hover .b-font:before,.pull-right-e-font:hover .b-font:before,.pull-right-ha-font.disabled .b-font:before{content:"\e70c";color:inherit}.pull-right-e-font.active .b-font:before,.pull-right-e-font:active .b-font:before{content:"\e70c";color:#3f8ce8}.pull-right-e-font.disabled .b-font:before{content:"\e70c";color:inherit}.copy-font .b-font:before,.copy-font.disabled .b-font:before{content:"\e6bd";color:inherit}.copy-h-font .b-font:before{content:"\e6bd";color:#1a1a1a}.copy-h-font.hover .b-font:before,.copy-h-font:hover .b-font:before{content:"\e6bd";color:inherit}.copy-h-font.disabled .b-font:before{content:"\e6bd";color:#1a1a1a}.copy-ha-font .b-font:before,.copy-ha-font.hover .b-font:before,.copy-ha-font:hover .b-font:before{content:"\e6bd";color:inherit}.copy-ha-font.active .b-font:before,.copy-ha-font:active .b-font:before{content:"\e6bd";color:#3f8ce8}.copy-e-font .b-font:before,.copy-e-font.hover .b-font:before,.copy-e-font:hover .b-font:before,.copy-ha-font.disabled .b-font:before{content:"\e6bd";color:inherit}.copy-e-font.active .b-font:before,.copy-e-font:active .b-font:before{content:"\e6bd";color:#3f8ce8}.copy-e-font.disabled .b-font:before{content:"\e6bd";color:inherit}.check-mark-font .b-font:before,.check-mark-font.disabled .b-font:before,.check-mark-h-font .b-font:before,.check-mark-h-font.disabled .b-font:before,.check-mark-h-font.hover .b-font:before,.check-mark-h-font:hover .b-font:before,.check-mark-ha-font .b-font:before,.check-mark-ha-font.hover .b-font:before,.check-mark-ha-font:hover .b-font:before{content:"\e6cf";color:inherit}.check-mark-ha-font.active .b-font:before,.check-mark-ha-font:active .b-font:before{content:"\e6cf";color:#3f8ce8}.check-mark-e-font .b-font:before,.check-mark-e-font.hover .b-font:before,.check-mark-e-font:hover .b-font:before,.check-mark-ha-font.disabled .b-font:before{content:"\e6cf";color:inherit}.check-mark-e-font.active .b-font:before,.check-mark-e-font:active .b-font:before{content:"\e6cf";color:#3f8ce8}.check-mark-e-font.disabled .b-font:before{content:"\e6cf";color:inherit}.row-pre-page-h-font .b-font:before,.row-pre-page-h-font.disabled .b-font:before,.row-pre-page-h-font.hover .b-font:before,.row-pre-page-h-font:hover .b-font:before{content:"\e6d9";color:inherit}.row-next-page-h-font .b-font:before,.row-next-page-h-font.disabled .b-font:before,.row-next-page-h-font.hover .b-font:before,.row-next-page-h-font:hover .b-font:before{content:"\e6d8";color:inherit}.column-pre-page-h-font .b-font:before,.column-pre-page-h-font.disabled .b-font:before,.column-pre-page-h-font.hover .b-font:before,.column-pre-page-h-font:hover .b-font:before{content:"\e6d6";color:inherit}.column-next-page-h-font .b-font:before,.column-next-page-h-font.disabled .b-font:before,.column-next-page-h-font.hover .b-font:before,.column-next-page-h-font:hover .b-font:before{content:"\e6d7";color:inherit}.trigger-triangle-font .b-font:before,.trigger-triangle-font.hover .b-font:before,.trigger-triangle-font:hover .b-font:before{content:"\e6f0";color:#999}.trigger-triangle-font.active .b-font:before,.trigger-triangle-font:active .b-font:before{content:"\e6f0";color:#3685f2}.trigger-triangle-font.disabled .b-font:before{content:"\e6f0";color:#999}.pull-down-font .b-font:before,.pull-down-font.disabled .b-font:before,.pull-down-h-font .b-font:before,.pull-down-h-font.disabled .b-font:before,.pull-down-h-font.hover .b-font:before,.pull-down-h-font:hover .b-font:before,.pull-down-ha-font .b-font:before,.pull-down-ha-font.hover .b-font:before,.pull-down-ha-font:hover .b-font:before{content:"\e70b";color:inherit}.pull-down-ha-font.active .b-font:before,.pull-down-ha-font:active .b-font:before{content:"\e70b";color:#3f8ce8}.pull-down-ha-font.disabled .b-font:before{content:"\e70b";color:inherit}.check-font .b-font:before,.check-font.disabled .b-font:before{content:"\e6cf";color:#3685f2}.item-check-font .b-font:before{content:"\e6cf";color:#fff}.item-check-font.hover .b-font:before,.item-check-font:hover .b-font:before{content:"\e6cf";color:#999}.item-check-font.active .b-font:before,.item-check-font:active .b-font:before{content:"\e6cf";color:#3f8ce8}.item-check-font.disabled .b-font:before{content:"\e6cf";color:#fff}.primary-key-font .b-font:before,.primary-key-font.disabled .b-font:before,.primary-key-font.hover .b-font:before,.primary-key-font:hover .b-font:before{content:"\e740";color:inherit}.drag-tag-font .b-font:before,.drag-tag-font.disabled .b-font:before{content:"\e6d0";color:#faaa39}.less-font .b-font:before,.less-font.hover .b-font:before,.less-font:hover .b-font:before{content:"\e75f";color:inherit}.less-font.active .b-font:before,.less-font:active .b-font:before{content:"\e75f";color:#3f8ce8}.less-font.disabled .b-font:before{content:"\e75f";color:inherit}.less-equal-font .b-font:before,.less-equal-font.hover .b-font:before,.less-equal-font:hover .b-font:before{content:"\e760";color:inherit}.less-equal-font.active .b-font:before,.less-equal-font:active .b-font:before{content:"\e760";color:#3f8ce8}.less-equal-font.disabled .b-font:before{content:"\e760";color:inherit}.text-bold-font .b-font:before,.text-bold-font.disabled .b-font:before{content:"\e75b";color:inherit}.text-italic-font .b-font:before,.text-italic-font.disabled .b-font:before{content:"\e75c";color:inherit}.text-underline-font .b-font:before,.text-underline-font.disabled .b-font:before{content:"\e75d";color:inherit}.text-color-font .b-font:before,.text-color-font.disabled .b-font:before{content:"\e75a";color:inherit}.text-background-font .b-font:before,.text-background-font.disabled .b-font:before{content:"\e758";color:inherit}.text-color-underline-font .b-font:before,.text-color-underline-font.disabled .b-font:before{content:"\e75d";color:inherit}.text-align-left-font .b-font:before,.text-align-left-font.disabled .b-font:before{content:"\e6ca";color:inherit}.text-align-center-font .b-font:before,.text-align-center-font.disabled .b-font:before{content:"\e6bf";color:inherit}.text-align-right-font .b-font:before,.text-align-right-font.disabled .b-font:before{content:"\e6c8";color:inherit}.toast-error-font .b-font:before,.toast-error-font.disabled .b-font:before{content:"\e757";color:inherit}.toast-success-font .b-font:before,.toast-success-font.disabled .b-font:before{content:"\e756";color:inherit}.toast-warning-font .b-font:before,.toast-warning-font.disabled .b-font:before{content:"\e755";color:inherit}.toast-message-font .b-font:before,.toast-message-font.disabled .b-font:before{content:"\e74b";color:inherit}.tree-collapse-icon-type1 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_collapse_1.png) center center no-repeat;background-size:contain}.tree-collapse-icon-type1 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_collapse_1.png) center center no-repeat}.tree-collapse-icon-type2 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_collapse_2.png) center center no-repeat;background-size:contain}.tree-collapse-icon-type2 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_collapse_2.png) center center no-repeat}.tree-collapse-icon-type3 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_collapse_3.png) center center no-repeat;background-size:contain}.tree-collapse-icon-type3 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_collapse_3.png) center center no-repeat}.tree-collapse-icon-type4 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_collapse_4.png) center center no-repeat;background-size:contain}.tree-collapse-icon-type4 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_collapse_4.png) center center no-repeat}.tree-expand-icon-type1 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_expand_1.png) center center no-repeat;background-size:contain}.tree-expand-icon-type1 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_expand_1.png) center center no-repeat}.tree-expand-icon-type2 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_expand_2.png) center center no-repeat;background-size:contain}.tree-expand-icon-type2 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_expand_2.png) center center no-repeat}.tree-expand-icon-type3 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_expand_3.png) center center no-repeat;background-size:contain}.tree-expand-icon-type3 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_expand_3.png) center center no-repeat}.tree-expand-icon-type4 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_expand_4.png) center center no-repeat;background-size:contain}.tree-expand-icon-type4 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_expand_4.png) center center no-repeat}.tree-vertical-line-type2 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_vertical_line_2.png) center center no-repeat;background-size:contain}.tree-vertical-line-type2 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_2.png) center center no-repeat}.tree-vertical-line-type3 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_vertical_line_3.png) center center no-repeat;background-size:contain}.tree-vertical-line-type3 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_3.png) center center no-repeat}.tree-vertical-line-type4 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/tree_vertical_line_4.png) center center no-repeat;background-size:contain}.tree-vertical-line-type4 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_4.png) center center no-repeat}.bi-theme-dark .tree-collapse-icon-type1 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_collapse_1.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type1 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_collapse_1.png) center center no-repeat}.bi-theme-dark .tree-collapse-icon-type2 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_collapse_2.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type2 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_collapse_2.png) center center no-repeat}.bi-theme-dark .tree-collapse-icon-type3 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_collapse_3.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type3 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_collapse_3.png) center center no-repeat}.bi-theme-dark .tree-collapse-icon-type4 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_collapse_4.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-collapse-icon-type4 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_collapse_4.png) center center no-repeat}.bi-theme-dark .tree-expand-icon-type1 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_expand_1.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type1 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_expand_1.png) center center no-repeat}.bi-theme-dark .tree-expand-icon-type2 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_expand_2.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type2 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_expand_2.png) center center no-repeat}.bi-theme-dark .tree-expand-icon-type3 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_expand_3.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type3 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_expand_3.png) center center no-repeat}.bi-theme-dark .tree-expand-icon-type4 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_expand_4.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-expand-icon-type4 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_expand_4.png) center center no-repeat}.bi-theme-dark .tree-vertical-line-type2 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_vertical_line_2.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type2 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_2.png) center center no-repeat}.bi-theme-dark .tree-vertical-line-type3 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_vertical_line_3.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type3 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_3.png) center center no-repeat}.bi-theme-dark .tree-vertical-line-type4 .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/dark/tree_vertical_line_4.png) center center no-repeat;background-size:contain}.bi-theme-dark .tree-vertical-line-type4 .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_4.png) center center no-repeat}.check-box-icon .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/check_box_normal.png) center center no-repeat;background-size:contain}.check-box-icon .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/check_box_normal.png) center center no-repeat}.check-box-icon.hover .x-icon,.check-box-icon:hover .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/check_box_normal.png) center center no-repeat;background-size:contain}.check-box-icon.hover .x-icon.hack,.check-box-icon:hover .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/check_box_normal.png) center center no-repeat}.check-box-icon:active .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/check_box_normal.png) center center no-repeat;background-size:contain}.check-box-icon:active .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/check_box_normal.png) center center no-repeat}.check-box-icon.active .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/check_box_active.png) center center no-repeat;background-size:contain}.check-box-icon.active .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/check_box_active.png) center center no-repeat}.check-box-icon.disabled .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/check_box_disable.png) center center no-repeat;background-size:contain}.check-box-icon.disabled .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/check_box_disable.png) center center no-repeat}.check-box-icon.disabled.active .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/check_box_disable2.png) center center no-repeat;background-size:contain}.check-box-icon.disabled.active .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/check_box_disable2.png) center center no-repeat}.radio-icon .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/radio_normal.png) center center no-repeat;background-size:contain}.radio-icon .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/radio_normal.png) center center no-repeat}.radio-icon.hover .x-icon,.radio-icon:hover .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/radio_normal.png) center center no-repeat;background-size:contain}.radio-icon.hover .x-icon.hack,.radio-icon:hover .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/radio_normal.png) center center no-repeat}.radio-icon:active .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/radio_normal.png) center center no-repeat;background-size:contain}.radio-icon:active .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/radio_normal.png) center center no-repeat}.radio-icon.active .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/radio_active.png) center center no-repeat;background-size:contain}.radio-icon.active .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/radio_active.png) center center no-repeat}.radio-icon.disabled .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/radio_disable.png) center center no-repeat;background-size:contain}.radio-icon.disabled .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/radio_disable.png) center center no-repeat}.radio-icon.disabled.active .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/radio_disable2.png) center center no-repeat;background-size:contain}.radio-icon.disabled.active .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/radio_disable2.png) center center no-repeat}.check-half-select-icon .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/half_selected.png) center center no-repeat;background-size:contain}.check-half-select-icon .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/half_selected.png) center center no-repeat}.slider-icon .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/slider_normal_small.png) center center no-repeat;background-size:contain}.slider-icon .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/slider_normal_small.png) center center no-repeat}.slider-icon.hover .x-icon,.slider-icon:hover .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/slider_active_small.png) center center no-repeat;background-size:contain}.slider-icon.hover .x-icon.hack,.slider-icon:hover .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/slider_active_small.png) center center no-repeat}.slider-icon.disabled .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/slider_normal_small.png) center center no-repeat;background-size:contain}.slider-icon.disabled .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/slider_normal_small.png) center center no-repeat}.auto-color-icon .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/auto_normal.png) center center no-repeat;background-size:contain}.auto-color-icon .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/auto_normal.png) center center no-repeat}.auto-color-icon.active .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/auto_select.png) center center no-repeat;background-size:contain}.auto-color-icon.active .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/auto_select.png) center center no-repeat}.auto-color-icon.disabled .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/auto_disable.png) center center no-repeat;background-size:contain}.auto-color-icon.disabled .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/auto_disable.png) center center no-repeat}.trans-color-icon .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/trans_normal.png) center center no-repeat;background-size:contain}.trans-color-icon .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/trans_normal.png) center center no-repeat}.trans-color-icon.active .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/trans_select.png) center center no-repeat;background-size:contain}.trans-color-icon.active .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/trans_select.png) center center no-repeat}.trans-color-icon.disabled .x-icon{display:block;background:url(resources?path=/com/fr/web/ui/images/2x/icon/trans_disable.png) center center no-repeat;background-size:contain}.trans-color-icon.disabled .x-icon.hack{background:url(resources?path=/com/fr/web/ui/images/1x/icon/trans_disable.png) center center no-repeat} \ No newline at end of file diff --git a/dist/fineui.min.js b/dist/fineui.min.js index 74e91f9b1..be87845b9 100644 --- a/dist/fineui.min.js +++ b/dist/fineui.min.js @@ -40,16 +40,17 @@ BI.shortcut("bi.handstand_branch_expander",BI.HandStandBranchExpander),BI.Branch a.fireEvent(BI.YearPopup.EVENT_CHANGE,a.selectedYear)}),BI.isKey(b.value)&&this.setValue(b.value)},getValue:function(){return this.selectedYear},setValue:function(a){var b=this.options;BI.checkDateVoid(a,1,1,b.min,b.max)[0]?(a=BI.getDate().getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue("")):(this.selectedYear=a,this.navigation.setSelect(BI.YearCalendar.getPageByYear(a)),this.navigation.setValue(a))}}),BI.YearPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_popup",BI.YearPopup),BI.DateTriangleTrigger=BI.inherit(BI.Trigger,{_const:{height:25,iconWidth:16,iconHeight:13},_defaultConfig:function(){return BI.extend(BI.DateTriangleTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-triangle-trigger pull-down-ha-font cursor-pointer",height:25})},_init:function(){BI.DateTriangleTrigger.superclass._init.apply(this,arguments);var a=this.options,b=this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"right",text:a.text,value:a.value,height:b.height}),this.icon=BI.createWidget({type:"bi.icon",width:b.iconWidth,height:b.iconHeight}),BI.createWidget({type:"bi.center_adapt",element:this,items:[{type:"bi.center_adapt",width:50,height:b.height,items:[this.text,this.icon]}]})},setValue:function(a){this.text.setValue(a)},getValue:function(){return this.text.getValue()},setText:function(a){this.text.setText(a)},getText:function(){return this.item.getText()},getKey:function(){}}),BI.shortcut("bi.date_triangle_trigger",BI.DateTriangleTrigger),BI.DateCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DateCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-combo bi-border",height:25})},_init:function(){BI.DateCombo.superclass._init.apply(this,arguments);var a=this;this.options;this.trigger=BI.createWidget({type:"bi.date_trigger"}),this.trigger.on(BI.DateTrigger.EVENT_TRIGGER_CLICK,function(){a.combo.toggle()}),this.popup=BI.createWidget({type:"bi.date_calendar_popup"}),this.popup.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue())}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,element:this,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{width:270,el:this.popup,stopPropagation:!1}})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.shortcut("bi.date_combo",BI.DateCombo),BI.DateTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,yearLength:4,yearMonthLength:7},_defaultConfig:function(){return BI.extend(BI.DateTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-date-trigger",min:"1900-01-01",max:"2099-12-31",height:24})},_init:function(){BI.DateTrigger.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(b){var c=b.match(/\d+/g);return a._autoAppend(b,c),a._dateCheck(b)&&BI.checkDateLegal(b)&&a._checkVoid({year:c[0],month:c[1],day:c[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){return a.editor.isEditing()?BI.i18nText("BI-Date_Trigger_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")}}),this.editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){a.fireEvent(BI.DateTrigger.EVENT_KEY_DOWN)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.DateTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DateTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_VALID,function(){a.fireEvent(BI.DateTrigger.EVENT_VALID)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DateTrigger.EVENT_ERROR)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();if(BI.isNotNull(b)&&a.editor.setState(b),BI.isNotEmptyString(b)){var c=b.split("-");a.store_value={type:BI.DateTrigger.MULTI_DATE_CALENDAR,value:{year:0|c[0],month:c[1]-1,day:0|c[2]}}}a.fireEvent(BI.DateTrigger.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.DateTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.DateTrigger.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:BI.createWidget(),width:30},{el:this.editor}]}),this.setValue(b.value)},_dateCheck:function(a){return BI.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")==a||BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")==a||BI.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")==a||BI.parseDateTime(a,"%Y-%X-%e").print("%Y-%X-%e")==a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.options.min,this.options.max)[0]},_autoAppend:function(a,b){var c=this,d=BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d"),e=function(a){return BI.parseDateTime(a,"%Y").print("%Y")==a&&d>=c.options.min&&d<=c.options.max},f=function(a){return BI.parseDateTime(a,"%Y-%X").print("%Y-%X")==a&&d>=c.options.min&&d<=c.options.max};if(BI.isNotNull(b)&&BI.checkDateLegal(a))switch(a.length){case this._const.yearLength:e(a)&&this.editor.setValue(a+"-");break;case this._const.yearMonthLength:f(a)&&this.editor.setValue(a+"-")}},setValue:function(a){var b,c,d=this,e=BI.getDate();this.store_value=a,BI.isNotNull(a)&&(b=a.type||BI.DateTrigger.MULTI_DATE_CALENDAR,c=a.value,BI.isNull(c)&&(c=a));var f=function(a,b){var c=a.print("%Y-%x-%e");d.editor.setState(c),d.editor.setValue(c),d.setTitle(b+":"+c)};switch(b){case BI.DateTrigger.MULTI_DATE_YEAR_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_PREV];e=BI.getDate(e.getFullYear()-1*c,e.getMonth(),e.getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_AFTER];e=BI.getDate(e.getFullYear()+1*c,e.getMonth(),e.getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_BEGIN];e=BI.getDate(e.getFullYear(),0,1),f(e,g);break;case BI.DateTrigger.MULTI_DATE_YEAR_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_END];e=BI.getDate(e.getFullYear(),11,31),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_PREV];e=BI.getDate().getBeforeMulQuarter(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_AFTER];e=BI.getDate().getAfterMulQuarter(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN];e=BI.getDate().getQuarterStartDate(),f(e,g);break;case BI.DateTrigger.MULTI_DATE_QUARTER_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_END];e=BI.getDate().getQuarterEndDate(),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_PREV];e=BI.getDate().getBeforeMultiMonth(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_AFTER];e=BI.getDate().getAfterMultiMonth(c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_BEGIN:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_BEGIN];e=BI.getDate(e.getFullYear(),e.getMonth(),1),f(e,g);break;case BI.DateTrigger.MULTI_DATE_MONTH_END:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_END];e=BI.getDate(e.getFullYear(),e.getMonth(),e.getLastDateOfMonth().getDate()),f(e,g);break;case BI.DateTrigger.MULTI_DATE_WEEK_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_PREV];e=e.getOffsetDate(-7*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_WEEK_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_AFTER];e=e.getOffsetDate(7*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_PREV:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_PREV];e=e.getOffsetDate(-1*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_AFTER:var g=c+BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_AFTER];e=e.getOffsetDate(1*c),f(e,g);break;case BI.DateTrigger.MULTI_DATE_DAY_TODAY:var g=BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_TODAY];e=BI.getDate(),f(e,g);break;default:if(BI.isNull(c)||BI.isNull(c.day))this.editor.setState(""),this.editor.setValue(""),this.setTitle("");else{var h=c.year+"-"+(c.month+1)+"-"+c.day;this.editor.setState(h),this.editor.setValue(h),this.setTitle(h)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.store_value}}),BI.DateTrigger.MULTI_DATE_YEAR_PREV=1,BI.DateTrigger.MULTI_DATE_YEAR_AFTER=2,BI.DateTrigger.MULTI_DATE_YEAR_BEGIN=3,BI.DateTrigger.MULTI_DATE_YEAR_END=4,BI.DateTrigger.MULTI_DATE_MONTH_PREV=5,BI.DateTrigger.MULTI_DATE_MONTH_AFTER=6,BI.DateTrigger.MULTI_DATE_MONTH_BEGIN=7,BI.DateTrigger.MULTI_DATE_MONTH_END=8,BI.DateTrigger.MULTI_DATE_QUARTER_PREV=9,BI.DateTrigger.MULTI_DATE_QUARTER_AFTER=10,BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN=11,BI.DateTrigger.MULTI_DATE_QUARTER_END=12,BI.DateTrigger.MULTI_DATE_WEEK_PREV=13,BI.DateTrigger.MULTI_DATE_WEEK_AFTER=14,BI.DateTrigger.MULTI_DATE_DAY_PREV=15,BI.DateTrigger.MULTI_DATE_DAY_AFTER=16,BI.DateTrigger.MULTI_DATE_DAY_TODAY=17,BI.DateTrigger.MULTI_DATE_PARAM=18,BI.DateTrigger.MULTI_DATE_CALENDAR=19,BI.DateTrigger.MULTI_DATE_SEGMENT_NUM={},BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_PREV]=BI.i18nText("BI-Multi_Date_Year_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_AFTER]=BI.i18nText("BI-Multi_Date_Year_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_BEGIN]=BI.i18nText("BI-Multi_Date_Year_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_YEAR_END]=BI.i18nText("BI-Multi_Date_Year_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_PREV]=BI.i18nText("BI-Multi_Date_Quarter_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_AFTER]=BI.i18nText("BI-Multi_Date_Quarter_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_BEGIN]=BI.i18nText("BI-Multi_Date_Quarter_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_QUARTER_END]=BI.i18nText("BI-Multi_Date_Quarter_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_PREV]=BI.i18nText("BI-Multi_Date_Month_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_AFTER]=BI.i18nText("BI-Multi_Date_Month_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_BEGIN]=BI.i18nText("BI-Multi_Date_Month_Begin"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_MONTH_END]=BI.i18nText("BI-Multi_Date_Month_End"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_PREV]=BI.i18nText("BI-Multi_Date_Week_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_WEEK_AFTER]=BI.i18nText("BI-Multi_Date_Week_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_PREV]=BI.i18nText("BI-Multi_Date_Day_Prev"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_AFTER]=BI.i18nText("BI-Multi_Date_Day_Next"),BI.DateTrigger.MULTI_DATE_SEGMENT_NUM[BI.DateTrigger.MULTI_DATE_DAY_TODAY]=BI.i18nText("BI-Multi_Date_Today"),BI.DateTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DateTrigger.EVENT_START="EVENT_START",BI.DateTrigger.EVENT_STOP="EVENT_STOP",BI.DateTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DateTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.DateTrigger.EVENT_VALID="EVENT_VALID",BI.DateTrigger.EVENT_ERROR="EVENT_ERROR",BI.DateTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.DateTrigger.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.shortcut("bi.date_trigger",BI.DateTrigger),BI.StaticDatePaneCard=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.StaticDatePaneCard.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-date-pane",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_init:function(){BI.StaticDatePaneCard.superclass._init.apply(this,arguments);var a=this,b=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth(),this.selectedTime=b.selectedTime||{year:this._year,month:this._month},this.datePicker=BI.createWidget({type:"bi.date_picker",min:b.min,max:b.max}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){a.selectedTime=a.datePicker.getValue(),a.calendar.setSelect(BI.Calendar.getPageByDateJSON(a.selectedTime))}),this.calendar=BI.createWidget({direction:"top",element:this,logic:{dynamic:!1},type:"bi.navigation",tab:this.datePicker,cardCreator:BI.bind(this._createNav,this)}),this.calendar.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedTime=a.calendar.getValue(),a.calendar.empty(),a.setValue(a.selectedTime),a.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)}),this.setValue(b.selectedTime)},_createNav:function(a){var b=BI.Calendar.getDateJSONByPage(a),c=BI.createWidget({type:"bi.calendar",logic:{dynamic:!1},min:this.options.min,max:this.options.max,year:b.year,month:b.month,day:this.selectedTime.day});return c},_getNewCurrentDate:function(){var a=BI.getDate();return{year:a.getFullYear(),month:a.getMonth()}},_setCalenderValue:function(a){this.calendar.setSelect(BI.Calendar.getPageByDateJSON(a)),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.static_date_pane_card",BI.StaticDatePaneCard),BI.DynamicDatePane=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-pane"},render:function(){var a=this;return{type:"bi.vtape",items:[{el:{type:"bi.linear_segment",cls:"bi-border-bottom",height:30,items:BI.createItems([{text:BI.i18nText("BI-Multi_Date_YMD"),value:BI.DynamicDatePane.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicDatePane.Dynamic}],{textAlign:"center"}),listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(){var b=this.getValue()[0];switch(a.dateTab.setSelect(b),b){case BI.DynamicDatePane.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth(),day:c.getDate()});break;case BI.DynamicDatePane.Dynamic:a.dynamicPane.setValue({year:0})}}}],ref:function(){a["switch"]=this}},height:30},{type:"bi.tab",ref:function(){a.dateTab=this},showIndex:BI.DynamicDatePane.Static,cardCreator:function(b){switch(b){case BI.DynamicDatePane.Static:return{type:"bi.static_date_pane_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.ymd=this}};case BI.DynamicDatePane.Dynamic:default:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}],ref:function(){a.dynamicPane=this}}}}}]}},mounted:function(){this.setValue(this.options.value)},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},setValue:function(a){a=a||{};var b=a.type||BI.DynamicDateCombo.Static,c=a.value||a;switch(this["switch"].setValue(b),this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c);break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var d=BI.getDate();this.ymd.setValue({year:d.getFullYear(),month:d.getMonth()})}else this.ymd.setValue(c)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.shortcut("bi.dynamic_date_pane",BI.DynamicDatePane),BI.extend(BI.DynamicDatePane,{Static:1,Dynamic:2}),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,c=BI.getDate();this.storeValue=BI.isNotNull(b.value)?b.value:{year:c.getFullYear(),month:c.getMonth(),day:c.getDate(),hour:c.getHours(),minute:c.getMinutes(),second:c.getSeconds()},this.trigger=BI.createWidget({type:"bi.date_time_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,value:b.value}),this.popup=BI.createWidget({type:"bi.date_time_popup",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,value:b.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,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 d=BI.createWidget({type:"bi.icon_button",cls:"bi-trigger-icon-button date-font bi-border-right",width:24,height:24});d.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:d,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:374})},_init:function(){BI.DateTimePopup.superclass._init.apply(this,arguments);var a=this,b=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}),a.dateCombo.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}),this.dateSelect=BI.createWidget({type:"bi.vertical_adapt",cls:"bi-border-top",items:[{type:"bi.label",text:BI.i18nText("BI-Basic_Time"),width:45},{type:"bi.date_time_select",max:23,min:0,width:60,height:30,listeners:[{eventName:BI.DateTimeSelect.EVENT_CONFIRM,action:function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}}],ref:function(b){a.hour=b}},{type:"bi.label",text:":",width:15},{type:"bi.date_time_select",max:59,min:0,width:60,height:30,listeners:[{eventName:BI.DateTimeSelect.EVENT_CONFIRM,action:function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}}],ref:function(b){a.minute=b}},{type:"bi.label",text:":",width:15},{type:"bi.date_time_select",max:59,min:0,width:60,height:30,listeners:[{eventName:BI.DateTimeSelect.EVENT_CONFIRM,action:function(){a.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}}],ref:function(b){a.second=b}}]}),this.setValue(b.value),this.dateButton=BI.createWidget({type:"bi.grid",items:[[this.cancelButton,this.okButton]]}),BI.createWidget({element:this,type:"bi.vtape",items:[{el:this.dateCombo},{el:this.dateSelect,height:50},{el:this.dateButton,height:30}]})},setValue:function(a){var b,c=a;BI.isNull(c)?(b=BI.getDate(),this.dateCombo.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),this.hour.setValue(b.getHours()),this.minute.setValue(b.getMinutes()),this.second.setValue(b.getSeconds())):(this.dateCombo.setValue({year:c.year,month:c.month,day:c.day}),this.hour.setValue(c.hour),this.minute.setValue(c.minute),this.second.setValue(c.second))},getValue:function(){return{year:this.dateCombo.getValue().year,month:this.dateCombo.getValue().month,day:this.dateCombo.getValue().day,hour:this.hour.getValue(),minute:this.minute.getValue(),second:this.second.getValue()}}}),BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE="BUTTON_CANCEL_EVENT_CHANGE",BI.DateTimePopup.CALENDAR_EVENT_CHANGE="CALENDAR_EVENT_CHANGE",BI.shortcut("bi.date_time_popup",BI.DateTimePopup),BI.DateTimeSelect=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DateTimeSelect.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-select bi-border",max:23,min:0})},_init:function(){BI.DateTimeSelect.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",value:this._alertInEditorValue(b.min),allowBlank:!1,errorText:BI.i18nText("BI-Please_Input_Natural_Number"),validationChecker:function(a){return BI.isNaturalNumber(a)}}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){a._finetuning(0),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",cls:"column-pre-page-h-font top-button bi-border-left bi-border-bottom"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(1),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",cls:"column-next-page-h-font bottom-button bi-border-left"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-1),a.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM)}),this._finetuning(0),BI.createWidget({type:"bi.htape",element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:30}]})},_alertOutEditorValue:function(a){return a>this.options.max&&(a=this.options.min),athis.options.max&&(a=this.options.min),a1},_needSpliter:function(a,b){return a0?1:0}},setValue:function(a){a=a||{};var b=[],c=[];BI.isNotNull(a.year)&&(b.push(BI.DynamicDateCard.TYPE.YEAR),c.push(this._createValue(BI.DynamicDateCard.TYPE.YEAR,a.year))),BI.isNotNull(a.quarter)&&(b.push(BI.DynamicDateCard.TYPE.QUARTER),c.push(this._createValue(BI.DynamicDateCard.TYPE.QUARTER,a.quarter))),BI.isNotNull(a.month)&&(b.push(BI.DynamicDateCard.TYPE.MONTH),c.push(this._createValue(BI.DynamicDateCard.TYPE.MONTH,a.month))),BI.isNotNull(a.week)&&(b.push(BI.DynamicDateCard.TYPE.WEEK),c.push(this._createValue(BI.DynamicDateCard.TYPE.WEEK,a.week))),BI.isNotNull(a.day)&&(b.push(BI.DynamicDateCard.TYPE.DAY),c.push(this._createValue(BI.DynamicDateCard.TYPE.DAY,a.day))),BI.isNotNull(a.workDay)&&(b.push(BI.DynamicDateCard.TYPE.WORK_DAY),c.push(this._createValue(BI.DynamicDateCard.TYPE.WORK_DAY,a.workDay))),this.checkgroup.setValue(b),this.workDayBox.setSelected(BI.isNotNull(a.workDay)),this.resultPane.populate(this._getParamJson(c,a.position))},getValue:function(){var a=this,b={},c=this.checkgroup.getValue(),d=this.resultPane.getAllButtons();if(0!==c.length&&BI.each(d,function(c,d){var e=d.getValue();switch(e.dateType){case BI.DynamicDateCard.TYPE.YEAR:b.year=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.QUARTER:b.quarter=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.MONTH:b.month=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.WEEK:b.week=0===e.offset?-e.value:e.value;break;case BI.DynamicDateCard.TYPE.DAY:b.day=0===e.offset?-e.value:e.value}BI.isNull(e.dateType)&&(b.position=a.position||BI.DynamicDateCard.OFFSET.CURRENT)}),this.workDayBox.isSelected()){var e=d[0].getValue();b.workDay=0===e.offset?-e.value:e.value}return b}}),BI.shortcut("bi.dynamic_date_card",BI.DynamicDateCard),BI.extend(BI.DynamicDateCard,{TYPE:{YEAR:1,QUARTER:2,MONTH:3,WEEK:4,DAY:5,WORK_DAY:6},OFFSET:{CURRENT:1,BEGIN:2,END:3}}),BI.DynamicDateCombo=BI.inherit(BI.Single,{constants:{popupHeight:259,popupWidth:270,comboAdjustHeight:1,border:1,DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},props:{baseCls:"bi-dynamic-date-combo bi-border",height:24},render:function(){var a=this,b=this.options;this.storeTriggerValue="";var c=BI.getDate();return this.storeValue=b.value,{type:"bi.htape",items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24,ref:function(){a.changeIcon=this}},width:24},{type:"bi.absolute",items:[{el:{type:"bi.combo",ref:function(){a.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,value:b.value,ref:function(){a.trigger=this},listeners:[{eventName:BI.DynamicDateTrigger.EVENT_KEY_DOWN,action:function(){a.combo.isViewVisible()&&a.combo.hideView()}},{eventName:BI.DynamicDateTrigger.EVENT_STOP,action:function(){a.combo.isViewVisible()||a.combo.showView()}},{eventName:BI.DynamicDateTrigger.EVENT_TRIGGER_CLICK,action:function(){a.combo.toggle()}},{eventName:BI.DynamicDateTrigger.EVENT_FOCUS,action:function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS)}},{eventName:BI.DynamicDateTrigger.EVENT_ERROR,action:function(){a.storeValue={year:c.getFullYear(),month:c.getMonth()},a.popup.setValue(),a.fireEvent(BI.DynamicDateCombo.EVENT_ERROR)}},{eventName:BI.DynamicDateTrigger.EVENT_VALID,action:function(){a.fireEvent(BI.DynamicDateCombo.EVENT_VALID)}},{eventName:BI.DynamicDateTrigger.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateCombo.EVENT_CHANGE)}},{eventName:BI.DynamicDateTrigger.EVENT_CONFIRM,action:function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:{type:"bi.dynamic_date_popup",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,value:b.value,ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate()}),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}]},stopPropagation:!1},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW)}}]},top:0,left:0,right:0,bottom:0},{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:24,height:24,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}}]},top:0,right:0}]}],ref:function(b){a.comboWrapper=b}}},mounted:function(){this._checkDynamicValue(this.options.value)},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.DynamicDateCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()},hidePopupView:function(){this.combo.hideView()}}),BI.DynamicDateCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicDateCombo.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicDateCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DynamicDateCombo.EVENT_VALID="EVENT_VALID",BI.DynamicDateCombo.EVENT_ERROR="EVENT_ERROR",BI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW="BI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_date_combo",BI.DynamicDateCombo),BI.extend(BI.DynamicDateCombo,{Static:1,Dynamic:2}),BI.DynamicDateParamItem=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-param-item",dateType:BI.DynamicDateCard.TYPE.YEAR,value:0,offset:0,height:24},render:function(){var a=this,b=this.options;return{type:"bi.htape",items:[{el:{type:"bi.sign_editor",cls:"bi-border",height:22,validationChecker:function(a){return BI.isNaturalNumber(a)},value:b.value,ref:function(){a.editor=this},errorText:function(a){return BI.isEmptyString(a)?BI.i18nText("BI-Basic_Input_Can_Not_Null"):BI.i18nText("BI-Please_Input_Positive_Integer")},allowBlank:!1,listeners:[{eventName:BI.SignEditor.EVENT_CONFIRM,action:function(){a.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE)}}]},width:60},{el:{type:"bi.label",height:24,text:this._getText()},width:20},{type:"bi.text_value_combo",height:24,items:[{text:BI.i18nText("BI-Basic_Front"),value:0},{text:BI.i18nText("BI-Basic_Behind"),value:1}],ref:function(){a.offsetCombo=this},value:b.offset,listeners:[{eventName:BI.TextValueCombo.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE)}}]}]}},_getText:function(){var a="";switch(this.options.dateType){case BI.DynamicDateCard.TYPE.YEAR:a=BI.i18nText("BI-Basic_Year");break;case BI.DynamicDateCard.TYPE.QUARTER:a=BI.i18nText("BI-Basic_Single_Quarter");break;case BI.DynamicDateCard.TYPE.MONTH:a=BI.i18nText("BI-Basic_Month");break;case BI.DynamicDateCard.TYPE.WEEK:a=BI.i18nText("BI-Basic_Week");break;case BI.DynamicDateCard.TYPE.DAY:default:a=BI.i18nText("BI-Basic_Day")}return a},setValue:function(a){a=a||{},a.value=a.value||0,a.offset=a.offset||0,this.editor.setValue(a.value),this.offsetCombo.setValue(a.offset)},getValue:function(){return{dateType:this.options.dateType,value:this.editor.getValue(),offset:this.offsetCombo.getValue()[0]}}}),BI.DynamicDateParamItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_date_param_item",BI.DynamicDateParamItem),BI.DynamicDatePopup=BI.inherit(BI.Widget,{constants:{tabHeight:30},props:{baseCls:"bi-dynamic-date-popup",width:248,height:344},_init:function(){BI.DynamicDatePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={type:BI.DynamicDateCombo.Static},BI.createWidget({element:this,type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",forceCenter:!0,cls:"bi-high-light bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-left bi-border-right bi-border-top",shadow:!0,text:BI.i18nText("BI-Multi_Date_Today"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-high-light bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}),this.setValue(b.value)},_getTabJson:function(){var a=this;return{type:"bi.tab",showIndex:BI.DynamicDateCombo.Static,ref:function(){a.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-border-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Multi_Date_YMD"),value:BI.DynamicDateCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicDateCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(b){switch(b){case BI.DynamicDateCombo.Dynamic:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,b)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicDateCombo.Static:default:return{type:"bi.date_calendar_popup",min:a.options.min,max:a.options.max,listeners:[{eventName:BI.DateCalendarPopup.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDatePopup.EVENT_CHANGE)}}],ref:function(){a.ymd=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicDateCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth(),day:c.getDate()}),a._setInnerValue();break;case BI.DynamicDateCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicDateCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=a.print("%Y-%x-%e"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var e=BI.getDate();this.ymd.setValue({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.ymd.setValue(c),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"));this.textButton.setEnable(!0)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.DynamicDatePopup.EVENT_CHANGE="EVENT_CHANGE",BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.shortcut("bi.dynamic_date_popup",BI.DynamicDatePopup),BI.DynamicDateTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,yearLength:4,yearMonthLength:7},props:{extraCls:"bi-date-trigger",min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicDateTrigger.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(b){var c=b.match(/\d+/g);return a._autoAppend(b,c),a._dateCheck(b)&&BI.checkDateLegal(b)&&a._checkVoid({year:c[0],month:c[1],day:c[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){return a.editor.isEditing()?BI.i18nText("BI-Date_Trigger_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")}}),this.editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_VALID,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_VALID)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_ERROR)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();if(BI.isNotNull(b)&&a.editor.setState(b),BI.isNotEmptyString(b)){var c=b.split("-");a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:0|c[0],month:c[1],day:0|c[2]}}}a.fireEvent(BI.DynamicDateTrigger.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.DynamicDateTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.DynamicDateTrigger.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.editor},{el:BI.createWidget(),width:30}]}),this.setValue(b.value)},_dateCheck:function(a){return BI.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")===a||BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")===a||BI.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")===a||BI.parseDateTime(a,"%Y-%X-%e").print("%Y-%X-%e")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.options.min,this.options.max)[0]},_autoAppend:function(a,b){if(BI.isNotNull(b)&&BI.checkDateLegal(a))switch(a.length){case this._const.yearLength:this._yearCheck(a)&&this.editor.setValue(a+"-");break;case this._const.yearMonthLength:this._monthCheck(a)&&this.editor.setValue(a+"-")}},_yearCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d");return BI.parseDateTime(a,"%Y").print("%Y")===a&&b>=this.options.min&&b<=this.options.max},_monthCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d");return BI.parseDateTime(a,"%Y-%X").print("%Y-%X")===a&&b>=this.options.min&&b<=this.options.max},_setInnerValue:function(a,b){var c=a.print("%Y-%x-%e");this.editor.setState(c),this.editor.setValue(c),this.setTitle(BI.isEmptyString(b)?c:b+":"+c)},_getText:function(a){function b(a,b){switch(b){case BI.DynamicDateCard.OFFSET.BEGIN:return a+BI.i18nText("BI-Basic_Begin_Start");case BI.DynamicDateCard.OFFSET.END:return a+BI.i18nText("BI-Basic_End_Stop");case BI.DynamicDateCard.OFFSET.CURRENT:default:return BI.i18nText("BI-Basic_Current_Day")}}var c="";return BI.isNotNull(a.year)&&0!==a.year&&(c+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))+b(BI.i18nText("BI-Basic_Year"),a.position)),BI.isNotNull(a.quarter)&&0!==a.quarter&&(c+=Math.abs(a.quarter)+BI.i18nText("BI-Basic_Single_Quarter")+(a.quarter<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))+b(BI.i18nText("BI-Basic_Year"),a.position)),BI.isNotNull(a.month)&&0!==a.month&&(c+=Math.abs(a.month)+BI.i18nText("BI-Basic_Month")+(a.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))+b(BI.i18nText("BI-Basic_Month"),a.position)),BI.isNotNull(a.week)&&0!==a.week&&(c+=Math.abs(a.week)+BI.i18nText("BI-Basic_Week")+(a.week<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))+b(BI.i18nText("BI-Basic_Week"),a.position)),BI.isNotNull(a.day)&&0!==a.day&&(c+=Math.abs(a.day)+BI.i18nText("BI-Basic_Day")+(a.day<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))+BI.size(a)===1?b(BI.i18nText("BI-Basic_Month"),a.position):""),BI.isNotNull(a.workDay)&&0!==a.workDay&&(c+=Math.abs(a.workDay)+BI.i18nText("BI-Basic_Work_Day")+(a.workDay<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),c},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:if(BI.isNull(c)||BI.isNull(c.day))this.editor.setState(""),this.editor.setValue(""),this.setTitle("");else{var f=c.year+"-"+c.month+"-"+c.day;this.editor.setState(f),this.editor.setValue(f),this.setTitle(f)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.storeValue}}),BI.DynamicDateTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicDateTrigger.EVENT_START="EVENT_START",BI.DynamicDateTrigger.EVENT_STOP="EVENT_STOP",BI.DynamicDateTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicDateTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.DynamicDateTrigger.EVENT_VALID="EVENT_VALID",BI.DynamicDateTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicDateTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.DynamicDateTrigger.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.shortcut("bi.dynamic_date_trigger",BI.DynamicDateTrigger),BI.DynamicDateTimeCombo=BI.inherit(BI.Single,{constants:{popupHeight:259,popupWidth:270,comboAdjustHeight:1,border:1,DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},props:{baseCls:"bi-dynamic-date-combo bi-border",height:24},render:function(){var a=this,b=this.options;this.storeTriggerValue="";var c=BI.getDate();return this.storeValue=b.value,{type:"bi.htape",items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24,ref:function(){a.changeIcon=this}},width:24},{type:"bi.absolute",items:[{el:{type:"bi.combo", ref:function(){a.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_time_trigger",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,value:b.value,ref:function(){a.trigger=this},listeners:[{eventName:BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN,action:function(){a.combo.isViewVisible()&&a.combo.hideView()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_STOP,action:function(){a.combo.isViewVisible()||a.combo.showView()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_TRIGGER_CLICK,action:function(){a.combo.toggle()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_FOCUS,action:function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_ERROR,action:function(){a.storeValue={year:c.getFullYear(),month:c.getMonth()},a.popup.setValue(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_ERROR)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_VALID,action:function(){a.fireEvent(BI.DynamicDateTimeCombo.EVENT_VALID)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CHANGE)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_CONFIRM,action:function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:{type:"bi.dynamic_date_time_popup",min:this.constants.DATE_MIN_VALUE,max:this.constants.DATE_MAX_VALUE,value:b.value,ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({year:b.getFullYear(),month:b.getMonth(),day:b.getDate(),hour:0,minute:0,second:0}),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}}]},stopPropagation:!1},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW)}}]},top:0,left:0,right:0,bottom:0},{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:24,height:24,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()?a.combo.hideView():a.combo.showView()}}]},top:0,right:0}]}],ref:function(b){a.comboWrapper=b}}},mounted:function(){this._checkDynamicValue(this.options.value)},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.DynamicDateTimeCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()},hidePopupView:function(){this.combo.hideView()}}),BI.DynamicDateTimeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicDateTimeCombo.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicDateTimeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DynamicDateTimeCombo.EVENT_VALID="EVENT_VALID",BI.DynamicDateTimeCombo.EVENT_ERROR="EVENT_ERROR",BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_date_time_combo",BI.DynamicDateTimeCombo),BI.extend(BI.DynamicDateTimeCombo,{Static:1,Dynamic:2}),BI.DynamicDateTimePopup=BI.inherit(BI.Widget,{constants:{tabHeight:30},props:{baseCls:"bi-dynamic-date-time-popup",width:248,height:385},_init:function(){BI.DynamicDateTimePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={type:BI.DynamicDateCombo.Static},BI.createWidget({element:this,type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",forceCenter:!0,cls:"bi-high-light bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-left bi-border-right bi-border-top",shadow:!0,text:BI.i18nText("BI-Multi_Date_Today"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-high-light bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}),this.setValue(b.value)},_getTabJson:function(){var a=this;return{type:"bi.tab",showIndex:BI.DynamicDateCombo.Static,ref:function(){a.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-border-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Multi_Date_YMD"),value:BI.DynamicDateCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicDateCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(b){switch(b){case BI.DynamicDateCombo.Dynamic:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,b)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicDateCombo.Static:default:return{type:"bi.vtape",items:[{type:"bi.date_calendar_popup",min:a.options.min,max:a.options.max,ref:function(){a.ymd=this}},{el:{type:"bi.dynamic_date_time_select",ref:function(){a.timeSelect=this},listeners:[{eventName:BI.DynamicDateTimeSelect.EVENT_CONFIRM,action:function(){}}]},height:40}]}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicDateCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.ymd.setValue({year:c.getFullYear(),month:c.getMonth(),day:c.getDate()}),a.timeSelect.setValue(),a._setInnerValue();break;case BI.DynamicDateCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicDateCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=a.print("%Y-%x-%e"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(c)){var e=BI.getDate();this.ymd.setValue({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()}),this.timeSelect.setValue(),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.ymd.setValue(c),this.timeSelect.setValue({hour:c.hour,minute:c.minute,second:c.second}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"));this.textButton.setEnable(!0)}},getValue:function(){var a=this.dateTab.getSelect();return{type:a,value:a===BI.DynamicDateTimeCombo.Static?BI.extend(this.ymd.getValue(),this.timeSelect.getValue()):this.dynamicPane.getValue()}}}),BI.DynamicDateTimePopup.EVENT_CHANGE="EVENT_CHANGE",BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.shortcut("bi.dynamic_date_time_popup",BI.DynamicDateTimePopup),BI.DynamicDateTimeSelect=BI.inherit(BI.Widget,{props:{baseCls:"bi-date-time-select bi-border-top"},render:function(){var a=this;return{type:"bi.center_adapt",items:[{type:"bi.vertical_adapt",items:[{el:{type:"bi.number_editor",ref:function(){a.hour=this},validationChecker:function(a){return BI.isNaturalNumber(a)&&BI.parseInt(a)<24},errorText:function(){return BI.i18nText("BI-Basic_Input_From_To_Number",'"00-23"')},listeners:[{eventName:BI.SignEditor.EVENT_CONFIRM,action:function(){this.setValue(a._formatValueToDoubleDigit(this.getValue())),a.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}},{eventName:BI.SignEditor.EVENT_CHANGE,action:function(){var b=a._autoSwitch(this.getValue(),BI.DynamicDateTimeSelect.HOUR);this.setValue(b)}}],width:60,height:24},lgap:14},{type:"bi.label",text:":",width:20},{type:"bi.number_editor",ref:function(){a.minute=this},validationChecker:function(a){return BI.isNaturalNumber(a)&&BI.parseInt(a)<60},errorText:function(){return BI.i18nText("BI-Basic_Input_From_To_Number",'"00-59"')},listeners:[{eventName:BI.SignEditor.EVENT_CONFIRM,action:function(){this.setValue(a._formatValueToDoubleDigit(this.getValue()),BI.DynamicDateTimeSelect.MINUTE),a.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}},{eventName:BI.SignEditor.EVENT_CHANGE,action:function(){var b=a._autoSwitch(this.getValue(),BI.DynamicDateTimeSelect.MINUTE);this.setValue(b)}}],width:60,height:24},{type:"bi.label",text:":",width:20},{type:"bi.number_editor",ref:function(){a.second=this},validationChecker:function(a){return BI.isNaturalNumber(a)&&BI.parseInt(a)<60},errorText:function(){return BI.i18nText("BI-Basic_Input_From_To_Number",'"00-59"')},listeners:[{eventName:BI.SignEditor.EVENT_CONFIRM,action:function(){this.setValue(a._formatValueToDoubleDigit(this.getValue())),a.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}}],width:60,height:24}]}]}},_autoSwitch:function(a,b){var c=0,d=a;switch(b){case BI.DynamicDateTimeSelect.HOUR:c=2;break;case BI.DynamicDateTimeSelect.MINUTE:c=6}return 1===a.length&&BI.parseInt(a)>c&&(d="0"+d),2===d.length&&(b===BI.DynamicDateTimeSelect.HOUR?this.minute.focus():this.second.focus()),d},_formatValueToDoubleDigit:function(a){(BI.isNull(a)||BI.isEmptyString(a))&&(a=0);var b=BI.parseInt(a);return b<10&&(b="0"+b),b},_assertValue:function(a){return a=a||{},a.hour=this._formatValueToDoubleDigit(a.hour)||"00",a.minute=this._formatValueToDoubleDigit(a.minute)||"00",a.second=this._formatValueToDoubleDigit(a.second)||"00",a},getValue:function(){return{hour:BI.parseInt(this.hour.getValue()),minute:BI.parseInt(this.minute.getValue()),second:BI.parseInt(this.second.getValue())}},setValue:function(a){a=this._assertValue(a),this.hour.setValue(a.hour),this.minute.setValue(a.minute),this.second.setValue(a.second)}}),BI.DynamicDateTimeSelect.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.dynamic_date_time_select",BI.DynamicDateTimeSelect),BI.extend(BI.DynamicDateTimeSelect,{HOUR:1,MINUTE:2}),BI.DynamicDateTimeTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,yearLength:4,yearMonthLength:7},props:{extraCls:"bi-date-time-trigger",min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicDateTimeTrigger.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(b){var c=b.match(/\d+/g);return a._autoAppend(b,c),a._dateCheck(b)&&BI.checkDateLegal(b)&&a._checkVoid({year:c[0],month:c[1],day:c[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){return a.editor.isEditing()?BI.i18nText("BI-Basic_Date_Time_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")}}),this.editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_VALID,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_VALID)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_ERROR)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();if(BI.isNotNull(b)&&a.editor.setState(b),BI.isNotEmptyString(b)){var c=b.split(/-|\s|:/);a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:0|c[0],month:c[1],day:0|c[2],hour:0|c[3],minute:0|c[4],second:0|c[5]}}}a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_START,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.DynamicDateTimeTrigger.EVENT_CHANGE)}),BI.createWidget({type:"bi.htape",element:this,items:[{el:this.editor},{el:BI.createWidget(),width:30}]}),this.setValue(b.value)},_dateCheck:function(a){return BI.parseDateTime(a,"%Y-%x-%d %H:%M:%S").print("%Y-%x-%d %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%X-%d %H:%M:%S").print("%Y-%X-%d %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%x-%e %H:%M:%S").print("%Y-%x-%e %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%X-%e %H:%M:%S").print("%Y-%X-%e %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")===a||BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")===a||BI.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")===a||BI.parseDateTime(a,"%Y-%X-%e").print("%Y-%X-%e")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.options.min,this.options.max)[0]},_autoAppend:function(a,b){if(BI.isNotNull(b)&&BI.checkDateLegal(a))switch(a.length){case this._const.yearLength:this._yearCheck(a)&&this.editor.setValue(a+"-");break;case this._const.yearMonthLength:this._monthCheck(a)&&this.editor.setValue(a+"-")}},_yearCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d");return BI.parseDateTime(a,"%Y").print("%Y")===a&&b>=this.options.min&&b<=this.options.max},_monthCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d");return BI.parseDateTime(a,"%Y-%X").print("%Y-%X")===a&&b>=this.options.min&&b<=this.options.max},_setInnerValue:function(a,b){var c=a.print("%Y-%x-%e %H:%M:%S");this.editor.setState(c),this.editor.setValue(c),this.setTitle(BI.isEmptyString(b)?c:b+":"+c)},_getText:function(a){function b(a,b){switch(b){case BI.DynamicDateCard.OFFSET.BEGIN:return a+BI.i18nText("BI-Basic_Begin_Start");case BI.DynamicDateCard.OFFSET.END:return a+BI.i18nText("BI-Basic_End_Stop");case BI.DynamicDateCard.OFFSET.CURRENT:default:return BI.i18nText("BI-Basic_Current_Day")}}var c="";return BI.isNotNull(a.year)&&0!==a.year&&(c+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))+b(BI.i18nText("BI-Basic_Year"),a.position)),BI.isNotNull(a.quarter)&&0!==a.quarter&&(c+=Math.abs(a.quarter)+BI.i18nText("BI-Basic_Single_Quarter")+(a.quarter<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))+b(BI.i18nText("BI-Basic_Year"),a.position)),BI.isNotNull(a.month)&&0!==a.month&&(c+=Math.abs(a.month)+BI.i18nText("BI-Basic_Month")+(a.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))+b(BI.i18nText("BI-Basic_Month"),a.position)),BI.isNotNull(a.week)&&0!==a.week&&(c+=Math.abs(a.week)+BI.i18nText("BI-Basic_Week")+(a.week<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))+b(BI.i18nText("BI-Basic_Week"),a.position)),BI.isNotNull(a.day)&&0!==a.day&&(c+=Math.abs(a.day)+BI.i18nText("BI-Basic_Day")+(a.day<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))+BI.size(a)===1?b(BI.i18nText("BI-Basic_Month"),a.position):""),BI.isNotNull(a.workDay)&&0!==a.workDay&&(c+=Math.abs(a.workDay)+BI.i18nText("BI-Basic_Work_Day")+(a.workDay<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),c},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:if(BI.isNull(c)||BI.isNull(c.day))this.editor.setState(""),this.editor.setValue(""),this.setTitle("");else{var f=c.year+"-"+c.month+"-"+c.day+" "+(c.hour||"00")+":"+(c.minute||"00")+":"+(c.second||"00");this.editor.setState(f),this.editor.setValue(f),this.setTitle(f)}}},getKey:function(){return this.editor.getValue()},getValue:function(){return this.storeValue}}),BI.DynamicDateTimeTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicDateTimeTrigger.EVENT_START="EVENT_START",BI.DynamicDateTimeTrigger.EVENT_STOP="EVENT_STOP",BI.DynamicDateTimeTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicDateTimeTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.DynamicDateTimeTrigger.EVENT_VALID="EVENT_VALID",BI.DynamicDateTimeTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicDateTimeTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.shortcut("bi.dynamic_date_time_trigger",BI.DynamicDateTimeTrigger),BI.SearchEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SearchEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-search-editor bi-border",height:24,errorText:"",watermark:BI.i18nText("BI-Basic_Search"),validationChecker:BI.emptyFn,quitChecker:BI.emptyFn})},_init:function(){this.options.height-=2,BI.SearchEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,watermark:b.watermark,allowBlank:!0,errorText:b.errorText,validationChecker:b.validationChecker,quitChecker:b.quitChecker}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"search-close-h-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){a.setValue(""),a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),a.fireEvent(BI.SearchEditor.EVENT_CLEAR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:{type:"bi.center_adapt",cls:"search-font",items:[{el:{type:"bi.icon"}}]},width:25},{el:a.editor},{el:this.clear,width:25}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.SearchEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.SearchEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.SearchEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a._checkClear(),a.fireEvent(BI.SearchEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.SearchEditor.EVENT_KEY_DOWN,b)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){a.fireEvent(BI.SearchEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){a.fireEvent(BI.SearchEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.SearchEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.SearchEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.SearchEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.SearchEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a._checkClear(),a.fireEvent(BI.SearchEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){a.fireEvent(BI.SearchEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.SearchEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.SearchEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.SearchEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.SearchEditor.EVENT_STOP)}),this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid()){var a=this.editor.getValue().match(/[\S]+/g);return BI.isNull(a)?"":a[a.length-1]}},getLastValidValue:function(){return this.editor.getLastValidValue()},setValue:function(a){this.editor.setValue(a),BI.isKey(a)&&this.clear.visible()},isEditing:function(){return this.editor.isEditing()},isValid:function(){return this.editor.isValid()}}),BI.SearchEditor.EVENT_CHANGE="EVENT_CHANGE",BI.SearchEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SearchEditor.EVENT_BLUR="EVENT_BLUR",BI.SearchEditor.EVENT_CLICK="EVENT_CLICK",BI.SearchEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.SearchEditor.EVENT_SPACE="EVENT_SPACE",BI.SearchEditor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.SearchEditor.EVENT_CLEAR="EVENT_CLEAR",BI.SearchEditor.EVENT_START="EVENT_START",BI.SearchEditor.EVENT_PAUSE="EVENT_PAUSE",BI.SearchEditor.EVENT_STOP="EVENT_STOP",BI.SearchEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SearchEditor.EVENT_VALID="EVENT_VALID",BI.SearchEditor.EVENT_ERROR="EVENT_ERROR",BI.SearchEditor.EVENT_ENTER="EVENT_ENTER",BI.SearchEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.SearchEditor.EVENT_REMOVE="EVENT_REMOVE",BI.SearchEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.search_editor",BI.SearchEditor),BI.SmallSearchEditor=BI.inherit(BI.SearchEditor,{_defaultConfig:function(){var a=BI.SmallSearchEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-small-search-editor",height:24})},_init:function(){BI.SmallSearchEditor.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.small_search_editor",BI.SmallSearchEditor),BI.TextEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.TextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-text-editor bi-border",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!1,watermark:"",errorText:"",height:24})},_init:function(){BI.TextEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNumber(b.height)&&this.element.css({height:b.height-2}),BI.isNumber(b.width)&&this.element.css({width:b.width-2}),this.editor=BI.createWidget({type:"bi.editor",height:b.height-2,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,value:b.value,title:b.title,tipType:b.tipType,validationChecker:b.validationChecker,quitChecker:b.quitChecker,allowBlank:b.allowBlank,watermark:b.watermark,errorText:b.errorText}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){a.fireEvent(BI.TextEditor.EVENT_FOCUS)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){a.fireEvent(BI.TextEditor.EVENT_BLUR)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){a.fireEvent(BI.TextEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){a.fireEvent(BI.TextEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(b){a.fireEvent(BI.TextEditor.EVENT_KEY_DOWN)}),this.editor.on(BI.Editor.EVENT_SPACE,function(b){a.fireEvent(BI.TextEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(b){a.fireEvent(BI.TextEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){a.fireEvent(BI.TextEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a.fireEvent(BI.TextEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(b){a.fireEvent(BI.TextEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_START,function(){a.fireEvent(BI.TextEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){a.fireEvent(BI.TextEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){a.fireEvent(BI.TextEditor.EVENT_STOP)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a.fireEvent(BI.TextEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){a.fireEvent(BI.TextEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){a.fireEvent(BI.TextEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){a.fireEvent(BI.TextEditor.EVENT_EMPTY)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setErrorText:function(a){this.editor.setErrorText(a)},getErrorText:function(){return this.editor.getErrorText()},isValid:function(){return this.editor.isValid()},setValue:function(a){this.editor.setValue(a)},getValue:function(){return this.editor.getValue()}}),BI.TextEditor.EVENT_CHANGE="EVENT_CHANGE",BI.TextEditor.EVENT_FOCUS="EVENT_FOCUS",BI.TextEditor.EVENT_BLUR="EVENT_BLUR",BI.TextEditor.EVENT_CLICK="EVENT_CLICK",BI.TextEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.TextEditor.EVENT_SPACE="EVENT_SPACE",BI.TextEditor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.TextEditor.EVENT_START="EVENT_START",BI.TextEditor.EVENT_PAUSE="EVENT_PAUSE",BI.TextEditor.EVENT_STOP="EVENT_STOP",BI.TextEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.TextEditor.EVENT_VALID="EVENT_VALID",BI.TextEditor.EVENT_ERROR="EVENT_ERROR",BI.TextEditor.EVENT_ENTER="EVENT_ENTER",BI.TextEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.TextEditor.EVENT_REMOVE="EVENT_REMOVE",BI.TextEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.text_editor",BI.TextEditor),BI.SmallTextEditor=BI.inherit(BI.TextEditor,{_defaultConfig:function(){var a=BI.SmallTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-small-text-editor",height:25})},_init:function(){BI.SmallTextEditor.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.small_text_editor",BI.SmallTextEditor),BI.FileManagerButtonGroup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerButtonGroup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-button_group",items:[]})},_init:function(){BI.FileManagerButtonGroup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button_group=BI.createWidget({type:"bi.button_tree",element:this,chooseType:BI.Selection.Multi,items:this._formatItems(b.items),layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},_formatItems:function(a){this.options;return BI.each(a,function(a,b){b.children&&b.children.length>0?b.type="bi.file_manager_folder_item":b.type="bi.file_manager_file_item"}),a},setValue:function(a){this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getNotSelectedValue:function(){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,height:b.height}),this.checked.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button=BI.createWidget({type:"bi.text_button",textAlign:"left",height:b.height,text:b.text,value:b.value}),this.button.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CHANGE,b.value,a)}),this.tree=new BI.Tree,this.tree.initTree([{id:b.id,children:b.children}]),this.selectValue=[],BI.createWidget({type:"bi.htape",element:this,items:[{el:this.checked,width:36},{el:{type:"bi.icon_button",cls:"create-by-me-folder-font"},width:20},{el:this.button}]})},setAllSelected:function(a){this.checked.setSelected(a),this.selectValue=[]},setHalfSelected:function(a){this.checked.setHalfSelected(a), -a||(this.selectValue=[])},setValue:function(a){var b=(this.options,!1),c=[];this.tree.traverse(function(d){d.isLeaf()&&(BI.contains(a,d.get("data").value)?c.push(d.get("data").value):b=!0)}),this.setAllSelected(c.length>0&&!b),this.setHalfSelected(c.length>0&&b),this.checked.isHalfSelected()&&(this.selectValue=c)},getAllButtons:function(){return[this]},getAllLeaves:function(){var a=(this.options,[]);return this.tree.traverse(function(b){b.isLeaf()&&a.push(b.get("data").value)}),a},getNotSelectedValue:function(){var a=this,b=(this.options,[]),c=this.checked.isSelected();if(c===!0)return b;var d=this.checked.isHalfSelected();return this.tree.traverse(function(c){if(c.isLeaf()){var e=c.get("data").value;d===!0?BI.contains(a.selectValue,c.get("data").value)||b.push(e):b.push(e)}}),b},getValue:function(){var a=[];return this.checked.isSelected()?(this.tree.traverse(function(b){b.isLeaf()&&a.push(b.get("data").value)}),a):this.checked.isHalfSelected()?this.selectValue:[]}}),BI.FileManagerFolderItem.EVENT_CHANGE="FileManagerFolderItem.EVENT_CHANGE",BI.shortcut("bi.file_manager_folder_item",BI.FileManagerFolderItem),BI.FileManagerList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-list",el:{},items:[]})},_init:function(){BI.FileManagerList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.list=BI.createWidget({type:"bi.select_list",element:this,items:b.items,toolbar:{type:"bi.multi_select_bar",height:40,text:""},el:{type:"bi.list_pane",el:BI.isWidget(b.el)?b.el:BI.extend({type:"bi.file_manager_button_group"},b.el)}}),this.list.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){this.list.setValue({value:a})},getValue:function(){return this.list.getValue()},populate:function(a){this.list.populate(a),this.list.setToolBarVisible(!0)}}),BI.FileManagerList.EVENT_CHANGE="FileManagerList.EVENT_CHANGE",BI.shortcut("bi.file_manager_list",BI.FileManagerList),BI.FileManagerNavButton=BI.inherit(BI.Widget,{_const:{normal_color:"#ffffff",select_color:"#eff1f4"},_defaultConfig:function(){return BI.extend(BI.FileManagerNavButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-nav-button",selected:!1,height:40})},_init:function(){BI.FileManagerNavButton.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.button=BI.createWidget({type:"bi.text_button",cls:"file-manager-nav-button-text bi-card",once:!0,selected:b.selected,text:b.text,title:b.text,value:b.value,height:b.height,lgap:20,rgap:10}),this.button.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var d=BI.createWidget({type:"bi.svg",cls:"file-manager-nav-button-triangle",width:15,height:b.height}),e=d.path("M0,0L15,20L0,40").attr({stroke:c.select_color,fill:b.selected?c.select_color:c.normal_color});this.button.on(BI.TextButton.EVENT_CHANGE,function(){this.isSelected()?e.attr("fill",c.select_color):e.attr("fill",c.normal_color)}),BI.createWidget({type:"bi.default",element:this,items:[this.button]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:d,right:-15,top:0,bottom:0}]})},isSelected:function(){return this.button.isSelected()},setValue:function(a){this.button.setValue(a)},getValue:function(){return this.button.getValue()},populate:function(a){}}),BI.FileManagerNavButton.EVENT_CHANGE="FileManagerNavButton.EVENT_CHANGE",BI.shortcut("bi.file_manager_nav_button",BI.FileManagerNavButton),BI.FileManagerNav=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerNav.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-nav bi-border-left",height:40,items:[]})},_init:function(){BI.FileManagerNav.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=new BI.Tree,this.refreshTreeData(b.items),this.tree.getRoot().set("data",{text:BI.i18nText("BI-Created_By_Me"),value:BI.FileManagerNav.ROOT_CREATE_BY_ME,id:BI.FileManagerNav.ROOT_CREATE_BY_ME}),this.button_group=BI.createWidget({type:"bi.button_group",element:this,items:[{type:"bi.file_manager_nav_button",text:BI.i18nText("BI-Created_By_Me"),selected:!0,id:BI.FileManagerNav.ROOT_CREATE_BY_ME,value:BI.FileManagerNav.ROOT_CREATE_BY_ME}],layouts:[{type:"bi.horizontal"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.FileManagerNav.EVENT_CHANGE,arguments)})},_getAllParents:function(a){var b,c=[];for(b=a?this.tree.search(a):this.tree.getRoot();b.parent;)c.push(b),b=b.parent;return c.push(b),c.reverse()},_formatNodes:function(a){var b=[];return BI.each(a,function(a,c){b.push(BI.extend({type:"bi.file_manager_nav_button",id:c.id},c.get("data")))}),BI.last(b).selected=!0,b},getValue:function(){return this.button_group.getValue()},getId:function(){var a=[];return BI.each(this.button_group.getSelectedButtons(),function(b,c){a.push(c.attr("id"))}),a},refreshTreeData:function(a){this.tree.initTree(BI.Tree.transformToTreeFormat(a)),this.tree.getRoot().set("data",{text:BI.i18nText("BI-Created_By_Me"),value:BI.FileManagerNav.ROOT_CREATE_BY_ME,id:BI.FileManagerNav.ROOT_CREATE_BY_ME})},populate:function(a){var b=BI.isNull(a)?[this.tree.getRoot()]:this._getAllParents(a.id);this.button_group.populate(this._formatNodes(b))}}),BI.extend(BI.FileManagerNav,{ROOT_CREATE_BY_ME:"-1"}),BI.FileManagerNav.EVENT_CHANGE="FileManagerNav.EVENT_CHANGE",BI.shortcut("bi.file_manager_nav",BI.FileManagerNav),BI.IntervalSlider=BI.inherit(BI.Widget,{_constant:{EDITOR_WIDTH:58,EDITOR_R_GAP:60,EDITOR_HEIGHT:30,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},_defaultConfig:function(){return BI.extend(BI.IntervalSlider.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-interval-slider bi-slider-track",digit:!1,unit:""})},_init:function(){BI.IntervalSlider.superclass._init.apply(this,arguments);var a=this,b=this._constant;this.enable=!1,this.valueOne="",this.valueTwo="",this.calculation=new BI.AccurateCalculationModel,this.grayTrack=BI.createWidget({type:"bi.layout",cls:"gray-track",height:6}),this.blueTrack=BI.createWidget({type:"bi.layout",cls:"blue-track bi-high-light-background",height:6}),this.track=this._createTrackWrapper(),this.labelOne=BI.createWidget({type:"bi.sign_text_editor",cls:"slider-editor-button",text:this.options.unit,errorText:"",allowBlank:!1,width:b.EDITOR_WIDTH,validationChecker:function(b){return a._checkValidation(b)}}),this.labelOne.element.hover(function(){a.labelOne.element.removeClass("bi-border").addClass("bi-border")},function(){a.labelOne.element.removeClass("bi-border")}),this.labelOne.on(BI.Editor.EVENT_CONFIRM,function(){var b=BI.parseFloat(this.getValue());a.valueOne=b;var c=a._getPercentByValue(b),d=BI.parseFloat(c.toFixed(1));a._setLabelOnePosition(d),a._setSliderOnePosition(d),a._setBlueTrack(),a.fireEvent(BI.IntervalSlider.EVENT_CHANGE)}),this.labelTwo=BI.createWidget({type:"bi.sign_text_editor",cls:"slider-editor-button",errorText:"",text:this.options.unit,allowBlank:!1,width:b.EDITOR_WIDTH,validationChecker:function(b){return a._checkValidation(b)}}),this.labelTwo.element.hover(function(){a.labelTwo.element.removeClass("bi-border").addClass("bi-border")},function(){a.labelTwo.element.removeClass("bi-border")}),this.labelTwo.on(BI.Editor.EVENT_CONFIRM,function(){var b=BI.parseFloat(this.getValue());a.valueTwo=b;var c=a._getPercentByValue(b),d=BI.parseFloat(c.toFixed(1));a._setLabelTwoPosition(d),a._setSliderTwoPosition(d),a._setBlueTrack(),a.fireEvent(BI.IntervalSlider.EVENT_CHANGE)}),this.sliderOne=BI.createWidget({type:"bi.single_slider_button"}),this.sliderTwo=BI.createWidget({type:"bi.single_slider_button"}),this._draggable(this.sliderOne,!0),this._draggable(this.sliderTwo,!1),this._setVisible(!1),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.track,width:"100%",height:b.TRACK_HEIGHT}]}],hgap:7,height:b.TRACK_HEIGHT},top:23,left:0,width:"100%"},this._createLabelWrapper(),this._createSliderWrapper()]})},_rePosBySizeAfterMove:function(a,b){var c=this.options,d=100*a/this._getGrayTrackLength(),e=BI.parseFloat(d.toFixed(1)),f=this._getValueByPercent(e);f=this._assertValue(f),f=c.digit===!1?f:f.toFixed(c.digit),b?(this._setLabelOnePosition(e),this._setSliderOnePosition(e),this.labelOne.setValue(f),this.valueOne=f):(this._setLabelTwoPosition(e),this._setSliderTwoPosition(e),this.labelTwo.setValue(f),this.valueTwo=f),this._setBlueTrack()},_rePosBySizeAfterStop:function(a,b){var c=100*a/this._getGrayTrackLength(),d=BI.parseFloat(c.toFixed(1));b?this._setSliderOnePosition(d):this._setSliderTwoPosition(d)},_draggable:function(a,b){function c(a){return BI.clamp(a,0,d._getGrayTrackLength())}var d=this,e=(this.options,!1),f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){i.isDragging()&&(e=!0,g+=j,f=c(h+g),a.element.addClass("dragging"),d._rePosBySizeAfterMove(f,b))},function(){e===!0&&(f=c(f),d._rePosBySizeAfterStop(f,b),f=0,g=0,h=f,e=!1),a.element.removeClass("dragging"),i.releaseMouseMoves(),d.fireEvent(BI.IntervalSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(b){a.isEnabled()&&(h=this.offsetLeft,c(h),i.captureMouseMoves(b))})},_createLabelWrapper:function(){var a=this._constant;return{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.labelOne,top:0,left:"0%"}]},{type:"bi.absolute",items:[{el:this.labelTwo,top:0,left:"100%"}]}],rgap:a.EDITOR_R_GAP,height:70},top:0,left:0,width:"100%"}},_createSliderWrapper:function(){var a=this._constant;return{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.sliderOne,top:0,left:"0%"}]},{type:"bi.absolute",items:[{el:this.sliderTwo,top:0,left:"100%"}]}],hgap:a.SLIDER_WIDTH_HALF,height:a.SLIDER_HEIGHT},top:20,left:0,width:"100%"}},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){var b=this.options,c=!1,d=(a+"").split(".")[1];return BI.isEmptyString(d)||BI.isNumeric(a)&&!(BI.isNull(a)||athis.max)&&(b.digit===!1?c=!0:(d=d||"",c=d.length===b.digit)),c},_checkOverlap:function(){var a=this.labelOne.element[0].offsetLeft,b=this.labelTwo.element[0].offsetLeft;a<=b?b-a<90?this.labelTwo.element.css({top:40}):this.labelTwo.element.css({top:0}):a-b<90?this.labelTwo.element.css({top:40}):this.labelTwo.element.css({top:0})},_setLabelOnePosition:function(a){this.labelOne.element.css({left:a+"%"}),this._checkOverlap()},_setLabelTwoPosition:function(a){this.labelTwo.element.css({left:a+"%"}),this._checkOverlap()},_setSliderOnePosition:function(a){this.sliderOne.element.css({left:a+"%"})},_setSliderTwoPosition:function(a){this.sliderTwo.element.css({left:a+"%"})},_setBlueTrackLeft:function(a){this.blueTrack.element.css({left:a+"%"})},_setBlueTrackWidth:function(a){this.blueTrack.element.css({width:a+"%"})},_setBlueTrack:function(){var a=this._getPercentByValue(this.labelOne.getValue()),b=this._getPercentByValue(this.labelTwo.getValue());a<=b?(this._setBlueTrackLeft(a),this._setBlueTrackWidth(b-a)):(this._setBlueTrackLeft(b),this._setBlueTrackWidth(a-b))},_setAllPosition:function(a,b){this._setSliderOnePosition(a),this._setLabelOnePosition(a),this._setSliderTwoPosition(b),this._setLabelTwoPosition(b),this._setBlueTrack()},_setVisible:function(a){this.sliderOne.setVisible(a),this.sliderTwo.setVisible(a),this.labelOne.setVisible(a),this.labelTwo.setVisible(a)},_setErrorText:function(){var a=BI.i18nText("BI-Please_Enter")+this.min+"-"+this.max+BI.i18nText("BI-Basic_De")+BI.i18nText("BI-Basic_Number");this.labelOne.setErrorText(a),this.labelTwo.setErrorText(a)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(a){var b=this.calculation.accurateSubtraction(this.max,this.min),c=this.calculation.accurateMultiplication(b,a),d=this.calculation.accurateDivisionTenExponent(c,2);if(this.precision<0){var e=BI.parseFloat(this.calculation.accurateAddition(d,this.min)),f=Math.round(this.calculation.accurateDivisionTenExponent(e,-this.precision));return this.calculation.accurateMultiplication(f,Math.pow(10,-this.precision))}return BI.parseFloat(this.calculation.accurateAddition(d,this.min).toFixed(this.precision))},_getPercentByValue:function(a){return 100*(a-this.min)/(this.max-this.min)},_setDraggableEnable:function(a){this.sliderOne.setEnable(a),this.sliderTwo.setEnable(a)},_getPrecision:function(){var a=this.calculation.accurateSubtraction(this.max,this.min),b=a.toPrecision(4),c=b.indexOf("e"),d=[];if(c>-1){d=b.split("e");var e=BI.size(d[0].split(".")[1]),f=BI.parseInt(d[1].substring(1));return e-f}return d=b.split("."),d.length>1?d[1].length:0},_assertValue:function(a){return a<=this.min?this.min:a>=this.max?this.max:a},getValue:function(){return this.valueOne<=this.valueTwo?{min:this.valueOne,max:this.valueTwo}:{min:this.valueTwo,max:this.valueOne}},setMinAndMax:function(a){var b=BI.parseFloat(a.min),c=BI.parseFloat(a.max);!isNaN(b)&&!isNaN(c)&&c>=b&&(this.min=b,this.max=c,this.valueOne=b,this.valueTwo=c,this.precision=this._getPrecision(),this._setDraggableEnable(!0)),c===b&&this._setDraggableEnable(!1)},setValue:function(a){var b=this.options,c=BI.parseFloat(a.min),d=BI.parseFloat(a.max);c=b.digit===!1?c:c.toFixed(b.digit),d=b.digit===!1?d:d.toFixed(b.digit),isNaN(c)||isNaN(d)||(this._checkValidation(c)&&(this.valueOne=c),this._checkValidation(d)&&(this.valueTwo=d),cthis.max&&(this.valueTwo=this.max))},reset:function(){this._setVisible(!1),this.enable=!1,this.valueOne="",this.valueTwo="",this.min=NaN,this.max=NaN,this._setBlueTrackWidth(0)},populate:function(){isNaN(this.min)||isNaN(this.max)||(this.enable=!0,this._setVisible(!0),this._setErrorText(),(BI.isNumeric(this.valueOne)||BI.isNotEmptyString(this.valueOne))&&(BI.isNumeric(this.valueTwo)||BI.isNotEmptyString(this.valueTwo))?(this.labelOne.setValue(this.valueOne),this.labelTwo.setValue(this.valueTwo),this._setAllPosition(this._getPercentByValue(this.valueOne),this._getPercentByValue(this.valueTwo))):(this.labelOne.setValue(this.min),this.labelTwo.setValue(this.max),this._setAllPosition(0,100)))}}),BI.IntervalSlider.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.interval_slider",BI.IntervalSlider),BI.AccurateCalculationModel=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.AccurateCalculationModel.superclass._defaultConfig.apply(this,arguments),{baseCls:""})},_init:function(){BI.AccurateCalculationModel.superclass._init.apply(this,arguments)},_getMagnitude:function(a){for(var b="1",c=0;c0)var d=b;else{var d=a;c=0-c}for(var e=0;e=b.numDecimal.length?a.numDecimal.length:b.numDecimal.length}function d(a,b){for(var c=b-a.length,d=0;d=BI.parseInt(f.numDecimal))var i=(BI.parseInt(e.numDecimal)-BI.parseInt(f.numDecimal)).toString(),j=d(i,h);else{g--;var k=this._getMagnitude(h),i=(k+BI.parseInt(e.numDecimal)-BI.parseInt(f.numDecimal)).toString(),j=d(i,h)}var l=g+"."+j;return BI.parseFloat(l)},_accurateAddition:function(a,b){function c(a,b){for(var c=b-a.length,d=0;db)var e=d.numInteger.slice(0,d.numInteger.length-b),f=d.numInteger.slice(-b);else var e="0",f=c(d.numInteger,b);var g=e+"."+f+d.numDecimal;return BI.parseFloat(g)},accurateSubtraction:function(a,b){return a>=0&&b>=0?a>=b?this._accurateSubtraction(a,b):-this._accurateSubtraction(b,a):a>=0&&b<0?this._accurateAddition(a,-b):a<0&&b>=0?-this._accurateAddition(-a,b):a<0&&b<0?a>=b?this._accurateSubtraction(-b,-a):this._accurateSubtraction(-a,-b):void 0},accurateAddition:function(a,b){return a>=0&&b>=0?this._accurateAddition(a,b):a>=0&&b<0?this.accurateSubtraction(a,-b):a<0&&b>=0?this.accurateSubtraction(b,-a):a<0&&b<0?-this._accurateAddition(-a,-b):void 0},accurateMultiplication:function(a,b){return a>=0&&b>=0?this._accurateMultiplication(a,b):a>=0&&b<0?-this._accurateMultiplication(a,-b):a<0&&b>=0?-this._accurateMultiplication(-a,b):a<0&&b<0?this._accurateMultiplication(-a,-b):void 0},accurateDivisionTenExponent:function(a,b){return a>=0?this._accurateDivisionTenExponent(a,b):-this._accurateDivisionTenExponent(-a,b)}}),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",value:b.value}),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,value:b.value}),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 BI.isNull(this.popup)?this.options.value||"":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=[1,7,2,8,3,9,4,10,5,11,6,12],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}})}),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}],value:b.value}),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.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.MonthTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Month"),baseCls:"bi-trigger-month-text",width:b.height},width:b.height},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]}),this.setValue(b.value)},setValue:function(a){return BI.isNotNull(a)?(this.editor.setState(a+1),this.editor.setValue(a+1),void this.editor.setTitle(a+1)):(this.editor.setState(""),this.editor.setValue(""),void this.editor.setTitle(""))},getKey:function(){return 0|this.editor.getValue()},getValue:function(){return this.editor.getValue()-1}}),BI.MonthTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.MonthTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.MonthTrigger.EVENT_START="EVENT_START",BI.MonthTrigger.EVENT_STOP="EVENT_STOP",BI.MonthTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_trigger",BI.MonthTrigger),BI.DownListCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-down-list-combo",height:24,items:[],adjustLength:0,direction:"bottom",trigger:"click",container:null,stopPropagation:!1,el:{}})},_init:function(){BI.DownListCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popupview=BI.createWidget({type:"bi.multi_layer_down_list_popup",items:b.items,chooseType:b.chooseType,value:b.value}),this.popupview.on(BI.DownListPopup.EVENT_CHANGE,function(b){a.fireEvent(BI.DownListCombo.EVENT_CHANGE,b),a.downlistcombo.hideView()}),this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,function(b,c){a.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,b,c),a.downlistcombo.hideView()}),this.downlistcombo=BI.createWidget({element:this,type:"bi.combo",trigger:b.trigger,isNeedAdjustWidth:!1,container:b.container,adjustLength:b.adjustLength,direction:b.direction,stopPropagation:b.stopPropagation,el:BI.createWidget(b.el,{type:"bi.icon_trigger",extraCls:b.iconCls?b.iconCls:"pull-down-font",width:b.width,height:b.height}),popup:{el:this.popupview,stopPropagation:!0,maxHeight:1e3}}),this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW)})},hideView:function(){this.downlistcombo.hideView()},showView:function(){this.downlistcombo.showView()},populate:function(a){this.popupview.populate(a)},setValue:function(a){this.popupview.setValue(a)},getValue:function(){return this.popupview.getValue()}}),BI.DownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DownListCombo.EVENT_SON_VALUE_CHANGE="EVENT_SON_VALUE_CHANGE",BI.DownListCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_layer_down_list_combo",BI.DownListCombo),BI.MultiLayerDownListPopup=BI.inherit(BI.Pane,{constants:{nextIcon:"pull-right-e-font",height:25,iconHeight:12,iconWidth:12,hgap:0,vgap:0,border:1},_defaultConfig:function(){var a=BI.MultiLayerDownListPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-down-list-popup",items:[],chooseType:BI.Selection.Multi})},_init:function(){BI.MultiLayerDownListPopup.superclass._init.apply(this,arguments),this.singleValues=[],this.childValueMap={},this.fatherValueMap={};var a=this,b=this.options,c=this._createPopupItems(b.items);this.popup=BI.createWidget({type:"bi.button_tree",items:BI.createItems(c,{},{adjustLength:-2}),layouts:[{type:"bi.vertical",hgap:this.constants.hgap,vgap:this.constants.vgap}],value:this._digest(b.value),chooseType:b.chooseType}),this.popup.on(BI.ButtonTree.EVENT_CHANGE,function(b,c){var d=b;if(BI.isNotNull(a.childValueMap[b])){d=a.childValueMap[b];var e=a.fatherValueMap[b],f=(e+"").split("_");a.fireEvent(BI.MultiLayerDownListPopup.EVENT_SON_VALUE_CHANGE,d,f.length>1?f:e)}else a.fireEvent(BI.MultiLayerDownListPopup.EVENT_CHANGE,d,c);if(!a.singleValues.contains(d)){var g=a.getValue(),h=[];BI.each(g,function(a,b){b.value!=d&&h.push(b)}),a.setValue(h)}}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup]})},_createPopupItems:function(a){var b=this,c=[];return BI.each(a,function(d,e){var f={type:"bi.down_list_group",items:[]};if(BI.each(e,function(a,c){BI.isNotEmptyArray(c.children)&&!BI.isEmpty(c.el)?(c.type="bi.combo_group",c.cls="down-list-group",c.trigger="hover",c.isNeedAdjustWidth=!1,c.el.title=c.el.title||c.el.text,c.el.type="bi.down_list_group_item",c.el.logic={dynamic:!0},c.el.height=b.constants.height,c.el.iconCls2=b.constants.nextIcon,c.popup={lgap:4,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}},c.el.childValues=[],BI.each(c.children,function(a,d){d=d.el?BI.extend(d.el,{children:d.children}):d;var e=BI.deepClone(c.el.value),f=BI.deepClone(d.value);b.singleValues.push(d.value),d.type="bi.down_list_item",d.extraCls=" child-down-list-item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),c.el.childValues.push(d.value),BI.isNotEmptyArray(d.children)&&(d.type="bi.down_list_group_item",b._createChildren(d),d.height=b.constants.height,d.iconCls2=b.constants.nextIcon,c.el.childValues=BI.concat(c.el.childValues,d.childValues))})):(c.type="bi.down_list_item",c.title=c.title||c.text,c.textRgap=10,c.isNeedAdjustWidth=!1,c.logic={dynamic:!0});var d={};d.el=c,f.items.push(d)}),b._isGroup(f.items)&&BI.each(f.items,function(a,c){b.singleValues.push(c.el.value)}),c.push(f),b._needSpliter(d,a.length)){var g=BI.createWidget({type:"bi.vertical",items:[{el:{type:"bi.layout",cls:"bi-down-list-spliter bi-border-top cursor-pointer",height:0}}],cls:"bi-down-list-spliter-container cursor-pointer",lgap:10,rgap:10});c.push(g)}}),c},_createChildren:function(a){var b=this;a.childValues=[],BI.each(a.children,function(c,d){var e=BI.deepClone(a.value),f=BI.deepClone(d.value);d.type="bi.down_list_item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),a.childValues.push(d.value)})},_isGroup:function(a){return a.length>1},_needSpliter:function(a,b){return a1?g:f}else e.value=d;b.push(e)}),b}}),BI.MultiLayerDownListPopup.EVENT_CHANGE="EVENT_CHANGE",BI.MultiLayerDownListPopup.EVENT_SON_VALUE_CHANGE="EVENT_SON_VALUE_CHANGE",BI.shortcut("bi.multi_layer_down_list_popup",BI.MultiLayerDownListPopup),BI.MultiLayerSelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer_select_tree-combo",isDefaultInit:!1,height:30,text:"",items:[],value:""})},_init:function(){BI.MultiLayerSelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value}),this.popup=BI.createWidget({type:"bi.multilayer_select_tree_popup",isDefaultInit:b.isDefaultInit,items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.MultiLayerSelectTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_CHANGE)})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.MultiLayerSelectTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_combo",BI.MultiLayerSelectTreeCombo),BI.MultiLayerSelectLevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-select-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn,value:"" -})},_init:function(){BI.MultiLayerSelectLevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={};if(e.layer=b,BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.multilayer_select_tree_first_plus_group_node";break;case a.length-1: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",cls:"tree-view display-inline",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,value:c.value,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)}),BI.createWidget({type:"bi.adaptive",element:this,scrollable:!0,items:[this.tree]})},populate:function(a){this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},setValue:function(a){this.tree.setValue(a)},getValue:function(){return BI.uniq(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:[],value:""})},_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,value:b.value,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:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_first_plus_group_node",BI.MultiLayerSelectTreeFirstPlusGroupNode),BI.MultiLayerSelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-last-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_last_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id: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]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_last_plus_group_node",BI.MultiLayerSelectTreeLastPlusGroupNode),BI.MultiLayerSelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-mid-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_mid_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id: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]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_mid_plus_group_node",BI.MultiLayerSelectTreeMidPlusGroupNode),BI.MultiLayerSingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-singletree-combo",isDefaultInit:!1,height:30,text:"",itemsCreator:BI.emptyFn,items:[],value:""})},_init:function(){BI.MultiLayerSingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value}),this.popup=BI.createWidget({type:"bi.multilayer_single_tree_popup",isDefaultInit:b.isDefaultInit,items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.MultiLayerSingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_CHANGE)})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.MultiLayerSingleTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_combo",BI.MultiLayerSingleTreeCombo),BI.MultiLayerSingleLevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-single-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn})},_init:function(){BI.MultiLayerSingleLevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={};if(e.layer=b,BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.multilayer_single_tree_first_plus_group_node";break;case a.length-1:f.type="bi.multilayer_single_tree_last_plus_group_node";break;default:f.type="bi.multilayer_single_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",cls:"tree-view display-inline",expander:{isDefaultInit:c.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),value:c.value,itemsCreator:function(a,b){c.itemsCreator(a,function(a){b(BI.Tree.transformToTreeFormat(a),0)})},el:{type:"bi.button_tree",chooseType:BI.Selection.Single,layouts:[{type:"bi.vertical"}]}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,c)}),BI.createWidget({type:"bi.adaptive",element:this,scrollable:!0,items:[this.tree]})},populate:function(a){this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},setValue:function(a){this.tree.setValue(a)},getValue:function(){return BI.filter(BI.uniq(this.tree.getValue()),function(a,b){return BI.isNotNull(b)})},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.MultiLayerSingleLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_level_tree",BI.MultiLayerSingleLevelTree),BI.MultiLayerSingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-singletree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:b.isDefaultInit,items:b.items,itemsCreator:b.itemsCreator,value:b.value}),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.MultiLayerSingleLevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.MultiLayerSingleTreePopup.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.MultiLayerSingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.MultiLayerSingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_popup",BI.MultiLayerSingleTreePopup),BI.MultiLayerSingleTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-first-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.first_plus_group_node",cls:"bi-list-item-none",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,keyword:b.keyword}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_first_plus_group_node",BI.MultiLayerSingleTreeFirstPlusGroupNode),BI.MultiLayerSingleTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-last-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.last_plus_group_node",cls:"bi-list-item-none",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,keyword:b.keyword}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_last_plus_group_node",BI.MultiLayerSingleTreeLastPlusGroupNode),BI.MultiLayerSingleTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-mid-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.mid_plus_group_node",cls:"bi-list-item-none",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,keyword:b.keyword}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_plus_group_node",BI.MultiLayerSingleTreeMidPlusGroupNode),BI.MultiLayerSingleTreeFirstTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-first-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.first_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_first_tree_leaf_item",BI.MultiLayerSingleTreeFirstTreeLeafItem),BI.MultiLayerSingleTreeLastTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-last-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.last_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_last_tree_leaf_item",BI.MultiLayerSingleTreeLastTreeLeafItem),BI.MultiLayerSingleTreeMidTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-mid-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.mid_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_tree_leaf_item",BI.MultiLayerSingleTreeMidTreeLeafItem),BI.MultiSelectCheckPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-pane bi-background",items:[],itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,onClickContinueSelect:BI.emptyFn})},_init:function(){BI.MultiSelectCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value||{},this.display=BI.createWidget({type:"bi.display_selected_list",items:b.items,itemsCreator:function(c,d){return c=BI.extend(c||{},{selectedValues:a.storeValue.value}),a.storeValue.type===BI.Selection.Multi?void d({items:BI.map(a.storeValue.value,function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d}})}):void b.itemsCreator(c,d)}}),this.continueSelect=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-select-check-selected bi-high-light"}),this.continueSelect.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect()}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:{type:"bi.left",cls:"multi-select-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:this.continueSelect,lgap:this.constants.lgap,tgap:this.constants.tgap}]}},{height:"fill",el:this.display}]})},setValue:function(a){this.storeValue=a||{}},empty:function(){this.display.empty()},populate:function(){this.display.populate.apply(this.display,arguments)}}),BI.shortcut("bi.multi_select_check_pane",BI.MultiSelectCheckPane),BI.DisplaySelectedList=BI.inherit(BI.Pane,{constants:{height:25,lgap:10},_defaultConfig:function(){return BI.extend(BI.DisplaySelectedList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-display-list",itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.DisplaySelectedList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.hasNext=!1,this.button_group=BI.createWidget({type:"bi.list_pane",element:this,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},items:this._createItems(b.items),chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical",lgap:10}]},itemsCreator:function(c,d){b.itemsCreator(c,function(b){a.hasNext=!!b.hasNext,d(a._createItems(b.items))})},hasNext:function(){return a.hasNext}})},_createItems:function(a){return BI.createItems(a,{type:"bi.icon_text_item",cls:"cursor-default check-font display-list-item bi-tips",once:!0,invalid:!0,selected:!0,height:this.constants.height,logic:{dynamic:!0}})},empty:function(){this.button_group.empty()},populate:function(a){0===arguments.length?this.button_group.populate():this.button_group.populate(this._createItems(a))}}),BI.shortcut("bi.display_selected_list",BI.DisplaySelectedList),BI.MultiSelectInsertCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_init:function(){BI.MultiSelectInsertCombo.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)})},value:b.value}),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(){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.storeValue.type===BI.Selection.Multi&&a.storeValue.value.pushDistinct(b),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()})}},value:b.value,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.MultiSelectInsertCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button"});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.MultiSelectInsertCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectInsertCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;b(),a()},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this.combo.populate.apply(this.combo,arguments); -}}),BI.extend(BI.MultiSelectInsertCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_insert_combo",BI.MultiSelectInsertCombo),BI.MultiSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_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=b.value||{},this._assertValue(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)})},value:this.storeValue}),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()})}},value:b.value,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"});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.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.storeValue.type===BI.Selection.All&&c.storeValue.value.length>=c._count?c.storeValue={type:BI.Selection.Multi,value:[]}:c.storeValue.type===BI.Selection.Multi&&c.storeValue.value.length>=c._count&&(c.storeValue={type:BI.Selection.All,value:[]}),c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_combo",BI.MultiSelectCombo),BI.MultiSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=b.value||{},this._assertValue(this.storeValue),this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!a.storeValue.value.contains(a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](f),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:this.options.logic,height:25,selected:this.isAllSelected()})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_loader",BI.MultiSelectLoader),BI.MultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.multi_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_popup_view",BI.MultiSelectPopupView),BI.MultiSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.MultiSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.multi_select_searcher",height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker,value:b.value}),this.searcher.on(BI.MultiSelectSearcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_CHANGE,arguments)}),this.numberCounter=BI.createWidget(b.switcher,{type:"bi.multi_select_check_selected_switcher",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,adapter:b.adapter,masker:b.masker,value:b.value}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK)}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW)});var c=BI.createWidget({type:"bi.right_vertical_adapt",hgap:4,items:[{el:this.numberCounter}]}),d=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:c,width:0},{el:BI.createWidget(),width:30}]});this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){d.attr("items")[1].width=b===!0?a.numberCounter.element.outerWidth()+8:0,d.resize()})}),this.element.click(function(b){a.element.__isMouseInBounds__(b)&&!a.numberCounter.element.__isMouseInBounds__(b)&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.MultiSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.MultiSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectTrigger.EVENT_START="EVENT_START",BI.MultiSelectTrigger.EVENT_STOP="EVENT_STOP",BI.MultiSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.multi_select_trigger",BI.MultiSelectTrigger),BI.MultiSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=BI.deepClone(b.value),this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:{dynamic:!1},value:b.value,el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:a.storeValue.value})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=a._filterValues(a.storeValue);h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:{dynamic:!1},height:25,selected:this.isAllSelected()})},isAllSelected:function(){return this.button_group.isAllSelected()},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=BI.deepClone(a.value)||[],e=BI.map(d,function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.match.concat(f.find)}return BI.map(d,function(b,c){return{text:c.text,title:c.text,value:c.value,selected:a.type===BI.Selection.All}})},setValue:function(a){this.storeValue=BI.deepClone(a),this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_loader",BI.MultiSelectSearchLoader),BI.MultiSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.multi_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},isAllSelected:function(){return this.loader.isAllSelected()},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.MultiSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_pane",BI.MultiSelectSearchPane),BI.MultiSelectCheckSelectedButton=BI.inherit(BI.Single,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-button bi-high-light",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectCheckSelectedButton.superclass._init.apply(this,arguments);var a=this,b=this.options;this.numberCounter=BI.createWidget({type:"bi.text_button",element:this,hgap:4,text:"0",textAlign:"center",textHeight:15}),this.numberCounter.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.numberCounter.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),this.numberCounter.element.hover(function(){a.numberCounter.setTag(a.numberCounter.getText()),a.numberCounter.setText(a._const.checkSelected)},function(){a.numberCounter.setText(a.numberCounter.getTag())}),this.setVisible(!1),BI.isNotNull(b.value)&&this.setValue(b.value)},setValue:function(a){var b=this,c=this.options;return a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[]),a.type===BI.Selection.All?void c.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(c){var d=c.count-a.value.length;BI.nextTick(function(){b.numberCounter.setText(d),b.setVisible(d>0)})}):void BI.nextTick(function(){b.numberCounter.setText(a.value.length),b.setVisible(a.value.length>0)})},getValue:function(){}}),BI.MultiSelectCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_check_selected_button",BI.MultiSelectCheckSelectedButton),BI.MultiSelectEditor=BI.inherit(BI.Widget,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-editor",el:{}})},_init:function(){BI.MultiSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0,value:b.value}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_CLICK_LABEL,function(){})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastValidValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.MultiSelectEditor.EVENT_PAUSE="MultiSelectEditor.EVENT_PAUSE",BI.shortcut("bi.multi_select_editor",BI.MultiSelectEditor),BI.MultiSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.MultiSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),this.setKeyword(c.keyword),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiSelectSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;if(a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All)if(0===a.value.length)this.editor.setState(BI.Selection.All);else if(BI.size(a.assist)<=20){var c="";BI.each(a.assist,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi);else if(0===a.value.length)this.editor.setState(BI.Selection.None);else if(BI.size(a.value)<=20){var c="";BI.each(a.value,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectSearcher.EVENT_START="EVENT_START",BI.MultiSelectSearcher.EVENT_STOP="EVENT_STOP",BI.MultiSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.multi_select_searcher",BI.MultiSelectSearcher),BI.MultiSelectCheckSelectedSwitcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedSwitcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-switcher",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,el:{},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectCheckSelectedSwitcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button=BI.createWidget(b.el,{type:"bi.multi_select_check_selected_button",itemsCreator:b.itemsCreator,value:b.value}),this.button.on(BI.Events.VIEW,function(){a.fireEvent(BI.Events.VIEW,arguments)}),this.switcher=BI.createWidget({type:"bi.switcher",toggle:!1,element:this,el:this.button,popup:BI.extend({type:"bi.multi_select_check_pane",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,onClickContinueSelect:function(){a.switcher.hideView()},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.switcher.on(BI.Switcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE)}),this.switcher.on(BI.Switcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW)}),this.switcher.on(BI.Switcher.EVENT_AFTER_POPUPVIEW,function(){var a=this;BI.nextTick(function(){a.populate()})}),this.switcher.element.click(function(a){a.stopPropagation()})},adjustView:function(){this.switcher.adjustView()},hideView:function(){this.switcher.empty(),this.switcher.hideView()},setAdapter:function(a){this.switcher.setAdapter(a)},setValue:function(a){this.switcher.setValue(a)},setButtonChecked:function(a){this.button.setValue(a)},getValue:function(){},populate:function(a){this.switcher.populate.apply(this.switcher,arguments)}}),BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE="MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE",BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW="MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_select_check_selected_switcher",BI.MultiSelectCheckSelectedSwitcher),BI.MultiSelectInsertList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectInsertList.superclass._init.apply(this,arguments);var 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(),c(),a.fireEvent(BI.MultiSelectInsertList.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.storeValue.type===BI.Selection.Multi&&a.storeValue.value.pushDistinct(b),a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a.adapter.populate(),a._setStartValue(""),a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)}):(a.storeValue.type===BI.Selection.Multi&&a.storeValue.value.pushDistinct(b),a._showAdapter(),a.adapter.setValue(a.storeValue),a.adapter.populate(),a.storeValue.type===BI.Selection.Multi&&a.fireEvent(BI.MultiSelectInsertList.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.MultiSelectInsertList.EVENT_CHANGE)}):a._join(this.getValue(),function(){c(),a.fireEvent(BI.MultiSelectInsertList.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)}),b()}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA},function(a){d._allData=BI.map(a.items,"value"),c(d._allData)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),d.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA,keyword:c.trigger.getKeyword()},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void b()}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b); -}),c.storeValue.value=j.concat(BI.values(h)),b()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void b()}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.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.map(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.trigger.getKeyword()},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.storeValue.type===BI.Selection.All&&c.storeValue.value.length>=c._count?c.storeValue={type:BI.Selection.Multi,value:[]}:c.storeValue.type===BI.Selection.Multi&&c.storeValue.value.length>=c._count&&(c.storeValue={type:BI.Selection.All,value:[]})}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.MultiSelectList.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectList,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectList.EVENT_CHANGE="BI.MultiSelectList.EVENT_CHANGE",BI.shortcut("bi.multi_select_list",BI.MultiSelectList),BI.MultiSelectTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={value:{}},this.adapter=BI.createWidget({type:"bi.multi_select_tree_popup",itemsCreator:b.itemsCreator}),this.adapter.on(BI.MultiSelectTreePopup.EVENT_CHANGE,function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_tree_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",keywordGetter:function(){return a.searcher.getKeyword()},itemsCreator:function(c,d){c.keyword=a.searcher.getKeyword(),b.itemsCreator(c,d)}}),this.searcherPane.setVisible(!1),this.searcher=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.searcher.getKeyword()})},adapter:this.adapter,popup:this.searcherPane,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){a._showSearcherPane()}},{eventName:BI.Searcher.EVENT_STOP,action:function(){a._showAdapter(),BI.nextTick(function(){a.adapter.populate()})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){a._showAdapter()}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.searcher,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)},resize:function(){},setSelectedValue:function(a){this.storeValue.value=a||{},this.adapter.setSelectedValue(a),this.searcherPane.setSelectedValue(a),this.searcher.setValue({value:a||{}})},setValue:function(a){this.adapter.setValue(a)},stopSearch:function(){this.searcher.stopSearch()},updateValue:function(a){this.adapter.updateValue(a)},getValue:function(){return this.storeValue.value},populate:function(){this.searcher.populate.apply(this.searcher,arguments),this.adapter.populate.apply(this.adapter,arguments)}}),BI.MultiSelectTree.EVENT_CHANGE="BI.MultiSelectTree.EVENT_CHANGE",BI.shortcut("bi.multi_select_tree",BI.MultiSelectTree),BI.MultiSelectTreePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree-popup bi-border-left bi-border-right bi-border-bottom",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popup=BI.createWidget({type:"bi.async_tree",element:this,itemsCreator:b.itemsCreator}),this.popup.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_AFTER_INIT)}),this.popup.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_CHANGE)})},hasChecked:function(){return this.popup.hasChecked()},getValue:function(){return this.popup.getValue()},setValue:function(a){a||(a={}),this.popup.setValue(a)},setSelectedValue:function(a){a||(a={}),this.popup.setSelectedValue(a)},updateValue:function(a){this.popup.updateValue(a),this.popup.refresh()},populate:function(a){this.popup.stroke(a)}}),BI.MultiSelectTreePopup.EVENT_AFTER_INIT="BI.MultiSelectTreePopup.EVENT_AFTER_INIT",BI.MultiSelectTreePopup.EVENT_CHANGE="BI.MultiSelectTreePopup.EVENT_CHANGE",BI.shortcut("bi.multi_select_tree_popup",BI.MultiSelectTreePopup),BI.MultiTreeCheckPane=BI.inherit(BI.Pane,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-pane bi-background",onClickContinueSelect:BI.emptyFn})},_init:function(){BI.MultiTreeCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={};var c=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-tree-check-selected"});c.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect(),BI.nextTick(function(){a.empty()})});var d=BI.createWidget({type:"bi.left",cls:"multi-tree-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:c,lgap:this.constants.lgap,tgap:this.constants.tgap}]});this.display=BI.createWidget({type:"bi.display_tree",cls:"bi-multi-tree-display",itemsCreator:function(a,c){a.type=BI.TreeView.REQ_TYPE_GET_SELECTED_DATA,b.itemsCreator(a,c)},value:(b.value||{}).value}),this.display.on(BI.Events.AFTERINIT,function(){a.fireEvent(BI.Events.AFTERINIT)}),this.display.on(BI.TreeView.EVENT_INIT,function(){d.setVisible(!1)}),this.display.on(BI.TreeView.EVENT_AFTERINIT,function(){d.setVisible(!0)}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:d},{height:"fill",el:this.display}]})},empty:function(){this.display.empty()},populate:function(a){this.display.stroke(a)},setValue:function(a){a||(a={}),this.display.setSelectedValue(a.value)},getValue:function(){}}),BI.MultiTreeCheckPane.EVENT_CONTINUE_CLICK="EVENT_CONTINUE_CLICK",BI.shortcut("bi.multi_tree_check_pane",BI.MultiTreeCheckPane),BI.MultiTreeCombo=BI.inherit(BI.Single,{constants:{offset:{top:1,left:1,right:2,bottom:33}},_defaultConfig:function(){return BI.extend(BI.MultiTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-combo",itemsCreator:BI.emptyFn,height:25})},_init:function(){function a(){h()?b.storeValue={value:b.trigger.getValue()}:i()&&(b.storeValue={value:b.combo.getValue()}),b.trigger.setValue(b.storeValue)}BI.MultiTreeCombo.superclass._init.apply(this,arguments);var b=this,c=this.options,d=!1,e=!1;this.storeValue={value:c.value||{}},this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:c.height,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_tree_searcher",itemsCreator:c.itemsCreator},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",itemsCreator:c.itemsCreator}},value:{value:c.value||{}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){b.popup=this,b.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){b.trigger.getCounter().adjustView(),d=!0,e===!0&&a()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){f=!0;var a={type:BI.Selection.Multi,value:this.hasChecked()?this.getValue():{}};b.trigger.getSearcher().setState(a),b.trigger.getCounter().setButtonChecked(a)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){b.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){g=!0,b.setValue(),b._defaultState()}}],itemsCreator:c.itemsCreator,onLoaded:function(){BI.nextTick(function(){b.trigger.getCounter().adjustView(),b.trigger.getSearcher().adjustView()})}},value:{value:c.value||{}},hideChecker:function(a){return 0===j.element.find(a.target).length}});var f=!1,g=!1,h=function(){return b.trigger.getSearcher().isSearching()},i=function(){return b.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){b.storeValue={value:b.combo.getValue()},this.setValue(b.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){b.storeValue={value:this.getValue()},b.combo.setValue(b.storeValue),BI.nextTick(function(){i()&&b.combo.populate()})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){e===!1&&(e=!0),d===!0&&(e=null,a())}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){b.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){b.combo.isViewVisible()||b.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var a=this.getSearcher().hasChecked(),b={type:BI.Selection.Multi,value:a?{1:1}:{}};this.getSearcher().setState(a?BI.Selection.Multi:BI.Selection.None),this.getCounter().setButtonChecked(b)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){h()||(f===!0&&(b.storeValue={value:b.combo.getValue()},f=!1),b.combo.setValue(b.storeValue),b.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){h()?(b.trigger.stopEditing(),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)):i()&&(b.trigger.stopEditing(),b.storeValue={value:b.combo.getValue()},g===!0&&(b.storeValue={value:{}}),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)),g=!1,f=!1});var j=BI.createWidget({type:"bi.trigger_icon_button",width:c.height,height:c.height,cls:"multi-select-trigger-icon-button"});j.on(BI.TriggerIconButton.EVENT_CHANGE,function(){b.trigger.getCounter().hideView(),b.combo.isViewVisible()?b.combo.hideView():b.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:j,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},setValue:function(a){this.storeValue.value=a||{},this.combo.setValue({value:a||{}})},getValue:function(){return this.storeValue.value},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeCombo.EVENT_CONFIRM="MultiTreeCombo.EVENT_CONFIRM",BI.shortcut("bi.multi_tree_combo",BI.MultiTreeCombo),BI.MultiTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-popup",maxWidth:"auto",minWidth:100,maxHeight:400,onLoaded:BI.emptyFn})},_init:function(){BI.MultiTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={},this.tree=BI.createWidget({type:"bi.async_tree",height:400,cls:"popup-view-tree",itemsCreator:b.itemsCreator,onLoaded:b.onLoaded,value:b.value||{}}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",element:this,stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.tree}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CONFIRM)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreePopup.EVENT_CHANGE)}),this.tree.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiTreePopup.EVENT_AFTERINIT)})},getValue:function(){return this.tree.getValue()},setValue:function(a){a||(a={}),this.tree.setSelectedValue(a.value)},populate:function(a){this.tree.stroke(a)},hasChecked:function(){return this.tree.hasChecked()},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreePopup.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreePopup.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreePopup.EVENT_AFTERINIT="EVENT_AFTERINIT",BI.shortcut("bi.multi_tree_popup_view",BI.MultiTreePopup),BI.MultiTreeSearchPane=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-search-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiTreeSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.partTree=BI.createWidget({type:"bi.part_tree",element:this,tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(a,c){a.keyword=b.keywordGetter(),b.itemsCreator(a,c)},value:b.value}),this.partTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.partTree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearchPane.EVENT_CHANGE)})},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_tree_search_pane",BI.MultiTreeSearchPane),BI.MultiTreeCheckSelectedButton=BI.inherit(BI.Single,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-selected-button",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiTreeCheckSelectedButton.superclass._init.apply(this,arguments);var a=this;this.indicator=BI.createWidget({type:"bi.icon_button",cls:"check-font trigger-check-selected",width:15,height:15,stopPropagation:!0}),this.checkSelected=BI.createWidget({type:"bi.text_button",cls:"trigger-check-selected",invisible:!0,hgap:4,text:this._const.checkSelected,textAlign:"center",textHeight:15}),this.checkSelected.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.checkSelected.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.horizontal",element:this,items:[this.indicator,this.checkSelected]}),this.element.hover(function(){a.indicator.setVisible(!1),a.checkSelected.setVisible(!0)},function(){a.indicator.setVisible(!0),a.checkSelected.setVisible(!1)}),this.setVisible(!1)},setValue:function(a){a||(a={}),this.setVisible(BI.size(a.value)>0)}}),BI.MultiTreeCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_tree_check_selected_button",BI.MultiTreeCheckSelectedButton),BI.MultiTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",height:b.height}}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_CHANGE,arguments)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){function b(a){var c="",d=0,e=BI.size(a);return BI.each(a,function(a,f){d++;var g=b(f);c+=a+(""===g?"":":"+g)+(d===e?"":",")}),c}if(a||(a={}),a.value||(a.value={}),BI.isNumber(a))this.editor.setState(a);else if(0===BI.size(a.value))this.editor.setState(BI.Selection.None);else{var c="";BI.each(a.value,function(a,d){var e=b(d);c+=a+(""===e?"":":"+e)+"; "}),this.editor.setState(c)}},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearcher.EVENT_START="EVENT_START",BI.MultiTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_tree_searcher",BI.MultiTreeSearcher),BI.NumberEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-number-editor bi-border",validationChecker:function(){return!0},valueFormatter:function(a){return a},value:0,allowBlank:!1,errorText:"",step:1})},_init:function(){BI.NumberEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,allowBlank:b.allowBlank,value:b.valueFormatter(b.value),validationChecker:b.validationChecker,errorText:b.errorText}),this.editor.on(BI.TextEditor.EVENT_CHANGE,function(){b.value=this.getValue(),a.fireEvent(BI.NumberEditor.EVENT_CHANGE)}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){this.setValue(BI.parseFloat(this.getValue())),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",cls:"column-pre-page-h-font top-button bi-border-left bi-border-bottom"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",cls:"column-next-page-h-font bottom-button bi-border-left bi-border-top"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),BI.createWidget({type:"bi.htape",element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:23}]})},focus:function(){this.editor.focus()},_finetuning:function(a){var b=BI.parseFloat(this.getValue());this.setValue(b.add(a))},setUpEnable:function(a){this.topBtn.setEnable(!!a)},setDownEnable:function(a){this.bottomBtn.setEnable(!!a)},getValue:function(){return this.options.value},setValue:function(a){var b=this.options;b.value=a,this.editor.setValue(b.valueFormatter(a))}}),BI.NumberEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberEditor.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.number_editor",BI.NumberEditor),BI.NumberInterval=BI.inherit(BI.Single,{constants:{typeError:"typeBubble",numberError:"numberBubble",signalError:"signalBubble",editorWidth:114,columns:5,width:30,rows:1,numberErrorCls:"number-error",border:1,less:0,less_equal:1,numTip:""},_defaultConfig:function(){var a=BI.NumberInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-number-interval",height:25,validation:"valid"})},_init:function(){var a=this,b=this.constants,c=this.options;BI.NumberInterval.superclass._init.apply(this,arguments),this.smallEditor=BI.createWidget({type:"bi.editor",height:c.height-2,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,value:c.min,level:"warning",tipType:"warning",quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.smallEditorBubbleType=b.typeError,!1)},cls:"number-interval-small-editor bi-border-top bi-border-bottom bi-border-left"}),this.smallTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.smallEditor.element,items:[{el:this.smallTip,top:0,right:5}]}),this.bigEditor=BI.createWidget({type:"bi.editor",height:c.height-2,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,value:c.max,level:"warning",tipType:"warning",quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.bigEditorBubbleType=b.typeError,!1)},cls:"number-interval-big-editor bi-border-top bi-border-bottom bi-border-right"}),this.bigTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.bigEditor.element,items:[{el:this.bigTip,top:0,right:5}]}),this.smallCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-small-combo bi-border",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closemin===!0?this.smallCombo.setValue(1):this.smallCombo.setValue(0),this.bigCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-big-combo bi-border",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closemax===!0?this.bigCombo.setValue(1):this.bigCombo.setValue(0),this.label=BI.createWidget({type:"bi.label",text:BI.i18nText("BI-Basic_Value"),textHeight:c.height-2*b.border,width:b.width-2*b.border,height:c.height-2*b.border,level:"warning",tipType:"warning"}),this.left=BI.createWidget({type:"bi.htape",items:[{el:a.smallEditor},{el:a.smallCombo,width:b.width-2*b.border}]}),this.right=BI.createWidget({type:"bi.htape",items:[{el:a.bigCombo,width:b.width-2*b.border},{el:a.bigEditor}]}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:c.height,items:[{type:"bi.absolute",items:[{el:a.left,left:-15,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:-15,top:0,bottom:0}]}]}),BI.createWidget({element:a,type:"bi.horizontal_auto",items:[a.label]}),a._setValidEvent(a.bigEditor,b.bigEditor),a._setValidEvent(a.smallEditor,b.smallEditor),a._setErrorEvent(a.bigEditor,b.bigEditor),a._setErrorEvent(a.smallEditor,b.smallEditor),a._setBlurEvent(a.bigEditor),a._setBlurEvent(a.smallEditor),a._setFocusEvent(a.bigEditor),a._setFocusEvent(a.smallEditor),a._setComboValueChangedEvent(a.bigCombo),a._setComboValueChangedEvent(a.smallCombo),a._setEditorValueChangedEvent(a.bigEditor),a._setEditorValueChangedEvent(a.smallEditor)},_checkValidation:function(){var a=this,b=this.constants,c=this.options;if(a._setTitle(""),BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),!a.smallEditor.isValid()||!a.bigEditor.isValid())return a.element.removeClass("number-error"),c.validation="invalid",b.typeError;if(BI.isEmptyString(a.smallEditor.getValue())||BI.isEmptyString(a.bigEditor.getValue()))return a.element.removeClass("number-error"),c.validation="valid","";var d=parseFloat(a.smallEditor.getValue()),e=parseFloat(a.bigEditor.getValue()),f=a.bigCombo.getValue(),g=a.smallCombo.getValue();return f[0]===b.less_equal&&g[0]===b.less_equal?d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):(a.element.removeClass("number-error"),c.validation="valid",""):d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):d===e?(a.element.addClass("number-error"),c.validation="invalid",b.signalError):(a.element.removeClass("number-error"),c.validation="valid","")},_setTitle:function(a){var b=this;b.bigEditor.setTitle(a),b.smallEditor.setTitle(a),b.label.setTitle(a)},_setFocusEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_FOCUS,function(){switch(b._setTitle(""),b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{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"});break;default:return}})},_setBlurEvent:function(a){var b=this.constants,c=this;a.on(BI.Editor.EVENT_BLUR,function(){switch(BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),c._checkValidation()){case b.typeError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));break;case b.numberError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value")); -break;case b.signalError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));break;default:c._setTitle("")}})},_setErrorEvent:function(a){var b=this.constants,c=this;a.on(BI.Editor.EVENT_ERROR,function(){c._checkValidation(),BI.Bubbles.show(b.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),c,{offsetStyle:"center"}),c.fireEvent(BI.NumberInterval.EVENT_ERROR)})},_setValidEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_VALID,function(){switch(b._checkValidation()){case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumberInterval.EVENT_VALID)}})},_setEditorValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{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,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)}),this.pager=BI.createWidget(b.pager,{type:"bi.direction_pager",height:30}),this.pager.on(BI.Pager.EVENT_CHANGE,function(){var c=this.getVPage&&this.getVPage();BI.isNull(c)&&(c=this.getCurrentPage());var d=this.getHPage&&this.getHPage();b.itemsCreator({vpage:c,hpage:d},function(b,e,f,g){a.table.setVPage?a.table.setVPage(c):a.table.setValue(c),a.table.setHPage&&a.table.setHPage(d),a.populate.apply(a,arguments)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.table,left:0,top:0},{el:this.pager,left:0,right:0,bottom:0}]})},setHPage:function(a){this.hCurr=a,this.pager.setHPage&&this.pager.setHPage(a),this.table.setHPage&&this.table.setHPage(a)},setVPage:function(a){this.vCurr=a,this.pager.setVPage&&this.pager.setVPage(a),this.table.setVPage&&this.table.setVPage(a)},getHPage:function(){var a=this.pager.getHPage&&this.pager.getHPage();return BI.isNotNull(a)?a:(a=this.pager.getCurrentPage&&this.pager.getCurrentPage(),BI.isNotNull(a)?a:this.hpage)},getVPage:function(){var a=this.pager.getVPage&&this.pager.getVPage();return BI.isNotNull(a)?a:(a=this.pager.getCurrentPage&&this.pager.getCurrentPage(),BI.isNotNull(a)?a:this.vpage)},setWidth:function(a){BI.PageTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.PageTable.superclass.setHeight.apply(this,arguments);var b=!1;this.pager.alwaysShowPager?b=!0:this.pager.hasHNext&&this.pager.hasHNext()?b=!0:this.pager.hasHPrev&&this.pager.hasHPrev()?b=!0:this.pager.hasVNext&&this.pager.hasVNext()?b=!0:this.pager.hasVPrev&&this.pager.hasVPrev()?b=!0:this.pager.hasNext&&this.pager.hasNext()?b=!0:this.pager.hasPrev&&this.pager.hasPrev()&&(b=!0),this.table.setHeight(a-(b?30:0))},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.columnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getVerticalScroll:function(){return this.table.getVerticalScroll()},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},restore:function(){this.table.restore()},attr:function(){BI.PageTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},populate:function(){this.pager.populate(),this.table.populate.apply(this.table,arguments)},destroy:function(){this.table.destroy(),this.pager&&this.pager.destroy(),BI.PageTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.page_table",BI.PageTable),BI.PreviewTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table-cell",text:""})},_init:function(){BI.PreviewTableCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.preview_table_cell",BI.PreviewTableCell),BI.PreviewTableHeaderCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTableHeaderCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table-header-cell",text:""})},_init:function(){BI.PreviewTableHeaderCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.preview_table_header_cell",BI.PreviewTableHeaderCell),BI.PreviewTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table",isNeedFreeze:!1,freezeCols:[],rowSize:null,columnSize:[],headerRowSize:30,header:[],items:[]})},_init:function(){BI.PreviewTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.table=BI.createWidget({type:"bi.table_view",element:this,isNeedResize:!1,isResizeAdapt:!1,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,rowSize:b.rowSize,columnSize:b.columnSize,headerRowSize:b.headerRowSize,header:BI.map(b.header,function(a,b){return BI.map(b,function(a,b){return BI.extend({type:"bi.preview_table_header_cell"},b)})}),items:BI.map(b.items,function(a,b){return BI.map(b,function(a,b){return BI.extend({type:"bi.preview_table_cell"},b)})})}),this.table.on(BI.Table.EVENT_TABLE_AFTER_INIT,function(){a._adjustColumns(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT,arguments)}),this.table.on(BI.Table.EVENT_TABLE_RESIZE,function(){a._adjustColumns()})},_hasAdaptCol:function(a){return BI.any(a,function(a,b){return""===b})},_isPercentage:function(a){return a[0]<=1},_adjustColumns:function(){var a=this.options;if(a.isNeedFreeze===!0){if(this._isPercentage(a.columnSize)){if(this._hasAdaptCol(a.columnSize)){var b=[],c=0;BI.each(a.columnSize,function(a,d){""===d?b.push(a):c+=d}),c=1-c;var d=c/b.length;BI.each(b,function(b,c){a.columnSize[c]=d})}var e=0!==BI.first(a.freezeCols),f=[],g=[];BI.each(a.columnSize,function(b,c){a.freezeCols.contains(b)?f.push(c):g.push(c)});var h=BI.sum(f),i=BI.sum(g);BI.each(f,function(a,b){f[a]=b/h}),BI.each(g,function(a,b){g[a]=b/i}),this.table.setRegionColumnSize(e?["fill",h]:[h,"fill"]),this.table.setColumnSize(e?g.concat(f):f.concat(g))}}else(this._hasAdaptCol(a.columnSize)||this._isPercentage(a.columnSize))&&this.table.setRegionColumnSize(["100%"])},setColumnSize:function(a){return this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){return this.table.setHeaderColumnSize(a)},setRegionColumnSize:function(a){return this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},setVerticalScroll:function(a){return this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){return this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){return this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},getColumns:function(){return this.table.getColumns()},populate:function(a,b){this.table.populate(a,b)}}),BI.PreviewTable.EVENT_CHANGE="PreviewTable.EVENT_CHANGE",BI.shortcut("bi.preview_table",BI.PreviewTable),BI.QuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-combo",behaviors:{},height:25})},_init:function(){BI.QuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.quarter_trigger",value:b.value}),this.trigger.on(BI.QuarterTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.QuarterTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.QuarterTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM))}),this.popup=BI.createWidget({type:"bi.quarter_popup",behaviors:b.behaviors,value:b.value}),this.popup.on(BI.QuarterPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.QuarterCombo.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.QuarterCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return BI.isNull(this.popup)?this.options.value||"":this.popup.getValue()||""}}),BI.QuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.quarter_combo",BI.QuarterCombo),BI.QuarterPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-popup",behaviors:{}})},_init:function(){BI.QuarterPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[{text:Date._QN[1],value:1},{text:Date._QN[2],value:2},{text:Date._QN[3],value:3},{text:Date._QN[4],value:4}];c=BI.map(c,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"left",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:25})}),this.quarter=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(c,{}),layouts:[{type:"bi.vertical"}],value:b.value}),this.quarter.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.quarter.getValue()[0]},setValue:function(a){this.quarter.setValue([a])}}),BI.QuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quarter_popup",BI.QuarterPopup),BI.QuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,textWidth:40,errorText:BI.i18nText("BI-Quarter_Trigger_Error_Text")},_defaultConfig:function(){return BI.extend(BI.QuarterTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-quarter-trigger bi-border",height:24})},_init:function(){BI.QuarterTrigger.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<=4},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.QuarterTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.QuarterTrigger.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.QuarterTrigger.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.QuarterTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.QuarterTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-quarter-text",text:BI.i18nText("BI-Multi_Date_Quarter"),width:c.textWidth},width:c.textWidth},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]}),this.setValue(b.value)},setValue:function(a){a=a||"",this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return this.editor.getValue()}}),BI.QuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.QuarterTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.QuarterTrigger.EVENT_START="EVENT_START",BI.QuarterTrigger.EVENT_STOP="EVENT_STOP",BI.QuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.quarter_trigger",BI.QuarterTrigger),BI.ResponisveTable=BI.inherit(BI.Widget,{_const:{perColumnSize:100},_defaultConfig:function(){return BI.extend(BI.ResponisveTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-responsive-table",isNeedFreeze:!1,freezeCols:[],logic:{dynamic:!1},isNeedMerge:!1,mergeCols:[],mergeRule:function(a,b){return BI.isEqual(a,b)},columnSize:[],headerRowSize:25,footerRowSize:25,rowSize:25,regionColumnSize:!1,header:[],footer:!1,items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.ResponisveTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.table=BI.createWidget({type:"bi.table_view",element:this,logic:b.logic,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,headerRowSize:b.headerRowSize,footerRowSize:b.footerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:b.header,footer:b.footer,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_AFTER_INIT,function(){a._initRegionSize(),a.table.resize(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT,arguments)}),this.table.on(BI.Table.EVENT_TABLE_RESIZE,function(){a._resizeRegion(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE,function(){a.fireEvent(BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_REGION_RESIZE,function(){b.isNeedResize===!0&&a._isAdaptiveColumn()&&a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE,function(){a._resizeBody(),a.fireEvent(BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_COLUMN_RESIZE,function(){a.fireEvent(BI.Table.EVENT_TABLE_COLUMN_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){a._resizeRegion(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_initRegionSize:function(){var a=this.options;if(a.isNeedFreeze===!0){var b=this.table.getRegionColumnSize(),c=this.table.element.width();if(!b[0]||"fill"===b[0]||b[0]>c||b[1]>c){var d=a.freezeCols;if(0===d.length)this.table.setRegionColumnSize([0,"fill"]);else if(d.length>0&&d.lengtha.columnSize.length/2&&(e=2*c/3),this.table.setRegionColumnSize([e,"fill"])}else this.table.setRegionColumnSize(["fill",0])}}},_getBlockSize:function(){var a=this.options,b=this.table.getCalculateColumnSize();if(a.isNeedFreeze===!0){var c=[],d=[];BI.each(b,function(b,e){a.freezeCols.contains(b)?c.push(e):d.push(e)});var e=BI.sum(c)+c.length,f=BI.sum(d)+d.length;return{sumLeft:e,sumRight:f,left:c,right:d}}return{size:b,sum:BI.sum(b)+b.length}},_isAdaptiveColumn:function(a){return!(BI.last(a||this.table.getColumnSize())>1.05)},_resizeHeader:function(){var a=this,b=this.options;if(b.isNeedFreeze===!0)if(this._isAdaptiveColumn()){var c=this.table.getCalculateColumnSize();this.table.setHeaderColumnSize(c)}else{var d=this.table.getClientRegionColumnSize(),e=this._getBlockSize(),f=e.sumLeft,g=e.sumRight,h=e.left,i=e.right;h[h.length-1]+=d[0]-f,i[i.length-1]+=d[1]-g;var j=BI.clone(h),k=BI.clone(i);j[j.length-1]="",k[k.length-1]="",this.table.setColumnSize(j.concat(k)),e=a._getBlockSize(),h[h.length-1]0&&a.freezeCols.length=d+e)&&this.table.setRegionColumnSize([d,"fill"]),this._resizeRegion()}},_resizeRegion:function(){var a=this.options,b=this.table.getCalculateRegionColumnSize();if(a.isNeedFreeze===!0&&a.freezeCols.length>0&&a.freezeCols.lengtha.columnSize.length/2&&(e=2*c/3),this.table.setRegionColumnSize([e,"fill"])}}},resize:function(){this.table.resize(),this._resizeRegion(),this._resizeHeader()},setColumnSize:function(a){this.table.setColumnSize(a),this._adjustRegion(),this._resizeHeader()},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){this.table.setHeaderColumnSize(a),this._adjustRegion(),this._resizeHeader()},setRegionColumnSize:function(a){this.table.setRegionColumnSize(a),this._resizeHeader()},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},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()},getColumns:function(){return this.table.getColumns()},attr:function(){BI.ResponisveTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},populate:function(a){var b=this,c=this.options;this.table.populate.apply(this.table,arguments),c.isNeedFreeze===!0&&BI.nextTick(function(){b._initRegionSize(),b.table.resize(),b._resizeHeader()})}}),BI.shortcut("bi.responsive_table",BI.ResponisveTable),BI.SelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-first-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.first_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_first_plus_group_node",BI.SelectTreeFirstPlusGroupNode),BI.SelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-last-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.last_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_last_plus_group_node",BI.SelectTreeLastPlusGroupNode),BI.SelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-mid-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.mid_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_mid_plus_group_node",BI.SelectTreeMidPlusGroupNode),BI.SelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-combo",height:30,text:"",items:[],value:""})},_init:function(){BI.SelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value}),this.popup=BI.createWidget({type:"bi.select_level_tree",items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView()})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.shortcut("bi.select_tree_combo",BI.SelectTreeCombo),BI.SelectTreeExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-expander",trigger:"click",toggle:!0,direction:"bottom",isDefaultInit:!0,el:{},popup:{}})},_init:function(){BI.SelectTreeExpander.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({stopPropagation:!0},b.el)),this.trigger.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&this.isSelected()&&a.expander.setValue([]),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.expander=BI.createWidget({type:"bi.expander",element:this,trigger:b.trigger,toggle:b.toggle,direction:b.direction,isDefaultInit:b.isDefaultInit,el:this.trigger,popup:b.popup}),this.expander.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.trigger.setSelected(!1), -a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){BI.contains(a,this.trigger.getValue())?(this.trigger.setSelected(!0),this.expander.setValue([])):(this.trigger.setSelected(!1),this.expander.setValue(a))},getValue:function(){return this.trigger.isSelected()?[this.trigger.getValue()]:this.expander.getValue()},populate:function(a){this.expander.populate(a)}}),BI.shortcut("bi.select_tree_expander",BI.SelectTreeExpander),BI.SelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-level-tree",tipText:BI.i18nText("BI-No_Selected_Item"),items:[],value:""})},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={layer:b};if(e.id=e.id||BI.UUID(),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.select_tree_first_plus_group_node";break;case a.length-1:f.type="bi.select_tree_last_plus_group_node";break;default:f.type="bi.select_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children)}else{switch(d){case a.length-1:f.type="bi.last_tree_leaf_item";break;default:f.type="bi.mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_init:function(){BI.SelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{type:"bi.select_tree_expander",isDefaultInit:!0},items:this._formatItems(BI.Tree.transformToTreeFormat(b.items)),value:b.value,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SelectTreePopup.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.SelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a)))}}),BI.SelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_level_tree",BI.SelectTreePopup),BI.SequenceTableDynamicNumber=BI.inherit(BI.SequenceTableTreeNumber,{_defaultConfig:function(){return BI.extend(BI.SequenceTableDynamicNumber.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-sequence-table-dynamic-number"})},_init:function(){BI.SequenceTableDynamicNumber.superclass._init.apply(this,arguments)},_formatNumber:function(a){function b(a){var c=0;return BI.isNotEmptyArray(a.children)?(BI.each(a.children,function(a,d){c+=b(d)}),a.children.length>1&&BI.isNotEmptyArray(a.values)&&c++):c++,c}var c=this.options,d=[],e=this._getStart(a),f=0,g=0;return BI.each(a,function(a,h){BI.isArray(h.children)&&(BI.each(h.children,function(a,h){var i=b(h);d.push({text:e++,start:f,top:g,cnt:i,index:a,height:i*c.rowSize}),f+=i,g+=i*c.rowSize}),BI.isNotEmptyArray(h.values)&&(d.push({text:BI.i18nText("BI-Summary_Values"),start:f++,top:g,cnt:1,isSummary:!0,height:c.rowSize}),g+=c.rowSize))}),d}}),BI.shortcut("bi.sequence_table_dynamic_number",BI.SequenceTableDynamicNumber),BI.SequenceTableListNumber=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTableListNumber.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table-list-number",isNeedFreeze:!1,scrollTop:0,startSequence:1,headerRowSize:25,rowSize:25,sequenceHeaderCreator:null,header:[],items:[],crossHeader:[],crossItems:[],pageSize:20})},_init:function(){BI.SequenceTableListNumber.superclass._init.apply(this,arguments);var a=this.options;this.start=a.startSequence,this.renderedCells=[],this.renderedKeys=[],this.container=BI.createWidget({type:"bi.absolute",width:60,scrollable:!1}),this.scrollContainer=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.container]}),this.headerContainer=BI.createWidget({type:"bi.absolute",cls:"bi-border",width:58,scrollable:!1}),this.layout=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.headerContainer,height:a.headerRowSize*a.header.length-2},{el:{type:"bi.layout"},height:2},{el:this.scrollContainer}]}),this._populate()},_layout:function(){var a=this.options,b=a.headerRowSize*a.header.length-2,c=this.layout.attr("items");a.isNeedFreeze===!1?(c[0].height=0,c[1].height=0):a.isNeedFreeze===!0&&(c[0].height=b,c[1].height=2),this.layout.attr("items",c),this.layout.resize(),this.container.setHeight(a.items.length*a.rowSize);try{this.scrollContainer.element.scrollTop(a.scrollTop)}catch(d){}},_createHeader:function(){var a=this.options;BI.createWidget({type:"bi.absolute",element:this.headerContainer,items:[{el:a.sequenceHeaderCreator||{type:"bi.table_style_cell",cls:"sequence-table-title-cell",styleGetter:a.headerCellStyleGetter,text:BI.i18nText("BI-Number_Index")},left:0,top:0,right:0,bottom:0}]})},_calculateChildrenToRender:function(){for(var a=this,b=this.options,c=BI.clamp(b.scrollTop,0,b.rowSize*b.items.length-(b.height-b.header.length*b.headerRowSize)+BI.DOM.getScrollWidth()),d=Math.floor(c/b.rowSize),e=d+Math.floor((b.height-b.header.length*b.headerRowSize)/b.rowSize),f=[],g=[],h=d,i=0;h<=e&&h-1)b.rowSize!==this.renderedCells[j]._height&&(this.renderedCells[j]._height=b.rowSize,this.renderedCells[j].el.setHeight(b.rowSize)),this.renderedCells[j].top!==k&&(this.renderedCells[j].top=k,this.renderedCells[j].el.element.css("top",k+"px")),f.push(this.renderedCells[j]);else{var l=BI.createWidget(BI.extend({type:"bi.table_style_cell",cls:"sequence-table-number-cell bi-border-left bi-border-right bi-border-bottom",width:60,height:b.rowSize,text:this.start+h,styleGetter:function(c){return function(){return b.sequenceCellStyleGetter(a.start+h-1)}}(i)}));f.push({el:l,left:0,top:k,_height:b.rowSize})}g.push(this.start+h)}var m={},n={},o=[];BI.each(g,function(b,c){BI.deepContains(a.renderedKeys,c)?m[b]=c:n[b]=c}),BI.each(this.renderedKeys,function(a,b){BI.deepContains(m,b)||BI.deepContains(n,b)||o.push(a)}),BI.each(o,function(b,c){a.renderedCells[c].el.destroy()});var p=[];BI.each(n,function(a){p.push(f[a])}),BI.createWidget({type:"bi.absolute",element:this.container,items:p}),this.renderedCells=f,this.renderedKeys=g},_populate:function(){this.headerContainer.empty(),this._createHeader(),this._layout(),this._calculateChildrenToRender()},setVerticalScroll:function(a){if(this.options.scrollTop!==a){this.options.scrollTop=a;try{this.scrollContainer.element.scrollTop(a)}catch(b){}}},getVerticalScroll:function(){return this.options.scrollTop},setVPage:function(a){a=a<1?1:a;var b=this.options;this.start=(a-1)*b.pageSize+1},_restore:function(){this.options;BI.each(this.renderedCells,function(a,b){b.el.destroy()}),this.renderedCells=[],this.renderedKeys=[]},restore:function(){this._restore()},populate:function(a,b){var c=this.options;a&&a!==this.options.items&&(c.items=a,this._restore()),b&&b!==this.options.header&&(c.header=b),this._populate()}}),BI.shortcut("bi.sequence_table_list_number",BI.SequenceTableListNumber),BI.SequenceTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table",el:{type:"bi.adaptive_table"},sequence:{},isNeedResize:!0,isResizeAdapt:!1,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:[],showSequence:!1,startSequence:1})},_init:function(){BI.SequenceTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.sequence=BI.createWidget(b.sequence,{type:"bi.sequence_table_list_number",invisible:b.showSequence===!1,startSequence:b.startSequence,isNeedFreeze:b.isNeedFreeze,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems,headerRowSize:b.headerRowSize,rowSize:b.rowSize,width:60,height:b.height&&b.height-BI.GridTableScrollbar.SIZE,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter}),this.table=BI.createWidget(b.el,{type:"bi.adaptive_table",width:b.showSequence===!0?b.width-60:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(b){a.sequence.getVerticalScroll()!==this.getVerticalScroll()&&(a.sequence.setVerticalScroll(this.getVerticalScroll()),a.sequence.populate()),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)}),this.htape=BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.sequence,left:0,top:0},{el:this.table,top:0,left:b.showSequence===!0?60:0}]}),this._populate()},_populate:function(){var a=this.options;a.showSequence===!0?(this.sequence.setVisible(!0),this.table.element.css("left","60px"),this.table.setWidth(a.width-60)):(this.sequence.setVisible(!1),this.table.element.css("left","0px"),this.table.setWidth(a.width))},setWidth:function(a){BI.PageTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(this.options.showSequence?a-60:a)},setHeight:function(a){BI.PageTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a),this.sequence.setHeight(a-BI.GridTableScrollbar.SIZE)},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.columnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},hasLeftHorizontalScroll:function(){return this.table.hasLeftHorizontalScroll()},hasRightHorizontalScroll:function(){return this.table.hasRightHorizontalScroll()},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a),this.sequence.setVerticalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},setVPage:function(a){this.sequence.setVPage&&this.sequence.setVPage(a)},setHPage:function(a){this.sequence.setHPage&&this.sequence.setHPage(a)},attr:function(){BI.SequenceTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments),this.sequence.attr.apply(this.sequence,arguments)},restore:function(){this.table.restore(),this.sequence.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d),this._populate(),this.table.populate.apply(this.table,arguments),this.sequence.populate.apply(this.sequence,arguments),this.sequence.setVerticalScroll(this.table.getVerticalScroll())},destroy:function(){this.table.destroy(),BI.SequenceTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.sequence_table",BI.SequenceTable),BI.SingleSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.single_select_list",element:this,logic:{dynamic:!1},value:b.value,el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map([a.storeValue],function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d,selected:!1}});h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.single_select_radio_item",logic:{dynamic:!1},height:25,selected:!1})},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=BI.deepClone(a.value)||[],e=BI.map(d,function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.match.concat(f.find)}return BI.map(d,function(a,b){return{text:b.text,title:b.text,value:b.value,selected:!1}})},setValue:function(a){this.storeValue=a,this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SingleSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_loader",BI.SingleSelectSearchLoader),BI.SingleSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"single-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.single_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_pane",BI.SingleSelectSearchPane),BI.SingleSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_init:function(){BI.SingleSelectCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue),a.trigger.getSearcher().setState(a.storeValue)};this.storeValue=b.value||"",this.requesting=!1,this.trigger=BI.createWidget({type:"bi.single_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(a.getValue()),d.apply(a,arguments)})},value:this.storeValue}),this.trigger.on(BI.SingleSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.SingleSelectTrigger.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.SingleSelectTrigger.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.SingleSelectTrigger.EVENT_CHANGE,function(b,d){a.storeValue=this.getValue(),c()}),this.trigger.on(BI.SingleSelectTrigger.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.single_select_popup_view",ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.SingleSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c()})}},{eventName:BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){a._defaultState()}},{eventName:BI.SingleSelectPopupView.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.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length},value:b.value}),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.SingleSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"single-select-trigger-icon-button"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){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="")},_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.remove(b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||"",this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return this.storeValue},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.SingleSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.single_select_combo",BI.SingleSelectCombo),BI.SingleSelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-list",direction:BI.Direction.Top,logic:{dynamic:!0},items:[],itemsCreator:BI.emptyFn,hasNext:BI.emptyFn,onLoaded:BI.emptyFn,el:{type:"bi.list_pane"}})},_init:function(){BI.SingleSelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.list=BI.createWidget(b.el,{type:"bi.list_pane",items:b.items,itemsCreator:function(c,d){b.itemsCreator(c,function(b){d.apply(a,arguments)})},onLoaded:b.onLoaded,hasNext:b.hasNext,value:b.value}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&a.fireEvent(BI.SingleSelectList.EVENT_CHANGE,c,d),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),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.list)}))))},hasPrev:function(){return this.list.hasPrev()},hasNext:function(){return this.list.hasNext()},prependItems:function(a){this.list.prependItems.apply(this.list,arguments)},addItems:function(a){this.list.addItems.apply(this.list,arguments)},setValue:function(a){this.list.setValue([a])},getValue:function(){return this.list.getValue()[0]},empty:function(){this.list.empty()},populate:function(a){this.list.populate.apply(this.list,arguments)},resetHeight:function(a){this.list.resetHeight?this.list.resetHeight(a):this.list.element.css({"max-height":a+"px"})},setNotSelectedValue:function(){this.list.setNotSelectedValue.apply(this.list,arguments)},getNotSelectedValue:function(){return this.list.getNotSelectedValue()},getAllButtons:function(){return this.list.getAllButtons()},getAllLeaves:function(){return this.list.getAllLeaves()},getSelectedButtons:function(){return this.list.getSelectedButtons()},getNotSelectedButtons:function(){return this.list.getNotSelectedButtons()},getIndexByValue:function(a){return this.list.getIndexByValue(a)},getNodeById:function(a){return this.list.getNodeById(a)},getNodeByValue:function(a){return this.list.getNodeByValue(a)}}),BI.SingleSelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_list",BI.SingleSelectList),BI.SingleSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.single_select_list",element:this,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map([a.storeValue],function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d,selected:!1}});h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&(a.storeValue=f),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.single_select_radio_item",logic:this.options.logic,height:25,selected:!1})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},_assertValue:function(a){a||(a="")},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||"",this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SingleSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_loader",BI.SingleSelectLoader),BI.SingleSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.single_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.SingleSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM)}})},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.SingleSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.SingleSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.single_select_popup_view",BI.SingleSelectPopupView),BI.SingleSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.SingleSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.single_select_searcher",height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker,value:b.value}),this.searcher.on(BI.SingleSelectSearcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_START)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_CHANGE,arguments)});BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:BI.createWidget(),width:30}]})},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch()},setAdapter:function(a){this.searcher.setAdapter(a)},setValue:function(a){this.searcher.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.SingleSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.SingleSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.SingleSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectTrigger.EVENT_START="EVENT_START",BI.SingleSelectTrigger.EVENT_STOP="EVENT_STOP",BI.SingleSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.single_select_trigger",BI.SingleSelectTrigger),BI.SingleSelectEditor=BI.inherit(BI.Widget,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-editor",el:{}})},_init:function(){BI.SingleSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0,value:b.value}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_CLICK_LABEL,function(){})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastValidValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.SingleSelectEditor.EVENT_PAUSE="SingleSelectEditor.EVENT_PAUSE", -BI.shortcut("bi.single_select_editor",BI.SingleSelectEditor),BI.SingleSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.SingleSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.single_select_editor",height:b.height}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.single_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),this.setKeyword(c.keyword),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.SingleSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.SingleSelectSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;a||(a=""),""===a?this.editor.setState(BI.Selection.None):this.editor.setState(b.valueFormatter(a+"")||a+"")},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.SingleSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.SingleSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectSearcher.EVENT_START="EVENT_START",BI.SingleSelectSearcher.EVENT_STOP="EVENT_STOP",BI.SingleSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.single_select_searcher",BI.SingleSelectSearcher),BI.SingleSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.single_select_list",element:this,logic:{dynamic:!1},el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map([a.storeValue],function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d,selected:!1}});h=a._createItems(i)}if(g){for(var j=!1,k=0;k0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_add_pane",BI.SingleSelectSearchPane),BI.SingleSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_init:function(){BI.SingleSelectCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue),a.trigger.getSearcher().setState(a.storeValue)};this.storeValue="",this.requesting=!1,this.trigger=BI.createWidget({type:"bi.single_select_add_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(a.getValue()),d.apply(a,arguments)})}}),this.trigger.on(BI.SingleSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.SingleSelectTrigger.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.SingleSelectTrigger.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.SingleSelectTrigger.EVENT_CHANGE,function(b,d){a.storeValue=this.getValue(),c()}),this.trigger.on(BI.SingleSelectTrigger.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.single_select_popup_view",ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.SingleSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c()})}},{eventName:BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){a._defaultState()}},{eventName:BI.SingleSelectPopupView.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.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.SingleSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"single-select-trigger-icon-button"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){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="")},_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.remove(b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||"",this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return this.storeValue},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.SingleSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.single_select_add_combo",BI.SingleSelectCombo),BI.SingleSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.SingleSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.single_select_add_searcher",height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.SingleSelectSearcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_START)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_CHANGE,arguments)});BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:BI.createWidget(),width:30}]})},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch()},setAdapter:function(a){this.searcher.setAdapter(a)},setValue:function(a){this.searcher.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.SingleSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.SingleSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.SingleSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectTrigger.EVENT_START="EVENT_START",BI.SingleSelectTrigger.EVENT_STOP="EVENT_STOP",BI.SingleSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.single_select_add_trigger",BI.SingleSelectTrigger),BI.SingleSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.SingleSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.single_select_editor",height:b.height}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.single_select_search_add_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),this.setKeyword(c.keyword),b.itemsCreator(c,d)}},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.SingleSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.SingleSelectSearcher.EVENT_SEARCHING,b)})},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;a||(a=""),""===a?this.editor.setState(BI.Selection.None):this.editor.setState(b.valueFormatter(a+"")||a+"")},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.SingleSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.SingleSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectSearcher.EVENT_START="EVENT_START",BI.SingleSelectSearcher.EVENT_STOP="EVENT_STOP",BI.SingleSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.single_select_add_searcher",BI.SingleSelectSearcher),BI.SignTextEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-sign-initial-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",text:"",height:24})},_init:function(){BI.SignTextEditor.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:"sign-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:"left",height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.SignTextEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignTextEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText()}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;BI.nextTick(BI.bind(function(){if(""===this.editor.getValue())this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark");else{var b=this.editor.getValue();b=BI.isEmpty(b)||b==a.text?a.text:b+a.text,this.text.setValue(b),this.text.element.removeClass("bi-water-mark")}},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){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&&ef-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:"100%"},{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[this.label]}],rgap:c.EDITOR_WIDTH,height:c.EDITOR_HEIGHT},top:0,left:0,width:"100%"}]})},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setLabelPosition(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.label.setValue(m),c.value=m,c.fireEvent(BI.SingleSlider.EVENT_CHANGE)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){var b=this.options,c=!1;if(BI.isNumeric(a)&&!(BI.isNull(a)||athis.max))if(b.digit===!1)c=!0;else{var d=(a+"").split(".")[1]||"";c=d.length===b.digit}return c},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setLabelPosition:function(a){this.label.element.css({left:a+"%"})},_setSliderPosition:function(a){this.slider.element.css({left:a+"%"})},_setAllPosition:function(a){this._setSliderPosition(a),this._setLabelPosition(a),this._setBlueTrack(a)},_setVisible:function(a){this.slider.setVisible(a),this.label.setVisible(a)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(a){var b=BI.parseInt(10*a);return(this.max-this.min)*b/1e3+this.min},_getPercentByValue:function(a){return 100*(a-this.min)/(this.max-this.min)},getValue:function(){return this.value},setValue:function(a){var b=this.options;a=BI.parseFloat(a),a=b.digit===!1?a:a.toFixed(b.digit),isNaN(a)||(this._checkValidation(a)&&(this.value=a),a>this.max&&(this.value=this.max),ab&&(this.min=b,this.max=c)},reset:function(){this._setVisible(!1),this.enable=!1,this.value="",this.min=0,this.max=0,this._setBlueTrack(0)},populate:function(){isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,this.label.setErrorText(BI.i18nText("BI-Please_Enter")+this.min+"-"+this.max+BI.i18nText("BI-Basic_De")+BI.i18nText("BI-Basic_Number")),BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?(this.label.setValue(this.value),this._setAllPosition(this._getPercentByValue(this.value))):(this.label.setValue(this.max),this._setAllPosition(100)))}}),BI.SingleSlider.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_slider",BI.SingleSlider),BI.SingleSliderLabel=BI.inherit(BI.Widget,{_constant:{EDITOR_WIDTH:90,EDITOR_HEIGHT:20,HEIGHT:20,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},_defaultConfig:function(){return BI.extend(BI.SingleSliderLabel.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-slider-label bi-slider-track",digit:!1,unit:""})},_init:function(){BI.SingleSliderLabel.superclass._init.apply(this,arguments);var a=this,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&&ef-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.setText(i+b.unit),a.value=i,a.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)}}),this.label=BI.createWidget({type:"bi.label",height:c.HEIGHT,width:c.EDITOR_WIDTH-2}),this._setVisible(!1),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.track,width:"100%",height:c.TRACK_HEIGHT}]}],hgap:7,height:c.TRACK_HEIGHT},top:13,left:0,width:"100%"},{el:d,top:10,left:0,width:"100%"},{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[this.label]}],rgap:c.EDITOR_WIDTH,height:c.EDITOR_HEIGHT},top:0,left:0,width:"100%"}]})},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setLabelPosition(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.label.setValue(m),c.value=m,c.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){return BI.isNumeric(a)&&!(BI.isNull(a)||athis.max)},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setLabelPosition:function(a){this.label.element.css({left:a+"%"})},_setSliderPosition:function(a){this.slider.element.css({left:a+"%"})},_setAllPosition:function(a){this._setSliderPosition(a),this._setLabelPosition(a),this._setBlueTrack(a)},_setVisible:function(a){this.slider.setVisible(a),this.label.setVisible(a)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(a){var b=BI.parseInt(10*a);return(this.max-this.min)*b/1e3+this.min},_getPercentByValue:function(a){return 100*(a-this.min)/(this.max-this.min)},getValue:function(){return this.value},setValue:function(a){var b=this.options;a=BI.parseFloat(a),a=b.digit===!1?a:a.toFixed(b.digit),isNaN(a)||(this._checkValidation(a)&&(this.value=a),a>this.max&&(this.value=this.max),ab&&(this.min=b,this.max=c)},reset:function(){this._setVisible(!1),this.enable=!1,this.value="",this.min=0,this.max=0,this._setBlueTrack(0)},populate:function(){var a=this.options;isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?(this.label.setValue(this.value+a.unit),this._setAllPosition(this._getPercentByValue(this.value))):(this.label.setValue(this.max+a.unit),this._setAllPosition(100)))}}),BI.SingleSliderLabel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_slider_label",BI.SingleSliderLabel),BI.SingleSliderNormal=BI.inherit(BI.Widget,{ -_constant:{HEIGHT:28,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},props:{baseCls:"bi-single-slider-normal bi-slider-track",minMax:{min:0,max:100}},render:function(){var a=this,b=this._constant,c=this._createTrack();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:b.SLIDER_WIDTH_HALF,height:b.SLIDER_HEIGHT});return d.element.click(function(c){if(a.enable){var d=c.clientX-a.element.offset().left-b.SLIDER_WIDTH_HALF,e=a.track.element[0].scrollWidth,f=0;d<0&&(f=0),d>0&&de-b.SLIDER_WIDTH&&(f=100);var g=BI.parseFloat(f.toFixed(1));a._setAllPosition(g);var h=a._getValueByPercent(g);a.value=h,a.fireEvent(BI.SingleSlider.EVENT_CHANGE)}}),{type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:c,width:"100%",height:b.TRACK_HEIGHT}]}],hgap:7,height:b.TRACK_HEIGHT},top:3,left:0,width:"100%"},{el:d,top:0,left:0,width:"100%"}]}},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.value=m,c.fireEvent(BI.SingleSliderNormal.EVENT_DRAG,m)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrack:function(){var a=this;this._constant;return this.grayTrack=BI.createWidget({type:"bi.layout",cls:"gray-track",height:6}),this.blueTrack=BI.createWidget({type:"bi.layout",cls:"blue-track bi-high-light-background",height:6}),this.options.color&&this.blueTrack.element.css({"background-color":this.options.color}),{type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}],ref:function(b){a.track=b}}},_checkValidation:function(a){return!(BI.isNull(a)||athis.max)},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setSliderPosition:function(a){this.slider.element.css({left:a+"%"})},_setAllPosition:function(a){this._setSliderPosition(a),this._setBlueTrack(a)},_setVisible:function(a){this.slider.setVisible(a)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(a){var b=BI.parseInt(10*a);return(this.max-this.min)*b/1e3+this.min},_getPercentByValue:function(a){return 100*(a-this.min)/(this.max-this.min)},getValue:function(){return this.value},setValue:function(a){var b=BI.parseFloat(a);isNaN(b)||(this._checkValidation(b)&&(this.value=b),b>this.max&&(this.value=this.max),bb&&(this.min=b,this.max=c)},reset:function(){this._setVisible(!1),this.enable=!1,this.value="",this.min=0,this.max=0,this._setBlueTrack(0)},populate:function(){isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?this._setAllPosition(this._getPercentByValue(this.value)):this._setAllPosition(100))}}),BI.SingleSliderNormal.EVENT_DRAG="EVENT_DRAG",BI.shortcut("bi.single_slider_normal",BI.SingleSliderNormal),BI.SingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-combo",trigger:{},height:24,text:"",items:[],value:""})},_init:function(){BI.SingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value},b.trigger)),this.popup=BI.createWidget({type:"bi.single_level_tree",items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.SingleTreeCombo.EVENT_CHANGE)})},populate:function(a){this.combo.populate(a)},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.SingleTreeCombo.EVENT_CHANGE="SingleTreeCombo.EVENT_CHANGE",BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.single_tree_combo",BI.SingleTreeCombo),BI.SingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-level-tree",tipText:BI.i18nText("BI-No_Selected_Item"),items:[],value:""})},_init:function(){BI.SingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{isDefaultInit:!0},items:b.items,value:b.value,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SingleTreePopup.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.SingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.SingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_level_tree",BI.SingleTreePopup),BI.SingleTreeTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SingleTreeTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-trigger",height:24,text:"",items:[],value:""})},_init:function(){BI.SingleTreeTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,text:a.text,items:a.items,height:a.height,value:a.value})},_checkTitle:function(){var a=this,b=this.getValue();BI.any(this.options.items,function(c,d){if(b.contains(d.value))return a.trigger.setTitle(d.text||d.value),!0})},setValue:function(a){a=BI.isArray(a)?a:[a],this.options.value=a,this.trigger.setValue(a),this._checkTitle()},getValue:function(){return this.options.value||[]},populate:function(a){BI.SingleTreeTrigger.superclass.populate.apply(this,arguments),this.trigger.populate(a)}}),BI.shortcut("bi.single_tree_trigger",BI.SingleTreeTrigger),BI.SwitchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SwitchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-switch-tree",items:[]})},_init:function(){BI.SwitchTree.superclass._init.apply(this,arguments);this.options;this.tab=BI.createWidget({type:"bi.tab",element:this,tab:null,showIndex:BI.SwitchTree.SelectType.SingleSelect,cardCreator:BI.bind(this._createTree,this)})},_createTree:function(a){var b=this,c=this.options;switch(a){case BI.SwitchTree.SelectType.SingleSelect:return this.levelTree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:!0,items:BI.deepClone(c.items),value:c.value}),this.levelTree.on(BI.LevelTree.EVENT_CHANGE,function(){b.fireEvent(BI.SwitchTree.EVENT_CHANGE,arguments)}),this.levelTree;case BI.SwitchTree.SelectType.MultiSelect:return this.tree=BI.createWidget({type:"bi.simple_tree",items:this._removeIsParent(BI.deepClone(c.items)),value:c.value}),this.tree.on(BI.SimpleTreeView.EVENT_CHANGE,function(){b.fireEvent(BI.SwitchTree.EVENT_CHANGE,arguments)}),this.tree}},_removeIsParent:function(a){return BI.each(a,function(a,b){BI.isNotNull(b.isParent)&&delete b.isParent}),a},switchSelect:function(){switch(this.getSelect()){case BI.SwitchTree.SelectType.SingleSelect:this.setSelect(BI.SwitchTree.SelectType.MultiSelect);break;case BI.SwitchTree.SelectType.MultiSelect:this.setSelect(BI.SwitchTree.SelectType.SingleSelect)}},setSelect:function(a){this.tab.setSelect(a)},getSelect:function(){return this.tab.getSelect()},setValue:function(a){switch(this.storeValue=a,this.getSelect()){case BI.SwitchTree.SelectType.SingleSelect:this.levelTree.setValue(a);break;case BI.SwitchTree.SelectType.MultiSelect:this.tree.setValue(a)}},getValue:function(){return this.tab.getValue()},populate:function(a){this.options.items=a,BI.isNotNull(this.levelTree)&&this.levelTree.populate(BI.deepClone(a)),BI.isNotNull(this.tree)&&this.tree.populate(this._removeIsParent(BI.deepClone(a)))}}),BI.SwitchTree.EVENT_CHANGE="SwitchTree.EVENT_CHANGE",BI.SwitchTree.SelectType={SingleSelect:BI.Selection.Single,MultiSelect:BI.Selection.Multi},BI.shortcut("bi.switch_tree",BI.SwitchTree),BI.DateInterval=BI.inherit(BI.Single,{constants:{height:25,width:25,lgap:15,offset:-15,timeErrorCls:"time-error",DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){var a=BI.DateInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-date-interval"})},_init:function(){var a=this,b=this.options;BI.DateInterval.superclass._init.apply(this,arguments),b.value=b.value||{},this.left=this._createCombo(b.value.start),this.right=this._createCombo(b.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:this.constants.height,items:[{type:"bi.absolute",items:[{el:a.left,left:this.constants.offset,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[a.label]})},_createCombo:function(a){var b=this,c=BI.createWidget({type:"bi.dynamic_date_combo",value:a});return c.on(BI.DynamicDateCombo.EVENT_ERROR,function(){b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.DateInterval.EVENT_ERROR)}),c.on(BI.DynamicDateCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.DateInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicDateCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.DateInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW,function(){b.left.hidePopupView(),b.right.hidePopupView()}),c.on(BI.DynamicDateCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),b.fireEvent(BI.DateInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.DateInterval.EVENT_CHANGE))}),c},_dateCheck:function(a){return BI.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")===a||BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")===a||BI.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")===a||BI.parseDateTime(a,"%Y-%X-%e").print("%Y-%X-%e")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.constants.DATE_MIN_VALUE,this.constants.DATE_MAX_VALUE)[0]},_check:function(a,b){var c=a.match(/\d+/g),d=b.match(/\d+/g);return this._dateCheck(a)&&BI.checkDateLegal(a)&&this._checkVoid({year:c[0],month:c[1],day:c[2]})&&this._dateCheck(b)&&BI.checkDateLegal(b)&&this._checkVoid({year:d[0],month:d[1],day:d[2]})},_compare:function(a,b){return a=BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d"),b=BI.parseDateTime(b,"%Y-%X-%d").print("%Y-%X-%d"),BI.isNotNull(a)&&BI.isNotNull(b)&&a>b},_setTitle:function(a){this.left.setTitle(a),this.right.setTitle(a),this.label.setTitle(a)},_clearTitle:function(){this.left.setTitle(""),this.right.setTitle(""),this.label.setTitle("")},setValue:function(a){a=a||{},this.left.setValue(a.start),this.right.setValue(a.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.DateInterval.EVENT_VALID="EVENT_VALID",BI.DateInterval.EVENT_ERROR="EVENT_ERROR",BI.DateInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.date_interval",BI.DateInterval),BI.TimeInterval=BI.inherit(BI.Single,{constants:{height:25,width:25,lgap:15,offset:-15,timeErrorCls:"time-error",DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){var a=BI.TimeInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-time-interval"})},_init:function(){var a=this,b=this.options;BI.TimeInterval.superclass._init.apply(this,arguments),b.value=b.value||{},this.left=this._createCombo(b.value.start),this.right=this._createCombo(b.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:this.constants.height,items:[{type:"bi.absolute",items:[{el:a.left,left:this.constants.offset,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[a.label]})},_createCombo:function(a){var b=this,c=BI.createWidget({type:"bi.dynamic_date_time_combo",value:a});return c.on(BI.DynamicDateTimeCombo.EVENT_ERROR,function(){b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.TimeInterval.EVENT_ERROR)}),c.on(BI.DynamicDateTimeCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.TimeInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicDateTimeCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.TimeInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW,function(){b.left.hidePopupView(),b.right.hidePopupView()}),c.on(BI.DynamicDateTimeCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),b.fireEvent(BI.TimeInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.TimeInterval.EVENT_CHANGE))}),c},_dateCheck:function(a){return BI.parseDateTime(a,"%Y-%x-%d %H:%M:%S").print("%Y-%x-%d %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%X-%d %H:%M:%S").print("%Y-%X-%d %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%x-%e %H:%M:%S").print("%Y-%x-%e %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%X-%e %H:%M:%S").print("%Y-%X-%e %H:%M:%S")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.constants.DATE_MIN_VALUE,this.constants.DATE_MAX_VALUE)[0]},_check:function(a,b){var c=a.match(/\d+/g),d=b.match(/\d+/g);return this._dateCheck(a)&&BI.checkDateLegal(a)&&this._checkVoid({year:c[0],month:c[1],day:c[2]})&&this._dateCheck(b)&&BI.checkDateLegal(b)&&this._checkVoid({year:d[0],month:d[1],day:d[2]})},_compare:function(a,b){return a=BI.parseDateTime(a,"%Y-%X-%d %H:%M:%S").print("%Y-%X-%d %H:%M:%S"),b=BI.parseDateTime(b,"%Y-%X-%d %H:%M:%S").print("%Y-%X-%d %H:%M:%S"),BI.isNotNull(a)&&BI.isNotNull(b)&&a>b},_setTitle:function(a){this.left.setTitle(a),this.right.setTitle(a),this.label.setTitle(a)},_clearTitle:function(){this.left.setTitle(""),this.right.setTitle(""),this.label.setTitle("")},setValue:function(a){a=a||{},this.left.setValue(a.start),this.right.setValue(a.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.TimeInterval.EVENT_VALID="EVENT_VALID",BI.TimeInterval.EVENT_ERROR="EVENT_ERROR",BI.TimeInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.time_interval",BI.TimeInterval),BI.DynamicYearCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-card"},render:function(){var a=this;return{type:"bi.vertical",items:[{type:"bi.label",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),textAlign:"left",height:24},{type:"bi.dynamic_date_param_item",ref:function(){a.item=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]}],vgap:10,hgap:10}},_createValue:function(a,b){return{dateType:a,value:Math.abs(b),offset:b>0?1:0}},setValue:function(a){a=a||{year:0},this.item.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR,a.year))},getValue:function(){var a=this.item.getValue();return{year:0===a.offset?-a.value:a.value}}}),BI.DynamicYearCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_card",BI.DynamicYearCard),BI.StaticYearCard=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.StaticYearCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-card",behaviors:{},min:"1900-01-01",max:"2099-12-31"})},_createYearCalendar:function(a){var b=this.options,c=this._year,d=BI.createWidget({type:"bi.year_calendar",behaviors:b.behaviors,min:b.min,max:b.max,logic:{dynamic:!0},year:c+12*a});return d.setValue(this._year),d},_init:function(){BI.StaticYearCard.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedYear=this._year=BI.getDate().getFullYear(),this.backBtn=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:25,height:25,value:-1,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.navigation.setSelect(a.navigation.getSelect()-1),a._checkLeftValid(),a._checkRightValid()}}]}),this.preBtn=BI.createWidget({type:"bi.icon_button",cls:"next-page-h-font",width:25,height:25,value:1,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.navigation.setSelect(a.navigation.getSelect()+1),a._checkLeftValid(),a._checkRightValid()}}]}),this.navigation=BI.createWidget({type:"bi.navigation",direction:"top",element:this,single:!0,logic:{dynamic:!0},tab:{type:"bi.htape",cls:"bi-border-top bi-border-bottom",height:30,items:[{el:{type:"bi.center_adapt",items:[a.backBtn]},width:25},{type:"bi.layout"},{el:{type:"bi.center_adapt",items:[a.preBtn]},width:25}]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(a.selectedYear);var b=this.getSelectedCard();a.backBtn.setEnable(!b.isFrontYear()),a.preBtn.setEnable(!b.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedYear=this.getValue(),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.StaticYearCard.EVENT_CHANGE,a.selectedYear)}),BI.isKey(b.value)&&this.setValue(b.value)},_checkLeftValid:function(){var a=(this.options,!0);return this.backBtn.setEnable(a),a},_checkRightValid:function(){var a=(this.options,!0);return this.preBtn.setEnable(a),a},getValue:function(){return{year:this.selectedYear}},setValue:function(a){var b=this.options;a=a||{};var c=a.year;BI.checkDateVoid(c,1,1,b.min,b.max)[0]?(c=BI.getDate().getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(c)),this.navigation.setValue("")):(this.selectedYear=BI.parseInt(c),this.navigation.setSelect(BI.YearCalendar.getPageByYear(c)),this.navigation.setValue(this.selectedYear)),this._checkLeftValid(),this._checkRightValid()}}),BI.StaticYearCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.static_year_card",BI.StaticYearCard),BI.DynamicYearCombo=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-combo bi-border",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicYearCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value,this.trigger=BI.createWidget({type:"bi.dynamic_year_trigger",min:b.min,max:b.max,value:b.value||""}),this.trigger.on(BI.DynamicYearTrigger.EVENT_FOCUS,function(){a.storeTriggerValue=this.getKey()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_STOP,function(){a.combo.showView()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_ERROR,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeTriggerValue?(a.storeValue=a.trigger.getValue(),a.setValue(a.storeValue)):this.getKey()||(a.storeValue=null,a.setValue()),a.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM))}),this.combo=BI.createWidget({type:"bi.combo",isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.dynamic_year_popup",ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicYearPopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({year:b.getFullYear()}),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}],behaviors:b.behaviors,min:b.min,max:b.max},value:b.value||""}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicYearCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.htape",element:this,ref:function(){a.comboWrapper=this},items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24,ref:function(){a.changeIcon=this}},width:24},this.combo]}),this._checkDynamicValue(b.value)},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.DynamicYearCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue}}),BI.DynamicYearCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_year_combo",BI.DynamicYearCombo),BI.extend(BI.DynamicYearCombo,{Static:1,Dynamic:2}),BI.DynamicYearPopup=BI.inherit(BI.Widget,{constants:{tabHeight:30},props:{baseCls:"bi-year-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31",width:180,height:240},render:function(){var a=this;this.options;return this.storeValue={type:BI.DynamicYearCombo.Static},{type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-left bi-border-right bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Current_Year"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Basic_Current_Year")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=a.print("%Y"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-border-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Basic_Year_Fen"),value:BI.DynamicYearCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicYearCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(c){switch(c){case BI.DynamicYearCombo.Dynamic:return{type:"bi.dynamic_year_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicYearCombo.Static:default:return{type:"bi.static_year_card",behaviors:b.behaviors,min:a.options.min,max:a.options.max,listeners:[{eventName:BI.StaticYearCard.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearPopup.EVENT_CHANGE)}}],ref:function(){a.year=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicYearCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.year.setValue({year:c.getFullYear()}),a._setInnerValue();break;case BI.DynamicYearCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicYearCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:this.year.setValue(c),this.textButton.setValue(BI.i18nText("BI-Basic_Current_Year")),this.textButton.setEnable(!0)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicYearPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_popup",BI.DynamicYearPopup),BI.DynamicYearTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,errorText:BI.i18nText("BI-Please_Input_Positive_Integer"),errorTextInvalid:BI.i18nText("BI-Year_Trigger_Invalid_Text")},_defaultConfig:function(){return BI.extend(BI.DynamicYearTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-year-trigger",min:"1900-01-01",max:"2099-12-31",height:24})},_init:function(){BI.DynamicYearTrigger.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)&&!BI.checkDateVoid(a,1,1,b.min,b.max)[0]},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,errorText:function(a){return BI.isPositiveInteger(a)?c.errorTextInvalid:c.errorText}}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.DynamicYearTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DynamicYearTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&a.editor.setValue(b),BI.isNotEmptyString(b)&&(a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:b}}),a.fireEvent(BI.DynamicYearTrigger.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.DynamicYearTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DynamicYearTrigger.EVENT_ERROR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-year-text",text:BI.i18nText("BI-Multi_Date_Year"),width:b.height},width:b.height},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]}),this.setValue(b.value)},_getText:function(a){var b="";return BI.isNotNull(a.year)&&0!==a.year&&(b+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),b},_setInnerValue:function(a,b){var c=a.print("%Y");this.editor.setState(c),this.editor.setValue(c),this.setTitle(BI.isEmptyString(b)?c:b+":"+c)},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:c=c||{},this.editor.setState(c.year),this.editor.setValue(c.year),this.editor.setTitle(c.year)}},getValue:function(){return this.storeValue},getKey:function(){return 0|this.editor.getValue()}}),BI.DynamicYearTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearTrigger.EVENT_START="EVENT_START",BI.DynamicYearTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearTrigger.EVENT_STOP="EVENT_STOP",BI.shortcut("bi.dynamic_year_trigger",BI.DynamicYearTrigger),BI.DynamicYearMonthCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-month-card"},render:function(){var a=this;return{type:"bi.vertical",items:[{type:"bi.label",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),textAlign:"left",height:24},{type:"bi.dynamic_date_param_item",ref:function(){a.year=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]},{type:"bi.dynamic_date_param_item",dateType:BI.DynamicDateCard.TYPE.MONTH,ref:function(){a.month=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]}],vgap:10,hgap:10}},_createValue:function(a,b){return{dateType:a,value:Math.abs(b),offset:b>0?1:0}},setValue:function(a){a=a||{year:0,month:0},this.year.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR,a.year)),this.month.setValue(this._createValue(BI.DynamicDateCard.TYPE.MONTH,a.month))},getValue:function(){var a=this.year.getValue(),b=this.month.getValue();return{year:0===a.offset?-a.value:a.value,month:0===b.offset?-b.value:b.value}}}),BI.DynamicYearMonthCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_month_card",BI.DynamicYearMonthCard), -BI.StaticYearMonthCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-static-year-month-card",behaviors:{}},_createMonths:function(){var a=[1,7,2,8,3,9,4,10,5,11,6,12],b=[];return b.push(a.slice(0,2)),b.push(a.slice(2,4)),b.push(a.slice(4,6)),b.push(a.slice(6,8)),b.push(a.slice(8,10)),b.push(a.slice(10,12)),BI.map(b,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}})})},render:function(){var a=this,b=this.options;return{type:"bi.vertical",items:[{type:"bi.year_picker",ref:function(){a.yearPicker=this},height:30,listeners:[{eventName:BI.YearPicker.EVENT_CHANGE,action:function(){var b=this.getValue();a.setValue({year:b,month:a.selectedMonth})}}]},{type:"bi.button_group",behaviors:b.behaviors,ref:function(){a.month=this},items:this._createMonths(),layouts:[BI.LogicFactory.createLogic("table",BI.extend({dynamic:!0},{columns:2,rows:6,columnSize:[.5,.5],rowSize:25})),{type:"bi.center_adapt",vgap:1,hgap:2}],value:b.value,listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(){a.selectedYear=a.yearPicker.getValue(),a.selectedMonth=this.getValue()[0],a.fireEvent(BI.StaticYearMonthCard.EVENT_CHANGE)}}]}]}},getValue:function(){return{year:this.selectedYear,month:this.selectedMonth}},setValue:function(a){var b=this.options;if(a=a||{},a.year=a.year||0,a.month=a.month||0,BI.checkDateVoid(a.year,a.month,1,b.min,b.max)[0]){var c=BI.getDate().getFullYear(),d=BI.getDate().getMonth();this.selectedYear="",this.selectedMonth="",this.yearPicker.setValue(c),this.month.setValue(d)}else this.selectedYear=BI.parseInt(a.year),this.selectedMonth=BI.parseInt(a.month),this.yearPicker.setValue(this.selectedYear),this.month.setValue(this.selectedMonth)}}),BI.StaticYearMonthCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.static_year_month_card",BI.StaticYearMonthCard),BI.DynamicYearMonthCombo=BI.inherit(BI.Single,{props:{baseCls:"bi-year-month-combo bi-border",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicYearMonthCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value,this.trigger=BI.createWidget({type:"bi.dynamic_year_month_trigger",min:b.min,max:b.max,value:b.value||""}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_STOP,function(){a.combo.showView()}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_ERROR,function(){a.combo.isViewVisible()&&a.combo.hideView(),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_ERROR)}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_VALID,function(){a.fireEvent(BI.DynamicYearMonthCombo.EVENT_VALID)}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(a.storeValue=a.trigger.getValue(),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM))}),this.trigger.on(BI.DynamicYearMonthCombo.EVENT_FOCUS,function(){a.fireEvent(BI.DynamicYearMonthCombo.EVENT_FOCUS)}),this.combo=BI.createWidget({type:"bi.combo",isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.dynamic_year_month_popup",ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicYearMonthPopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({year:b.getFullYear()}),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}],behaviors:b.behaviors,min:b.min,max:b.max},value:b.value||""}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.htape",element:this,ref:function(){a.comboWrapper=this},items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24,ref:function(){a.changeIcon=this}},width:24},this.combo]}),this._checkDynamicValue(b.value)},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.DynamicYearMonthCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},hideView:function(){this.combo.hideView()},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()}}),BI.DynamicYearMonthCombo.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearMonthCombo.EVENT_VALID="EVENT_VALID",BI.DynamicYearMonthCombo.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearMonthCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_year_month_combo",BI.DynamicYearMonthCombo),BI.extend(BI.DynamicYearMonthCombo,{Static:1,Dynamic:2}),BI.DynamicYearMonthPopup=BI.inherit(BI.Widget,{constants:{tabHeight:30},props:{baseCls:"bi-year-month-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31",width:180,height:240},render:function(){var a=this;this.options;return this.storeValue={type:BI.DynamicYearMonthCombo.Static},{type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-left bi-border-right bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Current_Month"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Basic_Current_Month")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=a.print("%Y-%x"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-border-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Basic_Year_Fen"),value:BI.DynamicYearCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicYearCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(c){switch(c){case BI.DynamicYearCombo.Dynamic:return{type:"bi.dynamic_year_month_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicYearCombo.Static:default:return{type:"bi.static_year_month_card",behaviors:b.behaviors,min:a.options.min,max:a.options.max,listeners:[{eventName:BI.StaticYearMonthCard.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearMonthPopup.EVENT_CHANGE)}}],ref:function(){a.year=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicYearCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.year.setValue({year:c.getFullYear(),month:c.getMonth()}),a._setInnerValue();break;case BI.DynamicYearCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicYearCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:this.year.setValue(c),this.textButton.setValue(BI.i18nText("BI-Basic_Current_Month")),this.textButton.setEnable(!0)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicYearMonthPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_month_popup",BI.DynamicYearMonthPopup),BI.DynamicYearMonthTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,errorText:BI.i18nText("BI-Please_Input_Positive_Integer"),errorTextInvalid:BI.i18nText("BI-Year_Trigger_Invalid_Text")},props:{extraCls:"bi-year-month-trigger",min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicYearMonthTrigger.superclass._init.apply(this,arguments);var a=this.options;this.yearEditor=this._createEditor(!0),this.monthEditor=this._createEditor(!1),BI.createWidget({element:this,type:"bi.htape",items:[{type:"bi.center",items:[{type:"bi.htape",items:[this.yearEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Year"),width:a.height},width:a.height}]},{type:"bi.htape",items:[this.monthEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Month"),width:a.height},width:a.height}]}]},{el:{type:"bi.trigger_icon_button",width:a.height},width:a.height}]}),this.setValue(a.value)},_createEditor:function(a){var b=this,c=this.options,d=this._const,e=BI.createWidget({type:"bi.sign_editor",height:c.height,validationChecker:function(b){return a?""===b||BI.isPositiveInteger(b)&&!BI.checkDateVoid(b,1,1,c.min,c.max)[0]:""===b||b>=1&&b<=12&&!BI.checkDateVoid(BI.getDate().getFullYear(),b,1,c.min,c.max)[0]},quitChecker:function(){return!1},watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(a){return BI.isPositiveInteger(a)?d.errorTextInvalid:d.errorText},hgap:d.hgap,vgap:d.vgap,allowBlank:!0});return e.on(BI.SignEditor.EVENT_FOCUS,function(){b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_FOCUS)}),e.on(BI.SignEditor.EVENT_STOP,function(){b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_STOP)}),e.on(BI.SignEditor.EVENT_CONFIRM,function(){var a=e.getValue();if(BI.isNotNull(a)&&e.setValue(a),BI.isNotEmptyString(a)){var c=b.monthEditor.getValue();b.storeValue={type:BI.DynamicDateCombo.Static,value:{year:b.yearEditor.getValue(),month:BI.isEmptyString(b.monthEditor.getValue())?"":c-1}}}b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM)}),e.on(BI.SignEditor.EVENT_SPACE,function(){e.isValid()&&e.blur()}),e.on(BI.SignEditor.EVENT_START,function(){b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_START)}),e.on(BI.SignEditor.EVENT_ERROR,function(){b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_ERROR)}),e.on(BI.SignEditor.EVENT_VALID,function(){var a=b.yearEditor.getValue(),d=b.monthEditor.getValue();BI.isNotEmptyString(a)&&BI.isNotEmptyString(d)&&BI.isPositiveInteger(a)&&d>=1&&d<=12&&!BI.checkDateVoid(a,d,1,c.min,c.max)[0]&&b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_VALID)}),e.on(BI.SignEditor.EVENT_CHANGE,function(){a&&b._autoSwitch(e.getValue())}),e},_yearCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d");return BI.parseDateTime(a,"%Y").print("%Y")===a&&b>=this.options.min&&b<=this.options.max},_autoSwitch:function(a){BI.checkDateLegal(a)&&4===a.length&&this._yearCheck(a)&&this.monthEditor.focus()},_getText:function(a){var b="";return BI.isNotNull(a.year)&&(b+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),BI.isNotNull(a.month)&&0!==a.month&&(b+=Math.abs(a.month)+BI.i18nText("BI-Basic_Year")+(a.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),b},_setInnerValue:function(a,b){var c=a.print("%Y-%x");this.yearEditor.setValue(a.getFullYear()),this.monthEditor.setValue(a.getMonth()+1),this.setTitle(BI.isEmptyString(b)?c:b+":"+c)},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:c=c||{};var f=BI.isNull(c.month)?null:c.month;this.yearEditor.setValue(c.year),this.yearEditor.setTitle(c.year),this.monthEditor.setValue(f),this.monthEditor.setTitle(f)}},getValue:function(){return this.storeValue},getKey:function(){return this.yearEditor.getValue()+"-"+this.monthEditor.getValue()}}),BI.DynamicYearMonthTrigger.EVENT_VALID="EVENT_FOCUS",BI.DynamicYearMonthTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearMonthTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearMonthTrigger.EVENT_START="EVENT_START",BI.DynamicYearMonthTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearMonthTrigger.EVENT_STOP="EVENT_STOP",BI.shortcut("bi.dynamic_year_month_trigger",BI.DynamicYearMonthTrigger),BI.YearMonthInterval=BI.inherit(BI.Single,{constants:{height:25,width:25,lgap:15,offset:-15,timeErrorCls:"time-error",DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},props:{extraCls:"bi-year-month-interval"},_init:function(){var a=this,b=this.options;BI.YearMonthInterval.superclass._init.apply(this,arguments),b.value=b.value||{},this.left=this._createCombo(b.value.start),this.right=this._createCombo(b.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:this.constants.height,items:[{type:"bi.absolute",items:[{el:a.left,left:this.constants.offset,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[a.label]})},_createCombo:function(a){var b=this,c=BI.createWidget({type:"bi.dynamic_year_month_combo",value:a});return c.on(BI.DynamicYearMonthCombo.EVENT_ERROR,function(){b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.YearMonthInterval.EVENT_ERROR)}),c.on(BI.DynamicYearMonthCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.YearMonthInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicYearMonthCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.YearMonthInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW,function(){b.left.hideView(),b.right.hideView()}),c.on(BI.DynamicYearMonthCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),b.fireEvent(BI.YearMonthInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.YearMonthInterval.EVENT_CHANGE))}),c},_dateCheck:function(a){return BI.parseDateTime(a,"%Y-%x").print("%Y-%x")===a||BI.parseDateTime(a,"%Y-%X").print("%Y-%X")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,1,this.constants.DATE_MIN_VALUE,this.constants.DATE_MAX_VALUE)[0]},_check:function(a,b){var c=a.match(/\d+/g),d=b.match(/\d+/g);return this._dateCheck(a)&&BI.checkDateLegal(a)&&this._checkVoid({year:c[0],month:c[1],day:1})&&this._dateCheck(b)&&BI.checkDateLegal(b)&&this._checkVoid({year:d[0],month:d[1],day:1})},_compare:function(a,b){return a=BI.parseDateTime(a,"%Y-%X").print("%Y-%X"),b=BI.parseDateTime(b,"%Y-%X").print("%Y-%X"),BI.isNotNull(a)&&BI.isNotNull(b)&&a>b},_setTitle:function(a){this.left.setTitle(a),this.right.setTitle(a),this.label.setTitle(a)},_clearTitle:function(){this.left.setTitle(""),this.right.setTitle(""),this.label.setTitle("")},setValue:function(a){a=a||{},this.left.setValue(a.start),this.right.setValue(a.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.YearMonthInterval.EVENT_VALID="EVENT_VALID",BI.YearMonthInterval.EVENT_ERROR="EVENT_ERROR",BI.YearMonthInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_month_interval",BI.YearMonthInterval),BI.DynamicYearQuarterCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-month-card"},render:function(){var a=this;return{type:"bi.vertical",items:[{type:"bi.label",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),textAlign:"left",height:24},{type:"bi.dynamic_date_param_item",ref:function(){a.year=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]},{type:"bi.dynamic_date_param_item",dateType:BI.DynamicDateCard.TYPE.QUARTER,ref:function(){a.quarter=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]}],vgap:10,hgap:10}},_createValue:function(a,b){return{dateType:a,value:Math.abs(b),offset:b>0?1:0}},setValue:function(a){a=a||{year:0,month:0},this.year.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR,a.year)),this.quarter.setValue(this._createValue(BI.DynamicDateCard.TYPE.QUARTER,a.quarter))},getValue:function(){var a=this.year.getValue(),b=this.quarter.getValue();return{year:0===a.offset?-a.value:a.value,quarter:0===b.offset?-b.value:b.value}}}),BI.DynamicYearQuarterCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_quarter_card",BI.DynamicYearQuarterCard),BI.StaticYearQuarterCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-static-year-quarter-card",behaviors:{}},_createQuarter:function(){var a=[{text:Date._QN[1],value:1},{text:Date._QN[2],value:2},{text:Date._QN[3],value:3},{text:Date._QN[4],value:4}];return BI.map(a,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"center",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:24})})},render:function(){var a=this,b=this.options;return{type:"bi.vertical",items:[{type:"bi.year_picker",ref:function(){a.yearPicker=this},height:30,listeners:[{eventName:BI.YearPicker.EVENT_CHANGE,action:function(){var b=this.getValue();a.setValue({year:b,quarter:a.selectedQuarter})}}]},{type:"bi.button_group",behaviors:b.behaviors,ref:function(){a.quarter=this},items:this._createQuarter(),layouts:[{type:"bi.vertical",vgap:10}],value:b.value,listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(){a.selectedYear=a.yearPicker.getValue(),a.selectedQuarter=this.getValue()[0],a.fireEvent(BI.StaticYearQuarterCard.EVENT_CHANGE)}}]}]}},getValue:function(){return{year:this.selectedYear,quarter:this.selectedQuarter}},setValue:function(a){var b=this.options;if(a=a||{},a.year=a.year||0,a.quarter=a.quarter||0,BI.checkDateVoid(a.year,a.quarter,1,b.min,b.max)[0]){var c=BI.getDate().getFullYear(),d=BI.getDate().getQuarter();this.selectedYear="",this.selectedQuarter="",this.yearPicker.setValue(c),this.quarter.setValue(d)}else this.selectedYear=BI.parseInt(a.year),this.selectedQuarter=BI.parseInt(a.quarter),this.yearPicker.setValue(this.selectedYear),this.quarter.setValue(this.selectedQuarter)}}),BI.StaticYearQuarterCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.static_year_quarter_card",BI.StaticYearQuarterCard),BI.DynamicYearQuarterCombo=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-quarter-combo bi-border",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicYearQuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value,this.trigger=BI.createWidget({type:"bi.dynamic_year_quarter_trigger",min:b.min,max:b.max,value:b.value||""}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_STOP,function(){a.combo.showView()}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_ERROR,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(a.storeValue=a.trigger.getValue(),a.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM))}),this.combo=BI.createWidget({type:"bi.combo",isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.dynamic_year_quarter_popup",ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicYearQuarterPopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({year:b.getFullYear()}),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}],behaviors:b.behaviors,min:b.min,max:b.max},value:b.value||""}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicYearQuarterCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.htape",element:this,ref:function(){a.comboWrapper=this},items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24,ref:function(){a.changeIcon=this}},width:24},this.combo]}),this._checkDynamicValue(b.value)},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.DynamicYearQuarterCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue}}),BI.DynamicYearQuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearQuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_year_quarter_combo",BI.DynamicYearQuarterCombo),BI.extend(BI.DynamicYearQuarterCombo,{Static:1,Dynamic:2}),BI.DynamicYearQuarterPopup=BI.inherit(BI.Widget,{constants:{tabHeight:30},props:{baseCls:"bi-year-quarter-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31",width:180,height:240},render:function(){var a=this;this.options;return this.storeValue={type:BI.DynamicYearQuarterCombo.Static},{type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-left bi-border-right bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Current_Quarter"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicYearQuarterCombo.Static)this.textButton.setValue(BI.i18nText("BI-Basic_Current_Quarter")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=a.print("%Y-%x"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-border-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Basic_Year_Fen"),value:BI.DynamicYearQuarterCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicYearQuarterCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(c){switch(c){case BI.DynamicYearQuarterCombo.Dynamic:return{type:"bi.dynamic_year_quarter_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicYearQuarterCombo.Static:default:return{type:"bi.static_year_quarter_card",behaviors:b.behaviors,min:a.options.min,max:a.options.max,listeners:[{eventName:BI.DynamicYearCard.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearQuarterPopup.EVENT_CHANGE)}}],ref:function(){a.year=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicYearQuarterCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.year.setValue({year:c.getFullYear(),quarter:c.getQuarter()}),a._setInnerValue();break;case BI.DynamicYearQuarterCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicYearQuarterCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:this.year.setValue(c),this.textButton.setValue(BI.i18nText("BI-Basic_Current_Quarter")),this.textButton.setEnable(!0)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicYearQuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_quarter_popup",BI.DynamicYearQuarterPopup),BI.DynamicYearQuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,errorText:BI.i18nText("BI-Please_Input_Positive_Integer"),errorTextInvalid:BI.i18nText("BI-Year_Trigger_Invalid_Text")},props:{extraCls:"bi-year-quarter-trigger",min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicYearQuarterTrigger.superclass._init.apply(this,arguments);var a=this.options;this.yearEditor=this._createEditor(!0),this.quarterEditor=this._createEditor(!1),BI.createWidget({element:this,type:"bi.htape",items:[{type:"bi.center",items:[{type:"bi.htape",items:[this.yearEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Year"),width:a.height},width:a.height}]},{type:"bi.htape",items:[this.quarterEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Quarter"),width:a.height},width:a.height}]}]},{el:{type:"bi.trigger_icon_button",width:a.height},width:a.height}]}),this.setValue(a.value)},_createEditor:function(a){var b=this,c=this.options,d=this._const,e=BI.createWidget({type:"bi.sign_editor",height:c.height,validationChecker:function(b){return a?""===b||BI.isPositiveInteger(b)&&!BI.checkDateVoid(b,1,1,c.min,c.max)[0]:""===b||b>=1&&b<=4&&!BI.checkDateVoid(BI.getDate().getFullYear(),b,1,c.min,c.max)[0]},quitChecker:function(){return!1},errorText:function(a){return BI.isPositiveInteger(a)?d.errorTextInvalid:d.errorText},watermark:BI.i18nText("BI-Basic_Unrestricted"),hgap:d.hgap,vgap:d.vgap,allowBlank:!0});return e.on(BI.SignEditor.EVENT_FOCUS,function(){b.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_FOCUS)}),e.on(BI.SignEditor.EVENT_STOP,function(){b.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_STOP)}),e.on(BI.SignEditor.EVENT_CONFIRM,function(){var a=e.getValue();if(BI.isNotNull(a)&&e.setValue(a),BI.isNotEmptyString(a)){var c=b.quarterEditor.getValue();b.storeValue={type:BI.DynamicYearQuarterCombo.Static,value:{year:b.yearEditor.getValue(),quarter:BI.isEmptyString(b.quarterEditor.getValue())?"":c}}}b.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM)}),e.on(BI.SignEditor.EVENT_SPACE,function(){e.isValid()&&e.blur()}),e.on(BI.SignEditor.EVENT_START,function(){b.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_START)}),e.on(BI.SignEditor.EVENT_ERROR,function(){b.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_ERROR)}),e.on(BI.SignEditor.EVENT_CHANGE,function(){a&&b._autoSwitch(e.getValue())}),e},_yearCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d");return BI.parseDateTime(a,"%Y").print("%Y")===a&&b>=this.options.min&&b<=this.options.max},_autoSwitch:function(a){BI.checkDateLegal(a)&&4===a.length&&this._yearCheck(a)&&this.quarterEditor.focus()},_getText:function(a){var b="";return BI.isNotNull(a.year)&&(b+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),BI.isNotNull(a.quarter)&&0!==a.quarter&&(b+=Math.abs(a.quarter)+BI.i18nText("BI-Basic_Year")+(a.quarter<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),b},_setInnerValue:function(a,b){var c=a.print("%Y-%x");this.yearEditor.setValue(a.getFullYear()),this.quarterEditor.setValue(a.getQuarter()),this.setTitle(BI.isEmptyString(b)?c:b+":"+c)},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicYearQuarterCombo.Static,c=a.value||a),b){case BI.DynamicYearQuarterCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicYearQuarterCombo.Static:default:c=c||{};var f=BI.isNull(c.quarter)?null:c.quarter;this.yearEditor.setValue(c.year),this.yearEditor.setTitle(c.year),this.quarterEditor.setValue(f),this.quarterEditor.setTitle(f)}},getValue:function(){return this.storeValue}}),BI.DynamicYearQuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearQuarterTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearQuarterTrigger.EVENT_START="EVENT_START",BI.DynamicYearQuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearQuarterTrigger.EVENT_STOP="EVENT_STOP",BI.shortcut("bi.dynamic_year_quarter_trigger",BI.DynamicYearQuarterTrigger),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.match.concat(d.find)}),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,value:{type:BI.Selection.Multi,value:b.value||[]}}),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(BI.AllValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-all-value-chooser-pane",width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.AllValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&(this.items=b.items),this.list=BI.createWidget({type:"bi.multi_select_list",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:b.width,height:b.height}),this.list.on(BI.MultiSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.AllValueChooserPane.EVENT_CHANGE)})},setValue:function(a){this.list.setValue({type:BI.Selection.Multi,value:a||[]})},getValue:function(){var a=this.list.getValue()||{};return a.type===BI.Selection.All?a.assist:a.value||[]},populate:function(){this.list.populate.apply(this.list,arguments)}}),BI.AllValueChooserPane.EVENT_CHANGE="AllValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.all_value_chooser_pane",BI.AllValueChooserPane),BI.AbstractTreeValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractTreeValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn})},_initData:function(a){this.items=a;var b=BI.Tree.treeFormat(a);this.tree=new BI.Tree,this.tree.initTree(b)},_itemsCreator:function(a,b){function c(){switch(a.type){case BI.TreeView.REQ_TYPE_INIT_DATA:d._reqInitTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_ADJUST_DATA:d._reqAdjustTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_SELECT_DATA:d._reqSelectedTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_GET_SELECTED_DATA:d._reqDisplayTreeNode(a,b);break;default:d._reqTreeNode(a,b)}}var d=this,e=this.options;this.items?c():e.itemsCreator({},function(a){d._initData(a),c()})},_reqDisplayTreeNode:function(a,b){function c(a,b,g){return null==g||BI.isEmpty(g)?void BI.each(b.getChildren(),function(d,g){var h=BI.clone(a);h.push(g.value);var i=f._getChildCount(h);e(g,b.id,i),c(h,g,{})}):void BI.each(g,function(b){var h=f._getTreeNode(a,b),i=BI.clone(a);i.push(h.value),e(h,h.parent&&h.parent.id,d(g[b],i)),c(i,h,g[b])})}function d(a,b){return null==a?0:BI.isEmpty(a)?f._getChildCount(b):BI.size(a)}function e(a,b,c){g.push({id:a.id,pId:b,text:a.text+(c>0?"("+BI.i18nText("BI-Basic_Altogether")+c+BI.i18nText("BI-Basic_Count")+")":""),value:a.value,open:!0})}var f=this,g=[],h=a.selectedValues;return null==h||BI.isEmpty(h)?void b({}):(c([],this.tree.getRoot(),h),void b({items:g}))},_reqSelectedTreeNode:function(a,b){function c(a){var b=m.concat(k);if(g(a,b))if(f(b))i._deleteNode(a,b);else{var c=[],j=e(m,k,[],c);j&&BI.isNotEmptyArray(c)&&BI.each(c,function(b,c){var e=i._getNode(a,c);e?i._deleteNode(a,c):d(a,c,BI.last(c))})}if(h(a,b)){var l=[],j=!1;f(b)?j=!0:(j=e(m,k,l),b=m),j===!0&&(d(a,b,k),l.length>0&&BI.each(l,function(b,c){i._buildTree(a,c)}))}}function d(a,b,c){var d=a,e=[],f=[];BI.some(b,function(g,h){var j=d[h];if(null==j){if(0===g)return!0;if(!BI.isEmpty(d))return!0;var k=b.slice(0,g),l=i._getChildren(k);if(f.push(k),e.push(l.length),g===b.length-1&&1===l.length&&l[0]===c)for(var m=e.length-1;m>=0&&1===e[m];m--)i._deleteNode(a,f[m]);else BI.each(l,function(a,e){return g===b.length-1&&e.value===c||void(d[e.value]={})});d=d[h]}else d=j})}function e(a,b,c,d){var f=BI.clone(a);if(f.push(b),i._isMatch(a,b,l))return d&&d.push(f),!0;var g=i._getChildren(f),h=[],j=!1;return BI.each(g,function(a,b){e(f,b.value,c,d)?j=!0:h.push(b.value)}),j===!0&&BI.each(h,function(a,b){var d=BI.clone(f);d.push(b),c.push(d)}),j}function f(a){for(var b=0,c=a.length;bj._const.perPage)break}return f}function d(a,b,c,i,k){if(j._isMatch(b,c,l)){var m=i||h(b,c);return e(b,c,!1,m,!i&&f(b,c),!0,k),[!0,m]}var n=BI.clone(b);n.push(c);var o=j._getChildren(n),p=!1,m=!1,q=i||g(b,c);return BI.each(o,function(b,c){var e=d(a+1,n,c.value,q,k);e[1]===!0&&(m=!0),e[0]===!0&&(p=!0)}),p===!0&&(m=q||h(b,c)&&m,e(b,c,!0,m,!1,!1,k)),[p,m]}function e(a,b,c,d,e,f,g){var h=j._getTreeNode(a,b);g.push({id:h.id,pId:h.pId,text:h.text,value:h.value,title:h.title,isParent:h.getChildrenLength()>0,open:c,checked:d,halfCheck:e,flag:f})}function f(a,b){var c=i(a);return null==c?null:BI.any(c,function(a,c){if(a===b&&null!=c&&!BI.isEmpty(c))return!0})}function g(a,b){var c=i(a);return null==c?null:BI.any(c,function(a,c){if(a===b&&null!=c&&BI.isEmpty(c))return!0})}function h(a,b){var c=i(a);return null!=c&&BI.any(c,function(a){if(a===b)return!0})}function i(a){var b=m;return null==b?null:(BI.every(a,function(a,c){return b=b[c],null!=b}),b)}var j=this,k=[],l=a.keyword||"",m=a.selectedValues,n=a.lastSearchValue||"",o=c();BI.nextTick(function(){b({hasNext:o.length>j._const.perPage,items:k,lastSearchValue:BI.last(o)})})},_reqTreeNode:function(a,b){function c(a,b){var c={};return BI.each(a,function(a,c){b=b[c]||{}}),BI.each(b,function(a,b){if(BI.isNull(b))return void(c[a]=[0,0]);if(BI.isEmpty(b))return void(c[a]=[2,0]);var d={};BI.each(b,function(a,b){(BI.isNull(b)||BI.isEmpty(b))&&(d[a]=!0)}),c[a]=[1,BI.size(d)]}),c}function d(a,b,c,d){var f=d.checked,g=d.half,h=!1,i=!1;if(BI.has(c,a))if(1===c[a][0]){var j=BI.clone(b);j.push(a);var k=e._getChildCount(j);k>0&&k!==c[a][1]&&(i=!0)}else 2===c[a][0]&&(h=!0);var l;return l=f||i||h?(h||f)&&!g||BI.has(c,a):BI.has(c,a),[l,i]}var e=this,f=[],g=a.times,h=a.checkState||{},i=a.parentValues||[],j=a.selectedValues||{},k={};k=c(i,j);for(var l=this._getChildren(i),m=(g-1)*this._const.perPage;l[m]&&m0,checked:n[0],halfCheck:n[1]})}BI.nextTick(function(){b({items:f,hasNext:l.length>g*e._const.perPage})})},_getNode:function(a,b){for(var c=a,d=0,e=b.length;d0&&BI.isEmpty(e);)c=d[d.length-1],d=d.slice(0,d.length-1),e=this._getNode(a,d),null!=e&&delete e[c]},_buildTree:function(a,b){var c=a;BI.each(b,function(a,b){BI.has(c,b)||(c[b]={}),c=c[b]})},_isMatch:function(a,b,c){var d=this._getTreeNode(a,b),e=BI.Func.getSearchResult([d.text||d.value],c);return e.find.length>0||e.match.length>0},_getTreeNode:function(a,b){var c,d=this,e=0;return this.tree.traverse(function(f){if(!d.tree.isRoot(f))return!(e>a.length)&&(e===a.length&&f.value===b?(c=f,!1):f.value!==a[e]||void e++)}),c},_getChildren:function(a){if(a.length>0)var b=BI.last(a),c=this._getTreeNode(a.slice(0,a.length-1),b);else var c=this.tree.getRoot();return c.getChildren()},_getChildCount:function(a){return this._getChildren(a).length}}),BI.TreeValueChooserCombo=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-combo",width:200,height:30,items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&this._initData(b.items),this.combo=BI.createWidget({type:"bi.multi_tree_combo",element:this,itemsCreator:BI.bind(this._itemsCreator,this),width:b.width,height:b.height}),this.combo.on(BI.MultiTreeCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.TreeValueChooserCombo.EVENT_CONFIRM)})},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.TreeValueChooserCombo.EVENT_CONFIRM="TreeValueChooserCombo.EVENT_CONFIRM",BI.shortcut("bi.tree_value_chooser_combo",BI.TreeValueChooserCombo),BI.TreeValueChooserPane=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-pane",items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.pane=BI.createWidget({type:"bi.multi_select_tree",element:this,itemsCreator:BI.bind(this._itemsCreator,this)}),this.pane.on(BI.MultiSelectTree.EVENT_CHANGE,function(){a.fireEvent(BI.TreeValueChooserPane.EVENT_CHANGE)}),BI.isNotNull(b.items)&&(this._initData(b.items),this.populate())},setSelectedValue:function(a){this.pane.setSelectedValue(a)},setValue:function(a){this.pane.setValue(a)},getValue:function(){return this.pane.getValue()},populate:function(){this.pane.populate.apply(this.pane,arguments)}}),BI.TreeValueChooserPane.EVENT_CHANGE="TreeValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.tree_value_chooser_pane",BI.TreeValueChooserPane),BI.AbstractValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn,cache:!0})},_valueFormatter:function(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},_getItemsByTimes:function(a,b){for(var c=[],d=(b-1)*this._const.perPage;a[d]&&d0&&!b),this.setHalfSelected(c.length>0&&b),this.checked.isHalfSelected()&&(this.selectValue=c)},getAllButtons:function(){return[this]},getAllLeaves:function(){var a=(this.options,[]);return this.tree.traverse(function(b){b.isLeaf()&&a.push(b.get("data").value)}),a},getNotSelectedValue:function(){var a=this,b=(this.options,[]),c=this.checked.isSelected();if(c===!0)return b;var d=this.checked.isHalfSelected();return this.tree.traverse(function(c){if(c.isLeaf()){var e=c.get("data").value;d===!0?BI.contains(a.selectValue,c.get("data").value)||b.push(e):b.push(e)}}),b},getValue:function(){var a=[];return this.checked.isSelected()?(this.tree.traverse(function(b){b.isLeaf()&&a.push(b.get("data").value)}),a):this.checked.isHalfSelected()?this.selectValue:[]}}),BI.FileManagerFolderItem.EVENT_CHANGE="FileManagerFolderItem.EVENT_CHANGE",BI.shortcut("bi.file_manager_folder_item",BI.FileManagerFolderItem),BI.FileManagerList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-list",el:{},items:[]})},_init:function(){BI.FileManagerList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.list=BI.createWidget({type:"bi.select_list",element:this,items:b.items,toolbar:{type:"bi.multi_select_bar",height:40,text:""},el:{type:"bi.list_pane",el:BI.isWidget(b.el)?b.el:BI.extend({type:"bi.file_manager_button_group"},b.el)}}),this.list.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){this.list.setValue({value:a})},getValue:function(){return this.list.getValue()},populate:function(a){this.list.populate(a),this.list.setToolBarVisible(!0)}}),BI.FileManagerList.EVENT_CHANGE="FileManagerList.EVENT_CHANGE",BI.shortcut("bi.file_manager_list",BI.FileManagerList),BI.FileManagerNavButton=BI.inherit(BI.Widget,{_const:{normal_color:"#ffffff",select_color:"#eff1f4"},_defaultConfig:function(){return BI.extend(BI.FileManagerNavButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-nav-button",selected:!1,height:40})},_init:function(){BI.FileManagerNavButton.superclass._init.apply(this,arguments);var a=this,b=this.options,c=this._const;this.button=BI.createWidget({type:"bi.text_button",cls:"file-manager-nav-button-text bi-card",once:!0,selected:b.selected,text:b.text,title:b.text,value:b.value,height:b.height,lgap:20,rgap:10}),this.button.on(BI.Controller.EVENT_CHANGE,function(){arguments[2]=a,a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});var d=BI.createWidget({type:"bi.svg",cls:"file-manager-nav-button-triangle",width:15,height:b.height}),e=d.path("M0,0L15,20L0,40").attr({stroke:c.select_color,fill:b.selected?c.select_color:c.normal_color});this.button.on(BI.TextButton.EVENT_CHANGE,function(){this.isSelected()?e.attr("fill",c.select_color):e.attr("fill",c.normal_color)}),BI.createWidget({type:"bi.default",element:this,items:[this.button]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:d,right:-15,top:0,bottom:0}]})},isSelected:function(){return this.button.isSelected()},setValue:function(a){this.button.setValue(a)},getValue:function(){return this.button.getValue()},populate:function(a){}}),BI.FileManagerNavButton.EVENT_CHANGE="FileManagerNavButton.EVENT_CHANGE",BI.shortcut("bi.file_manager_nav_button",BI.FileManagerNavButton),BI.FileManagerNav=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.FileManagerNav.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-file-manager-nav bi-border-left",height:40,items:[]})},_init:function(){BI.FileManagerNav.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=new BI.Tree,this.refreshTreeData(b.items),this.tree.getRoot().set("data",{text:BI.i18nText("BI-Created_By_Me"),value:BI.FileManagerNav.ROOT_CREATE_BY_ME,id:BI.FileManagerNav.ROOT_CREATE_BY_ME}),this.button_group=BI.createWidget({type:"bi.button_group",element:this,items:[{type:"bi.file_manager_nav_button",text:BI.i18nText("BI-Created_By_Me"),selected:!0,id:BI.FileManagerNav.ROOT_CREATE_BY_ME,value:BI.FileManagerNav.ROOT_CREATE_BY_ME}],layouts:[{type:"bi.horizontal"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(b,c){a.fireEvent(BI.FileManagerNav.EVENT_CHANGE,arguments)})},_getAllParents:function(a){var b,c=[];for(b=a?this.tree.search(a):this.tree.getRoot();b.parent;)c.push(b),b=b.parent;return c.push(b),c.reverse()},_formatNodes:function(a){var b=[];return BI.each(a,function(a,c){b.push(BI.extend({type:"bi.file_manager_nav_button",id:c.id},c.get("data")))}),BI.last(b).selected=!0,b},getValue:function(){return this.button_group.getValue()},getId:function(){var a=[];return BI.each(this.button_group.getSelectedButtons(),function(b,c){a.push(c.attr("id"))}),a},refreshTreeData:function(a){this.tree.initTree(BI.Tree.transformToTreeFormat(a)),this.tree.getRoot().set("data",{text:BI.i18nText("BI-Created_By_Me"),value:BI.FileManagerNav.ROOT_CREATE_BY_ME,id:BI.FileManagerNav.ROOT_CREATE_BY_ME})},populate:function(a){var b=BI.isNull(a)?[this.tree.getRoot()]:this._getAllParents(a.id);this.button_group.populate(this._formatNodes(b))}}),BI.extend(BI.FileManagerNav,{ROOT_CREATE_BY_ME:"-1"}),BI.FileManagerNav.EVENT_CHANGE="FileManagerNav.EVENT_CHANGE",BI.shortcut("bi.file_manager_nav",BI.FileManagerNav),BI.AbstractFilterItem=BI.inherit(BI.Widget,{props:{baseCls:"bi-filter-item bi-border-right bi-border-bottom"},isSelectedCondition:function(){return this.emptyItem&&this.emptyItem.isVisible()},setSelectedCondition:function(a){a&&(this.emptyItem||(this.emptyItem=BI.createWidget({type:"bi.absolute",height:40,cls:"filter-item-empty-item bi-border-top",items:[{el:{type:"bi.center_adapt",cls:"empty-filter-item-leaf"}}],hgap:10,vgap:5}),BI.createWidget({type:"bi.vertical",element:this,items:[this.emptyItem],scrolly:!1}))),this.emptyItem&&this.emptyItem.setVisible(a)}}),BI.extend(BI.AbstractFilterItem,{FILTER_OPERATION_FORMULA:1,FILTER_OPERATION_CONDITION:2,FILTER_OPERATION_CONDITION_AND:3,FILTER_OPERATION_CONDITION_OR:4,FILTER_OPERATION_FORMULA_AND:5,FILTER_OPERATION_FORMULA_OR:6}),!function(){var a=BI.inherit(BI.Widget,{props:{baseCls:"bi-filter-expander",el:{},popup:{}},render:function(){var a=this,b=this.options;return{type:"bi.filter_expander",el:b.el,popup:b.popup,id:b.id,value:b.value,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}],ref:function(b){a.expander=b}}},populate:function(){this.expander.populate.apply(this.expander,arguments)},getValue:function(){var a=this.expander.getValue();return{filterType:a.type,filterValue:a.value,id:a.id}}});BI.shortcut("bi.and.or.filter.expander",a)}(),!function(){var a=BI.inherit(BI.AbstractFilterItem,{_constant:{EXPANDER_WIDTH:20},props:{baseCls:"bi-filter-item bi-filter-expander",el:{},popup:{}},render:function(){var a=this,b=this.options,c=b.value,d="";return d=c===BI.Filter.FILTER_TYPE.AND?BI.i18nText("BI-Basic_And"):BI.i18nText("BI-Basic_Or"),{type:"bi.horizontal_adapt",cls:"filter-item-empty-item",verticalAlign:BI.VerticalAlign.Middle,items:[{type:"bi.text_button",cls:"condition-and-or",text:d,value:c,id:b.id,width:this._constant.EXPANDER_WIDTH,height:"100%",ref:function(b){a.expander=b},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,"",a)}}]},BI.extend(b.popup,{ref:function(b){a.conditionsView=b},listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]})]}},getValue:function(){return{type:this.expander.getValue(),value:this.conditionsView.getValue(),id:this.options.id}},populate:function(){this.conditionsView.populate.apply(this.conditionsView,arguments)}});BI.shortcut("bi.filter_expander",a)}(),!function(){BI.constant("bi.constant.component.filter",{FORMULA_COMBO:[{text:BI.i18nText("BI-Conf_Formula_And"),value:BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_AND},{text:BI.i18nText("BI-Conf_Formula_Or"),value:BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_OR}],CONDITION_COMBO:[{text:BI.i18nText("BI-Conf_Condition_And"),value:BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_AND},{text:BI.i18nText("BI-Conf_Condition_Or"),value:BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_OR}]})}(),BI.Filter=BI.inherit(BI.Widget,{constants:{FIELD_TYPE_NUMBER:1,FIELD_TYPE_STRING:0,FIELD_TYPE_DATE:2},props:{baseCls:"bi-filter",expander:{},items:[],el:{},itemCreator:BI.empty},render:function(){var a=this,b=this.options;return BI.extend({type:"bi.filter_operation",expander:b.expander,listeners:[{eventName:"EVENT_OPERATION",action:function(b){switch(b){case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION:case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_AND:a._addAndOrCondition(BI.Filter.FILTER_TYPE.EMPTY_CONDITION);break;case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_OR:a._addAndOrCondition(BI.Filter.FILTER_TYPE.EMPTY_CONDITION,1);break;case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA:case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_AND:a._addAndOrCondition(BI.Filter.FILTER_TYPE.EMPTY_FORMULA);break;case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_OR:a._addAndOrCondition(BI.Filter.FILTER_TYPE.EMPTY_FORMULA,1)}}},{eventName:"BI.FilterOperation.EVENT_DESTROY_ITEM",action:function(b){a._removeCondition(b)}}],ref:function(b){a.filter=b}},b.el)},mounted:function(){this.tree=new BI.Tree,this.tree.initTree(this.options.items),this._populate(this.tree.toJSONWithNode())},_createEmptyNode:function(a){var b=new BI.Node(BI.UUID());return b.set("data",{value:a}),b},_insertAndOrCondition:function(a,b,c){var d=["AND","OR"];c||(c=0);var e=this.tree.search(a);if(BI.isNotNull(e)){var f=e.get("data"),g=e.getParent(),h=g.getChildIndex(e.id),i=g.get("data")||{},j=this._createEmptyNode(b);if(f.value===BI.Filter.FILTER_TYPE[d[c]])return void this.tree.addNode(e,j);if(f.value===BI.Filter.FILTER_TYPE[d[1-c]]&&i.value===BI.Filter.FILTER_TYPE[d[c]])return void g.addChild(j,h+1);if(f.value===BI.Filter.FILTER_TYPE[d[1-c]]&&i.value!==BI.Filter.FILTER_TYPE[d[c]]||i.value===BI.Filter.FILTER_TYPE[d[1-c]]||i.value!==BI.Filter.FILTER_TYPE.AND&&i.value!==BI.Filter.FILTER_TYPE.OR){var k=new BI.Node(BI.UUID());return k.set("data",{value:BI.Filter.FILTER_TYPE[d[c]],children:[e.get("data"),j.get("data")]}),g.removeChildByIndex(h),g.addChild(k,h),k.addChild(e),void k.addChild(j)}g.addChild(j,h+1)}},_removeCondition:function(a){var b=this.tree.search(a);if(BI.isNotNull(b)){var c=b.getParent();if(c.removeChild(a),c.getChildrenLength()<=1){var d=c.getParent();if(BI.isNotNull(d)){var e=d.getChildIndex(c.id);d.removeChildByIndex(e),1===c.getChildrenLength()&&d.addChild(c.getFirstChild(),e)}}this._populate(this.tree.toJSONWithNode()),this.fireEvent("EVENT_CHANGE")}},_addAndOrCondition:function(a,b){var c=["AND","OR"];b||(b=0);var d=this.filter.getCurrentSelectItem();if(BI.isNotNull(d)){var e=d.attr("id");this._insertAndOrCondition(e,a,b)}else{var f=this._createEmptyNode(a),g=this.tree.getRoot(),h=g.getLastChild();if(BI.isNotNull(h)){var i=h.get("data");if(i.value===BI.Filter.FILTER_TYPE[c[b]])this.tree.addNode(h,f);else{var j=new BI.Node(BI.UUID());j.set("data",{value:BI.Filter.FILTER_TYPE[c[b]],children:[h.get("data"),f.get("data")]}),g.removeChild(h.id),this.tree.addNode(j),this.tree.addNode(j,h),this.tree.addNode(j,f)}}else this.tree.addNode(f)}this._populate(this.tree.toJSONWithNode()),this.fireEvent("EVENT_CHANGE")},_populate:function(a){this.filter.defaultState();var b=this.options;b.items=a,BI.Tree.traversal(a,function(a,c){b.itemCreator(c)}),this.filter.populate.apply(this.filter,[a])},populate:function(a){this.tree.initTree(a),this._populate(this.tree.toJSONWithNode())},getValue:function(){return this.filter.getValue()}}),BI.shortcut("bi.filter",BI.Filter),BI.Filter.FILTER_TYPE={},BI.Filter.FILTER_TYPE.FORMULA=33,BI.Filter.FILTER_TYPE.AND=34,BI.Filter.FILTER_TYPE.OR=35,BI.Filter.FILTER_TYPE.EMPTY_FORMULA=36,BI.Filter.FILTER_TYPE.EMPTY_CONDITION=37,!function(){var a=BI.inherit(BI.ButtonTree,{props:{baseCls:"bi-button-map"},_createBtns:function(a){var b=this.options,c=BI.createWidgets(BI.createItems(a,{type:"bi.text_button",once:0===b.chooseType})),d=BI.map(a,function(a,b){if(b=BI.stripEL(b),!b.id&&!b.value)throw new Error("item must have 'id' or 'value' as its property");return b.id||b.value});return BI.zipObject(d,c)},setValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setSelected)?void(a.contains(b)?c.setSelected&&c.setSelected(!0):c.setSelected&&c.setSelected(!1)):void c.setValue(a)})},setNotSelectedValue:function(a){a=BI.isArray(a)?a:[a],BI.each(this.buttons,function(b,c){return BI.isFunction(c.setSelected)?void(a.contains(b)?c.setSelected&&c.setSelected(!1):c.setSelected&&c.setSelected(!0)):void c.setNotSelectedValue(a)})},populate:function(a){var b=this,c=[].slice.call(arguments),d=new BI.LinkHashMap,e=function(a){return a.id||a.value};this.buttons||(this.buttons={});var f=[];BI.each(a,function(a,d){if(d=BI.stripEL(d),b.buttons[e(d)]){var g=b.buttons[e(d)];c[0]=d.items,c[2]=d,g.populate&&g.populate.apply(g,c)}else f.push(d)}),c[0]=f;var g=this._btnsCreator.apply(this,c),h=[];BI.each(a,function(a,c){c=BI.stripEL(c);var f=b.buttons[e(c)]||g[e(c)];d.add(e(c),f),h.push(f)}),this.buttons=d.map,BI.DOM.hang(this.buttons),this.element.empty();var i=this._packageItems(a,this._packageBtns(h));BI.createWidget(BI.extend({element:this},this._packageLayout(i)))},getIndexByValue:function(){throw new Error("Can not use getIndexByValue")}});BI.shortcut("bi.filter_list",a)}(),!function(){var a=0,b=1,c=BI.inherit(BI.Widget,{props:{baseCls:"bi-filter-operation",expander:{},items:[],selections:[BI.AbstractFilterItem.FILTER_OPERATION_CONDITION,BI.AbstractFilterItem.FILTER_OPERATION_FORMULA],itemsCreator:BI.emptyFn},render:function(){var c=this,d=this.options;return this.currentSelected=null,{type:"bi.vtape",items:[{el:{type:"bi.tab",showIndex:a,cardCreator:BI.bind(this._createTabs,this),ref:function(a){c.buttonComboTab=a}},height:40},{el:{type:"bi.absolute",scrollable:!0,items:[{el:{type:"bi.left",items:[{type:"bi.filter_pane",expander:d.expander,items:d.items,itemsCreator:d.itemsCreator,listeners:[{eventName:"EVENT_CHANGE",action:function(d,e,f){d===BI.Events.CLICK&&(BI.isNotNull(c.currentSelected)&&c.currentSelected===f?f.setSelectedCondition(!f.isSelectedCondition()):(BI.isNotNull(c.currentSelected)&&c.currentSelected.setSelectedCondition(!1),c.currentSelected=f,f.setSelectedCondition(!0)),c.currentSelected.isSelectedCondition()?c.buttonComboTab.setSelect(b):c.buttonComboTab.setSelect(a)),d===BI.Events.DESTROY&&(c.currentSelected===f&&(c.currentSelected=null,c.buttonComboTab.setSelect(a)),c.fireEvent("BI.FilterOperation.EVENT_DESTROY_ITEM",e,f))}}],ref:function(a){c.filter=a}}]},top:0,right:2,bottom:0,left:0}]}}]}},_createTabs:function(c){var d=this;switch(c){case a:return{type:"bi.button_group",items:BI.createItems(d._createButtons(),{type:"bi.icon_text_item",height:30,width:100}),chooseType:BI.ButtonGroup.CHOOSE_TYPE_DEFAULT,layouts:[{type:"bi.left",vgap:5}],listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(a,b){BI.isEmptyArray(d.filter.getValue())&&d.filter.element.addClass("bi-border-top bi-border-left"),d.fireEvent("EVENT_OPERATION",b.getValue()),d.defaultState()}}]};case b:return{type:"bi.button_group",chooseType:BI.ButtonGroup.CHOOSE_TYPE_DEFAULT,items:d._buildOperationButton(),layouts:[{type:"bi.left",vgap:5}]}}},_createButtons:function(){var a=[];return BI.each(this.options.selections,function(b,c){switch(c){case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA:a.push({text:BI.i18nText("BI-Conf_Add_Formula"),value:BI.AbstractFilterItem.FILTER_OPERATION_FORMULA,cls:"operation-trigger filter-formula-font"});break;case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION:a.push({text:BI.i18nText("BI-Conf_Add_Condition"),value:BI.AbstractFilterItem.FILTER_OPERATION_CONDITION,cls:"operation-trigger filter-condition-font"})}}),a},_buildOperationButton:function(){var a=this,b=[];return BI.each(this.options.selections,function(c,d){var e="",f="",g=[];switch(d){case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA:e=BI.i18nText("BI-Conf_Add_Formula"),f="filter-formula-font",g=BI.Constants.getConstant("bi.constant.component.filter").FORMULA_COMBO;break;case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION:default:e=BI.i18nText("BI-Conf_Add_Condition"),f="filter-condition-font",g=BI.Constants.getConstant("bi.constant.component.filter").CONDITION_COMBO}var h=BI.createWidget({type:"bi.icon_text_item",cls:"operation-trigger "+f,text:e,height:30,width:100});b.push({type:"bi.combo",el:h,popup:{el:{type:"bi.button_group",chooseType:BI.ButtonGroup.CHOOSE_TYPE_NONE,items:BI.createItems(g,{type:"bi.single_select_item",height:25}),layouts:[{type:"bi.vertical"}]}},listeners:[{eventName:BI.Combo.EVENT_CHANGE,action:function(b,c){switch(BI.isEmptyArray(a.filter.getValue())&&a.filter.element.addClass("bi-border-top bi-border-left"),b){case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_AND:case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_OR:h.setText(BI.i18nText("BI-Conf_Add_Condition"));break;case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_AND:case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_OR:h.setText(BI.i18nText("BI-Conf_Add_Formula"));break;default:h.setText()}a.fireEvent("EVENT_OPERATION",c.getValue()),a.defaultState(),this.hideView()}}]})}),b},defaultState:function(){BI.isNotNull(this.currentSelected)&&this.currentSelected.setSelectedCondition(!1),this.buttonComboTab.setSelect(a)},getCurrentSelectItem:function(){if(BI.isNotNull(this.currentSelected)&&this.currentSelected.isSelectedCondition())return this.currentSelected},populate:function(a){this.filter.populate.apply(this.filter,arguments)},getValue:function(){return this.filter.getValue()}});BI.shortcut("bi.filter_operation",c)}(),!function(){var a=BI.inherit(BI.Widget,{props:{baseCls:"bi-filter-pane",expander:{},items:[],itemsCreator:BI.emptyFn},render:function(){var a=this,b=this.options;return{type:"bi.custom_tree",cls:BI.isNotEmptyArray(b.items)?"bi-border-top bi-border-left":"",expander:BI.extend({type:"bi.filter_expander",el:{},popup:{type:"bi.custom_tree"}},b.expander),el:{type:"bi.filter_list",chooseType:BI.ButtonGroup.CHOOSE_TYPE_DEFAULT,layouts:[{type:"bi.vertical",scrolly:!1}]},items:b.items,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(){a.fireEvent("EVENT_CHANGE",arguments)}}],ref:function(b){a.tree=b}}},populate:function(a){BI.isNotEmptyArray(a)?this.element.addClass("bi-border-top bi-border-left"):this.element.removeClass("bi-border-top bi-border-left"),this.tree.populate.apply(this.tree,arguments)},getValue:function(){return this.tree.getValue()}});BI.shortcut("bi.filter_pane",a)}(),BI.IntervalSlider=BI.inherit(BI.Widget,{_constant:{EDITOR_WIDTH:58,EDITOR_R_GAP:60,EDITOR_HEIGHT:30,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},_defaultConfig:function(){return BI.extend(BI.IntervalSlider.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-interval-slider bi-slider-track",digit:!1,unit:""})},_init:function(){BI.IntervalSlider.superclass._init.apply(this,arguments);var a=this,b=this._constant;this.enable=!1,this.valueOne="",this.valueTwo="",this.calculation=new BI.AccurateCalculationModel,this.grayTrack=BI.createWidget({type:"bi.layout",cls:"gray-track",height:6}),this.blueTrack=BI.createWidget({type:"bi.layout",cls:"blue-track bi-high-light-background",height:6}),this.track=this._createTrackWrapper(),this.labelOne=BI.createWidget({type:"bi.sign_text_editor",cls:"slider-editor-button",text:this.options.unit,errorText:"",allowBlank:!1,width:b.EDITOR_WIDTH,validationChecker:function(b){return a._checkValidation(b)}}),this.labelOne.element.hover(function(){a.labelOne.element.removeClass("bi-border").addClass("bi-border")},function(){a.labelOne.element.removeClass("bi-border")}),this.labelOne.on(BI.Editor.EVENT_CONFIRM,function(){var b=BI.parseFloat(this.getValue());a.valueOne=b;var c=a._getPercentByValue(b),d=BI.parseFloat(c.toFixed(1));a._setLabelOnePosition(d),a._setSliderOnePosition(d),a._setBlueTrack(),a.fireEvent(BI.IntervalSlider.EVENT_CHANGE)}),this.labelTwo=BI.createWidget({type:"bi.sign_text_editor",cls:"slider-editor-button",errorText:"",text:this.options.unit,allowBlank:!1,width:b.EDITOR_WIDTH,validationChecker:function(b){return a._checkValidation(b)}}),this.labelTwo.element.hover(function(){a.labelTwo.element.removeClass("bi-border").addClass("bi-border")},function(){a.labelTwo.element.removeClass("bi-border")}),this.labelTwo.on(BI.Editor.EVENT_CONFIRM,function(){var b=BI.parseFloat(this.getValue());a.valueTwo=b;var c=a._getPercentByValue(b),d=BI.parseFloat(c.toFixed(1));a._setLabelTwoPosition(d),a._setSliderTwoPosition(d),a._setBlueTrack(),a.fireEvent(BI.IntervalSlider.EVENT_CHANGE)}),this.sliderOne=BI.createWidget({type:"bi.single_slider_button"}),this.sliderTwo=BI.createWidget({type:"bi.single_slider_button"}),this._draggable(this.sliderOne,!0),this._draggable(this.sliderTwo,!1),this._setVisible(!1),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.track,width:"100%",height:b.TRACK_HEIGHT}]}],hgap:7,height:b.TRACK_HEIGHT},top:23,left:0,width:"100%"},this._createLabelWrapper(),this._createSliderWrapper()]})},_rePosBySizeAfterMove:function(a,b){var c=this.options,d=100*a/this._getGrayTrackLength(),e=BI.parseFloat(d.toFixed(1)),f=this._getValueByPercent(e);f=this._assertValue(f),f=c.digit===!1?f:f.toFixed(c.digit),b?(this._setLabelOnePosition(e),this._setSliderOnePosition(e),this.labelOne.setValue(f),this.valueOne=f):(this._setLabelTwoPosition(e),this._setSliderTwoPosition(e),this.labelTwo.setValue(f),this.valueTwo=f),this._setBlueTrack()},_rePosBySizeAfterStop:function(a,b){var c=100*a/this._getGrayTrackLength(),d=BI.parseFloat(c.toFixed(1));b?this._setSliderOnePosition(d):this._setSliderTwoPosition(d)},_draggable:function(a,b){function c(a){return BI.clamp(a,0,d._getGrayTrackLength())}var d=this,e=(this.options,!1),f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){i.isDragging()&&(e=!0,g+=j,f=c(h+g),a.element.addClass("dragging"),d._rePosBySizeAfterMove(f,b))},function(){e===!0&&(f=c(f),d._rePosBySizeAfterStop(f,b),f=0,g=0,h=f,e=!1),a.element.removeClass("dragging"),i.releaseMouseMoves(),d.fireEvent(BI.IntervalSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(b){a.isEnabled()&&(h=this.offsetLeft,c(h),i.captureMouseMoves(b))})},_createLabelWrapper:function(){var a=this._constant;return{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.labelOne,top:0,left:"0%"}]},{type:"bi.absolute",items:[{el:this.labelTwo,top:0,left:"100%"}]}],rgap:a.EDITOR_R_GAP,height:70},top:0,left:0,width:"100%"}},_createSliderWrapper:function(){var a=this._constant;return{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.sliderOne,top:0,left:"0%"}]},{type:"bi.absolute",items:[{el:this.sliderTwo,top:0,left:"100%"}]}],hgap:a.SLIDER_WIDTH_HALF,height:a.SLIDER_HEIGHT},top:20,left:0,width:"100%"}},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){var b=this.options,c=!1,d=(a+"").split(".")[1];return BI.isEmptyString(d)||BI.isNumeric(a)&&!(BI.isNull(a)||athis.max)&&(b.digit===!1?c=!0:(d=d||"",c=d.length===b.digit)),c},_checkOverlap:function(){var a=this.labelOne.element[0].offsetLeft,b=this.labelTwo.element[0].offsetLeft;a<=b?b-a<90?this.labelTwo.element.css({top:40}):this.labelTwo.element.css({top:0}):a-b<90?this.labelTwo.element.css({top:40}):this.labelTwo.element.css({top:0})},_setLabelOnePosition:function(a){this.labelOne.element.css({left:a+"%"}),this._checkOverlap()},_setLabelTwoPosition:function(a){this.labelTwo.element.css({left:a+"%"}),this._checkOverlap()},_setSliderOnePosition:function(a){this.sliderOne.element.css({left:a+"%"})},_setSliderTwoPosition:function(a){this.sliderTwo.element.css({left:a+"%"})},_setBlueTrackLeft:function(a){this.blueTrack.element.css({left:a+"%"})},_setBlueTrackWidth:function(a){this.blueTrack.element.css({width:a+"%"})},_setBlueTrack:function(){var a=this._getPercentByValue(this.labelOne.getValue()),b=this._getPercentByValue(this.labelTwo.getValue());a<=b?(this._setBlueTrackLeft(a),this._setBlueTrackWidth(b-a)):(this._setBlueTrackLeft(b),this._setBlueTrackWidth(a-b))},_setAllPosition:function(a,b){this._setSliderOnePosition(a),this._setLabelOnePosition(a),this._setSliderTwoPosition(b),this._setLabelTwoPosition(b),this._setBlueTrack()},_setVisible:function(a){this.sliderOne.setVisible(a),this.sliderTwo.setVisible(a),this.labelOne.setVisible(a),this.labelTwo.setVisible(a)},_setErrorText:function(){var a=BI.i18nText("BI-Please_Enter")+this.min+"-"+this.max+BI.i18nText("BI-Basic_De")+BI.i18nText("BI-Basic_Number");this.labelOne.setErrorText(a),this.labelTwo.setErrorText(a)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(a){var b=this.calculation.accurateSubtraction(this.max,this.min),c=this.calculation.accurateMultiplication(b,a),d=this.calculation.accurateDivisionTenExponent(c,2);if(this.precision<0){var e=BI.parseFloat(this.calculation.accurateAddition(d,this.min)),f=Math.round(this.calculation.accurateDivisionTenExponent(e,-this.precision));return this.calculation.accurateMultiplication(f,Math.pow(10,-this.precision))}return BI.parseFloat(this.calculation.accurateAddition(d,this.min).toFixed(this.precision))},_getPercentByValue:function(a){return 100*(a-this.min)/(this.max-this.min)},_setDraggableEnable:function(a){this.sliderOne.setEnable(a),this.sliderTwo.setEnable(a)},_getPrecision:function(){var a=this.calculation.accurateSubtraction(this.max,this.min),b=a.toPrecision(4),c=b.indexOf("e"),d=[];if(c>-1){d=b.split("e");var e=BI.size(d[0].split(".")[1]),f=BI.parseInt(d[1].substring(1));return e-f}return d=b.split("."),d.length>1?d[1].length:0},_assertValue:function(a){return a<=this.min?this.min:a>=this.max?this.max:a},getValue:function(){return this.valueOne<=this.valueTwo?{min:this.valueOne,max:this.valueTwo}:{min:this.valueTwo,max:this.valueOne}},setMinAndMax:function(a){var b=BI.parseFloat(a.min),c=BI.parseFloat(a.max);!isNaN(b)&&!isNaN(c)&&c>=b&&(this.min=b,this.max=c,this.valueOne=b,this.valueTwo=c,this.precision=this._getPrecision(),this._setDraggableEnable(!0)),c===b&&this._setDraggableEnable(!1)},setValue:function(a){var b=this.options,c=BI.parseFloat(a.min),d=BI.parseFloat(a.max);c=b.digit===!1?c:c.toFixed(b.digit),d=b.digit===!1?d:d.toFixed(b.digit),isNaN(c)||isNaN(d)||(this._checkValidation(c)&&(this.valueOne=c),this._checkValidation(d)&&(this.valueTwo=d),cthis.max&&(this.valueTwo=this.max))},reset:function(){this._setVisible(!1),this.enable=!1,this.valueOne="",this.valueTwo="",this.min=NaN,this.max=NaN,this._setBlueTrackWidth(0)},populate:function(){isNaN(this.min)||isNaN(this.max)||(this.enable=!0,this._setVisible(!0),this._setErrorText(),(BI.isNumeric(this.valueOne)||BI.isNotEmptyString(this.valueOne))&&(BI.isNumeric(this.valueTwo)||BI.isNotEmptyString(this.valueTwo))?(this.labelOne.setValue(this.valueOne),this.labelTwo.setValue(this.valueTwo),this._setAllPosition(this._getPercentByValue(this.valueOne),this._getPercentByValue(this.valueTwo))):(this.labelOne.setValue(this.min),this.labelTwo.setValue(this.max),this._setAllPosition(0,100)))}}),BI.IntervalSlider.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.interval_slider",BI.IntervalSlider),BI.AccurateCalculationModel=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.AccurateCalculationModel.superclass._defaultConfig.apply(this,arguments),{baseCls:""})},_init:function(){BI.AccurateCalculationModel.superclass._init.apply(this,arguments)},_getMagnitude:function(a){for(var b="1",c=0;c0)var d=b;else{var d=a;c=0-c}for(var e=0;e=b.numDecimal.length?a.numDecimal.length:b.numDecimal.length}function d(a,b){for(var c=b-a.length,d=0;d=BI.parseInt(f.numDecimal))var i=(BI.parseInt(e.numDecimal)-BI.parseInt(f.numDecimal)).toString(),j=d(i,h);else{g--;var k=this._getMagnitude(h),i=(k+BI.parseInt(e.numDecimal)-BI.parseInt(f.numDecimal)).toString(),j=d(i,h)}var l=g+"."+j;return BI.parseFloat(l)},_accurateAddition:function(a,b){function c(a,b){for(var c=b-a.length,d=0;db)var e=d.numInteger.slice(0,d.numInteger.length-b),f=d.numInteger.slice(-b);else var e="0",f=c(d.numInteger,b);var g=e+"."+f+d.numDecimal;return BI.parseFloat(g)},accurateSubtraction:function(a,b){return a>=0&&b>=0?a>=b?this._accurateSubtraction(a,b):-this._accurateSubtraction(b,a):a>=0&&b<0?this._accurateAddition(a,-b):a<0&&b>=0?-this._accurateAddition(-a,b):a<0&&b<0?a>=b?this._accurateSubtraction(-b,-a):this._accurateSubtraction(-a,-b):void 0},accurateAddition:function(a,b){return a>=0&&b>=0?this._accurateAddition(a,b):a>=0&&b<0?this.accurateSubtraction(a,-b):a<0&&b>=0?this.accurateSubtraction(b,-a):a<0&&b<0?-this._accurateAddition(-a,-b):void 0},accurateMultiplication:function(a,b){return a>=0&&b>=0?this._accurateMultiplication(a,b):a>=0&&b<0?-this._accurateMultiplication(a,-b):a<0&&b>=0?-this._accurateMultiplication(-a,b):a<0&&b<0?this._accurateMultiplication(-a,-b):void 0},accurateDivisionTenExponent:function(a,b){return a>=0?this._accurateDivisionTenExponent(a,b):-this._accurateDivisionTenExponent(-a,b)}}),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",value:b.value}),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,value:b.value}),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 BI.isNull(this.popup)?this.options.value||"":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=[1,7,2,8,3,9,4,10,5,11,6,12],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}})}),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}],value:b.value}),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.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.MonthTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Month"),baseCls:"bi-trigger-month-text",width:b.height},width:b.height},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]}),this.setValue(b.value)},setValue:function(a){return BI.isNotNull(a)?(this.editor.setState(a+1),this.editor.setValue(a+1),void this.editor.setTitle(a+1)):(this.editor.setState(""),this.editor.setValue(""),void this.editor.setTitle(""))},getKey:function(){return 0|this.editor.getValue()},getValue:function(){return this.editor.getValue()-1}}),BI.MonthTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.MonthTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.MonthTrigger.EVENT_START="EVENT_START",BI.MonthTrigger.EVENT_STOP="EVENT_STOP",BI.MonthTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_trigger",BI.MonthTrigger),BI.DownListCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-down-list-combo",height:24,items:[],adjustLength:0,direction:"bottom",trigger:"click",container:null,stopPropagation:!1,el:{}})},_init:function(){BI.DownListCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popupview=BI.createWidget({type:"bi.multi_layer_down_list_popup",items:b.items,chooseType:b.chooseType,value:b.value}),this.popupview.on(BI.DownListPopup.EVENT_CHANGE,function(b){a.fireEvent(BI.DownListCombo.EVENT_CHANGE,b),a.downlistcombo.hideView()}),this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE,function(b,c){a.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,b,c),a.downlistcombo.hideView()}),this.downlistcombo=BI.createWidget({element:this,type:"bi.combo",trigger:b.trigger,isNeedAdjustWidth:!1,container:b.container,adjustLength:b.adjustLength,direction:b.direction,stopPropagation:b.stopPropagation,el:BI.createWidget(b.el,{type:"bi.icon_trigger",extraCls:b.iconCls?b.iconCls:"pull-down-font",width:b.width,height:b.height}),popup:{el:this.popupview,stopPropagation:!0,maxHeight:1e3}}),this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW)})},hideView:function(){this.downlistcombo.hideView()},showView:function(){this.downlistcombo.showView()},populate:function(a){this.popupview.populate(a)},setValue:function(a){this.popupview.setValue(a)},getValue:function(){return this.popupview.getValue()}}),BI.DownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DownListCombo.EVENT_SON_VALUE_CHANGE="EVENT_SON_VALUE_CHANGE",BI.DownListCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_layer_down_list_combo",BI.DownListCombo),BI.MultiLayerDownListPopup=BI.inherit(BI.Pane,{constants:{nextIcon:"pull-right-e-font",height:25,iconHeight:12,iconWidth:12,hgap:0,vgap:0,border:1},_defaultConfig:function(){var a=BI.MultiLayerDownListPopup.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:"bi-down-list-popup",items:[],chooseType:BI.Selection.Multi})},_init:function(){BI.MultiLayerDownListPopup.superclass._init.apply(this,arguments),this.singleValues=[],this.childValueMap={},this.fatherValueMap={};var a=this,b=this.options,c=this._createPopupItems(b.items);this.popup=BI.createWidget({type:"bi.button_tree",items:BI.createItems(c,{},{adjustLength:-2}),layouts:[{type:"bi.vertical",hgap:this.constants.hgap,vgap:this.constants.vgap}],value:this._digest(b.value),chooseType:b.chooseType}),this.popup.on(BI.ButtonTree.EVENT_CHANGE,function(b,c){var d=b;if(BI.isNotNull(a.childValueMap[b])){d=a.childValueMap[b];var e=a.fatherValueMap[b],f=(e+"").split("_");a.fireEvent(BI.MultiLayerDownListPopup.EVENT_SON_VALUE_CHANGE,d,f.length>1?f:e)}else a.fireEvent(BI.MultiLayerDownListPopup.EVENT_CHANGE,d,c);if(!a.singleValues.contains(d)){var g=a.getValue(),h=[];BI.each(g,function(a,b){b.value!=d&&h.push(b)}),a.setValue(h)}}),BI.createWidget({type:"bi.vertical",element:this,items:[this.popup]})},_createPopupItems:function(a){var b=this,c=[];return BI.each(a,function(d,e){var f={type:"bi.down_list_group",items:[]};if(BI.each(e,function(a,c){BI.isNotEmptyArray(c.children)&&!BI.isEmpty(c.el)?(c.type="bi.combo_group",c.cls="down-list-group",c.trigger="hover",c.isNeedAdjustWidth=!1,c.el.title=c.el.title||c.el.text,c.el.type="bi.down_list_group_item",c.el.logic={dynamic:!0},c.el.height=b.constants.height,c.el.iconCls2=b.constants.nextIcon,c.popup={lgap:4,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}},c.el.childValues=[],BI.each(c.children,function(a,d){d=d.el?BI.extend(d.el,{children:d.children}):d;var e=BI.deepClone(c.el.value),f=BI.deepClone(d.value);b.singleValues.push(d.value),d.type="bi.down_list_item",d.extraCls=" child-down-list-item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),c.el.childValues.push(d.value),BI.isNotEmptyArray(d.children)&&(d.type="bi.down_list_group_item",b._createChildren(d),d.height=b.constants.height,d.iconCls2=b.constants.nextIcon,c.el.childValues=BI.concat(c.el.childValues,d.childValues))})):(c.type="bi.down_list_item",c.title=c.title||c.text,c.textRgap=10,c.isNeedAdjustWidth=!1,c.logic={dynamic:!0});var d={};d.el=c,f.items.push(d)}),b._isGroup(f.items)&&BI.each(f.items,function(a,c){b.singleValues.push(c.el.value)}),c.push(f),b._needSpliter(d,a.length)){var g=BI.createWidget({type:"bi.vertical",items:[{el:{type:"bi.layout",cls:"bi-down-list-spliter bi-border-top cursor-pointer",height:0}}],cls:"bi-down-list-spliter-container cursor-pointer",lgap:10,rgap:10});c.push(g)}}),c},_createChildren:function(a){var b=this;a.childValues=[],BI.each(a.children,function(c,d){var e=BI.deepClone(a.value),f=BI.deepClone(d.value);d.type="bi.down_list_item",d.title=d.title||d.text,d.textRgap=10,d.isNeedAdjustWidth=!1,d.logic={dynamic:!0},d.father=e,b.fatherValueMap[b._createChildValue(e,f)]=e,b.childValueMap[b._createChildValue(e,f)]=f,d.value=b._createChildValue(e,f),a.childValues.push(d.value)})},_isGroup:function(a){return a.length>1},_needSpliter:function(a,b){return a1?g:f}else e.value=d;b.push(e)}),b}}),BI.MultiLayerDownListPopup.EVENT_CHANGE="EVENT_CHANGE",BI.MultiLayerDownListPopup.EVENT_SON_VALUE_CHANGE="EVENT_SON_VALUE_CHANGE",BI.shortcut("bi.multi_layer_down_list_popup",BI.MultiLayerDownListPopup),BI.MultiLayerSelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer_select_tree-combo",isDefaultInit:!1,height:30,text:"",items:[],value:""})},_init:function(){BI.MultiLayerSelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value}),this.popup=BI.createWidget({type:"bi.multilayer_select_tree_popup",isDefaultInit:b.isDefaultInit,items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.MultiLayerSelectTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_CHANGE)})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.MultiLayerSelectTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_combo",BI.MultiLayerSelectTreeCombo),BI.MultiLayerSelectLevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-select-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn,value:""})},_init:function(){BI.MultiLayerSelectLevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={};if(e.layer=b,BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.multilayer_select_tree_first_plus_group_node";break;case a.length-1: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",cls:"tree-view display-inline",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,value:c.value,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)}),BI.createWidget({type:"bi.adaptive",element:this,scrollable:!0,items:[this.tree]})},populate:function(a){this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},setValue:function(a){this.tree.setValue(a)},getValue:function(){return BI.uniq(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:[],value:""})},_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,value:b.value,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:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_first_plus_group_node",BI.MultiLayerSelectTreeFirstPlusGroupNode),BI.MultiLayerSelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-last-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_last_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id: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]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_last_plus_group_node",BI.MultiLayerSelectTreeLastPlusGroupNode),BI.MultiLayerSelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-select-tree-mid-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.select_tree_mid_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id: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]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(a)},doClick:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_select_tree_mid_plus_group_node",BI.MultiLayerSelectTreeMidPlusGroupNode),BI.MultiLayerSingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-singletree-combo",isDefaultInit:!1,height:30,text:"",itemsCreator:BI.emptyFn,items:[],value:""})},_init:function(){BI.MultiLayerSingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value}),this.popup=BI.createWidget({type:"bi.multilayer_single_tree_popup",isDefaultInit:b.isDefaultInit,items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.MultiLayerSingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_CHANGE)})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.MultiLayerSingleTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_combo",BI.MultiLayerSingleTreeCombo),BI.MultiLayerSingleLevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-single-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn})},_init:function(){BI.MultiLayerSingleLevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={};if(e.layer=b,BI.isKey(e.id)||(e.id=BI.UUID()),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.multilayer_single_tree_first_plus_group_node";break;case a.length-1:f.type="bi.multilayer_single_tree_last_plus_group_node";break;default:f.type="bi.multilayer_single_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",cls:"tree-view display-inline",expander:{isDefaultInit:c.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(a),0),value:c.value,itemsCreator:function(a,b){c.itemsCreator(a,function(a){b(BI.Tree.transformToTreeFormat(a),0)})},el:{type:"bi.button_tree",chooseType:BI.Selection.Single,layouts:[{type:"bi.vertical"}]}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(a,c){b.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a===BI.Events.CLICK&&b.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE,c)}),BI.createWidget({type:"bi.adaptive",element:this,scrollable:!0,items:[this.tree]})},populate:function(a){this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a),0))},setValue:function(a){this.tree.setValue(a)},getValue:function(){return BI.filter(BI.uniq(this.tree.getValue()),function(a,b){return BI.isNotNull(b)})},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(a){return this.tree.getNodeById(a)},getNodeByValue:function(a){return this.tree.getNodeByValue(a)}}),BI.MultiLayerSingleLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_level_tree",BI.MultiLayerSingleLevelTree),BI.MultiLayerSingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-singletree-popup",tipText:BI.i18nText("BI-No_Selected_Item"),isDefaultInit:!1,itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.MultiLayerSingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:b.isDefaultInit,items:b.items,itemsCreator:b.itemsCreator,value:b.value}),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.MultiLayerSingleLevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.MultiLayerSingleTreePopup.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.MultiLayerSingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.MultiLayerSingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_single_tree_popup",BI.MultiLayerSingleTreePopup),BI.MultiLayerSingleTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-first-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.first_plus_group_node",cls:"bi-list-item-none",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,keyword:b.keyword}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_first_plus_group_node",BI.MultiLayerSingleTreeFirstPlusGroupNode),BI.MultiLayerSingleTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-last-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.last_plus_group_node",cls:"bi-list-item-none",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,keyword:b.keyword}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_last_plus_group_node",BI.MultiLayerSingleTreeLastPlusGroupNode),BI.MultiLayerSingleTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-multilayer-single-tree-mid-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:25})},_init:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.node=BI.createWidget({type:"bi.mid_plus_group_node",cls:"bi-list-item-none",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,keyword:b.keyword}),this.node.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(a){BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_plus_group_node",BI.MultiLayerSingleTreeMidPlusGroupNode),BI.MultiLayerSingleTreeFirstTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{ +extraCls:"bi-multilayer-single-tree-first-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.first_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_first_tree_leaf_item",BI.MultiLayerSingleTreeFirstTreeLeafItem),BI.MultiLayerSingleTreeLastTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-last-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.last_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_last_tree_leaf_item",BI.MultiLayerSingleTreeLastTreeLeafItem),BI.MultiLayerSingleTreeMidTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-mid-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:25})},_init:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._init.apply(this,arguments);var a=this,b=this.options;this.item=BI.createWidget({type:"bi.mid_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:b.id,pId:b.pId,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py,keyword:b.keyword}),this.item.on(BI.Controller.EVENT_CHANGE,function(b){b!==BI.Events.CLICK&&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.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(b.layer,13),items:[c]})},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(a){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(a)}}),BI.shortcut("bi.multilayer_single_tree_mid_tree_leaf_item",BI.MultiLayerSingleTreeMidTreeLeafItem),BI.MultiSelectCheckPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-pane bi-background",items:[],itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,onClickContinueSelect:BI.emptyFn})},_init:function(){BI.MultiSelectCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value||{},this.display=BI.createWidget({type:"bi.display_selected_list",items:b.items,itemsCreator:function(c,d){return c=BI.extend(c||{},{selectedValues:a.storeValue.value}),a.storeValue.type===BI.Selection.Multi?void d({items:BI.map(a.storeValue.value,function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d}})}):void b.itemsCreator(c,d)}}),this.continueSelect=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-select-check-selected bi-high-light"}),this.continueSelect.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect()}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:{type:"bi.left",cls:"multi-select-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:this.continueSelect,lgap:this.constants.lgap,tgap:this.constants.tgap}]}},{height:"fill",el:this.display}]})},setValue:function(a){this.storeValue=a||{}},empty:function(){this.display.empty()},populate:function(){this.display.populate.apply(this.display,arguments)}}),BI.shortcut("bi.multi_select_check_pane",BI.MultiSelectCheckPane),BI.DisplaySelectedList=BI.inherit(BI.Pane,{constants:{height:25,lgap:10},_defaultConfig:function(){return BI.extend(BI.DisplaySelectedList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-display-list",itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.DisplaySelectedList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.hasNext=!1,this.button_group=BI.createWidget({type:"bi.list_pane",element:this,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},items:this._createItems(b.items),chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,layouts:[{type:"bi.vertical",lgap:10}]},itemsCreator:function(c,d){b.itemsCreator(c,function(b){a.hasNext=!!b.hasNext,d(a._createItems(b.items))})},hasNext:function(){return a.hasNext}})},_createItems:function(a){return BI.createItems(a,{type:"bi.icon_text_item",cls:"cursor-default check-font display-list-item bi-tips",once:!0,invalid:!0,selected:!0,height:this.constants.height,logic:{dynamic:!0}})},empty:function(){this.button_group.empty()},populate:function(a){0===arguments.length?this.button_group.populate():this.button_group.populate(this._createItems(a))}}),BI.shortcut("bi.display_selected_list",BI.DisplaySelectedList),BI.MultiSelectInsertCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_init:function(){BI.MultiSelectInsertCombo.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)})},value:b.value}),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(){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.storeValue.type===BI.Selection.Multi&&a.storeValue.value.pushDistinct(b),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()})}},value:b.value,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.MultiSelectInsertCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button"});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.MultiSelectInsertCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectInsertCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;b(),a()},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectInsertCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_insert_combo",BI.MultiSelectInsertCombo),BI.MultiSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_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=b.value||{},this._assertValue(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)})},value:this.storeValue}),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()})}},value:b.value,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"});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.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.storeValue.type===BI.Selection.All&&c.storeValue.value.length>=c._count?c.storeValue={type:BI.Selection.Multi,value:[]}:c.storeValue.type===BI.Selection.Multi&&c.storeValue.value.length>=c._count&&(c.storeValue={type:BI.Selection.All,value:[]}),c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_combo",BI.MultiSelectCombo),BI.MultiSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=b.value||{},this._assertValue(this.storeValue),this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!a.storeValue.value.contains(a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&a.storeValue.value[a.storeValue.type===BI.Selection.All?"remove":"pushDistinct"](f),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:this.options.logic,height:25,selected:this.isAllSelected()})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_loader",BI.MultiSelectLoader),BI.MultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.multi_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_popup_view",BI.MultiSelectPopupView),BI.MultiSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.MultiSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.multi_select_searcher",height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker,value:b.value}),this.searcher.on(BI.MultiSelectSearcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_CHANGE,arguments)}),this.numberCounter=BI.createWidget(b.switcher,{type:"bi.multi_select_check_selected_switcher",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,adapter:b.adapter,masker:b.masker,value:b.value}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK)}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW)});var c=BI.createWidget({type:"bi.right_vertical_adapt",hgap:4,items:[{el:this.numberCounter}]}),d=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:c,width:0},{el:BI.createWidget(),width:30}]});this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){d.attr("items")[1].width=b===!0?a.numberCounter.element.outerWidth()+8:0,d.resize()})}),this.element.click(function(b){a.element.__isMouseInBounds__(b)&&!a.numberCounter.element.__isMouseInBounds__(b)&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.MultiSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.MultiSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectTrigger.EVENT_START="EVENT_START",BI.MultiSelectTrigger.EVENT_STOP="EVENT_STOP",BI.MultiSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.multi_select_trigger",BI.MultiSelectTrigger),BI.MultiSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=BI.deepClone(b.value),this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:{dynamic:!1},value:b.value,el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:a.storeValue.value})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=a._filterValues(a.storeValue);h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:{dynamic:!1},height:25,selected:this.isAllSelected()})},isAllSelected:function(){return this.button_group.isAllSelected()},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=BI.deepClone(a.value)||[],e=BI.map(d,function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.match.concat(f.find)}return BI.map(d,function(b,c){return{text:c.text,title:c.text,value:c.value,selected:a.type===BI.Selection.All}})},setValue:function(a){this.storeValue=BI.deepClone(a),this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_loader",BI.MultiSelectSearchLoader),BI.MultiSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.multi_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue(); +c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},isAllSelected:function(){return this.loader.isAllSelected()},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.MultiSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_pane",BI.MultiSelectSearchPane),BI.MultiSelectCheckSelectedButton=BI.inherit(BI.Single,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-button bi-high-light",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectCheckSelectedButton.superclass._init.apply(this,arguments);var a=this,b=this.options;this.numberCounter=BI.createWidget({type:"bi.text_button",element:this,hgap:4,text:"0",textAlign:"center",textHeight:15}),this.numberCounter.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.numberCounter.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),this.numberCounter.element.hover(function(){a.numberCounter.setTag(a.numberCounter.getText()),a.numberCounter.setText(a._const.checkSelected)},function(){a.numberCounter.setText(a.numberCounter.getTag())}),this.setVisible(!1),BI.isNotNull(b.value)&&this.setValue(b.value)},setValue:function(a){var b=this,c=this.options;return a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[]),a.type===BI.Selection.All?void c.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(c){var d=c.count-a.value.length;BI.nextTick(function(){b.numberCounter.setText(d),b.setVisible(d>0)})}):void BI.nextTick(function(){b.numberCounter.setText(a.value.length),b.setVisible(a.value.length>0)})},getValue:function(){}}),BI.MultiSelectCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_check_selected_button",BI.MultiSelectCheckSelectedButton),BI.MultiSelectEditor=BI.inherit(BI.Widget,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-editor",el:{}})},_init:function(){BI.MultiSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0,value:b.value}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_CLICK_LABEL,function(){})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastValidValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.MultiSelectEditor.EVENT_PAUSE="MultiSelectEditor.EVENT_PAUSE",BI.shortcut("bi.multi_select_editor",BI.MultiSelectEditor),BI.MultiSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.MultiSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),this.setKeyword(c.keyword),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiSelectSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;if(a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All)if(0===a.value.length)this.editor.setState(BI.Selection.All);else if(BI.size(a.assist)<=20){var c="";BI.each(a.assist,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi);else if(0===a.value.length)this.editor.setState(BI.Selection.None);else if(BI.size(a.value)<=20){var c="";BI.each(a.value,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectSearcher.EVENT_START="EVENT_START",BI.MultiSelectSearcher.EVENT_STOP="EVENT_STOP",BI.MultiSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.multi_select_searcher",BI.MultiSelectSearcher),BI.MultiSelectCheckSelectedSwitcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedSwitcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-switcher",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,el:{},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectCheckSelectedSwitcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button=BI.createWidget(b.el,{type:"bi.multi_select_check_selected_button",itemsCreator:b.itemsCreator,value:b.value}),this.button.on(BI.Events.VIEW,function(){a.fireEvent(BI.Events.VIEW,arguments)}),this.switcher=BI.createWidget({type:"bi.switcher",toggle:!1,element:this,el:this.button,popup:BI.extend({type:"bi.multi_select_check_pane",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,onClickContinueSelect:function(){a.switcher.hideView()},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.switcher.on(BI.Switcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE)}),this.switcher.on(BI.Switcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW)}),this.switcher.on(BI.Switcher.EVENT_AFTER_POPUPVIEW,function(){var a=this;BI.nextTick(function(){a.populate()})}),this.switcher.element.click(function(a){a.stopPropagation()})},adjustView:function(){this.switcher.adjustView()},hideView:function(){this.switcher.empty(),this.switcher.hideView()},setAdapter:function(a){this.switcher.setAdapter(a)},setValue:function(a){this.switcher.setValue(a)},setButtonChecked:function(a){this.button.setValue(a)},getValue:function(){},populate:function(a){this.switcher.populate.apply(this.switcher,arguments)}}),BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE="MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE",BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW="MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_select_check_selected_switcher",BI.MultiSelectCheckSelectedSwitcher),BI.MultiSelectInsertList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectInsertList.superclass._init.apply(this,arguments);var 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(),c(),a.fireEvent(BI.MultiSelectInsertList.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.storeValue.type===BI.Selection.Multi&&a.storeValue.value.pushDistinct(b),a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a.adapter.populate(),a._setStartValue(""),a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)}):(a.storeValue.type===BI.Selection.Multi&&a.storeValue.value.pushDistinct(b),a._showAdapter(),a.adapter.setValue(a.storeValue),a.adapter.populate(),a.storeValue.type===BI.Selection.Multi&&a.fireEvent(BI.MultiSelectInsertList.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.MultiSelectInsertList.EVENT_CHANGE)}):a._join(this.getValue(),function(){c(),a.fireEvent(BI.MultiSelectInsertList.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)}),b()}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA},function(a){d._allData=BI.map(a.items,"value"),c(d._allData)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),d.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA,keyword:c.trigger.getKeyword()},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void b()}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),b()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void b()}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.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.map(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.trigger.getKeyword()},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.storeValue.type===BI.Selection.All&&c.storeValue.value.length>=c._count?c.storeValue={type:BI.Selection.Multi,value:[]}:c.storeValue.type===BI.Selection.Multi&&c.storeValue.value.length>=c._count&&(c.storeValue={type:BI.Selection.All,value:[]})}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.MultiSelectList.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectList,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.MultiSelectList.EVENT_CHANGE="BI.MultiSelectList.EVENT_CHANGE",BI.shortcut("bi.multi_select_list",BI.MultiSelectList),BI.MultiSelectTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={value:{}},this.adapter=BI.createWidget({type:"bi.multi_select_tree_popup",itemsCreator:b.itemsCreator}),this.adapter.on(BI.MultiSelectTreePopup.EVENT_CHANGE,function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_tree_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",keywordGetter:function(){return a.searcher.getKeyword()},itemsCreator:function(c,d){c.keyword=a.searcher.getKeyword(),b.itemsCreator(c,d)}}),this.searcherPane.setVisible(!1),this.searcher=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.searcher.getKeyword()})},adapter:this.adapter,popup:this.searcherPane,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){a._showSearcherPane()}},{eventName:BI.Searcher.EVENT_STOP,action:function(){a._showAdapter(),BI.nextTick(function(){a.adapter.populate()})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){a._showAdapter()}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.searcher,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)},resize:function(){},setSelectedValue:function(a){this.storeValue.value=a||{},this.adapter.setSelectedValue(a),this.searcherPane.setSelectedValue(a),this.searcher.setValue({value:a||{}})},setValue:function(a){this.adapter.setValue(a)},stopSearch:function(){this.searcher.stopSearch()},updateValue:function(a){this.adapter.updateValue(a)},getValue:function(){return this.storeValue.value},populate:function(){this.searcher.populate.apply(this.searcher,arguments),this.adapter.populate.apply(this.adapter,arguments)}}),BI.MultiSelectTree.EVENT_CHANGE="BI.MultiSelectTree.EVENT_CHANGE",BI.shortcut("bi.multi_select_tree",BI.MultiSelectTree),BI.MultiSelectTreePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree-popup bi-border-left bi-border-right bi-border-bottom",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popup=BI.createWidget({type:"bi.async_tree",element:this,itemsCreator:b.itemsCreator}),this.popup.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_AFTER_INIT)}),this.popup.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_CHANGE)})},hasChecked:function(){return this.popup.hasChecked()},getValue:function(){return this.popup.getValue()},setValue:function(a){a||(a={}),this.popup.setValue(a)},setSelectedValue:function(a){a||(a={}),this.popup.setSelectedValue(a)},updateValue:function(a){this.popup.updateValue(a),this.popup.refresh()},populate:function(a){this.popup.stroke(a)}}),BI.MultiSelectTreePopup.EVENT_AFTER_INIT="BI.MultiSelectTreePopup.EVENT_AFTER_INIT",BI.MultiSelectTreePopup.EVENT_CHANGE="BI.MultiSelectTreePopup.EVENT_CHANGE",BI.shortcut("bi.multi_select_tree_popup",BI.MultiSelectTreePopup),BI.MultiTreeCheckPane=BI.inherit(BI.Pane,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-pane bi-background",onClickContinueSelect:BI.emptyFn})},_init:function(){BI.MultiTreeCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={};var c=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-tree-check-selected"});c.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect(),BI.nextTick(function(){a.empty()})});var d=BI.createWidget({type:"bi.left",cls:"multi-tree-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:c,lgap:this.constants.lgap,tgap:this.constants.tgap}]});this.display=BI.createWidget({type:"bi.display_tree",cls:"bi-multi-tree-display",itemsCreator:function(a,c){a.type=BI.TreeView.REQ_TYPE_GET_SELECTED_DATA,b.itemsCreator(a,c)},value:(b.value||{}).value}),this.display.on(BI.Events.AFTERINIT,function(){a.fireEvent(BI.Events.AFTERINIT)}),this.display.on(BI.TreeView.EVENT_INIT,function(){d.setVisible(!1)}),this.display.on(BI.TreeView.EVENT_AFTERINIT,function(){d.setVisible(!0)}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:d},{height:"fill",el:this.display}]})},empty:function(){this.display.empty()},populate:function(a){this.display.stroke(a)},setValue:function(a){a||(a={}),this.display.setSelectedValue(a.value)},getValue:function(){}}),BI.MultiTreeCheckPane.EVENT_CONTINUE_CLICK="EVENT_CONTINUE_CLICK",BI.shortcut("bi.multi_tree_check_pane",BI.MultiTreeCheckPane),BI.MultiTreeCombo=BI.inherit(BI.Single,{constants:{offset:{top:1,left:1,right:2,bottom:33}},_defaultConfig:function(){return BI.extend(BI.MultiTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-combo",itemsCreator:BI.emptyFn,height:25})},_init:function(){function a(){h()?b.storeValue={value:b.trigger.getValue()}:i()&&(b.storeValue={value:b.combo.getValue()}),b.trigger.setValue(b.storeValue)}BI.MultiTreeCombo.superclass._init.apply(this,arguments);var b=this,c=this.options,d=!1,e=!1;this.storeValue={value:c.value||{}},this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:c.height,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_tree_searcher",itemsCreator:c.itemsCreator},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",itemsCreator:c.itemsCreator}},value:{value:c.value||{}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){b.popup=this,b.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){b.trigger.getCounter().adjustView(),d=!0,e===!0&&a()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){f=!0;var a={type:BI.Selection.Multi,value:this.hasChecked()?this.getValue():{}};b.trigger.getSearcher().setState(a),b.trigger.getCounter().setButtonChecked(a)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){b.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){g=!0,b.setValue(),b._defaultState()}}],itemsCreator:c.itemsCreator,onLoaded:function(){BI.nextTick(function(){b.trigger.getCounter().adjustView(),b.trigger.getSearcher().adjustView()})}},value:{value:c.value||{}},hideChecker:function(a){return 0===j.element.find(a.target).length}});var f=!1,g=!1,h=function(){return b.trigger.getSearcher().isSearching()},i=function(){return b.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){b.storeValue={value:b.combo.getValue()},this.setValue(b.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){b.storeValue={value:this.getValue()},b.combo.setValue(b.storeValue),BI.nextTick(function(){i()&&b.combo.populate()})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){e===!1&&(e=!0),d===!0&&(e=null,a())}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){b.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){b.combo.isViewVisible()||b.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var a=this.getSearcher().hasChecked(),b={type:BI.Selection.Multi,value:a?{1:1}:{}};this.getSearcher().setState(a?BI.Selection.Multi:BI.Selection.None),this.getCounter().setButtonChecked(b)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){h()||(f===!0&&(b.storeValue={value:b.combo.getValue()},f=!1),b.combo.setValue(b.storeValue),b.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){h()?(b.trigger.stopEditing(),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)):i()&&(b.trigger.stopEditing(),b.storeValue={value:b.combo.getValue()},g===!0&&(b.storeValue={value:{}}),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)),g=!1,f=!1});var j=BI.createWidget({type:"bi.trigger_icon_button",width:c.height,height:c.height,cls:"multi-select-trigger-icon-button"});j.on(BI.TriggerIconButton.EVENT_CHANGE,function(){b.trigger.getCounter().hideView(),b.combo.isViewVisible()?b.combo.hideView():b.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:j,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},setValue:function(a){this.storeValue.value=a||{},this.combo.setValue({value:a||{}})},getValue:function(){return this.storeValue.value},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeCombo.EVENT_CONFIRM="MultiTreeCombo.EVENT_CONFIRM",BI.shortcut("bi.multi_tree_combo",BI.MultiTreeCombo),BI.MultiTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-popup",maxWidth:"auto",minWidth:100,maxHeight:400,onLoaded:BI.emptyFn})},_init:function(){BI.MultiTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={},this.tree=BI.createWidget({type:"bi.async_tree",height:400,cls:"popup-view-tree",itemsCreator:b.itemsCreator,onLoaded:b.onLoaded,value:b.value||{}}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",element:this,stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.tree}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CONFIRM)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreePopup.EVENT_CHANGE)}),this.tree.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiTreePopup.EVENT_AFTERINIT)})},getValue:function(){return this.tree.getValue()},setValue:function(a){a||(a={}),this.tree.setSelectedValue(a.value)},populate:function(a){this.tree.stroke(a)},hasChecked:function(){return this.tree.hasChecked()},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreePopup.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreePopup.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR", +BI.MultiTreePopup.EVENT_AFTERINIT="EVENT_AFTERINIT",BI.shortcut("bi.multi_tree_popup_view",BI.MultiTreePopup),BI.MultiTreeSearchPane=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-search-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiTreeSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.partTree=BI.createWidget({type:"bi.part_tree",element:this,tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(a,c){a.keyword=b.keywordGetter(),b.itemsCreator(a,c)},value:b.value}),this.partTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.partTree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearchPane.EVENT_CHANGE)})},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_tree_search_pane",BI.MultiTreeSearchPane),BI.MultiTreeCheckSelectedButton=BI.inherit(BI.Single,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-selected-button",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiTreeCheckSelectedButton.superclass._init.apply(this,arguments);var a=this;this.indicator=BI.createWidget({type:"bi.icon_button",cls:"check-font trigger-check-selected",width:15,height:15,stopPropagation:!0}),this.checkSelected=BI.createWidget({type:"bi.text_button",cls:"trigger-check-selected",invisible:!0,hgap:4,text:this._const.checkSelected,textAlign:"center",textHeight:15}),this.checkSelected.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.checkSelected.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.horizontal",element:this,items:[this.indicator,this.checkSelected]}),this.element.hover(function(){a.indicator.setVisible(!1),a.checkSelected.setVisible(!0)},function(){a.indicator.setVisible(!0),a.checkSelected.setVisible(!1)}),this.setVisible(!1)},setValue:function(a){a||(a={}),this.setVisible(BI.size(a.value)>0)}}),BI.MultiTreeCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_tree_check_selected_button",BI.MultiTreeCheckSelectedButton),BI.MultiTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",height:b.height}}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_CHANGE,arguments)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){function b(a){var c="",d=0,e=BI.size(a);return BI.each(a,function(a,f){d++;var g=b(f);c+=a+(""===g?"":":"+g)+(d===e?"":",")}),c}if(a||(a={}),a.value||(a.value={}),BI.isNumber(a))this.editor.setState(a);else if(0===BI.size(a.value))this.editor.setState(BI.Selection.None);else{var c="";BI.each(a.value,function(a,d){var e=b(d);c+=a+(""===e?"":":"+e)+"; "}),this.editor.setState(c)}},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearcher.EVENT_START="EVENT_START",BI.MultiTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_tree_searcher",BI.MultiTreeSearcher),BI.NumberEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-number-editor bi-border",validationChecker:function(){return!0},valueFormatter:function(a){return a},value:0,allowBlank:!1,errorText:"",step:1})},_init:function(){BI.NumberEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height,allowBlank:b.allowBlank,value:b.valueFormatter(b.value),validationChecker:b.validationChecker,errorText:b.errorText}),this.editor.on(BI.TextEditor.EVENT_CHANGE,function(){b.value=this.getValue(),a.fireEvent(BI.NumberEditor.EVENT_CHANGE)}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){this.setValue(BI.parseFloat(this.getValue())),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",cls:"column-pre-page-h-font top-button bi-border-left bi-border-bottom"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",cls:"column-next-page-h-font bottom-button bi-border-left bi-border-top"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),BI.createWidget({type:"bi.htape",element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:23}]})},focus:function(){this.editor.focus()},_finetuning:function(a){var b=BI.parseFloat(this.getValue());this.setValue(b.add(a))},setUpEnable:function(a){this.topBtn.setEnable(!!a)},setDownEnable:function(a){this.bottomBtn.setEnable(!!a)},getValue:function(){return this.options.value},setValue:function(a){var b=this.options;b.value=a,this.editor.setValue(b.valueFormatter(a))}}),BI.NumberEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberEditor.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.number_editor",BI.NumberEditor),BI.NumberInterval=BI.inherit(BI.Single,{constants:{typeError:"typeBubble",numberError:"numberBubble",signalError:"signalBubble",editorWidth:114,columns:5,width:30,rows:1,numberErrorCls:"number-error",border:1,less:0,less_equal:1,numTip:""},_defaultConfig:function(){var a=BI.NumberInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-number-interval",height:25,validation:"valid"})},_init:function(){var a=this,b=this.constants,c=this.options;BI.NumberInterval.superclass._init.apply(this,arguments),this.smallEditor=BI.createWidget({type:"bi.editor",height:c.height-2,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,value:c.min,level:"warning",tipType:"warning",quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.smallEditorBubbleType=b.typeError,!1)},cls:"number-interval-small-editor bi-border-top bi-border-bottom bi-border-left"}),this.smallTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.smallEditor.element,items:[{el:this.smallTip,top:0,right:5}]}),this.bigEditor=BI.createWidget({type:"bi.editor",height:c.height-2,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,value:c.max,level:"warning",tipType:"warning",quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.bigEditorBubbleType=b.typeError,!1)},cls:"number-interval-big-editor bi-border-top bi-border-bottom bi-border-right"}),this.bigTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.bigEditor.element,items:[{el:this.bigTip,top:0,right:5}]}),this.smallCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-small-combo bi-border",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closemin===!0?this.smallCombo.setValue(1):this.smallCombo.setValue(0),this.bigCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-big-combo bi-border",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closemax===!0?this.bigCombo.setValue(1):this.bigCombo.setValue(0),this.label=BI.createWidget({type:"bi.label",text:BI.i18nText("BI-Basic_Value"),textHeight:c.height-2*b.border,width:b.width-2*b.border,height:c.height-2*b.border,level:"warning",tipType:"warning"}),this.left=BI.createWidget({type:"bi.htape",items:[{el:a.smallEditor},{el:a.smallCombo,width:b.width-2*b.border}]}),this.right=BI.createWidget({type:"bi.htape",items:[{el:a.bigCombo,width:b.width-2*b.border},{el:a.bigEditor}]}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:c.height,items:[{type:"bi.absolute",items:[{el:a.left,left:-15,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:-15,top:0,bottom:0}]}]}),BI.createWidget({element:a,type:"bi.horizontal_auto",items:[a.label]}),a._setValidEvent(a.bigEditor,b.bigEditor),a._setValidEvent(a.smallEditor,b.smallEditor),a._setErrorEvent(a.bigEditor,b.bigEditor),a._setErrorEvent(a.smallEditor,b.smallEditor),a._setBlurEvent(a.bigEditor),a._setBlurEvent(a.smallEditor),a._setFocusEvent(a.bigEditor),a._setFocusEvent(a.smallEditor),a._setComboValueChangedEvent(a.bigCombo),a._setComboValueChangedEvent(a.smallCombo),a._setEditorValueChangedEvent(a.bigEditor),a._setEditorValueChangedEvent(a.smallEditor)},_checkValidation:function(){var a=this,b=this.constants,c=this.options;if(a._setTitle(""),BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),!a.smallEditor.isValid()||!a.bigEditor.isValid())return a.element.removeClass("number-error"),c.validation="invalid",b.typeError;if(BI.isEmptyString(a.smallEditor.getValue())||BI.isEmptyString(a.bigEditor.getValue()))return a.element.removeClass("number-error"),c.validation="valid","";var d=parseFloat(a.smallEditor.getValue()),e=parseFloat(a.bigEditor.getValue()),f=a.bigCombo.getValue(),g=a.smallCombo.getValue();return f[0]===b.less_equal&&g[0]===b.less_equal?d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):(a.element.removeClass("number-error"),c.validation="valid",""):d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):d===e?(a.element.addClass("number-error"),c.validation="invalid",b.signalError):(a.element.removeClass("number-error"),c.validation="valid","")},_setTitle:function(a){var b=this;b.bigEditor.setTitle(a),b.smallEditor.setTitle(a),b.label.setTitle(a)},_setFocusEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_FOCUS,function(){switch(b._setTitle(""),b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{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"});break;default:return}})},_setBlurEvent:function(a){var b=this.constants,c=this;a.on(BI.Editor.EVENT_BLUR,function(){switch(BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),c._checkValidation()){case b.typeError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));break;case b.numberError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));break;case b.signalError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));break;default:c._setTitle("")}})},_setErrorEvent:function(a){var b=this.constants,c=this;a.on(BI.Editor.EVENT_ERROR,function(){c._checkValidation(),BI.Bubbles.show(b.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),c,{offsetStyle:"center"}),c.fireEvent(BI.NumberInterval.EVENT_ERROR)})},_setValidEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_VALID,function(){switch(b._checkValidation()){case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"center"}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"center"}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumberInterval.EVENT_VALID)}})},_setEditorValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.Editor.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{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,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)}),this.pager=BI.createWidget(b.pager,{type:"bi.direction_pager",height:30}),this.pager.on(BI.Pager.EVENT_CHANGE,function(){var c=this.getVPage&&this.getVPage();BI.isNull(c)&&(c=this.getCurrentPage());var d=this.getHPage&&this.getHPage();b.itemsCreator({vpage:c,hpage:d},function(b,e,f,g){a.table.setVPage?a.table.setVPage(c):a.table.setValue(c),a.table.setHPage&&a.table.setHPage(d),a.populate.apply(a,arguments)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.table,left:0,top:0},{el:this.pager,left:0,right:0,bottom:0}]})},setHPage:function(a){this.hCurr=a,this.pager.setHPage&&this.pager.setHPage(a),this.table.setHPage&&this.table.setHPage(a)},setVPage:function(a){this.vCurr=a,this.pager.setVPage&&this.pager.setVPage(a),this.table.setVPage&&this.table.setVPage(a)},getHPage:function(){var a=this.pager.getHPage&&this.pager.getHPage();return BI.isNotNull(a)?a:(a=this.pager.getCurrentPage&&this.pager.getCurrentPage(),BI.isNotNull(a)?a:this.hpage)},getVPage:function(){var a=this.pager.getVPage&&this.pager.getVPage();return BI.isNotNull(a)?a:(a=this.pager.getCurrentPage&&this.pager.getCurrentPage(),BI.isNotNull(a)?a:this.vpage)},setWidth:function(a){BI.PageTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(a)},setHeight:function(a){BI.PageTable.superclass.setHeight.apply(this,arguments);var b=!1;this.pager.alwaysShowPager?b=!0:this.pager.hasHNext&&this.pager.hasHNext()?b=!0:this.pager.hasHPrev&&this.pager.hasHPrev()?b=!0:this.pager.hasVNext&&this.pager.hasVNext()?b=!0:this.pager.hasVPrev&&this.pager.hasVPrev()?b=!0:this.pager.hasNext&&this.pager.hasNext()?b=!0:this.pager.hasPrev&&this.pager.hasPrev()&&(b=!0),this.table.setHeight(a-(b?30:0))},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.columnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getVerticalScroll:function(){return this.table.getVerticalScroll()},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},restore:function(){this.table.restore()},attr:function(){BI.PageTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},populate:function(){this.pager.populate(),this.table.populate.apply(this.table,arguments)},destroy:function(){this.table.destroy(),this.pager&&this.pager.destroy(),BI.PageTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.page_table",BI.PageTable),BI.PreviewTableCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTableCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table-cell",text:""})},_init:function(){BI.PreviewTableCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.preview_table_cell",BI.PreviewTableCell),BI.PreviewTableHeaderCell=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTableHeaderCell.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table-header-cell",text:""})},_init:function(){BI.PreviewTableHeaderCell.superclass._init.apply(this,arguments);this.options;BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",height:this.options.height,text:this.options.text,value:this.options.value})}}),BI.shortcut("bi.preview_table_header_cell",BI.PreviewTableHeaderCell),BI.PreviewTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PreviewTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-preview-table",isNeedFreeze:!1,freezeCols:[],rowSize:null,columnSize:[],headerRowSize:30,header:[],items:[]})},_init:function(){BI.PreviewTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.table=BI.createWidget({type:"bi.table_view",element:this,isNeedResize:!1,isResizeAdapt:!1,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,rowSize:b.rowSize,columnSize:b.columnSize,headerRowSize:b.headerRowSize,header:BI.map(b.header,function(a,b){return BI.map(b,function(a,b){return BI.extend({type:"bi.preview_table_header_cell"},b)})}),items:BI.map(b.items,function(a,b){return BI.map(b,function(a,b){return BI.extend({type:"bi.preview_table_cell"},b)})})}),this.table.on(BI.Table.EVENT_TABLE_AFTER_INIT,function(){a._adjustColumns(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT,arguments)}),this.table.on(BI.Table.EVENT_TABLE_RESIZE,function(){a._adjustColumns()})},_hasAdaptCol:function(a){return BI.any(a,function(a,b){return""===b})},_isPercentage:function(a){return a[0]<=1},_adjustColumns:function(){var a=this.options;if(a.isNeedFreeze===!0){if(this._isPercentage(a.columnSize)){if(this._hasAdaptCol(a.columnSize)){var b=[],c=0;BI.each(a.columnSize,function(a,d){""===d?b.push(a):c+=d}),c=1-c;var d=c/b.length;BI.each(b,function(b,c){a.columnSize[c]=d})}var e=0!==BI.first(a.freezeCols),f=[],g=[];BI.each(a.columnSize,function(b,c){a.freezeCols.contains(b)?f.push(c):g.push(c)});var h=BI.sum(f),i=BI.sum(g);BI.each(f,function(a,b){f[a]=b/h}),BI.each(g,function(a,b){g[a]=b/i}),this.table.setRegionColumnSize(e?["fill",h]:[h,"fill"]),this.table.setColumnSize(e?g.concat(f):f.concat(g))}}else(this._hasAdaptCol(a.columnSize)||this._isPercentage(a.columnSize))&&this.table.setRegionColumnSize(["100%"])},setColumnSize:function(a){return this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){return this.table.setHeaderColumnSize(a)},setRegionColumnSize:function(a){return this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},setVerticalScroll:function(a){return this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){return this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){return this.table.setRightHorizontalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},getLeftHorizontalScroll:function(){return this.table.getLeftHorizontalScroll()},getRightHorizontalScroll:function(){return this.table.getRightHorizontalScroll()},getColumns:function(){return this.table.getColumns()},populate:function(a,b){this.table.populate(a,b)}}),BI.PreviewTable.EVENT_CHANGE="PreviewTable.EVENT_CHANGE",BI.shortcut("bi.preview_table",BI.PreviewTable),BI.QuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-combo",behaviors:{},height:25})},_init:function(){BI.QuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.quarter_trigger",value:b.value}),this.trigger.on(BI.QuarterTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.QuarterTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.QuarterTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM))}),this.popup=BI.createWidget({type:"bi.quarter_popup",behaviors:b.behaviors,value:b.value}),this.popup.on(BI.QuarterPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.QuarterCombo.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.QuarterCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return BI.isNull(this.popup)?this.options.value||"":this.popup.getValue()||""}}),BI.QuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.quarter_combo",BI.QuarterCombo),BI.QuarterPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-popup",behaviors:{}})},_init:function(){BI.QuarterPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[{text:Date._QN[1],value:1},{text:Date._QN[2],value:2},{text:Date._QN[3],value:3},{text:Date._QN[4],value:4}];c=BI.map(c,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"left",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:25})}),this.quarter=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(c,{}),layouts:[{type:"bi.vertical"}],value:b.value}),this.quarter.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.quarter.getValue()[0]},setValue:function(a){this.quarter.setValue([a])}}),BI.QuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quarter_popup",BI.QuarterPopup),BI.QuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,textWidth:40,errorText:BI.i18nText("BI-Quarter_Trigger_Error_Text")},_defaultConfig:function(){return BI.extend(BI.QuarterTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-quarter-trigger bi-border",height:24})},_init:function(){BI.QuarterTrigger.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<=4},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.QuarterTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.QuarterTrigger.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.QuarterTrigger.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.QuarterTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.QuarterTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-quarter-text",text:BI.i18nText("BI-Multi_Date_Quarter"),width:c.textWidth},width:c.textWidth},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]}),this.setValue(b.value)},setValue:function(a){a=a||"",this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return this.editor.getValue()}}),BI.QuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.QuarterTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.QuarterTrigger.EVENT_START="EVENT_START",BI.QuarterTrigger.EVENT_STOP="EVENT_STOP",BI.QuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.quarter_trigger",BI.QuarterTrigger),BI.ResponisveTable=BI.inherit(BI.Widget,{_const:{perColumnSize:100},_defaultConfig:function(){return BI.extend(BI.ResponisveTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-responsive-table", +isNeedFreeze:!1,freezeCols:[],logic:{dynamic:!1},isNeedMerge:!1,mergeCols:[],mergeRule:function(a,b){return BI.isEqual(a,b)},columnSize:[],headerRowSize:25,footerRowSize:25,rowSize:25,regionColumnSize:!1,header:[],footer:!1,items:[],crossHeader:[],crossItems:[]})},_init:function(){BI.ResponisveTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.table=BI.createWidget({type:"bi.table_view",element:this,logic:b.logic,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,headerRowSize:b.headerRowSize,footerRowSize:b.footerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,header:b.header,footer:b.footer,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_AFTER_INIT,function(){a._initRegionSize(),a.table.resize(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT,arguments)}),this.table.on(BI.Table.EVENT_TABLE_RESIZE,function(){a._resizeRegion(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(){a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE,function(){a.fireEvent(BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_REGION_RESIZE,function(){b.isNeedResize===!0&&a._isAdaptiveColumn()&&a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE,function(){a._resizeBody(),a.fireEvent(BI.Table.EVENT_TABLE_BEFORE_COLUMN_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_COLUMN_RESIZE,function(){a.fireEvent(BI.Table.EVENT_TABLE_COLUMN_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){a._resizeRegion(),a._resizeHeader(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)})},_initRegionSize:function(){var a=this.options;if(a.isNeedFreeze===!0){var b=this.table.getRegionColumnSize(),c=this.table.element.width();if(!b[0]||"fill"===b[0]||b[0]>c||b[1]>c){var d=a.freezeCols;if(0===d.length)this.table.setRegionColumnSize([0,"fill"]);else if(d.length>0&&d.lengtha.columnSize.length/2&&(e=2*c/3),this.table.setRegionColumnSize([e,"fill"])}else this.table.setRegionColumnSize(["fill",0])}}},_getBlockSize:function(){var a=this.options,b=this.table.getCalculateColumnSize();if(a.isNeedFreeze===!0){var c=[],d=[];BI.each(b,function(b,e){a.freezeCols.contains(b)?c.push(e):d.push(e)});var e=BI.sum(c)+c.length,f=BI.sum(d)+d.length;return{sumLeft:e,sumRight:f,left:c,right:d}}return{size:b,sum:BI.sum(b)+b.length}},_isAdaptiveColumn:function(a){return!(BI.last(a||this.table.getColumnSize())>1.05)},_resizeHeader:function(){var a=this,b=this.options;if(b.isNeedFreeze===!0)if(this._isAdaptiveColumn()){var c=this.table.getCalculateColumnSize();this.table.setHeaderColumnSize(c)}else{var d=this.table.getClientRegionColumnSize(),e=this._getBlockSize(),f=e.sumLeft,g=e.sumRight,h=e.left,i=e.right;h[h.length-1]+=d[0]-f,i[i.length-1]+=d[1]-g;var j=BI.clone(h),k=BI.clone(i);j[j.length-1]="",k[k.length-1]="",this.table.setColumnSize(j.concat(k)),e=a._getBlockSize(),h[h.length-1]0&&a.freezeCols.length=d+e)&&this.table.setRegionColumnSize([d,"fill"]),this._resizeRegion()}},_resizeRegion:function(){var a=this.options,b=this.table.getCalculateRegionColumnSize();if(a.isNeedFreeze===!0&&a.freezeCols.length>0&&a.freezeCols.lengtha.columnSize.length/2&&(e=2*c/3),this.table.setRegionColumnSize([e,"fill"])}}},resize:function(){this.table.resize(),this._resizeRegion(),this._resizeHeader()},setColumnSize:function(a){this.table.setColumnSize(a),this._adjustRegion(),this._resizeHeader()},getColumnSize:function(){return this.table.getColumnSize()},getCalculateColumnSize:function(){return this.table.getCalculateColumnSize()},setHeaderColumnSize:function(a){this.table.setHeaderColumnSize(a),this._adjustRegion(),this._resizeHeader()},setRegionColumnSize:function(a){this.table.setRegionColumnSize(a),this._resizeHeader()},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},getCalculateRegionColumnSize:function(){return this.table.getCalculateRegionColumnSize()},getCalculateRegionRowSize:function(){return this.table.getCalculateRegionRowSize()},getClientRegionColumnSize:function(){return this.table.getClientRegionColumnSize()},getScrollRegionColumnSize:function(){return this.table.getScrollRegionColumnSize()},getScrollRegionRowSize:function(){return this.table.getScrollRegionRowSize()},hasVerticalScroll:function(){return this.table.hasVerticalScroll()},setVerticalScroll:function(a){this.table.setVerticalScroll(a)},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},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()},getColumns:function(){return this.table.getColumns()},attr:function(){BI.ResponisveTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments)},populate:function(a){var b=this,c=this.options;this.table.populate.apply(this.table,arguments),c.isNeedFreeze===!0&&BI.nextTick(function(){b._initRegionSize(),b.table.resize(),b._resizeHeader()})}}),BI.shortcut("bi.responsive_table",BI.ResponisveTable),BI.SelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-first-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.first_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_first_plus_group_node",BI.SelectTreeFirstPlusGroupNode),BI.SelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-last-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.last_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_last_plus_group_node",BI.SelectTreeLastPlusGroupNode),BI.SelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-mid-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:25})},_init:function(){BI.SelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.mid_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:25,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_mid_plus_group_node",BI.SelectTreeMidPlusGroupNode),BI.SelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-combo",height:30,text:"",items:[],value:""})},_init:function(){BI.SelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value}),this.popup=BI.createWidget({type:"bi.select_level_tree",items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView()})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.shortcut("bi.select_tree_combo",BI.SelectTreeCombo),BI.SelectTreeExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-expander",trigger:"click",toggle:!0,direction:"bottom",isDefaultInit:!0,el:{},popup:{}})},_init:function(){BI.SelectTreeExpander.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({stopPropagation:!0},b.el)),this.trigger.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&this.isSelected()&&a.expander.setValue([]),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.expander=BI.createWidget({type:"bi.expander",element:this,trigger:b.trigger,toggle:b.toggle,direction:b.direction,isDefaultInit:b.isDefaultInit,el:this.trigger,popup:b.popup}),this.expander.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.trigger.setSelected(!1),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){BI.contains(a,this.trigger.getValue())?(this.trigger.setSelected(!0),this.expander.setValue([])):(this.trigger.setSelected(!1),this.expander.setValue(a))},getValue:function(){return this.trigger.isSelected()?[this.trigger.getValue()]:this.expander.getValue()},populate:function(a){this.expander.populate(a)}}),BI.shortcut("bi.select_tree_expander",BI.SelectTreeExpander),BI.SelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-level-tree",tipText:BI.i18nText("BI-No_Selected_Item"),items:[],value:""})},_formatItems:function(a,b){var c=this;return BI.each(a,function(d,e){var f={layer:b};if(e.id=e.id||BI.UUID(),e.isParent===!0||BI.isNotEmptyArray(e.children)){switch(d){case 0:f.type="bi.select_tree_first_plus_group_node";break;case a.length-1:f.type="bi.select_tree_last_plus_group_node";break;default:f.type="bi.select_tree_mid_plus_group_node"}BI.defaults(e,f),c._formatItems(e.children)}else{switch(d){case a.length-1:f.type="bi.last_tree_leaf_item";break;default:f.type="bi.mid_tree_leaf_item"}BI.defaults(e,f)}}),a},_init:function(){BI.SelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{type:"bi.select_tree_expander",isDefaultInit:!0},items:this._formatItems(BI.Tree.transformToTreeFormat(b.items)),value:b.value,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SelectTreePopup.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.SelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a)))}}),BI.SelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_level_tree",BI.SelectTreePopup),BI.SequenceTableDynamicNumber=BI.inherit(BI.SequenceTableTreeNumber,{_defaultConfig:function(){return BI.extend(BI.SequenceTableDynamicNumber.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-sequence-table-dynamic-number"})},_init:function(){BI.SequenceTableDynamicNumber.superclass._init.apply(this,arguments)},_formatNumber:function(a){function b(a){var c=0;return BI.isNotEmptyArray(a.children)?(BI.each(a.children,function(a,d){c+=b(d)}),a.children.length>1&&BI.isNotEmptyArray(a.values)&&c++):c++,c}var c=this.options,d=[],e=this._getStart(a),f=0,g=0;return BI.each(a,function(a,h){BI.isArray(h.children)&&(BI.each(h.children,function(a,h){var i=b(h);d.push({text:e++,start:f,top:g,cnt:i,index:a,height:i*c.rowSize}),f+=i,g+=i*c.rowSize}),BI.isNotEmptyArray(h.values)&&(d.push({text:BI.i18nText("BI-Summary_Values"),start:f++,top:g,cnt:1,isSummary:!0,height:c.rowSize}),g+=c.rowSize))}),d}}),BI.shortcut("bi.sequence_table_dynamic_number",BI.SequenceTableDynamicNumber),BI.SequenceTableListNumber=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTableListNumber.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table-list-number",isNeedFreeze:!1,scrollTop:0,startSequence:1,headerRowSize:25,rowSize:25,sequenceHeaderCreator:null,header:[],items:[],crossHeader:[],crossItems:[],pageSize:20})},_init:function(){BI.SequenceTableListNumber.superclass._init.apply(this,arguments);var a=this.options;this.start=a.startSequence,this.renderedCells=[],this.renderedKeys=[],this.container=BI.createWidget({type:"bi.absolute",width:60,scrollable:!1}),this.scrollContainer=BI.createWidget({type:"bi.vertical",scrollable:!1,scrolly:!1,items:[this.container]}),this.headerContainer=BI.createWidget({type:"bi.absolute",cls:"bi-border",width:58,scrollable:!1}),this.layout=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.headerContainer,height:a.headerRowSize*a.header.length-2},{el:{type:"bi.layout"},height:2},{el:this.scrollContainer}]}),this._populate()},_layout:function(){var a=this.options,b=a.headerRowSize*a.header.length-2,c=this.layout.attr("items");a.isNeedFreeze===!1?(c[0].height=0,c[1].height=0):a.isNeedFreeze===!0&&(c[0].height=b,c[1].height=2),this.layout.attr("items",c),this.layout.resize(),this.container.setHeight(a.items.length*a.rowSize);try{this.scrollContainer.element.scrollTop(a.scrollTop)}catch(d){}},_createHeader:function(){var a=this.options;BI.createWidget({type:"bi.absolute",element:this.headerContainer,items:[{el:a.sequenceHeaderCreator||{type:"bi.table_style_cell",cls:"sequence-table-title-cell",styleGetter:a.headerCellStyleGetter,text:BI.i18nText("BI-Number_Index")},left:0,top:0,right:0,bottom:0}]})},_calculateChildrenToRender:function(){for(var a=this,b=this.options,c=BI.clamp(b.scrollTop,0,b.rowSize*b.items.length-(b.height-b.header.length*b.headerRowSize)+BI.DOM.getScrollWidth()),d=Math.floor(c/b.rowSize),e=d+Math.floor((b.height-b.header.length*b.headerRowSize)/b.rowSize),f=[],g=[],h=d,i=0;h<=e&&h-1)b.rowSize!==this.renderedCells[j]._height&&(this.renderedCells[j]._height=b.rowSize,this.renderedCells[j].el.setHeight(b.rowSize)),this.renderedCells[j].top!==k&&(this.renderedCells[j].top=k,this.renderedCells[j].el.element.css("top",k+"px")),f.push(this.renderedCells[j]);else{var l=BI.createWidget(BI.extend({type:"bi.table_style_cell",cls:"sequence-table-number-cell bi-border-left bi-border-right bi-border-bottom",width:60,height:b.rowSize,text:this.start+h,styleGetter:function(c){return function(){return b.sequenceCellStyleGetter(a.start+h-1)}}(i)}));f.push({el:l,left:0,top:k,_height:b.rowSize})}g.push(this.start+h)}var m={},n={},o=[];BI.each(g,function(b,c){BI.deepContains(a.renderedKeys,c)?m[b]=c:n[b]=c}),BI.each(this.renderedKeys,function(a,b){BI.deepContains(m,b)||BI.deepContains(n,b)||o.push(a)}),BI.each(o,function(b,c){a.renderedCells[c].el.destroy()});var p=[];BI.each(n,function(a){p.push(f[a])}),BI.createWidget({type:"bi.absolute",element:this.container,items:p}),this.renderedCells=f,this.renderedKeys=g},_populate:function(){this.headerContainer.empty(),this._createHeader(),this._layout(),this._calculateChildrenToRender()},setVerticalScroll:function(a){if(this.options.scrollTop!==a){this.options.scrollTop=a;try{this.scrollContainer.element.scrollTop(a)}catch(b){}}},getVerticalScroll:function(){return this.options.scrollTop},setVPage:function(a){a=a<1?1:a;var b=this.options;this.start=(a-1)*b.pageSize+1},_restore:function(){this.options;BI.each(this.renderedCells,function(a,b){b.el.destroy()}),this.renderedCells=[],this.renderedKeys=[]},restore:function(){this._restore()},populate:function(a,b){var c=this.options;a&&a!==this.options.items&&(c.items=a,this._restore()),b&&b!==this.options.header&&(c.header=b),this._populate()}}),BI.shortcut("bi.sequence_table_list_number",BI.SequenceTableListNumber),BI.SequenceTable=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SequenceTable.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-sequence-table",el:{type:"bi.adaptive_table"},sequence:{},isNeedResize:!0,isResizeAdapt:!1,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:[],showSequence:!1,startSequence:1})},_init:function(){BI.SequenceTable.superclass._init.apply(this,arguments);var a=this,b=this.options;this.sequence=BI.createWidget(b.sequence,{type:"bi.sequence_table_list_number",invisible:b.showSequence===!1,startSequence:b.startSequence,isNeedFreeze:b.isNeedFreeze,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems,headerRowSize:b.headerRowSize,rowSize:b.rowSize,width:60,height:b.height&&b.height-BI.GridTableScrollbar.SIZE,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter}),this.table=BI.createWidget(b.el,{type:"bi.adaptive_table",width:b.showSequence===!0?b.width-60:b.width,height:b.height,isNeedResize:b.isNeedResize,isResizeAdapt:b.isResizeAdapt,isNeedFreeze:b.isNeedFreeze,freezeCols:b.freezeCols,isNeedMerge:b.isNeedMerge,mergeCols:b.mergeCols,mergeRule:b.mergeRule,columnSize:b.columnSize,minColumnSize:b.minColumnSize,maxColumnSize:b.maxColumnSize,headerRowSize:b.headerRowSize,rowSize:b.rowSize,regionColumnSize:b.regionColumnSize,headerCellStyleGetter:b.headerCellStyleGetter,summaryCellStyleGetter:b.summaryCellStyleGetter,sequenceCellStyleGetter:b.sequenceCellStyleGetter,header:b.header,items:b.items,crossHeader:b.crossHeader,crossItems:b.crossItems}),this.table.on(BI.Table.EVENT_TABLE_SCROLL,function(b){a.sequence.getVerticalScroll()!==this.getVerticalScroll()&&(a.sequence.setVerticalScroll(this.getVerticalScroll()),a.sequence.populate()),a.fireEvent(BI.Table.EVENT_TABLE_SCROLL,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE,arguments)}),this.table.on(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,function(){b.regionColumnSize=this.getRegionColumnSize(),b.columnSize=this.getColumnSize(),a.fireEvent(BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE,arguments)}),this.htape=BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.sequence,left:0,top:0},{el:this.table,top:0,left:b.showSequence===!0?60:0}]}),this._populate()},_populate:function(){var a=this.options;a.showSequence===!0?(this.sequence.setVisible(!0),this.table.element.css("left","60px"),this.table.setWidth(a.width-60)):(this.sequence.setVisible(!1),this.table.element.css("left","0px"),this.table.setWidth(a.width))},setWidth:function(a){BI.PageTable.superclass.setWidth.apply(this,arguments),this.table.setWidth(this.options.showSequence?a-60:a)},setHeight:function(a){BI.PageTable.superclass.setHeight.apply(this,arguments),this.table.setHeight(a),this.sequence.setHeight(a-BI.GridTableScrollbar.SIZE)},setColumnSize:function(a){this.options.columnSize=a,this.table.setColumnSize(a)},getColumnSize:function(){return this.table.getColumnSize()},setRegionColumnSize:function(a){this.options.columnSize=a,this.table.setRegionColumnSize(a)},getRegionColumnSize:function(){return this.table.getRegionColumnSize()},hasLeftHorizontalScroll:function(){return this.table.hasLeftHorizontalScroll()},hasRightHorizontalScroll:function(){return this.table.hasRightHorizontalScroll()},setLeftHorizontalScroll:function(a){this.table.setLeftHorizontalScroll(a)},setRightHorizontalScroll:function(a){this.table.setRightHorizontalScroll(a)},setVerticalScroll:function(a){this.table.setVerticalScroll(a),this.sequence.setVerticalScroll(a)},getVerticalScroll:function(){return this.table.getVerticalScroll()},setVPage:function(a){this.sequence.setVPage&&this.sequence.setVPage(a)},setHPage:function(a){this.sequence.setHPage&&this.sequence.setHPage(a)},attr:function(){BI.SequenceTable.superclass.attr.apply(this,arguments),this.table.attr.apply(this.table,arguments),this.sequence.attr.apply(this.sequence,arguments)},restore:function(){this.table.restore(),this.sequence.restore()},populate:function(a,b,c,d){var e=this.options;a&&(e.items=a),b&&(e.header=b),c&&(e.crossItems=c),d&&(e.crossHeader=d),this._populate(),this.table.populate.apply(this.table,arguments),this.sequence.populate.apply(this.sequence,arguments),this.sequence.setVerticalScroll(this.table.getVerticalScroll())},destroy:function(){this.table.destroy(),BI.SequenceTable.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.sequence_table",BI.SequenceTable),BI.SingleSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.single_select_list",element:this,logic:{dynamic:!1},value:b.value,el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map([a.storeValue],function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d,selected:!1}});h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.single_select_radio_item",logic:{dynamic:!1},height:25,selected:!1})},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=BI.deepClone(a.value)||[],e=BI.map(d,function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.match.concat(f.find)}return BI.map(d,function(a,b){return{text:b.text,title:b.text,value:b.value,selected:!1}})},setValue:function(a){this.storeValue=a,this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SingleSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_loader",BI.SingleSelectSearchLoader),BI.SingleSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"single-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.single_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_pane",BI.SingleSelectSearchPane),BI.SingleSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_init:function(){BI.SingleSelectCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue),a.trigger.getSearcher().setState(a.storeValue)};this.storeValue=b.value||"",this.requesting=!1,this.trigger=BI.createWidget({type:"bi.single_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(a.getValue()),d.apply(a,arguments)})},value:this.storeValue}),this.trigger.on(BI.SingleSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.SingleSelectTrigger.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.SingleSelectTrigger.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.SingleSelectTrigger.EVENT_CHANGE,function(b,d){a.storeValue=this.getValue(),c()}),this.trigger.on(BI.SingleSelectTrigger.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.single_select_popup_view",ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.SingleSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c()})}},{eventName:BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM, +action:function(){a._defaultState()}},{eventName:BI.SingleSelectPopupView.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.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length},value:b.value}),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.SingleSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"single-select-trigger-icon-button"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){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="")},_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.remove(b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||"",this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return this.storeValue},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.SingleSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.single_select_combo",BI.SingleSelectCombo),BI.SingleSelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-list",direction:BI.Direction.Top,logic:{dynamic:!0},items:[],itemsCreator:BI.emptyFn,hasNext:BI.emptyFn,onLoaded:BI.emptyFn,el:{type:"bi.list_pane"}})},_init:function(){BI.SingleSelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.list=BI.createWidget(b.el,{type:"bi.list_pane",items:b.items,itemsCreator:function(c,d){b.itemsCreator(c,function(b){d.apply(a,arguments)})},onLoaded:b.onLoaded,hasNext:b.hasNext,value:b.value}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&a.fireEvent(BI.SingleSelectList.EVENT_CHANGE,c,d),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),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.list)}))))},hasPrev:function(){return this.list.hasPrev()},hasNext:function(){return this.list.hasNext()},prependItems:function(a){this.list.prependItems.apply(this.list,arguments)},addItems:function(a){this.list.addItems.apply(this.list,arguments)},setValue:function(a){this.list.setValue([a])},getValue:function(){return this.list.getValue()[0]},empty:function(){this.list.empty()},populate:function(a){this.list.populate.apply(this.list,arguments)},resetHeight:function(a){this.list.resetHeight?this.list.resetHeight(a):this.list.element.css({"max-height":a+"px"})},setNotSelectedValue:function(){this.list.setNotSelectedValue.apply(this.list,arguments)},getNotSelectedValue:function(){return this.list.getNotSelectedValue()},getAllButtons:function(){return this.list.getAllButtons()},getAllLeaves:function(){return this.list.getAllLeaves()},getSelectedButtons:function(){return this.list.getSelectedButtons()},getNotSelectedButtons:function(){return this.list.getNotSelectedButtons()},getIndexByValue:function(a){return this.list.getIndexByValue(a)},getNodeById:function(a){return this.list.getNodeById(a)},getNodeByValue:function(a){return this.list.getNodeByValue(a)}}),BI.SingleSelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_list",BI.SingleSelectList),BI.SingleSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.single_select_list",element:this,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map([a.storeValue],function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d,selected:!1}});h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&(a.storeValue=f),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.single_select_radio_item",logic:this.options.logic,height:25,selected:!1})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},_assertValue:function(a){a||(a="")},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||"",this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SingleSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_loader",BI.SingleSelectLoader),BI.SingleSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.single_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.SingleSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM)}})},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.SingleSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.SingleSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.single_select_popup_view",BI.SingleSelectPopupView),BI.SingleSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.SingleSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.single_select_searcher",height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker,value:b.value}),this.searcher.on(BI.SingleSelectSearcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_START)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_CHANGE,arguments)});BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:BI.createWidget(),width:30}]})},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch()},setAdapter:function(a){this.searcher.setAdapter(a)},setValue:function(a){this.searcher.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.SingleSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.SingleSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.SingleSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectTrigger.EVENT_START="EVENT_START",BI.SingleSelectTrigger.EVENT_STOP="EVENT_STOP",BI.SingleSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.single_select_trigger",BI.SingleSelectTrigger),BI.SingleSelectEditor=BI.inherit(BI.Widget,{_const:{checkSelected:BI.i18nText("BI-Check_Selected")},_defaultConfig:function(){return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-editor",el:{}})},_init:function(){BI.SingleSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0,value:b.value}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_CLICK_LABEL,function(){})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastValidValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.SingleSelectEditor.EVENT_PAUSE="SingleSelectEditor.EVENT_PAUSE",BI.shortcut("bi.single_select_editor",BI.SingleSelectEditor),BI.SingleSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.SingleSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.single_select_editor",height:b.height}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.single_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),this.setKeyword(c.keyword),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.SingleSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.SingleSelectSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;a||(a=""),""===a?this.editor.setState(BI.Selection.None):this.editor.setState(b.valueFormatter(a+"")||a+"")},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.SingleSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.SingleSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectSearcher.EVENT_START="EVENT_START",BI.SingleSelectSearcher.EVENT_STOP="EVENT_STOP",BI.SingleSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.single_select_searcher",BI.SingleSelectSearcher),BI.SingleSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.single_select_list",element:this,logic:{dynamic:!1},el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map([a.storeValue],function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d,selected:!1}});h=a._createItems(i)}if(g){for(var j=!1,k=0;k0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_add_pane",BI.SingleSelectSearchPane),BI.SingleSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:28})},_init:function(){BI.SingleSelectCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue),a.trigger.getSearcher().setState(a.storeValue)};this.storeValue="",this.requesting=!1,this.trigger=BI.createWidget({type:"bi.single_select_add_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(a.getValue()),d.apply(a,arguments)})}}),this.trigger.on(BI.SingleSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.SingleSelectTrigger.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.SingleSelectTrigger.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.SingleSelectTrigger.EVENT_CHANGE,function(b,d){a.storeValue=this.getValue(),c()}),this.trigger.on(BI.SingleSelectTrigger.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.single_select_popup_view",ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.SingleSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c()})}},{eventName:BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){a._defaultState()}},{eventName:BI.SingleSelectPopupView.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.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.SingleSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"single-select-trigger-icon-button"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){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="")},_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.remove(b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),this.requesting=!0,d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(d.items,"value");if(c.storeValue.type===a.type){var f=!1,g=c._makeMap(c.storeValue.value);return BI.each(e,function(a,b){BI.isNotNull(g[b])&&(f=!0,delete g[b])}),f&&(c.storeValue.value=BI.values(g)),void c._adjust(b)}var h=c._makeMap(c.storeValue.value),i=c._makeMap(a.value),j=[];BI.each(e,function(a,b){BI.isNotNull(h[e[a]])&&delete h[e[a]],BI.isNull(i[e[a]])&&j.push(b)}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_join:function(a,b){var c=this;this.options;if(this._assertValue(a),this._assertValue(this.storeValue),this.storeValue.type===a.type){var d=this._makeMap(this.storeValue.value);BI.each(a.value,function(a,b){d[b]||(c.storeValue.value.push(b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,delete d[b])}),e&&(this.storeValue.value=BI.values(d)),void c._adjust(b)}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||"",this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return this.storeValue},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.SingleSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.single_select_add_combo",BI.SingleSelectCombo),BI.SingleSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.SingleSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.single_select_add_searcher",height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.SingleSelectSearcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_START)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_CHANGE,arguments)});BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:BI.createWidget(),width:30}]})},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch()},setAdapter:function(a){this.searcher.setAdapter(a)},setValue:function(a){this.searcher.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.SingleSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.SingleSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.SingleSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectTrigger.EVENT_START="EVENT_START",BI.SingleSelectTrigger.EVENT_STOP="EVENT_STOP",BI.SingleSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.single_select_add_trigger",BI.SingleSelectTrigger),BI.SingleSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.SingleSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.single_select_editor",height:b.height}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.single_select_search_add_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),this.setKeyword(c.keyword),b.itemsCreator(c,d)}},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.SingleSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.SingleSelectSearcher.EVENT_SEARCHING,b)})},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;a||(a=""),""===a?this.editor.setState(BI.Selection.None):this.editor.setState(b.valueFormatter(a+"")||a+"")},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.SingleSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.SingleSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectSearcher.EVENT_START="EVENT_START",BI.SingleSelectSearcher.EVENT_STOP="EVENT_STOP",BI.SingleSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.single_select_add_searcher",BI.SingleSelectSearcher),BI.SignTextEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-sign-initial-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",text:"",height:24})},_init:function(){BI.SignTextEditor.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:"sign-editor-text",title:b.title,warningTitle:b.warningTitle,tipType:b.tipType,textAlign:"left",height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.SignTextEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignTextEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText()}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),a._checkText()},_checkText:function(){var a=this.options;BI.nextTick(BI.bind(function(){if(""===this.editor.getValue())this.text.setValue(a.watermark||""),this.text.element.addClass("bi-water-mark");else{var b=this.editor.getValue();b=BI.isEmpty(b)||b==a.text?a.text:b+a.text,this.text.setValue(b),this.text.element.removeClass("bi-water-mark")}},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(a){this.text.setTitle(a)},setWarningTitle:function(a){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&&ef-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:"100%"},{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[this.label]}],rgap:c.EDITOR_WIDTH,height:c.EDITOR_HEIGHT},top:0,left:0,width:"100%"}]})},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setLabelPosition(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.label.setValue(m),c.value=m,c.fireEvent(BI.SingleSlider.EVENT_CHANGE)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){var b=this.options,c=!1;if(BI.isNumeric(a)&&!(BI.isNull(a)||athis.max))if(b.digit===!1)c=!0;else{var d=(a+"").split(".")[1]||"";c=d.length===b.digit}return c},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setLabelPosition:function(a){this.label.element.css({left:a+"%"})},_setSliderPosition:function(a){this.slider.element.css({left:a+"%"})},_setAllPosition:function(a){this._setSliderPosition(a),this._setLabelPosition(a),this._setBlueTrack(a)},_setVisible:function(a){this.slider.setVisible(a),this.label.setVisible(a)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(a){var b=BI.parseInt(10*a);return(this.max-this.min)*b/1e3+this.min},_getPercentByValue:function(a){return 100*(a-this.min)/(this.max-this.min)},getValue:function(){return this.value},setValue:function(a){var b=this.options;a=BI.parseFloat(a),a=b.digit===!1?a:a.toFixed(b.digit),isNaN(a)||(this._checkValidation(a)&&(this.value=a),a>this.max&&(this.value=this.max),ab&&(this.min=b,this.max=c)},reset:function(){this._setVisible(!1),this.enable=!1,this.value="",this.min=0,this.max=0,this._setBlueTrack(0)},populate:function(){isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,this.label.setErrorText(BI.i18nText("BI-Please_Enter")+this.min+"-"+this.max+BI.i18nText("BI-Basic_De")+BI.i18nText("BI-Basic_Number")),BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?(this.label.setValue(this.value),this._setAllPosition(this._getPercentByValue(this.value))):(this.label.setValue(this.max),this._setAllPosition(100)))}}),BI.SingleSlider.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_slider",BI.SingleSlider),BI.SingleSliderLabel=BI.inherit(BI.Widget,{_constant:{EDITOR_WIDTH:90,EDITOR_HEIGHT:20,HEIGHT:20,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},_defaultConfig:function(){return BI.extend(BI.SingleSliderLabel.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-slider-label bi-slider-track",digit:!1,unit:""})},_init:function(){BI.SingleSliderLabel.superclass._init.apply(this,arguments);var a=this,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&&ef-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.setText(i+b.unit),a.value=i,a.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)}}),this.label=BI.createWidget({type:"bi.label",height:c.HEIGHT,width:c.EDITOR_WIDTH-2}),this._setVisible(!1),BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.track,width:"100%",height:c.TRACK_HEIGHT}]}],hgap:7,height:c.TRACK_HEIGHT},top:13,left:0,width:"100%"},{el:d,top:10,left:0,width:"100%"},{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[this.label]}],rgap:c.EDITOR_WIDTH,height:c.EDITOR_HEIGHT},top:0,left:0,width:"100%"}]})},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setLabelPosition(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.label.setValue(m),c.value=m,c.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){return BI.isNumeric(a)&&!(BI.isNull(a)||athis.max)},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setLabelPosition:function(a){this.label.element.css({left:a+"%"})},_setSliderPosition:function(a){this.slider.element.css({left:a+"%"})},_setAllPosition:function(a){this._setSliderPosition(a),this._setLabelPosition(a),this._setBlueTrack(a)},_setVisible:function(a){this.slider.setVisible(a),this.label.setVisible(a)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(a){var b=BI.parseInt(10*a);return(this.max-this.min)*b/1e3+this.min},_getPercentByValue:function(a){return 100*(a-this.min)/(this.max-this.min)},getValue:function(){return this.value},setValue:function(a){var b=this.options;a=BI.parseFloat(a),a=b.digit===!1?a:a.toFixed(b.digit),isNaN(a)||(this._checkValidation(a)&&(this.value=a),a>this.max&&(this.value=this.max),ab&&(this.min=b,this.max=c)},reset:function(){this._setVisible(!1),this.enable=!1,this.value="",this.min=0,this.max=0,this._setBlueTrack(0)},populate:function(){var a=this.options;isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?(this.label.setValue(this.value+a.unit),this._setAllPosition(this._getPercentByValue(this.value))):(this.label.setValue(this.max+a.unit),this._setAllPosition(100)))}}),BI.SingleSliderLabel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_slider_label",BI.SingleSliderLabel),BI.SingleSliderNormal=BI.inherit(BI.Widget,{_constant:{HEIGHT:28,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},props:{baseCls:"bi-single-slider-normal bi-slider-track",minMax:{min:0,max:100}},render:function(){var a=this,b=this._constant,c=this._createTrack();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:b.SLIDER_WIDTH_HALF,height:b.SLIDER_HEIGHT});return d.element.click(function(c){if(a.enable){var d=c.clientX-a.element.offset().left-b.SLIDER_WIDTH_HALF,e=a.track.element[0].scrollWidth,f=0;d<0&&(f=0),d>0&&de-b.SLIDER_WIDTH&&(f=100);var g=BI.parseFloat(f.toFixed(1));a._setAllPosition(g);var h=a._getValueByPercent(g);a.value=h,a.fireEvent(BI.SingleSlider.EVENT_CHANGE)}}),{type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:c,width:"100%",height:b.TRACK_HEIGHT}]}],hgap:7,height:b.TRACK_HEIGHT},top:3,left:0,width:"100%"},{el:d,top:0,left:0,width:"100%"}]}},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.value=m,c.fireEvent(BI.SingleSliderNormal.EVENT_DRAG,m)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrack:function(){var a=this;this._constant;return this.grayTrack=BI.createWidget({type:"bi.layout",cls:"gray-track",height:6}),this.blueTrack=BI.createWidget({type:"bi.layout",cls:"blue-track bi-high-light-background",height:6}),this.options.color&&this.blueTrack.element.css({"background-color":this.options.color}),{type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}],ref:function(b){a.track=b}}},_checkValidation:function(a){return!(BI.isNull(a)||athis.max)},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setSliderPosition:function(a){this.slider.element.css({left:a+"%"})},_setAllPosition:function(a){this._setSliderPosition(a),this._setBlueTrack(a)},_setVisible:function(a){this.slider.setVisible(a)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(a){var b=BI.parseInt(10*a);return(this.max-this.min)*b/1e3+this.min},_getPercentByValue:function(a){return 100*(a-this.min)/(this.max-this.min)},getValue:function(){return this.value},setValue:function(a){var b=BI.parseFloat(a);isNaN(b)||(this._checkValidation(b)&&(this.value=b),b>this.max&&(this.value=this.max),bb&&(this.min=b,this.max=c)},reset:function(){this._setVisible(!1),this.enable=!1,this.value="",this.min=0,this.max=0,this._setBlueTrack(0)},populate:function(){isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?this._setAllPosition(this._getPercentByValue(this.value)):this._setAllPosition(100))}}),BI.SingleSliderNormal.EVENT_DRAG="EVENT_DRAG",BI.shortcut("bi.single_slider_normal",BI.SingleSliderNormal),BI.SingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-combo",trigger:{},height:24,text:"",items:[],value:""})},_init:function(){BI.SingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value},b.trigger)),this.popup=BI.createWidget({type:"bi.single_level_tree",items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.SingleTreeCombo.EVENT_CHANGE)})},populate:function(a){this.combo.populate(a)},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.SingleTreeCombo.EVENT_CHANGE="SingleTreeCombo.EVENT_CHANGE",BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.single_tree_combo",BI.SingleTreeCombo),BI.SingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-level-tree",tipText:BI.i18nText("BI-No_Selected_Item"),items:[],value:""})},_init:function(){BI.SingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{isDefaultInit:!0},items:b.items,value:b.value,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SingleTreePopup.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.SingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.SingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_level_tree",BI.SingleTreePopup),BI.SingleTreeTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SingleTreeTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-trigger",height:24,text:"",items:[],value:""})},_init:function(){BI.SingleTreeTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,text:a.text,items:a.items,height:a.height,value:a.value})},_checkTitle:function(){var a=this,b=this.getValue();BI.any(this.options.items,function(c,d){if(b.contains(d.value))return a.trigger.setTitle(d.text||d.value),!0})},setValue:function(a){a=BI.isArray(a)?a:[a],this.options.value=a,this.trigger.setValue(a),this._checkTitle()},getValue:function(){return this.options.value||[]},populate:function(a){BI.SingleTreeTrigger.superclass.populate.apply(this,arguments),this.trigger.populate(a)}}),BI.shortcut("bi.single_tree_trigger",BI.SingleTreeTrigger),BI.SwitchTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SwitchTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-switch-tree",items:[]})},_init:function(){BI.SwitchTree.superclass._init.apply(this,arguments);this.options;this.tab=BI.createWidget({type:"bi.tab",element:this,tab:null,showIndex:BI.SwitchTree.SelectType.SingleSelect,cardCreator:BI.bind(this._createTree,this)})},_createTree:function(a){var b=this,c=this.options;switch(a){case BI.SwitchTree.SelectType.SingleSelect:return this.levelTree=BI.createWidget({type:"bi.multilayer_single_level_tree",isDefaultInit:!0,items:BI.deepClone(c.items),value:c.value}),this.levelTree.on(BI.LevelTree.EVENT_CHANGE,function(){b.fireEvent(BI.SwitchTree.EVENT_CHANGE,arguments)}),this.levelTree;case BI.SwitchTree.SelectType.MultiSelect:return this.tree=BI.createWidget({type:"bi.simple_tree",items:this._removeIsParent(BI.deepClone(c.items)),value:c.value}),this.tree.on(BI.SimpleTreeView.EVENT_CHANGE,function(){b.fireEvent(BI.SwitchTree.EVENT_CHANGE,arguments)}),this.tree}},_removeIsParent:function(a){return BI.each(a,function(a,b){BI.isNotNull(b.isParent)&&delete b.isParent}),a},switchSelect:function(){switch(this.getSelect()){case BI.SwitchTree.SelectType.SingleSelect:this.setSelect(BI.SwitchTree.SelectType.MultiSelect);break;case BI.SwitchTree.SelectType.MultiSelect:this.setSelect(BI.SwitchTree.SelectType.SingleSelect)}},setSelect:function(a){this.tab.setSelect(a)},getSelect:function(){return this.tab.getSelect()},setValue:function(a){switch(this.storeValue=a,this.getSelect()){case BI.SwitchTree.SelectType.SingleSelect:this.levelTree.setValue(a);break;case BI.SwitchTree.SelectType.MultiSelect:this.tree.setValue(a)}},getValue:function(){return this.tab.getValue()},populate:function(a){this.options.items=a,BI.isNotNull(this.levelTree)&&this.levelTree.populate(BI.deepClone(a)),BI.isNotNull(this.tree)&&this.tree.populate(this._removeIsParent(BI.deepClone(a)))}}),BI.SwitchTree.EVENT_CHANGE="SwitchTree.EVENT_CHANGE",BI.SwitchTree.SelectType={SingleSelect:BI.Selection.Single,MultiSelect:BI.Selection.Multi},BI.shortcut("bi.switch_tree",BI.SwitchTree),BI.DateInterval=BI.inherit(BI.Single,{constants:{height:25,width:25,lgap:15,offset:-15,timeErrorCls:"time-error",DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){var a=BI.DateInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-date-interval"})},_init:function(){var a=this,b=this.options;BI.DateInterval.superclass._init.apply(this,arguments),b.value=b.value||{},this.left=this._createCombo(b.value.start),this.right=this._createCombo(b.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:this.constants.height,items:[{type:"bi.absolute",items:[{el:a.left,left:this.constants.offset,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[a.label]})},_createCombo:function(a){var b=this,c=BI.createWidget({type:"bi.dynamic_date_combo",value:a});return c.on(BI.DynamicDateCombo.EVENT_ERROR,function(){b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.DateInterval.EVENT_ERROR)}),c.on(BI.DynamicDateCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.DateInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicDateCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.DateInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW,function(){b.left.hidePopupView(),b.right.hidePopupView()}),c.on(BI.DynamicDateCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),b.fireEvent(BI.DateInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.DateInterval.EVENT_CHANGE))}),c},_dateCheck:function(a){return BI.parseDateTime(a,"%Y-%x-%d").print("%Y-%x-%d")===a||BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d")===a||BI.parseDateTime(a,"%Y-%x-%e").print("%Y-%x-%e")===a||BI.parseDateTime(a,"%Y-%X-%e").print("%Y-%X-%e")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.constants.DATE_MIN_VALUE,this.constants.DATE_MAX_VALUE)[0]},_check:function(a,b){var c=a.match(/\d+/g),d=b.match(/\d+/g);return this._dateCheck(a)&&BI.checkDateLegal(a)&&this._checkVoid({year:c[0],month:c[1],day:c[2]})&&this._dateCheck(b)&&BI.checkDateLegal(b)&&this._checkVoid({year:d[0],month:d[1],day:d[2]})},_compare:function(a,b){return a=BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d"),b=BI.parseDateTime(b,"%Y-%X-%d").print("%Y-%X-%d"),BI.isNotNull(a)&&BI.isNotNull(b)&&a>b},_setTitle:function(a){this.left.setTitle(a),this.right.setTitle(a),this.label.setTitle(a)},_clearTitle:function(){this.left.setTitle(""),this.right.setTitle(""),this.label.setTitle("")},setValue:function(a){a=a||{},this.left.setValue(a.start),this.right.setValue(a.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.DateInterval.EVENT_VALID="EVENT_VALID",BI.DateInterval.EVENT_ERROR="EVENT_ERROR",BI.DateInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.date_interval",BI.DateInterval),BI.TimeInterval=BI.inherit(BI.Single,{constants:{height:25,width:25,lgap:15,offset:-15,timeErrorCls:"time-error",DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},_defaultConfig:function(){var a=BI.TimeInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-time-interval"})},_init:function(){var a=this,b=this.options;BI.TimeInterval.superclass._init.apply(this,arguments),b.value=b.value||{},this.left=this._createCombo(b.value.start),this.right=this._createCombo(b.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:this.constants.height,items:[{type:"bi.absolute",items:[{el:a.left,left:this.constants.offset,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[a.label]})},_createCombo:function(a){var b=this,c=BI.createWidget({type:"bi.dynamic_date_time_combo",value:a});return c.on(BI.DynamicDateTimeCombo.EVENT_ERROR,function(){b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.TimeInterval.EVENT_ERROR)}),c.on(BI.DynamicDateTimeCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.TimeInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicDateTimeCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.TimeInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW,function(){b.left.hidePopupView(),b.right.hidePopupView()}),c.on(BI.DynamicDateTimeCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),b.fireEvent(BI.TimeInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.TimeInterval.EVENT_CHANGE))}),c},_dateCheck:function(a){return BI.parseDateTime(a,"%Y-%x-%d %H:%M:%S").print("%Y-%x-%d %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%X-%d %H:%M:%S").print("%Y-%X-%d %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%x-%e %H:%M:%S").print("%Y-%x-%e %H:%M:%S")===a||BI.parseDateTime(a,"%Y-%X-%e %H:%M:%S").print("%Y-%X-%e %H:%M:%S")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,a.day,this.constants.DATE_MIN_VALUE,this.constants.DATE_MAX_VALUE)[0]},_check:function(a,b){var c=a.match(/\d+/g),d=b.match(/\d+/g);return this._dateCheck(a)&&BI.checkDateLegal(a)&&this._checkVoid({year:c[0],month:c[1],day:c[2]})&&this._dateCheck(b)&&BI.checkDateLegal(b)&&this._checkVoid({year:d[0],month:d[1],day:d[2]})},_compare:function(a,b){return a=BI.parseDateTime(a,"%Y-%X-%d %H:%M:%S").print("%Y-%X-%d %H:%M:%S"),b=BI.parseDateTime(b,"%Y-%X-%d %H:%M:%S").print("%Y-%X-%d %H:%M:%S"),BI.isNotNull(a)&&BI.isNotNull(b)&&a>b},_setTitle:function(a){this.left.setTitle(a),this.right.setTitle(a),this.label.setTitle(a)},_clearTitle:function(){this.left.setTitle(""),this.right.setTitle(""),this.label.setTitle("")},setValue:function(a){a=a||{},this.left.setValue(a.start),this.right.setValue(a.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.TimeInterval.EVENT_VALID="EVENT_VALID",BI.TimeInterval.EVENT_ERROR="EVENT_ERROR",BI.TimeInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.time_interval",BI.TimeInterval),BI.DynamicYearCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-card"},render:function(){var a=this;return{type:"bi.vertical",items:[{type:"bi.label",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),textAlign:"left",height:24},{type:"bi.dynamic_date_param_item",ref:function(){a.item=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]}],vgap:10,hgap:10}},_createValue:function(a,b){return{dateType:a,value:Math.abs(b),offset:b>0?1:0}},setValue:function(a){a=a||{year:0},this.item.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR,a.year))},getValue:function(){var a=this.item.getValue();return{year:0===a.offset?-a.value:a.value}}}),BI.DynamicYearCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_card",BI.DynamicYearCard),BI.StaticYearCard=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.StaticYearCard.superclass._defaultConfig.apply(this,arguments),{ +baseCls:"bi-year-card",behaviors:{},min:"1900-01-01",max:"2099-12-31"})},_createYearCalendar:function(a){var b=this.options,c=this._year,d=BI.createWidget({type:"bi.year_calendar",behaviors:b.behaviors,min:b.min,max:b.max,logic:{dynamic:!0},year:c+12*a});return d.setValue(this._year),d},_init:function(){BI.StaticYearCard.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedYear=this._year=BI.getDate().getFullYear(),this.backBtn=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:25,height:25,value:-1,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.navigation.setSelect(a.navigation.getSelect()-1),a._checkLeftValid(),a._checkRightValid()}}]}),this.preBtn=BI.createWidget({type:"bi.icon_button",cls:"next-page-h-font",width:25,height:25,value:1,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.navigation.setSelect(a.navigation.getSelect()+1),a._checkLeftValid(),a._checkRightValid()}}]}),this.navigation=BI.createWidget({type:"bi.navigation",direction:"top",element:this,single:!0,logic:{dynamic:!0},tab:{type:"bi.htape",cls:"bi-border-top bi-border-bottom",height:30,items:[{el:{type:"bi.center_adapt",items:[a.backBtn]},width:25},{type:"bi.layout"},{el:{type:"bi.center_adapt",items:[a.preBtn]},width:25}]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(a.selectedYear);var b=this.getSelectedCard();a.backBtn.setEnable(!b.isFrontYear()),a.preBtn.setEnable(!b.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedYear=this.getValue(),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.StaticYearCard.EVENT_CHANGE,a.selectedYear)}),BI.isKey(b.value)&&this.setValue(b.value)},_checkLeftValid:function(){var a=(this.options,!0);return this.backBtn.setEnable(a),a},_checkRightValid:function(){var a=(this.options,!0);return this.preBtn.setEnable(a),a},getValue:function(){return{year:this.selectedYear}},setValue:function(a){var b=this.options;a=a||{};var c=a.year;BI.checkDateVoid(c,1,1,b.min,b.max)[0]?(c=BI.getDate().getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(c)),this.navigation.setValue("")):(this.selectedYear=BI.parseInt(c),this.navigation.setSelect(BI.YearCalendar.getPageByYear(c)),this.navigation.setValue(this.selectedYear)),this._checkLeftValid(),this._checkRightValid()}}),BI.StaticYearCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.static_year_card",BI.StaticYearCard),BI.DynamicYearCombo=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-combo bi-border",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicYearCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value,this.trigger=BI.createWidget({type:"bi.dynamic_year_trigger",min:b.min,max:b.max,value:b.value||""}),this.trigger.on(BI.DynamicYearTrigger.EVENT_FOCUS,function(){a.storeTriggerValue=this.getKey()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_STOP,function(){a.combo.showView()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_ERROR,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeTriggerValue?(a.storeValue=a.trigger.getValue(),a.setValue(a.storeValue)):this.getKey()||(a.storeValue=null,a.setValue()),a.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM))}),this.combo=BI.createWidget({type:"bi.combo",isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.dynamic_year_popup",ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicYearPopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({year:b.getFullYear()}),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}],behaviors:b.behaviors,min:b.min,max:b.max},value:b.value||""}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicYearCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.htape",element:this,ref:function(){a.comboWrapper=this},items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24,ref:function(){a.changeIcon=this}},width:24},this.combo]}),this._checkDynamicValue(b.value)},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.DynamicYearCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue}}),BI.DynamicYearCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_year_combo",BI.DynamicYearCombo),BI.extend(BI.DynamicYearCombo,{Static:1,Dynamic:2}),BI.DynamicYearPopup=BI.inherit(BI.Widget,{constants:{tabHeight:30},props:{baseCls:"bi-year-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31",width:180,height:240},render:function(){var a=this;this.options;return this.storeValue={type:BI.DynamicYearCombo.Static},{type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-left bi-border-right bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Current_Year"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Basic_Current_Year")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=a.print("%Y"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-border-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Basic_Year_Fen"),value:BI.DynamicYearCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicYearCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(c){switch(c){case BI.DynamicYearCombo.Dynamic:return{type:"bi.dynamic_year_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicYearCombo.Static:default:return{type:"bi.static_year_card",behaviors:b.behaviors,min:a.options.min,max:a.options.max,listeners:[{eventName:BI.StaticYearCard.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearPopup.EVENT_CHANGE)}}],ref:function(){a.year=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicYearCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.year.setValue({year:c.getFullYear()}),a._setInnerValue();break;case BI.DynamicYearCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicYearCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:this.year.setValue(c),this.textButton.setValue(BI.i18nText("BI-Basic_Current_Year")),this.textButton.setEnable(!0)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicYearPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_popup",BI.DynamicYearPopup),BI.DynamicYearTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,errorText:BI.i18nText("BI-Please_Input_Positive_Integer"),errorTextInvalid:BI.i18nText("BI-Year_Trigger_Invalid_Text")},_defaultConfig:function(){return BI.extend(BI.DynamicYearTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-year-trigger",min:"1900-01-01",max:"2099-12-31",height:24})},_init:function(){BI.DynamicYearTrigger.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)&&!BI.checkDateVoid(a,1,1,b.min,b.max)[0]},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,errorText:function(a){return BI.isPositiveInteger(a)?c.errorTextInvalid:c.errorText}}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.DynamicYearTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DynamicYearTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&a.editor.setValue(b),BI.isNotEmptyString(b)&&(a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:b}}),a.fireEvent(BI.DynamicYearTrigger.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.DynamicYearTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DynamicYearTrigger.EVENT_ERROR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-year-text",text:BI.i18nText("BI-Multi_Date_Year"),width:b.height},width:b.height},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]}),this.setValue(b.value)},_getText:function(a){var b="";return BI.isNotNull(a.year)&&0!==a.year&&(b+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),b},_setInnerValue:function(a,b){var c=a.print("%Y");this.editor.setState(c),this.editor.setValue(c),this.setTitle(BI.isEmptyString(b)?c:b+":"+c)},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:c=c||{},this.editor.setState(c.year),this.editor.setValue(c.year),this.editor.setTitle(c.year)}},getValue:function(){return this.storeValue},getKey:function(){return 0|this.editor.getValue()}}),BI.DynamicYearTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearTrigger.EVENT_START="EVENT_START",BI.DynamicYearTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearTrigger.EVENT_STOP="EVENT_STOP",BI.shortcut("bi.dynamic_year_trigger",BI.DynamicYearTrigger),BI.DynamicYearMonthCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-month-card"},render:function(){var a=this;return{type:"bi.vertical",items:[{type:"bi.label",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),textAlign:"left",height:24},{type:"bi.dynamic_date_param_item",ref:function(){a.year=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]},{type:"bi.dynamic_date_param_item",dateType:BI.DynamicDateCard.TYPE.MONTH,ref:function(){a.month=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]}],vgap:10,hgap:10}},_createValue:function(a,b){return{dateType:a,value:Math.abs(b),offset:b>0?1:0}},setValue:function(a){a=a||{year:0,month:0},this.year.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR,a.year)),this.month.setValue(this._createValue(BI.DynamicDateCard.TYPE.MONTH,a.month))},getValue:function(){var a=this.year.getValue(),b=this.month.getValue();return{year:0===a.offset?-a.value:a.value,month:0===b.offset?-b.value:b.value}}}),BI.DynamicYearMonthCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_month_card",BI.DynamicYearMonthCard),BI.StaticYearMonthCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-static-year-month-card",behaviors:{}},_createMonths:function(){var a=[1,7,2,8,3,9,4,10,5,11,6,12],b=[];return b.push(a.slice(0,2)),b.push(a.slice(2,4)),b.push(a.slice(4,6)),b.push(a.slice(6,8)),b.push(a.slice(8,10)),b.push(a.slice(10,12)),BI.map(b,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}})})},render:function(){var a=this,b=this.options;return{type:"bi.vertical",items:[{type:"bi.year_picker",ref:function(){a.yearPicker=this},height:30,listeners:[{eventName:BI.YearPicker.EVENT_CHANGE,action:function(){var b=this.getValue();a.setValue({year:b,month:a.selectedMonth})}}]},{type:"bi.button_group",behaviors:b.behaviors,ref:function(){a.month=this},items:this._createMonths(),layouts:[BI.LogicFactory.createLogic("table",BI.extend({dynamic:!0},{columns:2,rows:6,columnSize:[.5,.5],rowSize:25})),{type:"bi.center_adapt",vgap:1,hgap:2}],value:b.value,listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(){a.selectedYear=a.yearPicker.getValue(),a.selectedMonth=this.getValue()[0],a.fireEvent(BI.StaticYearMonthCard.EVENT_CHANGE)}}]}]}},getValue:function(){return{year:this.selectedYear,month:this.selectedMonth}},setValue:function(a){var b=this.options;if(a=a||{},a.year=a.year||0,a.month=a.month||0,BI.checkDateVoid(a.year,a.month,1,b.min,b.max)[0]){var c=BI.getDate().getFullYear(),d=BI.getDate().getMonth();this.selectedYear="",this.selectedMonth="",this.yearPicker.setValue(c),this.month.setValue(d)}else this.selectedYear=BI.parseInt(a.year),this.selectedMonth=BI.parseInt(a.month),this.yearPicker.setValue(this.selectedYear),this.month.setValue(this.selectedMonth)}}),BI.StaticYearMonthCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.static_year_month_card",BI.StaticYearMonthCard),BI.DynamicYearMonthCombo=BI.inherit(BI.Single,{props:{baseCls:"bi-year-month-combo bi-border",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicYearMonthCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value,this.trigger=BI.createWidget({type:"bi.dynamic_year_month_trigger",min:b.min,max:b.max,value:b.value||""}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_STOP,function(){a.combo.showView()}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_ERROR,function(){a.combo.isViewVisible()&&a.combo.hideView(),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_ERROR)}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_VALID,function(){a.fireEvent(BI.DynamicYearMonthCombo.EVENT_VALID)}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(a.storeValue=a.trigger.getValue(),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM))}),this.trigger.on(BI.DynamicYearMonthCombo.EVENT_FOCUS,function(){a.fireEvent(BI.DynamicYearMonthCombo.EVENT_FOCUS)}),this.combo=BI.createWidget({type:"bi.combo",isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.dynamic_year_month_popup",ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicYearMonthPopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({year:b.getFullYear()}),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}],behaviors:b.behaviors,min:b.min,max:b.max},value:b.value||""}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.htape",element:this,ref:function(){a.comboWrapper=this},items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24,ref:function(){a.changeIcon=this}},width:24},this.combo]}),this._checkDynamicValue(b.value)},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.DynamicYearMonthCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},hideView:function(){this.combo.hideView()},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()}}),BI.DynamicYearMonthCombo.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearMonthCombo.EVENT_VALID="EVENT_VALID",BI.DynamicYearMonthCombo.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearMonthCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_year_month_combo",BI.DynamicYearMonthCombo),BI.extend(BI.DynamicYearMonthCombo,{Static:1,Dynamic:2}),BI.DynamicYearMonthPopup=BI.inherit(BI.Widget,{constants:{tabHeight:30},props:{baseCls:"bi-year-month-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31",width:180,height:240},render:function(){var a=this;this.options;return this.storeValue={type:BI.DynamicYearMonthCombo.Static},{type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-left bi-border-right bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Current_Month"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Basic_Current_Month")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=a.print("%Y-%x"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-border-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Basic_Year_Fen"),value:BI.DynamicYearCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicYearCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(c){switch(c){case BI.DynamicYearCombo.Dynamic:return{type:"bi.dynamic_year_month_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicYearCombo.Static:default:return{type:"bi.static_year_month_card",behaviors:b.behaviors,min:a.options.min,max:a.options.max,listeners:[{eventName:BI.StaticYearMonthCard.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearMonthPopup.EVENT_CHANGE)}}],ref:function(){a.year=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicYearCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.year.setValue({year:c.getFullYear(),month:c.getMonth()}),a._setInnerValue();break;case BI.DynamicYearCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicYearCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:this.year.setValue(c),this.textButton.setValue(BI.i18nText("BI-Basic_Current_Month")),this.textButton.setEnable(!0)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicYearMonthPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_month_popup",BI.DynamicYearMonthPopup),BI.DynamicYearMonthTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,errorText:BI.i18nText("BI-Please_Input_Positive_Integer"),errorTextInvalid:BI.i18nText("BI-Year_Trigger_Invalid_Text")},props:{extraCls:"bi-year-month-trigger",min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicYearMonthTrigger.superclass._init.apply(this,arguments);var a=this.options;this.yearEditor=this._createEditor(!0),this.monthEditor=this._createEditor(!1),BI.createWidget({element:this,type:"bi.htape",items:[{type:"bi.center",items:[{type:"bi.htape",items:[this.yearEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Year"),width:a.height},width:a.height}]},{type:"bi.htape",items:[this.monthEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Month"),width:a.height},width:a.height}]}]},{el:{type:"bi.trigger_icon_button",width:a.height},width:a.height}]}),this.setValue(a.value)},_createEditor:function(a){var b=this,c=this.options,d=this._const,e=BI.createWidget({type:"bi.sign_editor",height:c.height,validationChecker:function(b){return a?""===b||BI.isPositiveInteger(b)&&!BI.checkDateVoid(b,1,1,c.min,c.max)[0]:""===b||b>=1&&b<=12&&!BI.checkDateVoid(BI.getDate().getFullYear(),b,1,c.min,c.max)[0]},quitChecker:function(){return!1},watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(a){return BI.isPositiveInteger(a)?d.errorTextInvalid:d.errorText},hgap:d.hgap,vgap:d.vgap,allowBlank:!0});return e.on(BI.SignEditor.EVENT_FOCUS,function(){b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_FOCUS)}),e.on(BI.SignEditor.EVENT_STOP,function(){b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_STOP)}),e.on(BI.SignEditor.EVENT_CONFIRM,function(){var a=e.getValue();if(BI.isNotNull(a)&&e.setValue(a),BI.isNotEmptyString(a)){var c=b.monthEditor.getValue();b.storeValue={type:BI.DynamicDateCombo.Static,value:{year:b.yearEditor.getValue(),month:BI.isEmptyString(b.monthEditor.getValue())?"":c-1}}}b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM)}),e.on(BI.SignEditor.EVENT_SPACE,function(){e.isValid()&&e.blur()}),e.on(BI.SignEditor.EVENT_START,function(){b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_START)}),e.on(BI.SignEditor.EVENT_ERROR,function(){b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_ERROR)}),e.on(BI.SignEditor.EVENT_VALID,function(){var a=b.yearEditor.getValue(),d=b.monthEditor.getValue();BI.isNotEmptyString(a)&&BI.isNotEmptyString(d)&&BI.isPositiveInteger(a)&&d>=1&&d<=12&&!BI.checkDateVoid(a,d,1,c.min,c.max)[0]&&b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_VALID)}),e.on(BI.SignEditor.EVENT_CHANGE,function(){a&&b._autoSwitch(e.getValue())}),e},_yearCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d");return BI.parseDateTime(a,"%Y").print("%Y")===a&&b>=this.options.min&&b<=this.options.max},_autoSwitch:function(a){BI.checkDateLegal(a)&&4===a.length&&this._yearCheck(a)&&this.monthEditor.focus()},_getText:function(a){var b="";return BI.isNotNull(a.year)&&(b+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),BI.isNotNull(a.month)&&0!==a.month&&(b+=Math.abs(a.month)+BI.i18nText("BI-Basic_Year")+(a.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),b},_setInnerValue:function(a,b){var c=a.print("%Y-%x");this.yearEditor.setValue(a.getFullYear()),this.monthEditor.setValue(a.getMonth()+1),this.setTitle(BI.isEmptyString(b)?c:b+":"+c)},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:c=c||{};var f=BI.isNull(c.month)?null:c.month;this.yearEditor.setValue(c.year),this.yearEditor.setTitle(c.year),this.monthEditor.setValue(f),this.monthEditor.setTitle(f)}},getValue:function(){return this.storeValue},getKey:function(){return this.yearEditor.getValue()+"-"+this.monthEditor.getValue()}}),BI.DynamicYearMonthTrigger.EVENT_VALID="EVENT_FOCUS",BI.DynamicYearMonthTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearMonthTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearMonthTrigger.EVENT_START="EVENT_START",BI.DynamicYearMonthTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearMonthTrigger.EVENT_STOP="EVENT_STOP",BI.shortcut("bi.dynamic_year_month_trigger",BI.DynamicYearMonthTrigger),BI.YearMonthInterval=BI.inherit(BI.Single,{constants:{height:25,width:25,lgap:15,offset:-15,timeErrorCls:"time-error",DATE_MIN_VALUE:"1900-01-01",DATE_MAX_VALUE:"2099-12-31"},props:{extraCls:"bi-year-month-interval"},_init:function(){var a=this,b=this.options;BI.YearMonthInterval.superclass._init.apply(this,arguments),b.value=b.value||{},this.left=this._createCombo(b.value.start),this.right=this._createCombo(b.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:this.constants.height,items:[{type:"bi.absolute",items:[{el:a.left,left:this.constants.offset,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[a.label]})},_createCombo:function(a){var b=this,c=BI.createWidget({type:"bi.dynamic_year_month_combo",value:a});return c.on(BI.DynamicYearMonthCombo.EVENT_ERROR,function(){b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.YearMonthInterval.EVENT_ERROR)}),c.on(BI.DynamicYearMonthCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.YearMonthInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicYearMonthCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.YearMonthInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),c.on(BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW,function(){b.left.hideView(),b.right.hideView()}),c.on(BI.DynamicYearMonthCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),b.fireEvent(BI.YearMonthInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.YearMonthInterval.EVENT_CHANGE))}),c},_dateCheck:function(a){return BI.parseDateTime(a,"%Y-%x").print("%Y-%x")===a||BI.parseDateTime(a,"%Y-%X").print("%Y-%X")===a},_checkVoid:function(a){return!BI.checkDateVoid(a.year,a.month,1,this.constants.DATE_MIN_VALUE,this.constants.DATE_MAX_VALUE)[0]},_check:function(a,b){var c=a.match(/\d+/g),d=b.match(/\d+/g);return this._dateCheck(a)&&BI.checkDateLegal(a)&&this._checkVoid({year:c[0],month:c[1],day:1})&&this._dateCheck(b)&&BI.checkDateLegal(b)&&this._checkVoid({year:d[0],month:d[1],day:1})},_compare:function(a,b){return a=BI.parseDateTime(a,"%Y-%X").print("%Y-%X"),b=BI.parseDateTime(b,"%Y-%X").print("%Y-%X"),BI.isNotNull(a)&&BI.isNotNull(b)&&a>b},_setTitle:function(a){this.left.setTitle(a),this.right.setTitle(a),this.label.setTitle(a)},_clearTitle:function(){this.left.setTitle(""),this.right.setTitle(""),this.label.setTitle("")},setValue:function(a){a=a||{},this.left.setValue(a.start),this.right.setValue(a.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.YearMonthInterval.EVENT_VALID="EVENT_VALID",BI.YearMonthInterval.EVENT_ERROR="EVENT_ERROR",BI.YearMonthInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_month_interval",BI.YearMonthInterval),BI.DynamicYearQuarterCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-month-card"},render:function(){var a=this;return{type:"bi.vertical",items:[{type:"bi.label",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),textAlign:"left",height:24},{type:"bi.dynamic_date_param_item",ref:function(){a.year=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]},{type:"bi.dynamic_date_param_item",dateType:BI.DynamicDateCard.TYPE.QUARTER,ref:function(){a.quarter=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]}],vgap:10,hgap:10}},_createValue:function(a,b){return{dateType:a,value:Math.abs(b),offset:b>0?1:0}},setValue:function(a){a=a||{year:0,month:0},this.year.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR,a.year)),this.quarter.setValue(this._createValue(BI.DynamicDateCard.TYPE.QUARTER,a.quarter))},getValue:function(){var a=this.year.getValue(),b=this.quarter.getValue();return{year:0===a.offset?-a.value:a.value,quarter:0===b.offset?-b.value:b.value +}}}),BI.DynamicYearQuarterCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_quarter_card",BI.DynamicYearQuarterCard),BI.StaticYearQuarterCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-static-year-quarter-card",behaviors:{}},_createQuarter:function(){var a=[{text:Date._QN[1],value:1},{text:Date._QN[2],value:2},{text:Date._QN[3],value:3},{text:Date._QN[4],value:4}];return BI.map(a,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"center",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:24})})},render:function(){var a=this,b=this.options;return{type:"bi.vertical",items:[{type:"bi.year_picker",ref:function(){a.yearPicker=this},height:30,listeners:[{eventName:BI.YearPicker.EVENT_CHANGE,action:function(){var b=this.getValue();a.setValue({year:b,quarter:a.selectedQuarter})}}]},{type:"bi.button_group",behaviors:b.behaviors,ref:function(){a.quarter=this},items:this._createQuarter(),layouts:[{type:"bi.vertical",vgap:10}],value:b.value,listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(){a.selectedYear=a.yearPicker.getValue(),a.selectedQuarter=this.getValue()[0],a.fireEvent(BI.StaticYearQuarterCard.EVENT_CHANGE)}}]}]}},getValue:function(){return{year:this.selectedYear,quarter:this.selectedQuarter}},setValue:function(a){var b=this.options;if(a=a||{},a.year=a.year||0,a.quarter=a.quarter||0,BI.checkDateVoid(a.year,a.quarter,1,b.min,b.max)[0]){var c=BI.getDate().getFullYear(),d=BI.getDate().getQuarter();this.selectedYear="",this.selectedQuarter="",this.yearPicker.setValue(c),this.quarter.setValue(d)}else this.selectedYear=BI.parseInt(a.year),this.selectedQuarter=BI.parseInt(a.quarter),this.yearPicker.setValue(this.selectedYear),this.quarter.setValue(this.selectedQuarter)}}),BI.StaticYearQuarterCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.static_year_quarter_card",BI.StaticYearQuarterCard),BI.DynamicYearQuarterCombo=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-quarter-combo bi-border",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicYearQuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value,this.trigger=BI.createWidget({type:"bi.dynamic_year_quarter_trigger",min:b.min,max:b.max,value:b.value||""}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_STOP,function(){a.combo.showView()}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_ERROR,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(a.storeValue=a.trigger.getValue(),a.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM))}),this.combo=BI.createWidget({type:"bi.combo",isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.dynamic_year_quarter_popup",ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicYearQuarterPopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({year:b.getFullYear()}),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}],behaviors:b.behaviors,min:b.min,max:b.max},value:b.value||""}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicYearQuarterCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.htape",element:this,ref:function(){a.comboWrapper=this},items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24,ref:function(){a.changeIcon=this}},width:24},this.combo]}),this._checkDynamicValue(b.value)},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.DynamicYearQuarterCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue}}),BI.DynamicYearQuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearQuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_year_quarter_combo",BI.DynamicYearQuarterCombo),BI.extend(BI.DynamicYearQuarterCombo,{Static:1,Dynamic:2}),BI.DynamicYearQuarterPopup=BI.inherit(BI.Widget,{constants:{tabHeight:30},props:{baseCls:"bi-year-quarter-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31",width:180,height:240},render:function(){var a=this;this.options;return this.storeValue={type:BI.DynamicYearQuarterCombo.Static},{type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-left bi-border-right bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_Current_Quarter"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",forceCenter:!0,cls:"bi-border-top bi-high-light",shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicYearQuarterCombo.Static)this.textButton.setValue(BI.i18nText("BI-Basic_Current_Quarter")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=a.print("%Y-%x"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-border-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Basic_Year_Fen"),value:BI.DynamicYearQuarterCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicYearQuarterCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(c){switch(c){case BI.DynamicYearQuarterCombo.Dynamic:return{type:"bi.dynamic_year_quarter_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicYearQuarterCombo.Static:default:return{type:"bi.static_year_quarter_card",behaviors:b.behaviors,min:a.options.min,max:a.options.max,listeners:[{eventName:BI.DynamicYearCard.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearQuarterPopup.EVENT_CHANGE)}}],ref:function(){a.year=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicYearQuarterCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.year.setValue({year:c.getFullYear(),quarter:c.getQuarter()}),a._setInnerValue();break;case BI.DynamicYearQuarterCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicYearQuarterCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:this.year.setValue(c),this.textButton.setValue(BI.i18nText("BI-Basic_Current_Quarter")),this.textButton.setEnable(!0)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicYearQuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_quarter_popup",BI.DynamicYearQuarterPopup),BI.DynamicYearQuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,errorText:BI.i18nText("BI-Please_Input_Positive_Integer"),errorTextInvalid:BI.i18nText("BI-Year_Trigger_Invalid_Text")},props:{extraCls:"bi-year-quarter-trigger",min:"1900-01-01",max:"2099-12-31",height:24},_init:function(){BI.DynamicYearQuarterTrigger.superclass._init.apply(this,arguments);var a=this.options;this.yearEditor=this._createEditor(!0),this.quarterEditor=this._createEditor(!1),BI.createWidget({element:this,type:"bi.htape",items:[{type:"bi.center",items:[{type:"bi.htape",items:[this.yearEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Year"),width:a.height},width:a.height}]},{type:"bi.htape",items:[this.quarterEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Quarter"),width:a.height},width:a.height}]}]},{el:{type:"bi.trigger_icon_button",width:a.height},width:a.height}]}),this.setValue(a.value)},_createEditor:function(a){var b=this,c=this.options,d=this._const,e=BI.createWidget({type:"bi.sign_editor",height:c.height,validationChecker:function(b){return a?""===b||BI.isPositiveInteger(b)&&!BI.checkDateVoid(b,1,1,c.min,c.max)[0]:""===b||b>=1&&b<=4&&!BI.checkDateVoid(BI.getDate().getFullYear(),b,1,c.min,c.max)[0]},quitChecker:function(){return!1},errorText:function(a){return BI.isPositiveInteger(a)?d.errorTextInvalid:d.errorText},watermark:BI.i18nText("BI-Basic_Unrestricted"),hgap:d.hgap,vgap:d.vgap,allowBlank:!0});return e.on(BI.SignEditor.EVENT_FOCUS,function(){b.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_FOCUS)}),e.on(BI.SignEditor.EVENT_STOP,function(){b.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_STOP)}),e.on(BI.SignEditor.EVENT_CONFIRM,function(){var a=e.getValue();if(BI.isNotNull(a)&&e.setValue(a),BI.isNotEmptyString(a)){var c=b.quarterEditor.getValue();b.storeValue={type:BI.DynamicYearQuarterCombo.Static,value:{year:b.yearEditor.getValue(),quarter:BI.isEmptyString(b.quarterEditor.getValue())?"":c}}}b.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM)}),e.on(BI.SignEditor.EVENT_SPACE,function(){e.isValid()&&e.blur()}),e.on(BI.SignEditor.EVENT_START,function(){b.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_START)}),e.on(BI.SignEditor.EVENT_ERROR,function(){b.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_ERROR)}),e.on(BI.SignEditor.EVENT_CHANGE,function(){a&&b._autoSwitch(e.getValue())}),e},_yearCheck:function(a){var b=BI.parseDateTime(a,"%Y-%X-%d").print("%Y-%X-%d");return BI.parseDateTime(a,"%Y").print("%Y")===a&&b>=this.options.min&&b<=this.options.max},_autoSwitch:function(a){BI.checkDateLegal(a)&&4===a.length&&this._yearCheck(a)&&this.quarterEditor.focus()},_getText:function(a){var b="";return BI.isNotNull(a.year)&&(b+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),BI.isNotNull(a.quarter)&&0!==a.quarter&&(b+=Math.abs(a.quarter)+BI.i18nText("BI-Basic_Year")+(a.quarter<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),b},_setInnerValue:function(a,b){var c=a.print("%Y-%x");this.yearEditor.setValue(a.getFullYear()),this.quarterEditor.setValue(a.getQuarter()),this.setTitle(BI.isEmptyString(b)?c:b+":"+c)},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicYearQuarterCombo.Static,c=a.value||a),b){case BI.DynamicYearQuarterCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicYearQuarterCombo.Static:default:c=c||{};var f=BI.isNull(c.quarter)?null:c.quarter;this.yearEditor.setValue(c.year),this.yearEditor.setTitle(c.year),this.quarterEditor.setValue(f),this.quarterEditor.setTitle(f)}},getValue:function(){return this.storeValue}}),BI.DynamicYearQuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearQuarterTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearQuarterTrigger.EVENT_START="EVENT_START",BI.DynamicYearQuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearQuarterTrigger.EVENT_STOP="EVENT_STOP",BI.shortcut("bi.dynamic_year_quarter_trigger",BI.DynamicYearQuarterTrigger),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.match.concat(d.find)}),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,value:{type:BI.Selection.Multi,value:b.value||[]}}),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(BI.AllValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-all-value-chooser-pane",width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.AllValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&(this.items=b.items),this.list=BI.createWidget({type:"bi.multi_select_list",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:b.width,height:b.height}),this.list.on(BI.MultiSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.AllValueChooserPane.EVENT_CHANGE)})},setValue:function(a){this.list.setValue({type:BI.Selection.Multi,value:a||[]})},getValue:function(){var a=this.list.getValue()||{};return a.type===BI.Selection.All?a.assist:a.value||[]},populate:function(){this.list.populate.apply(this.list,arguments)}}),BI.AllValueChooserPane.EVENT_CHANGE="AllValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.all_value_chooser_pane",BI.AllValueChooserPane),BI.AbstractTreeValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractTreeValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn})},_initData:function(a){this.items=a;var b=BI.Tree.treeFormat(a);this.tree=new BI.Tree,this.tree.initTree(b)},_itemsCreator:function(a,b){function c(){switch(a.type){case BI.TreeView.REQ_TYPE_INIT_DATA:d._reqInitTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_ADJUST_DATA:d._reqAdjustTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_SELECT_DATA:d._reqSelectedTreeNode(a,b);break;case BI.TreeView.REQ_TYPE_GET_SELECTED_DATA:d._reqDisplayTreeNode(a,b);break;default:d._reqTreeNode(a,b)}}var d=this,e=this.options;this.items?c():e.itemsCreator({},function(a){d._initData(a),c()})},_reqDisplayTreeNode:function(a,b){function c(a,b,g){return null==g||BI.isEmpty(g)?void BI.each(b.getChildren(),function(d,g){var h=BI.clone(a);h.push(g.value);var i=f._getChildCount(h);e(g,b.id,i),c(h,g,{})}):void BI.each(g,function(b){var h=f._getTreeNode(a,b),i=BI.clone(a);i.push(h.value),e(h,h.parent&&h.parent.id,d(g[b],i)),c(i,h,g[b])})}function d(a,b){return null==a?0:BI.isEmpty(a)?f._getChildCount(b):BI.size(a)}function e(a,b,c){g.push({id:a.id,pId:b,text:a.text+(c>0?"("+BI.i18nText("BI-Basic_Altogether")+c+BI.i18nText("BI-Basic_Count")+")":""),value:a.value,open:!0})}var f=this,g=[],h=a.selectedValues;return null==h||BI.isEmpty(h)?void b({}):(c([],this.tree.getRoot(),h),void b({items:g}))},_reqSelectedTreeNode:function(a,b){function c(a){var b=m.concat(k);if(g(a,b))if(f(b))i._deleteNode(a,b);else{var c=[],j=e(m,k,[],c);j&&BI.isNotEmptyArray(c)&&BI.each(c,function(b,c){var e=i._getNode(a,c);e?i._deleteNode(a,c):d(a,c,BI.last(c))})}if(h(a,b)){var l=[],j=!1;f(b)?j=!0:(j=e(m,k,l),b=m),j===!0&&(d(a,b,k),l.length>0&&BI.each(l,function(b,c){i._buildTree(a,c)}))}}function d(a,b,c){var d=a,e=[],f=[];BI.some(b,function(g,h){var j=d[h];if(null==j){if(0===g)return!0;if(!BI.isEmpty(d))return!0;var k=b.slice(0,g),l=i._getChildren(k);if(f.push(k),e.push(l.length),g===b.length-1&&1===l.length&&l[0]===c)for(var m=e.length-1;m>=0&&1===e[m];m--)i._deleteNode(a,f[m]);else BI.each(l,function(a,e){return g===b.length-1&&e.value===c||void(d[e.value]={})});d=d[h]}else d=j})}function e(a,b,c,d){var f=BI.clone(a);if(f.push(b),i._isMatch(a,b,l))return d&&d.push(f),!0;var g=i._getChildren(f),h=[],j=!1;return BI.each(g,function(a,b){e(f,b.value,c,d)?j=!0:h.push(b.value)}),j===!0&&BI.each(h,function(a,b){var d=BI.clone(f);d.push(b),c.push(d)}),j}function f(a){for(var b=0,c=a.length;bj._const.perPage)break}return f}function d(a,b,c,i,k){if(j._isMatch(b,c,l)){var m=i||h(b,c);return e(b,c,!1,m,!i&&f(b,c),!0,k),[!0,m]}var n=BI.clone(b);n.push(c);var o=j._getChildren(n),p=!1,m=!1,q=i||g(b,c);return BI.each(o,function(b,c){var e=d(a+1,n,c.value,q,k);e[1]===!0&&(m=!0),e[0]===!0&&(p=!0)}),p===!0&&(m=q||h(b,c)&&m,e(b,c,!0,m,!1,!1,k)),[p,m]}function e(a,b,c,d,e,f,g){var h=j._getTreeNode(a,b);g.push({id:h.id,pId:h.pId,text:h.text,value:h.value,title:h.title,isParent:h.getChildrenLength()>0,open:c,checked:d,halfCheck:e,flag:f})}function f(a,b){var c=i(a);return null==c?null:BI.any(c,function(a,c){if(a===b&&null!=c&&!BI.isEmpty(c))return!0})}function g(a,b){var c=i(a);return null==c?null:BI.any(c,function(a,c){if(a===b&&null!=c&&BI.isEmpty(c))return!0})}function h(a,b){var c=i(a);return null!=c&&BI.any(c,function(a){if(a===b)return!0})}function i(a){var b=m;return null==b?null:(BI.every(a,function(a,c){return b=b[c],null!=b}),b)}var j=this,k=[],l=a.keyword||"",m=a.selectedValues,n=a.lastSearchValue||"",o=c();BI.nextTick(function(){b({hasNext:o.length>j._const.perPage,items:k,lastSearchValue:BI.last(o)})})},_reqTreeNode:function(a,b){function c(a,b){var c={};return BI.each(a,function(a,c){b=b[c]||{}}),BI.each(b,function(a,b){if(BI.isNull(b))return void(c[a]=[0,0]);if(BI.isEmpty(b))return void(c[a]=[2,0]);var d={};BI.each(b,function(a,b){(BI.isNull(b)||BI.isEmpty(b))&&(d[a]=!0)}),c[a]=[1,BI.size(d)]}),c}function d(a,b,c,d){var f=d.checked,g=d.half,h=!1,i=!1;if(BI.has(c,a))if(1===c[a][0]){var j=BI.clone(b);j.push(a);var k=e._getChildCount(j);k>0&&k!==c[a][1]&&(i=!0)}else 2===c[a][0]&&(h=!0);var l;return l=f||i||h?(h||f)&&!g||BI.has(c,a):BI.has(c,a),[l,i]}var e=this,f=[],g=a.times,h=a.checkState||{},i=a.parentValues||[],j=a.selectedValues||{},k={};k=c(i,j);for(var l=this._getChildren(i),m=(g-1)*this._const.perPage;l[m]&&m0,checked:n[0],halfCheck:n[1]})}BI.nextTick(function(){b({items:f,hasNext:l.length>g*e._const.perPage})})},_getNode:function(a,b){for(var c=a,d=0,e=b.length;d0&&BI.isEmpty(e);)c=d[d.length-1],d=d.slice(0,d.length-1),e=this._getNode(a,d),null!=e&&delete e[c]},_buildTree:function(a,b){var c=a;BI.each(b,function(a,b){BI.has(c,b)||(c[b]={}),c=c[b]})},_isMatch:function(a,b,c){var d=this._getTreeNode(a,b),e=BI.Func.getSearchResult([d.text||d.value],c);return e.find.length>0||e.match.length>0},_getTreeNode:function(a,b){var c,d=this,e=0;return this.tree.traverse(function(f){if(!d.tree.isRoot(f))return!(e>a.length)&&(e===a.length&&f.value===b?(c=f,!1):f.value!==a[e]||void e++)}),c},_getChildren:function(a){if(a.length>0)var b=BI.last(a),c=this._getTreeNode(a.slice(0,a.length-1),b);else var c=this.tree.getRoot();return c.getChildren()},_getChildCount:function(a){return this._getChildren(a).length}}),BI.TreeValueChooserCombo=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-combo",width:200,height:30,items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;BI.isNotNull(b.items)&&this._initData(b.items),this.combo=BI.createWidget({type:"bi.multi_tree_combo",element:this,itemsCreator:BI.bind(this._itemsCreator,this),width:b.width,height:b.height}),this.combo.on(BI.MultiTreeCombo.EVENT_CONFIRM,function(){a.fireEvent(BI.TreeValueChooserCombo.EVENT_CONFIRM)})},setValue:function(a){this.combo.setValue(a)},getValue:function(){return this.combo.getValue()},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.TreeValueChooserCombo.EVENT_CONFIRM="TreeValueChooserCombo.EVENT_CONFIRM",BI.shortcut("bi.tree_value_chooser_combo",BI.TreeValueChooserCombo),BI.TreeValueChooserPane=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-pane",items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.pane=BI.createWidget({type:"bi.multi_select_tree",element:this,itemsCreator:BI.bind(this._itemsCreator,this)}),this.pane.on(BI.MultiSelectTree.EVENT_CHANGE,function(){a.fireEvent(BI.TreeValueChooserPane.EVENT_CHANGE)}),BI.isNotNull(b.items)&&(this._initData(b.items),this.populate())},setSelectedValue:function(a){this.pane.setSelectedValue(a)},setValue:function(a){this.pane.setValue(a)},getValue:function(){return this.pane.getValue()},populate:function(){this.pane.populate.apply(this.pane,arguments)}}),BI.TreeValueChooserPane.EVENT_CHANGE="TreeValueChooserPane.EVENT_CHANGE",BI.shortcut("bi.tree_value_chooser_pane",BI.TreeValueChooserPane),BI.AbstractValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn,cache:!0})},_valueFormatter:function(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},_getItemsByTimes:function(a,b){for(var c=[],d=(b-1)*this._const.perPage;a[d]&&d .filter-item-empty-item { + border-top: 0px; + border-right: 1px solid #d4dadd; + border-bottom: 1px solid #d4dadd; +} +.bi-filter-expander > table { + min-width: 100%; +} +.bi-filter-expander > table > tbody > tr > td.first-element { + width: 20px; + border-right: 1px solid #d4dadd !important; + border-bottom: 1px solid #d4dadd !important; +} +.bi-theme-dark .bi-filter-expander > .filter-item-empty-item { + border-right: 1px solid #525466; + border-bottom: 1px solid #525466; +} +.bi-theme-dark .bi-filter-expander > table > tbody > tr > td.first-element { + border-right: 1px solid #525466 !important; + border-bottom: 1px solid #525466 !important; +} +.bi-filter-operation .operation-trigger.hover, +.bi-filter-operation .operation-trigger:hover { + color: #58cc7d; +} +.bi-filter-pane { + min-width: 100%; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; +} .bi-interactive-arrangement .interactive-arrangement-dragtag-line { z-index: 1000000000; background-color: #faaa39; diff --git a/dist/widget.js b/dist/widget.js index 8c796ac05..676d8fb7f 100644 --- a/dist/widget.js +++ b/dist/widget.js @@ -6171,6 +6171,795 @@ BI.extend(BI.FileManagerNav, { }); BI.FileManagerNav.EVENT_CHANGE = "FileManagerNav.EVENT_CHANGE"; BI.shortcut("bi.file_manager_nav", BI.FileManagerNav);/** + * 过滤条件抽象类 + * + * @class BI.AbstractFilterItem + * @extend BI.Widget + */ +BI.AbstractFilterItem = BI.inherit(BI.Widget, { + + props: { + baseCls: "bi-filter-item bi-border-right bi-border-bottom" + }, + + isSelectedCondition: function () { + return this.emptyItem && this.emptyItem.isVisible(); + }, + + setSelectedCondition: function (b) { + if (b) { + if (!this.emptyItem) { + this.emptyItem = BI.createWidget({ + type: "bi.absolute", + height: 40, + cls: "filter-item-empty-item bi-border-top", + items: [{ + el: { + type: "bi.center_adapt", + cls: "empty-filter-item-leaf" + } + }], + hgap: 10, + vgap: 5 + }); + BI.createWidget({ + type: "bi.vertical", + element: this, + items: [this.emptyItem], + scrolly: false + }); + } + } + this.emptyItem && this.emptyItem.setVisible(b); + } +}); +BI.extend(BI.AbstractFilterItem, { + FILTER_OPERATION_FORMULA: 1, + FILTER_OPERATION_CONDITION: 2, + FILTER_OPERATION_CONDITION_AND: 3, + FILTER_OPERATION_CONDITION_OR: 4, + FILTER_OPERATION_FORMULA_AND: 5, + FILTER_OPERATION_FORMULA_OR: 6 +});/** + * Created by Urthur on 2017/11/21. + */ +!(function () { + var Expander = BI.inherit(BI.Widget, { + props: { + baseCls: "bi-filter-expander", + el: {}, + popup: {} + }, + + render: function () { + var self = this, o = this.options; + return { + type: "bi.filter_expander", + el: o.el, + popup: o.popup, + id: o.id, + value: o.value, + listeners: [{ + eventName: BI.Controller.EVENT_CHANGE, + action: function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + } + }], + ref: function (_ref) { + self.expander = _ref; + } + }; + }, + + populate: function () { + this.expander.populate.apply(this.expander, arguments); + }, + + getValue: function () { + var val = this.expander.getValue(); + return { + filterType: val.type, + filterValue: val.value, + id: val.id + }; + } + }); + BI.shortcut("bi.and.or.filter.expander", Expander); +}());/** + * @class BI.FilterExpander + * @extend BI.AbstractFilterItem + * 过滤树的一个expander节点 + */ +!(function () { + var FilterExpander = BI.inherit(BI.AbstractFilterItem, { + _constant: { + EXPANDER_WIDTH: 20 + }, + + props: { + baseCls: "bi-filter-item bi-filter-expander", + el: {}, + popup: {} + }, + + render: function () { + var self = this, o = this.options; + var value = o.value, text = ""; + if (value === BI.Filter.FILTER_TYPE.AND) { + text = BI.i18nText("BI-Basic_And"); + } else { + text = BI.i18nText("BI-Basic_Or"); + } + return { + type: "bi.horizontal_adapt", + cls: "filter-item-empty-item", + verticalAlign: BI.VerticalAlign.Middle, + items: [{ + type: "bi.text_button", + cls: "condition-and-or", + text: text, + value: value, + id: o.id, + width: this._constant.EXPANDER_WIDTH, + height: "100%", + ref: function (_ref) { + self.expander = _ref; + }, + listeners: [{ + eventName: BI.TextButton.EVENT_CHANGE, + action: function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, "", self); + } + }] + }, BI.extend(o.popup, { + ref: function (_ref) { + self.conditionsView = _ref; + }, + listeners: [{ + eventName: BI.Controller.EVENT_CHANGE, + action: function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + } + }] + })] + }; + }, + + getValue: function () { + return { + type: this.expander.getValue(), + value: this.conditionsView.getValue(), + id: this.options.id + }; + }, + + populate: function () { + this.conditionsView.populate.apply(this.conditionsView, arguments); + } + }); + BI.shortcut("bi.filter_expander", FilterExpander); +}());/** + * Created by Urthur on 2017/12/21. + */ +!(function () { + BI.constant("bi.constant.component.filter", { + FORMULA_COMBO: [{ + text: BI.i18nText("BI-Conf_Formula_And"), + value: BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_AND + }, { + text: BI.i18nText("BI-Conf_Formula_Or"), + value: BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_OR + }], + CONDITION_COMBO: [{ + text: BI.i18nText("BI-Conf_Condition_And"), + value: BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_AND + }, { + text: BI.i18nText("BI-Conf_Condition_Or"), + value: BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_OR + }] + }); +}());/** + * 过滤 + * + * Created by GUY on 2015/11/20. + * @class BI.Filter + * @extend BI.Widget + */ +BI.Filter = BI.inherit(BI.Widget, { + + constants: { + FIELD_TYPE_NUMBER: 1, + FIELD_TYPE_STRING: 0, + FIELD_TYPE_DATE: 2 + }, + + props: { + baseCls: "bi-filter", + expander: {}, + items: [], + el: {}, + itemCreator: BI.empty + }, + + render: function () { + var self = this, o = this.options; + return BI.extend({ + type: "bi.filter_operation", + expander: o.expander, + listeners: [{ + eventName: "EVENT_OPERATION", + action: function (type) { + switch (type) { + case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION: + case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_AND: + self._addAndOrCondition(BI.Filter.FILTER_TYPE.EMPTY_CONDITION); + break; + case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_OR: + self._addAndOrCondition(BI.Filter.FILTER_TYPE.EMPTY_CONDITION, 1); + break; + case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA: + case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_AND: + self._addAndOrCondition(BI.Filter.FILTER_TYPE.EMPTY_FORMULA); + break; + case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_OR: + self._addAndOrCondition(BI.Filter.FILTER_TYPE.EMPTY_FORMULA, 1); + break; + } + } + }, { + eventName: "BI.FilterOperation.EVENT_DESTROY_ITEM", + action: function (id) { + self._removeCondition(id); + } + }], + ref: function (_ref) { + self.filter = _ref; + } + }, o.el); + }, + + mounted: function () { + this.tree = new BI.Tree(); + this.tree.initTree(this.options.items); + this._populate(this.tree.toJSONWithNode()); + }, + + _createEmptyNode: function (type) { + var node = new BI.Node(BI.UUID()); + node.set("data", { + value: type + }); + return node; + }, + + _insertAndOrCondition: function (id, formulaOrField, type) { + var ANDOR = ["AND", "OR"]; + type || (type = 0); + var finded = this.tree.search(id); + if (BI.isNotNull(finded)) { + var data = finded.get("data"); + var parent = finded.getParent(); + var index = parent.getChildIndex(finded.id); + var pdata = parent.get("data") || {}; + var node = this._createEmptyNode(formulaOrField); + if (data.value === BI.Filter.FILTER_TYPE[ANDOR[type]]) { + this.tree.addNode(finded, node); + return; + } + if (data.value === BI.Filter.FILTER_TYPE[ANDOR[1 - type]]) { + if (pdata.value === BI.Filter.FILTER_TYPE[ANDOR[type]]) { + parent.addChild(node, index + 1); + return; + } + } + if ((data.value === BI.Filter.FILTER_TYPE[ANDOR[1 - type]] && pdata.value !== BI.Filter.FILTER_TYPE[ANDOR[type]]) + || pdata.value === BI.Filter.FILTER_TYPE[ANDOR[1 - type]] + || (pdata.value !== BI.Filter.FILTER_TYPE.AND && pdata.value !== BI.Filter.FILTER_TYPE.OR)) { + var andor = new BI.Node(BI.UUID()); + andor.set("data", { + value: BI.Filter.FILTER_TYPE[ANDOR[type]], + children: [finded.get("data"), node.get("data")] + }); + parent.removeChildByIndex(index); + parent.addChild(andor, index); + andor.addChild(finded); + andor.addChild(node); + return; + } + parent.addChild(node, index + 1); + } + }, + + _removeCondition: function (id) { + var finded = this.tree.search(id); + if (BI.isNotNull(finded)) { + var parent = finded.getParent(); + parent.removeChild(id); + if (parent.getChildrenLength() <= 1) { + var prev = parent.getParent(); + if (BI.isNotNull(prev)) { + var index = prev.getChildIndex(parent.id); + prev.removeChildByIndex(index); + if (parent.getChildrenLength() === 1) { + prev.addChild(parent.getFirstChild(), index); + } + } + } + this._populate(this.tree.toJSONWithNode()); + this.fireEvent("EVENT_CHANGE"); + } + }, + + _addAndOrCondition: function (formulaOrField, type) { + var ANDOR = ["AND", "OR"]; + type || (type = 0); + var currentSelectItem = this.filter.getCurrentSelectItem(); + if (BI.isNotNull(currentSelectItem)) { + var id = currentSelectItem.attr("id"); + this._insertAndOrCondition(id, formulaOrField, type); + } else { + var node = this._createEmptyNode(formulaOrField); + var root = this.tree.getRoot(); + var child = root.getLastChild(); + if (BI.isNotNull(child)) { + var data = child.get("data"); + if (data.value === BI.Filter.FILTER_TYPE[ANDOR[type]]) { + this.tree.addNode(child, node); + } else { + var andor = new BI.Node(BI.UUID()); + andor.set("data", { + value: BI.Filter.FILTER_TYPE[ANDOR[type]], + children: [child.get("data"), node.get("data")] + }); + root.removeChild(child.id); + this.tree.addNode(andor); + this.tree.addNode(andor, child); + this.tree.addNode(andor, node); + } + } else { + this.tree.addNode(node); + } + } + this._populate(this.tree.toJSONWithNode()); + this.fireEvent("EVENT_CHANGE"); + }, + + _populate: function (items) { + this.filter.defaultState(); + var o = this.options; + o.items = items; + BI.Tree.traversal(items, function (i, item) { + o.itemCreator(item); + }); + this.filter.populate.apply(this.filter, [items]); + }, + + populate: function (conditions) { + this.tree.initTree(conditions); + this._populate(this.tree.toJSONWithNode()); + }, + + getValue: function () { + return this.filter.getValue(); + } +}); + +BI.shortcut("bi.filter", BI.Filter); + +BI.Filter.FILTER_TYPE = {}; +BI.Filter.FILTER_TYPE.FORMULA = 33; +BI.Filter.FILTER_TYPE.AND = 34; +BI.Filter.FILTER_TYPE.OR = 35; +BI.Filter.FILTER_TYPE.EMPTY_FORMULA = 36; +BI.Filter.FILTER_TYPE.EMPTY_CONDITION = 37; +/** + * Created by windy on 2017/3/28. + */ +!(function () { + var FilterList = BI.inherit(BI.ButtonTree, { + props: { + baseCls: "bi-button-map" + }, + + _createBtns: function (items) { + var o = this.options; + var buttons = BI.createWidgets(BI.createItems(items, {type: "bi.text_button", once: o.chooseType === 0})); + var keys = BI.map(items, function (i, item) { + item = BI.stripEL(item); + if (!(item.id || item.value)) { + throw new Error("item must have 'id' or 'value' as its property"); + } + return item.id || item.value; + }); + return BI.zipObject(keys, buttons); + }, + + setValue: function (v) { + v = BI.isArray(v) ? v : [v]; + BI.each(this.buttons, function (val, item) { + if (!BI.isFunction(item.setSelected)) { + item.setValue(v); + return; + } + if (v.contains(val)) { + item.setSelected && item.setSelected(true); + } else { + item.setSelected && item.setSelected(false); + } + }); + }, + + setNotSelectedValue: function (v) { + v = BI.isArray(v) ? v : [v]; + BI.each(this.buttons, function (val, item) { + if (!BI.isFunction(item.setSelected)) { + item.setNotSelectedValue(v); + return; + } + if (v.contains(val)) { + item.setSelected && item.setSelected(false); + } else { + item.setSelected && item.setSelected(true); + } + }); + }, + + populate: function (items) { + var self = this; + var args = [].slice.call(arguments); + var linkHashMap = new BI.LinkHashMap(); + var val = function (item) { + return item.id || item.value; + }; + if (!this.buttons) { + this.buttons = {}; + } + // 所有已存在的和新添加的 + var willCreated = []; + BI.each(items, function (i, item) { + item = BI.stripEL(item); + if (self.buttons[val(item)]) { + var ob = self.buttons[val(item)]; + args[0] = item.items; + args[2] = item; + ob.populate && ob.populate.apply(ob, args); + } else { + willCreated.push(item); + } + }); + // 创建新元素 + args[0] = willCreated; + var newBtns = this._btnsCreator.apply(this, args); + + // 整理 + var array = []; + BI.each(items, function (i, item) { + item = BI.stripEL(item); + var button = self.buttons[val(item)] || newBtns[val(item)]; + linkHashMap.add(val(item), button); + array.push(button); + }); + this.buttons = linkHashMap.map; + + BI.DOM.hang(this.buttons); + this.element.empty(); + + var packages = this._packageItems(items, this._packageBtns(array)); + BI.createWidget(BI.extend({element: this}, this._packageLayout(packages))); + }, + + getIndexByValue: function () { + throw new Error("Can not use getIndexByValue"); + } + }); + BI.shortcut("bi.filter_list", FilterList); +}());/** + * 过滤条件 + * + * Created by GUY on 2015/9/25. + * @class BI.FilterOperation + * @extend BI.Widget + */ +!(function () { + var OPERATION_ADD_CONDITION = 0, OPERATION_ADD_ANDOR_CONDITION = 1; + var FilterOperation = BI.inherit(BI.Widget, { + props: { + baseCls: "bi-filter-operation", + expander: {}, + items: [], + selections: [BI.AbstractFilterItem.FILTER_OPERATION_CONDITION, BI.AbstractFilterItem.FILTER_OPERATION_FORMULA], + itemsCreator: BI.emptyFn + }, + + render: function () { + var self = this, o = this.options; + this.currentSelected = null; + + return { + type: "bi.vtape", + items: [{ + el: { + type: "bi.tab", + showIndex: OPERATION_ADD_CONDITION, + cardCreator: BI.bind(this._createTabs, this), + ref: function (_ref) { + self.buttonComboTab = _ref; + } + }, + height: 40 + }, { + el: { + type: "bi.absolute", + scrollable: true, + items: [{ + el: { + type: "bi.left", + items: [{ + type: "bi.filter_pane", + expander: o.expander, + items: o.items, + itemsCreator: o.itemsCreator, + listeners: [{ + eventName: "EVENT_CHANGE", + action: function (type, value, obj) { + if (type === BI.Events.CLICK) { + if (BI.isNotNull(self.currentSelected) && self.currentSelected === obj) { + obj.setSelectedCondition(!obj.isSelectedCondition()); + } else { + if (BI.isNotNull(self.currentSelected)) { + self.currentSelected.setSelectedCondition(false); + } + self.currentSelected = obj; + obj.setSelectedCondition(true); + } + if (self.currentSelected.isSelectedCondition()) { + self.buttonComboTab.setSelect(OPERATION_ADD_ANDOR_CONDITION); + } else { + self.buttonComboTab.setSelect(OPERATION_ADD_CONDITION); + } + } + if (type === BI.Events.DESTROY) { + if (self.currentSelected === obj) { + self.currentSelected = null; + self.buttonComboTab.setSelect(OPERATION_ADD_CONDITION); + } + self.fireEvent("BI.FilterOperation.EVENT_DESTROY_ITEM", value, obj); + } + } + }], + ref: function (_ref) { + self.filter = _ref; + } + }] + }, + top: 0, + right: 2, + bottom: 0, + left: 0 + }] + } + }] + }; + }, + + _createTabs: function (v) { + var self = this; + switch (v) { + case OPERATION_ADD_CONDITION: + return { + type: "bi.button_group", + items: BI.createItems(self._createButtons(), { + type: "bi.icon_text_item", + height: 30, + width: 100 + }), + chooseType: BI.ButtonGroup.CHOOSE_TYPE_DEFAULT, + layouts: [{ + type: "bi.left", + vgap: 5 + }], + listeners: [{ + eventName: BI.ButtonGroup.EVENT_CHANGE, + action: function (value, obj) { + if (BI.isEmptyArray(self.filter.getValue())) { + self.filter.element.addClass("bi-border-top bi-border-left"); + } + self.fireEvent("EVENT_OPERATION", obj.getValue()); + self.defaultState(); + } + }] + }; + case OPERATION_ADD_ANDOR_CONDITION: + return { + type: "bi.button_group", + chooseType: BI.ButtonGroup.CHOOSE_TYPE_DEFAULT, + items: self._buildOperationButton(), + layouts: [{ + type: "bi.left", + vgap: 5 + }] + }; + } + }, + + _createButtons: function () { + var buttons = []; + BI.each(this.options.selections, function (i, type) { + switch (type) { + case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA: + buttons.push({ + text: BI.i18nText("BI-Conf_Add_Formula"), + value: BI.AbstractFilterItem.FILTER_OPERATION_FORMULA, + cls: "operation-trigger filter-formula-font" + }); + break; + case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION: + buttons.push({ + text: BI.i18nText("BI-Conf_Add_Condition"), + value: BI.AbstractFilterItem.FILTER_OPERATION_CONDITION, + cls: "operation-trigger filter-condition-font" + }); + break; + } + }); + return buttons; + }, + + _buildOperationButton: function () { + var self = this, combos = []; + BI.each(this.options.selections, function (i, type) { + var text = "", cls = "", items = []; + switch (type) { + case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA: + text = BI.i18nText("BI-Conf_Add_Formula"); + cls = "filter-formula-font"; + items = BI.Constants.getConstant("bi.constant.component.filter").FORMULA_COMBO; + break; + case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION: + default: + text = BI.i18nText("BI-Conf_Add_Condition"); + cls = "filter-condition-font"; + items = BI.Constants.getConstant("bi.constant.component.filter").CONDITION_COMBO; + break; + } + + var trigger = BI.createWidget({ + type: "bi.icon_text_item", + cls: "operation-trigger " + cls, + text: text, + height: 30, + width: 100 + }); + combos.push({ + type: "bi.combo", + el: trigger, + popup: { + el: { + type: "bi.button_group", + chooseType: BI.ButtonGroup.CHOOSE_TYPE_NONE, + items: BI.createItems(items, { + type: "bi.single_select_item", + height: 25 + }), + layouts: [{ + type: "bi.vertical" + }] + } + }, + listeners: [{ + eventName: BI.Combo.EVENT_CHANGE, + action: function (value, obj) { + if (BI.isEmptyArray(self.filter.getValue())) { + self.filter.element.addClass("bi-border-top bi-border-left"); + } + + switch (value) { + case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_AND: + case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_OR: + trigger.setText(BI.i18nText("BI-Conf_Add_Condition")); + break; + case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_AND: + case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_OR: + trigger.setText(BI.i18nText("BI-Conf_Add_Formula")); + break; + default: + trigger.setText(); + } + self.fireEvent("EVENT_OPERATION", obj.getValue()); + self.defaultState(); + this.hideView(); + } + }] + }); + }); + return combos; + }, + + defaultState: function () { + if (BI.isNotNull(this.currentSelected)) { + this.currentSelected.setSelectedCondition(false); + } + this.buttonComboTab.setSelect(OPERATION_ADD_CONDITION); + }, + + getCurrentSelectItem: function () { + if (BI.isNotNull(this.currentSelected) && this.currentSelected.isSelectedCondition()) { + return this.currentSelected; + } + }, + + populate: function (items) { + this.filter.populate.apply(this.filter, arguments); + }, + + getValue: function () { + return this.filter.getValue(); + } + }); + BI.shortcut("bi.filter_operation", FilterOperation); +}()); +/** + * @class BI.FilterPane + * @extend BI.Widget + * 过滤面板 + */ +!(function () { + var FilterPane = BI.inherit(BI.Widget, { + props: { + baseCls: "bi-filter-pane", + expander: {}, + items: [], + itemsCreator: BI.emptyFn + }, + + render: function () { + var self = this, o = this.options; + return { + type: "bi.custom_tree", + cls: BI.isNotEmptyArray(o.items) ? "bi-border-top bi-border-left" : "", + expander: BI.extend({ + type: "bi.filter_expander", + el: {}, + popup: { + type: "bi.custom_tree" + } + }, o.expander), + el: { + type: "bi.filter_list", + chooseType: BI.ButtonGroup.CHOOSE_TYPE_DEFAULT, + layouts: [{ + type: "bi.vertical", + scrolly: false + }] + }, + items: o.items, + listeners: [{ + eventName: BI.Controller.EVENT_CHANGE, + action: function () { + self.fireEvent("EVENT_CHANGE", arguments); + } + }], + ref: function (_ref) { + self.tree = _ref; + } + }; + }, + + populate: function (items) { + if (BI.isNotEmptyArray(items)) { + this.element.addClass("bi-border-top bi-border-left"); + } else { + this.element.removeClass("bi-border-top bi-border-left"); + } + this.tree.populate.apply(this.tree, arguments); + }, + + getValue: function () { + return this.tree.getValue(); + } + }); + BI.shortcut("bi.filter_pane", FilterPane); +}());/** * Created by zcf on 2016/9/26. */ BI.IntervalSlider = BI.inherit(BI.Widget, { diff --git a/public/js/index.js b/public/js/index.js index a52a1be3f..461e6e0fe 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -147,5 +147,13 @@ BI.i18n = { "BI-Basic_Year_Quarter": "年季度", "BI-Basic_Input_From_To_Number": "请输入{R1}的数值", "BI-Basic_Input_Can_Not_Null": "输入框不能为空", - "BI-Basic_Date_Time_Error_Text": "日期格式示例:2015-3-11 00:00:00" + "BI-Basic_Date_Time_Error_Text": "日期格式示例:2015-3-11 00:00:00", + "BI-Basic_Or": "或", + "BI-Basic_And": "且", + "BI-Conf_Add_Formula": "添加公式", + "BI-Conf_Add_Condition": "添加条件", + "BI-Conf_Formula_And": "且公式条件", + "BI-Conf_Formula_Or": "或公式条件", + "BI-Conf_Condition_And": "且条件", + "BI-Conf_Condition_Or": "或条件" }; \ No newline at end of file diff --git a/src/css/widget/filter/abstractitem/filter.css b/src/css/widget/filter/abstractitem/filter.css new file mode 100644 index 000000000..b270b60a4 --- /dev/null +++ b/src/css/widget/filter/abstractitem/filter.css @@ -0,0 +1,4 @@ +.bi-filter-item .filter-item-empty-item .empty-filter-item-leaf { + border: 1px dashed #178cdf; + background: #eaf2fd; +} diff --git a/src/css/widget/filter/expander/filter.css b/src/css/widget/filter/expander/filter.css new file mode 100644 index 000000000..4cadae545 --- /dev/null +++ b/src/css/widget/filter/expander/filter.css @@ -0,0 +1,26 @@ +.bi-filter-expander { + min-width: 100%; + border-right: 0px; + border-bottom: 0px; +} +.bi-filter-expander > .filter-item-empty-item { + border-top: 0px; + border-right: 1px solid #d4dadd; + border-bottom: 1px solid #d4dadd; +} +.bi-filter-expander > table { + min-width: 100%; +} +.bi-filter-expander > table > tbody > tr > td.first-element { + width: 20px; + border-right: 1px solid #d4dadd !important; + border-bottom: 1px solid #d4dadd !important; +} +.bi-theme-dark .bi-filter-expander > .filter-item-empty-item { + border-right: 1px solid #525466; + border-bottom: 1px solid #525466; +} +.bi-theme-dark .bi-filter-expander > table > tbody > tr > td.first-element { + border-right: 1px solid #525466 !important; + border-bottom: 1px solid #525466 !important; +} diff --git a/src/css/widget/filter/operation/filter.css b/src/css/widget/filter/operation/filter.css new file mode 100644 index 000000000..e3d06ed52 --- /dev/null +++ b/src/css/widget/filter/operation/filter.css @@ -0,0 +1,4 @@ +.bi-filter-operation .operation-trigger.hover, +.bi-filter-operation .operation-trigger:hover { + color: #58cc7d; +} diff --git a/src/css/widget/filter/pane/filter.css b/src/css/widget/filter/pane/filter.css new file mode 100644 index 000000000..ae074865b --- /dev/null +++ b/src/css/widget/filter/pane/filter.css @@ -0,0 +1,6 @@ +.bi-filter-pane { + min-width: 100%; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; +} diff --git a/src/less/widget/filter/abstractitem/filter.abstract.item.less b/src/less/widget/filter/abstractitem/filter.abstract.item.less new file mode 100644 index 000000000..aabf1e819 --- /dev/null +++ b/src/less/widget/filter/abstractitem/filter.abstract.item.less @@ -0,0 +1,11 @@ +@import "../../../index"; + +.bi-filter-item { + //min-width: 470px; + & .filter-item-empty-item { + & .empty-filter-item-leaf{ + border: 1px dashed @color-bi-border-highlight; + background: @color-bi-background-light-highlight; + } + } +} \ No newline at end of file diff --git a/src/less/widget/filter/expander/filter.expander.less b/src/less/widget/filter/expander/filter.expander.less new file mode 100644 index 000000000..e8ba9afa6 --- /dev/null +++ b/src/less/widget/filter/expander/filter.expander.less @@ -0,0 +1,36 @@ +@import "../../../index"; + +.bi-filter-expander { + min-width: 100%; + border-right: 0px; + border-bottom: 0px; + & > .filter-item-empty-item { + border-top: 0px; + border-right: 1px solid @color-bi-border-line; + border-bottom: 1px solid @color-bi-border-line; + } + & .condition-and-or { + + } + > table { + min-width: 100%; + } + > table > tbody > tr > td.first-element { + width: 20px; + border-right: 1px solid @color-bi-border-line !important; + border-bottom: 1px solid @color-bi-border-line !important; + } +} + +.bi-theme-dark { + .bi-filter-expander { + & > .filter-item-empty-item { + border-right: 1px solid @color-bi-border-line-theme-dark; + border-bottom: 1px solid @color-bi-border-line-theme-dark; + } + > table > tbody > tr > td.first-element { + border-right: 1px solid @color-bi-border-line-theme-dark !important; + border-bottom: 1px solid @color-bi-border-line-theme-dark !important; + } + } +} \ No newline at end of file diff --git a/src/less/widget/filter/operation/filter.operation.less b/src/less/widget/filter/operation/filter.operation.less new file mode 100644 index 000000000..805feb507 --- /dev/null +++ b/src/less/widget/filter/operation/filter.operation.less @@ -0,0 +1,8 @@ +@import "../../../index"; +.bi-filter-operation { + & .operation-trigger { + &.hover, &:hover{ + color: @background-color-dark-success; + } + } +} \ No newline at end of file diff --git a/src/less/widget/filter/pane/filter.pane.less b/src/less/widget/filter/pane/filter.pane.less new file mode 100644 index 000000000..d02cc7933 --- /dev/null +++ b/src/less/widget/filter/pane/filter.pane.less @@ -0,0 +1,6 @@ +@import "../../../index"; + +.bi-filter-pane { + min-width: 100%; + .border-radius(2px); +} \ No newline at end of file diff --git a/src/widget/filter/abstractitem/filter.abstract.item.js b/src/widget/filter/abstractitem/filter.abstract.item.js new file mode 100644 index 000000000..1664d3afe --- /dev/null +++ b/src/widget/filter/abstractitem/filter.abstract.item.js @@ -0,0 +1,51 @@ +/** + * 过滤条件抽象类 + * + * @class BI.AbstractFilterItem + * @extend BI.Widget + */ +BI.AbstractFilterItem = BI.inherit(BI.Widget, { + + props: { + baseCls: "bi-filter-item bi-border-right bi-border-bottom" + }, + + isSelectedCondition: function () { + return this.emptyItem && this.emptyItem.isVisible(); + }, + + setSelectedCondition: function (b) { + if (b) { + if (!this.emptyItem) { + this.emptyItem = BI.createWidget({ + type: "bi.absolute", + height: 40, + cls: "filter-item-empty-item bi-border-top", + items: [{ + el: { + type: "bi.center_adapt", + cls: "empty-filter-item-leaf" + } + }], + hgap: 10, + vgap: 5 + }); + BI.createWidget({ + type: "bi.vertical", + element: this, + items: [this.emptyItem], + scrolly: false + }); + } + } + this.emptyItem && this.emptyItem.setVisible(b); + } +}); +BI.extend(BI.AbstractFilterItem, { + FILTER_OPERATION_FORMULA: 1, + FILTER_OPERATION_CONDITION: 2, + FILTER_OPERATION_CONDITION_AND: 3, + FILTER_OPERATION_CONDITION_OR: 4, + FILTER_OPERATION_FORMULA_AND: 5, + FILTER_OPERATION_FORMULA_OR: 6 +}); \ No newline at end of file diff --git a/src/widget/filter/expander/and.or.expander.js b/src/widget/filter/expander/and.or.expander.js new file mode 100644 index 000000000..7cc72648c --- /dev/null +++ b/src/widget/filter/expander/and.or.expander.js @@ -0,0 +1,46 @@ +/** + * Created by Urthur on 2017/11/21. + */ +!(function () { + var Expander = BI.inherit(BI.Widget, { + props: { + baseCls: "bi-filter-expander", + el: {}, + popup: {} + }, + + render: function () { + var self = this, o = this.options; + return { + type: "bi.filter_expander", + el: o.el, + popup: o.popup, + id: o.id, + value: o.value, + listeners: [{ + eventName: BI.Controller.EVENT_CHANGE, + action: function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + } + }], + ref: function (_ref) { + self.expander = _ref; + } + }; + }, + + populate: function () { + this.expander.populate.apply(this.expander, arguments); + }, + + getValue: function () { + var val = this.expander.getValue(); + return { + filterType: val.type, + filterValue: val.value, + id: val.id + }; + } + }); + BI.shortcut("bi.and.or.filter.expander", Expander); +}()); \ No newline at end of file diff --git a/src/widget/filter/expander/filter.expander.js b/src/widget/filter/expander/filter.expander.js new file mode 100644 index 000000000..069f70f23 --- /dev/null +++ b/src/widget/filter/expander/filter.expander.js @@ -0,0 +1,74 @@ +/** + * @class BI.FilterExpander + * @extend BI.AbstractFilterItem + * 过滤树的一个expander节点 + */ +!(function () { + var FilterExpander = BI.inherit(BI.AbstractFilterItem, { + _constant: { + EXPANDER_WIDTH: 20 + }, + + props: { + baseCls: "bi-filter-item bi-filter-expander", + el: {}, + popup: {} + }, + + render: function () { + var self = this, o = this.options; + var value = o.value, text = ""; + if (value === BI.Filter.FILTER_TYPE.AND) { + text = BI.i18nText("BI-Basic_And"); + } else { + text = BI.i18nText("BI-Basic_Or"); + } + return { + type: "bi.horizontal_adapt", + cls: "filter-item-empty-item", + verticalAlign: BI.VerticalAlign.Middle, + items: [{ + type: "bi.text_button", + cls: "condition-and-or", + text: text, + value: value, + id: o.id, + width: this._constant.EXPANDER_WIDTH, + height: "100%", + ref: function (_ref) { + self.expander = _ref; + }, + listeners: [{ + eventName: BI.TextButton.EVENT_CHANGE, + action: function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, "", self); + } + }] + }, BI.extend(o.popup, { + ref: function (_ref) { + self.conditionsView = _ref; + }, + listeners: [{ + eventName: BI.Controller.EVENT_CHANGE, + action: function () { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + } + }] + })] + }; + }, + + getValue: function () { + return { + type: this.expander.getValue(), + value: this.conditionsView.getValue(), + id: this.options.id + }; + }, + + populate: function () { + this.conditionsView.populate.apply(this.conditionsView, arguments); + } + }); + BI.shortcut("bi.filter_expander", FilterExpander); +}()); \ No newline at end of file diff --git a/src/widget/filter/filter.constant.js b/src/widget/filter/filter.constant.js new file mode 100644 index 000000000..1245bc1a5 --- /dev/null +++ b/src/widget/filter/filter.constant.js @@ -0,0 +1,21 @@ +/** + * Created by Urthur on 2017/12/21. + */ +!(function () { + BI.constant("bi.constant.component.filter", { + FORMULA_COMBO: [{ + text: BI.i18nText("BI-Conf_Formula_And"), + value: BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_AND + }, { + text: BI.i18nText("BI-Conf_Formula_Or"), + value: BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_OR + }], + CONDITION_COMBO: [{ + text: BI.i18nText("BI-Conf_Condition_And"), + value: BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_AND + }, { + text: BI.i18nText("BI-Conf_Condition_Or"), + value: BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_OR + }] + }); +}()); \ No newline at end of file diff --git a/src/widget/filter/filter.js b/src/widget/filter/filter.js new file mode 100644 index 000000000..dc177c5f6 --- /dev/null +++ b/src/widget/filter/filter.js @@ -0,0 +1,194 @@ +/** + * 过滤 + * + * Created by GUY on 2015/11/20. + * @class BI.Filter + * @extend BI.Widget + */ +BI.Filter = BI.inherit(BI.Widget, { + + constants: { + FIELD_TYPE_NUMBER: 1, + FIELD_TYPE_STRING: 0, + FIELD_TYPE_DATE: 2 + }, + + props: { + baseCls: "bi-filter", + expander: {}, + items: [], + el: {}, + itemCreator: BI.empty + }, + + render: function () { + var self = this, o = this.options; + return BI.extend({ + type: "bi.filter_operation", + expander: o.expander, + listeners: [{ + eventName: "EVENT_OPERATION", + action: function (type) { + switch (type) { + case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION: + case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_AND: + self._addAndOrCondition(BI.Filter.FILTER_TYPE.EMPTY_CONDITION); + break; + case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_OR: + self._addAndOrCondition(BI.Filter.FILTER_TYPE.EMPTY_CONDITION, 1); + break; + case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA: + case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_AND: + self._addAndOrCondition(BI.Filter.FILTER_TYPE.EMPTY_FORMULA); + break; + case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_OR: + self._addAndOrCondition(BI.Filter.FILTER_TYPE.EMPTY_FORMULA, 1); + break; + } + } + }, { + eventName: "BI.FilterOperation.EVENT_DESTROY_ITEM", + action: function (id) { + self._removeCondition(id); + } + }], + ref: function (_ref) { + self.filter = _ref; + } + }, o.el); + }, + + mounted: function () { + this.tree = new BI.Tree(); + this.tree.initTree(this.options.items); + this._populate(this.tree.toJSONWithNode()); + }, + + _createEmptyNode: function (type) { + var node = new BI.Node(BI.UUID()); + node.set("data", { + value: type + }); + return node; + }, + + _insertAndOrCondition: function (id, formulaOrField, type) { + var ANDOR = ["AND", "OR"]; + type || (type = 0); + var finded = this.tree.search(id); + if (BI.isNotNull(finded)) { + var data = finded.get("data"); + var parent = finded.getParent(); + var index = parent.getChildIndex(finded.id); + var pdata = parent.get("data") || {}; + var node = this._createEmptyNode(formulaOrField); + if (data.value === BI.Filter.FILTER_TYPE[ANDOR[type]]) { + this.tree.addNode(finded, node); + return; + } + if (data.value === BI.Filter.FILTER_TYPE[ANDOR[1 - type]]) { + if (pdata.value === BI.Filter.FILTER_TYPE[ANDOR[type]]) { + parent.addChild(node, index + 1); + return; + } + } + if ((data.value === BI.Filter.FILTER_TYPE[ANDOR[1 - type]] && pdata.value !== BI.Filter.FILTER_TYPE[ANDOR[type]]) + || pdata.value === BI.Filter.FILTER_TYPE[ANDOR[1 - type]] + || (pdata.value !== BI.Filter.FILTER_TYPE.AND && pdata.value !== BI.Filter.FILTER_TYPE.OR)) { + var andor = new BI.Node(BI.UUID()); + andor.set("data", { + value: BI.Filter.FILTER_TYPE[ANDOR[type]], + children: [finded.get("data"), node.get("data")] + }); + parent.removeChildByIndex(index); + parent.addChild(andor, index); + andor.addChild(finded); + andor.addChild(node); + return; + } + parent.addChild(node, index + 1); + } + }, + + _removeCondition: function (id) { + var finded = this.tree.search(id); + if (BI.isNotNull(finded)) { + var parent = finded.getParent(); + parent.removeChild(id); + if (parent.getChildrenLength() <= 1) { + var prev = parent.getParent(); + if (BI.isNotNull(prev)) { + var index = prev.getChildIndex(parent.id); + prev.removeChildByIndex(index); + if (parent.getChildrenLength() === 1) { + prev.addChild(parent.getFirstChild(), index); + } + } + } + this._populate(this.tree.toJSONWithNode()); + this.fireEvent("EVENT_CHANGE"); + } + }, + + _addAndOrCondition: function (formulaOrField, type) { + var ANDOR = ["AND", "OR"]; + type || (type = 0); + var currentSelectItem = this.filter.getCurrentSelectItem(); + if (BI.isNotNull(currentSelectItem)) { + var id = currentSelectItem.attr("id"); + this._insertAndOrCondition(id, formulaOrField, type); + } else { + var node = this._createEmptyNode(formulaOrField); + var root = this.tree.getRoot(); + var child = root.getLastChild(); + if (BI.isNotNull(child)) { + var data = child.get("data"); + if (data.value === BI.Filter.FILTER_TYPE[ANDOR[type]]) { + this.tree.addNode(child, node); + } else { + var andor = new BI.Node(BI.UUID()); + andor.set("data", { + value: BI.Filter.FILTER_TYPE[ANDOR[type]], + children: [child.get("data"), node.get("data")] + }); + root.removeChild(child.id); + this.tree.addNode(andor); + this.tree.addNode(andor, child); + this.tree.addNode(andor, node); + } + } else { + this.tree.addNode(node); + } + } + this._populate(this.tree.toJSONWithNode()); + this.fireEvent("EVENT_CHANGE"); + }, + + _populate: function (items) { + this.filter.defaultState(); + var o = this.options; + o.items = items; + BI.Tree.traversal(items, function (i, item) { + o.itemCreator(item); + }); + this.filter.populate.apply(this.filter, [items]); + }, + + populate: function (conditions) { + this.tree.initTree(conditions); + this._populate(this.tree.toJSONWithNode()); + }, + + getValue: function () { + return this.filter.getValue(); + } +}); + +BI.shortcut("bi.filter", BI.Filter); + +BI.Filter.FILTER_TYPE = {}; +BI.Filter.FILTER_TYPE.FORMULA = 33; +BI.Filter.FILTER_TYPE.AND = 34; +BI.Filter.FILTER_TYPE.OR = 35; +BI.Filter.FILTER_TYPE.EMPTY_FORMULA = 36; +BI.Filter.FILTER_TYPE.EMPTY_CONDITION = 37; diff --git a/src/widget/filter/filter.list.js b/src/widget/filter/filter.list.js new file mode 100644 index 000000000..e77327a8e --- /dev/null +++ b/src/widget/filter/filter.list.js @@ -0,0 +1,102 @@ +/** + * Created by windy on 2017/3/28. + */ +!(function () { + var FilterList = BI.inherit(BI.ButtonTree, { + props: { + baseCls: "bi-button-map" + }, + + _createBtns: function (items) { + var o = this.options; + var buttons = BI.createWidgets(BI.createItems(items, {type: "bi.text_button", once: o.chooseType === 0})); + var keys = BI.map(items, function (i, item) { + item = BI.stripEL(item); + if (!(item.id || item.value)) { + throw new Error("item must have 'id' or 'value' as its property"); + } + return item.id || item.value; + }); + return BI.zipObject(keys, buttons); + }, + + setValue: function (v) { + v = BI.isArray(v) ? v : [v]; + BI.each(this.buttons, function (val, item) { + if (!BI.isFunction(item.setSelected)) { + item.setValue(v); + return; + } + if (v.contains(val)) { + item.setSelected && item.setSelected(true); + } else { + item.setSelected && item.setSelected(false); + } + }); + }, + + setNotSelectedValue: function (v) { + v = BI.isArray(v) ? v : [v]; + BI.each(this.buttons, function (val, item) { + if (!BI.isFunction(item.setSelected)) { + item.setNotSelectedValue(v); + return; + } + if (v.contains(val)) { + item.setSelected && item.setSelected(false); + } else { + item.setSelected && item.setSelected(true); + } + }); + }, + + populate: function (items) { + var self = this; + var args = [].slice.call(arguments); + var linkHashMap = new BI.LinkHashMap(); + var val = function (item) { + return item.id || item.value; + }; + if (!this.buttons) { + this.buttons = {}; + } + // 所有已存在的和新添加的 + var willCreated = []; + BI.each(items, function (i, item) { + item = BI.stripEL(item); + if (self.buttons[val(item)]) { + var ob = self.buttons[val(item)]; + args[0] = item.items; + args[2] = item; + ob.populate && ob.populate.apply(ob, args); + } else { + willCreated.push(item); + } + }); + // 创建新元素 + args[0] = willCreated; + var newBtns = this._btnsCreator.apply(this, args); + + // 整理 + var array = []; + BI.each(items, function (i, item) { + item = BI.stripEL(item); + var button = self.buttons[val(item)] || newBtns[val(item)]; + linkHashMap.add(val(item), button); + array.push(button); + }); + this.buttons = linkHashMap.map; + + BI.DOM.hang(this.buttons); + this.element.empty(); + + var packages = this._packageItems(items, this._packageBtns(array)); + BI.createWidget(BI.extend({element: this}, this._packageLayout(packages))); + }, + + getIndexByValue: function () { + throw new Error("Can not use getIndexByValue"); + } + }); + BI.shortcut("bi.filter_list", FilterList); +}()); \ No newline at end of file diff --git a/src/widget/filter/operation/filter.operation.js b/src/widget/filter/operation/filter.operation.js new file mode 100644 index 000000000..044f1b599 --- /dev/null +++ b/src/widget/filter/operation/filter.operation.js @@ -0,0 +1,245 @@ +/** + * 过滤条件 + * + * Created by GUY on 2015/9/25. + * @class BI.FilterOperation + * @extend BI.Widget + */ +!(function () { + var OPERATION_ADD_CONDITION = 0, OPERATION_ADD_ANDOR_CONDITION = 1; + var FilterOperation = BI.inherit(BI.Widget, { + props: { + baseCls: "bi-filter-operation", + expander: {}, + items: [], + selections: [BI.AbstractFilterItem.FILTER_OPERATION_CONDITION, BI.AbstractFilterItem.FILTER_OPERATION_FORMULA], + itemsCreator: BI.emptyFn + }, + + render: function () { + var self = this, o = this.options; + this.currentSelected = null; + + return { + type: "bi.vtape", + items: [{ + el: { + type: "bi.tab", + showIndex: OPERATION_ADD_CONDITION, + cardCreator: BI.bind(this._createTabs, this), + ref: function (_ref) { + self.buttonComboTab = _ref; + } + }, + height: 40 + }, { + el: { + type: "bi.absolute", + scrollable: true, + items: [{ + el: { + type: "bi.left", + items: [{ + type: "bi.filter_pane", + expander: o.expander, + items: o.items, + itemsCreator: o.itemsCreator, + listeners: [{ + eventName: "EVENT_CHANGE", + action: function (type, value, obj) { + if (type === BI.Events.CLICK) { + if (BI.isNotNull(self.currentSelected) && self.currentSelected === obj) { + obj.setSelectedCondition(!obj.isSelectedCondition()); + } else { + if (BI.isNotNull(self.currentSelected)) { + self.currentSelected.setSelectedCondition(false); + } + self.currentSelected = obj; + obj.setSelectedCondition(true); + } + if (self.currentSelected.isSelectedCondition()) { + self.buttonComboTab.setSelect(OPERATION_ADD_ANDOR_CONDITION); + } else { + self.buttonComboTab.setSelect(OPERATION_ADD_CONDITION); + } + } + if (type === BI.Events.DESTROY) { + if (self.currentSelected === obj) { + self.currentSelected = null; + self.buttonComboTab.setSelect(OPERATION_ADD_CONDITION); + } + self.fireEvent("BI.FilterOperation.EVENT_DESTROY_ITEM", value, obj); + } + } + }], + ref: function (_ref) { + self.filter = _ref; + } + }] + }, + top: 0, + right: 2, + bottom: 0, + left: 0 + }] + } + }] + }; + }, + + _createTabs: function (v) { + var self = this; + switch (v) { + case OPERATION_ADD_CONDITION: + return { + type: "bi.button_group", + items: BI.createItems(self._createButtons(), { + type: "bi.icon_text_item", + height: 30, + width: 100 + }), + chooseType: BI.ButtonGroup.CHOOSE_TYPE_DEFAULT, + layouts: [{ + type: "bi.left", + vgap: 5 + }], + listeners: [{ + eventName: BI.ButtonGroup.EVENT_CHANGE, + action: function (value, obj) { + if (BI.isEmptyArray(self.filter.getValue())) { + self.filter.element.addClass("bi-border-top bi-border-left"); + } + self.fireEvent("EVENT_OPERATION", obj.getValue()); + self.defaultState(); + } + }] + }; + case OPERATION_ADD_ANDOR_CONDITION: + return { + type: "bi.button_group", + chooseType: BI.ButtonGroup.CHOOSE_TYPE_DEFAULT, + items: self._buildOperationButton(), + layouts: [{ + type: "bi.left", + vgap: 5 + }] + }; + } + }, + + _createButtons: function () { + var buttons = []; + BI.each(this.options.selections, function (i, type) { + switch (type) { + case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA: + buttons.push({ + text: BI.i18nText("BI-Conf_Add_Formula"), + value: BI.AbstractFilterItem.FILTER_OPERATION_FORMULA, + cls: "operation-trigger filter-formula-font" + }); + break; + case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION: + buttons.push({ + text: BI.i18nText("BI-Conf_Add_Condition"), + value: BI.AbstractFilterItem.FILTER_OPERATION_CONDITION, + cls: "operation-trigger filter-condition-font" + }); + break; + } + }); + return buttons; + }, + + _buildOperationButton: function () { + var self = this, combos = []; + BI.each(this.options.selections, function (i, type) { + var text = "", cls = "", items = []; + switch (type) { + case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA: + text = BI.i18nText("BI-Conf_Add_Formula"); + cls = "filter-formula-font"; + items = BI.Constants.getConstant("bi.constant.component.filter").FORMULA_COMBO; + break; + case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION: + default: + text = BI.i18nText("BI-Conf_Add_Condition"); + cls = "filter-condition-font"; + items = BI.Constants.getConstant("bi.constant.component.filter").CONDITION_COMBO; + break; + } + + var trigger = BI.createWidget({ + type: "bi.icon_text_item", + cls: "operation-trigger " + cls, + text: text, + height: 30, + width: 100 + }); + combos.push({ + type: "bi.combo", + el: trigger, + popup: { + el: { + type: "bi.button_group", + chooseType: BI.ButtonGroup.CHOOSE_TYPE_NONE, + items: BI.createItems(items, { + type: "bi.single_select_item", + height: 25 + }), + layouts: [{ + type: "bi.vertical" + }] + } + }, + listeners: [{ + eventName: BI.Combo.EVENT_CHANGE, + action: function (value, obj) { + if (BI.isEmptyArray(self.filter.getValue())) { + self.filter.element.addClass("bi-border-top bi-border-left"); + } + + switch (value) { + case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_AND: + case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION_OR: + trigger.setText(BI.i18nText("BI-Conf_Add_Condition")); + break; + case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_AND: + case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA_OR: + trigger.setText(BI.i18nText("BI-Conf_Add_Formula")); + break; + default: + trigger.setText(); + } + self.fireEvent("EVENT_OPERATION", obj.getValue()); + self.defaultState(); + this.hideView(); + } + }] + }); + }); + return combos; + }, + + defaultState: function () { + if (BI.isNotNull(this.currentSelected)) { + this.currentSelected.setSelectedCondition(false); + } + this.buttonComboTab.setSelect(OPERATION_ADD_CONDITION); + }, + + getCurrentSelectItem: function () { + if (BI.isNotNull(this.currentSelected) && this.currentSelected.isSelectedCondition()) { + return this.currentSelected; + } + }, + + populate: function (items) { + this.filter.populate.apply(this.filter, arguments); + }, + + getValue: function () { + return this.filter.getValue(); + } + }); + BI.shortcut("bi.filter_operation", FilterOperation); +}()); diff --git a/src/widget/filter/pane/filter.pane.js b/src/widget/filter/pane/filter.pane.js new file mode 100644 index 000000000..75e737f75 --- /dev/null +++ b/src/widget/filter/pane/filter.pane.js @@ -0,0 +1,62 @@ +/** + * @class BI.FilterPane + * @extend BI.Widget + * 过滤面板 + */ +!(function () { + var FilterPane = BI.inherit(BI.Widget, { + props: { + baseCls: "bi-filter-pane", + expander: {}, + items: [], + itemsCreator: BI.emptyFn + }, + + render: function () { + var self = this, o = this.options; + return { + type: "bi.custom_tree", + cls: BI.isNotEmptyArray(o.items) ? "bi-border-top bi-border-left" : "", + expander: BI.extend({ + type: "bi.filter_expander", + el: {}, + popup: { + type: "bi.custom_tree" + } + }, o.expander), + el: { + type: "bi.filter_list", + chooseType: BI.ButtonGroup.CHOOSE_TYPE_DEFAULT, + layouts: [{ + type: "bi.vertical", + scrolly: false + }] + }, + items: o.items, + listeners: [{ + eventName: BI.Controller.EVENT_CHANGE, + action: function () { + self.fireEvent("EVENT_CHANGE", arguments); + } + }], + ref: function (_ref) { + self.tree = _ref; + } + }; + }, + + populate: function (items) { + if (BI.isNotEmptyArray(items)) { + this.element.addClass("bi-border-top bi-border-left"); + } else { + this.element.removeClass("bi-border-top bi-border-left"); + } + this.tree.populate.apply(this.tree, arguments); + }, + + getValue: function () { + return this.tree.getValue(); + } + }); + BI.shortcut("bi.filter_pane", FilterPane); +}()); \ No newline at end of file diff --git a/ui/js/index.js b/ui/js/index.js index 46d49bec3..d544428f4 100644 --- a/ui/js/index.js +++ b/ui/js/index.js @@ -147,5 +147,13 @@ BI.i18n = { "BI-Basic_Year_Quarter": "年季度", "BI-Basic_Input_Can_Not_Null": "输入框不能为空", "BI-Basic_Date_Time_Error_Text": "日期格式示例:2015-3-11 00:00:00", - "BI-Basic_Input_From_To_Number": "请输入{R1}的数值" + "BI-Basic_Input_From_To_Number": "请输入{R1}的数值", + "BI-Basic_Or": "或", + "BI-Basic_And": "且", + "BI-Conf_Add_Formula": "添加公式", + "BI-Conf_Add_Condition": "添加条件", + "BI-Conf_Formula_And": "且公式条件", + "BI-Conf_Formula_Or": "或公式条件", + "BI-Conf_Condition_And": "且条件", + "BI-Conf_Condition_Or": "或条件" }; \ No newline at end of file