From 55a1350544328b0fe2eeb1d5eb1f1aa4e880f674 Mon Sep 17 00:00:00 2001 From: spencer kelly Date: Tue, 8 Jan 2019 19:35:34 -0500 Subject: [PATCH 1/2] week bugfix --- package-lock.json | 182 ++++++++++++++++++++++++++++++++++----------- package.json | 6 +- scratch.js | 8 +- src/methods/add.js | 7 ++ test/add.test.js | 5 ++ 5 files changed, 157 insertions(+), 51 deletions(-) diff --git a/package-lock.json b/package-lock.json index f5499276..1d4b80fe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "spacetime", - "version": "5.1.0", + "version": "5.2.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -215,17 +215,47 @@ } }, "@babel/helper-module-transforms": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.1.0.tgz", - "integrity": "sha512-0JZRd2yhawo79Rcm4w0LwSMILFmFXjugG3yqf+P/UsKsRS1mJCmMwwlHDlMg7Avr9LrvSpp4ZSULO9r8jpCzcw==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.2.2.tgz", + "integrity": "sha512-YRD7I6Wsv+IHuTPkAmAS4HhY0dkPobgLftHp0cRGZSdrRvmZY8rFvae/GVu3bD00qscuvK3WPHB3YdNpBXUqrA==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.0.0", "@babel/helper-simple-access": "^7.1.0", "@babel/helper-split-export-declaration": "^7.0.0", - "@babel/template": "^7.1.0", - "@babel/types": "^7.0.0", + "@babel/template": "^7.2.2", + "@babel/types": "^7.2.2", "lodash": "^4.17.10" + }, + "dependencies": { + "@babel/parser": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.2.3.tgz", + "integrity": "sha512-0LyEcVlfCoFmci8mXx8A5oIkpkOgyo8dRHtxBnK9RRBwxO2+JZPNsqtVEZQ7mJFPxnXF9lfmU24mHOPI0qnlkA==", + "dev": true + }, + "@babel/template": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.2.2.tgz", + "integrity": "sha512-zRL0IMM02AUDwghf5LMSSDEz7sBCO2YnNmpg3uWTZj/v1rcG2BmQUvaGU8GhU8BvfMh1k2KIAYZ7Ji9KXPUg7g==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.2.2", + "@babel/types": "^7.2.2" + } + }, + "@babel/types": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.2.2.tgz", + "integrity": "sha512-fKCuD6UFUMkR541eDWL+2ih/xFZBXPOg/7EQFeTluMDebfqR4jrpaCjLhkWlQS4hT6nRa2PMEgXKbRB5/H2fpg==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.10", + "to-fast-properties": "^2.0.0" + } + } } }, "@babel/helper-optimise-call-expression": { @@ -266,15 +296,79 @@ } }, "@babel/helper-replace-supers": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.1.0.tgz", - "integrity": "sha512-BvcDWYZRWVuDeXTYZWxekQNO5D4kO55aArwZOTFXw6rlLQA8ZaDicJR1sO47h+HrnCiDFiww0fSPV0d713KBGQ==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.2.3.tgz", + "integrity": "sha512-GyieIznGUfPXPWu0yLS6U55Mz67AZD9cUk0BfirOWlPrXlBcan9Gz+vHGz+cPfuoweZSnPzPIm67VtQM0OWZbA==", "dev": true, "requires": { "@babel/helper-member-expression-to-functions": "^7.0.0", "@babel/helper-optimise-call-expression": "^7.0.0", - "@babel/traverse": "^7.1.0", + "@babel/traverse": "^7.2.3", "@babel/types": "^7.0.0" + }, + "dependencies": { + "@babel/generator": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.2.2.tgz", + "integrity": "sha512-I4o675J/iS8k+P38dvJ3IBGqObLXyQLTxtrR4u9cSUJOURvafeEWb/pFMOTwtNrmq73mJzyF6ueTbO1BtN0Zeg==", + "dev": true, + "requires": { + "@babel/types": "^7.2.2", + "jsesc": "^2.5.1", + "lodash": "^4.17.10", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" + }, + "dependencies": { + "@babel/types": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.2.2.tgz", + "integrity": "sha512-fKCuD6UFUMkR541eDWL+2ih/xFZBXPOg/7EQFeTluMDebfqR4jrpaCjLhkWlQS4hT6nRa2PMEgXKbRB5/H2fpg==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.10", + "to-fast-properties": "^2.0.0" + } + } + } + }, + "@babel/parser": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.2.3.tgz", + "integrity": "sha512-0LyEcVlfCoFmci8mXx8A5oIkpkOgyo8dRHtxBnK9RRBwxO2+JZPNsqtVEZQ7mJFPxnXF9lfmU24mHOPI0qnlkA==", + "dev": true + }, + "@babel/traverse": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.2.3.tgz", + "integrity": "sha512-Z31oUD/fJvEWVR0lNZtfgvVt512ForCTNKYcJBGbPb1QZfve4WGH8Wsy7+Mev33/45fhP/hwQtvgusNdcCMgSw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/generator": "^7.2.2", + "@babel/helper-function-name": "^7.1.0", + "@babel/helper-split-export-declaration": "^7.0.0", + "@babel/parser": "^7.2.3", + "@babel/types": "^7.2.2", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.10" + }, + "dependencies": { + "@babel/types": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.2.2.tgz", + "integrity": "sha512-fKCuD6UFUMkR541eDWL+2ih/xFZBXPOg/7EQFeTluMDebfqR4jrpaCjLhkWlQS4hT6nRa2PMEgXKbRB5/H2fpg==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.10", + "to-fast-properties": "^2.0.0" + } + } + } + } } }, "@babel/helper-simple-access": { @@ -309,9 +403,9 @@ }, "dependencies": { "@babel/types": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.2.0.tgz", - "integrity": "sha512-b4v7dyfApuKDvmPb+O488UlGuR1WbwMXFsO/cyqMrnfvRAChZKJAYeeglWTjUO1b9UghKKgepAQM5tsvBJca6A==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.2.2.tgz", + "integrity": "sha512-fKCuD6UFUMkR541eDWL+2ih/xFZBXPOg/7EQFeTluMDebfqR4jrpaCjLhkWlQS4hT6nRa2PMEgXKbRB5/H2fpg==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -527,9 +621,9 @@ } }, "@babel/plugin-transform-classes": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.2.0.tgz", - "integrity": "sha512-aPCEkrhJYebDXcGTAP+cdUENkH7zqOlgbKwLbghjjHpJRJBWM/FSlCjMoPGA8oUdiMfOrk3+8EFPLLb5r7zj2w==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.2.2.tgz", + "integrity": "sha512-gEZvgTy1VtcDOaQty1l10T3jQmJKlNVxLDCs+3rCVPr6nMkODLELxViq5X9l+rfxbie3XrfrMCYYY6eX3aOcOQ==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.0.0", @@ -708,9 +802,9 @@ } }, "@babel/plugin-transform-spread": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.2.0.tgz", - "integrity": "sha512-7TtPIdwjS/i5ZBlNiQePQCovDh9pAhVbp/nGVRBZuUdBiVRThyyLend3OHobc0G+RLCPPAN70+z/MAMhsgJd/A==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.2.2.tgz", + "integrity": "sha512-KWfky/58vubwtS0hLqEnrWJjsMGaOeSBn90Ezn5Jeg9Z8KKHmELbP1yGylMlm5N6TPKeY9A2+UaSYLdxahg01w==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0" @@ -757,9 +851,9 @@ } }, "@babel/preset-env": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.2.0.tgz", - "integrity": "sha512-haGR38j5vOGVeBatrQPr3l0xHbs14505DcM57cbJy48kgMFvvHHoYEhHuRV+7vi559yyAUAVbTWzbK/B/pzJng==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.2.3.tgz", + "integrity": "sha512-AuHzW7a9rbv5WXmvGaPX7wADxFkZIqKlbBh1dmZUQp4iwiPpkE/Qnrji6SC4UQCQzvWY/cpHET29eUhXS9cLPw==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.0.0", @@ -1327,14 +1421,14 @@ } }, "browserslist": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.3.5.tgz", - "integrity": "sha512-z9ZhGc3d9e/sJ9dIx5NFXkKoaiQTnrvrMsN3R1fGb1tkWWNSz12UewJn9TNxGo1l7J23h0MRaPmk7jfeTZYs1w==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.3.7.tgz", + "integrity": "sha512-pWQv51Ynb0MNk9JGMCZ8VkM785/4MQNXiFYtPqI7EEP0TJO+/d/NqRVn1uiAN0DNbnlUSpL2sh16Kspasv3pUQ==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30000912", - "electron-to-chromium": "^1.3.86", - "node-releases": "^1.0.5" + "caniuse-lite": "^1.0.30000925", + "electron-to-chromium": "^1.3.96", + "node-releases": "^1.1.3" } }, "buffer": { @@ -1390,9 +1484,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30000918", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000918.tgz", - "integrity": "sha512-CAZ9QXGViBvhHnmIHhsTPSWFBujDaelKnUj7wwImbyQRxmXynYqKGi3UaZTSz9MoVh+1EVxOS/DFIkrJYgR3aw==", + "version": "1.0.30000927", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000927.tgz", + "integrity": "sha512-ogq4NbUWf1uG/j66k0AmiO3GjqJAlQyF8n4w8a954cbCyFKmYGvRtgz6qkq2fWuduTXHibX7GyYL5Pg58Aks2g==", "dev": true }, "caseless": { @@ -1771,9 +1865,9 @@ } }, "electron-to-chromium": { - "version": "1.3.90", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.90.tgz", - "integrity": "sha512-IjJZKRhFbWSOX1w0sdIXgp4CMRguu6UYcTckyFF/Gjtemsu/25eZ+RXwFlV+UWcIueHyQA1UnRJxocTpH5NdGA==", + "version": "1.3.100", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.100.tgz", + "integrity": "sha512-cEUzis2g/RatrVf8x26L8lK5VEls1AGnLHk6msluBUg/NTB4wcXzExTsGscFq+Vs4WBBU2zbLLySvD4C0C3hwg==", "dev": true }, "elliptic": { @@ -2410,9 +2504,9 @@ } }, "js-levenshtein": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.4.tgz", - "integrity": "sha512-PxfGzSs0ztShKrUYPIn5r0MtyAhYcCwmndozzpz8YObbPnD1jFxzlBGbRnX2mIu6Z13xN6+PTu05TQFnZFlzow==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.5.tgz", + "integrity": "sha512-ap2aTez3WZASzMmJvgvG+nsrCCrtHPQ+4YB+WQjYQpXgLkM+WqwkpzdlVs5l7Xhk128I/CisIk4CdXl7pIchUA==", "dev": true }, "js-tokens": { @@ -2695,9 +2789,9 @@ "dev": true }, "node-releases": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.1.tgz", - "integrity": "sha512-2UXrBr6gvaebo5TNF84C66qyJJ6r0kxBObgZIDX3D3/mt1ADKiHux3NJPWisq0wxvJJdkjECH+9IIKYViKj71Q==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.3.tgz", + "integrity": "sha512-6VrvH7z6jqqNFY200kdB6HdzkgM96Oaj9v3dqGfgp6mF+cHmU4wyQKZ2/WPDRVoR0Jz9KqbamaBN0ZhdUaysUQ==", "dev": true, "requires": { "semver": "^5.3.0" @@ -4259,7 +4353,7 @@ "dependencies": { "jsesc": { "version": "0.5.0", - "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", "dev": true } @@ -4825,9 +4919,9 @@ } }, "terser": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-3.13.1.tgz", - "integrity": "sha512-ogyZye4DFqOtMzT92Y3Nxxw8OvXmL39HOALro4fc+EUYFFF9G/kk0znkvwMz6PPYgBtdKAodh3FPR70eugdaQA==", + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-3.14.1.tgz", + "integrity": "sha512-NSo3E99QDbYSMeJaEk9YW2lTg3qS9V0aKGlb+PlOrei1X02r1wSBHCNX/O+yeTRFSWPKPIGj6MqvvdqV4rnVGw==", "dev": true, "requires": { "commander": "~2.17.1", diff --git a/package.json b/package.json index 652b539d..7f556869 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "spacetime", - "version": "5.2.0", + "version": "5.2.1", "description": "figure-out dates across timezones", "main": "builds/spacetime.js", "unpkg": "builds/spacetime.min.js", @@ -26,7 +26,7 @@ "dependencies": {}, "devDependencies": { "@babel/core": "7.2.2", - "@babel/preset-env": "7.2.0", + "@babel/preset-env": "7.2.3", "amble": "0.0.7", "babelify": "10.0.0", "browserify": "16.2.3", @@ -37,7 +37,7 @@ "tap-dancer": "0.1.2", "tap-spec": "5.0.0", "tape": "4.9.1", - "terser": "3.13.1", + "terser": "3.14.1", "timekeeper": "2.1.2" } } diff --git a/scratch.js b/scratch.js index 3831bd56..65706f89 100644 --- a/scratch.js +++ b/scratch.js @@ -2,8 +2,8 @@ const spacetime = require('./src/index') // let d = spacetime('June 8th').next('month') // d.log() +let d = spacetime('2019-11-04T00:00:00.000') -let s = spacetime('January 1, 2019 1:20:05') -s = s.time('4:20pm') -s = s.add(1, 'decade') -console.log(s.format('nice-date')) + +d = d.add(1, 'week') +console.log(d.format('day-nice')) diff --git a/src/methods/add.js b/src/methods/add.js index c50971a5..0f6bdd9e 100644 --- a/src/methods/add.js +++ b/src/methods/add.js @@ -84,6 +84,13 @@ const addMethods = SpaceTime => { //month is the one unit we 'model' directly want = rollMonth(want, old); } + //support coercing a week, too + if (unit === 'week') { + let sum = old.date() + (num * 7) + if (sum <= 28 && sum > 1) { + want.date = sum + } + } //support 25-hour day-changes on dst-changes else if (unit === 'date') { //specify a naive date number, if it's easy to do... diff --git a/test/add.test.js b/test/add.test.js index 18a06fb6..2a32a516 100644 --- a/test/add.test.js +++ b/test/add.test.js @@ -76,6 +76,11 @@ test('hour-tricky', t => { test('day-tricky', t => { let d = spacetime('2019-11-04T00:00:00.000', 'Canada/Eastern') + d = d.add(1, 'week') + t.equal(d.format('nice-day'), 'Mon Nov 11th', 'add week over dst-change') + + //same thing, but days + d = spacetime('2019-11-04T00:00:00.000', 'Canada/Eastern') d = d.add(7, 'days') t.equal(d.format('nice-day'), 'Mon Nov 11th', 'add days over dst-change') t.end(); From 17b37fdba9f472689d23c259139e9b3b708ff8fa Mon Sep 17 00:00:00 2001 From: spencer kelly Date: Tue, 8 Jan 2019 19:35:56 -0500 Subject: [PATCH 2/2] 5.2.1 --- _version.js | 2 +- builds/spacetime.js | 19 ++++++++++++++----- builds/spacetime.min.js | 4 ++-- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/_version.js b/_version.js index f8e61f0a..cbb55fea 100644 --- a/_version.js +++ b/_version.js @@ -1 +1 @@ -module.exports='5.2.0' \ No newline at end of file +module.exports='5.2.1' \ No newline at end of file diff --git a/builds/spacetime.js b/builds/spacetime.js index 241883fd..ac94a153 100644 --- a/builds/spacetime.js +++ b/builds/spacetime.js @@ -1,4 +1,4 @@ -/* spacetime v5.2.0 +/* spacetime v5.2.1 github.com/spencermountain/spacetime MIT */ @@ -6,7 +6,7 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.spacetime = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i 1) { + want.date = sum; + } } //support 25-hour day-changes on dst-changes else if (unit === 'date') { //specify a naive date number, if it's easy to do... - var sum = old.date() + num; + var _sum = old.date() + num; - if (sum <= 28 && sum > 1) { - want.date = sum; + if (_sum <= 28 && _sum > 1) { + want.date = _sum; } //or if we haven't moved at all.. else if (num !== 0 && old.isSame(s, 'day')) { want.date = old.date() + num; diff --git a/builds/spacetime.min.js b/builds/spacetime.min.js index 35b37ce4..167194b0 100644 --- a/builds/spacetime.min.js +++ b/builds/spacetime.min.js @@ -1,6 +1,6 @@ -/* spacetime v5.2.0 +/* spacetime v5.2.1 github.com/spencermountain/spacetime MIT */ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).spacetime=e()}}(function(){return function(){return function e(t,n,r){function a(i,s){if(!n[i]){if(!t[i]){var u="function"==typeof require&&require;if(!s&&u)return u(i,!0);if(o)return o(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var h=n[i]={exports:{}};t[i][0].call(h.exports,function(e){return a(t[i][1][e]||e)},h,h.exports,e,t,n,r)}return n[i].exports}for(var o="function"==typeof require&&require,i=0;i=(t=t||2)?e:new Array(t-e.length+1).join("0")+e},n.titleCase=function(e){return e?e[0].toUpperCase()+e.substr(1):""},n.ordinal=function(e){var t=e%10,n=e%100;return 1===t&&11!==n?e+"st":2===t&&12!==n?e+"nd":3===t&&13!==n?e+"rd":e+"th"},n.toCardinal=function(e){return e=(e=String(e)).replace(/([0-9])(st|nd|rd|th)$/i,"$1"),parseInt(e,10)},n.normalize=function(e){return"day"===(e=(e=(e=e.toLowerCase()).replace(/ies$/,"y")).replace(/s$/,""))?"date":e},n.getEpoch=function(e){return"number"==typeof e?e:n.isDate(e)?e.getTime():e.epoch?e.epoch:null},n.beADate=function(e,t){return!1===n.isObject(e)?t.clone().set(e):e}},{}],9:[function(e,t,n){"use strict";var r=e("./spacetime"),a=e("./whereIts"),o=e("../_version"),i=function(e,t,n){return new r(e,t,n)};i.now=function(e,t){return new r((new Date).getTime(),e,t)},i.today=function(e,t){return new r((new Date).getTime(),e,t).startOf("day")},i.tomorrow=function(e,t){return new r((new Date).getTime(),e,t).add(1,"day").startOf("day")},i.yesterday=function(e,t){return new r((new Date).getTime(),e,t).subtract(1,"day").startOf("day")},i.extend=function(e){return Object.keys(e).forEach(function(t){r.prototype[t]=e[t]}),this},i.whereIts=a,i.version=o,i.plugin=i.extend,t.exports=i},{"../_version":1,"./spacetime":34,"./whereIts":41}],10:[function(e,t,n){"use strict";var r=e("../data/monthLengths"),a=e("../fns").isLeapYear;t.exports=function(e){if(!0!==r.hasOwnProperty(e.month))return!1;if(1===e.month)return!!(a(e.year)&&e.date<=29)||e.date<=28;var t=r[e.month]||0;return e.date<=t}},{"../data/monthLengths":4,"../fns":8}],11:[function(e,t,n){"use strict";var r=e("./strParse"),a=e("../fns"),o=e("./named-dates");t.exports=function(e,t,n){if("number"==typeof t)return t>0&&t<25e8&&!1===e.silent&&(console.warn(" - Warning: You are setting the date to January 1970."),console.warn(" - did input seconds instead of milliseconds?")),e.epoch=t,e;if(e.epoch=Date.now(),null==t)return e;if(!0===a.isDate(t))return e.epoch=t.getTime(),e;if(!0===a.isArray(t))return e=function(e,t){for(var n=["year","month","date","hour","minute","second","millisecond"],r=0;r100&&(n/=100),e.timezone().current.offset===n)return e;(n*=-1)>=0&&(n="+"+n);var r="etc/gmt"+n;return e.timezones[r]&&(e.tz=r),e}},{}],14:[function(e,t,n){"use strict";var r=e("../methods/set/walk"),a=e("../data/months").mapping(),o=e("./parseOffset"),i=e("./hasDate"),s=e("../fns"),u=function(e,t){var n=(t=t.replace(/^\s+/,"")).match(/([0-9]{1,2}):([0-9]{1,2}):?([0-9]{1,2})?[:\.]?([0-9]{1,4})?/);return n&&(e=(e=e.hour(n[1])).minute(n[2]),n[3]&&(e=e.seconds(n[3])),n[4]&&(e=e.millisecond(n[4]))),e},c=function(e){e=e||"";var t=parseInt(e.trim(),10);return t=t||(new Date).getFullYear()},h=[{reg:/^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})[T| ]([0-9.:]+)(Z|[0-9\-\+:]+)?$/,parse:function(e,t,n,a){var s=parseInt(t[2],10)-1,c={year:t[1],month:s,date:t[3]};return!1===i(c)?(e.epoch=null,e):(o(e,t[5],n,a),r(e,c),e=u(e,t[4]))}},{reg:/^([0-9]{4})[\-\/]([0-9]{1,2})[\-\/]([0-9]{1,2})$/,parse:function(e,t){var n={year:t[1],month:parseInt(t[2],10)-1,date:parseInt(t[3],10)};return n.month>=12&&(n.date=parseInt(t[2],10),n.month=parseInt(t[3],10)-1),!1===i(n)?(e.epoch=null,e):(r(e,n),e)}},{reg:/^([0-9]{1,2})[\-\/]([0-9]{1,2})[\-\/]?([0-9]{4})?$/,parse:function(e,t){var n=parseInt(t[1],10)-1,a=parseInt(t[2],10);n>=12&&(n=parseInt(t[2],10)-1,a=parseInt(t[1],10));var o={year:t[3]||(new Date).getFullYear(),month:n,date:a};return!1===i(o)?(e.epoch=null,e):(r(e,o),e)}},{reg:/^([a-z]+) ([0-9]{1,2}(?:st|nd|rd|th)?),?( [0-9]{4})?( ([0-9:]+))?$/i,parse:function(e,t){var n=a[t[1].toLowerCase()],o={year:c(t[3]),month:n,date:s.toCardinal(t[2]||"")};return!1===i(o)?(e.epoch=null,e):(r(e,o),t[4]&&(e=u(e,t[4])),e)}},{reg:/^([a-z]+) ([0-9]{4})$/i,parse:function(e,t){var n=a[t[1].toLowerCase()],o={year:c(t[2]),month:n,date:1};return!1===i(o)?(e.epoch=null,e):(r(e,o),t[4]&&(e=u(e,t[4])),e)}},{reg:/^([0-9]{1,2}(?:st|nd|rd|th)?) ([a-z]+),?( [0-9]{4})?$/i,parse:function(e,t){var n=a[t[2].toLowerCase()],o={year:c(t[3]),month:n,date:s.toCardinal(t[1])};return!1===i(o)?(e.epoch=null,e):(r(e,o),e)}},{reg:/^[0-9]{4}$/i,parse:function(e,t){var n=c(t[0]),a=new Date,o={year:n,month:a.getMonth(),date:a.getDate()};return!1===i(o)?(e.epoch=null,e):(r(e,o),e)}},{reg:/^[0-9,]+ ?b\.?c\.?$/i,parse:function(e,t){var n=t[0]||"";n=(n=n.replace(/^([0-9,]+) ?b\.?c\.?$/i,"-$1")).replace(/,/g,"");var a=parseInt(n.trim(),10),o=new Date,s={year:a,month:o.getMonth(),date:o.getDate()};return!1===i(s)?(e.epoch=null,e):(r(e,s),e)}}];t.exports=h},{"../data/months":5,"../fns":8,"../methods/set/walk":31,"./hasDate":10,"./parseOffset":13}],15:[function(e,t,n){"use strict";var r=e("./methods/format"),a=e("./methods/format/unixFmt"),o=e("./methods/progress"),i=e("./methods/nearest"),s=e("./methods/diff"),u=e("./methods/since"),c=e("./methods/startOf"),h=e("./timezone/index"),l=e("./timezone/find"),f=e("./input"),d=e("./fns"),m={set:function(e){var t=this.clone();return t=f(t,e)},timezone:function(){return h(this)},isDST:function(){return h(this).current.isDST},hasDST:function(){return h(this).hasDst},offset:function(){return 60*h(this).current.offset},hemisphere:function(){return h(this).hemisphere},format:function(e){return r(this,e)},unixFmt:function(e){return a(this,e)},startOf:function(e){return c.startOf(this,e)},endOf:function(e){return c.endOf(this,e)},leapYear:function(){var e=this.year();return d.isLeapYear(e)},progress:function(){return o(this)},nearest:function(e){return i(this,e)},diff:function(e,t){return s(this,e,t)},since:function(e){return e||(e=this.clone().set()),u(this,e)},next:function(e){return this.add(1,e).startOf(e)},last:function(e){return this.subtract(1,e).startOf(e)},isValid:function(){return!(!this.epoch&&0!==this.epoch)&&!isNaN(this.d.getTime())},goto:function(e){var t=this.clone();return t.tz=l(e,t.timezones),t},isAwake:function(){var e=this.hour();return!(e<8||e>22)},isAsleep:function(){return!this.isAwake()},log:function(){return console.log(""),console.log(r(this,"nice-short")),this},logYear:function(){return console.log(""),console.log(r(this,"full-short")),this},debug:function(){var e=this.timezone(),t=this.format("MM")+" "+this.format("date-ordinal")+" "+this.year();return t+="\n - "+this.format("time"),console.log("\n\n",t+"\n - "+e.name+" ("+e.current.offset+")"),this}};m.inDST=m.isDST,m.round=m.nearest,t.exports=m},{"./fns":8,"./input":11,"./methods/diff":18,"./methods/format":20,"./methods/format/unixFmt":21,"./methods/nearest":23,"./methods/progress":24,"./methods/since":32,"./methods/startOf":33,"./timezone/find":36,"./timezone/index":38}],16:[function(e,t,n){"use strict";var r=e("./set/walk"),a=e("../data/milliseconds"),o=e("../data/monthLengths"),i=e("../fns"),s=["millisecond","second","minute","hour","date","month"],u={second:s.slice(0,1),minute:s.slice(0,2),quarterhour:s.slice(0,2),hour:s.slice(0,3),date:s.slice(0,4),month:s.slice(0,4),quarter:s.slice(0,4),season:s.slice(0,4),year:s,decade:s,century:s};u.week=u.date,u.season=u.date,u.quarter=u.date;var c={month:!0,quarter:!0,season:!0,year:!0};t.exports=function(e){e.prototype.add=function(e,t){var n=this.clone();if(!t)return n;var s=this.clone();t=i.normalize(t),a[t]?n.epoch+=a[t]*e:"week"===t?n.epoch+=a.day*(7*e):"quarter"===t||"season"===t?n.epoch+=a.month*(4*e):"season"===t?n.epoch+=a.month*(4*e):"quarterhour"===t&&(n.epoch+=15*a.minute);var h={};if(u[t]&&u[t].forEach(function(e){h[e]=s[e]()}),"month"===t)h.month=s.month()+e,h=function(e,t){if(e.month>0){var n=parseInt(e.month/12,10);e.year=t.year()+n,e.month=e.month%12}else if(e.month<0){var r=Math.floor(Math.abs(e.month)/13,10);r=Math.abs(r)+1,e.year=t.year()-r,e.month=e.month%12,e.month=e.month+12,12===e.month&&(e.month=0)}return e}(h,s);else if("date"===t){var l=s.date()+e;l<=28&&l>1?h.date=l:0!==e&&s.isSame(n,"day")&&(h.date=s.date()+e)}else"year"===t&&n.year()===s.year()?n.epoch+=a.week:"decade"===t?h.year=n.year()+10:"century"===t&&(h.year=n.year()+100);if(c[t]){var f=o[h.month];h.date=s.date(),h.date>f&&(h.date=f)}return r(n,h),n},e.prototype.subtract=function(e,t){return this.clone().add(-1*e,t)},e.prototype.minus=e.prototype.subtract,e.prototype.plus=e.prototype.add}},{"../data/milliseconds":3,"../data/monthLengths":4,"../fns":8,"./set/walk":31}],17:[function(e,t,n){"use strict";var r=e("../fns");t.exports=function(e){var t={isAfter:function(e){e=r.beADate(e,this);var t=r.getEpoch(e);return null===t?null:this.epoch>t},isBefore:function(e){e=r.beADate(e,this);var t=r.getEpoch(e);return null===t?null:this.epoch0?t:(t=Math.abs(t),t+" BC")},"year-short":function(e){var t=e.year();return t>0?"'".concat(String(e.year()).substr(2,4)):(t=Math.abs(t))+" BC"},time:function(e){return e.time()},"time-24":function(e){return"".concat(e.hour24(),":").concat(r.zeroPad(e.minute()))},hour:function(e){return e.hour12()},"hour-24":function(e){return e.hour24()},minute:function(e){return e.minute()},"minute-pad":function(e){return r.zeroPad(e.minute())},second:function(e){return e.second()},"second-pad":function(e){return r.zeroPad(e.second())},ampm:function(e){return e.ampm()},quarter:function(e){return"Q"+e.quarter()},season:function(e){return e.season()},era:function(e){return e.era()},timezone:function(e){return e.timezone().name},offset:function(e){return i(e)},numeric:function(e){return"".concat(e.year(),"/").concat(r.zeroPad(e.month()+1),"/").concat(r.zeroPad(e.date()))},"numeric-us":function(e){return"".concat(r.zeroPad(e.month()+1),"/").concat(r.zeroPad(e.date()),"/").concat(e.year())},"numeric-uk":function(e){return"".concat(r.zeroPad(e.date()),"/").concat(r.zeroPad(e.month()+1),"/").concat(e.year())},"mm/dd":function(e){return"".concat(r.zeroPad(e.month()+1),"/").concat(r.zeroPad(e.date()))},iso:function(e){var t=r.zeroPad(e.month()+1),n=r.zeroPad(e.date()),a=r.zeroPad(e.h24()),o=r.zeroPad(e.minute()),s=r.zeroPad(e.second()),u=r.zeroPad(e.millisecond(),3),c=i(e);return"".concat(e.year(),"-").concat(t,"-").concat(n,"T").concat(a,":").concat(o,":").concat(s,".").concat(u).concat(c)},"iso-short":function(e){var t=r.zeroPad(e.month()+1),n=r.zeroPad(e.date());return"".concat(e.year(),"-").concat(t,"-").concat(n)},"iso-utc":function(e){return new Date(e.epoch).toISOString()},nice:function(e){return"".concat(a.short()[e.month()]," ").concat(r.ordinal(e.date()),", ").concat(e.time())},"nice-year":function(e){return"".concat(a.short()[e.month()]," ").concat(r.ordinal(e.date()),", ").concat(e.year())},"nice-day":function(e){return"".concat(o.short()[e.day()]," ").concat(r.titleCase(a.short()[e.month()])," ").concat(r.ordinal(e.date()))},"nice-full":function(e){return"".concat(e.dayName()," ").concat(r.titleCase(e.monthName())," ").concat(r.ordinal(e.date()),", ").concat(e.time())}},u={"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","nice-short":"nice",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(u).forEach(function(e){return s[e]=s[u[e]]});t.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!0!==e.isValid())return"";if(s.hasOwnProperty(t)){var n=String(s[t](e)||"");return"ampm"!==t&&(n=r.titleCase(n)),n}if(-1!==t.indexOf("{"))return t=t.replace(/\{(.+?)\}/g,function(t,n){return n=n.toLowerCase().trim(),s.hasOwnProperty(n)?String(s[n](e)||""):""});return e.format("iso-short")}},{"../../data/days":2,"../../data/months":5,"../../fns":8,"./_offset":19}],21:[function(e,t,n){"use strict";var r=e("../../fns").zeroPad,a={G:function(e){return e.era()},GG:function(e){return e.era()},GGG:function(e){return e.era()},GGGG:function(e){return"AD"===e.era()?"Anno Domini":"Before Christ"},y:function(e){return e.year()},yy:function(e){return parseInt(String(e.year()).substr(2,4),10)},yyy:function(e){return e.year()},yyyy:function(e){return e.year()},yyyyy:function(e){return"0"+e.year()},Q:function(e){return e.quarter()},QQ:function(e){return e.quarter()},QQQ:function(e){return e.quarter()},QQQQ:function(e){return e.quarter()},M:function(e){return e.month()+1},MM:function(e){return r(e.month()+1)},MMM:function(e){return e.format("month-short")},MMMM:function(e){return e.format("month")},w:function(e){return e.week()},ww:function(e){return r(e.week())},d:function(e){return e.date()},dd:function(e){return r(e.date())},D:function(e){return e.dayOfYear()},DD:function(e){return r(e.dayOfYear())},DDD:function(e){return r(e.dayOfYear(),3)},E:function(e){return e.format("day-short")},EE:function(e){return e.format("day-short")},EEE:function(e){return e.format("day-short")},EEEE:function(e){return e.format("day")},EEEEE:function(e){return e.format("day")[0]},e:function(e){return e.day()},ee:function(e){return e.day()},eee:function(e){return e.format("day-short")},eeee:function(e){return e.format("day")},eeeee:function(e){return e.format("day")[0]},a:function(e){return e.ampm().toUpperCase()},aa:function(e){return e.ampm().toUpperCase()},aaa:function(e){return e.ampm().toUpperCase()},aaaa:function(e){return e.ampm().toUpperCase()},h:function(e){return e.h12()},hh:function(e){return r(e.h12())},H:function(e){return e.hour()},HH:function(e){return r(e.hour())},m:function(e){return e.minute()},mm:function(e){return r(e.minute())},s:function(e){return e.second()},ss:function(e){return r(e.second())},A:function(e){return e.epoch-e.startOf("day").epoch},z:function(e){return e.timezone().name},zz:function(e){return e.timezone().name},zzz:function(e){return e.timezone().name},zzzz:function(e){return e.timezone().name},Z:function(e){return e.timezone().current.offset+"00"},ZZ:function(e){return e.timezone().current.offset+"00"},ZZZ:function(e){return e.timezone().current.offset+"00"},ZZZZ:function(e){return e.timezone().current.offset+":00"}},o=function(e,t,n){for(var r=e,o=t,i=0;i.5&&(e=e.add(1,t)),e=e.startOf(t)):!1===e.silent&&console.warn("no known unit '"+t+"'"),e}},{}],24:[function(e,t,n){"use strict";t.exports=function(e){var t={};return["year","season","quarter","month","week","day","quarterHour","hour","minute"].forEach(function(n){var r=e.clone().startOf(n),a=e.clone().endOf(n).epoch-r.epoch,o=(e.epoch-r.epoch)/a;t[n]=parseFloat(o.toFixed(2))}),t}},{}],25:[function(e,t,n){"use strict";var r=e("../../data/quarters"),a=e("../../data/seasons"),o=e("../set/set"),i=e("../../fns"),s=function(e){return e=(e=(e=e.minute(0)).second(0)).millisecond(1)};t.exports={time:function(e){if(void 0!==e){var t=this.clone();return t.epoch=o.time(t,e),t}return"".concat(this.h12(),":").concat(i.zeroPad(this.minute())).concat(this.ampm())},week:function(e){if(void 0!==e){var t=this.clone();return t=(t=(t=t.month(0)).date(1)).day("monday"),"december"===(t=s(t)).monthName()&&(t=t.add(1,"week")),e-=1,t=t.add(e,"weeks")}var n=this.clone();n=(n=n.month(0)).date(1),"december"===(n=(n=s(n)).day("monday")).monthName()&&(n=n.add(1,"week"));var r=this.epoch;if(n.epoch>r)return 1;for(var a=0;a<52;a++){if(n.epoch>r)return a;n=n.add(1,"week")}return 52},quarter:function(e){if(void 0!==e&&("string"==typeof e&&(e=e.replace(/^q/i,""),e=parseInt(e,10)),r[e])){var t=this.clone(),n=r[e][0];return t=(t=(t=t.month(n)).date(1)).startOf("day")}for(var a=this.d.getMonth(),o=1;o=a[t][i][1]&&o12&&(i-=12),0===i&&(i=12),i},date:function(e){if(void 0!==e){var t=this.clone();return t.epoch=r.date(t,e),t}return this.d.getDate()},month:function(e){if(void 0!==e){var t=this.clone();return t.epoch=r.month(t,e),t}return this.d.getMonth()},year:function(e){if(void 0!==e){var t=this.clone();return t.epoch=r.year(t,e),t}return this.d.getFullYear()},iso:function(e){return void 0!==e?this.set(e):this.format("iso")},dayTime:function(e){if(void 0!==e){var t={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"},n=this.clone();return e=(e=e||"").toLowerCase(),!0===t.hasOwnProperty(e)&&(n=n.time(t[e])),n}var r=this.hour();return r<6?"night":r<12?"morning":r<17?"afternoon":r<22?"evening":"night"},dayOfYear:function(e){if(void 0!==e){var t=this.clone();return t.epoch=r.dayOfYear(t,e),t}for(var n,a=0,o=this.d.getMonth(),i=1;i<=o;i++)(n=new Date).setDate(1),n.setYear(this.d.getFullYear()),n.setHours(1),n.setMinutes(1),n.setMonth(i),n.setHours(-2),a+=n.getDate();return a+this.d.getDate()},era:function(e){if(void 0!==e){var t=this.clone();e=e.toLowerCase();var n=t.d.getFullYear();return"bc"===e&&n>0&&(t.epoch=r.year(t,-1*n)),"ad"===e&&n<0&&(t.epoch=r.year(t,-1*n)),t}return this.d.getFullYear()<0?"BC":"AD"},from:function(e){return(e=this.clone().set(e)).since(this)},fromNow:function(){return this.clone().set(Date.now()).since(this)}};o.milliseconds=o.millisecond,o.seconds=o.second,o.minutes=o.minute,o.hours=o.hour,o.hour24=o.hour,o.h12=o.hour12,o.h24=o.hour24,o.days=o.day,t.exports=o},{"../set/set":30,"../set/walk":31}],28:[function(e,t,n){"use strict";var r=e("../../data/days"),a=e("../../data/months"),o=e("../set/walk");t.exports={day:function(e){if(void 0===e)return this.d.getDay();var t=this.clone(),n=e;"string"==typeof e&&(e=e.toLowerCase(),-1===(n=r.short().indexOf(e))&&(n=r.long().indexOf(e)));var a=this.d.getDay(),i=a-n,s=this.subtract(24*i,"hours");return o(s,{hour:t.hour(),minute:t.minute(),second:t.second()}),s},ampm:function(e){var t="am";if(this.hour()>=12&&(t="pm"),void 0===e)return t;var n=this.clone();return e===t?n:n="am"===n?n.subtract(12,"hours"):n.add(12,"hours")},dayName:function(e){if(void 0===e)return r.long()[this.day()];var t=this.clone();return t=t.day(e)},monthName:function(e){if(void 0===e)return a.long()[this.month()];var t=this.clone();return t=t.month(e)}}},{"../../data/days":2,"../../data/months":5,"../set/walk":31}],29:[function(e,t,n){"use strict";var r={millisecond:function(e){return e.epoch},second:function(e){return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second()].join("-")},minute:function(e){return[e.year(),e.month(),e.date(),e.hour(),e.minute()].join("-")},hour:function(e){return[e.year(),e.month(),e.date(),e.hour()].join("-")},day:function(e){return[e.year(),e.month(),e.date()].join("-")},week:function(e){return[e.year(),e.week()].join("-")},month:function(e){return[e.year(),e.month()].join("-")},quarter:function(e){return[e.year(),e.quarter()].join("-")},year:function(e){return e.year()}};r.date=r.day;t.exports=function(e){e.prototype.isSame=function(t,n){return n?("string"!=typeof t&&"number"!=typeof t||(t=new e(t,this.timezone.name)),n=n.replace(/s$/,""),r[n]?r[n](this)===r[n](t):null):null}}},{}],30:[function(e,t,n){"use strict";var r=e("../../data/milliseconds"),a=e("../../data/months"),o=e("../../data/monthLengths"),i=e("./walk"),s=function(e){return"string"==typeof e&&(e=parseInt(e,10)),e},u=["year","month","date","hour","minute","second","millisecond"],c=function(e,t,n){for(var r=u.indexOf(n),a=u.slice(r,u.length),o=0;o12&&(r=!0),!1===r&&("am"===n[3]&&12===a&&(a=0),"pm"===n[3]&&a<12&&(a+=12)),(e=(e=(e=(e=e.hour(a)).minute(o)).second(0)).millisecond(0)).epoch},date:function(e,t){return t=s(t),i(e,{date:t}),e.epoch},month:function(e,t){"string"==typeof t&&(t=a.mapping()[t.toLowerCase()]),t=s(t);var n=e.date();return n>o[t]&&(n=o[t]),i(e,{month:t,date:n}),e.epoch},year:function(e,t){return t=s(t),i(e,{year:t}),e.epoch},dayOfYear:function(e,t){t=s(t);var n=e.clone(),a=(t-e.dayOfYear())*r.day;return e.epoch+=a,c(e,n,"hour"),e.epoch}}},{"../../data/milliseconds":3,"../../data/monthLengths":4,"../../data/months":5,"./walk":31}],31:[function(e,t,n){"use strict";var r=e("../../data/milliseconds"),a=function(e,t,n,a,o){var i=e.d[n]();if(i!==t){var s=null===o?null:e.d[o](),u=e.epoch,c=t-i;e.epoch+=r[a]*c,"day"===a&&Math.abs(c)>28&&t<28&&(e.epoch+=r.hour);for(var h=r[a]/2;e.d[n]()t;)e.epoch-=h;null!==o&&s!==e.d[o]()&&(console.warn("spacetime warning: missed setting "+a),e.epoch=u)}},o={year:{valid:function(e){return e>-4e3&&e<4e3},walkTo:function(e,t){return a(e,t,"getFullYear","year",null)}},month:{valid:function(e){return e>=0&&e<=11},walkTo:function(e,t){var n=e.d,a=n.getMonth(),o=e.epoch,i=n.getYear();if(a!==t){var s=t-a;for(e.epoch+=r.day*(28*s),i!==e.d.getYear()&&(e.epoch=o);e.d.getMonth()t;)e.epoch-=r.day}}},date:{valid:function(e){return e>0&&e<=31},walkTo:function(e,t){return a(e,t,"getDate","day","getMonth")}},hour:{valid:function(e){return e>=0&&e<24},walkTo:function(e,t){return a(e,t,"getHours","hour","getDate")}},minute:{valid:function(e){return e>=0&&e<60},walkTo:function(e,t){return a(e,t,"getMinutes","minute","getHours")}},second:{valid:function(e){return e>=0&&e<60},walkTo:function(e,t){e.epoch=e.seconds(t).epoch}},millisecond:{valid:function(e){return e>=0&&e<1e3},walkTo:function(e,t){e.epoch=e.milliseconds(t).epoch}}};t.exports=function(e,t){for(var n=Object.keys(o),r=e.clone(),a=0;ar.epoch+10&&(a=a.subtract(1,e),t-=1),o[e]=t}}),n&&Object.keys(o).forEach(function(e){0!==o[e]&&(o[e]*=-1)}),o}(e,t=r.beADate(t,e));if(!0===Object.keys(u).every(function(e){return!u[e]}))return{diff:u,rounded:"now",qualified:"now",precise:"now"};var c=[];return Object.keys(u).forEach(function(e,t,r){var s=Math.abs(u[e]);if(0!==s){var h=o(s,e);if(c.push(h),!n){if(n=i=h,t>4)return;var l=r[t+1],f=Math.abs(u[l]);f>a[l].almost?(n=o(s+1,e),i="almost "+n):f>a[l].over&&(i="over "+h)}}}),s=c.splice(0,2).join(", "),!0===e.isAfter(t)?(n+=" ago",i+=" ago",s+=" ago"):(n="in "+n,i="in "+i,s="in "+s),{diff:u,rounded:n,qualified:i,precise:s}}},{"../fns":8}],33:[function(e,t,n){"use strict";var r=e("../data/seasons"),a=e("../data/quarters"),o=e("./set/walk"),i={minute:function(e){return o(e,{second:0,millisecond:0}),e},quarterHour:function(e){var t=e.minutes();return e=t>=45?e.minutes(45):t>=30?e.minutes(30):t>=15?e.minutes(15):e.minutes(0),o(e,{second:0,millisecond:0}),e},hour:function(e){return o(e,{minute:0,second:0,millisecond:0}),e},day:function(e){return o(e,{hour:0,minute:0,second:0,millisecond:0}),e},week:function(e){var t=e.clone();return(e=e.day(1)).isAfter(t)&&(e=e.subtract(1,"week")),o(e,{hour:0,minute:0,second:0,millisecond:0}),e},month:function(e){return o(e,{date:1,hour:0,minute:0,second:0,millisecond:0}),e},quarter:function(e){var t=e.quarter();return a[t]&&o(e,{month:a[t][0],date:a[t][1],hour:0,minute:0,second:0,millisecond:0}),e},season:function(e){var t=e.season(),n="north";"South"===e.hemisphere()&&(n="south");for(var a=0;a2&&!1===t.hasOwnProperty(n)&&(n=r[0]+"/"+r[1]),n=n.toLowerCase(),!0===t.hasOwnProperty(n))return n;if(n=function(e){return e=(e=(e=(e=(e=(e=e.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")}(n),!0===t.hasOwnProperty(n))return n;if(!0===a.hasOwnProperty(n))return a[n];if(!0===s.hasOwnProperty(n))return s[n];var u=n.match(i);if(null!==u){var c=Number(u[1]),h="etc/gmt"+(c=((c*=-1)>0?"+":"")+c);if(t.hasOwnProperty(h))return h}return console.warn("Cannot find timezone named: '"+e+"'"),o}},{"../../zonefile/informal":44,"../../zonefile/unpack":45,"./guessTz":37}],37:[function(e,t,n){"use strict";t.exports=function(){var e=function(){if("undefined"==typeof Intl||void 0===Intl.DateTimeFormat)return null;var e=Intl.DateTimeFormat();if(void 0===e||void 0===e.resolvedOptions)return null;var t=e.resolvedOptions().timeZone;return!t||-1===t.indexOf("/")&&"UTC"===t?null:t}();return null===e?"asia/shanghai":e.toLowerCase()}},{}],38:[function(e,t,n){"use strict";var r=e("./find"),a=e("./summerTime"),o=e("./display");t.exports=function(e){var t=e.timezones,n=e.tz;if(!1===t.hasOwnProperty(n)&&(n=r(e.tz,t)),null===n)return!1===e.silent&&console.warn("Warn: could not find given or local timezone - '"+e.tz+"'"),{current:{epochShift:0}};var i,s,u=t[n],c={name:(i=n,i=(i=(i=i[0].toUpperCase()+i.substr(1)).replace(/\/gmt/,"/GMT")).replace(/[\/_]([a-z])/gi,function(e){return e.toUpperCase()})),hasDst:Boolean(u.dst),default_offset:u.offset,hemisphere:"s"===u.hem?"South":"North",current:{}};if(c.hasDst){var h=(s=u.dst)?s.split("->"):[];c.change={start:h[0],back:h[1]}}var l=u.offset,f=l;return!0===c.hasDst&&(f="North"===c.hemisphere?l-1:u.offset+1),!1===c.hasDst?(c.current.offset=l,c.current.isDST=!1):!0===a(e.epoch,c.change.start,c.change.back,l)?(c.current.offset=l,c.current.isDST="North"===c.hemisphere):(c.current.offset=f,c.current.isDST="South"===c.hemisphere),c.display=o(n,c,t),c}},{"./display":35,"./find":36,"./summerTime":40}],39:[function(e,t,n){"use strict";var r=e("./summerTime");t.exports=function(e){var t=e.timezones[e.tz];if(void 0===t.dst)return t.offset;var n=t.offset,a=t.offset+1;"n"===t.hem&&(a=n-1);var o=t.dst.split("->");return!0===r(e.epoch,o[0],o[1],n)?n:a}},{"./summerTime":40}],40:[function(e,t,n){"use strict";var r=e("../fns").zeroPad;t.exports=function(e,t,n,a){var o=new Date(e),i=(o.getTimezoneOffset()||0)+60*a;i=60*i*1e3;var s=function(e){return r(e.getMonth()+1)+"/"+r(e.getDate())+":"+r(e.getHours())}(o=new Date(e+i));return s>=t&&s=o&&s<=i&&!(s===o&&t.minute()a.minute())})}},{"./spacetime":34}],42:[function(e,t,n){t.exports={"9|s":"2/dili,2/jayapura","9|n":"2/chita,2/khandyga,2/pyongyang,2/seoul,2/tokyo,11/palau","9.5|s|04/01:03->10/07:02":"4/adelaide,4/broken_hill,4/south,4/yancowinna","9.5|s":"4/darwin,4/north","8|s":"12/casey,2/kuala_lumpur,2/makassar,2/singapore,4/perth,4/west","8|n|03/25:03->09/29:23":"2/ulan_bator","8|n":"2/brunei,2/choibalsan,2/chongqing,2/chungking,2/harbin,2/hong_kong,2/irkutsk,2/kuching,2/macao,2/macau,2/manila,2/shanghai,2/taipei,2/ujung_pandang,2/ulaanbaatar","8.75|s":"4/eucla","7|s":"12/davis,2/jakarta,9/christmas","7|n":"2/bangkok,2/barnaul,2/ho_chi_minh,2/hovd,2/krasnoyarsk,2/novokuznetsk,2/novosibirsk,2/phnom_penh,2/pontianak,2/saigon,2/vientiane","6|s":"12/vostok","6|n":"2/almaty,2/bishkek,2/dacca,2/dhaka,2/kashgar,2/omsk,2/qyzylorda,2/thimbu,2/thimphu,2/urumqi,9/chagos","6.5|n":"2/rangoon,9/cocos","5|s":"12/mawson,9/kerguelen","5|n":"2/aqtau,2/aqtobe,2/ashgabat,2/ashkhabad,2/atyrau,2/baku,2/dushanbe,2/karachi,2/oral,2/samarkand,2/tashkent,2/yekaterinburg,9/maldives","5.75|n":"2/kathmandu,2/katmandu","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,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/30:00->10/26:01":"2/amman","3|n|03/30:00->10/25:24":"2/damascus","3|n|03/25:03->10/28:04":"2/nicosia,8/athens,8/bucharest,8/helsinki,8/kiev,8/mariehamn,8/nicosia,8/riga,8/sofia,8/tallinn,8/uzhgorod,8/vilnius,8/zaporozhye","3|n|03/25:02->10/28:03":"8/chisinau,8/tiraspol","3|n|03/25:00->10/27:24":"2/beirut","3|n|03/24:01->10/27:01":"2/gaza,2/hebron","3|n|03/23:02->10/28:02":"2/jerusalem,2/tel_aviv","3|n":"0/addis_ababa,0/asmara,0/asmera,0/dar_es_salaam,0/djibouti,0/juba,0/kampala,0/mogadishu,0/nairobi,2/aden,2/baghdad,2/bahrain,2/istanbul,2/kuwait,2/qatar,2/riyadh,8/istanbul,8/kirov,8/minsk,8/moscow,8/simferopol,8/volgograd,9/comoro,9/mayotte","2|s|03/25:02->10/28:02":"12/troll","2|s":"0/gaborone,0/harare,0/johannesburg,0/lubumbashi,0/lusaka,0/maputo,0/maseru,0/mbabane","2|n|03/25:02->10/28:03":"0/ceuta,arctic/longyearbyen,3/jan_mayen,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","2|n":"0/blantyre,0/bujumbura,0/cairo,0/khartoum,0/kigali,0/tripoli,8/kaliningrad","1|s|04/02:01->09/03:03":"0/windhoek","1|s":"0/kinshasa,0/luanda","1|n|07/02:03->10/29:02":"0/casablanca,0/el_aaiun","1|n|03/25:01->10/28:02":"3/canary,3/faeroe,3/faroe,3/madeira,8/belfast,8/dublin,8/guernsey,8/isle_of_man,8/jersey,8/lisbon,8/london","1|n":"0/algiers,0/bangui,0/brazzaville,0/douala,0/lagos,0/libreville,0/malabo,0/ndjamena,0/niamey,0/porto-novo,0/tunis","14|n":"11/kiritimati","13|s|04/01:04->09/30:03":"11/apia","13|s|01/15:02->11/05:03":"11/tongatapu","13|n":"11/enderbury,11/fakaofo","12|s|04/01:03->09/30:02":"12/mcmurdo,12/south_pole,11/auckland","12|s|01/14:03->11/04: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/07:03->09/29:02":"11/chatham","11|s":"12/macquarie,11/bougainville","11|n":"2/magadan,2/sakhalin,11/efate,11/guadalcanal,11/kosrae,11/noumea,11/pohnpei,11/ponape","11.5|n":"11/norfolk","10|s|04/01:03->10/07:02":"4/act,4/canberra,4/currie,4/hobart,4/melbourne,4/nsw,4/sydney,4/tasmania,4/victoria","10|s":"12/dumontdurville,4/brisbane,4/lindeman,4/queensland","10|n":"2/ust-nera,2/vladivostok,2/yakutsk,11/chuuk,11/guam,11/port_moresby,11/saipan,11/truk,11/yap","10.5|s|04/01:01->10/07:02":"4/lhi,4/lord_howe","0|n|03/25:00->10/28: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,0/timbuktu,1/danmarkshavn,3/reykjavik,3/st_helena,13/gmt,13/gmt+0,13/gmt-0,13/gmt0,13/greenwich,13/utc,13/universal,13/zulu","-9|n|03/11:02->11/04:02":"1/adak,1/atka","-9|n":"11/gambier","-9.5|n":"11/marquesas","-8|n|03/11:02->11/04:02":"1/anchorage,1/juneau,1/metlakatla,1/nome,1/sitka,1/yakutat","-8|n":"11/pitcairn","-7|n|03/11:02->11/04:02":"1/dawson,1/ensenada,1/los_angeles,1/santa_isabel,1/tijuana,1/vancouver,1/whitehorse,6/pacific,6/yukon,10/bajanorte","-7|n":"1/creston,1/dawson_creek,1/hermosillo,1/phoenix","-6|s|05/12:22->08/11:22":"7/easterisland,11/easter","-6|n|04/01:02->10/28:02":"1/chihuahua,1/mazatlan,10/bajasur","-6|n|03/11:02->11/04:02":"1/boise,1/cambridge_bay,1/denver,1/edmonton,1/inuvik,1/ojinaga,1/shiprock,1/yellowknife,6/mountain","-6|n":"1/belize,1/costa_rica,1/el_salvador,1/guatemala,1/managua,1/regina,1/swift_current,1/tegucigalpa,6/east-saskatchewan,6/saskatchewan,11/galapagos","-5|s":"1/lima,1/rio_branco,5/acre","-5|n|04/01:02->10/28:02":"1/bahia_banderas,1/merida,1/mexico_city,1/monterrey,10/general","-5|n|03/12:03->11/05:01":"1/north_dakota","-5|n|03/11:02->11/04:02":"1/chicago,1/knox_in,1/matamoros,1/menominee,1/rainy_river,1/rankin_inlet,1/resolute,1/winnipeg,6/central","-5|n":"1/atikokan,1/bogota,1/cancun,1/cayman,1/coral_harbour,1/eirunepe,1/guayaquil,1/jamaica,1/panama,1/porto_acre","-4|s|05/13:23->08/13:01":"12/palmer","-4|s|05/12:24->08/12:00":"1/santiago,7/continental","-4|s|03/24:24->10/07:00":"1/asuncion","-4|s|02/17:24->11/04:00":"1/campo_grande,1/cuiaba","-4|s":"1/la_paz,1/manaus,5/west","-4|n|03/12:03->11/05:01":"1/indiana,1/kentucky","-4|n|03/11:02->11/04:02":"1/detroit,1/fort_wayne,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,6/eastern","-4|n|03/11:00->11/04:01":"1/havana","-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|02/17:24->11/04:00":"1/sao_paulo,5/east","-3|s":"1/argentina,1/buenos_aires,1/cordoba,1/fortaleza,1/montevideo,1/punta_arenas,12/rothera,3/stanley","-3|n|03/11:02->11/04: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/catamarca,1/cayenne,1/jujuy,1/maceio,1/mendoza,1/paramaribo,1/recife,1/rosario,1/santarem","-2|s":"5/denoronha","-2|n|03/24:22->10/27:23":"1/godthab","-2|n|03/11:02->11/04:02":"1/miquelon","-2|n":"1/noronha,3/south_georgia","-2.5|n|03/11:02->11/04:02":"1/st_johns,6/newfoundland","-1|n":"3/cape_verde","-11|n":"11/midway,11/niue,11/pago_pago,11/samoa","-10|n":"11/honolulu,11/johnston,11/rarotonga,11/tahiti"}},{}],43:[function(e,t,n){"use strict";t.exports=["africa","america","asia","atlantic","australia","brazil","canada","chile","europe","indian","mexico","pacific","antarctica","etc"]},{}],44:[function(e,t,n){"use strict";var r={"america/halifax":["ast","adt","atlantic"],"america/new_york":["est","edt","eastern"],"america/chicago":["cst","cdt","central"],"america/denver":["mst","mdt","mountain"],"america/los_angeles":["pst","pdt","pacific"],"america/anchorage":["ahst","ahdt","akst","akdt","alaska"],"america/st_johns":["nst","ndt","nt","newfoundland","nddt"],"america/caracas":["vet",null,"venezuela"],"america/bogota":["cot",null,"colombia"],"america/cayenne":["gft",null,"french guiana"],"america/paramaribo":["srt",null,"suriname"],"america/guyana":["gyt"],"america/buenos_aires":["art",null,"argentina"],"america/la_paz":["bot",null,"bolivia"],"america/asuncion":["pyt","pyst","paraguay"],"america/santiago":["clt","clst","chile"],"america/lima":["pet",null,"peru"],"america/montevideo":["uyt",null,"uruguay"],"atlantic/stanley":["fkst",null,"falkland island"],"america/manaus":["amt"],"america/sao_paulo":["brt","brst"],"brazil/acre":["act"],"europe/london":["gmt","bst","british"],"etc/gmt":["gmt",null,"greenwich"],"europe/lisbon":["wet","west","west europe"],"europe/berlin":["cet","cest","central europe","middle european","met","mest"],"europe/riga":["eet","eest","east europe","kalt"],"europe/moscow":["msk",null,"fet","mdst","msd"],"europe/samara":["samt"],"asia/yekaterinburg":["yekt"],"asia/omsk":["omst"],"asia/krasnoyarsk":["krat"],"asia/novosibirsk":["novt"],"asia/irkutsk":["irkt"],"asia/yakutsk":["yakt"],"asia/vladivostok":["vlat"],"asia/magadan":["magt"],"asia/sakhalin":["sakt"],"asia/srednekolymsk":["sret"],"asia/anadyr":["anat"],"asia/kamchatka":["pett"],"asia/tashkent":["uzt","uzbekistan"],"asia/bishkek":["kgt","kyrgyzstan"],"antarctica/vostok":["vost"],"asia/hovd":["hovt"],"asia/ashgabat":["tmt",null,"turkmenistan"],"africa/lagos":["wat","wast","west africa"],"africa/khartoum":["cat",null,"central africa"],"africa/nairobi":["eat",null,"east africa"],"atlantic/cape_verde":["cvt"],"indian/mauritius":["mut"],"indian/reunion":["ret"],"africa/johannesburg":["sast",null,"south africa"],"atlantic/azores":["azot","azost","hmt"],"america/godthab":["wgt","wgst","west greenland"],"america/scoresbysund":["egt","egst","east greenland"],"europe/istanbul":["trt",null,"turkey"],"asia/tbilisi":["get",null,"georgia"],"asia/baku":["azt",null,"azerbaijan"],"asia/jerusalem":[null,"idt","israel","jmt","iddt"],"asia/tehran":["irst","irdt","iran"],"asia/karachi":["pkt",null,"pakistan"],"asia/kabul":["aft",null,"afghanistan"],"asia/dushanbe":["tjt",null,"tajikistan"],"asia/almaty":["almt",null,"alma ata"],"asia/dubai":["gst",null,"gulf"],"asia/kolkata":["ist",null,"india","slst"],"asia/thimbu":["btt",null,"bhutan"],"indian/maldives":["mvt"],"asia/kathmandu":["npt",null,"nepal"],"indian/cocos":["cct",null,"cocos island"],"indian/chagos":["iot",null,"indian chagos"],"indian/kerguelen":["tft",null,"french southern and antarctic"],"asia/shanghai":["ct",null,"china","hkt"],"asia/ulaanbaatar":["ulat"],"asia/seoul":["kst",null,"korea"],"asia/tokyo":["jst",null,"japan"],"asia/phnom_penh":["ict",null,"indochina"],"asia/manila":["pht",null,"philippines"],"asia/singapore":["sgt"],"australia/brisbane":["aest","aedt","australian east"],"australia/adelaide":["acst","acdt","australian central"],"australia/eucla":["acwst",null,"cwst","australian central western"],"australia/perth":["awst","awdt","australian west"],"pacific/auckland":["nzst","nzdt","nzmt"],"australia/lord_howe":["lhst","lhdt"],"pacific/guam":["chst"],"pacific/chatham":["chast","chadt"],"pacific/honolulu":["hst"],"asia/brunei":["bnt",null,"bdt"],"pacific/midway":["sst",null,"samoa","sdt"],"pacific/niue":["nut"],"pacific/fakaofo":["tkt"],"pacific/rarotonga":["ckt",null,"cook islands"],"chile/easterisland":["east","easst","easter island","emt"],"asia/jayapura":["wit",null,"east indonesia"],"asia/jakarta":["wib",null,"west indonesia"],"asia/makassar":["wita",null,"central indonesia"],"pacific/galapagos":["galt"],"pacific/fiji":["fjt","fjst"],"asia/dili":["tlt",null,"east timor"],"indian/christmas":["cxt"]},a=Object.keys(r).reduce(function(e,t){for(var n=r[t],a=0;a<5;a+=1)n[a]&&(e[n[a]]=t);return e},{});t.exports={informal:r,lookup:a}},{}],45:[function(e,t,n){"use strict";var r=e("./_build.json"),a=e("./_prefixes.js"),o={};Object.keys(r).forEach(function(e){var t=e.split("|"),n={offset:Number(t[0]),hem:t[1]};t[2]&&(n.dst=t[2]),r[e].split(",").forEach(function(e){e=e.replace(/(^[0-9]+)\//,function(e,t){return t=Number(t),a[t]+"/"}),o[e]=n})});for(var i=-12;i<13;i+=1){var s=i;s>0&&(s="+"+s);var u="etc/gmt"+s;o[u]={offset:-1*i,hem:"n"},o[u="utc/gmt"+s]={offset:-1*i,hem:"n"}}t.exports=o},{"./_build.json":42,"./_prefixes.js":43}]},{},[9])(9)}); +!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).spacetime=t()}}(function(){return function(){return function t(e,n,a){function r(i,s){if(!n[i]){if(!e[i]){var u="function"==typeof require&&require;if(!s&&u)return u(i,!0);if(o)return o(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[i]={exports:{}};e[i][0].call(l.exports,function(t){return r(e[i][1][t]||t)},l,l.exports,t,e,n,a)}return n[i].exports}for(var o="function"==typeof require&&require,i=0;i=(e=e||2)?t:new Array(e-t.length+1).join("0")+t},n.titleCase=function(t){return t?t[0].toUpperCase()+t.substr(1):""},n.ordinal=function(t){var e=t%10,n=t%100;return 1===e&&11!==n?t+"st":2===e&&12!==n?t+"nd":3===e&&13!==n?t+"rd":t+"th"},n.toCardinal=function(t){return t=(t=String(t)).replace(/([0-9])(st|nd|rd|th)$/i,"$1"),parseInt(t,10)},n.normalize=function(t){return"day"===(t=(t=(t=t.toLowerCase()).replace(/ies$/,"y")).replace(/s$/,""))?"date":t},n.getEpoch=function(t){return"number"==typeof t?t:n.isDate(t)?t.getTime():t.epoch?t.epoch:null},n.beADate=function(t,e){return!1===n.isObject(t)?e.clone().set(t):t}},{}],9:[function(t,e,n){"use strict";var a=t("./spacetime"),r=t("./whereIts"),o=t("../_version"),i=function(t,e,n){return new a(t,e,n)};i.now=function(t,e){return new a((new Date).getTime(),t,e)},i.today=function(t,e){return new a((new Date).getTime(),t,e).startOf("day")},i.tomorrow=function(t,e){return new a((new Date).getTime(),t,e).add(1,"day").startOf("day")},i.yesterday=function(t,e){return new a((new Date).getTime(),t,e).subtract(1,"day").startOf("day")},i.extend=function(t){return Object.keys(t).forEach(function(e){a.prototype[e]=t[e]}),this},i.whereIts=r,i.version=o,i.plugin=i.extend,e.exports=i},{"../_version":1,"./spacetime":34,"./whereIts":41}],10:[function(t,e,n){"use strict";var a=t("../data/monthLengths"),r=t("../fns").isLeapYear;e.exports=function(t){if(!0!==a.hasOwnProperty(t.month))return!1;if(1===t.month)return!!(r(t.year)&&t.date<=29)||t.date<=28;var e=a[t.month]||0;return t.date<=e}},{"../data/monthLengths":4,"../fns":8}],11:[function(t,e,n){"use strict";var a=t("./strParse"),r=t("../fns"),o=t("./named-dates");e.exports=function(t,e,n){if("number"==typeof e)return e>0&&e<25e8&&!1===t.silent&&(console.warn(" - Warning: You are setting the date to January 1970."),console.warn(" - did input seconds instead of milliseconds?")),t.epoch=e,t;if(t.epoch=Date.now(),null==e)return t;if(!0===r.isDate(e))return t.epoch=e.getTime(),t;if(!0===r.isArray(e))return t=function(t,e){for(var n=["year","month","date","hour","minute","second","millisecond"],a=0;a100&&(n/=100),t.timezone().current.offset===n)return t;(n*=-1)>=0&&(n="+"+n);var a="etc/gmt"+n;return t.timezones[a]&&(t.tz=a),t}},{}],14:[function(t,e,n){"use strict";var a=t("../methods/set/walk"),r=t("../data/months").mapping(),o=t("./parseOffset"),i=t("./hasDate"),s=t("../fns"),u=function(t,e){var n=(e=e.replace(/^\s+/,"")).match(/([0-9]{1,2}):([0-9]{1,2}):?([0-9]{1,2})?[:\.]?([0-9]{1,4})?/);return n&&(t=(t=t.hour(n[1])).minute(n[2]),n[3]&&(t=t.seconds(n[3])),n[4]&&(t=t.millisecond(n[4]))),t},c=function(t){t=t||"";var e=parseInt(t.trim(),10);return e=e||(new Date).getFullYear()},l=[{reg:/^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})[T| ]([0-9.:]+)(Z|[0-9\-\+:]+)?$/,parse:function(t,e,n,r){var s=parseInt(e[2],10)-1,c={year:e[1],month:s,date:e[3]};return!1===i(c)?(t.epoch=null,t):(o(t,e[5],n,r),a(t,c),t=u(t,e[4]))}},{reg:/^([0-9]{4})[\-\/]([0-9]{1,2})[\-\/]([0-9]{1,2})$/,parse:function(t,e){var n={year:e[1],month:parseInt(e[2],10)-1,date:parseInt(e[3],10)};return n.month>=12&&(n.date=parseInt(e[2],10),n.month=parseInt(e[3],10)-1),!1===i(n)?(t.epoch=null,t):(a(t,n),t)}},{reg:/^([0-9]{1,2})[\-\/]([0-9]{1,2})[\-\/]?([0-9]{4})?$/,parse:function(t,e){var n=parseInt(e[1],10)-1,r=parseInt(e[2],10);n>=12&&(n=parseInt(e[2],10)-1,r=parseInt(e[1],10));var o={year:e[3]||(new Date).getFullYear(),month:n,date:r};return!1===i(o)?(t.epoch=null,t):(a(t,o),t)}},{reg:/^([a-z]+) ([0-9]{1,2}(?:st|nd|rd|th)?),?( [0-9]{4})?( ([0-9:]+))?$/i,parse:function(t,e){var n=r[e[1].toLowerCase()],o={year:c(e[3]),month:n,date:s.toCardinal(e[2]||"")};return!1===i(o)?(t.epoch=null,t):(a(t,o),e[4]&&(t=u(t,e[4])),t)}},{reg:/^([a-z]+) ([0-9]{4})$/i,parse:function(t,e){var n=r[e[1].toLowerCase()],o={year:c(e[2]),month:n,date:1};return!1===i(o)?(t.epoch=null,t):(a(t,o),e[4]&&(t=u(t,e[4])),t)}},{reg:/^([0-9]{1,2}(?:st|nd|rd|th)?) ([a-z]+),?( [0-9]{4})?$/i,parse:function(t,e){var n=r[e[2].toLowerCase()],o={year:c(e[3]),month:n,date:s.toCardinal(e[1])};return!1===i(o)?(t.epoch=null,t):(a(t,o),t)}},{reg:/^[0-9]{4}$/i,parse:function(t,e){var n=c(e[0]),r=new Date,o={year:n,month:r.getMonth(),date:r.getDate()};return!1===i(o)?(t.epoch=null,t):(a(t,o),t)}},{reg:/^[0-9,]+ ?b\.?c\.?$/i,parse:function(t,e){var n=e[0]||"";n=(n=n.replace(/^([0-9,]+) ?b\.?c\.?$/i,"-$1")).replace(/,/g,"");var r=parseInt(n.trim(),10),o=new Date,s={year:r,month:o.getMonth(),date:o.getDate()};return!1===i(s)?(t.epoch=null,t):(a(t,s),t)}}];e.exports=l},{"../data/months":5,"../fns":8,"../methods/set/walk":31,"./hasDate":10,"./parseOffset":13}],15:[function(t,e,n){"use strict";var a=t("./methods/format"),r=t("./methods/format/unixFmt"),o=t("./methods/progress"),i=t("./methods/nearest"),s=t("./methods/diff"),u=t("./methods/since"),c=t("./methods/startOf"),l=t("./timezone/index"),h=t("./timezone/find"),f=t("./input"),d=t("./fns"),m={set:function(t){var e=this.clone();return e=f(e,t)},timezone:function(){return l(this)},isDST:function(){return l(this).current.isDST},hasDST:function(){return l(this).hasDst},offset:function(){return 60*l(this).current.offset},hemisphere:function(){return l(this).hemisphere},format:function(t){return a(this,t)},unixFmt:function(t){return r(this,t)},startOf:function(t){return c.startOf(this,t)},endOf:function(t){return c.endOf(this,t)},leapYear:function(){var t=this.year();return d.isLeapYear(t)},progress:function(){return o(this)},nearest:function(t){return i(this,t)},diff:function(t,e){return s(this,t,e)},since:function(t){return t||(t=this.clone().set()),u(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=h(t,e.timezones),e},isAwake:function(){var t=this.hour();return!(t<8||t>22)},isAsleep:function(){return!this.isAwake()},log:function(){return console.log(""),console.log(a(this,"nice-short")),this},logYear:function(){return console.log(""),console.log(a(this,"full-short")),this},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}};m.inDST=m.isDST,m.round=m.nearest,e.exports=m},{"./fns":8,"./input":11,"./methods/diff":18,"./methods/format":20,"./methods/format/unixFmt":21,"./methods/nearest":23,"./methods/progress":24,"./methods/since":32,"./methods/startOf":33,"./timezone/find":36,"./timezone/index":38}],16:[function(t,e,n){"use strict";var a=t("./set/walk"),r=t("../data/milliseconds"),o=t("../data/monthLengths"),i=t("../fns"),s=["millisecond","second","minute","hour","date","month"],u={second:s.slice(0,1),minute:s.slice(0,2),quarterhour:s.slice(0,2),hour:s.slice(0,3),date:s.slice(0,4),month:s.slice(0,4),quarter:s.slice(0,4),season:s.slice(0,4),year:s,decade:s,century:s};u.week=u.date,u.season=u.date,u.quarter=u.date;var c={month:!0,quarter:!0,season:!0,year:!0};e.exports=function(t){t.prototype.add=function(t,e){var n=this.clone();if(!e)return n;var s=this.clone();e=i.normalize(e),r[e]?n.epoch+=r[e]*t:"week"===e?n.epoch+=r.day*(7*t):"quarter"===e||"season"===e?n.epoch+=r.month*(4*t):"season"===e?n.epoch+=r.month*(4*t):"quarterhour"===e&&(n.epoch+=15*r.minute);var l={};if(u[e]&&u[e].forEach(function(t){l[t]=s[t]()}),"month"===e&&(l.month=s.month()+t,l=function(t,e){if(t.month>0){var n=parseInt(t.month/12,10);t.year=e.year()+n,t.month=t.month%12}else if(t.month<0){var a=Math.floor(Math.abs(t.month)/13,10);a=Math.abs(a)+1,t.year=e.year()-a,t.month=t.month%12,t.month=t.month+12,12===t.month&&(t.month=0)}return t}(l,s)),"week"===e){var h=s.date()+7*t;h<=28&&h>1&&(l.date=h)}else if("date"===e){var f=s.date()+t;f<=28&&f>1?l.date=f:0!==t&&s.isSame(n,"day")&&(l.date=s.date()+t)}else"year"===e&&n.year()===s.year()?n.epoch+=r.week:"decade"===e?l.year=n.year()+10:"century"===e&&(l.year=n.year()+100);if(c[e]){var d=o[l.month];l.date=s.date(),l.date>d&&(l.date=d)}return a(n,l),n},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}},{"../data/milliseconds":3,"../data/monthLengths":4,"../fns":8,"./set/walk":31}],17:[function(t,e,n){"use strict";var a=t("../fns");e.exports=function(t){var e={isAfter:function(t){t=a.beADate(t,this);var e=a.getEpoch(t);return null===e?null:this.epoch>e},isBefore:function(t){t=a.beADate(t,this);var e=a.getEpoch(t);return null===e?null:this.epoch0?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"},time:function(t){return t.time()},"time-24":function(t){return"".concat(t.hour24(),":").concat(a.zeroPad(t.minute()))},hour:function(t){return t.hour12()},"hour-24":function(t){return t.hour24()},minute:function(t){return t.minute()},"minute-pad":function(t){return a.zeroPad(t.minute())},second:function(t){return t.second()},"second-pad":function(t){return a.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()},timezone:function(t){return t.timezone().name},offset:function(t){return i(t)},numeric:function(t){return"".concat(t.year(),"/").concat(a.zeroPad(t.month()+1),"/").concat(a.zeroPad(t.date()))},"numeric-us":function(t){return"".concat(a.zeroPad(t.month()+1),"/").concat(a.zeroPad(t.date()),"/").concat(t.year())},"numeric-uk":function(t){return"".concat(a.zeroPad(t.date()),"/").concat(a.zeroPad(t.month()+1),"/").concat(t.year())},"mm/dd":function(t){return"".concat(a.zeroPad(t.month()+1),"/").concat(a.zeroPad(t.date()))},iso:function(t){var e=a.zeroPad(t.month()+1),n=a.zeroPad(t.date()),r=a.zeroPad(t.h24()),o=a.zeroPad(t.minute()),s=a.zeroPad(t.second()),u=a.zeroPad(t.millisecond(),3),c=i(t);return"".concat(t.year(),"-").concat(e,"-").concat(n,"T").concat(r,":").concat(o,":").concat(s,".").concat(u).concat(c)},"iso-short":function(t){var e=a.zeroPad(t.month()+1),n=a.zeroPad(t.date());return"".concat(t.year(),"-").concat(e,"-").concat(n)},"iso-utc":function(t){return new Date(t.epoch).toISOString()},nice:function(t){return"".concat(r.short()[t.month()]," ").concat(a.ordinal(t.date()),", ").concat(t.time())},"nice-year":function(t){return"".concat(r.short()[t.month()]," ").concat(a.ordinal(t.date()),", ").concat(t.year())},"nice-day":function(t){return"".concat(o.short()[t.day()]," ").concat(a.titleCase(r.short()[t.month()])," ").concat(a.ordinal(t.date()))},"nice-full":function(t){return"".concat(t.dayName()," ").concat(a.titleCase(t.monthName())," ").concat(a.ordinal(t.date()),", ").concat(t.time())}},u={"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","nice-short":"nice",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(u).forEach(function(t){return s[t]=s[u[t]]});e.exports=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!0!==t.isValid())return"";if(s.hasOwnProperty(e)){var n=String(s[e](t)||"");return"ampm"!==e&&(n=a.titleCase(n)),n}if(-1!==e.indexOf("{"))return e=e.replace(/\{(.+?)\}/g,function(e,n){return n=n.toLowerCase().trim(),s.hasOwnProperty(n)?String(s[n](t)||""):""});return t.format("iso-short")}},{"../../data/days":2,"../../data/months":5,"../../fns":8,"./_offset":19}],21:[function(t,e,n){"use strict";var a=t("../../fns").zeroPad,r={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 a(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 a(t.week())},d:function(t){return t.date()},dd:function(t){return a(t.date())},D:function(t){return t.dayOfYear()},DD:function(t){return a(t.dayOfYear())},DDD:function(t){return a(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 a(t.h12())},H:function(t){return t.hour()},HH:function(t){return a(t.hour())},m:function(t){return t.minute()},mm:function(t){return a(t.minute())},s:function(t){return t.second()},ss:function(t){return a(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 t.timezone().current.offset+"00"},ZZ:function(t){return t.timezone().current.offset+"00"},ZZZ:function(t){return t.timezone().current.offset+"00"},ZZZZ:function(t){return t.timezone().current.offset+":00"}},o=function(t,e,n){for(var a=t,o=e,i=0;i.5&&(t=t.add(1,e)),t=t.startOf(e)):!1===t.silent&&console.warn("no known unit '"+e+"'"),t}},{}],24:[function(t,e,n){"use strict";e.exports=function(t){var e={};return["year","season","quarter","month","week","day","quarterHour","hour","minute"].forEach(function(n){var a=t.clone().startOf(n),r=t.clone().endOf(n).epoch-a.epoch,o=(t.epoch-a.epoch)/r;e[n]=parseFloat(o.toFixed(2))}),e}},{}],25:[function(t,e,n){"use strict";var a=t("../../data/quarters"),r=t("../../data/seasons"),o=t("../set/set"),i=t("../../fns"),s=function(t){return t=(t=(t=t.minute(0)).second(0)).millisecond(1)};e.exports={time:function(t){if(void 0!==t){var e=this.clone();return e.epoch=o.time(e,t),e}return"".concat(this.h12(),":").concat(i.zeroPad(this.minute())).concat(this.ampm())},week:function(t){if(void 0!==t){var e=this.clone();return e=(e=(e=e.month(0)).date(1)).day("monday"),"december"===(e=s(e)).monthName()&&(e=e.add(1,"week")),t-=1,e=e.add(t,"weeks")}var n=this.clone();n=(n=n.month(0)).date(1),"december"===(n=(n=s(n)).day("monday")).monthName()&&(n=n.add(1,"week"));var a=this.epoch;if(n.epoch>a)return 1;for(var r=0;r<52;r++){if(n.epoch>a)return r;n=n.add(1,"week")}return 52},quarter:function(t){if(void 0!==t&&("string"==typeof t&&(t=t.replace(/^q/i,""),t=parseInt(t,10)),a[t])){var e=this.clone(),n=a[t][0];return e=(e=(e=e.month(n)).date(1)).startOf("day")}for(var r=this.d.getMonth(),o=1;o=r[e][i][1]&&o12&&(i-=12),0===i&&(i=12),i},date:function(t){if(void 0!==t){var e=this.clone();return e.epoch=a.date(e,t),e}return this.d.getDate()},month:function(t){if(void 0!==t){var e=this.clone();return e.epoch=a.month(e,t),e}return this.d.getMonth()},year:function(t){if(void 0!==t){var e=this.clone();return e.epoch=a.year(e,t),e}return this.d.getFullYear()},iso:function(t){return void 0!==t?this.set(t):this.format("iso")},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"},n=this.clone();return t=(t=t||"").toLowerCase(),!0===e.hasOwnProperty(t)&&(n=n.time(e[t])),n}var a=this.hour();return a<6?"night":a<12?"morning":a<17?"afternoon":a<22?"evening":"night"},dayOfYear:function(t){if(void 0!==t){var e=this.clone();return e.epoch=a.dayOfYear(e,t),e}for(var n,r=0,o=this.d.getMonth(),i=1;i<=o;i++)(n=new Date).setDate(1),n.setYear(this.d.getFullYear()),n.setHours(1),n.setMinutes(1),n.setMonth(i),n.setHours(-2),r+=n.getDate();return r+this.d.getDate()},era:function(t){if(void 0!==t){var e=this.clone();t=t.toLowerCase();var n=e.d.getFullYear();return"bc"===t&&n>0&&(e.epoch=a.year(e,-1*n)),"ad"===t&&n<0&&(e.epoch=a.year(e,-1*n)),e}return this.d.getFullYear()<0?"BC":"AD"},from:function(t){return(t=this.clone().set(t)).since(this)},fromNow:function(){return this.clone().set(Date.now()).since(this)}};o.milliseconds=o.millisecond,o.seconds=o.second,o.minutes=o.minute,o.hours=o.hour,o.hour24=o.hour,o.h12=o.hour12,o.h24=o.hour24,o.days=o.day,e.exports=o},{"../set/set":30,"../set/walk":31}],28:[function(t,e,n){"use strict";var a=t("../../data/days"),r=t("../../data/months"),o=t("../set/walk");e.exports={day:function(t){if(void 0===t)return this.d.getDay();var e=this.clone(),n=t;"string"==typeof t&&(t=t.toLowerCase(),-1===(n=a.short().indexOf(t))&&(n=a.long().indexOf(t)));var r=this.d.getDay(),i=r-n,s=this.subtract(24*i,"hours");return o(s,{hour:e.hour(),minute:e.minute(),second:e.second()}),s},ampm:function(t){var e="am";if(this.hour()>=12&&(e="pm"),void 0===t)return e;var n=this.clone();return t===e?n:n="am"===n?n.subtract(12,"hours"):n.add(12,"hours")},dayName:function(t){if(void 0===t)return a.long()[this.day()];var e=this.clone();return e=e.day(t)},monthName:function(t){if(void 0===t)return r.long()[this.month()];var e=this.clone();return e=e.month(t)}}},{"../../data/days":2,"../../data/months":5,"../set/walk":31}],29:[function(t,e,n){"use strict";var a={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()}};a.date=a.day;e.exports=function(t){t.prototype.isSame=function(e,n){return n?("string"!=typeof e&&"number"!=typeof e||(e=new t(e,this.timezone.name)),n=n.replace(/s$/,""),a[n]?a[n](this)===a[n](e):null):null}}},{}],30:[function(t,e,n){"use strict";var a=t("../../data/milliseconds"),r=t("../../data/months"),o=t("../../data/monthLengths"),i=t("./walk"),s=function(t){return"string"==typeof t&&(t=parseInt(t,10)),t},u=["year","month","date","hour","minute","second","millisecond"],c=function(t,e,n){for(var a=u.indexOf(n),r=u.slice(a,u.length),o=0;o12&&(a=!0),!1===a&&("am"===n[3]&&12===r&&(r=0),"pm"===n[3]&&r<12&&(r+=12)),(t=(t=(t=(t=t.hour(r)).minute(o)).second(0)).millisecond(0)).epoch},date:function(t,e){return e=s(e),i(t,{date:e}),t.epoch},month:function(t,e){"string"==typeof e&&(e=r.mapping()[e.toLowerCase()]),e=s(e);var n=t.date();return n>o[e]&&(n=o[e]),i(t,{month:e,date:n}),t.epoch},year:function(t,e){return e=s(e),i(t,{year:e}),t.epoch},dayOfYear:function(t,e){e=s(e);var n=t.clone(),r=(e-t.dayOfYear())*a.day;return t.epoch+=r,c(t,n,"hour"),t.epoch}}},{"../../data/milliseconds":3,"../../data/monthLengths":4,"../../data/months":5,"./walk":31}],31:[function(t,e,n){"use strict";var a=t("../../data/milliseconds"),r=function(t,e,n,r,o){var i=t.d[n]();if(i!==e){var s=null===o?null:t.d[o](),u=t.epoch,c=e-i;t.epoch+=a[r]*c,"day"===r&&Math.abs(c)>28&&e<28&&(t.epoch+=a.hour);for(var l=a[r]/2;t.d[n]()e;)t.epoch-=l;null!==o&&s!==t.d[o]()&&(console.warn("spacetime warning: missed setting "+r),t.epoch=u)}},o={year:{valid:function(t){return t>-4e3&&t<4e3},walkTo:function(t,e){return r(t,e,"getFullYear","year",null)}},month:{valid:function(t){return t>=0&&t<=11},walkTo:function(t,e){var n=t.d,r=n.getMonth(),o=t.epoch,i=n.getYear();if(r!==e){var s=e-r;for(t.epoch+=a.day*(28*s),i!==t.d.getYear()&&(t.epoch=o);t.d.getMonth()e;)t.epoch-=a.day}}},date:{valid:function(t){return t>0&&t<=31},walkTo:function(t,e){return r(t,e,"getDate","day","getMonth")}},hour:{valid:function(t){return t>=0&&t<24},walkTo:function(t,e){return r(t,e,"getHours","hour","getDate")}},minute:{valid:function(t){return t>=0&&t<60},walkTo:function(t,e){return r(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}}};e.exports=function(t,e){for(var n=Object.keys(o),a=t.clone(),r=0;ra.epoch+10&&(r=r.subtract(1,t),e-=1),o[t]=e}}),n&&Object.keys(o).forEach(function(t){0!==o[t]&&(o[t]*=-1)}),o}(t,e=a.beADate(e,t));if(!0===Object.keys(u).every(function(t){return!u[t]}))return{diff:u,rounded:"now",qualified:"now",precise:"now"};var c=[];return Object.keys(u).forEach(function(t,e,a){var s=Math.abs(u[t]);if(0!==s){var l=o(s,t);if(c.push(l),!n){if(n=i=l,e>4)return;var h=a[e+1],f=Math.abs(u[h]);f>r[h].almost?(n=o(s+1,t),i="almost "+n):f>r[h].over&&(i="over "+l)}}}),s=c.splice(0,2).join(", "),!0===t.isAfter(e)?(n+=" ago",i+=" ago",s+=" ago"):(n="in "+n,i="in "+i,s="in "+s),{diff:u,rounded:n,qualified:i,precise:s}}},{"../fns":8}],33:[function(t,e,n){"use strict";var a=t("../data/seasons"),r=t("../data/quarters"),o=t("./set/walk"),i={minute:function(t){return o(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),o(t,{second:0,millisecond:0}),t},hour:function(t){return o(t,{minute:0,second:0,millisecond:0}),t},day:function(t){return o(t,{hour:0,minute:0,second:0,millisecond:0}),t},week:function(t){var e=t.clone();return(t=t.day(1)).isAfter(e)&&(t=t.subtract(1,"week")),o(t,{hour:0,minute:0,second:0,millisecond:0}),t},month:function(t){return o(t,{date:1,hour:0,minute:0,second:0,millisecond:0}),t},quarter:function(t){var e=t.quarter();return r[e]&&o(t,{month:r[e][0],date:r[e][1],hour:0,minute:0,second:0,millisecond:0}),t},season:function(t){var e=t.season(),n="north";"South"===t.hemisphere()&&(n="south");for(var r=0;r2&&!1===e.hasOwnProperty(n)&&(n=a[0]+"/"+a[1]),n=n.toLowerCase(),!0===e.hasOwnProperty(n))return n;if(n=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")}(n),!0===e.hasOwnProperty(n))return n;if(!0===r.hasOwnProperty(n))return r[n];if(!0===s.hasOwnProperty(n))return s[n];var u=n.match(i);if(null!==u){var c=Number(u[1]),l="etc/gmt"+(c=((c*=-1)>0?"+":"")+c);if(e.hasOwnProperty(l))return l}return console.warn("Cannot find timezone named: '"+t+"'"),o}},{"../../zonefile/informal":44,"../../zonefile/unpack":45,"./guessTz":37}],37:[function(t,e,n){"use strict";e.exports=function(){var t=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||-1===e.indexOf("/")&&"UTC"===e?null:e}();return null===t?"asia/shanghai":t.toLowerCase()}},{}],38:[function(t,e,n){"use strict";var a=t("./find"),r=t("./summerTime"),o=t("./display");e.exports=function(t){var e=t.timezones,n=t.tz;if(!1===e.hasOwnProperty(n)&&(n=a(t.tz,e)),null===n)return!1===t.silent&&console.warn("Warn: could not find given or local timezone - '"+t.tz+"'"),{current:{epochShift:0}};var i,s,u=e[n],c={name:(i=n,i=(i=(i=i[0].toUpperCase()+i.substr(1)).replace(/\/gmt/,"/GMT")).replace(/[\/_]([a-z])/gi,function(t){return t.toUpperCase()})),hasDst:Boolean(u.dst),default_offset:u.offset,hemisphere:"s"===u.hem?"South":"North",current:{}};if(c.hasDst){var l=(s=u.dst)?s.split("->"):[];c.change={start:l[0],back:l[1]}}var h=u.offset,f=h;return!0===c.hasDst&&(f="North"===c.hemisphere?h-1:u.offset+1),!1===c.hasDst?(c.current.offset=h,c.current.isDST=!1):!0===r(t.epoch,c.change.start,c.change.back,h)?(c.current.offset=h,c.current.isDST="North"===c.hemisphere):(c.current.offset=f,c.current.isDST="South"===c.hemisphere),c.display=o(n,c,e),c}},{"./display":35,"./find":36,"./summerTime":40}],39:[function(t,e,n){"use strict";var a=t("./summerTime");e.exports=function(t){var e=t.timezones[t.tz];if(void 0===e.dst)return e.offset;var n=e.offset,r=e.offset+1;"n"===e.hem&&(r=n-1);var o=e.dst.split("->");return!0===a(t.epoch,o[0],o[1],n)?n:r}},{"./summerTime":40}],40:[function(t,e,n){"use strict";var a=t("../fns").zeroPad;e.exports=function(t,e,n,r){var o=new Date(t),i=(o.getTimezoneOffset()||0)+60*r;i=60*i*1e3;var s=function(t){return a(t.getMonth()+1)+"/"+a(t.getDate())+":"+a(t.getHours())}(o=new Date(t+i));return s>=e&&s=o&&s<=i&&!(s===o&&e.minute()r.minute())})}},{"./spacetime":34}],42:[function(t,e,n){e.exports={"9|s":"2/dili,2/jayapura","9|n":"2/chita,2/khandyga,2/pyongyang,2/seoul,2/tokyo,11/palau","9.5|s|04/01:03->10/07:02":"4/adelaide,4/broken_hill,4/south,4/yancowinna","9.5|s":"4/darwin,4/north","8|s":"12/casey,2/kuala_lumpur,2/makassar,2/singapore,4/perth,4/west","8|n|03/25:03->09/29:23":"2/ulan_bator","8|n":"2/brunei,2/choibalsan,2/chongqing,2/chungking,2/harbin,2/hong_kong,2/irkutsk,2/kuching,2/macao,2/macau,2/manila,2/shanghai,2/taipei,2/ujung_pandang,2/ulaanbaatar","8.75|s":"4/eucla","7|s":"12/davis,2/jakarta,9/christmas","7|n":"2/bangkok,2/barnaul,2/ho_chi_minh,2/hovd,2/krasnoyarsk,2/novokuznetsk,2/novosibirsk,2/phnom_penh,2/pontianak,2/saigon,2/vientiane","6|s":"12/vostok","6|n":"2/almaty,2/bishkek,2/dacca,2/dhaka,2/kashgar,2/omsk,2/qyzylorda,2/thimbu,2/thimphu,2/urumqi,9/chagos","6.5|n":"2/rangoon,9/cocos","5|s":"12/mawson,9/kerguelen","5|n":"2/aqtau,2/aqtobe,2/ashgabat,2/ashkhabad,2/atyrau,2/baku,2/dushanbe,2/karachi,2/oral,2/samarkand,2/tashkent,2/yekaterinburg,9/maldives","5.75|n":"2/kathmandu,2/katmandu","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,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/30:00->10/26:01":"2/amman","3|n|03/30:00->10/25:24":"2/damascus","3|n|03/25:03->10/28:04":"2/nicosia,8/athens,8/bucharest,8/helsinki,8/kiev,8/mariehamn,8/nicosia,8/riga,8/sofia,8/tallinn,8/uzhgorod,8/vilnius,8/zaporozhye","3|n|03/25:02->10/28:03":"8/chisinau,8/tiraspol","3|n|03/25:00->10/27:24":"2/beirut","3|n|03/24:01->10/27:01":"2/gaza,2/hebron","3|n|03/23:02->10/28:02":"2/jerusalem,2/tel_aviv","3|n":"0/addis_ababa,0/asmara,0/asmera,0/dar_es_salaam,0/djibouti,0/juba,0/kampala,0/mogadishu,0/nairobi,2/aden,2/baghdad,2/bahrain,2/istanbul,2/kuwait,2/qatar,2/riyadh,8/istanbul,8/kirov,8/minsk,8/moscow,8/simferopol,8/volgograd,9/comoro,9/mayotte","2|s|03/25:02->10/28:02":"12/troll","2|s":"0/gaborone,0/harare,0/johannesburg,0/lubumbashi,0/lusaka,0/maputo,0/maseru,0/mbabane","2|n|03/25:02->10/28:03":"0/ceuta,arctic/longyearbyen,3/jan_mayen,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","2|n":"0/blantyre,0/bujumbura,0/cairo,0/khartoum,0/kigali,0/tripoli,8/kaliningrad","1|s|04/02:01->09/03:03":"0/windhoek","1|s":"0/kinshasa,0/luanda","1|n|07/02:03->10/29:02":"0/casablanca,0/el_aaiun","1|n|03/25:01->10/28:02":"3/canary,3/faeroe,3/faroe,3/madeira,8/belfast,8/dublin,8/guernsey,8/isle_of_man,8/jersey,8/lisbon,8/london","1|n":"0/algiers,0/bangui,0/brazzaville,0/douala,0/lagos,0/libreville,0/malabo,0/ndjamena,0/niamey,0/porto-novo,0/tunis","14|n":"11/kiritimati","13|s|04/01:04->09/30:03":"11/apia","13|s|01/15:02->11/05:03":"11/tongatapu","13|n":"11/enderbury,11/fakaofo","12|s|04/01:03->09/30:02":"12/mcmurdo,12/south_pole,11/auckland","12|s|01/14:03->11/04: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/07:03->09/29:02":"11/chatham","11|s":"12/macquarie,11/bougainville","11|n":"2/magadan,2/sakhalin,11/efate,11/guadalcanal,11/kosrae,11/noumea,11/pohnpei,11/ponape","11.5|n":"11/norfolk","10|s|04/01:03->10/07:02":"4/act,4/canberra,4/currie,4/hobart,4/melbourne,4/nsw,4/sydney,4/tasmania,4/victoria","10|s":"12/dumontdurville,4/brisbane,4/lindeman,4/queensland","10|n":"2/ust-nera,2/vladivostok,2/yakutsk,11/chuuk,11/guam,11/port_moresby,11/saipan,11/truk,11/yap","10.5|s|04/01:01->10/07:02":"4/lhi,4/lord_howe","0|n|03/25:00->10/28: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,0/timbuktu,1/danmarkshavn,3/reykjavik,3/st_helena,13/gmt,13/gmt+0,13/gmt-0,13/gmt0,13/greenwich,13/utc,13/universal,13/zulu","-9|n|03/11:02->11/04:02":"1/adak,1/atka","-9|n":"11/gambier","-9.5|n":"11/marquesas","-8|n|03/11:02->11/04:02":"1/anchorage,1/juneau,1/metlakatla,1/nome,1/sitka,1/yakutat","-8|n":"11/pitcairn","-7|n|03/11:02->11/04:02":"1/dawson,1/ensenada,1/los_angeles,1/santa_isabel,1/tijuana,1/vancouver,1/whitehorse,6/pacific,6/yukon,10/bajanorte","-7|n":"1/creston,1/dawson_creek,1/hermosillo,1/phoenix","-6|s|05/12:22->08/11:22":"7/easterisland,11/easter","-6|n|04/01:02->10/28:02":"1/chihuahua,1/mazatlan,10/bajasur","-6|n|03/11:02->11/04:02":"1/boise,1/cambridge_bay,1/denver,1/edmonton,1/inuvik,1/ojinaga,1/shiprock,1/yellowknife,6/mountain","-6|n":"1/belize,1/costa_rica,1/el_salvador,1/guatemala,1/managua,1/regina,1/swift_current,1/tegucigalpa,6/east-saskatchewan,6/saskatchewan,11/galapagos","-5|s":"1/lima,1/rio_branco,5/acre","-5|n|04/01:02->10/28:02":"1/bahia_banderas,1/merida,1/mexico_city,1/monterrey,10/general","-5|n|03/12:03->11/05:01":"1/north_dakota","-5|n|03/11:02->11/04:02":"1/chicago,1/knox_in,1/matamoros,1/menominee,1/rainy_river,1/rankin_inlet,1/resolute,1/winnipeg,6/central","-5|n":"1/atikokan,1/bogota,1/cancun,1/cayman,1/coral_harbour,1/eirunepe,1/guayaquil,1/jamaica,1/panama,1/porto_acre","-4|s|05/13:23->08/13:01":"12/palmer","-4|s|05/12:24->08/12:00":"1/santiago,7/continental","-4|s|03/24:24->10/07:00":"1/asuncion","-4|s|02/17:24->11/04:00":"1/campo_grande,1/cuiaba","-4|s":"1/la_paz,1/manaus,5/west","-4|n|03/12:03->11/05:01":"1/indiana,1/kentucky","-4|n|03/11:02->11/04:02":"1/detroit,1/fort_wayne,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,6/eastern","-4|n|03/11:00->11/04:01":"1/havana","-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|02/17:24->11/04:00":"1/sao_paulo,5/east","-3|s":"1/argentina,1/buenos_aires,1/cordoba,1/fortaleza,1/montevideo,1/punta_arenas,12/rothera,3/stanley","-3|n|03/11:02->11/04: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/catamarca,1/cayenne,1/jujuy,1/maceio,1/mendoza,1/paramaribo,1/recife,1/rosario,1/santarem","-2|s":"5/denoronha","-2|n|03/24:22->10/27:23":"1/godthab","-2|n|03/11:02->11/04:02":"1/miquelon","-2|n":"1/noronha,3/south_georgia","-2.5|n|03/11:02->11/04:02":"1/st_johns,6/newfoundland","-1|n":"3/cape_verde","-11|n":"11/midway,11/niue,11/pago_pago,11/samoa","-10|n":"11/honolulu,11/johnston,11/rarotonga,11/tahiti"}},{}],43:[function(t,e,n){"use strict";e.exports=["africa","america","asia","atlantic","australia","brazil","canada","chile","europe","indian","mexico","pacific","antarctica","etc"]},{}],44:[function(t,e,n){"use strict";var a={"america/halifax":["ast","adt","atlantic"],"america/new_york":["est","edt","eastern"],"america/chicago":["cst","cdt","central"],"america/denver":["mst","mdt","mountain"],"america/los_angeles":["pst","pdt","pacific"],"america/anchorage":["ahst","ahdt","akst","akdt","alaska"],"america/st_johns":["nst","ndt","nt","newfoundland","nddt"],"america/caracas":["vet",null,"venezuela"],"america/bogota":["cot",null,"colombia"],"america/cayenne":["gft",null,"french guiana"],"america/paramaribo":["srt",null,"suriname"],"america/guyana":["gyt"],"america/buenos_aires":["art",null,"argentina"],"america/la_paz":["bot",null,"bolivia"],"america/asuncion":["pyt","pyst","paraguay"],"america/santiago":["clt","clst","chile"],"america/lima":["pet",null,"peru"],"america/montevideo":["uyt",null,"uruguay"],"atlantic/stanley":["fkst",null,"falkland island"],"america/manaus":["amt"],"america/sao_paulo":["brt","brst"],"brazil/acre":["act"],"europe/london":["gmt","bst","british"],"etc/gmt":["gmt",null,"greenwich"],"europe/lisbon":["wet","west","west europe"],"europe/berlin":["cet","cest","central europe","middle european","met","mest"],"europe/riga":["eet","eest","east europe","kalt"],"europe/moscow":["msk",null,"fet","mdst","msd"],"europe/samara":["samt"],"asia/yekaterinburg":["yekt"],"asia/omsk":["omst"],"asia/krasnoyarsk":["krat"],"asia/novosibirsk":["novt"],"asia/irkutsk":["irkt"],"asia/yakutsk":["yakt"],"asia/vladivostok":["vlat"],"asia/magadan":["magt"],"asia/sakhalin":["sakt"],"asia/srednekolymsk":["sret"],"asia/anadyr":["anat"],"asia/kamchatka":["pett"],"asia/tashkent":["uzt","uzbekistan"],"asia/bishkek":["kgt","kyrgyzstan"],"antarctica/vostok":["vost"],"asia/hovd":["hovt"],"asia/ashgabat":["tmt",null,"turkmenistan"],"africa/lagos":["wat","wast","west africa"],"africa/khartoum":["cat",null,"central africa"],"africa/nairobi":["eat",null,"east africa"],"atlantic/cape_verde":["cvt"],"indian/mauritius":["mut"],"indian/reunion":["ret"],"africa/johannesburg":["sast",null,"south africa"],"atlantic/azores":["azot","azost","hmt"],"america/godthab":["wgt","wgst","west greenland"],"america/scoresbysund":["egt","egst","east greenland"],"europe/istanbul":["trt",null,"turkey"],"asia/tbilisi":["get",null,"georgia"],"asia/baku":["azt",null,"azerbaijan"],"asia/jerusalem":[null,"idt","israel","jmt","iddt"],"asia/tehran":["irst","irdt","iran"],"asia/karachi":["pkt",null,"pakistan"],"asia/kabul":["aft",null,"afghanistan"],"asia/dushanbe":["tjt",null,"tajikistan"],"asia/almaty":["almt",null,"alma ata"],"asia/dubai":["gst",null,"gulf"],"asia/kolkata":["ist",null,"india","slst"],"asia/thimbu":["btt",null,"bhutan"],"indian/maldives":["mvt"],"asia/kathmandu":["npt",null,"nepal"],"indian/cocos":["cct",null,"cocos island"],"indian/chagos":["iot",null,"indian chagos"],"indian/kerguelen":["tft",null,"french southern and antarctic"],"asia/shanghai":["ct",null,"china","hkt"],"asia/ulaanbaatar":["ulat"],"asia/seoul":["kst",null,"korea"],"asia/tokyo":["jst",null,"japan"],"asia/phnom_penh":["ict",null,"indochina"],"asia/manila":["pht",null,"philippines"],"asia/singapore":["sgt"],"australia/brisbane":["aest","aedt","australian east"],"australia/adelaide":["acst","acdt","australian central"],"australia/eucla":["acwst",null,"cwst","australian central western"],"australia/perth":["awst","awdt","australian west"],"pacific/auckland":["nzst","nzdt","nzmt"],"australia/lord_howe":["lhst","lhdt"],"pacific/guam":["chst"],"pacific/chatham":["chast","chadt"],"pacific/honolulu":["hst"],"asia/brunei":["bnt",null,"bdt"],"pacific/midway":["sst",null,"samoa","sdt"],"pacific/niue":["nut"],"pacific/fakaofo":["tkt"],"pacific/rarotonga":["ckt",null,"cook islands"],"chile/easterisland":["east","easst","easter island","emt"],"asia/jayapura":["wit",null,"east indonesia"],"asia/jakarta":["wib",null,"west indonesia"],"asia/makassar":["wita",null,"central indonesia"],"pacific/galapagos":["galt"],"pacific/fiji":["fjt","fjst"],"asia/dili":["tlt",null,"east timor"],"indian/christmas":["cxt"]},r=Object.keys(a).reduce(function(t,e){for(var n=a[e],r=0;r<5;r+=1)n[r]&&(t[n[r]]=e);return t},{});e.exports={informal:a,lookup:r}},{}],45:[function(t,e,n){"use strict";var a=t("./_build.json"),r=t("./_prefixes.js"),o={};Object.keys(a).forEach(function(t){var e=t.split("|"),n={offset:Number(e[0]),hem:e[1]};e[2]&&(n.dst=e[2]),a[t].split(",").forEach(function(t){t=t.replace(/(^[0-9]+)\//,function(t,e){return e=Number(e),r[e]+"/"}),o[t]=n})});for(var i=-12;i<13;i+=1){var s=i;s>0&&(s="+"+s);var u="etc/gmt"+s;o[u]={offset:-1*i,hem:"n"},o[u="utc/gmt"+s]={offset:-1*i,hem:"n"}}e.exports=o},{"./_build.json":42,"./_prefixes.js":43}]},{},[9])(9)});