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pack://apps/./node_modules/pikaday/pikaday.js"],"sourcesContent":["/*!\n * Pikaday\n *\n * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/Pikaday/Pikaday\n */\n\n(function (root, factory)\n{\n 'use strict';\n\n var moment;\n if (typeof exports === 'object') {\n // CommonJS module\n // Load moment.js as an optional dependency\n try { moment = require('moment'); } catch (e) {}\n module.exports = factory(moment);\n } else if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(function (req)\n {\n // Load moment.js as an optional dependency\n var id = 'moment';\n try { moment = req(id); } catch (e) {}\n return factory(moment);\n });\n } else {\n root.Pikaday = factory(root.moment);\n }\n}(this, function (moment)\n{\n 'use strict';\n\n /**\n * feature detection and helper functions\n */\n var hasMoment = typeof moment === 'function',\n\n hasEventListeners = !!window.addEventListener,\n\n document = window.document,\n\n sto = window.setTimeout,\n\n addEvent = function(el, e, callback, capture)\n {\n if (hasEventListeners) {\n el.addEventListener(e, callback, !!capture);\n } else {\n el.attachEvent('on' + e, callback);\n }\n },\n\n removeEvent = function(el, e, callback, capture)\n {\n if (hasEventListeners) {\n el.removeEventListener(e, callback, !!capture);\n } else {\n el.detachEvent('on' + e, callback);\n }\n },\n\n trim = function(str)\n {\n return str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g,'');\n },\n\n hasClass = function(el, cn)\n {\n return (' ' + el.className + ' ').indexOf(' ' + cn + ' ') !== -1;\n },\n\n addClass = function(el, cn)\n {\n if (!hasClass(el, cn)) {\n el.className = (el.className === '') ? cn : el.className + ' ' + cn;\n }\n },\n\n removeClass = function(el, cn)\n {\n el.className = trim((' ' + el.className + ' ').replace(' ' + cn + ' ', ' '));\n },\n\n isArray = function(obj)\n {\n return (/Array/).test(Object.prototype.toString.call(obj));\n },\n\n isDate = function(obj)\n {\n return (/Date/).test(Object.prototype.toString.call(obj)) && !isNaN(obj.getTime());\n },\n\n isWeekend = function(date)\n {\n var day = date.getDay();\n return day === 0 || day === 6;\n },\n\n isLeapYear = function(year)\n {\n // solution lifted from date.js (MIT license): https://github.com/datejs/Datejs\n return ((year % 4 === 0 && year % 100 !== 0) || year % 400 === 0);\n },\n\n getDaysInMonth = function(year, month)\n {\n return [31, isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];\n },\n\n setToStartOfDay = function(date)\n {\n if (isDate(date)) date.setHours(0,0,0,0);\n },\n\n compareDates = function(a,b)\n {\n // weak date comparison (use setToStartOfDay(date) to ensure correct result)\n return a.getTime() === b.getTime();\n },\n\n extend = function(to, from, overwrite)\n {\n var prop, hasProp;\n for (prop in from) {\n hasProp = to[prop] !== undefined;\n if (hasProp && typeof from[prop] === 'object' && from[prop] !== null && from[prop].nodeName === undefined) {\n if (isDate(from[prop])) {\n if (overwrite) {\n to[prop] = new Date(from[prop].getTime());\n }\n }\n else if (isArray(from[prop])) {\n if (overwrite) {\n to[prop] = from[prop].slice(0);\n }\n } else {\n to[prop] = extend({}, from[prop], overwrite);\n }\n } else if (overwrite || !hasProp) {\n to[prop] = from[prop];\n }\n }\n return to;\n },\n\n fireEvent = function(el, eventName, data)\n {\n var ev;\n\n if (document.createEvent) {\n ev = document.createEvent('HTMLEvents');\n ev.initEvent(eventName, true, false);\n ev = extend(ev, data);\n el.dispatchEvent(ev);\n } else if (document.createEventObject) {\n ev = document.createEventObject();\n ev = extend(ev, data);\n el.fireEvent('on' + eventName, ev);\n }\n },\n\n adjustCalendar = function(calendar) {\n if (calendar.month < 0) {\n calendar.year -= Math.ceil(Math.abs(calendar.month)/12);\n calendar.month += 12;\n }\n if (calendar.month > 11) {\n calendar.year += Math.floor(Math.abs(calendar.month)/12);\n calendar.month -= 12;\n }\n return calendar;\n },\n\n /**\n * defaults and localisation\n */\n defaults = {\n\n // bind the picker to a form field\n field: null,\n\n // automatically show/hide the picker on `field` focus (default `true` if `field` is set)\n bound: undefined,\n\n // data-attribute on the input field with an aria assistance text (only applied when `bound` is set)\n ariaLabel: 'Use the arrow keys to pick a date',\n\n // position of the datepicker, relative to the field (default to bottom & left)\n // ('bottom' & 'left' keywords are not used, 'top' & 'right' are modifier on the bottom/left position)\n position: 'bottom left',\n\n // automatically fit in the viewport even if it means repositioning from the position option\n reposition: true,\n\n // the default output format for `.toString()` and `field` value\n format: 'YYYY-MM-DD',\n\n // the toString function which gets passed a current date object and format\n // and returns a string\n toString: null,\n\n // used to create date object from current input string\n parse: null,\n\n // the initial date to view when first opened\n defaultDate: null,\n\n // make the `defaultDate` the initial selected value\n setDefaultDate: false,\n\n // first day of week (0: Sunday, 1: Monday etc)\n firstDay: 0,\n\n // minimum number of days in the week that gets week number one\n // default ISO 8601, week 01 is the week with the first Thursday (4)\n firstWeekOfYearMinDays: 4,\n\n // the default flag for moment's strict date parsing\n formatStrict: false,\n\n // the minimum/earliest date that can be selected\n minDate: null,\n // the maximum/latest date that can be selected\n maxDate: null,\n\n // number of years either side, or array of upper/lower range\n yearRange: 10,\n\n // show week numbers at head of row\n showWeekNumber: false,\n\n // Week picker mode\n pickWholeWeek: false,\n\n // used internally (don't config outside)\n minYear: 0,\n maxYear: 9999,\n minMonth: undefined,\n maxMonth: undefined,\n\n startRange: null,\n endRange: null,\n\n isRTL: false,\n\n // Additional text to append to the year in the calendar title\n yearSuffix: '',\n\n // Render the month after year in the calendar title\n showMonthAfterYear: false,\n\n // Render days of the calendar grid that fall in the next or previous month\n showDaysInNextAndPreviousMonths: false,\n\n // Allows user to select days that fall in the next or previous month\n enableSelectionDaysInNextAndPreviousMonths: false,\n\n // how many months are visible\n numberOfMonths: 1,\n\n // when numberOfMonths is used, this will help you to choose where the main calendar will be (default `left`, can be set to `right`)\n // only used for the first display or when a selected date is not visible\n mainCalendar: 'left',\n\n // Specify a DOM element to render the calendar in\n container: undefined,\n\n // Blur field when date is selected\n blurFieldOnSelect : true,\n\n // internationalization\n i18n: {\n previousMonth : 'Previous Month',\n nextMonth : 'Next Month',\n months : ['January','February','March','April','May','June','July','August','September','October','November','December'],\n weekdays : ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],\n weekdaysShort : ['Sun','Mon','Tue','Wed','Thu','Fri','Sat']\n },\n\n // Theme Classname\n theme: null,\n\n // events array\n events: [],\n\n // callback function\n onSelect: null,\n onOpen: null,\n onClose: null,\n onDraw: null,\n\n // Enable keyboard input\n keyboardInput: true\n },\n\n\n /**\n * templating functions to abstract HTML rendering\n */\n renderDayName = function(opts, day, abbr)\n {\n day += opts.firstDay;\n while (day >= 7) {\n day -= 7;\n }\n return abbr ? opts.i18n.weekdaysShort[day] : opts.i18n.weekdays[day];\n },\n\n renderDay = function(opts)\n {\n var arr = [];\n var ariaSelected = 'false';\n if (opts.isEmpty) {\n if (opts.showDaysInNextAndPreviousMonths) {\n arr.push('is-outside-current-month');\n\n if(!opts.enableSelectionDaysInNextAndPreviousMonths) {\n arr.push('is-selection-disabled');\n }\n\n } else {\n return '';\n }\n }\n if (opts.isDisabled) {\n arr.push('is-disabled');\n }\n if (opts.isToday) {\n arr.push('is-today');\n }\n if (opts.isSelected) {\n arr.push('is-selected');\n ariaSelected = 'true';\n }\n if (opts.hasEvent) {\n arr.push('has-event');\n }\n if (opts.isInRange) {\n arr.push('is-inrange');\n }\n if (opts.isStartRange) {\n arr.push('is-startrange');\n }\n if (opts.isEndRange) {\n arr.push('is-endrange');\n }\n return '' +\n '' +\n '';\n },\n\n isoWeek = function(date, firstWeekOfYearMinDays) {\n // Ensure we're at the start of the day.\n date.setHours(0, 0, 0, 0);\n\n // Thursday in current week decides the year because January 4th\n // is always in the first week according to ISO8601.\n var yearDay = date.getDate(),\n weekDay = date.getDay(),\n dayInFirstWeek = firstWeekOfYearMinDays,\n dayShift = dayInFirstWeek - 1, // counting starts at 0\n daysPerWeek = 7,\n prevWeekDay = function(day) { return (day + daysPerWeek - 1) % daysPerWeek; };\n\n // Adjust to Thursday in week 1 and count number of weeks from date to week 1.\n date.setDate(yearDay + dayShift - prevWeekDay(weekDay));\n\n var jan4th = new Date(date.getFullYear(), 0, dayInFirstWeek),\n msPerDay = 24 * 60 * 60 * 1000,\n daysBetween = (date.getTime() - jan4th.getTime()) / msPerDay,\n weekNum = 1 + Math.round((daysBetween - dayShift + prevWeekDay(jan4th.getDay())) / daysPerWeek);\n\n return weekNum;\n },\n\n renderWeek = function (d, m, y, firstWeekOfYearMinDays) {\n var date = new Date(y, m, d),\n week = hasMoment ? moment(date).isoWeek() : isoWeek(date, firstWeekOfYearMinDays);\n\n return '' + week + '';\n },\n\n renderRow = function(days, isRTL, pickWholeWeek, isRowSelected)\n {\n return '' + (isRTL ? days.reverse() : days).join('') + '';\n },\n\n renderBody = function(rows)\n {\n return '' + rows.join('') + '';\n },\n\n renderHead = function(opts)\n {\n var i, arr = [];\n if (opts.showWeekNumber) {\n arr.push('');\n }\n for (i = 0; i < 7; i++) {\n arr.push('' + renderDayName(opts, i, true) + '');\n }\n return '' + (opts.isRTL ? arr.reverse() : arr).join('') + '';\n },\n\n renderTitle = function(instance, c, year, month, refYear, randId)\n {\n var i, j, arr,\n opts = instance._o,\n isMinYear = year === opts.minYear,\n isMaxYear = year === opts.maxYear,\n html = '
',\n monthHtml,\n yearHtml,\n prev = true,\n next = true;\n\n for (arr = [], i = 0; i < 12; i++) {\n arr.push('');\n }\n\n monthHtml = '
' + opts.i18n.months[month] + '
';\n\n if (isArray(opts.yearRange)) {\n i = opts.yearRange[0];\n j = opts.yearRange[1] + 1;\n } else {\n i = year - opts.yearRange;\n j = 1 + year + opts.yearRange;\n }\n\n for (arr = []; i < j && i <= opts.maxYear; i++) {\n if (i >= opts.minYear) {\n arr.push('');\n }\n }\n yearHtml = '
' + year + opts.yearSuffix + '
';\n\n if (opts.showMonthAfterYear) {\n html += yearHtml + monthHtml;\n } else {\n html += monthHtml + yearHtml;\n }\n\n if (isMinYear && (month === 0 || opts.minMonth >= month)) {\n prev = false;\n }\n\n if (isMaxYear && (month === 11 || opts.maxMonth <= month)) {\n next = false;\n }\n\n if (c === 0) {\n html += '';\n }\n if (c === (instance._o.numberOfMonths - 1) ) {\n html += '';\n }\n\n return html += '
';\n },\n\n renderTable = function(opts, data, randId)\n {\n return '' + renderHead(opts) + renderBody(data) + '
';\n },\n\n\n /**\n * Pikaday constructor\n */\n Pikaday = function(options)\n {\n var self = this,\n opts = self.config(options);\n\n self._onMouseDown = function(e)\n {\n if (!self._v) {\n return;\n }\n e = e || window.event;\n var target = e.target || e.srcElement;\n if (!target) {\n return;\n }\n\n if (!hasClass(target, 'is-disabled')) {\n if (hasClass(target, 'pika-button') && !hasClass(target, 'is-empty') && !hasClass(target.parentNode, 'is-disabled')) {\n self.setDate(new Date(target.getAttribute('data-pika-year'), target.getAttribute('data-pika-month'), target.getAttribute('data-pika-day')));\n if (opts.bound) {\n sto(function() {\n self.hide();\n if (opts.blurFieldOnSelect && opts.field) {\n opts.field.blur();\n }\n }, 100);\n }\n }\n else if (hasClass(target, 'pika-prev')) {\n self.prevMonth();\n }\n else if (hasClass(target, 'pika-next')) {\n self.nextMonth();\n }\n }\n if (!hasClass(target, 'pika-select')) {\n // if this is touch event prevent mouse events emulation\n if (e.preventDefault) {\n e.preventDefault();\n } else {\n e.returnValue = false;\n return false;\n }\n } else {\n self._c = true;\n }\n };\n\n self._onChange = function(e)\n {\n e = e || window.event;\n var target = e.target || e.srcElement;\n if (!target) {\n return;\n }\n if (hasClass(target, 'pika-select-month')) {\n self.gotoMonth(target.value);\n }\n else if (hasClass(target, 'pika-select-year')) {\n self.gotoYear(target.value);\n }\n };\n\n self._onKeyChange = function(e)\n {\n e = e || window.event;\n\n if (self.isVisible()) {\n\n switch(e.keyCode){\n case 13:\n case 27:\n if (opts.field) {\n opts.field.blur();\n }\n break;\n case 37:\n self.adjustDate('subtract', 1);\n break;\n case 38:\n self.adjustDate('subtract', 7);\n break;\n case 39:\n self.adjustDate('add', 1);\n break;\n case 40:\n self.adjustDate('add', 7);\n break;\n case 8:\n case 46:\n self.setDate(null);\n break;\n }\n }\n };\n\n self._parseFieldValue = function()\n {\n if (opts.parse) {\n return opts.parse(opts.field.value, opts.format);\n } else if (hasMoment) {\n var date = moment(opts.field.value, opts.format, opts.formatStrict);\n return (date && date.isValid()) ? date.toDate() : null;\n } else {\n return new Date(Date.parse(opts.field.value));\n }\n };\n\n self._onInputChange = function(e)\n {\n var date;\n\n if (e.firedBy === self) {\n return;\n }\n date = self._parseFieldValue();\n if (isDate(date)) {\n self.setDate(date);\n }\n if (!self._v) {\n self.show();\n }\n };\n\n self._onInputFocus = function()\n {\n self.show();\n };\n\n self._onInputClick = function()\n {\n self.show();\n };\n\n self._onInputBlur = function()\n {\n // IE allows pika div to gain focus; catch blur the input field\n var pEl = document.activeElement;\n do {\n if (hasClass(pEl, 'pika-single')) {\n return;\n }\n }\n while ((pEl = pEl.parentNode));\n\n if (!self._c) {\n self._b = sto(function() {\n self.hide();\n }, 50);\n }\n self._c = false;\n };\n\n self._onClick = function(e)\n {\n e = e || window.event;\n var target = e.target || e.srcElement,\n pEl = target;\n if (!target) {\n return;\n }\n if (!hasEventListeners && hasClass(target, 'pika-select')) {\n if (!target.onchange) {\n target.setAttribute('onchange', 'return;');\n addEvent(target, 'change', self._onChange);\n }\n }\n do {\n if (hasClass(pEl, 'pika-single') || pEl === opts.trigger) {\n return;\n }\n }\n while ((pEl = pEl.parentNode));\n if (self._v && target !== opts.trigger && pEl !== opts.trigger) {\n self.hide();\n }\n };\n\n self.el = document.createElement('div');\n self.el.className = 'pika-single' + (opts.isRTL ? ' is-rtl' : '') + (opts.theme ? ' ' + opts.theme : '');\n\n addEvent(self.el, 'mousedown', self._onMouseDown, true);\n addEvent(self.el, 'touchend', self._onMouseDown, true);\n addEvent(self.el, 'change', self._onChange);\n\n if (opts.keyboardInput) {\n addEvent(document, 'keydown', self._onKeyChange);\n }\n\n if (opts.field) {\n if (opts.container) {\n opts.container.appendChild(self.el);\n } else if (opts.bound) {\n document.body.appendChild(self.el);\n } else {\n opts.field.parentNode.insertBefore(self.el, opts.field.nextSibling);\n }\n addEvent(opts.field, 'change', self._onInputChange);\n\n if (!opts.defaultDate) {\n opts.defaultDate = self._parseFieldValue();\n opts.setDefaultDate = true;\n }\n }\n\n var defDate = opts.defaultDate;\n\n if (isDate(defDate)) {\n if (opts.setDefaultDate) {\n self.setDate(defDate, true);\n } else {\n self.gotoDate(defDate);\n }\n } else {\n self.gotoDate(new Date());\n }\n\n if (opts.bound) {\n this.hide();\n self.el.className += ' is-bound';\n addEvent(opts.trigger, 'click', self._onInputClick);\n addEvent(opts.trigger, 'focus', self._onInputFocus);\n addEvent(opts.trigger, 'blur', self._onInputBlur);\n } else {\n this.show();\n }\n };\n\n\n /**\n * public Pikaday API\n */\n Pikaday.prototype = {\n\n\n /**\n * configure functionality\n */\n config: function(options)\n {\n if (!this._o) {\n this._o = extend({}, defaults, true);\n }\n\n var opts = extend(this._o, options, true);\n\n opts.isRTL = !!opts.isRTL;\n\n opts.field = (opts.field && opts.field.nodeName) ? opts.field : null;\n\n opts.theme = (typeof opts.theme) === 'string' && opts.theme ? opts.theme : null;\n\n opts.bound = !!(opts.bound !== undefined ? opts.field && opts.bound : opts.field);\n\n opts.trigger = (opts.trigger && opts.trigger.nodeName) ? opts.trigger : opts.field;\n\n opts.disableWeekends = !!opts.disableWeekends;\n\n opts.disableDayFn = (typeof opts.disableDayFn) === 'function' ? opts.disableDayFn : null;\n\n var nom = parseInt(opts.numberOfMonths, 10) || 1;\n opts.numberOfMonths = nom > 4 ? 4 : nom;\n\n if (!isDate(opts.minDate)) {\n opts.minDate = false;\n }\n if (!isDate(opts.maxDate)) {\n opts.maxDate = false;\n }\n if ((opts.minDate && opts.maxDate) && opts.maxDate < opts.minDate) {\n opts.maxDate = opts.minDate = false;\n }\n if (opts.minDate) {\n this.setMinDate(opts.minDate);\n }\n if (opts.maxDate) {\n this.setMaxDate(opts.maxDate);\n }\n\n if (isArray(opts.yearRange)) {\n var fallback = new Date().getFullYear() - 10;\n opts.yearRange[0] = parseInt(opts.yearRange[0], 10) || fallback;\n opts.yearRange[1] = parseInt(opts.yearRange[1], 10) || fallback;\n } else {\n opts.yearRange = Math.abs(parseInt(opts.yearRange, 10)) || defaults.yearRange;\n if (opts.yearRange > 100) {\n opts.yearRange = 100;\n }\n }\n\n return opts;\n },\n\n /**\n * return a formatted string of the current selection (using Moment.js if available)\n */\n toString: function(format)\n {\n format = format || this._o.format;\n if (!isDate(this._d)) {\n return '';\n }\n if (this._o.toString) {\n return this._o.toString(this._d, format);\n }\n if (hasMoment) {\n return moment(this._d).format(format);\n }\n return this._d.toDateString();\n },\n\n /**\n * return a Moment.js object of the current selection (if available)\n */\n getMoment: function()\n {\n return hasMoment ? moment(this._d) : null;\n },\n\n /**\n * set the current selection from a Moment.js object (if available)\n */\n setMoment: function(date, preventOnSelect)\n {\n if (hasMoment && moment.isMoment(date)) {\n this.setDate(date.toDate(), preventOnSelect);\n }\n },\n\n /**\n * return a Date object of the current selection\n */\n getDate: function()\n {\n return isDate(this._d) ? new Date(this._d.getTime()) : null;\n },\n\n /**\n * set the current selection\n */\n setDate: function(date, preventOnSelect)\n {\n if (!date) {\n this._d = null;\n\n if (this._o.field) {\n this._o.field.value = '';\n fireEvent(this._o.field, 'change', { firedBy: this });\n }\n\n return this.draw();\n }\n if (typeof date === 'string') {\n date = new Date(Date.parse(date));\n }\n if (!isDate(date)) {\n return;\n }\n\n var min = this._o.minDate,\n max = this._o.maxDate;\n\n if (isDate(min) && date < min) {\n date = min;\n } else if (isDate(max) && date > max) {\n date = max;\n }\n\n this._d = new Date(date.getTime());\n setToStartOfDay(this._d);\n this.gotoDate(this._d);\n\n if (this._o.field) {\n this._o.field.value = this.toString();\n fireEvent(this._o.field, 'change', { firedBy: this });\n }\n if (!preventOnSelect && typeof this._o.onSelect === 'function') {\n this._o.onSelect.call(this, this.getDate());\n }\n },\n\n /**\n * clear and reset the date\n */\n clear: function()\n {\n this.setDate(null);\n },\n\n /**\n * change view to a specific date\n */\n gotoDate: function(date)\n {\n var newCalendar = true;\n\n if (!isDate(date)) {\n return;\n }\n\n if (this.calendars) {\n var firstVisibleDate = new Date(this.calendars[0].year, this.calendars[0].month, 1),\n lastVisibleDate = new Date(this.calendars[this.calendars.length-1].year, this.calendars[this.calendars.length-1].month, 1),\n visibleDate = date.getTime();\n // get the end of the month\n lastVisibleDate.setMonth(lastVisibleDate.getMonth()+1);\n lastVisibleDate.setDate(lastVisibleDate.getDate()-1);\n newCalendar = (visibleDate < firstVisibleDate.getTime() || lastVisibleDate.getTime() < visibleDate);\n }\n\n if (newCalendar) {\n this.calendars = [{\n month: date.getMonth(),\n year: date.getFullYear()\n }];\n if (this._o.mainCalendar === 'right') {\n this.calendars[0].month += 1 - this._o.numberOfMonths;\n }\n }\n\n this.adjustCalendars();\n },\n\n adjustDate: function(sign, days) {\n\n var day = this.getDate() || new Date();\n var difference = parseInt(days)*24*60*60*1000;\n\n var newDay;\n\n if (sign === 'add') {\n newDay = new Date(day.valueOf() + difference);\n } else if (sign === 'subtract') {\n newDay = new Date(day.valueOf() - difference);\n }\n\n this.setDate(newDay);\n },\n\n adjustCalendars: function() {\n this.calendars[0] = adjustCalendar(this.calendars[0]);\n for (var c = 1; c < this._o.numberOfMonths; c++) {\n this.calendars[c] = adjustCalendar({\n month: this.calendars[0].month + c,\n year: this.calendars[0].year\n });\n }\n this.draw();\n },\n\n gotoToday: function()\n {\n this.gotoDate(new Date());\n },\n\n /**\n * change view to a specific month (zero-index, e.g. 0: January)\n */\n gotoMonth: function(month)\n {\n if (!isNaN(month)) {\n this.calendars[0].month = parseInt(month, 10);\n this.adjustCalendars();\n }\n },\n\n nextMonth: function()\n {\n this.calendars[0].month++;\n this.adjustCalendars();\n },\n\n prevMonth: function()\n {\n this.calendars[0].month--;\n this.adjustCalendars();\n },\n\n /**\n * change view to a specific full year (e.g. \"2012\")\n */\n gotoYear: function(year)\n {\n if (!isNaN(year)) {\n this.calendars[0].year = parseInt(year, 10);\n this.adjustCalendars();\n }\n },\n\n /**\n * change the minDate\n */\n setMinDate: function(value)\n {\n if(value instanceof Date) {\n setToStartOfDay(value);\n this._o.minDate = value;\n this._o.minYear = value.getFullYear();\n this._o.minMonth = value.getMonth();\n } else {\n this._o.minDate = defaults.minDate;\n this._o.minYear = defaults.minYear;\n this._o.minMonth = defaults.minMonth;\n this._o.startRange = defaults.startRange;\n }\n\n this.draw();\n },\n\n /**\n * change the maxDate\n */\n setMaxDate: function(value)\n {\n if(value instanceof Date) {\n setToStartOfDay(value);\n this._o.maxDate = value;\n this._o.maxYear = value.getFullYear();\n this._o.maxMonth = value.getMonth();\n } else {\n this._o.maxDate = defaults.maxDate;\n this._o.maxYear = defaults.maxYear;\n this._o.maxMonth = defaults.maxMonth;\n this._o.endRange = defaults.endRange;\n }\n\n this.draw();\n },\n\n setStartRange: function(value)\n {\n this._o.startRange = value;\n },\n\n setEndRange: function(value)\n {\n this._o.endRange = value;\n },\n\n /**\n * refresh the HTML\n */\n draw: function(force)\n {\n if (!this._v && !force) {\n return;\n }\n var opts = this._o,\n minYear = opts.minYear,\n maxYear = opts.maxYear,\n minMonth = opts.minMonth,\n maxMonth = opts.maxMonth,\n html = '',\n randId;\n\n if (this._y <= minYear) {\n this._y = minYear;\n if (!isNaN(minMonth) && this._m < minMonth) {\n this._m = minMonth;\n }\n }\n if (this._y >= maxYear) {\n this._y = maxYear;\n if (!isNaN(maxMonth) && this._m > maxMonth) {\n this._m = maxMonth;\n }\n }\n\n for (var c = 0; c < opts.numberOfMonths; c++) {\n randId = 'pika-title-' + Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 2);\n html += '
' + renderTitle(this, c, this.calendars[c].year, this.calendars[c].month, this.calendars[0].year, randId) + this.render(this.calendars[c].year, this.calendars[c].month, randId) + '
';\n }\n\n this.el.innerHTML = html;\n\n if (opts.bound) {\n if(opts.field.type !== 'hidden') {\n sto(function() {\n opts.trigger.focus();\n }, 1);\n }\n }\n\n if (typeof this._o.onDraw === 'function') {\n this._o.onDraw(this);\n }\n\n if (opts.bound) {\n // let the screen reader user know to use arrow keys\n opts.field.setAttribute('aria-label', opts.ariaLabel);\n }\n },\n\n adjustPosition: function()\n {\n var field, pEl, width, height, viewportWidth, viewportHeight, scrollTop, left, top, clientRect, leftAligned, bottomAligned;\n\n if (this._o.container) return;\n\n this.el.style.position = 'absolute';\n\n field = this._o.trigger;\n pEl = field;\n width = this.el.offsetWidth;\n height = this.el.offsetHeight;\n viewportWidth = window.innerWidth || document.documentElement.clientWidth;\n viewportHeight = window.innerHeight || document.documentElement.clientHeight;\n scrollTop = window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop;\n leftAligned = true;\n bottomAligned = true;\n\n if (typeof field.getBoundingClientRect === 'function') {\n clientRect = field.getBoundingClientRect();\n left = clientRect.left + window.pageXOffset;\n top = clientRect.bottom + window.pageYOffset;\n } else {\n left = pEl.offsetLeft;\n top = pEl.offsetTop + pEl.offsetHeight;\n while((pEl = pEl.offsetParent)) {\n left += pEl.offsetLeft;\n top += pEl.offsetTop;\n }\n }\n\n // default position is bottom & left\n if ((this._o.reposition && left + width > viewportWidth) ||\n (\n this._o.position.indexOf('right') > -1 &&\n left - width + field.offsetWidth > 0\n )\n ) {\n left = left - width + field.offsetWidth;\n leftAligned = false;\n }\n if ((this._o.reposition && top + height > viewportHeight + scrollTop) ||\n (\n this._o.position.indexOf('top') > -1 &&\n top - height - field.offsetHeight > 0\n )\n ) {\n top = top - height - field.offsetHeight;\n bottomAligned = false;\n }\n\n this.el.style.left = left + 'px';\n this.el.style.top = top + 'px';\n\n addClass(this.el, leftAligned ? 'left-aligned' : 'right-aligned');\n addClass(this.el, bottomAligned ? 'bottom-aligned' : 'top-aligned');\n removeClass(this.el, !leftAligned ? 'left-aligned' : 'right-aligned');\n removeClass(this.el, !bottomAligned ? 'bottom-aligned' : 'top-aligned');\n },\n\n /**\n * render HTML for a particular month\n */\n render: function(year, month, randId)\n {\n var opts = this._o,\n now = new Date(),\n days = getDaysInMonth(year, month),\n before = new Date(year, month, 1).getDay(),\n data = [],\n row = [];\n setToStartOfDay(now);\n if (opts.firstDay > 0) {\n before -= opts.firstDay;\n if (before < 0) {\n before += 7;\n }\n }\n var previousMonth = month === 0 ? 11 : month - 1,\n nextMonth = month === 11 ? 0 : month + 1,\n yearOfPreviousMonth = month === 0 ? year - 1 : year,\n yearOfNextMonth = month === 11 ? year + 1 : year,\n daysInPreviousMonth = getDaysInMonth(yearOfPreviousMonth, previousMonth);\n var cells = days + before,\n after = cells;\n while(after > 7) {\n after -= 7;\n }\n cells += 7 - after;\n var isWeekSelected = false;\n for (var i = 0, r = 0; i < cells; i++)\n {\n var day = new Date(year, month, 1 + (i - before)),\n isSelected = isDate(this._d) ? compareDates(day, this._d) : false,\n isToday = compareDates(day, now),\n hasEvent = opts.events.indexOf(day.toDateString()) !== -1 ? true : false,\n isEmpty = i < before || i >= (days + before),\n dayNumber = 1 + (i - before),\n monthNumber = month,\n yearNumber = year,\n isStartRange = opts.startRange && compareDates(opts.startRange, day),\n isEndRange = opts.endRange && compareDates(opts.endRange, day),\n isInRange = opts.startRange && opts.endRange && opts.startRange < day && day < opts.endRange,\n isDisabled = (opts.minDate && day < opts.minDate) ||\n (opts.maxDate && day > opts.maxDate) ||\n (opts.disableWeekends && isWeekend(day)) ||\n (opts.disableDayFn && opts.disableDayFn(day));\n\n if (isEmpty) {\n if (i < before) {\n dayNumber = daysInPreviousMonth + dayNumber;\n monthNumber = previousMonth;\n yearNumber = yearOfPreviousMonth;\n } else {\n dayNumber = dayNumber - days;\n monthNumber = nextMonth;\n yearNumber = yearOfNextMonth;\n }\n }\n\n var dayConfig = {\n day: dayNumber,\n month: monthNumber,\n year: yearNumber,\n hasEvent: hasEvent,\n isSelected: isSelected,\n isToday: isToday,\n isDisabled: isDisabled,\n isEmpty: isEmpty,\n isStartRange: isStartRange,\n isEndRange: isEndRange,\n isInRange: isInRange,\n showDaysInNextAndPreviousMonths: opts.showDaysInNextAndPreviousMonths,\n enableSelectionDaysInNextAndPreviousMonths: opts.enableSelectionDaysInNextAndPreviousMonths\n };\n\n if (opts.pickWholeWeek && isSelected) {\n isWeekSelected = true;\n }\n\n row.push(renderDay(dayConfig));\n\n if (++r === 7) {\n if (opts.showWeekNumber) {\n row.unshift(renderWeek(i - before, month, year, opts.firstWeekOfYearMinDays));\n }\n data.push(renderRow(row, opts.isRTL, opts.pickWholeWeek, isWeekSelected));\n row = [];\n r = 0;\n isWeekSelected = false;\n }\n }\n return renderTable(opts, data, randId);\n },\n\n isVisible: function()\n {\n return this._v;\n },\n\n show: function()\n {\n if (!this.isVisible()) {\n this._v = true;\n this.draw();\n removeClass(this.el, 'is-hidden');\n if (this._o.bound) {\n addEvent(document, 'click', this._onClick);\n this.adjustPosition();\n }\n if (typeof this._o.onOpen === 'function') {\n this._o.onOpen.call(this);\n }\n }\n },\n\n hide: function()\n {\n var v = this._v;\n if (v !== false) {\n if (this._o.bound) {\n removeEvent(document, 'click', this._onClick);\n }\n\n if (!this._o.container) {\n this.el.style.position = 'static'; // reset\n this.el.style.left = 'auto';\n this.el.style.top = 'auto';\n }\n addClass(this.el, 'is-hidden');\n this._v = false;\n if (v !== undefined && typeof this._o.onClose === 'function') {\n this._o.onClose.call(this);\n }\n }\n },\n\n /**\n * GAME OVER\n */\n destroy: function()\n {\n var opts = this._o;\n\n this.hide();\n removeEvent(this.el, 'mousedown', this._onMouseDown, true);\n removeEvent(this.el, 'touchend', this._onMouseDown, true);\n removeEvent(this.el, 'change', this._onChange);\n if (opts.keyboardInput) {\n removeEvent(document, 'keydown', this._onKeyChange);\n }\n if (opts.field) {\n removeEvent(opts.field, 'change', this._onInputChange);\n if (opts.bound) {\n removeEvent(opts.trigger, 'click', this._onInputClick);\n removeEvent(opts.trigger, 'focus', this._onInputFocus);\n removeEvent(opts.trigger, 'blur', this._onInputBlur);\n }\n }\n if (this.el.parentNode) {\n this.el.parentNode.removeChild(this.el);\n }\n }\n\n };\n\n return Pikaday;\n}));\n"],"names":["root","factory","moment","e","module","exports","hasMoment","hasEventListeners","window","addEventListener","document","sto","setTimeout","addEvent","el","callback","capture","attachEvent","removeEvent","removeEventListener","detachEvent","trim","str","replace","hasClass","cn","className","indexOf","addClass","removeClass","isArray","obj","test","Object","prototype","toString","call","isDate","isNaN","getTime","isWeekend","date","day","getDay","isLeapYear","year","getDaysInMonth","month","setToStartOfDay","setHours","compareDates","a","b","extend","to","from","overwrite","prop","hasProp","undefined","nodeName","Date","slice","fireEvent","eventName","data","ev","createEvent","initEvent","dispatchEvent","createEventObject","adjustCalendar","calendar","Math","ceil","abs","floor","defaults","field","bound","ariaLabel","position","reposition","format","parse","defaultDate","setDefaultDate","firstDay","firstWeekOfYearMinDays","formatStrict","minDate","maxDate","yearRange","showWeekNumber","pickWholeWeek","minYear","maxYear","minMonth","maxMonth","startRange","endRange","isRTL","yearSuffix","showMonthAfterYear","showDaysInNextAndPreviousMonths","enableSelectionDaysInNextAndPreviousMonths","numberOfMonths","mainCalendar","container","blurFieldOnSelect","i18n","previousMonth","nextMonth","months","weekdays","weekdaysShort","theme","events","onSelect","onOpen","onClose","onDraw","keyboardInput","renderDayName","opts","abbr","renderDay","arr","ariaSelected","isEmpty","push","isDisabled","isToday","isSelected","hasEvent","isInRange","isStartRange","isEndRange","join","isoWeek","yearDay","getDate","weekDay","dayInFirstWeek","dayShift","daysPerWeek","prevWeekDay","setDate","jan4th","getFullYear","msPerDay","daysBetween","round","renderWeek","d","m","y","renderRow","days","isRowSelected","reverse","renderBody","rows","renderHead","i","renderTitle","instance","c","refYear","randId","j","monthHtml","yearHtml","_o","isMinYear","isMaxYear","html","prev","next","renderTable","Pikaday","options","self","this","config","_onMouseDown","_v","target","event","srcElement","parentNode","prevMonth","getAttribute","hide","blur","_c","preventDefault","returnValue","_onChange","gotoMonth","value","gotoYear","_onKeyChange","isVisible","keyCode","adjustDate","_parseFieldValue","isValid","toDate","_onInputChange","firedBy","show","_onInputFocus","_onInputClick","_onInputBlur","pEl","activeElement","_b","_onClick","onchange","setAttribute","trigger","createElement","appendChild","body","insertBefore","nextSibling","defDate","gotoDate","disableWeekends","disableDayFn","nom","parseInt","setMinDate","setMaxDate","fallback","_d","toDateString","getMoment","setMoment","preventOnSelect","isMoment","draw","min","max","clear","newCalendar","calendars","firstVisibleDate","lastVisibleDate","length","visibleDate","setMonth","getMonth","adjustCalendars","sign","newDay","difference","valueOf","gotoToday","setStartRange","setEndRange","force","_y","_m","random","substr","render","innerHTML","type","focus","adjustPosition","width","height","viewportWidth","viewportHeight","scrollTop","left","top","clientRect","leftAligned","bottomAligned","style","offsetWidth","offsetHeight","innerWidth","documentElement","clientWidth","innerHeight","clientHeight","pageYOffset","getBoundingClientRect","pageXOffset","bottom","offsetLeft","offsetTop","offsetParent","now","before","row","yearOfPreviousMonth","yearOfNextMonth","daysInPreviousMonth","cells","after","isWeekSelected","r","dayNumber","monthNumber","yearNumber","dayConfig","unshift","v","destroy","removeChild"],"sourceRoot":""}