From 24e0de7c9703fa49401dad5c7a199ef13cd0f384 Mon Sep 17 00:00:00 2001 From: spencer kelly Date: Fri, 19 Mar 2021 17:15:18 -0400 Subject: [PATCH 01/25] fix runtime error in date parser --- plugins/dates/scratch.js | 3 +- plugins/dates/src/01-tagger/04-time.js | 2 ++ plugins/dates/src/02-ranges/ranges.js | 36 ++++++++++--------- .../src/parseDate/01-tokenize/03-time.js | 4 +++ plugins/dates/src/parseDate/parse.js | 1 + plugins/dates/tests/full-iso.test.js | 3 ++ 6 files changed, 32 insertions(+), 17 deletions(-) diff --git a/plugins/dates/scratch.js b/plugins/dates/scratch.js index 0b274c43b..1aad5e544 100644 --- a/plugins/dates/scratch.js +++ b/plugins/dates/scratch.js @@ -22,7 +22,8 @@ const context = { // let doc = nlp('june 5th') //.debug() // let doc = nlp('tuesday at 3:30') //.debug() // let doc = nlp('9am to 5pm feb 26th') //.debug() -let doc = nlp('9am to 5am') //.debug() +// let doc = nlp('3:00 to 4pm on tuesday') //.debug() +let doc = nlp('4pm on the dot on tuesday').debug() // let doc = nlp('next week') //.debug() let dates = doc.dates(context) diff --git a/plugins/dates/src/01-tagger/04-time.js b/plugins/dates/src/01-tagger/04-time.js index 5b0942887..ad795c699 100644 --- a/plugins/dates/src/01-tagger/04-time.js +++ b/plugins/dates/src/01-tagger/04-time.js @@ -29,6 +29,8 @@ const timeTagger = function (doc) { } // around four thirty doc.match('(at|around|near) [#Cardinal (thirty|fifteen) (am|pm)?]', 0).tag('Time', here) + // 4pm sharp + doc.match('#Time [(sharp|on the dot)]', 0).tag('Time', here) return doc } module.exports = timeTagger diff --git a/plugins/dates/src/02-ranges/ranges.js b/plugins/dates/src/02-ranges/ranges.js index 9f794acad..52c581dbc 100644 --- a/plugins/dates/src/02-ranges/ranges.js +++ b/plugins/dates/src/02-ranges/ranges.js @@ -170,15 +170,17 @@ module.exports = [ let time = m.groups('time') let to = m.groups('to') let end = parseDate(to, context) - let start = end.clone() - start.applyTime(time.text()) - if (start && end) { - let obj = { - start: start, - end: end, + if (end) { + let start = end.clone() + start.applyTime(time.text()) + if (start) { + let obj = { + start: start, + end: end, + } + obj = reverseMaybe(obj) + return obj } - obj = reverseMaybe(obj) - return obj } return null }, @@ -190,15 +192,17 @@ module.exports = [ let from = m.groups('from') let to = m.groups('to') from = parseDate(from, context) - let end = from.clone() - end.applyTime(to.text()) - if (from && end) { - let obj = { - start: from, - end: end, + if (from) { + let end = from.clone() + end.applyTime(to.text()) + if (end) { + let obj = { + start: from, + end: end, + } + obj = reverseMaybe(obj) + return obj } - obj = reverseMaybe(obj) - return obj } return null }, diff --git a/plugins/dates/src/parseDate/01-tokenize/03-time.js b/plugins/dates/src/parseDate/01-tokenize/03-time.js index a3160b28a..5921e3079 100644 --- a/plugins/dates/src/parseDate/01-tokenize/03-time.js +++ b/plugins/dates/src/parseDate/01-tokenize/03-time.js @@ -55,6 +55,10 @@ const parseTime = function (doc, context) { let time = doc.match('(at|by|for|before|this)? #Time+') if (time.found) { doc.remove(time) + // '4pm on tuesday' + doc.remove('^sharp') + doc.remove('^on') + doc.remove('on the dot') } // get the main part of the time time = time.not('^(at|by|for|before|this)') diff --git a/plugins/dates/src/parseDate/parse.js b/plugins/dates/src/parseDate/parse.js index 37402558a..b86d950b6 100644 --- a/plugins/dates/src/parseDate/parse.js +++ b/plugins/dates/src/parseDate/parse.js @@ -57,6 +57,7 @@ const parseDate = function (doc, context) { // console.log(` rel: ${rel || '-'}`) // console.log(` section: ${section || '-'}`) // console.log(` time: ${time || '-'}`) + // console.log(` weekDay: ${weekDay || '-'}`) // console.log(` str: '${doc.text()}'`) // console.log(' unit: ', unit, '\n') // doc.debug() diff --git a/plugins/dates/tests/full-iso.test.js b/plugins/dates/tests/full-iso.test.js index 562814996..a5e9bdda5 100644 --- a/plugins/dates/tests/full-iso.test.js +++ b/plugins/dates/tests/full-iso.test.js @@ -15,6 +15,9 @@ test('full iso start+end tests', function (t) { ['9am to 5pm', '2021-02-19T09:00:00.000+08:00', '2021-02-19T17:00:00.000+08:00'], ['9am to 5pm feb 26th', '2021-02-26T09:00:00.000+08:00', '2021-02-26T17:00:00.000+08:00'], ['9am to 5am', '2021-02-19T05:00:00.000+08:00', '2021-02-19T09:00:00.000+08:00'], + ['4pm sharp on tuesday', '2021-02-23T16:00:00.000+08:00', '2021-02-23T20:00:00.000+08:00'], + ['tuesday 4pm sharp', '2021-02-23T16:00:00.000+08:00', '2021-02-23T20:00:00.000+08:00'], + ['tuesday 3:30 on the dot', '2021-02-23T15:30:00.000+08:00', '2021-02-23T20:00:00.000+08:00'], ] arr.forEach((a) => { let doc = nlp(a[0]) From 30116ccc5a00b4c5d55583ff916dfa6a2001847a Mon Sep 17 00:00:00 2001 From: spencer kelly Date: Fri, 19 Mar 2021 17:15:57 -0400 Subject: [PATCH 02/25] 1.5.6rc --- plugins/dates/builds/compromise-dates.js | 55 ++++++++++++-------- plugins/dates/builds/compromise-dates.min.js | 2 +- plugins/dates/builds/compromise-dates.mjs | 55 ++++++++++++-------- plugins/dates/package.json | 2 +- 4 files changed, 70 insertions(+), 44 deletions(-) diff --git a/plugins/dates/builds/compromise-dates.js b/plugins/dates/builds/compromise-dates.js index bc1aea52a..67f70de53 100644 --- a/plugins/dates/builds/compromise-dates.js +++ b/plugins/dates/builds/compromise-dates.js @@ -1,4 +1,4 @@ -/* compromise-dates 1.5.5 MIT */ +/* compromise-dates 1.5.6 MIT */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : @@ -450,7 +450,9 @@ } // around four thirty - doc.match('(at|around|near) [#Cardinal (thirty|fifteen) (am|pm)?]', 0).tag('Time', here$2); + doc.match('(at|around|near) [#Cardinal (thirty|fifteen) (am|pm)?]', 0).tag('Time', here$2); // 4pm sharp + + doc.match('#Time [(sharp|on the dot)]', 0).tag('Time', here$2); return doc; }; @@ -6423,7 +6425,11 @@ var time = doc.match('(at|by|for|before|this)? #Time+'); if (time.found) { - doc.remove(time); + doc.remove(time); // '4pm on tuesday' + + doc.remove('^sharp'); + doc.remove('^on'); + doc.remove('on the dot'); } // get the main part of the time @@ -7747,6 +7753,7 @@ // console.log(` rel: ${rel || '-'}`) // console.log(` section: ${section || '-'}`) // console.log(` time: ${time || '-'}`) + // console.log(` weekDay: ${weekDay || '-'}`) // console.log(` str: '${doc.text()}'`) // console.log(' unit: ', unit, '\n') // doc.debug() @@ -8112,16 +8119,19 @@ var time = m.groups('time'); var to = m.groups('to'); var end = parse_1$2(to, context); - var start = end.clone(); - start.applyTime(time.text()); - if (start && end) { - var obj = { - start: start, - end: end - }; - obj = reverseMaybe(obj); - return obj; + if (end) { + var start = end.clone(); + start.applyTime(time.text()); + + if (start) { + var obj = { + start: start, + end: end + }; + obj = reverseMaybe(obj); + return obj; + } } return null; @@ -8133,16 +8143,19 @@ var from = m.groups('from'); var to = m.groups('to'); from = parse_1$2(from, context); - var end = from.clone(); - end.applyTime(to.text()); - if (from && end) { - var obj = { - start: from, - end: end - }; - obj = reverseMaybe(obj); - return obj; + if (from) { + var end = from.clone(); + end.applyTime(to.text()); + + if (end) { + var obj = { + start: from, + end: end + }; + obj = reverseMaybe(obj); + return obj; + } } return null; diff --git a/plugins/dates/builds/compromise-dates.min.js b/plugins/dates/builds/compromise-dates.min.js index 63d6ccd13..38b4b12a9 100644 --- a/plugins/dates/builds/compromise-dates.min.js +++ b/plugins/dates/builds/compromise-dates.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).compromiseDates=e()}(this,(function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var a=0;a1e3&&n<3e3&&t.tag("Year",e)}))},f=function(t,e){!0===t.found&&t.forEach((function(t){var a=t.text("reduced"),n=parseInt(a,10);n&&n>1900&&n<2030&&t.tag("Year",e)}))},y=function(t){t.match("in the (night|evening|morning|afternoon|day|daytime)").tag("Time","in-the-night"),t.match("(#Value|#Time) (am|pm)").tag("Time","value-ampm"),t.match("/^[0-9]{4}-[0-9]{2}$/").tag("Date","2012-06"),t.match("(tue|thu)").tag("WeekDay","misc-weekday");var e=t.if("#Month");!0===e.found&&(e.match("#Month #Date+").tag("Date","correction-numberRange"),e.match("#Value of #Month").tag("Date","value-of-month"),e.match("#Cardinal #Month").tag("Date","cardinal-month"),e.match("#Month #Value to #Value").tag("Date","value-to-value"),e.match("#Month the #Value").tag("Date","month-the-value"));var a=t.if("#Value");if(!0===a.found){a.match("(#WeekDay|#Month) #Value").ifNo("#Money").tag("Date","date-value"),a.match("#Value (#WeekDay|#Month)").ifNo("#Money").tag("Date","value-date"),a.match("#TextValue #TextValue").if("#Date").tag("#Date","textvalue-date"),a.match("#Value (#WeekDay|#Duration) back").tag("#Date","3-back");var n=a.if("#Duration");!0===n.found&&(n.match("for #Value #Duration").tag("Date","for-x-duration"),n.match("#Value #Duration #Conjunction").tag("Date","val-duration-conjunction"),n.match("".concat(c,"? #Value #Duration")).tag("Date","value-duration"),n.match("#Value #Duration old").unTag("Date","val-years-old"))}var r=t.if(l);!0===r.found&&(r.match("".concat(c,"? ").concat(d," ").concat(l)).tag("Date","thisNext-season"),r.match("the? ".concat(h," of ").concat(l)).tag("Date","section-season"),r.match("".concat(l," ").concat(c,"? #Cardinal")).tag("Date","season-year"));var i=t.if("#Date");!0===i.found&&(i.match("#Date the? #Ordinal").tag("Date","correction"),i.match("".concat(d," #Date")).tag("Date","thisNext-date"),i.match("due? (by|before|after|until) #Date").tag("Date","by"),i.match("(last|next|this|previous|current|upcoming|coming|the) #Date").tag("Date","next-feb"),i.match("the? ".concat(h," of #Date")).tag("Date","section-of"),i.match("#Ordinal #Duration in #Date").tag("Date","duration-in"),i.match("(early|late) (at|in)? the? #Date").tag("Time","early-evening"),i.match("#Date (by|before|after|at|@|about) #Cardinal").not("^#Date").tag("Time","date-before-Cardinal"),i.match("#Date [(am|pm)]",0).unTag("Verb").unTag("Copula").tag("Time","date-am"),i.match("#Date (#Preposition|to) #Date").ifNo("#Duration").tag("Date","date-prep-date"));var o=t.if("#Cardinal");if(!0===o.found){var u=o.match("#Date #Value [#Cardinal]",0);m(u,"date-value-year"),u=o.match("#Date [#Cardinal]",0),f(u,"date-year"),u=o.match("".concat(h," of [#Cardinal]")),f(u,"section-year"),u=o.match("#Month #Value [#Cardinal]",0),m(u,"month-value-year"),u=o.match("#Month #Value to #Value [#Cardinal]",0),m(u,"month-range-year"),u=o.match("(in|of|by|during|before|starting|ending|for|year|since) [#Cardinal]",0),m(u,"in-year-1"),u=o.match("(q1|q2|q3|q4) [#Cardinal]",0),m(u,"in-year-2"),u=o.match("#Ordinal quarter of? [#Cardinal]",0),m(u,"in-year-3"),u=o.match("the year [#Cardinal]",0),m(u,"in-year-4"),u=o.match("it (is|was) [#Cardinal]",0),f(u,"in-year-5"),o.match("".concat(h," of #Year")).tag("Date");var s=o.match("between [#Cardinal] and [#Cardinal]");m(s.groups("0"),"between-year-and-year-1"),m(s.groups("1"),"between-year-and-year-2")}var y=t.if("#Time");!0===y.found&&y.match("(by|before|after|at|@|about) #Time").tag("Time","preposition-time");var p=t.match("^/^20[012][0-9]$/$");return f(p,"2020-ish"),t.match("(in|after) /^[0-9]+(min|sec|wk)s?/").tag("Date","shift-units"),t.match("#Date [(now|night|sometime)]",0).tag("Time","date-now"),t.match("(from|starting|until|by) now").tag("Date","for-now"),t.match("(each|every) night").tag("Date","for-now"),t},p="date-values",g=function(t){return t.has("once [a] #Duration")||t.match("[a] #Duration",0).replaceWith("1").tag("Cardinal",p),t.has("#Value")&&(t.match("#Month #Value to #Value of? #Year?").tag("Date",p),t.match("#Value to #Value of? #Month #Year?").tag("Date",p),t.match("#Value #Duration of #Date").tag("Date",p),t.match("#Value+ #Duration (after|before|into|later|afterwards|ago)?").tag("Date",p),t.match("#Value #Date").tag("Date",p),t.match("#Date #Value").tag("Date",p),t.match("#Date #Preposition #Value").tag("Date",p),t.match("#Date (after|before|during|on|in) #Value").tag("Date",p),t.match("#Value (year|month|week|day) and a half").tag("Date",p),t.match("#Value and a half (years|months|weeks|days)").tag("Date",p),t.match("on the #Ordinal").tag("Date",p)),t},v="date-tagger",b=function(t){return t.match("(spring|summer|winter|fall|autumn|springtime|wintertime|summertime)").match("#Noun").tag("Season",v),t.match("(q1|q2|q3|q4)").tag("FinancialQuarter",v),t.match("(this|next|last|current) quarter").tag("FinancialQuarter",v),t.match("(this|next|last|current) season").tag("Season",v),t.has("#Date")&&(t.match("#Date #Preposition #Date").tag("Date",v),t.match("(once|twice) (a|an|each) #Date").tag("Date",v),t.match("#Date+").tag("Date",v),t.match("(by|until|on|in|at|during|over|every|each|due) the? #Date").tag("Date","until-june"),t.match("a #Duration").tag("Date",v),t.match("(between|from) #Date").tag("Date",v),t.match("(to|until|upto) #Date").tag("Date",v),t.match("#Date and #Date").tag("Date",v),t.match("(by|until|after|before|during|on|in|following|since) (next|this|last)? (#Date|#Date)").tag("Date",v),t.match("the? #Date after next one?").tag("Date",v),t.match("(about|approx|approximately|around) #Date").tag("Date",v)),t},w="section-tagger",k=function(t){return t.has("#Date")&&(t.match("this? (last|next|past|this|previous|current|upcoming|coming|the) #Date").tag("Date",w),t.match("(starting|beginning|ending) #Date").tag("Date",w),t.match("the? (start|end|middle|beginning) of (last|next|this|the) (#Date|#Date)").tag("Date",w),t.match("(the|this) #Date").tag("Date",w),t.match("#Date up to #Date").tag("Date",w)),t},D="time-tagger",A=function(t){return t.match("#Cardinal oclock").tag("Time",D),t.match("/^[0-9]{2}h[0-9]{2}$/").tag("Time",D),t.match("/^[0-9]{2}/[0-9]{2}/").tag("Date",D).unTag("Value"),t.match("[#Value] (in|at) the? (morning|evening|night|nighttime)").tag("Time",D),t.has("#Cardinal")&&!t.has("#Month")&&(t.match("1? (half|quarter|25|15|10|5) (past|after|to) #Cardinal").tag("Time",D),t.match("(5|10|15|20|five|ten|fifteen|20) (to|after|past) [#Cardinal]").tag("Time",D)),t.has("#Date")&&(t.match("/^[0-9]{4}[:-][0-9]{2}[:-][0-9]{2}T[0-9]/").tag("Time",D),t.match("#Date [at #Cardinal]",0).notIf("#Year").tag("Time",D),t.match("half an (hour|minute|second)").tag("Date",D),t.match("(in|for|by|near|at) #Timezone").tag("Timezone",D)),t.match("(at|around|near) [#Cardinal (thirty|fifteen) (am|pm)?]",0).tag("Time",D),t},O="shift-tagger",x=function(t){return t.has("#Date")&&(t.match("#Cardinal #Duration (before|after|ago|from|hence|back)").tag("DateShift",O),t.match("in #Cardinal #Duration").tag("DateShift",O),t.match("in a (few|couple) of? #Duration").tag("DateShift",O),t.match("#Cardinal #Duration and? #DateShift").tag("DateShift",O),t.match("#DateShift and #Cardinal #Duration").tag("DateShift",O),t.match("[#Duration (after|before)] #Date",0).tag("DateShift",O),t.match("in half (a|an) #Duration").tag("DateShift",O)),t},z=function(t){t.match("#Month #Ordinal and #Ordinal").tag("Date","ord-and-ord"),t.match("every other #Duration").tag("Date","every-other"),t.match("(every|any|each|a) (day|weekday|week day|weekend|weekend day)").tag("Date","any-weekday"),t.match("(every|any|each|a) (#WeekDay)").tag("Date","any-wednesday"),t.match("(every|any|each|a) (#Duration)").tag("Date","any-week")},j=["act","aft","akst","anat","art","azot","azt","bnt","bot","bt","cast","cat","cct","chast","chut","ckt","cvt","cxt","davt","eat","ect","fjt","fkst","fnt","gamt","get","gft","gilt","gyt","hast","hncu","hneg","hnnomx","hnog","hnpm","hnpmx","hntn","hovt","iot","irkt","jst","kgt","kost","lint","magt","mart","mawt","mmt","nct","nft","novt","npt","nrt","nut","nzst","omst","pet","pett","phot","phst","pont","pwt","ret","sakt","samt","sbt","sct","sret","srt","syot","taht","tft","tjt","tkt","tlt","tmt","tot","tvt","ulat","vut","wakt","wat","wet","wft","wit","wst","yekt"].reduce((function(t,e){return t[e]=!0,t}),{}),_="fix-tagger",T=[y,g,b,k,A,x,z,function(t){var e=t.match("#Time [#Acronym]",0);if(e.found){var a=e.text("reduced");!0===j[a]&&e.tag("Timezone","tz-abbr")}},function(t){if(t.has("#Date")){var e=t.match("#Date+ by #Date+");e.found&&!e.has("^due")&&e.match("^#Date+").unTag("Date","by-monday");var a=t.match("#Date+");a.match("^day$").unTag("Date","spa-day"),a.match("(in|of|by|for)? (#Possessive && #Date)").unTag("Date","tomorrows meeting");var n="(yesterday|today|tomorrow)";a.has(n)&&(a.match("".concat(n," [#Value]$")).unTag("Date","yesterday-7"),a.match("^[#Value] ".concat(n,"$"),0).unTag("Date","7 yesterday"),a.match("#WeekDay+ ".concat(n,"$")).unTag("Date").lastTerm().tag("Date","fri-yesterday")),a.match("on #Cardinal$").unTag("Date",_),a.match("this tomorrow").terms(0).unTag("Date","this-tomorrow"),a.match("(q1|q2|q3|q4) #Year").tag("Date",_),a.match("^#Value (this|next|last)").terms(0).unTag("Date",_),a.has("(last|this|next)")&&(a.match("(last|this|next) #Duration #Value").terms(2).unTag("Date",_),a.match("!#Month #Value (last|this|next) #Date").terms(0).unTag("Date",_)),!1===a.has("(#Year|#Time|#TextValue|#NumberRange)")&&a.match("(#Month|#WeekDay) #Value #Value").terms(2).unTag("Date",_),a.has("^between")&&!a.has("and .")&&a.unTag("Date",_),!a.has("#Month #Month")||a.has("@hasHyphen")||a.has("@hasComma")||a.match("#Month").lastTerm().unTag("Date","month-month"),a.has("(minutes|seconds|weeks|hours|days|months)")&&!a.has("#Value #Duration")&&a.match("(minutes|seconds|weeks|hours|days|months)").unTag("Date","log-hours"),a.has("about #Holiday")&&a.match("about").unTag("#Date","about-thanksgiving"),a.match("#Ordinal quarter of? #Year").unTag("Fraction"),a.match("(from|by|before) now").unTag("Time"),a.match("#Date+").match("^the").unTag("Date")}return t}],M=function(t){return t=function(t){return"function"==typeof t.numbers?t.numbers().normalize():console.warn("Warning: compromise-numbers plugin is not loaded.\n You should load this plugin \n - https://bit.ly/3t8RfFG"),t}(t),T.forEach((function(e){return e(t)})),t},S={FinancialQuarter:{isA:"Date",notA:"Fraction"},Season:{isA:"Date"},Year:{isA:["Date"],notA:"RomanNumeral"},Duration:{isA:["Date","Noun"]},Holiday:{isA:["Date","Noun"]},DateShift:{isA:["Date"],notA:["TimeZone","Holiday"]}};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function E(t){var e={exports:{}};return t(e,e.exports),e.exports}var V=E((function(t,e){t.exports=function(){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){return a(t)||n(t,e)||r(t,e)||o()}function a(t){if(Array.isArray(t))return t}function n(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var a=[],n=!0,r=!1,i=void 0;try{for(var o,u=t[Symbol.iterator]();!(n=(o=u.next()).done)&&(a.push(o.value),!e||a.length!==e);n=!0);}catch(t){r=!0,i=t}finally{try{n||null==u.return||u.return()}finally{if(r)throw i}}return a}}function r(t,e){if(t){if("string"==typeof t)return i(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?i(t,e):void 0}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,n=new Array(e);a=o&&t");return!0===c(t.epoch,r[0],r[1],a,n)?a:n},h={"9|s":"2/dili,2/jayapura","9|n":"2/chita,2/khandyga,2/pyongyang,2/seoul,2/tokyo,11/palau","9.5|s|04/04:03->10/03:02":"4/adelaide,4/broken_hill,4/south,4/yancowinna","9.5|s":"4/darwin,4/north","8|s|03/08:01->10/04:00":"12/casey","8|s":"2/kuala_lumpur,2/makassar,2/singapore,4/perth,2/ujung_pandang,4/west","8|n":"2/brunei,2/choibalsan,2/hong_kong,2/irkutsk,2/kuching,2/macau,2/manila,2/shanghai,2/taipei,2/ulaanbaatar,2/chongqing,2/chungking,2/harbin,2/macao,2/ulan_bator","8.75|s":"4/eucla","7|s":"12/davis,2/jakarta,9/christmas","7|n":"2/bangkok,2/barnaul,2/hovd,2/krasnoyarsk,2/novokuznetsk,2/novosibirsk,2/phnom_penh,2/pontianak,2/saigon,2/tomsk,2/vientiane,2/ho_chi_minh","6|s":"12/vostok","6|n":"2/almaty,2/bishkek,2/dhaka,2/omsk,2/qyzylorda,2/qostanay,2/thimphu,2/urumqi,9/chagos,2/dacca,2/kashgar,2/thimbu","6.5|n":"2/rangoon,9/cocos,2/yangon","5|s":"12/mawson,9/kerguelen","5|n":"2/aqtau,2/aqtobe,2/ashgabat,2/atyrau,2/baku,2/dushanbe,2/karachi,2/oral,2/samarkand,2/tashkent,2/yekaterinburg,9/maldives,2/ashkhabad","5.75|n":"2/katmandu,2/kathmandu","5.5|n":"2/calcutta,2/colombo,2/kolkata","4|s":"9/reunion","4|n":"2/dubai,2/muscat,2/tbilisi,2/yerevan,8/astrakhan,8/samara,8/saratov,8/ulyanovsk,8/volgograd,2/volgograd,9/mahe,9/mauritius","4.5|n|03/22:00->09/21:24":"2/tehran","4.5|n":"2/kabul","3|s":"12/syowa,9/antananarivo","3|n|03/28:03->10/31:04":"2/famagusta,2/nicosia,8/athens,8/bucharest,8/helsinki,8/kiev,8/mariehamn,8/riga,8/sofia,8/tallinn,8/uzhgorod,8/vilnius,8/zaporozhye,8/nicosia","3|n|03/28:02->10/31:03":"8/chisinau,8/tiraspol","3|n|03/28:00->10/30:24":"2/beirut","3|n|03/27:00->10/30:01":"2/gaza,2/hebron","3|n|03/26:02->10/31:02":"2/jerusalem,2/tel_aviv","3|n|03/26:00->10/29:01":"2/amman","3|n|03/26:00->10/28:24":"2/damascus","3|n":"0/addis_ababa,0/asmera,0/dar_es_salaam,0/djibouti,0/juba,0/kampala,0/mogadishu,0/nairobi,2/aden,2/baghdad,2/bahrain,2/kuwait,2/qatar,2/riyadh,8/istanbul,8/kirov,8/minsk,8/moscow,8/simferopol,9/comoro,9/mayotte,0/asmara,2/istanbul","2|s|03/28:02->10/31:02":"12/troll","2|s":"0/gaborone,0/harare,0/johannesburg,0/lubumbashi,0/lusaka,0/maputo,0/maseru,0/mbabane","2|n|03/28:02->10/31:03":"0/ceuta,arctic/longyearbyen,8/amsterdam,8/andorra,8/belgrade,8/berlin,8/bratislava,8/brussels,8/budapest,8/busingen,8/copenhagen,8/gibraltar,8/ljubljana,8/luxembourg,8/madrid,8/malta,8/monaco,8/oslo,8/paris,8/podgorica,8/prague,8/rome,8/san_marino,8/sarajevo,8/skopje,8/stockholm,8/tirane,8/vaduz,8/vatican,8/vienna,8/warsaw,8/zagreb,8/zurich,3/jan_mayen","2|n":"0/blantyre,0/bujumbura,0/cairo,0/khartoum,0/kigali,0/tripoli,8/kaliningrad","1|s":"0/brazzaville,0/kinshasa,0/luanda,0/windhoek","1|n|04/11:03->05/16:02":"0/casablanca,0/el_aaiun","1|n|03/28:01->10/31:02":"3/canary,3/faeroe,3/madeira,8/dublin,8/guernsey,8/isle_of_man,8/jersey,8/lisbon,8/london,3/faroe,8/belfast","1|n":"0/algiers,0/bangui,0/douala,0/lagos,0/libreville,0/malabo,0/ndjamena,0/niamey,0/porto-novo,0/tunis","14|n":"11/kiritimati","13|s|04/04:04->09/26:03":"11/apia","13|s|01/15:02->11/05:03":"11/tongatapu","13|n":"11/enderbury,11/fakaofo","12|s|04/04:03->09/26:02":"12/mcmurdo,11/auckland,12/south_pole","12|s|01/17:03->11/14:02":"11/fiji","12|n":"2/anadyr,2/kamchatka,2/srednekolymsk,11/funafuti,11/kwajalein,11/majuro,11/nauru,11/tarawa,11/wake,11/wallis","12.75|s|04/04:03->04/04:02":"11/chatham","11|s|04/04:03->10/03:02":"12/macquarie","11|s":"11/bougainville","11|n":"2/magadan,2/sakhalin,11/efate,11/guadalcanal,11/kosrae,11/noumea,11/ponape,11/pohnpei","11.5|n|04/04:03->10/03:02":"11/norfolk","10|s|04/04:03->10/03:02":"4/currie,4/hobart,4/melbourne,4/sydney,4/act,4/canberra,4/nsw,4/tasmania,4/victoria","10|s":"12/dumontdurville,4/brisbane,4/lindeman,11/port_moresby,4/queensland","10|n":"2/ust-nera,2/vladivostok,2/yakutsk,11/guam,11/saipan,11/truk,11/chuuk,11/yap","10.5|s|04/04:01->10/03:02":"4/lord_howe,4/lhi","0|n|03/28:00->10/31:01":"1/scoresbysund,3/azores","0|n":"0/abidjan,0/accra,0/bamako,0/banjul,0/bissau,0/conakry,0/dakar,0/freetown,0/lome,0/monrovia,0/nouakchott,0/ouagadougou,0/sao_tome,1/danmarkshavn,3/reykjavik,3/st_helena,13/gmt,13/utc,0/timbuktu,13/gmt-0,13/gmt+0,13/gmt0,13/greenwich,13/uct,13/universal,13/zulu","-9|n|03/14:02->11/07:02":"1/adak,1/atka,us/aleutian","-9|n":"11/gambier","-9.5|n":"11/marquesas","-8|n|03/14:02->11/07:02":"1/anchorage,1/juneau,1/metlakatla,1/nome,1/sitka,1/yakutat,us/alaska","-8|n":"11/pitcairn","-7|n|03/14:02->11/07:02":"1/los_angeles,1/santa_isabel,1/tijuana,1/vancouver,1/ensenada,6/pacific,10/bajanorte,us/pacific-new,us/pacific","-7|n|03/08:02->11/01:01":"1/dawson,1/whitehorse,6/yukon","-7|n":"1/creston,1/dawson_creek,1/fort_nelson,1/hermosillo,1/phoenix,us/arizona","-6|s|04/03:22->09/04:22":"11/easter,7/easterisland","-6|n|04/04:02->10/31:02":"1/chihuahua,1/mazatlan,10/bajasur","-6|n|03/14:02->11/07:02":"1/boise,1/cambridge_bay,1/denver,1/edmonton,1/inuvik,1/ojinaga,1/yellowknife,1/shiprock,6/mountain,us/mountain","-6|n":"1/belize,1/costa_rica,1/el_salvador,1/guatemala,1/managua,1/regina,1/swift_current,1/tegucigalpa,11/galapagos,6/east-saskatchewan,6/saskatchewan","-5|s":"1/lima,1/rio_branco,1/porto_acre,5/acre","-5|n|04/04:02->10/31:02":"1/bahia_banderas,1/merida,1/mexico_city,1/monterrey,10/general","-5|n|03/14:02->11/07:02":"1/chicago,1/matamoros,1/menominee,1/rainy_river,1/rankin_inlet,1/resolute,1/winnipeg,1/indiana/knox,1/indiana/tell_city,1/north_dakota/beulah,1/north_dakota/center,1/north_dakota/new_salem,1/knox_in,6/central,us/central,us/indiana-starke","-5|n|03/12:03->11/05:01":"1/north_dakota","-5|n":"1/bogota,1/cancun,1/cayman,1/coral_harbour,1/eirunepe,1/guayaquil,1/jamaica,1/panama,1/atikokan","-4|s|05/13:23->08/13:01":"12/palmer","-4|s|04/03:24->09/05:00":"1/santiago,7/continental","-4|s|03/27:24->10/03:00":"1/asuncion","-4|s|02/16:24->11/03:00":"1/campo_grande,1/cuiaba","-4|s":"1/la_paz,1/manaus,5/west","-4|n|03/14:02->11/07:02":"1/detroit,1/grand_turk,1/indianapolis,1/iqaluit,1/louisville,1/montreal,1/nassau,1/new_york,1/nipigon,1/pangnirtung,1/port-au-prince,1/thunder_bay,1/toronto,1/indiana/marengo,1/indiana/petersburg,1/indiana/vevay,1/indiana/vincennes,1/indiana/winamac,1/kentucky/monticello,1/fort_wayne,1/indiana/indianapolis,1/kentucky/louisville,6/eastern,us/east-indiana,us/eastern,us/michigan","-4|n|03/14:00->11/07:01":"1/havana","-4|n|03/12:03->11/05:01":"1/indiana,1/kentucky","-4|n":"1/anguilla,1/antigua,1/aruba,1/barbados,1/blanc-sablon,1/boa_vista,1/caracas,1/curacao,1/dominica,1/grenada,1/guadeloupe,1/guyana,1/kralendijk,1/lower_princes,1/marigot,1/martinique,1/montserrat,1/port_of_spain,1/porto_velho,1/puerto_rico,1/santo_domingo,1/st_barthelemy,1/st_kitts,1/st_lucia,1/st_thomas,1/st_vincent,1/tortola,1/virgin","-3|s":"1/argentina,1/buenos_aires,1/catamarca,1/cordoba,1/fortaleza,1/jujuy,1/mendoza,1/montevideo,1/punta_arenas,1/sao_paulo,12/rothera,3/stanley,1/argentina/la_rioja,1/argentina/rio_gallegos,1/argentina/salta,1/argentina/san_juan,1/argentina/san_luis,1/argentina/tucuman,1/argentina/ushuaia,1/argentina/buenos_aires,1/argentina/catamarca,1/argentina/comodrivadavia,1/argentina/cordoba,1/argentina/jujuy,1/argentina/mendoza,1/rosario,5/east","-3|n|03/14:02->11/07:02":"1/glace_bay,1/goose_bay,1/halifax,1/moncton,1/thule,3/bermuda,6/atlantic","-3|n":"1/araguaina,1/bahia,1/belem,1/cayenne,1/maceio,1/paramaribo,1/recife,1/santarem","-2|n|03/27:22->10/30:23":"1/godthab,1/nuuk","-2|n|03/14:02->11/07:02":"1/miquelon","-2|n":"1/noronha,3/south_georgia,5/denoronha","-2.5|n|03/14:02->11/07:02":"1/st_johns,6/newfoundland","-1|n":"3/cape_verde","-11|n":"11/midway,11/niue,11/pago_pago,11/samoa,us/samoa","-10|n":"11/honolulu,11/johnston,11/rarotonga,11/tahiti,us/hawaii"},l=["africa","america","asia","atlantic","australia","brazil","canada","chile","europe","indian","mexico","pacific","antarctica","etc"];function m(t,e){return t(e={exports:{}},e.exports),e.exports}function f(t){return t&&t.default||t}var y=f(Object.freeze({__proto__:null,default:h})),p={};Object.keys(y).forEach((function(t){var e=t.split("|"),a={offset:Number(e[0]),hem:e[1]};e[2]&&(a.dst=e[2]),y[t].split(",").forEach((function(t){t=t.replace(/(^[0-9]+)\//,(function(t,e){return e=Number(e),l[e]+"/"})),p[t]=a}))})),p.utc={offset:0,hem:"n"};for(var g=-14;g<=14;g+=.5){var v=g;v>0&&(v="+"+v);var b="etc/gmt"+v;p[b]={offset:-1*g,hem:"n"},p[b="utc/gmt"+v]={offset:-1*g,hem:"n"}}var w=p,k="utc",D=function(){if("undefined"==typeof Intl||void 0===Intl.DateTimeFormat)return null;var t=Intl.DateTimeFormat();if(void 0===t||void 0===t.resolvedOptions)return null;var e=t.resolvedOptions().timeZone;return e?e.toLowerCase():null},A=/(\-?[0-9]+)h(rs)?/i,O=/(\-?[0-9]+)/,x=/utc([\-+]?[0-9]+)/i,z=/gmt([\-+]?[0-9]+)/i,j=function(t){return(t=Number(t))>=-13&&t<=13?"etc/gmt"+(t=((t*=-1)>0?"+":"")+t):null},_=function(t){var e=t.match(A);if(null!==e)return j(e[1]);if(null!==(e=t.match(x)))return j(e[1]);if(null!==(e=t.match(z))){var a=-1*Number(e[1]);return j(a)}return null!==(e=t.match(O))?j(e[1]):null},T=function(){var t=D();return null===t?k:t}(),M=Object.keys(w).reduce((function(t,e){var a=e.split("/")[1]||"";return t[a=a.replace(/_/g," ")]=e,t}),{}),S=function(t){return t=(t=(t=(t=(t=(t=t.replace(/ time/g,"")).replace(/ (standard|daylight|summer)/g,"")).replace(/\b(east|west|north|south)ern/g,"$1")).replace(/\b(africa|america|australia)n/g,"$1")).replace(/\beuropean/g,"europe")).replace(/\islands/g,"island")},E=function(t,e){if(!t)return T;"string"!=typeof t&&console.error("Timezone must be a string - recieved: '",t,"'\n");var a=t.trim();if(a=a.toLowerCase(),!0===e.hasOwnProperty(a))return a;if(a=S(a),!0===e.hasOwnProperty(a))return a;if(!0===M.hasOwnProperty(a))return M[a];if(!0===/[0-9]/.test(a)){var n=_(a);if(n)return n}throw new Error("Spacetime: Cannot find timezone named: '"+t+"'. Please enter an IANA timezone id.")},V={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5};V.date=V.day,V.month=25488e5,V.week=6048e5,V.year=3154e7,Object.keys(V).forEach((function(t){V[t+"s"]=V[t]}));var q=V,C=function(t,e,a,n,r){var i=t.d[a]();if(i!==e){var o=null===r?null:t.d[r](),u=t.epoch,s=e-i;t.epoch+=q[n]*s,"day"===n&&Math.abs(s)>28&&e<28&&(t.epoch+=q.hour),null!==r&&o!==t.d[r]()&&(t.epoch=u);for(var c=q[n]/2;t.d[a]()e;)t.epoch-=c;null!==r&&o!==t.d[r]()&&(t.epoch=u)}},P={year:{valid:function(t){return t>-4e3&&t<4e3},walkTo:function(t,e){return C(t,e,"getFullYear","year",null)}},month:{valid:function(t){return t>=0&&t<=11},walkTo:function(t,e){var a=t.d,n=a.getMonth(),r=t.epoch,i=a.getFullYear();if(n!==e){var o=e-n;for(t.epoch+=q.day*(28*o),i!==t.d.getFullYear()&&(t.epoch=r);t.d.getMonth()e;)t.epoch-=q.day}}},date:{valid:function(t){return t>0&&t<=31},walkTo:function(t,e){return C(t,e,"getDate","day","getMonth")}},hour:{valid:function(t){return t>=0&&t<24},walkTo:function(t,e){return C(t,e,"getHours","hour","getDate")}},minute:{valid:function(t){return t>=0&&t<60},walkTo:function(t,e){return C(t,e,"getMinutes","minute","getHours")}},second:{valid:function(t){return t>=0&&t<60},walkTo:function(t,e){t.epoch=t.seconds(e).epoch}},millisecond:{valid:function(t){return t>=0&&t<1e3},walkTo:function(t,e){t.epoch=t.milliseconds(e).epoch}}},$=function(t,e){for(var a=Object.keys(P),n=t.clone(),r=0;r100&&(a/=100),(a*=-1)>=0&&(a="+"+a);var n="etc/gmt"+a;return t.timezones[n]&&(t.tz=n),t},H=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=(e=e.replace(/^\s+/,"").toLowerCase()).match(/([0-9]{1,2}):([0-9]{1,2}):?([0-9]{1,2})?[:\.]?([0-9]{1,4})?/);if(null!==a){var n=Number(a[1]);if(n<0||n>24)return t.startOf("day");var r=Number(a[2]);if(a[2].length<2||r<0||r>59)return t.startOf("day");a[4]>999&&(a[4]=parseInt("".concat(a[4]).substring(0,3),10)),t=(t=(t=(t=t.hour(n)).minute(r)).seconds(a[3]||0)).millisecond(a[4]||0);var i=e.match(/[\b0-9](am|pm)\b/);return null!==i&&i[1]&&(t=t.ampm(i[1])),t}if(null!==(a=e.match(/([0-9]+) ?(am|pm)/))&&a[1]){var o=Number(a[1]);return o>12||o<1?t.startOf("day"):t=(t=(t=t.hour(a[1]||0)).ampm(a[2])).startOf("hour")}return t=t.startOf("day")},W=[31,28,31,30,31,30,31,31,30,31,30,31],F=m((function(t,e){e.isLeapYear=function(t){return t%4==0&&t%100!=0||t%400==0},e.isDate=function(t){return"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(t.valueOf())},e.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},e.isObject=function(t){return"[object Object]"===Object.prototype.toString.call(t)},e.isBoolean=function(t){return"[object Boolean]"===Object.prototype.toString.call(t)},e.zeroPad=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,a="0";return(t+="").length>=e?t:new Array(e-t.length+1).join(a)+t},e.titleCase=function(t){return t?t[0].toUpperCase()+t.substr(1):""},e.ordinal=function(t){var e=t%10,a=t%100;return 1===e&&11!==a?t+"st":2===e&&12!==a?t+"nd":3===e&&13!==a?t+"rd":t+"th"},e.toCardinal=function(t){return t=(t=String(t)).replace(/([0-9])(st|nd|rd|th)$/i,"$1"),parseInt(t,10)},e.normalize=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"day"===(t=(t=(t=(t=t.toLowerCase().trim()).replace(/ies$/,"y")).replace(/s$/,"")).replace(/-/g,""))||"days"===t?"date":"min"===t||"mins"===t?"minute":t},e.getEpoch=function(t){return"number"==typeof t?t:e.isDate(t)?t.getTime():t.epoch?t.epoch:null},e.beADate=function(t,a){return!1===e.isObject(t)?a.clone().set(t):t},e.formatTimezone=function(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t>0?"+":"-",r=Math.abs(t),i=e.zeroPad(parseInt(""+r,10)),o=e.zeroPad(r%1*60);return"".concat(n).concat(i).concat(a).concat(o)}}));F.isLeapYear,F.isDate,F.isArray,F.isObject,F.isBoolean,F.zeroPad,F.titleCase,F.ordinal,F.toCardinal,F.normalize,F.getEpoch,F.beADate,F.formatTimezone;var Q=F.isLeapYear,J=function(t){if(!0!==W.hasOwnProperty(t.month))return!1;if(1===t.month)return!!(Q(t.year)&&t.date<=29)||t.date<=28;var e=W[t.month]||0;return t.date<=e},R=L.mapping(),K=function(){var t=arguments.length>1?arguments[1]:void 0,e=parseInt((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").trim(),10);return!e&&t&&(e=t.year),e=e||(new Date).getFullYear()},Z=[{reg:/^(\-?0?0?[0-9]{3,4})-([0-9]{1,2})-([0-9]{1,2})[T| ]([0-9.:]+)(Z|[0-9\-\+:]+)?$/i,parse:function(t,e,a,n){var r=parseInt(e[2],10)-1,i={year:e[1],month:r,date:e[3]};return!1===J(i)?(t.epoch=null,t):(B(t,e[5]),$(t,i),t=H(t,e[4]))}},{reg:/^([0-9]{4})[\-\/.]([0-9]{1,2})[\-\/.]([0-9]{1,2}),?( [0-9]{1,2}:[0-9]{2}:?[0-9]{0,2}? ?(am|pm|gmt))?$/i,parse:function(t,e){var a={year:e[1],month:parseInt(e[2],10)-1,date:parseInt(e[3],10)};return a.month>=12&&(a.date=parseInt(e[2],10),a.month=parseInt(e[3],10)-1),!1===J(a)?(t.epoch=null,t):($(t,a),t=H(t,e[4]))}},{reg:/^([0-9]{1,2})[\-\/.]([0-9]{1,2})[\-\/.]?([0-9]{4})?,?( [0-9]{1,2}:[0-9]{2}:?[0-9]{0,2}? ?(am|pm|gmt))?$/i,parse:function(t,e){var a=parseInt(e[1],10)-1,n=parseInt(e[2],10);(t.british||a>=12)&&(n=parseInt(e[1],10),a=parseInt(e[2],10)-1);var r={year:K(e[3],t._today)||(new Date).getFullYear(),month:a,date:n};return!1===J(r)?(t.epoch=null,t):($(t,r),t=H(t,e[4]))}},{reg:/^([0-9]{4})[\-\/]([0-9]{2})$/i,parse:function(t,e,a,n){var r=parseInt(e[2],10)-1,i={year:e[1],month:r,date:1};return!1===J(i)?(t.epoch=null,t):(B(t,e[5]),$(t,i),t=H(t,e[4]))}},{reg:/^([0-9]{1,2})[\-\/]([a-z]+)[\-\/]?([0-9]{4})?$/i,parse:function(t,e){var a=R[e[2].toLowerCase()],n={year:K(e[3],t._today),month:a,date:F.toCardinal(e[1]||"")};return!1===J(n)?(t.epoch=null,t):($(t,n),t=H(t,e[4]))}},{reg:/^([a-z]+)[\-\/]([0-9]{1,2})[\-\/]?([0-9]{4})?$/i,parse:function(t,e){var a=R[e[1].toLowerCase()],n={year:K(e[3],t._today),month:a,date:F.toCardinal(e[2]||"")};return!1===J(n)?(t.epoch=null,t):($(t,n),t=H(t,e[4]))}},{reg:/^([a-z]+) ([0-9]{1,2}(?:st|nd|rd|th)?),?( [0-9]{4})?( ([0-9:]+( ?am| ?pm| ?gmt)?))?$/i,parse:function(t,e){var a=R[e[1].toLowerCase()],n={year:K(e[3],t._today),month:a,date:F.toCardinal(e[2]||"")};return!1===J(n)?(t.epoch=null,t):($(t,n),t=H(t,e[4]))}},{reg:/^([a-z]+) ([0-9]{4})$/i,parse:function(t,e){var a=R[e[1].toLowerCase()],n={year:K(e[2],t._today),month:a,date:t._today.date||1};return!1===J(n)?(t.epoch=null,t):($(t,n),t=H(t,e[4]))}},{reg:/^([0-9]{1,2}(?:st|nd|rd|th)?) ([a-z]+),?( [0-9]{4})?,? ?([0-9]{1,2}:[0-9]{2}:?[0-9]{0,2}? ?(am|pm|gmt))?$/i,parse:function(t,e){var a=R[e[2].toLowerCase()];if(!a)return null;var n={year:K(e[3],t._today),month:a,date:F.toCardinal(e[1])};return!1===J(n)?(t.epoch=null,t):($(t,n),t=H(t,e[4]))}},{reg:/^(q[0-9])( of)?( [0-9]{4})?/i,parse:function(t,e){var a=e[1]||"";t=t.quarter(a);var n=e[3]||"";return n&&(n=n.trim(),t=t.year(n)),t}},{reg:/^(spring|summer|winter|fall|autumn)( of)?( [0-9]{4})?/i,parse:function(t,e){var a=e[1]||"";t=t.season(a);var n=e[3]||"";return n&&(n=n.trim(),t=t.year(n)),t}},{reg:/^[0-9,]+ ?b\.?c\.?$/i,parse:function(t,e){var a=e[0]||"";a=(a=a.replace(/^([0-9,]+) ?b\.?c\.?$/i,"-$1")).replace(/,/g,"");var n=parseInt(a.trim(),10),r=new Date,i={year:n,month:r.getMonth(),date:r.getDate()};return!1===J(i)?(t.epoch=null,t):($(t,i),t=H(t))}},{reg:/^[0-9,]+ ?(a\.?d\.?|c\.?e\.?)$/i,parse:function(t,e){var a=e[0]||"";a=a.replace(/,/g,"");var n=parseInt(a.trim(),10),r=new Date,i={year:n,month:r.getMonth(),date:r.getDate()};return!1===J(i)?(t.epoch=null,t):($(t,i),t=H(t))}},{reg:/^[0-9]{4}( ?a\.?d\.?)?$/i,parse:function(t,e){var a=t._today,n=K(e[0],a),r=new Date;a.month&&!a.date&&(a.date=1);var i={year:n,month:a.month||r.getMonth(),date:a.date||r.getDate()};return!1===J(i)?(t.epoch=null,t):($(t,i),t=H(t))}}],G=function(t){return t.epoch=Date.now(),Object.keys(t._today||{}).forEach((function(e){"function"==typeof t[e]&&(t=t[e](t._today[e]))})),t},U={now:function(t){return G(t)},today:function(t){return G(t)},tonight:function(t){return t=(t=G(t)).hour(18)},tomorrow:function(t){return t=(t=(t=G(t)).add(1,"day")).startOf("day")},yesterday:function(t){return t=(t=(t=G(t)).subtract(1,"day")).startOf("day")},christmas:function(t){var e=G(t).year();return t=t.set([e,11,25,18,0,0])},"new years":function(t){var e=G(t).year();return t=t.set([e,11,31,18,0,0])}};U["new years eve"]=U["new years"];var X=U,tt=25e8,et={year:(new Date).getFullYear(),month:0,date:1},at=function(t,e,a){if(0===e.length)return t;for(var n=["year","month","date","hour","minute","second","millisecond"],r=0;r0&&e0){var r=nt(t,n,et);r.isValid()&&(t.epoch=r.epoch)}if(null==e||""===e)return t;if(!0===F.isDate(e))return t.epoch=e.getTime(),t;if(!0===F.isArray(e))return t=at(t,e,n);if(!0===F.isObject(e))return e.epoch?(t.epoch=e.epoch,t.tz=e.tz,t):t=nt(t,e,n);if("string"!=typeof e)return t;if(e=(e=(e=e.replace(/\b(mon|tues|wed|wednes|thu|thurs|fri|sat|satur|sun)(day)?\b/i,"")).replace(/,/g,"")).replace(/ +/g," ").trim(),!0===X.hasOwnProperty(e))return t=X[e](t);for(var i=0;i0?e:(e=Math.abs(e),e+" BC")},"year-short":function(t){var e=t.year();return e>0?"'".concat(String(t.year()).substr(2,4)):(e=Math.abs(e))+" BC"},"iso-year":function(t){var e=t.year(),a=e<0,n=F.zeroPad(Math.abs(e),4);return a&&(n="-"+(n=F.zeroPad(n,6))),n},time:function(t){return t.time()},"time-24":function(t){return"".concat(t.hour24(),":").concat(F.zeroPad(t.minute()))},hour:function(t){return t.hour12()},"hour-pad":function(t){return F.zeroPad(t.hour12())},"hour-24":function(t){return t.hour24()},"hour-24-pad":function(t){return F.zeroPad(t.hour24())},minute:function(t){return t.minute()},"minute-pad":function(t){return F.zeroPad(t.minute())},second:function(t){return t.second()},"second-pad":function(t){return F.zeroPad(t.second())},ampm:function(t){return t.ampm()},quarter:function(t){return"Q"+t.quarter()},season:function(t){return t.season()},era:function(t){return t.era()},json:function(t){return t.json()},timezone:function(t){return t.timezone().name},offset:function(t){return dt(t)},numeric:function(t){return"".concat(t.year(),"/").concat(F.zeroPad(t.month()+1),"/").concat(F.zeroPad(t.date()))},"numeric-us":function(t){return"".concat(F.zeroPad(t.month()+1),"/").concat(F.zeroPad(t.date()),"/").concat(t.year())},"numeric-uk":function(t){return"".concat(F.zeroPad(t.date()),"/").concat(F.zeroPad(t.month()+1),"/").concat(t.year())},"mm/dd":function(t){return"".concat(F.zeroPad(t.month()+1),"/").concat(F.zeroPad(t.date()))},iso:function(t){var e=t.format("iso-year"),a=F.zeroPad(t.month()+1),n=F.zeroPad(t.date()),r=F.zeroPad(t.h24()),i=F.zeroPad(t.minute()),o=F.zeroPad(t.second()),u=F.zeroPad(t.millisecond(),3),s=dt(t);return"".concat(e,"-").concat(a,"-").concat(n,"T").concat(r,":").concat(i,":").concat(o,".").concat(u).concat(s)},"iso-short":function(t){var e=F.zeroPad(t.month()+1),a=F.zeroPad(t.date());return"".concat(t.year(),"-").concat(e,"-").concat(a)},"iso-utc":function(t){return new Date(t.epoch).toISOString()},nice:function(t){return"".concat(L.short()[t.month()]," ").concat(F.ordinal(t.date()),", ").concat(t.time())},"nice-24":function(t){return"".concat(L.short()[t.month()]," ").concat(F.ordinal(t.date()),", ").concat(t.hour24(),":").concat(F.zeroPad(t.minute()))},"nice-year":function(t){return"".concat(L.short()[t.month()]," ").concat(F.ordinal(t.date()),", ").concat(t.year())},"nice-day":function(t){return"".concat(ut.short()[t.day()]," ").concat(ht(L.short()[t.month()])," ").concat(F.ordinal(t.date()))},"nice-full":function(t){return"".concat(t.dayName()," ").concat(ht(t.monthName())," ").concat(F.ordinal(t.date()),", ").concat(t.time())},"nice-full-24":function(t){return"".concat(t.dayName()," ").concat(ht(t.monthName())," ").concat(F.ordinal(t.date()),", ").concat(t.hour24(),":").concat(F.zeroPad(t.minute()))}},mt={"day-name":"day","month-name":"month","iso 8601":"iso","time-h24":"time-24","time-12":"time","time-h12":"time",tz:"timezone","day-num":"day-number","month-num":"month-number","month-iso":"iso-month","year-iso":"iso-year","nice-short":"nice","nice-short-24":"nice-24",mdy:"numeric-us",dmy:"numeric-uk",ymd:"numeric","yyyy/mm/dd":"numeric","mm/dd/yyyy":"numeric-us","dd/mm/yyyy":"numeric-us","little-endian":"numeric-uk","big-endian":"numeric","day-nice":"nice-day"};Object.keys(mt).forEach((function(t){return lt[t]=lt[mt[t]]}));var ft=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!0!==t.isValid())return"";if(lt.hasOwnProperty(e)){var a=lt[e](t)||"";return"json"!==e&&(a=String(a),"ampm"!==e&&(a=ht(a))),a}if(-1!==e.indexOf("{")){var n=/\{(.+?)\}/g;return e=e.replace(n,(function(e,a){if(a=a.toLowerCase().trim(),lt.hasOwnProperty(a)){var n=String(lt[a](t));return"ampm"!==a?ht(n):n}return""}))}return t.format("iso-short")},yt=F.zeroPad,pt=F.formatTimezone,gt={G:function(t){return t.era()},GG:function(t){return t.era()},GGG:function(t){return t.era()},GGGG:function(t){return"AD"===t.era()?"Anno Domini":"Before Christ"},y:function(t){return t.year()},yy:function(t){return parseInt(String(t.year()).substr(2,4),10)},yyy:function(t){return t.year()},yyyy:function(t){return t.year()},yyyyy:function(t){return"0"+t.year()},Q:function(t){return t.quarter()},QQ:function(t){return t.quarter()},QQQ:function(t){return t.quarter()},QQQQ:function(t){return t.quarter()},M:function(t){return t.month()+1},MM:function(t){return yt(t.month()+1)},MMM:function(t){return t.format("month-short")},MMMM:function(t){return t.format("month")},w:function(t){return t.week()},ww:function(t){return yt(t.week())},d:function(t){return t.date()},dd:function(t){return yt(t.date())},D:function(t){return t.dayOfYear()},DD:function(t){return yt(t.dayOfYear())},DDD:function(t){return yt(t.dayOfYear(),3)},E:function(t){return t.format("day-short")},EE:function(t){return t.format("day-short")},EEE:function(t){return t.format("day-short")},EEEE:function(t){return t.format("day")},EEEEE:function(t){return t.format("day")[0]},e:function(t){return t.day()},ee:function(t){return t.day()},eee:function(t){return t.format("day-short")},eeee:function(t){return t.format("day")},eeeee:function(t){return t.format("day")[0]},a:function(t){return t.ampm().toUpperCase()},aa:function(t){return t.ampm().toUpperCase()},aaa:function(t){return t.ampm().toUpperCase()},aaaa:function(t){return t.ampm().toUpperCase()},h:function(t){return t.h12()},hh:function(t){return yt(t.h12())},H:function(t){return t.hour()},HH:function(t){return yt(t.hour())},m:function(t){return t.minute()},mm:function(t){return yt(t.minute())},s:function(t){return t.second()},ss:function(t){return yt(t.second())},A:function(t){return t.epoch-t.startOf("day").epoch},z:function(t){return t.timezone().name},zz:function(t){return t.timezone().name},zzz:function(t){return t.timezone().name},zzzz:function(t){return t.timezone().name},Z:function(t){return pt(t.timezone().current.offset)},ZZ:function(t){return pt(t.timezone().current.offset)},ZZZ:function(t){return pt(t.timezone().current.offset)},ZZZZ:function(t){return pt(t.timezone().current.offset,":")}},vt=function(t,e,a){for(var n=t,r=e,i=0;i.5&&(t=t.add(1,e)),t=t.startOf(e)):!1===t.silent&&console.warn("no known unit '"+e+"'"),t},zt=function(t,e,a){var n=0;for(t=t.clone();t.isBefore(e);)t=t.add(1,a),n+=1;return t.isAfter(e,a)&&(n-=1),n},jt=function(t,e,a){return t.isBefore(e)?zt(t,e,a):-1*zt(e,t,a)},_t=function(t,e){var a=e.year()-t.year();return(t=t.year(e.year())).isAfter(e)&&(a-=1),a},Tt=function(t,e){var a=e.epoch-t.epoch,n={milliseconds:a,seconds:parseInt(a/1e3,10)};n.minutes=parseInt(n.seconds/60,10),n.hours=parseInt(n.minutes/60,10);var r=t.clone();return n.years=_t(r,e),r=t.add(n.years,"year"),n.months=12*n.years,r=t.add(n.months,"month"),n.months+=jt(r,e,"month"),n.weeks=52*n.years,r=t.add(n.weeks,"week"),n.weeks+=jt(r,e,"week"),n.days=7*n.weeks,r=t.add(n.days,"day"),n.days+=jt(r,e,"day"),n},Mt=function(t){return Object.keys(t).forEach((function(e){t[e]*=-1})),t},St=function(t,e,a){e=F.beADate(e,t);var n=!1;if(t.isAfter(e)){var r=t;t=e,e=r,n=!0}var i=Tt(t,e);return n&&(i=Mt(i)),a?(a=F.normalize(a),!0!==/s$/.test(a)&&(a+="s"),"dates"===a&&(a="days"),i[a]):i},Et={months:{almost:10,over:4},days:{almost:25,over:10},hours:{almost:20,over:8},minutes:{almost:50,over:20},seconds:{almost:50,over:20}};function Vt(t,e){var a=t.isBefore(e),n=a?e:t,r=a?t:e;r=r.clone();var i={years:0,months:0,days:0,hours:0,minutes:0,seconds:0};return Object.keys(i).forEach((function(t){if(!r.isSame(n,t)){var e=r.diff(n,t);r=r.add(e,t),i[t]=e}})),a&&Object.keys(i).forEach((function(t){0!==i[t]&&(i[t]*=-1)})),i}function qt(t,e){return 1===t&&(e=e.slice(0,-1)),t+" "+e}var Ct=function(t,e){var a,n,r,i=Vt(t,e=F.beADate(e,t));if(!0===Object.keys(i).every((function(t){return!i[t]})))return{diff:i,rounded:"now",qualified:"now",precise:"now"};var o=[];return Object.keys(i).forEach((function(t,e,r){var u=Math.abs(i[t]);if(0!==u){var s=qt(u,t);if(o.push(s),!a){if(a=n=s,e>4)return;var c=r[e+1],d=Math.abs(i[c]);d>Et[c].almost?(a=qt(u+1,t),n="almost "+a):d>Et[c].over&&(n="over "+s)}}})),r=o.splice(0,2).join(", "),!0===t.isAfter(e)?(a+=" ago",n+=" ago",r+=" ago"):(a="in "+a,n="in "+n,r="in "+r),{diff:i,rounded:a,qualified:n,precise:r}},Pt={north:[["spring",2,1],["summer",5,1],["fall",8,1],["autumn",8,1],["winter",11,1]],south:[["fall",2,1],["autumn",2,1],["winter",5,1],["spring",8,1],["summer",11,1]]},$t=[null,[0,1],[3,1],[6,1],[9,1]],Nt={minute:function(t){return $(t,{second:0,millisecond:0}),t},quarterhour:function(t){var e=t.minutes();return t=e>=45?t.minutes(45):e>=30?t.minutes(30):e>=15?t.minutes(15):t.minutes(0),$(t,{second:0,millisecond:0}),t},hour:function(t){return $(t,{minute:0,second:0,millisecond:0}),t},day:function(t){return $(t,{hour:0,minute:0,second:0,millisecond:0}),t},week:function(t){var e=t.clone();return(t=t.day(t._weekStart)).isAfter(e)&&(t=t.subtract(1,"week")),$(t,{hour:0,minute:0,second:0,millisecond:0}),t},month:function(t){return $(t,{date:1,hour:0,minute:0,second:0,millisecond:0}),t},quarter:function(t){var e=t.quarter();return $t[e]&&$(t,{month:$t[e][0],date:$t[e][1],hour:0,minute:0,second:0,millisecond:0}),t},season:function(t){var e=t.season(),a="north";"South"===t.hemisphere()&&(a="south");for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"",a=arguments.length>2?arguments[2]:void 0;if(!e||!a)return[];if(e=F.normalize(e),a=t.clone().set(a),t.isAfter(a)){var n=t;t=a,a=n}var r=t.clone();It(e)?(r=r.next(e),e="week"):r=r.next(e);for(var i=[];r.isBefore(a);)i.push(r),r=r.add(1,e);return i},Bt=function(t){return t?t.split("->"):[]},Ht=function(t){return t=(t=(t=t[0].toUpperCase()+t.substr(1)).replace(/\/gmt/,"/GMT")).replace(/[\/_]([a-z])/gi,(function(t){return t.toUpperCase()}))},Wt=function(t){var e=t.timezones,a=t.tz;if(!1===e.hasOwnProperty(a)&&(a=E(t.tz,e)),null===a)return!1===t.silent&&console.warn("Warn: could not find given or local timezone - '"+t.tz+"'"),{current:{epochShift:0}};var n=e[a],r={name:Ht(a),hasDst:Boolean(n.dst),default_offset:n.offset,hemisphere:"s"===n.hem?"South":"North",current:{}};if(r.hasDst){var i=Bt(n.dst);r.change={start:i[0],back:i[1]}}var o=n.offset,u=o;return!0===r.hasDst&&(u="North"===r.hemisphere?o-1:n.offset+1),!1===r.hasDst?(r.current.offset=o,r.current.isDST=!1):!0===c(t.epoch,r.change.start,r.change.back,o,u)?(r.current.offset=o,r.current.isDST="North"===r.hemisphere):(r.current.offset=u,r.current.isDST="South"===r.hemisphere),r},Ft=["century","decade","year","month","date","day","hour","minute","second","millisecond"],Qt={set:function(t,e){var a=this.clone();return a=rt(a,t,null),e&&(this.tz=E(e)),a},timezone:function(){return Wt(this)},isDST:function(){return Wt(this).current.isDST},hasDST:function(){return Wt(this).hasDst},offset:function(){return 60*Wt(this).current.offset},hemisphere:function(){return Wt(this).hemisphere},format:function(t){return ft(this,t)},unixFmt:function(t){return kt(this,t)},startOf:function(t){return Yt.startOf(this,t)},endOf:function(t){return Yt.endOf(this,t)},leapYear:function(){var t=this.year();return F.isLeapYear(t)},progress:function(t){return Ot(this,t)},nearest:function(t){return xt(this,t)},diff:function(t,e){return St(this,t,e)},since:function(t){return t||(t=this.clone().set()),Ct(this,t)},next:function(t){return this.add(1,t).startOf(t)},last:function(t){return this.subtract(1,t).startOf(t)},isValid:function(){return!(!this.epoch&&0!==this.epoch||isNaN(this.d.getTime()))},goto:function(t){var e=this.clone();return e.tz=E(t,e.timezones),e},every:function(e,a){if("object"===t(e)&&"string"==typeof a){var n=a;a=e,e=n}return Lt(this,e,a)},isAwake:function(){var t=this.hour();return!(t<8||t>22)},isAsleep:function(){return!this.isAwake()},log:function(){return console.log(""),console.log(ft(this,"nice-short")),this},logYear:function(){return console.log(""),console.log(ft(this,"full-short")),this},json:function(){var t=this;return Ft.reduce((function(e,a){return e[a]=t[a](),e}),{})},debug:function(){var t=this.timezone(),e=this.format("MM")+" "+this.format("date-ordinal")+" "+this.year();return e+="\n - "+this.format("time"),console.log("\n\n",e+"\n - "+t.name+" ("+t.current.offset+")"),this},from:function(t){return(t=this.clone().set(t)).since(this)},fromNow:function(){return this.clone().set(Date.now()).since(this)},weekStart:function(t){if("number"==typeof t)return this._weekStart=t,this;if("string"==typeof t){t=t.toLowerCase().trim();var e=ut.short().indexOf(t);-1===e&&(e=ut.long().indexOf(t)),-1===e&&(e=1),this._weekStart=e}else console.warn("Spacetime Error: Cannot understand .weekStart() input:",t);return this}};Qt.inDST=Qt.isDST,Qt.round=Qt.nearest,Qt.each=Qt.every;var Jt=Qt,Rt=F.isLeapYear,Kt=function(t){return"string"==typeof t&&(t=parseInt(t,10)),t},Zt=["year","month","date","hour","minute","second","millisecond"],Gt=function(t,e,a){for(var n=Zt.indexOf(a),r=Zt.slice(n,Zt.length),i=0;i=24?e=24:e<0&&(e=0);var a=t.clone(),n=t.hour()-e,r=n*q.hour;return t.epoch-=r,t.date()!==a.date()&&(t=a.clone(),n>1&&(n-=1),n<1&&(n+=1),r=n*q.hour,t.epoch-=r),$(t,{hour:e}),Gt(t,a,"minute"),t.epoch},time:function(t,e){var a=e.match(/([0-9]{1,2})[:h]([0-9]{1,2})(:[0-9]{1,2})? ?(am|pm)?/);if(!a){if(!(a=e.match(/([0-9]{1,2}) ?(am|pm)/)))return t.epoch;a.splice(2,0,"0"),a.splice(3,0,"")}var n=!1,r=parseInt(a[1],10),i=parseInt(a[2],10);r>12&&(n=!0),!1===n&&("am"===a[4]&&12===r&&(r=0),"pm"===a[4]&&r<12&&(r+=12)),a[3]=a[3]||"",a[3]=a[3].replace(/:/,"");var o=parseInt(a[3],10)||0;return(t=(t=(t=(t=t.hour(r)).minute(i)).second(o)).millisecond(0)).epoch},date:function(t,e){if((e=Kt(e))>28){var a=t.month(),n=W[a];1===a&&29===e&&Rt(t.year())&&(n=29),e>n&&(e=n)}return e<=0&&(e=1),$(t,{date:e}),t.epoch},month:function(t,e){"string"==typeof e&&(e=L.mapping()[e.toLowerCase()]),(e=Kt(e))>=12&&(e=11),e<=0&&(e=0);var a=t.date();return a>W[e]&&(a=W[e]),$(t,{month:e,date:a}),t.epoch},year:function(t,e){return"string"==typeof e&&/^'[0-9]{2}$/.test(e)&&(e=e.replace(/'/,"").trim(),e=(e=Number(e))>30?1900+e:2e3+e),e=Kt(e),$(t,{year:e}),t.epoch},dayOfYear:function(t,e){e=Kt(e);var a=t.clone();return(e-=1)<=0?e=0:e>=365&&(e=364),t=(t=t.startOf("year")).add(e,"day"),Gt(t,a,"hour"),t.epoch}},Xt={millisecond:function(t){if(void 0!==t){var e=this.clone();return e.epoch=Ut.milliseconds(e,t),e}return this.d.getMilliseconds()},second:function(t){if(void 0!==t){var e=this.clone();return e.epoch=Ut.seconds(e,t),e}return this.d.getSeconds()},minute:function(t){if(void 0!==t){var e=this.clone();return e.epoch=Ut.minutes(e,t),e}return this.d.getMinutes()},hour:function(t){var e=this.d;if(void 0!==t){var a=this.clone();return a.epoch=Ut.hours(a,t),a}return e.getHours()},hourFloat:function(t){if(void 0!==t){var e=this.clone(),a=t%1;a*=60;var n=parseInt(t,10);return e.epoch=Ut.hours(e,n),e.epoch=Ut.minutes(e,a),e}var r=this.d,i=r.getHours(),o=r.getMinutes();return i+(o/=60)},hour12:function(t){var e=this.d;if(void 0!==t){var a=this.clone(),n=(t=""+t).match(/^([0-9]+)(am|pm)$/);if(n){var r=parseInt(n[1],10);"pm"===n[2]&&(r+=12),a.epoch=Ut.hours(a,r)}return a}var i=e.getHours();return i>12&&(i-=12),0===i&&(i=12),i},time:function(t){if(void 0!==t){var e=this.clone();return t=t.toLowerCase().trim(),e.epoch=Ut.time(e,t),e}return"".concat(this.h12(),":").concat(F.zeroPad(this.minute())).concat(this.ampm())},ampm:function(t){var e="am",a=this.hour();if(a>=12&&(e="pm"),"string"!=typeof t)return e;var n=this.clone();return t=t.toLowerCase().trim(),a>=12&&"am"===t?(a-=12,n.hour(a)):a<12&&"pm"===t?(a+=12,n.hour(a)):n},dayTime:function(t){if(void 0!==t){var e={morning:"7:00am",breakfast:"7:00am",noon:"12:00am",lunch:"12:00pm",afternoon:"2:00pm",evening:"6:00pm",dinner:"6:00pm",night:"11:00pm",midnight:"23:59pm"},a=this.clone();return t=(t=t||"").toLowerCase(),!0===e.hasOwnProperty(t)&&(a=a.time(e[t])),a}var n=this.hour();return n<6?"night":n<12?"morning":n<17?"afternoon":n<22?"evening":"night"},iso:function(t){return void 0!==t?this.set(t):this.format("iso")}},te={date:function(t){if(void 0!==t){var e=this.clone();return(t=parseInt(t,10))&&(e.epoch=Ut.date(e,t)),e}return this.d.getDate()},day:function(t){if(void 0===t)return this.d.getDay();var e=this.clone(),a=t;"string"==typeof t&&(t=t.toLowerCase(),ut.aliases.hasOwnProperty(t)?a=ut.aliases[t]:-1===(a=ut.short().indexOf(t))&&(a=ut.long().indexOf(t)));var n=this.d.getDay(),r=n-a,i=this.subtract(r,"days");return $(i,{hour:e.hour(),minute:e.minute(),second:e.second()}),i},dayName:function(t){if(void 0===t)return ut.long()[this.day()];var e=this.clone();return e=e.day(t)},month:function(t){if(void 0!==t){var e=this.clone();return e.epoch=Ut.month(e,t),e}return this.d.getMonth()}},ee=function(t){return t=(t=(t=t.minute(0)).second(0)).millisecond(1)},ae={dayOfYear:function(t){if(void 0!==t){var e=this.clone();return e.epoch=Ut.dayOfYear(e,t),e}for(var a,n=0,r=this.d.getMonth(),i=1;i<=r;i++)(a=new Date).setDate(1),a.setFullYear(this.d.getFullYear()),a.setHours(1),a.setMinutes(1),a.setMonth(i),a.setHours(-2),n+=a.getDate();return n+this.d.getDate()},week:function(t){if(void 0!==t){var e=this.clone();return e=(e=(e=e.month(0)).date(1)).day("monday"),"december"===(e=ee(e)).monthName()&&e.date()>=28&&(e=e.add(1,"week")),t-=1,e=e.add(t,"weeks")}var a=this.clone();a=(a=a.month(0)).date(1),"december"===(a=(a=ee(a)).day("monday")).monthName()&&a.date()>=28&&(a=a.add(1,"week"));var n=1;1===a.date()&&(n=0),a=a.minus(1,"second");var r=this.epoch;if(a.epoch>r)return 1;var i=0,o=4*this.month();for(a.epoch+=q.week*o,i+=o;i<=52;i++){if(a.epoch>r)return i+n;a=a.add(1,"week")}return 52},monthName:function(t){if(void 0===t)return L.long()[this.month()];var e=this.clone();return e=e.month(t)},quarter:function(t){if(void 0!==t&&("string"==typeof t&&(t=t.replace(/^q/i,""),t=parseInt(t,10)),$t[t])){var e=this.clone(),a=$t[t][0];return e=(e=(e=e.month(a)).date(1)).startOf("day")}for(var n=this.d.getMonth(),r=1;r<$t.length;r++)if(n<$t[r][0])return r-1;return 4},season:function(t){var e="north";if("South"===this.hemisphere()&&(e="south"),void 0!==t){for(var a=this.clone(),n=0;n=Pt[e][i][1]&&r0&&(e.epoch=Ut.year(e,-1*a)),"ad"===t&&a<0&&(e.epoch=Ut.year(e,-1*a)),e}return this.d.getFullYear()<0?"BC":"AD"},decade:function(t){if(void 0!==t){if(!(t=(t=(t=String(t)).replace(/([0-9])'?s$/,"$1")).replace(/([0-9])(th|rd|st|nd)/,"$1")))return console.warn("Spacetime: Invalid decade input"),this;2===t.length&&/[0-9][0-9]/.test(t)&&(t="19"+t);var e=Number(t);return isNaN(e)?this:(e=10*Math.floor(e/10),this.year(e))}return this.startOf("decade").year()},century:function(t){if(void 0!==t){"string"==typeof t&&(t=(t=(t=t.replace(/([0-9])(th|rd|st|nd)/,"$1")).replace(/([0-9]+) ?(b\.?c\.?|a\.?d\.?)/i,(function(t,e,a){return a.match(/b\.?c\.?/i)&&(e="-"+e),e}))).replace(/c$/,""));var e=Number(t);return isNaN(t)?(console.warn("Spacetime: Invalid century input"),this):(0===e&&(e=1),e=e>=0?100*(e-1):100*(e+1),this.year(e))}var a=this.startOf("century").year();return(a=Math.floor(a/100))<0?a-1:a+1},millenium:function(t){if(void 0!==t){if("string"==typeof t&&(t=t.replace(/([0-9])(th|rd|st|nd)/,"$1"),t=Number(t),isNaN(t)))return console.warn("Spacetime: Invalid millenium input"),this;t>0&&(t-=1);var e=1e3*t;return 0===e&&(e=1),this.year(e)}var a=Math.floor(this.year()/1e3);return a>=0&&(a+=1),a}},ne=Object.assign({},Xt,te,ae);ne.milliseconds=ne.millisecond,ne.seconds=ne.second,ne.minutes=ne.minute,ne.hours=ne.hour,ne.hour24=ne.hour,ne.h12=ne.hour12,ne.h24=ne.hour24,ne.days=ne.day;var re=function(t){Object.keys(ne).forEach((function(e){t.prototype[e]=ne[e]}))},ie=F.isLeapYear,oe=function(t,e){return 1===t&&ie(e)?29:W[t]},ue={months:function(t,e){if(t.month>0){var a=parseInt(t.month/12,10);t.year=e.year()+a,t.month=t.month%12}else if(t.month<0){var n=Math.floor(Math.abs(t.month)/13,10);n=Math.abs(n)+1,t.year=e.year()-n,t.month=t.month%12,t.month=t.month+12,12===t.month&&(t.month=0)}return t},days:function(t,e,a){for(var n=e.year(),r=e.month(),i=oe(r,n);a>i;)a-=i,(r+=1)>=12&&(r-=12,n+=1),i=oe(r,n);return t.month=r,t.date=a,t},daysBack:function(t,e,a){t.year=e.year(),t.month=e.month();var n=e.date();for(t.date=n-Math.abs(a);t.date<1;){t.month-=1,t.month<0&&(t.month=11,t.year-=1);var r=oe(t.month,t.year);t.date+=r}return t}},se=["millisecond","second","minute","hour","date","month"],ce={second:se.slice(0,1),minute:se.slice(0,2),quarterhour:se.slice(0,2),hour:se.slice(0,3),date:se.slice(0,4),month:se.slice(0,4),quarter:se.slice(0,4),season:se.slice(0,4),year:se,decade:se,century:se};ce.week=ce.hour,ce.season=ce.date,ce.quarter=ce.date;var de={year:!0,quarter:!0,season:!0,month:!0,week:!0,day:!0},he={month:!0,quarter:!0,season:!0,year:!0},le=function(t){t.prototype.add=function(t,e){var a=this.clone();if(!e||0===t)return a;var n=this.clone();if("millisecond"===(e=F.normalize(e)))return a.epoch+=t,a;"fortnight"===e&&(t*=2,e="week"),q[e]?a.epoch+=q[e]*t:"week"===e?a.epoch+=q.day*(7*t):"quarter"===e||"season"===e?a.epoch+=q.month*(3*t):"quarterhour"===e&&(a.epoch+=15*q.minute*t);var r={};if(ce[e]&&ce[e].forEach((function(t){r[t]=n[t]()})),de[e]){var i=n.timezone().current.offset-a.timezone().current.offset;a.epoch+=3600*i*1e3}if("month"===e&&(r.month=n.month()+t,r=ue.months(r,n)),"week"===e){var o=n.date()+7*t;o<=28&&o>1&&(r.date=o)}else if("date"===e){if(t<0)r=ue.daysBack(r,n,t);else{var u=n.date()+t;r=ue.days(r,n,u)}0!==t&&n.isSame(a,"day")&&(r.date=n.date()+t)}else if("quarter"===e){if(r.month=n.month()+3*t,r.year=n.year(),r.month<0){var s=Math.floor(r.month/12),c=r.month+12*Math.abs(s);r.month=c,r.year+=s}else if(r.month>=12){var d=Math.floor(r.month/12);r.month=r.month%12,r.year+=d}r.date=n.date()}else if("year"===e){var h=n.year()+t,l=a.year();(lh)&&(a.epoch+=q.day)}else"decade"===e?r.year=a.year()+10:"century"===e&&(r.year=a.year()+100);if(he[e]){var m=W[r.month];r.date=n.date(),r.date>m&&(r.date=m)}return Object.keys(r).length>1&&$(a,r),a},t.prototype.subtract=function(t,e){return this.clone().add(-1*t,e)},t.prototype.minus=t.prototype.subtract,t.prototype.plus=t.prototype.add},me={millisecond:function(t){return t.epoch},second:function(t){return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second()].join("-")},minute:function(t){return[t.year(),t.month(),t.date(),t.hour(),t.minute()].join("-")},hour:function(t){return[t.year(),t.month(),t.date(),t.hour()].join("-")},day:function(t){return[t.year(),t.month(),t.date()].join("-")},week:function(t){return[t.year(),t.week()].join("-")},month:function(t){return[t.year(),t.month()].join("-")},quarter:function(t){return[t.year(),t.quarter()].join("-")},year:function(t){return t.year()}};me.date=me.day;var fe=function(e){e.prototype.isSame=function(a,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=this;if(!n)return null;if("string"==typeof a&&"object"===t(n)){var o=a;a=n,n=o}return"string"!=typeof a&&"number"!=typeof a||(a=new e(a,this.timezone.name)),n=n.replace(/s$/,""),!0===r&&i.tz!==a.tz&&((a=a.clone()).tz=i.tz),me[n]?me[n](i)===me[n](a):null}},ye=function(t){var e={isAfter:function(t){t=F.beADate(t,this);var e=F.getEpoch(t);return null===e?null:this.epoch>e},isBefore:function(t){t=F.beADate(t,this);var e=F.getEpoch(t);return null===e?null:this.epoch2&&void 0!==arguments[2]&&arguments[2];t=F.beADate(t,this),e=F.beADate(e,this);var n=F.getEpoch(t);if(null===n)return null;var r=F.getEpoch(e);return null===r?null:a?this.isBetween(t,e)||this.isEqual(t)||this.isEqual(e):n2&&void 0!==arguments[2]?arguments[2]:{};this.epoch=null,this.tz=E(e,ge),this.silent=a.silent||!0,this.british=a.dmy||a.british,this._weekStart=1,void 0!==a.weekStart&&(this._weekStart=a.weekStart),this._today={},void 0!==a.today&&(this._today=a.today),Object.defineProperty(this,"d",{get:function(){var t=d(this),e=(new Date(this.epoch).getTimezoneOffset()||0)+60*t;e=60*e*1e3;var a=this.epoch+e;return new Date(a)}}),Object.defineProperty(this,"timezones",{get:function(){return ge},set:function(t){return ge=t,t}});var n=rt(this,t,e);this.epoch=n.epoch};Object.keys(Jt).forEach((function(t){ve.prototype[t]=Jt[t]})),ve.prototype.clone=function(){return new ve(this.epoch,this.tz,{silent:this.silent,weekStart:this._weekStart,today:this._today})},ve.prototype.toLocalDate=function(){return new Date(this.epoch)},re(ve),le(ve),fe(ve),ye(ve),pe(ve);var be=ve,we=function(t,e){var a=new be(null),n=new be(null);a=a.time(t),n=e?n.time(e):a.add(59,"minutes");var r=a.hour(),i=n.hour();return Object.keys(a.timezones).filter((function(t){if(-1===t.indexOf("/"))return!1;var e=new be(null,t),o=e.hour();return o>=r&&o<=i&&!(o===r&&e.minute()n.minute())}))},ke="6.14.0",De=function(t,e,a){return new be(t,e,a)},Ae=function(t){var e=t._today||{};return Object.keys(e).forEach((function(a){t=t[a](e[a])})),t};return De.now=function(t,e){var a=new be((new Date).getTime(),t,e);return a=Ae(a)},De.today=function(t,e){var a=new be((new Date).getTime(),t,e);return(a=Ae(a)).startOf("day")},De.tomorrow=function(t,e){var a=new be((new Date).getTime(),t,e);return(a=Ae(a)).add(1,"day").startOf("day")},De.yesterday=function(t,e){var a=new be((new Date).getTime(),t,e);return(a=Ae(a)).subtract(1,"day").startOf("day")},De.extend=function(t){return Object.keys(t).forEach((function(e){be.prototype[e]=t[e]})),this},De.timezones=function(){return(new be).timezones},De.max=function(t,e){var a=new be(null,t,e);return a.epoch=864e13,a},De.min=function(t,e){var a=new be(null,t,e);return a.epoch=-864e13,a},De.whereIts=we,De.version=ke,De.plugin=De.extend,De}()})),q="Australia/",C="Pacific/",P={"british summer time":"Europe/London",bst:"Europe/London","british time":"Europe/London","britain time":"Europe/London","irish summer time":"Europe/Dublin","irish time":"Europe/Dublin",ireland:"Europe/Dublin","central european time":"Europe/Berlin",cet:"Europe/Berlin","central european summer time":"Europe/Berlin",cest:"Europe/Berlin","central europe":"Europe/Berlin","eastern european time":"Europe/Riga",eet:"Europe/Riga","eastern european summer time":"Europe/Riga",eest:"Europe/Riga","eastern europe time":"Europe/Riga","western european time":"Europe/Lisbon","western european summer time":"Europe/Lisbon","western europe":"Europe/Lisbon","turkey standard time":"Europe/Istanbul",trt:"Europe/Istanbul","turkish time":"Europe/Istanbul",etc:"Africa/Freetown",utc:"Africa/Freetown","greenwich standard time":"Africa/Freetown",gmt:"Africa/Freetown","east africa time":"Africa/Nairobi","east african time":"Africa/Nairobi","eastern africa time":"Africa/Nairobi","central africa time":"Africa/Khartoum","central african time":"Africa/Khartoum","south africa standard time":"Africa/Johannesburg",sast:"Africa/Johannesburg","southern africa":"Africa/Johannesburg","south african":"Africa/Johannesburg","west africa standard time":"Africa/Lagos","western africa time":"Africa/Lagos","west african time":"Africa/Lagos","australian central standard time":q+"Adelaide",acst:q+"Adelaide","australian central daylight time":q+"Adelaide",acdt:q+"Adelaide","australia central":q+"Adelaide","australian eastern standard time":q+"Brisbane",aest:q+"Brisbane","australian eastern daylight time":q+"Brisbane",aedt:q+"Brisbane","australia east":q+"Brisbane","australian western standard time":q+"Perth",awst:q+"Perth","australian western daylight time":q+"Perth",awdt:q+"Perth","australia west":q+"Perth","australian central western standard time":q+"Eucla",acwst:q+"Eucla","australia central west":q+"Eucla","lord howe standard time":q+"Lord_Howe",lhst:q+"Lord_Howe","lord howe daylight time":q+"Lord_Howe",lhdt:q+"Lord_Howe","russian standard time":"Europe/Moscow",msk:"Europe/Moscow",russian:"Europe/Moscow","central standard time":"America/Chicago","central time":"America/Chicago",cst:"America/Havana","central daylight time":"America/Chicago",cdt:"America/Havana","mountain standard time":"America/Denver","mountain time":"America/Denver",mst:"America/Denver","mountain daylight time":"America/Denver",mdt:"America/Denver","atlantic standard time":"America/Halifax","atlantic time":"America/Halifax",ast:"Asia/Baghdad","atlantic daylight time":"America/Halifax",adt:"America/Halifax","eastern standard time":"America/New_York","eastern time":"America/New_York",est:"America/New_York","eastern daylight time":"America/New_York",edt:"America/New_York","pacific time":"America/Los_Angeles","pacific standard time":"America/Los_Angeles",pst:"America/Los_Angeles","pacific daylight time":"America/Los_Angeles",pdt:"America/Los_Angeles","alaskan standard time":"America/Anchorage","alaskan time":"America/Anchorage",ahst:"America/Anchorage","alaskan daylight time":"America/Anchorage",ahdt:"America/Anchorage","hawaiian standard time":C+"Honolulu","hawaiian time":C+"Honolulu",hst:C+"Honolulu","aleutian time":C+"Honolulu","hawaii time":C+"Honolulu","newfoundland standard time":"America/St_Johns","newfoundland time":"America/St_Johns",nst:"America/St_Johns","newfoundland daylight time":"America/St_Johns",ndt:"America/St_Johns","brazil time":"America/Sao_Paulo",brt:"America/Sao_Paulo","brasília":"America/Sao_Paulo",brasilia:"America/Sao_Paulo","brazilian time":"America/Sao_Paulo","argentina time":"America/Buenos_Aires","argentinian time":"America/Buenos_Aires","amazon time":"America/Manaus",amt:"America/Manaus","amazonian time":"America/Manaus","easter island standard time":"Chile/Easterisland",east:"Chile/Easterisland","easter island summer time":"Chile/Easterisland",easst:"Chile/Easterisland","venezuelan standard time":"America/Caracas","venezuelan time":"America/Caracas",vet:"America/Caracas","venezuela time":"America/Caracas","paraguay time":"America/Asuncion",pyt:"America/Asuncion","paraguay summer time":"America/Asuncion",pyst:"America/Asuncion","cuba standard time":"America/Havana","cuba time":"America/Havana","cuba daylight time":"America/Havana","cuban time":"America/Havana","bolivia time":"America/La_Paz","bolivian time":"America/La_Paz","colombia time":"America/Bogota",cot:"America/Bogota","colombian time":"America/Bogota","acre time":"America/Eirunepe","peru time":"America/Lima","chile standard time":"America/Punta_Arenas","chile time":"America/Punta_Arenas",clst:"America/Punta_Arenas","chile summer time":"America/Punta_Arenas",cldt:"America/Punta_Arenas","uruguay time":"America/Montevideo",uyt:"America/Montevideo",ist:"Asia/Jerusalem","arabic standard time":"Asia/Baghdad","arabic time":"Asia/Baghdad","arab time":"Asia/Baghdad","iran standard time":"Asia/Tehran","iran time":"Asia/Tehran",irst:"Asia/Tehran","iran daylight time":"Asia/Tehran",irdt:"Asia/Tehran",iranian:"Asia/Tehran","pakistan standard time":"Asia/Karachi","pakistan time":"Asia/Karachi",pkt:"Asia/Karachi","india standard time":"Asia/Kolkata","indian time":"Asia/Kolkata","indochina time":"Asia/Bangkok",ict:"Asia/Bangkok","south east asia":"Asia/Bangkok","china standard time":"Asia/Shanghai",ct:"Asia/Shanghai","chinese time":"Asia/Shanghai","alma-ata time":"Asia/Almaty",almt:"Asia/Almaty","oral time":"Asia/Oral","orat time":"Asia/Oral","yakutsk time":"Asia/Yakutsk",yakt:"Asia/Yakutsk","gulf standard time":"Asia/Dubai","gulf time":"Asia/Dubai",gst:"Asia/Dubai",uae:"Asia/Dubai","hong kong time":"Asia/Hong_Kong",hkt:"Asia/Hong_Kong","western indonesian time":"Asia/Jakarta",wib:"Asia/Jakarta","indonesia time":"Asia/Jakarta","central indonesian time":"Asia/Makassar",wita:"Asia/Makassar","israel daylight time":"Asia/Jerusalem",idt:"Asia/Jerusalem","israel standard time":"Asia/Jerusalem","israel time":"Asia/Jerusalem",israeli:"Asia/Jerusalem","krasnoyarsk time":"Asia/Krasnoyarsk",krat:"Asia/Krasnoyarsk","malaysia time":"Asia/Kuala_Lumpur",myt:"Asia/Kuala_Lumpur","singapore time":"Asia/Singapore",sgt:"Asia/Singapore","korea standard time":"Asia/Seoul","korea time":"Asia/Seoul",kst:"Asia/Seoul","korean time":"Asia/Seoul","uzbekistan time":"Asia/Samarkand",uzt:"Asia/Samarkand","vladivostok time":"Asia/Vladivostok",vlat:"Asia/Vladivostok","maldives time":"Indian/Maldives",mvt:"Indian/Maldives","mauritius time":"Indian/Mauritius",mut:"Indian/Mauritius","marshall islands time":C+"Kwajalein",mht:C+"Kwajalein","samoa standard time":C+"Midway",sst:C+"Midway","somoan time":C+"Midway","chamorro standard time":C+"Guam",chst:C+"Guam","papua new guinea time":C+"Bougainville",pgt:C+"Bougainville"},$=V().timezones,N=Object.keys($).reduce((function(t,e){return t[e]=e,t}),{}),Y=Object.assign({},P,N),I=[[["weekday","summer","winter","autumn","some day","one day","all day","some point","eod","eom","eoy","standard time","daylight time","tommorrow"],"#Date"],[["centuries","century","day","days","decade","decades","hour","hours","hr","hrs","millisecond","milliseconds","minute","minutes","min","mins","month","months","seconds","sec","secs","week end","week ends","weekend","weekends","week","weeks","wk","wks","year","years","yr","yrs","quarter","qtr","qtrs","season","seasons"],"#Duration"],[["all hallows eve","all saints day","all sts day","april fools","armistice day","australia day","bastille day","boxing day","canada day","christmas eve","christmas","cinco de mayo","day of the dead","dia de muertos","dieciseis de septiembre","emancipation day","grito de dolores","groundhog day","halloween","harvey milk day","inauguration day","independence day","independents day","juneteenth","labour day","national freedom day","national nurses day","new years eve","new years","purple heart day","rememberance day","rosa parks day","saint andrews day","saint patricks day","saint stephens day","saint valentines day","st andrews day","st patricks day","st stephens day","st valentines day ","valentines day","valentines","veterans day","victoria day","womens equality day","xmas","epiphany","orthodox christmas day","orthodox new year","assumption of mary","all souls day","feast of the immaculate conception","feast of our lady of guadalupe","kwanzaa","imbolc","beltaine","lughnassadh","samhain","martin luther king day","mlk day","presidents day","mardi gras","tax day","commonwealth day","mothers day","memorial day","fathers day","columbus day","indigenous peoples day","canadian thanksgiving","election day","thanksgiving","t-day","turkey day","black friday","cyber monday","ash wednesday","palm sunday","maundy thursday","good friday","holy saturday","easter","easter sunday","easter monday","orthodox good friday","orthodox holy saturday","orthodox easter","orthodox easter monday","ascension day","pentecost","whitsunday","whit sunday","whit monday","trinity sunday","corpus christi","advent","tu bishvat","tu bshevat","purim","passover","yom hashoah","lag baomer","shavuot","tisha bav","rosh hashana","yom kippur","sukkot","shmini atzeret","simchat torah","chanukah","hanukkah","isra and miraj","lailat al-qadr","eid al-fitr","id al-Fitr","eid ul-Fitr","ramadan","eid al-adha","muharram","the prophets birthday","ostara","march equinox","vernal equinox","litha","june solistice","summer solistice","mabon","september equinox","fall equinox","autumnal equinox","yule","december solstice","winter solstice","chinese new year","diwali"],"#Holiday"],[["noon","midnight","morning","tonight","evening","afternoon","breakfast time","lunchtime","dinnertime","midday","eod","oclock","oclock","at night"],"#Time"],[Object.keys(Y),"#Timezone"]],L={"a couple":"Value",thur:"WeekDay"};I.forEach((function(t){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).forEach((function(a){t.d=t.d.add(e[a],a)})),this}},{key:"applyTime",value:function(t){return this.d=t?this.d.time(t):this.d.startOf("day"),this}},{key:"applyWeekDay",value:function(t){if(t){var e=this.d.epoch;this.d=this.d.day(t),this.d.epoch#Duration] [(after|before)]");if(n.found){var r=n.groups("unit").text("reduced"),i=n.groups("dir").text("reduced");"after"===i?e[r]=1:"before"===i&&(e[r]=-1)}if((n=a.match("half (a|an) [#Duration]",0)).found){var o=at(n);e[o]=.5}return t.remove("#DateShift"),e},rt={minute:!0},it=function(t){var e=t.match("[#Value] [#Duration+] (of|in)");if(e.found){var a=e.groups(),n=a.num.text("reduced"),r=a.unit.text("reduced"),i={unit:r,num:Number(n)||0};return rt[r]||(i.num-=1),t=t.remove(e),i}if((e=t.match("[(first|initial|last|final)] [#Duration+] (of|in)")).found){var o=e.groups(),u=o.dir.text("reduced");"initial"===u&&(u="first"),"final"===u&&(u="last");var s={unit:o.unit.text("reduced"),dir:u};return t=t.remove(e),s}return{}},ot={daybreak:"7:00am",breakfast:"8:00am",morning:"9:00am",noon:"12:00pm",midday:"12:00pm",afternoon:"2:00pm",lunchtime:"12:00pm",evening:"6:00pm",dinnertime:"6:00pm",night:"8:00pm",eod:"10:00pm",midnight:"12:00am"},ut=function(t){var e=t.time("6:00am");return t.isBefore(e)?t.ampm("pm"):t},st=function(t,e){var a=t.match("(at|by|for|before|this)? #Time+");a.found&&t.remove(a),a=(a=(a=a.not("^(at|by|for|before|this)")).not("sharp")).not("on the dot");var n=V.now(e.timezone),r=n.clone(),i=a.text("reduced");if(ot.hasOwnProperty(i))return ot[i];var o=a.match("^#Cardinal oclock (am|pm)?");if(o.found&&(o=o.not("oclock"),(n=(n=n.hour(o.text("reduced"))).startOf("hour")).isValid()&&!n.isEqual(r))){var u=o.match("(am|pm)");return(n=u.found?n.ampm(u.text("reduced")):ut(n)).time()}if((o=a.match("(half|quarter|25|15|10|5) (past|after|to) #Cardinal")).found&&(n=function(t,e){var a=t.match("#Cardinal$").text("reduced"),n=t.match("(half|quarter|25|15|10|5)"),r=n.text("reduced");n.has("half")&&(r="30"),n.has("quarter")&&(r="15");var i=t.has("to");return e=(e=e.hour(a)).startOf("hour"),a<6&&(e=e.ampm("pm")),i?e.subtract(r,"minutes"):e.add(r,"minutes")}(o,n)).isValid()&&!n.isEqual(r))return(n=ut(n)).time();if((o=a.match("[