224 lines
284 KiB
JavaScript
224 lines
284 KiB
JavaScript
!function(){var define=void 0;return function(t,e,i){if("undefined"==typeof Bokeh)throw new Error("Cannot find Bokeh. You have to load it prior to loading plugins.");var n=Bokeh._;for(var o in t)Bokeh.require.modules[o]=t[o];for(var s=0;s<i.length;s++){var r=Bokeh.require(i[s]);n.isObject(r.models)&&Bokeh.Models.register_locations(r.models),n.extend(Bokeh,n.omit(r,"models"))}}({"models/widgets/abstract_button":[function(t,e,i){var n,o,s,r,a,l,u=function(t,e){function i(){this.constructor=t}for(var n in e)c.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},c={}.hasOwnProperty;a=t("../../core/properties"),r=t("../../common/build_views"),s=t("./widget"),l=t("./button_template"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.events={click:"change_input"},e.prototype.template=l,e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.icon_views={},this.listenTo(this.model,"change",this.render),this.render()},e.prototype.render=function(){var t,i,n,o,s,a;if(e.__super__.render.call(this),n=this.model.icon,null!=n){r(this.icon_views,[n]),s=this.icon_views;for(o in s)c.call(s,o)&&(a=s[o],a.$el.detach())}return this.$el.empty(),i=this.template(this.model.attributes),this.$el.append(i),t=this.$el.find("button"),null!=n&&t.prepend(this.icon_views[n.id].$el),t.prop("disabled",this.model.disabled),this},e.prototype.change_input=function(){var t;return null!=(t=this.model.callback)?t.execute(this.model):void 0},e}(s.View),n=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.type="AbstractButton",e.prototype.default_view=o,e.define({callback:[a.Instance],label:[a.String,"Button"],icon:[a.Instance],button_type:[a.String,"default"]}),e}(s.Model),e.exports={Model:n,View:o}},{"../../common/build_views":"common/build_views","../../core/properties":"core/properties","./button_template":"models/widgets/button_template","./widget":"models/widgets/widget"}],"models/widgets/abstract_icon":[function(t,e,i){var n,o,s,r=function(t,e){function i(){this.constructor=t}for(var n in e)a.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},a={}.hasOwnProperty;s=t("underscore"),o=t("./widget"),n=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type="AbstractIcon",e}(o.Model),e.exports={Model:n}},{"./widget":"models/widgets/widget",underscore:"underscore"}],"models/widgets/autocomplete_input":[function(t,e,i){var n,o,s,r,a,l,u=function(t,e){function i(){this.constructor=t}for(var n in e)c.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},c={}.hasOwnProperty;a=t("underscore"),n=t("jquery-ui/autocomplete"),r=t("./text_input"),l=t("../../core/properties"),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.render=function(){var t;return e.__super__.render.call(this),t=this.$el.find("input"),t.autocomplete({source:this.mget("completions")}),t.autocomplete("widget").addClass("bk-autocomplete-input"),this},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.type="AutocompleteInput",e.prototype.default_view=s,e.define({completions:[l.Array,[]]}),e}(r.Model),e.exports={View:s,Model:o}},{"../../core/properties":"core/properties","./text_input":"models/widgets/text_input","jquery-ui/autocomplete":"jquery-ui/autocomplete",underscore:"underscore"}],"models/widgets/button":[function(t,e,i){var n,o,s,r,a,l=function(t,e){function i(){this.constructor=t}for(var n in e)u.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},u={}.hasOwnProperty;r=t("underscore"),a=t("../../core/properties"),n=t("./abstract_button"),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.change_input=function(){return this.model.clicks=this.model.clicks+1,e.__super__.change_input.call(this)},e}(n.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.type="Button",e.prototype.default_view=s,e.define({clicks:[a.Number,0]}),e}(n.Model),e.exports={Model:o,View:s}},{"../../core/properties":"core/properties","./abstract_button":"models/widgets/abstract_button",underscore:"underscore"}],"models/widgets/button_group_template":[function(t,e,i){e.exports=function(t){t||(t={});var e=[];return function(){(function(){e.push('<div class="bk-bs-btn-group" data-bk-bs-toggle="buttons">\n</div>\n')}).call(this)}.call(t),e.join("")}},{}],"models/widgets/button_template":[function(t,e,i){e.exports=function(t){t||(t={});var e=[],i=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?n(t):""},n=function(t){return(""+t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")};return function(){(function(){e.push('<button type="button" class="bk-bs-btn bk-bs-btn-'),e.push(i(this.button_type)),e.push('">\n '),e.push(i(this.label)),e.push("\n</button>\n")}).call(this)}.call(t),e.join("")}},{}],"models/widgets/cell_editors":[function(t,e,i){var n,o,s,r,a,l,u,c,h,d,p,f,m,g,v,_,b,y,w,k,C,x,D,S,M,R,I,P=function(t,e){function i(){this.constructor=t}for(var n in e)T.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},T={}.hasOwnProperty;R=t("underscore"),n=t("jquery"),o=t("jquery-ui/autocomplete"),s=t("jquery-ui/spinner"),I=t("../../core/properties"),f=t("../../model"),M=t("./widget"),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e}(f),a=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.tagName="div",e.prototype.className="bk-cell-editor",e.prototype.input=null,e.prototype.emptyValue=null,e.prototype.defaultValue=null,e.prototype.initialize=function(t){return e.__super__.initialize.call(this,{}),this.args=t,this.model=this.args.column.editor,this.render()},e.prototype.render=function(){return e.__super__.render.call(this),this.$el.appendTo(this.args.container),this.$input=n(this.input),this.$el.append(this.$input),this.renderEditor(),this.disableNavigation(),this},e.prototype.renderEditor=function(){},e.prototype.disableNavigation=function(){return this.$input.keydown(function(t){return function(t){var e;switch(e=function(){return t.stopImmediatePropagation()},t.keyCode){case n.ui.keyCode.LEFT:return e();case n.ui.keyCode.RIGHT:return e();case n.ui.keyCode.UP:return e();case n.ui.keyCode.DOWN:return e();case n.ui.keyCode.PAGE_UP:return e();case n.ui.keyCode.PAGE_DOWN:return e()}}}(this))},e.prototype.destroy=function(){return this.remove()},e.prototype.focus=function(){return this.$input.focus()},e.prototype.show=function(){},e.prototype.hide=function(){},e.prototype.position=function(){},e.prototype.getValue=function(){return this.$input.val()},e.prototype.setValue=function(t){return this.$input.val(t)},e.prototype.serializeValue=function(){return this.getValue()},e.prototype.isValueChanged=function(){return!(""===this.getValue()&&null==this.defaultValue)&&this.getValue()!==this.defaultValue},e.prototype.applyValue=function(t,e){return this.args.grid.getData().setField(t.index,this.args.column.field,e)},e.prototype.loadValue=function(t){var e;return e=t[this.args.column.field],this.defaultValue=null!=e?e:this.emptyValue,this.setValue(this.defaultValue)},e.prototype.validateValue=function(t){var e;return this.args.column.validator&&(e=this.args.column.validator(t),!e.valid)?e:{valid:!0,msg:null}},e.prototype.validate=function(){return this.validateValue(this.getValue())},e}(M.View),k=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.emptyValue="",e.prototype.input='<input type="text" />',e.prototype.renderEditor=function(){var t;return t=this.model.get("completions"),R.isEmpty(t)||(this.$input.autocomplete({source:t}),this.$input.autocomplete("widget").addClass("bk-cell-editor-completion")),this.$input.focus().select()},e.prototype.loadValue=function(t){return e.__super__.loadValue.call(this,t),this.$input[0].defaultValue=this.defaultValue,this.$input.select()},e}(a),w=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.type="StringEditor",e.prototype.default_view=k,e.define({completions:[I.Array,[]]}),e}(r),x=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e}(a),C=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.type="TextEditor",e.prototype.default_view=x,e}(r),y=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.input="<select />",e.prototype.renderEditor=function(){var t,e,i,o;for(o=this.model.get("options"),t=0,e=o.length;t<e;t++)i=o[t],this.$input.append(n("<option>").attr({value:i}).text(i));return this.focus()},e.prototype.loadValue=function(t){return e.__super__.loadValue.call(this,t),this.$input.select()},e}(a),b=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.type="SelectEditor",e.prototype.default_view=y,e.define({options:[I.Array,[]]}),e}(r),_=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e}(a),v=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.type="PercentEditor",e.prototype.default_view=_,e}(r),u=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.input='<input type="checkbox" value="true" />',e.prototype.renderEditor=function(){return this.focus()},e.prototype.loadValue=function(t){return this.defaultValue=!!t[this.args.column.field],this.$input.prop("checked",this.defaultValue)},e.prototype.serializeValue=function(){return this.$input.prop("checked")},e}(a),l=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.type="CheckboxEditor",e.prototype.default_view=u,e}(r),p=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.input='<input type="text" />',e.prototype.renderEditor=function(){return this.$input.spinner({step:this.model.get("step")}),this.$input.focus().select()},e.prototype.remove=function(){return this.$input.spinner("destroy"),e.__super__.remove.call(this)},e.prototype.serializeValue=function(){return parseInt(this.getValue(),10)||0},e.prototype.loadValue=function(t){return e.__super__.loadValue.call(this,t),this.$input[0].defaultValue=this.defaultValue,this.$input.select()},e.prototype.validateValue=function(t){return isNaN(t)?{valid:!1,msg:"Please enter a valid integer"}:e.__super__.validateValue.call(this,t)},e}(a),d=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.type="IntEditor",e.prototype.default_view=p,e.define({step:[I.Number,1]}),e}(r),g=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.input='<input type="text" />',e.prototype.renderEditor=function(){return this.$input.spinner({step:this.model.get("step")}),this.$input.focus().select()},e.prototype.remove=function(){return this.$input.spinner("destroy"),e.__super__.remove.call(this)},e.prototype.serializeValue=function(){return parseFloat(this.getValue())||0},e.prototype.loadValue=function(t){return e.__super__.loadValue.call(this,t),this.$input[0].defaultValue=this.defaultValue,this.$input.select()},e.prototype.validateValue=function(t){return isNaN(t)?{valid:!1,msg:"Please enter a valid number"}:e.__super__.validateValue.call(this,t)},e}(a),m=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.type="NumberEditor",e.prototype.default_view=g,e.define({step:[I.Number,.01]}),e}(r),S=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e}(a),D=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.type="TimeEditor",e.prototype.default_view=S,e}(r),h=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.emptyValue=new Date,e.prototype.input='<input type="text" />',e.prototype.renderEditor=function(){return this.calendarOpen=!1,this.$input.datepicker({showOn:"button",buttonImageOnly:!0,beforeShow:function(t){return function(){return t.calendarOpen=!0}}(this),onClose:function(t){return function(){return t.calendarOpen=!1}}(this)}),this.$input.siblings(".bk-ui-datepicker-trigger").css({"vertical-align":"middle"}),this.$input.width(this.$input.width()-26),this.$input.focus().select()},e.prototype.destroy=function(){return n.datepicker.dpDiv.stop(!0,!0),this.$input.datepicker("hide"),this.$input.datepicker("destroy"),e.__super__.destroy.call(this)},e.prototype.show=function(){return this.calendarOpen&&n.datepicker.dpDiv.stop(!0,!0).show(),e.__super__.show.call(this)},e.prototype.hide=function(){return this.calendarOpen&&n.datepicker.dpDiv.stop(!0,!0).hide(),e.__super__.hide.call(this)},e.prototype.position=function(t){return this.calendarOpen&&n.datepicker.dpDiv.css({top:t.top+30,left:t.left}),e.__super__.position.call(this)},e.prototype.getValue=function(){return this.$input.datepicker("getDate").getTime()},e.prototype.setValue=function(t){return this.$input.datepicker("setDate",new Date(t))},e}(a),c=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.type="DateEditor",e.prototype.default_view=h,e}(r),e.exports={String:{Model:w,View:k},Text:{Model:C,View:x},Select:{Model:b,View:y},Percent:{Model:v,View:_},Checkbox:{Model:l,View:u},Int:{Model:d,View:p},Number:{Model:m,View:g},Time:{Model:D,View:S},Date:{Model:c,View:h}}},{"../../core/properties":"core/properties","../../model":"model","./widget":"models/widgets/widget",jquery:"jquery","jquery-ui/autocomplete":"jquery-ui/autocomplete","jquery-ui/spinner":"jquery-ui/spinner",underscore:"underscore"}],"models/widgets/cell_formatters":[function(t,e,i){var n,o,s,r,a,l,u,c,h,d,p,f=function(t,e){function i(){this.constructor=t}for(var n in e)m.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},m={}.hasOwnProperty;d=t("underscore"),n=t("jquery"),c=t("numbro"),p=t("../../core/properties"),l=t("../../model"),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return f(e,t),e.prototype.doFormat=function(t,e,i,n,o){return null===i?"":(i+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")},e}(l),h=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return f(e,t),e.prototype.type="StringFormatter",e.define({font_style:[p.FontStyle,"normal"],text_align:[p.TextAlign,"left"],text_color:[p.Color]}),e.prototype.doFormat=function(t,i,o,s,r){var a,l,u,c;if(l=e.__super__.doFormat.call(this,t,i,o,s,r),a=this.get("font_style"),u=this.get("text_align"),c=this.get("text_color"),null!=a||null!=u||null!=c){switch(l=n("<span>"+l+"</span>"),a){case"bold":l=l.css("font-weight","bold");break;case"italic":l=l.css("font-style","italic")}null!=u&&(l=l.css("text-align",u)),null!=c&&(l=l.css("color",c)),l=l.prop("outerHTML")}return l},e}(s),u=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return f(e,t),e.prototype.type="NumberFormatter",e.define({format:[p.String,"0,0"],language:[p.String,"en"],rounding:[p.String,"round"]}),e.prototype.doFormat=function(t,i,n,o,s){var r,a,l;return r=this.get("format"),a=this.get("language"),l=function(){switch(this.get("rounding")){case"round":case"nearest":return Math.round;case"floor":case"rounddown":return Math.floor;case"ceil":case"roundup":return Math.ceil}}.call(this),n=c.format(n,r,a,l),e.__super__.doFormat.call(this,t,i,n,o,s)},e}(h),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return f(e,t),e.prototype.type="BooleanFormatter",e.define({icon:[p.String,"check"]}),e.prototype.doFormat=function(t,e,i,o,s){return i?n("<i>").addClass(this.get("icon")).html():""},e}(s),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return f(e,t),e.prototype.type="DateFormatter",e.define({format:[p.String,"yy M d"]}),e.prototype.getFormat=function(){var t,e;return t=this.get("format"),e=function(){switch(t){case"ATOM":case"W3C":case"RFC-3339":case"ISO-8601":return"ISO-8601";case"COOKIE":return"COOKIE";case"RFC-850":return"RFC-850";case"RFC-1036":return"RFC-1036";case"RFC-1123":return"RFC-1123";case"RFC-2822":return"RFC-2822";case"RSS":case"RFC-822":return"RFC-822";case"TICKS":return"TICKS";case"TIMESTAMP":return"TIMESTAMP";default:return null}}(),null!=e?n.datepicker[e]:t},e.prototype.doFormat=function(t,i,o,s,r){var a;return o=d.isString(o)?parseInt(o,10):o,a=n.datepicker.formatDate(this.getFormat(),new Date(o)),e.__super__.doFormat.call(this,t,i,a,s,r)},e}(s),a=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return f(e,t),e.prototype.type="HTMLTemplateFormatter",e.define({template:[p.String,"<%= value %>"]}),e.prototype.doFormat=function(t,e,i,n,o){var s,r;return r=this.get("template"),null===i?"":(o=d.extend({},o,{value:i}),(s=d.template(r))(o))},e}(s),e.exports={String:{Model:h},Number:{Model:u},Boolean:{Model:o},Date:{Model:r},HTMLTemplate:{Model:a}}},{"../../core/properties":"core/properties","../../model":"model",jquery:"jquery",numbro:"numbro/numbro",underscore:"underscore"}],"models/widgets/checkbox_button_group":[function(t,e,i){var n,o,s,r,a,l,u,c,h,d=function(t,e){function i(){this.constructor=t}for(var n in e)p.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},p={}.hasOwnProperty,f=[].indexOf||function(t){for(var e=0,i=this.length;e<i;e++)if(e in this&&this[e]===t)return e;return-1};u=t("underscore"),n=t("jquery"),o=t("bootstrap/button"),l=t("./widget"),s=t("../../core/bokeh_view"),c=t("../../core/properties"),h=t("./button_group_template"),a=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return d(e,t),e.prototype.events={"change input":"change_input"},e.prototype.template=h,e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.render(),this.listenTo(this.model,"change",this.render)},e.prototype.render=function(){var t,i,o,s,r,a,l,u,c;for(e.__super__.render.call(this),this.$el.empty(),s=this.template(),this.$el.append(s),o=this.model.active,c=this.model.labels,r=a=0,u=c.length;a<u;r=++a)l=c[r],t=n('<input type="checkbox">').attr({value:""+r}),f.call(o,r)>=0&&t.prop("checked",!0),i=n('<label class="bk-bs-btn"></label>'),i.text(l).prepend(t),i.addClass("bk-bs-btn-"+this.mget("button_type")),f.call(o,r)>=0&&i.addClass("bk-bs-active"),this.$el.find(".bk-bs-btn-group").append(i);return this},e.prototype.change_input=function(){var t,e,i,n;return t=function(){var t,n,o,s;for(o=this.$("input"),s=[],i=t=0,n=o.length;t<n;i=++t)e=o[i],e.checked&&s.push(i);return s}.call(this),this.model.active=t,null!=(n=this.mget("callback"))?n.execute(this.model):void 0},e}(l.View),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return d(e,t),e.prototype.type="CheckboxButtonGroup",e.prototype.default_view=a,e.define({active:[c.Array,[]],labels:[c.Array,[]],button_type:[c.String,"default"],callback:[c.Instance]}),e}(l.Model),e.exports={Model:r,View:a}},{"../../core/bokeh_view":"core/bokeh_view","../../core/properties":"core/properties","./button_group_template":"models/widgets/button_group_template","./widget":"models/widgets/widget","bootstrap/button":"bootstrap/button",jquery:"jquery",underscore:"underscore"}],"models/widgets/checkbox_group":[function(t,e,i){var n,o,s,r,a,l,u,c=function(t,e){function i(){this.constructor=t}for(var n in e)h.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},h={}.hasOwnProperty,d=[].indexOf||function(t){for(var e=0,i=this.length;e<i;e++)if(e in this&&this[e]===t)return e;return-1};l=t("underscore"),n=t("jquery"),a=t("./widget"),o=t("../../core/bokeh_view"),u=t("../../core/properties"),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return c(e,t),e.prototype.events={"change input":"change_input"},e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.render(),this.listenTo(this.model,"change",this.render)},e.prototype.render=function(){var t,i,o,s,r,a,l,u,c;for(e.__super__.render.call(this),this.$el.empty(),s=this.mget("active"),c=this.mget("labels"),r=a=0,u=c.length;a<u;r=++a)l=c[r],i=n('<input type="checkbox">').attr({value:""+r}),this.mget("disabled")&&i.prop("disabled",!0),d.call(s,r)>=0&&i.prop("checked",!0),o=n("<label></label>").text(l).prepend(i),this.mget("inline")?(o.addClass("bk-bs-checkbox-inline"),this.$el.append(o)):(t=n('<div class="bk-bs-checkbox"></div>').append(o),this.$el.append(t));return this},e.prototype.change_input=function(){var t,e,i,n;return t=function(){var t,n,o,s;for(o=this.$("input"),s=[],i=t=0,n=o.length;t<n;i=++t)e=o[i],e.checked&&s.push(i);return s}.call(this),this.model.active=t,null!=(n=this.mget("callback"))?n.execute(this.model):void 0},e}(a.View),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return c(e,t),e.prototype.type="CheckboxGroup",e.prototype.default_view=r,e.define({active:[u.Array,[]],labels:[u.Array,[]],inline:[u.Bool,!1],callback:[u.Instance]}),e}(a.Model),e.exports={Model:s,View:r}},{"../../core/bokeh_view":"core/bokeh_view","../../core/properties":"core/properties","./widget":"models/widgets/widget",jquery:"jquery",underscore:"underscore"}],"models/widgets/data_table":[function(t,e,i){var n,o,s,r,a,l,u,c,h,d,p,f,m,g,v=function(t,e){function i(){this.constructor=t}for(var n in e)_.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},_={}.hasOwnProperty;f=t("underscore"),n=t("jquery"),o=t("jquery-ui/sortable"),h=t("slick_grid/slick.grid"),c=t("slick_grid/plugins/slick.rowselectionmodel"),s=t("slick_grid/plugins/slick.checkboxselectcolumn"),m=t("../../common/hittest"),g=t("../../core/properties"),r=t("../../util/dom_util"),d=t("./table_widget"),p=t("./widget"),a=function(){function t(t){var e;this.source=t,this.data=this.source.get("data"),this.fields=f.keys(this.data),f.contains(this.fields,"index")||(this.data.index=function(){e=[];for(var t=0,i=this.getLength();0<=i?t<i:t>i;0<=i?t++:t--)e.push(t);return e}.apply(this),this.fields.push("index"))}return t.prototype.getLength=function(){return this.source.get_length()},t.prototype.getItem=function(t){var e,i,n,o,s;for(i={},s=this.fields,n=0,o=s.length;n<o;n++)e=s[n],i[e]=this.data[e][t];return i},t.prototype._setItem=function(t,e){var i,n;for(i in e)n=e[i],this.data[i][t]=n},t.prototype.setItem=function(t,e){return this._setItem(t,e),this.updateSource()},t.prototype.getField=function(t,e){var i;return i=this.data.index.indexOf(t),this.data[e][i]},t.prototype._setField=function(t,e,i){var n;n=this.data.index.indexOf(t),this.data[e][n]=i},t.prototype.setField=function(t,e,i){return this._setField(t,e,i),this.updateSource()},t.prototype.updateSource=function(){return this.source.trigger("change:data",this,this.source.attributes.data)},t.prototype.getItemMetadata=function(t){return null},t.prototype.getRecords=function(){var t;return function(){var e,i,n;for(n=[],t=e=0,i=this.getLength();0<=i?e<i:e>i;t=0<=i?++e:--e)n.push(this.getItem(t));return n}.call(this)},t.prototype.sort=function(t){var e,i,n,o,s,r,a;for(e=function(){var e,n,o;for(o=[],e=0,n=t.length;e<n;e++)i=t[e],o.push([i.sortCol.field,i.sortAsc?1:-1]);return o}(),f.isEmpty(e)&&(e=[["index",1]]),a=this.getRecords(),a.sort(function(t,i){var n,o,s,r,a,l,u,c;for(o=0,s=e.length;o<s;o++)if(r=e[o],n=r[0],l=r[1],u=t[n],c=i[n],a=u===c?0:u>c?l:-l,0!==a)return a;return 0}),n=o=0,s=a.length;o<s;n=++o)r=a[n],this._setItem(n,r);return this.updateSource()},t}(),u=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return v(e,t),e.prototype.attributes={"class":"bk-data-table"},e.prototype.initialize=function(t){var i;return e.__super__.initialize.call(this,t),r.waitForElement(this.el,function(t){return function(){return t.render()}}(this)),this.listenTo(this.model,"change",function(t){return function(){return t.render()}}(this)),i=this.mget("source"),this.listenTo(i,"change:data",function(t){return function(){return t.updateGrid()}}(this)),this.listenTo(i,"change:selected",function(t){return function(){return t.updateSelection()}}(this))},e.prototype.updateGrid=function(){return this.data=new a(this.mget("source")),this.grid.setData(this.data),this.grid.render()},e.prototype.updateSelection=function(){var t,e,i,n;if(n=this.mget("source").get("selected"),e=n["1d"].indices,this.grid.setSelectedRows(e),t=this.grid.getViewport(),this.mget("scroll_to_selection")&&!f.any(f.map(e,function(e){return t.top<=e&&e<=t.bottom})))return i=Math.max(0,Math.min.apply(null,e)-1),this.grid.scrollRowToTop(i)},e.prototype.newIndexColumn=function(){return{id:f.uniqueId(),name:"#",field:"index",width:40,behavior:"select",cannotTriggerInsert:!0,resizable:!1,selectable:!1,sortable:!0,cssClass:"bk-cell-index"}},e.prototype.render=function(){var t,e,i,n,o,r;return i=function(){var t,i,n,o;for(n=this.mget("columns"),o=[],t=0,i=n.length;t<i;t++)e=n[t],o.push(e.toColumn());return o}.call(this),"checkbox"===this.mget("selectable")&&(t=new s({cssClass:"bk-cell-select"}),i.unshift(t.getColumnDefinition())),this.mget("row_headers")&&null!=this.mget("source").get_column("index")&&i.unshift(this.newIndexColumn()),r=this.mget("width"),n=this.mget("height"),o={enableCellNavigation:this.mget("selectable")!==!1,enableColumnReorder:!0,forceFitColumns:this.mget("fit_columns"),autoHeight:"auto"===n,multiColumnSort:this.mget("sortable"),editable:this.mget("editable"),autoEdit:!1},null!=r?this.$el.css({width:this.mget("width")+"px"}):this.$el.css({width:this.mget("default_width")+"px"}),null!=n&&"auto"!==n&&this.$el.css({height:this.mget("height")+"px"}),this.data=new a(this.mget("source")),this.grid=new h(this.el,this.data,i,o),this.grid.onSort.subscribe(function(t){return function(e,n){return i=n.sortCols,t.data.sort(i),t.grid.invalidate(),t.grid.render()}}(this)),this.mget("selectable")!==!1&&(this.grid.setSelectionModel(new c({selectActiveRow:null==t})),null!=t&&this.grid.registerPlugin(t),this.grid.onSelectedRowsChanged.subscribe(function(t){return function(e,i){var n;return n=m.create_hit_test_result(),n["1d"].indices=i.rows,t.mget("source").set("selected",n)}}(this))),this},e}(p.View),l=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return v(e,t),e.prototype.type="DataTable",e.prototype.default_view=u,e.define({columns:[g.Array,[]],fit_columns:[g.Bool,!0],sortable:[g.Bool,!0],editable:[g.Bool,!1],selectable:[g.Bool,!0],row_headers:[g.Bool,!0],scroll_to_selection:[g.Bool,!0]}),e.override({height:400}),e.internal({default_width:[g.Number,600]}),e}(d.Model),e.exports={Model:l,View:u}},{"../../common/hittest":"common/hittest","../../core/properties":"core/properties","../../util/dom_util":"util/dom_util","./table_widget":"models/widgets/table_widget","./widget":"models/widgets/widget",jquery:"jquery","jquery-ui/sortable":"jquery-ui/sortable","slick_grid/plugins/slick.checkboxselectcolumn":"slick_grid/plugins/slick.checkboxselectcolumn","slick_grid/plugins/slick.rowselectionmodel":"slick_grid/plugins/slick.rowselectionmodel","slick_grid/slick.grid":"slick_grid/slick.grid",underscore:"underscore"}],"models/widgets/date_picker":[function(t,e,i){var n,o,s,r,a,l,u,c=function(t,e){return function(){return t.apply(e,arguments)}},h=function(t,e){function i(){this.constructor=t}for(var n in e)d.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},d={}.hasOwnProperty;l=t("underscore"),n=t("jquery"),o=t("jquery-ui/datepicker"),u=t("../../core/properties"),a=t("./input_widget"),r=function(t){function e(){return this.onSelect=c(this.onSelect,this),e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.label=n("<label>").text(this.mget("title")),this.input=n('<input type="text">'),this.datepicker=this.input.datepicker({defaultDate:new Date(this.mget("value")),minDate:null!=this.mget("min_date")?new Date(this.mget("min_date")):null,maxDate:null!=this.mget("max_date")?new Date(this.mget("max_date")):null,onSelect:this.onSelect}),this.$el.append([this.label,this.input])},e.prototype.onSelect=function(t,e){var i,n;return i=new Date(t),this.mset("value",i.toString()),null!=(n=this.mget("callback"))?n.execute(this.model):void 0},e}(a.View),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.type="DatePicker",e.prototype.default_view=r,e.define({value:[u.Any,Date.now()],min_date:[u.Any],max_date:[u.Any]}),e}(a.Model),e.exports={Model:s,View:r}},{"../../core/properties":"core/properties","./input_widget":"models/widgets/input_widget",jquery:"jquery","jquery-ui/datepicker":"jquery-ui/datepicker",underscore:"underscore"}],"models/widgets/date_range_slider":[function(t,e,i){var n,o,s,r,a,l,u,c=function(t,e){function i(){this.constructor=t}for(var n in e)h.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},h={}.hasOwnProperty;l=t("underscore"),n=t("jquery"),o=t("jqrangeslider/jQDateRangeSlider"),u=t("../../core/properties"),a=t("./input_widget"),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return c(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.render(),this.listenTo(this.model,"change",function(t){return function(){return t.render}}(this))},e.prototype.render=function(){var t,i,n,o,s,r,a,u,c;return e.__super__.render.call(this),this.$el.empty(),s=this.mget("value"),c=s[0],u=s[1],r=this.mget("range"),o=r[0],n=r[1],a=this.mget("bounds"),i=a[0],t=a[1],this.$el.dateRangeSlider({defaultValues:{min:new Date(c),max:new Date(u)},bounds:{min:new Date(i),max:new Date(t)},range:{min:!!l.isObject(o)&&o,max:!!l.isObject(n)&&n},step:this.mget("step")||{},enabled:this.mget("enabled"),arrows:this.mget("arrows"),valueLabels:this.mget("value_labels"),wheelMode:this.mget("wheel_mode")}),this.$el.on("userValuesChanged",function(t){return function(e,i){var n;return t.mset("value",[i.values.min,i.values.max]),null!=(n=t.mget("callback"))?n.execute(t.model):void 0}}(this)),this},e}(a.View),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return c(e,t),e.prototype.type="DateRangeSlider",e.prototype.default_view=r,e.define({value:[u.Any],range:[u.Any],bounds:[u.Any],step:[u.Any,{}],enabled:[u.Bool,!0],arrows:[u.Bool,!0],value_labels:[u.String,"show"],wheel_mode:[u.Any]}),e}(a.Model),e.exports={Model:s,View:r}},{"../../core/properties":"core/properties","./input_widget":"models/widgets/input_widget","jqrangeslider/jQDateRangeSlider":"jqrangeslider/jQDateRangeSlider",jquery:"jquery",underscore:"underscore"}],"models/widgets/dialog":[function(t,e,i){var n,o,s,r,a,l,u,c,h=function(t,e){return function(){return t.apply(e,arguments)}},d=function(t,e){function i(){this.constructor=t}for(var n in e)p.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},p={}.hasOwnProperty;l=t("underscore"),n=t("jquery"),o=t("bootstrap/modal"),c=t("../../core/properties"),u=t("./dialog_template"),a=t("./widget"),r=function(t){function e(){return this.change_content=h(this.change_content,this),this.change_visibility=h(this.change_visibility,this),
|
|
this.onHide=h(this.onHide,this),e.__super__.constructor.apply(this,arguments)}return d(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.render(),this.render_content(),this.render_buttons(),this.listenTo(this.model,"destroy",this.remove),this.listenTo(this.model,"change:visible",this.change_visibility),this.listenTo(this.model,"change:content",this.change_content)},e.prototype.render_content=function(){var t;return null!=this.content_view&&this.content_view.remove(),t=this.mget("content"),null!=t&&("object"==typeof t?(this.content_view=new t.default_view({model:t}),this.$el.find(".bk-dialog-content").empty(),this.$el.find(".bk-dialog-content").append(this.content_view.$el)):(this.$el.find(".bk-dialog-content").empty(),this.$el.find(".bk-dialog-content").text(t))),this},e.prototype.render_buttons=function(){var t;return null!=this.buttons_box_view&&this.buttons_box_view.remove(),t=this.mget("buttons_box"),null!=t&&(this.buttons_box_view=new t.default_view({model:t}),this.$el.find(".bk-dialog-buttons_box").empty(),this.$el.find(".bk-dialog-buttons_box").append(this.buttons_box_view.$el)),this},e.prototype.render=function(){return e.__super__.render.call(this),this.$modal=n(u(this.model.attributes)),this.$modal.modal({show:this.mget("visible")}),this.$modal.on("hidden.bk-bs.modal",this.onHide),this.$el.html(this.$modal),this},e.prototype.onHide=function(t){return this.mset("visible",!1,{silent:!0})},e.prototype.change_visibility=function(){return this.$modal.modal(this.mget("visible")?"show":"hide")},e.prototype.change_content=function(){return this.render_content()},e}(a.View),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return d(e,t),e.prototype.type="Dialog",e.prototype.default_view=r,e.define({visible:[c.Bool,!1],closable:[c.Bool,!0],title:[c.String,""],content:[c.String,""],buttons:[c.Array,[]],buttons_box:[c.Instance]}),e}(a.Model),e.exports={Model:s,View:r}},{"../../core/properties":"core/properties","./dialog_template":"models/widgets/dialog_template","./widget":"models/widgets/widget","bootstrap/modal":"bootstrap/modal",jquery:"jquery",underscore:"underscore"}],"models/widgets/dialog_template":[function(t,e,i){e.exports=function(t){t||(t={});var e=[],i=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?n(t):""},n=function(t){return(""+t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")};return function(){(function(){e.push('<div class="bk-bs-modal" tabindex="-1">\n <div class="bk-bs-modal-dialog">\n <div class="bk-bs-modal-content">\n <div class="bk-bs-modal-header">\n '),this.closable&&e.push('\n <button type="button" class="bk-bs-close" data-bk-bs-dismiss="modal">×</button>\n '),e.push('\n <h4 class="bk-bs-modal-title">'),e.push(i(this.title)),e.push('</h4>\n </div>\n <div class="bk-bs-modal-body">\n <div class="bk-dialog-content" />\n </div>\n <div class="bk-bs-modal-footer">\n <div class="bk-dialog-buttons_box" />\n </div>\n </div>\n </div>\n</div>\n')}).call(this)}.call(t),e.join("")}},{}],"models/widgets/div":[function(t,e,i){var n,o,s,r,a,l=function(t,e){function i(){this.constructor=t}for(var n in e)u.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},u={}.hasOwnProperty;n=t("jquery"),r=t("./markup"),a=t("../../core/properties"),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.render=function(){var t;return e.__super__.render.call(this),t=this.model.render_as_text===!0?n("<div></div>").text(this.model.text):n("<div></div>").html(this.model.text),this.$el.find(".bk-markup").append(t),this},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.type="Div",e.prototype.default_view=s,e.define({render_as_text:[a.Bool,!1]}),e}(r.Model),e.exports={Model:o,View:s}},{"../../core/properties":"core/properties","./markup":"models/widgets/markup",jquery:"jquery"}],"models/widgets/dropdown":[function(t,e,i){var n,o,s,r,a,l,u,c=function(t,e){function i(){this.constructor=t}for(var n in e)h.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},h={}.hasOwnProperty;a=t("underscore"),n=t("jquery"),l=t("../../core/properties"),o=t("./abstract_button"),u=t("./dropdown_template"),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return c(e,t),e.prototype.template=u,e.prototype.render=function(){var t,i,o,s,r,a,l,u,c,h;for(e.__super__.render.call(this),r=[],u=this.model.menu,o=0,l=u.length;o<l;o++)s=u[o],i=null!=s?(a=s[0],h=s[1],s,t=n("<a data-value='"+h+"'>"+a+"</a>"),c=this,t.click(function(t){return c.set_value(n(this).data("value"))}),n("<li></li>").append(t)):n('<li class="bk-bs-divider"></li>'),r.push(i);return this.$el.find(".bk-bs-dropdown-menu").append(r),this.$el.find("button").val(this.model.default_value),this},e.prototype.set_value=function(t){return this.model.value=t,this.$el.find("button").val(t)},e}(o.View),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return c(e,t),e.prototype.type="Dropdown",e.prototype.default_view=r,e.define({value:[l.String],default_value:[l.String],menu:[l.Array,[]]}),e.override({label:"Dropdown"}),e}(o.Model),e.exports={Model:s,View:r}},{"../../core/properties":"core/properties","./abstract_button":"models/widgets/abstract_button","./dropdown_template":"models/widgets/dropdown_template",jquery:"jquery",underscore:"underscore"}],"models/widgets/dropdown_template":[function(t,e,i){e.exports=function(t){t||(t={});var e=[],i=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?n(t):""},n=function(t){return(""+t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")};return function(){(function(){e.push('<button type="button" class="bk-bs-btn bk-bs-btn-'),e.push(i(this.button_type)),e.push(' bk-bs-dropdown-toggle bk-bs-dropdown-btn" data-bk-bs-toggle="dropdown">\n '),e.push(i(this.label)),e.push(' <span class="bk-bs-caret"></span>\n</button>\n<ul class="bk-bs-dropdown-menu">\n</ul>\n')}).call(this)}.call(t),e.join("")}},{}],"models/widgets/icon":[function(t,e,i){var n,o,s,r,a,l,u=function(t,e){function i(){this.constructor=t}for(var n in e)c.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},c={}.hasOwnProperty;a=t("underscore"),l=t("../../core/properties"),n=t("./abstract_icon"),r=t("./widget"),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.tagName="i",e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.render(),this.listenTo(this.model,"change",this.render)},e.prototype.render=function(){var t,e;return this.$el.empty(),this.$el.addClass("bk-fa"),this.$el.addClass("bk-fa-"+this.mget("icon_name")),e=this.mget("size"),null!=e&&this.$el.css({"font-size":e+"em"}),t=this.mget("flip"),null!=t&&this.$el.addClass("bk-fa-flip-"+t),this.mget("spin")&&this.$el.addClass("bk-fa-spin"),this},e.prototype.update_constraints=function(){return null},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.type="Icon",e.prototype.default_view=s,e.define({icon_name:[l.String,"check"],size:[l.Number],flip:[l.Any],spin:[l.Bool,!1]}),e}(n.Model),e.exports={Model:o,View:s}},{"../../core/properties":"core/properties","./abstract_icon":"models/widgets/abstract_icon","./widget":"models/widgets/widget",underscore:"underscore"}],"models/widgets/input_widget":[function(t,e,i){var n,o,s,r,a,l=function(t,e){function i(){this.constructor=t}for(var n in e)u.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},u={}.hasOwnProperty;r=t("underscore"),s=t("./widget"),a=t("../../core/properties"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.render=function(){return e.__super__.render.call(this),this.$el.find("input").prop("disabled",this.model.disabled)},e.prototype.change_input=function(){var t;return null!=(t=this.mget("callback"))?t.execute(this.model):void 0},e}(s.View),n=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.type="InputWidget",e.prototype.default_view=o,e.define({callback:[a.Instance],title:[a.String,""]}),e}(s.Model),e.exports={Model:n,View:o}},{"../../core/properties":"core/properties","./widget":"models/widgets/widget",underscore:"underscore"}],"models/widgets/main":[function(t,e,i){e.exports={models:{editors:[t("./cell_editors"),"Editor"],formatters:[t("./cell_formatters"),"Formatter"],AbstractButton:t("./abstract_button"),AbstractIcon:t("./abstract_icon"),TableWidget:t("./table_widget"),Markup:t("./markup"),Widget:t("./widget"),InputWidget:t("./input_widget"),TableColumn:t("./table_column"),DataTable:t("./data_table"),Paragraph:t("./paragraph"),Div:t("./div"),TextInput:t("./text_input"),AutocompleteInput:t("./autocomplete_input"),PreText:t("./pretext"),Select:t("./selectbox"),Slider:t("./slider"),MultiSelect:t("./multiselect"),DateRangeSlider:t("./date_range_slider"),DatePicker:t("./date_picker"),Panel:t("./panel"),Tabs:t("./tabs"),Dialog:t("./dialog"),Icon:t("./icon"),Button:t("./button"),Toggle:t("./toggle"),Dropdown:t("./dropdown"),CheckboxGroup:t("./checkbox_group"),RadioGroup:t("./radio_group"),CheckboxButtonGroup:t("./checkbox_button_group"),RadioButtonGroup:t("./radio_button_group")}}},{"./abstract_button":"models/widgets/abstract_button","./abstract_icon":"models/widgets/abstract_icon","./autocomplete_input":"models/widgets/autocomplete_input","./button":"models/widgets/button","./cell_editors":"models/widgets/cell_editors","./cell_formatters":"models/widgets/cell_formatters","./checkbox_button_group":"models/widgets/checkbox_button_group","./checkbox_group":"models/widgets/checkbox_group","./data_table":"models/widgets/data_table","./date_picker":"models/widgets/date_picker","./date_range_slider":"models/widgets/date_range_slider","./dialog":"models/widgets/dialog","./div":"models/widgets/div","./dropdown":"models/widgets/dropdown","./icon":"models/widgets/icon","./input_widget":"models/widgets/input_widget","./markup":"models/widgets/markup","./multiselect":"models/widgets/multiselect","./panel":"models/widgets/panel","./paragraph":"models/widgets/paragraph","./pretext":"models/widgets/pretext","./radio_button_group":"models/widgets/radio_button_group","./radio_group":"models/widgets/radio_group","./selectbox":"models/widgets/selectbox","./slider":"models/widgets/slider","./table_column":"models/widgets/table_column","./table_widget":"models/widgets/table_widget","./tabs":"models/widgets/tabs","./text_input":"models/widgets/text_input","./toggle":"models/widgets/toggle","./widget":"models/widgets/widget"}],"models/widgets/markup":[function(t,e,i){var n,o,s,r,a,l=function(t,e){function i(){this.constructor=t}for(var n in e)u.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},u={}.hasOwnProperty;r=t("../../core/properties"),s=t("./widget"),a=t("./markup_template"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.template=a,e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.render(),this.listenTo(this.model,"change",this.render)},e.prototype.render=function(){if(e.__super__.render.call(this),this.$el.empty(),this.$el.html(this.template()),this.mget("height")&&this.$el.height(this.mget("height")),this.mget("width"))return this.$el.width(this.mget("width"))},e}(s.View),n=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.type="Markup",e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t)},e.define({text:[r.String,""]}),e}(s.Model),e.exports={Model:n,View:o}},{"../../core/properties":"core/properties","./markup_template":"models/widgets/markup_template","./widget":"models/widgets/widget"}],"models/widgets/markup_template":[function(t,e,i){e.exports=function(t){t||(t={});var e=[];return function(){(function(){e.push('<div class="bk-markup">\n</div>\n')}).call(this)}.call(t),e.join("")}},{}],"models/widgets/multiselect":[function(t,e,i){var n,o,s,r,a,l,u,c=function(t,e){return function(){return t.apply(e,arguments)}},h=function(t,e){function i(){this.constructor=t}for(var n in e)d.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},d={}.hasOwnProperty;a=t("jquery"),n=t("underscore"),u=t("../../core/properties"),o=t("./input_widget"),l=t("./multiselecttemplate"),r=function(t){function e(){return this.render_selection=c(this.render_selection,this),e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.tagName="div",e.prototype.template=l,e.prototype.events={"change select":"change_input"},e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.render(),this.listenTo(this.model,"change:value",this.render_selection),this.listenTo(this.model,"change:options",this.render),this.listenTo(this.model,"change:name",this.render),this.listenTo(this.model,"change:title",this.render)},e.prototype.render=function(){var t;return e.__super__.render.call(this),this.$el.empty(),t=this.template(this.model.attributes),this.$el.html(t),this.render_selection(),this},e.prototype.render_selection=function(){var t;return t={},a.map(this.mget("value"),function(e){return t[e]=!0}),this.$("option").each(function(e){return function(i){if(i=e.$(i),t[i.attr("value")])return i.attr("selected","selected")}}(this))},e.prototype.change_input=function(){var t;return t=this.$el.find("select").val(),t?this.model.value=t:this.model.value=[],e.__super__.change_input.call(this)},e}(o.View),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.type="MultiSelect",e.prototype.default_view=r,e.define({value:[u.Array,[]],options:[u.Array,[]]}),e}(o.Model),e.exports={Model:s,View:r}},{"../../core/properties":"core/properties","./input_widget":"models/widgets/input_widget","./multiselecttemplate":"models/widgets/multiselecttemplate",jquery:"jquery",underscore:"underscore"}],"models/widgets/multiselecttemplate":[function(t,e,i){e.exports=function(t){t||(t={});var e=[],i=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?n(t):""},n=function(t){return(""+t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")};return function(){(function(){var t,n,o,s;for(e.push('<label for="'),e.push(i(this.id)),e.push('"> '),e.push(i(this.title)),e.push(' </label>\n<select multiple class="bk-widget-form-input" id="'),e.push(i(this.id)),e.push('" name="'),e.push(i(this.name)),e.push('">\n '),s=this.options,t=0,n=s.length;t<n;t++)o=s[t],e.push("\n "),"string"==typeof o?(e.push("\n <option "),this.value.indexOf(o)>-1&&e.push('selected="selected" '),e.push('value="'),e.push(i(o)),e.push('">'),e.push(i(o)),e.push("</option>\n ")):(e.push("\n <option "),this.value.indexOf(o[0])>-1&&e.push('selected="selected" '),e.push('value="'),e.push(i(o[0])),e.push('">'),e.push(i(o[1])),e.push("</option>\n ")),e.push("\n ");e.push("\n</select>")}).call(this)}.call(t),e.join("")}},{}],"models/widgets/panel":[function(t,e,i){var n,o,s,r,a,l,u=function(t,e){function i(){this.constructor=t}for(var n in e)c.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},c={}.hasOwnProperty;a=t("underscore"),n=t("jquery"),l=t("../../core/properties"),r=t("./widget"),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.render=function(){return e.__super__.render.call(this),this.$el.empty(),this},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.type="Panel",e.prototype.default_view=s,e.define({title:[l.String,""],child:[l.Instance],closable:[l.Bool,!1]}),e}(r.Model),e.exports={Model:o,View:s}},{"../../core/properties":"core/properties","./widget":"models/widgets/widget",jquery:"jquery",underscore:"underscore"}],"models/widgets/paragraph":[function(t,e,i){var n,o,s,r,a=function(t,e){function i(){this.constructor=t}for(var n in e)l.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},l={}.hasOwnProperty;n=t("jquery"),o=t("./markup"),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.render=function(){var t;return e.__super__.render.call(this),t=n('<p style="margin: 0;"></p>').text(this.model.text),this.$el.find(".bk-markup").append(t)},e}(o.View),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.type="Paragraph",e.prototype.default_view=r,e}(o.Model),e.exports={Model:s,View:r}},{"./markup":"models/widgets/markup",jquery:"jquery"}],"models/widgets/pretext":[function(t,e,i){var n,o,s,r,a,l=function(t,e){function i(){this.constructor=t}for(var n in e)u.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},u={}.hasOwnProperty;n=t("jquery"),o=t("./markup"),a=t("../../core/properties"),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.render=function(){var t;return e.__super__.render.call(this),t=n('<pre style="overflow: auto"></pre>').text(this.model.text),this.$el.find(".bk-markup").append(t)},e}(o.View),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.type="PreText",e.prototype.default_view=r,e}(o.Model),e.exports={Model:s,View:r}},{"../../core/properties":"core/properties","./markup":"models/widgets/markup",jquery:"jquery"}],"models/widgets/radio_button_group":[function(t,e,i){var n,o,s,r,a,l,u,c,h=function(t,e){function i(){this.constructor=t}for(var n in e)d.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},d={}.hasOwnProperty;l=t("underscore"),n=t("jquery"),o=t("bootstrap/button"),u=t("../../core/properties"),a=t("./widget"),c=t("./button_group_template"),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.events={"change input":"change_input"},e.prototype.template=c,e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.render(),this.listenTo(this.model,"change",this.render)},e.prototype.render=function(){var t,i,o,s,r,a,u,c,h,d;for(e.__super__.render.call(this),this.$el.empty(),s=this.template(),this.$el.append(s),h=l.uniqueId("RadioButtonGroup"),o=this.mget("active"),d=this.mget("labels"),r=a=0,c=d.length;a<c;r=++a)u=d[r],t=n('<input type="radio">').attr({name:h,value:""+r}),r===o&&t.prop("checked",!0),i=n('<label class="bk-bs-btn"></label>'),i.text(u).prepend(t),i.addClass("bk-bs-btn-"+this.mget("button_type")),r===o&&i.addClass("bk-bs-active"),this.$el.find(".bk-bs-btn-group").append(i);return this},e.prototype.change_input=function(){var t,e,i,n;return t=function(){var t,n,o,s;for(o=this.$("input"),s=[],e=t=0,n=o.length;t<n;e=++t)i=o[e],i.checked&&s.push(e);return s}.call(this),this.model.active=t[0],null!=(n=this.mget("callback"))?n.execute(this.model):void 0},e}(a.View),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.type="RadioButtonGroup",e.prototype.default_view=r,e.define({active:[u.Any,null],labels:[u.Array,[]],button_type:[u.String,"default"],callback:[u.Instance]}),e}(a.Model),e.exports={Model:s,View:r}},{"../../core/properties":"core/properties","./button_group_template":"models/widgets/button_group_template","./widget":"models/widgets/widget","bootstrap/button":"bootstrap/button",jquery:"jquery",underscore:"underscore"}],"models/widgets/radio_group":[function(t,e,i){var n,o,s,r,a,l,u=function(t,e){function i(){this.constructor=t}for(var n in e)c.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},c={}.hasOwnProperty;a=t("underscore"),n=t("jquery"),l=t("../../core/properties"),r=t("./widget"),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.tagName="div",e.prototype.events={"change input":"change_input"},e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.render(),this.listenTo(this.model,"change",this.render)},e.prototype.render=function(){var t,i,o,s,r,l,u,c,h,d;for(e.__super__.render.call(this),this.$el.empty(),h=a.uniqueId("RadioGroup"),s=this.mget("active"),d=this.mget("labels"),r=l=0,c=d.length;l<c;r=++l)u=d[r],i=n('<input type="radio">').attr({name:h,value:""+r}),this.mget("disabled")&&i.prop("disabled",!0),r===s&&i.prop("checked",!0),o=n("<label></label>").text(u).prepend(i),this.mget("inline")?(o.addClass("bk-bs-radio-inline"),this.$el.append(o)):(t=n('<div class="bk-bs-radio"></div>').append(o),this.$el.append(t));return this},e.prototype.change_input=function(){var t,e,i,n;return t=function(){var t,n,o,s;for(o=this.$("input"),s=[],e=t=0,n=o.length;t<n;e=++t)i=o[e],i.checked&&s.push(e);return s}.call(this),this.model.active=t[0],null!=(n=this.mget("callback"))?n.execute(this.model):void 0},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.type="RadioGroup",e.prototype.default_view=s,e.define({active:[l.Any,null],labels:[l.Array,[]],inline:[l.Bool,!1],callback:[l.Instance]}),e}(r.Model),e.exports={Model:o,View:s}},{"../../core/properties":"core/properties","./widget":"models/widgets/widget",jquery:"jquery",underscore:"underscore"}],"models/widgets/selectbox":[function(t,e,i){var n,o,s,r,a,l,u,c=function(t,e){function i(){this.constructor=t}for(var n in e)h.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},h={}.hasOwnProperty;r=t("underscore"),a=t("../../core/logging").logger,l=t("../../core/properties"),n=t("./input_widget"),u=t("./selecttemplate"),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return c(e,t),e.prototype.template=u,e.prototype.events={"change select":"change_input"},e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.render(),this.listenTo(this.model,"change",this.render)},e.prototype.render=function(){var t;return e.__super__.render.call(this),this.$el.empty(),t=this.template(this.model.attributes),this.$el.html(t),this},e.prototype.change_input=function(){var t;return t=this.$("select").val(),a.debug("selectbox: value = "+t),this.model.value=t,e.__super__.change_input.call(this)},e}(n.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return c(e,t),e.prototype.type="Select",e.prototype.default_view=s,e.define({value:[l.String,""],options:[l.Any,[]]}),e}(n.Model),e.exports={Model:o,View:s}},{"../../core/logging":"core/logging","../../core/properties":"core/properties","./input_widget":"models/widgets/input_widget","./selecttemplate":"models/widgets/selecttemplate",underscore:"underscore"}],"models/widgets/selecttemplate":[function(t,e,i){e.exports=function(t){t||(t={});var e=[],i=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?n(t):""},n=function(t){return(""+t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")};return function(){(function(){var t,n,o,s;for(e.push('<label for="'),e.push(i(this.id)),e.push('"> '),e.push(i(this.title)),e.push(' </label>\n<select class="bk-widget-form-input" id="'),e.push(i(this.id)),e.push('" name="'),e.push(i(this.name)),e.push('">\n '),s=this.options,t=0,n=s.length;t<n;t++)o=s[t],e.push("\n "),"string"==typeof o?(e.push("\n <option "),e.push(i(o===this.value?e.push('selected="selected"'):void 0)),e.push(' value="'),e.push(i(o)),e.push('">'),e.push(i(o)),e.push("</option>\n ")):(e.push("\n <option "),e.push(i(o[0]===this.value?e.push('selected="selected"'):void 0)),e.push(' value="'),e.push(i(o[0])),e.push('">'),e.push(i(o[1])),e.push("</option>\n ")),e.push("\n ");e.push("\n</select>\n")}).call(this)}.call(t),e.join("")}},{}],"models/widgets/slider":[function(t,e,i){var n,o,s,r,a,l,u,c,h,d=function(t,e){return function(){return t.apply(e,arguments)}},p=function(t,e){function i(){this.constructor=t}for(var n in e)f.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},f={}.hasOwnProperty;l=t("underscore"),n=t("jquery-ui/slider"),u=t("../../core/logging").logger,c=t("../../core/properties"),o=t("./input_widget"),a=t("./widget"),h=t("./slidertemplate"),r=function(t){function e(){return this.slide=d(this.slide,this),this.slidestop=d(this.slidestop,this),e.__super__.constructor.apply(this,arguments)}return p(e,t),e.prototype.tagName="div",e.prototype.template=h,e.prototype.initialize=function(t){var i;return e.__super__.initialize.call(this,t),this.listenTo(this.model,"change",this.render),this.$el.empty(),i=this.template(this.model.attributes),this.$el.html(i),this.callbackWrapper=null,"continuous"===this.mget("callback_policy")&&(this.callbackWrapper=function(){var t;return null!=(t=this.mget("callback"))?t.execute(this.model):void 0}),"throttle"===this.mget("callback_policy")&&this.mget("callback")&&(this.callbackWrapper=l.throttle(function(){var t;return null!=(t=this.mget("callback"))?t.execute(this.model):void 0},this.mget("callback_throttle"))),this.render()},e.prototype.render=function(){var t,i,n,o;return e.__super__.render.call(this),t=this.mget("end"),i=this.mget("start"),o=this.mget("step")||(t-i)/50,u.debug("slider render: min, max, step = ("+i+", "+t+", "+o+")"),n={orientation:this.mget("orientation"),animate:"fast",value:this.mget("value"),min:i,max:t,step:o,stop:this.slidestop,slide:this.slide},this.$el.find(".slider").slider(n),this.$("#"+this.mget("id")).val(this.$(".slider").slider("value")),this.$el.find(".bk-slider-parent").height(this.mget("height")),this},e.prototype.slidestop=function(t,e){var i;if("mouseup"===this.mget("callback_policy")||"throttle"===this.mget("callback_policy"))return null!=(i=this.mget("callback"))?i.execute(this.model):void 0},e.prototype.slide=function(t,e){var i;if(i=e.value,u.debug("slide value = "+i),this.$("#"+this.mget("id")).val(e.value),this.mset("value",i),this.callbackWrapper)return this.callbackWrapper()},e}(o.View),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return p(e,t),e.prototype.type="Slider",e.prototype.default_view=r,e.define({value:[c.Number,.5],start:[c.Number,0],end:[c.Number,1],step:[c.Number,.1],orientation:[c.Orientation,"horizontal"],callback_throttle:[c.Number,200],callback_policy:[c.String,"throttle"]}),e}(o.Model),e.exports={Model:s,View:r}},{"../../core/logging":"core/logging","../../core/properties":"core/properties","./input_widget":"models/widgets/input_widget","./slidertemplate":"models/widgets/slidertemplate","./widget":"models/widgets/widget","jquery-ui/slider":"jquery-ui/slider",underscore:"underscore"}],"models/widgets/slidertemplate":[function(t,e,i){e.exports=function(t){t||(t={});var e=[],i=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?n(t):""},n=function(t){return(""+t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")};return function(){(function(){e.push('<div class="bk-slider-parent">\n <label for="'),e.push(i(this.id)),e.push('"> '),e.push(i(this.title)),e.push(': </label><input type="text" id="'),e.push(i(this.id)),e.push('" readonly>\n <div class="bk-slider-'),e.push(i(this.orientation)),e.push('">\n <div class="slider " id="'),e.push(i(this.id)),e.push('">\n </div>\n </div>\n</div>\n')}).call(this)}.call(t),e.join("")}},{}],"models/widgets/table_column":[function(t,e,i){var n,o,s,r,a,l,u=function(t,e){function i(){this.constructor=t}for(var n in e)c.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},c={}.hasOwnProperty;a=t("underscore"),n=t("./cell_editors"),o=t("./cell_formatters"),l=t("../../core/properties"),s=t("../../model"),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.type="TableColumn",e.prototype.default_view=null,e.define({field:[l.String],title:[l.String],width:[l.Number,300],formatter:[l.Instance,function(){return new o.String.Model}],editor:[l.Instance,function(){return new n.String.Model}],sortable:[l.Bool,!0],default_sort:[l.String,"ascending"]}),e.prototype.toColumn=function(){var t;return{id:a.uniqueId(),field:this.get("field"),name:this.get("title"),width:this.get("width"),formatter:null!=(t=this.get("formatter"))?t.doFormat.bind(this.get("formatter")):void 0,editor:this.get("editor"),sortable:this.get("sortable"),defaultSortAsc:"ascending"===this.get("default_sort")}},e}(s),e.exports={Model:r}},{"../../core/properties":"core/properties","../../model":"model","./cell_editors":"models/widgets/cell_editors","./cell_formatters":"models/widgets/cell_formatters",underscore:"underscore"}],"models/widgets/table_widget":[function(t,e,i){var n,o,s,r,a=function(t,e){function i(){this.constructor=t}for(var n in e)l.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},l={}.hasOwnProperty;s=t("underscore"),o=t("./widget"),r=t("../../core/properties"),n=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.type="TableWidget",e.define({source:[r.Instance]}),e}(o.Model),e.exports={Model:n}},{"../../core/properties":"core/properties","./widget":"models/widgets/widget",underscore:"underscore"}],"models/widgets/tabs":[function(t,e,i){var n,o,s,r,a,l,u,c,h=function(t,e){function i(){this.constructor=t}for(var n in e)d.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},d={}.hasOwnProperty;l=t("underscore"),n=t("jquery"),o=t("bootstrap/tab"),u=t("../../core/properties"),c=t("./tabs_template"),a=t("./widget"),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.render=function(){var t,i,o,s,r,a,u,h,p,f,m,g,v,_,b;e.__super__.render.call(this),f=this.child_views;for(u in f)d.call(f,u)&&(b=f[u],b.$el.detach());for(this.$el.empty(),v=this.mget("tabs"),i=this.mget("active"),s=this.mget("children"),r=n(c({tabs:v,active:function(t){return t===i?"bk-bs-active":""}})),_=this,r.find("> li > a").click(function(t){var e,i,o;return t.preventDefault(),n(this).tab("show"),e=n(this).attr("href").replace("#tab-",""),v=_.model.get("tabs"),i=l.indexOf(v,l.find(v,function(t){return t.id===e})),_.model.set("active",i),null!=(o=_.model.get("callback"))?o.execute(_.model):void 0}),t=r.children(".bk-bs-tab-pane"),m=l.zip(s,t),a=0,h=m.length;a<h;a++)g=m[a],o=g[0],p=g[1],n(p).html(this.child_views[o.id].$el);return this.$el.append(r),this.$el.tabs,this},e}(a.View),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.type="Tabs",e.prototype.default_view=r,e.prototype.initialize=function(t){var i;return e.__super__.initialize.call(this,t),this.children=function(){var t,e,n,o;for(n=this.tabs,o=[],t=0,e=n.length;t<e;t++)i=n[t],o.push(i.get("child"));return o}.call(this)},e.define({tabs:[u.Array,[]],active:[u.Number,0],callback:[u.Instance]}),e.internal({children:[u.Array,[]]}),e.prototype.get_layoutable_children=function(){return this.get("children")},e.prototype.get_edit_variables=function(){var t,i,n,o,s;for(i=e.__super__.get_edit_variables.call(this),s=this.get_layoutable_children(),n=0,o=s.length;n<o;n++)t=s[n],i=i.concat(t.get_edit_variables());return i},e.prototype.get_constraints=function(){
|
|
var t,i,n,o,s;for(i=e.__super__.get_constraints.call(this),s=this.get_layoutable_children(),n=0,o=s.length;n<o;n++)t=s[n],i=i.concat(t.get_constraints());return i},e}(a.Model),e.exports={Model:s,View:r}},{"../../core/properties":"core/properties","./tabs_template":"models/widgets/tabs_template","./widget":"models/widgets/widget","bootstrap/tab":"bootstrap/tab",jquery:"jquery",underscore:"underscore"}],"models/widgets/tabs_template":[function(t,e,i){e.exports=function(t){t||(t={});var e=[],i=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?n(t):""},n=function(t){return(""+t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")};return function(){(function(){var t,n,o,s,r,a,l,u;for(e.push('<ul class="bk-bs-nav bk-bs-nav-tabs">\n '),a=this.tabs,t=n=0,s=a.length;n<s;t=++n)u=a[t],e.push('\n <li class="'),e.push(i(this.active(t))),e.push('">\n <a href="#tab-'),e.push(i(u.get("id"))),e.push('">'),e.push(i(u.get("title"))),e.push("</a>\n </li>\n ");for(e.push('\n</ul>\n<div class="bk-bs-tab-content">\n '),l=this.tabs,t=o=0,r=l.length;o<r;t=++o)u=l[t],e.push('\n <div class="bk-bs-tab-pane '),e.push(i(this.active(t))),e.push('" id="tab-'),e.push(i(u.get("id"))),e.push('"></div>\n ');e.push("\n</div>\n")}).call(this)}.call(t),e.join("")}},{}],"models/widgets/text_input":[function(t,e,i){var n,o,s,r,a,l,u,c,h=function(t,e){function i(){this.constructor=t}for(var n in e)d.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},d={}.hasOwnProperty;r=t("underscore"),a=t("../../common/build_views"),l=t("../../core/logging").logger,u=t("../../core/properties"),n=t("./input_widget"),c=t("./text_input_template"),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.tagName="div",e.prototype.attributes={"class":"bk-widget-form-group"},e.prototype.template=c,e.prototype.events={"change input":"change_input"},e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.render(),this.listenTo(this.model,"change",this.render)},e.prototype.render=function(){return e.__super__.render.call(this),this.$el.html(this.template(this.model.attributes)),this.model.height&&this.$el.find("input").height(this.mget("height")-35),this},e.prototype.change_input=function(){var t;return t=this.$("input").val(),l.debug("widget/text_input: value = "+t),this.model.value=t,e.__super__.change_input.call(this)},e}(n.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.type="TextInput",e.prototype.default_view=s,e.define({value:[u.String,""]}),e}(n.Model),e.exports={Model:o,View:s}},{"../../common/build_views":"common/build_views","../../core/logging":"core/logging","../../core/properties":"core/properties","./input_widget":"models/widgets/input_widget","./text_input_template":"models/widgets/text_input_template",underscore:"underscore"}],"models/widgets/text_input_template":[function(t,e,i){e.exports=function(t){t||(t={});var e=[],i=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?n(t):""},n=function(t){return(""+t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")};return function(){(function(){e.push('<label for="'),e.push(i(this.id)),e.push('"> '),e.push(i(this.title)),e.push(' </label>\n<input class="bk-widget-form-input" type="text" id="'),e.push(i(this.id)),e.push('" name="'),e.push(i(this.name)),e.push('" value="'),e.push(i(this.value)),e.push('"/>\n')}).call(this)}.call(t),e.join("")}},{}],"models/widgets/toggle":[function(t,e,i){var n,o,s,r,a=function(t,e){function i(){this.constructor=t}for(var n in e)l.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},l={}.hasOwnProperty;r=t("../../core/properties"),n=t("./abstract_button"),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.render=function(){return e.__super__.render.call(this),this.mget("active")?this.$el.find("button").addClass("bk-bs-active"):this.$el.find("button").removeClass("bk-bs-active"),this},e.prototype.change_input=function(){return e.__super__.change_input.call(this),this.mset("active",!this.mget("active"))},e}(n.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.type="Toggle",e.prototype.default_view=s,e.define({active:[r.Bool,!1]}),e.override({label:"Toggle"}),e}(n.Model),e.exports={Model:o,View:s}},{"../../core/properties":"core/properties","./abstract_button":"models/widgets/abstract_button"}],"models/widgets/widget":[function(t,e,i){var n,o,s,r=function(t,e){function i(){this.constructor=t}for(var n in e)a.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},a={}.hasOwnProperty;n=t("../layouts/layout_dom"),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.className="bk-widget",e.prototype.render=function(){if(this.model.height&&this.$el.height(this.model.height),this.model.width)return this.$el.width(this.model.width)},e}(n.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type="Widget",e.prototype.default_view=s,e}(n.Model),e.exports={Model:o,View:s}},{"../layouts/layout_dom":"models/layouts/layout_dom"}],"util/dom_util":[function(t,e,i){var n,o,s;o=t("underscore"),n=t("jquery"),s=function(t,e){var i,o;return i=function(i){return function(){if(n.contains(document.documentElement,t))return clearInterval(o),e()}}(this),o=setInterval(i,50)},e.exports={waitForElement:s}},{jquery:"jquery",underscore:"underscore"}],"jquery-ui/autocomplete":[function(t,e,i){var n=t("jquery");t("./core"),t("./widget"),t("./position"),t("./menu"),/*!
|
|
* jQuery UI Autocomplete 1.10.4
|
|
* http://jqueryui.com
|
|
*
|
|
* Copyright 2014 jQuery Foundation and other contributors
|
|
* Released under the MIT license.
|
|
* http://jquery.org/license
|
|
*
|
|
* http://api.jqueryui.com/autocomplete/
|
|
*
|
|
* Depends:
|
|
* jquery.ui.core.js
|
|
* jquery.ui.widget.js
|
|
* jquery.ui.position.js
|
|
* jquery.ui.menu.js
|
|
*/
|
|
function(t,e){t.widget("ui.autocomplete",{version:"1.10.4",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,i,n,o=this.element[0].nodeName.toLowerCase(),s="textarea"===o,r="input"===o;this.isMultiLine=!!s||!r&&this.element.prop("isContentEditable"),this.valueMethod=this.element[s||r?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(o){if(this.element.prop("readOnly"))return e=!0,n=!0,void(i=!0);e=!1,n=!1,i=!1;var s=t.ui.keyCode;switch(o.keyCode){case s.PAGE_UP:e=!0,this._move("previousPage",o);break;case s.PAGE_DOWN:e=!0,this._move("nextPage",o);break;case s.UP:e=!0,this._keyEvent("previous",o);break;case s.DOWN:e=!0,this._keyEvent("next",o);break;case s.ENTER:case s.NUMPAD_ENTER:this.menu.active&&(e=!0,o.preventDefault(),this.menu.select(o));break;case s.TAB:this.menu.active&&this.menu.select(o);break;case s.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(o),o.preventDefault());break;default:i=!0,this._searchTimeout(o)}},keypress:function(n){if(e)return e=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||n.preventDefault());if(!i){var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:this._move("previousPage",n);break;case o.PAGE_DOWN:this._move("nextPage",n);break;case o.UP:this._keyEvent("previous",n);break;case o.DOWN:this._keyEvent("next",n)}}},input:function(t){return n?(n=!1,void t.preventDefault()):void this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(t),void this._change(t))}}),this._initSource(),this.menu=t("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];t(e.target).closest(".ui-menu-item").length||this._delay(function(){var e=this;this.document.one("mousedown",function(n){n.target===e.element[0]||n.target===i||t.contains(i,n.target)||e.close()})})},menufocus:function(e,i){if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)});var n=i.item.data("ui-autocomplete-item");!1!==this._trigger("focus",e,{item:n})?e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(n.value):this.liveRegion.text(n.value)},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=t("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,n=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,n){n(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,o){n.xhr&&n.xhr.abort(),n.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){o(t)},error:function(){o([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):void 0},_search:function(t){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return t.proxy(function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({label:e.label||e.value,value:e.value||e.label},e)})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var n=this;t.each(i,function(t,i){n._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<a>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this._value(this.term),void this.menu.blur()):void this.menu[t](e):void this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var n=new RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return n.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var e;this._superApply(arguments),this.options.disabled||this.cancelSearch||(e=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.text(e))}})}(n)},{"./core":"jquery-ui/core","./menu":"jquery-ui/menu","./position":"jquery-ui/position","./widget":"jquery-ui/widget",jquery:"jquery"}],"jquery-ui/button":[function(t,e,i){var n=t("jquery");t("./core"),t("./widget"),/*!
|
|
* jQuery UI Button 1.10.4
|
|
* http://jqueryui.com
|
|
*
|
|
* Copyright 2014 jQuery Foundation and other contributors
|
|
* Released under the MIT license.
|
|
* http://jquery.org/license
|
|
*
|
|
* http://api.jqueryui.com/button/
|
|
*
|
|
* Depends:
|
|
* jquery.ui.core.js
|
|
* jquery.ui.widget.js
|
|
*/
|
|
function(t,e){var i,n="ui-button ui-widget ui-state-default ui-corner-all",o="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",s=function(){var e=t(this);setTimeout(function(){e.find(":ui-button").button("refresh")},1)},r=function(e){var i=e.name,n=e.form,o=t([]);return i&&(i=i.replace(/'/g,"\\'"),o=n?t(n).find("[name='"+i+"']"):t("[name='"+i+"']",e.ownerDocument).filter(function(){return!this.form})),o};t.widget("ui.button",{version:"1.10.4",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,s),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var e=this,o=this.options,a="checkbox"===this.type||"radio"===this.type,l=a?"":"ui-state-active";null===o.label&&(o.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(n).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){o.disabled||this===i&&t(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){o.disabled||t(this).removeClass(l)}).bind("click"+this.eventNamespace,function(t){o.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),a&&this.element.bind("change"+this.eventNamespace,function(){e.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(o.disabled)return!1}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(o.disabled)return!1;t(this).addClass("ui-state-active"),e.buttonElement.attr("aria-pressed","true");var i=e.element[0];r(i).not(i).map(function(){return t(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return!o.disabled&&(t(this).addClass("ui-state-active"),i=this,void e.document.one("mouseup",function(){i=null}))}).bind("mouseup"+this.eventNamespace,function(){return!o.disabled&&void t(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(e){return!o.disabled&&void(e.keyCode!==t.ui.keyCode.SPACE&&e.keyCode!==t.ui.keyCode.ENTER||t(this).addClass("ui-state-active"))}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){t(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(e){e.keyCode===t.ui.keyCode.SPACE&&t(this).click()})),this._setOption("disabled",o.disabled),this._resetButton()},_determineButtonType:function(){var t,e,i;this.element.is("[type=checkbox]")?this.type="checkbox":this.element.is("[type=radio]")?this.type="radio":this.element.is("input")?this.type="input":this.type="button","checkbox"===this.type||"radio"===this.type?(t=this.element.parents().last(),e="label[for='"+this.element.attr("id")+"']",this.buttonElement=t.find(e),this.buttonElement.length||(t=t.length?t.siblings():this.element.siblings(),this.buttonElement=t.filter(e),this.buttonElement.length||(this.buttonElement=t.find(e))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(n+" ui-state-active "+o).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(t,e){return this._super(t,e),"disabled"===t?(this.element.prop("disabled",!!e),void(e&&this.buttonElement.removeClass("ui-state-focus"))):void this._resetButton()},refresh:function(){var e=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");e!==this.options.disabled&&this._setOption("disabled",e),"radio"===this.type?r(this.element[0]).each(function(){t(this).is(":checked")?t(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):t(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return void(this.options.label&&this.element.val(this.options.label));var e=this.buttonElement.removeClass(o),i=t("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),n=this.options.icons,s=n.primary&&n.secondary,r=[];n.primary||n.secondary?(this.options.text&&r.push("ui-button-text-icon"+(s?"s":n.primary?"-primary":"-secondary")),n.primary&&e.prepend("<span class='ui-button-icon-primary ui-icon "+n.primary+"'></span>"),n.secondary&&e.append("<span class='ui-button-icon-secondary ui-icon "+n.secondary+"'></span>"),this.options.text||(r.push(s?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||e.attr("title",t.trim(i)))):r.push("ui-button-text-only"),e.addClass(r.join(" "))}}),t.widget("ui.buttonset",{version:"1.10.4",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(t,e){"disabled"===t&&this.buttons.button("option",t,e),this._super(t,e)},refresh:function(){var e="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(e?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(e?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})}(n)},{"./core":"jquery-ui/core","./widget":"jquery-ui/widget",jquery:"jquery"}],"jquery-ui/core":[function(t,e,i){var n=t("jquery");/*!
|
|
* jQuery UI Core 1.10.4
|
|
* http://jqueryui.com
|
|
*
|
|
* Copyright 2014 jQuery Foundation and other contributors
|
|
* Released under the MIT license.
|
|
* http://jquery.org/license
|
|
*
|
|
* http://api.jqueryui.com/category/ui-core/
|
|
*/
|
|
!function(t,e){function i(e,i){var o,s,r,a=e.nodeName.toLowerCase();return"area"===a?(o=e.parentNode,s=o.name,!(!e.href||!s||"map"!==o.nodeName.toLowerCase())&&(r=t("img[usemap=#"+s+"]")[0],!!r&&n(r))):(/input|select|textarea|button|object/.test(a)?!e.disabled:"a"===a?e.href||i:i)&&n(e)}function n(e){return t.expr.filters.visible(e)&&!t(e).parents().addBack().filter(function(){return"hidden"===t.css(this,"visibility")}).length}var o=0,s=/^ui-id-\d+$/;t.ui=t.ui||{},t.extend(t.ui,{version:"1.10.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({focus:function(e){return function(i,n){return"number"==typeof i?this.each(function(){var e=this;setTimeout(function(){t(e).focus(),n&&n.call(e)},i)}):e.apply(this,arguments)}}(t.fn.focus),scrollParent:function(){var e;return e=t.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(t.css(this,"position"))&&/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!e.length?t(document):e},zIndex:function(i){if(i!==e)return this.css("zIndex",i);if(this.length)for(var n,o,s=t(this[0]);s.length&&s[0]!==document;){if(n=s.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(o=parseInt(s.css("zIndex"),10),!isNaN(o)&&0!==o))return o;s=s.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++o)})},removeUniqueId:function(){return this.each(function(){s.test(this.id)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,n){return!!t.data(e,n[3])},focusable:function(e){return i(e,!isNaN(t.attr(e,"tabindex")))},tabbable:function(e){var n=t.attr(e,"tabindex"),o=isNaN(n);return(o||n>=0)&&i(e,!o)}}),t("<a>").outerWidth(1).jquery||t.each(["Width","Height"],function(i,n){function o(e,i,n,o){return t.each(s,function(){i-=parseFloat(t.css(e,"padding"+this))||0,n&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var s="Width"===n?["Left","Right"]:["Top","Bottom"],r=n.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+n]=function(i){return i===e?a["inner"+n].call(this):this.each(function(){t(this).css(r,o(this,i)+"px")})},t.fn["outer"+n]=function(e,i){return"number"!=typeof e?a["outer"+n].call(this,e):this.each(function(){t(this).css(r,o(this,e,!0,i)+"px")})}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=function(e){return function(i){return arguments.length?e.call(this,t.camelCase(i)):e.call(this)}}(t.fn.removeData)),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),t.support.selectstart="onselectstart"in document.createElement("div"),t.fn.extend({disableSelection:function(){return this.bind((t.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(t){t.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),t.extend(t.ui,{plugin:{add:function(e,i,n){var o,s=t.ui[e].prototype;for(o in n)s.plugins[o]=s.plugins[o]||[],s.plugins[o].push([i,n[o]])},call:function(t,e,i){var n,o=t.plugins[e];if(o&&t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType)for(n=0;n<o.length;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var n=i&&"left"===i?"scrollLeft":"scrollTop",o=!1;return e[n]>0||(e[n]=1,o=e[n]>0,e[n]=0,o)}})}(n)},{jquery:"jquery"}],"jquery-ui/datepicker":[function(t,e,i){var n=t("jquery");t("./core"),/*!
|
|
* jQuery UI Datepicker 1.10.4
|
|
* http://jqueryui.com
|
|
*
|
|
* Copyright 2014 jQuery Foundation and other contributors
|
|
* Released under the MIT license.
|
|
* http://jquery.org/license
|
|
*
|
|
* http://api.jqueryui.com/datepicker/
|
|
*
|
|
* Depends:
|
|
* jquery.ui.core.js
|
|
*/
|
|
function(t,e){function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.dpDiv=n(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function n(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(i,"mouseout",function(){t(this).removeClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!==-1&&t(this).removeClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!==-1&&t(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",function(){t.datepicker._isDisabledDatepicker(s.inline?e.parent()[0]:s.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!==-1&&t(this).addClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!==-1&&t(this).addClass("ui-datepicker-next-hover"))})}function o(e,i){t.extend(e,i);for(var n in i)null==i[n]&&(e[n]=i[n]);return e}t.extend(t.ui,{datepicker:{version:"1.10.4"}});var s,r="datepicker";t.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return o(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var n,o,s;n=e.nodeName.toLowerCase(),o="div"===n||"span"===n,e.id||(this.uuid+=1,e.id="dp"+this.uuid),s=this._newInst(t(e),o),s.settings=t.extend({},i||{}),"input"===n?this._connectDatepicker(e,s):o&&this._inlineDatepicker(e,s)},_newInst:function(e,i){var o=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:o,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?n(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var n=t(e);i.append=t([]),i.trigger=t([]),n.hasClass(this.markerClassName)||(this._attachments(n,i),n.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),t.data(e,r,i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var n,o,s,r=this._get(i,"appendText"),a=this._get(i,"isRTL");i.append&&i.append.remove(),r&&(i.append=t("<span class='"+this._appendClass+"'>"+r+"</span>"),e[a?"before":"after"](i.append)),e.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),n=this._get(i,"showOn"),"focus"!==n&&"both"!==n||e.focus(this._showDatepicker),"button"!==n&&"both"!==n||(o=this._get(i,"buttonText"),s=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:s,alt:o,title:o}):t("<button type='button'></button>").addClass(this._triggerClass).html(s?t("<img/>").attr({src:s,alt:o,title:o}):o)),e[a?"before":"after"](i.trigger),i.trigger.click(function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,n,o,s=new Date(2009,11,20),r=this._get(t,"dateFormat");r.match(/[DM]/)&&(e=function(t){for(i=0,n=0,o=0;o<t.length;o++)t[o].length>i&&(i=t[o].length,n=o);return n},s.setMonth(e(this._get(t,r.match(/MM/)?"monthNames":"monthNamesShort"))),s.setDate(e(this._get(t,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-s.getDay())),t.input.attr("size",this._formatDate(t,s).length)}},_inlineDatepicker:function(e,i){var n=t(e);n.hasClass(this.markerClassName)||(n.addClass(this.markerClassName).append(i.dpDiv),t.data(e,r,i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,n,s,a){var l,u,c,h,d,p=this._dialogInst;return p||(this.uuid+=1,l="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+l+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),t("body").append(this._dialogInput),p=this._dialogInst=this._newInst(this._dialogInput,!1),p.settings={},t.data(this._dialogInput[0],r,p)),o(p.settings,s||{}),i=i&&i.constructor===Date?this._formatDate(p,i):i,this._dialogInput.val(i),this._pos=a?a.length?a:[a.pageX,a.pageY]:null,this._pos||(u=document.documentElement.clientWidth,c=document.documentElement.clientHeight,h=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[u/2-100+h,c/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),p.settings.onSelect=n,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],r,p),this},_destroyDatepicker:function(e){var i,n=t(e),o=t.data(e,r);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,r),"input"===i?(o.append.remove(),o.trigger.remove(),n.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):"div"!==i&&"span"!==i||n.removeClass(this.markerClassName).empty())},_enableDatepicker:function(e){var i,n,o=t(e),s=t.data(e,r);o.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,s.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==i&&"span"!==i||(n=o.children("."+this._inlineClass),n.children().removeClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,n,o=t(e),s=t.data(e,r);o.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,s.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==i&&"span"!==i||(n=o.children("."+this._inlineClass),n.children().addClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;e<this._disabledInputs.length;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,r)}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(i,n,s){var r,a,l,u,c=this._getInst(i);return 2===arguments.length&&"string"==typeof n?"defaults"===n?t.extend({},t.datepicker._defaults):c?"all"===n?t.extend({},c.settings):this._get(c,n):null:(r=n||{},"string"==typeof n&&(r={},r[n]=s),void(c&&(this._curInst===c&&this._hideDatepicker(),a=this._getDateDatepicker(i,!0),l=this._getMinMaxDate(c,"min"),u=this._getMinMaxDate(c,"max"),o(c.settings,r),null!==l&&r.dateFormat!==e&&r.minDate===e&&(c.settings.minDate=this._formatDate(c,l)),null!==u&&r.dateFormat!==e&&r.maxDate===e&&(c.settings.maxDate=this._formatDate(c,u)),"disabled"in r&&(r.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(t(i),c),this._autoSize(c),this._setDate(c,a),this._updateAlternate(c),this._updateDatepicker(c))))},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,n,o,s=t.datepicker._getInst(e.target),r=!0,a=s.dpDiv.is(".ui-datepicker-rtl");if(s._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),r=!1;break;case 13:return o=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",s.dpDiv),o[0]&&t.datepicker._selectDay(e.target,s.selectedMonth,s.selectedYear,o[0]),i=t.datepicker._get(s,"onSelect"),i?(n=t.datepicker._formatDate(s),i.apply(s.input?s.input[0]:null,[n,s])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(s,"stepBigMonths"):-t.datepicker._get(s,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(s,"stepBigMonths"):+t.datepicker._get(s,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),r=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),r=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,a?1:-1,"D"),r=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(s,"stepBigMonths"):-t.datepicker._get(s,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),r=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,a?-1:1,"D"),r=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(s,"stepBigMonths"):+t.datepicker._get(s,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),r=e.ctrlKey||e.metaKey;break;default:r=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):r=!1;r&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var i,n,o=t.datepicker._getInst(e.target);if(t.datepicker._get(o,"constrainInput"))return i=t.datepicker._possibleChars(t.datepicker._get(o,"dateFormat")),n=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||n<" "||!i||i.indexOf(n)>-1},_doKeyUp:function(e){var i,n=t.datepicker._getInst(e.target);if(n.input.val()!==n.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(n,"dateFormat"),n.input?n.input.val():null,t.datepicker._getFormatConfig(n)),i&&(t.datepicker._setDateFromField(n),t.datepicker._updateAlternate(n),t.datepicker._updateDatepicker(n))}catch(o){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var i,n,s,r,a,l,u;i=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==i&&(t.datepicker._curInst.dpDiv.stop(!0,!0),i&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),n=t.datepicker._get(i,"beforeShow"),s=n?n.apply(e,[e,i]):{},s!==!1&&(o(i.settings,s),i.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(i),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),r=!1,t(e).parents().each(function(){return r|="fixed"===t(this).css("position"),!r}),a={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(i),a=t.datepicker._checkOffset(i,a,r),i.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":r?"fixed":"absolute",display:"none",left:a.left+"px",top:a.top+"px"}),i.inline||(l=t.datepicker._get(i,"showAnim"),u=t.datepicker._get(i,"duration"),i.dpDiv.zIndex(t(e).zIndex()+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[l]?i.dpDiv.show(l,t.datepicker._get(i,"showOptions"),u):i.dpDiv[l||"show"](l?u:null),t.datepicker._shouldFocusInput(i)&&i.input.focus(),t.datepicker._curInst=i))}},_updateDatepicker:function(e){this.maxRows=4,s=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e),e.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,n=this._getNumberOfMonths(e),o=n[1],r=17;e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),o>1&&e.dpDiv.addClass("ui-datepicker-multi-"+o).css("width",r*o+"em"),e.dpDiv[(1!==n[0]||1!==n[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.focus(),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,n){var o=e.dpDiv.outerWidth(),s=e.dpDiv.outerHeight(),r=e.input?e.input.outerWidth():0,a=e.input?e.input.outerHeight():0,l=document.documentElement.clientWidth+(n?0:t(document).scrollLeft()),u=document.documentElement.clientHeight+(n?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?o-r:0,i.left-=n&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=n&&i.top===e.input.offset().top+a?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+o>l&&l>o?Math.abs(i.left+o-l):0),i.top-=Math.min(i.top,i.top+s>u&&u>s?Math.abs(s+a):0),i},_findPos:function(e){for(var i,n=this._getInst(e),o=this._get(n,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[o?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,n,o,s,a=this._curInst;!a||e&&a!==t.data(e,r)||this._datepickerShowing&&(i=this._get(a,"showAnim"),n=this._get(a,"duration"),o=function(){t.datepicker._tidyDialog(a)},t.effects&&(t.effects.effect[i]||t.effects[i])?a.dpDiv.hide(i,t.datepicker._get(a,"showOptions"),n,o):a.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?n:null,o),i||o(),this._datepickerShowing=!1,s=this._get(a,"onClose"),s&&s.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),n=t.datepicker._getInst(i[0]);(i[0].id===t.datepicker._mainDivId||0!==i.parents("#"+t.datepicker._mainDivId).length||i.hasClass(t.datepicker.markerClassName)||i.closest("."+t.datepicker._triggerClass).length||!t.datepicker._datepickerShowing||t.datepicker._inDialog&&t.blockUI)&&(!i.hasClass(t.datepicker.markerClassName)||t.datepicker._curInst===n)||t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,n){var o=t(e),s=this._getInst(o[0]);this._isDisabledDatepicker(o[0])||(this._adjustInstDate(s,i+("M"===n?this._get(s,"showCurrentAtPos"):0),n),this._updateDatepicker(s))},_gotoToday:function(e){var i,n=t(e),o=this._getInst(n[0]);this._get(o,"gotoCurrent")&&o.currentDay?(o.selectedDay=o.currentDay,o.drawMonth=o.selectedMonth=o.currentMonth,o.drawYear=o.selectedYear=o.currentYear):(i=new Date,o.selectedDay=i.getDate(),o.drawMonth=o.selectedMonth=i.getMonth(),o.drawYear=o.selectedYear=i.getFullYear()),this._notifyChange(o),this._adjustDate(n)},_selectMonthYear:function(e,i,n){var o=t(e),s=this._getInst(o[0]);s["selected"+("M"===n?"Month":"Year")]=s["draw"+("M"===n?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(s),this._adjustDate(o)},_selectDay:function(e,i,n,o){var s,r=t(e);t(o).hasClass(this._unselectableClass)||this._isDisabledDatepicker(r[0])||(s=this._getInst(r[0]),s.selectedDay=s.currentDay=t("a",o).html(),s.selectedMonth=s.currentMonth=i,s.selectedYear=s.currentYear=n,this._selectDate(e,this._formatDate(s,s.currentDay,s.currentMonth,s.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var n,o=t(e),s=this._getInst(o[0]);i=null!=i?i:this._formatDate(s),s.input&&s.input.val(i),this._updateAlternate(s),n=this._get(s,"onSelect"),n?n.apply(s.input?s.input[0]:null,[i,s]):s.input&&s.input.trigger("change"),s.inline?this._updateDatepicker(s):(this._hideDatepicker(),this._lastInput=s.input[0],"object"!=typeof s.input[0]&&s.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var i,n,o,s=this._get(e,"altField");s&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),n=this._getDate(e),o=this.formatDate(i,n,this._getFormatConfig(e)),t(s).each(function(){t(this).val(o)}))},noWeekends:function(t){var e=t.getDay();return[e>0&&e<6,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,n){if(null==e||null==i)throw"Invalid arguments";if(i="object"==typeof i?i.toString():i+"",""===i)return null;var o,s,r,a,l=0,u=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof u?u:(new Date).getFullYear()%100+parseInt(u,10),h=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,d=(n?n.dayNames:null)||this._defaults.dayNames,p=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,f=(n?n.monthNames:null)||this._defaults.monthNames,m=-1,g=-1,v=-1,_=-1,b=!1,y=function(t){var i=o+1<e.length&&e.charAt(o+1)===t;return i&&o++,i},w=function(t){var e=y(t),n="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,o=new RegExp("^\\d{1,"+n+"}"),s=i.substring(l).match(o);if(!s)throw"Missing number at position "+l;return l+=s[0].length,parseInt(s[0],10)},k=function(e,n,o){var s=-1,r=t.map(y(e)?o:n,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(r,function(t,e){var n=e[1];if(i.substr(l,n.length).toLowerCase()===n.toLowerCase())return s=e[0],l+=n.length,!1}),s!==-1)return s+1;throw"Unknown name at position "+l},C=function(){if(i.charAt(l)!==e.charAt(o))throw"Unexpected literal at position "+l;l++};for(o=0;o<e.length;o++)if(b)"'"!==e.charAt(o)||y("'")?C():b=!1;else switch(e.charAt(o)){case"d":v=w("d");break;case"D":k("D",h,d);break;case"o":_=w("o");break;case"m":g=w("m");break;case"M":g=k("M",p,f);break;case"y":m=w("y");break;case"@":a=new Date(w("@")),m=a.getFullYear(),g=a.getMonth()+1,v=a.getDate();break;case"!":a=new Date((w("!")-this._ticksTo1970)/1e4),m=a.getFullYear(),g=a.getMonth()+1,v=a.getDate();break;case"'":y("'")?C():b=!0;break;default:C()}if(l<i.length&&(r=i.substr(l),!/^\s+/.test(r)))throw"Extra/unparsed characters found in date: "+r;if(m===-1?m=(new Date).getFullYear():m<100&&(m+=(new Date).getFullYear()-(new Date).getFullYear()%100+(m<=c?0:-100)),_>-1)for(g=1,v=_;;){if(s=this._getDaysInMonth(m,g-1),v<=s)break;g++,v-=s}if(a=this._daylightSavingAdjust(new Date(m,g-1,v)),a.getFullYear()!==m||a.getMonth()+1!==g||a.getDate()!==v)throw"Invalid date";return a},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(t,e,i){if(!e)return"";var n,o=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,s=(i?i.dayNames:null)||this._defaults.dayNames,r=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,a=(i?i.monthNames:null)||this._defaults.monthNames,l=function(e){var i=n+1<t.length&&t.charAt(n+1)===e;return i&&n++,i},u=function(t,e,i){var n=""+e;if(l(t))for(;n.length<i;)n="0"+n;return n},c=function(t,e,i,n){return l(t)?n[e]:i[e]},h="",d=!1;if(e)for(n=0;n<t.length;n++)if(d)"'"!==t.charAt(n)||l("'")?h+=t.charAt(n):d=!1;else switch(t.charAt(n)){case"d":h+=u("d",e.getDate(),2);break;case"D":h+=c("D",e.getDay(),o,s);break;case"o":h+=u("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":h+=u("m",e.getMonth()+1,2);break;case"M":h+=c("M",e.getMonth(),r,a);break;case"y":h+=l("y")?e.getFullYear():(e.getYear()%100<10?"0":"")+e.getYear()%100;break;case"@":h+=e.getTime();break;case"!":h+=1e4*e.getTime()+this._ticksTo1970;break;case"'":l("'")?h+="'":d=!0;break;default:h+=t.charAt(n)}return h},_possibleChars:function(t){var e,i="",n=!1,o=function(i){var n=e+1<t.length&&t.charAt(e+1)===i;return n&&e++,n};for(e=0;e<t.length;e++)if(n)"'"!==t.charAt(e)||o("'")?i+=t.charAt(e):n=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":o("'")?i+="'":n=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,i){return t.settings[i]!==e?t.settings[i]:this._defaults[i]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),n=t.lastVal=t.input?t.input.val():null,o=this._getDefaultDate(t),s=o,r=this._getFormatConfig(t);try{s=this.parseDate(i,n,r)||o}catch(a){n=e?"":n}t.selectedDay=s.getDate(),t.drawMonth=t.selectedMonth=s.getMonth(),t.drawYear=t.selectedYear=s.getFullYear(),t.currentDay=n?s.getDate():0,t.currentMonth=n?s.getMonth():0,t.currentYear=n?s.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,n){var o=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},s=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(n){}for(var o=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,s=o.getFullYear(),r=o.getMonth(),a=o.getDate(),l=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,u=l.exec(i);u;){switch(u[2]||"d"){case"d":case"D":a+=parseInt(u[1],10);break;case"w":case"W":a+=7*parseInt(u[1],10);break;case"m":case"M":r+=parseInt(u[1],10),a=Math.min(a,t.datepicker._getDaysInMonth(s,r));break;case"y":case"Y":s+=parseInt(u[1],10),a=Math.min(a,t.datepicker._getDaysInMonth(s,r))}u=l.exec(i)}return new Date(s,r,a)},r=null==i||""===i?n:"string"==typeof i?s(i):"number"==typeof i?isNaN(i)?n:o(i):new Date(i.getTime());return r=r&&"Invalid Date"===r.toString()?n:r,r&&(r.setHours(0),r.setMinutes(0),r.setSeconds(0),r.setMilliseconds(0)),this._daylightSavingAdjust(r)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var n=!e,o=t.selectedMonth,s=t.selectedYear,r=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=r.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=r.getMonth(),t.drawYear=t.selectedYear=t.currentYear=r.getFullYear(),o===t.selectedMonth&&s===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(n?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),n="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(n,-i,"M")},next:function(){t.datepicker._adjustDate(n,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(n)},selectDay:function(){return t.datepicker._selectDay(n,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(n,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(n,this,"Y"),!1}};t(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,n,o,s,r,a,l,u,c,h,d,p,f,m,g,v,_,b,y,w,k,C,x,D,S,M,R,I,P,T,E,A,$,N,H,L,F,j,W=new Date,O=this._daylightSavingAdjust(new Date(W.getFullYear(),W.getMonth(),W.getDate())),V=this._get(t,"isRTL"),q=this._get(t,"showButtonPanel"),z=this._get(t,"hideIfNoPrevNext"),B=this._get(t,"navigationAsDateFormat"),Y=this._getNumberOfMonths(t),K=this._get(t,"showCurrentAtPos"),U=this._get(t,"stepMonths"),X=1!==Y[0]||1!==Y[1],G=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),Q=this._getMinMaxDate(t,"min"),J=this._getMinMaxDate(t,"max"),Z=t.drawMonth-K,tt=t.drawYear;if(Z<0&&(Z+=12,tt--),J)for(e=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-Y[0]*Y[1]+1,J.getDate())),e=Q&&e<Q?Q:e;this._daylightSavingAdjust(new Date(tt,Z,1))>e;)Z--,Z<0&&(Z=11,tt--);for(t.drawMonth=Z,t.drawYear=tt,i=this._get(t,"prevText"),i=B?this.formatDate(i,this._daylightSavingAdjust(new Date(tt,Z-U,1)),this._getFormatConfig(t)):i,n=this._canAdjustMonth(t,-1,tt,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(V?"e":"w")+"'>"+i+"</span></a>":z?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(V?"e":"w")+"'>"+i+"</span></a>",o=this._get(t,"nextText"),o=B?this.formatDate(o,this._daylightSavingAdjust(new Date(tt,Z+U,1)),this._getFormatConfig(t)):o,s=this._canAdjustMonth(t,1,tt,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+o+"'><span class='ui-icon ui-icon-circle-triangle-"+(V?"w":"e")+"'>"+o+"</span></a>":z?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+o+"'><span class='ui-icon ui-icon-circle-triangle-"+(V?"w":"e")+"'>"+o+"</span></a>",r=this._get(t,"currentText"),a=this._get(t,"gotoCurrent")&&t.currentDay?G:O,r=B?this.formatDate(r,a,this._getFormatConfig(t)):r,l=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",u=q?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(V?l:"")+(this._isInRange(t,a)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+r+"</button>":"")+(V?"":l)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,h=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),m=this._get(t,"monthNamesShort"),g=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),_=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",k=0;k<Y[0];k++){for(C="",this.maxRows=4,x=0;x<Y[1];x++){if(D=this._daylightSavingAdjust(new Date(tt,Z,t.selectedDay)),S=" ui-corner-all",M="",X){if(M+="<div class='ui-datepicker-group",Y[1]>1)switch(x){case 0:M+=" ui-datepicker-group-first",S=" ui-corner-"+(V?"right":"left");break;case Y[1]-1:M+=" ui-datepicker-group-last",S=" ui-corner-"+(V?"left":"right");break;default:M+=" ui-datepicker-group-middle",S=""}M+="'>"}for(M+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+S+"'>"+(/all|left/.test(S)&&0===k?V?s:n:"")+(/all|right/.test(S)&&0===k?V?n:s:"")+this._generateMonthYearHeader(t,Z,tt,Q,J,k>0||x>0,f,m)+"</div><table class='ui-datepicker-calendar'><thead><tr>",R=h?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;w<7;w++)I=(w+c)%7,R+="<th"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+d[I]+"'>"+p[I]+"</span></th>";for(M+=R+"</tr></thead><tbody>",P=this._getDaysInMonth(tt,Z),tt===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,P)),T=(this._getFirstDayOfMonth(tt,Z)-c+7)%7,E=Math.ceil((T+P)/7),A=X&&this.maxRows>E?this.maxRows:E,this.maxRows=A,$=this._daylightSavingAdjust(new Date(tt,Z,1-T)),N=0;N<A;N++){for(M+="<tr>",H=h?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")($)+"</td>":"",w=0;w<7;w++)L=g?g.apply(t.input?t.input[0]:null,[$]):[!0,""],F=$.getMonth()!==Z,j=F&&!_||!L[0]||Q&&$<Q||J&&$>J,H+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+($.getTime()===D.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===$.getTime()&&b.getTime()===D.getTime()?" "+this._dayOverClass:"")+(j?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!v?"":" "+L[1]+($.getTime()===G.getTime()?" "+this._currentClass:"")+($.getTime()===O.getTime()?" ui-datepicker-today":""))+"'"+(F&&!v||!L[2]?"":" title='"+L[2].replace(/'/g,"'")+"'")+(j?"":" data-handler='selectDay' data-event='click' data-month='"+$.getMonth()+"' data-year='"+$.getFullYear()+"'")+">"+(F&&!v?" ":j?"<span class='ui-state-default'>"+$.getDate()+"</span>":"<a class='ui-state-default"+($.getTime()===O.getTime()?" ui-state-highlight":"")+($.getTime()===G.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+$.getDate()+"</a>")+"</td>",$.setDate($.getDate()+1),$=this._daylightSavingAdjust($);M+=H+"</tr>"}Z++,Z>11&&(Z=0,tt++),M+="</tbody></table>"+(X?"</div>"+(Y[0]>0&&x===Y[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),C+=M}y+=C}return y+=u,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,n,o,s,r,a){var l,u,c,h,d,p,f,m,g=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),_=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(s||!g)y+="<span class='ui-datepicker-month'>"+r[e]+"</span>";else{for(l=n&&n.getFullYear()===i,u=o&&o.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;c<12;c++)(!l||c>=n.getMonth())&&(!u||c<=o.getMonth())&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+a[c]+"</option>");y+="</select>"}if(_||(b+=y+(!s&&g&&v?"":" ")),!t.yearshtml)if(t.yearshtml="",s||!v)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(h=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);
|
|
return isNaN(e)?d:e},f=p(h[0]),m=Math.max(f,p(h[1]||"")),f=n?Math.max(f,n.getFullYear()):f,m=o?Math.min(m,o.getFullYear()):m,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";f<=m;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),_&&(b+=(!s&&g&&v?"":" ")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var n=t.drawYear+("Y"===i?e:0),o=t.drawMonth+("M"===i?e:0),s=Math.min(t.selectedDay,this._getDaysInMonth(n,o))+("D"===i?e:0),r=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(n,o,s)));t.selectedDay=r.getDate(),t.drawMonth=t.selectedMonth=r.getMonth(),t.drawYear=t.selectedYear=r.getFullYear(),"M"!==i&&"Y"!==i||this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),n=this._getMinMaxDate(t,"max"),o=i&&e<i?i:e;return n&&o>n?n:o},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,n){var o=this._getNumberOfMonths(t),s=this._daylightSavingAdjust(new Date(i,n+(e<0?e:o[0]*o[1]),1));return e<0&&s.setDate(this._getDaysInMonth(s.getFullYear(),s.getMonth())),this._isInRange(t,s)},_isInRange:function(t,e){var i,n,o=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),r=null,a=null,l=this._get(t,"yearRange");return l&&(i=l.split(":"),n=(new Date).getFullYear(),r=parseInt(i[0],10),a=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(r+=n),i[1].match(/[+\-].*/)&&(a+=n)),(!o||e.getTime()>=o.getTime())&&(!s||e.getTime()<=s.getTime())&&(!r||e.getFullYear()>=r)&&(!a||e.getFullYear()<=a)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,n){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var o=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(n,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),o,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).mousedown(t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new i,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.10.4"}(n)},{"./core":"jquery-ui/core",jquery:"jquery"}],"jquery-ui/menu":[function(t,e,i){var n=t("jquery");t("./core"),t("./widget"),t("./position"),/*!
|
|
* jQuery UI Menu 1.10.4
|
|
* http://jqueryui.com
|
|
*
|
|
* Copyright 2014 jQuery Foundation and other contributors
|
|
* Released under the MIT license.
|
|
* http://jquery.org/license
|
|
*
|
|
* http://api.jqueryui.com/menu/
|
|
*
|
|
* Depends:
|
|
* jquery.ui.core.js
|
|
* jquery.ui.widget.js
|
|
* jquery.ui.position.js
|
|
*/
|
|
function(t,e){t.widget("ui.menu",{version:"1.10.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,t.proxy(function(t){this.options.disabled&&t.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(t){t.preventDefault()},"click .ui-state-disabled > a":function(t){t.preventDefault()},"click .ui-menu-item:has(a)":function(e){var i=t(e.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&t(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){var i=t(e.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(e,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.children(".ui-menu-item").eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){t(e.target).closest(".ui-menu").length||this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){function i(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var n,o,s,r,a,l=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:l=!1,o=this.previousFilter||"",s=String.fromCharCode(e.keyCode),r=!1,clearTimeout(this.filterTimer),s===o?r=!0:s=o+s,a=new RegExp("^"+i(s),"i"),n=this.activeMenu.children(".ui-menu-item").filter(function(){return a.test(t(this).children("a").text())}),n=r&&n.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):n,n.length||(s=String.fromCharCode(e.keyCode),a=new RegExp("^"+i(s),"i"),n=this.activeMenu.children(".ui-menu-item").filter(function(){return a.test(t(this).children("a").text())})),n.length?(this.focus(e,n),n.length>1?(this.previousFilter=s,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}l&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i=this.options.icons.submenu,n=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),n.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),n=e.prev("a"),o=t("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);n.attr("aria-haspopup","true").prepend(o),e.attr("aria-labelledby",n.attr("id"))}),e=n.add(this.element),e.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),e.children(":not(.ui-menu-item)").each(function(){var e=t(this);/[^\-\u2014\u2013\s]/.test(e.text())||e.addClass("ui-widget-content ui-menu-divider")}),e.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),this._super(t,e)},focus:function(t,e){var i,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),n=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",n.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,n,o,s,r,a;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,n=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,o=e.offset().top-this.activeMenu.offset().top-i-n,s=this.activeMenu.scrollTop(),r=this.activeMenu.height(),a=e.height(),o<0?this.activeMenu.scrollTop(s+o):o+a>r&&this.activeMenu.scrollTop(s+o-r+a))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var n=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));n.length||(n=this.element),this._close(n),this.blur(e),this.activeMenu=n},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var n;this.active&&(n="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),n&&n.length&&this.active||(n=this.activeMenu.children(".ui-menu-item")[e]()),this.focus(i,n)},nextPage:function(e){var i,n,o;return this.active?void(this.isLastItem()||(this._hasScroll()?(n=this.active.offset().top,o=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-n-o<0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]()))):void this.next(e)},previousPage:function(e){var i,n,o;return this.active?void(this.isFirstItem()||(this._hasScroll()?(n=this.active.offset().top,o=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-n+o>0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item").first()))):void this.next(e)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)}})}(n)},{"./core":"jquery-ui/core","./position":"jquery-ui/position","./widget":"jquery-ui/widget",jquery:"jquery"}],"jquery-ui/mouse":[function(t,e,i){var n=t("jquery");t("./widget"),/*!
|
|
* jQuery UI Mouse 1.10.4
|
|
* http://jqueryui.com
|
|
*
|
|
* Copyright 2014 jQuery Foundation and other contributors
|
|
* Released under the MIT license.
|
|
* http://jquery.org/license
|
|
*
|
|
* http://api.jqueryui.com/mouse/
|
|
*
|
|
* Depends:
|
|
* jquery.ui.widget.js
|
|
*/
|
|
function(t,e){var i=!1;t(document).mouseup(function(){i=!1}),t.widget("ui.mouse",{version:"1.10.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(i){if(!0===t.data(i.target,e.widgetName+".preventClickEvent"))return t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!i){this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var n=this,o=1===e.which,s=!("string"!=typeof this.options.cancel||!e.target.nodeName)&&t(e.target).closest(this.options.cancel).length;return!(o&&!s&&this._mouseCapture(e))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){n.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return n._mouseMove(t)},this._mouseUpDelegate=function(t){return n._mouseUp(t)},t(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),i=!0,!0))}},_mouseMove:function(e){return t.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button?this._mouseUp(e):this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(n)},{"./widget":"jquery-ui/widget",jquery:"jquery"}],"jquery-ui/position":[function(t,e,i){var n=t("jquery");/*!
|
|
* jQuery UI Position 1.10.4
|
|
* http://jqueryui.com
|
|
*
|
|
* Copyright 2014 jQuery Foundation and other contributors
|
|
* Released under the MIT license.
|
|
* http://jquery.org/license
|
|
*
|
|
* http://api.jqueryui.com/position/
|
|
*/
|
|
!function(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function n(e,i){return parseInt(t.css(e,i),10)||0}function o(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var s,r=Math.max,a=Math.abs,l=Math.round,u=/left|center|right/,c=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(s!==e)return s;var i,n,o=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),r=o.children()[0];return t("body").append(o),i=r.offsetWidth,o.css("overflow","scroll"),n=r.offsetWidth,i===n&&(n=o[0].clientWidth),o.remove(),s=i-n},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),n=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),o="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,s="scroll"===n||"auto"===n&&e.height<e.element[0].scrollHeight;return{width:s?t.position.scrollbarWidth():0,height:o?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),n=t.isWindow(i[0]),o=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:n,isDocument:o,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:n?i.width():i.outerWidth(),height:n?i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return f.apply(this,arguments);e=t.extend({},e);var s,p,m,g,v,_,b=t(e.of),y=t.position.getWithinInfo(e.within),w=t.position.getScrollInfo(y),k=(e.collision||"flip").split(" "),C={};return _=o(b),b[0].preventDefault&&(e.at="left top"),p=_.width,m=_.height,g=_.offset,v=t.extend({},g),t.each(["my","at"],function(){var t,i,n=(e[this]||"").split(" ");1===n.length&&(n=u.test(n[0])?n.concat(["center"]):c.test(n[0])?["center"].concat(n):["center","center"]),n[0]=u.test(n[0])?n[0]:"center",n[1]=c.test(n[1])?n[1]:"center",t=h.exec(n[0]),i=h.exec(n[1]),C[this]=[t?t[0]:0,i?i[0]:0],e[this]=[d.exec(n[0])[0],d.exec(n[1])[0]]}),1===k.length&&(k[1]=k[0]),"right"===e.at[0]?v.left+=p:"center"===e.at[0]&&(v.left+=p/2),"bottom"===e.at[1]?v.top+=m:"center"===e.at[1]&&(v.top+=m/2),s=i(C.at,p,m),v.left+=s[0],v.top+=s[1],this.each(function(){var o,u,c=t(this),h=c.outerWidth(),d=c.outerHeight(),f=n(this,"marginLeft"),_=n(this,"marginTop"),x=h+f+n(this,"marginRight")+w.width,D=d+_+n(this,"marginBottom")+w.height,S=t.extend({},v),M=i(C.my,c.outerWidth(),c.outerHeight());"right"===e.my[0]?S.left-=h:"center"===e.my[0]&&(S.left-=h/2),"bottom"===e.my[1]?S.top-=d:"center"===e.my[1]&&(S.top-=d/2),S.left+=M[0],S.top+=M[1],t.support.offsetFractions||(S.left=l(S.left),S.top=l(S.top)),o={marginLeft:f,marginTop:_},t.each(["left","top"],function(i,n){t.ui.position[k[i]]&&t.ui.position[k[i]][n](S,{targetWidth:p,targetHeight:m,elemWidth:h,elemHeight:d,collisionPosition:o,collisionWidth:x,collisionHeight:D,offset:[s[0]+M[0],s[1]+M[1]],my:e.my,at:e.at,within:y,elem:c})}),e.using&&(u=function(t){var i=g.left-S.left,n=i+p-h,o=g.top-S.top,s=o+m-d,l={target:{element:b,left:g.left,top:g.top,width:p,height:m},element:{element:c,left:S.left,top:S.top,width:h,height:d},horizontal:n<0?"left":i>0?"right":"center",vertical:s<0?"top":o>0?"bottom":"middle"};p<h&&a(i+n)<p&&(l.horizontal="center"),m<d&&a(o+s)<m&&(l.vertical="middle"),r(a(i),a(n))>r(a(o),a(s))?l.important="horizontal":l.important="vertical",e.using.call(this,t,l)}),c.offset(t.extend(S,{using:u}))})},t.ui.position={fit:{left:function(t,e){var i,n=e.within,o=n.isWindow?n.scrollLeft:n.offset.left,s=n.width,a=t.left-e.collisionPosition.marginLeft,l=o-a,u=a+e.collisionWidth-s-o;e.collisionWidth>s?l>0&&u<=0?(i=t.left+l+e.collisionWidth-s-o,t.left+=l-i):u>0&&l<=0?t.left=o:l>u?t.left=o+s-e.collisionWidth:t.left=o:l>0?t.left+=l:u>0?t.left-=u:t.left=r(t.left-a,t.left)},top:function(t,e){var i,n=e.within,o=n.isWindow?n.scrollTop:n.offset.top,s=e.within.height,a=t.top-e.collisionPosition.marginTop,l=o-a,u=a+e.collisionHeight-s-o;e.collisionHeight>s?l>0&&u<=0?(i=t.top+l+e.collisionHeight-s-o,t.top+=l-i):u>0&&l<=0?t.top=o:l>u?t.top=o+s-e.collisionHeight:t.top=o:l>0?t.top+=l:u>0?t.top-=u:t.top=r(t.top-a,t.top)}},flip:{left:function(t,e){var i,n,o=e.within,s=o.offset.left+o.scrollLeft,r=o.width,l=o.isWindow?o.scrollLeft:o.offset.left,u=t.left-e.collisionPosition.marginLeft,c=u-l,h=u+e.collisionWidth-r-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];c<0?(i=t.left+d+p+f+e.collisionWidth-r-s,(i<0||i<a(c))&&(t.left+=d+p+f)):h>0&&(n=t.left-e.collisionPosition.marginLeft+d+p+f-l,(n>0||a(n)<h)&&(t.left+=d+p+f))},top:function(t,e){var i,n,o=e.within,s=o.offset.top+o.scrollTop,r=o.height,l=o.isWindow?o.scrollTop:o.offset.top,u=t.top-e.collisionPosition.marginTop,c=u-l,h=u+e.collisionHeight-r-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,m=-2*e.offset[1];c<0?(n=t.top+p+f+m+e.collisionHeight-r-s,t.top+p+f+m>c&&(n<0||n<a(c))&&(t.top+=p+f+m)):h>0&&(i=t.top-e.collisionPosition.marginTop+p+f+m-l,t.top+p+f+m>h&&(i>0||a(i)<h)&&(t.top+=p+f+m))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,n,o,s,r=document.getElementsByTagName("body")[0],a=document.createElement("div");e=document.createElement(r?"div":"body"),n={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},r&&t.extend(n,{position:"absolute",left:"-1000px",top:"-1000px"});for(s in n)e.style[s]=n[s];e.appendChild(a),i=r||document.documentElement,i.insertBefore(e,i.firstChild),a.style.cssText="position: absolute; left: 10.7432222px;",o=t(a).offset().left,t.support.offsetFractions=o>10&&o<11,e.innerHTML="",i.removeChild(e)}()}(n)},{jquery:"jquery"}],"jquery-ui/slider":[function(t,e,i){var n=t("jquery");t("./core"),t("./mouse"),t("./widget"),/*!
|
|
* jQuery UI Slider 1.10.4
|
|
* http://jqueryui.com
|
|
*
|
|
* Copyright 2014 jQuery Foundation and other contributors
|
|
* Released under the MIT license.
|
|
* http://jquery.org/license
|
|
*
|
|
* http://api.jqueryui.com/slider/
|
|
*
|
|
* Depends:
|
|
* jquery.ui.core.js
|
|
* jquery.ui.mouse.js
|
|
* jquery.ui.widget.js
|
|
*/
|
|
function(t,e){var i=5;t.widget("ui.slider",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,n=this.options,o=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),s="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",r=[];for(i=n.values&&n.values.length||1,o.length>i&&(o.slice(i).remove(),o=o.slice(0,i)),e=o.length;e<i;e++)r.push(s);this.handles=o.add(t(r.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,i="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=t("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){var t=this.handles.add(this.range).filter("a");this._off(t),this._on(t,this._handleEvents),this._hoverable(t),this._focusable(t)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,n,o,s,r,a,l,u,c=this,h=this.options;return!h.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},n=this._normValueFromMouse(i),o=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(n-c.values(e));(o>i||o===i&&(e===c._lastChangedValue||c.values(e)===h.min))&&(o=i,s=t(this),r=e)}),a=this._start(e,r),a!==!1&&(this._mouseSliding=!0,this._handleIndex=r,s.addClass("ui-state-active").focus(),l=s.offset(),u=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=u?{left:0,top:0}:{left:e.pageX-l.left-s.width()/2,top:e.pageY-l.top-s.height()/2-(parseInt(s.css("borderTopWidth"),10)||0)-(parseInt(s.css("borderBottomWidth"),10)||0)+(parseInt(s.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,r,n),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,n,o,s;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),n=i/e,n>1&&(n=1),n<0&&(n=0),"vertical"===this.orientation&&(n=1-n),o=this._valueMax()-this._valueMin(),s=this._valueMin()+n*o,this._trimAlignValue(s)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var n,o,s;this.options.values&&this.options.values.length?(n=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>n||1===e&&i<n)&&(i=n),i!==this.values(e)&&(o=this.values(),o[e]=i,s=this._trigger("slide",t,{handle:this.handles[e],value:i,values:o}),n=this.values(e?0:1),s!==!1&&this.values(e,i))):i!==this.value()&&(s=this._trigger("slide",t,{handle:this.handles[e],value:i}),s!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),void this._change(null,0)):this._value()},values:function(e,i){var n,o,s;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(n=this.options.values,o=arguments[0],s=0;s<n.length;s+=1)n[s]=this._trimAlignValue(o[s]),this._change(null,s);this._refreshValue()},_setOption:function(e,i){var n,o=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(o=this.options.values.length),t.Widget.prototype._setOption.apply(this,arguments),e){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),n=0;n<o;n+=1)this._change(null,n);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,n;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),n=0;n<i.length;n+=1)i[n]=this._trimAlignValue(i[n]);return i}return[]},_trimAlignValue:function(t){if(t<=this._valueMin())return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,n=t-i;return 2*Math.abs(i)>=e&&(n+=i>0?e:-e),parseFloat(n.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,n,o,s,r=this.options.range,a=this.options,l=this,u=!this._animateOff&&a.animate,c={};this.options.values&&this.options.values.length?this.handles.each(function(n){i=(l.values(n)-l._valueMin())/(l._valueMax()-l._valueMin())*100,c["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[u?"animate":"css"](c,a.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===n&&l.range.stop(1,1)[u?"animate":"css"]({left:i+"%"},a.animate),1===n&&l.range[u?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:a.animate})):(0===n&&l.range.stop(1,1)[u?"animate":"css"]({bottom:i+"%"},a.animate),1===n&&l.range[u?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:a.animate}))),e=i}):(n=this.value(),o=this._valueMin(),s=this._valueMax(),i=s!==o?(n-o)/(s-o)*100:0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[u?"animate":"css"](c,a.animate),"min"===r&&"horizontal"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({width:i+"%"},a.animate),"max"===r&&"horizontal"===this.orientation&&this.range[u?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:a.animate}),"min"===r&&"vertical"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({height:i+"%"},a.animate),"max"===r&&"vertical"===this.orientation&&this.range[u?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:a.animate}))},_handleEvents:{keydown:function(e){var n,o,s,r,a=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(e.target).addClass("ui-state-active"),n=this._start(e,a),n===!1))return}switch(r=this.options.step,o=s=this.options.values&&this.options.values.length?this.values(a):this.value(),e.keyCode){case t.ui.keyCode.HOME:s=this._valueMin();break;case t.ui.keyCode.END:s=this._valueMax();break;case t.ui.keyCode.PAGE_UP:s=this._trimAlignValue(o+(this._valueMax()-this._valueMin())/i);break;case t.ui.keyCode.PAGE_DOWN:s=this._trimAlignValue(o-(this._valueMax()-this._valueMin())/i);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(o===this._valueMax())return;s=this._trimAlignValue(o+r);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(o===this._valueMin())return;s=this._trimAlignValue(o-r)}this._slide(e,a,s)},click:function(t){t.preventDefault()},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}})}(n)},{"./core":"jquery-ui/core","./mouse":"jquery-ui/mouse","./widget":"jquery-ui/widget",jquery:"jquery"}],"jquery-ui/sortable":[function(t,e,i){var n=t("jquery");t("./core"),t("./mouse"),t("./widget"),/*!
|
|
* jQuery UI Sortable 1.10.4
|
|
* http://jqueryui.com
|
|
*
|
|
* Copyright 2014 jQuery Foundation and other contributors
|
|
* Released under the MIT license.
|
|
* http://jquery.org/license
|
|
*
|
|
* http://api.jqueryui.com/sortable/
|
|
*
|
|
* Depends:
|
|
* jquery.ui.core.js
|
|
* jquery.ui.mouse.js
|
|
* jquery.ui.widget.js
|
|
*/
|
|
function(t,e){function i(t,e,i){return t>e&&t<e+i}function n(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=!!this.items.length&&("x"===t.axis||n(this.items[0].item)),this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i){var n=null,o=!1,s=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(e),t(e.target).parents().each(function(){if(t.data(this,s.widgetName+"-item")===s)return n=t(this),!1}),t.data(e.target,s.widgetName+"-item")===s&&(n=t(e.target)),!!n&&(!(this.options.handle&&!i&&(t(this.options.handle,n).find("*").addBack().each(function(){this===e.target&&(o=!0)}),!o))&&(this.currentItem=n,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(e,i,n){var o,s,r=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,r.cursorAt&&this._adjustOffsetFromHelper(r.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),r.containment&&this._setContainment(),r.cursor&&"auto"!==r.cursor&&(s=this.document.find("body"),this.storedCursor=s.css("cursor"),s.css("cursor",r.cursor),this.storedStylesheet=t("<style>*{ cursor: "+r.cursor+" !important; }</style>").appendTo(s)),r.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",r.opacity)),r.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",r.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!n)for(o=this.containers.length-1;o>=0;o--)this.containers[o]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!r.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,n,o,s,r=this.options,a=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<r.scrollSensitivity?this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+r.scrollSpeed:e.pageY-this.overflowOffset.top<r.scrollSensitivity&&(this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-r.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<r.scrollSensitivity?this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+r.scrollSpeed:e.pageX-this.overflowOffset.left<r.scrollSensitivity&&(this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-r.scrollSpeed)):(e.pageY-t(document).scrollTop()<r.scrollSensitivity?a=t(document).scrollTop(t(document).scrollTop()-r.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<r.scrollSensitivity&&(a=t(document).scrollTop(t(document).scrollTop()+r.scrollSpeed)),e.pageX-t(document).scrollLeft()<r.scrollSensitivity?a=t(document).scrollLeft(t(document).scrollLeft()-r.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<r.scrollSensitivity&&(a=t(document).scrollLeft(t(document).scrollLeft()+r.scrollSpeed))),a!==!1&&t.ui.ddmanager&&!r.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(n=this.items[i],o=n.item[0],s=this._intersectsWithPointer(n),s&&n.instance===this.currentContainer&&!(o===this.currentItem[0]||this.placeholder[1===s?"next":"prev"]()[0]===o||t.contains(this.placeholder[0],o)||"semi-dynamic"===this.options.type&&t.contains(this.element[0],o))){if(this.direction=1===s?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(n))break;this._rearrange(e,n),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var n=this,o=this.placeholder.offset(),s=this.options.axis,r={};s&&"x"!==s||(r.left=o.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),s&&"y"!==s||(r.top=o.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(r,parseInt(this.options.revert,10)||500,function(){n._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),n=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&n.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!n.length&&e.key&&n.push(e.key+"="),n.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),n=[];return e=e||{},i.each(function(){n.push(t(e.item||this).attr(e.attribute||"id")||"")}),n},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,n=this.positionAbs.top,o=n+this.helperProportions.height,s=t.left,r=s+t.width,a=t.top,l=a+t.height,u=this.offset.click.top,c=this.offset.click.left,h="x"===this.options.axis||n+u>a&&n+u<l,d="y"===this.options.axis||e+c>s&&e+c<r,p=h&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:s<e+this.helperProportions.width/2&&i-this.helperProportions.width/2<r&&a<n+this.helperProportions.height/2&&o-this.helperProportions.height/2<l},_intersectsWithPointer:function(t){var e="x"===this.options.axis||i(this.positionAbs.top+this.offset.click.top,t.top,t.height),n="y"===this.options.axis||i(this.positionAbs.left+this.offset.click.left,t.left,t.width),o=e&&n,s=this._getDragVerticalDirection(),r=this._getDragHorizontalDirection();return!!o&&(this.floating?r&&"right"===r||"down"===s?2:1:s&&("down"===s?2:1))},_intersectsWithSides:function(t){var e=i(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),n=i(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),o=this._getDragVerticalDirection(),s=this._getDragHorizontalDirection();return this.floating&&s?"right"===s&&n||"left"===s&&!n:o&&("down"===o&&e||"up"===o&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){a.push(this)}var n,o,s,r,a=[],l=[],u=this._connectWith();if(u&&e)for(n=u.length-1;n>=0;n--)for(s=t(u[n]),o=s.length-1;o>=0;o--)r=t.data(s[o],this.widgetFullName),r&&r!==this&&!r.options.disabled&&l.push([t.isFunction(r.options.items)?r.options.items.call(r.element):t(r.options.items,r.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),r]);for(l.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),n=l.length-1;n>=0;n--)l[n][0].each(i);return t(a)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;i<e.length;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,n,o,s,r,a,l,u,c=this.items,h=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(o=t(d[i]),n=o.length-1;n>=0;n--)s=t.data(o[n],this.widgetFullName),s&&s!==this&&!s.options.disabled&&(h.push([t.isFunction(s.options.items)?s.options.items.call(s.element[0],e,{item:this.currentItem}):t(s.options.items,s.element),s]),this.containers.push(s));for(i=h.length-1;i>=0;i--)for(r=h[i][1],a=h[i][0],n=0,u=a.length;n<u;n++)l=t(a[n]),l.data(this.widgetName+"-item",r),c.push({item:l,instance:r,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,n,o,s;for(i=this.items.length-1;i>=0;i--)n=this.items[i],n.instance!==this.currentContainer&&this.currentContainer&&n.item[0]!==this.currentItem[0]||(o=this.options.toleranceElement?t(this.options.toleranceElement,n.item):n.item,e||(n.width=o.outerWidth(),n.height=o.outerHeight()),s=o.offset(),n.left=s.left,n.top=s.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)s=this.containers[i].element.offset(),this.containers[i].containerCache.left=s.left,this.containers[i].containerCache.top=s.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,n=e.options;n.placeholder&&n.placeholder.constructor!==String||(i=n.placeholder,n.placeholder={element:function(){var n=e.currentItem[0].nodeName.toLowerCase(),o=t("<"+n+">",e.document[0]).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===n?e.currentItem.children().each(function(){t("<td> </td>",e.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(o)}):"img"===n&&o.attr("src",e.currentItem.attr("src")),i||o.css("visibility","hidden"),o},update:function(t,o){i&&!n.forcePlaceholderSize||(o.height()||o.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),o.width()||o.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(n.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),n.placeholder.update(e,e.placeholder)},_contactContainers:function(e){var o,s,r,a,l,u,c,h,d,p,f=null,m=null;for(o=this.containers.length-1;o>=0;o--)if(!t.contains(this.currentItem[0],this.containers[o].element[0]))if(this._intersectsWith(this.containers[o].containerCache)){if(f&&t.contains(this.containers[o].element[0],f.element[0]))continue;f=this.containers[o],m=o}else this.containers[o].containerCache.over&&(this.containers[o]._trigger("out",e,this._uiHash(this)),this.containers[o].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[m].containerCache.over||(this.containers[m]._trigger("over",e,this._uiHash(this)),this.containers[m].containerCache.over=1);else{for(r=1e4,a=null,p=f.floating||n(this.currentItem),l=p?"left":"top",u=p?"width":"height",c=this.positionAbs[l]+this.offset.click[l],s=this.items.length-1;s>=0;s--)t.contains(this.containers[m].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(p&&!i(this.positionAbs.top+this.offset.click.top,this.items[s].top,this.items[s].height)||(h=this.items[s].item.offset()[l],d=!1,Math.abs(h-c)>Math.abs(h+this.items[s][u]-c)&&(d=!0,h+=this.items[s][u]),Math.abs(h-c)<r&&(r=Math.abs(h-c),a=this.items[s],this.direction=d?"up":"down")));if(!a&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[m])return;a?this._rearrange(e,a,null,!0):this._rearrange(e,null,this.containers[m].element,!0),this._trigger("change",e,this._uiHash()),this.containers[m]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[m],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[m]._trigger("over",e,this._uiHash(this)),this.containers[m].containerCache.over=1}},_createHelper:function(e){var i=this.options,n=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return n.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(n[0]),n[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),n[0].style.width&&!i.forceHelperSize||n.width(this.currentItem.width()),n[0].style.height&&!i.forceHelperSize||n.height(this.currentItem.height()),n},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,n,o=this.options;"parent"===o.containment&&(o.containment=this.helper[0].parentNode),"document"!==o.containment&&"window"!==o.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t("document"===o.containment?document:window).width()-this.helperProportions.width-this.margins.left,(t("document"===o.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(o.containment)||(e=t(o.containment)[0],i=t(o.containment).offset(),n="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(n?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(n?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var n="absolute"===e?1:-1,o="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,s=/(html|body)/i.test(o[0].tagName);return{top:i.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():s?0:o.scrollTop())*n,left:i.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():s?0:o.scrollLeft())*n}},_generatePosition:function(e){var i,n,o=this.options,s=e.pageX,r=e.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(a[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(s=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(r=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(s=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(r=this.containment[3]+this.offset.click.top)),o.grid&&(i=this.originalPageY+Math.round((r-this.originalPageY)/o.grid[1])*o.grid[1],r=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-o.grid[1]:i+o.grid[1]:i,n=this.originalPageX+Math.round((s-this.originalPageX)/o.grid[0])*o.grid[0],s=this.containment?n-this.offset.click.left>=this.containment[0]&&n-this.offset.click.left<=this.containment[2]?n:n-this.offset.click.left>=this.containment[0]?n-o.grid[0]:n+o.grid[0]:n)),{top:r-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:s-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:a.scrollLeft())}},_rearrange:function(t,e,i,n){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var o=this.counter;this._delay(function(){o===this.counter&&this.refreshPositions(!n)})},_clear:function(t,e){function i(t,e,i){return function(n){i._trigger(t,n,e._uiHash(e))}}this.reverting=!1;var n,o=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(n in this._storedCSS)"auto"!==this._storedCSS[n]&&"static"!==this._storedCSS[n]||(this._storedCSS[n]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&o.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||o.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(o.push(function(t){this._trigger("remove",t,this._uiHash())}),o.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),o.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),n=this.containers.length-1;n>=0;n--)e||o.push(i("deactivate",this,this.containers[n])),this.containers[n].containerCache.over&&(o.push(i("out",this,this.containers[n])),this.containers[n].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!e){for(this._trigger("beforeStop",t,this._uiHash()),n=0;n<o.length;n++)o[n].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!1}if(e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!e){for(n=0;n<o.length;n++)o[n].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}})}(n)},{"./core":"jquery-ui/core","./mouse":"jquery-ui/mouse","./widget":"jquery-ui/widget",jquery:"jquery"}],"jquery-ui/spinner":[function(t,e,i){var n=t("jquery");t("./core"),t("./widget"),t("./button"),/*!
|
|
* jQuery UI Spinner 1.10.4
|
|
* http://jqueryui.com
|
|
*
|
|
* Copyright 2014 jQuery Foundation and other contributors
|
|
* Released under the MIT license.
|
|
* http://jquery.org/license
|
|
*
|
|
* http://api.jqueryui.com/spinner/
|
|
*
|
|
* Depends:
|
|
* jquery.ui.core.js
|
|
* jquery.ui.widget.js
|
|
* jquery.ui.button.js
|
|
*/
|
|
function(t){function e(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.widget("ui.spinner",{version:"1.10.4",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e={},i=this.element;return t.each(["min","max","step"],function(t,n){var o=i.attr(n);void 0!==o&&o.length&&(e[n]=o)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(this._stop(),this._refresh(),void(this.previous!==this.element.val()&&this._trigger("change",t)))},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var t=this.element[0]===this.document[0].activeElement;t||(this.element.focus(),this.previous=n,this._delay(function(){this.previous=n}))}var n;n=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){if(t(e.currentTarget).hasClass("ui-state-active"))return this._start(e)!==!1&&void this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var t=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=t.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*t.height())&&t.height()>0&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(e){var i=this.options,n=t.ui.keyCode;switch(e.keyCode){case n.UP:return this._repeat(null,1,e),!0;case n.DOWN:return this._repeat(null,-1,e),!0;case n.PAGE_UP:return this._repeat(null,i.page,e),!0;case n.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>▲</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon "+this.options.icons.down+"'>▼</span></a>"},_start:function(t){return!(!this.spinning&&this._trigger("start",t)===!1)&&(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=t.toString(),i=e.indexOf(".");return i===-1?0:e.length-i-1},_adjustValue:function(t){var e,i,n=this.options;return e=null!==n.min?n.min:0,i=t-e,i=Math.round(i/n.step)*n.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==n.max&&t>n.max?n.max:null!==n.min&&t<n.min?n.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){if("culture"===t||"numberFormat"===t){var i=this._parse(this.element.val());return this.options[t]=e,void this.element.val(this._format(i))}"max"!==t&&"min"!==t&&"step"!==t||"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(e.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(e.down)),this._super(t,e),"disabled"===t&&(e?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:e(function(t){this._super(t),this._value(this.element.val())}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:e(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:e(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:e(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:e(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?void e(this._value).call(this,t):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})}(n)},{"./button":"jquery-ui/button","./core":"jquery-ui/core","./widget":"jquery-ui/widget",jquery:"jquery"}],"jquery-ui/widget":[function(t,e,i){var n=t("jquery");/*!
|
|
* jQuery UI Widget 1.10.4
|
|
* http://jqueryui.com
|
|
*
|
|
* Copyright 2014 jQuery Foundation and other contributors
|
|
* Released under the MIT license.
|
|
* http://jquery.org/license
|
|
*
|
|
* http://api.jqueryui.com/jQuery.widget/
|
|
*/
|
|
!function(t,e){var i=0,n=Array.prototype.slice,o=t.cleanData;t.cleanData=function(e){for(var i,n=0;null!=(i=e[n]);n++)try{t(i).triggerHandler("remove")}catch(s){}o(e)},t.widget=function(e,i,n){var o,s,r,a,l={},u=e.split(".")[0];e=e.split(".")[1],o=u+"-"+e,n||(n=i,i=t.Widget),t.expr[":"][o.toLowerCase()]=function(e){return!!t.data(e,o)},t[u]=t[u]||{},s=t[u][e],r=t[u][e]=function(t,e){return this._createWidget?void(arguments.length&&this._createWidget(t,e)):new r(t,e)},t.extend(r,s,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(n,function(e,n){return t.isFunction(n)?void(l[e]=function(){var t=function(){return i.prototype[e].apply(this,arguments)},o=function(t){return i.prototype[e].apply(this,t)};return function(){var e,i=this._super,s=this._superApply;return this._super=t,this._superApply=o,e=n.apply(this,arguments),this._super=i,this._superApply=s,e}}()):void(l[e]=n)}),r.prototype=t.widget.extend(a,{widgetEventPrefix:s?a.widgetEventPrefix||e:e},l,{constructor:r,namespace:u,widgetName:e,widgetFullName:o}),s?(t.each(s._childConstructors,function(e,i){var n=i.prototype;t.widget(n.namespace+"."+n.widgetName,r,i._proto)}),delete s._childConstructors):i._childConstructors.push(r),t.widget.bridge(e,r)},t.widget.extend=function(i){for(var o,s,r=n.call(arguments,1),a=0,l=r.length;a<l;a++)for(o in r[a])s=r[a][o],r[a].hasOwnProperty(o)&&s!==e&&(t.isPlainObject(s)?i[o]=t.isPlainObject(i[o])?t.widget.extend({},i[o],s):t.widget.extend({},s):i[o]=s);return i},t.widget.bridge=function(i,o){var s=o.prototype.widgetFullName||i;t.fn[i]=function(r){var a="string"==typeof r,l=n.call(arguments,1),u=this;return r=!a&&l.length?t.widget.extend.apply(null,[r].concat(l)):r,a?this.each(function(){var n,o=t.data(this,s);return o?t.isFunction(o[r])&&"_"!==r.charAt(0)?(n=o[r].apply(o,l),n!==o&&n!==e?(u=n&&n.jquery?u.pushStack(n.get()):n,!1):void 0):t.error("no such method '"+r+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; attempted to call method '"+r+"'")}):this.each(function(){var e=t.data(this,s);e?e.option(r||{})._init():t.data(this,s,new o(r,this))}),u}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,n){n=t(n||this.defaultElement||this)[0],this.element=t(n),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),n!==this&&(t.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===n&&this.destroy()}}),this.document=t(n.style?n.ownerDocument:n.document||n),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(i,n){var o,s,r,a=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(a={},o=i.split("."),i=o.shift(),o.length){for(s=a[i]=t.widget.extend({},this.options[i]),r=0;r<o.length-1;r++)s[o[r]]=s[o[r]]||{},s=s[o[r]];if(i=o.pop(),1===arguments.length)return s[i]===e?null:s[i];s[i]=n}else{if(1===arguments.length)return this.options[i]===e?null:this.options[i];a[i]=n}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(e,i,n){var o,s=this;"boolean"!=typeof e&&(n=i,i=e,e=!1),n?(i=o=t(i),this.bindings=this.bindings.add(i)):(n=i,i=this.element,o=this.widget()),t.each(n,function(n,r){function a(){if(e||s.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled"))return("string"==typeof r?s[r]:r).apply(s,arguments)}"string"!=typeof r&&(a.guid=r.guid=r.guid||a.guid||t.guid++);var l=n.match(/^(\w+)\s*(.*)$/),u=l[1]+s.eventNamespace,c=l[2];c?o.delegate(c,u,a):i.bind(u,a)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function i(){return("string"==typeof t?n[t]:t).apply(n,arguments)}var n=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,n){var o,s,r=this.options[e];if(n=n||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],s=i.originalEvent)for(o in s)o in i||(i[o]=s[o]);return this.element.trigger(i,n),!(t.isFunction(r)&&r.apply(this.element[0],[i].concat(n))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(n,o,s){"string"==typeof o&&(o={effect:o});var r,a=o?o===!0||"number"==typeof o?i:o.effect||i:e;o=o||{},"number"==typeof o&&(o={duration:o}),r=!t.isEmptyObject(o),o.complete=s,o.delay&&n.delay(o.delay),r&&t.effects&&t.effects.effect[a]?n[e](o):a!==e&&n[a]?n[a](o.duration,o.easing,s):n.queue(function(i){t(this)[e](),s&&s.call(n[0]),i()})}})}(n)},{jquery:"jquery"}],"bootstrap/button":[function(t,e,i){var n=t("jquery"),o=function(t,e){this.$element=n(t),this.options=n.extend({},o.DEFAULTS,e),this.isLoading=!1};o.DEFAULTS={loadingText:"loading..."},o.prototype.setState=function(t){var e="bk-bs-disabled",i=this.$element,o=i.is("input")?"val":"html",s=i.data();t+="Text",s.resetText||i.data("resetText",i[o]()),i[o](s[t]||this.options[t]),setTimeout(n.proxy(function(){"loadingText"==t?(this.isLoading=!0,i.addClass(e).attr(e,e)):this.isLoading&&(this.isLoading=!1,i.removeClass(e).removeAttr(e))},this),0)},o.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-bk-bs-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")&&(i.prop("checked")&&this.$element.hasClass("bk-bs-active")?t=!1:e.find(".bk-bs-active").removeClass("bk-bs-active")),t&&i.prop("checked",!this.$element.hasClass("bk-bs-active")).trigger("change")}t&&this.$element.toggleClass("bk-bs-active")};var s=n.fn.button;n.fn.button=function(t){return this.each(function(){var e=n(this),i=e.data("bk-bs.button"),s="object"==typeof t&&t;i||e.data("bk-bs.button",i=new o(this,s)),"toggle"==t?i.toggle():t&&i.setState(t)})},n.fn.button.Constructor=o,n.fn.button.noConflict=function(){return n.fn.button=s,this},n(document).on("click.bk-bs.button.data-api","[data-bk-bs-toggle^=button]",function(t){var e=n(t.target);e.hasClass("bk-bs-btn")||(e=e.closest(".bk-bs-btn")),e.button("toggle"),t.preventDefault()})},{jquery:"jquery"}],"bootstrap/modal":[function(t,e,i){var n=t("jquery"),o=function(t,e){this.options=e,this.$element=n(t),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.find(".bk-bs-modal-content").load(this.options.remote,n.proxy(function(){this.$element.trigger("loaded.bk-bs.modal")},this))};o.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},o.prototype.toggle=function(t){return this[this.isShown?"hide":"show"](t)},o.prototype.show=function(t){var e=this,i=n.Event("show.bk-bs.modal",{relatedTarget:t});this.$element.trigger(i),this.isShown||i.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.$element.on("click.dismiss.bk-bs.modal",'[data-bk-bs-dismiss="modal"]',n.proxy(this.hide,this)),this.backdrop(function(){var i=n.support.transition&&e.$element.hasClass("bk-bs-fade");e.$element.parent().length||e.$element.appendTo(document.body),e.$element.show().scrollTop(0),i&&e.$element[0].offsetWidth,e.$element.addClass("bk-bs-in").attr("aria-hidden",!1),e.enforceFocus();var o=n.Event("shown.bk-bs.modal",{relatedTarget:t});i?e.$element.find(".bk-bs-modal-dialog").one(n.support.transition.end,function(){e.$element.focus().trigger(o)}).emulateTransitionEnd(300):e.$element.focus().trigger(o)}))},o.prototype.hide=function(t){t&&t.preventDefault(),t=n.Event("hide.bk-bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),n(document).off("focusin.bk-bs.modal"),this.$element.removeClass("bk-bs-in").attr("aria-hidden",!0).off("click.dismiss.bk-bs.modal"),n.support.transition&&this.$element.hasClass("bk-bs-fade")?this.$element.one(n.support.transition.end,n.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},o.prototype.enforceFocus=function(){n(document).off("focusin.bk-bs.modal").on("focusin.bk-bs.modal",n.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.focus()},this))},o.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bk-bs.modal",n.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bk-bs.modal")},o.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.removeBackdrop(),t.$element.trigger("hidden.bk-bs.modal")})},o.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},o.prototype.backdrop=function(t){var e=this.$element.hasClass("bk-bs-fade")?"bk-bs-fade":"";if(this.isShown&&this.options.backdrop){var i=n.support.transition&&e;if(this.$backdrop=n('<div class="bk-bs-modal-backdrop '+e+'" />').appendTo(document.body),this.$element.on("click.dismiss.bk-bs.modal",n.proxy(function(t){t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("bk-bs-in"),!t)return;i?this.$backdrop.one(n.support.transition.end,t).emulateTransitionEnd(150):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("bk-bs-in"),n.support.transition&&this.$element.hasClass("bk-bs-fade")?this.$backdrop.one(n.support.transition.end,t).emulateTransitionEnd(150):t()):t&&t()};var s=n.fn.modal;n.fn.modal=function(t,e){return this.each(function(){var i=n(this),s=i.data("bk-bs.modal"),r=n.extend({},o.DEFAULTS,i.data(),"object"==typeof t&&t);s||i.data("bk-bs.modal",s=new o(this,r)),"string"==typeof t?s[t](e):r.show&&s.show(e)})},n.fn.modal.Constructor=o,n.fn.modal.noConflict=function(){return n.fn.modal=s,this},n(document).on("click.bk-bs.modal.data-api",'[data-bk-bs-toggle="modal"]',function(t){var e=n(this),i=e.attr("href"),o=n(e.attr("data-bk-bs-target")||i&&i.replace(/.*(?=#[^\s]+$)/,"")),s=o.data("bk-bs.modal")?"toggle":n.extend({remote:!/#/.test(i)&&i},o.data(),e.data());e.is("a")&&t.preventDefault(),o.modal(s,this).one("hide",function(){e.is(":visible")&&e.focus()})}),n(document).on("show.bk-bs.modal",".bk-bs-modal",function(){n(document.body).addClass("bk-bs-modal-open")}).on("hidden.bk-bs.modal",".bk-bs-modal",function(){n(document.body).removeClass("bk-bs-modal-open")})},{jquery:"jquery"}],"bootstrap/tab":[function(t,e,i){var n=t("jquery"),o=function(t){this.element=n(t)};o.prototype.show=function(){var t=this.element,e=t.closest("ul:not(.bk-bs-dropdown-menu)"),i=t.data("bk-bs-target");if(i||(i=t.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("bk-bs-active")){var o=e.find(".bk-bs-active:last a")[0],s=n.Event("show.bk-bs.tab",{relatedTarget:o});if(t.trigger(s),!s.isDefaultPrevented()){var r=n(i);this.activate(t.parent("li"),e),this.activate(r,r.parent(),function(){t.trigger({type:"shown.bk-bs.tab",relatedTarget:o})})}}},o.prototype.activate=function(t,e,i){function o(){s.removeClass("bk-bs-active").find("> .bk-bs-dropdown-menu > .bk-bs-active").removeClass("bk-bs-active"),t.addClass("bk-bs-active"),r?(t[0].offsetWidth,t.addClass("bk-bs-in")):t.removeClass("bk-bs-fade"),t.parent(".bk-bs-dropdown-menu")&&t.closest("li.bk-bs-dropdown").addClass("bk-bs-active"),i&&i()}var s=e.find("> .bk-bs-active"),r=i&&n.support.transition&&s.hasClass("bk-bs-fade");r?s.one(n.support.transition.end,o).emulateTransitionEnd(150):o(),s.removeClass("bk-bs-in")};var s=n.fn.tab;n.fn.tab=function(t){return this.each(function(){var e=n(this),i=e.data("bk-bs.tab");i||e.data("bk-bs.tab",i=new o(this)),"string"==typeof t&&i[t]()})},n.fn.tab.Constructor=o,n.fn.tab.noConflict=function(){return n.fn.tab=s,this},n(document).on("click.bk-bs.tab.data-api",'[data-bk-bs-toggle="tab"], [data-bk-bs-toggle="pill"]',function(t){t.preventDefault(),n(this).tab("show")})},{jquery:"jquery"}],"jqrangeslider/jQDateRangeSlider":[function(t,e,i){/**
|
|
* jQRangeSlider
|
|
* A javascript slider selector that supports dates
|
|
*
|
|
* Copyright (C) Guillaume Gautreau 2012
|
|
* Dual licensed under the MIT or GPL Version 2 licenses.
|
|
*
|
|
*/
|
|
var n=t("jquery");t("./jQRangeSlider"),e.exports=n.widget("ui.dateRangeSlider",n.ui.rangeSlider,{options:{bounds:{min:new Date(2010,0,1).valueOf(),max:new Date(2012,0,1).valueOf()},defaultValues:{min:new Date(2010,1,11).valueOf(),max:new Date(2011,1,11).valueOf()}},_create:function(){n.ui.rangeSlider.prototype._create.apply(this),this.element.addClass("bk-ui-dateRangeSlider")},destroy:function(){this.element.removeClass("bk-ui-dateRangeSlider"),n.ui.rangeSlider.prototype.destroy.apply(this)},_setDefaultValues:function(){this._values={min:this.options.defaultValues.min.valueOf(),max:this.options.defaultValues.max.valueOf()}},_setRulerParameters:function(){this.ruler.ruler({min:new Date(this.options.bounds.min),max:new Date(this.options.bounds.max),scales:this.options.scales})},_setOption:function(t,e){("defaultValues"===t||"bounds"===t)&&"undefined"!=typeof e&&null!==e&&this._isValidDate(e.min)&&this._isValidDate(e.max)?n.ui.rangeSlider.prototype._setOption.apply(this,[t,{min:e.min.valueOf(),max:e.max.valueOf()}]):n.ui.rangeSlider.prototype._setOption.apply(this,this._toArray(arguments))},_handleType:function(){return"dateRangeSliderHandle"},option:function(t){if("bounds"===t||"defaultValues"===t){var e=n.ui.rangeSlider.prototype.option.apply(this,arguments);return{min:new Date(e.min),max:new Date(e.max)}}return n.ui.rangeSlider.prototype.option.apply(this,this._toArray(arguments))},_defaultFormatter:function(t){var e=t.getMonth()+1,i=t.getDate();return""+t.getFullYear()+"-"+(e<10?"0"+e:e)+"-"+(i<10?"0"+i:i)},_getFormatter:function(){var t=this.options.formatter;return this.options.formatter!==!1&&null!==this.options.formatter||(t=this._defaultFormatter),function(t){return function(e){return t(new Date(e))}}(t)},values:function(t,e){var i=null;return i=this._isValidDate(t)&&this._isValidDate(e)?n.ui.rangeSlider.prototype.values.apply(this,[t.valueOf(),e.valueOf()]):n.ui.rangeSlider.prototype.values.apply(this,this._toArray(arguments)),{min:new Date(i.min),max:new Date(i.max)}},min:function(t){return this._isValidDate(t)?new Date(n.ui.rangeSlider.prototype.min.apply(this,[t.valueOf()])):new Date(n.ui.rangeSlider.prototype.min.apply(this))},max:function(t){return this._isValidDate(t)?new Date(n.ui.rangeSlider.prototype.max.apply(this,[t.valueOf()])):new Date(n.ui.rangeSlider.prototype.max.apply(this))},bounds:function(t,e){var i;return i=this._isValidDate(t)&&this._isValidDate(e)?n.ui.rangeSlider.prototype.bounds.apply(this,[t.valueOf(),e.valueOf()]):n.ui.rangeSlider.prototype.bounds.apply(this,this._toArray(arguments)),{min:new Date(i.min),max:new Date(i.max)}},_isValidDate:function(t){return"undefined"!=typeof t&&t instanceof Date},_toArray:function(t){return Array.prototype.slice.call(t)}})},{"./jQRangeSlider":"jqrangeslider/jQRangeSlider",jquery:"jquery"}],"jqrangeslider/jQRangeSlider":[function(t,e,i){/**
|
|
* jQRangeSlider
|
|
* A javascript slider selector that supports dates
|
|
*
|
|
* Copyright (C) Guillaume Gautreau 2012
|
|
* Dual licensed under the MIT or GPL Version 2 licenses.
|
|
*
|
|
*/
|
|
var n=t("jquery");t("jquery-ui/core"),t("jquery-ui/widget"),t("jquery-ui/mouse"),t("jquery-mousewheel"),e.exports=n.widget("ui.rangeSlider",{options:{bounds:{min:0,max:100},defaultValues:{min:20,max:50},wheelMode:null,wheelSpeed:4,arrows:!0,valueLabels:"show",formatter:null,durationIn:0,durationOut:400,delayOut:200,range:{min:!1,max:!1},step:!1,scales:!1,enabled:!0,symmetricPositionning:!1},_values:null,_valuesChanged:!1,_initialized:!1,bar:null,leftHandle:null,rightHandle:null,innerBar:null,container:null,arrows:null,labels:null,changing:{min:!1,max:!1},changed:{min:!1,max:!1},ruler:null,_create:function(){this._setDefaultValues(),this.labels={left:null,right:null,leftDisplayed:!0,rightDisplayed:!0},this.arrows={left:null,right:null},this.changing={min:!1,max:!1},this.changed={min:!1,max:!1},this._createElements(),this._bindResize(),setTimeout(n.proxy(this.resize,this),1),setTimeout(n.proxy(this._initValues,this),1)},_setDefaultValues:function(){this._values={min:this.options.defaultValues.min,max:this.options.defaultValues.max}},_bindResize:function(){var t=this;this._resizeProxy=function(e){t.resize(e)},n(window).resize(this._resizeProxy)},_initWidth:function(){this.container.css("width",this.element.width()-this.container.outerWidth(!0)+this.container.width()),this.innerBar.css("width",this.container.width()-this.innerBar.outerWidth(!0)+this.innerBar.width())},_initValues:function(){this._initialized=!0,this.values(this._values.min,this._values.max)},_setOption:function(t,e){this._setWheelOption(t,e),this._setArrowsOption(t,e),this._setLabelsOption(t,e),this._setLabelsDurations(t,e),this._setFormatterOption(t,e),this._setBoundsOption(t,e),this._setRangeOption(t,e),this._setStepOption(t,e),this._setScalesOption(t,e),this._setEnabledOption(t,e),this._setPositionningOption(t,e)},_validProperty:function(t,e,i){return null===t||"undefined"==typeof t[e]?i:t[e]},_setStepOption:function(t,e){"step"===t&&(this.options.step=e,this._leftHandle("option","step",e),this._rightHandle("option","step",e),this._changed(!0))},_setScalesOption:function(t,e){"scales"===t&&(e===!1||null===e?(this.options.scales=!1,this._destroyRuler()):e instanceof Array&&(this.options.scales=e,this._updateRuler()))},_setRangeOption:function(t,e){"range"===t&&(this._bar("option","range",e),this.options.range=this._bar("option","range"),this._changed(!0))},_setBoundsOption:function(t,e){"bounds"===t&&"undefined"!=typeof e.min&&"undefined"!=typeof e.max&&this.bounds(e.min,e.max)},_setWheelOption:function(t,e){"wheelMode"!==t&&"wheelSpeed"!==t||(this._bar("option",t,e),this.options[t]=this._bar("option",t))},_setLabelsOption:function(t,e){if("valueLabels"===t){if("hide"!==e&&"show"!==e&&"change"!==e)return;this.options.valueLabels=e,"hide"!==e?(this._createLabels(),this._leftLabel("update"),this._rightLabel("update")):this._destroyLabels()}},_setFormatterOption:function(t,e){"formatter"===t&&null!==e&&"function"==typeof e&&"hide"!==this.options.valueLabels&&(this._leftLabel("option","formatter",e),this.options.formatter=this._rightLabel("option","formatter",e))},_setArrowsOption:function(t,e){"arrows"!==t||e!==!0&&e!==!1||e===this.options.arrows||(e===!0?(this.element.removeClass("bk-ui-rangeSlider-noArrow").addClass("bk-ui-rangeSlider-withArrows"),this.arrows.left.css("display","block"),this.arrows.right.css("display","block"),this.options.arrows=!0):e===!1&&(this.element.addClass("bk-ui-rangeSlider-noArrow").removeClass("bk-ui-rangeSlider-withArrows"),this.arrows.left.css("display","none"),this.arrows.right.css("display","none"),this.options.arrows=!1),this._initWidth())},_setLabelsDurations:function(t,e){if("durationIn"===t||"durationOut"===t||"delayOut"===t){if(parseInt(e,10)!==e)return;null!==this.labels.left&&this._leftLabel("option",t,e),null!==this.labels.right&&this._rightLabel("option",t,e),this.options[t]=e}},_setEnabledOption:function(t,e){"enabled"===t&&this.toggle(e)},_setPositionningOption:function(t,e){"symmetricPositionning"===t&&(this._rightHandle("option",t,e),this.options[t]=this._leftHandle("option",t,e))},_createElements:function(){"absolute"!==this.element.css("position")&&this.element.css("position","relative"),this.element.addClass("bk-ui-rangeSlider"),this.container=n("<div class='bk-ui-rangeSlider-container' />").css("position","absolute").appendTo(this.element),this.innerBar=n("<div class='bk-ui-rangeSlider-innerBar' />").css("position","absolute").css("top",0).css("left",0),this._createHandles(),this._createBar(),this.container.prepend(this.innerBar),this._createArrows(),"hide"!==this.options.valueLabels?this._createLabels():this._destroyLabels(),this._updateRuler(),this.options.enabled||this._toggle(this.options.enabled)},_createHandle:function(t){return n("<div />")[this._handleType()](t).bind("sliderDrag",n.proxy(this._changing,this)).bind("stop",n.proxy(this._changed,this))},_createHandles:function(){this.leftHandle=this._createHandle({isLeft:!0,bounds:this.options.bounds,value:this._values.min,step:this.options.step,symmetricPositionning:this.options.symmetricPositionning}).appendTo(this.container),this.rightHandle=this._createHandle({isLeft:!1,bounds:this.options.bounds,value:this._values.max,step:this.options.step,symmetricPositionning:this.options.symmetricPositionning}).appendTo(this.container)},_createBar:function(){this.bar=n("<div />").prependTo(this.container).bind("sliderDrag scroll zoom",n.proxy(this._changing,this)).bind("stop",n.proxy(this._changed,this)),this._bar({leftHandle:this.leftHandle,rightHandle:this.rightHandle,values:{min:this._values.min,max:this._values.max},type:this._handleType(),range:this.options.range,wheelMode:this.options.wheelMode,wheelSpeed:this.options.wheelSpeed}),this.options.range=this._bar("option","range"),this.options.wheelMode=this._bar("option","wheelMode"),this.options.wheelSpeed=this._bar("option","wheelSpeed")},_createArrows:function(){this.arrows.left=this._createArrow("left"),this.arrows.right=this._createArrow("right"),this.options.arrows?this.element.addClass("bk-ui-rangeSlider-withArrows"):(this.arrows.left.css("display","none"),this.arrows.right.css("display","none"),this.element.addClass("bk-ui-rangeSlider-noArrow"))},_createArrow:function(t){var e,i=n("<div class='bk-ui-rangeSlider-arrow' />").append("<div class='bk-ui-rangeSlider-arrow-inner' />").addClass("bk-ui-rangeSlider-"+t+"Arrow").css("position","absolute").css(t,0).appendTo(this.element);return e="right"===t?n.proxy(this._scrollRightClick,this):n.proxy(this._scrollLeftClick,this),i.bind("mousedown touchstart",e),i},_proxy:function(t,e,i){var n=Array.prototype.slice.call(i);return t&&t[e]?t[e].apply(t,n):null},_handleType:function(){return"rangeSliderHandle"},_barType:function(){return"rangeSliderBar"},_bar:function(){return this._proxy(this.bar,this._barType(),arguments)},_labelType:function(){return"rangeSliderLabel"},_leftLabel:function(){return this._proxy(this.labels.left,this._labelType(),arguments)},_rightLabel:function(){return this._proxy(this.labels.right,this._labelType(),arguments)},_leftHandle:function(){return this._proxy(this.leftHandle,this._handleType(),arguments)},_rightHandle:function(){return this._proxy(this.rightHandle,this._handleType(),arguments)},_getValue:function(t,e){return e===this.rightHandle&&(t-=e.outerWidth()),t*(this.options.bounds.max-this.options.bounds.min)/(this.container.innerWidth()-e.outerWidth(!0))+this.options.bounds.min},_trigger:function(t){var e=this;setTimeout(function(){e.element.trigger(t,{label:e.element,values:e.values()})},1)},_changing:function(){this._updateValues()&&(this._trigger("valuesChanging"),this._valuesChanged=!0)},_deactivateLabels:function(){"change"===this.options.valueLabels&&(this._leftLabel("option","show","hide"),this._rightLabel("option","show","hide"))},_reactivateLabels:function(){"change"===this.options.valueLabels&&(this._leftLabel("option","show","change"),this._rightLabel("option","show","change"))},_changed:function(t){t===!0&&this._deactivateLabels(),(this._updateValues()||this._valuesChanged)&&(this._trigger("valuesChanged"),t!==!0&&this._trigger("userValuesChanged"),this._valuesChanged=!1),t===!0&&this._reactivateLabels()},_updateValues:function(){var t=this._leftHandle("value"),e=this._rightHandle("value"),i=this._min(t,e),n=this._max(t,e),o=i!==this._values.min||n!==this._values.max;return this._values.min=this._min(t,e),this._values.max=this._max(t,e),o},_min:function(t,e){return Math.min(t,e)},_max:function(t,e){return Math.max(t,e)},_createLabel:function(t,e){var i;return null===t?(i=this._getLabelConstructorParameters(t,e),t=n("<div />").appendTo(this.element)[this._labelType()](i)):(i=this._getLabelRefreshParameters(t,e),t[this._labelType()](i)),t},_getLabelConstructorParameters:function(t,e){return{handle:e,handleType:this._handleType(),formatter:this._getFormatter(),show:this.options.valueLabels,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}},_getLabelRefreshParameters:function(){return{formatter:this._getFormatter(),show:this.options.valueLabels,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}},_getFormatter:function(){return this.options.formatter===!1||null===this.options.formatter?this._defaultFormatter:this.options.formatter},_defaultFormatter:function(t){return Math.round(t)},_destroyLabel:function(t){return null!==t&&(t[this._labelType()]("destroy"),t.remove(),t=null),t},_createLabels:function(){this.labels.left=this._createLabel(this.labels.left,this.leftHandle),this.labels.right=this._createLabel(this.labels.right,this.rightHandle),this._leftLabel("pair",this.labels.right)},_destroyLabels:function(){this.labels.left=this._destroyLabel(this.labels.left),this.labels.right=this._destroyLabel(this.labels.right)},_stepRatio:function(){return this._leftHandle("stepRatio")},_scrollRightClick:function(t){return!!this.options.enabled&&(t.preventDefault(),this._bar("startScroll"),this._bindStopScroll(),void this._continueScrolling("scrollRight",4*this._stepRatio(),1))},_continueScrolling:function(t,e,i,n){if(!this.options.enabled)return!1;this._bar(t,i),n=n||5,n--;var o=this,s=16,r=Math.max(1,4/this._stepRatio());this._scrollTimeout=setTimeout(function(){0===n&&(e>s?e=Math.max(s,e/1.5):i=Math.min(r,2*i),n=5),o._continueScrolling(t,e,i,n)},e)},_scrollLeftClick:function(t){return!!this.options.enabled&&(t.preventDefault(),this._bar("startScroll"),this._bindStopScroll(),void this._continueScrolling("scrollLeft",4*this._stepRatio(),1))},_bindStopScroll:function(){var t=this;this._stopScrollHandle=function(e){e.preventDefault(),t._stopScroll()},n(document).bind("mouseup touchend",this._stopScrollHandle)},_stopScroll:function(){n(document).unbind("mouseup touchend",this._stopScrollHandle),this._stopScrollHandle=null,this._bar("stopScroll"),clearTimeout(this._scrollTimeout)},_createRuler:function(){this.ruler=n("<div class='bk-ui-rangeSlider-ruler' />").appendTo(this.innerBar)},_setRulerParameters:function(){this.ruler.ruler({min:this.options.bounds.min,max:this.options.bounds.max,scales:this.options.scales})},_destroyRuler:function(){null!==this.ruler&&n.fn.ruler&&(this.ruler.ruler("destroy"),this.ruler.remove(),this.ruler=null)},_updateRuler:function(){this._destroyRuler(),this.options.scales!==!1&&n.fn.ruler&&(this._createRuler(),this._setRulerParameters())},values:function(t,e){var i;if("undefined"!=typeof t&&"undefined"!=typeof e){if(!this._initialized)return this._values.min=t,this._values.max=e,this._values;this._deactivateLabels(),i=this._bar("values",t,e),this._changed(!0),this._reactivateLabels()}else i=this._bar("values",t,e);return i},min:function(t){return this._values.min=this.values(t,this._values.max).min,this._values.min},max:function(t){return this._values.max=this.values(this._values.min,t).max,this._values.max},bounds:function(t,e){return this._isValidValue(t)&&this._isValidValue(e)&&t<e&&(this._setBounds(t,e),this._updateRuler(),this._changed(!0)),this.options.bounds},_isValidValue:function(t){return"undefined"!=typeof t&&parseFloat(t)===t},_setBounds:function(t,e){this.options.bounds={min:t,max:e},this._leftHandle("option","bounds",this.options.bounds),this._rightHandle("option","bounds",this.options.bounds),this._bar("option","bounds",this.options.bounds)},zoomIn:function(t){this._bar("zoomIn",t)},zoomOut:function(t){this._bar("zoomOut",t)},scrollLeft:function(t){this._bar("startScroll"),this._bar("scrollLeft",t),this._bar("stopScroll")},scrollRight:function(t){this._bar("startScroll"),this._bar("scrollRight",t),this._bar("stopScroll")},resize:function(){this._initWidth(),this._leftHandle("update"),this._rightHandle("update"),this._bar("update")},enable:function(){this.toggle(!0)},disable:function(){this.toggle(!1)},toggle:function(t){void 0===t&&(t=!this.options.enabled),this.options.enabled!==t&&this._toggle(t)},_toggle:function(t){this.options.enabled=t,this.element.toggleClass("bk-ui-rangeSlider-disabled",!t);var e=t?"enable":"disable";this._bar(e),this._leftHandle(e),this._rightHandle(e),this._leftLabel(e),this._rightLabel(e)},destroy:function(){this.element.removeClass("bk-ui-rangeSlider-withArrows bk-ui-rangeSlider-noArrow bk-ui-rangeSlider-disabled"),this._destroyWidgets(),this._destroyElements(),this.element.removeClass("bk-ui-rangeSlider"),this.options=null,n(window).unbind("resize",this._resizeProxy),this._resizeProxy=null,this._bindResize=null,n.Widget.prototype.destroy.apply(this,arguments)},_destroyWidget:function(t){this["_"+t]("destroy"),this[t].remove(),this[t]=null},_destroyWidgets:function(){this._destroyWidget("bar"),this._destroyWidget("leftHandle"),this._destroyWidget("rightHandle"),this._destroyRuler(),this._destroyLabels()},_destroyElements:function(){this.container.remove(),this.container=null,this.innerBar.remove(),this.innerBar=null,this.arrows.left.remove(),this.arrows.right.remove(),this.arrows=null}})},{jquery:"jquery","jquery-mousewheel":"jquery-mousewheel","jquery-ui/core":"jquery-ui/core","jquery-ui/mouse":"jquery-ui/mouse","jquery-ui/widget":"jquery-ui/widget"}],jquery_event_drag:[function(t,e,i){/*!
|
|
* jquery.event.drag - v 2.2
|
|
* Copyright (c) 2010 Three Dub Media - http://threedubmedia.com
|
|
* Open Source MIT License - http://threedubmedia.com/code/license
|
|
*/
|
|
var n=t("jquery");n.fn.drag=function(t,e,i){var o="string"==typeof t?t:"",s=n.isFunction(t)?t:n.isFunction(e)?e:null;return 0!==o.indexOf("drag")&&(o="drag"+o),i=(t==s?e:i)||{},s?this.bind(o,i,s):this.trigger(o)};var o=n.event,s=o.special,r=s.drag={defaults:{which:1,distance:0,not:":input",handle:null,relative:!1,drop:!0,click:!1},datakey:"dragdata",noBubble:!0,add:function(t){var e=n.data(this,r.datakey),i=t.data||{};e.related+=1,n.each(r.defaults,function(t,n){void 0!==i[t]&&(e[t]=i[t])})},remove:function(){n.data(this,r.datakey).related-=1},setup:function(){if(!n.data(this,r.datakey)){var t=n.extend({related:0},r.defaults);n.data(this,r.datakey,t),o.add(this,"touchstart mousedown",r.init,t),this.attachEvent&&this.attachEvent("ondragstart",r.dontstart)}},teardown:function(){var t=n.data(this,r.datakey)||{};t.related||(n.removeData(this,r.datakey),o.remove(this,"touchstart mousedown",r.init),r.textselect(!0),this.detachEvent&&this.detachEvent("ondragstart",r.dontstart))},init:function(t){if(!r.touched){var e,i=t.data;if(!(0!=t.which&&i.which>0&&t.which!=i.which)&&!n(t.target).is(i.not)&&(!i.handle||n(t.target).closest(i.handle,t.currentTarget).length)&&(r.touched="touchstart"==t.type?this:null,i.propagates=1,i.mousedown=this,i.interactions=[r.interaction(this,i)],i.target=t.target,i.pageX=t.pageX,i.pageY=t.pageY,i.dragging=null,e=r.hijack(t,"draginit",i),i.propagates))return e=r.flatten(e),e&&e.length&&(i.interactions=[],n.each(e,function(){i.interactions.push(r.interaction(this,i))})),i.propagates=i.interactions.length,i.drop!==!1&&s.drop&&s.drop.handler(t,i),r.textselect(!1),r.touched?o.add(r.touched,"touchmove touchend",r.handler,i):o.add(document,"mousemove mouseup",r.handler,i),!(!r.touched||i.live)&&void 0}},interaction:function(t,e){var i=n(t)[e.relative?"position":"offset"]()||{top:0,left:0};return{drag:t,callback:new r.callback,droppable:[],offset:i}},handler:function(t){var e=t.data;switch(t.type){case!e.dragging&&"touchmove":t.preventDefault();case!e.dragging&&"mousemove":if(Math.pow(t.pageX-e.pageX,2)+Math.pow(t.pageY-e.pageY,2)<Math.pow(e.distance,2))break;t.target=e.target,r.hijack(t,"dragstart",e),e.propagates&&(e.dragging=!0);case"touchmove":t.preventDefault();case"mousemove":if(e.dragging){if(r.hijack(t,"drag",e),e.propagates){e.drop!==!1&&s.drop&&s.drop.handler(t,e);break}t.type="mouseup"}case"touchend":case"mouseup":default:r.touched?o.remove(r.touched,"touchmove touchend",r.handler):o.remove(document,"mousemove mouseup",r.handler),e.dragging&&(e.drop!==!1&&s.drop&&s.drop.handler(t,e),r.hijack(t,"dragend",e)),r.textselect(!0),e.click===!1&&e.dragging&&n.data(e.mousedown,"suppress.click",(new Date).getTime()+5),e.dragging=r.touched=!1}},hijack:function(t,e,i,s,a){if(i){var l,u,c,h={event:t.originalEvent,type:t.type},d=e.indexOf("drop")?"drag":"drop",p=s||0,f=isNaN(s)?i.interactions.length:s;t.type=e,t.originalEvent=null,i.results=[];do if(u=i.interactions[p]){if("dragend"!==e&&u.cancelled)continue;c=r.properties(t,i,u),u.results=[],n(a||u[d]||i.droppable).each(function(s,a){if(c.target=a,t.isPropagationStopped=function(){return!1},l=a?o.dispatch.call(a,t,c):null,l===!1?("drag"==d&&(u.cancelled=!0,i.propagates-=1),"drop"==e&&(u[d][s]=null)):"dropinit"==e&&u.droppable.push(r.element(l)||a),"dragstart"==e&&(u.proxy=n(r.element(l)||u.drag)[0]),u.results.push(l),delete t.result,"dropinit"!==e)return l}),i.results[p]=r.flatten(u.results),"dropinit"==e&&(u.droppable=r.flatten(u.droppable)),"dragstart"!=e||u.cancelled||c.update()}while(++p<f);return t.type=h.type,t.originalEvent=h.event,r.flatten(i.results)}},properties:function(t,e,i){var n=i.callback;return n.drag=i.drag,n.proxy=i.proxy||i.drag,n.startX=e.pageX,n.startY=e.pageY,n.deltaX=t.pageX-e.pageX,n.deltaY=t.pageY-e.pageY,n.originalX=i.offset.left,n.originalY=i.offset.top,n.offsetX=n.originalX+n.deltaX,n.offsetY=n.originalY+n.deltaY,n.drop=r.flatten((i.drop||[]).slice()),n.available=r.flatten((i.droppable||[]).slice()),n},element:function(t){if(t&&(t.jquery||1==t.nodeType))return t},flatten:function(t){return n.map(t,function(t){return t&&t.jquery?n.makeArray(t):t&&t.length?r.flatten(t):t})},textselect:function(t){n(document)[t?"unbind":"bind"]("selectstart",r.dontstart).css("MozUserSelect",t?"":"none"),document.unselectable=t?"off":"on"},dontstart:function(){return!1},callback:function(){}};r.callback.prototype={update:function(){s.drop&&this.available.length&&n.each(this.available,function(t){s.drop.locate(this,t)})}};var a=o.dispatch;o.dispatch=function(t){return n.data(this,"suppress."+t.type)-(new Date).getTime()>0?void n.removeData(this,"suppress."+t.type):a.apply(this,arguments)};var l=o.fixHooks.touchstart=o.fixHooks.touchmove=o.fixHooks.touchend=o.fixHooks.touchcancel={props:"clientX clientY pageX pageY screenX screenY".split(" "),filter:function(t,e){if(e){var i=e.touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0]||null;i&&n.each(l.props,function(e,n){t[n]=i[n]})}return t}};s.draginit=s.dragstart=s.dragend=r},{jquery:"jquery"}],jquery_event_drop:[function(t,e,i){/*!
|
|
* jquery.event.drop - v 2.2
|
|
* Copyright (c) 2010 Three Dub Media - http://threedubmedia.com
|
|
* Open Source MIT License - http://threedubmedia.com/code/license
|
|
*/
|
|
var n=t("jquery");t("jquery_event_drag");n.fn.drop=function(t,e,i){var o="string"==typeof t?t:"",s=n.isFunction(t)?t:n.isFunction(e)?e:null;return 0!==o.indexOf("drop")&&(o="drop"+o),i=(t==s?e:i)||{},s?this.bind(o,i,s):this.trigger(o)},n.drop=function(t){t=t||{},r.multi=t.multi===!0?1/0:t.multi===!1?1:isNaN(t.multi)?r.multi:t.multi,r.delay=t.delay||r.delay,r.tolerance=n.isFunction(t.tolerance)?t.tolerance:null===t.tolerance?null:r.tolerance,r.mode=t.mode||r.mode||"intersect"};var o=n.event,s=o.special,r=n.event.special.drop={multi:1,delay:20,mode:"overlap",targets:[],datakey:"dropdata",noBubble:!0,add:function(t){var e=n.data(this,r.datakey);e.related+=1},remove:function(){n.data(this,r.datakey).related-=1},setup:function(){if(!n.data(this,r.datakey)){var t={related:0,active:[],anyactive:0,winner:0,location:{}};n.data(this,r.datakey,t),r.targets.push(this)}},teardown:function(){var t=n.data(this,r.datakey)||{};if(!t.related){n.removeData(this,r.datakey);var e=this;r.targets=n.grep(r.targets,function(t){return t!==e})}},handler:function(t,e){var i;if(e)switch(t.type){case"mousedown":case"touchstart":i=n(r.targets),"string"==typeof e.drop&&(i=i.filter(e.drop)),i.each(function(){var t=n.data(this,r.datakey);t.active=[],t.anyactive=0,t.winner=0}),e.droppable=i,s.drag.hijack(t,"dropinit",e);break;case"mousemove":case"touchmove":r.event=t,r.timer||r.tolerate(e);break;case"mouseup":case"touchend":r.timer=clearTimeout(r.timer),e.propagates&&(s.drag.hijack(t,"drop",e),s.drag.hijack(t,"dropend",e))}},locate:function(t,e){var i=n.data(t,r.datakey),o=n(t),s=o.offset()||{},a=o.outerHeight(),l=o.outerWidth(),u={elem:t,width:l,height:a,top:s.top,left:s.left,right:s.left+l,bottom:s.top+a};return i&&(i.location=u,i.index=e,i.elem=t),u},contains:function(t,e){return(e[0]||e.left)>=t.left&&(e[0]||e.right)<=t.right&&(e[1]||e.top)>=t.top&&(e[1]||e.bottom)<=t.bottom},modes:{intersect:function(t,e,i){return this.contains(i,[t.pageX,t.pageY])?1e9:this.modes.overlap.apply(this,arguments)},overlap:function(t,e,i){return Math.max(0,Math.min(i.bottom,e.bottom)-Math.max(i.top,e.top))*Math.max(0,Math.min(i.right,e.right)-Math.max(i.left,e.left))},fit:function(t,e,i){return this.contains(i,e)?1:0},middle:function(t,e,i){return this.contains(i,[e.left+.5*e.width,e.top+.5*e.height])?1:0}},sort:function(t,e){return e.winner-t.winner||t.index-e.index},tolerate:function(t){var e,i,o,a,l,u,c,h,d=0,p=t.interactions.length,f=[r.event.pageX,r.event.pageY],m=r.tolerance||r.modes[r.mode];do if(h=t.interactions[d]){if(!h)return;h.drop=[],l=[],u=h.droppable.length,m&&(o=r.locate(h.proxy)),e=0;do if(c=h.droppable[e]){if(a=n.data(c,r.datakey),i=a.location,!i)continue;a.winner=m?m.call(r,r.event,o,i):r.contains(i,f)?1:0,l.push(a)}while(++e<u);l.sort(r.sort),e=0;do(a=l[e])&&(a.winner&&h.drop.length<r.multi?(a.active[d]||a.anyactive||(s.drag.hijack(r.event,"dropstart",t,d,a.elem)[0]!==!1?(a.active[d]=1,a.anyactive+=1):a.winner=0),a.winner&&h.drop.push(a.elem)):a.active[d]&&1==a.anyactive&&(s.drag.hijack(r.event,"dropend",t,d,a.elem),a.active[d]=0,a.anyactive-=1));while(++e<u)}while(++d<p);r.last&&f[0]==r.last.pageX&&f[1]==r.last.pageY?delete r.timer:r.timer=setTimeout(function(){r.tolerate(t)},r.delay),r.last=r.event}};s.dropinit=s.dropstart=s.dropend=r},{jquery:"jquery",jquery_event_drag:"jquery_event_drag"}],"slick_grid/plugins/slick.checkboxselectcolumn":[function(t,e,i){function n(t){function e(t){d=t,p.subscribe(d.onSelectedRowsChanged,n).subscribe(d.onClick,a).subscribe(d.onHeaderClick,u).subscribe(d.onKeyDown,r)}function i(){p.unsubscribeAll()}function n(t,e){var i,n,o=d.getSelectedRows(),s={};for(n=0;n<o.length;n++)i=o[n],s[i]=!0,s[i]!==f[i]&&(d.invalidateRow(i),delete f[i]);for(n in f)d.invalidateRow(n);f=s,d.render(),o.length&&o.length==d.getDataLength()?d.updateColumnHeader(g.columnId,"<input type='checkbox' checked='checked'>",g.toolTip):d.updateColumnHeader(g.columnId,"<input type='checkbox'>",g.toolTip)}function r(t,e){32==t.which&&d.getColumns()[e.cell].id===g.columnId&&(d.getEditorLock().isActive()&&!d.getEditorLock().commitCurrentEdit()||l(e.row),t.preventDefault(),t.stopImmediatePropagation())}function a(t,e){if(d.getColumns()[e.cell].id===g.columnId&&o(t.target).is(":checkbox")){if(d.getEditorLock().isActive()&&!d.getEditorLock().commitCurrentEdit())return t.preventDefault(),void t.stopImmediatePropagation();l(e.row),t.stopPropagation(),t.stopImmediatePropagation()}}function l(t){f[t]?d.setSelectedRows(o.grep(d.getSelectedRows(),function(e){return e!=t})):d.setSelectedRows(d.getSelectedRows().concat(t))}function u(t,e){if(e.column.id==g.columnId&&o(t.target).is(":checkbox")){if(d.getEditorLock().isActive()&&!d.getEditorLock().commitCurrentEdit())return t.preventDefault(),void t.stopImmediatePropagation();if(o(t.target).is(":checked")){for(var i=[],n=0;n<d.getDataLength();n++)i.push(n);d.setSelectedRows(i)}else d.setSelectedRows([]);t.stopPropagation(),t.stopImmediatePropagation()}}function c(){return{id:g.columnId,name:"<input type='checkbox'>",toolTip:g.toolTip,field:"sel",width:g.width,resizable:!1,sortable:!1,cssClass:g.cssClass,formatter:h}}function h(t,e,i,n,o){return o?f[t]?"<input type='checkbox' checked='checked'>":"<input type='checkbox'>":null}var d,p=new s.EventHandler,f={},m={columnId:"_checkbox_selector",cssClass:null,toolTip:"Select/Deselect All",width:30},g=o.extend(!0,{},m,t);o.extend(this,{init:e,destroy:i,getColumnDefinition:c})}var o=t("jquery"),s=t("../slick.core");e.exports=n},{"../slick.core":"slick_grid/slick.core",jquery:"jquery"}],"slick_grid/plugins/slick.rowselectionmodel":[function(t,e,i){function n(t){function e(e){_=o.extend(!0,{},k,t),g=e,w.subscribe(g.onActiveCellChanged,n(p)),w.subscribe(g.onKeyDown,n(f)),w.subscribe(g.onClick,n(m))}function i(){w.unsubscribeAll()}function n(t){return function(){v||(v=!0,t.apply(this,arguments),v=!1)}}function r(t){for(var e=[],i=0;i<t.length;i++)for(var n=t[i].fromRow;n<=t[i].toRow;n++)e.push(n);return e}function a(t){for(var e=[],i=g.getColumns().length-1,n=0;n<t.length;n++)e.push(new s.Range(t[n],0,t[n],i));return e}function l(t,e){var i,n=[];for(i=t;i<=e;i++)n.push(i);for(i=e;i<t;i++)n.push(i);return n}function u(){return r(b)}function c(t){h(a(t))}function h(t){b=t,y.onSelectedRangesChanged.notify(b)}function d(){return b}function p(t,e){_.selectActiveRow&&null!=e.row&&h([new s.Range(e.row,0,e.row,g.getColumns().length-1)])}function f(t){var e=g.getActiveCell();if(e&&t.shiftKey&&!t.ctrlKey&&!t.altKey&&!t.metaKey&&(38==t.which||40==t.which)){var i=u();i.sort(function(t,e){return t-e}),i.length||(i=[e.row]);var n,o=i[0],s=i[i.length-1];n=40==t.which?e.row<s||o==s?++s:++o:e.row<s?--s:--o,n>=0&&n<g.getDataLength()&&(g.scrollRowIntoView(n),b=a(l(o,s)),h(b)),t.preventDefault(),t.stopPropagation()}}function m(t){var e=g.getCellFromEvent(t);if(!e||!g.canCellBeActive(e.row,e.cell))return!1;if(!g.getOptions().multiSelect||!t.ctrlKey&&!t.shiftKey&&!t.metaKey)return!1;var i=r(b),n=o.inArray(e.row,i);if(n===-1&&(t.ctrlKey||t.metaKey))i.push(e.row),g.setActiveCell(e.row,e.cell);else if(n!==-1&&(t.ctrlKey||t.metaKey))i=o.grep(i,function(t,i){return t!==e.row}),g.setActiveCell(e.row,e.cell);else if(i.length&&t.shiftKey){var s=i.pop(),l=Math.min(e.row,s),u=Math.max(e.row,s);i=[];for(var c=l;c<=u;c++)c!==s&&i.push(c);i.push(s),g.setActiveCell(e.row,e.cell)}return b=a(i),h(b),t.stopImmediatePropagation(),!0}var g,v,_,b=[],y=this,w=new s.EventHandler,k={selectActiveRow:!0};o.extend(this,{getSelectedRows:u,setSelectedRows:c,getSelectedRanges:d,setSelectedRanges:h,init:e,destroy:i,onSelectedRangesChanged:new s.Event})}var o=t("jquery"),s=t("../slick.core");e.exports=n},{"../slick.core":"slick_grid/slick.core",jquery:"jquery"}],"slick_grid/slick.core":[function(t,e,i){function n(){var t=!1,e=!1;this.stopPropagation=function(){t=!0},this.isPropagationStopped=function(){return t},this.stopImmediatePropagation=function(){e=!0},this.isImmediatePropagationStopped=function(){return e}}function o(){var t=[];this.subscribe=function(e){t.push(e)},this.unsubscribe=function(e){for(var i=t.length-1;i>=0;i--)t[i]===e&&t.splice(i,1)},this.notify=function(e,i,o){i=i||new n,o=o||this;for(var s,r=0;r<t.length&&!i.isPropagationStopped()&&!i.isImmediatePropagationStopped();r++)s=t[r].call(o,i,e);return s}}function s(){var t=[];this.subscribe=function(e,i){return t.push({event:e,handler:i}),e.subscribe(i),this},this.unsubscribe=function(e,i){for(var n=t.length;n--;)if(t[n].event===e&&t[n].handler===i)return t.splice(n,1),void e.unsubscribe(i);return this},this.unsubscribeAll=function(){for(var e=t.length;e--;)t[e].event.unsubscribe(t[e].handler);return t=[],this}}function r(t,e,i,n){void 0===i&&void 0===n&&(i=t,n=e),this.fromRow=Math.min(t,i),this.fromCell=Math.min(e,n),this.toRow=Math.max(t,i),this.toCell=Math.max(e,n),this.isSingleRow=function(){return this.fromRow==this.toRow},this.isSingleCell=function(){return this.fromRow==this.toRow&&this.fromCell==this.toCell},this.contains=function(t,e){return t>=this.fromRow&&t<=this.toRow&&e>=this.fromCell&&e<=this.toCell},this.toString=function(){return this.isSingleCell()?"("+this.fromRow+":"+this.fromCell+")":"("+this.fromRow+":"+this.fromCell+" - "+this.toRow+":"+this.toCell+")"}}function a(){this.__nonDataRow=!0}function l(){this.__group=!0,this.level=0,this.count=0,this.value=null,this.title=null,this.collapsed=!1,this.totals=null,this.rows=[],this.groups=null,this.groupingKey=null}function u(){this.__groupTotals=!0,this.group=null,this.initialized=!1}function c(){var t=null;this.isActive=function(e){return e?t===e:null!==t},this.activate=function(e){if(e!==t){if(null!==t)throw"SlickGrid.EditorLock.activate: an editController is still active, can't activate another editController";if(!e.commitCurrentEdit)throw"SlickGrid.EditorLock.activate: editController must implement .commitCurrentEdit()";if(!e.cancelCurrentEdit)throw"SlickGrid.EditorLock.activate: editController must implement .cancelCurrentEdit()";t=e}},this.deactivate=function(e){if(t!==e)throw"SlickGrid.EditorLock.deactivate: specified editController is not the currently active one";t=null},this.commitCurrentEdit=function(){return!t||t.commitCurrentEdit()},this.cancelCurrentEdit=function(){return!t||t.cancelCurrentEdit()}}var h=(t("jquery"),{Event:o,EventData:n,EventHandler:s,Range:r,NonDataRow:a,Group:l,GroupTotals:u,EditorLock:c,GlobalEditorLock:new c});l.prototype=new a,l.prototype.equals=function(t){return this.value===t.value&&this.count===t.count&&this.collapsed===t.collapsed&&this.title===t.title},u.prototype=new a,e.exports=h},{jquery:"jquery"}],"slick_grid/slick.grid":[function(require,module,exports){function SlickGrid(container,data,columns,options){function init(){if($container=$(container),$container.length<1)throw new Error("SlickGrid requires a valid container, "+container+" does not exist in the DOM.");maxSupportedCssHeight=maxSupportedCssHeight||getMaxSupportedCssHeight(),scrollbarDimensions=scrollbarDimensions||measureScrollbar(),options=$.extend({},defaults,options),validateAndEnforceOptions(),columnDefaults.width=options.defaultColumnWidth,columnsById={};for(var t=0;t<columns.length;t++){var e=columns[t]=$.extend({},columnDefaults,columns[t]);columnsById[e.id]=t,e.minWidth&&e.width<e.minWidth&&(e.width=e.minWidth),e.maxWidth&&e.width>e.maxWidth&&(e.width=e.maxWidth)}if(options.enableColumnReorder&&!$.fn.sortable)throw new Error("SlickGrid's 'enableColumnReorder = true' option requires jquery-ui.sortable module to be loaded");editController={commitCurrentEdit:commitCurrentEdit,cancelCurrentEdit:cancelCurrentEdit},$container.empty().css("overflow","hidden").css("outline",0).addClass(uid).addClass("bk-ui-widget"),/relative|absolute|fixed/.test($container.css("position"))||$container.css("position","relative"),$focusSink=$("<div tabIndex='0' hideFocus style='position:fixed;width:0;height:0;top:0;left:0;outline:0;'></div>").appendTo($container),$headerScroller=$("<div class='bk-slick-header bk-ui-state-default' style='overflow:hidden;position:relative;' />").appendTo($container),$headers=$("<div class='bk-slick-header-columns' style='left:-1000px' />").appendTo($headerScroller),$headers.width(getHeadersWidth()),$headerRowScroller=$("<div class='bk-slick-headerrow bk-ui-state-default' style='overflow:hidden;position:relative;' />").appendTo($container),$headerRow=$("<div class='bk-slick-headerrow-columns' />").appendTo($headerRowScroller),$headerRowSpacer=$("<div style='display:block;height:1px;position:absolute;top:0;left:0;'></div>").css("width",getCanvasWidth()+scrollbarDimensions.width+"px").appendTo($headerRowScroller),$topPanelScroller=$("<div class='bk-slick-top-panel-scroller bk-ui-state-default' style='overflow:hidden;position:relative;' />").appendTo($container),$topPanel=$("<div class='bk-slick-top-panel' style='width:10000px' />").appendTo($topPanelScroller),options.showTopPanel||$topPanelScroller.hide(),options.showHeaderRow||$headerRowScroller.hide(),$viewport=$("<div class='bk-slick-viewport' style='width:100%;overflow:auto;outline:0;position:relative;;'>").appendTo($container),$viewport.css("overflow-y",options.autoHeight?"hidden":"auto"),$canvas=$("<div class='grid-canvas' />").appendTo($viewport),$focusSink2=$focusSink.clone().appendTo($container),options.explicitInitialization||finishInitialization()}function finishInitialization(){initialized||(initialized=!0,viewportW=parseFloat($.css($container[0],"width",!0)),measureCellPaddingAndBorder(),disableSelection($headers),options.enableTextSelectionOnCells||$viewport.bind("selectstart.ui",function(t){return $(t.target).is("input,textarea")}),updateColumnCaches(),createColumnHeaders(),setupColumnSort(),createCssRules(),resizeCanvas(),bindAncestorScrollEvents(),$container.bind("resize.bk-slickgrid",resizeCanvas),$viewport.bind("scroll",handleScroll),$headerScroller.bind("contextmenu",handleHeaderContextMenu).bind("click",handleHeaderClick).delegate(".bk-slick-header-column","mouseenter",handleHeaderMouseEnter).delegate(".bk-slick-header-column","mouseleave",handleHeaderMouseLeave),$headerRowScroller.bind("scroll",handleHeaderRowScroll),$focusSink.add($focusSink2).bind("keydown",handleKeyDown),$canvas.bind("keydown",handleKeyDown).bind("click",handleClick).bind("dblclick",handleDblClick).bind("contextmenu",handleContextMenu).bind("draginit",handleDragInit).bind("dragstart",{distance:3},handleDragStart).bind("drag",handleDrag).bind("dragend",handleDragEnd).delegate(".bk-slick-cell","mouseenter",handleMouseEnter).delegate(".bk-slick-cell","mouseleave",handleMouseLeave),navigator.userAgent.toLowerCase().match(/webkit/)&&navigator.userAgent.toLowerCase().match(/macintosh/)&&$canvas.bind("mousewheel",handleMouseWheel))}function registerPlugin(t){plugins.unshift(t),t.init(self)}function unregisterPlugin(t){for(var e=plugins.length;e>=0;e--)if(plugins[e]===t){plugins[e].destroy&&plugins[e].destroy(),plugins.splice(e,1);break}}function setSelectionModel(t){selectionModel&&(selectionModel.onSelectedRangesChanged.unsubscribe(handleSelectedRangesChanged),selectionModel.destroy&&selectionModel.destroy()),selectionModel=t,selectionModel&&(selectionModel.init(self),selectionModel.onSelectedRangesChanged.subscribe(handleSelectedRangesChanged))}function getSelectionModel(){return selectionModel}function getCanvasNode(){return $canvas[0]}function measureScrollbar(){var t=$("<div style='position:absolute; top:-10000px; left:-10000px; width:100px; height:100px; overflow:scroll;'></div>").appendTo("body"),e={width:t.width()-t[0].clientWidth,height:t.height()-t[0].clientHeight};return t.remove(),e}function getHeadersWidth(){for(var t=0,e=0,i=columns.length;e<i;e++){var n=columns[e].width;t+=n}return t+=scrollbarDimensions.width,Math.max(t,viewportW)+1e3}function getCanvasWidth(){for(var t=viewportHasVScroll?viewportW-scrollbarDimensions.width:viewportW,e=0,i=columns.length;i--;)e+=columns[i].width;return options.fullWidthRows?Math.max(e,t):e}function updateCanvasWidth(t){var e=canvasWidth;canvasWidth=getCanvasWidth(),canvasWidth!=e&&($canvas.width(canvasWidth),$headerRow.width(canvasWidth),$headers.width(getHeadersWidth()),viewportHasHScroll=canvasWidth>viewportW-scrollbarDimensions.width),$headerRowSpacer.width(canvasWidth+(viewportHasVScroll?scrollbarDimensions.width:0)),(canvasWidth!=e||t)&&applyColumnWidths()}function disableSelection(t){t&&t.jquery&&t.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return!1})}function getMaxSupportedCssHeight(){for(var t=1e6,e=navigator.userAgent.toLowerCase().match(/firefox/)?6e6:1e9,i=$("<div style='display:none' />").appendTo(document.body);;){var n=2*t;if(i.css("height",n),n>e||i.height()!==n)break;t=n}return i.remove(),t}function bindAncestorScrollEvents(){for(var t=$canvas[0];(t=t.parentNode)!=document.body&&null!=t;)if(t==$viewport[0]||t.scrollWidth!=t.clientWidth||t.scrollHeight!=t.clientHeight){var e=$(t);$boundAncestors=$boundAncestors?$boundAncestors.add(e):e,e.bind("scroll."+uid,handleActiveCellPositionChange)}}function unbindAncestorScrollEvents(){$boundAncestors&&($boundAncestors.unbind("scroll."+uid),$boundAncestors=null)}function updateColumnHeader(t,e,i){if(initialized){var n=getColumnIndex(t);if(null!=n){var o=columns[n],s=$headers.children().eq(n);s&&(void 0!==e&&(columns[n].name=e),void 0!==i&&(columns[n].toolTip=i),trigger(self.onBeforeHeaderCellDestroy,{node:s[0],column:o}),s.attr("title",i||"").children().eq(0).html(e),trigger(self.onHeaderCellRendered,{node:s[0],column:o}))}}}function getHeaderRow(){return $headerRow[0]}function getHeaderRowColumn(t){var e=getColumnIndex(t),i=$headerRow.children().eq(e);return i&&i[0]}function createColumnHeaders(){function t(){$(this).addClass("bk-ui-state-hover")}function e(){$(this).removeClass("bk-ui-state-hover")}$headers.find(".bk-slick-header-column").each(function(){var t=$(this).data("column");t&&trigger(self.onBeforeHeaderCellDestroy,{node:this,column:t})}),$headers.empty(),$headers.width(getHeadersWidth()),$headerRow.find(".bk-slick-headerrow-column").each(function(){var t=$(this).data("column");t&&trigger(self.onBeforeHeaderRowCellDestroy,{node:this,column:t})}),$headerRow.empty();for(var i=0;i<columns.length;i++){var n=columns[i],o=$("<div class='bk-ui-state-default bk-slick-header-column' />").html("<span class='bk-slick-column-name'>"+n.name+"</span>").width(n.width-headerColumnWidthDiff).attr("id",""+uid+n.id).attr("title",n.toolTip||"").data("column",n).addClass(n.headerCssClass||"").appendTo($headers);if((options.enableColumnReorder||n.sortable)&&o.on("mouseenter",t).on("mouseleave",e),n.sortable&&(o.addClass("bk-slick-header-sortable"),o.append("<span class='bk-slick-sort-indicator' />")),trigger(self.onHeaderCellRendered,{node:o[0],column:n}),options.showHeaderRow){var s=$("<div class='bk-ui-state-default bk-slick-headerrow-column l"+i+" r"+i+"'></div>").data("column",n).appendTo($headerRow);trigger(self.onHeaderRowCellRendered,{node:s[0],column:n})}}setSortColumns(sortColumns),setupColumnResize(),options.enableColumnReorder&&setupColumnReorder()}function setupColumnSort(){$headers.click(function(t){if(t.metaKey=t.metaKey||t.ctrlKey,!$(t.target).hasClass("bk-slick-resizable-handle")){var e=$(t.target).closest(".bk-slick-header-column");if(e.length){var i=e.data("column");if(i.sortable){if(!getEditorLock().commitCurrentEdit())return;for(var n=null,o=0;o<sortColumns.length;o++)if(sortColumns[o].columnId==i.id){n=sortColumns[o],n.sortAsc=!n.sortAsc;break}t.metaKey&&options.multiColumnSort?n&&sortColumns.splice(o,1):((t.shiftKey||t.metaKey)&&options.multiColumnSort||(sortColumns=[]),n?0==sortColumns.length&&sortColumns.push(n):(n={columnId:i.id,sortAsc:i.defaultSortAsc},sortColumns.push(n))),setSortColumns(sortColumns),options.multiColumnSort?trigger(self.onSort,{multiColumnSort:!0,sortCols:$.map(sortColumns,function(t){return{sortCol:columns[getColumnIndex(t.columnId)],sortAsc:t.sortAsc}})},t):trigger(self.onSort,{multiColumnSort:!1,sortCol:i,sortAsc:n.sortAsc},t)}}}})}function setupColumnReorder(){$headers.filter(":ui-sortable").sortable("destroy"),$headers.sortable({containment:"parent",distance:3,axis:"x",cursor:"default",tolerance:"intersection",helper:"clone",placeholder:"bk-slick-sortable-placeholder bk-ui-state-default bk-slick-header-column",start:function(t,e){e.placeholder.width(e.helper.outerWidth()-headerColumnWidthDiff),$(e.helper).addClass("bk-slick-header-column-active")},beforeStop:function(t,e){$(e.helper).removeClass("bk-slick-header-column-active")},stop:function(t){if(!getEditorLock().commitCurrentEdit())return void $(this).sortable("cancel");for(var e=$headers.sortable("toArray"),i=[],n=0;n<e.length;n++)i.push(columns[getColumnIndex(e[n].replace(uid,""))]);setColumns(i),trigger(self.onColumnsReordered,{}),t.stopPropagation(),setupColumnResize()}})}function setupColumnResize(){var t,e,i,n,o,s,r,a,l;o=$headers.children(),o.find(".bk-slick-resizable-handle").remove(),o.each(function(t,e){columns[t].resizable&&(void 0===a&&(a=t),l=t)}),void 0!==a&&o.each(function(u,c){u<a||options.forceFitColumns&&u>=l||(t=$(c),$("<div class='bk-slick-resizable-handle' />").appendTo(c).bind("dragstart",function(t,a){if(!getEditorLock().commitCurrentEdit())return!1;n=t.pageX,$(this).parent().addClass("bk-slick-header-column-active");var l=null,c=null;if(o.each(function(t,e){columns[t].previousWidth=$(e).outerWidth()}),options.forceFitColumns)for(l=0,c=0,e=u+1;e<o.length;e++)i=columns[e],i.resizable&&(null!==c&&(i.maxWidth?c+=i.maxWidth-i.previousWidth:c=null),l+=i.previousWidth-Math.max(i.minWidth||0,absoluteColumnMinWidth));var h=0,d=0;for(e=0;e<=u;e++)i=columns[e],i.resizable&&(null!==d&&(i.maxWidth?d+=i.maxWidth-i.previousWidth:d=null),h+=i.previousWidth-Math.max(i.minWidth||0,absoluteColumnMinWidth));null===l&&(l=1e5),null===h&&(h=1e5),null===c&&(c=1e5),null===d&&(d=1e5),r=n+Math.min(l,d),s=n-Math.min(h,c)}).bind("drag",function(t,a){var l,c,h=Math.min(r,Math.max(s,t.pageX))-n;if(h<0){for(c=h,e=u;e>=0;e--)i=columns[e],i.resizable&&(l=Math.max(i.minWidth||0,absoluteColumnMinWidth),c&&i.previousWidth+c<l?(c+=i.previousWidth-l,i.width=l):(i.width=i.previousWidth+c,c=0));if(options.forceFitColumns)for(c=-h,e=u+1;e<o.length;e++)i=columns[e],i.resizable&&(c&&i.maxWidth&&i.maxWidth-i.previousWidth<c?(c-=i.maxWidth-i.previousWidth,i.width=i.maxWidth):(i.width=i.previousWidth+c,c=0))}else{for(c=h,e=u;e>=0;e--)i=columns[e],i.resizable&&(c&&i.maxWidth&&i.maxWidth-i.previousWidth<c?(c-=i.maxWidth-i.previousWidth,i.width=i.maxWidth):(i.width=i.previousWidth+c,c=0));if(options.forceFitColumns)for(c=-h,e=u+1;e<o.length;e++)i=columns[e],i.resizable&&(l=Math.max(i.minWidth||0,absoluteColumnMinWidth),c&&i.previousWidth+c<l?(c+=i.previousWidth-l,i.width=l):(i.width=i.previousWidth+c,c=0))}applyColumnHeaderWidths(),options.syncColumnCellResize&&applyColumnWidths()}).bind("dragend",function(t,n){var s;for($(this).parent().removeClass("bk-slick-header-column-active"),e=0;e<o.length;e++)i=columns[e],s=$(o[e]).outerWidth(),i.previousWidth!==s&&i.rerenderOnResize&&invalidateAllRows();updateCanvasWidth(!0),render(),trigger(self.onColumnsResized,{})}))})}function getVBoxDelta(t){var e=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],i=0;return $.each(e,function(e,n){i+=parseFloat(t.css(n))||0}),i}function measureCellPaddingAndBorder(){var t,e=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],i=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"];t=$("<div class='bk-ui-state-default bk-slick-header-column' style='visibility:hidden'>-</div>").appendTo($headers),headerColumnWidthDiff=headerColumnHeightDiff=0,"border-box"!=t.css("box-sizing")&&"border-box"!=t.css("-moz-box-sizing")&&"border-box"!=t.css("-webkit-box-sizing")&&($.each(e,function(e,i){headerColumnWidthDiff+=parseFloat(t.css(i))||0}),$.each(i,function(e,i){headerColumnHeightDiff+=parseFloat(t.css(i))||0})),t.remove();var n=$("<div class='bk-slick-row' />").appendTo($canvas);t=$("<div class='bk-slick-cell' id='' style='visibility:hidden'>-</div>").appendTo(n),cellWidthDiff=cellHeightDiff=0,"border-box"!=t.css("box-sizing")&&"border-box"!=t.css("-moz-box-sizing")&&"border-box"!=t.css("-webkit-box-sizing")&&($.each(e,function(e,i){cellWidthDiff+=parseFloat(t.css(i))||0}),$.each(i,function(e,i){cellHeightDiff+=parseFloat(t.css(i))||0})),n.remove(),absoluteColumnMinWidth=Math.max(headerColumnWidthDiff,cellWidthDiff)}function createCssRules(){$style=$("<style type='text/css' rel='stylesheet' />").appendTo($("head"));for(var t=options.rowHeight-cellHeightDiff,e=["."+uid+" .bk-slick-header-column { left: 1000px; }","."+uid+" .bk-slick-top-panel { height:"+options.topPanelHeight+"px; }","."+uid+" .bk-slick-headerrow-columns { height:"+options.headerRowHeight+"px; }","."+uid+" .bk-slick-cell { height:"+t+"px; }","."+uid+" .bk-slick-row { height:"+options.rowHeight+"px; }"],i=0;i<columns.length;i++)e.push("."+uid+" .l"+i+" { }"),e.push("."+uid+" .r"+i+" { }");$style[0].styleSheet?$style[0].styleSheet.cssText=e.join(" "):$style[0].appendChild(document.createTextNode(e.join(" ")))}function getColumnCssRules(t){if(!stylesheet){for(var e=document.styleSheets,i=0;i<e.length;i++)if((e[i].ownerNode||e[i].owningElement)==$style[0]){stylesheet=e[i];break}if(!stylesheet)throw new Error("Cannot find stylesheet.");columnCssRulesL=[],columnCssRulesR=[];for(var n,o,s=stylesheet.cssRules||stylesheet.rules,i=0;i<s.length;i++){var r=s[i].selectorText;(n=/\.l\d+/.exec(r))?(o=parseInt(n[0].substr(2,n[0].length-2),10),columnCssRulesL[o]=s[i]):(n=/\.r\d+/.exec(r))&&(o=parseInt(n[0].substr(2,n[0].length-2),10),columnCssRulesR[o]=s[i])}}return{left:columnCssRulesL[t],right:columnCssRulesR[t]}}function removeCssRules(){$style.remove(),stylesheet=null}function destroy(){getEditorLock().cancelCurrentEdit(),trigger(self.onBeforeDestroy,{});for(var t=plugins.length;t--;)unregisterPlugin(plugins[t]);options.enableColumnReorder&&$headers.filter(":ui-sortable").sortable("destroy"),unbindAncestorScrollEvents(),$container.unbind(".bk-slickgrid"),removeCssRules(),$canvas.unbind("draginit dragstart dragend drag"),$container.empty().removeClass(uid)}function trigger(t,e,i){return i=i||new Slick.EventData,e=e||{},e.grid=self,t.notify(e,i,self)}function getEditorLock(){return options.editorLock}function getEditController(){return editController}function getColumnIndex(t){return columnsById[t]}function autosizeColumns(){var t,e,i,n=[],o=0,s=0,r=viewportHasVScroll?viewportW-scrollbarDimensions.width:viewportW;for(t=0;t<columns.length;t++)e=columns[t],n.push(e.width),s+=e.width,e.resizable&&(o+=e.width-Math.max(e.minWidth,absoluteColumnMinWidth));for(i=s;s>r&&o;){var a=(s-r)/o;for(t=0;t<columns.length&&s>r;t++){e=columns[t];var l=n[t];if(!(!e.resizable||l<=e.minWidth||l<=absoluteColumnMinWidth)){var u=Math.max(e.minWidth,absoluteColumnMinWidth),c=Math.floor(a*(l-u))||1;c=Math.min(c,l-u),s-=c,o-=c,n[t]-=c}}if(i<=s)break;i=s}for(i=s;s<r;){var h=r/s;for(t=0;t<columns.length&&s<r;t++){e=columns[t];var d,p=n[t];d=!e.resizable||e.maxWidth<=p?0:Math.min(Math.floor(h*p)-p,e.maxWidth-p||1e6)||1,s+=d,n[t]+=d}if(i>=s)break;i=s}var f=!1;for(t=0;t<columns.length;t++)columns[t].rerenderOnResize&&columns[t].width!=n[t]&&(f=!0),columns[t].width=n[t];applyColumnHeaderWidths(),updateCanvasWidth(!0),f&&(invalidateAllRows(),render())}function applyColumnHeaderWidths(){if(initialized){for(var t,e=0,i=$headers.children(),n=i.length;e<n;e++)t=$(i[e]),t.width()!==columns[e].width-headerColumnWidthDiff&&t.width(columns[e].width-headerColumnWidthDiff);updateColumnCaches()}}function applyColumnWidths(){for(var t,e,i=0,n=0;n<columns.length;n++)t=columns[n].width,e=getColumnCssRules(n),e.left.style.left=i+"px",e.right.style.right=canvasWidth-i-t+"px",i+=columns[n].width}function setSortColumn(t,e){setSortColumns([{columnId:t,sortAsc:e}])}function setSortColumns(t){sortColumns=t;var e=$headers.children();e.removeClass("bk-slick-header-column-sorted").find(".bk-slick-sort-indicator").removeClass("bk-slick-sort-indicator-asc bk-slick-sort-indicator-desc"),$.each(sortColumns,function(t,i){null==i.sortAsc&&(i.sortAsc=!0);var n=getColumnIndex(i.columnId);null!=n&&e.eq(n).addClass("bk-slick-header-column-sorted").find(".bk-slick-sort-indicator").addClass(i.sortAsc?"bk-slick-sort-indicator-asc":"bk-slick-sort-indicator-desc")})}function getSortColumns(){return sortColumns}function handleSelectedRangesChanged(t,e){selectedRows=[];for(var i={},n=0;n<e.length;n++)for(var o=e[n].fromRow;o<=e[n].toRow;o++){i[o]||(selectedRows.push(o),i[o]={});for(var s=e[n].fromCell;s<=e[n].toCell;s++)canCellBeSelected(o,s)&&(i[o][columns[s].id]=options.selectedCellCssClass)}setCellCssStyles(options.selectedCellCssClass,i),trigger(self.onSelectedRowsChanged,{rows:getSelectedRows()},t)}function getColumns(){return columns}function updateColumnCaches(){columnPosLeft=[],columnPosRight=[];for(var t=0,e=0,i=columns.length;e<i;e++)columnPosLeft[e]=t,columnPosRight[e]=t+columns[e].width,t+=columns[e].width}function setColumns(t){columns=t,columnsById={};for(var e=0;e<columns.length;e++){var i=columns[e]=$.extend({},columnDefaults,columns[e]);columnsById[i.id]=e,i.minWidth&&i.width<i.minWidth&&(i.width=i.minWidth),i.maxWidth&&i.width>i.maxWidth&&(i.width=i.maxWidth)}updateColumnCaches(),initialized&&(invalidateAllRows(),createColumnHeaders(),removeCssRules(),createCssRules(),resizeCanvas(),applyColumnWidths(),handleScroll())}function getOptions(){return options}function setOptions(t){getEditorLock().commitCurrentEdit()&&(makeActiveCellNormal(),options.enableAddRow!==t.enableAddRow&&invalidateRow(getDataLength()),options=$.extend(options,t),validateAndEnforceOptions(),$viewport.css("overflow-y",options.autoHeight?"hidden":"auto"),render())}function validateAndEnforceOptions(){options.autoHeight&&(options.leaveSpaceForNewRows=!1)}function setData(t,e){data=t,invalidateAllRows(),updateRowCount(),e&&scrollTo(0)}function getData(){return data}function getDataLength(){return data.getLength?data.getLength():data.length}function getDataLengthIncludingAddNew(){return getDataLength()+(options.enableAddRow?1:0)}function getDataItem(t){return data.getItem?data.getItem(t):data[t]}function getTopPanel(){return $topPanel[0]}function setTopPanelVisibility(t){options.showTopPanel!=t&&(options.showTopPanel=t,t?$topPanelScroller.slideDown("fast",resizeCanvas):$topPanelScroller.slideUp("fast",resizeCanvas))}function setHeaderRowVisibility(t){options.showHeaderRow!=t&&(options.showHeaderRow=t,t?$headerRowScroller.slideDown("fast",resizeCanvas):$headerRowScroller.slideUp("fast",resizeCanvas))}function getContainerNode(){return $container.get(0)}function getRowTop(t){return options.rowHeight*t-offset}function getRowFromPosition(t){return Math.floor((t+offset)/options.rowHeight)}function scrollTo(t){t=Math.max(t,0),t=Math.min(t,th-viewportH+(viewportHasHScroll?scrollbarDimensions.height:0));var e=offset;page=Math.min(n-1,Math.floor(t/ph)),offset=Math.round(page*cj);var i=t-offset;if(offset!=e){var o=getVisibleRange(i);cleanupRows(o),updateRowPositions()}prevScrollTop!=i&&(vScrollDir=prevScrollTop+e<i+offset?1:-1,$viewport[0].scrollTop=lastRenderedScrollTop=scrollTop=prevScrollTop=i,trigger(self.onViewportChanged,{}))}function defaultFormatter(t,e,i,n,o){return null==i?"":(i+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function getFormatter(t,e){var i=data.getItemMetadata&&data.getItemMetadata(t),n=i&&i.columns&&(i.columns[e.id]||i.columns[getColumnIndex(e.id)]),o=n&&n.formatter||i&&i.formatter||e.formatter||options.formatterFactory&&options.formatterFactory.getFormatter(e)||options.defaultFormatter;if(void 0!==o.format){var s=o,r=function(t,e,i,n,o){return s.format(t,e,i,n,o)};o=r}return o}function getEditor(t,e){var i,n=columns[e],o=data.getItemMetadata&&data.getItemMetadata(t),s=o&&o.columns;return i=s&&s[n.id]&&void 0!==s[n.id].editor?s[n.id].editor:s&&s[e]&&void 0!==s[e].editor?s[e].editor:n.editor||options.editorFactory&&options.editorFactory.getEditor(n),void 0!==i.default_view&&(i=i.default_view),
|
|
i}function getDataItemValueForColumn(t,e){return options.dataItemColumnValueExtractor?options.dataItemColumnValueExtractor(t,e):t[e.field]}function appendRowHtml(t,e,i,n){var o=getDataItem(e),s=e<n&&!o,r="bk-slick-row"+(s?" loading":"")+(e===activeRow?" active":"")+(e%2==1?" odd":" even");o||(r+=" "+options.addNewRowCssClass);var a=data.getItemMetadata&&data.getItemMetadata(e);a&&a.cssClasses&&(r+=" "+a.cssClasses),t.push("<div class='bk-ui-widget-content "+r+"' style='top:"+getRowTop(e)+"px'>");for(var l,u,c=0,h=columns.length;c<h;c++){if(u=columns[c],l=1,a&&a.columns){var d=a.columns[u.id]||a.columns[c];l=d&&d.colspan||1,"*"===l&&(l=h-c)}if(columnPosRight[Math.min(h-1,c+l-1)]>i.leftPx){if(columnPosLeft[c]>i.rightPx)break;appendCellHtml(t,e,c,l,o)}l>1&&(c+=l-1)}t.push("</div>")}function appendCellHtml(t,e,i,n,o){var s=columns[i],r="bk-slick-cell l"+i+" r"+Math.min(columns.length-1,i+n-1)+(s.cssClass?" "+s.cssClass:"");e===activeRow&&i===activeCell&&(r+=" active");for(var a in cellCssClasses)cellCssClasses[a][e]&&cellCssClasses[a][e][s.id]&&(r+=" "+cellCssClasses[a][e][s.id]);if(t.push("<div class='"+r+"'>"),o){var l=getDataItemValueForColumn(o,s);t.push(getFormatter(e,s)(e,i,l,s,o))}t.push("</div>"),rowsCache[e].cellRenderQueue.push(i),rowsCache[e].cellColSpans[i]=n}function cleanupRows(t){for(var e in rowsCache)(e=parseInt(e,10))!==activeRow&&(e<t.top||e>t.bottom)&&removeRowFromCache(e)}function invalidate(){updateRowCount(),invalidateAllRows(),render()}function invalidateAllRows(){currentEditor&&makeActiveCellNormal();for(var t in rowsCache)removeRowFromCache(t)}function removeRowFromCache(t){var e=rowsCache[t];e&&(rowNodeFromLastMouseWheelEvent==e.rowNode?(e.rowNode.style.display="none",zombieRowNodeFromLastMouseWheelEvent=rowNodeFromLastMouseWheelEvent):$canvas[0].removeChild(e.rowNode),delete rowsCache[t],delete postProcessedRows[t],renderedRows--,counter_rows_removed++)}function invalidateRows(t){var e,i;if(t&&t.length)for(vScrollDir=0,e=0,i=t.length;e<i;e++)currentEditor&&activeRow===t[e]&&makeActiveCellNormal(),rowsCache[t[e]]&&removeRowFromCache(t[e])}function invalidateRow(t){invalidateRows([t])}function updateCell(t,e){var i=getCellNode(t,e);if(i){var n=columns[e],o=getDataItem(t);currentEditor&&activeRow===t&&activeCell===e?currentEditor.loadValue(o):(i.innerHTML=o?getFormatter(t,n)(t,e,getDataItemValueForColumn(o,n),n,o):"",invalidatePostProcessingResults(t))}}function updateRow(t){var e=rowsCache[t];if(e){ensureCellNodesInRowsCache(t);var i=getDataItem(t);for(var n in e.cellNodesByColumnIdx)if(e.cellNodesByColumnIdx.hasOwnProperty(n)){n=0|n;var o=columns[n],s=e.cellNodesByColumnIdx[n];t===activeRow&&n===activeCell&¤tEditor?currentEditor.loadValue(i):i?s.innerHTML=getFormatter(t,o)(t,n,getDataItemValueForColumn(i,o),o,i):s.innerHTML=""}invalidatePostProcessingResults(t)}}function getViewportHeight(){return parseFloat($.css($container[0],"height",!0))-parseFloat($.css($container[0],"paddingTop",!0))-parseFloat($.css($container[0],"paddingBottom",!0))-parseFloat($.css($headerScroller[0],"height"))-getVBoxDelta($headerScroller)-(options.showTopPanel?options.topPanelHeight+getVBoxDelta($topPanelScroller):0)-(options.showHeaderRow?options.headerRowHeight+getVBoxDelta($headerRowScroller):0)}function resizeCanvas(){initialized&&(viewportH=options.autoHeight?options.rowHeight*getDataLengthIncludingAddNew():getViewportHeight(),numVisibleRows=Math.ceil(viewportH/options.rowHeight),viewportW=parseFloat($.css($container[0],"width",!0)),options.autoHeight||$viewport.height(viewportH),options.forceFitColumns&&autosizeColumns(),updateRowCount(),handleScroll(),lastRenderedScrollLeft=-1,render())}function updateRowCount(){if(initialized){var t=getDataLengthIncludingAddNew(),e=t+(options.leaveSpaceForNewRows?numVisibleRows-1:0),i=viewportHasVScroll;viewportHasVScroll=!options.autoHeight&&e*options.rowHeight>viewportH,makeActiveCellNormal();var o=t-1;for(var s in rowsCache)s>=o&&removeRowFromCache(s);activeCellNode&&activeRow>o&&resetActiveCell();var r=h;th=Math.max(options.rowHeight*e,viewportH-scrollbarDimensions.height),th<maxSupportedCssHeight?(h=ph=th,n=1,cj=0):(h=maxSupportedCssHeight,ph=h/100,n=Math.floor(th/ph),cj=(th-h)/(n-1)),h!==r&&($canvas.css("height",h),scrollTop=$viewport[0].scrollTop);var a=scrollTop+offset<=th-viewportH;0==th||0==scrollTop?page=offset=0:scrollTo(a?scrollTop+offset:th-viewportH),h!=r&&options.autoHeight&&resizeCanvas(),options.forceFitColumns&&i!=viewportHasVScroll&&autosizeColumns(),updateCanvasWidth(!1)}}function getVisibleRange(t,e){return null==t&&(t=scrollTop),null==e&&(e=scrollLeft),{top:getRowFromPosition(t),bottom:getRowFromPosition(t+viewportH)+1,leftPx:e,rightPx:e+viewportW}}function getRenderedRange(t,e){var i=getVisibleRange(t,e),n=Math.round(viewportH/options.rowHeight),o=3;return vScrollDir==-1?(i.top-=n,i.bottom+=o):1==vScrollDir?(i.top-=o,i.bottom+=n):(i.top-=o,i.bottom+=o),i.top=Math.max(0,i.top),i.bottom=Math.min(getDataLengthIncludingAddNew()-1,i.bottom),i.leftPx-=viewportW,i.rightPx+=viewportW,i.leftPx=Math.max(0,i.leftPx),i.rightPx=Math.min(canvasWidth,i.rightPx),i}function ensureCellNodesInRowsCache(t){var e=rowsCache[t];if(e&&e.cellRenderQueue.length)for(var i=e.rowNode.lastChild;e.cellRenderQueue.length;){var n=e.cellRenderQueue.pop();e.cellNodesByColumnIdx[n]=i,i=i.previousSibling}}function cleanUpCells(t,e){var i=0,n=rowsCache[e],o=[];for(var s in n.cellNodesByColumnIdx)if(n.cellNodesByColumnIdx.hasOwnProperty(s)){s=0|s;var r=n.cellColSpans[s];(columnPosLeft[s]>t.rightPx||columnPosRight[Math.min(columns.length-1,s+r-1)]<t.leftPx)&&(e==activeRow&&s==activeCell||o.push(s))}for(var a;null!=(a=o.pop());)n.rowNode.removeChild(n.cellNodesByColumnIdx[a]),delete n.cellColSpans[a],delete n.cellNodesByColumnIdx[a],postProcessedRows[e]&&delete postProcessedRows[e][a],i++}function cleanUpAndRenderCells(t){for(var e,i,n,o=[],s=[],r=0,a=t.top,l=t.bottom;a<=l;a++)if(e=rowsCache[a]){ensureCellNodesInRowsCache(a),cleanUpCells(t,a),i=0;var u=data.getItemMetadata&&data.getItemMetadata(a);u=u&&u.columns;for(var c=getDataItem(a),h=0,d=columns.length;h<d&&!(columnPosLeft[h]>t.rightPx);h++)if(null==(n=e.cellColSpans[h])){if(n=1,u){var p=u[columns[h].id]||u[h];n=p&&p.colspan||1,"*"===n&&(n=d-h)}columnPosRight[Math.min(d-1,h+n-1)]>t.leftPx&&(appendCellHtml(o,a,h,n,c),i++),h+=n>1?n-1:0}else h+=n>1?n-1:0;i&&(r+=i,s.push(a))}if(o.length){var f=document.createElement("div");f.innerHTML=o.join("");for(var m,g;null!=(m=s.pop());){e=rowsCache[m];for(var v;null!=(v=e.cellRenderQueue.pop());)g=f.lastChild,e.rowNode.appendChild(g),e.cellNodesByColumnIdx[v]=g}}}function renderRows(t){for(var e=$canvas[0],i=[],n=[],o=!1,s=getDataLength(),r=t.top,a=t.bottom;r<=a;r++)rowsCache[r]||(renderedRows++,n.push(r),rowsCache[r]={rowNode:null,cellColSpans:[],cellNodesByColumnIdx:[],cellRenderQueue:[]},appendRowHtml(i,r,t,s),activeCellNode&&activeRow===r&&(o=!0),counter_rows_rendered++);if(n.length){var l=document.createElement("div");l.innerHTML=i.join("");for(var r=0,a=n.length;r<a;r++)rowsCache[n[r]].rowNode=e.appendChild(l.firstChild);o&&(activeCellNode=getCellNode(activeRow,activeCell))}}function startPostProcessing(){options.enableAsyncPostRender&&(clearTimeout(h_postrender),h_postrender=setTimeout(asyncPostProcessRows,options.asyncPostRenderDelay))}function invalidatePostProcessingResults(t){delete postProcessedRows[t],postProcessFromRow=Math.min(postProcessFromRow,t),postProcessToRow=Math.max(postProcessToRow,t),startPostProcessing()}function updateRowPositions(){for(var t in rowsCache)rowsCache[t].rowNode.style.top=getRowTop(t)+"px"}function render(){if(initialized){var t=getVisibleRange(),e=getRenderedRange();cleanupRows(e),lastRenderedScrollLeft!=scrollLeft&&cleanUpAndRenderCells(e),renderRows(e),postProcessFromRow=t.top,postProcessToRow=Math.min(getDataLengthIncludingAddNew()-1,t.bottom),startPostProcessing(),lastRenderedScrollTop=scrollTop,lastRenderedScrollLeft=scrollLeft,h_render=null}}function handleHeaderRowScroll(){var t=$headerRowScroller[0].scrollLeft;t!=$viewport[0].scrollLeft&&($viewport[0].scrollLeft=t)}function handleScroll(){scrollTop=$viewport[0].scrollTop,scrollLeft=$viewport[0].scrollLeft;var t=Math.abs(scrollTop-prevScrollTop),e=Math.abs(scrollLeft-prevScrollLeft);if(e&&(prevScrollLeft=scrollLeft,$headerScroller[0].scrollLeft=scrollLeft,$topPanelScroller[0].scrollLeft=scrollLeft,$headerRowScroller[0].scrollLeft=scrollLeft),t)if(vScrollDir=prevScrollTop<scrollTop?1:-1,prevScrollTop=scrollTop,t<viewportH)scrollTo(scrollTop+offset);else{var i=offset;page=h==viewportH?0:Math.min(n-1,Math.floor(scrollTop*((th-viewportH)/(h-viewportH))*(1/ph))),offset=Math.round(page*cj),i!=offset&&invalidateAllRows()}(e||t)&&(h_render&&clearTimeout(h_render),(Math.abs(lastRenderedScrollTop-scrollTop)>20||Math.abs(lastRenderedScrollLeft-scrollLeft)>20)&&(options.forceSyncScrolling||Math.abs(lastRenderedScrollTop-scrollTop)<viewportH&&Math.abs(lastRenderedScrollLeft-scrollLeft)<viewportW?render():h_render=setTimeout(render,50),trigger(self.onViewportChanged,{}))),trigger(self.onScroll,{scrollLeft:scrollLeft,scrollTop:scrollTop})}function asyncPostProcessRows(){for(var t=getDataLength();postProcessFromRow<=postProcessToRow;){var e=vScrollDir>=0?postProcessFromRow++:postProcessToRow--,i=rowsCache[e];if(i&&!(e>=t)){postProcessedRows[e]||(postProcessedRows[e]={}),ensureCellNodesInRowsCache(e);for(var n in i.cellNodesByColumnIdx)if(i.cellNodesByColumnIdx.hasOwnProperty(n)){n=0|n;var o=columns[n];if(o.asyncPostRender&&!postProcessedRows[e][n]){var s=i.cellNodesByColumnIdx[n];s&&o.asyncPostRender(s,e,getDataItem(e),o),postProcessedRows[e][n]=!0}}return void(h_postrender=setTimeout(asyncPostProcessRows,options.asyncPostRenderDelay))}}}function updateCellCssStylesOnRenderedRows(t,e){var i,n,o,s;for(var r in rowsCache){if(s=e&&e[r],o=t&&t[r],s)for(n in s)o&&s[n]==o[n]||(i=getCellNode(r,getColumnIndex(n)),i&&$(i).removeClass(s[n]));if(o)for(n in o)s&&s[n]==o[n]||(i=getCellNode(r,getColumnIndex(n)),i&&$(i).addClass(o[n]))}}function addCellCssStyles(t,e){if(cellCssClasses[t])throw"addCellCssStyles: cell CSS hash with key '"+t+"' already exists.";cellCssClasses[t]=e,updateCellCssStylesOnRenderedRows(e,null),trigger(self.onCellCssStylesChanged,{key:t,hash:e})}function removeCellCssStyles(t){cellCssClasses[t]&&(updateCellCssStylesOnRenderedRows(null,cellCssClasses[t]),delete cellCssClasses[t],trigger(self.onCellCssStylesChanged,{key:t,hash:null}))}function setCellCssStyles(t,e){var i=cellCssClasses[t];cellCssClasses[t]=e,updateCellCssStylesOnRenderedRows(e,i),trigger(self.onCellCssStylesChanged,{key:t,hash:e})}function getCellCssStyles(t){return cellCssClasses[t]}function flashCell(t,e,i){if(i=i||100,rowsCache[t]){var n=$(getCellNode(t,e)),o=function(t){t&&setTimeout(function(){n.queue(function(){n.toggleClass(options.cellFlashingCssClass).dequeue(),o(t-1)})},i)};o(4)}}function handleMouseWheel(t){var e=$(t.target).closest(".bk-slick-row")[0];e!=rowNodeFromLastMouseWheelEvent&&(zombieRowNodeFromLastMouseWheelEvent&&zombieRowNodeFromLastMouseWheelEvent!=e&&($canvas[0].removeChild(zombieRowNodeFromLastMouseWheelEvent),zombieRowNodeFromLastMouseWheelEvent=null),rowNodeFromLastMouseWheelEvent=e)}function handleDragInit(t,e){var i=getCellFromEvent(t);if(!i||!cellExists(i.row,i.cell))return!1;var n=trigger(self.onDragInit,e,t);return!!t.isImmediatePropagationStopped()&&n}function handleDragStart(t,e){var i=getCellFromEvent(t);if(!i||!cellExists(i.row,i.cell))return!1;var n=trigger(self.onDragStart,e,t);return!!t.isImmediatePropagationStopped()&&n}function handleDrag(t,e){return trigger(self.onDrag,e,t)}function handleDragEnd(t,e){trigger(self.onDragEnd,e,t)}function handleKeyDown(t){trigger(self.onKeyDown,{row:activeRow,cell:activeCell},t);var e=t.isImmediatePropagationStopped();if(!e)if(t.shiftKey||t.altKey||t.ctrlKey)9!=t.which||!t.shiftKey||t.ctrlKey||t.altKey||(e=navigatePrev());else if(27==t.which){if(!getEditorLock().isActive())return;cancelEditAndSetFocus()}else 34==t.which?(navigatePageDown(),e=!0):33==t.which?(navigatePageUp(),e=!0):37==t.which?e=navigateLeft():39==t.which?e=navigateRight():38==t.which?e=navigateUp():40==t.which?e=navigateDown():9==t.which?e=navigateNext():13==t.which&&(options.editable&&(currentEditor?activeRow===getDataLength()?navigateDown():commitEditAndSetFocus():getEditorLock().commitCurrentEdit()&&makeActiveCellEditable()),e=!0);if(e){t.stopPropagation(),t.preventDefault();try{t.originalEvent.keyCode=0}catch(i){}}}function handleClick(t){currentEditor||(t.target!=document.activeElement||$(t.target).hasClass("bk-slick-cell"))&&setFocus();var e=getCellFromEvent(t);!e||null!==currentEditor&&activeRow==e.row&&activeCell==e.cell||(trigger(self.onClick,{row:e.row,cell:e.cell},t),t.isImmediatePropagationStopped()||activeCell==e.cell&&activeRow==e.row||!canCellBeActive(e.row,e.cell)||getEditorLock().isActive()&&!getEditorLock().commitCurrentEdit()||(scrollRowIntoView(e.row,!1),setActiveCellInternal(getCellNode(e.row,e.cell))))}function handleContextMenu(t){var e=$(t.target).closest(".bk-slick-cell",$canvas);0!==e.length&&(activeCellNode===e[0]&&null!==currentEditor||trigger(self.onContextMenu,{},t))}function handleDblClick(t){var e=getCellFromEvent(t);!e||null!==currentEditor&&activeRow==e.row&&activeCell==e.cell||(trigger(self.onDblClick,{row:e.row,cell:e.cell},t),t.isImmediatePropagationStopped()||options.editable&&gotoCell(e.row,e.cell,!0))}function handleHeaderMouseEnter(t){trigger(self.onHeaderMouseEnter,{column:$(this).data("column")},t)}function handleHeaderMouseLeave(t){trigger(self.onHeaderMouseLeave,{column:$(this).data("column")},t)}function handleHeaderContextMenu(t){var e=$(t.target).closest(".bk-slick-header-column",".bk-slick-header-columns"),i=e&&e.data("column");trigger(self.onHeaderContextMenu,{column:i},t)}function handleHeaderClick(t){var e=$(t.target).closest(".bk-slick-header-column",".bk-slick-header-columns"),i=e&&e.data("column");i&&trigger(self.onHeaderClick,{column:i},t)}function handleMouseEnter(t){trigger(self.onMouseEnter,{},t)}function handleMouseLeave(t){trigger(self.onMouseLeave,{},t)}function cellExists(t,e){return!(t<0||t>=getDataLength()||e<0||e>=columns.length)}function getCellFromPoint(t,e){for(var i=getRowFromPosition(e),n=0,o=0,s=0;s<columns.length&&o<t;s++)o+=columns[s].width,n++;return n<0&&(n=0),{row:i,cell:n-1}}function getCellFromNode(t){var e=/l\d+/.exec(t.className);if(!e)throw"getCellFromNode: cannot get cell - "+t.className;return parseInt(e[0].substr(1,e[0].length-1),10)}function getRowFromNode(t){for(var e in rowsCache)if(rowsCache[e].rowNode===t)return 0|e;return null}function getCellFromEvent(t){var e=$(t.target).closest(".bk-slick-cell",$canvas);if(!e.length)return null;var i=getRowFromNode(e[0].parentNode),n=getCellFromNode(e[0]);return null==i||null==n?null:{row:i,cell:n}}function getCellNodeBox(t,e){if(!cellExists(t,e))return null;for(var i=getRowTop(t),n=i+options.rowHeight-1,o=0,s=0;s<e;s++)o+=columns[s].width;var r=o+columns[e].width;return{top:i,left:o,bottom:n,right:r}}function resetActiveCell(){setActiveCellInternal(null,!1)}function setFocus(){tabbingDirection==-1?$focusSink[0].focus():$focusSink2[0].focus()}function scrollCellIntoView(t,e,i){scrollRowIntoView(t,i);var n=getColspan(t,e),o=columnPosLeft[e],s=columnPosRight[e+(n>1?n-1:0)],r=scrollLeft+viewportW;o<scrollLeft?($viewport.scrollLeft(o),handleScroll(),render()):s>r&&($viewport.scrollLeft(Math.min(o,s-$viewport[0].clientWidth)),handleScroll(),render())}function setActiveCellInternal(t,e){null!==activeCellNode&&(makeActiveCellNormal(),$(activeCellNode).removeClass("active"),rowsCache[activeRow]&&$(rowsCache[activeRow].rowNode).removeClass("active"));var i=activeCellNode!==t;activeCellNode=t,null!=activeCellNode?(activeRow=getRowFromNode(activeCellNode.parentNode),activeCell=activePosX=getCellFromNode(activeCellNode),null==e&&(e=activeRow==getDataLength()||options.autoEdit),$(activeCellNode).addClass("active"),$(rowsCache[activeRow].rowNode).addClass("active"),options.editable&&e&&isCellPotentiallyEditable(activeRow,activeCell)&&(clearTimeout(h_editorLoader),options.asyncEditorLoading?h_editorLoader=setTimeout(function(){makeActiveCellEditable()},options.asyncEditorLoadDelay):makeActiveCellEditable())):activeRow=activeCell=null,i&&trigger(self.onActiveCellChanged,getActiveCell())}function clearTextSelection(){if(document.selection&&document.selection.empty)try{document.selection.empty()}catch(t){}else if(window.getSelection){var e=window.getSelection();e&&e.removeAllRanges&&e.removeAllRanges()}}function isCellPotentiallyEditable(t,e){var i=getDataLength();return!(t<i&&!getDataItem(t))&&(!(columns[e].cannotTriggerInsert&&t>=i)&&!!getEditor(t,e))}function makeActiveCellNormal(){if(currentEditor){if(trigger(self.onBeforeCellEditorDestroy,{editor:currentEditor}),currentEditor.destroy(),currentEditor=null,activeCellNode){var t=getDataItem(activeRow);if($(activeCellNode).removeClass("editable invalid"),t){var e=columns[activeCell],i=getFormatter(activeRow,e);activeCellNode.innerHTML=i(activeRow,activeCell,getDataItemValueForColumn(t,e),e,t),invalidatePostProcessingResults(activeRow)}}navigator.userAgent.toLowerCase().match(/msie/)&&clearTextSelection(),getEditorLock().deactivate(editController)}}function makeActiveCellEditable(t){if(activeCellNode){if(!options.editable)throw"Grid : makeActiveCellEditable : should never get called when options.editable is false";if(clearTimeout(h_editorLoader),isCellPotentiallyEditable(activeRow,activeCell)){var e=columns[activeCell],i=getDataItem(activeRow);if(trigger(self.onBeforeEditCell,{row:activeRow,cell:activeCell,item:i,column:e})===!1)return void setFocus();getEditorLock().activate(editController),$(activeCellNode).addClass("editable"),t||(activeCellNode.innerHTML=""),currentEditor=new(t||getEditor(activeRow,activeCell))({grid:self,gridPosition:absBox($container[0]),position:absBox(activeCellNode),container:activeCellNode,column:e,item:i||{},commitChanges:commitEditAndSetFocus,cancelChanges:cancelEditAndSetFocus}),i&¤tEditor.loadValue(i),serializedEditorValue=currentEditor.serializeValue(),currentEditor.position&&handleActiveCellPositionChange()}}}function commitEditAndSetFocus(){getEditorLock().commitCurrentEdit()&&(setFocus(),options.autoEdit&&navigateDown())}function cancelEditAndSetFocus(){getEditorLock().cancelCurrentEdit()&&setFocus()}function absBox(t){var e={top:t.offsetTop,left:t.offsetLeft,bottom:0,right:0,width:$(t).outerWidth(),height:$(t).outerHeight(),visible:!0};e.bottom=e.top+e.height,e.right=e.left+e.width;for(var i=t.offsetParent;(t=t.parentNode)!=document.body;)e.visible&&t.scrollHeight!=t.offsetHeight&&"visible"!=$(t).css("overflowY")&&(e.visible=e.bottom>t.scrollTop&&e.top<t.scrollTop+t.clientHeight),e.visible&&t.scrollWidth!=t.offsetWidth&&"visible"!=$(t).css("overflowX")&&(e.visible=e.right>t.scrollLeft&&e.left<t.scrollLeft+t.clientWidth),e.left-=t.scrollLeft,e.top-=t.scrollTop,t===i&&(e.left+=t.offsetLeft,e.top+=t.offsetTop,i=t.offsetParent),e.bottom=e.top+e.height,e.right=e.left+e.width;return e}function getActiveCellPosition(){return absBox(activeCellNode)}function getGridPosition(){return absBox($container[0])}function handleActiveCellPositionChange(){if(activeCellNode&&(trigger(self.onActiveCellPositionChanged,{}),currentEditor)){var t=getActiveCellPosition();currentEditor.show&¤tEditor.hide&&(t.visible?currentEditor.show():currentEditor.hide()),currentEditor.position&¤tEditor.position(t)}}function getCellEditor(){return currentEditor}function getActiveCell(){return activeCellNode?{row:activeRow,cell:activeCell}:null}function getActiveCellNode(){return activeCellNode}function scrollRowIntoView(t,e){var i=t*options.rowHeight,n=(t+1)*options.rowHeight-viewportH+(viewportHasHScroll?scrollbarDimensions.height:0);(t+1)*options.rowHeight>scrollTop+viewportH+offset?(scrollTo(e?i:n),render()):t*options.rowHeight<scrollTop+offset&&(scrollTo(e?n:i),render())}function scrollRowToTop(t){scrollTo(t*options.rowHeight),render()}function scrollPage(t){var e=t*numVisibleRows;if(scrollTo((getRowFromPosition(scrollTop)+e)*options.rowHeight),render(),options.enableCellNavigation&&null!=activeRow){var i=activeRow+e,n=getDataLengthIncludingAddNew();i>=n&&(i=n-1),i<0&&(i=0);for(var o=0,s=null,r=activePosX;o<=activePosX;)canCellBeActive(i,o)&&(s=o),o+=getColspan(i,o);null!==s?(setActiveCellInternal(getCellNode(i,s)),activePosX=r):resetActiveCell()}}function navigatePageDown(){scrollPage(1)}function navigatePageUp(){scrollPage(-1)}function getColspan(t,e){var i=data.getItemMetadata&&data.getItemMetadata(t);if(!i||!i.columns)return 1;var n=i.columns[columns[e].id]||i.columns[e],o=n&&n.colspan;return o="*"===o?columns.length-e:o||1}function findFirstFocusableCell(t){for(var e=0;e<columns.length;){if(canCellBeActive(t,e))return e;e+=getColspan(t,e)}return null}function findLastFocusableCell(t){for(var e=0,i=null;e<columns.length;)canCellBeActive(t,e)&&(i=e),e+=getColspan(t,e);return i}function gotoRight(t,e,i){if(e>=columns.length)return null;do e+=getColspan(t,e);while(e<columns.length&&!canCellBeActive(t,e));return e<columns.length?{row:t,cell:e,posX:e}:null}function gotoLeft(t,e,i){if(e<=0)return null;var n=findFirstFocusableCell(t);if(null===n||n>=e)return null;for(var o,s={row:t,cell:n,posX:n};;){if(o=gotoRight(s.row,s.cell,s.posX),!o)return null;if(o.cell>=e)return s;s=o}}function gotoDown(t,e,i){for(var n,o=getDataLengthIncludingAddNew();;){if(++t>=o)return null;for(n=e=0;e<=i;)n=e,e+=getColspan(t,e);if(canCellBeActive(t,n))return{row:t,cell:n,posX:i}}}function gotoUp(t,e,i){for(var n;;){if(--t<0)return null;for(n=e=0;e<=i;)n=e,e+=getColspan(t,e);if(canCellBeActive(t,n))return{row:t,cell:n,posX:i}}}function gotoNext(t,e,i){if(null==t&&null==e&&(t=e=i=0,canCellBeActive(t,e)))return{row:t,cell:e,posX:e};var n=gotoRight(t,e,i);if(n)return n;for(var o=null,s=getDataLengthIncludingAddNew();++t<s;)if(o=findFirstFocusableCell(t),null!==o)return{row:t,cell:o,posX:o};return null}function gotoPrev(t,e,i){if(null==t&&null==e&&(t=getDataLengthIncludingAddNew()-1,e=i=columns.length-1,canCellBeActive(t,e)))return{row:t,cell:e,posX:e};for(var n,o;!n&&!(n=gotoLeft(t,e,i));){if(--t<0)return null;e=0,o=findLastFocusableCell(t),null!==o&&(n={row:t,cell:o,posX:o})}return n}function navigateRight(){return navigate("right")}function navigateLeft(){return navigate("left")}function navigateDown(){return navigate("down")}function navigateUp(){return navigate("up")}function navigateNext(){return navigate("next")}function navigatePrev(){return navigate("prev")}function navigate(t){if(!options.enableCellNavigation)return!1;if(!activeCellNode&&"prev"!=t&&"next"!=t)return!1;if(!getEditorLock().commitCurrentEdit())return!0;setFocus();var e={up:-1,down:1,left:-1,right:1,prev:-1,next:1};tabbingDirection=e[t];var i={up:gotoUp,down:gotoDown,left:gotoLeft,right:gotoRight,prev:gotoPrev,next:gotoNext},n=i[t],o=n(activeRow,activeCell,activePosX);if(o){var s=o.row==getDataLength();return scrollCellIntoView(o.row,o.cell,!s),setActiveCellInternal(getCellNode(o.row,o.cell)),activePosX=o.posX,!0}return setActiveCellInternal(getCellNode(activeRow,activeCell)),!1}function getCellNode(t,e){return rowsCache[t]?(ensureCellNodesInRowsCache(t),rowsCache[t].cellNodesByColumnIdx[e]):null}function setActiveCell(t,e){initialized&&(t>getDataLength()||t<0||e>=columns.length||e<0||options.enableCellNavigation&&(scrollCellIntoView(t,e,!1),setActiveCellInternal(getCellNode(t,e),!1)))}function canCellBeActive(t,e){if(!options.enableCellNavigation||t>=getDataLengthIncludingAddNew()||t<0||e>=columns.length||e<0)return!1;var i=data.getItemMetadata&&data.getItemMetadata(t);if(i&&"boolean"==typeof i.focusable)return i.focusable;var n=i&&i.columns;return n&&n[columns[e].id]&&"boolean"==typeof n[columns[e].id].focusable?n[columns[e].id].focusable:n&&n[e]&&"boolean"==typeof n[e].focusable?n[e].focusable:columns[e].focusable}function canCellBeSelected(t,e){if(t>=getDataLength()||t<0||e>=columns.length||e<0)return!1;var i=data.getItemMetadata&&data.getItemMetadata(t);if(i&&"boolean"==typeof i.selectable)return i.selectable;var n=i&&i.columns&&(i.columns[columns[e].id]||i.columns[e]);return n&&"boolean"==typeof n.selectable?n.selectable:columns[e].selectable}function gotoCell(t,e,i){if(initialized&&canCellBeActive(t,e)&&getEditorLock().commitCurrentEdit()){scrollCellIntoView(t,e,!1);var n=getCellNode(t,e);setActiveCellInternal(n,i||t===getDataLength()||options.autoEdit),currentEditor||setFocus()}}function commitCurrentEdit(){var t=getDataItem(activeRow),e=columns[activeCell];if(currentEditor){if(currentEditor.isValueChanged()){var i=currentEditor.validate();if(i.valid){if(activeRow<getDataLength()){var n={row:activeRow,cell:activeCell,editor:currentEditor,serializedValue:currentEditor.serializeValue(),prevSerializedValue:serializedEditorValue,execute:function(){this.editor.applyValue(t,this.serializedValue),updateRow(this.row),trigger(self.onCellChange,{row:activeRow,cell:activeCell,item:t})},undo:function(){this.editor.applyValue(t,this.prevSerializedValue),updateRow(this.row),trigger(self.onCellChange,{row:activeRow,cell:activeCell,item:t})}};options.editCommandHandler?(makeActiveCellNormal(),options.editCommandHandler(t,e,n)):(n.execute(),makeActiveCellNormal())}else{var o={};currentEditor.applyValue(o,currentEditor.serializeValue()),makeActiveCellNormal(),trigger(self.onAddNewRow,{item:o,column:e})}return!getEditorLock().isActive()}return $(activeCellNode).removeClass("invalid"),$(activeCellNode).width(),$(activeCellNode).addClass("invalid"),trigger(self.onValidationError,{editor:currentEditor,cellNode:activeCellNode,validationResults:i,row:activeRow,cell:activeCell,column:e}),currentEditor.focus(),!1}makeActiveCellNormal()}return!0}function cancelCurrentEdit(){return makeActiveCellNormal(),!0}function rowsToRanges(t){for(var e=[],i=columns.length-1,n=0;n<t.length;n++)e.push(new Slick.Range(t[n],0,t[n],i));return e}function getSelectedRows(){if(!selectionModel)throw"Selection model is not set";return selectedRows}function setSelectedRows(t){if(!selectionModel)throw"Selection model is not set";selectionModel.setSelectedRanges(rowsToRanges(t))}var defaults={explicitInitialization:!1,rowHeight:25,defaultColumnWidth:80,enableAddRow:!1,leaveSpaceForNewRows:!1,editable:!1,autoEdit:!0,enableCellNavigation:!0,enableColumnReorder:!0,asyncEditorLoading:!1,asyncEditorLoadDelay:100,forceFitColumns:!1,enableAsyncPostRender:!1,asyncPostRenderDelay:50,autoHeight:!1,editorLock:Slick.GlobalEditorLock,showHeaderRow:!1,headerRowHeight:25,showTopPanel:!1,topPanelHeight:25,formatterFactory:null,editorFactory:null,cellFlashingCssClass:"flashing",selectedCellCssClass:"selected",multiSelect:!0,enableTextSelectionOnCells:!1,dataItemColumnValueExtractor:null,fullWidthRows:!1,multiColumnSort:!1,defaultFormatter:defaultFormatter,forceSyncScrolling:!1,addNewRowCssClass:"new-row"},columnDefaults={name:"",resizable:!0,sortable:!1,minWidth:30,rerenderOnResize:!1,headerCssClass:null,defaultSortAsc:!0,focusable:!0,selectable:!0},th,h,ph,n,cj,page=0,offset=0,vScrollDir=1,initialized=!1,$container,uid="slickgrid_"+Math.round(1e6*Math.random()),self=this,$focusSink,$focusSink2,$headerScroller,$headers,$headerRow,$headerRowScroller,$headerRowSpacer,$topPanelScroller,$topPanel,$viewport,$canvas,$style,$boundAncestors,stylesheet,columnCssRulesL,columnCssRulesR,viewportH,viewportW,canvasWidth,viewportHasHScroll,viewportHasVScroll,headerColumnWidthDiff=0,headerColumnHeightDiff=0,cellWidthDiff=0,cellHeightDiff=0,absoluteColumnMinWidth,tabbingDirection=1,activePosX,activeRow,activeCell,activeCellNode=null,currentEditor=null,serializedEditorValue,editController,rowsCache={},renderedRows=0,numVisibleRows,prevScrollTop=0,scrollTop=0,lastRenderedScrollTop=0,lastRenderedScrollLeft=0,prevScrollLeft=0,scrollLeft=0,selectionModel,selectedRows=[],plugins=[],cellCssClasses={},columnsById={},sortColumns=[],columnPosLeft=[],columnPosRight=[],h_editorLoader=null,h_render=null,h_postrender=null,postProcessedRows={},postProcessToRow=null,postProcessFromRow=null,counter_rows_rendered=0,counter_rows_removed=0,rowNodeFromLastMouseWheelEvent,zombieRowNodeFromLastMouseWheelEvent;this.debug=function(){var t="";t+="\ncounter_rows_rendered: "+counter_rows_rendered,t+="\ncounter_rows_removed: "+counter_rows_removed,t+="\nrenderedRows: "+renderedRows,t+="\nnumVisibleRows: "+numVisibleRows,t+="\nmaxSupportedCssHeight: "+maxSupportedCssHeight,t+="\nn(umber of pages): "+n,t+="\n(current) page: "+page,t+="\npage height (ph): "+ph,t+="\nvScrollDir: "+vScrollDir,alert(t)},this.eval=function(expr){return eval(expr)},$.extend(this,{slickGridVersion:"2.1",onScroll:new Slick.Event,onSort:new Slick.Event,onHeaderMouseEnter:new Slick.Event,onHeaderMouseLeave:new Slick.Event,onHeaderContextMenu:new Slick.Event,onHeaderClick:new Slick.Event,onHeaderCellRendered:new Slick.Event,onBeforeHeaderCellDestroy:new Slick.Event,onHeaderRowCellRendered:new Slick.Event,onBeforeHeaderRowCellDestroy:new Slick.Event,onMouseEnter:new Slick.Event,onMouseLeave:new Slick.Event,onClick:new Slick.Event,onDblClick:new Slick.Event,onContextMenu:new Slick.Event,onKeyDown:new Slick.Event,onAddNewRow:new Slick.Event,onValidationError:new Slick.Event,onViewportChanged:new Slick.Event,onColumnsReordered:new Slick.Event,onColumnsResized:new Slick.Event,onCellChange:new Slick.Event,onBeforeEditCell:new Slick.Event,onBeforeCellEditorDestroy:new Slick.Event,onBeforeDestroy:new Slick.Event,onActiveCellChanged:new Slick.Event,onActiveCellPositionChanged:new Slick.Event,onDragInit:new Slick.Event,onDragStart:new Slick.Event,onDrag:new Slick.Event,onDragEnd:new Slick.Event,onSelectedRowsChanged:new Slick.Event,onCellCssStylesChanged:new Slick.Event,registerPlugin:registerPlugin,unregisterPlugin:unregisterPlugin,getColumns:getColumns,setColumns:setColumns,getColumnIndex:getColumnIndex,updateColumnHeader:updateColumnHeader,setSortColumn:setSortColumn,setSortColumns:setSortColumns,getSortColumns:getSortColumns,autosizeColumns:autosizeColumns,getOptions:getOptions,setOptions:setOptions,getData:getData,getDataLength:getDataLength,getDataItem:getDataItem,setData:setData,getSelectionModel:getSelectionModel,setSelectionModel:setSelectionModel,getSelectedRows:getSelectedRows,setSelectedRows:setSelectedRows,getContainerNode:getContainerNode,render:render,invalidate:invalidate,invalidateRow:invalidateRow,invalidateRows:invalidateRows,invalidateAllRows:invalidateAllRows,updateCell:updateCell,updateRow:updateRow,getViewport:getVisibleRange,getRenderedRange:getRenderedRange,resizeCanvas:resizeCanvas,updateRowCount:updateRowCount,scrollRowIntoView:scrollRowIntoView,scrollRowToTop:scrollRowToTop,scrollCellIntoView:scrollCellIntoView,getCanvasNode:getCanvasNode,focus:setFocus,getCellFromPoint:getCellFromPoint,getCellFromEvent:getCellFromEvent,getActiveCell:getActiveCell,setActiveCell:setActiveCell,getActiveCellNode:getActiveCellNode,getActiveCellPosition:getActiveCellPosition,resetActiveCell:resetActiveCell,editActiveCell:makeActiveCellEditable,getCellEditor:getCellEditor,getCellNode:getCellNode,getCellNodeBox:getCellNodeBox,canCellBeSelected:canCellBeSelected,canCellBeActive:canCellBeActive,navigatePrev:navigatePrev,navigateNext:navigateNext,navigateUp:navigateUp,navigateDown:navigateDown,navigateLeft:navigateLeft,navigateRight:navigateRight,navigatePageUp:navigatePageUp,navigatePageDown:navigatePageDown,gotoCell:gotoCell,getTopPanel:getTopPanel,setTopPanelVisibility:setTopPanelVisibility,setHeaderRowVisibility:setHeaderRowVisibility,getHeaderRow:getHeaderRow,getHeaderRowColumn:getHeaderRowColumn,getGridPosition:getGridPosition,flashCell:flashCell,addCellCssStyles:addCellCssStyles,setCellCssStyles:setCellCssStyles,removeCellCssStyles:removeCellCssStyles,getCellCssStyles:getCellCssStyles,init:finishInitialization,destroy:destroy,getEditorLock:getEditorLock,getEditController:getEditController}),init()}/**
|
|
* @license
|
|
* (c) 2009-2013 Michael Leibman
|
|
* michael{dot}leibman{at}gmail{dot}com
|
|
* http://github.com/mleibman/slickgrid
|
|
*
|
|
* Distributed under MIT license.
|
|
* All rights reserved.
|
|
*
|
|
* SlickGrid v2.2
|
|
*
|
|
* NOTES:
|
|
* Cell/row DOM manipulations are done directly bypassing jQuery's DOM manipulation methods.
|
|
* This increases the speed dramatically, but can only be done safely because there are no event handlers
|
|
* or data associated with any cell/row DOM nodes. Cell editors must make sure they implement .destroy()
|
|
* and do proper cleanup.
|
|
*/
|
|
var $=require("jquery"),$1=require("jquery_event_drag"),$2=require("jquery_event_drop"),Slick=require("./slick.core"),scrollbarDimensions,maxSupportedCssHeight;module.exports=SlickGrid},{"./slick.core":"slick_grid/slick.core",jquery:"jquery",jquery_event_drag:"jquery_event_drag",jquery_event_drop:"jquery_event_drop"}]},{},["models/widgets/main"])}();/*
|
|
Copyright (c) 2012, Continuum Analytics, Inc.
|
|
All rights reserved.
|
|
|
|
Redistribution and use in source and binary forms, with or without modification,
|
|
are permitted provided that the following conditions are met:
|
|
|
|
Redistributions of source code must retain the above copyright notice,
|
|
this list of conditions and the following disclaimer.
|
|
|
|
Redistributions in binary form must reproduce the above copyright notice,
|
|
this list of conditions and the following disclaimer in the documentation
|
|
and/or other materials provided with the distribution.
|
|
|
|
Neither the name of Continuum Analytics nor the names of any contributors
|
|
may be used to endorse or promote products derived from this software
|
|
without specific prior written permission.
|
|
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
|
THE POSSIBILITY OF SUCH DAMAGE.
|
|
*/
|