forked from wanasit/chrono
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchrono.map.json
1 lines (1 loc) · 307 KB
/
chrono.map.json
1
{"version":3,"sources":["node_modules/browserify/node_modules/browser-pack/_prelude.js","src/chrono.js","src/options.js","src/parsers/parser.js","src/refiners/refiner.js","src/result.js","src/parsers/EN/ENISOFormatParser.js","src/parsers/EN/ENDeadlineFormatParser.js","src/parsers/EN/ENMonthNameLittleEndianParser.js","src/parsers/EN/ENMonthNameMiddleEndianParser.js","src/parsers/EN/ENMonthNameParser.js","src/parsers/EN/ENSlashDateFormatParser.js","src/parsers/EN/ENSlashDateFormatStartWithYearParser.js","src/parsers/EN/ENSlashMonthFormatParser.js","src/parsers/EN/ENTimeAgoFormatParser.js","src/parsers/EN/ENTimeExpressionParser.js","src/parsers/EN/ENWeekdayParser.js","src/parsers/EN/ENCasualDateParser.js","src/parsers/JP/JPStandardParser.js","src/parsers/JP/JPCasualDateParser.js","src/parsers/ES/ESCasualDateParser.js","src/parsers/ES/ESDeadlineFormatParser.js","src/parsers/ES/ESTimeAgoFormatParser.js","src/parsers/ES/ESTimeExpressionParser.js","src/parsers/ES/ESMonthNameLittleEndianParser.js","src/parsers/ES/ESWeekdayParser.js","src/parsers/ES/ESSlashDateFormatParser.js","src/refiners/OverlapRemovalRefiner.js","src/refiners/ExtractTimezoneOffsetRefiner.js","src/refiners/ExtractTimezoneAbbrRefiner.js","src/refiners/UnlikelyFormatFilter.js","src/refiners/EN/ENMergeDateTimeRefiner.js","src/refiners/EN/ENMergeDateRangeRefiner.js","src/refiners/JP/JPMergeDateRangeRefiner.js","src/utils/EN.js","src/utils/JP.js","src/utils/ES.js","node_modules/moment/moment.js"],"names":["options","exports","require","parser","refiner","Parser","Refiner","Filter","ParsedResult","ParsedComponents","Chrono","option","casualOption","this","parsers","Object","refiners","prototype","parse","text","refDate","opt","Date","allResults","forEach","results","execute","concat","sort","a","b","index","refine","parseDate","length","start","date","strict","strictOption","casual","apply","arguments","baseOption","strictMode","ENISOFormatParser","ENDeadlineFormatParser","ENMonthNameLittleEndianParser","ENMonthNameMiddleEndianParser","ENMonthNameParser","ENSlashDateFormatParser","ENSlashDateFormatStartWithYearParser","ENSlashMonthFormatParser","ENTimeAgoFormatParser","ENTimeExpressionParser","JPStandardParser","ESTimeAgoFormatParser","ESDeadlineFormatParser","ESTimeExpressionParser","ESMonthNameLittleEndianParser","ESSlashDateFormatParser","OverlapRemovalRefiner","ENMergeDateTimeRefiner","ENMergeDateRangeRefiner","JPMergeDateRangeRefiner","ExtractTimezoneOffsetRefiner","ExtractTimezoneAbbrRefiner","UnlikelyFormatFilter","unshift","ENCasualDateParser","ENWeekdayParser","JPCasualDateParser","ESCasualDateParser","ESWeekdayParser","isStrictMode","pattern","extract","ref","match","regex","remainingText","exec","result","substring","hasPossibleDates","push","call","isValid","filteredResult","i","tags","end","components","knownValues","impliedValues","key","moment","imply","month","year","clone","JSON","stringify","isPossibleDate","component","get","value","assign","isCertain","dateMoment","toDate","set","currentTimezoneOffset","utcOffset","targetTimezoneOffset","adjustTimezoneOffset","add","PATTERN","RegExp","YEAR_NUMBER_GROUP","MONTH_NUMBER_GROUP","DATE_NUMBER_GROUP","HOUR_NUMBER_GROUP","MINUTE_NUMBER_GROUP","SECOND_NUMBER_GROUP","MILLISECOND_NUMBER_GROUP","TZD_HOUR_OFFSET_GROUP","TZD_MINUTE_OFFSET_GROUP","substr","parseInt","minuteOffset","hourOffset","offset","util","INTEGER_WORDS_PATTERN","STRICT_PATTERN","num","toLowerCase","undefined","INTEGER_WORDS","hour","minute","second","WEEKDAY_GROUP","DATE_GROUP","DATE_TO_GROUP","MONTH_NAME_GROUP","YEAR_GROUP","YEAR_BE_GROUP","MONTH_OFFSET","day","refMoment","nextYear","lastYear","Math","abs","diff","weekday","WEEKDAY_OFFSET","indexOf","console","log","DAYS_OFFSET","sunday","sun","monday","mon","tuesday","wednesday","wed","thursday","thur","friday","fri","saturday","sat","OPENNING_GROUP","ENDING_GROUP","MONTH_GROUP","DAY_GROUP","argument","tday","trim","FIRST_REG_PATTERN","SECOND_REG_PATTERN","HOUR_GROUP","MINUTE_GROUP","SECOND_GROUP","AM_PM_HOUR_GROUP","meridiem","ampm","startAtPM","getTime","tues","tue","thurs","thu","keys","join","PREFIX_GROUP","POSTFIX_GROUP","dayOfWeek","startMoment","prefix","postfix","norm","refOffset","forwardDatesOnly","lowerText","secondMatch","millisecond","ERA_GROUP","toHankaku","replace","firstMatch","isNaN","domingo","dom","lunes","lun","martes","mar","miercoles","miércoles","mie","jueves","jue","viernes","vier","sabado","sábado","sab","filteredResults","prevResult","TIMEZONE_OFFSET_PATTERN","TIMEZONE_OFFSET_SIGN_GROUP","TIMEZONE_OFFSET_HOUR_OFFSET_GROUP","TIMEZONE_OFFSET_MINUTE_OFFSET_GROUP","timezoneOffset","TIMEZONE_ABBR_MAP","TIMEZONE_NAME_PATTERN","timezoneAbbr","toUpperCase","ACDT","ACST","ADT","AEDT","AEST","AFT","AKDT","AKST","ALMT","AMST","AMT","ANAST","ANAT","AQTT","ART","AST","AWDT","AWST","AZOST","AZOT","AZST","AZT","BNT","BOT","BRST","BRT","BST","BTT","CAST","CAT","CCT","CDT","CEST","CET","CHADT","CHAST","CKT","CLST","CLT","COT","CST","CVT","CXT","ChST","DAVT","EASST","EAST","EAT","ECT","EDT","EEST","EET","EGST","EGT","EST","ET","FJST","FJT","FKST","FKT","FNT","GALT","GAMT","GET","GFT","GILT","GMT","GST","GYT","HAA","HAC","HADT","HAE","HAP","HAR","HAST","HAT","HAY","HKT","HLV","HNA","HNC","HNE","HNP","HNR","HNT","HNY","HOVT","ICT","IDT","IOT","IRDT","IRKST","IRKT","IRST","IST","JST","KGT","KRAST","KRAT","KST","KUYT","LHDT","LHST","LINT","MAGST","MAGT","MART","MAWT","MDT","MESZ","MEZ","MHT","MMT","MSD","MSK","MST","MUT","MVT","MYT","NCT","NDT","NFT","NOVST","NOVT","NPT","NST","NUT","NZDT","NZST","OMSST","OMST","PDT","PET","PETST","PETT","PGT","PHOT","PHT","PKT","PMDT","PMST","PONT","PST","PT","PWT","PYST","PYT","RET","SAMT","SAST","SBT","SCT","SGT","SRT","SST","TAHT","TFT","TJT","TKT","TLT","TMT","TVT","ULAT","UTC","UYST","UYT","UZT","VET","VLAST","VLAT","VUT","WAST","WAT","WEST","WESZ","WET","WEZ","WFT","WGST","WGT","WIB","WIT","WITA","WST","WT","YAKST","YAKT","YAPT","YEKST","YEKT","isDateOnly","isTimeOnly","isAbleToMerge","curResult","textBetween","mergeResult","dateResult","timeResult","beginDate","beginTime","beginDateTime","endDate","endTime","endDateTime","startIndex","min","endIndex","max","tag","mergedResult","currResult","result1","result2","begin","isWeekdayResult","fromResult","toResult","tmp","constructor","name","january","jan","jan.","february","feb","feb.","march","mar.","april","apr","apr.","may","june","jun","jun.","july","jul","jul.","august","aug","aug.","september","sep","sep.","sept","sept.","october","oct","oct.","november","nov","nov.","december","dec","dec.","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","String","fromCharCode","string","alphaNum","token","charCodeAt","toZenkaku","vie","enero","ene","ene.","febrero","marzo","abril","abr","abr.","mayo","may.","junio","julio","agosto","ago","ago.","septiembre","octubre","noviembre","diciembre","dic","dic.","global","factory","module","define","amd","utils_hooks__hooks","hookCallback","setHookCallback","callback","isArray","input","toString","isDate","map","arr","fn","res","hasOwnProp","hasOwnProperty","extend","valueOf","create_utc__createUTC","format","locale","createLocalOrUTC","utc","defaultParsingFlags","empty","unusedTokens","unusedInput","overflow","charsLeftOver","nullInput","invalidMonth","invalidFormat","userInvalidated","iso","getParsingFlags","m","_pf","valid__isValid","_isValid","flags","_d","_strict","bigHour","valid__createInvalid","NaN","copyConfig","to","from","prop","val","_isAMomentObject","_i","_f","_l","_tzm","_isUTC","_offset","_locale","momentProperties","Moment","config","updateInProgress","updateOffset","isMoment","obj","toInt","argumentForCoercion","coercedNumber","isFinite","floor","ceil","compareArrays","array1","array2","dontConvert","len","lengthDiff","diffs","Locale","normalizeLocale","chooseLocale","names","j","next","split","loadLocale","slice","oldLocale","locales","globalLocale","_abbr","locale_locales__getSetGlobalLocale","e","values","data","locale_locales__getLocale","defineLocale","abbr","addUnitAlias","unit","shorthand","lowerCase","aliases","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedProp","normalizedInput","makeGetSet","keepTime","get_set__set","get_set__get","mom","getSet","zeroFill","number","targetLength","forceSign","output","sign","addFormatToken","padded","ordinal","func","formatTokenFunctions","localeData","removeFormattingTokens","makeFormatFunction","array","formattingTokens","Function","formatMoment","expandFormat","formatFunctions","invalidDate","replaceLongDateFormatTokens","longDateFormat","localFormattingTokens","lastIndex","test","addRegexToken","strictRegex","regexes","isStrict","getParseRegexForToken","unescapeFormat","s","matched","p1","p2","p3","p4","addParseToken","tokens","addWeekParseToken","_w","addTimeToArrayFromToken","_a","daysInMonth","getUTCDate","localeMonths","_months","localeMonthsShort","_monthsShort","localeMonthsParse","monthName","_monthsParse","_longMonthsParse","_shortMonthsParse","months","monthsShort","setMonth","dayOfMonth","monthsParse","getSetMonth","getDaysInMonth","checkOverflow","MONTH","DATE","YEAR","HOUR","MINUTE","SECOND","MILLISECOND","_overflowDayOfYear","warn","msg","suppressDeprecationWarnings","deprecate","firstTime","msgWithStack","Error","stack","deprecateSimple","deprecations","configFromISO","l","from_string__isoRegex","isoDates","isoTimes","matchOffset","configFromStringAndFormat","configFromString","aspNetJsonRegex","createFromInputFallback","createDate","y","d","h","M","ms","setFullYear","createUTCDate","setUTCFullYear","daysInYear","isLeapYear","getIsLeapYear","weekOfYear","firstDayOfWeek","firstDayOfWeekOfYear","adjustedMoment","daysToDayOfWeek","local__createLocal","week","dayOfYear","localeWeek","_week","dow","doy","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","dayOfYearFromWeeks","daysToAdd","getUTCDay","getSetDayOfYear","round","startOf","defaults","c","currentDateArray","now","_useUTC","getUTCFullYear","getUTCMonth","getFullYear","getMonth","getDate","configFromArray","currentDate","yearToUse","dayOfYearFromWeekInfo","_dayOfYear","_nextDay","setUTCMinutes","getUTCMinutes","w","weekYear","temp","GG","W","E","gg","ISO_8601","parsedInput","skipped","stringLength","totalParsedInputLength","meridiemFixWrap","_meridiem","isPm","meridiemHour","isPM","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","score","configFromObject","createFromConfig","preparse","configFromInput","isUTC","pickBy","moments","args","Duration","duration","years","quarters","quarter","weeks","days","hours","minutes","seconds","milliseconds","_milliseconds","_days","_data","_bubble","isDuration","separator","offsetFromString","matches","chunk","parts","chunkOffset","cloneWithOffset","model","setTime","local","getDateOffset","getTimezoneOffset","getSetOffset","keepLocalTime","localAdjust","_changeInProgress","add_subtract__addSubtract","create__createDuration","getSetZone","setOffsetToUTC","setOffsetToLocal","subtract","setOffsetToParsedOffset","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","other","toArray","isLocal","isUtcOffset","isUtc","ret","diffRes","aspNetRegex","create__isoRegex","parseIso","momentsDifference","inp","parseFloat","positiveMomentsDifference","base","isAfter","isBefore","createAdder","direction","period","dur","isAdding","moment_calendar__calendar","time","sod","calendar","inputMs","endOf","isBetween","isSame","absFloor","asFloat","delta","that","zoneDelta","monthDiff","anchor2","adjust","wholeMonthDiff","anchor","moment_format__toISOString","toISOString","inputString","defaultFormat","postformat","withoutSuffix","humanize","fromNow","toNow","newLocaleData","isoWeekday","to_type__valueOf","unix","moment_valid__isValid","parsingFlags","invalidAt","addWeekYearFormatToken","getter","weeksInYear","getSetWeekYear","getSetISOWeekYear","getISOWeeksInYear","getWeeksInYear","weekInfo","getSetQuarter","parseWeekday","weekdaysParse","localeWeekdays","_weekdays","localeWeekdaysShort","_weekdaysShort","localeWeekdaysMin","_weekdaysMin","localeWeekdaysParse","weekdayName","_weekdaysParse","weekdays","weekdaysShort","weekdaysMin","getSetDayOfWeek","getDay","getSetLocaleDayOfWeek","getSetISODayOfWeek","lowercase","matchMeridiem","_meridiemParse","localeIsPM","charAt","localeMeridiem","isLower","millisecond__milliseconds","getZoneAbbr","getZoneName","moment__createUnix","moment__createInZone","parseZone","locale_calendar__calendar","_calendar","_longDateFormat","_invalidDate","_ordinal","preParsePostFormat","relative__relativeTime","isFuture","_relativeTime","pastFuture","locale_set__set","_ordinalParseLenient","_ordinalParse","source","lists__get","field","setter","list","count","out","lists__listMonths","lists__listMonthsShort","lists__listWeekdays","lists__listWeekdaysShort","lists__listWeekdaysMin","duration_abs__abs","mathAbs","duration_add_subtract__addSubtract","duration_add_subtract__add","duration_add_subtract__subtract","bubble","daysToYears","yearsToDays","as","duration_as__valueOf","makeAs","alias","duration_get__get","makeGetter","substituteTimeAgo","relativeTime","duration_humanize__relativeTime","posNegDuration","thresholds","duration_humanize__getSetRelativeTimeThreshold","threshold","limit","withSuffix","iso_string__toISOString","Y","iso_string__abs","D","total","asSeconds","match1","match2","match3","match4","match6","match1to2","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchTimestamp","matchWord","defaultLocaleMonths","defaultLocaleMonthsShort","parseTwoDigitYear","getSetYear","defaultLocaleWeek","prototypeMin","prototypeMax","add_subtract__add","add_subtract__subtract","lang","isoWeekYear","getSetDayOfMonth","invalidWeekday","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","_isPm","defaultLocaleMeridiemParse","getSetHour","getSetMinute","getSetSecond","getSetMillisecond","momentPrototype__proto","toJSON","isoWeek","isoWeeks","isoWeeksInYear","isDST","isDSTShifted","zoneAbbr","zoneName","dates","zone","momentPrototype","defaultCalendar","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","defaultLongDateFormat","LTS","LT","L","LL","LLL","LLLL","defaultInvalidDate","defaultOrdinal","defaultOrdinalParse","defaultRelativeTime","future","past","mm","hh","dd","MM","yy","prototype__proto","firstDayOfYear","ordinalParse","langData","asMilliseconds","asMinutes","asHours","asDays","asWeeks","asMonths","asYears","duration_get__milliseconds","duration_prototype__proto","toIsoString","version","invalid","rel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AO,EACPE,KAAQ,EACRD,OAAQ,EACRE,QAAS,EACT8C,QAAW,GACX5C,IAAO,GACPC,OAAQ,GACR4C,UAAa,GACb1C,IAAO,GACPC,OAAQ,GACR0C,UAAa,GACbC,IAAO,GACPC,OAAQ;;AD5CZzhB,QAAQkN,UAAY,SAAW2S,EAAQC,GAEnC,QAAS5S,GAAW6S,GAChB,MAAOF,GAAOE,GAAQ5S,QAAQ,UAAW,KAAUA,QAAQ,UAAW,KAAUA,QAAQ,UAAW,KAAUA,QAAQ,UAAW,KAAUA,QAAQ,iHAAkH6S,GAGxQ,QAASA,GAAUC,GACf,MAAOH,GAAaG,EAAMC,WAAW,GAAK,OAG9C,MAAOhT,IACR2S,OAAQA,OAAOC,cAWlB9f,QAAQmgB,UAAY,SAAWN,EAAQC,GAEnC,QAASK,GAAWJ,GAChB,MAAOF,GAAOE,GAAQ5S,QAAQ,UAAW,KAAUA,QAAQ,UAAW,KAAUA,QAAQ,UAAW,KAAUA,QAAQ,UAAW,KAAUA,QAAQ,sCAAuC6S,GAG7L,QAASA,GAAUC,GACf,MAAOH,GAAaG,EAAMC,WAAW,GAAK,OAG9C,MAAOC,IACRN,OAAQA,OAAOC","file":"bundle.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})","\nvar options = exports.options = require('./options');\n\nexports.parser = require('./parsers/parser');\nexports.refiner = require('./refiners/refiner');\n\nexports.Parser = exports.parser.Parser;\nexports.Refiner = exports.refiner.Refiner;\nexports.Filter = exports.refiner.Filter;\n\nexports.ParsedResult = require('./result').ParsedResult;\nexports.ParsedComponents = require('./result').ParsedComponents;\n\nvar Chrono = function(option) {\n\n option = option || exports.options.casualOption();\n\n this.option = option;\n this.parsers = new Object(option.parsers);\n this.refiners = new Object(option.refiners);\n}\n\n\nChrono.prototype.parse = function(text, refDate, opt) {\n\n refDate = refDate || new Date();\n opt = opt || {};\n\n var allResults = [];\n\n this.parsers.forEach(function (parser) {\n var results = parser.execute(text, refDate, opt);\n allResults = allResults.concat(results);\n });\n\n allResults.sort(function(a, b) {\n return a.index - b.index;\n });\n \n this.refiners.forEach(function (refiner) {\n allResults = refiner.refine(text, allResults, opt);\n });\n \n return allResults;\n};\n\n\nChrono.prototype.parseDate = function(text, refDate, opt) {\n var results = this.parse(text, refDate, opt);\n if (results.length > 0) {\n return results[0].start.date();\n }\n return null;\n}\n\nexports.Chrono = Chrono;\nexports.strict = new Chrono( options.strictOption() );\nexports.casual = new Chrono( options.casualOption() );\n\nexports.parse = function () {\n return exports.casual.parse.apply(exports.casual, arguments);\n}\n\nexports.parseDate = function () {\n return exports.casual.parseDate.apply(exports.casual, arguments);\n}\n","var parser = require('./parsers/parser');\nvar refiner = require('./refiners/refiner');\n\nfunction baseOption(strictMode) {\n\n return {\n parsers: [\n\n // EN\n new parser.ENISOFormatParser(strictMode),\n new parser.ENDeadlineFormatParser(strictMode),\n new parser.ENMonthNameLittleEndianParser(strictMode),\n new parser.ENMonthNameMiddleEndianParser(strictMode),\n new parser.ENMonthNameParser(strictMode),\n new parser.ENSlashDateFormatParser(strictMode),\n new parser.ENSlashDateFormatStartWithYearParser(strictMode),\n new parser.ENSlashMonthFormatParser(strictMode),\n new parser.ENTimeAgoFormatParser(strictMode),\n new parser.ENTimeExpressionParser(strictMode),\n\n // JP\n new parser.JPStandardParser(strictMode),\n\n // ES\n new parser.ESTimeAgoFormatParser(strictMode),\n new parser.ESDeadlineFormatParser(strictMode),\n new parser.ESTimeExpressionParser(strictMode),\n new parser.ESMonthNameLittleEndianParser(strictMode),\n new parser.ESSlashDateFormatParser(strictMode),\n ],\n\n refiners: [\n // Removing overlaping first\n new refiner.OverlapRemovalRefiner(),\n\n // ETC\n new refiner.ENMergeDateTimeRefiner(),\n new refiner.ENMergeDateRangeRefiner(),\n new refiner.JPMergeDateRangeRefiner(),\n\n // Extract additional info later\n new refiner.ExtractTimezoneOffsetRefiner(),\n new refiner.ExtractTimezoneAbbrRefiner(),\n new refiner.UnlikelyFormatFilter()\n ]\n }\n}\n\n\n\nexports.strictOption = function () {\n return baseOption(true);\n};\n\n\nexports.casualOption = function () {\n\n var options = baseOption(false);\n\n // EN\n options.parsers.unshift(new parser.ENCasualDateParser());\n options.parsers.unshift(new parser.ENWeekdayParser());\n\n // JP\n options.parsers.unshift(new parser.JPCasualDateParser());\n\n // ES\n options.parsers.unshift(new parser.ESCasualDateParser());\n options.parsers.unshift(new parser.ESWeekdayParser());\n\n\n return options;\n};\n","\nfunction Parser(strictMode) {\n\n this.isStrictMode = function() { return (strictMode == true) };\n\n this.pattern = function() { return /./i; }\n\n this.extract = function(text, ref, match, opt){ return null; }\n\n this.execute = function(text, ref, opt) {\n\n var results = [];\n var regex = this.pattern();\n\n var remainingText = text;\n var match = regex.exec(remainingText);\n\n while (match) {\n\n // Calculate match index on the full text;\n match.index += text.length - remainingText.length;\n\n var result = this.extract(text, ref, match, opt);\n if (result) {\n\n // If success, start from the end of the result\n remainingText = text.substring(result.index + result.text.length);\n\n if (!this.isStrictMode() || result.hasPossibleDates()) {\n results.push(result);\n }\n\n } else {\n // If fail, move on by 1\n remainingText = text.substring(match.index + 1);\n }\n\n match = regex.exec(remainingText);\n }\n\n if (this.refiners) {\n this.refiners.forEach(function () {\n results = refiner.refine(results, text, options);\n });\n }\n\n return results;\n }\n}\n\nexports.Parser = Parser;\n\nexports.ENISOFormatParser = require('./EN/ENISOFormatParser').Parser;\nexports.ENDeadlineFormatParser = require('./EN/ENDeadlineFormatParser').Parser;\nexports.ENMonthNameLittleEndianParser = require('./EN/ENMonthNameLittleEndianParser').Parser;\nexports.ENMonthNameMiddleEndianParser = require('./EN/ENMonthNameMiddleEndianParser').Parser;\nexports.ENMonthNameParser = require('./EN/ENMonthNameParser').Parser;\nexports.ENSlashDateFormatParser = require('./EN/ENSlashDateFormatParser').Parser;\nexports.ENSlashDateFormatStartWithYearParser = require('./EN/ENSlashDateFormatStartWithYearParser').Parser;\nexports.ENSlashMonthFormatParser = require('./EN/ENSlashMonthFormatParser').Parser;\nexports.ENTimeAgoFormatParser = require('./EN/ENTimeAgoFormatParser').Parser;\nexports.ENTimeExpressionParser = require('./EN/ENTimeExpressionParser').Parser;\nexports.ENWeekdayParser = require('./EN/ENWeekdayParser').Parser;\nexports.ENCasualDateParser = require('./EN/ENCasualDateParser').Parser;\n\nexports.JPStandardParser = require('./JP/JPStandardParser').Parser;\nexports.JPCasualDateParser = require('./JP/JPCasualDateParser').Parser;\n\n\nexports.ESCasualDateParser = require('./ES/ESCasualDateParser').Parser;\nexports.ESDeadlineFormatParser = require('./ES/ESDeadlineFormatParser').Parser;\nexports.ESTimeAgoFormatParser = require('./ES/ESTimeAgoFormatParser').Parser;\nexports.ESTimeExpressionParser = require('./ES/ESTimeExpressionParser').Parser;\nexports.ESWeekdayParser = require('./ES/ESWeekdayParser').Parser;\nexports.ESMonthNameLittleEndianParser = require('./ES/ESMonthNameLittleEndianParser').Parser;\nexports.ESSlashDateFormatParser = require('./ES/ESSlashDateFormatParser').Parser;\n","\nexports.Refiner = function Refiner() { \n\n this.refine = function(text, results, opt) { return results; };\n}\n\nexports.Filter = function Filter() { \n \n exports.Refiner.call(this);\n\n this.isValid = function(text, result, opt) { return true; }\n this.refine = function(text, results, opt) { \n\n var filteredResult = [];\n for (var i=0; i < results.length; i++) {\n\n var result = results[i];\n if (this.isValid(text, result, opt)) {\n filteredResult.push(result);\n }\n }\n\n return filteredResult;\n }\n}\n\n\n// Common refiners\nexports.OverlapRemovalRefiner = require('./OverlapRemovalRefiner').Refiner;\nexports.ExtractTimezoneOffsetRefiner = require('./ExtractTimezoneOffsetRefiner').Refiner;\nexports.ExtractTimezoneAbbrRefiner = require('./ExtractTimezoneAbbrRefiner').Refiner;\nexports.UnlikelyFormatFilter = require('./UnlikelyFormatFilter').Refiner;\n\n// EN refiners\nexports.ENMergeDateTimeRefiner = require('./EN/ENMergeDateTimeRefiner').Refiner;\nexports.ENMergeDateRangeRefiner = require('./EN/ENMergeDateRangeRefiner').Refiner;\n\n// JP refiners\nexports.JPMergeDateRangeRefiner = require('./JP/JPMergeDateRangeRefiner').Refiner;\n\n","var moment = require('moment');\n\nfunction ParsedResult(result){\n result = result || {};\n\n this.ref = result.ref;\n this.index = result.index;\n this.text = result.text;\n this.tags = result.tags || {};\n\n this.start = new ParsedComponents(result.start, result.ref)\n if(result.end){\n this.end = new ParsedComponents(result.end, result.ref)\n }\n}\n\nParsedResult.prototype.clone = function() {\n var result = new ParsedResult(this);\n result.tags = JSON.parse(JSON.stringify(this.tags));\n result.start = this.start.clone();\n if (this.end) {\n result.end = this.end.clone();\n }\n}\n\nParsedResult.prototype.hasPossibleDates = function() {\n return this.start.isPossibleDate() && (!this.end || this.end.isPossibleDate());\n}\n\n\nfunction ParsedComponents (components, ref){\n\n this.knownValues = {};\n this.impliedValues = {};\n\n if (components) {\n for (key in components) {\n this.knownValues[key] = components[key];\n }\n }\n\n if (ref) {\n ref = moment(ref);\n this.imply('day', ref.date())\n this.imply('month', ref.month() + 1)\n this.imply('year', ref.year())\n }\n \n\n this.imply('hour', 12);\n this.imply('minute', 0);\n this.imply('second', 0);\n this.imply('millisecond', 0);\n}\n\nParsedComponents.prototype.clone = function () {\n var component = new ParsedComponents();\n component.knownValues = JSON.parse(JSON.stringify(this.knownValues));\n component.impliedValues = JSON.parse(JSON.stringify(this.impliedValues));\n return component;\n};\n\nParsedComponents.prototype.get = function(component, value) {\n if (component in this.knownValues) return this.knownValues[component];\n if (component in this.impliedValues) return this.impliedValues[component];\n};\n\nParsedComponents.prototype.assign = function(component, value) {\n this.knownValues[component] = value;\n delete this.impliedValues[component];\n};\n\nParsedComponents.prototype.imply = function(component, value) {\n if (component in this.knownValues) return;\n this.impliedValues[component] = value;\n};\n\nParsedComponents.prototype.isCertain = function(component) {\n return component in this.knownValues;\n};\n\nParsedComponents.prototype.isPossibleDate = function() {\n \n var dateMoment = this.moment();\n\n if (dateMoment.get('year') != this.get('year')) return false;\n if (dateMoment.get('month') != this.get('month')-1) return false;\n if (dateMoment.get('date') != this.get('day')) return false;\n if (dateMoment.get('hour') != this.get('hour')) return false;\n if (dateMoment.get('minute') != this.get('minute')) return false;\n\n return true;\n}\n\nParsedComponents.prototype.date = function() {\n var dateMoment = this.moment();\n return dateMoment.toDate();\n};\n\nParsedComponents.prototype.moment = function() {\n var dateMoment = moment();\n\n dateMoment.set('year', this.get('year'));\n dateMoment.set('month', this.get('month')-1);\n dateMoment.set('date', this.get('day'));\n dateMoment.set('hour', this.get('hour'));\n dateMoment.set('minute', this.get('minute'));\n dateMoment.set('second', this.get('second'));\n dateMoment.set('millisecond', this.get('millisecond'));\n\n // Javascript Date Object return minus timezone offset\n var currentTimezoneOffset = dateMoment.utcOffset();\n var targetTimezoneOffset = this.isCertain('timezoneOffset') ? \n this.get('timezoneOffset') : currentTimezoneOffset;\n\n var adjustTimezoneOffset = targetTimezoneOffset - currentTimezoneOffset;\n dateMoment.add(-adjustTimezoneOffset, 'minutes');\n\n return dateMoment;\n}\n\n\n\nexports.ParsedComponents = ParsedComponents;\nexports.ParsedResult = ParsedResult;\n","/*\n ISO 8601\n http://www.w3.org/TR/NOTE-datetime\n - YYYY-MM-DD\n - YYYY-MM-DDThh:mmTZD\n - YYYY-MM-DDThh:mm:ssTZD\n - YYYY-MM-DDThh:mm:ss.sTZD \n - TZD = (Z or +hh:mm or -hh:mm)\n*/\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\n\nvar PATTERN = new RegExp('(\\\\W|^)' \n + '([0-9]{4})\\\\-([0-9]{1,2})\\\\-([0-9]{1,2})'\n + '(?:T' //..\n + '([0-9]{1,2}):([0-9]{1,2})' // hh:mm\n + '(?::([0-9]{1,2})(?:\\\\.(\\\\d{1,4}))?)?' // :ss.s\n + '(?:Z|([+-]\\\\d{2}):?(\\\\d{2})?)?' // TZD (Z or ±hh:mm or ±hhmm or ±hh)\n + ')?' //..\n + '(?=\\\\W|$)', 'i');\n\nvar YEAR_NUMBER_GROUP = 2;\nvar MONTH_NUMBER_GROUP = 3;\nvar DATE_NUMBER_GROUP = 4;\nvar HOUR_NUMBER_GROUP = 5;\nvar MINUTE_NUMBER_GROUP = 6;\nvar SECOND_NUMBER_GROUP = 7;\nvar MILLISECOND_NUMBER_GROUP = 8;\nvar TZD_HOUR_OFFSET_GROUP = 9;\nvar TZD_MINUTE_OFFSET_GROUP = 10;\n\nexports.Parser = function ENISOFormatParser(){\n Parser.apply(this, arguments);\n \n this.pattern = function() { return PATTERN; }\n \n this.extract = function(text, ref, match, opt){ \n \n var text = match[0].substr(match[1].length);\n var index = match.index + match[1].length;\n\n var result = new ParsedResult({\n text: text,\n index: index,\n ref: ref,\n })\n \n result.start.assign('year', parseInt(match[YEAR_NUMBER_GROUP]));\n result.start.assign('month', parseInt(match[MONTH_NUMBER_GROUP]));\n result.start.assign('day', parseInt(match[DATE_NUMBER_GROUP]));\n\n if (moment(result.start.get('month')) > 12 || moment(result.start.get('month')) < 1 ||\n moment(result.start.get('day')) > 31 || moment(result.start.get('day')) < 1) {\n return null;\n }\n\n if (match[HOUR_NUMBER_GROUP] != null) {\n \n result.start.assign('hour',\n parseInt(match[HOUR_NUMBER_GROUP]));\n result.start.assign('minute',\n parseInt(match[MINUTE_NUMBER_GROUP]));\n\n if (match[SECOND_NUMBER_GROUP] != null) {\n\n result.start.assign('second',\n parseInt(match[SECOND_NUMBER_GROUP]));\n }\n\n if (match[MILLISECOND_NUMBER_GROUP] != null) {\n\n result.start.assign('millisecond',\n parseInt(match[MILLISECOND_NUMBER_GROUP]));\n }\n\n if (match[TZD_HOUR_OFFSET_GROUP] == null) {\n\n result.start.assign('timezoneOffset', 0);\n } else {\n\n var minuteOffset = 0;\n var hourOffset = parseInt(match[TZD_HOUR_OFFSET_GROUP]);\n if (match[TZD_MINUTE_OFFSET_GROUP] != null)\n minuteOffset = parseInt(match[TZD_MINUTE_OFFSET_GROUP]);\n\n var offset = hourOffset * 60;\n if (offset < 0) {\n offset -= minuteOffset;\n } else {\n offset += minuteOffset;\n }\n\n result.start.assign('timezoneOffset', offset);\n }\n }\n \n result.tags['ENISOFormatParser'] = true;\n return result;\n };\n\n}\n\n","/*\n\n\n*/\n\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\nvar util = require('../../utils/EN');\n\nvar PATTERN = new RegExp('(\\\\W|^)' +\n '(within|in)\\\\s*' +\n '('+ util.INTEGER_WORDS_PATTERN + '|[0-9]+|an?(?:\\\\s*few)?|half(?:\\\\s*an?)?)\\\\s*' +\n '(seconds?|min(?:ute)?s?|hours?|days?|weeks?|months?|years?)\\\\s*' +\n '(?=\\\\W|$)', 'i'\n);\n\nvar STRICT_PATTERN = new RegExp('(\\\\W|^)' +\n '(within|in)\\\\s*' +\n '('+ util.INTEGER_WORDS_PATTERN + '|[0-9]+|an?)\\\\s*' +\n '(seconds?|minutes?|hours?|days?)\\\\s*' +\n '(?=\\\\W|$)', 'i'\n);\n\nexports.Parser = function ENDeadlineFormatParser(){\n Parser.apply(this, arguments);\n\n this.pattern = function() {\n return this.isStrictMode()? STRICT_PATTERN : PATTERN;\n };\n\n this.extract = function(text, ref, match, opt){\n\n var index = match.index + match[1].length;\n var text = match[0];\n text = match[0].substr(match[1].length, match[0].length - match[1].length);\n\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n\n var num = match[3].toLowerCase();\n if (util.INTEGER_WORDS[num] !== undefined) {\n num = util.INTEGER_WORDS[num];\n } else if (num === 'a' || num === 'an'){\n num = 1;\n } else if (num.match(/few/i)){\n num = 3;\n } else if (num.match(/half/i)) {\n num = 0.5;\n } else {\n num = parseInt(num);\n }\n\n var date = moment(ref);\n if (match[4].match(/day|week|month|year/i)) {\n\n if (match[4].match(/day/i)) {\n date.add(num, 'd');\n } else if (match[4].match(/week/i)) {\n date.add(num * 7, 'd');\n } else if (match[4].match(/month/i)) {\n date.add(num, 'month');\n } else if (match[4].match(/year/i)) {\n date.add(num, 'year');\n }\n\n result.start.assign('year', date.year());\n result.start.assign('month', date.month() + 1);\n result.start.assign('day', date.date());\n return result;\n }\n\n if (match[4].match(/hour/i)) {\n\n date.add(num, 'hour');\n\n } else if (match[4].match(/min/i)) {\n\n date.add(num, 'minute');\n\n } else if (match[4].match(/second/i)) {\n\n date.add(num, 'second');\n }\n\n result.start.imply('year', date.year());\n result.start.imply('month', date.month() + 1);\n result.start.imply('day', date.date());\n result.start.assign('hour', date.hour());\n result.start.assign('minute', date.minute());\n result.start.assign('second', date.second());\n result.tags['ENDeadlineFormatParser'] = true;\n return result;\n };\n};\n","/*\n \n \n*/\n\nvar moment = require('moment');\n\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\nvar util = require('../../utils/EN');\n \nvar PATTERN = new RegExp('(\\\\W|^)' +\n '(?:(Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sun|Mon|Tue|Wed|Thu|Fri|Sat)\\\\s*,?\\\\s*)?' + \n '([0-9]{1,2})(?:st|nd|rd|th)?' + \n '(?:\\\\s*(?:to|\\\\-|\\\\–|until|through|till|\\\\s)\\\\s*([0-9]{1,2})(?:st|nd|rd|th)?)?\\\\s*(?:of)?\\\\s*' + \n '(Jan(?:uary|\\\\.)?|Feb(?:ruary|\\\\.)?|Mar(?:ch|\\\\.)?|Apr(?:il|\\\\.)?|May|Jun(?:e|\\\\.)?|Jul(?:y|\\\\.)?|Aug(?:ust|\\\\.)?|Sep(?:tember|\\\\.)?|Oct(?:ober|\\\\.)?|Nov(?:ember|\\\\.)?|Dec(?:ember|\\\\.)?)' +\n '(?:' +\n ',?\\\\s*([0-9]{2,4}(?![^\\\\s]\\\\d))' +\n '(\\\\s*BE)?' +\n ')?' +\n '(?=\\\\W|$)', 'i'\n );\n\nvar WEEKDAY_GROUP = 2;\nvar DATE_GROUP = 3;\nvar DATE_TO_GROUP = 4;\nvar MONTH_NAME_GROUP = 5;\nvar YEAR_GROUP = 6;\nvar YEAR_BE_GROUP = 7;\n\nexports.Parser = function ENMonthNameLittleEndianParser(){\n Parser.apply(this, arguments);\n \n this.pattern = function() { return PATTERN; }\n \n this.extract = function(text, ref, match, opt){ \n\n var result = new ParsedResult({\n text: match[0].substr(match[1].length, match[0].length - match[1].length),\n index: match.index + match[1].length,\n ref: ref,\n });\n\n var month = match[MONTH_NAME_GROUP];\n month = util.MONTH_OFFSET[month.toLowerCase()];\n\n var day = match[DATE_GROUP];\n day = parseInt(day);\n\n var year = null;\n if (match[YEAR_GROUP]) {\n year = match[YEAR_GROUP];\n year = parseInt(year);\n\n if(match[YEAR_BE_GROUP]){ \n //BC\n year = year - 543;\n\n } else if (year < 100){ \n\n year = year + 2000;\n }\n }\n\n if(year){\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.assign('year', year);\n } else {\n \n //Find the most appropriated year\n var refMoment = moment(ref);\n refMoment.month(month - 1);\n refMoment.date(day);\n refMoment.year(moment(ref).year());\n\n var nextYear = refMoment.clone().add(1, 'y');\n var lastYear = refMoment.clone().add(-1, 'y');\n if( Math.abs(nextYear.diff(moment(ref))) < Math.abs(refMoment.diff(moment(ref))) ){ \n refMoment = nextYear;\n }\n else if( Math.abs(lastYear.diff(moment(ref))) < Math.abs(refMoment.diff(moment(ref))) ){ \n refMoment = lastYear;\n }\n\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.imply('year', refMoment.year());\n }\n \n // Weekday component\n if (match[WEEKDAY_GROUP]) {\n var weekday = match[WEEKDAY_GROUP];\n weekday = util.WEEKDAY_OFFSET[weekday.toLowerCase()]\n result.start.assign('weekday', weekday);\n }\n\n // Text can be 'range' value. Such as '12 - 13 January 2012'\n if (match[DATE_TO_GROUP]) {\n result.end = result.start.clone();\n result.end.assign('day', parseInt(match[DATE_TO_GROUP]));\n }\n\n result.tags['ENMonthNameLittleEndianParser'] = true;\n return result;\n };\n}\n\n","/*\n \n The parser for parsing US's date format that begin with month's name.\n \n EX. \n - January 13\n - January 13, 2012\n - January 13 - 15, 2012\n - Tuesday, January 13, 2012\n\n Watch out for:\n - January 12:00\n - January 12.44\n - January 1222344\n*/\n\nvar moment = require('moment');\n\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\nvar util = require('../../utils/EN');\n \nvar PATTERN = new RegExp('(\\\\W|^)' +\n '(?:' +\n '(Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sun\\\\.?|Mon\\\\.?|Tue\\\\.?|Wed\\\\.?|Thu\\\\.?|Fri\\\\.?|Sat\\\\.?)' + \n '\\\\s*,?\\\\s*)?' +\n '(Jan\\\\.?|January|Feb\\\\.?|February|Mar\\\\.?|March|Apr\\\\.?|April|May\\\\.?|Jun\\\\.?|June|Jul\\\\.?|July|Aug\\\\.?|August|Sep\\\\.?|Sept\\\\.?|September|Oct\\\\.?|October|Nov\\\\.?|November|Dec\\\\.?|December)' + \n '\\\\s*' +\n '([0-9]{1,2})(?:st|nd|rd|th)?\\\\s*' + \n '(?:' + \n '(?:to|\\\\-)\\\\s*' + \n '([0-9]{1,2})(?:st|nd|rd|th)?\\\\s*' + \n ')?' + \n '(?:' +\n '\\\\s*,?\\\\s*([0-9]{4})(\\\\s*BE)?\\\\s*' +\n ')?' + \n '(?=\\\\W|$)(?!\\\\:\\\\d)', 'i');\n\nvar WEEKDAY_GROUP = 2;\nvar MONTH_NAME_GROUP = 3;\nvar DATE_GROUP = 4;\nvar DATE_TO_GROUP = 5;\nvar YEAR_GROUP = 6;\nvar YEAR_BE_GROUP = 7;\n\nexports.Parser = function ENMonthNameMiddleEndianParser(){\n Parser.apply(this, arguments);\n\n this.pattern = function() { return PATTERN; }\n \n this.extract = function(text, ref, match, opt){\n\n if (text.indexOf('5 May 12:00') >= 0) {\n console.log(match)\n }\n\n var result = new ParsedResult({\n text: match[0].substr(match[1].length, match[0].length - match[1].length),\n index: match.index + match[1].length,\n ref: ref,\n });\n\n \n var month = match[MONTH_NAME_GROUP];\n month = util.MONTH_OFFSET[month.toLowerCase()];\n\n var day = match[DATE_GROUP];\n day = parseInt(day);\n\n var year = null;\n if (match[YEAR_GROUP]) {\n year = match[YEAR_GROUP];\n year = parseInt(year);\n\n if(match[YEAR_BE_GROUP]){ \n //BC\n year = year - 543;\n\n } else if (year < 100){ \n\n year = year + 2000;\n }\n }\n\n if(year){\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.assign('year', year);\n } else {\n \n //Find the most appropriated year\n var refMoment = moment(ref);\n refMoment.month(month - 1);\n refMoment.date(day);\n\n var nextYear = refMoment.clone().add(1, 'y');\n var lastYear = refMoment.clone().add(-1, 'y');\n if( Math.abs(nextYear.diff(moment(ref))) < Math.abs(refMoment.diff(moment(ref))) ){ \n refMoment = nextYear;\n }\n else if( Math.abs(lastYear.diff(moment(ref))) < Math.abs(refMoment.diff(moment(ref))) ){ \n refMoment = lastYear;\n }\n\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.imply('year', refMoment.year());\n }\n \n // Weekday component\n if (match[WEEKDAY_GROUP]) {\n var weekday = match[WEEKDAY_GROUP];\n weekday = util.WEEKDAY_OFFSET[weekday.toLowerCase()]\n result.start.assign('weekday', weekday);\n }\n\n // Text can be 'range' value. Such as 'January 12 - 13, 2012'\n if (match[DATE_TO_GROUP]) {\n result.end = result.start.clone();\n result.end.assign('day', parseInt(match[DATE_TO_GROUP]));\n }\n\n result.tags['ENMonthNameMiddleEndianParser'] = true;\n return result;\n }\n}\n\n","/*\n \n The parser for parsing month name and year.\n \n EX. \n - January\n - January 2012\n - January, 2012\n*/\n\nvar moment = require('moment');\n\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\nvar util = require('../../utils/EN');\n\nvar PATTERN = new RegExp('(^|\\\\D\\\\s+|[^\\\\w\\\\s])' +\n '(Jan\\\\.?|January|Feb\\\\.?|February|Mar\\\\.?|March|Apr\\\\.?|April|May\\\\.?|Jun\\\\.?|June|Jul\\\\.?|July|Aug\\\\.?|August|Sep\\\\.?|Sept\\\\.?|September|Oct\\\\.?|October|Nov\\\\.?|November|Dec\\\\.?|December)' + \n '\\\\s*' +\n '(?:' +\n ',?\\\\s*([0-9]{4})(\\\\s*BE)?' +\n ')?' +\n '(?=[^\\\\s\\\\w]|$)', 'i');\n\nvar MONTH_NAME_GROUP = 2;\nvar YEAR_GROUP = 3;\nvar YEAR_BE_GROUP = 4;\n\nexports.Parser = function ENMonthNameParser(){\n Parser.apply(this, arguments);\n\n this.pattern = function() { return PATTERN; }\n \n this.extract = function(text, ref, match, opt){\n var result = new ParsedResult({\n text: match[0].substr(match[1].length, match[0].length - match[1].length),\n index: match.index + match[1].length,\n ref: ref,\n });\n\n \n var month = match[MONTH_NAME_GROUP];\n month = util.MONTH_OFFSET[month.toLowerCase()];\n\n var day = 1;\n\n var year = null;\n if (match[YEAR_GROUP]) {\n year = match[YEAR_GROUP];\n year = parseInt(year);\n\n if(match[YEAR_BE_GROUP]){ \n //BC\n year = year - 543;\n\n } else if (year < 100){ \n\n year = year + 2000;\n }\n }\n\n if(year){\n result.start.imply('day', day);\n result.start.assign('month', month);\n result.start.assign('year', year);\n } else {\n \n //Find the most appropriated year\n var refMoment = moment(ref);\n refMoment.month(month - 1);\n refMoment.date(day);\n\n var nextYear = refMoment.clone().add(1, 'y');\n var lastYear = refMoment.clone().add(-1, 'y');\n if( Math.abs(nextYear.diff(moment(ref))) < Math.abs(refMoment.diff(moment(ref))) ){ \n refMoment = nextYear;\n }\n else if( Math.abs(lastYear.diff(moment(ref))) < Math.abs(refMoment.diff(moment(ref))) ){ \n refMoment = lastYear;\n }\n\n result.start.imply('day', day);\n result.start.assign('month', month);\n result.start.imply('year', refMoment.year());\n }\n\n result.tags['ENMonthNameParser'] = true;\n return result;\n }\n}\n\n","/*\n Date format with slash \"/\" (also \"-\" and \".\") between numbers \n - Tuesday 11/3/2015\n - 11/3/2015\n - 11/3\n*/\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\n\nvar PATTERN = new RegExp('(\\\\W|^)' + \n '(?:' + \n '((?:sun|mon|tues?|wed(?:nes)?|thu(?:rs?)?|fri|sat(?:ur)?)(?:day)?)' +\n '\\\\s*\\\\,?\\\\s*' +\n ')?' + \n '([0-9]{1,2})[\\\\/\\\\.\\\\-]([0-9]{1,2})' + \n '(?:' + \n '[\\\\/\\\\.\\\\-]' + \n '([0-9]{4}|[0-9]{2})' + \n ')?' + \n '(\\\\W|$)', 'i');\n\nvar DAYS_OFFSET = { 'sunday': 0, 'sun': 0, 'monday': 1, 'mon': 1,'tuesday': 2, 'wednesday': 3, 'wed': 3,\n 'thursday': 4, 'thur': 4,'friday': 5, 'fri': 5,'saturday': 6, 'sat': 6,}\n\n\nvar OPENNING_GROUP = 1;\nvar ENDING_GROUP = 6;\n\nvar WEEKDAY_GROUP = 2;\nvar MONTH_GROUP = 3;\nvar DAY_GROUP = 4;\nvar YEAR_GROUP = 5;\n\nexports.Parser = function ENSlashDateFormatParser(argument) {\n Parser.apply(this, arguments);\n\n this.pattern = function () { return PATTERN; };\n this.extract = function(text, ref, match, opt){\n \n if(match[OPENNING_GROUP] == '/' || match[ENDING_GROUP] == '/') {\n // Long skip, if there is some overlapping like:\n // XX[/YY/ZZ]\n // [XX/YY/]ZZ\n match.index += match[0].length\n return;\n }\n\n var index = match.index + match[OPENNING_GROUP].length;\n var text = match[0].substr(match[OPENNING_GROUP].length, match[0].length - match[ENDING_GROUP].length);\n\n\n var result = new ParsedResult({\n text: text,\n index: index,\n ref: ref,\n });\n \n if(text.match(/^\\d\\.\\d$/)) return;\n if(text.match(/^\\d\\.\\d{1,2}\\.\\d{1,2}$/)) return;\n \n // MM/dd -> OK\n // MM.dd -> NG\n if(!match[YEAR_GROUP] && match[0].indexOf('/') < 0) return;\n\n var date = null;\n var year = match[YEAR_GROUP] || moment(ref).year() + '';\n var month = match[MONTH_GROUP];\n var day = match[DAY_GROUP];\n \n month = parseInt(month);\n day = parseInt(day);\n year = parseInt(year);\n\n if(month < 1 || month > 12) {\n if(month > 12) {\n // dd/mm/yyyy date format if day looks like a month, and month\n // looks like a day.\n if (day >= 1 && day <= 12 && month >= 13 && month <= 31) {\n // unambiguous\n var tday = month;\n month = day;\n day = tday;\n }\n else {\n // both month and day are <= 12\n return null;\n }\n }\n }\n if(day < 1 || day > 31) return null;\n\n if(year < 100){\n if (year > 50) {\n year = year + 1900; \n } else {\n year = year + 2000; \n }\n }\n\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.assign('year', year);\n\n //Day of week\n if(match[WEEKDAY_GROUP]) {\n result.start.assign('weekday', DAYS_OFFSET[match[WEEKDAY_GROUP].toLowerCase()]);\n }\n\n result.tags['ENSlashDateFormatParser'] = true;\n return result;\n };\n};\n","/*\n Date format with slash \"/\" between numbers like ENSlashDateFormatParser,\n but this parser expect year before month and date. \n - YYYY/MM/DD\n - YYYY-MM-DD\n - YYYY.MM.DD\n*/\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\n\nvar PATTERN = new RegExp('(\\\\W|^)' \n + '([0-9]{4})[\\\\-\\\\.\\\\/]([0-9]{1,2})[\\\\-\\\\.\\\\/]([0-9]{1,2})'\n + '(?=\\\\W|$)', 'i');\n\nvar YEAR_NUMBER_GROUP = 2;\nvar MONTH_NUMBER_GROUP = 3;\nvar DATE_NUMBER_GROUP = 4;\n\nexports.Parser = function ENSlashDateFormatStartWithYearParser(){\n Parser.apply(this, arguments);\n \n this.pattern = function() { return PATTERN; }\n \n this.extract = function(text, ref, match, opt){\n\n var text = match[0].substr(match[1].length);\n var index = match.index + match[1].length;\n\n var result = new ParsedResult({\n text: text,\n index: index,\n ref: ref,\n })\n \n result.start.assign('year', parseInt(match[YEAR_NUMBER_GROUP]));\n result.start.assign('month', parseInt(match[MONTH_NUMBER_GROUP]));\n result.start.assign('day', parseInt(match[DATE_NUMBER_GROUP]));\n\n if (moment(result.start.get('month')) > 12 || moment(result.start.get('month')) < 1 ||\n moment(result.start.get('day')) > 31 || moment(result.start.get('day')) < 1) {\n return null;\n }\n \n result.tags['ENDateFormatParser'] = true;\n return result;\n };\n}\n","/*\n Month/Year date format with slash \"/\" (also \"-\" and \".\") between numbers \n - 11/05\n - 06/2005\n*/\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\n\nvar PATTERN = new RegExp('(^|[^\\\\d/]\\\\s+|[^\\\\w\\\\s])' +\n '([0-9]|0[1-9]|1[012])/([0-9]{4})' + \n '([^\\\\d/]|$)', 'i');\n\nvar OPENNING_GROUP = 1;\nvar ENDING_GROUP = 4;\n\nvar MONTH_GROUP = 2;\nvar YEAR_GROUP = 3;\n\nexports.Parser = function ENSlashMonthFormatParser(argument) {\n Parser.apply(this, arguments);\n\n this.pattern = function () { return PATTERN; };\n this.extract = function(text, ref, match, opt){\n \n var index = match.index + match[OPENNING_GROUP].length;\n var text = match[0].substr(match[OPENNING_GROUP].length, match[0].length - (1 + match[ENDING_GROUP].length)).trim();\n\n var result = new ParsedResult({\n text: text,\n index: index,\n ref: ref,\n });\n\n var date = null;\n var year = match[YEAR_GROUP] ;\n var month = match[MONTH_GROUP];\n var day = 1;\n \n month = parseInt(month);\n year = parseInt(year);\n\n result.start.imply('day', day);\n result.start.assign('month', month);\n result.start.assign('year', year);\n\n result.tags['ENSlashMonthFormatParser'] = true;\n return result;\n };\n};\n","/*\n\n\n*/\n\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\nvar util = require('../../utils/EN');\n\nvar PATTERN = new RegExp('' +\n '(\\\\W|^)' +\n '(?:within\\\\s*)?' +\n '(' + util.INTEGER_WORDS_PATTERN + '|[0-9]+|an?(?:\\\\s*few)?|half(?:\\\\s*an?)?)\\\\s*' +\n '(seconds?|min(?:ute)?s?|hours?|weeks?|days?|months?|years?)\\\\s*' +\n '(?:ago|before|earlier)(?=(?:\\\\W|$))', 'i');\n\nvar STRICT_PATTERN = new RegExp('' +\n '(\\\\W|^)' +\n '(?:within\\\\s*)?' +\n '([0-9]+|an?)\\\\s*' +\n '(seconds?|minutes?|hours?|days?)\\\\s*' +\n 'ago(?=(?:\\\\W|$))', 'i');\n\nexports.Parser = function ENTimeAgoFormatParser(){\n Parser.apply(this, arguments);\n\n this.pattern = function() {\n return this.isStrictMode()? STRICT_PATTERN : PATTERN;\n };\n\n this.extract = function(text, ref, match, opt){\n\n if (match.index > 0 && text[match.index-1].match(/\\w/)) return null;\n\n var text = match[0];\n text = match[0].substr(match[1].length, match[0].length - match[1].length);\n index = match.index + match[1].length;\n\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref\n });\n\n var num = match[2].toLowerCase() ;\n if (util.INTEGER_WORDS[num] !== undefined) {\n num = util.INTEGER_WORDS[num];\n } else if(num === 'a' || num === 'an'){\n num = 1;\n } else if (num.match(/few/)) {\n num = 3;\n } else if (num.match(/half/)) {\n num = 0.5;\n } else {\n num = parseInt(num);\n }\n\n var date = moment(ref);\n\n if (match[3].match(/hour|min|second/i)) {\n if (match[3].match(/hour/i)) {\n\n date.add(-num, 'hour');\n\n } else if (match[3].match(/min/i)) {\n\n date.add(-num, 'minute');\n\n } else if (match[3].match(/second/i)) {\n\n date.add(-num, 'second');\n }\n\n result.start.imply('day', date.date());\n result.start.imply('month', date.month() + 1);\n result.start.imply('year', date.year());\n result.start.assign('hour', date.hour());\n result.start.assign('minute', date.minute());\n result.start.assign('second', date.second());\n result.tags['ENTimeAgoFormatParser'] = true;\n return result;\n }\n\n if (match[3].match(/week/i)) {\n date.add(-num, 'week');\n\n result.start.imply('day', date.date());\n result.start.imply('month', date.month() + 1);\n result.start.imply('year', date.year());\n result.start.imply('weekday', date.day());\n return result;\n }\n\n if (match[3].match(/day/i)) {\n date.add(-num, 'd');\n }\n\n if (match[3].match(/month/i)) {\n date.add(-num, 'month');\n }\n\n if (match[3].match(/year/i)) {\n\n date.add(-num, 'year');\n }\n\n result.start.assign('day', date.date());\n result.start.assign('month', date.month() + 1);\n result.start.assign('year', date.year());\n return result;\n\n };\n}\n","/*\n\n\n*/\n\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\nvar ParsedComponents = require('../../result').ParsedComponents;\n\nvar FIRST_REG_PATTERN = new RegExp(\"(^|\\\\s|T)\" +\n \"(?:(?:at|from)\\\\s*)?\" + \n \"(\\\\d{1,4}|noon|midnight)\" + \n \"(?:\" + \n \"(?:\\\\.|\\\\:|\\\\:)(\\\\d{1,2})\" + \n \"(?:\" + \n \"(?:\\\\:|\\\\:)(\\\\d{2})\" + \n \")?\" + \n \")?\" + \n \"(?:\\\\s*(A\\\\.M\\\\.|P\\\\.M\\\\.|AM?|PM?))?\" + \n \"(?=\\\\W|$)\", 'i');\n\n\nvar SECOND_REG_PATTERN = new RegExp(\"^\\\\s*\" + \n \"(\\\\-|\\\\–|\\\\~|\\\\〜|to|\\\\?)\\\\s*\" + \n \"(\\\\d{1,4})\" +\n \"(?:\" + \n \"(?:\\\\.|\\\\:|\\\\:)(\\\\d{1,2})\" + \n \"(?:\" + \n \"(?:\\\\.|\\\\:|\\\\:)(\\\\d{1,2})\" + \n \")?\" + \n \")?\" + \n \"(?:\\\\s*(A\\\\.M\\\\.|P\\\\.M\\\\.|AM?|PM?))?\" + \n \"(?=\\\\W|$)\", 'i');\n\nvar HOUR_GROUP = 2;\nvar MINUTE_GROUP = 3;\nvar SECOND_GROUP = 4;\nvar AM_PM_HOUR_GROUP = 5;\n\n\nexports.Parser = function ENTimeExpressionParser(){\n Parser.apply(this, arguments);\n\n this.pattern = function() { return FIRST_REG_PATTERN; }\n \n this.extract = function(text, ref, match, opt){ \n \n // This pattern can be overlaped Ex. [12] AM, 1[2] AM\n if (match.index > 0 && text[match.index-1].match(/\\w/)) return null;\n var refMoment = moment(ref);\n var result = new ParsedResult();\n result.ref = ref;\n result.index = match.index + match[1].length;\n result.text = match[0].substring(match[1].length);\n result.tags['ENTimeExpressionParser'] = true;\n\n result.start.imply('day', refMoment.date());\n result.start.imply('month', refMoment.month()+1);\n result.start.imply('year', refMoment.year());\n \n var hour = 0;\n var minute = 0;\n var meridiem = -1;\n\n // ----- Second\n if(match[SECOND_GROUP] != null){ \n var second = parseInt(match[SECOND_GROUP]);\n if(second >= 60) return null;\n\n result.start.assign('second', second);\n }\n \n // ----- Hours\n if (match[HOUR_GROUP].toLowerCase() == \"noon\"){\n meridiem = 1; \n hour = 12;\n } else if (match[HOUR_GROUP].toLowerCase() == \"midnight\") {\n meridiem = 0; \n hour = 0;\n } else {\n hour = parseInt(match[HOUR_GROUP]);\n }\n \n // ----- Minutes\n if(match[MINUTE_GROUP] != null){ \n minute = parseInt(match[MINUTE_GROUP]);\n } else if(hour > 100) { \n minute = hour%100;\n hour = parseInt(hour/100);\n } \n \n if(minute >= 60) {\n return null;\n }\n\n if(hour > 24) {\n return null;\n }\n if (hour >= 12) { \n meridiem = 1;\n }\n\n // ----- AM & PM \n if(match[AM_PM_HOUR_GROUP] != null) {\n if(hour > 12) return null;\n var ampm = match[AM_PM_HOUR_GROUP][0].toLowerCase();\n if(ampm == \"a\"){\n meridiem = 0; \n if(hour == 12) hour = 0;\n }\n \n if(ampm == \"p\"){\n meridiem = 1; \n if(hour != 12) hour += 12;\n }\n } \n\n result.start.assign('hour', hour);\n result.start.assign('minute', minute);\n\n if (meridiem >= 0) {\n result.start.assign('meridiem', meridiem);\n } else {\n if (hour < 12) {\n result.start.imply('meridiem', 0);\n } else {\n result.start.imply('meridiem', 1);\n }\n }\n \n // ==============================================================\n // Extracting the 'to' chunk\n // ==============================================================\n match = SECOND_REG_PATTERN.exec(text.substring(result.index + result.text.length));\n if (!match) {\n // Not accept number only result\n if (result.text.match(/^\\d+$/)) { \n return null;\n }\n return result;\n }\n\n\n\n // Pattern \"YY.YY -XXXX\" is more like timezone offset\n if (match[0].match(/^\\s*(\\+|\\-)\\s*\\d{3,4}$/)) {\n return result;\n }\n\n if(result.end == null){\n result.end = new ParsedComponents(null, result.start.date());\n }\n\n var hour = 0;\n var minute = 0;\n var meridiem = -1;\n\n // ----- Second\n if(match[SECOND_GROUP] != null){ \n var second = parseInt(match[SECOND_GROUP]);\n if(second >= 60) return null;\n\n result.end.assign('second', second);\n }\n\n hour = parseInt(match[2]);\n \n // ----- Minute\n if (match[MINUTE_GROUP]!= null) {\n \n minute = parseInt(match[MINUTE_GROUP]);\n if(minute >= 60) return result;\n \n } else if (hour > 100) {\n\n minute = hour%100;\n hour = parseInt(hour/100);\n }\n\n if(minute >= 60) {\n return null;\n }\n\n if(hour > 24) {\n return null;\n }\n if (hour >= 12) { \n meridiem = 1;\n }\n \n // ----- AM & PM \n if (match[AM_PM_HOUR_GROUP] != null){\n\n if (hour > 12) return null;\n\n if(match[AM_PM_HOUR_GROUP][0].toLowerCase() == \"a\"){\n meridiem = 0; \n if(hour == 12) {\n hour = 0;\n if (!result.end.isCertain('day')) {\n result.end.imply('day', result.end.get('day') + 1);\n }\n }\n }\n \n if(match[AM_PM_HOUR_GROUP][0].toLowerCase() == \"p\"){\n meridiem = 1; \n if(hour != 12) hour += 12;\n }\n \n if (!result.start.isCertain('meridiem')) {\n if (meridiem == 0) {\n \n result.start.imply('meridiem', 0);\n \n if (result.start.get('hour') == 12) {\n result.start.assign('hour', 0);\n }\n\n } else {\n\n result.start.imply('meridiem', 1);\n \n if (result.start.get('hour') != 12) {\n result.start.assign('hour', result.start.get('hour') + 12); \n }\n }\n }\n }\n\n result.text = result.text + match[0];\n result.end.assign('hour', hour);\n result.end.assign('minute', minute);\n if (meridiem >= 0) {\n result.end.assign('meridiem', meridiem);\n } else {\n var startAtPM = result.start.isCertain('meridiem') && result.start.get('meridiem') == 1;\n if (startAtPM && result.start.get('hour') > hour) {\n // 10pm - 1 (am)\n result.end.imply('meridiem', 0);\n\n } else if (hour > 12) {\n result.end.imply('meridiem', 1);\n }\n }\n\n if (result.end.date().getTime() < result.start.date().getTime()) {\n result.end.imply('day', result.end.get('day') + 1)\n }\n \n return result;\n }\n}\n\n","/*\n\n\n*/\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\n\nvar DAYS_OFFSET = { 'sunday': 0, 'sun': 0, 'monday': 1, 'mon': 1,'tuesday': 2, 'tues':2, 'tue':2, 'wednesday': 3, 'wed': 3,\n 'thursday': 4, 'thurs':4, 'thur': 4, 'thu': 4,'friday': 5, 'fri': 5,'saturday': 6, 'sat': 6};\n\nvar PATTERN = new RegExp('(\\\\W|^)' +\n '(?:(?:\\\\,|\\\\(|\\\\()\\\\s*)?' +\n '(?:(this|last|next)\\\\s*)?' +\n '(' + Object.keys(DAYS_OFFSET).join('|') + ')' +\n '(?:\\\\s*(?:\\\\,|\\\\)|\\\\)))?' +\n '(?:\\\\s*(this|last|next)\\\\s*week)?' +\n '(?=\\\\W|$)', 'i');\n\nvar PREFIX_GROUP = 2;\nvar WEEKDAY_GROUP = 3;\nvar POSTFIX_GROUP = 4;\n\nexports.Parser = function ENWeekdayParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function() { return PATTERN; };\n\n this.extract = function(text, ref, match, opt){\n var index = match.index + match[1].length;\n var text = match[0].substr(match[1].length, match[0].length - match[1].length);\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref,\n });\n\n var dayOfWeek = match[WEEKDAY_GROUP].toLowerCase();\n var offset = DAYS_OFFSET[dayOfWeek];\n if(offset === undefined) return null;\n\n var startMoment = moment(ref);\n var prefix = match[PREFIX_GROUP];\n var postfix = match[POSTFIX_GROUP];\n\n if (prefix || postfix) {\n var norm = prefix || postfix;\n norm = norm.toLowerCase();\n\n if(norm == 'last')\n startMoment.day(offset - 7);\n else if(norm == 'next')\n startMoment.day(offset + 7);\n else if(norm== 'this')\n startMoment.day(offset);\n } else{\n var refOffset = startMoment.day();\n if ( opt.forwardDatesOnly && refOffset > offset ) {\n startMoment.day(offset + 7);\n } else if (!opt.forwardDatesOnly && Math.abs(offset - 7 - refOffset) < Math.abs(offset - refOffset)) {\n startMoment.day(offset - 7);\n } else if (!opt.forwardDatesOnly && Math.abs(offset + 7 - refOffset) < Math.abs(offset - refOffset)) {\n startMoment.day(offset + 7);\n } else {\n startMoment.day(offset);\n }\n }\n\n result.start.assign('weekday', offset);\n result.start.imply('day', startMoment.date());\n result.start.imply('month', startMoment.month() + 1);\n result.start.imply('year', startMoment.year());\n return result;\n }\n};\n\n","/*\n\n\n*/\n\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\n\nvar PATTERN = /(\\W|^)(now|today|tonight|tomorrow|tmr|yesterday|last\\s*night|this\\s*(morning|afternoon|evening))(?=\\W|$)/i;\n\nexports.Parser = function ENCasualDateParser(){\n\n Parser.apply(this, arguments);\n\n this.pattern = function() { return PATTERN; }\n\n this.extract = function(text, ref, match, opt){\n\n var text = match[0].substr(match[1].length);\n var index = match.index + match[1].length;\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref,\n });\n\n var refMoment = moment(ref);\n var startMoment = refMoment.clone();\n var lowerText = text.toLowerCase();\n\n if(lowerText == 'tonight'){\n // Normally means this coming midnight\n result.start.imply('hour', 22);\n result.start.imply('meridiem', 1);\n\n } else if(lowerText == 'tomorrow' || lowerText == 'tmr'){\n\n // Check not \"Tomorrow\" on late night\n if(refMoment.hour() > 1) {\n startMoment.add(1, 'day');\n }\n\n } else if(lowerText == 'yesterday') {\n\n startMoment.add(-1, 'day');\n }\n else if(lowerText.match(/last\\s*night/)) {\n\n result.start.imply('hour', 0);\n if (refMoment.hour() > 6) {\n startMoment.add(-1, 'day');\n }\n\n } else if (lowerText.match(\"this\")) {\n\n var secondMatch = match[3].toLowerCase();\n if (secondMatch == \"afternoon\") {\n\n result.start.imply('hour', 15);\n\n } else if (secondMatch == \"evening\") {\n\n result.start.imply('hour', 18);\n\n } else if (secondMatch == \"morning\") {\n\n result.start.imply('hour', 6);\n }\n\n } else if (lowerText.match(\"now\")) {\n\n result.start.imply('hour', refMoment.hour());\n result.start.imply('minute', refMoment.minute());\n result.start.imply('second', refMoment.second());\n result.start.imply('millisecond', refMoment.millisecond());\n\n }\n\n result.start.assign('day', startMoment.date())\n result.start.assign('month', startMoment.month() + 1)\n result.start.assign('year', startMoment.year())\n result.tags['ENCasualDateParser'] = true;\n return result;\n }\n}\n","/*\n \n \n*/\n\nvar moment = require('moment');\n\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\n\nvar util = require('../../utils/JP'); \nvar PATTERN = /(?:(同|((昭和|平成)?([0-90-9]{2,4})))年\\s*)?([0-90-9]{1,2})月\\s*([0-90-9]{1,2})日/i;\n \nvar YEAR_GROUP = 2;\nvar ERA_GROUP = 3;\nvar YEAR_NUMBER_GROUP = 4;\nvar MONTH_GROUP = 5;\nvar DAY_GROUP = 6;\n\nexports.Parser = function JPStandardParser(){\n Parser.apply(this, arguments);\n \n this.pattern = function() { return PATTERN; }\n \n this.extract = function(text, ref, match, opt){ \n\n var startMoment = moment(ref);\n var result = new ParsedResult({\n text: match[0],\n index: match.index,\n ref: ref,\n });\n \n var month = match[MONTH_GROUP];\n month = util.toHankaku(month);\n month = parseInt(month);\n\n var day = match[DAY_GROUP];\n day = util.toHankaku(day);\n day = parseInt(day);\n\n startMoment.set('date', day);\n startMoment.set('month', month - 1);\n result.start.assign('day', startMoment.date());\n result.start.assign('month', startMoment.month() + 1);\n \n if (!match[YEAR_GROUP]) {\n \n //Find the most appropriated year\n startMoment.year(moment(ref).year());\n var nextYear = startMoment.clone().add(1, 'y');\n var lastYear = startMoment.clone().add(-1, 'y');\n if( Math.abs(nextYear.diff(moment(ref))) < Math.abs(startMoment.diff(moment(ref))) ){ \n startMoment = nextYear;\n }\n else if( Math.abs(lastYear.diff(moment(ref))) < Math.abs(startMoment.diff(moment(ref))) ){ \n startMoment = lastYear;\n }\n\n result.start.assign('day', startMoment.date());\n result.start.assign('month', startMoment.month() + 1);\n result.start.imply('year', startMoment.year());\n\n } else if (match[YEAR_GROUP].match('同年')) {\n\n result.start.assign('year', startMoment.year());\n\n } else {\n var year = match[YEAR_NUMBER_GROUP];\n year = util.toHankaku(year);\n year = parseInt(year);\n\n if (match[ERA_GROUP] == '平成') {\n year += 1988;\n } else if (match[ERA_GROUP] == '昭和') {\n year += 1925;\n }\n\n result.start.assign('year', year);\n }\n \n\n result.tags['JPStandardParser'] = true;\n return result;\n };\n\n}\n\n","/*\n \n \n*/\n\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\n\nvar PATTERN = /今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i;\n\nexports.Parser = function JPCasualDateParser(){\n \n Parser.apply(this, arguments);\n \n this.pattern = function() { return PATTERN; }\n \n this.extract = function(text, ref, match, opt){ \n \n var index = match.index;\n var text = match[0];\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref,\n });\n\n var refMoment = moment(ref);\n var startMoment = refMoment.clone();\n\n if(text == '今夜' || text == '今夕' || text == '今晩'){\n // Normally means this coming midnight \n result.start.imply('hour', 22);\n result.start.imply('meridiem', 1);\n\n } else if(text == '明日'){\n\n // Check not \"Tomorrow\" on late night\n if(refMoment.hour() > 4) {\n startMoment.add(1, 'day');\n }\n\n } else if(text == '昨日') {\n\n startMoment.add(-1, 'day');\n\n } else if (text.match(\"今朝\")) {\n\n result.start.imply('hour', 6);\n result.start.imply('meridiem', 0);\n }\n\n result.start.assign('day', startMoment.date())\n result.start.assign('month', startMoment.month() + 1)\n result.start.assign('year', startMoment.year())\n result.tags['JPCasualDateParser'] = true;\n return result;\n }\n}\n\n","/*\n\n\n*/\n\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\n\n/*\n Valid patterns:\n - esta mañana -> today in the morning\n - esta tarde -> today in the afternoon/evening\n - esta noche -> tonight\n - ayer por la mañana -> yesterday in the morning\n - ayer por la tarde -> yesterday in the afternoon/evening\n - ayer por la noche -> yesterday at night\n - mañana por la mañana -> tomorrow in the morning\n - mañana por la tarde -> tomorrow in the afternoon/evening\n - mañana por la noche -> tomorrow at night\n - anoche -> tomorrow at night\n - hoy -> today\n - ayer -> yesterday\n - mañana -> tomorrow\n */\nvar PATTERN = /(\\W|^)(ahora|esta\\s*(mañana|tarde|noche)|(ayer|mañana)\\s*por\\s*la\\s*(mañana|tarde|noche)|hoy|mañana|ayer|anoche)(?=\\W|$)/i;\n\nexports.Parser = function ESCasualDateParser(){\n\n Parser.apply(this, arguments);\n\n this.pattern = function() { return PATTERN; }\n\n this.extract = function(text, ref, match, opt){\n\n var text = match[0].substr(match[1].length);\n var index = match.index + match[1].length;\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref,\n });\n\n var refMoment = moment(ref);\n var startMoment = refMoment.clone();\n var lowerText = text.toLowerCase().replace(/\\s+/g, ' ');\n\n if(lowerText == 'mañana'){\n\n // Check not \"Tomorrow\" on late night\n if(refMoment.hour() > 1) {\n startMoment.add(1, 'day');\n }\n\n } else if(lowerText == 'ayer') {\n\n startMoment.add(-1, 'day');\n }\n else if(lowerText == 'anoche') {\n\n result.start.imply('hour', 0);\n if (refMoment.hour() > 6) {\n startMoment.add(-1, 'day');\n }\n\n } else if (lowerText.match(\"esta\")) {\n\n var secondMatch = match[3].toLowerCase();\n if (secondMatch == \"tarde\") {\n\n result.start.imply('hour', 18);\n\n } else if (secondMatch == \"mañana\") {\n\n result.start.imply('hour', 6);\n\n } else if (secondMatch == \"noche\") {\n\n // Normally means this coming midnight\n result.start.imply('hour', 22);\n result.start.imply('meridiem', 1);\n\n }\n } else if (lowerText.match(/por\\s*la/)) {\n\n var firstMatch = match[4].toLowerCase();\n if (firstMatch === 'ayer') {\n\n startMoment.add(-1, 'day');\n\n } else if (firstMatch === 'mañana') {\n\n startMoment.add(1, 'day');\n\n }\n\n var secondMatch = match[5].toLowerCase();\n if (secondMatch == \"tarde\") {\n\n result.start.imply('hour', 18);\n\n } else if (secondMatch == \"mañana\") {\n\n result.start.imply('hour', 9);\n\n } else if (secondMatch == \"noche\") {\n\n // Normally means this coming midnight\n result.start.imply('hour', 22);\n result.start.imply('meridiem', 1);\n\n }\n\n } else if (lowerText.match(\"ahora\")) {\n\n result.start.imply('hour', refMoment.hour());\n result.start.imply('minute', refMoment.minute());\n result.start.imply('second', refMoment.second());\n result.start.imply('millisecond', refMoment.millisecond());\n\n }\n\n result.start.assign('day', startMoment.date())\n result.start.assign('month', startMoment.month() + 1)\n result.start.assign('year', startMoment.year())\n result.tags['ESCasualDateParser'] = true;\n return result;\n }\n}\n","/*\n\n\n*/\n\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\n\nvar PATTERN = /(\\W|^)(dentro\\s*de|en)\\s*([0-9]+|medi[oa]|una?)\\s*(minutos?|horas?|d[ií]as?)\\s*(?=(?:\\W|$))/i;\n\nexports.Parser = function ESDeadlineFormatParser(){\n Parser.apply(this, arguments);\n\n this.pattern = function() { return PATTERN; }\n\n this.extract = function(text, ref, match, opt){\n\n var index = match.index + match[1].length;\n var text = match[0];\n text = match[0].substr(match[1].length, match[0].length - match[1].length);\n\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref,\n });\n\n var num = parseInt(match[3]);\n if (isNaN(num)) {\n if (match[3].match(/medi/)) {\n num = 0.5;\n } else {\n num = 1;\n }\n }\n\n var date = moment(ref);\n if (match[4].match(/d[ií]a/)) {\n date.add(num, 'd');\n\n result.start.assign('year', date.year());\n result.start.assign('month', date.month() + 1);\n result.start.assign('day', date.date());\n return result;\n }\n\n\n if (match[4].match(/hora/)) {\n\n date.add(num, 'hour');\n\n } else if (match[4].match(/minuto/)) {\n\n date.add(num, 'minute');\n }\n\n result.start.imply('year', date.year());\n result.start.imply('month', date.month() + 1);\n result.start.imply('day', date.date());\n result.start.assign('hour', date.hour());\n result.start.assign('minute', date.minute());\n result.tags['ESDeadlineFormatParser'] = true;\n return result;\n };\n}\n","/*\n\n\n*/\n\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\n\nvar PATTERN = /(\\W|^)hace\\s*([0-9]+|medi[oa]|una?)\\s*(minutos?|horas?|semanas?|d[ií]as?|mes(es)?|años?)(?=(?:\\W|$))/i;\n\nexports.Parser = function ESTimeAgoFormatParser(){\n Parser.apply(this, arguments);\n\n this.pattern = function() {\n return PATTERN;\n }\n\n this.extract = function(text, ref, match, opt){\n\n if (match.index > 0 && text[match.index-1].match(/\\w/)) return null;\n\n var text = match[0];\n text = match[0].substr(match[1].length, match[0].length - match[1].length);\n index = match.index + match[1].length;\n\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref,\n });\n\n var num = parseInt(match[2]);\n if (isNaN(num)) {\n if (match[2].match(/medi/)) {\n num = 0.5;\n } else {\n num = 1;\n }\n }\n\n var date = moment(ref);\n\n if (match[3].match(/hora/) || match[3].match(/minuto/)) {\n if (match[3].match(/hora/)) {\n\n date.add(-num, 'hour');\n\n } else if (match[3].match(/minuto/)) {\n\n date.add(-num, 'minute');\n }\n\n result.start.imply('day', date.date());\n result.start.imply('month', date.month() + 1);\n result.start.imply('year', date.year());\n result.start.assign('hour', date.hour());\n result.start.assign('minute', date.minute());\n result.tags['ESTimeAgoFormatParser'] = true;\n return result;\n }\n\n if (match[3].match(/semana/)) {\n date.add(-num, 'week');\n\n result.start.imply('day', date.date());\n result.start.imply('month', date.month() + 1);\n result.start.imply('year', date.year());\n result.start.imply('weekday', date.day());\n return result;\n }\n\n if (match[3].match(/d[ií]a/)) {\n date.add(-num, 'd');\n }\n\n if (match[3].match(/mes/)) {\n date.add(-num, 'month');\n }\n\n if (match[3].match(/año/)) {\n\n date.add(-num, 'year');\n }\n\n result.start.assign('day', date.date());\n result.start.assign('month', date.month() + 1);\n result.start.assign('year', date.year());\n return result;\n\n };\n}\n","/*\n\n\n*/\n\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\nvar ParsedComponents = require('../../result').ParsedComponents;\n\nvar FIRST_REG_PATTERN = new RegExp(\"(^|\\\\s|T)\" +\n \"(?:(?:a las?|al?|desde|de)\\\\s*)?\" +\n \"(\\\\d{1,4}|mediod[ií]a|medianoche)\" +\n \"(?:\" +\n \"(?:\\\\.|\\\\:|\\\\:)(\\\\d{1,2})\" +\n \"(?:\" +\n \"(?:\\\\:|\\\\:)(\\\\d{2})\" +\n \")?\" +\n \")?\" +\n \"(?:\\\\s*(A\\\\.M\\\\.|P\\\\.M\\\\.|AM?|PM?))?\" +\n \"(?=\\\\W|$)\", 'i');\n\n\nvar SECOND_REG_PATTERN = new RegExp(\"^\\\\s*\" +\n \"(\\\\-|\\\\–|\\\\~|\\\\〜|a(?:\\s*las)?|\\\\?)\\\\s*\" +\n \"(\\\\d{1,4})\" +\n \"(?:\" +\n \"(?:\\\\.|\\\\:|\\\\:)(\\\\d{1,2})\" +\n \"(?:\" +\n \"(?:\\\\.|\\\\:|\\\\:)(\\\\d{1,2})\" +\n \")?\" +\n \")?\" +\n \"(?:\\\\s*(A\\\\.M\\\\.|P\\\\.M\\\\.|AM?|PM?))?\" +\n \"(?=\\\\W|$)\", 'i');\n\nvar HOUR_GROUP = 2;\nvar MINUTE_GROUP = 3;\nvar SECOND_GROUP = 4;\nvar AM_PM_HOUR_GROUP = 5;\n\nexports.Parser = function ESTimeExpressionParser(){\n Parser.apply(this, arguments);\n\n this.pattern = function() { return FIRST_REG_PATTERN; }\n\n this.extract = function(text, ref, match, opt){\n\n // This pattern can be overlaped Ex. [12] AM, 1[2] AM\n if (match.index > 0 && text[match.index-1].match(/\\w/)) return null;\n var refMoment = moment(ref);\n var result = new ParsedResult();\n result.ref = ref;\n result.index = match.index + match[1].length;\n result.text = match[0].substring(match[1].length);\n result.tags['ESTimeExpressionParser'] = true;\n\n result.start.imply('day', refMoment.date());\n result.start.imply('month', refMoment.month()+1);\n result.start.imply('year', refMoment.year());\n\n var hour = 0;\n var minute = 0;\n var meridiem = -1;\n\n // ----- Second\n if(match[SECOND_GROUP] != null){\n var second = parseInt(match[SECOND_GROUP]);\n if(second >= 60) return null;\n\n result.start.assign('second', second);\n }\n\n // ----- Hours\n if (match[HOUR_GROUP].toLowerCase().match(/mediod/)){\n meridiem = 1;\n hour = 12;\n } else if (match[HOUR_GROUP].toLowerCase() == \"medianoche\") {\n meridiem = 0;\n hour = 0;\n } else {\n hour = parseInt(match[HOUR_GROUP]);\n }\n\n // ----- Minutes\n if(match[MINUTE_GROUP] != null){\n minute = parseInt(match[MINUTE_GROUP]);\n } else if(hour > 100) {\n minute = hour%100;\n hour = parseInt(hour/100);\n }\n\n if(minute >= 60) {\n return null;\n }\n\n if(hour > 24) {\n return null;\n }\n if (hour >= 12) {\n meridiem = 1;\n }\n\n // ----- AM & PM\n if(match[AM_PM_HOUR_GROUP] != null) {\n if(hour > 12) return null;\n var ampm = match[AM_PM_HOUR_GROUP][0].toLowerCase();\n if(ampm == \"a\"){\n meridiem = 0;\n if(hour == 12) hour = 0;\n }\n\n if(ampm == \"p\"){\n meridiem = 1;\n if(hour != 12) hour += 12;\n }\n }\n result.start.assign('hour', hour);\n result.start.assign('minute', minute);\n if (meridiem >= 0) {\n result.start.assign('meridiem', meridiem);\n }\n\n // ==============================================================\n // Extracting the 'to' chunk\n // ==============================================================\n match = SECOND_REG_PATTERN.exec(text.substring(result.index + result.text.length));\n if (!match) {\n // Not accept number only result\n if (result.text.match(/^\\d+$/)) {\n return null;\n }\n return result;\n }\n\n\n\n // Pattern \"YY.YY -XXXX\" is more like timezone offset\n if (match[0].match(/^\\s*(\\+|\\-)\\s*\\d{3,4}$/)) {\n return result;\n }\n\n if(result.end == null){\n result.end = new ParsedComponents(null, result.start.date());\n }\n\n var hour = 0;\n var minute = 0;\n var meridiem = -1;\n\n // ----- Second\n if(match[SECOND_GROUP] != null){\n var second = parseInt(match[SECOND_GROUP]);\n if(second >= 60) return null;\n\n result.end.assign('second', second);\n }\n\n hour = parseInt(match[2]);\n\n // ----- Minute\n if (match[MINUTE_GROUP]!= null) {\n\n minute = parseInt(match[MINUTE_GROUP]);\n if(minute >= 60) return result;\n\n } else if (hour > 100) {\n\n minute = hour%100;\n hour = parseInt(hour/100);\n }\n\n if(minute >= 60) {\n return null;\n }\n\n if(hour > 24) {\n return null;\n }\n if (hour >= 12) {\n meridiem = 1;\n }\n\n // ----- AM & PM\n if (match[AM_PM_HOUR_GROUP] != null){\n\n if (hour > 12) return null;\n\n if(match[AM_PM_HOUR_GROUP][0].toLowerCase() == \"a\"){\n meridiem = 0;\n if(hour == 12) {\n hour = 0;\n if (!result.end.isCertain('day')) {\n result.end.imply('day', result.end.get('day') + 1);\n }\n }\n }\n\n if(match[AM_PM_HOUR_GROUP][0].toLowerCase() == \"p\"){\n meridiem = 1;\n if(hour != 12) hour += 12;\n }\n\n if (!result.start.isCertain('meridiem')) {\n if (meridiem == 0) {\n\n result.start.imply('meridiem', 0);\n\n if (result.start.get('hour') == 12) {\n result.start.assign('hour', 0);\n }\n\n } else {\n\n result.start.imply('meridiem', 1);\n\n if (result.start.get('hour') != 12) {\n result.start.assign('hour', result.start.get('hour') + 12);\n }\n }\n }\n\n } else if(hour >= 12) {\n meridiem = 1;\n }\n\n result.text = result.text + match[0];\n result.end.assign('hour', hour);\n result.end.assign('minute', minute);\n if (meridiem >= 0) {\n result.end.assign('meridiem', meridiem);\n }\n\n if (result.end.date().getTime() < result.start.date().getTime()) {\n result.end.imply('day', result.end.get('day') + 1)\n }\n\n return result;\n }\n}\n","/*\n\n\n*/\n\nvar moment = require('moment');\n\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\n\nvar util = require('../../utils/ES');\n\nvar DAYS_OFFSET = util.WEEKDAY_OFFSET;\n\nvar PATTERN = new RegExp('(\\\\W|^)' +\n '(?:(Domingo|Lunes|Martes|Miércoles|Miercoles|Jueves|Viernes|Sábado|Sabado|Dom|Lun|Mar|Mie|Jue|Vie|Sab)\\\\s*,?\\\\s*)?' +\n '([0-9]{1,2})(?:º|ª|°)?' +\n '(?:\\\\s*(?:desde|de|\\\\-|\\\\–|al?|hasta|\\\\s)\\\\s*([0-9]{1,2})(?:º|ª|°)?)?\\\\s*(?:de)?\\\\s*' +\n '(Ene(?:ro|\\\\.)?|Feb(?:rero|\\\\.)?|Mar(?:zo|\\\\.)?|Abr(?:il|\\\\.)?|May(?:o|\\\\.)?|Jun(?:io|\\\\.)?|Jul(?:io|\\\\.)?|Ago(?:sto|\\\\.)?|Sep(?:tiembre|\\\\.)?|Oct(?:ubre|\\\\.)?|Nov(?:iembre|\\\\.)?|Dic(?:iembre|\\\\.)?)' +\n '(?:\\\\s*(?:del?)?(\\\\s*[0-9]{2,4}(?![^\\\\s]\\\\d))(\\\\s*AC)?)?' +\n '(?=\\\\W|$)', 'i'\n );\n\nvar WEEKDAY_GROUP = 2;\nvar DATE_GROUP = 3;\nvar DATE_TO_GROUP = 4;\nvar MONTH_NAME_GROUP = 5;\nvar YEAR_GROUP = 6;\nvar YEAR_BE_GROUP = 7;\n\nexports.Parser = function ESMonthNameLittleEndianParser(){\n Parser.apply(this, arguments);\n\n this.pattern = function() { return PATTERN; }\n\n this.extract = function(text, ref, match, opt){\n\n var result = new ParsedResult({\n text: match[0].substr(match[1].length, match[0].length - match[1].length),\n index: match.index + match[1].length,\n ref: ref,\n });\n\n var month = match[MONTH_NAME_GROUP];\n month = util.MONTH_OFFSET[month.toLowerCase()];\n\n var day = match[DATE_GROUP];\n day = parseInt(day);\n\n var year = null;\n if (match[YEAR_GROUP]) {\n year = match[YEAR_GROUP];\n year = parseInt(year);\n\n if(match[YEAR_BE_GROUP]){\n //BC\n year = year - 543;\n\n } else if (year < 100){\n\n year = year + 2000;\n }\n }\n\n if(year){\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.assign('year', year);\n } else {\n\n //Find the most appropriated year\n var refMoment = moment(ref);\n refMoment.month(month - 1);\n refMoment.date(day);\n refMoment.year(moment(ref).year());\n\n var nextYear = refMoment.clone().add(1, 'y');\n var lastYear = refMoment.clone().add(-1, 'y');\n if( Math.abs(nextYear.diff(moment(ref))) < Math.abs(refMoment.diff(moment(ref))) ){\n refMoment = nextYear;\n }\n else if( Math.abs(lastYear.diff(moment(ref))) < Math.abs(refMoment.diff(moment(ref))) ){\n refMoment = lastYear;\n }\n\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.imply('year', refMoment.year());\n }\n\n // Weekday component\n if (match[WEEKDAY_GROUP]) {\n var weekday = match[WEEKDAY_GROUP];\n weekday = util.WEEKDAY_OFFSET[weekday.toLowerCase()]\n result.start.assign('weekday', weekday);\n }\n\n // Text can be 'range' value. Such as '12 - 13 January 2012'\n if (match[DATE_TO_GROUP]) {\n result.end = result.start.clone();\n result.end.assign('day', parseInt(match[DATE_TO_GROUP]));\n }\n\n result.tags['ESMonthNameLittleEndianParser'] = true;\n return result;\n };\n}\n","/*\n\n\n*/\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\n\nvar DAYS_OFFSET = { 'domingo': 0, 'dom': 0, 'lunes': 1, 'lun': 1, 'martes': 2, 'mar':2, 'miercoles': 3, 'miércoles': 3, 'mie': 3,\n 'jueves': 4, 'jue': 4, 'viernes': 5, 'vier': 5, 'sabado': 6, 'sábado': 6, 'sab': 6,}\n\nvar PATTERN = new RegExp('(\\\\W|^)' +\n '(?:(?:\\\\,|\\\\(|\\\\()\\\\s*)?' +\n '(?:(este|pasado|pr[oó]ximo)\\\\s*)?' +\n '(' + Object.keys(DAYS_OFFSET).join('|') + ')' +\n '(?:\\\\s*(?:\\\\,|\\\\)|\\\\)))?' +\n '(?:\\\\s*(este|pasado|pr[óo]ximo)\\\\s*week)?' +\n '(?=\\\\W|$)', 'i');\n\nvar PREFIX_GROUP = 2;\nvar WEEKDAY_GROUP = 3;\nvar POSTFIX_GROUP = 4;\n\nexports.Parser = function ESWeekdayParser() {\n Parser.apply(this, arguments);\n\n this.pattern = function() { return PATTERN; }\n\n this.extract = function(text, ref, match, opt){\n var index = match.index + match[1].length;\n var text = match[0].substr(match[1].length, match[0].length - match[1].length);\n var result = new ParsedResult({\n index: index,\n text: text,\n ref: ref,\n });\n\n var dayOfWeek = match[WEEKDAY_GROUP].toLowerCase();\n var offset = DAYS_OFFSET[dayOfWeek];\n if(offset === undefined) return null;\n\n var startMoment = moment(ref);\n var prefix = match[PREFIX_GROUP];\n var postfix = match[POSTFIX_GROUP];\n\n if (prefix || postfix) {\n var norm = prefix || postfix;\n norm = norm.toLowerCase();\n\n if(norm == 'pasado')\n startMoment.day(offset - 7)\n else if(norm == 'próximo' || norm == 'proximo')\n startMoment.day(offset + 7)\n else if(norm== 'este')\n startMoment.day(offset);\n } else{\n var refOffset = startMoment.day();\n if ( opt.forwardDatesOnly && refOffset > offset ) {\n startMoment.day(offset + 7);\n } else if (!opt.forwardDatesOnly && Math.abs(offset - 7 - refOffset) < Math.abs(offset - refOffset)) {\n startMoment.day(offset - 7);\n } else if (!opt.forwardDatesOnly && Math.abs(offset + 7 - refOffset) < Math.abs(offset - refOffset)) {\n startMoment.day(offset + 7);\n } else {\n startMoment.day(offset);\n }\n }\n\n result.start.assign('weekday', offset);\n result.start.imply('day', startMoment.date())\n result.start.imply('month', startMoment.month() + 1)\n result.start.imply('year', startMoment.year())\n return result;\n }\n}\n","/*\n Date format with slash \"/\" (also \"-\" and \".\") between numbers\n - Martes 3/11/2015\n - 3/11/2015\n - 3/11\n*/\nvar moment = require('moment');\nvar Parser = require('../parser').Parser;\nvar ParsedResult = require('../../result').ParsedResult;\n\nvar PATTERN = new RegExp('(\\\\W|^)' +\n '(?:' +\n '((?:domingo|dom|lunes|lun|martes|mar|mi[ée]rcoles|mie|jueves|jue|viernes|vie|s[áa]bado|sab))' +\n '\\\\s*\\\\,?\\\\s*' +\n ')?' +\n '([0-9]{1,2})[\\\\/\\\\.\\\\-]([0-9]{1,2})' +\n '(?:' +\n '[\\\\/\\\\.\\\\-]' +\n '([0-9]{4}|[0-9]{2})' +\n ')?' +\n '(\\\\W|$)', 'i');\n\nvar DAYS_OFFSET = { 'domingo': 0, 'dom': 0, 'lunes': 1, 'lun': 1, 'martes': 2, 'mar': 2, 'miercoles': 3, 'miércoles': 3, 'mie': 3,\n 'jueves': 4, 'jue': 4, 'viernes': 5, 'vier': 5, 'sábado': 6, 'sabado': 6, 'sab': 6,}\n\n\nvar OPENNING_GROUP = 1;\nvar ENDING_GROUP = 6;\n\n// in Spanish we use day/month/year\nvar WEEKDAY_GROUP = 2;\nvar MONTH_GROUP = 4;\nvar DAY_GROUP = 3;\nvar YEAR_GROUP = 5;\n\nexports.Parser = function ESSlashDateFormatParser(argument) {\n Parser.apply(this, arguments);\n\n this.pattern = function () { return PATTERN; };\n this.extract = function(text, ref, match, opt){\n\n if(match[OPENNING_GROUP] == '/' || match[ENDING_GROUP] == '/') {\n // Long skip, if there is some overlapping like:\n // XX[/YY/ZZ]\n // [XX/YY/]ZZ\n match.index += match[0].length\n return;\n }\n\n var index = match.index + match[OPENNING_GROUP].length;\n var text = match[0].substr(match[OPENNING_GROUP].length, match[0].length - match[ENDING_GROUP].length);\n\n\n var result = new ParsedResult({\n text: text,\n index: index,\n ref: ref,\n });\n\n if(text.match(/^\\d\\.\\d$/)) return;\n if(text.match(/^\\d\\.\\d{1,2}\\.\\d{1,2}$/)) return;\n\n // MM/dd -> OK\n // MM.dd -> NG\n if(!match[YEAR_GROUP] && match[0].indexOf('/') < 0) return;\n\n var date = null;\n var year = match[YEAR_GROUP] || moment(ref).year() + '';\n var month = match[MONTH_GROUP];\n var day = match[DAY_GROUP];\n\n month = parseInt(month);\n day = parseInt(day);\n year = parseInt(year);\n\n if(month < 1 || month > 12) {\n if(month > 12) {\n // dd/mm/yyyy date format if day looks like a month, and month\n // looks like a day.\n if (day >= 1 && day <= 12 && month >= 13 && month <= 31) {\n // unambiguous\n var tday = month;\n month = day;\n day = tday;\n }\n else {\n // both month and day are <= 12\n return null;\n }\n }\n }\n if(day < 1 || day > 31) return null;\n\n if(year < 100){\n if(year > 50){\n year = year + 2500 - 543; //BE\n }else{\n year = year + 2000; //AD\n }\n }\n\n result.start.assign('day', day);\n result.start.assign('month', month);\n result.start.assign('year', year);\n\n //Day of week\n if(match[WEEKDAY_GROUP]) {\n result.start.assign('weekday', DAYS_OFFSET[match[WEEKDAY_GROUP].toLowerCase()]);\n }\n\n result.tags['ESSlashDateFormatParser'] = true;\n return result;\n };\n};\n","/*\n \n*/\nvar Refiner = require('./refiner').Refiner;\n\nexports.Refiner = function OverlapRemovalRefiner() {\n\tRefiner.call(this);\n\t\n\n\tthis.refine = function(text, results, opt) { \n\n if (results.length < 2) return results;\n \n var filteredResults = [];\n var prevResult = results[0];\n \n for (var i=1; i<results.length; i++){\n \n var result = results[i];\n \n // If overlap, compare the length and discard the shorter one\n if (result.index < prevResult.index + prevResult.text.length) {\n\n if (result.text.length > prevResult.text.length){\n prevResult = result;\n }\n \n } else {\n filteredResults.push(prevResult);\n prevResult = result;\n }\n }\n \n // The last one\n if (prevResult != null) {\n filteredResults.push(prevResult);\n }\n\n return filteredResults;\n }\n}","/*\n \n*/\nvar Refiner = require('./refiner').Refiner;\n\n\nvar TIMEZONE_OFFSET_PATTERN = new RegExp(\"^\\\\s*(GMT|UTC)?(\\\\+|\\\\-)(\\\\d{1,2}):?(\\\\d{2})\", 'i');\nvar TIMEZONE_OFFSET_SIGN_GROUP = 2;\nvar TIMEZONE_OFFSET_HOUR_OFFSET_GROUP = 3;\nvar TIMEZONE_OFFSET_MINUTE_OFFSET_GROUP = 4;\n\nexports.Refiner = function ExtractTimezoneOffsetRefiner() {\n Refiner.call(this);\n\n this.refine = function(text, results, opt) {\n\n results.forEach(function(result) {\n\n if (result.start.isCertain('timezoneOffset')) {\n return;\n }\n\n var match = TIMEZONE_OFFSET_PATTERN.exec(text.substring(result.index + result.text.length));\n if (!match) {\n return;\n }\n\n var hourOffset = parseInt(match[TIMEZONE_OFFSET_HOUR_OFFSET_GROUP]);\n var minuteOffset = parseInt(match[TIMEZONE_OFFSET_MINUTE_OFFSET_GROUP]);\n var timezoneOffset = hourOffset * 60 + minuteOffset;\n if (match[TIMEZONE_OFFSET_SIGN_GROUP] === '-') {\n timezoneOffset = -timezoneOffset;\n }\n\n if (result.end != null) {\n result.end.assign('timezoneOffset', timezoneOffset);\n }\n\n result.start.assign('timezoneOffset', timezoneOffset);\n result.text += match[0];\n result.tags['ExtractTimezoneOffsetRefiner'] = true;\n });\n\n return results;\n }\n}\n","/*\n \n*/\nvar Refiner = require('./refiner').Refiner;\n\n// Map ABBR -> Offset in minute\nvar TIMEZONE_ABBR_MAP = {};\nvar TIMEZONE_NAME_PATTERN = new RegExp(\"^\\\\s*\\\\(?([A-Z]{2,4})\\\\)?(?=\\\\W|$)\", 'i');\n\nexports.Refiner = function ExtractTimezoneAbbrRefiner() {\n\tRefiner.call(this);\n\n\tthis.refine = function(text, results, opt) {\n\n\t\tresults.forEach(function(result) {\n\n if (!result.tags['ENTimeExpressionParser']) {\n return;\n }\n\n var match = TIMEZONE_NAME_PATTERN.exec(text.substring(result.index + result.text.length));\n if (match) {\n var timezoneAbbr = match[1].toUpperCase();\n if (TIMEZONE_ABBR_MAP[timezoneAbbr] === undefined) {\n return;\n }\n\n var timezoneOffset = TIMEZONE_ABBR_MAP[timezoneAbbr];\n if (!result.start.isCertain('timezoneOffset')) {\n result.start.assign('timezoneOffset', timezoneOffset);\n }\n\n if (result.end != null && !result.end.isCertain('timezoneOffset')) {\n result.end.assign('timezoneOffset', timezoneOffset);\n }\n\n result.text += match[0];\n result.tags['ExtractTimezoneAbbrRefiner'] = true;\n }\n\t\t});\n\n return results;\n\t}\n}\n\n// TODO: Move this to some configuration\nTIMEZONE_ABBR_MAP = {\"ACDT\":630,\"ACST\":570,\"ADT\":-180,\"AEDT\":660,\"AEST\":600,\"AFT\":270,\"AKDT\":-480,\"AKST\":-540,\"ALMT\":360,\"AMST\":-180,\"AMT\":-240,\"ANAST\":720,\"ANAT\":720,\"AQTT\":300,\"ART\":-180,\"AST\":-240,\"AWDT\":540,\"AWST\":480,\"AZOST\":0,\"AZOT\":-60,\"AZST\":300,\"AZT\":240,\"BNT\":480,\"BOT\":-240,\"BRST\":-120,\"BRT\":-180,\"BST\":60,\"BTT\":360,\"CAST\":480,\"CAT\":120,\"CCT\":390,\"CDT\":-300,\"CEST\":120,\"CET\":60,\"CHADT\":825,\"CHAST\":765,\"CKT\":-600,\"CLST\":-180,\"CLT\":-240,\"COT\":-300,\"CST\":-360,\"CVT\":-60,\"CXT\":420,\"ChST\":600,\"DAVT\":420,\"EASST\":-300,\"EAST\":-360,\"EAT\":180,\"ECT\":-300,\"EDT\":-240,\"EEST\":180,\"EET\":120,\"EGST\":0,\"EGT\":-60,\"EST\":-300,\"ET\":-300,\"FJST\":780,\"FJT\":720,\"FKST\":-180,\"FKT\":-240,\"FNT\":-120,\"GALT\":-360,\"GAMT\":-540,\"GET\":240,\"GFT\":-180,\"GILT\":720,\"GMT\":0,\"GST\":240,\"GYT\":-240,\"HAA\":-180,\"HAC\":-300,\"HADT\":-540,\"HAE\":-240,\"HAP\":-420,\"HAR\":-360,\"HAST\":-600,\"HAT\":-90,\"HAY\":-480,\"HKT\":480,\"HLV\":-210,\"HNA\":-240,\"HNC\":-360,\"HNE\":-300,\"HNP\":-480,\"HNR\":-420,\"HNT\":-150,\"HNY\":-540,\"HOVT\":420,\"ICT\":420,\"IDT\":180,\"IOT\":360,\"IRDT\":270,\"IRKST\":540,\"IRKT\":540,\"IRST\":210,\"IST\":60,\"JST\":540,\"KGT\":360,\"KRAST\":480,\"KRAT\":480,\"KST\":540,\"KUYT\":240,\"LHDT\":660,\"LHST\":630,\"LINT\":840,\"MAGST\":720,\"MAGT\":720,\"MART\":-510,\"MAWT\":300,\"MDT\":-360,\"MESZ\":120,\"MEZ\":60,\"MHT\":720,\"MMT\":390,\"MSD\":240,\"MSK\":240,\"MST\":-420,\"MUT\":240,\"MVT\":300,\"MYT\":480,\"NCT\":660,\"NDT\":-90,\"NFT\":690,\"NOVST\":420,\"NOVT\":360,\"NPT\":345,\"NST\":-150,\"NUT\":-660,\"NZDT\":780,\"NZST\":720,\"OMSST\":420,\"OMST\":420,\"PDT\":-420,\"PET\":-300,\"PETST\":720,\"PETT\":720,\"PGT\":600,\"PHOT\":780,\"PHT\":480,\"PKT\":300,\"PMDT\":-120,\"PMST\":-180,\"PONT\":660,\"PST\":-480,\"PT\":-480,\"PWT\":540,\"PYST\":-180,\"PYT\":-240,\"RET\":240,\"SAMT\":240,\"SAST\":120,\"SBT\":660,\"SCT\":240,\"SGT\":480,\"SRT\":-180,\"SST\":-660,\"TAHT\":-600,\"TFT\":300,\"TJT\":300,\"TKT\":780,\"TLT\":540,\"TMT\":300,\"TVT\":720,\"ULAT\":480,\"UTC\":0,\"UYST\":-120,\"UYT\":-180,\"UZT\":300,\"VET\":-210,\"VLAST\":660,\"VLAT\":660,\"VUT\":660,\"WAST\":120,\"WAT\":60,\"WEST\":60,\"WESZ\":60,\"WET\":0,\"WEZ\":0,\"WFT\":720,\"WGST\":-120,\"WGT\":-180,\"WIB\":420,\"WIT\":540,\"WITA\":480,\"WST\":780,\"WT\":0,\"YAKST\":600,\"YAKT\":600,\"YAPT\":600,\"YEKST\":360,\"YEKT\":360}","/*\n \n*/\nvar Filter = require('./refiner').Filter;\n\nexports.Refiner = function UnlikelyFormatFilter() {\n Filter.call(this);\n \n\n this.isValid = function(text, result, opt) { \n\n if (result.text.replace(' ','').match(/^\\d*(\\.\\d*)?$/)) {\n return false;\n }\n\n return true; \n }\n}","/*\n \n*/\nvar ParsedComponents = require('../../result').ParsedComponents;\nvar Refiner = require('../refiner').Refiner;\n\n\n\nvar PATTERN = new RegExp(\"^\\\\s*(T|at|on|of|,|-)?\\\\s*$\");\n\nfunction isDateOnly(result) {\n return !result.start.isCertain('hour');\n}\n \nfunction isTimeOnly(result) {\n return !result.start.isCertain('month') && !result.start.isCertain('weekday');\n}\n\n\nfunction isAbleToMerge(text, prevResult, curResult) {\n var textBetween = text.substring(prevResult.index + prevResult.text.length, curResult.index);\n return textBetween.match(PATTERN);\n}\n\nfunction mergeResult(text, dateResult, timeResult){\n\n var beginDate = dateResult.start;\n var beginTime = timeResult.start;\n \n var beginDateTime = beginDate.clone();\n beginDateTime.assign('hour', beginTime.get('hour'));\n beginDateTime.assign('minute', beginTime.get('minute'));\n beginDateTime.assign('second', beginTime.get('second'));\n \n if (beginTime.isCertain('meridiem')) {\n beginDateTime.assign('meridiem', beginTime.get('meridiem'));\n } else if (\n beginTime.get('meridiem') !== undefined &&\n beginDateTime.get('meridiem') === undefined\n ) {\n beginDateTime.imply('meridiem', beginTime.get('meridiem'));\n }\n\n if (beginDateTime.get('meridiem') == 1 && beginDateTime.get('hour') < 12) {\n beginDateTime.assign('hour', beginDateTime.get('hour') + 12);\n }\n\n if (dateResult.end != null || timeResult.end != null) {\n \n var endDate = dateResult.end == null ? dateResult.start : dateResult.end; \n var endTime = timeResult.end == null ? timeResult.start : timeResult.end;\n\n var endDateTime = endDate.clone();\n endDateTime.assign('hour', endTime.get('hour'));\n endDateTime.assign('minute', endTime.get('minute'));\n endDateTime.assign('second', endTime.get('second'));\n \n if (endTime.isCertain('meridiem')) {\n endDateTime.assign('meridiem', endTime.get('meridiem'));\n } else if (beginTime.get('meridiem') != null) {\n endDateTime.imply('meridiem', endTime.get('meridiem'));\n }\n \n if (dateResult.end == null && endDateTime.date().getTime() < beginDateTime.date().getTime()) {\n // Ex. 9pm - 1am\n if (endDateTime.isCertain('day')) {\n endDateTime.assign('day', endDateTime.get('day') + 1);\n } else {\n endDateTime.imply('day', endDateTime.get('day') + 1);\n }\n }\n\n dateResult.end = endDateTime;\n }\n\n dateResult.start = beginDateTime; \n\n var startIndex = Math.min(dateResult.index, timeResult.index);\n var endIndex = Math.max(\n dateResult.index + dateResult.text.length, \n timeResult.index + timeResult.text.length);\n \n dateResult.index = startIndex;\n dateResult.text = text.substring(startIndex, endIndex);\n\n for (var tag in timeResult.tags) {\n dateResult.tags[tag] = true;\n }\n dateResult.tags['ENMergeDateAndTimeRefiner'] = true;\n return dateResult;\n}\n\nexports.Refiner = function ENMergeDateTimeRefiner() {\n Refiner.call(this);\n\n\n this.refine = function(text, results, opt) { \n\n if (results.length < 2) return results;\n\n var mergedResult = [];\n var currResult = null;\n var prevResult = null;\n\n for (var i = 1; i < results.length; i++) {\n\n currResult = results[i];\n prevResult = results[i-1];\n \n if (isDateOnly(prevResult) && isTimeOnly(currResult) \n && isAbleToMerge(text, prevResult, currResult)) {\n \n prevResult = mergeResult(text, prevResult, currResult);\n currResult = null;\n i += 1;\n \n } else if (isDateOnly(currResult) && isTimeOnly(prevResult)\n && isAbleToMerge(text, prevResult, currResult)) {\n \n prevResult = mergeResult(text, currResult, prevResult);\n currResult = null;\n i += 1;\n }\n \n mergedResult.push(prevResult);\n }\n\n if (currResult != null) {\n mergedResult.push(currResult);\n }\n\n return mergedResult;\n }\n}","/*\n \n*/\nvar Refiner = require('../refiner').Refiner;\n\nexports.Refiner = function ENMergeDateRangeRefiner() {\n Refiner.call(this);\n\n this.pattern = function () { return /^\\s*(to|\\-)\\s*$/i };\n\n this.refine = function(text, results, opt) {\n\n if (results.length < 2) return results;\n \n var mergedResult = [];\n var currResult = null;\n var prevResult = null;\n \n for (var i=1; i<results.length; i++){\n \n currResult = results[i];\n prevResult = results[i-1];\n \n if (!prevResult.end && !currResult.end \n && this.isAbleToMerge(text, prevResult, currResult)) {\n \n prevResult = this.mergeResult(text, prevResult, currResult);\n currResult = null;\n i += 1;\n }\n \n mergedResult.push(prevResult);\n }\n \n if (currResult != null) {\n mergedResult.push(currResult);\n }\n\n\n return mergedResult;\n };\n\n this.isAbleToMerge = function(text, result1, result2) {\n var begin = result1.index + result1.text.length;\n var end = result2.index;\n var textBetween = text.substring(begin,end);\n\n return textBetween.match(this.pattern());\n };\n\n this.isWeekdayResult = function (result) {\n return result.start.isCertain('weekday') && !result.start.isCertain('day');\n };\n\n this.mergeResult = function(text, fromResult, toResult) {\n\n if (!this.isWeekdayResult(fromResult) && !this.isWeekdayResult(toResult)) {\n\n for (var key in toResult.start.knownValues) {\n if (!fromResult.start.isCertain(key)) {\n fromResult.start.assign(key, toResult.start.get(key));\n }\n }\n\n for (var key in fromResult.start.knownValues) {\n if (!toResult.start.isCertain(key)) {\n toResult.start.assign(key, fromResult.start.get(key));\n }\n }\n }\n\n if (fromResult.start.date().getTime() > toResult.start.date()) {\n var tmp = toResult;\n toResult = fromResult;\n fromResult = tmp;\n }\n \n fromResult.end = toResult.start;\n\n \n\n for (var tag in toResult.tags) {\n fromResult.tags[tag] = true;\n }\n\n \n var startIndex = Math.min(fromResult.index, toResult.index);\n var endIndex = Math.max(\n fromResult.index + fromResult.text.length, \n toResult.index + toResult.text.length);\n \n fromResult.index = startIndex;\n fromResult.text = text.substring(startIndex, endIndex);\n fromResult.tags[this.constructor.name] = true;\n return fromResult;\n }\n};\n\n","/*\n \n*/\nvar ENMergeDateRangeRefiner = require('../EN/ENMergeDateRangeRefiner').Refiner;\n\nexports.Refiner = function JPMergeDateRangeRefiner() {\n ENMergeDateRangeRefiner.call(this);\n\n this.pattern = function () { return /^\\s*(から|ー)\\s*$/i };\n}\n\n","exports.WEEKDAY_OFFSET = { \n 'sunday': 0, \n 'sun': 0, \n 'monday': 1, \n 'mon': 1,\n 'tuesday': 2, \n 'tue':2, \n 'wednesday': 3, \n 'wed': 3, \n 'thursday': 4, \n 'thur': 4, \n 'thu': 4,\n 'friday': 5, \n 'fri': 5,\n 'saturday': 6, \n 'sat': 6\n};\n \nexports.MONTH_OFFSET = { \n 'january': 1,\n 'jan': 1,\n 'jan.': 1,\n 'february': 2,\n 'feb': 2,\n 'feb.': 2,\n 'march': 3,\n 'mar': 3,\n 'mar.': 3,\n 'april': 4,\n 'apr': 4,\n 'apr.': 4,\n 'may': 5,\n 'june': 6,\n 'jun': 6,\n 'jun.': 6,\n 'july': 7,\n 'jul': 7,\n 'jul.': 7,\n 'august': 8,\n 'aug': 8,\n 'aug.': 8,\n 'september': 9,\n 'sep': 9,\n 'sep.': 9,\n 'sept': 9,\n 'sept.': 9,\n 'october': 10,\n 'oct': 10,\n 'oct.': 10,\n 'november': 11,\n 'nov': 11,\n 'nov.': 11,\n 'december': 12,\n 'dec': 12,\n 'dec.': 12\n};\n\nexports.INTEGER_WORDS_PATTERN = '(?:one|two|three|four|five|six|seven|eight|nine|ten|eleven|twelve)';\nexports.INTEGER_WORDS = {\n 'one' : 1,\n 'two' : 2,\n 'three' : 3,\n 'four' : 4,\n 'five' : 5,\n 'six' : 6,\n 'seven' : 7,\n 'eight' : 8,\n 'nine' : 9,\n 'ten' : 10,\n 'eleven' : 11,\n 'twelve' : 12\n};\n","\n\n/**\n * to-hankaku.js\n * convert to ascii code strings.\n *\n * @version 1.0.1\n * @author think49\n * @url https://gist.github.com/964592\n * @license http://www.opensource.org/licenses/mit-license.php (The MIT License)\n */\n \nexports.toHankaku = (function (String, fromCharCode) {\n \n function toHankaku (string) {\n return String(string).replace(/\\u2019/g, '\\u0027').replace(/\\u201D/g, '\\u0022').replace(/\\u3000/g, '\\u0020').replace(/\\uFFE5/g, '\\u00A5').replace(/[\\uFF01\\uFF03-\\uFF06\\uFF08\\uFF09\\uFF0C-\\uFF19\\uFF1C-\\uFF1F\\uFF21-\\uFF3B\\uFF3D\\uFF3F\\uFF41-\\uFF5B\\uFF5D\\uFF5E]/g, alphaNum);\n }\n \n function alphaNum (token) {\n return fromCharCode(token.charCodeAt(0) - 65248);\n }\n \n return toHankaku;\n})(String, String.fromCharCode);\n\n/**\n * to-zenkaku.js\n * convert to multi byte strings.\n *\n * @version 1.0.2\n * @author think49\n * @url https://gist.github.com/964592\n * @license http://www.opensource.org/licenses/mit-license.php (The MIT License)\n */\nexports.toZenkaku = (function (String, fromCharCode) {\n \n function toZenkaku (string) {\n return String(string).replace(/\\u0020/g, '\\u3000').replace(/\\u0022/g, '\\u201D').replace(/\\u0027/g, '\\u2019').replace(/\\u00A5/g, '\\uFFE5').replace(/[!#-&(),-9\\u003C-?A-[\\u005D_a-{}~]/g, alphaNum);\n }\n \n function alphaNum (token) {\n return fromCharCode(token.charCodeAt(0) + 65248);\n }\n \n return toZenkaku;\n})(String, String.fromCharCode);","exports.WEEKDAY_OFFSET = {\n 'domingo': 0,\n 'dom': 0,\n 'lunes': 1,\n 'lun': 1,\n 'martes': 2,\n 'mar':2,\n 'miércoles': 3,\n 'miercoles': 3,\n 'mie': 3,\n 'jueves': 4,\n 'jue': 4,\n 'viernes': 5,\n 'vie': 5,\n 'sábado': 6,\n 'sabado': 6,\n 'sab': 6,}\n\nexports.MONTH_OFFSET = {\n 'enero': 1,\n 'ene': 1,\n 'ene.': 1,\n 'febrero': 2,\n 'feb': 2,\n 'feb.': 2,\n 'marzo': 3,\n 'mar': 3,\n 'mar.': 3,\n 'abril': 4,\n 'abr': 4,\n 'abr.': 4,\n 'mayo': 5,\n 'may': 5,\n 'may.': 5,\n 'junio': 6,\n 'jun': 6,\n 'jun.': 6,\n 'julio': 7,\n 'jul': 7,\n 'jul.': 7,\n 'agosto': 8,\n 'ago': 8,\n 'ago.': 8,\n 'septiembre': 9,\n 'sep': 9,\n 'sept': 9,\n 'sep.': 9,\n 'sept.': 9,\n 'octubre': 10,\n 'oct': 10,\n 'oct.': 10,\n 'noviembre': 11,\n 'nov': 11,\n 'nov.': 11,\n 'diciembre': 12,\n 'dic': 12,\n 'dic.': 12,\n}\n","//! moment.js\n//! version : 2.10.3\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n global.moment = factory()\n}(this, function () { 'use strict';\n\n var hookCallback;\n\n function utils_hooks__hooks () {\n return hookCallback.apply(null, arguments);\n }\n\n // This is done to register the method called with moment()\n // without creating circular dependencies.\n function setHookCallback (callback) {\n hookCallback = callback;\n }\n\n function isArray(input) {\n return Object.prototype.toString.call(input) === '[object Array]';\n }\n\n function isDate(input) {\n return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';\n }\n\n function map(arr, fn) {\n var res = [], i;\n for (i = 0; i < arr.length; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n }\n\n function hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n }\n\n function extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n }\n\n function create_utc__createUTC (input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n }\n\n function defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty : false,\n unusedTokens : [],\n unusedInput : [],\n overflow : -2,\n charsLeftOver : 0,\n nullInput : false,\n invalidMonth : null,\n invalidFormat : false,\n userInvalidated : false,\n iso : false\n };\n }\n\n function getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n }\n\n function valid__isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m);\n m._isValid = !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidMonth &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated;\n\n if (m._strict) {\n m._isValid = m._isValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n }\n return m._isValid;\n }\n\n function valid__createInvalid (flags) {\n var m = create_utc__createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n }\n else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n }\n\n var momentProperties = utils_hooks__hooks.momentProperties = [];\n\n function copyConfig(to, from) {\n var i, prop, val;\n\n if (typeof from._isAMomentObject !== 'undefined') {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (typeof from._i !== 'undefined') {\n to._i = from._i;\n }\n if (typeof from._f !== 'undefined') {\n to._f = from._f;\n }\n if (typeof from._l !== 'undefined') {\n to._l = from._l;\n }\n if (typeof from._strict !== 'undefined') {\n to._strict = from._strict;\n }\n if (typeof from._tzm !== 'undefined') {\n to._tzm = from._tzm;\n }\n if (typeof from._isUTC !== 'undefined') {\n to._isUTC = from._isUTC;\n }\n if (typeof from._offset !== 'undefined') {\n to._offset = from._offset;\n }\n if (typeof from._pf !== 'undefined') {\n to._pf = getParsingFlags(from);\n }\n if (typeof from._locale !== 'undefined') {\n to._locale = from._locale;\n }\n\n if (momentProperties.length > 0) {\n for (i in momentProperties) {\n prop = momentProperties[i];\n val = from[prop];\n if (typeof val !== 'undefined') {\n to[prop] = val;\n }\n }\n }\n\n return to;\n }\n\n var updateInProgress = false;\n\n // Moment prototype object\n function Moment(config) {\n copyConfig(this, config);\n this._d = new Date(+config._d);\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n utils_hooks__hooks.updateOffset(this);\n updateInProgress = false;\n }\n }\n\n function isMoment (obj) {\n return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);\n }\n\n function toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n if (coercedNumber >= 0) {\n value = Math.floor(coercedNumber);\n } else {\n value = Math.ceil(coercedNumber);\n }\n }\n\n return value;\n }\n\n function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }\n\n function Locale() {\n }\n\n var locales = {};\n var globalLocale;\n\n function normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n }\n\n // pick the locale from the array\n // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n }\n\n function loadLocale(name) {\n var oldLocale = null;\n // TODO: Find a better way to register and load all the locales in Node\n if (!locales[name] && typeof module !== 'undefined' &&\n module && module.exports) {\n try {\n oldLocale = globalLocale._abbr;\n require('./locale/' + name);\n // because defineLocale currently also sets the global locale, we\n // want to undo that for lazy loaded locales\n locale_locales__getSetGlobalLocale(oldLocale);\n } catch (e) { }\n }\n return locales[name];\n }\n\n // This function will load locale and then set the global locale. If\n // no arguments are passed in, it will simply return the current global\n // locale key.\n function locale_locales__getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (typeof values === 'undefined') {\n data = locale_locales__getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }\n\n function defineLocale (name, values) {\n if (values !== null) {\n values.abbr = name;\n if (!locales[name]) {\n locales[name] = new Locale();\n }\n locales[name].set(values);\n\n // backwards compat for now: also set the locale\n locale_locales__getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n }\n\n // returns locale data\n function locale_locales__getLocale (key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n }\n\n var aliases = {};\n\n function addUnitAlias (unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n }\n\n function normalizeUnits(units) {\n return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;\n }\n\n function normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n }\n\n function makeGetSet (unit, keepTime) {\n return function (value) {\n if (value != null) {\n get_set__set(this, unit, value);\n utils_hooks__hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get_set__get(this, unit);\n }\n };\n }\n\n function get_set__get (mom, unit) {\n return mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]();\n }\n\n function get_set__set (mom, unit, value) {\n return mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n\n // MOMENTS\n\n function getSet (units, value) {\n var unit;\n if (typeof units === 'object') {\n for (unit in units) {\n this.set(unit, units[unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (typeof this[units] === 'function') {\n return this[units](value);\n }\n }\n return this;\n }\n\n function zeroFill(number, targetLength, forceSign) {\n var output = '' + Math.abs(number),\n sign = number >= 0;\n\n while (output.length < targetLength) {\n output = '0' + output;\n }\n return (sign ? (forceSign ? '+' : '') : '-') + output;\n }\n\n var formattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|x|X|zz?|ZZ?|.)/g;\n\n var localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g;\n\n var formatFunctions = {};\n\n var formatTokenFunctions = {};\n\n // token: 'M'\n // padded: ['MM', 2]\n // ordinal: 'Mo'\n // callback: function () { this.month() + 1 }\n function addFormatToken (token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(func.apply(this, arguments), token);\n };\n }\n }\n\n function removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n }\n\n function makeFormatFunction(format) {\n var array = format.match(formattingTokens), i, length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '';\n for (i = 0; i < length; i++) {\n output += array[i] instanceof Function ? array[i].call(mom, format) : array[i];\n }\n return output;\n };\n }\n\n // format date using native date object\n function formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n\n if (!formatFunctions[format]) {\n formatFunctions[format] = makeFormatFunction(format);\n }\n\n return formatFunctions[format](m);\n }\n\n function expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n }\n\n var match1 = /\\d/; // 0 - 9\n var match2 = /\\d\\d/; // 00 - 99\n var match3 = /\\d{3}/; // 000 - 999\n var match4 = /\\d{4}/; // 0000 - 9999\n var match6 = /[+-]?\\d{6}/; // -999999 - 999999\n var match1to2 = /\\d\\d?/; // 0 - 99\n var match1to3 = /\\d{1,3}/; // 0 - 999\n var match1to4 = /\\d{1,4}/; // 0 - 9999\n var match1to6 = /[+-]?\\d{1,6}/; // -999999 - 999999\n\n var matchUnsigned = /\\d+/; // 0 - inf\n var matchSigned = /[+-]?\\d+/; // -inf - inf\n\n var matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi; // +00:00 -00:00 +0000 -0000 or Z\n\n var matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/; // 123456789 123456789.123\n\n // any word (or two) characters or numbers including two/three word month in arabic.\n var matchWord = /[0-9]*['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]+|[\\u0600-\\u06FF\\/]+(\\s*?[\\u0600-\\u06FF]+){1,2}/i;\n\n var regexes = {};\n\n function addRegexToken (token, regex, strictRegex) {\n regexes[token] = typeof regex === 'function' ? regex : function (isStrict) {\n return (isStrict && strictRegex) ? strictRegex : regex;\n };\n }\n\n function getParseRegexForToken (token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n }\n\n // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n function unescapeFormat(s) {\n return s.replace('\\\\', '').replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }).replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n var tokens = {};\n\n function addParseToken (token, callback) {\n var i, func = callback;\n if (typeof token === 'string') {\n token = [token];\n }\n if (typeof callback === 'number') {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n for (i = 0; i < token.length; i++) {\n tokens[token[i]] = func;\n }\n }\n\n function addWeekParseToken (token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n }\n\n function addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n }\n\n var YEAR = 0;\n var MONTH = 1;\n var DATE = 2;\n var HOUR = 3;\n var MINUTE = 4;\n var SECOND = 5;\n var MILLISECOND = 6;\n\n function daysInMonth(year, month) {\n return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();\n }\n\n // FORMATTING\n\n addFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n });\n\n addFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n });\n\n addFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n });\n\n // ALIASES\n\n addUnitAlias('month', 'M');\n\n // PARSING\n\n addRegexToken('M', match1to2);\n addRegexToken('MM', match1to2, match2);\n addRegexToken('MMM', matchWord);\n addRegexToken('MMMM', matchWord);\n\n addParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n });\n\n addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n });\n\n // LOCALES\n\n var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');\n function localeMonths (m) {\n return this._months[m.month()];\n }\n\n var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');\n function localeMonthsShort (m) {\n return this._monthsShort[m.month()];\n }\n\n function localeMonthsParse (monthName, format, strict) {\n var i, mom, regex;\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = create_utc__createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');\n this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');\n }\n if (!strict && !this._monthsParse[i]) {\n regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {\n return i;\n } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n }\n\n // MOMENTS\n\n function setMonth (mom, value) {\n var dayOfMonth;\n\n // TODO: Move this out of here!\n if (typeof value === 'string') {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (typeof value !== 'number') {\n return mom;\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n }\n\n function getSetMonth (value) {\n if (value != null) {\n setMonth(this, value);\n utils_hooks__hooks.updateOffset(this, true);\n return this;\n } else {\n return get_set__get(this, 'Month');\n }\n }\n\n function getDaysInMonth () {\n return daysInMonth(this.year(), this.month());\n }\n\n function checkOverflow (m) {\n var overflow;\n var a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :\n a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :\n a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :\n a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :\n a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :\n a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :\n -1;\n\n if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {\n overflow = DATE;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n }\n\n function warn(msg) {\n if (utils_hooks__hooks.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) {\n console.warn('Deprecation warning: ' + msg);\n }\n }\n\n function deprecate(msg, fn) {\n var firstTime = true,\n msgWithStack = msg + '\\n' + (new Error()).stack;\n\n return extend(function () {\n if (firstTime) {\n warn(msgWithStack);\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n }\n\n var deprecations = {};\n\n function deprecateSimple(name, msg) {\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n }\n\n utils_hooks__hooks.suppressDeprecationWarnings = false;\n\n var from_string__isoRegex = /^\\s*(?:[+-]\\d{6}|\\d{4})-(?:(\\d\\d-\\d\\d)|(W\\d\\d$)|(W\\d\\d-\\d)|(\\d\\d\\d))((T| )(\\d\\d(:\\d\\d(:\\d\\d(\\.\\d+)?)?)?)?([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n\n var isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d{2}-\\d{2}/],\n ['YYYY-MM-DD', /\\d{4}-\\d{2}-\\d{2}/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d{2}-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d{2}/],\n ['YYYY-DDD', /\\d{4}-\\d{3}/]\n ];\n\n // iso time formats and regexes\n var isoTimes = [\n ['HH:mm:ss.SSSS', /(T| )\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss', /(T| )\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /(T| )\\d\\d:\\d\\d/],\n ['HH', /(T| )\\d\\d/]\n ];\n\n var aspNetJsonRegex = /^\\/?Date\\((\\-?\\d+)/i;\n\n // date from iso format\n function configFromISO(config) {\n var i, l,\n string = config._i,\n match = from_string__isoRegex.exec(string);\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(matchOffset)) {\n config._f += 'Z';\n }\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }\n\n // date from iso format or fallback\n function configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n utils_hooks__hooks.createFromInputFallback(config);\n }\n }\n\n utils_hooks__hooks.createFromInputFallback = deprecate(\n 'moment construction falls back to js Date. This is ' +\n 'discouraged and will be removed in upcoming major ' +\n 'release. Please refer to ' +\n 'https://github.com/moment/moment/issues/1407 for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n );\n\n function createDate (y, m, d, h, M, s, ms) {\n //can't just apply() to create a date:\n //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply\n var date = new Date(y, m, d, h, M, s, ms);\n\n //the date constructor doesn't accept years < 1970\n if (y < 1970) {\n date.setFullYear(y);\n }\n return date;\n }\n\n function createUTCDate (y) {\n var date = new Date(Date.UTC.apply(null, arguments));\n if (y < 1970) {\n date.setUTCFullYear(y);\n }\n return date;\n }\n\n addFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n });\n\n addFormatToken(0, ['YYYY', 4], 0, 'year');\n addFormatToken(0, ['YYYYY', 5], 0, 'year');\n addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n // ALIASES\n\n addUnitAlias('year', 'y');\n\n // PARSING\n\n addRegexToken('Y', matchSigned);\n addRegexToken('YY', match1to2, match2);\n addRegexToken('YYYY', match1to4, match4);\n addRegexToken('YYYYY', match1to6, match6);\n addRegexToken('YYYYYY', match1to6, match6);\n\n addParseToken(['YYYY', 'YYYYY', 'YYYYYY'], YEAR);\n addParseToken('YY', function (input, array) {\n array[YEAR] = utils_hooks__hooks.parseTwoDigitYear(input);\n });\n\n // HELPERS\n\n function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n }\n\n function isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n }\n\n // HOOKS\n\n utils_hooks__hooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n };\n\n // MOMENTS\n\n var getSetYear = makeGetSet('FullYear', false);\n\n function getIsLeapYear () {\n return isLeapYear(this.year());\n }\n\n addFormatToken('w', ['ww', 2], 'wo', 'week');\n addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n // ALIASES\n\n addUnitAlias('week', 'w');\n addUnitAlias('isoWeek', 'W');\n\n // PARSING\n\n addRegexToken('w', match1to2);\n addRegexToken('ww', match1to2, match2);\n addRegexToken('W', match1to2);\n addRegexToken('WW', match1to2, match2);\n\n addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n });\n\n // HELPERS\n\n // firstDayOfWeek 0 = sun, 6 = sat\n // the day of the week that starts the week\n // (usually sunday or monday)\n // firstDayOfWeekOfYear 0 = sun, 6 = sat\n // the first week is the week that contains the first\n // of this day of the week\n // (eg. ISO weeks use thursday (4))\n function weekOfYear(mom, firstDayOfWeek, firstDayOfWeekOfYear) {\n var end = firstDayOfWeekOfYear - firstDayOfWeek,\n daysToDayOfWeek = firstDayOfWeekOfYear - mom.day(),\n adjustedMoment;\n\n\n if (daysToDayOfWeek > end) {\n daysToDayOfWeek -= 7;\n }\n\n if (daysToDayOfWeek < end - 7) {\n daysToDayOfWeek += 7;\n }\n\n adjustedMoment = local__createLocal(mom).add(daysToDayOfWeek, 'd');\n return {\n week: Math.ceil(adjustedMoment.dayOfYear() / 7),\n year: adjustedMoment.year()\n };\n }\n\n // LOCALES\n\n function localeWeek (mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n }\n\n var defaultLocaleWeek = {\n dow : 0, // Sunday is the first day of the week.\n doy : 6 // The week that contains Jan 1st is the first week of the year.\n };\n\n function localeFirstDayOfWeek () {\n return this._week.dow;\n }\n\n function localeFirstDayOfYear () {\n return this._week.doy;\n }\n\n // MOMENTS\n\n function getSetWeek (input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n function getSetISOWeek (input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n // ALIASES\n\n addUnitAlias('dayOfYear', 'DDD');\n\n // PARSING\n\n addRegexToken('DDD', match1to3);\n addRegexToken('DDDD', match3);\n addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n });\n\n // HELPERS\n\n //http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n function dayOfYearFromWeeks(year, week, weekday, firstDayOfWeekOfYear, firstDayOfWeek) {\n var d = createUTCDate(year, 0, 1).getUTCDay();\n var daysToAdd;\n var dayOfYear;\n\n d = d === 0 ? 7 : d;\n weekday = weekday != null ? weekday : firstDayOfWeek;\n daysToAdd = firstDayOfWeek - d + (d > firstDayOfWeekOfYear ? 7 : 0) - (d < firstDayOfWeek ? 7 : 0);\n dayOfYear = 7 * (week - 1) + (weekday - firstDayOfWeek) + daysToAdd + 1;\n\n return {\n year : dayOfYear > 0 ? year : year - 1,\n dayOfYear : dayOfYear > 0 ? dayOfYear : daysInYear(year - 1) + dayOfYear\n };\n }\n\n // MOMENTS\n\n function getSetDayOfYear (input) {\n var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;\n return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');\n }\n\n // Pick the first defined of two or three arguments.\n function defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n }\n\n function currentDateArray(config) {\n var now = new Date();\n if (config._useUTC) {\n return [now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate()];\n }\n return [now.getFullYear(), now.getMonth(), now.getDate()];\n }\n\n // convert an array to a date.\n // the array should mirror the parameters below\n // note: all values past the year are optional and will default to the lowest possible value.\n // [year, month, day , hour, minute, second, millisecond]\n function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }\n\n function dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(local__createLocal(), 1, 4).year);\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n weekYear = defaults(w.gg, config._a[YEAR], weekOfYear(local__createLocal(), dow, doy).year);\n week = defaults(w.w, 1);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < dow) {\n ++week;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from begining of week\n weekday = w.e + dow;\n } else {\n // default to begining of week\n weekday = dow;\n }\n }\n temp = dayOfYearFromWeeks(weekYear, week, weekday, doy, dow);\n\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n\n utils_hooks__hooks.ISO_8601 = function () {};\n\n // date from string and format string\n function configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === utils_hooks__hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n }\n else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (getParsingFlags(config).bigHour === true &&\n config._a[HOUR] <= 12 &&\n config._a[HOUR] > 0) {\n getParsingFlags(config).bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);\n\n configFromArray(config);\n checkOverflow(config);\n }\n\n\n function meridiemFixWrap (locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n }\n\n function configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (!valid__isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }\n\n function configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i);\n config._a = [i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond];\n\n configFromArray(config);\n }\n\n function createFromConfig (config) {\n var input = config._i,\n format = config._f,\n res;\n\n config._locale = config._locale || locale_locales__getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return valid__createInvalid({nullInput: true});\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else if (isDate(input)) {\n config._d = input;\n } else {\n configFromInput(config);\n }\n\n res = new Moment(checkOverflow(config));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n }\n\n function configFromInput(config) {\n var input = config._i;\n if (input === undefined) {\n config._d = new Date();\n } else if (isDate(input)) {\n config._d = new Date(+input);\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (typeof(input) === 'object') {\n configFromObject(config);\n } else if (typeof(input) === 'number') {\n // from milliseconds\n config._d = new Date(input);\n } else {\n utils_hooks__hooks.createFromInputFallback(config);\n }\n }\n\n function createLocalOrUTC (input, format, locale, strict, isUTC) {\n var c = {};\n\n if (typeof(locale) === 'boolean') {\n strict = locale;\n locale = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n }\n\n function local__createLocal (input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n }\n\n var prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548',\n function () {\n var other = local__createLocal.apply(null, arguments);\n return other < this ? this : other;\n }\n );\n\n var prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548',\n function () {\n var other = local__createLocal.apply(null, arguments);\n return other > this ? this : other;\n }\n );\n\n // Pick a moment m from moments so that m[fn](other) is true for all\n // other. This relies on the function fn to be transitive.\n //\n // moments should either be an array of moment objects or an array, whose\n // first element is an array of moment objects.\n function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return local__createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }\n\n // TODO: Use [].sort instead?\n function min () {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n }\n\n function max () {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n }\n\n function Duration (duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n // representation for dateAddRemove\n this._milliseconds = +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 36e5; // 1000 * 60 * 60\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days +\n weeks * 7;\n // It is impossible translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months +\n quarters * 3 +\n years * 12;\n\n this._data = {};\n\n this._locale = locale_locales__getLocale();\n\n this._bubble();\n }\n\n function isDuration (obj) {\n return obj instanceof Duration;\n }\n\n function offset (token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset();\n var sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);\n });\n }\n\n offset('Z', ':');\n offset('ZZ', '');\n\n // PARSING\n\n addRegexToken('Z', matchOffset);\n addRegexToken('ZZ', matchOffset);\n addParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(input);\n });\n\n // HELPERS\n\n // timezone chunker\n // '+10:00' > ['10', '00']\n // '-1530' > ['-15', '30']\n var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n function offsetFromString(string) {\n var matches = ((string || '').match(matchOffset) || []);\n var chunk = matches[matches.length - 1] || [];\n var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n var minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return parts[0] === '+' ? minutes : -minutes;\n }\n\n // Return a moment from input, that is local/utc/zone equivalent to model.\n function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }\n\n function getDateOffset (m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset() / 15) * 15;\n }\n\n // HOOKS\n\n // This function will be called whenever a moment is mutated.\n // It is intended to keep the offset in sync with the timezone.\n utils_hooks__hooks.updateOffset = function () {};\n\n // MOMENTS\n\n // keepLocalTime = true means only change the timezone, without\n // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n // +0200, so we adjust the time as needed, to be valid.\n //\n // Keeping the time actually adds/subtracts (one hour)\n // from the actual represented time. That is why we call updateOffset\n // a second time. In case it wants us to change the offset again\n // _changeInProgress == true case, then we have to adjust, because\n // there is no such time in the given timezone.\n function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }\n\n function getSetZone (input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n }\n\n function setOffsetToUTC (keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n }\n\n function setOffsetToLocal (keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n }\n\n function setOffsetToParsedOffset () {\n if (this._tzm) {\n this.utcOffset(this._tzm);\n } else if (typeof this._i === 'string') {\n this.utcOffset(offsetFromString(this._i));\n }\n return this;\n }\n\n function hasAlignedHourOffset (input) {\n if (!input) {\n input = 0;\n }\n else {\n input = local__createLocal(input).utcOffset();\n }\n\n return (this.utcOffset() - input) % 60 === 0;\n }\n\n function isDaylightSavingTime () {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n }\n\n function isDaylightSavingTimeShifted () {\n if (this._a) {\n var other = this._isUTC ? create_utc__createUTC(this._a) : local__createLocal(this._a);\n return this.isValid() && compareArrays(this._a, other.toArray()) > 0;\n }\n\n return false;\n }\n\n function isLocal () {\n return !this._isUTC;\n }\n\n function isUtcOffset () {\n return this._isUTC;\n }\n\n function isUtc () {\n return this._isUTC && this._offset === 0;\n }\n\n var aspNetRegex = /(\\-)?(?:(\\d*)\\.)?(\\d+)\\:(\\d+)(?:\\:(\\d+)\\.?(\\d{3})?)?/;\n\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n var create__isoRegex = /^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;\n\n function create__createDuration (input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms : input._milliseconds,\n d : input._days,\n M : input._months\n };\n } else if (typeof input === 'number') {\n duration = {};\n if (key) {\n duration[key] = input;\n } else {\n duration.milliseconds = input;\n }\n } else if (!!(match = aspNetRegex.exec(input))) {\n sign = (match[1] === '-') ? -1 : 1;\n duration = {\n y : 0,\n d : toInt(match[DATE]) * sign,\n h : toInt(match[HOUR]) * sign,\n m : toInt(match[MINUTE]) * sign,\n s : toInt(match[SECOND]) * sign,\n ms : toInt(match[MILLISECOND]) * sign\n };\n } else if (!!(match = create__isoRegex.exec(input))) {\n sign = (match[1] === '-') ? -1 : 1;\n duration = {\n y : parseIso(match[2], sign),\n M : parseIso(match[3], sign),\n d : parseIso(match[4], sign),\n h : parseIso(match[5], sign),\n m : parseIso(match[6], sign),\n s : parseIso(match[7], sign),\n w : parseIso(match[8], sign)\n };\n } else if (duration == null) {// checks for null or undefined\n duration = {};\n } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {\n diffRes = momentsDifference(local__createLocal(duration.from), local__createLocal(duration.to));\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n return ret;\n }\n\n create__createDuration.fn = Duration.prototype;\n\n function parseIso (inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n }\n\n function positiveMomentsDifference(base, other) {\n var res = {milliseconds: 0, months: 0};\n\n res.months = other.month() - base.month() +\n (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +(base.clone().add(res.months, 'M'));\n\n return res;\n }\n\n function momentsDifference(base, other) {\n var res;\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n }\n\n function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period).');\n tmp = val; val = period; period = tmp;\n }\n\n val = typeof val === 'string' ? +val : val;\n dur = create__createDuration(val, period);\n add_subtract__addSubtract(this, dur, direction);\n return this;\n };\n }\n\n function add_subtract__addSubtract (mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = duration._days,\n months = duration._months;\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (milliseconds) {\n mom._d.setTime(+mom._d + milliseconds * isAdding);\n }\n if (days) {\n get_set__set(mom, 'Date', get_set__get(mom, 'Date') + days * isAdding);\n }\n if (months) {\n setMonth(mom, get_set__get(mom, 'Month') + months * isAdding);\n }\n if (updateOffset) {\n utils_hooks__hooks.updateOffset(mom, days || months);\n }\n }\n\n var add_subtract__add = createAdder(1, 'add');\n var add_subtract__subtract = createAdder(-1, 'subtract');\n\n function moment_calendar__calendar (time) {\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || local__createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n diff = this.diff(sod, 'days', true),\n format = diff < -6 ? 'sameElse' :\n diff < -1 ? 'lastWeek' :\n diff < 0 ? 'lastDay' :\n diff < 1 ? 'sameDay' :\n diff < 2 ? 'nextDay' :\n diff < 7 ? 'nextWeek' : 'sameElse';\n return this.format(this.localeData().calendar(format, this, local__createLocal(now)));\n }\n\n function clone () {\n return new Moment(this);\n }\n\n function isAfter (input, units) {\n var inputMs;\n units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond');\n if (units === 'millisecond') {\n input = isMoment(input) ? input : local__createLocal(input);\n return +this > +input;\n } else {\n inputMs = isMoment(input) ? +input : +local__createLocal(input);\n return inputMs < +this.clone().startOf(units);\n }\n }\n\n function isBefore (input, units) {\n var inputMs;\n units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond');\n if (units === 'millisecond') {\n input = isMoment(input) ? input : local__createLocal(input);\n return +this < +input;\n } else {\n inputMs = isMoment(input) ? +input : +local__createLocal(input);\n return +this.clone().endOf(units) < inputMs;\n }\n }\n\n function isBetween (from, to, units) {\n return this.isAfter(from, units) && this.isBefore(to, units);\n }\n\n function isSame (input, units) {\n var inputMs;\n units = normalizeUnits(units || 'millisecond');\n if (units === 'millisecond') {\n input = isMoment(input) ? input : local__createLocal(input);\n return +this === +input;\n } else {\n inputMs = +local__createLocal(input);\n return +(this.clone().startOf(units)) <= inputMs && inputMs <= +(this.clone().endOf(units));\n }\n }\n\n function absFloor (number) {\n if (number < 0) {\n return Math.ceil(number);\n } else {\n return Math.floor(number);\n }\n }\n\n function diff (input, units, asFloat) {\n var that = cloneWithOffset(input, this),\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4,\n delta, output;\n\n units = normalizeUnits(units);\n\n if (units === 'year' || units === 'month' || units === 'quarter') {\n output = monthDiff(this, that);\n if (units === 'quarter') {\n output = output / 3;\n } else if (units === 'year') {\n output = output / 12;\n }\n } else {\n delta = this - that;\n output = units === 'second' ? delta / 1e3 : // 1000\n units === 'minute' ? delta / 6e4 : // 1000 * 60\n units === 'hour' ? delta / 36e5 : // 1000 * 60 * 60\n units === 'day' ? (delta - zoneDelta) / 864e5 : // 1000 * 60 * 60 * 24, negate dst\n units === 'week' ? (delta - zoneDelta) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst\n delta;\n }\n return asFloat ? output : absFloor(output);\n }\n\n function monthDiff (a, b) {\n // difference in months\n var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2, adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n return -(wholeMonthDiff + adjust);\n }\n\n utils_hooks__hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n\n function toString () {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n }\n\n function moment_format__toISOString () {\n var m = this.clone().utc();\n if (0 < m.year() && m.year() <= 9999) {\n if ('function' === typeof Date.prototype.toISOString) {\n // native implementation is ~50x faster, use it when we can\n return this.toDate().toISOString();\n } else {\n return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');\n }\n } else {\n return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');\n }\n }\n\n function format (inputString) {\n var output = formatMoment(this, inputString || utils_hooks__hooks.defaultFormat);\n return this.localeData().postformat(output);\n }\n\n function from (time, withoutSuffix) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n return create__createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);\n }\n\n function fromNow (withoutSuffix) {\n return this.from(local__createLocal(), withoutSuffix);\n }\n\n function to (time, withoutSuffix) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n return create__createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);\n }\n\n function toNow (withoutSuffix) {\n return this.to(local__createLocal(), withoutSuffix);\n }\n\n function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = locale_locales__getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n }\n\n var lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n );\n\n function localeData () {\n return this._locale;\n }\n\n function startOf (units) {\n units = normalizeUnits(units);\n // the following switch intentionally omits break keywords\n // to utilize falling through the cases.\n switch (units) {\n case 'year':\n this.month(0);\n /* falls through */\n case 'quarter':\n case 'month':\n this.date(1);\n /* falls through */\n case 'week':\n case 'isoWeek':\n case 'day':\n this.hours(0);\n /* falls through */\n case 'hour':\n this.minutes(0);\n /* falls through */\n case 'minute':\n this.seconds(0);\n /* falls through */\n case 'second':\n this.milliseconds(0);\n }\n\n // weeks are a special case\n if (units === 'week') {\n this.weekday(0);\n }\n if (units === 'isoWeek') {\n this.isoWeekday(1);\n }\n\n // quarters are also special\n if (units === 'quarter') {\n this.month(Math.floor(this.month() / 3) * 3);\n }\n\n return this;\n }\n\n function endOf (units) {\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond') {\n return this;\n }\n return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');\n }\n\n function to_type__valueOf () {\n return +this._d - ((this._offset || 0) * 60000);\n }\n\n function unix () {\n return Math.floor(+this / 1000);\n }\n\n function toDate () {\n return this._offset ? new Date(+this) : this._d;\n }\n\n function toArray () {\n var m = this;\n return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];\n }\n\n function moment_valid__isValid () {\n return valid__isValid(this);\n }\n\n function parsingFlags () {\n return extend({}, getParsingFlags(this));\n }\n\n function invalidAt () {\n return getParsingFlags(this).overflow;\n }\n\n addFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n });\n\n addFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n });\n\n function addWeekYearFormatToken (token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n }\n\n addWeekYearFormatToken('gggg', 'weekYear');\n addWeekYearFormatToken('ggggg', 'weekYear');\n addWeekYearFormatToken('GGGG', 'isoWeekYear');\n addWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n // ALIASES\n\n addUnitAlias('weekYear', 'gg');\n addUnitAlias('isoWeekYear', 'GG');\n\n // PARSING\n\n addRegexToken('G', matchSigned);\n addRegexToken('g', matchSigned);\n addRegexToken('GG', match1to2, match2);\n addRegexToken('gg', match1to2, match2);\n addRegexToken('GGGG', match1to4, match4);\n addRegexToken('gggg', match1to4, match4);\n addRegexToken('GGGGG', match1to6, match6);\n addRegexToken('ggggg', match1to6, match6);\n\n addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n });\n\n addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = utils_hooks__hooks.parseTwoDigitYear(input);\n });\n\n // HELPERS\n\n function weeksInYear(year, dow, doy) {\n return weekOfYear(local__createLocal([year, 11, 31 + dow - doy]), dow, doy).week;\n }\n\n // MOMENTS\n\n function getSetWeekYear (input) {\n var year = weekOfYear(this, this.localeData()._week.dow, this.localeData()._week.doy).year;\n return input == null ? year : this.add((input - year), 'y');\n }\n\n function getSetISOWeekYear (input) {\n var year = weekOfYear(this, 1, 4).year;\n return input == null ? year : this.add((input - year), 'y');\n }\n\n function getISOWeeksInYear () {\n return weeksInYear(this.year(), 1, 4);\n }\n\n function getWeeksInYear () {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n }\n\n addFormatToken('Q', 0, 0, 'quarter');\n\n // ALIASES\n\n addUnitAlias('quarter', 'Q');\n\n // PARSING\n\n addRegexToken('Q', match1);\n addParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n });\n\n // MOMENTS\n\n function getSetQuarter (input) {\n return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);\n }\n\n addFormatToken('D', ['DD', 2], 'Do', 'date');\n\n // ALIASES\n\n addUnitAlias('date', 'D');\n\n // PARSING\n\n addRegexToken('D', match1to2);\n addRegexToken('DD', match1to2, match2);\n addRegexToken('Do', function (isStrict, locale) {\n return isStrict ? locale._ordinalParse : locale._ordinalParseLenient;\n });\n\n addParseToken(['D', 'DD'], DATE);\n addParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0], 10);\n });\n\n // MOMENTS\n\n var getSetDayOfMonth = makeGetSet('Date', true);\n\n addFormatToken('d', 0, 'do', 'day');\n\n addFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n });\n\n addFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n });\n\n addFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n });\n\n addFormatToken('e', 0, 0, 'weekday');\n addFormatToken('E', 0, 0, 'isoWeekday');\n\n // ALIASES\n\n addUnitAlias('day', 'd');\n addUnitAlias('weekday', 'e');\n addUnitAlias('isoWeekday', 'E');\n\n // PARSING\n\n addRegexToken('d', match1to2);\n addRegexToken('e', match1to2);\n addRegexToken('E', match1to2);\n addRegexToken('dd', matchWord);\n addRegexToken('ddd', matchWord);\n addRegexToken('dddd', matchWord);\n\n addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config) {\n var weekday = config._locale.weekdaysParse(input);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n });\n\n addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n });\n\n // HELPERS\n\n function parseWeekday(input, locale) {\n if (typeof input === 'string') {\n if (!isNaN(input)) {\n input = parseInt(input, 10);\n }\n else {\n input = locale.weekdaysParse(input);\n if (typeof input !== 'number') {\n return null;\n }\n }\n }\n return input;\n }\n\n // LOCALES\n\n var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');\n function localeWeekdays (m) {\n return this._weekdays[m.day()];\n }\n\n var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');\n function localeWeekdaysShort (m) {\n return this._weekdaysShort[m.day()];\n }\n\n var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');\n function localeWeekdaysMin (m) {\n return this._weekdaysMin[m.day()];\n }\n\n function localeWeekdaysParse (weekdayName) {\n var i, mom, regex;\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n if (!this._weekdaysParse[i]) {\n mom = local__createLocal([2000, 1]).day(i);\n regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n }\n\n // MOMENTS\n\n function getSetDayOfWeek (input) {\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n }\n\n function getSetLocaleDayOfWeek (input) {\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n }\n\n function getSetISODayOfWeek (input) {\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n return input == null ? this.day() || 7 : this.day(this.day() % 7 ? input : input - 7);\n }\n\n addFormatToken('H', ['HH', 2], 0, 'hour');\n addFormatToken('h', ['hh', 2], 0, function () {\n return this.hours() % 12 || 12;\n });\n\n function meridiem (token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);\n });\n }\n\n meridiem('a', true);\n meridiem('A', false);\n\n // ALIASES\n\n addUnitAlias('hour', 'h');\n\n // PARSING\n\n function matchMeridiem (isStrict, locale) {\n return locale._meridiemParse;\n }\n\n addRegexToken('a', matchMeridiem);\n addRegexToken('A', matchMeridiem);\n addRegexToken('H', match1to2);\n addRegexToken('h', match1to2);\n addRegexToken('HH', match1to2, match2);\n addRegexToken('hh', match1to2, match2);\n\n addParseToken(['H', 'HH'], HOUR);\n addParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n });\n addParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n });\n\n // LOCALES\n\n function localeIsPM (input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return ((input + '').toLowerCase().charAt(0) === 'p');\n }\n\n var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i;\n function localeMeridiem (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n }\n\n\n // MOMENTS\n\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour he wants. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n var getSetHour = makeGetSet('Hours', true);\n\n addFormatToken('m', ['mm', 2], 0, 'minute');\n\n // ALIASES\n\n addUnitAlias('minute', 'm');\n\n // PARSING\n\n addRegexToken('m', match1to2);\n addRegexToken('mm', match1to2, match2);\n addParseToken(['m', 'mm'], MINUTE);\n\n // MOMENTS\n\n var getSetMinute = makeGetSet('Minutes', false);\n\n addFormatToken('s', ['ss', 2], 0, 'second');\n\n // ALIASES\n\n addUnitAlias('second', 's');\n\n // PARSING\n\n addRegexToken('s', match1to2);\n addRegexToken('ss', match1to2, match2);\n addParseToken(['s', 'ss'], SECOND);\n\n // MOMENTS\n\n var getSetSecond = makeGetSet('Seconds', false);\n\n addFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n });\n\n addFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n });\n\n function millisecond__milliseconds (token) {\n addFormatToken(0, [token, 3], 0, 'millisecond');\n }\n\n millisecond__milliseconds('SSS');\n millisecond__milliseconds('SSSS');\n\n // ALIASES\n\n addUnitAlias('millisecond', 'ms');\n\n // PARSING\n\n addRegexToken('S', match1to3, match1);\n addRegexToken('SS', match1to3, match2);\n addRegexToken('SSS', match1to3, match3);\n addRegexToken('SSSS', matchUnsigned);\n addParseToken(['S', 'SS', 'SSS', 'SSSS'], function (input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n });\n\n // MOMENTS\n\n var getSetMillisecond = makeGetSet('Milliseconds', false);\n\n addFormatToken('z', 0, 0, 'zoneAbbr');\n addFormatToken('zz', 0, 0, 'zoneName');\n\n // MOMENTS\n\n function getZoneAbbr () {\n return this._isUTC ? 'UTC' : '';\n }\n\n function getZoneName () {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n }\n\n var momentPrototype__proto = Moment.prototype;\n\n momentPrototype__proto.add = add_subtract__add;\n momentPrototype__proto.calendar = moment_calendar__calendar;\n momentPrototype__proto.clone = clone;\n momentPrototype__proto.diff = diff;\n momentPrototype__proto.endOf = endOf;\n momentPrototype__proto.format = format;\n momentPrototype__proto.from = from;\n momentPrototype__proto.fromNow = fromNow;\n momentPrototype__proto.to = to;\n momentPrototype__proto.toNow = toNow;\n momentPrototype__proto.get = getSet;\n momentPrototype__proto.invalidAt = invalidAt;\n momentPrototype__proto.isAfter = isAfter;\n momentPrototype__proto.isBefore = isBefore;\n momentPrototype__proto.isBetween = isBetween;\n momentPrototype__proto.isSame = isSame;\n momentPrototype__proto.isValid = moment_valid__isValid;\n momentPrototype__proto.lang = lang;\n momentPrototype__proto.locale = locale;\n momentPrototype__proto.localeData = localeData;\n momentPrototype__proto.max = prototypeMax;\n momentPrototype__proto.min = prototypeMin;\n momentPrototype__proto.parsingFlags = parsingFlags;\n momentPrototype__proto.set = getSet;\n momentPrototype__proto.startOf = startOf;\n momentPrototype__proto.subtract = add_subtract__subtract;\n momentPrototype__proto.toArray = toArray;\n momentPrototype__proto.toDate = toDate;\n momentPrototype__proto.toISOString = moment_format__toISOString;\n momentPrototype__proto.toJSON = moment_format__toISOString;\n momentPrototype__proto.toString = toString;\n momentPrototype__proto.unix = unix;\n momentPrototype__proto.valueOf = to_type__valueOf;\n\n // Year\n momentPrototype__proto.year = getSetYear;\n momentPrototype__proto.isLeapYear = getIsLeapYear;\n\n // Week Year\n momentPrototype__proto.weekYear = getSetWeekYear;\n momentPrototype__proto.isoWeekYear = getSetISOWeekYear;\n\n // Quarter\n momentPrototype__proto.quarter = momentPrototype__proto.quarters = getSetQuarter;\n\n // Month\n momentPrototype__proto.month = getSetMonth;\n momentPrototype__proto.daysInMonth = getDaysInMonth;\n\n // Week\n momentPrototype__proto.week = momentPrototype__proto.weeks = getSetWeek;\n momentPrototype__proto.isoWeek = momentPrototype__proto.isoWeeks = getSetISOWeek;\n momentPrototype__proto.weeksInYear = getWeeksInYear;\n momentPrototype__proto.isoWeeksInYear = getISOWeeksInYear;\n\n // Day\n momentPrototype__proto.date = getSetDayOfMonth;\n momentPrototype__proto.day = momentPrototype__proto.days = getSetDayOfWeek;\n momentPrototype__proto.weekday = getSetLocaleDayOfWeek;\n momentPrototype__proto.isoWeekday = getSetISODayOfWeek;\n momentPrototype__proto.dayOfYear = getSetDayOfYear;\n\n // Hour\n momentPrototype__proto.hour = momentPrototype__proto.hours = getSetHour;\n\n // Minute\n momentPrototype__proto.minute = momentPrototype__proto.minutes = getSetMinute;\n\n // Second\n momentPrototype__proto.second = momentPrototype__proto.seconds = getSetSecond;\n\n // Millisecond\n momentPrototype__proto.millisecond = momentPrototype__proto.milliseconds = getSetMillisecond;\n\n // Offset\n momentPrototype__proto.utcOffset = getSetOffset;\n momentPrototype__proto.utc = setOffsetToUTC;\n momentPrototype__proto.local = setOffsetToLocal;\n momentPrototype__proto.parseZone = setOffsetToParsedOffset;\n momentPrototype__proto.hasAlignedHourOffset = hasAlignedHourOffset;\n momentPrototype__proto.isDST = isDaylightSavingTime;\n momentPrototype__proto.isDSTShifted = isDaylightSavingTimeShifted;\n momentPrototype__proto.isLocal = isLocal;\n momentPrototype__proto.isUtcOffset = isUtcOffset;\n momentPrototype__proto.isUtc = isUtc;\n momentPrototype__proto.isUTC = isUtc;\n\n // Timezone\n momentPrototype__proto.zoneAbbr = getZoneAbbr;\n momentPrototype__proto.zoneName = getZoneName;\n\n // Deprecations\n momentPrototype__proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);\n momentPrototype__proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);\n momentPrototype__proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);\n momentPrototype__proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779', getSetZone);\n\n var momentPrototype = momentPrototype__proto;\n\n function moment__createUnix (input) {\n return local__createLocal(input * 1000);\n }\n\n function moment__createInZone () {\n return local__createLocal.apply(null, arguments).parseZone();\n }\n\n var defaultCalendar = {\n sameDay : '[Today at] LT',\n nextDay : '[Tomorrow at] LT',\n nextWeek : 'dddd [at] LT',\n lastDay : '[Yesterday at] LT',\n lastWeek : '[Last] dddd [at] LT',\n sameElse : 'L'\n };\n\n function locale_calendar__calendar (key, mom, now) {\n var output = this._calendar[key];\n return typeof output === 'function' ? output.call(mom, now) : output;\n }\n\n var defaultLongDateFormat = {\n LTS : 'h:mm:ss A',\n LT : 'h:mm A',\n L : 'MM/DD/YYYY',\n LL : 'MMMM D, YYYY',\n LLL : 'MMMM D, YYYY LT',\n LLLL : 'dddd, MMMM D, YYYY LT'\n };\n\n function longDateFormat (key) {\n var output = this._longDateFormat[key];\n if (!output && this._longDateFormat[key.toUpperCase()]) {\n output = this._longDateFormat[key.toUpperCase()].replace(/MMMM|MM|DD|dddd/g, function (val) {\n return val.slice(1);\n });\n this._longDateFormat[key] = output;\n }\n return output;\n }\n\n var defaultInvalidDate = 'Invalid date';\n\n function invalidDate () {\n return this._invalidDate;\n }\n\n var defaultOrdinal = '%d';\n var defaultOrdinalParse = /\\d{1,2}/;\n\n function ordinal (number) {\n return this._ordinal.replace('%d', number);\n }\n\n function preParsePostFormat (string) {\n return string;\n }\n\n var defaultRelativeTime = {\n future : 'in %s',\n past : '%s ago',\n s : 'a few seconds',\n m : 'a minute',\n mm : '%d minutes',\n h : 'an hour',\n hh : '%d hours',\n d : 'a day',\n dd : '%d days',\n M : 'a month',\n MM : '%d months',\n y : 'a year',\n yy : '%d years'\n };\n\n function relative__relativeTime (number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return (typeof output === 'function') ?\n output(number, withoutSuffix, string, isFuture) :\n output.replace(/%d/i, number);\n }\n\n function pastFuture (diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return typeof format === 'function' ? format(output) : format.replace(/%s/i, output);\n }\n\n function locale_set__set (config) {\n var prop, i;\n for (i in config) {\n prop = config[i];\n if (typeof prop === 'function') {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _ordinalParseLenient.\n this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + (/\\d{1,2}/).source);\n }\n\n var prototype__proto = Locale.prototype;\n\n prototype__proto._calendar = defaultCalendar;\n prototype__proto.calendar = locale_calendar__calendar;\n prototype__proto._longDateFormat = defaultLongDateFormat;\n prototype__proto.longDateFormat = longDateFormat;\n prototype__proto._invalidDate = defaultInvalidDate;\n prototype__proto.invalidDate = invalidDate;\n prototype__proto._ordinal = defaultOrdinal;\n prototype__proto.ordinal = ordinal;\n prototype__proto._ordinalParse = defaultOrdinalParse;\n prototype__proto.preparse = preParsePostFormat;\n prototype__proto.postformat = preParsePostFormat;\n prototype__proto._relativeTime = defaultRelativeTime;\n prototype__proto.relativeTime = relative__relativeTime;\n prototype__proto.pastFuture = pastFuture;\n prototype__proto.set = locale_set__set;\n\n // Month\n prototype__proto.months = localeMonths;\n prototype__proto._months = defaultLocaleMonths;\n prototype__proto.monthsShort = localeMonthsShort;\n prototype__proto._monthsShort = defaultLocaleMonthsShort;\n prototype__proto.monthsParse = localeMonthsParse;\n\n // Week\n prototype__proto.week = localeWeek;\n prototype__proto._week = defaultLocaleWeek;\n prototype__proto.firstDayOfYear = localeFirstDayOfYear;\n prototype__proto.firstDayOfWeek = localeFirstDayOfWeek;\n\n // Day of Week\n prototype__proto.weekdays = localeWeekdays;\n prototype__proto._weekdays = defaultLocaleWeekdays;\n prototype__proto.weekdaysMin = localeWeekdaysMin;\n prototype__proto._weekdaysMin = defaultLocaleWeekdaysMin;\n prototype__proto.weekdaysShort = localeWeekdaysShort;\n prototype__proto._weekdaysShort = defaultLocaleWeekdaysShort;\n prototype__proto.weekdaysParse = localeWeekdaysParse;\n\n // Hours\n prototype__proto.isPM = localeIsPM;\n prototype__proto._meridiemParse = defaultLocaleMeridiemParse;\n prototype__proto.meridiem = localeMeridiem;\n\n function lists__get (format, index, field, setter) {\n var locale = locale_locales__getLocale();\n var utc = create_utc__createUTC().set(setter, index);\n return locale[field](utc, format);\n }\n\n function list (format, index, field, count, setter) {\n if (typeof format === 'number') {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return lists__get(format, index, field, setter);\n }\n\n var i;\n var out = [];\n for (i = 0; i < count; i++) {\n out[i] = lists__get(format, i, field, setter);\n }\n return out;\n }\n\n function lists__listMonths (format, index) {\n return list(format, index, 'months', 12, 'month');\n }\n\n function lists__listMonthsShort (format, index) {\n return list(format, index, 'monthsShort', 12, 'month');\n }\n\n function lists__listWeekdays (format, index) {\n return list(format, index, 'weekdays', 7, 'day');\n }\n\n function lists__listWeekdaysShort (format, index) {\n return list(format, index, 'weekdaysShort', 7, 'day');\n }\n\n function lists__listWeekdaysMin (format, index) {\n return list(format, index, 'weekdaysMin', 7, 'day');\n }\n\n locale_locales__getSetGlobalLocale('en', {\n ordinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal : function (number) {\n var b = number % 10,\n output = (toInt(number % 100 / 10) === 1) ? 'th' :\n (b === 1) ? 'st' :\n (b === 2) ? 'nd' :\n (b === 3) ? 'rd' : 'th';\n return number + output;\n }\n });\n\n // Side effect imports\n utils_hooks__hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', locale_locales__getSetGlobalLocale);\n utils_hooks__hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', locale_locales__getLocale);\n\n var mathAbs = Math.abs;\n\n function duration_abs__abs () {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n }\n\n function duration_add_subtract__addSubtract (duration, input, value, direction) {\n var other = create__createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n }\n\n // supports only 2.0-style add(1, 's') or add(duration)\n function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }\n\n // supports only 2.0-style subtract(1, 's') or subtract(duration)\n function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }\n\n function bubble () {\n var milliseconds = this._milliseconds;\n var days = this._days;\n var months = this._months;\n var data = this._data;\n var seconds, minutes, hours, years = 0;\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // Accurately convert days to years, assume start from year 0.\n years = absFloor(daysToYears(days));\n days -= absFloor(yearsToDays(years));\n\n // 30 days to a month\n // TODO (iskren): Use anchor date (like 1st Jan) to compute this.\n months += absFloor(days / 30);\n days %= 30;\n\n // 12 months -> 1 year\n years += absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n }\n\n function daysToYears (days) {\n // 400 years have 146097 days (taking into account leap year rules)\n return days * 400 / 146097;\n }\n\n function yearsToDays (years) {\n // years * 365 + absFloor(years / 4) -\n // absFloor(years / 100) + absFloor(years / 400);\n return years * 146097 / 400;\n }\n\n function as (units) {\n var days;\n var months;\n var milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToYears(days) * 12;\n return units === 'month' ? months : months / 12;\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(yearsToDays(this._months / 12));\n switch (units) {\n case 'week' : return days / 7 + milliseconds / 6048e5;\n case 'day' : return days + milliseconds / 864e5;\n case 'hour' : return days * 24 + milliseconds / 36e5;\n case 'minute' : return days * 1440 + milliseconds / 6e4;\n case 'second' : return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond': return Math.floor(days * 864e5) + milliseconds;\n default: throw new Error('Unknown unit ' + units);\n }\n }\n }\n\n // TODO: Use this.as('ms')?\n function duration_as__valueOf () {\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n }\n\n function makeAs (alias) {\n return function () {\n return this.as(alias);\n };\n }\n\n var asMilliseconds = makeAs('ms');\n var asSeconds = makeAs('s');\n var asMinutes = makeAs('m');\n var asHours = makeAs('h');\n var asDays = makeAs('d');\n var asWeeks = makeAs('w');\n var asMonths = makeAs('M');\n var asYears = makeAs('y');\n\n function duration_get__get (units) {\n units = normalizeUnits(units);\n return this[units + 's']();\n }\n\n function makeGetter(name) {\n return function () {\n return this._data[name];\n };\n }\n\n var duration_get__milliseconds = makeGetter('milliseconds');\n var seconds = makeGetter('seconds');\n var minutes = makeGetter('minutes');\n var hours = makeGetter('hours');\n var days = makeGetter('days');\n var months = makeGetter('months');\n var years = makeGetter('years');\n\n function weeks () {\n return absFloor(this.days() / 7);\n }\n\n var round = Math.round;\n var thresholds = {\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month\n M: 11 // months to year\n };\n\n // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n }\n\n function duration_humanize__relativeTime (posNegDuration, withoutSuffix, locale) {\n var duration = create__createDuration(posNegDuration).abs();\n var seconds = round(duration.as('s'));\n var minutes = round(duration.as('m'));\n var hours = round(duration.as('h'));\n var days = round(duration.as('d'));\n var months = round(duration.as('M'));\n var years = round(duration.as('y'));\n\n var a = seconds < thresholds.s && ['s', seconds] ||\n minutes === 1 && ['m'] ||\n minutes < thresholds.m && ['mm', minutes] ||\n hours === 1 && ['h'] ||\n hours < thresholds.h && ['hh', hours] ||\n days === 1 && ['d'] ||\n days < thresholds.d && ['dd', days] ||\n months === 1 && ['M'] ||\n months < thresholds.M && ['MM', months] ||\n years === 1 && ['y'] || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n }\n\n // This function allows you to set a threshold for relative time strings\n function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n return true;\n }\n\n function humanize (withSuffix) {\n var locale = this.localeData();\n var output = duration_humanize__relativeTime(this, !withSuffix, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n }\n\n var iso_string__abs = Math.abs;\n\n function iso_string__toISOString() {\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n var Y = iso_string__abs(this.years());\n var M = iso_string__abs(this.months());\n var D = iso_string__abs(this.days());\n var h = iso_string__abs(this.hours());\n var m = iso_string__abs(this.minutes());\n var s = iso_string__abs(this.seconds() + this.milliseconds() / 1000);\n var total = this.asSeconds();\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n return (total < 0 ? '-' : '') +\n 'P' +\n (Y ? Y + 'Y' : '') +\n (M ? M + 'M' : '') +\n (D ? D + 'D' : '') +\n ((h || m || s) ? 'T' : '') +\n (h ? h + 'H' : '') +\n (m ? m + 'M' : '') +\n (s ? s + 'S' : '');\n }\n\n var duration_prototype__proto = Duration.prototype;\n\n duration_prototype__proto.abs = duration_abs__abs;\n duration_prototype__proto.add = duration_add_subtract__add;\n duration_prototype__proto.subtract = duration_add_subtract__subtract;\n duration_prototype__proto.as = as;\n duration_prototype__proto.asMilliseconds = asMilliseconds;\n duration_prototype__proto.asSeconds = asSeconds;\n duration_prototype__proto.asMinutes = asMinutes;\n duration_prototype__proto.asHours = asHours;\n duration_prototype__proto.asDays = asDays;\n duration_prototype__proto.asWeeks = asWeeks;\n duration_prototype__proto.asMonths = asMonths;\n duration_prototype__proto.asYears = asYears;\n duration_prototype__proto.valueOf = duration_as__valueOf;\n duration_prototype__proto._bubble = bubble;\n duration_prototype__proto.get = duration_get__get;\n duration_prototype__proto.milliseconds = duration_get__milliseconds;\n duration_prototype__proto.seconds = seconds;\n duration_prototype__proto.minutes = minutes;\n duration_prototype__proto.hours = hours;\n duration_prototype__proto.days = days;\n duration_prototype__proto.weeks = weeks;\n duration_prototype__proto.months = months;\n duration_prototype__proto.years = years;\n duration_prototype__proto.humanize = humanize;\n duration_prototype__proto.toISOString = iso_string__toISOString;\n duration_prototype__proto.toString = iso_string__toISOString;\n duration_prototype__proto.toJSON = iso_string__toISOString;\n duration_prototype__proto.locale = locale;\n duration_prototype__proto.localeData = localeData;\n\n // Deprecations\n duration_prototype__proto.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', iso_string__toISOString);\n duration_prototype__proto.lang = lang;\n\n // Side effect imports\n\n addFormatToken('X', 0, 0, 'unix');\n addFormatToken('x', 0, 0, 'valueOf');\n\n // PARSING\n\n addRegexToken('x', matchSigned);\n addRegexToken('X', matchTimestamp);\n addParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input, 10) * 1000);\n });\n addParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n });\n\n // Side effect imports\n\n\n utils_hooks__hooks.version = '2.10.3';\n\n setHookCallback(local__createLocal);\n\n utils_hooks__hooks.fn = momentPrototype;\n utils_hooks__hooks.min = min;\n utils_hooks__hooks.max = max;\n utils_hooks__hooks.utc = create_utc__createUTC;\n utils_hooks__hooks.unix = moment__createUnix;\n utils_hooks__hooks.months = lists__listMonths;\n utils_hooks__hooks.isDate = isDate;\n utils_hooks__hooks.locale = locale_locales__getSetGlobalLocale;\n utils_hooks__hooks.invalid = valid__createInvalid;\n utils_hooks__hooks.duration = create__createDuration;\n utils_hooks__hooks.isMoment = isMoment;\n utils_hooks__hooks.weekdays = lists__listWeekdays;\n utils_hooks__hooks.parseZone = moment__createInZone;\n utils_hooks__hooks.localeData = locale_locales__getLocale;\n utils_hooks__hooks.isDuration = isDuration;\n utils_hooks__hooks.monthsShort = lists__listMonthsShort;\n utils_hooks__hooks.weekdaysMin = lists__listWeekdaysMin;\n utils_hooks__hooks.defineLocale = defineLocale;\n utils_hooks__hooks.weekdaysShort = lists__listWeekdaysShort;\n utils_hooks__hooks.normalizeUnits = normalizeUnits;\n utils_hooks__hooks.relativeTimeThreshold = duration_humanize__getSetRelativeTimeThreshold;\n\n var _moment = utils_hooks__hooks;\n\n return _moment;\n\n}));"]}