<NME> react-widgets.js
<BEF> ADDFILE
<MSG> add browser stuff oooopppps

<DFF> @@ -0,0 +1,11 @@
+this.ReactWidgets=function(e){function t(n){if(s[n])return s[n].exports;var i=s[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var s={};return t.m=e,t.c=s,t.p="",t(0)}([function(e,t,s){e.exports={DropDownlist:s(1),Combobox:s(2),Calendar:s(3),DateTimePicker:s(4),NumberPicker:s(5),Select:s(6),utils:{ReplaceTransitionGroup:s(7),SlideTransition:s(8)}}},function(e,t,s){var n=s(9),i=s(10),r=s(20),o=s(21),a=s(22),p=s(23).mergeIntoProps,u=(s(24).directions,s(29)),c=s(32),l=s(30),h=s(25),d=(s(11),a.provided(function(e){return!i.isEqual(e.value,this.props.value)})),f=a.provided(function(e){return!i.isEqual(e,this.props.value)}),m={value:n.PropTypes.any,onChange:n.PropTypes.func,data:n.PropTypes.array,valueField:n.PropTypes.string,textField:n.PropTypes.string,valueComponent:n.PropTypes.component,itemComponent:n.PropTypes.component,delay:n.PropTypes.number,messages:n.PropTypes.shape({open:n.PropTypes.string})};e.exports=n.createClass({displayName:"DropdownList",mixins:[s(35),s(36),s(37),s(38),s(39)("selectedIndex"),s(39)("focusedIndex")],propTypes:m,getInitialState:function(){var e=this._dataIndexOf(this.props.data,this.props.value);return{open:!1,selectedIndex:e,focusedIndex:-1===e?0:e}},getDefaultProps:function(){return{valueComponent:u,delay:500,messages:{open:"open dropdown"}}},componentWillReceiveProps:d(function(e){var t=this._dataIndexOf(e.data,e.value);this.setSelectedIndex(t),this.setFocusedIndex(-1===t?0:t)}),componentDidMount:function(){this.setWidth()},render:function(){var e=i.keys(m),t=this.props.valueComponent,s=this._dataItem(this._data(),this.props.value),o=this.props.id&&this.props.id+"_option"||"";return p(i.omit(this.props,e),n.DOM.div({ref:"element",onKeyDown:this._keyDown,onClick:this.toggle,onFocus:this._focus.bind(null,!0),onBlur:this._focus.bind(null,!1),"aria-expanded":this.state.open,"aria-haspopup":!0,"aria-activedescendent":o,tabIndex:"0",className:r({"rw-dropdown-list":!0,"rw-widget":!0,"rw-state-focus":this.state.focused,"rw-open":this.state.open,"rw-rtl":this.isRtl()})},n.DOM.span({className:"rw-dropdownlist-picker rw-select rw-btn"},n.DOM.i({className:"rw-i rw-i-caret-down"},n.DOM.span({className:"rw-sr"},this.props.messages.open))),t({className:"rw-input",value:s,textField:this.props.textField,valueField:this.props.valueField}),c({style:{width:this.state.width},getAnchor:this._getAnchor,open:this.state.open,onRequestClose:this.close},n.DOM.div(null,l({ref:"list",optID:o,"aria-hidden":!this.state.open,style:{maxHeight:200,height:"auto"},data:this.props.data,value:this.props.value,selectedIndex:this.state.selectedIndex,focusedIndex:this.state.focusedIndex,textField:this.props.textField,valueField:this.props.valueField,listItem:this.props.itemComponent,onSelect:this._onSelect})))))},setWidth:function(){var e=h.width(this.getDOMNode()),t=e!==this.state.width;t&&this.setState({width:e})},_focus:function(e){var t=this;clearTimeout(t.timer),t.timer=setTimeout(function(){e?t.getDOMNode().focus():t.close(),e!==t.state.focused&&t.setState({focused:e})},0)},_onSelect:function(e){this.close(),this.change(e)},_keyDown:function(e){function t(e){s.change(s._data()[e])}var s=this,n=e.key,i=e.altKey,r=this.state.open;"End"===n?(r?this.setFocusedIndex(this._data().length-1):t(this._data().length-1),e.preventDefault()):"Home"===n?(r?this.setFocusedIndex(0):t(0),e.preventDefault()):"Enter"===n&&r?t(this.state.focusedIndex):"ArrowDown"===n?(i?this.open():r?this.setFocusedIndex(this.nextFocusedIndex()):t(this.nextSelectedIndex()),e.preventDefault()):"ArrowUp"===n?(i?this.close():r?this.setFocusedIndex(this.prevFocusedIndex()):t(this.prevSelectedIndex()),e.preventDefault()):this.search(String.fromCharCode(e.keyCode),this._locate)},change:f(function(e){var t=this.props.onChange;t&&(t(e),this.close())}),_locate:function(e){var t=this.state.open?"focusedIndex":"selectedIndex",s=this.findIndex(e,this.state[t]),n=o(t).bind(this);-1!==s&&n(s)},_data:function(){return this.props.data},open:function(){this.setState({open:!0})},close:function(){this.setState({open:!1})},toggle:function(){this.state.open?this.close():this.open()},_getAnchor:function(){return this.refs.element.getDOMNode()}})},function(e,t,s){var n=s(9),i=s(20),r=s(10),o=(s(26),s(27)),a=s(23).mergeIntoProps,p=(s(24).directions,s(31)),u=s(32),c=s(30),l=s(25),h=s(11),d={value:n.PropTypes.any,onChange:n.PropTypes.func,data:n.PropTypes.array,valueField:n.PropTypes.string,textField:n.PropTypes.string,suggest:n.PropTypes.bool,messages:n.PropTypes.shape({open:n.PropTypes.string,emptyList:n.PropTypes.string,emptyFilter:n.PropTypes.string})};e.exports=n.createClass({displayName:"ComboBox",mixins:[s(37),s(36),s(40),s(38),s(39)("selectedIndex"),s(39)("focusedIndex")],propTypes:d,getInitialState:function(){var e=this.process(this.props.data,this.props.value),t=this._dataIndexOf(e,this.props.value);return{selectedIndex:t,focusedIndex:-1===t?0:t,processedData:e,open:!1}},getDefaultProps:function(){return{suggest:!1,filter:!1,delay:500,messages:{open:"open combobox",emptyList:"There are no items in this list",emptyFilter:"The filter returned no results"}}},shouldComponentUpdate:function(e,t){var s=!r.isEqual(t,this.state),n=!r.isEqual(e.value,this.props.value);return s||n},componentWillReceiveProps:function(e){var t=-1!==this._dataIndexOf(e.data,e.value),s=this.process(e.data,e.value,!t&&this._dataText(e.value)),n=this._dataIndexOf(s,e.value);this._searchTerm="",this.setState({processedData:s,selectedIndex:n,focusedIndex:-1===n?this.findIndex(this._dataText(this.props.value)):n})},componentDidUpdate:function(){{var e=this.refs.input.getDOMNode();this._dataText(this.props.value)}this.state.focused&&e.focus(),this.setWidth()},render:function(){var e=(this.props.valueComponent,this._data()),t=this.props.id&&this.props.id+"_listbox",s=this.props.id&&this.props.id+"_option",o=this.props.suggest?this.props.filter?"both":"inline":this.props.filter?"list":"";return a(r.omit(this.props,r.keys(d)),n.DOM.div({ref:"element","aria-expanded":this.state.open,"aria-haspopup":!0,onKeyDown:this._keyDown,onFocus:this._focus.bind(null,!0),onBlur:this._focus.bind(null,!1),tabIndex:"-1",className:i({"rw-combobox":!0,"rw-widget":!0,"rw-state-focus":this.state.focused,"rw-open":this.state.open,"rw-rtl":this.isRtl()})},h({className:"rw-select",onClick:this.toggle},n.DOM.i({className:"rw-i rw-i-caret-down"},n.DOM.span({className:"rw-sr"},this.props.messages.open))),p({ref:"input",type:"text",role:"combobox",suggest:this.props.suggest,"aria-autocomplete":o,className:"rw-input",value:this._dataText(this.props.value),onChange:this._inputTyping,onKeyDown:this._inputKeyDown}),u({style:{width:this.state.width},getAnchor:this._getAnchor,open:this.state.open,onRequestClose:this.close},n.DOM.div(null,c({ref:"list",id:t,optID:s,"aria-hidden":!this.state.open,"aria-live":o&&"polite",style:{maxHeight:200,height:"auto"},data:e,value:this.props.value,selectedIndex:this.state.selectedIndex,focusedIndex:-1===this.state.selectedIndex?this.state.focusedIndex:this.state.selectedIndex,textField:this.props.textField,valueField:this.props.valueField,onSelect:this._onSelect,messages:{emptyList:this.props.data.length?this.props.messages.emptyFilter:this.props.messages.emptyList}})))))},setWidth:function(){var e=l.width(this.getDOMNode()),t=e!==this.state.width;t&&this.setState({width:e})},_onSelect:function(e){this.close(),this.change(e),this._focus(!0)},_inputKeyDown:function(e){this._deleting="Backspace"===e.key||"Delete"===e.key,this._isTyping=!0},_inputTyping:function(e){var t,s,n=this,i=!!this.props.suggest,o=e.target.value;t=this._deleting||!i?o:this.suggest(this._data(),o),t=t||o,s=r.find(n.props.data,function(e){return n._dataText(e).toLowerCase()===t.toLowerCase()}),this.change(!this._deleting&&s?s:o,!0),this.open()},_focus:function(e){var t=this;clearTimeout(t.timer),t.timer=setTimeout(function(){e!==t.state.focused&&(t.setState({focused:e}),e||t.close())},0)},_keyDown:function(e){function t(e){s.change(s._data()[e],!1)}var s=this,n=e.key,i=e.altKey,r=(String.fromCharCode(e.keyCode),this.state.selectedIndex),o=this.state.focusedIndex,a=this.state.open,p=null==r||-1===r;"End"===n?t(this._data().length-1):"Home"===n?t(0):"Enter"===n&&a?(t(o),this.close()):"ArrowDown"===n?i?this.open():t(p?o:this.nextSelectedIndex()):"ArrowUp"===n&&(i?this.close():t(p?o:this.prevSelectedIndex()))},change:function(e,t){var s=this.props.onChange;this._typedChange=!!t,s&&s(e)},open:function(){this.state.open||this.setState({open:!0})},close:function(){this.state.open&&this.setState({open:!1})},toggle:function(){this._focus(!0),this.state.open?this.close():this.open()},suggest:function(e,t){function s(e){return i(this._dataText(e).toLowerCase(),n.toLowerCase())}var n=this._dataText(t),i=o.startsWith,a="string"==typeof t?r.find(e,s,this):t;return!a||this.state&&this.state.deleting?"":this._dataText(a)},_getAnchor:function(){return this.refs.element.getDOMNode()},_data:function(){return this.state.processedData},process:function(e,t,s){return this.props.filter&&s&&(e=this.filter(e,s)),e}})},function(e,t,s){var n=s(9),i=s(15),r=s(16),o=s(17),a=s(18),p=s(19),u=(s(20),s(21)),c=s(8),l=s(28),h=s(23).mergeIntoProps,d=s(10),f="right",m="left",y="up",v="down",g={year:1,decade:10,century:100},w={month:r,year:o,decade:a,century:p};NEXT_VIEW={month:"year",year:"decade",decade:"century"},VIEW_UNIT={month:"day",year:"month",decade:"year",century:"decade"},e.exports=n.createClass({displayName:"Calendar",mixins:[s(35),s(38)],propTypes:{onChange:n.PropTypes.func.isRequired,value:n.PropTypes.instanceOf(Date),min:n.PropTypes.instanceOf(Date),max:n.PropTypes.instanceOf(Date),initialView:n.PropTypes.oneOf(["month","year","decade","century"]),finalView:n.PropTypes.oneOf(["month","year","decade","century"]),messages:n.PropTypes.shape({moveBack:n.PropTypes.string,moveForward:n.PropTypes.string}),maintainFocus:n.PropTypes.bool},getInitialState:function(){return{selectedIndex:0,open:!1,view:this.props.initialView||"month",currentDate:new Date(this.props.value)}},getDefaultProps:function(){return{value:new Date,min:new Date(1900,0,1),max:new Date(2099,11,31),initialView:"month",finalView:"century",maintainFocus:!0}},componentWillReceiveProps:function(e){l.eq(e.value,this.props.value,VIEW_UNIT[this.state.view])||this.setState({currentDate:new Date(e.value)})},componentDidUpdate:function(){this.refs.currentView.getDOMNode(),document.activeElement},render:function(){function e(){this._focus(!0,"stop")}var t=w[this.state.view],s=this.state.currentDate,r=this.props.id&&this.props.id+"_view_label",o=this.state.view+"_"+l[this.state.view](s),a=this.props.id&&this.props.id+"_table";return h(d.omit(this.props,"value","min","max"),n.DOM.div({className:"rw-calendar rw-widget"},i({label:this._label(),labelId:r,messages:this.props.messages,upDisabled:this.state.view===this.props.finalView,prevDisabled:!l.inRange(this.nextDate(m),this.props.min,this.props.max),nextDisabled:!l.inRange(this.nextDate(f),this.props.min,this.props.max),onViewChange:d.partial(this.navigate,y,null),onMoveLeft:d.partial(this.navigate,m,null),onMoveRight:d.partial(this.navigate,f,null)}),c({ref:"animation",direction:this.state.slideDirection,onAnimate:e.bind(this)},t({ref:"currentView",key:o,id:a,"aria-labeledby":r,"aria-activedescendant":a+"_selected_item",selectedDate:this.props.value,value:this.state.currentDate,onChange:this.change,onKeyDown:this._keyDown,onFocus:d.partial(this._focus,!0),onMoveLeft:d.partial(this.navigate,m),onMoveRight:d.partial(this.navigate,f),min:this.props.min,max:this.props.max}))))},navigate:function(e,t){var s=d.invert(NEXT_VIEW),n=this.state.view,i=e===m||e===y?"right":"left";t||(t=d.contains([m,f],e)?this.nextDate(e):this.state.currentDate),e===v&&(n=s[n]||n),e===y&&(n=NEXT_VIEW[n]||n),l.inRange(t,this.props.min,this.props.max)&&(this._focus(!0,"nav"),this.setState({currentDate:t,slideDirection:i,view:n}))},_focus:function(e){u("focused");this.props.maintainFocus&&e&&this.refs.currentView.getDOMNode().focus()},change:function(e){return this.state.view===this.props.initialView?this.props.onChange(e):void this.navigate(v,e)},nextDate:function(e){var t=e===m?"subtract":"add",s=this.state.view,n="month"===s?s:"year",i=g[s]||1;return l[t](this.state.currentDate,1*i,n)},_keyDown:function(e){var t=e.ctrlKey,s=e.key;t?("ArrowDown"===s&&(e.preventDefault(),this.navigate(v)),"ArrowUp"===s&&(e.preventDefault(),this.navigate(y)),"ArrowLeft"===s&&(e.preventDefault(),this.navigate(m)),"ArrowRight"===s&&(e.preventDefault(),this.navigate(f))):this.refs.currentView._keyDown&&this.refs.currentView._keyDown(e)},_label:function(){var e=this.state.view,t=this.state.currentDate;return"month"===e?l.format(t,l.formats.MONTH_YEAR):"year"===e?l.format(t,l.formats.YEAR):"decade"===e?l.format(l.firstOfDecade(t),l.formats.YEAR)+" - "+l.format(l.lastOfDecade(t),l.formats.YEAR):"century"===e?l.format(l.firstOfCentury(t),l.formats.YEAR)+" - "+l.format(l.lastOfCentury(t),l.formats.YEAR):void 0}})},function(e,t,s){function n(e,t){var s;e=[].concat(e);for(var n=0;n<e.length;n++)if(s=a.parse(t,e[n]))return s;return null}var i=s(9),r=s(20),o=s(10),a=s(28),p=s(23).mergeIntoProps,u=s(32),c=s(3),l=s(13),h=s(14),d=s(25),f={value:i.PropTypes.instanceOf(Date),onChange:i.PropTypes.func,min:i.PropTypes.instanceOf(Date),max:i.PropTypes.instanceOf(Date),culture:i.PropTypes.string,format:i.PropTypes.string,calendar:i.PropTypes.bool,time:i.PropTypes.bool,parse:i.PropTypes.oneOfType([i.PropTypes.arrayOf(i.PropTypes.string),i.PropTypes.string,i.PropTypes.func])};e.exports=i.createClass({displayName:"DateTimePicker",mixins:[s(35),s(38)],propTypes:f,getInitialState:function(){return{selectedIndex:0,open:!1,openPopup:null}},getDefaultProps:function(){var e=o.has(this.props,"calendar")?this.props.calendar:!0,t=o.has(this.props,"time")?this.props.time:!0,s=e&&t,n=!e&&!t;return{value:null,format:s||n?"M/d/yyyy h:mm tt":e?"M/d/yyyy":"h:mm tt",min:new Date(1900,0,1),max:new Date(2099,11,31),calendar:!0,time:!0,messages:{calendarButton:"Select Date",timeButton:"Select Time",next:"Next Date"}}},componentDidUpdate:function(){this.setTimeDimensions()},render:function(){var e,t=this.props.id,s=t&&t+"_time_listbox",n=t&&t+"_date_listbox",a=t&&t+"_time_option",d=t&&t+"_table_selected_item";return n&&this.props.calendar&&(e=n),s&&this.props.time&&(e+=" "+s),p(o.omit(this.props,o.keys(f)),i.DOM.div({ref:"element",tabIndex:"-1","aria-expanded":this.state.open,"aria-haspopup":!0,onKeyDown:this._keyDown,onFocus:this._focus.bind(null,!0),onBlur:this._focus.bind(null,!1),className:r({"rw-date-picker":!0,"rw-widget":!0,"rw-open":this.state.open,"rw-state-focus":this.state.focused,"rw-has-both":this.props.calendar&&this.props.time,"rw-rtl":this.isRtl()})},h({ref:"valueInput","aria-activedescendant":this.state.open?"calendar"===this.state.openPopup?d:a:void 0,"aria-expanded":this.state.open,"aria-busy":!!this.props.busy,"aria-owns":e,role:"combobox",value:this.props.value,focused:this.state.focused,format:this.props.format,parse:this._parse,onChange:this.props.onChange}),i.DOM.span({className:"rw-select"},this.props.calendar&&m({onClick:this._click.bind(null,"calendar")},i.DOM.i({className:"rw-i rw-i-calendar"},i.DOM.span({className:"rw-sr"},this.props.messages.calendarButton))),this.props.time&&m({onClick:this._click.bind(null,"time")},i.DOM.i({className:"rw-i rw-i-clock-o"},i.DOM.span({className:"rw-sr"},this.props.messages.timeButton)))),this.props.time&&u({getAnchor:this._getAnchor,style:{width:this.state.width},open:this.state.open&&"time"===this.state.openPopup,onRequestClose:this.close},i.DOM.div(null,l({ref:"timePopup",id:s,optID:a,"aria-hidden":!this.state.open,style:{maxHeight:200,height:"auto"},value:this.props.value,min:this.props.min,max:this.props.max,onChange:this._selectTime}))),this.props.calendar&&u({getAnchor:this._getAnchor,style:{width:200},open:this.state.open&&"calendar"===this.state.openPopup,onRequestClose:this.close},p(o.pick(this.props,o.keys(c.type.propTypes)),c({ref:"calPopup",id:n,maintainFocus:!1,"aria-hidden":!this.state.open,onChange:this._selectDate})))))},setTimeDimensions:function(){if(this.props.time){var e=d.width(this.getDOMNode()),t=e!==this.state.width;t&&this.setState({width:e})}},_keyDown:function(e){"Tab"!==e.key&&(e.altKey?(e.preventDefault(),"ArrowDown"===e.key?this.open(this.state.open?"time"===this.state.openPopup?"calendar":"time":this.state.openPopup):"ArrowUp"===e.key&&this.close()):this.state.open&&("calendar"===this.state.openPopup&&this.refs.calPopup._keyDown(e),"time"===this.state.openPopup&&this.refs.timePopup._keyDown(e)))},_focus:function(e){var t=this,s=this.refs.valueInput;clearTimeout(t.timer),t.timer=setTimeout(function(){e?s.getDOMNode().focus():t.close(),e!==t.state.focused&&t.setState({focused:e})},0)},_selectDate:function(e){this.close(),this.props.onChange(a.merge(e,this.props.value))},_selectTime:function(e){this.close(),this.props.onChange(a.merge(this.props.value,e.date))},_click:function(e,t){this._focus(!0),this.toggle(e,t)},_parse:function(e){var t=o.isFunction(this.props.parse)?parse:o.partial(n,o.compact([this.props.format].concat(this.props.parse)));return t(e)},toggle:function(e){this.state.open?this.state.view!==e?this.open(e):this.close(e):this.open(e)},open:function(e){this.setState({open:!0,openPopup:e})},close:function(){this.setState({open:!1})},_getAnchor:function(){return this.refs.element.getDOMNode()}});var m=s(11)},function(e,t,s){var n=s(9),i=s(20),r=s(10),o=s(23).mergeIntoProps,a=s(24).directions,p=s(12),u=s(11),c={value:n.PropTypes.number,onChange:n.PropTypes.func,min:n.PropTypes.number,max:n.PropTypes.number,step:n.PropTypes.number,culture:n.PropTypes.string,format:n.PropTypes.string,parse:n.PropTypes.oneOfType([n.PropTypes.arrayOf(n.PropTypes.string),n.PropTypes.string,n.PropTypes.func]),messages:n.PropTypes.shape({increment:n.PropTypes.string,decrement:n.PropTypes.string})};e.exports=n.createClass({displayName:"NumberPicker",mixins:[s(35),s(38)],propTypes:c,getDefaultProps:function(){return{format:"d",min:-1/0,max:1/0,step:1,messages:{increment:"increment value",decrement:"decrement value"}}},getInitialState:function(){return{focused:!1,active:!1}},render:function(){var e=this,t=this.inRangeValue(this.props.value);return o(r.omit(this.props,r.keys(c)),n.DOM.div({ref:"element",onKeyDown:this._keyDown,onFocus:this._focus.bind(null,!0),onBlur:this._focus.bind(null,!1),tabIndex:"-1",className:i({"rw-number-picker":!0,"rw-widget":!0,"rw-state-focus":this.state.focused,"rw-rtl":this.isRtl()})},n.DOM.span({className:"rw-select"},u({className:i({"rw-state-active":this.state.active===a.UP}),onMouseDown:r.partial(e._mouseDown,a.UP),onMouseUp:r.partial(this._mouseUp,a.UP),onClick:r.partial(this._focus,!0),"aria-disabled":t===this.props.max||this.props.disabled},n.DOM.i({className:"rw-i rw-i-caret-up"},n.DOM.span({className:"rw-sr"},this.props.messages.increment))),u({className:i({"rw-state-active":this.state.active===a.DOWN}),onMouseDown:r.partial(e._mouseDown,a.DOWN),onMouseUp:r.partial(this._mouseUp,a.DOWN),onClick:r.partial(this._focus,!0),"aria-disabled":t===this.props.min||this.props.disabled},n.DOM.i({className:"rw-i rw-i-caret-down"},n.DOM.span({className:"rw-sr"},this.props.messages.decrement)))),p({ref:"input",value:t,editing:this.state.focused,format:this.props.format,role:"spinbutton","aria-valuenow":t,"aria-valuemin":r.isFinite(this.props.min)?this.props.min:"","aria-valuemax":r.isFinite(this.props.max)?this.props.max:"","aria-disabled":this.props.disabled,"aria-readonly":this.props.readonly,onChange:this.change,onKeyDown:this.props.onKeyDown})))},_mouseDown:function(e){var t=e===a.UP?this.increment:this.decrement;this.setState({active:e}),t(),this.interval=setInterval(t,800)},_mouseUp:function(){this.setState({active:!1}),clearInterval(this.interval)},_focus:function(e){var t=this;clearTimeout(t.timer),t.timer=setTimeout(function(){var s=t.refs.input.getDOMNode();e&&s.focus(),e!==t.state.focused&&t.setState({focused:e})},0)},_keyDown:function(e){var t=e.key;"End"===t&&r.isFinite(this.props.max)?this.change(this.props.max):"Home"===t&&r.isFinite(this.props.min)?this.change(this.props.min):"ArrowDown"===t?(e.preventDefault(),this.decrement()):"ArrowUp"===t&&(e.preventDefault(),this.increment())},increment:function(){this.change(this.props.value+this.props.step)},decrement:function(){this.change(this.props.value-this.props.step)},change:function(e){var t=this.props.onChange;e=this.inRangeValue(e),t&&this.props.value!==e&&t(e)},inRangeValue:function(e){return Math.max(Math.min(e,this.props.max),this.props.min)}})},function(e,t,s){"use strict";var n=s(9),i=s(20),r=s(10),o=s(25),a=(s(24).directions,s(23).mergeIntoProps),p=s(33),u=s(34),c=s(32),l=s(30),h=(s(11),{data:n.PropTypes.array,value:n.PropTypes.array,onChange:n.PropTypes.func,valueField:n.PropTypes.string,textField:n.PropTypes.string,tagComponent:n.PropTypes.func,messages:n.PropTypes.shape({open:n.PropTypes.string,emptyList:n.PropTypes.string,emptyFilter:n.PropTypes.string})});e.exports=n.createClass({displayName:"Select",mixins:[s(37),s(40),s(38),s(39)("focusedIndex")],propTypes:h,getDefaultProps:function(){return{filter:"startsWith",messages:{emptyList:"There are no items in this list",emptyFilter:"The filter returned no results"}}},getInitialState:function(){var e=this._dataIndexOf(this.props.data,this.props.value);return{open:!1,processedData:this.process(this.props.data,this.props.value,""),focusedIndex:-1===e?0:e}},componentWillReceiveProps:function(e){var t=this.process(e.data,e.value,this.state.searchTerm);this.setState({processedData:t})},componentDidMount:function(){this.setWidth()},render:function(){var e=this.props.id&&this.props.id+"_listbox",t=this.props.id&&this.props.id+"_option",s=this._data();return a(r.omit(this.props,r.keys(h)),n.DOM.div({ref:"element","aria-haspopup":!0,onKeyDown:this._keyDown,onFocus:this._focus.bind(null,!0),onBlur:this._focus.bind(null,!1),tabIndex:"-1",className:i({"rw-select-list":!0,"rw-widget":!0,"rw-state-focus":this.state.focused,"rw-open":this.state.open,"rw-rtl":this.isRtl()})},n.DOM.div({className:"rw-select-wrapper",onClick:this._click},u({ref:"tagList",value:[].concat(this.props.value),textField:this.props.textField,valueField:this.props.valueField,valueComponent:this.props.tagComponent,onDelete:this._delete}),p({"aria-expanded":this.state.open,"aria-busy":!!this.props.busy,"aria-owns":e,value:this.state.searchTerm,placeholder:this._placeholder(),focused:this.state.focused,onChange:this._typing})),c({style:{width:this.state.width},getAnchor:this._getAnchor,open:this.state.open,onRequestClose:this.close},n.DOM.div(null,l({ref:"list",id:e,optID:t,"aria-hidden":!this.state.open,style:{maxHeight:200,height:"auto"},data:s,value:this.props.value,textField:this.props.textField,valueField:this.props.valueField,focusedIndex:this.state.focusedIndex,onSelect:this._onSelect,messages:{emptyList:this.props.data.length?this.props.messages.emptyFilter:this.props.messages.emptyList}})))))},setWidth:function(){var e=o.width(this.getDOMNode()),t=e!==this.state.width;t&&this.setState({width:e})},_data:function(){return this.state.processedData},_delete:function(e){this._focus(!0),this.change(r.without(this.props.value,e))},_click:function(){this._focus(!0),!this.state.open&&this.open()},_focus:function(e){var t=this;clearTimeout(t.timer),t.timer=setTimeout(function(){e!==t.state.focused&&(t.setState({focused:e}),e||t.close())},0)},_typing:function(e){var t=this.process(this.props.data,this.props.value,e.target.value);this.setState({searchTerm:e.target.value,processedData:t,open:this.state.open||this.state.open===!1,focusedIndex:t.length>=this.state.focusedIndex?0:this.state.focusedIndex})},_onSelect:function(e){this.change(this.props.value.concat(e)),this.close(),this._focus(!0)},_keyDown:function(e){var t=e.key,s=e.altKey,n=!!this.state.searchTerm,i=this.state.open;"ArrowDown"===t?i?this.setFocusedIndex(this.nextFocusedIndex()):this.open():"ArrowUp"===t?s?this.close():i&&this.setFocusedIndex(this.prevFocusedIndex()):"End"===t?i?this.setFocusedIndex(this._data().length-1):this.refs.tagList.last():"Home"===t?i?this.setFocusedIndex(0):this.refs.tagList.first():i&&"Enter"===t?this._onSelect(this._data()[this.state.focusedIndex]):"Esc"===t?i?this.close():this.refs.tagList.clear():n||"ArrowLeft"!==t?n||"ArrowRight"!==t?n||"Delete"!==t?n||"Backspace"!==t||this.refs.tagList.removeNext():this.refs.tagList.removeCurrent():this.refs.tagList.next():this.refs.tagList.prev()},change:function(e){var t=this.props.onChange;t&&t(e)},open:function(){this.setState({open:!0})},close:function(){this.setState({open:!1})},toggle:function(){this.state.open?this.close():this.open()},process:function(e,t,s){var n=r.reject(e,function(e){return r.any(t,r.partial(this._valueMatcher,e),this)},this);return s&&(n=this.filter(n,s)),n},_placeholder:function(){return this.props.value.length?"":this.props.placeholder||""},_getAnchor:function(){return this.refs.element.getDOMNode()}})},function(e,t,s){"use strict";var n=s(9),i=s(23).cloneWithProps,r=s(25),o=s(10);e.exports=n.createClass({displayName:"ReplaceTransitionGroup",propTypes:{component:n.PropTypes.func,childFactory:n.PropTypes.func,onAnimating:n.PropTypes.func,onAnimate:n.PropTypes.func},getDefaultProps:function(){return{component:n.DOM.span,childFactory:function(e){return e},onAnimating:o.noop,onAnimate:o.noop}},getInitialState:function(){return{children:n.Children.map(this.props.children,function(e){return e})}},componentWillReceiveProps:function(e){var t=n.Children.map(e.children,function(e){return e}),s=this.state.children;this.setState({children:o.extend({},s,t)}),o.any(t,function(e,t){var n=s&&o.has(s,t),i=!n&&!this.currentlyTransitioningKeys[t];return i&&(this.next=t),i},this),o.any(s,function(e,s){var n=t&&o.has(t,s),i=!n&&!this.currentlyTransitioningKeys[s];return i&&(this.current=s),i},this)},componentWillMount:function(){this.currentlyTransitioningKeys={},this.current=null,this.next=null},componentDidUpdate:function(){var e,t,s=this.current,n=this.next,i=this.refs[s||n],o=this.getDOMNode(),a=i&&i.getDOMNode();a&&(e=r.height(a)+"px",t=r.width(a)+"px",r.css(o,{overflow:"hidden",height:e,width:t})),this.props.onAnimating(),this.next=null,this.current=null,n&&this.performEnter(n),s&&this.performLeave(s)},performEnter:function(e){this.currentlyTransitioningKeys[e]=!0;var t=this.refs[e];t.componentWillEnter?t.componentWillEnter(this._handleDoneEntering.bind(this,e)):this._handleDoneEntering(e)},_tryFinish:function(){var e=this.getDOMNode();this.isTransitioning()||(r.css(e,{overflow:"visible",height:"",width:""}),this.props.onAnimate())},_handleDoneEntering:function(e){var t=this.refs[e];t.componentDidEnter&&t.componentDidEnter(),delete this.currentlyTransitioningKeys[e];var s=n.Children.map(this.props.children,function(e){return e});s&&o.has(s,e)||this.performLeave(e),this._tryFinish()},isTransitioning:function(){return 0!==Object.keys(this.currentlyTransitioningKeys).length},performLeave:function(e){var t=this.refs[e];this.currentlyTransitioningKeys[e]=!0,t.componentWillLeave?t.componentWillLeave(this._handleDoneLeaving.bind(this,e)):this._handleDoneLeaving(e)},_handleDoneLeaving:function(e){var t=this.refs[e];t.componentDidLeave&&t.componentDidLeave(),delete this.currentlyTransitioningKeys[e];var s=n.Children.map(this.props.children,function(e){return e});if(s&&s.hasOwnProperty(e))this.performEnter(e);else{var i=o.extend({},this.state.children);delete i[e],this.setState({children:i})}this._tryFinish()},render:function(){var e={};for(var t in this.state.children){var s=this.state.children[t];s&&(e[t]=i(this.props.childFactory(s),{ref:t}))}return this.transferPropsTo(this.props.component(null,e))}})},function(e,t,s){var n=s(9),i=s(7),r=s(25),o=(s(10),n.createClass({displayName:"SlideChildGroup",propTypes:{direction:n.PropTypes.oneOf(["left","right"])},getDefaultProps:function(){return{duration:250}},componentWillEnter:function(e){var t=this,s=this.getDOMNode(),n=r.width(s),i=this.props.direction;n="left"===i?n:-n,this.ORGINAL_POSITION=s.style.position,r.css(s,{position:"absolute",left:n+"px",top:0}),r.animate(s,{left:0},t.props.duration,function(){r.css(s,{position:t.ORGINAL_POSITION,overflow:"hidden"}),t.ORGINAL_POSITION=null,e&&e()})},componentWillLeave:function(e){var t=this,s=this.getDOMNode(),n=r.width(s),i=this.props.direction;n="left"===i?-n:n,this.ORGINAL_POSITION=s.style.position,r.css(s,{position:"absolute",top:0,left:0}),r.animate(s,{left:n+"px"},t.props.duration,function(){r.css(s,{position:t.ORGINAL_POSITION,overflow:"hidden"}),t.ORGINAL_POSITION=null,e&&e()})},render:function(){return n.Children.only(this.props.children)}}));e.exports=n.createClass({displayName:"exports",propTypes:{direction:n.PropTypes.oneOf(["left","right"])},getDefaultProps:function(){return{direction:"left"}},_wrapChild:function(e){return o({direction:this.props.direction},e)},render:function(){return this.transferPropsTo(i({ref:"container",childFactory:this._wrapChild,style:{position:"relative",overflow:"hidden"},component:n.DOM.div},this.props.children))},isTransitioning:function(){return this.isMounted()&&this.refs.container.isTransitioning()}})},function(e){!function(){e.exports=this["window.React"]}()},function(e){!function(){e.exports=this["window._"]}()},function(e,t,s){var n=s(9);e.exports=n.createClass({displayName:"exports",render:function(){return this.transferPropsTo(n.DOM.button({type:"button",className:"rw-btn"},this.props.children))}})},function(e,t,s){var n=s(9),i=(s(20),s(22),s(21)),r=s(41);e.exports=n.createClass({displayName:"NumberPickerInput",propTypes:{value:n.PropTypes.number,format:n.PropTypes.string,onChange:n.PropTypes.func.isRequired,onKeyDown:n.PropTypes.func},getDefaultProps:function(){return{value:null,format:"d",editing:!1}},getInitialState:function(){return{stringValue:""}},componentWillReceiveProps:function(){this.current("")},render:function(){var e=this.state.stringValue||this.props.value;return e=this.props.editing?e:r.format(e,this.props.format),this.transferPropsTo(n.DOM.input({type:"text",className:"rw-input",onKeyDown:this.props.onKeyDown,onChange:this._change,value:e}))},_change:function(e){var t=+e.target.value;isNaN(t)||(t!==this.props.value?this.props.onChange(t):this.current(e.target.value))},current:i("stringValue")})},function(e,t,s){{var n=s(9),i=(s(20),s(28)),r=s(30),o=s(23).mergeIntoProps,a=(s(24).directions,s(10));n.createClass({displayName:"ListItem",render:function(){return this.transferPropsTo(n.DOM.li(null,i.format(this.props.item,this.props.format)))}})}e.exports=n.createClass({displayName:"TimeList",mixins:[s(36),s(39)("selectedIndex"),s(39)("focusedIndex")],propTypes:{value:n.PropTypes.instanceOf(Date),min:n.PropTypes.instanceOf(Date),max:n.PropTypes.instanceOf(Date),step:n.PropTypes.number,onChange:n.PropTypes.func.isRequired},getDefaultProps:function(){return{step:30,format:"t"}},getInitialState:function(){var e=this._selectedIndex(this._data(),this.props.value);return{focusedIndex:-1===e?0:e}},render:function(){var e=this._data(),t=(this.props.format,this._selectedIndex(e,this.props.value));return o(a.omit(this.props,"value"),r({ref:"list",data:e,textField:"label",valueField:"date",selectedIndex:t,focusedIndex:this.state.focusedIndex,onSelect:this.props.onChange}))},_selectedIndex:function(e,t){return a.findIndex(e,function(e){return i.eq(t,e,"hours")})},_data:function(){for(var e=[],t=i.eq(this.props.value,this.props.min,"day")?this.props.min:i.today,s=i.eq(this.props.value,this.props.max,"day")?this.props.max:i.tomorrow;i.lt(t,s,"day");)e.push({date:t,label:i.format(t,this.props.format)}),t=i.add(t,this.props.step||30,"minutes");return e},_keyDown:function(e){var t=this,s=e.key,n=String.fromCharCode(e.keyCode);"End"===s?this.setFocusedIndex(this._data().length-1):"Home"===s?this.setFocusedIndex(0):"Enter"===s?this.props.onChange(this._data()[this.state.focusedIndex]):"ArrowDown"===s?(e.preventDefault(),this.setFocusedIndex(this.nextFocusedIndex())):"ArrowUp"===s?(e.preventDefault(),this.setFocusedIndex(this.prevFocusedIndex())):(e.preventDefault(),this.search(n,function(e){t.setFocusedIndex(this.findIndex(e,t.state.focusedIndex))
+}))}});s(11)},function(e,t,s){function n(e){return!isNaN(e.getTime())}var i=s(9),r=s(20),o=s(22),a=s(28);e.exports=i.createClass({displayName:"DatePickerInput",propTypes:{format:i.PropTypes.string,parse:i.PropTypes.func.isRequired,value:i.PropTypes.instanceOf(Date),onChange:i.PropTypes.func.isRequired},componentWillReceiveProps:function(e){this.setState({textValue:this.formatDate(e.value)})},getInitialState:function(){var e=this.formatDate(this.props.value);return{textValue:e,lastValue:e}},getDefaultProps:function(){return{value:null}},render:function(){return this.transferPropsTo(i.DOM.input({type:"text",className:r({"rw-input":!0}),value:this.state.textValue,onChange:this._change,onBlur:o.chain(this.props.blur,this._blur)}))},_change:function(e){this.setState({textValue:e.target.value})},_blur:function(){var e=this.state.textValue;e!==this.state.lastValue&&(this.props.onChange(this.props.parse(e),e),this.setState({lastValue:e}))},focus:function(){this.getDOMNode().focus()},formatDate:function(e){var t="";return e instanceof Date&&n(e)&&(t=a.format(e,this.props.format)),t}})},function(e,t,s){var n=s(9),i=(s(20),s(11));e.exports=n.createClass({displayName:"exports",propTypes:{label:n.PropTypes.string.isRequired,labelId:n.PropTypes.string,upDisabled:n.PropTypes.bool.isRequired,prevDisabled:n.PropTypes.bool.isRequired,nextDisabled:n.PropTypes.bool.isRequired,onViewChange:n.PropTypes.func.isRequired,onMoveLeft:n.PropTypes.func.isRequired,onMoveRight:n.PropTypes.func.isRequired,messages:n.PropTypes.shape({moveBack:n.PropTypes.string,moveForward:n.PropTypes.string})},mixins:[s(35),s(43)],getDefaultProps:function(){return{messages:{moveBack:"navigate back",moveForward:"navigate forward"}}},render:function(){var e=this.isRtl();return n.DOM.div({className:"rw-header"},i({className:"rw-btn-left",onClick:this.props.onMoveLeft,disabled:this.props.prevDisabled,"aria-disabled":this.props.prevDisabled,title:this.props.moveBack},n.DOM.i({className:"rw-i rw-i-caret-"+(e?"right":"left")},n.DOM.span({className:"rw-sr"},"Pthis.props.moveBack}"))),i({className:"rw-btn-view",id:this.props.labelId,onClick:this.props.onViewChange,disabled:this.props.upDisabled,"aria-disabled":this.props.upDisabled},this.props.label),i({className:"rw-btn-right",onClick:this.props.onMoveRight,disabled:this.props.nextDisabled,"aria-disabled":this.props.nextDisabled,title:this.props.moveForward},n.DOM.i({className:"rw-i rw-i-caret-"+(e?"left":"right")},n.DOM.span({className:"rw-sr"},this.props.moveForward))))}})},function(e,t,s){var n=s(9),i=s(20),r=s(28),o=s(42),a=s(24).directions,p=s(23).mergeIntoProps,u=s(10),c=s(11),l={LEFT:a.RIGHT,RIGHT:a.LEFT};e.exports=n.createClass({displayName:"MonthView",mixins:[s(43),s(44)("month","day")],propTypes:{culture:n.PropTypes.array,value:n.PropTypes.instanceOf(Date),selectedDate:n.PropTypes.instanceOf(Date),min:n.PropTypes.instanceOf(Date),max:n.PropTypes.instanceOf(Date),format:n.PropTypes.string,onChange:n.PropTypes.func.isRequired,onMoveLeft:n.PropTypes.func,onMoveRight:n.PropTypes.func},render:function(){var e=r.visibleDays(this.props.value),t=o(e,7);return p(u.omit(this.props,"max","min","value","onChange"),n.DOM.table({role:"grid",tabIndex:"0",className:"rw-calendar-grid",onKeyUp:this._keyUp},n.DOM.thead(null,n.DOM.tr(null,this._headers())),n.DOM.tbody(null,u.map(t,this._row))))},_row:function(e,t){return n.DOM.tr({key:"week_"+t},u.map(e,function(e,t){var s=r.eq(e,this.state.focusedDate,"day"),o=r.eq(e,this.props.selectedDate,"day"),a=this.props.id&&this.props.id+"_selected_item";return r.inRange(e,this.props.min,this.props.max)?n.DOM.td({key:"day_"+t},c({tabIndex:"-1",onClick:u.partial(this.props.onChange,e),"aria-selected":o,className:i({"rw-off-range":r.month(e)!==r.month(this.state.focusedDate),"rw-state-focus":s,"rw-state-selected":o}),id:s?a:void 0},r.format(e,"dd"))):n.DOM.td({key:"day_"+t,className:"rw-empty-cell"}," ")}.bind(this)))},_headers:function(e){var t=r.shortDaysOfWeek(e);return u.map(t,function(e,t){return n.DOM.th({key:"header_"+t},e)})},move:function(e,t){return this.isRtl()&&l[t]&&(t=l[t]),t===a.LEFT?e=r.subtract(e,1,"day"):t===a.RIGHT?e=r.add(e,1,"day"):t===a.UP?e=r.subtract(e,1,"week"):t===a.DOWN&&(e=r.add(e,1,"week")),e}})},function(e,t,s){var n=s(9),i=s(20),r=s(28),o=s(42),a=s(24).directions,p=s(23).mergeIntoProps,u=s(10),c={LEFT:a.RIGHT,RIGHT:a.LEFT};e.exports=n.createClass({displayName:"YearView",mixins:[s(43),s(44)("year","month")],propTypes:{value:n.PropTypes.instanceOf(Date),min:n.PropTypes.instanceOf(Date),max:n.PropTypes.instanceOf(Date),onChange:n.PropTypes.func.isRequired},render:function(){var e=r.monthsInYear(r.year(this.props.value)),t=o(e,4);return p(u.omit(this.props,"max","min","value","onChange"),n.DOM.table({tabIndex:"0",ref:"table",role:"grid",className:"rw-calendar-grid rw-nav-view","aria-labeledby":this.props["aria-labeledby"],onKeyUp:this._keyUp},n.DOM.tbody(null,u.map(t,this._row))))},_row:function(e,t){return n.DOM.tr({key:t},u.map(e,function(e,t){var s=r.eq(e,this.state.focusedDate,"month"),o=r.eq(e,this.props.value,"month"),a=this.props.id&&this.props.id+"_selected_item";return r.inRange(e,this.props.min,this.props.max,"month")?n.DOM.td({key:t},l({onClick:u.partial(this.props.onChange,e),tabIndex:"-1",id:s?a:void 0,"aria-selected":o,className:i({"rw-state-focus":s,"rw-state-selected":o})},r.format(e,r.formats.MONTH_NAME_ABRV))):n.DOM.td({key:t,className:"rw-empty-cell"}," ")}.bind(this)))},focus:function(){this.refs.table.getDOMNode().focus()},move:function(e,t){return this.isRtl()&&c[t]&&(t=c[t]),t===a.LEFT?e=r.subtract(e,1,"month"):t===a.RIGHT?e=r.add(e,1,"month"):t===a.UP?e=r.subtract(e,4,"month"):t===a.DOWN&&(e=r.add(e,4,"month")),e}});var l=s(11)},function(e,t,s){function n(e,t){return a.gte(e,a.startOf(t,"decade"),"year")&&a.lte(e,a.endOf(t,"decade"),"year")}function i(e){var e=a.add(a.startOf(e,"decade"),-2,"year");return l.map(l.range(12),function(){return e=a.add(e,1,"year")})}var r=s(9),o=s(20),a=s(28),p=s(42),u=s(24).directions,c=s(23).mergeIntoProps,l=s(10),h={LEFT:u.RIGHT,RIGHT:u.LEFT};e.exports=r.createClass({displayName:"DecadeView",mixins:[s(35),s(43),s(44)("decade","year")],propTypes:{value:r.PropTypes.instanceOf(Date),min:r.PropTypes.instanceOf(Date),max:r.PropTypes.instanceOf(Date),onChange:r.PropTypes.func.isRequired},render:function(){var e=i(this.props.value),t=p(e,4),s=this.props.id&&this.props.id+"_selected_option";return this.selectedId=s,c(l.omit(this.props,"max","min","value","onChange"),r.DOM.table({tabIndex:"0",role:"grid",className:"rw-calendar-grid rw-nav-view","aria-activedescendant":s,"aria-labeledby":this.props["aria-labeledby"],onKeyUp:this._keyUp},r.DOM.tbody(null,l.map(t,this._row))))},_row:function(e,t){this.selectedId;return r.DOM.tr({key:"row_"+t},l.map(e,function(e,t){var s=a.eq(e,this.state.focusedDate,"year"),i=a.eq(e,this.props.value,"year"),p=this.props.id&&this.props.id+"_selected_item";return a.inRange(e,this.props.min,this.props.max,"year")?r.DOM.td({key:t},d({onClick:l.partial(this.props.onChange,e),tabIndex:"-1",id:s?p:void 0,"aria-selected":i,className:o({"rw-off-range":!n(e,this.props.value),"rw-state-focus":s,"rw-state-selected":i})},a.format(e,a.formats.YEAR))):r.DOM.td({key:t,className:"rw-empty-cell"}," ")}.bind(this)))},move:function(e,t){return this.isRtl()&&h[t]&&(t=h[t]),t===u.LEFT?e=a.subtract(e,1,"year"):t===u.RIGHT?e=a.add(e,1,"year"):t===u.UP?e=a.subtract(e,4,"year"):t===u.DOWN&&(e=a.add(e,4,"year")),e}});var d=s(11)},function(e,t,s){function n(e){return c.format(c.startOf(e,"decade"),c.formats.YEAR)+" - "+c.format(c.endOf(e,"decade"),c.formats.YEAR)}function i(e,t,s){return c.max(c.min(e,s),t)}function r(e,t,s){return c.gte(e,c.startOf(t,"decade"),"year")&&c.lte(e,c.endOf(s,"decade"),"year")}function o(e,t){return c.gte(e,c.startOf(t,"century"),"year")&&c.lte(e,c.endOf(t,"century"),"year")}function a(e){var e=c.add(c.startOf(e,"century"),-20,"year");return f.map(f.range(12),function(){return e=c.add(e,10,"year")})}var p=s(9),u=s(20),c=s(28),l=s(42),h=s(24).directions,d=s(23).mergeIntoProps,f=s(10),m={LEFT:h.RIGHT,RIGHT:h.LEFT};e.exports=p.createClass({displayName:"CenturyView",mixins:[s(35),s(43),s(44)("century","decade")],propTypes:{value:p.PropTypes.instanceOf(Date),min:p.PropTypes.instanceOf(Date),max:p.PropTypes.instanceOf(Date),onChange:p.PropTypes.func.isRequired},render:function(){var e=a(this.props.value),t=l(e,4);return d(f.omit(this.props,"max","min","value","onChange"),p.DOM.table({tabIndex:"0",role:"grid",className:"rw-calendar-grid rw-nav-view","aria-labeledby":this.props["aria-labeledby"],onKeyUp:this._keyUp},p.DOM.tbody(null,f.map(t,this._row))))},_row:function(e,t){return p.DOM.tr({key:"row_"+t},f.map(e,function(e,t){var s=c.eq(e,this.state.focusedDate,"decade"),a=c.eq(e,this.props.value,"decade"),l=this.props.id&&this.props.id+"_selected_item",h=i(e,this.props.min,this.props.max);return r(e,this.props.min,this.props.max)?p.DOM.td({key:t},y({onClick:f.partial(this.props.onChange,h),tabIndex:"-1",id:s?l:void 0,"aria-selected":a,className:u({"rw-off-range":!o(e,this.props.value),"rw-state-focus":s,"rw-state-selected":a})},n(e))):p.DOM.td({key:t,className:"rw-empty-cell"}," ")}.bind(this)))},move:function(e,t){return this.isRtl()&&m[t]&&(t=m[t]),t===h.LEFT?e=c.subtract(e,1,"decade"):t===h.RIGHT?e=c.add(e,1,"decade"):t===h.UP?e=c.subtract(e,4,"decade"):t===h.DOWN&&(e=c.add(e,4,"decade")),e}});var y=s(11)},function(e,t,s){var n=s(10);e.exports=function(e){return n.isArray(e)||(e=n.transform(e,function(e,t,s){t&&e.push(s)},[])),e.join(" ")}},function(e){e.exports=function(e){return function(t){var s={};return s[e]=t,this.setState(s),this}}},function(e,t,s){function n(e,t){return function(){var s=e.apply(this,arguments),n=t.apply(this,arguments);if(null!=s||null!=n)return null==s?n:null==n?s:i.extend(s,n)}}var i=s(10),r=e.exports={chain:function(e,t){return function(){e&&e.apply(this,arguments),t&&t.apply(this,arguments)}},merge:function(e,t){if(typeof e!=typeof t)throw new TypeError;return i.isArray(e)?e.splice(e.length,0,t):i.isFunction(e)?e=n(e,t):i.extend(e,t),e},before:i.curry(function(e,t){return function(){return e.apply(this,arguments),t.apply(this,arguments)}}),after:i.curry(function(e,t){return function(){var s=t.apply(this,arguments);return e.apply(this,arguments),s}}),around:i.curry(function(e,t){return function(){var s=[t].concat(i.toArray(arguments));return e.apply(this,s)}}),provided:function(e){return r.around(function(t){var s=i.rest(arguments);return e.apply(this,s)?t.apply(this,s):void 0})}}},function(e,t,s){function n(e,t){return a.transform(t,function(e,t,s){a.has(u,s)?u[s](e,t,s):a.has(e,s)||(e[s]=t)},e)}function i(e){return function(t,s,n){t[n]=a.has(t,n)?e(t[n],s):s}}function r(){return a.reduce(arguments,function(e,t){return e?t?e+=" "+t:e:t||""},"")}function o(e,t){return a.extend({},e,t)}var a=s(10),p=s(9),u={className:i(r),children:a.noop,key:a.noop,ref:a.noop,style:i(o)};e.exports={mergeIntoProps:function(e,t){var s=t.props?t.props:t;return n(s,e),t},cloneWithProps:function(e,t){var s=n(a.clone(t),e.props);return!a.has(s,"children")&&a.has(e.props,"children")&&(s.children=e.props.children),0===p.version.indexOf("0.10.")?e.constructor.ConvenienceConstructor(s):e.constructor(s)}}},function(e,t,s){function n(e){return i.mapValues(e,function(e,t){return t})}var i=s(10);e.exports={directions:n({LEFT:null,RIGHT:null,UP:null,DOWN:null})}},function(e,t,s){function n(e){return e.replace(/-+(.)?/g,function(e,t){return t?t.toUpperCase():""})}function i(e){return e.replace(/[A-Z]/g,function(e,t){return(0!==t?"-":"")+e.toLowerCase()})}function r(e){return e.ownerDocument.defaultView.opener?e.ownerDocument.defaultView.getComputedStyle(e,null):window.getComputedStyle(e,null)}var o,a,p,u,c,l,h=s(10),d="",f=document.createElement("div"),m={},y={O:"otransitionend",Moz:"transitionend",Webkit:"webkitTransitionEnd"};h.any(y,function(e,t){return void 0!==f.style[t+"TransitionProperty"]?(d="-"+t.toLowerCase()+"-",l=e,!0):void 0}),l||void 0===f.style.transitionProperty||(l="transitionend"),c=!l,m[p=d+"transition-property"]=m[a=d+"transition-duration"]=m[u=d+"transition-delay"]=m[o=d+"transition-timing-function"]="";var v=e.exports={width:function(e){return v.offset(e).width},height:function(e){return v.offset(e).height},hasFocus:function(e){var t=e.ownerDocument;return null==t.activeElement?!1:t.activeElement===e},offset:function(e){var t=e.ownerDocument,s=t&&t.documentElement,n={top:0,left:0};if(s)return v.contains(s,e)?(void 0!==e.getBoundingClientRect&&(n=e.getBoundingClientRect()),{top:n.top+window.pageYOffset-s.clientTop,left:n.left+window.pageXOffset-s.clientLeft,width:n.width||e.offsetWidth,height:n.height||e.offsetHeight}):n},css:function(e,t,s){var o="",a=t;if("string"==typeof t){if(void 0===s)return e.style[n(t)]||r(e).getPropertyValue(t);(a={})[t]=s}h.each(a,function(t,s){t||0===t?o+=i(s)+":"+t+";":e.style.removeProperty(i(s))}),e.style.cssText+=";"+o},contains:function(){var e=document.documentElement;return e&&e.contains?function(e,t){return e.contains(t)}:e&&e.compareDocumentPosition?function(e,t){return e===t||!!(16&e.compareDocumentPosition(t))}:function(e,t){if(t)do if(t===e)return!0;while(t=t.parentNode);return!1}}(),on:function(e,t,s){e.addEventListener?e.addEventListener(t,s,!1):e.attachEvent?e.attachEvent("on"+t,s):e["on"+t]=s},off:function(e,t,s){e.addEventListener?e.removeEventListener(t,s,!1):e.attachEvent?e.detachEvent("on"+t,s):e["on"+t]=null},trigger:function(e,t){var s=document.createEvent("Events");s.initEvent(t,!0,!0),e.dispatchEvent(s)},animate:function(e,t,s,n,r){function d(t){t.target===t.currentTarget&&(f=!0,v.off(t.target,l,d),v.css(e,m),r&&r.call(this))}var f,y=[],g={target:e,currentTarget:e},w={};h.isFunction(n)&&(r=n,n=null),c&&(s=0),void 0===s&&(s=200);for(key in t)w[key]=t[key],y.push(i(key));s>0&&(w[p]=y.join(", "),w[a]=s/1e3+"s",w[u]="0s",w[o]=n||"linear"),s>0&&(v.on(e,l,d),setTimeout(function(){f||d(g)},s+25)),e.clientLeft,v.css(e,w),0>=s&&setTimeout(h.partial(d,g),0)}}},function(e){e.exports=function(e,t,s){return void 0===t?{start:e.selectionStart,end:e.selectionEnd}:(e.focus(),void e.setSelectionRange(t,s))}},function(e,t,s){var n=s(10),i={eq:function(e,t){return e===t},neq:function(e,t){return e!==t},gt:function(e,t){return e>t},gte:function(e,t){return e>=t},lt:function(e,t){return t>e},ltw:function(e,t){return t>=e},contains:function(e,t){return n.contains(e,t)},startsWith:function(e,t){return 0===e.lastIndexOf(t,0)},endsWith:function(e,t){var s=e.length-t.length,n=e.indexOf(t,s);return-1!==n&&n===s}};e.exports=i,e.exports.filter=function r(e,r){if(r="string"==typeof r?i[r]:r,"function"!=typeof r)throw new TypeError;return n.filter(e,r)}},function(e,t,s){var n=s(45),i=s(41),r=s(10),o=e.exports=r.extend({},n,{culture:function(){return i.culture()},startOfWeek:function(){var e=i.culture();return e&&e.calendar?e.calendar.firstDay||0:0},parse:function(e,t,s){return i.parseDate(e,t,s)},format:function(e,t,s){return i.format(e,t,s)},shortDaysOfWeek:function(){var e=o.culture();return e&&e.calendar?e.calendar.days.namesShort.slice():void 0},daysOfWeek:function(e,t){return 1===arguments.length&&(t=e,e=new Date),t=t||"do",r.map(r.range(7),function(s){return o.format(n.weekday(e,s),t)})},months:function(e,t){return 1===arguments.length&&(t=e,e=new Date),t=t||o.formats.DAY_NAME_ABRV,r.map(r.range(12),function(s){return o.format(n.month(e,s),t)})},monthsInYear:function(e){var t=new Date(e,0,1);return r.map(r.range(12),function(e){return n.month(t,e)})},firstOfDecade:function(e){var t=n.year(e)%10;return n.subtract(e,t,"year")},lastOfDecade:function(e){return n.add(o.firstOfDecade(e),9,"year")},firstOfCentury:function(e){var t=n.year(e)%100;return n.subtract(e,t,"year")},lastOfCentury:function(e){return n.add(o.firstOfCentury(e),99,"year")},firstVisibleDay:function(e){var t=n.startOf(e,"month");return n.startOf(t,"week")},lastVisibleDay:function(e){var t=n.endOf(e,"month");return n.endOf(t,"week")},visibleDays:function(e){for(var t=o.firstVisibleDay(e),s=o.lastVisibleDay(e),i=[];n.lte(t,s,"day");)i.push(t),t=n.add(t,1,"day");return i},merge:function(e,t){return e=o.startOf(e,"day"),e=o.hours(e,o.hours(t)),e=o.minutes(e,o.minutes(t)),e=o.seconds(e,o.seconds(t)),o.milliseconds(e,o.milliseconds(t))},sameMonth:function(e,t){return n.eq(e,t,"month")},formats:{DAY_OF_MONTH:"dd",DAY_NAME_SHORT:null,MONTH_NAME_ABRV:"MMM",MONTH_YEAR:"MMMM yyyy",YEAR:"yyyy"}});Object.defineProperties(o,{now:{enumerable:!0,get:function(){return Date.now?Date.now:new Date}},today:{enumerable:!0,get:function(){return this.startOf(new Date,"day")}},yesterday:{enumerable:!0,get:function(){return this.add(this.startOf(new Date,"day"),-1,"day")}},tomorrow:{enumerable:!0,get:function(){return this.add(this.startOf(new Date,"day"),1,"day")}}})},function(e,t,s){var n=s(9),i=s(23).mergeIntoProps,r=s(10);e.exports=n.createClass({displayName:"exports",mixins:[s(37)],render:function(){var e=this.props.value;return i(r.omit(this.props,"value"),n.DOM.div(null,this._dataText(e)))}})},function(e,t,s){var n=s(9),i=(s(27),s(22),s(23).mergeIntoProps),r=s(20),o=s(10),a=n.createClass({displayName:"DefaultListItem",mixins:[s(37),s(43)],render:function(){var e=this.props.item;return this.transferPropsTo(n.DOM.li(null,e?this._dataText(e):""))}});e.exports=n.createClass({displayName:"List",mixins:[s(37)],propTypes:{data:n.PropTypes.array,value:n.PropTypes.any,listItem:n.PropTypes.component,valueField:n.PropTypes.string,textField:n.PropTypes.string,optID:n.PropTypes.string,messages:n.PropTypes.shape({emptyList:n.PropTypes.string})},getDefaultProps:function(){return{listItem:a,delay:500,optID:"",messages:{emptyList:"There are no items in this list"}}},componentDidUpdate:function(e){e.focusedIndex!==this.props.focusedIndex&&this._setScrollPosition()},render:function(){var e=this.props.listItem,t=n.DOM.li(null,this.props.messages.emptyList),s=(n.DOM.li(null,this.props.messages.emptyFilter),o.map(this.props.data,function(t,s){var n=s===this.props.focusedIndex;return e({key:"item_"+s,item:t,role:"option",id:n?this.props.optID:"","aria-selected":s===this.props.selectedIndex,textField:this.props.textField,valueField:this.props.valueField,unselectable:"on",className:r({"rw-state-focus":n,"rw-state-selected":s===this.props.selectedIndex}),onClick:o.partial(this.props.onSelect,t,s)})}.bind(this)));return i(o.omit(this.props,"data","selectedIndex"),n.DOM.ul({className:"rw-list",role:"listbox",tabIndex:"-1",onKeyDown:this._keyDown,onKeyPress:this.search},this.props.data.length?s:t))},_setScrollPosition:function(){var e,t,s,n,i,r=this.getDOMNode(),o=r.children[this.props.focusedIndex];o&&(e=r.scrollTop,t=r.clientHeight,s=o.offsetTop,n=o.offsetHeight,i=s+n,r.scrollTop=e>s?s:i>e+t?i-t:e)}})},function(e,t,s){var n=s(9),i=(s(20),s(22),s(26));e.exports=n.createClass({displayName:"exports",propTypes:{value:n.PropTypes.string,suggestion:n.PropTypes.string,onChange:n.PropTypes.func.isRequired},componentDidUpdate:function(){var e=this.getDOMNode(),t=this.props.value,s=""!==this._last&&-1!==t.indexOf(this._last)&&this._last!==t;if(this.props.suggest&&s){var n=t.indexOf(this._last)+this._last.length,r=t.length-n;n>=0&&i(e,n,n+r)}this._last=t},getDefaultProps:function(){return{value:"",suggestion:""}},render:function(){return this.transferPropsTo(n.DOM.input({type:"text",className:"rw-input",onKeyDown:this.props.onKeyDown,onChange:this._change,value:this.props.value}))},_change:function(e){var t=e.target.value;this._last=t,this.props.onChange(e,t)},focus:function(){this.getDOMNode().focus()}})},function(e,t,s){function n(e){var t,s=i.Children.map(e,function(e){return e});for(t in s)return t}var i=s(9),r=(s(20),s(10)),o=s(23).mergeIntoProps,a=s(25);e.exports=i.createClass({displayName:"exports",propTypes:{getAnchor:i.PropTypes.func.isRequired,onRequestClose:i.PropTypes.func.isRequired,onClosing:i.PropTypes.func,onOpening:i.PropTypes.func,onClose:i.PropTypes.func,onOpen:i.PropTypes.func},getDefaultProps:function(){return{height:"auto",duration:200,open:!1,onClosing:r.noop,onOpening:r.noop,onClose:r.noop,onOpen:r.noop}},componentWillUnmount:function(){a.off(document,"click",self._onClick),a.off(window,"resize",self._resize)},componentDidMount:function(){var e=this,t=this.getDOMNode();e._onClick=function(s){var n=!a.contains(document,s.target),i=a.contains(t,s.target),r=a.contains(e.props.getAnchor(),s.target);!e.props.open||r||i||n||e.props.onRequestClose()},e._resize=r.throttle(this.position.bind(this),100),a.off(window,"resize",e._resize),a.off(document,"click",e._onClick),this.position(),this.close(0)},componentWillReceiveProps:function(e){this.setState({contentChanged:n(e.children)!==n(this.props.children)})},componentDidUpdate:function(e){{var t=this,s=e.open&&!this.props.open,n=!e.open&&this.props.open;e.open===this.props.open}this.position(),n?t.open():s&&t.close()},render:function(){var e=r.extend({},this.props.style||{},{overflow:"hidden",position:"absolute",zIndex:1005}),t=o({className:"rw-popup rw-widget"},this.props.children);return t.props.ref=this.props.children.props.ref,i.DOM.div({style:e},p({ref:"content"},t))},dimensions:function(){var e=this.getDOMNode();e.style.display="block",e.style.height=a.height(this.refs.content.getDOMNode())+"px"},position:function(){var e=a.offset(this.props.getAnchor());a.css(this.getDOMNode(),{top:e.height-1+"px",left:"-1px"})},open:function(){var e=this,t=this.getDOMNode(),s=this.refs.content.getDOMNode();this.ORGINAL_POSITION=s.style.position,this.dimensions(),this.props.onOpening(),s.style.position="absolute",a.animate(s,{top:0},e.props.duration,function(){a.css(s,{position:e.ORGINAL_POSITION}),t.style.overflow="visible",e.ORGINAL_POSITION=null,e.props.onOpen()})},close:function(e){{var t=this,s=this.refs.content.getDOMNode(),n=this.getDOMNode();n.style.height}this.ORGINAL_POSITION=s.style.position,this.dimensions(),this.props.onClosing(),n.style.overflow="hidden",s.style.position="absolute",a.animate(s,{top:"-100%"},void 0===e?this.props.duration:e,function(){a.css(s,{position:t.ORGINAL_POSITION}),n.style.display="none",t.ORGINAL_POSITION=null,t.props.onClose()})}});var p=i.createClass({displayName:"PopupContent",render:function(){return i.Children.only(this.props.children)}})},function(e,t,s){var n=s(9);e.exports=n.createClass({displayName:"exports",propTypes:{value:n.PropTypes.string,onChange:n.PropTypes.func.isRequired},componentDidUpdate:function(){this.props.focused&&this.focus()},render:function(){var e=this.props.value,t=this.props.placeholder,s=Math.max((e||t).length,1);return this.transferPropsTo(n.DOM.input({type:"text",className:"rw-input",size:s}))},focus:function(){this.getDOMNode().focus()}})},function(e,t,s){var n=s(9),i=s(10),r=s(20),o=s(23).mergeIntoProps,a=s(11);e.exports=n.createClass({displayName:"SelectTagList",mixins:[s(37)],propTypes:{value:n.PropTypes.array,valueField:n.PropTypes.string,textField:n.PropTypes.string,valueComponent:n.PropTypes.component},getDefaultProps:function(){return{valueComponent:p}},getInitialState:function(){return{focused:null}},render:function(){var e=this.props.valueComponent,t=this.state.focused,s=this.props.value;return o(i.omit(this.props,"value"),n.DOM.ul({className:"rw-tag-list"},i.map(s,function(s,i){return n.DOM.li({key:i,unselectable:"on",className:r({"rw-state-focus":t===i})},e({item:s,unselectable:"on",textField:this.props.textField,valueField:this.props.valueField}),a({onClick:this._delete.bind(null,s),unselectable:"on"},"×",n.DOM.span({className:"rw-sr"},"Remove "+this._dataText(s))))},this)))},_delete:function(e){this.props.onDelete(e)},removeCurrent:function(){var e=this.props.value[this.state.focused];e&&this.props.onDelete(e)},removeNext:function(){var e=i.last(this.props.value);e&&this.props.onDelete(e)},clear:function(){this.setState({focused:null})},first:function(){this.setState({focused:0})},last:function(){this.setState({focused:this.props.value.length-1})},next:function(){var e=this.state.focused+1;if(null!==this.state.focused)return e>=this.props.value.length?this.clear():void this.setState({focused:e})},prev:function(){var e=this.state.focused;null===e?e=this.props.value.length:0>=e&&(e=1),this.setState({focused:e-1})}});var p=n.createClass({displayName:"DefaultTag",mixins:[s(37)],render:function(){var e=this.props.item;return this.transferPropsTo(n.DOM.span(null,e?this._dataText(e):""))}})},function(e,t,s){function n(e,t){var s;if(e===t)return!0;for(s in e)if(e.hasOwnProperty(s)&&(!t.hasOwnProperty(s)||e[s]!==t[s]))return!1;for(s in t)if(t.hasOwnProperty(s)&&!e.hasOwnProperty(s))return!1;return!0}s(9);e.exports={shouldComponentUpdate:function(e,t){return!n(this.props,e)||!n(this.state,t)}}},function(e,t,s){var n=s(9),i=s(27),r=s(37),o=(s(22),s(21),s(10));e.exports={propTypes:{data:n.PropTypes.array,value:n.PropTypes.any,delay:n.PropTypes.number,filter:n.PropTypes.string},search:function(e,t){var s=this,n=((this._searchTerm||"")+e).toLowerCase();clearTimeout(this._timer),this._searchTerm=n,this._timer=setTimeout(function(){s._searchTerm="",t(n)},this.props.delay)},findIndex:function(e,t){var s=i.startsWith,n=this;return o.findIndex(n._data(),function(i,o){return o!=t&&s(r._dataText.call(n,i).toLowerCase(),e.toLowerCase())})}}},function(e,t,s){var n=s(9),i=s(10);e.exports={propTypes:{valueField:n.PropTypes.string,textField:n.PropTypes.string},_dataValue:function(e){var t=this.props.valueField;return t&&e&&i.has(e,t)?e[t]:e},_dataText:function(e){var t=this.props.textField;return(t&&e&&i.has(e,t)?e[t]:e)+""},_dataIndexOf:function(e,t){return i.findIndex(e,i.partial(this._valueMatcher,t),this)},_valueMatcher:function(e,t){return i.isEqual(this._dataValue(e),this._dataValue(t))},_dataItem:function(e,t){var s,n=e[0],i=this._dataValue(t);return null==n||typeof n==typeof i?i:(s=this._dataIndexOf(e,t),-1!==s?e[s]:t)}}},function(e,t,s){var n=s(9);e.exports={propTypes:{isRtl:n.PropTypes.bool},contextTypes:{isRtl:n.PropTypes.bool},childContextTypes:{isRtl:n.PropTypes.bool},getChildContext:function(){return{isRtl:this.props.isRtl||this.context&&this.context.isRtl}},isRtl:function(){return!!(this.props.isRtl||this.context&&this.context.isRtl)}}},function(e,t,s){function n(e){return function(){return e.apply(this,arguments),this}}var i=s(9),r=(s(27),s(37),s(21)),o=s(22),a=(s(24).directions,s(10));e.exports=function(e){var t=e.charAt(0).toUpperCase()+e.substr(1),s=(o.provided(function(e){return!a.isEqual(e.value,this.props.value)}),o.provided(function(e){return e>=0})),p=s(r(e)),u={propTypes:{data:i.PropTypes.array,value:i.PropTypes.any}};return u["set"+t]=n(p),u["prev"+t]=function(){var t=(this._data(),this.state&&this.state[e]||0);return t-=1,0>t&&(t=0),t},u["next"+t]=function(){var t=this._data(),s=this.state&&this.state[e]||0;return s+=1,s>=t.length&&(s=t.length-1),s},u}},function(e,t,s){{var n=s(9),i=s(27),r=s(37),o=s(21),a=s(22),p=(s(24).directions,s(10)),u=(a.provided(function(e){return!p.isEqual(e.value,this.props.value)}),a.provided(function(e){return e>=0})),c=p.without(p.keys(i),"filter");u(o("selectedIndex"))}e.exports={propTypes:{data:n.PropTypes.array,value:n.PropTypes.any,filter:n.PropTypes.oneOfType([n.PropTypes.func,n.PropTypes.oneOf(c.concat(!1))]),caseSensitive:n.PropTypes.bool,minLength:n.PropTypes.number},getDefaultProps:function(){return{caseSensitive:!1,minLength:1}},filter:function(e,t){var s="string"==typeof this.props.filter?i[this.props.filter]:this.props.filter;return!s||!t||!t.trim()||t.length<(this.props.minLength||1)?e:(this.props.caseSensitive||(t=t.toLowerCase()),p.filter(e,function(e){var n=r._dataText.call(this,e);return this.props.caseSensitive||(n=n.toLowerCase()),s(n,t.toLowerCase())},this))}}},function(e){!function(){e.exports=this["window.Globalize"]}()},function(e){/**
+	 * @license
+	 * Lo-Dash 3.0.0-pre <http://lodash.com/>
+	 * Copyright 2012-2014 The Dojo Foundation <http://dojofoundation.org/>
+	 * Based on Underscore.js 1.6.0 <http://underscorejs.org/LICENSE>
+	 * Copyright 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+	 * Available under MIT license <http://lodash.com/license>
+	 */
+e.exports=function(e,t){var s=0,n=e?e.length:0,i=[];for(t=Math.max(+t||1,1);n>s;)i.push(e.slice(s,s+=t));return i}},function(e,t,s){var n=s(9);e.exports={contextTypes:{isRtl:n.PropTypes.bool},isRtl:function(){return!!this.context.isRtl}}},function(e,t,s){var n=s(9),i=s(28),r=s(24).directions;e.exports=function(e,t){return{propTypes:{value:n.PropTypes.instanceOf(Date),min:n.PropTypes.instanceOf(Date),max:n.PropTypes.instanceOf(Date)},getInitialState:function(){return{focusedDate:this.props.value}},componentWillReceiveProps:function(e){var s=this.state.focusedDate;//!dates.inRange(focused, nextProps.min, nextProps.max)
+i.eq(e.value,s,t)||this.setState({focusedDate:e.value})},_keyDown:function(s){var n=s.key,o=(s.altKey,this.state.focusedDate),a=o;if("Enter"===n)return this.props.onChange(a);if("ArrowLeft"===n?a=this.move(a,r.LEFT):"ArrowRight"===n?a=this.move(a,r.RIGHT):"ArrowUp"===n?a=this.move(a,r.UP):"ArrowDown"===n&&(a=this.move(a,r.DOWN)),!i.eq(o,a,t)){if(s.preventDefault(),i.gt(a,this.props.value,e))return this.props.onMoveRight(a);if(i.lt(a,this.props.value,e))return this.props.onMoveLeft(a);this.setState({focusedDate:a})}}}}},function(e){function t(e,t){var s=f.month(e),n=s+t;return e=f.month(e,n),0>n&&(n=12+t),f.month(e)!==n%12&&(e=f.date(e,0)),e}function s(e){return e=e.charAt(0).toUpperCase()+e.substr(1),function(t,s){return void 0===s?t["get"+e]():(t=new Date(t),t["set"+e](s),t)}}function n(e){return function(t,s,n){return e(+f.startOf(t,n),+f.startOf(s,n))}}var i="milliseconds",r="seconds",o="minutes",a="hours",p="day",u="week",c="month",l="year",h="decade",d="century",f=e.exports={startOfWeek:function(){return 0},add:function(e,s,n){if(e=new Date(e),n===i)return f.milliseconds(e,f.milliseconds(e)+s);if(n===r)return f.seconds(e,f.seconds(e)+s);if(n===o)return f.minutes(e,f.minutes(e)+s);if(n===a)return f.hours(e,f.hours(e)+s);if(n===p)return f.date(e,f.date(e)+s);if(n===u)return f.date(e,f.date(e)+7*s);if(n===c)return t(e,s);if(n===l)return f.year(e,f.year(e)+s);if(n===h)return f.year(e,f.year(e)+10*s);if(n===d)return f.year(e,f.year(e)+100*s);throw new TypeError('Invalid units: "'+n+'"')},subtract:function(e,t,s){return f.add(e,-t,s)},startOf:function(e,t){switch(e=new Date(e),t){case"century":case"decade":case"year":e=f.month(e,0);case"month":e=f.date(e,1);case"week":case"day":e=f.hours(e,0);case"hours":e=f.minutes(e,0);case"minutes":e=f.seconds(e,0);case"seconds":e=f.milliseconds(e,0)}return t===h&&(e=f.subtract(e,f.year(e)%10,"year")),t===d&&(e=f.subtract(e,f.year(e)%100,"year")),t===u&&(e=f.weekday(e,0)),e},endOf:function(e,t){return e=new Date(e),e=f.startOf(e,t),e=f.add(e,1,t),e=f.subtract(e,1,i)},eq:n(function(e,t){return e===t}),gt:n(function(e,t){return e>t}),gte:n(function(e,t){return e>=t}),lt:n(function(e,t){return t>e}),lte:n(function(e,t){return t>=e}),min:function(){var e=Array.prototype.slice.call(arguments);return new Date(Math.min.apply(Math,e))},max:function(){var e=Array.prototype.slice.call(arguments);return new Date(Math.max.apply(Math,e))},inRange:function(e,t,s,n){return n=n||"day",f.gte(e,t,n)&&f.lte(e,s,n)},milliseconds:s("Milliseconds"),seconds:s("Seconds"),minutes:s("Minutes"),hours:s("Hours"),day:s("Day"),date:s("Date"),month:s("Month"),year:s("FullYear"),decade:function(e,t){return void 0==t?f.year(f.startOf(e,h)):f.add(e,t+10,l)},century:function(e,t){return void 0==t?f.year(f.startOf(e,d)):f.add(e,t+100,l)},weekday:function(e,t){var s=(f.day(e)+7-f.startOfWeek())%7;return void 0==t?s:f.add(e,t-s,p)}}}]);
\ No newline at end of file

add browser stuff oooopppps