Path: blob/master/sites/tiktok/vendor/daterangepicker/moment.js
740 views
//! moment.js1//! version : 2.13.02//! authors : Tim Wood, Iskren Chernev, Moment.js contributors3//! license : MIT4//! momentjs.com56;(function (global, factory) {7typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :8typeof define === 'function' && define.amd ? define(factory) :9global.moment = factory()10}(this, function () { 'use strict';1112var hookCallback;1314function utils_hooks__hooks () {15return hookCallback.apply(null, arguments);16}1718// This is done to register the method called with moment()19// without creating circular dependencies.20function setHookCallback (callback) {21hookCallback = callback;22}2324function isArray(input) {25return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';26}2728function isDate(input) {29return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';30}3132function map(arr, fn) {33var res = [], i;34for (i = 0; i < arr.length; ++i) {35res.push(fn(arr[i], i));36}37return res;38}3940function hasOwnProp(a, b) {41return Object.prototype.hasOwnProperty.call(a, b);42}4344function extend(a, b) {45for (var i in b) {46if (hasOwnProp(b, i)) {47a[i] = b[i];48}49}5051if (hasOwnProp(b, 'toString')) {52a.toString = b.toString;53}5455if (hasOwnProp(b, 'valueOf')) {56a.valueOf = b.valueOf;57}5859return a;60}6162function create_utc__createUTC (input, format, locale, strict) {63return createLocalOrUTC(input, format, locale, strict, true).utc();64}6566function defaultParsingFlags() {67// We need to deep clone this object.68return {69empty : false,70unusedTokens : [],71unusedInput : [],72overflow : -2,73charsLeftOver : 0,74nullInput : false,75invalidMonth : null,76invalidFormat : false,77userInvalidated : false,78iso : false,79parsedDateParts : [],80meridiem : null81};82}8384function getParsingFlags(m) {85if (m._pf == null) {86m._pf = defaultParsingFlags();87}88return m._pf;89}9091var some;92if (Array.prototype.some) {93some = Array.prototype.some;94} else {95some = function (fun) {96var t = Object(this);97var len = t.length >>> 0;9899for (var i = 0; i < len; i++) {100if (i in t && fun.call(this, t[i], i, t)) {101return true;102}103}104105return false;106};107}108109function valid__isValid(m) {110if (m._isValid == null) {111var flags = getParsingFlags(m);112var parsedParts = some.call(flags.parsedDateParts, function (i) {113return i != null;114});115m._isValid = !isNaN(m._d.getTime()) &&116flags.overflow < 0 &&117!flags.empty &&118!flags.invalidMonth &&119!flags.invalidWeekday &&120!flags.nullInput &&121!flags.invalidFormat &&122!flags.userInvalidated &&123(!flags.meridiem || (flags.meridiem && parsedParts));124125if (m._strict) {126m._isValid = m._isValid &&127flags.charsLeftOver === 0 &&128flags.unusedTokens.length === 0 &&129flags.bigHour === undefined;130}131}132return m._isValid;133}134135function valid__createInvalid (flags) {136var m = create_utc__createUTC(NaN);137if (flags != null) {138extend(getParsingFlags(m), flags);139}140else {141getParsingFlags(m).userInvalidated = true;142}143144return m;145}146147function isUndefined(input) {148return input === void 0;149}150151// Plugins that add properties should also add the key here (null value),152// so we can properly clone ourselves.153var momentProperties = utils_hooks__hooks.momentProperties = [];154155function copyConfig(to, from) {156var i, prop, val;157158if (!isUndefined(from._isAMomentObject)) {159to._isAMomentObject = from._isAMomentObject;160}161if (!isUndefined(from._i)) {162to._i = from._i;163}164if (!isUndefined(from._f)) {165to._f = from._f;166}167if (!isUndefined(from._l)) {168to._l = from._l;169}170if (!isUndefined(from._strict)) {171to._strict = from._strict;172}173if (!isUndefined(from._tzm)) {174to._tzm = from._tzm;175}176if (!isUndefined(from._isUTC)) {177to._isUTC = from._isUTC;178}179if (!isUndefined(from._offset)) {180to._offset = from._offset;181}182if (!isUndefined(from._pf)) {183to._pf = getParsingFlags(from);184}185if (!isUndefined(from._locale)) {186to._locale = from._locale;187}188189if (momentProperties.length > 0) {190for (i in momentProperties) {191prop = momentProperties[i];192val = from[prop];193if (!isUndefined(val)) {194to[prop] = val;195}196}197}198199return to;200}201202var updateInProgress = false;203204// Moment prototype object205function Moment(config) {206copyConfig(this, config);207this._d = new Date(config._d != null ? config._d.getTime() : NaN);208// Prevent infinite loop in case updateOffset creates new moment209// objects.210if (updateInProgress === false) {211updateInProgress = true;212utils_hooks__hooks.updateOffset(this);213updateInProgress = false;214}215}216217function isMoment (obj) {218return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);219}220221function absFloor (number) {222if (number < 0) {223return Math.ceil(number);224} else {225return Math.floor(number);226}227}228229function toInt(argumentForCoercion) {230var coercedNumber = +argumentForCoercion,231value = 0;232233if (coercedNumber !== 0 && isFinite(coercedNumber)) {234value = absFloor(coercedNumber);235}236237return value;238}239240// compare two arrays, return the number of differences241function compareArrays(array1, array2, dontConvert) {242var len = Math.min(array1.length, array2.length),243lengthDiff = Math.abs(array1.length - array2.length),244diffs = 0,245i;246for (i = 0; i < len; i++) {247if ((dontConvert && array1[i] !== array2[i]) ||248(!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {249diffs++;250}251}252return diffs + lengthDiff;253}254255function warn(msg) {256if (utils_hooks__hooks.suppressDeprecationWarnings === false &&257(typeof console !== 'undefined') && console.warn) {258console.warn('Deprecation warning: ' + msg);259}260}261262function deprecate(msg, fn) {263var firstTime = true;264265return extend(function () {266if (utils_hooks__hooks.deprecationHandler != null) {267utils_hooks__hooks.deprecationHandler(null, msg);268}269if (firstTime) {270warn(msg + '\nArguments: ' + Array.prototype.slice.call(arguments).join(', ') + '\n' + (new Error()).stack);271firstTime = false;272}273return fn.apply(this, arguments);274}, fn);275}276277var deprecations = {};278279function deprecateSimple(name, msg) {280if (utils_hooks__hooks.deprecationHandler != null) {281utils_hooks__hooks.deprecationHandler(name, msg);282}283if (!deprecations[name]) {284warn(msg);285deprecations[name] = true;286}287}288289utils_hooks__hooks.suppressDeprecationWarnings = false;290utils_hooks__hooks.deprecationHandler = null;291292function isFunction(input) {293return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';294}295296function isObject(input) {297return Object.prototype.toString.call(input) === '[object Object]';298}299300function locale_set__set (config) {301var prop, i;302for (i in config) {303prop = config[i];304if (isFunction(prop)) {305this[i] = prop;306} else {307this['_' + i] = prop;308}309}310this._config = config;311// Lenient ordinal parsing accepts just a number in addition to312// number + (possibly) stuff coming from _ordinalParseLenient.313this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + (/\d{1,2}/).source);314}315316function mergeConfigs(parentConfig, childConfig) {317var res = extend({}, parentConfig), prop;318for (prop in childConfig) {319if (hasOwnProp(childConfig, prop)) {320if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {321res[prop] = {};322extend(res[prop], parentConfig[prop]);323extend(res[prop], childConfig[prop]);324} else if (childConfig[prop] != null) {325res[prop] = childConfig[prop];326} else {327delete res[prop];328}329}330}331return res;332}333334function Locale(config) {335if (config != null) {336this.set(config);337}338}339340var keys;341342if (Object.keys) {343keys = Object.keys;344} else {345keys = function (obj) {346var i, res = [];347for (i in obj) {348if (hasOwnProp(obj, i)) {349res.push(i);350}351}352return res;353};354}355356// internal storage for locale config files357var locales = {};358var globalLocale;359360function normalizeLocale(key) {361return key ? key.toLowerCase().replace('_', '-') : key;362}363364// pick the locale from the array365// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each366// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root367function chooseLocale(names) {368var i = 0, j, next, locale, split;369370while (i < names.length) {371split = normalizeLocale(names[i]).split('-');372j = split.length;373next = normalizeLocale(names[i + 1]);374next = next ? next.split('-') : null;375while (j > 0) {376locale = loadLocale(split.slice(0, j).join('-'));377if (locale) {378return locale;379}380if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {381//the next array item is better than a shallower substring of this one382break;383}384j--;385}386i++;387}388return null;389}390391function loadLocale(name) {392var oldLocale = null;393// TODO: Find a better way to register and load all the locales in Node394if (!locales[name] && (typeof module !== 'undefined') &&395module && module.exports) {396try {397oldLocale = globalLocale._abbr;398require('./locale/' + name);399// because defineLocale currently also sets the global locale, we400// want to undo that for lazy loaded locales401locale_locales__getSetGlobalLocale(oldLocale);402} catch (e) { }403}404return locales[name];405}406407// This function will load locale and then set the global locale. If408// no arguments are passed in, it will simply return the current global409// locale key.410function locale_locales__getSetGlobalLocale (key, values) {411var data;412if (key) {413if (isUndefined(values)) {414data = locale_locales__getLocale(key);415}416else {417data = defineLocale(key, values);418}419420if (data) {421// moment.duration._locale = moment._locale = data;422globalLocale = data;423}424}425426return globalLocale._abbr;427}428429function defineLocale (name, config) {430if (config !== null) {431config.abbr = name;432if (locales[name] != null) {433deprecateSimple('defineLocaleOverride',434'use moment.updateLocale(localeName, config) to change ' +435'an existing locale. moment.defineLocale(localeName, ' +436'config) should only be used for creating a new locale');437config = mergeConfigs(locales[name]._config, config);438} else if (config.parentLocale != null) {439if (locales[config.parentLocale] != null) {440config = mergeConfigs(locales[config.parentLocale]._config, config);441} else {442// treat as if there is no base config443deprecateSimple('parentLocaleUndefined',444'specified parentLocale is not defined yet');445}446}447locales[name] = new Locale(config);448449// backwards compat for now: also set the locale450locale_locales__getSetGlobalLocale(name);451452return locales[name];453} else {454// useful for testing455delete locales[name];456return null;457}458}459460function updateLocale(name, config) {461if (config != null) {462var locale;463if (locales[name] != null) {464config = mergeConfigs(locales[name]._config, config);465}466locale = new Locale(config);467locale.parentLocale = locales[name];468locales[name] = locale;469470// backwards compat for now: also set the locale471locale_locales__getSetGlobalLocale(name);472} else {473// pass null for config to unupdate, useful for tests474if (locales[name] != null) {475if (locales[name].parentLocale != null) {476locales[name] = locales[name].parentLocale;477} else if (locales[name] != null) {478delete locales[name];479}480}481}482return locales[name];483}484485// returns locale data486function locale_locales__getLocale (key) {487var locale;488489if (key && key._locale && key._locale._abbr) {490key = key._locale._abbr;491}492493if (!key) {494return globalLocale;495}496497if (!isArray(key)) {498//short-circuit everything else499locale = loadLocale(key);500if (locale) {501return locale;502}503key = [key];504}505506return chooseLocale(key);507}508509function locale_locales__listLocales() {510return keys(locales);511}512513var aliases = {};514515function addUnitAlias (unit, shorthand) {516var lowerCase = unit.toLowerCase();517aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;518}519520function normalizeUnits(units) {521return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;522}523524function normalizeObjectUnits(inputObject) {525var normalizedInput = {},526normalizedProp,527prop;528529for (prop in inputObject) {530if (hasOwnProp(inputObject, prop)) {531normalizedProp = normalizeUnits(prop);532if (normalizedProp) {533normalizedInput[normalizedProp] = inputObject[prop];534}535}536}537538return normalizedInput;539}540541function makeGetSet (unit, keepTime) {542return function (value) {543if (value != null) {544get_set__set(this, unit, value);545utils_hooks__hooks.updateOffset(this, keepTime);546return this;547} else {548return get_set__get(this, unit);549}550};551}552553function get_set__get (mom, unit) {554return mom.isValid() ?555mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;556}557558function get_set__set (mom, unit, value) {559if (mom.isValid()) {560mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);561}562}563564// MOMENTS565566function getSet (units, value) {567var unit;568if (typeof units === 'object') {569for (unit in units) {570this.set(unit, units[unit]);571}572} else {573units = normalizeUnits(units);574if (isFunction(this[units])) {575return this[units](value);576}577}578return this;579}580581function zeroFill(number, targetLength, forceSign) {582var absNumber = '' + Math.abs(number),583zerosToFill = targetLength - absNumber.length,584sign = number >= 0;585return (sign ? (forceSign ? '+' : '') : '-') +586Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;587}588589var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;590591var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g;592593var formatFunctions = {};594595var formatTokenFunctions = {};596597// token: 'M'598// padded: ['MM', 2]599// ordinal: 'Mo'600// callback: function () { this.month() + 1 }601function addFormatToken (token, padded, ordinal, callback) {602var func = callback;603if (typeof callback === 'string') {604func = function () {605return this[callback]();606};607}608if (token) {609formatTokenFunctions[token] = func;610}611if (padded) {612formatTokenFunctions[padded[0]] = function () {613return zeroFill(func.apply(this, arguments), padded[1], padded[2]);614};615}616if (ordinal) {617formatTokenFunctions[ordinal] = function () {618return this.localeData().ordinal(func.apply(this, arguments), token);619};620}621}622623function removeFormattingTokens(input) {624if (input.match(/\[[\s\S]/)) {625return input.replace(/^\[|\]$/g, '');626}627return input.replace(/\\/g, '');628}629630function makeFormatFunction(format) {631var array = format.match(formattingTokens), i, length;632633for (i = 0, length = array.length; i < length; i++) {634if (formatTokenFunctions[array[i]]) {635array[i] = formatTokenFunctions[array[i]];636} else {637array[i] = removeFormattingTokens(array[i]);638}639}640641return function (mom) {642var output = '', i;643for (i = 0; i < length; i++) {644output += array[i] instanceof Function ? array[i].call(mom, format) : array[i];645}646return output;647};648}649650// format date using native date object651function formatMoment(m, format) {652if (!m.isValid()) {653return m.localeData().invalidDate();654}655656format = expandFormat(format, m.localeData());657formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);658659return formatFunctions[format](m);660}661662function expandFormat(format, locale) {663var i = 5;664665function replaceLongDateFormatTokens(input) {666return locale.longDateFormat(input) || input;667}668669localFormattingTokens.lastIndex = 0;670while (i >= 0 && localFormattingTokens.test(format)) {671format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);672localFormattingTokens.lastIndex = 0;673i -= 1;674}675676return format;677}678679var match1 = /\d/; // 0 - 9680var match2 = /\d\d/; // 00 - 99681var match3 = /\d{3}/; // 000 - 999682var match4 = /\d{4}/; // 0000 - 9999683var match6 = /[+-]?\d{6}/; // -999999 - 999999684var match1to2 = /\d\d?/; // 0 - 99685var match3to4 = /\d\d\d\d?/; // 999 - 9999686var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999687var match1to3 = /\d{1,3}/; // 0 - 999688var match1to4 = /\d{1,4}/; // 0 - 9999689var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999690691var matchUnsigned = /\d+/; // 0 - inf692var matchSigned = /[+-]?\d+/; // -inf - inf693694var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z695var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z696697var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123698699// any word (or two) characters or numbers including two/three word month in arabic.700// includes scottish gaelic two word and hyphenated months701var matchWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i;702703704var regexes = {};705706function addRegexToken (token, regex, strictRegex) {707regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {708return (isStrict && strictRegex) ? strictRegex : regex;709};710}711712function getParseRegexForToken (token, config) {713if (!hasOwnProp(regexes, token)) {714return new RegExp(unescapeFormat(token));715}716717return regexes[token](config._strict, config._locale);718}719720// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript721function unescapeFormat(s) {722return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) {723return p1 || p2 || p3 || p4;724}));725}726727function regexEscape(s) {728return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');729}730731var tokens = {};732733function addParseToken (token, callback) {734var i, func = callback;735if (typeof token === 'string') {736token = [token];737}738if (typeof callback === 'number') {739func = function (input, array) {740array[callback] = toInt(input);741};742}743for (i = 0; i < token.length; i++) {744tokens[token[i]] = func;745}746}747748function addWeekParseToken (token, callback) {749addParseToken(token, function (input, array, config, token) {750config._w = config._w || {};751callback(input, config._w, config, token);752});753}754755function addTimeToArrayFromToken(token, input, config) {756if (input != null && hasOwnProp(tokens, token)) {757tokens[token](input, config._a, config, token);758}759}760761var YEAR = 0;762var MONTH = 1;763var DATE = 2;764var HOUR = 3;765var MINUTE = 4;766var SECOND = 5;767var MILLISECOND = 6;768var WEEK = 7;769var WEEKDAY = 8;770771var indexOf;772773if (Array.prototype.indexOf) {774indexOf = Array.prototype.indexOf;775} else {776indexOf = function (o) {777// I know778var i;779for (i = 0; i < this.length; ++i) {780if (this[i] === o) {781return i;782}783}784return -1;785};786}787788function daysInMonth(year, month) {789return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();790}791792// FORMATTING793794addFormatToken('M', ['MM', 2], 'Mo', function () {795return this.month() + 1;796});797798addFormatToken('MMM', 0, 0, function (format) {799return this.localeData().monthsShort(this, format);800});801802addFormatToken('MMMM', 0, 0, function (format) {803return this.localeData().months(this, format);804});805806// ALIASES807808addUnitAlias('month', 'M');809810// PARSING811812addRegexToken('M', match1to2);813addRegexToken('MM', match1to2, match2);814addRegexToken('MMM', function (isStrict, locale) {815return locale.monthsShortRegex(isStrict);816});817addRegexToken('MMMM', function (isStrict, locale) {818return locale.monthsRegex(isStrict);819});820821addParseToken(['M', 'MM'], function (input, array) {822array[MONTH] = toInt(input) - 1;823});824825addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {826var month = config._locale.monthsParse(input, token, config._strict);827// if we didn't find a month name, mark the date as invalid.828if (month != null) {829array[MONTH] = month;830} else {831getParsingFlags(config).invalidMonth = input;832}833});834835// LOCALES836837var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/;838var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');839function localeMonths (m, format) {840return isArray(this._months) ? this._months[m.month()] :841this._months[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];842}843844var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');845function localeMonthsShort (m, format) {846return isArray(this._monthsShort) ? this._monthsShort[m.month()] :847this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];848}849850function units_month__handleStrictParse(monthName, format, strict) {851var i, ii, mom, llc = monthName.toLocaleLowerCase();852if (!this._monthsParse) {853// this is not used854this._monthsParse = [];855this._longMonthsParse = [];856this._shortMonthsParse = [];857for (i = 0; i < 12; ++i) {858mom = create_utc__createUTC([2000, i]);859this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();860this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();861}862}863864if (strict) {865if (format === 'MMM') {866ii = indexOf.call(this._shortMonthsParse, llc);867return ii !== -1 ? ii : null;868} else {869ii = indexOf.call(this._longMonthsParse, llc);870return ii !== -1 ? ii : null;871}872} else {873if (format === 'MMM') {874ii = indexOf.call(this._shortMonthsParse, llc);875if (ii !== -1) {876return ii;877}878ii = indexOf.call(this._longMonthsParse, llc);879return ii !== -1 ? ii : null;880} else {881ii = indexOf.call(this._longMonthsParse, llc);882if (ii !== -1) {883return ii;884}885ii = indexOf.call(this._shortMonthsParse, llc);886return ii !== -1 ? ii : null;887}888}889}890891function localeMonthsParse (monthName, format, strict) {892var i, mom, regex;893894if (this._monthsParseExact) {895return units_month__handleStrictParse.call(this, monthName, format, strict);896}897898if (!this._monthsParse) {899this._monthsParse = [];900this._longMonthsParse = [];901this._shortMonthsParse = [];902}903904// TODO: add sorting905// Sorting makes sure if one month (or abbr) is a prefix of another906// see sorting in computeMonthsParse907for (i = 0; i < 12; i++) {908// make the regex if we don't have it already909mom = create_utc__createUTC([2000, i]);910if (strict && !this._longMonthsParse[i]) {911this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');912this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');913}914if (!strict && !this._monthsParse[i]) {915regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');916this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');917}918// test the regex919if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {920return i;921} else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {922return i;923} else if (!strict && this._monthsParse[i].test(monthName)) {924return i;925}926}927}928929// MOMENTS930931function setMonth (mom, value) {932var dayOfMonth;933934if (!mom.isValid()) {935// No op936return mom;937}938939if (typeof value === 'string') {940if (/^\d+$/.test(value)) {941value = toInt(value);942} else {943value = mom.localeData().monthsParse(value);944// TODO: Another silent failure?945if (typeof value !== 'number') {946return mom;947}948}949}950951dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));952mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);953return mom;954}955956function getSetMonth (value) {957if (value != null) {958setMonth(this, value);959utils_hooks__hooks.updateOffset(this, true);960return this;961} else {962return get_set__get(this, 'Month');963}964}965966function getDaysInMonth () {967return daysInMonth(this.year(), this.month());968}969970var defaultMonthsShortRegex = matchWord;971function monthsShortRegex (isStrict) {972if (this._monthsParseExact) {973if (!hasOwnProp(this, '_monthsRegex')) {974computeMonthsParse.call(this);975}976if (isStrict) {977return this._monthsShortStrictRegex;978} else {979return this._monthsShortRegex;980}981} else {982return this._monthsShortStrictRegex && isStrict ?983this._monthsShortStrictRegex : this._monthsShortRegex;984}985}986987var defaultMonthsRegex = matchWord;988function monthsRegex (isStrict) {989if (this._monthsParseExact) {990if (!hasOwnProp(this, '_monthsRegex')) {991computeMonthsParse.call(this);992}993if (isStrict) {994return this._monthsStrictRegex;995} else {996return this._monthsRegex;997}998} else {999return this._monthsStrictRegex && isStrict ?1000this._monthsStrictRegex : this._monthsRegex;1001}1002}10031004function computeMonthsParse () {1005function cmpLenRev(a, b) {1006return b.length - a.length;1007}10081009var shortPieces = [], longPieces = [], mixedPieces = [],1010i, mom;1011for (i = 0; i < 12; i++) {1012// make the regex if we don't have it already1013mom = create_utc__createUTC([2000, i]);1014shortPieces.push(this.monthsShort(mom, ''));1015longPieces.push(this.months(mom, ''));1016mixedPieces.push(this.months(mom, ''));1017mixedPieces.push(this.monthsShort(mom, ''));1018}1019// Sorting makes sure if one month (or abbr) is a prefix of another it1020// will match the longer piece.1021shortPieces.sort(cmpLenRev);1022longPieces.sort(cmpLenRev);1023mixedPieces.sort(cmpLenRev);1024for (i = 0; i < 12; i++) {1025shortPieces[i] = regexEscape(shortPieces[i]);1026longPieces[i] = regexEscape(longPieces[i]);1027mixedPieces[i] = regexEscape(mixedPieces[i]);1028}10291030this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');1031this._monthsShortRegex = this._monthsRegex;1032this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');1033this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');1034}10351036function checkOverflow (m) {1037var overflow;1038var a = m._a;10391040if (a && getParsingFlags(m).overflow === -2) {1041overflow =1042a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :1043a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :1044a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :1045a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :1046a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :1047a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :1048-1;10491050if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {1051overflow = DATE;1052}1053if (getParsingFlags(m)._overflowWeeks && overflow === -1) {1054overflow = WEEK;1055}1056if (getParsingFlags(m)._overflowWeekday && overflow === -1) {1057overflow = WEEKDAY;1058}10591060getParsingFlags(m).overflow = overflow;1061}10621063return m;1064}10651066// iso 8601 regex1067// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)1068var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/;1069var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/;10701071var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/;10721073var isoDates = [1074['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],1075['YYYY-MM-DD', /\d{4}-\d\d-\d\d/],1076['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/],1077['GGGG-[W]WW', /\d{4}-W\d\d/, false],1078['YYYY-DDD', /\d{4}-\d{3}/],1079['YYYY-MM', /\d{4}-\d\d/, false],1080['YYYYYYMMDD', /[+-]\d{10}/],1081['YYYYMMDD', /\d{8}/],1082// YYYYMM is NOT allowed by the standard1083['GGGG[W]WWE', /\d{4}W\d{3}/],1084['GGGG[W]WW', /\d{4}W\d{2}/, false],1085['YYYYDDD', /\d{7}/]1086];10871088// iso time formats and regexes1089var isoTimes = [1090['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],1091['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],1092['HH:mm:ss', /\d\d:\d\d:\d\d/],1093['HH:mm', /\d\d:\d\d/],1094['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],1095['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],1096['HHmmss', /\d\d\d\d\d\d/],1097['HHmm', /\d\d\d\d/],1098['HH', /\d\d/]1099];11001101var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i;11021103// date from iso format1104function configFromISO(config) {1105var i, l,1106string = config._i,1107match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),1108allowTime, dateFormat, timeFormat, tzFormat;11091110if (match) {1111getParsingFlags(config).iso = true;11121113for (i = 0, l = isoDates.length; i < l; i++) {1114if (isoDates[i][1].exec(match[1])) {1115dateFormat = isoDates[i][0];1116allowTime = isoDates[i][2] !== false;1117break;1118}1119}1120if (dateFormat == null) {1121config._isValid = false;1122return;1123}1124if (match[3]) {1125for (i = 0, l = isoTimes.length; i < l; i++) {1126if (isoTimes[i][1].exec(match[3])) {1127// match[2] should be 'T' or space1128timeFormat = (match[2] || ' ') + isoTimes[i][0];1129break;1130}1131}1132if (timeFormat == null) {1133config._isValid = false;1134return;1135}1136}1137if (!allowTime && timeFormat != null) {1138config._isValid = false;1139return;1140}1141if (match[4]) {1142if (tzRegex.exec(match[4])) {1143tzFormat = 'Z';1144} else {1145config._isValid = false;1146return;1147}1148}1149config._f = dateFormat + (timeFormat || '') + (tzFormat || '');1150configFromStringAndFormat(config);1151} else {1152config._isValid = false;1153}1154}11551156// date from iso format or fallback1157function configFromString(config) {1158var matched = aspNetJsonRegex.exec(config._i);11591160if (matched !== null) {1161config._d = new Date(+matched[1]);1162return;1163}11641165configFromISO(config);1166if (config._isValid === false) {1167delete config._isValid;1168utils_hooks__hooks.createFromInputFallback(config);1169}1170}11711172utils_hooks__hooks.createFromInputFallback = deprecate(1173'moment construction falls back to js Date. This is ' +1174'discouraged and will be removed in upcoming major ' +1175'release. Please refer to ' +1176'https://github.com/moment/moment/issues/1407 for more info.',1177function (config) {1178config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));1179}1180);11811182function createDate (y, m, d, h, M, s, ms) {1183//can't just apply() to create a date:1184//http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply1185var date = new Date(y, m, d, h, M, s, ms);11861187//the date constructor remaps years 0-99 to 1900-19991188if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {1189date.setFullYear(y);1190}1191return date;1192}11931194function createUTCDate (y) {1195var date = new Date(Date.UTC.apply(null, arguments));11961197//the Date.UTC function remaps years 0-99 to 1900-19991198if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {1199date.setUTCFullYear(y);1200}1201return date;1202}12031204// FORMATTING12051206addFormatToken('Y', 0, 0, function () {1207var y = this.year();1208return y <= 9999 ? '' + y : '+' + y;1209});12101211addFormatToken(0, ['YY', 2], 0, function () {1212return this.year() % 100;1213});12141215addFormatToken(0, ['YYYY', 4], 0, 'year');1216addFormatToken(0, ['YYYYY', 5], 0, 'year');1217addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');12181219// ALIASES12201221addUnitAlias('year', 'y');12221223// PARSING12241225addRegexToken('Y', matchSigned);1226addRegexToken('YY', match1to2, match2);1227addRegexToken('YYYY', match1to4, match4);1228addRegexToken('YYYYY', match1to6, match6);1229addRegexToken('YYYYYY', match1to6, match6);12301231addParseToken(['YYYYY', 'YYYYYY'], YEAR);1232addParseToken('YYYY', function (input, array) {1233array[YEAR] = input.length === 2 ? utils_hooks__hooks.parseTwoDigitYear(input) : toInt(input);1234});1235addParseToken('YY', function (input, array) {1236array[YEAR] = utils_hooks__hooks.parseTwoDigitYear(input);1237});1238addParseToken('Y', function (input, array) {1239array[YEAR] = parseInt(input, 10);1240});12411242// HELPERS12431244function daysInYear(year) {1245return isLeapYear(year) ? 366 : 365;1246}12471248function isLeapYear(year) {1249return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;1250}12511252// HOOKS12531254utils_hooks__hooks.parseTwoDigitYear = function (input) {1255return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);1256};12571258// MOMENTS12591260var getSetYear = makeGetSet('FullYear', true);12611262function getIsLeapYear () {1263return isLeapYear(this.year());1264}12651266// start-of-first-week - start-of-year1267function firstWeekOffset(year, dow, doy) {1268var // first-week day -- which january is always in the first week (4 for iso, 1 for other)1269fwd = 7 + dow - doy,1270// first-week day local weekday -- which local weekday is fwd1271fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;12721273return -fwdlw + fwd - 1;1274}12751276//http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday1277function dayOfYearFromWeeks(year, week, weekday, dow, doy) {1278var localWeekday = (7 + weekday - dow) % 7,1279weekOffset = firstWeekOffset(year, dow, doy),1280dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,1281resYear, resDayOfYear;12821283if (dayOfYear <= 0) {1284resYear = year - 1;1285resDayOfYear = daysInYear(resYear) + dayOfYear;1286} else if (dayOfYear > daysInYear(year)) {1287resYear = year + 1;1288resDayOfYear = dayOfYear - daysInYear(year);1289} else {1290resYear = year;1291resDayOfYear = dayOfYear;1292}12931294return {1295year: resYear,1296dayOfYear: resDayOfYear1297};1298}12991300function weekOfYear(mom, dow, doy) {1301var weekOffset = firstWeekOffset(mom.year(), dow, doy),1302week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,1303resWeek, resYear;13041305if (week < 1) {1306resYear = mom.year() - 1;1307resWeek = week + weeksInYear(resYear, dow, doy);1308} else if (week > weeksInYear(mom.year(), dow, doy)) {1309resWeek = week - weeksInYear(mom.year(), dow, doy);1310resYear = mom.year() + 1;1311} else {1312resYear = mom.year();1313resWeek = week;1314}13151316return {1317week: resWeek,1318year: resYear1319};1320}13211322function weeksInYear(year, dow, doy) {1323var weekOffset = firstWeekOffset(year, dow, doy),1324weekOffsetNext = firstWeekOffset(year + 1, dow, doy);1325return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;1326}13271328// Pick the first defined of two or three arguments.1329function defaults(a, b, c) {1330if (a != null) {1331return a;1332}1333if (b != null) {1334return b;1335}1336return c;1337}13381339function currentDateArray(config) {1340// hooks is actually the exported moment object1341var nowValue = new Date(utils_hooks__hooks.now());1342if (config._useUTC) {1343return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];1344}1345return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];1346}13471348// convert an array to a date.1349// the array should mirror the parameters below1350// note: all values past the year are optional and will default to the lowest possible value.1351// [year, month, day , hour, minute, second, millisecond]1352function configFromArray (config) {1353var i, date, input = [], currentDate, yearToUse;13541355if (config._d) {1356return;1357}13581359currentDate = currentDateArray(config);13601361//compute day of the year from weeks and weekdays1362if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {1363dayOfYearFromWeekInfo(config);1364}13651366//if the day of the year is set, figure out what it is1367if (config._dayOfYear) {1368yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);13691370if (config._dayOfYear > daysInYear(yearToUse)) {1371getParsingFlags(config)._overflowDayOfYear = true;1372}13731374date = createUTCDate(yearToUse, 0, config._dayOfYear);1375config._a[MONTH] = date.getUTCMonth();1376config._a[DATE] = date.getUTCDate();1377}13781379// Default to current date.1380// * if no year, month, day of month are given, default to today1381// * if day of month is given, default month and year1382// * if month is given, default only year1383// * if year is given, don't default anything1384for (i = 0; i < 3 && config._a[i] == null; ++i) {1385config._a[i] = input[i] = currentDate[i];1386}13871388// Zero out whatever was not defaulted, including time1389for (; i < 7; i++) {1390config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];1391}13921393// Check for 24:00:00.0001394if (config._a[HOUR] === 24 &&1395config._a[MINUTE] === 0 &&1396config._a[SECOND] === 0 &&1397config._a[MILLISECOND] === 0) {1398config._nextDay = true;1399config._a[HOUR] = 0;1400}14011402config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);1403// Apply timezone offset from input. The actual utcOffset can be changed1404// with parseZone.1405if (config._tzm != null) {1406config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);1407}14081409if (config._nextDay) {1410config._a[HOUR] = 24;1411}1412}14131414function dayOfYearFromWeekInfo(config) {1415var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;14161417w = config._w;1418if (w.GG != null || w.W != null || w.E != null) {1419dow = 1;1420doy = 4;14211422// TODO: We need to take the current isoWeekYear, but that depends on1423// how we interpret now (local, utc, fixed offset). So create1424// a now version of current config (take local/utc/offset flags, and1425// create now).1426weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(local__createLocal(), 1, 4).year);1427week = defaults(w.W, 1);1428weekday = defaults(w.E, 1);1429if (weekday < 1 || weekday > 7) {1430weekdayOverflow = true;1431}1432} else {1433dow = config._locale._week.dow;1434doy = config._locale._week.doy;14351436weekYear = defaults(w.gg, config._a[YEAR], weekOfYear(local__createLocal(), dow, doy).year);1437week = defaults(w.w, 1);14381439if (w.d != null) {1440// weekday -- low day numbers are considered next week1441weekday = w.d;1442if (weekday < 0 || weekday > 6) {1443weekdayOverflow = true;1444}1445} else if (w.e != null) {1446// local weekday -- counting starts from begining of week1447weekday = w.e + dow;1448if (w.e < 0 || w.e > 6) {1449weekdayOverflow = true;1450}1451} else {1452// default to begining of week1453weekday = dow;1454}1455}1456if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {1457getParsingFlags(config)._overflowWeeks = true;1458} else if (weekdayOverflow != null) {1459getParsingFlags(config)._overflowWeekday = true;1460} else {1461temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);1462config._a[YEAR] = temp.year;1463config._dayOfYear = temp.dayOfYear;1464}1465}14661467// constant that refers to the ISO standard1468utils_hooks__hooks.ISO_8601 = function () {};14691470// date from string and format string1471function configFromStringAndFormat(config) {1472// TODO: Move this to another part of the creation flow to prevent circular deps1473if (config._f === utils_hooks__hooks.ISO_8601) {1474configFromISO(config);1475return;1476}14771478config._a = [];1479getParsingFlags(config).empty = true;14801481// This array is used to make a Date, either with `new Date` or `Date.UTC`1482var string = '' + config._i,1483i, parsedInput, tokens, token, skipped,1484stringLength = string.length,1485totalParsedInputLength = 0;14861487tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];14881489for (i = 0; i < tokens.length; i++) {1490token = tokens[i];1491parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];1492// console.log('token', token, 'parsedInput', parsedInput,1493// 'regex', getParseRegexForToken(token, config));1494if (parsedInput) {1495skipped = string.substr(0, string.indexOf(parsedInput));1496if (skipped.length > 0) {1497getParsingFlags(config).unusedInput.push(skipped);1498}1499string = string.slice(string.indexOf(parsedInput) + parsedInput.length);1500totalParsedInputLength += parsedInput.length;1501}1502// don't parse if it's not a known token1503if (formatTokenFunctions[token]) {1504if (parsedInput) {1505getParsingFlags(config).empty = false;1506}1507else {1508getParsingFlags(config).unusedTokens.push(token);1509}1510addTimeToArrayFromToken(token, parsedInput, config);1511}1512else if (config._strict && !parsedInput) {1513getParsingFlags(config).unusedTokens.push(token);1514}1515}15161517// add remaining unparsed input length to the string1518getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;1519if (string.length > 0) {1520getParsingFlags(config).unusedInput.push(string);1521}15221523// clear _12h flag if hour is <= 121524if (getParsingFlags(config).bigHour === true &&1525config._a[HOUR] <= 12 &&1526config._a[HOUR] > 0) {1527getParsingFlags(config).bigHour = undefined;1528}15291530getParsingFlags(config).parsedDateParts = config._a.slice(0);1531getParsingFlags(config).meridiem = config._meridiem;1532// handle meridiem1533config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);15341535configFromArray(config);1536checkOverflow(config);1537}153815391540function meridiemFixWrap (locale, hour, meridiem) {1541var isPm;15421543if (meridiem == null) {1544// nothing to do1545return hour;1546}1547if (locale.meridiemHour != null) {1548return locale.meridiemHour(hour, meridiem);1549} else if (locale.isPM != null) {1550// Fallback1551isPm = locale.isPM(meridiem);1552if (isPm && hour < 12) {1553hour += 12;1554}1555if (!isPm && hour === 12) {1556hour = 0;1557}1558return hour;1559} else {1560// this is not supposed to happen1561return hour;1562}1563}15641565// date from string and array of format strings1566function configFromStringAndArray(config) {1567var tempConfig,1568bestMoment,15691570scoreToBeat,1571i,1572currentScore;15731574if (config._f.length === 0) {1575getParsingFlags(config).invalidFormat = true;1576config._d = new Date(NaN);1577return;1578}15791580for (i = 0; i < config._f.length; i++) {1581currentScore = 0;1582tempConfig = copyConfig({}, config);1583if (config._useUTC != null) {1584tempConfig._useUTC = config._useUTC;1585}1586tempConfig._f = config._f[i];1587configFromStringAndFormat(tempConfig);15881589if (!valid__isValid(tempConfig)) {1590continue;1591}15921593// if there is any input that was not parsed add a penalty for that format1594currentScore += getParsingFlags(tempConfig).charsLeftOver;15951596//or tokens1597currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;15981599getParsingFlags(tempConfig).score = currentScore;16001601if (scoreToBeat == null || currentScore < scoreToBeat) {1602scoreToBeat = currentScore;1603bestMoment = tempConfig;1604}1605}16061607extend(config, bestMoment || tempConfig);1608}16091610function configFromObject(config) {1611if (config._d) {1612return;1613}16141615var i = normalizeObjectUnits(config._i);1616config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {1617return obj && parseInt(obj, 10);1618});16191620configFromArray(config);1621}16221623function createFromConfig (config) {1624var res = new Moment(checkOverflow(prepareConfig(config)));1625if (res._nextDay) {1626// Adding is smart enough around DST1627res.add(1, 'd');1628res._nextDay = undefined;1629}16301631return res;1632}16331634function prepareConfig (config) {1635var input = config._i,1636format = config._f;16371638config._locale = config._locale || locale_locales__getLocale(config._l);16391640if (input === null || (format === undefined && input === '')) {1641return valid__createInvalid({nullInput: true});1642}16431644if (typeof input === 'string') {1645config._i = input = config._locale.preparse(input);1646}16471648if (isMoment(input)) {1649return new Moment(checkOverflow(input));1650} else if (isArray(format)) {1651configFromStringAndArray(config);1652} else if (format) {1653configFromStringAndFormat(config);1654} else if (isDate(input)) {1655config._d = input;1656} else {1657configFromInput(config);1658}16591660if (!valid__isValid(config)) {1661config._d = null;1662}16631664return config;1665}16661667function configFromInput(config) {1668var input = config._i;1669if (input === undefined) {1670config._d = new Date(utils_hooks__hooks.now());1671} else if (isDate(input)) {1672config._d = new Date(input.valueOf());1673} else if (typeof input === 'string') {1674configFromString(config);1675} else if (isArray(input)) {1676config._a = map(input.slice(0), function (obj) {1677return parseInt(obj, 10);1678});1679configFromArray(config);1680} else if (typeof(input) === 'object') {1681configFromObject(config);1682} else if (typeof(input) === 'number') {1683// from milliseconds1684config._d = new Date(input);1685} else {1686utils_hooks__hooks.createFromInputFallback(config);1687}1688}16891690function createLocalOrUTC (input, format, locale, strict, isUTC) {1691var c = {};16921693if (typeof(locale) === 'boolean') {1694strict = locale;1695locale = undefined;1696}1697// object construction must be done this way.1698// https://github.com/moment/moment/issues/14231699c._isAMomentObject = true;1700c._useUTC = c._isUTC = isUTC;1701c._l = locale;1702c._i = input;1703c._f = format;1704c._strict = strict;17051706return createFromConfig(c);1707}17081709function local__createLocal (input, format, locale, strict) {1710return createLocalOrUTC(input, format, locale, strict, false);1711}17121713var prototypeMin = deprecate(1714'moment().min is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548',1715function () {1716var other = local__createLocal.apply(null, arguments);1717if (this.isValid() && other.isValid()) {1718return other < this ? this : other;1719} else {1720return valid__createInvalid();1721}1722}1723);17241725var prototypeMax = deprecate(1726'moment().max is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548',1727function () {1728var other = local__createLocal.apply(null, arguments);1729if (this.isValid() && other.isValid()) {1730return other > this ? this : other;1731} else {1732return valid__createInvalid();1733}1734}1735);17361737// Pick a moment m from moments so that m[fn](other) is true for all1738// other. This relies on the function fn to be transitive.1739//1740// moments should either be an array of moment objects or an array, whose1741// first element is an array of moment objects.1742function pickBy(fn, moments) {1743var res, i;1744if (moments.length === 1 && isArray(moments[0])) {1745moments = moments[0];1746}1747if (!moments.length) {1748return local__createLocal();1749}1750res = moments[0];1751for (i = 1; i < moments.length; ++i) {1752if (!moments[i].isValid() || moments[i][fn](res)) {1753res = moments[i];1754}1755}1756return res;1757}17581759// TODO: Use [].sort instead?1760function min () {1761var args = [].slice.call(arguments, 0);17621763return pickBy('isBefore', args);1764}17651766function max () {1767var args = [].slice.call(arguments, 0);17681769return pickBy('isAfter', args);1770}17711772var now = function () {1773return Date.now ? Date.now() : +(new Date());1774};17751776function Duration (duration) {1777var normalizedInput = normalizeObjectUnits(duration),1778years = normalizedInput.year || 0,1779quarters = normalizedInput.quarter || 0,1780months = normalizedInput.month || 0,1781weeks = normalizedInput.week || 0,1782days = normalizedInput.day || 0,1783hours = normalizedInput.hour || 0,1784minutes = normalizedInput.minute || 0,1785seconds = normalizedInput.second || 0,1786milliseconds = normalizedInput.millisecond || 0;17871788// representation for dateAddRemove1789this._milliseconds = +milliseconds +1790seconds * 1e3 + // 10001791minutes * 6e4 + // 1000 * 601792hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/29781793// Because of dateAddRemove treats 24 hours as different from a1794// day when working around DST, we need to store them separately1795this._days = +days +1796weeks * 7;1797// It is impossible translate months into days without knowing1798// which months you are are talking about, so we have to store1799// it separately.1800this._months = +months +1801quarters * 3 +1802years * 12;18031804this._data = {};18051806this._locale = locale_locales__getLocale();18071808this._bubble();1809}18101811function isDuration (obj) {1812return obj instanceof Duration;1813}18141815// FORMATTING18161817function offset (token, separator) {1818addFormatToken(token, 0, 0, function () {1819var offset = this.utcOffset();1820var sign = '+';1821if (offset < 0) {1822offset = -offset;1823sign = '-';1824}1825return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);1826});1827}18281829offset('Z', ':');1830offset('ZZ', '');18311832// PARSING18331834addRegexToken('Z', matchShortOffset);1835addRegexToken('ZZ', matchShortOffset);1836addParseToken(['Z', 'ZZ'], function (input, array, config) {1837config._useUTC = true;1838config._tzm = offsetFromString(matchShortOffset, input);1839});18401841// HELPERS18421843// timezone chunker1844// '+10:00' > ['10', '00']1845// '-1530' > ['-15', '30']1846var chunkOffset = /([\+\-]|\d\d)/gi;18471848function offsetFromString(matcher, string) {1849var matches = ((string || '').match(matcher) || []);1850var chunk = matches[matches.length - 1] || [];1851var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];1852var minutes = +(parts[1] * 60) + toInt(parts[2]);18531854return parts[0] === '+' ? minutes : -minutes;1855}18561857// Return a moment from input, that is local/utc/zone equivalent to model.1858function cloneWithOffset(input, model) {1859var res, diff;1860if (model._isUTC) {1861res = model.clone();1862diff = (isMoment(input) || isDate(input) ? input.valueOf() : local__createLocal(input).valueOf()) - res.valueOf();1863// Use low-level api, because this fn is low-level api.1864res._d.setTime(res._d.valueOf() + diff);1865utils_hooks__hooks.updateOffset(res, false);1866return res;1867} else {1868return local__createLocal(input).local();1869}1870}18711872function getDateOffset (m) {1873// On Firefox.24 Date#getTimezoneOffset returns a floating point.1874// https://github.com/moment/moment/pull/18711875return -Math.round(m._d.getTimezoneOffset() / 15) * 15;1876}18771878// HOOKS18791880// This function will be called whenever a moment is mutated.1881// It is intended to keep the offset in sync with the timezone.1882utils_hooks__hooks.updateOffset = function () {};18831884// MOMENTS18851886// keepLocalTime = true means only change the timezone, without1887// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->1888// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset1889// +0200, so we adjust the time as needed, to be valid.1890//1891// Keeping the time actually adds/subtracts (one hour)1892// from the actual represented time. That is why we call updateOffset1893// a second time. In case it wants us to change the offset again1894// _changeInProgress == true case, then we have to adjust, because1895// there is no such time in the given timezone.1896function getSetOffset (input, keepLocalTime) {1897var offset = this._offset || 0,1898localAdjust;1899if (!this.isValid()) {1900return input != null ? this : NaN;1901}1902if (input != null) {1903if (typeof input === 'string') {1904input = offsetFromString(matchShortOffset, input);1905} else if (Math.abs(input) < 16) {1906input = input * 60;1907}1908if (!this._isUTC && keepLocalTime) {1909localAdjust = getDateOffset(this);1910}1911this._offset = input;1912this._isUTC = true;1913if (localAdjust != null) {1914this.add(localAdjust, 'm');1915}1916if (offset !== input) {1917if (!keepLocalTime || this._changeInProgress) {1918add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);1919} else if (!this._changeInProgress) {1920this._changeInProgress = true;1921utils_hooks__hooks.updateOffset(this, true);1922this._changeInProgress = null;1923}1924}1925return this;1926} else {1927return this._isUTC ? offset : getDateOffset(this);1928}1929}19301931function getSetZone (input, keepLocalTime) {1932if (input != null) {1933if (typeof input !== 'string') {1934input = -input;1935}19361937this.utcOffset(input, keepLocalTime);19381939return this;1940} else {1941return -this.utcOffset();1942}1943}19441945function setOffsetToUTC (keepLocalTime) {1946return this.utcOffset(0, keepLocalTime);1947}19481949function setOffsetToLocal (keepLocalTime) {1950if (this._isUTC) {1951this.utcOffset(0, keepLocalTime);1952this._isUTC = false;19531954if (keepLocalTime) {1955this.subtract(getDateOffset(this), 'm');1956}1957}1958return this;1959}19601961function setOffsetToParsedOffset () {1962if (this._tzm) {1963this.utcOffset(this._tzm);1964} else if (typeof this._i === 'string') {1965this.utcOffset(offsetFromString(matchOffset, this._i));1966}1967return this;1968}19691970function hasAlignedHourOffset (input) {1971if (!this.isValid()) {1972return false;1973}1974input = input ? local__createLocal(input).utcOffset() : 0;19751976return (this.utcOffset() - input) % 60 === 0;1977}19781979function isDaylightSavingTime () {1980return (1981this.utcOffset() > this.clone().month(0).utcOffset() ||1982this.utcOffset() > this.clone().month(5).utcOffset()1983);1984}19851986function isDaylightSavingTimeShifted () {1987if (!isUndefined(this._isDSTShifted)) {1988return this._isDSTShifted;1989}19901991var c = {};19921993copyConfig(c, this);1994c = prepareConfig(c);19951996if (c._a) {1997var other = c._isUTC ? create_utc__createUTC(c._a) : local__createLocal(c._a);1998this._isDSTShifted = this.isValid() &&1999compareArrays(c._a, other.toArray()) > 0;2000} else {2001this._isDSTShifted = false;2002}20032004return this._isDSTShifted;2005}20062007function isLocal () {2008return this.isValid() ? !this._isUTC : false;2009}20102011function isUtcOffset () {2012return this.isValid() ? this._isUTC : false;2013}20142015function isUtc () {2016return this.isValid() ? this._isUTC && this._offset === 0 : false;2017}20182019// ASP.NET json date format regex2020var aspNetRegex = /^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/;20212022// from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html2023// somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere2024// and further modified to allow for strings containing both week and day2025var isoRegex = /^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;20262027function create__createDuration (input, key) {2028var duration = input,2029// matching against regexp is expensive, do it on demand2030match = null,2031sign,2032ret,2033diffRes;20342035if (isDuration(input)) {2036duration = {2037ms : input._milliseconds,2038d : input._days,2039M : input._months2040};2041} else if (typeof input === 'number') {2042duration = {};2043if (key) {2044duration[key] = input;2045} else {2046duration.milliseconds = input;2047}2048} else if (!!(match = aspNetRegex.exec(input))) {2049sign = (match[1] === '-') ? -1 : 1;2050duration = {2051y : 0,2052d : toInt(match[DATE]) * sign,2053h : toInt(match[HOUR]) * sign,2054m : toInt(match[MINUTE]) * sign,2055s : toInt(match[SECOND]) * sign,2056ms : toInt(match[MILLISECOND]) * sign2057};2058} else if (!!(match = isoRegex.exec(input))) {2059sign = (match[1] === '-') ? -1 : 1;2060duration = {2061y : parseIso(match[2], sign),2062M : parseIso(match[3], sign),2063w : parseIso(match[4], sign),2064d : parseIso(match[5], sign),2065h : parseIso(match[6], sign),2066m : parseIso(match[7], sign),2067s : parseIso(match[8], sign)2068};2069} else if (duration == null) {// checks for null or undefined2070duration = {};2071} else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {2072diffRes = momentsDifference(local__createLocal(duration.from), local__createLocal(duration.to));20732074duration = {};2075duration.ms = diffRes.milliseconds;2076duration.M = diffRes.months;2077}20782079ret = new Duration(duration);20802081if (isDuration(input) && hasOwnProp(input, '_locale')) {2082ret._locale = input._locale;2083}20842085return ret;2086}20872088create__createDuration.fn = Duration.prototype;20892090function parseIso (inp, sign) {2091// We'd normally use ~~inp for this, but unfortunately it also2092// converts floats to ints.2093// inp may be undefined, so careful calling replace on it.2094var res = inp && parseFloat(inp.replace(',', '.'));2095// apply sign while we're at it2096return (isNaN(res) ? 0 : res) * sign;2097}20982099function positiveMomentsDifference(base, other) {2100var res = {milliseconds: 0, months: 0};21012102res.months = other.month() - base.month() +2103(other.year() - base.year()) * 12;2104if (base.clone().add(res.months, 'M').isAfter(other)) {2105--res.months;2106}21072108res.milliseconds = +other - +(base.clone().add(res.months, 'M'));21092110return res;2111}21122113function momentsDifference(base, other) {2114var res;2115if (!(base.isValid() && other.isValid())) {2116return {milliseconds: 0, months: 0};2117}21182119other = cloneWithOffset(other, base);2120if (base.isBefore(other)) {2121res = positiveMomentsDifference(base, other);2122} else {2123res = positiveMomentsDifference(other, base);2124res.milliseconds = -res.milliseconds;2125res.months = -res.months;2126}21272128return res;2129}21302131function absRound (number) {2132if (number < 0) {2133return Math.round(-1 * number) * -1;2134} else {2135return Math.round(number);2136}2137}21382139// TODO: remove 'name' arg after deprecation is removed2140function createAdder(direction, name) {2141return function (val, period) {2142var dur, tmp;2143//invert the arguments, but complain about it2144if (period !== null && !isNaN(+period)) {2145deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period).');2146tmp = val; val = period; period = tmp;2147}21482149val = typeof val === 'string' ? +val : val;2150dur = create__createDuration(val, period);2151add_subtract__addSubtract(this, dur, direction);2152return this;2153};2154}21552156function add_subtract__addSubtract (mom, duration, isAdding, updateOffset) {2157var milliseconds = duration._milliseconds,2158days = absRound(duration._days),2159months = absRound(duration._months);21602161if (!mom.isValid()) {2162// No op2163return;2164}21652166updateOffset = updateOffset == null ? true : updateOffset;21672168if (milliseconds) {2169mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);2170}2171if (days) {2172get_set__set(mom, 'Date', get_set__get(mom, 'Date') + days * isAdding);2173}2174if (months) {2175setMonth(mom, get_set__get(mom, 'Month') + months * isAdding);2176}2177if (updateOffset) {2178utils_hooks__hooks.updateOffset(mom, days || months);2179}2180}21812182var add_subtract__add = createAdder(1, 'add');2183var add_subtract__subtract = createAdder(-1, 'subtract');21842185function moment_calendar__calendar (time, formats) {2186// We want to compare the start of today, vs this.2187// Getting start-of-today depends on whether we're local/utc/offset or not.2188var now = time || local__createLocal(),2189sod = cloneWithOffset(now, this).startOf('day'),2190diff = this.diff(sod, 'days', true),2191format = diff < -6 ? 'sameElse' :2192diff < -1 ? 'lastWeek' :2193diff < 0 ? 'lastDay' :2194diff < 1 ? 'sameDay' :2195diff < 2 ? 'nextDay' :2196diff < 7 ? 'nextWeek' : 'sameElse';21972198var output = formats && (isFunction(formats[format]) ? formats[format]() : formats[format]);21992200return this.format(output || this.localeData().calendar(format, this, local__createLocal(now)));2201}22022203function clone () {2204return new Moment(this);2205}22062207function isAfter (input, units) {2208var localInput = isMoment(input) ? input : local__createLocal(input);2209if (!(this.isValid() && localInput.isValid())) {2210return false;2211}2212units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');2213if (units === 'millisecond') {2214return this.valueOf() > localInput.valueOf();2215} else {2216return localInput.valueOf() < this.clone().startOf(units).valueOf();2217}2218}22192220function isBefore (input, units) {2221var localInput = isMoment(input) ? input : local__createLocal(input);2222if (!(this.isValid() && localInput.isValid())) {2223return false;2224}2225units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');2226if (units === 'millisecond') {2227return this.valueOf() < localInput.valueOf();2228} else {2229return this.clone().endOf(units).valueOf() < localInput.valueOf();2230}2231}22322233function isBetween (from, to, units, inclusivity) {2234inclusivity = inclusivity || '()';2235return (inclusivity[0] === '(' ? this.isAfter(from, units) : !this.isBefore(from, units)) &&2236(inclusivity[1] === ')' ? this.isBefore(to, units) : !this.isAfter(to, units));2237}22382239function isSame (input, units) {2240var localInput = isMoment(input) ? input : local__createLocal(input),2241inputMs;2242if (!(this.isValid() && localInput.isValid())) {2243return false;2244}2245units = normalizeUnits(units || 'millisecond');2246if (units === 'millisecond') {2247return this.valueOf() === localInput.valueOf();2248} else {2249inputMs = localInput.valueOf();2250return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();2251}2252}22532254function isSameOrAfter (input, units) {2255return this.isSame(input, units) || this.isAfter(input,units);2256}22572258function isSameOrBefore (input, units) {2259return this.isSame(input, units) || this.isBefore(input,units);2260}22612262function diff (input, units, asFloat) {2263var that,2264zoneDelta,2265delta, output;22662267if (!this.isValid()) {2268return NaN;2269}22702271that = cloneWithOffset(input, this);22722273if (!that.isValid()) {2274return NaN;2275}22762277zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;22782279units = normalizeUnits(units);22802281if (units === 'year' || units === 'month' || units === 'quarter') {2282output = monthDiff(this, that);2283if (units === 'quarter') {2284output = output / 3;2285} else if (units === 'year') {2286output = output / 12;2287}2288} else {2289delta = this - that;2290output = units === 'second' ? delta / 1e3 : // 10002291units === 'minute' ? delta / 6e4 : // 1000 * 602292units === 'hour' ? delta / 36e5 : // 1000 * 60 * 602293units === 'day' ? (delta - zoneDelta) / 864e5 : // 1000 * 60 * 60 * 24, negate dst2294units === 'week' ? (delta - zoneDelta) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst2295delta;2296}2297return asFloat ? output : absFloor(output);2298}22992300function monthDiff (a, b) {2301// difference in months2302var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),2303// b is in (anchor - 1 month, anchor + 1 month)2304anchor = a.clone().add(wholeMonthDiff, 'months'),2305anchor2, adjust;23062307if (b - anchor < 0) {2308anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');2309// linear across the month2310adjust = (b - anchor) / (anchor - anchor2);2311} else {2312anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');2313// linear across the month2314adjust = (b - anchor) / (anchor2 - anchor);2315}23162317//check for negative zero, return zero if negative zero2318return -(wholeMonthDiff + adjust) || 0;2319}23202321utils_hooks__hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';2322utils_hooks__hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';23232324function toString () {2325return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');2326}23272328function moment_format__toISOString () {2329var m = this.clone().utc();2330if (0 < m.year() && m.year() <= 9999) {2331if (isFunction(Date.prototype.toISOString)) {2332// native implementation is ~50x faster, use it when we can2333return this.toDate().toISOString();2334} else {2335return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');2336}2337} else {2338return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');2339}2340}23412342function format (inputString) {2343if (!inputString) {2344inputString = this.isUtc() ? utils_hooks__hooks.defaultFormatUtc : utils_hooks__hooks.defaultFormat;2345}2346var output = formatMoment(this, inputString);2347return this.localeData().postformat(output);2348}23492350function from (time, withoutSuffix) {2351if (this.isValid() &&2352((isMoment(time) && time.isValid()) ||2353local__createLocal(time).isValid())) {2354return create__createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);2355} else {2356return this.localeData().invalidDate();2357}2358}23592360function fromNow (withoutSuffix) {2361return this.from(local__createLocal(), withoutSuffix);2362}23632364function to (time, withoutSuffix) {2365if (this.isValid() &&2366((isMoment(time) && time.isValid()) ||2367local__createLocal(time).isValid())) {2368return create__createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);2369} else {2370return this.localeData().invalidDate();2371}2372}23732374function toNow (withoutSuffix) {2375return this.to(local__createLocal(), withoutSuffix);2376}23772378// If passed a locale key, it will set the locale for this2379// instance. Otherwise, it will return the locale configuration2380// variables for this instance.2381function locale (key) {2382var newLocaleData;23832384if (key === undefined) {2385return this._locale._abbr;2386} else {2387newLocaleData = locale_locales__getLocale(key);2388if (newLocaleData != null) {2389this._locale = newLocaleData;2390}2391return this;2392}2393}23942395var lang = deprecate(2396'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',2397function (key) {2398if (key === undefined) {2399return this.localeData();2400} else {2401return this.locale(key);2402}2403}2404);24052406function localeData () {2407return this._locale;2408}24092410function startOf (units) {2411units = normalizeUnits(units);2412// the following switch intentionally omits break keywords2413// to utilize falling through the cases.2414switch (units) {2415case 'year':2416this.month(0);2417/* falls through */2418case 'quarter':2419case 'month':2420this.date(1);2421/* falls through */2422case 'week':2423case 'isoWeek':2424case 'day':2425case 'date':2426this.hours(0);2427/* falls through */2428case 'hour':2429this.minutes(0);2430/* falls through */2431case 'minute':2432this.seconds(0);2433/* falls through */2434case 'second':2435this.milliseconds(0);2436}24372438// weeks are a special case2439if (units === 'week') {2440this.weekday(0);2441}2442if (units === 'isoWeek') {2443this.isoWeekday(1);2444}24452446// quarters are also special2447if (units === 'quarter') {2448this.month(Math.floor(this.month() / 3) * 3);2449}24502451return this;2452}24532454function endOf (units) {2455units = normalizeUnits(units);2456if (units === undefined || units === 'millisecond') {2457return this;2458}24592460// 'date' is an alias for 'day', so it should be considered as such.2461if (units === 'date') {2462units = 'day';2463}24642465return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');2466}24672468function to_type__valueOf () {2469return this._d.valueOf() - ((this._offset || 0) * 60000);2470}24712472function unix () {2473return Math.floor(this.valueOf() / 1000);2474}24752476function toDate () {2477return this._offset ? new Date(this.valueOf()) : this._d;2478}24792480function toArray () {2481var m = this;2482return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];2483}24842485function toObject () {2486var m = this;2487return {2488years: m.year(),2489months: m.month(),2490date: m.date(),2491hours: m.hours(),2492minutes: m.minutes(),2493seconds: m.seconds(),2494milliseconds: m.milliseconds()2495};2496}24972498function toJSON () {2499// new Date(NaN).toJSON() === null2500return this.isValid() ? this.toISOString() : null;2501}25022503function moment_valid__isValid () {2504return valid__isValid(this);2505}25062507function parsingFlags () {2508return extend({}, getParsingFlags(this));2509}25102511function invalidAt () {2512return getParsingFlags(this).overflow;2513}25142515function creationData() {2516return {2517input: this._i,2518format: this._f,2519locale: this._locale,2520isUTC: this._isUTC,2521strict: this._strict2522};2523}25242525// FORMATTING25262527addFormatToken(0, ['gg', 2], 0, function () {2528return this.weekYear() % 100;2529});25302531addFormatToken(0, ['GG', 2], 0, function () {2532return this.isoWeekYear() % 100;2533});25342535function addWeekYearFormatToken (token, getter) {2536addFormatToken(0, [token, token.length], 0, getter);2537}25382539addWeekYearFormatToken('gggg', 'weekYear');2540addWeekYearFormatToken('ggggg', 'weekYear');2541addWeekYearFormatToken('GGGG', 'isoWeekYear');2542addWeekYearFormatToken('GGGGG', 'isoWeekYear');25432544// ALIASES25452546addUnitAlias('weekYear', 'gg');2547addUnitAlias('isoWeekYear', 'GG');25482549// PARSING25502551addRegexToken('G', matchSigned);2552addRegexToken('g', matchSigned);2553addRegexToken('GG', match1to2, match2);2554addRegexToken('gg', match1to2, match2);2555addRegexToken('GGGG', match1to4, match4);2556addRegexToken('gggg', match1to4, match4);2557addRegexToken('GGGGG', match1to6, match6);2558addRegexToken('ggggg', match1to6, match6);25592560addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {2561week[token.substr(0, 2)] = toInt(input);2562});25632564addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {2565week[token] = utils_hooks__hooks.parseTwoDigitYear(input);2566});25672568// MOMENTS25692570function getSetWeekYear (input) {2571return getSetWeekYearHelper.call(this,2572input,2573this.week(),2574this.weekday(),2575this.localeData()._week.dow,2576this.localeData()._week.doy);2577}25782579function getSetISOWeekYear (input) {2580return getSetWeekYearHelper.call(this,2581input, this.isoWeek(), this.isoWeekday(), 1, 4);2582}25832584function getISOWeeksInYear () {2585return weeksInYear(this.year(), 1, 4);2586}25872588function getWeeksInYear () {2589var weekInfo = this.localeData()._week;2590return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);2591}25922593function getSetWeekYearHelper(input, week, weekday, dow, doy) {2594var weeksTarget;2595if (input == null) {2596return weekOfYear(this, dow, doy).year;2597} else {2598weeksTarget = weeksInYear(input, dow, doy);2599if (week > weeksTarget) {2600week = weeksTarget;2601}2602return setWeekAll.call(this, input, week, weekday, dow, doy);2603}2604}26052606function setWeekAll(weekYear, week, weekday, dow, doy) {2607var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),2608date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);26092610this.year(date.getUTCFullYear());2611this.month(date.getUTCMonth());2612this.date(date.getUTCDate());2613return this;2614}26152616// FORMATTING26172618addFormatToken('Q', 0, 'Qo', 'quarter');26192620// ALIASES26212622addUnitAlias('quarter', 'Q');26232624// PARSING26252626addRegexToken('Q', match1);2627addParseToken('Q', function (input, array) {2628array[MONTH] = (toInt(input) - 1) * 3;2629});26302631// MOMENTS26322633function getSetQuarter (input) {2634return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);2635}26362637// FORMATTING26382639addFormatToken('w', ['ww', 2], 'wo', 'week');2640addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');26412642// ALIASES26432644addUnitAlias('week', 'w');2645addUnitAlias('isoWeek', 'W');26462647// PARSING26482649addRegexToken('w', match1to2);2650addRegexToken('ww', match1to2, match2);2651addRegexToken('W', match1to2);2652addRegexToken('WW', match1to2, match2);26532654addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {2655week[token.substr(0, 1)] = toInt(input);2656});26572658// HELPERS26592660// LOCALES26612662function localeWeek (mom) {2663return weekOfYear(mom, this._week.dow, this._week.doy).week;2664}26652666var defaultLocaleWeek = {2667dow : 0, // Sunday is the first day of the week.2668doy : 6 // The week that contains Jan 1st is the first week of the year.2669};26702671function localeFirstDayOfWeek () {2672return this._week.dow;2673}26742675function localeFirstDayOfYear () {2676return this._week.doy;2677}26782679// MOMENTS26802681function getSetWeek (input) {2682var week = this.localeData().week(this);2683return input == null ? week : this.add((input - week) * 7, 'd');2684}26852686function getSetISOWeek (input) {2687var week = weekOfYear(this, 1, 4).week;2688return input == null ? week : this.add((input - week) * 7, 'd');2689}26902691// FORMATTING26922693addFormatToken('D', ['DD', 2], 'Do', 'date');26942695// ALIASES26962697addUnitAlias('date', 'D');26982699// PARSING27002701addRegexToken('D', match1to2);2702addRegexToken('DD', match1to2, match2);2703addRegexToken('Do', function (isStrict, locale) {2704return isStrict ? locale._ordinalParse : locale._ordinalParseLenient;2705});27062707addParseToken(['D', 'DD'], DATE);2708addParseToken('Do', function (input, array) {2709array[DATE] = toInt(input.match(match1to2)[0], 10);2710});27112712// MOMENTS27132714var getSetDayOfMonth = makeGetSet('Date', true);27152716// FORMATTING27172718addFormatToken('d', 0, 'do', 'day');27192720addFormatToken('dd', 0, 0, function (format) {2721return this.localeData().weekdaysMin(this, format);2722});27232724addFormatToken('ddd', 0, 0, function (format) {2725return this.localeData().weekdaysShort(this, format);2726});27272728addFormatToken('dddd', 0, 0, function (format) {2729return this.localeData().weekdays(this, format);2730});27312732addFormatToken('e', 0, 0, 'weekday');2733addFormatToken('E', 0, 0, 'isoWeekday');27342735// ALIASES27362737addUnitAlias('day', 'd');2738addUnitAlias('weekday', 'e');2739addUnitAlias('isoWeekday', 'E');27402741// PARSING27422743addRegexToken('d', match1to2);2744addRegexToken('e', match1to2);2745addRegexToken('E', match1to2);2746addRegexToken('dd', function (isStrict, locale) {2747return locale.weekdaysMinRegex(isStrict);2748});2749addRegexToken('ddd', function (isStrict, locale) {2750return locale.weekdaysShortRegex(isStrict);2751});2752addRegexToken('dddd', function (isStrict, locale) {2753return locale.weekdaysRegex(isStrict);2754});27552756addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {2757var weekday = config._locale.weekdaysParse(input, token, config._strict);2758// if we didn't get a weekday name, mark the date as invalid2759if (weekday != null) {2760week.d = weekday;2761} else {2762getParsingFlags(config).invalidWeekday = input;2763}2764});27652766addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {2767week[token] = toInt(input);2768});27692770// HELPERS27712772function parseWeekday(input, locale) {2773if (typeof input !== 'string') {2774return input;2775}27762777if (!isNaN(input)) {2778return parseInt(input, 10);2779}27802781input = locale.weekdaysParse(input);2782if (typeof input === 'number') {2783return input;2784}27852786return null;2787}27882789// LOCALES27902791var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');2792function localeWeekdays (m, format) {2793return isArray(this._weekdays) ? this._weekdays[m.day()] :2794this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()];2795}27962797var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');2798function localeWeekdaysShort (m) {2799return this._weekdaysShort[m.day()];2800}28012802var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');2803function localeWeekdaysMin (m) {2804return this._weekdaysMin[m.day()];2805}28062807function day_of_week__handleStrictParse(weekdayName, format, strict) {2808var i, ii, mom, llc = weekdayName.toLocaleLowerCase();2809if (!this._weekdaysParse) {2810this._weekdaysParse = [];2811this._shortWeekdaysParse = [];2812this._minWeekdaysParse = [];28132814for (i = 0; i < 7; ++i) {2815mom = create_utc__createUTC([2000, 1]).day(i);2816this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();2817this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();2818this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();2819}2820}28212822if (strict) {2823if (format === 'dddd') {2824ii = indexOf.call(this._weekdaysParse, llc);2825return ii !== -1 ? ii : null;2826} else if (format === 'ddd') {2827ii = indexOf.call(this._shortWeekdaysParse, llc);2828return ii !== -1 ? ii : null;2829} else {2830ii = indexOf.call(this._minWeekdaysParse, llc);2831return ii !== -1 ? ii : null;2832}2833} else {2834if (format === 'dddd') {2835ii = indexOf.call(this._weekdaysParse, llc);2836if (ii !== -1) {2837return ii;2838}2839ii = indexOf.call(this._shortWeekdaysParse, llc);2840if (ii !== -1) {2841return ii;2842}2843ii = indexOf.call(this._minWeekdaysParse, llc);2844return ii !== -1 ? ii : null;2845} else if (format === 'ddd') {2846ii = indexOf.call(this._shortWeekdaysParse, llc);2847if (ii !== -1) {2848return ii;2849}2850ii = indexOf.call(this._weekdaysParse, llc);2851if (ii !== -1) {2852return ii;2853}2854ii = indexOf.call(this._minWeekdaysParse, llc);2855return ii !== -1 ? ii : null;2856} else {2857ii = indexOf.call(this._minWeekdaysParse, llc);2858if (ii !== -1) {2859return ii;2860}2861ii = indexOf.call(this._weekdaysParse, llc);2862if (ii !== -1) {2863return ii;2864}2865ii = indexOf.call(this._shortWeekdaysParse, llc);2866return ii !== -1 ? ii : null;2867}2868}2869}28702871function localeWeekdaysParse (weekdayName, format, strict) {2872var i, mom, regex;28732874if (this._weekdaysParseExact) {2875return day_of_week__handleStrictParse.call(this, weekdayName, format, strict);2876}28772878if (!this._weekdaysParse) {2879this._weekdaysParse = [];2880this._minWeekdaysParse = [];2881this._shortWeekdaysParse = [];2882this._fullWeekdaysParse = [];2883}28842885for (i = 0; i < 7; i++) {2886// make the regex if we don't have it already28872888mom = create_utc__createUTC([2000, 1]).day(i);2889if (strict && !this._fullWeekdaysParse[i]) {2890this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\.?') + '$', 'i');2891this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\.?') + '$', 'i');2892this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\.?') + '$', 'i');2893}2894if (!this._weekdaysParse[i]) {2895regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');2896this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');2897}2898// test the regex2899if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {2900return i;2901} else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {2902return i;2903} else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {2904return i;2905} else if (!strict && this._weekdaysParse[i].test(weekdayName)) {2906return i;2907}2908}2909}29102911// MOMENTS29122913function getSetDayOfWeek (input) {2914if (!this.isValid()) {2915return input != null ? this : NaN;2916}2917var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();2918if (input != null) {2919input = parseWeekday(input, this.localeData());2920return this.add(input - day, 'd');2921} else {2922return day;2923}2924}29252926function getSetLocaleDayOfWeek (input) {2927if (!this.isValid()) {2928return input != null ? this : NaN;2929}2930var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;2931return input == null ? weekday : this.add(input - weekday, 'd');2932}29332934function getSetISODayOfWeek (input) {2935if (!this.isValid()) {2936return input != null ? this : NaN;2937}2938// behaves the same as moment#day except2939// as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)2940// as a setter, sunday should belong to the previous week.2941return input == null ? this.day() || 7 : this.day(this.day() % 7 ? input : input - 7);2942}29432944var defaultWeekdaysRegex = matchWord;2945function weekdaysRegex (isStrict) {2946if (this._weekdaysParseExact) {2947if (!hasOwnProp(this, '_weekdaysRegex')) {2948computeWeekdaysParse.call(this);2949}2950if (isStrict) {2951return this._weekdaysStrictRegex;2952} else {2953return this._weekdaysRegex;2954}2955} else {2956return this._weekdaysStrictRegex && isStrict ?2957this._weekdaysStrictRegex : this._weekdaysRegex;2958}2959}29602961var defaultWeekdaysShortRegex = matchWord;2962function weekdaysShortRegex (isStrict) {2963if (this._weekdaysParseExact) {2964if (!hasOwnProp(this, '_weekdaysRegex')) {2965computeWeekdaysParse.call(this);2966}2967if (isStrict) {2968return this._weekdaysShortStrictRegex;2969} else {2970return this._weekdaysShortRegex;2971}2972} else {2973return this._weekdaysShortStrictRegex && isStrict ?2974this._weekdaysShortStrictRegex : this._weekdaysShortRegex;2975}2976}29772978var defaultWeekdaysMinRegex = matchWord;2979function weekdaysMinRegex (isStrict) {2980if (this._weekdaysParseExact) {2981if (!hasOwnProp(this, '_weekdaysRegex')) {2982computeWeekdaysParse.call(this);2983}2984if (isStrict) {2985return this._weekdaysMinStrictRegex;2986} else {2987return this._weekdaysMinRegex;2988}2989} else {2990return this._weekdaysMinStrictRegex && isStrict ?2991this._weekdaysMinStrictRegex : this._weekdaysMinRegex;2992}2993}299429952996function computeWeekdaysParse () {2997function cmpLenRev(a, b) {2998return b.length - a.length;2999}30003001var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [],3002i, mom, minp, shortp, longp;3003for (i = 0; i < 7; i++) {3004// make the regex if we don't have it already3005mom = create_utc__createUTC([2000, 1]).day(i);3006minp = this.weekdaysMin(mom, '');3007shortp = this.weekdaysShort(mom, '');3008longp = this.weekdays(mom, '');3009minPieces.push(minp);3010shortPieces.push(shortp);3011longPieces.push(longp);3012mixedPieces.push(minp);3013mixedPieces.push(shortp);3014mixedPieces.push(longp);3015}3016// Sorting makes sure if one weekday (or abbr) is a prefix of another it3017// will match the longer piece.3018minPieces.sort(cmpLenRev);3019shortPieces.sort(cmpLenRev);3020longPieces.sort(cmpLenRev);3021mixedPieces.sort(cmpLenRev);3022for (i = 0; i < 7; i++) {3023shortPieces[i] = regexEscape(shortPieces[i]);3024longPieces[i] = regexEscape(longPieces[i]);3025mixedPieces[i] = regexEscape(mixedPieces[i]);3026}30273028this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');3029this._weekdaysShortRegex = this._weekdaysRegex;3030this._weekdaysMinRegex = this._weekdaysRegex;30313032this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');3033this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');3034this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');3035}30363037// FORMATTING30383039addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');30403041// ALIASES30423043addUnitAlias('dayOfYear', 'DDD');30443045// PARSING30463047addRegexToken('DDD', match1to3);3048addRegexToken('DDDD', match3);3049addParseToken(['DDD', 'DDDD'], function (input, array, config) {3050config._dayOfYear = toInt(input);3051});30523053// HELPERS30543055// MOMENTS30563057function getSetDayOfYear (input) {3058var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;3059return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');3060}30613062// FORMATTING30633064function hFormat() {3065return this.hours() % 12 || 12;3066}30673068function kFormat() {3069return this.hours() || 24;3070}30713072addFormatToken('H', ['HH', 2], 0, 'hour');3073addFormatToken('h', ['hh', 2], 0, hFormat);3074addFormatToken('k', ['kk', 2], 0, kFormat);30753076addFormatToken('hmm', 0, 0, function () {3077return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);3078});30793080addFormatToken('hmmss', 0, 0, function () {3081return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) +3082zeroFill(this.seconds(), 2);3083});30843085addFormatToken('Hmm', 0, 0, function () {3086return '' + this.hours() + zeroFill(this.minutes(), 2);3087});30883089addFormatToken('Hmmss', 0, 0, function () {3090return '' + this.hours() + zeroFill(this.minutes(), 2) +3091zeroFill(this.seconds(), 2);3092});30933094function meridiem (token, lowercase) {3095addFormatToken(token, 0, 0, function () {3096return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);3097});3098}30993100meridiem('a', true);3101meridiem('A', false);31023103// ALIASES31043105addUnitAlias('hour', 'h');31063107// PARSING31083109function matchMeridiem (isStrict, locale) {3110return locale._meridiemParse;3111}31123113addRegexToken('a', matchMeridiem);3114addRegexToken('A', matchMeridiem);3115addRegexToken('H', match1to2);3116addRegexToken('h', match1to2);3117addRegexToken('HH', match1to2, match2);3118addRegexToken('hh', match1to2, match2);31193120addRegexToken('hmm', match3to4);3121addRegexToken('hmmss', match5to6);3122addRegexToken('Hmm', match3to4);3123addRegexToken('Hmmss', match5to6);31243125addParseToken(['H', 'HH'], HOUR);3126addParseToken(['a', 'A'], function (input, array, config) {3127config._isPm = config._locale.isPM(input);3128config._meridiem = input;3129});3130addParseToken(['h', 'hh'], function (input, array, config) {3131array[HOUR] = toInt(input);3132getParsingFlags(config).bigHour = true;3133});3134addParseToken('hmm', function (input, array, config) {3135var pos = input.length - 2;3136array[HOUR] = toInt(input.substr(0, pos));3137array[MINUTE] = toInt(input.substr(pos));3138getParsingFlags(config).bigHour = true;3139});3140addParseToken('hmmss', function (input, array, config) {3141var pos1 = input.length - 4;3142var pos2 = input.length - 2;3143array[HOUR] = toInt(input.substr(0, pos1));3144array[MINUTE] = toInt(input.substr(pos1, 2));3145array[SECOND] = toInt(input.substr(pos2));3146getParsingFlags(config).bigHour = true;3147});3148addParseToken('Hmm', function (input, array, config) {3149var pos = input.length - 2;3150array[HOUR] = toInt(input.substr(0, pos));3151array[MINUTE] = toInt(input.substr(pos));3152});3153addParseToken('Hmmss', function (input, array, config) {3154var pos1 = input.length - 4;3155var pos2 = input.length - 2;3156array[HOUR] = toInt(input.substr(0, pos1));3157array[MINUTE] = toInt(input.substr(pos1, 2));3158array[SECOND] = toInt(input.substr(pos2));3159});31603161// LOCALES31623163function localeIsPM (input) {3164// IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays3165// Using charAt should be more compatible.3166return ((input + '').toLowerCase().charAt(0) === 'p');3167}31683169var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i;3170function localeMeridiem (hours, minutes, isLower) {3171if (hours > 11) {3172return isLower ? 'pm' : 'PM';3173} else {3174return isLower ? 'am' : 'AM';3175}3176}317731783179// MOMENTS31803181// Setting the hour should keep the time, because the user explicitly3182// specified which hour he wants. So trying to maintain the same hour (in3183// a new timezone) makes sense. Adding/subtracting hours does not follow3184// this rule.3185var getSetHour = makeGetSet('Hours', true);31863187// FORMATTING31883189addFormatToken('m', ['mm', 2], 0, 'minute');31903191// ALIASES31923193addUnitAlias('minute', 'm');31943195// PARSING31963197addRegexToken('m', match1to2);3198addRegexToken('mm', match1to2, match2);3199addParseToken(['m', 'mm'], MINUTE);32003201// MOMENTS32023203var getSetMinute = makeGetSet('Minutes', false);32043205// FORMATTING32063207addFormatToken('s', ['ss', 2], 0, 'second');32083209// ALIASES32103211addUnitAlias('second', 's');32123213// PARSING32143215addRegexToken('s', match1to2);3216addRegexToken('ss', match1to2, match2);3217addParseToken(['s', 'ss'], SECOND);32183219// MOMENTS32203221var getSetSecond = makeGetSet('Seconds', false);32223223// FORMATTING32243225addFormatToken('S', 0, 0, function () {3226return ~~(this.millisecond() / 100);3227});32283229addFormatToken(0, ['SS', 2], 0, function () {3230return ~~(this.millisecond() / 10);3231});32323233addFormatToken(0, ['SSS', 3], 0, 'millisecond');3234addFormatToken(0, ['SSSS', 4], 0, function () {3235return this.millisecond() * 10;3236});3237addFormatToken(0, ['SSSSS', 5], 0, function () {3238return this.millisecond() * 100;3239});3240addFormatToken(0, ['SSSSSS', 6], 0, function () {3241return this.millisecond() * 1000;3242});3243addFormatToken(0, ['SSSSSSS', 7], 0, function () {3244return this.millisecond() * 10000;3245});3246addFormatToken(0, ['SSSSSSSS', 8], 0, function () {3247return this.millisecond() * 100000;3248});3249addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {3250return this.millisecond() * 1000000;3251});325232533254// ALIASES32553256addUnitAlias('millisecond', 'ms');32573258// PARSING32593260addRegexToken('S', match1to3, match1);3261addRegexToken('SS', match1to3, match2);3262addRegexToken('SSS', match1to3, match3);32633264var token;3265for (token = 'SSSS'; token.length <= 9; token += 'S') {3266addRegexToken(token, matchUnsigned);3267}32683269function parseMs(input, array) {3270array[MILLISECOND] = toInt(('0.' + input) * 1000);3271}32723273for (token = 'S'; token.length <= 9; token += 'S') {3274addParseToken(token, parseMs);3275}3276// MOMENTS32773278var getSetMillisecond = makeGetSet('Milliseconds', false);32793280// FORMATTING32813282addFormatToken('z', 0, 0, 'zoneAbbr');3283addFormatToken('zz', 0, 0, 'zoneName');32843285// MOMENTS32863287function getZoneAbbr () {3288return this._isUTC ? 'UTC' : '';3289}32903291function getZoneName () {3292return this._isUTC ? 'Coordinated Universal Time' : '';3293}32943295var momentPrototype__proto = Moment.prototype;32963297momentPrototype__proto.add = add_subtract__add;3298momentPrototype__proto.calendar = moment_calendar__calendar;3299momentPrototype__proto.clone = clone;3300momentPrototype__proto.diff = diff;3301momentPrototype__proto.endOf = endOf;3302momentPrototype__proto.format = format;3303momentPrototype__proto.from = from;3304momentPrototype__proto.fromNow = fromNow;3305momentPrototype__proto.to = to;3306momentPrototype__proto.toNow = toNow;3307momentPrototype__proto.get = getSet;3308momentPrototype__proto.invalidAt = invalidAt;3309momentPrototype__proto.isAfter = isAfter;3310momentPrototype__proto.isBefore = isBefore;3311momentPrototype__proto.isBetween = isBetween;3312momentPrototype__proto.isSame = isSame;3313momentPrototype__proto.isSameOrAfter = isSameOrAfter;3314momentPrototype__proto.isSameOrBefore = isSameOrBefore;3315momentPrototype__proto.isValid = moment_valid__isValid;3316momentPrototype__proto.lang = lang;3317momentPrototype__proto.locale = locale;3318momentPrototype__proto.localeData = localeData;3319momentPrototype__proto.max = prototypeMax;3320momentPrototype__proto.min = prototypeMin;3321momentPrototype__proto.parsingFlags = parsingFlags;3322momentPrototype__proto.set = getSet;3323momentPrototype__proto.startOf = startOf;3324momentPrototype__proto.subtract = add_subtract__subtract;3325momentPrototype__proto.toArray = toArray;3326momentPrototype__proto.toObject = toObject;3327momentPrototype__proto.toDate = toDate;3328momentPrototype__proto.toISOString = moment_format__toISOString;3329momentPrototype__proto.toJSON = toJSON;3330momentPrototype__proto.toString = toString;3331momentPrototype__proto.unix = unix;3332momentPrototype__proto.valueOf = to_type__valueOf;3333momentPrototype__proto.creationData = creationData;33343335// Year3336momentPrototype__proto.year = getSetYear;3337momentPrototype__proto.isLeapYear = getIsLeapYear;33383339// Week Year3340momentPrototype__proto.weekYear = getSetWeekYear;3341momentPrototype__proto.isoWeekYear = getSetISOWeekYear;33423343// Quarter3344momentPrototype__proto.quarter = momentPrototype__proto.quarters = getSetQuarter;33453346// Month3347momentPrototype__proto.month = getSetMonth;3348momentPrototype__proto.daysInMonth = getDaysInMonth;33493350// Week3351momentPrototype__proto.week = momentPrototype__proto.weeks = getSetWeek;3352momentPrototype__proto.isoWeek = momentPrototype__proto.isoWeeks = getSetISOWeek;3353momentPrototype__proto.weeksInYear = getWeeksInYear;3354momentPrototype__proto.isoWeeksInYear = getISOWeeksInYear;33553356// Day3357momentPrototype__proto.date = getSetDayOfMonth;3358momentPrototype__proto.day = momentPrototype__proto.days = getSetDayOfWeek;3359momentPrototype__proto.weekday = getSetLocaleDayOfWeek;3360momentPrototype__proto.isoWeekday = getSetISODayOfWeek;3361momentPrototype__proto.dayOfYear = getSetDayOfYear;33623363// Hour3364momentPrototype__proto.hour = momentPrototype__proto.hours = getSetHour;33653366// Minute3367momentPrototype__proto.minute = momentPrototype__proto.minutes = getSetMinute;33683369// Second3370momentPrototype__proto.second = momentPrototype__proto.seconds = getSetSecond;33713372// Millisecond3373momentPrototype__proto.millisecond = momentPrototype__proto.milliseconds = getSetMillisecond;33743375// Offset3376momentPrototype__proto.utcOffset = getSetOffset;3377momentPrototype__proto.utc = setOffsetToUTC;3378momentPrototype__proto.local = setOffsetToLocal;3379momentPrototype__proto.parseZone = setOffsetToParsedOffset;3380momentPrototype__proto.hasAlignedHourOffset = hasAlignedHourOffset;3381momentPrototype__proto.isDST = isDaylightSavingTime;3382momentPrototype__proto.isDSTShifted = isDaylightSavingTimeShifted;3383momentPrototype__proto.isLocal = isLocal;3384momentPrototype__proto.isUtcOffset = isUtcOffset;3385momentPrototype__proto.isUtc = isUtc;3386momentPrototype__proto.isUTC = isUtc;33873388// Timezone3389momentPrototype__proto.zoneAbbr = getZoneAbbr;3390momentPrototype__proto.zoneName = getZoneName;33913392// Deprecations3393momentPrototype__proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);3394momentPrototype__proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);3395momentPrototype__proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);3396momentPrototype__proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779', getSetZone);33973398var momentPrototype = momentPrototype__proto;33993400function moment__createUnix (input) {3401return local__createLocal(input * 1000);3402}34033404function moment__createInZone () {3405return local__createLocal.apply(null, arguments).parseZone();3406}34073408var defaultCalendar = {3409sameDay : '[Today at] LT',3410nextDay : '[Tomorrow at] LT',3411nextWeek : 'dddd [at] LT',3412lastDay : '[Yesterday at] LT',3413lastWeek : '[Last] dddd [at] LT',3414sameElse : 'L'3415};34163417function locale_calendar__calendar (key, mom, now) {3418var output = this._calendar[key];3419return isFunction(output) ? output.call(mom, now) : output;3420}34213422var defaultLongDateFormat = {3423LTS : 'h:mm:ss A',3424LT : 'h:mm A',3425L : 'MM/DD/YYYY',3426LL : 'MMMM D, YYYY',3427LLL : 'MMMM D, YYYY h:mm A',3428LLLL : 'dddd, MMMM D, YYYY h:mm A'3429};34303431function longDateFormat (key) {3432var format = this._longDateFormat[key],3433formatUpper = this._longDateFormat[key.toUpperCase()];34343435if (format || !formatUpper) {3436return format;3437}34383439this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {3440return val.slice(1);3441});34423443return this._longDateFormat[key];3444}34453446var defaultInvalidDate = 'Invalid date';34473448function invalidDate () {3449return this._invalidDate;3450}34513452var defaultOrdinal = '%d';3453var defaultOrdinalParse = /\d{1,2}/;34543455function ordinal (number) {3456return this._ordinal.replace('%d', number);3457}34583459function preParsePostFormat (string) {3460return string;3461}34623463var defaultRelativeTime = {3464future : 'in %s',3465past : '%s ago',3466s : 'a few seconds',3467m : 'a minute',3468mm : '%d minutes',3469h : 'an hour',3470hh : '%d hours',3471d : 'a day',3472dd : '%d days',3473M : 'a month',3474MM : '%d months',3475y : 'a year',3476yy : '%d years'3477};34783479function relative__relativeTime (number, withoutSuffix, string, isFuture) {3480var output = this._relativeTime[string];3481return (isFunction(output)) ?3482output(number, withoutSuffix, string, isFuture) :3483output.replace(/%d/i, number);3484}34853486function pastFuture (diff, output) {3487var format = this._relativeTime[diff > 0 ? 'future' : 'past'];3488return isFunction(format) ? format(output) : format.replace(/%s/i, output);3489}34903491var prototype__proto = Locale.prototype;34923493prototype__proto._calendar = defaultCalendar;3494prototype__proto.calendar = locale_calendar__calendar;3495prototype__proto._longDateFormat = defaultLongDateFormat;3496prototype__proto.longDateFormat = longDateFormat;3497prototype__proto._invalidDate = defaultInvalidDate;3498prototype__proto.invalidDate = invalidDate;3499prototype__proto._ordinal = defaultOrdinal;3500prototype__proto.ordinal = ordinal;3501prototype__proto._ordinalParse = defaultOrdinalParse;3502prototype__proto.preparse = preParsePostFormat;3503prototype__proto.postformat = preParsePostFormat;3504prototype__proto._relativeTime = defaultRelativeTime;3505prototype__proto.relativeTime = relative__relativeTime;3506prototype__proto.pastFuture = pastFuture;3507prototype__proto.set = locale_set__set;35083509// Month3510prototype__proto.months = localeMonths;3511prototype__proto._months = defaultLocaleMonths;3512prototype__proto.monthsShort = localeMonthsShort;3513prototype__proto._monthsShort = defaultLocaleMonthsShort;3514prototype__proto.monthsParse = localeMonthsParse;3515prototype__proto._monthsRegex = defaultMonthsRegex;3516prototype__proto.monthsRegex = monthsRegex;3517prototype__proto._monthsShortRegex = defaultMonthsShortRegex;3518prototype__proto.monthsShortRegex = monthsShortRegex;35193520// Week3521prototype__proto.week = localeWeek;3522prototype__proto._week = defaultLocaleWeek;3523prototype__proto.firstDayOfYear = localeFirstDayOfYear;3524prototype__proto.firstDayOfWeek = localeFirstDayOfWeek;35253526// Day of Week3527prototype__proto.weekdays = localeWeekdays;3528prototype__proto._weekdays = defaultLocaleWeekdays;3529prototype__proto.weekdaysMin = localeWeekdaysMin;3530prototype__proto._weekdaysMin = defaultLocaleWeekdaysMin;3531prototype__proto.weekdaysShort = localeWeekdaysShort;3532prototype__proto._weekdaysShort = defaultLocaleWeekdaysShort;3533prototype__proto.weekdaysParse = localeWeekdaysParse;35343535prototype__proto._weekdaysRegex = defaultWeekdaysRegex;3536prototype__proto.weekdaysRegex = weekdaysRegex;3537prototype__proto._weekdaysShortRegex = defaultWeekdaysShortRegex;3538prototype__proto.weekdaysShortRegex = weekdaysShortRegex;3539prototype__proto._weekdaysMinRegex = defaultWeekdaysMinRegex;3540prototype__proto.weekdaysMinRegex = weekdaysMinRegex;35413542// Hours3543prototype__proto.isPM = localeIsPM;3544prototype__proto._meridiemParse = defaultLocaleMeridiemParse;3545prototype__proto.meridiem = localeMeridiem;35463547function lists__get (format, index, field, setter) {3548var locale = locale_locales__getLocale();3549var utc = create_utc__createUTC().set(setter, index);3550return locale[field](utc, format);3551}35523553function listMonthsImpl (format, index, field) {3554if (typeof format === 'number') {3555index = format;3556format = undefined;3557}35583559format = format || '';35603561if (index != null) {3562return lists__get(format, index, field, 'month');3563}35643565var i;3566var out = [];3567for (i = 0; i < 12; i++) {3568out[i] = lists__get(format, i, field, 'month');3569}3570return out;3571}35723573// ()3574// (5)3575// (fmt, 5)3576// (fmt)3577// (true)3578// (true, 5)3579// (true, fmt, 5)3580// (true, fmt)3581function listWeekdaysImpl (localeSorted, format, index, field) {3582if (typeof localeSorted === 'boolean') {3583if (typeof format === 'number') {3584index = format;3585format = undefined;3586}35873588format = format || '';3589} else {3590format = localeSorted;3591index = format;3592localeSorted = false;35933594if (typeof format === 'number') {3595index = format;3596format = undefined;3597}35983599format = format || '';3600}36013602var locale = locale_locales__getLocale(),3603shift = localeSorted ? locale._week.dow : 0;36043605if (index != null) {3606return lists__get(format, (index + shift) % 7, field, 'day');3607}36083609var i;3610var out = [];3611for (i = 0; i < 7; i++) {3612out[i] = lists__get(format, (i + shift) % 7, field, 'day');3613}3614return out;3615}36163617function lists__listMonths (format, index) {3618return listMonthsImpl(format, index, 'months');3619}36203621function lists__listMonthsShort (format, index) {3622return listMonthsImpl(format, index, 'monthsShort');3623}36243625function lists__listWeekdays (localeSorted, format, index) {3626return listWeekdaysImpl(localeSorted, format, index, 'weekdays');3627}36283629function lists__listWeekdaysShort (localeSorted, format, index) {3630return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');3631}36323633function lists__listWeekdaysMin (localeSorted, format, index) {3634return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');3635}36363637locale_locales__getSetGlobalLocale('en', {3638ordinalParse: /\d{1,2}(th|st|nd|rd)/,3639ordinal : function (number) {3640var b = number % 10,3641output = (toInt(number % 100 / 10) === 1) ? 'th' :3642(b === 1) ? 'st' :3643(b === 2) ? 'nd' :3644(b === 3) ? 'rd' : 'th';3645return number + output;3646}3647});36483649// Side effect imports3650utils_hooks__hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', locale_locales__getSetGlobalLocale);3651utils_hooks__hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', locale_locales__getLocale);36523653var mathAbs = Math.abs;36543655function duration_abs__abs () {3656var data = this._data;36573658this._milliseconds = mathAbs(this._milliseconds);3659this._days = mathAbs(this._days);3660this._months = mathAbs(this._months);36613662data.milliseconds = mathAbs(data.milliseconds);3663data.seconds = mathAbs(data.seconds);3664data.minutes = mathAbs(data.minutes);3665data.hours = mathAbs(data.hours);3666data.months = mathAbs(data.months);3667data.years = mathAbs(data.years);36683669return this;3670}36713672function duration_add_subtract__addSubtract (duration, input, value, direction) {3673var other = create__createDuration(input, value);36743675duration._milliseconds += direction * other._milliseconds;3676duration._days += direction * other._days;3677duration._months += direction * other._months;36783679return duration._bubble();3680}36813682// supports only 2.0-style add(1, 's') or add(duration)3683function duration_add_subtract__add (input, value) {3684return duration_add_subtract__addSubtract(this, input, value, 1);3685}36863687// supports only 2.0-style subtract(1, 's') or subtract(duration)3688function duration_add_subtract__subtract (input, value) {3689return duration_add_subtract__addSubtract(this, input, value, -1);3690}36913692function absCeil (number) {3693if (number < 0) {3694return Math.floor(number);3695} else {3696return Math.ceil(number);3697}3698}36993700function bubble () {3701var milliseconds = this._milliseconds;3702var days = this._days;3703var months = this._months;3704var data = this._data;3705var seconds, minutes, hours, years, monthsFromDays;37063707// if we have a mix of positive and negative values, bubble down first3708// check: https://github.com/moment/moment/issues/21663709if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||3710(milliseconds <= 0 && days <= 0 && months <= 0))) {3711milliseconds += absCeil(monthsToDays(months) + days) * 864e5;3712days = 0;3713months = 0;3714}37153716// The following code bubbles up values, see the tests for3717// examples of what that means.3718data.milliseconds = milliseconds % 1000;37193720seconds = absFloor(milliseconds / 1000);3721data.seconds = seconds % 60;37223723minutes = absFloor(seconds / 60);3724data.minutes = minutes % 60;37253726hours = absFloor(minutes / 60);3727data.hours = hours % 24;37283729days += absFloor(hours / 24);37303731// convert days to months3732monthsFromDays = absFloor(daysToMonths(days));3733months += monthsFromDays;3734days -= absCeil(monthsToDays(monthsFromDays));37353736// 12 months -> 1 year3737years = absFloor(months / 12);3738months %= 12;37393740data.days = days;3741data.months = months;3742data.years = years;37433744return this;3745}37463747function daysToMonths (days) {3748// 400 years have 146097 days (taking into account leap year rules)3749// 400 years have 12 months === 48003750return days * 4800 / 146097;3751}37523753function monthsToDays (months) {3754// the reverse of daysToMonths3755return months * 146097 / 4800;3756}37573758function as (units) {3759var days;3760var months;3761var milliseconds = this._milliseconds;37623763units = normalizeUnits(units);37643765if (units === 'month' || units === 'year') {3766days = this._days + milliseconds / 864e5;3767months = this._months + daysToMonths(days);3768return units === 'month' ? months : months / 12;3769} else {3770// handle milliseconds separately because of floating point math errors (issue #1867)3771days = this._days + Math.round(monthsToDays(this._months));3772switch (units) {3773case 'week' : return days / 7 + milliseconds / 6048e5;3774case 'day' : return days + milliseconds / 864e5;3775case 'hour' : return days * 24 + milliseconds / 36e5;3776case 'minute' : return days * 1440 + milliseconds / 6e4;3777case 'second' : return days * 86400 + milliseconds / 1000;3778// Math.floor prevents floating point math errors here3779case 'millisecond': return Math.floor(days * 864e5) + milliseconds;3780default: throw new Error('Unknown unit ' + units);3781}3782}3783}37843785// TODO: Use this.as('ms')?3786function duration_as__valueOf () {3787return (3788this._milliseconds +3789this._days * 864e5 +3790(this._months % 12) * 2592e6 +3791toInt(this._months / 12) * 31536e63792);3793}37943795function makeAs (alias) {3796return function () {3797return this.as(alias);3798};3799}38003801var asMilliseconds = makeAs('ms');3802var asSeconds = makeAs('s');3803var asMinutes = makeAs('m');3804var asHours = makeAs('h');3805var asDays = makeAs('d');3806var asWeeks = makeAs('w');3807var asMonths = makeAs('M');3808var asYears = makeAs('y');38093810function duration_get__get (units) {3811units = normalizeUnits(units);3812return this[units + 's']();3813}38143815function makeGetter(name) {3816return function () {3817return this._data[name];3818};3819}38203821var milliseconds = makeGetter('milliseconds');3822var seconds = makeGetter('seconds');3823var minutes = makeGetter('minutes');3824var hours = makeGetter('hours');3825var days = makeGetter('days');3826var months = makeGetter('months');3827var years = makeGetter('years');38283829function weeks () {3830return absFloor(this.days() / 7);3831}38323833var round = Math.round;3834var thresholds = {3835s: 45, // seconds to minute3836m: 45, // minutes to hour3837h: 22, // hours to day3838d: 26, // days to month3839M: 11 // months to year3840};38413842// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize3843function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {3844return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);3845}38463847function duration_humanize__relativeTime (posNegDuration, withoutSuffix, locale) {3848var duration = create__createDuration(posNegDuration).abs();3849var seconds = round(duration.as('s'));3850var minutes = round(duration.as('m'));3851var hours = round(duration.as('h'));3852var days = round(duration.as('d'));3853var months = round(duration.as('M'));3854var years = round(duration.as('y'));38553856var a = seconds < thresholds.s && ['s', seconds] ||3857minutes <= 1 && ['m'] ||3858minutes < thresholds.m && ['mm', minutes] ||3859hours <= 1 && ['h'] ||3860hours < thresholds.h && ['hh', hours] ||3861days <= 1 && ['d'] ||3862days < thresholds.d && ['dd', days] ||3863months <= 1 && ['M'] ||3864months < thresholds.M && ['MM', months] ||3865years <= 1 && ['y'] || ['yy', years];38663867a[2] = withoutSuffix;3868a[3] = +posNegDuration > 0;3869a[4] = locale;3870return substituteTimeAgo.apply(null, a);3871}38723873// This function allows you to set a threshold for relative time strings3874function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {3875if (thresholds[threshold] === undefined) {3876return false;3877}3878if (limit === undefined) {3879return thresholds[threshold];3880}3881thresholds[threshold] = limit;3882return true;3883}38843885function humanize (withSuffix) {3886var locale = this.localeData();3887var output = duration_humanize__relativeTime(this, !withSuffix, locale);38883889if (withSuffix) {3890output = locale.pastFuture(+this, output);3891}38923893return locale.postformat(output);3894}38953896var iso_string__abs = Math.abs;38973898function iso_string__toISOString() {3899// for ISO strings we do not use the normal bubbling rules:3900// * milliseconds bubble up until they become hours3901// * days do not bubble at all3902// * months bubble up until they become years3903// This is because there is no context-free conversion between hours and days3904// (think of clock changes)3905// and also not between days and months (28-31 days per month)3906var seconds = iso_string__abs(this._milliseconds) / 1000;3907var days = iso_string__abs(this._days);3908var months = iso_string__abs(this._months);3909var minutes, hours, years;39103911// 3600 seconds -> 60 minutes -> 1 hour3912minutes = absFloor(seconds / 60);3913hours = absFloor(minutes / 60);3914seconds %= 60;3915minutes %= 60;39163917// 12 months -> 1 year3918years = absFloor(months / 12);3919months %= 12;392039213922// inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js3923var Y = years;3924var M = months;3925var D = days;3926var h = hours;3927var m = minutes;3928var s = seconds;3929var total = this.asSeconds();39303931if (!total) {3932// this is the same as C#'s (Noda) and python (isodate)...3933// but not other JS (goog.date)3934return 'P0D';3935}39363937return (total < 0 ? '-' : '') +3938'P' +3939(Y ? Y + 'Y' : '') +3940(M ? M + 'M' : '') +3941(D ? D + 'D' : '') +3942((h || m || s) ? 'T' : '') +3943(h ? h + 'H' : '') +3944(m ? m + 'M' : '') +3945(s ? s + 'S' : '');3946}39473948var duration_prototype__proto = Duration.prototype;39493950duration_prototype__proto.abs = duration_abs__abs;3951duration_prototype__proto.add = duration_add_subtract__add;3952duration_prototype__proto.subtract = duration_add_subtract__subtract;3953duration_prototype__proto.as = as;3954duration_prototype__proto.asMilliseconds = asMilliseconds;3955duration_prototype__proto.asSeconds = asSeconds;3956duration_prototype__proto.asMinutes = asMinutes;3957duration_prototype__proto.asHours = asHours;3958duration_prototype__proto.asDays = asDays;3959duration_prototype__proto.asWeeks = asWeeks;3960duration_prototype__proto.asMonths = asMonths;3961duration_prototype__proto.asYears = asYears;3962duration_prototype__proto.valueOf = duration_as__valueOf;3963duration_prototype__proto._bubble = bubble;3964duration_prototype__proto.get = duration_get__get;3965duration_prototype__proto.milliseconds = milliseconds;3966duration_prototype__proto.seconds = seconds;3967duration_prototype__proto.minutes = minutes;3968duration_prototype__proto.hours = hours;3969duration_prototype__proto.days = days;3970duration_prototype__proto.weeks = weeks;3971duration_prototype__proto.months = months;3972duration_prototype__proto.years = years;3973duration_prototype__proto.humanize = humanize;3974duration_prototype__proto.toISOString = iso_string__toISOString;3975duration_prototype__proto.toString = iso_string__toISOString;3976duration_prototype__proto.toJSON = iso_string__toISOString;3977duration_prototype__proto.locale = locale;3978duration_prototype__proto.localeData = localeData;39793980// Deprecations3981duration_prototype__proto.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', iso_string__toISOString);3982duration_prototype__proto.lang = lang;39833984// Side effect imports39853986// FORMATTING39873988addFormatToken('X', 0, 0, 'unix');3989addFormatToken('x', 0, 0, 'valueOf');39903991// PARSING39923993addRegexToken('x', matchSigned);3994addRegexToken('X', matchTimestamp);3995addParseToken('X', function (input, array, config) {3996config._d = new Date(parseFloat(input, 10) * 1000);3997});3998addParseToken('x', function (input, array, config) {3999config._d = new Date(toInt(input));4000});40014002// Side effect imports400340044005utils_hooks__hooks.version = '2.13.0';40064007setHookCallback(local__createLocal);40084009utils_hooks__hooks.fn = momentPrototype;4010utils_hooks__hooks.min = min;4011utils_hooks__hooks.max = max;4012utils_hooks__hooks.now = now;4013utils_hooks__hooks.utc = create_utc__createUTC;4014utils_hooks__hooks.unix = moment__createUnix;4015utils_hooks__hooks.months = lists__listMonths;4016utils_hooks__hooks.isDate = isDate;4017utils_hooks__hooks.locale = locale_locales__getSetGlobalLocale;4018utils_hooks__hooks.invalid = valid__createInvalid;4019utils_hooks__hooks.duration = create__createDuration;4020utils_hooks__hooks.isMoment = isMoment;4021utils_hooks__hooks.weekdays = lists__listWeekdays;4022utils_hooks__hooks.parseZone = moment__createInZone;4023utils_hooks__hooks.localeData = locale_locales__getLocale;4024utils_hooks__hooks.isDuration = isDuration;4025utils_hooks__hooks.monthsShort = lists__listMonthsShort;4026utils_hooks__hooks.weekdaysMin = lists__listWeekdaysMin;4027utils_hooks__hooks.defineLocale = defineLocale;4028utils_hooks__hooks.updateLocale = updateLocale;4029utils_hooks__hooks.locales = locale_locales__listLocales;4030utils_hooks__hooks.weekdaysShort = lists__listWeekdaysShort;4031utils_hooks__hooks.normalizeUnits = normalizeUnits;4032utils_hooks__hooks.relativeTimeThreshold = duration_humanize__getSetRelativeTimeThreshold;4033utils_hooks__hooks.prototype = momentPrototype;40344035var _moment = utils_hooks__hooks;40364037return _moment;40384039}));40404041